Added search by translated string to the translation area.
This commit is contained in:
@ -690,6 +690,39 @@ class Compiler extends Infusion
|
||||
File::delete($update_server_xml_path);
|
||||
}
|
||||
}
|
||||
// move the modules update server to host
|
||||
if (ComponentbuilderHelper::checkArray($this->joomlaModules))
|
||||
{
|
||||
foreach ($this->joomlaModules as $module)
|
||||
{
|
||||
if (ComponentbuilderHelper::checkObject($module)
|
||||
&& isset($module->add_update_server)
|
||||
&& $module->add_update_server == 1
|
||||
&& isset($module->update_server_target)
|
||||
&& $module->update_server_target == 1
|
||||
&& isset($module->update_server)
|
||||
&& is_numeric($module->update_server)
|
||||
&& $module->update_server > 0
|
||||
&& isset($module->update_server_xml_path)
|
||||
&& File::exists($module->update_server_xml_path)
|
||||
&& isset($module->update_server_xml_file_name)
|
||||
&& ComponentbuilderHelper::checkString(
|
||||
$module->update_server_xml_file_name
|
||||
))
|
||||
{
|
||||
// move to server
|
||||
ComponentbuilderHelper::moveToServer(
|
||||
$module->update_server_xml_path,
|
||||
$module->update_server_xml_file_name,
|
||||
(int) $module->update_server,
|
||||
$module->update_server_protocol
|
||||
);
|
||||
// remove the local file
|
||||
File::delete($module->update_server_xml_path);
|
||||
}
|
||||
// var_dump($module->update_server_xml_path);exit;
|
||||
}
|
||||
}
|
||||
// move the plugins update server to host
|
||||
if (ComponentbuilderHelper::checkArray($this->joomlaPlugins))
|
||||
{
|
||||
@ -724,7 +757,7 @@ class Compiler extends Infusion
|
||||
}
|
||||
}
|
||||
|
||||
// link canges made to views into the file license
|
||||
// link changes made to views into the file license
|
||||
protected function fixLicenseValues($data)
|
||||
{
|
||||
// check if these files have its own config data)
|
||||
|
@ -1,5 +1,5 @@
|
||||
<?php
|
||||
/**
|
||||
/**
|
||||
* @package Joomla.Component.Builder
|
||||
*
|
||||
* @created 30th April, 2015
|
||||
@ -10104,7 +10104,7 @@ class Get
|
||||
else
|
||||
{
|
||||
$plugin->{$server} = 0;
|
||||
// only change this for sales server (update server can be added loacaly to the zip file)
|
||||
// only change this for sales server (update server can be added locally to the zip file)
|
||||
if ('sales_server' === $server)
|
||||
{
|
||||
$plugin->{'add_' . $server} = 0;
|
||||
|
@ -78,6 +78,11 @@ abstract class ComponentbuilderHelper
|
||||
**/
|
||||
protected static $localCompany = array();
|
||||
|
||||
/**
|
||||
* The excluded powers
|
||||
**/
|
||||
protected static $exPowers= array();
|
||||
|
||||
/**
|
||||
* The snippet paths
|
||||
**/
|
||||
@ -1968,6 +1973,39 @@ abstract class ComponentbuilderHelper
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Powers to exclude
|
||||
**/
|
||||
public static function excludePowers($id)
|
||||
{
|
||||
// first check if this power set is already found
|
||||
if (!isset(self::$exPowers[$id]))
|
||||
{
|
||||
// Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
// Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
$query->select($db->quoteName(array('a.id')));
|
||||
$query->from($db->quoteName('#__componentbuilder_power', 'a'));
|
||||
$query->join('LEFT', $db->quoteName('#__componentbuilder_power', 'b') . ' ON (' . $db->quoteName('a.name') . ' = ' . $db->quoteName('b.name') . ' AND ' . $db->quoteName('a.namespace') . ' = ' . $db->quoteName('b.namespace') . ')');
|
||||
$query->where($db->quoteName('b.id') . ' = ' . (int) $id);
|
||||
$db->setQuery($query);
|
||||
$db->execute();
|
||||
if ($db->getNumRows())
|
||||
{
|
||||
self::$exPowers[$id] = $db->loadColumn();
|
||||
}
|
||||
// all ways add itself aswell
|
||||
self::$exPowers[$id][] = $id;
|
||||
}
|
||||
// if found return
|
||||
if (isset(self::$exPowers[$id]))
|
||||
{
|
||||
return self::$exPowers[$id];
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* The array of dynamic content
|
||||
@ -2606,7 +2644,7 @@ abstract class ComponentbuilderHelper
|
||||
$field['values'] .= PHP_EOL . "/>";
|
||||
$field['values_description'] .= '</tbody></table>';
|
||||
// load the database defaults if set and wanted
|
||||
if ($db_defaults && isset($result->has_defaults) && $result->has_defaults == 1)
|
||||
if ($dbDefaults && isset($result->has_defaults) && $result->has_defaults == 1)
|
||||
{
|
||||
$field['database'] = array(
|
||||
'datatype' => $result->datatype,
|
||||
@ -6716,6 +6754,75 @@ abstract class ComponentbuilderHelper
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Check if a row already exist
|
||||
*
|
||||
* @param string $table The table from which to get the variable
|
||||
* @param array $where The value where
|
||||
* @param string $main The component in which the table is found
|
||||
*
|
||||
* @return int the id, or false
|
||||
*
|
||||
*/
|
||||
public static function checkExist($table, $where, $what = 'id', $operator = '=', $main = 'componentbuilder')
|
||||
{
|
||||
// Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
// Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
$query->select($db->quoteName(array($what)));
|
||||
if (empty($table))
|
||||
{
|
||||
$query->from($db->quoteName('#__'.$main));
|
||||
}
|
||||
else
|
||||
{
|
||||
$query->from($db->quoteName('#__'.$main.'_'.$table));
|
||||
}
|
||||
if (self::checkArray($where))
|
||||
{
|
||||
foreach ($where as $key => $value)
|
||||
{
|
||||
if (is_numeric($value))
|
||||
{
|
||||
if (is_float($value + 0))
|
||||
{
|
||||
$query->where($db->quoteName($key) . ' ' . $operator . ' ' . (float) $value);
|
||||
}
|
||||
else
|
||||
{
|
||||
$query->where($db->quoteName($key) . ' ' . $operator . ' ' . (int) $value);
|
||||
}
|
||||
}
|
||||
elseif (is_bool($value))
|
||||
{
|
||||
$query->where($db->quoteName($key) . ' ' . $operator . ' ' . (bool) $value);
|
||||
}
|
||||
// we do not allow arrays at this point
|
||||
elseif (!self::checkArray($value))
|
||||
{
|
||||
$query->where($db->quoteName($key) . ' ' . $operator . ' ' . $db->quote( (string) $value));
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
$db->setQuery($query);
|
||||
$db->execute();
|
||||
if ($db->getNumRows())
|
||||
{
|
||||
return $db->loadResult();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
|
@ -9,6 +9,9 @@
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
/**
|
||||
* Componentbuilder component email helper
|
||||
*/
|
||||
|
Reference in New Issue
Block a user