New Helper Classes and other bug fixes #887

Merged
Llewellyn merged 12 commits from staging into master 2022-04-04 16:42:57 +00:00
204 changed files with 7959 additions and 5169 deletions

View File

@ -12,7 +12,7 @@ The Component Builder for [Joomla](https://extensions.joomla.org/extension/compo
Whether you're a seasoned [Joomla](https://extensions.joomla.org/extension/component-builder/) developer, or have just started, Component Builder will save you lots of time and money. A real must have!
You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.12.15) with **ALL** its features and **ALL** concepts totally open-source and free!
You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.12.16) with **ALL** its features and **ALL** concepts totally open-source and free!
> Watch Quick Build of a Hello World component in [JCB on Youtube](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45)
@ -143,14 +143,14 @@ TODO
+ *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)
+ *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder)
+ *First Build*: 30th April, 2015
+ *Last Build*: 15th January, 2022
+ *Version*: 2.12.15
+ *Last Build*: 4th April, 2022
+ *Version*: 2.12.16
+ *Copyright*: Copyright (C) 2015 Vast Development Method. All rights reserved.
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt
+ *Line count*: **286035**
+ *Field count*: **1572**
+ *File count*: **1829**
+ *Folder count*: **256**
+ *Line count*: **286290**
+ *Field count*: **1580**
+ *File count*: **1850**
+ *Folder count*: **260**
> This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](http://joomlacomponentbuilder.com).
> Developed by [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)

View File

@ -12,7 +12,7 @@ The Component Builder for [Joomla](https://extensions.joomla.org/extension/compo
Whether you're a seasoned [Joomla](https://extensions.joomla.org/extension/component-builder/) developer, or have just started, Component Builder will save you lots of time and money. A real must have!
You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.12.15) with **ALL** its features and **ALL** concepts totally open-source and free!
You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.12.16) with **ALL** its features and **ALL** concepts totally open-source and free!
> Watch Quick Build of a Hello World component in [JCB on Youtube](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45)
@ -143,14 +143,14 @@ TODO
+ *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)
+ *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder)
+ *First Build*: 30th April, 2015
+ *Last Build*: 15th January, 2022
+ *Version*: 2.12.15
+ *Last Build*: 4th April, 2022
+ *Version*: 2.12.16
+ *Copyright*: Copyright (C) 2015 Vast Development Method. All rights reserved.
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt
+ *Line count*: **286035**
+ *Field count*: **1572**
+ *File count*: **1829**
+ *Folder count*: **256**
+ *Line count*: **286290**
+ *Field count*: **1580**
+ *File count*: **1850**
+ *Folder count*: **260**
> This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](http://joomlacomponentbuilder.com).
> Developed by [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)

View File

@ -62,10 +62,10 @@ class ###Component###View###Component### extends JViewLegacy
JToolBarHelper::title(JText::_('COM_###COMPONENT###_DASHBOARD'), 'grid-2');
// set help url for this view if found
$help_url = ###Component###Helper::getHelpUrl('###component###');
if (###Component###Helper::checkString($help_url))
$this->help_url = ###Component###Helper::getHelpUrl('###component###');
if (###Component###Helper::checkString($this->help_url))
{
JToolbarHelper::help('COM_###COMPONENT###_HELP_MANAGER', false, $help_url);
JToolbarHelper::help('COM_###COMPONENT###_HELP_MANAGER', false, $this->help_url);
}
if ($canDo->get('core.admin') || $canDo->get('core.options'))

View File

@ -15,7 +15,7 @@ defined('_JEXEC') or die('Restricted access');
###BOM###
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
defined('_JEXEC') or die('Restricted access');###ADMIN_POWER_HELPER###
###ADMIN_HELPER_CLASS_HEADER###
@ -36,7 +36,7 @@ abstract class ###Component###Helper
*
* @var string
*/
public static $langTag;###ADMIN_GLOBAL_EVENT_HELPER######CUSTOM_HELPER_SCRIPT######BOTH_CUSTOM_HELPER_SCRIPT######ADMIN_POWER_EVENT_HELPER###
public static $langTag;###ADMIN_GLOBAL_EVENT_HELPER######CUSTOM_HELPER_SCRIPT######BOTH_CUSTOM_HELPER_SCRIPT###
/**
* Load the Composer Vendors
@ -1339,3 +1339,4 @@ abstract class ###Component###Helper
return implode($key);
}###GET_CRYPT_KEY###
}

View File

@ -15,7 +15,7 @@ defined('_JEXEC') or die('Restricted access');
###BOM###
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
defined('_JEXEC') or die('Restricted access');###SITE_POWER_HELPER###
###SITE_HELPER_CLASS_HEADER###
@ -36,7 +36,7 @@ abstract class ###Component###Helper
*
* @var string
*/
public static $langTag;###SITE_GLOBAL_EVENT_HELPER######SITE_CUSTOM_HELPER_SCRIPT######BOTH_CUSTOM_HELPER_SCRIPT######SITE_POWER_EVENT_HELPER###
public static $langTag;###SITE_GLOBAL_EVENT_HELPER######SITE_CUSTOM_HELPER_SCRIPT######BOTH_CUSTOM_HELPER_SCRIPT###
/**
* Load the Composer Vendors
@ -1331,3 +1331,4 @@ abstract class ###Component###Helper
return implode($key);
}###GET_CRYPT_KEY###
}

View File

@ -0,0 +1,760 @@
<?php
/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com>
* @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
?>
###BOM###
// No direct access to this file
defined('_JEXEC') or die('Restricted access');###ADMIN_POWER_HELPER###
###ADMIN_HELPER_CLASS_HEADER###
/**
* ###Component### component helper.
*/
abstract class ###Component###Helper
{
/**
* Adding the utilities trait to this class
*
* @deprecated 4.0 - Check the trait methods for details, a legacy implementation
*/
use Utilities;
/**
* Composer Switch
*
* @var array
*/
protected static $composer = array();###ADMIN_GLOBAL_EVENT_HELPER######CUSTOM_HELPER_SCRIPT######BOTH_CUSTOM_HELPER_SCRIPT###
/**
* Load the Composer Vendors
*/
public static function composerAutoload($target)
{
// insure we load the composer vendor only once
if (!isset(self::$composer[$target]))
{
// get the function name
$functionName = self::safeString('compose' . $target);
// check if method exist
if (method_exists(__CLASS__, $functionName))
{
return self::{$functionName}();
}
return false;
}
return self::$composer[$target];
}
/**
* Load the Component xml manifest.
*/
public static function manifest()
{
$manifestUrl = JPATH_ADMINISTRATOR."/components/com_###component###/###component###.xml";
return simplexml_load_file($manifestUrl);
}
/**
* Joomla version object
*/
protected static $JVersion;
/**
* set/get Joomla version
*/
public static function jVersion()
{
// check if set
if (!self::checkObject(self::$JVersion))
{
self::$JVersion = new JVersion();
}
return self::$JVersion;
}
/**
* Load the Contributors details.
*/
public static function getContributors()
{
// get params
$params = JComponentHelper::getParams('com_###component###');
// start contributors array
$contributors = array();
// get all Contributors (max 20)
$searchArray = range('0','20');
foreach($searchArray as $nr)
{
if ((NULL !== $params->get("showContributor".$nr)) && ($params->get("showContributor".$nr) == 1 || $params->get("showContributor".$nr) == 3))
{
// set link based of selected option
if($params->get("useContributor".$nr) == 1)
{
$link_front = '<a href="mailto:'.$params->get("emailContributor".$nr).'" target="_blank">';
$link_back = '</a>';
}
elseif($params->get("useContributor".$nr) == 2)
{
$link_front = '<a href="'.$params->get("linkContributor".$nr).'" target="_blank">';
$link_back = '</a>';
}
else
{
$link_front = '';
$link_back = '';
}
$contributors[$nr]['title'] = self::htmlEscape($params->get("titleContributor".$nr));
$contributors[$nr]['name'] = $link_front.self::htmlEscape($params->get("nameContributor".$nr)).$link_back;
}
}
return $contributors;
}###HELP###
/**
* Configure the Linkbar.
*/
public static function addSubmenu($submenu)
{
// load user for access menus
$user = JFactory::getUser();
// load the submenus to sidebar
###SUBMENU###
}###HELPER_CREATEUSER######HELPER_UIKIT######HELPER_EXEL###
public static function isPublished($id,$type)
{
if ($type == 'raw')
{
$type = 'item';
}
$db = JFactory::getDbo();
$query = $db->getQuery(true);
$query->select(array('a.published'));
$query->from('#__###component###_'.$type.' AS a');
$query->where('a.id = '. (int) $id);
$query->where('a.published = 1');
$db->setQuery($query);
$db->execute();
$found = $db->getNumRows();
if($found)
{
return true;
}
return false;
}
public static function getGroupName($id)
{
$db = JFactory::getDBO();
$query = $db->getQuery(true);
$query->select(array('a.title'));
$query->from('#__usergroups AS a');
$query->where('a.id = '. (int) $id);
$db->setQuery($query);
$db->execute();
$found = $db->getNumRows();
if($found)
{
return $db->loadResult();
}
return $id;
}
/**
* Get the action permissions
*
* @param string $view The related view name
* @param int $record The item to act upon
* @param string $views The related list view name
* @param mixed $target Only get this permission (like edit, create, delete)
* @param string $component The target component
* @param object $user The user whose permissions we are loading
*
* @return object The JObject of permission/authorised actions
*
*/
public static function getActions($view, &$record = null, $views = null, $target = null, $component = '###component###', $user = 'null')
{
// load the user if not given
if (!self::checkObject($user))
{
// get the user object
$user = JFactory::getUser();
}
// load the JObject
$result = new JObject;
// make view name safe (just incase)
$view = self::safeString($view);
if (self::checkString($views))
{
$views = self::safeString($views);
}
// get all actions from component
$actions = JAccess::getActionsFromFile(
JPATH_ADMINISTRATOR . '/components/com_' . $component . '/access.xml',
"/access/section[@name='component']/"
);
// if non found then return empty JObject
if (empty($actions))
{
return $result;
}
// get created by if not found
if (self::checkObject($record) && !isset($record->created_by) && isset($record->id))
{
$record->created_by = self::getVar($view, $record->id, 'id', 'created_by', '=', $component);
}
// set actions only set in component settings
$componentActions = array('core.admin', 'core.manage', 'core.options', 'core.export');
// check if we have a target
$checkTarget = false;
if ($target)
{
// convert to an array
if (self::checkString($target))
{
$target = array($target);
}
// check if we are good to go
if (self::checkArray($target))
{
$checkTarget = true;
}
}
// loop the actions and set the permissions
foreach ($actions as $action)
{
// check target action filter
if ($checkTarget && self::filterActions($view, $action->name, $target))
{
continue;
}
// set to use component default
$fallback = true;
// reset permission per/action
$permission = false;
$catpermission = false;
// set area
$area = 'comp';
// check if the record has an ID and the action is item related (not a component action)
if (self::checkObject($record) && isset($record->id) && $record->id > 0 && !in_array($action->name, $componentActions) &&
(strpos($action->name, 'core.') !== false || strpos($action->name, $view . '.') !== false))
{
// we are in item
$area = 'item';
// The record has been set. Check the record permissions.
$permission = $user->authorise($action->name, 'com_' . $component . '.' . $view . '.' . (int) $record->id);
// if no permission found, check edit own
if (!$permission)
{
// With edit, if the created_by matches current user then dig deeper.
if (($action->name === 'core.edit' || $action->name === $view . '.edit') && $record->created_by > 0 && ($record->created_by == $user->id))
{
// the correct target
$coreCheck = (array) explode('.', $action->name);
// check that we have both local and global access
if ($user->authorise($coreCheck[0] . '.edit.own', 'com_' . $component . '.' . $view . '.' . (int) $record->id) &&
$user->authorise($coreCheck[0] . '.edit.own', 'com_' . $component))
{
// allow edit
$result->set($action->name, true);
// set not to use global default
// because we already validated it
$fallback = false;
}
else
{
// do not allow edit
$result->set($action->name, false);
$fallback = false;
}
}
}
elseif (self::checkString($views) && isset($record->catid) && $record->catid > 0)
{
// we are in item
$area = 'category';
// set the core check
$coreCheck = explode('.', $action->name);
$core = $coreCheck[0];
// make sure we use the core. action check for the categories
if (strpos($action->name, $view) !== false && strpos($action->name, 'core.') === false )
{
$coreCheck[0] = 'core';
$categoryCheck = implode('.', $coreCheck);
}
else
{
$categoryCheck = $action->name;
}
// The record has a category. Check the category permissions.
$catpermission = $user->authorise($categoryCheck, 'com_' . $component . '.' . $views . '.category.' . (int) $record->catid);
if (!$catpermission && !is_null($catpermission))
{
// With edit, if the created_by matches current user then dig deeper.
if (($action->name === 'core.edit' || $action->name === $view . '.edit') && $record->created_by > 0 && ($record->created_by == $user->id))
{
// check that we have both local and global access
if ($user->authorise('core.edit.own', 'com_' . $component . '.' . $views . '.category.' . (int) $record->catid) &&
$user->authorise($core . '.edit.own', 'com_' . $component))
{
// allow edit
$result->set($action->name, true);
// set not to use global default
// because we already validated it
$fallback = false;
}
else
{
// do not allow edit
$result->set($action->name, false);
$fallback = false;
}
}
}
}
}
// if allowed then fallback on component global settings
if ($fallback)
{
// if item/category blocks access then don't fall back on global
if ((($area === 'item') && !$permission) || (($area === 'category') && !$catpermission))
{
// do not allow
$result->set($action->name, false);
}
// Finally remember the global settings have the final say. (even if item allow)
// The local item permissions can block, but it can't open and override of global permissions.
// Since items are created by users and global permissions is set by system admin.
else
{
$result->set($action->name, $user->authorise($action->name, 'com_' . $component));
}
}
}
return $result;
}
/**
* Filter the action permissions
*
* @param string $action The action to check
* @param array $targets The array of target actions
*
* @return boolean true if action should be filtered out
*
*/
protected static function filterActions(&$view, &$action, &$targets)
{
foreach ($targets as $target)
{
if (strpos($action, $view . '.' . $target) !== false ||
strpos($action, 'core.' . $target) !== false)
{
return false;
break;
}
}
return true;
}
/**
* Get any component's model
*/
public static function getModel($name, $path = JPATH_COMPONENT_ADMINISTRATOR, $Component = '###Component###', $config = array())
{
// fix the name
$name = self::safeString($name);
// full path to models
$fullPathModels = $path . '/models';
// load the model file
JModelLegacy::addIncludePath($fullPathModels, $Component . 'Model');
// make sure the table path is loaded
if (!isset($config['table_path']) || !self::checkString($config['table_path']))
{
// This is the JCB default path to tables in Joomla 3.x
$config['table_path'] = JPATH_ADMINISTRATOR . '/components/com_' . strtolower($Component) . '/tables';
}
// get instance
$model = JModelLegacy::getInstance($name, $Component . 'Model', $config);
// if model not found (strange)
if ($model == false)
{
jimport('joomla.filesystem.file');
// get file path
$filePath = $path . '/' . $name . '.php';
$fullPathModel = $fullPathModels . '/' . $name . '.php';
// check if it exists
if (File::exists($filePath))
{
// get the file
require_once $filePath;
}
elseif (File::exists($fullPathModel))
{
// get the file
require_once $fullPathModel;
}
// build class names
$modelClass = $Component . 'Model' . $name;
if (class_exists($modelClass))
{
// initialize the model
return new $modelClass($config);
}
}
return $model;
}
/**
* Add to asset Table
*/
public static function setAsset($id, $table, $inherit = true)
{
$parent = JTable::getInstance('Asset');
$parent->loadByName('com_###component###');
$parentId = $parent->id;
$name = 'com_###component###.'.$table.'.'.$id;
$title = '';
$asset = JTable::getInstance('Asset');
$asset->loadByName($name);
// Check for an error.
$error = $asset->getError();
if ($error)
{
return false;
}
else
{
// Specify how a new or moved node asset is inserted into the tree.
if ($asset->parent_id != $parentId)
{
$asset->setLocation($parentId, 'last-child');
}
// Prepare the asset to be stored.
$asset->parent_id = $parentId;
$asset->name = $name;
$asset->title = $title;
// get the default asset rules
$rules = self::getDefaultAssetRules('com_###component###', $table, $inherit);
if ($rules instanceof JAccessRules)
{
$asset->rules = (string) $rules;
}
if (!$asset->check() || !$asset->store())
{
JFactory::getApplication()->enqueueMessage($asset->getError(), 'warning');
return false;
}
else
{
// Create an asset_id or heal one that is corrupted.
$object = new stdClass();
// Must be a valid primary key value.
$object->id = $id;
$object->asset_id = (int) $asset->id;
// Update their asset_id to link to the asset table.
return JFactory::getDbo()->updateObject('#__###component###_'.$table, $object, 'id');
}
}
return false;
}
/**
* Gets the default asset Rules for a component/view.
*/
protected static function getDefaultAssetRules($component, $view, $inherit = true)
{
// if new or inherited
$assetId = 0;
// Only get the actual item rules if not inheriting
if (!$inherit)
{
// Need to find the asset id by the name of the component.
$db = JFactory::getDbo();
$query = $db->getQuery(true)
->select($db->quoteName('id'))
->from($db->quoteName('#__assets'))
->where($db->quoteName('name') . ' = ' . $db->quote($component));
$db->setQuery($query);
$db->execute();
// check that there is a value
if ($db->getNumRows())
{
// asset already set so use saved rules
$assetId = (int) $db->loadResult();
}
}
// get asset rules
$result = JAccess::getAssetRules($assetId);
if ($result instanceof JAccessRules)
{
$_result = (string) $result;
$_result = json_decode($_result);
foreach ($_result as $name => &$rule)
{
$v = explode('.', $name);
if ($view !== $v[0])
{
// remove since it is not part of this view
unset($_result->$name);
}
elseif ($inherit)
{
// clear the value since we inherit
$rule = array();
}
}
// check if there are any view values remaining
if (count((array) $_result))
{
$_result = json_encode($_result);
$_result = array($_result);
// Instantiate and return the JAccessRules object for the asset rules.
$rules = new JAccessRules($_result);
// return filtered rules
return $rules;
}
}
return $result;
}
/**
* xmlAppend
*
* @param SimpleXMLElement $xml The XML element reference in which to inject a comment
* @param mixed $node A SimpleXMLElement node to append to the XML element reference, or a stdClass object containing a comment attribute to be injected before the XML node and a fieldXML attribute containing a SimpleXMLElement
*
* @return null
*
*/
public static function xmlAppend(&$xml, $node)
{
if (!$node)
{
// element was not returned
return;
}
switch (get_class($node))
{
case 'stdClass':
if (property_exists($node, 'comment'))
{
self::xmlComment($xml, $node->comment);
}
if (property_exists($node, 'fieldXML'))
{
self::xmlAppend($xml, $node->fieldXML);
}
break;
case 'SimpleXMLElement':
$domXML = dom_import_simplexml($xml);
$domNode = dom_import_simplexml($node);
$domXML->appendChild($domXML->ownerDocument->importNode($domNode, true));
$xml = simplexml_import_dom($domXML);
break;
}
}
/**
* xmlComment
*
* @param SimpleXMLElement $xml The XML element reference in which to inject a comment
* @param string $comment The comment to inject
*
* @return null
*
*/
public static function xmlComment(&$xml, $comment)
{
$domXML = dom_import_simplexml($xml);
$domComment = new DOMComment($comment);
$nodeTarget = $domXML->ownerDocument->importNode($domComment, true);
$domXML->appendChild($nodeTarget);
$xml = simplexml_import_dom($domXML);
}
/**
* xmlAddAttributes
*
* @param SimpleXMLElement $xml The XML element reference in which to inject a comment
* @param array $attributes The attributes to apply to the XML element
*
* @return null
*
*/
public static function xmlAddAttributes(&$xml, $attributes = array())
{
foreach ($attributes as $key => $value)
{
$xml->addAttribute($key, $value);
}
}
/**
* xmlAddOptions
*
* @param SimpleXMLElement $xml The XML element reference in which to inject a comment
* @param array $options The options to apply to the XML element
*
* @return void
*
*/
public static function xmlAddOptions(&$xml, $options = array())
{
foreach ($options as $key => $value)
{
$addOption = $xml->addChild('option');
$addOption->addAttribute('value', $key);
$addOption[] = $value;
}
}
/**
* get the field object
*
* @param array $attributes The array of attributes
* @param string $default The default of the field
* @param array $options The options to apply to the XML element
*
* @return object
*
*/
public static function getFieldObject(&$attributes, $default = '', $options = null)
{
// make sure we have attributes and a type value
if (self::checkArray($attributes) && isset($attributes['type']))
{
// make sure the form helper class is loaded
if (!method_exists('JFormHelper', 'loadFieldType'))
{
jimport('joomla.form.form');
}
// get field type
$field = JFormHelper::loadFieldType($attributes['type'], true);
// get field xml
$XML = self::getFieldXML($attributes, $options);
// setup the field
$field->setup($XML, $default);
// return the field object
return $field;
}
return false;
}
/**
* get the field xml
*
* @param array $attributes The array of attributes
* @param array $options The options to apply to the XML element
*
* @return object
*
*/
public static function getFieldXML(&$attributes, $options = null)
{
// make sure we have attributes and a type value
if (self::checkArray($attributes))
{
// start field xml
$XML = new SimpleXMLElement('<field/>');
// load the attributes
self::xmlAddAttributes($XML, $attributes);
// check if we have options
if (self::checkArray($options))
{
// load the options
self::xmlAddOptions($XML, $options);
}
// return the field xml
return $XML;
}
return false;
}
/**
* Render Bool Button
*
* @param array $args All the args for the button
* 0) name
* 1) additional (options class) // not used at this time
* 2) default
* 3) yes (name)
* 4) no (name)
*
* @return string The input html of the button
*
*/
public static function renderBoolButton()
{
$args = func_get_args();
// check if there is additional button class
$additional = isset($args[1]) ? (string) $args[1] : ''; // not used at this time
// button attributes
$buttonAttributes = array(
'type' => 'radio',
'name' => isset($args[0]) ? self::htmlEscape($args[0]) : 'bool_button',
'label' => isset($args[0]) ? self::safeString(self::htmlEscape($args[0]), 'Ww') : 'Bool Button', // not seen anyway
'class' => 'btn-group',
'filter' => 'INT',
'default' => isset($args[2]) ? (int) $args[2] : 0);
// set the button options
$buttonOptions = array(
'1' => isset($args[3]) ? self::htmlEscape($args[3]) : 'JYES',
'0' => isset($args[4]) ? self::htmlEscape($args[4]) : 'JNO');
// return the input
return self::getFieldObject($buttonAttributes, $buttonAttributes['default'], $buttonOptions)->input;
}
/**
* Check if we are connected
* Thanks https://stackoverflow.com/a/4860432/1429677
*
* @returns bool true on success
*/
public static function isConnected()
{
// If example.com is down, then probably the whole internet is down, since IANA maintains the domain. Right?
$connected = @fsockopen("www.example.com", 80);
// website, port (try 80 or 443)
if ($connected)
{
//action when connected
$is_conn = true;
fclose($connected);
}
else
{
//action in connection failure
$is_conn = false;
}
return $is_conn;
}
// typo sorry!
public static function sorten($string, $length = 40, $addTip = true)
{
return self::shorten($string, $length, $addTip);
}###HELPER_LICENSE_LOCK######GET_CRYPT_KEY###
}

View File

@ -0,0 +1,749 @@
<?php
/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com>
* @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
?>
###BOM###
// No direct access to this file
defined('_JEXEC') or die('Restricted access');###SITE_POWER_HELPER###
###SITE_HELPER_CLASS_HEADER###
/**
* ###Component### component helper
*/
abstract class ###Component###Helper
{
/**
* Adding the utilities trait to this class
*
* @deprecated 4.0 - Check the trait methods for details, a legacy implementation
*/
use Utilities;
/**
* Composer Switch
*
* @var array
*/
protected static $composer = array();###SITE_GLOBAL_EVENT_HELPER######SITE_CUSTOM_HELPER_SCRIPT######BOTH_CUSTOM_HELPER_SCRIPT###
/**
* Load the Composer Vendors
*/
public static function composerAutoload($target)
{
// insure we load the composer vendor only once
if (!isset(self::$composer[$target]))
{
// get the function name
$functionName = self::safeString('compose' . $target);
// check if method exist
if (method_exists(__CLASS__, $functionName))
{
return self::{$functionName}();
}
return false;
}
return self::$composer[$target];
}
/**
* Load the Component xml manifest.
*/
public static function manifest()
{
$manifestUrl = JPATH_ADMINISTRATOR."/components/com_###component###/###component###.xml";
return simplexml_load_file($manifestUrl);
}
/**
* Joomla version object
*/
protected static $JVersion;
/**
* set/get Joomla version
*/
public static function jVersion()
{
// check if set
if (!self::checkObject(self::$JVersion))
{
self::$JVersion = new JVersion();
}
return self::$JVersion;
}
/**
* Load the Contributors details.
*/
public static function getContributors()
{
// get params
$params = JComponentHelper::getParams('com_###component###');
// start contributors array
$contributors = array();
// get all Contributors (max 20)
$searchArray = range('0','20');
foreach($searchArray as $nr)
{
if ((NULL !== $params->get("showContributor".$nr)) && ($params->get("showContributor".$nr) == 2 || $params->get("showContributor".$nr) == 3))
{
// set link based of selected option
if($params->get("useContributor".$nr) == 1)
{
$link_front = '<a href="mailto:'.$params->get("emailContributor".$nr).'" target="_blank">';
$link_back = '</a>';
}
elseif($params->get("useContributor".$nr) == 2)
{
$link_front = '<a href="'.$params->get("linkContributor".$nr).'" target="_blank">';
$link_back = '</a>';
}
else
{
$link_front = '';
$link_back = '';
}
$contributors[$nr]['title'] = self::htmlEscape($params->get("titleContributor".$nr));
$contributors[$nr]['name'] = $link_front.self::htmlEscape($params->get("nameContributor".$nr)).$link_back;
}
}
return $contributors;
}###HELP_SITE###
/**
* Get any component's model
*/
public static function getModel($name, $path = JPATH_COMPONENT_SITE, $Component = '###Component###', $config = array())
{
// fix the name
$name = self::safeString($name);
// full path to models
$fullPathModels = $path . '/models';
// load the model file
JModelLegacy::addIncludePath($fullPathModels, $Component . 'Model');
// make sure the table path is loaded
if (!isset($config['table_path']) || !self::checkString($config['table_path']))
{
// This is the JCB default path to tables in Joomla 3.x
$config['table_path'] = JPATH_ADMINISTRATOR . '/components/com_' . strtolower($Component) . '/tables';
}
// get instance
$model = JModelLegacy::getInstance($name, $Component . 'Model', $config);
// if model not found (strange)
if ($model == false)
{
jimport('joomla.filesystem.file');
// get file path
$filePath = $path . '/' . $name . '.php';
$fullPathModel = $fullPathModels . '/' . $name . '.php';
// check if it exists
if (File::exists($filePath))
{
// get the file
require_once $filePath;
}
elseif (File::exists($fullPathModel))
{
// get the file
require_once $fullPathModel;
}
// build class names
$modelClass = $Component . 'Model' . $name;
if (class_exists($modelClass))
{
// initialize the model
return new $modelClass($config);
}
}
return $model;
}
/**
* Add to asset Table
*/
public static function setAsset($id, $table, $inherit = true)
{
$parent = JTable::getInstance('Asset');
$parent->loadByName('com_###component###');
$parentId = $parent->id;
$name = 'com_###component###.'.$table.'.'.$id;
$title = '';
$asset = JTable::getInstance('Asset');
$asset->loadByName($name);
// Check for an error.
$error = $asset->getError();
if ($error)
{
return false;
}
else
{
// Specify how a new or moved node asset is inserted into the tree.
if ($asset->parent_id != $parentId)
{
$asset->setLocation($parentId, 'last-child');
}
// Prepare the asset to be stored.
$asset->parent_id = $parentId;
$asset->name = $name;
$asset->title = $title;
// get the default asset rules
$rules = self::getDefaultAssetRules('com_###component###', $table, $inherit);
if ($rules instanceof JAccessRules)
{
$asset->rules = (string) $rules;
}
if (!$asset->check() || !$asset->store())
{
JFactory::getApplication()->enqueueMessage($asset->getError(), 'warning');
return false;
}
else
{
// Create an asset_id or heal one that is corrupted.
$object = new stdClass();
// Must be a valid primary key value.
$object->id = $id;
$object->asset_id = (int) $asset->id;
// Update their asset_id to link to the asset table.
return JFactory::getDbo()->updateObject('#__###component###_'.$table, $object, 'id');
}
}
return false;
}
/**
* Gets the default asset Rules for a component/view.
*/
protected static function getDefaultAssetRules($component, $view, $inherit = true)
{
// if new or inherited
$assetId = 0;
// Only get the actual item rules if not inheriting
if (!$inherit)
{
// Need to find the asset id by the name of the component.
$db = JFactory::getDbo();
$query = $db->getQuery(true)
->select($db->quoteName('id'))
->from($db->quoteName('#__assets'))
->where($db->quoteName('name') . ' = ' . $db->quote($component));
$db->setQuery($query);
$db->execute();
// check that there is a value
if ($db->getNumRows())
{
// asset already set so use saved rules
$assetId = (int) $db->loadResult();
}
}
// get asset rules
$result = JAccess::getAssetRules($assetId);
if ($result instanceof JAccessRules)
{
$_result = (string) $result;
$_result = json_decode($_result);
foreach ($_result as $name => &$rule)
{
$v = explode('.', $name);
if ($view !== $v[0])
{
// remove since it is not part of this view
unset($_result->$name);
}
elseif ($inherit)
{
// clear the value since we inherit
$rule = array();
}
}
// check if there are any view values remaining
if (count((array) $_result))
{
$_result = json_encode($_result);
$_result = array($_result);
// Instantiate and return the JAccessRules object for the asset rules.
$rules = new JAccessRules($_result);
// return filtered rules
return $rules;
}
}
return $result;
}
/**
* xmlAppend
*
* @param SimpleXMLElement $xml The XML element reference in which to inject a comment
* @param mixed $node A SimpleXMLElement node to append to the XML element reference, or a stdClass object containing a comment attribute to be injected before the XML node and a fieldXML attribute containing a SimpleXMLElement
*
* @return null
*
*/
public static function xmlAppend(&$xml, $node)
{
if (!$node)
{
// element was not returned
return;
}
switch (get_class($node))
{
case 'stdClass':
if (property_exists($node, 'comment'))
{
self::xmlComment($xml, $node->comment);
}
if (property_exists($node, 'fieldXML'))
{
self::xmlAppend($xml, $node->fieldXML);
}
break;
case 'SimpleXMLElement':
$domXML = dom_import_simplexml($xml);
$domNode = dom_import_simplexml($node);
$domXML->appendChild($domXML->ownerDocument->importNode($domNode, true));
$xml = simplexml_import_dom($domXML);
break;
}
}
/**
* xmlComment
*
* @param SimpleXMLElement $xml The XML element reference in which to inject a comment
* @param string $comment The comment to inject
*
* @return null
*
*/
public static function xmlComment(&$xml, $comment)
{
$domXML = dom_import_simplexml($xml);
$domComment = new DOMComment($comment);
$nodeTarget = $domXML->ownerDocument->importNode($domComment, true);
$domXML->appendChild($nodeTarget);
$xml = simplexml_import_dom($domXML);
}
/**
* xmlAddAttributes
*
* @param SimpleXMLElement $xml The XML element reference in which to inject a comment
* @param array $attributes The attributes to apply to the XML element
*
* @return null
*
*/
public static function xmlAddAttributes(&$xml, $attributes = array())
{
foreach ($attributes as $key => $value)
{
$xml->addAttribute($key, $value);
}
}
/**
* xmlAddOptions
*
* @param SimpleXMLElement $xml The XML element reference in which to inject a comment
* @param array $options The options to apply to the XML element
*
* @return void
*
*/
public static function xmlAddOptions(&$xml, $options = array())
{
foreach ($options as $key => $value)
{
$addOption = $xml->addChild('option');
$addOption->addAttribute('value', $key);
$addOption[] = $value;
}
}
/**
* get the field object
*
* @param array $attributes The array of attributes
* @param string $default The default of the field
* @param array $options The options to apply to the XML element
*
* @return object
*
*/
public static function getFieldObject(&$attributes, $default = '', $options = null)
{
// make sure we have attributes and a type value
if (self::checkArray($attributes) && isset($attributes['type']))
{
// make sure the form helper class is loaded
if (!method_exists('JFormHelper', 'loadFieldType'))
{
jimport('joomla.form.form');
}
// get field type
$field = JFormHelper::loadFieldType($attributes['type'], true);
// get field xml
$XML = self::getFieldXML($attributes, $options);
// setup the field
$field->setup($XML, $default);
// return the field object
return $field;
}
return false;
}
/**
* get the field xml
*
* @param array $attributes The array of attributes
* @param array $options The options to apply to the XML element
*
* @return object
*
*/
public static function getFieldXML(&$attributes, $options = null)
{
// make sure we have attributes and a type value
if (self::checkArray($attributes))
{
// start field xml
$XML = new SimpleXMLElement('<field/>');
// load the attributes
self::xmlAddAttributes($XML, $attributes);
// check if we have options
if (self::checkArray($options))
{
// load the options
self::xmlAddOptions($XML, $options);
}
// return the field xml
return $XML;
}
return false;
}
/**
* Render Bool Button
*
* @param array $args All the args for the button
* 0) name
* 1) additional (options class) // not used at this time
* 2) default
* 3) yes (name)
* 4) no (name)
*
* @return string The input html of the button
*
*/
public static function renderBoolButton()
{
$args = func_get_args();
// check if there is additional button class
$additional = isset($args[1]) ? (string) $args[1] : ''; // not used at this time
// button attributes
$buttonAttributes = array(
'type' => 'radio',
'name' => isset($args[0]) ? self::htmlEscape($args[0]) : 'bool_button',
'label' => isset($args[0]) ? self::safeString(self::htmlEscape($args[0]), 'Ww') : 'Bool Button', // not seen anyway
'class' => 'btn-group',
'filter' => 'INT',
'default' => isset($args[2]) ? (int) $args[2] : 0);
// set the button options
$buttonOptions = array(
'1' => isset($args[3]) ? self::htmlEscape($args[3]) : 'JYES',
'0' => isset($args[4]) ? self::htmlEscape($args[4]) : 'JNO');
// return the input
return self::getFieldObject($buttonAttributes, $buttonAttributes['default'], $buttonOptions)->input;
}###HELPER_UIKIT######HELPER_CREATEUSER###
public static function isPublished($id,$type)
{
if ($type == 'raw')
{
$type = 'item';
}
$db = JFactory::getDbo();
$query = $db->getQuery(true);
$query->select(array('a.published'));
$query->from('#__###component###_'.$type.' AS a');
$query->where('a.id = '. (int) $id);
$query->where('a.published = 1');
$db->setQuery($query);
$db->execute();
$found = $db->getNumRows();
if($found)
{
return true;
}
return false;
}
public static function getGroupName($id)
{
$db = JFactory::getDBO();
$query = $db->getQuery(true);
$query->select(array('a.title'));
$query->from('#__usergroups AS a');
$query->where('a.id = '. (int) $id);
$db->setQuery($query);
$db->execute();
$found = $db->getNumRows();
if($found)
{
return $db->loadResult();
}
return $id;
}
/**
* Get the action permissions
*
* @param string $view The related view name
* @param int $record The item to act upon
* @param string $views The related list view name
* @param mixed $target Only get this permission (like edit, create, delete)
* @param string $component The target component
* @param object $user The user whose permissions we are loading
*
* @return object The JObject of permission/authorised actions
*
*/
public static function getActions($view, &$record = null, $views = null, $target = null, $component = '###component###', $user = 'null')
{
// load the user if not given
if (!self::checkObject($user))
{
// get the user object
$user = JFactory::getUser();
}
// load the JObject
$result = new JObject;
// make view name safe (just incase)
$view = self::safeString($view);
if (self::checkString($views))
{
$views = self::safeString($views);
}
// get all actions from component
$actions = JAccess::getActionsFromFile(
JPATH_ADMINISTRATOR . '/components/com_' . $component . '/access.xml',
"/access/section[@name='component']/"
);
// if non found then return empty JObject
if (empty($actions))
{
return $result;
}
// get created by if not found
if (self::checkObject($record) && !isset($record->created_by) && isset($record->id))
{
$record->created_by = self::getVar($view, $record->id, 'id', 'created_by', '=', $component);
}
// set actions only set in component settings
$componentActions = array('core.admin', 'core.manage', 'core.options', 'core.export');
// check if we have a target
$checkTarget = false;
if ($target)
{
// convert to an array
if (self::checkString($target))
{
$target = array($target);
}
// check if we are good to go
if (self::checkArray($target))
{
$checkTarget = true;
}
}
// loop the actions and set the permissions
foreach ($actions as $action)
{
// check target action filter
if ($checkTarget && self::filterActions($view, $action->name, $target))
{
continue;
}
// set to use component default
$fallback = true;
// reset permission per/action
$permission = false;
$catpermission = false;
// set area
$area = 'comp';
// check if the record has an ID and the action is item related (not a component action)
if (self::checkObject($record) && isset($record->id) && $record->id > 0 && !in_array($action->name, $componentActions) &&
(strpos($action->name, 'core.') !== false || strpos($action->name, $view . '.') !== false))
{
// we are in item
$area = 'item';
// The record has been set. Check the record permissions.
$permission = $user->authorise($action->name, 'com_' . $component . '.' . $view . '.' . (int) $record->id);
// if no permission found, check edit own
if (!$permission)
{
// With edit, if the created_by matches current user then dig deeper.
if (($action->name === 'core.edit' || $action->name === $view . '.edit') && $record->created_by > 0 && ($record->created_by == $user->id))
{
// the correct target
$coreCheck = (array) explode('.', $action->name);
// check that we have both local and global access
if ($user->authorise($coreCheck[0] . '.edit.own', 'com_' . $component . '.' . $view . '.' . (int) $record->id) &&
$user->authorise($coreCheck[0] . '.edit.own', 'com_' . $component))
{
// allow edit
$result->set($action->name, true);
// set not to use global default
// because we already validated it
$fallback = false;
}
else
{
// do not allow edit
$result->set($action->name, false);
$fallback = false;
}
}
}
elseif (self::checkString($views) && isset($record->catid) && $record->catid > 0)
{
// we are in item
$area = 'category';
// set the core check
$coreCheck = explode('.', $action->name);
$core = $coreCheck[0];
// make sure we use the core. action check for the categories
if (strpos($action->name, $view) !== false && strpos($action->name, 'core.') === false )
{
$coreCheck[0] = 'core';
$categoryCheck = implode('.', $coreCheck);
}
else
{
$categoryCheck = $action->name;
}
// The record has a category. Check the category permissions.
$catpermission = $user->authorise($categoryCheck, 'com_' . $component . '.' . $views . '.category.' . (int) $record->catid);
if (!$catpermission && !is_null($catpermission))
{
// With edit, if the created_by matches current user then dig deeper.
if (($action->name === 'core.edit' || $action->name === $view . '.edit') && $record->created_by > 0 && ($record->created_by == $user->id))
{
// check that we have both local and global access
if ($user->authorise('core.edit.own', 'com_' . $component . '.' . $views . '.category.' . (int) $record->catid) &&
$user->authorise($core . '.edit.own', 'com_' . $component))
{
// allow edit
$result->set($action->name, true);
// set not to use global default
// because we already validated it
$fallback = false;
}
else
{
// do not allow edit
$result->set($action->name, false);
$fallback = false;
}
}
}
}
}
// if allowed then fallback on component global settings
if ($fallback)
{
// if item/category blocks access then don't fall back on global
if ((($area === 'item') && !$permission) || (($area === 'category') && !$catpermission))
{
// do not allow
$result->set($action->name, false);
}
// Finally remember the global settings have the final say. (even if item allow)
// The local item permissions can block, but it can't open and override of global permissions.
// Since items are created by users and global permissions is set by system admin.
else
{
$result->set($action->name, $user->authorise($action->name, 'com_' . $component));
}
}
}
return $result;
}
/**
* Filter the action permissions
*
* @param string $action The action to check
* @param array $targets The array of target actions
*
* @return boolean true if action should be filtered out
*
*/
protected static function filterActions(&$view, &$action, &$targets)
{
foreach ($targets as $target)
{
if (strpos($action, $view . '.' . $target) !== false ||
strpos($action, 'core.' . $target) !== false)
{
return false;
break;
}
}
return true;
}
/**
* Check if we are connected
* Thanks https://stackoverflow.com/a/4860432/1429677
*
* @returns bool true on success
*/
public static function isConnected()
{
// If example.com is down, then probably the whole internet is down, since IANA maintains the domain. Right?
$connected = @fsockopen("www.example.com", 80);
// website, port (try 80 or 443)
if ($connected)
{
//action when connected
$is_conn = true;
fclose($connected);
}
else
{
//action in connection failure
$is_conn = false;
}
return $is_conn;
}
// typo sorry!
public static function sorten($string, $length = 40, $addTip = true)
{
return self::shorten($string, $length, $addTip);
}###HELPER_SITE_LICENSE_LOCK######GET_CRYPT_KEY###
}

View File

@ -63,10 +63,10 @@ class ###Component###View###SView### extends JViewLegacy
JToolbarHelper::title($title,'###ICOMOON###');###CUSTOM_ADMIN_CUSTOM_BUTTONS###
// set help url for this view if found
$help_url = ###Component###Helper::getHelpUrl('###sviews###');
if (###Component###Helper::checkString($help_url))
$this->help_url = ###Component###Helper::getHelpUrl('###sviews###');
if (###Component###Helper::checkString($this->help_url))
{
JToolbarHelper::help('COM_###COMPONENT###_HELP_MANAGER', false, $help_url);
JToolbarHelper::help('COM_###COMPONENT###_HELP_MANAGER', false, $this->help_url);
}
// add the options comp button

View File

@ -89,10 +89,10 @@ class ###Component###ViewImport extends JViewLegacy
}
// set help url for this view if found
$help_url = ###Component###Helper::getHelpUrl('import');
if (###Component###Helper::checkString($help_url))
$this->help_url = ###Component###Helper::getHelpUrl('import');
if (###Component###Helper::checkString($this->help_url))
{
JToolbarHelper::help('COM_###COMPONENT###_HELP_MANAGER', false, $help_url);
JToolbarHelper::help('COM_###COMPONENT###_HELP_MANAGER', false, $this->help_url);
}
}
}

View File

@ -37,10 +37,10 @@ class ###Component###View###View### extends JViewLegacy
}
// set help url for this view if found
$help_url = ###Component###Helper::getHelpUrl('###view###');
if (###Component###Helper::checkString($help_url))
$this->help_url = ###Component###Helper::getHelpUrl('###view###');
if (###Component###Helper::checkString($this->help_url))
{
JToolbarHelper::help('COM_###COMPONENT###_HELP_MANAGER', false, $help_url);
JToolbarHelper::help('COM_###COMPONENT###_HELP_MANAGER', false, $this->help_url);
}
}
}

View File

@ -129,10 +129,10 @@ class ###Component###View###Views### extends JViewLegacy
}###ADMIN_CUSTOM_FUNCTION_ONLY_BUTTONS_LIST######IMPORTBUTTON###
// set help url for this view if found
$help_url = ###Component###Helper::getHelpUrl('###views###');
if (###Component###Helper::checkString($help_url))
$this->help_url = ###Component###Helper::getHelpUrl('###views###');
if (###Component###Helper::checkString($this->help_url))
{
JToolbarHelper::help('COM_###COMPONENT###_HELP_MANAGER', false, $help_url);
JToolbarHelper::help('COM_###COMPONENT###_HELP_MANAGER', false, $this->help_url);
}
// add the options comp button

View File

@ -53,10 +53,10 @@ class ###Component###View###SViews### extends JViewLegacy
JToolbarHelper::title(JText::_('COM_###COMPONENT###_###SVIEWS###'),'###ICOMOON###');###CUSTOM_ADMIN_CUSTOM_BUTTONS###
// set help url for this view if found
$help_url = ###Component###Helper::getHelpUrl('###sviews###');
if (###Component###Helper::checkString($help_url))
$this->help_url = ###Component###Helper::getHelpUrl('###sviews###');
if (###Component###Helper::checkString($this->help_url))
{
JToolbarHelper::help('COM_###COMPONENT###_HELP_MANAGER', false, $help_url);
JToolbarHelper::help('COM_###COMPONENT###_HELP_MANAGER', false, $this->help_url);
}
// add the options comp button

View File

@ -49,10 +49,10 @@ class ###Component###View###SViews### extends JViewLegacy
{###SITE_CUSTOM_BUTTONS###
// set help url for this view if found
$help_url = ###Component###Helper::getHelpUrl('###sviews###');
if (###Component###Helper::checkString($help_url))
$this->help_url = ###Component###Helper::getHelpUrl('###sviews###');
if (###Component###Helper::checkString($this->help_url))
{
JToolbarHelper::help('COM_###COMPONENT###_HELP_MANAGER', false, $help_url);
JToolbarHelper::help('COM_###COMPONENT###_HELP_MANAGER', false, $this->help_url);
}
// now initiate the toolbar
$this->toolbar = JToolbar::getInstance();

View File

@ -49,10 +49,10 @@ class ###Component###View###SView### extends JViewLegacy
{###SITE_CUSTOM_BUTTONS###
// set help url for this view if found
$help_url = ###Component###Helper::getHelpUrl('###sview###');
if (###Component###Helper::checkString($help_url))
$this->help_url = ###Component###Helper::getHelpUrl('###sview###');
if (###Component###Helper::checkString($this->help_url))
{
JToolbarHelper::help('COM_###COMPONENT###_HELP_MANAGER', false, $help_url);
JToolbarHelper::help('COM_###COMPONENT###_HELP_MANAGER', false, $this->help_url);
}
// now initiate the toolbar
$this->toolbar = JToolbar::getInstance();

View File

@ -32,7 +32,7 @@ $document->addScript('components/com_###component###/assets/js/admin.js');
// require helper files
JLoader::register('###Component###Helper', __DIR__ . '/helpers/###component###.php');###HELPER_EMAIL###
JLoader::register('JHtmlBatch_', __DIR__ . '/helpers/html/batch_.php');###LICENSE_LOCKED_INT######ADMIN_GLOBAL_EVENT######ADMIN_POWER_EVENT###
JLoader::register('JHtmlBatch_', __DIR__ . '/helpers/html/batch_.php');###LICENSE_LOCKED_INT######ADMIN_GLOBAL_EVENT###
// Get an instance of the controller prefixed by ###Component###
$controller = JControllerLegacy::getInstance('###Component###');

View File

@ -26,7 +26,7 @@ $document->addScript('components/com_###component###/assets/js/site.js');
// Require helper files
JLoader::register('###Component###Helper', __DIR__ . '/helpers/###component###.php');###HELPER_EMAIL###
JLoader::register('###Component###HelperRoute', __DIR__ . '/helpers/route.php');###LICENSE_LOCKED_INT######SITE_GLOBAL_EVENT######SITE_POWER_EVENT###
JLoader::register('###Component###HelperRoute', __DIR__ . '/helpers/route.php');###LICENSE_LOCKED_INT######SITE_GLOBAL_EVENT###
// Get an instance of the controller prefixed by ###Component###
$controller = JControllerLegacy::getInstance('###Component###');

View File

@ -0,0 +1,784 @@
{
"create": {
"admin": {
"assets": {
"css": "css",
"images": {
"icons": "icons"
},
"js": "js"
},
"controllers": "controllers",
"helpers": {
"html": "html"
},
"language": {
"en-GB": "en-GB"
},
"layouts": "layouts",
"models": {
"fields": "fields",
"forms": "forms",
"rules": "rules"
},
"sql": {
"updates": {
"mysql": "mysql"
}
},
"tables": "tables",
"views": "views"
},
"site": {
"assets": {
"css": "css",
"images": "images",
"js": "js"
},
"controllers": "controllers",
"helpers": "helpers",
"language": {
"en-GB": "en-GB"
},
"layouts": "layouts",
"models": "models",
"views": "views"
},
"media": {
"css": "css",
"images": "images",
"js": "js"
}
},
"move": {
"static": {
"access.xml": {
"naam": "access.xml",
"path": "c0mp0n3nt/admin",
"rename": false,
"type": "file"
},
"config.xml": {
"naam": "config.xml",
"path": "c0mp0n3nt/admin",
"rename": false,
"type": "file"
},
"JControllerLegacy.php": {
"naam": "JControllerLegacy.php",
"path": "c0mp0n3nt/admin",
"rename": "new",
"newName": "controller.php",
"type": "file"
},
"component.xml": {
"naam": "component.xml",
"path": "c0mp0n3nt/",
"rename": "component",
"type": "file"
},
"component_admin.php": {
"naam": "component_admin.php",
"path": "c0mp0n3nt/admin",
"rename": "component_admin",
"type": "file"
},
"admin.css": {
"naam": "admin.css",
"path": "c0mp0n3nt/admin/assets/css",
"rename": false,
"type": "file"
},
"admin.js": {
"naam": "admin.js",
"path": "c0mp0n3nt/admin/assets/js",
"rename": false,
"type": "file"
},
"site.css": {
"naam": "site.css",
"path": "c0mp0n3nt/site/assets/css",
"rename": false,
"type": "file"
},
"site.js": {
"naam": "site.js",
"path": "c0mp0n3nt/site/assets/js",
"rename": false,
"type": "file"
},
"batch_.php": {
"naam": "batch_.php",
"path": "c0mp0n3nt/admin/helpers/html",
"rename": false,
"type": "file"
},
"batchselection.php": {
"naam": "batchselection.php",
"path": "c0mp0n3nt/admin/layouts",
"rename": false,
"type": "file"
},
"component_site.php": {
"naam": "component_site.php",
"path": "c0mp0n3nt/site",
"rename": "component_site",
"type": "file"
},
"router.php": {
"naam": "router.php",
"path": "c0mp0n3nt/site",
"rename": false,
"type": "file"
},
"routeHelper.php": {
"naam": "routeHelper.php",
"path": "c0mp0n3nt/site/helpers",
"rename": "new",
"newName": "route.php",
"type": "file"
},
"JControllerLegacySITE.php": {
"naam": "JControllerLegacySITE.php",
"path": "c0mp0n3nt/site",
"rename": "new",
"newName": "controller.php",
"type": "file"
},
"Helper.php": {
"naam": "JCB_Helper.php",
"path": "c0mp0n3nt/admin/helpers",
"rename": "JCB_Helper",
"type": "file"
},
"Helper_site.php": {
"naam": "JCB_Helper_site.php",
"path": "c0mp0n3nt/site/helpers",
"rename": "JCB_Helper_site",
"type": "file"
},
"Helper_category.php": {
"naam": "Helper_category.php",
"path": "c0mp0n3nt/site/helpers",
"rename": "new",
"newName": "category.php",
"type": "file"
},
"script.php": {
"naam": "script.php",
"path": "c0mp0n3nt/",
"rename": false,
"type": "file"
},
"install.mysql.utf8.sql": {
"naam": "install.mysql.utf8.sql",
"path": "c0mp0n3nt/admin/sql",
"rename": false,
"type": "file"
},
"uninstall.mysql.utf8.sql": {
"naam": "uninstall.mysql.utf8.sql",
"path": "c0mp0n3nt/admin/sql",
"rename": false,
"type": "file"
},
"headercheck_admin.php": {
"naam": "headercheck_admin.php",
"path": "c0mp0n3nt/admin/helpers",
"rename": "new",
"newName": "headercheck.php",
"type": "file"
},
"LICENSE.txt": {
"naam": "LICENSE.txt",
"path": "c0mp0n3nt/",
"rename": false,
"type": "file"
},
"README.txt": {
"naam": "README.txt",
"path": "c0mp0n3nt/admin",
"rename": false,
"type": "file"
},
"README.md": {
"naam": "README.md",
"path": "c0mp0n3nt/",
"rename": false,
"type": "file"
},
"headercheck.php": {
"naam": "headercheck.php",
"path": "c0mp0n3nt/site/helpers",
"rename": false,
"type": "file"
},
"import.gif": {
"naam": "import.gif",
"path": "c0mp0n3nt/admin/assets/images",
"rename": false,
"type": "file"
}
},
"dynamic": {
"admin": {
"whmcs.php": {
"path": "c0mp0n3nt/admin",
"rename": false,
"type": "whmcs"
},
"Helper_email.php": {
"path": "c0mp0n3nt/admin/helpers",
"rename": "Helper_",
"type": "emailer"
},
"DASHJControllerAdmin.php": {
"path": "c0mp0n3nt/admin/controllers",
"rename": "DASHJControllerAdmin",
"type": "dashboard"
},
"DASHJModelList.php": {
"path": "c0mp0n3nt/admin/models",
"rename": "DASHJModelList",
"type": "dashboard"
},
"DASHJViewLagacy.php": {
"path": "c0mp0n3nt/admin/views/VIEW",
"rename": "new",
"newName": "view.html.php",
"type": "dashboard"
},
"default_vdm.php": {
"path": "c0mp0n3nt/admin/views/VIEW/tmpl",
"rename": false,
"type": "dashboard"
},
"default_main.php": {
"path": "c0mp0n3nt/admin/views/VIEW/tmpl",
"rename": false,
"type": "dashboard"
},
"DASHdefault.php": {
"path": "c0mp0n3nt/admin/views/VIEW/tmpl",
"rename": "new",
"newName": "default.php",
"type": "dashboard"
},
"dashboard.css": {
"path": "c0mp0n3nt/admin/assets/css",
"rename": false,
"type": "dashboard"
},
"filter_forms.xml": {
"path": "c0mp0n3nt/admin/models/forms",
"rename": "filter_forms",
"type": "filter"
},
"module_forms.xml": {
"path": "c0mp0n3nt/admin/models/forms",
"rename": "module_forms",
"type": "single"
},
"module_forms.js": {
"path": "c0mp0n3nt/media/js",
"rename": "module_forms",
"type": "single"
},
"edit.php": {
"path": "c0mp0n3nt/admin/views/VIEW/tmpl",
"rename": false,
"type": "single"
},
"JModelAdmin.php": {
"path": "c0mp0n3nt/admin/models",
"rename": "JModelAdmin",
"type": "single"
},
"JControllerForm.php": {
"path": "c0mp0n3nt/admin/controllers",
"rename": "JControllerForm",
"type": "single"
},
"JTable.php": {
"path": "c0mp0n3nt/admin/tables",
"rename": "JTable",
"type": "single"
},
"submitbutton.js": {
"path": "c0mp0n3nt/admin/views/VIEW",
"rename": false,
"type": "single"
},
"JViewLegacy_edit.php": {
"path": "c0mp0n3nt/admin/views/VIEW",
"rename": "new",
"newName": "view.html.php",
"type": "single"
},
"view.css": {
"path": "c0mp0n3nt/admin/assets/css",
"rename": "view",
"type": "single"
},
"JControllerAdmin.php": {
"path": "c0mp0n3nt/admin/controllers",
"rename": "JControllerAdmin",
"type": "list"
},
"JModelList.php": {
"path": "c0mp0n3nt/admin/models",
"rename": "JModelList",
"type": "list"
},
"views.css": {
"path": "c0mp0n3nt/admin/assets/css",
"rename": "views",
"type": "list"
},
"JViewLegacy_list.php": {
"path": "c0mp0n3nt/admin/views/VIEW",
"rename": "new",
"newName": "view.html.php",
"type": "list"
},
"default.php": {
"path": "c0mp0n3nt/admin/views/VIEW/tmpl",
"rename": false,
"type": "list"
},
"default_batch_body.php": {
"path": "c0mp0n3nt/admin/views/VIEW/tmpl",
"rename": false,
"type": "list"
},
"default_batch_footer.php": {
"path": "c0mp0n3nt/admin/views/VIEW/tmpl",
"rename": false,
"type": "list"
},
"default_toolbar.php": {
"path": "c0mp0n3nt/admin/views/VIEW/tmpl",
"rename": false,
"type": "list"
},
"default_head.php": {
"path": "c0mp0n3nt/admin/views/VIEW/tmpl",
"rename": false,
"type": "list"
},
"default_body.php": {
"path": "c0mp0n3nt/admin/views/VIEW/tmpl",
"rename": false,
"type": "list"
},
"default_foot.php": {
"path": "c0mp0n3nt/admin/views/VIEW/tmpl",
"rename": false,
"type": "list"
},
"JFormRule.php": {
"path": "c0mp0n3nt/admin/models/rules",
"rename": "JFormRule",
"type": "rule"
},
"layout_admin.php": {
"path": "c0mp0n3nt/admin/layouts",
"rename": "layout_admin",
"type": "layout"
},
"layoutoverride.php": {
"path": "c0mp0n3nt/admin/layouts/VIEW",
"rename": "layoutoverride",
"type": "layoutoverride"
},
"layoutitems.php": {
"path": "c0mp0n3nt/admin/layouts/VIEW",
"rename": "layoutitems",
"type": "layoutitems"
},
"layoutfull.php": {
"path": "c0mp0n3nt/admin/layouts/VIEW",
"rename": "layoutfull",
"type": "layoutfull"
},
"layoutlinkedview.php": {
"path": "c0mp0n3nt/admin/layouts/VIEW",
"rename": "layoutlinkedview",
"type": "layoutlinkedview"
},
"layouttitle.php": {
"path": "c0mp0n3nt/admin/layouts/VIEW",
"rename": "layouttitle",
"type": "layouttitle"
},
"layoutpublished.php": {
"path": "c0mp0n3nt/admin/layouts/VIEW",
"rename": "layoutpublished",
"type": "layoutpublished"
},
"layoutmetadata.php": {
"path": "c0mp0n3nt/admin/layouts/VIEW",
"rename": "layoutmetadata",
"type": "layoutmetadata"
},
"JFormFieldCustom.php": {
"path": "c0mp0n3nt/admin/models/fields",
"rename": "JFormFieldCustom",
"type": "fieldcustom"
},
"JFormFieldList.php": {
"path": "c0mp0n3nt/admin/models/fields",
"rename": "JFormFieldList",
"type": "fieldlist"
},
"JFormFieldRadio.php": {
"path": "c0mp0n3nt/admin/models/fields",
"rename": "JFormFieldRadio",
"type": "fieldradio"
},
"JFormFieldCheckboxes.php": {
"path": "c0mp0n3nt/admin/models/fields",
"rename": "JFormFieldCheckboxes",
"type": "fieldcheckboxes"
},
"JFormFieldUser.php": {
"path": "c0mp0n3nt/admin/models/fields",
"rename": "JFormFieldUser",
"type": "fielduser"
},
"JControllerLegacyAjax.php": {
"path": "c0mp0n3nt/admin/controllers",
"rename": "new",
"newName": "ajax.json.php",
"type": "ajax"
},
"JModelListAjax.php": {
"path": "c0mp0n3nt/admin/models",
"rename": "new",
"newName": "ajax.php",
"type": "ajax"
},
"JControllerLegacy_import.php": {
"path": "c0mp0n3nt/admin/controllers",
"rename": "new",
"newName": "import.php",
"type": "import"
},
"JModelLegacy_import.php": {
"path": "c0mp0n3nt/admin/models",
"rename": "new",
"newName": "import.php",
"type": "import"
},
"JViewLegacy_import.php": {
"path": "c0mp0n3nt/admin/views/import",
"rename": "new",
"newName": "view.html.php",
"type": "import"
},
"default_import.php": {
"path": "c0mp0n3nt/admin/views/import/tmpl",
"rename": "new",
"newName": "default.php",
"type": "import"
},
"JControllerLegacy_import_custom.php": {
"path": "c0mp0n3nt/admin/controllers",
"rename": "JControllerLegacy_import_custom",
"type": "customimport"
},
"JModelLegacy_import_custom.php": {
"path": "c0mp0n3nt/admin/models",
"rename": "JModelLegacy_import_custom",
"type": "customimport"
},
"JViewLegacy_import_custom.php": {
"path": "c0mp0n3nt/admin/views/VIEW",
"rename": "new",
"newName": "view.html.php",
"type": "customimport"
},
"default_import_custom.php": {
"path": "c0mp0n3nt/admin/views/VIEW/tmpl",
"rename": "new",
"newName": "default.php",
"type": "customimport"
},
"JControllerLegacyHelp.php": {
"path": "c0mp0n3nt/admin/controllers",
"rename": "new",
"newName": "help.php",
"type": "help"
},
"1.0.0.sql": {
"path": "c0mp0n3nt/admin/sql/updates/mysql",
"rename": "1.0.0",
"type": "sql_update"
},
"update_server.xml": {
"path": "c0mp0n3nt/",
"rename": "update_server",
"type": "update_server"
},
"viewFile.js": {
"path": "c0mp0n3nt/admin/assets/js",
"rename": "viewFile",
"type": "javascript_file"
}
},
"site": {
"JViewLegacy_list_site.php": {
"path": "c0mp0n3nt/site/views/VIEW",
"rename": "new",
"newName": "view.html.php",
"type": "list"
},
"JModelList_site.php": {
"path": "c0mp0n3nt/site/models",
"rename": "JModelList_site",
"type": "list"
},
"views_site.css": {
"path": "c0mp0n3nt/site/assets/css",
"rename": "views_site",
"type": "list"
},
"default_list_site.php": {
"path": "c0mp0n3nt/site/views/VIEW/tmpl",
"rename": "new",
"newName": "default.php",
"type": "list"
},
"JViewLegacy_site.php": {
"path": "c0mp0n3nt/site/views/VIEW",
"rename": "new",
"newName": "view.html.php",
"type": "single"
},
"view_site.css": {
"path": "c0mp0n3nt/site/assets/css",
"rename": "view_site",
"type": "single"
},
"JModelItem_site.php": {
"path": "c0mp0n3nt/site/models",
"rename": "JModelItem_site",
"type": "single"
},
"default_site.php": {
"path": "c0mp0n3nt/site/views/VIEW/tmpl",
"rename": "new",
"newName": "default.php",
"type": "single"
},
"default_site_template.php": {
"path": "c0mp0n3nt/site/views/VIEW/tmpl",
"rename": "site_template",
"type": "template"
},
"layout_site.php": {
"path": "c0mp0n3nt/site/layouts",
"rename": "layout_site",
"type": "layout"
},
"layoutoverride.php": {
"path": "c0mp0n3nt/site/layouts/VIEW",
"rename": "layoutoverride",
"type": "layoutoverride"
},
"layoutitems.php": {
"path": "c0mp0n3nt/site/layouts/VIEW",
"rename": "layoutitems",
"type": "layoutitems"
},
"layoutfull.php": {
"path": "c0mp0n3nt/site/layouts/VIEW",
"rename": "layoutfull",
"type": "layoutfull"
},
"layoutlinkedview.php": {
"path": "c0mp0n3nt/site/layouts/VIEW",
"rename": "layoutlinkedview",
"type": "layoutlinkedview"
},
"layouttitle.php": {
"path": "c0mp0n3nt/site/layouts/VIEW",
"rename": "layouttitle",
"type": "layouttitle"
},
"layoutpublished.php": {
"path": "c0mp0n3nt/site/layouts/VIEW",
"rename": "layoutpublished",
"type": "layoutpublished"
},
"layoutmetadata.php": {
"path": "c0mp0n3nt/site/layouts/VIEW",
"rename": "layoutmetadata",
"type": "layoutmetadata"
},
"default.xml": {
"path": "c0mp0n3nt/site/views/VIEW/tmpl",
"rename": false,
"type": "menu"
},
"edit.xml": {
"path": "c0mp0n3nt/site/views/VIEW/tmpl",
"rename": false,
"type": "admin_menu"
},
"module_forms.xml": {
"path": "c0mp0n3nt/site/models/forms",
"rename": "module_forms",
"type": "edit"
},
"module_forms.js": {
"path": "c0mp0n3nt/site/models/forms",
"rename": "module_forms",
"type": "edit"
},
"edit_site.php": {
"path": "c0mp0n3nt/site/views/VIEW/tmpl",
"rename": "new",
"newName": "edit.php",
"type": "edit"
},
"JModelAdmin_site.php": {
"path": "c0mp0n3nt/site/models",
"rename": "JModelAdmin_site",
"type": "edit"
},
"JControllerForm_site.php": {
"path": "c0mp0n3nt/site/controllers",
"rename": "JControllerForm_site",
"type": "edit"
},
"submitbutton.js": {
"path": "c0mp0n3nt/site/views/VIEW",
"rename": false,
"type": "edit"
},
"JViewLegacy_edit_site.php": {
"path": "c0mp0n3nt/site/views/VIEW",
"rename": "new",
"newName": "view.html.php",
"type": "edit"
},
"view_site_edit.css": {
"path": "c0mp0n3nt/site/assets/css",
"rename": "view_site_edit",
"type": "edit"
},
"JControllerLegacyAjaxSite.php": {
"path": "c0mp0n3nt/site/controllers",
"rename": "new",
"newName": "ajax.json.php",
"type": "ajax"
},
"JModelListAjaxSite.php": {
"path": "c0mp0n3nt/site/models",
"rename": "new",
"newName": "ajax.php",
"type": "ajax"
},
"JControllerLegacyHelp_site.php": {
"path": "c0mp0n3nt/site/controllers",
"rename": "new",
"newName": "help.php",
"type": "help"
},
"JControllerForm_custom_site.php": {
"path": "c0mp0n3nt/site/controllers",
"rename": "JControllerForm_custom_site",
"type": "custom_form"
},
"submitbutton_site.js": {
"path": "c0mp0n3nt/site/views/VIEW",
"rename": "new",
"newName": "submitbutton.js",
"type": "custom_form"
},
"Helper_category_view.php": {
"path": "c0mp0n3nt/site/helpers",
"rename": "Helper_category_view",
"type": "category"
},
"viewFileSite.js": {
"path": "c0mp0n3nt/site/assets/js",
"rename": "viewFileSite",
"type": "javascript_file"
}
},
"custom_admin": {
"JViewLegacy_list_custom_admin.php": {
"path": "c0mp0n3nt/admin/views/VIEW",
"rename": "new",
"newName": "view.html.php",
"type": "list"
},
"JModelList_custom_admin.php": {
"path": "c0mp0n3nt/admin/models",
"rename": "JModelList_custom_admin",
"type": "list"
},
"default_list_custom_admin.php": {
"path": "c0mp0n3nt/admin/views/VIEW/tmpl",
"rename": "new",
"newName": "default.php",
"type": "list"
},
"JControllerAdmin_custom_admin.php": {
"path": "c0mp0n3nt/admin/controllers",
"rename": "JControllerAdmin_custom_admin",
"type": "list"
},
"views_custom_admin.css": {
"path": "c0mp0n3nt/admin/assets/css",
"rename": "views_custom_admin",
"type": "list"
},
"view_custom_admin.css": {
"path": "c0mp0n3nt/admin/assets/css",
"rename": "view_custom_admin",
"type": "single"
},
"JViewLegacy_custom_admin.php": {
"path": "c0mp0n3nt/admin/views/VIEW",
"rename": "new",
"newName": "view.html.php",
"type": "single"
},
"JModelItem_custom_admin.php": {
"path": "c0mp0n3nt/admin/models",
"rename": "JModelItem_custom_admin",
"type": "single"
},
"default_custom_admin.php": {
"path": "c0mp0n3nt/admin/views/VIEW/tmpl",
"rename": "new",
"newName": "default.php",
"type": "single"
},
"JControllerLegacy_custom_admin.php": {
"path": "c0mp0n3nt/admin/controllers",
"rename": "JControllerLegacy_custom_admin",
"type": "single"
},
"default_custom_admin_template.php": {
"path": "c0mp0n3nt/admin/views/VIEW/tmpl",
"rename": "custom_admin_template",
"type": "template"
},
"layout_custom_admin.php": {
"path": "c0mp0n3nt/admin/layouts",
"rename": "layout_custom_admin",
"type": "layout"
},
"viewFileCustomAdmin.js": {
"path": "c0mp0n3nt/admin/assets/js",
"rename": "viewFileCustomAdmin",
"type": "javascript_file"
}
}
}
}
}

View File

@ -15,6 +15,12 @@ defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Filesystem\File;
use Joomla\CMS\Filesystem\Folder;
use VDM\Joomla\Utilities\StringHelper;
use VDM\Joomla\Utilities\ArrayHelper;
use VDM\Joomla\Utilities\ObjectHelper;
use VDM\Joomla\Utilities\FileHelper;
use VDM\Joomla\Utilities\MathHelper;
// Use the component builder autoloader
ComponentbuilderHelper::autoLoader();
@ -145,10 +151,10 @@ class Compiler extends Infusion
// set the lang data now
$this->setLangFileData();
// set the language notice if it was set
if (ComponentbuilderHelper::checkArray($this->langNot)
|| ComponentbuilderHelper::checkArray($this->langSet))
if (ArrayHelper::check($this->langNot)
|| ArrayHelper::check($this->langSet))
{
if (ComponentbuilderHelper::checkArray($this->langNot))
if (ArrayHelper::check($this->langNot))
{
$this->app->enqueueMessage(
JText::_('<hr /><h3>Language Warning</h3>'), 'Warning'
@ -184,7 +190,7 @@ class Compiler extends Infusion
);
}
// show languages that were added
if (ComponentbuilderHelper::checkArray($this->langSet))
if (ArrayHelper::check($this->langSet))
{
$this->app->enqueueMessage(
JText::_('<hr /><h3>Language Notice</h3>'), 'Notice'
@ -275,9 +281,9 @@ class Compiler extends Infusion
// if there are plugins zip them
$this->zipPlugins();
// do lang mismatch check
if (ComponentbuilderHelper::checkArray($this->langMismatch))
if (ArrayHelper::check($this->langMismatch))
{
if (ComponentbuilderHelper::checkArray($this->langMatch))
if (ArrayHelper::check($this->langMatch))
{
$mismatch = array_diff(
array_unique($this->langMismatch),
@ -290,7 +296,7 @@ class Compiler extends Infusion
}
// set a notice if we have a mismatch
if (isset($mismatch)
&& ComponentbuilderHelper::checkArray(
&& ArrayHelper::check(
$mismatch
))
{
@ -317,7 +323,7 @@ class Compiler extends Infusion
foreach ($mismatch as $string)
{
$constant = $this->langPrefix . '_'
. ComponentbuilderHelper::safeString($string, 'U');
. StringHelper::safe($string, 'U');
$this->app->enqueueMessage(
JText::sprintf(
'The <b>Joomla.JText._(&apos;%s&apos;)</b> language constant for <b>%s</b> does not have a corresponding <code>JText::script(&apos;%s&apos;)</code> decalaration, please add it.',
@ -328,7 +334,7 @@ class Compiler extends Infusion
}
}
// check if we should add a EXTERNALCODE notice
if (ComponentbuilderHelper::checkArray($this->externalCodeString))
if (ArrayHelper::check($this->externalCodeString))
{
// number of external code strings
$externalCount = count($this->externalCodeString);
@ -385,9 +391,9 @@ class Compiler extends Infusion
protected function updateFiles()
{
if (isset($this->newFiles['static'])
&& ComponentbuilderHelper::checkArray($this->newFiles['static'])
&& ArrayHelper::check($this->newFiles['static'])
&& isset($this->newFiles['dynamic'])
&& ComponentbuilderHelper::checkArray($this->newFiles['dynamic']))
&& ArrayHelper::check($this->newFiles['dynamic']))
{
// get the bom file
$bom = ComponentbuilderHelper::getFileContents($this->bomPath);
@ -405,7 +411,7 @@ class Compiler extends Infusion
foreach ($this->newFiles['dynamic'] as $view => $files)
{
if (isset($this->fileContentDynamic[$view])
&& ComponentbuilderHelper::checkArray(
&& ArrayHelper::check(
$this->fileContentDynamic[$view]
))
{
@ -429,13 +435,13 @@ class Compiler extends Infusion
// free up some memory
unset($this->newFiles['dynamic']);
// do modules if found
if (ComponentbuilderHelper::checkArray($this->joomlaModules))
if (ArrayHelper::check($this->joomlaModules))
{
foreach ($this->joomlaModules as $module)
{
if (ComponentbuilderHelper::checkObject($module)
if (ObjectHelper::check($module)
&& isset($this->newFiles[$module->key])
&& ComponentbuilderHelper::checkArray(
&& ArrayHelper::check(
$this->newFiles[$module->key]
))
{
@ -445,7 +451,7 @@ class Compiler extends Infusion
{
// check the config fields
if (isset($module->config_fields)
&& ComponentbuilderHelper::checkArray(
&& ArrayHelper::check(
$module->config_fields
))
{
@ -467,7 +473,7 @@ class Compiler extends Infusion
}
// check the fieldsets
if (isset($module->form_files)
&& ComponentbuilderHelper::checkArray(
&& ArrayHelper::check(
$module->form_files
))
{
@ -510,13 +516,13 @@ class Compiler extends Infusion
}
}
// do plugins if found
if (ComponentbuilderHelper::checkArray($this->joomlaPlugins))
if (ArrayHelper::check($this->joomlaPlugins))
{
foreach ($this->joomlaPlugins as $plugin)
{
if (ComponentbuilderHelper::checkObject($plugin)
if (ObjectHelper::check($plugin)
&& isset($this->newFiles[$plugin->key])
&& ComponentbuilderHelper::checkArray(
&& ArrayHelper::check(
$this->newFiles[$plugin->key]
))
{
@ -526,7 +532,7 @@ class Compiler extends Infusion
{
// check the config fields
if (isset($plugin->config_fields)
&& ComponentbuilderHelper::checkArray(
&& ArrayHelper::check(
$plugin->config_fields
))
{
@ -548,7 +554,7 @@ class Compiler extends Infusion
}
// check the fieldsets
if (isset($plugin->form_files)
&& ComponentbuilderHelper::checkArray(
&& ArrayHelper::check(
$plugin->form_files
))
{
@ -591,13 +597,13 @@ class Compiler extends Infusion
}
}
// do powers if found
if (ComponentbuilderHelper::checkArray($this->powers))
if (ArrayHelper::check($this->powers))
{
foreach ($this->powers as $power)
{
if (ComponentbuilderHelper::checkObject($power)
if (ObjectHelper::check($power)
&& isset($this->newFiles[$power->key])
&& ComponentbuilderHelper::checkArray(
&& ArrayHelper::check(
$this->newFiles[$power->key]
))
{
@ -720,11 +726,11 @@ class Compiler extends Infusion
}
}
// move the modules update server to host
if (ComponentbuilderHelper::checkArray($this->joomlaModules))
if (ArrayHelper::check($this->joomlaModules))
{
foreach ($this->joomlaModules as $module)
{
if (ComponentbuilderHelper::checkObject($module)
if (ObjectHelper::check($module)
&& isset($module->add_update_server)
&& $module->add_update_server == 1
&& isset($module->update_server_target)
@ -735,7 +741,7 @@ class Compiler extends Infusion
&& isset($module->update_server_xml_path)
&& File::exists($module->update_server_xml_path)
&& isset($module->update_server_xml_file_name)
&& ComponentbuilderHelper::checkString(
&& StringHelper::check(
$module->update_server_xml_file_name
))
{
@ -753,11 +759,11 @@ class Compiler extends Infusion
}
}
// move the plugins update server to host
if (ComponentbuilderHelper::checkArray($this->joomlaPlugins))
if (ArrayHelper::check($this->joomlaPlugins))
{
foreach ($this->joomlaPlugins as $plugin)
{
if (ComponentbuilderHelper::checkObject($plugin)
if (ObjectHelper::check($plugin)
&& isset($plugin->add_update_server)
&& $plugin->add_update_server == 1
&& isset($plugin->update_server_target)
@ -768,7 +774,7 @@ class Compiler extends Infusion
&& isset($plugin->update_server_xml_path)
&& File::exists($plugin->update_server_xml_path)
&& isset($plugin->update_server_xml_file_name)
&& ComponentbuilderHelper::checkString(
&& StringHelper::check(
$plugin->update_server_xml_file_name
))
{
@ -791,7 +797,7 @@ class Compiler extends Infusion
{
// check if these files have its own config data)
if (isset($data['config'])
&& ComponentbuilderHelper::checkArray(
&& ArrayHelper::check(
$data['config']
)
&& $this->componentData->mvc_versiondate == 1)
@ -981,7 +987,7 @@ class Compiler extends Infusion
{
// move it to the repo folder if set
if (isset($this->repoPath)
&& ComponentbuilderHelper::checkString(
&& StringHelper::check(
$this->repoPath
))
{
@ -1007,11 +1013,11 @@ class Compiler extends Infusion
);
// move the modules to local folder repos
if (ComponentbuilderHelper::checkArray($this->joomlaModules))
if (ArrayHelper::check($this->joomlaModules))
{
foreach ($this->joomlaModules as $module)
{
if (ComponentbuilderHelper::checkObject($module)
if (ObjectHelper::check($module)
&& isset($module->file_name))
{
$module_context = 'module.' . $module->file_name . '.'
@ -1044,11 +1050,11 @@ class Compiler extends Infusion
}
}
// move the plugins to local folder repos
if (ComponentbuilderHelper::checkArray($this->joomlaPlugins))
if (ArrayHelper::check($this->joomlaPlugins))
{
foreach ($this->joomlaPlugins as $plugin)
{
if (ComponentbuilderHelper::checkObject($plugin)
if (ObjectHelper::check($plugin)
&& isset($plugin->file_name))
{
$plugin_context = 'plugin.' . $plugin->file_name . '.'
@ -1098,7 +1104,7 @@ class Compiler extends Infusion
&$this->componentFolderName, &$this->componentData)
);
//create the zip file
if (ComponentbuilderHelper::zip(
if (FileHelper::zip(
$this->componentPath, $this->filepath['component']
))
{
@ -1162,15 +1168,15 @@ class Compiler extends Infusion
private function zipModules()
{
if (ComponentbuilderHelper::checkArray($this->joomlaModules))
if (ArrayHelper::check($this->joomlaModules))
{
foreach ($this->joomlaModules as $module)
{
if (ComponentbuilderHelper::checkObject($module)
if (ObjectHelper::check($module)
&& isset($module->zip_name)
&& ComponentbuilderHelper::checkString($module->zip_name)
&& StringHelper::check($module->zip_name)
&& isset($module->folder_path)
&& ComponentbuilderHelper::checkString(
&& StringHelper::check(
$module->folder_path
))
{
@ -1190,7 +1196,7 @@ class Compiler extends Infusion
&$this->tempPath, &$module->zip_name, &$module)
);
//create the zip file
if (ComponentbuilderHelper::zip(
if (FileHelper::zip(
$module->folder_path,
$this->filepath['modules'][$module->id]
))
@ -1256,15 +1262,15 @@ class Compiler extends Infusion
private function zipPlugins()
{
if (ComponentbuilderHelper::checkArray($this->joomlaPlugins))
if (ArrayHelper::check($this->joomlaPlugins))
{
foreach ($this->joomlaPlugins as $plugin)
{
if (ComponentbuilderHelper::checkObject($plugin)
if (ObjectHelper::check($plugin)
&& isset($plugin->zip_name)
&& ComponentbuilderHelper::checkString($plugin->zip_name)
&& StringHelper::check($plugin->zip_name)
&& isset($plugin->folder_path)
&& ComponentbuilderHelper::checkString(
&& StringHelper::check(
$plugin->folder_path
))
{
@ -1284,7 +1290,7 @@ class Compiler extends Infusion
&$this->tempPath, &$plugin->zip_name, &$plugin)
);
//create the zip file
if (ComponentbuilderHelper::zip(
if (FileHelper::zip(
$plugin->folder_path,
$this->filepath['plugins'][$plugin->id]
))
@ -1359,9 +1365,9 @@ class Compiler extends Infusion
$fingerPrint = array();
if (isset($target['hashtarget'][0]) && $target['hashtarget'][0] > 3
&& isset($target['path'])
&& ComponentbuilderHelper::checkString($target['path'])
&& StringHelper::check($target['path'])
&& isset($target['hashtarget'][1])
&& ComponentbuilderHelper::checkString(
&& StringHelper::check(
$target['hashtarget'][1]
))
{
@ -1400,7 +1406,7 @@ class Compiler extends Infusion
);
if (!$found)
{
$bites = (int) ComponentbuilderHelper::bcmath(
$bites = (int) MathHelper::bc(
'add', $lineBites[$lineNumber], $bites
);
}
@ -1590,14 +1596,14 @@ class Compiler extends Infusion
// Add the data
fwrite($fpFile, $data);
// truncate file at the end of the data that was added
$remove = ComponentbuilderHelper::bcmath(
$remove = MathHelper::bc(
'add', $position, mb_strlen($data, '8bit')
);
ftruncate($fpFile, $remove);
// check if this was a replacement of data
if ($replace)
{
$position = ComponentbuilderHelper::bcmath(
$position = MathHelper::bc(
'add', $position, $replace
);
}

File diff suppressed because it is too large Load Diff

View File

@ -15,6 +15,12 @@ defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Filesystem\File;
use Joomla\CMS\Filesystem\Folder;
use VDM\Joomla\Utilities\StringHelper;
use VDM\Joomla\Utilities\ArrayHelper;
use VDM\Joomla\Utilities\ObjectHelper;
use VDM\Joomla\Utilities\GetHelper;
use VDM\Joomla\Utilities\FileHelper;
/**
* Structure class
@ -485,7 +491,7 @@ class Structure extends Get
*/
private function buildPowers()
{
if (ComponentbuilderHelper::checkArray($this->powers))
if (ArrayHelper::check($this->powers))
{
// Trigger Event: jcb_ce_onBeforeSetModules
$this->triggerEvent(
@ -496,9 +502,9 @@ class Structure extends Get
$htaccess = array();
foreach ($this->powers as $power)
{
if (ComponentbuilderHelper::checkObject($power)
if (ObjectHelper::check($power)
&& isset($power->path)
&& ComponentbuilderHelper::checkString(
&& StringHelper::check(
$power->path
))
{
@ -594,7 +600,7 @@ class Structure extends Get
*/
private function buildModules()
{
if (ComponentbuilderHelper::checkArray($this->joomlaModules))
if (ArrayHelper::check($this->joomlaModules))
{
// Trigger Event: jcb_ce_onBeforeSetModules
$this->triggerEvent(
@ -603,9 +609,9 @@ class Structure extends Get
);
foreach ($this->joomlaModules as $module)
{
if (ComponentbuilderHelper::checkObject($module)
if (ObjectHelper::check($module)
&& isset($module->folder_name)
&& ComponentbuilderHelper::checkString(
&& StringHelper::check(
$module->folder_name
))
{
@ -764,7 +770,7 @@ class Structure extends Get
if (($css = $this->getCustomScriptBuilder(
'css_view', $module->key
)) !== null
&& ComponentbuilderHelper::checkString($css))
&& StringHelper::check($css))
{
// make sure this script does not have PHP
if (strpos($css, '<?php') === false)
@ -799,7 +805,7 @@ class Structure extends Get
if (($javascript = $this->getCustomScriptBuilder(
'view_footer', $module->key
)) !== null
&& ComponentbuilderHelper::checkString($javascript))
&& StringHelper::check($javascript))
{
// make sure this script does not have PHP
if (strpos($javascript, '<?php') === false)
@ -864,7 +870,7 @@ class Structure extends Get
}
// set forms folder if needed
if (isset($module->form_files)
&& ComponentbuilderHelper::checkArray(
&& ArrayHelper::check(
$module->form_files
))
{
@ -946,47 +952,81 @@ class Structure extends Get
{
// default to the field set name
$label = $fieldset;
if (isset(
$module->fieldsets_label[$file
. $field_name . $fieldset]
))
if (isset($module->fieldsets_label[$file . $field_name . $fieldset]))
{
$label = $module->fieldsets_label[$file
. $field_name . $fieldset];
$label = $module->fieldsets_label[$file . $field_name . $fieldset];
}
// add path to module rules and custom fields
if (isset(
$module->fieldsets_paths[$file
. $field_name . $fieldset]
)
&& $module->fieldsets_paths[$file
. $field_name . $fieldset] == 2)
if (isset($module->fieldsets_paths[$file . $field_name . $fieldset])
&& ($module->fieldsets_paths[$file . $field_name . $fieldset] == 2
|| $module->fieldsets_paths[$file . $field_name . $fieldset] == 3))
{
if ($module->target == 2)
{
if (!isset($module->add_rule_path[$file . $field_name . $fieldset]))
{
$module->add_rule_path[$file . $field_name . $fieldset] =
'/administrator/modules/'
. $module->file_name . '/rules';
}
if (!isset($module->add_field_path[$file . $field_name . $fieldset]))
{
$module->add_field_path[$file . $field_name . $fieldset] =
'/administrator/modules/'
. $module->file_name . '/fields';
}
}
else
{
if (!isset($module->add_rule_path[$file . $field_name . $fieldset]))
{
$module->add_rule_path[$file . $field_name . $fieldset] =
'/modules/' . $module->file_name
. '/rules';
}
if (!isset($module->add_field_path[$file . $field_name . $fieldset]))
{
$module->add_field_path[$file . $field_name . $fieldset] =
'/modules/' . $module->file_name
. '/fields';
}
}
}
// add path to module rules and custom fields
if (isset($module->add_rule_path[$file . $field_name . $fieldset])
|| isset($module->add_field_path[$file . $field_name . $fieldset]))
{
$xml .= PHP_EOL . $this->_t(1) . '<!--'
. $this->setLine(__LINE__)
. ' default paths of ' . $fieldset
. ' fieldset points to the module -->';
$xml .= PHP_EOL . $this->_t(1)
. '<fieldset name="' . $fieldset
. '" label="' . $label . '"';
$xml .= PHP_EOL . $this->_t(2)
. 'addrulepath="/modules/'
. strtolower($module->code_name)
. '/rules"';
$xml .= PHP_EOL . $this->_t(2)
. 'addfieldpath="/modules/'
. strtolower($module->code_name)
. '/fields"';
. $this->setLine(__LINE__) . ' default paths of '
. $fieldset . ' fieldset points to the module -->';
$xml .= PHP_EOL . $this->_t(1) . '<fieldset name="'
. $fieldset . '" label="' . $label . '"';
if (isset($module->add_rule_path[$file . $field_name . $fieldset]))
{
$xml .= PHP_EOL . $this->_t(2)
. 'addrulepath="' . $module->add_rule_path[$file . $field_name . $fieldset] . '"';
}
if (isset($module->add_field_path[$file . $field_name . $fieldset]))
{
$xml .= PHP_EOL . $this->_t(2)
. 'addfieldpath="' . $module->add_field_path[$file . $field_name . $fieldset] . '"';
}
$xml .= PHP_EOL . $this->_t(1) . '>';
}
else
{
$xml .= PHP_EOL . $this->_t(1)
. '<fieldset name="' . $fieldset
. '" label="' . $label . '">';
$xml .= PHP_EOL . $this->_t(1) . '<fieldset name="'
. $fieldset . '" label="' . $label . '">';
}
// check if we have an inner field set
if (ComponentbuilderHelper::checkString(
if (StringHelper::check(
$field_name_inner
))
{
@ -998,7 +1038,7 @@ class Structure extends Get
$xml .= $this->hhh . 'FIELDSET_' . $file
. $field_name . $fieldset . $this->hhh;
// check if we have an inner field set
if (ComponentbuilderHelper::checkString(
if (StringHelper::check(
$field_name_inner
))
{
@ -1057,7 +1097,7 @@ class Structure extends Get
);
// check if this lib has files
if (isset($module->files)
&& ComponentbuilderHelper::checkArray($module->files))
&& ArrayHelper::check($module->files))
{
// add to component files
foreach ($module->files as $file)
@ -1070,7 +1110,7 @@ class Structure extends Get
}
// check if this lib has folders
if (isset($module->folders)
&& ComponentbuilderHelper::checkArray($module->folders))
&& ArrayHelper::check($module->folders))
{
// add to component folders
foreach ($module->folders as $folder)
@ -1083,7 +1123,7 @@ class Structure extends Get
}
// check if this module has urls
if (isset($module->urls)
&& ComponentbuilderHelper::checkArray($module->urls))
&& ArrayHelper::check($module->urls))
{
// add to component urls
foreach ($module->urls as $n => &$url)
@ -1091,14 +1131,14 @@ class Structure extends Get
// should we add the local folder
if (isset($url['type']) && $url['type'] > 1
&& isset($url['url'])
&& ComponentbuilderHelper::checkString(
&& StringHelper::check(
$url['url']
))
{
// set file name
$fileName = basename($url['url']);
// get the file contents
$data = ComponentbuilderHelper::getFileContents(
$data = FileHelper::getContent(
$url['url']
);
// build sub path
@ -1141,7 +1181,7 @@ class Structure extends Get
*/
private function buildPlugins()
{
if (ComponentbuilderHelper::checkArray($this->joomlaPlugins))
if (ArrayHelper::check($this->joomlaPlugins))
{
// Trigger Event: jcb_ce_onBeforeSetPlugins
$this->triggerEvent(
@ -1150,9 +1190,9 @@ class Structure extends Get
);
foreach ($this->joomlaPlugins as $plugin)
{
if (ComponentbuilderHelper::checkObject($plugin)
if (ObjectHelper::check($plugin)
&& isset($plugin->folder_name)
&& ComponentbuilderHelper::checkString(
&& StringHelper::check(
$plugin->folder_name
))
{
@ -1239,7 +1279,7 @@ class Structure extends Get
}
// set forms folder if needed
if (isset($plugin->form_files)
&& ComponentbuilderHelper::checkArray(
&& ArrayHelper::check(
$plugin->form_files
))
{
@ -1321,49 +1361,63 @@ class Structure extends Get
{
// default to the field set name
$label = $fieldset;
if (isset(
$plugin->fieldsets_label[$file
. $field_name . $fieldset]
))
if (isset($plugin->fieldsets_label[$file . $field_name . $fieldset]))
{
$label = $plugin->fieldsets_label[$file
. $field_name . $fieldset];
$label = $plugin->fieldsets_label[$file . $field_name . $fieldset];
}
// add path to plugin rules and custom fields
if (isset(
$plugin->fieldsets_paths[$file
. $field_name . $fieldset]
)
&& $plugin->fieldsets_paths[$file
. $field_name . $fieldset] == 2)
if (isset($plugin->fieldsets_paths[$file . $field_name . $fieldset])
&& ($plugin->fieldsets_paths[$file . $field_name . $fieldset] == 2
|| $plugin->fieldsets_paths[$file . $field_name . $fieldset] == 3))
{
if (!isset($plugin->add_rule_path[$file . $field_name . $fieldset]))
{
$plugin->add_rule_path[$file . $field_name . $fieldset] =
'/plugins/' . strtolower($plugin->group
) . '/' . strtolower($plugin->code_name)
. '/rules';
}
if (!isset($plugin->add_field_path[$file . $field_name . $fieldset]))
{
$plugin->add_field_path[$file . $field_name . $fieldset] =
'/plugins/' . strtolower($plugin->group
) . '/' . strtolower($plugin->code_name)
. '/fields';
}
}
// add path to plugin rules and custom fields
if (isset($plugin->add_rule_path[$file . $field_name . $fieldset])
|| isset($plugin->add_field_path[$file . $field_name . $fieldset]))
{
$xml .= PHP_EOL . $this->_t(1) . '<!--'
. $this->setLine(__LINE__)
. ' default paths of ' . $fieldset
. ' fieldset points to the plugin -->';
$xml .= PHP_EOL . $this->_t(1)
. '<fieldset name="' . $fieldset
. '" label="' . $label . '"';
$xml .= PHP_EOL . $this->_t(2)
. 'addrulepath="/plugins/'
. strtolower($plugin->group) . '/'
. strtolower($plugin->code_name)
. '/rules"';
$xml .= PHP_EOL . $this->_t(2)
. 'addfieldpath="/plugins/'
. strtolower($plugin->group) . '/'
. strtolower($plugin->code_name)
. '/fields"';
. $this->setLine(__LINE__) . ' default paths of '
. $fieldset . ' fieldset points to the plugin -->';
$xml .= PHP_EOL . $this->_t(1) . '<fieldset name="'
. $fieldset . '" label="' . $label . '"';
if (isset($plugin->add_rule_path[$file . $field_name . $fieldset]))
{
$xml .= PHP_EOL . $this->_t(2)
. 'addrulepath="' . $plugin->add_rule_path[$file . $field_name . $fieldset] . '"';
}
if (isset($plugin->add_field_path[$file . $field_name . $fieldset]))
{
$xml .= PHP_EOL . $this->_t(2)
. 'addfieldpath="' . $plugin->add_field_path[$file . $field_name . $fieldset] . '"';
}
$xml .= PHP_EOL . $this->_t(1) . '>';
}
else
{
$xml .= PHP_EOL . $this->_t(1)
. '<fieldset name="' . $fieldset
. '" label="' . $label . '">';
$xml .= PHP_EOL . $this->_t(1) . '<fieldset name="'
. $fieldset . '" label="' . $label . '">';
}
// check if we have an inner field set
if (ComponentbuilderHelper::checkString(
if (StringHelper::check(
$field_name_inner
))
{
@ -1375,7 +1429,7 @@ class Structure extends Get
$xml .= $this->hhh . 'FIELDSET_' . $file
. $field_name . $fieldset . $this->hhh;
// check if we have an inner field set
if (ComponentbuilderHelper::checkString(
if (StringHelper::check(
$field_name_inner
))
{
@ -1434,7 +1488,7 @@ class Structure extends Get
);
// check if this lib has files
if (isset($plugin->files)
&& ComponentbuilderHelper::checkArray($plugin->files))
&& ArrayHelper::check($plugin->files))
{
// add to component files
foreach ($plugin->files as $file)
@ -1447,7 +1501,7 @@ class Structure extends Get
}
// check if this lib has folders
if (isset($plugin->folders)
&& ComponentbuilderHelper::checkArray($plugin->folders))
&& ArrayHelper::check($plugin->folders))
{
// add to component folders
foreach ($plugin->folders as $folder)
@ -1460,7 +1514,7 @@ class Structure extends Get
}
// check if this plugin has urls
if (isset($plugin->urls)
&& ComponentbuilderHelper::checkArray($plugin->urls))
&& ArrayHelper::check($plugin->urls))
{
// add to component urls
foreach ($plugin->urls as $n => &$url)
@ -1468,14 +1522,14 @@ class Structure extends Get
// should we add the local folder
if (isset($url['type']) && $url['type'] > 1
&& isset($url['url'])
&& ComponentbuilderHelper::checkString(
&& StringHelper::check(
$url['url']
))
{
// set file name
$fileName = basename($url['url']);
// get the file contents
$data = ComponentbuilderHelper::getFileContents(
$data = FileHelper::getContent(
$url['url']
);
// build sub path
@ -1543,7 +1597,7 @@ class Structure extends Get
*/
private function setLibraries()
{
if (ComponentbuilderHelper::checkArray($this->libraries))
if (ArrayHelper::check($this->libraries))
{
// Trigger Event: jcb_ce_onBeforeSetLibraries
$this->triggerEvent(
@ -1562,11 +1616,11 @@ class Structure extends Get
$this->createFolder($this->componentPath . '/media');
foreach ($this->libraries as $id => &$library)
{
if (ComponentbuilderHelper::checkObject($library))
if (ObjectHelper::check($library))
{
// check if this lib has files
if (isset($library->files)
&& ComponentbuilderHelper::checkArray($library->files))
&& ArrayHelper::check($library->files))
{
// add to component files
foreach ($library->files as $file)
@ -1576,7 +1630,7 @@ class Structure extends Get
}
// check if this lib has folders
if (isset($library->folders)
&& ComponentbuilderHelper::checkArray(
&& ArrayHelper::check(
$library->folders
))
{
@ -1588,13 +1642,13 @@ class Structure extends Get
}
// check if this lib has urls
if (isset($library->urls)
&& ComponentbuilderHelper::checkArray($library->urls))
&& ArrayHelper::check($library->urls))
{
// build media folder path
$libFolder = strtolower(
preg_replace(
'/\s+/', '-',
ComponentbuilderHelper::safeString(
StringHelper::safe(
$library->name, 'filename', ' ', false
)
)
@ -1607,7 +1661,7 @@ class Structure extends Get
{
if (isset($url['type']) && $url['type'] > 1
&& isset($url['url'])
&& ComponentbuilderHelper::checkString(
&& StringHelper::check(
$url['url']
))
{
@ -1620,7 +1674,7 @@ class Structure extends Get
// set file name
$fileName = basename($url['url']);
// get the file contents
$data = ComponentbuilderHelper::getFileContents(
$data = FileHelper::getContent(
$url['url']
);
// build sub path
@ -1664,7 +1718,7 @@ class Structure extends Get
// if config fields are found load into component config (avoiding duplicates)
if (isset($library->how) && $library->how > 1
&& isset($library->config)
&& ComponentbuilderHelper::checkArray($library->config))
&& ArrayHelper::check($library->config))
{
foreach ($library->config as $cofig)
{
@ -1675,7 +1729,7 @@ class Structure extends Get
}
);
// set the config data if not found
if (!ComponentbuilderHelper::checkArray($found))
if (!ArrayHelper::check($found))
{
$this->componentData->config[] = $cofig;
}
@ -1698,7 +1752,7 @@ class Structure extends Get
if (isset($this->componentData->dashboard_type)
&& 2 == $this->componentData->dashboard_type
&& isset($this->componentData->dashboard)
&& ComponentbuilderHelper::checkString(
&& StringHelper::check(
$this->componentData->dashboard
)
&& strpos($this->componentData->dashboard, '_') !== false)
@ -1708,7 +1762,7 @@ class Structure extends Get
if (count((array) $getter) == 2 && is_numeric($getter[1]))
{
// the pointers
$t = ComponentbuilderHelper::safeString($getter[0], 'U');
$t = StringHelper::safe($getter[0], 'U');
$id = (int) $getter[1];
// the dynamic stuff
$targets = array('A' => 'admin_views',
@ -1721,12 +1775,12 @@ class Structure extends Get
if (isset($targets[$t]) && $id > 0)
{
// set the type name
$type_names = ComponentbuilderHelper::safeString(
$type_names = StringHelper::safe(
$targets[$t], 'w'
);
// set the dynamic dash
if (isset($this->componentData->{$targets[$t]})
&& ComponentbuilderHelper::checkArray(
&& ArrayHelper::check(
$this->componentData->{$targets[$t]}
))
{
@ -1744,7 +1798,7 @@ class Structure extends Get
}
);
// set dashboard
if (ComponentbuilderHelper::checkArray($dashboard))
if (ArrayHelper::check($dashboard))
{
$dashboard = array_values($dashboard)[0];
}
@ -1753,7 +1807,7 @@ class Structure extends Get
&& isset($dashboard['settings']->{$keys[$t]}))
{
$this->dynamicDashboard
= ComponentbuilderHelper::safeString(
= StringHelper::safe(
$dashboard['settings']->{$keys[$t]}
);
$this->dynamicDashboardType
@ -1818,7 +1872,7 @@ class Structure extends Get
);
}
// if default was changed to dynamic dashboard the remove default tab and methods
if (ComponentbuilderHelper::checkString($this->dynamicDashboard))
if (StringHelper::check($this->dynamicDashboard))
{
// dynamic dashboard is used
$this->componentData->dashboard_tab = '';
@ -1835,7 +1889,7 @@ class Structure extends Get
*/
public function writeFile($path, $data)
{
return ComponentbuilderHelper::writeFile($path, $data);
return FileHelper::write($path, $data);
}
/**
@ -1846,7 +1900,7 @@ class Structure extends Get
*/
private function setFolders()
{
if (ComponentbuilderHelper::checkObject(
if (ObjectHelper::check(
$this->joomlaVersionData->create
))
{
@ -1862,14 +1916,14 @@ class Structure extends Get
foreach ($this->joomlaVersionData->create as $main => $folders)
{
$this->createFolder($this->componentPath . '/' . $main);
if (ComponentbuilderHelper::checkObject($folders))
if (ObjectHelper::check($folders))
{
foreach ($folders as $sub => $subFolders)
{
$this->createFolder(
$this->componentPath . '/' . $main . '/' . $sub
);
if (ComponentbuilderHelper::checkObject($subFolders))
if (ObjectHelper::check($subFolders))
{
foreach ($subFolders as $sub_2 => $subFolders_2)
{
@ -1877,7 +1931,7 @@ class Structure extends Get
$this->componentPath . '/' . $main . '/'
. $sub . '/' . $sub_2
);
if (ComponentbuilderHelper::checkObject(
if (ObjectHelper::check(
$subFolders_2
))
{
@ -1890,7 +1944,7 @@ class Structure extends Get
. '/' . $sub . '/' . $sub_2 . '/'
. $sub_3
);
if (ComponentbuilderHelper::checkObject(
if (ObjectHelper::check(
$subFolders_3
))
{
@ -1905,7 +1959,7 @@ class Structure extends Get
. $sub_2 . '/' . $sub_3
. '/' . $sub_4
);
if (ComponentbuilderHelper::checkObject(
if (ObjectHelper::check(
$subFolders_4
))
{
@ -1923,7 +1977,7 @@ class Structure extends Get
. $sub_4 . '/'
. $sub_5
);
if (ComponentbuilderHelper::checkObject(
if (ObjectHelper::check(
$subFolders_5
))
{
@ -1950,7 +2004,7 @@ class Structure extends Get
. '/'
. $sub_6
);
if (ComponentbuilderHelper::checkObject(
if (ObjectHelper::check(
$subFolders_6
))
{
@ -2011,7 +2065,7 @@ class Structure extends Get
*/
private function setStatic()
{
if (ComponentbuilderHelper::checkObject(
if (ObjectHelper::check(
$this->joomlaVersionData->move->static
))
{
@ -2200,7 +2254,7 @@ class Structure extends Get
// TODO <-- this may not be the best way, will keep an eye on this.
// We basicly only want to check if a folder is added that is not in the stdFolders array
if (isset($checker[0])
&& ComponentbuilderHelper::checkString($checker[0])
&& StringHelper::check($checker[0])
&& !in_array($checker[0], $this->stdFolders))
{
// check if we should add the dynamic folder moving script to the installer script
@ -2222,7 +2276,7 @@ class Structure extends Get
}
}
elseif (count((array) $checker) == 2
&& ComponentbuilderHelper::checkString($checker[0]))
&& StringHelper::check($checker[0]))
{
$add_to_extra = false;
// set the target
@ -2254,7 +2308,7 @@ class Structure extends Get
}
// set the xml file
$this->fileContentStatic[$this->hhh . 'EXSTRA_'
. ComponentbuilderHelper::safeString(
. StringHelper::safe(
$checker[0], 'U'
) . '_' . $eNAME . $this->hhh]
.= PHP_EOL . $eTab . "<" . $ename . ">"
@ -2281,15 +2335,15 @@ class Structure extends Get
$back = false;
$front = false;
if ((isset($this->joomlaVersionData->move->dynamic)
&& ComponentbuilderHelper::checkObject(
&& ObjectHelper::check(
$this->joomlaVersionData->move->dynamic
))
&& (isset($this->componentData->admin_views)
&& ComponentbuilderHelper::checkArray(
&& ArrayHelper::check(
$this->componentData->admin_views
)))
{
if (!ComponentbuilderHelper::checkString($this->dynamicDashboard))
if (!StringHelper::check($this->dynamicDashboard))
{
// setup dashboard
$target = array('admin' => $this->componentData->name_code);
@ -2298,7 +2352,7 @@ class Structure extends Get
// now the rest of the views
foreach ($this->componentData->admin_views as $nr => $view)
{
if (ComponentbuilderHelper::checkObject($view['settings']))
if (ObjectHelper::check($view['settings']))
{
$created = $this->getCreatedDate($view);
$modified = $this->getLastModifiedDate($view);
@ -2357,11 +2411,11 @@ class Structure extends Get
$back = true;
}
if ((isset($this->joomlaVersionData->move->dynamic)
&& ComponentbuilderHelper::checkObject(
&& ObjectHelper::check(
$this->joomlaVersionData->move->dynamic
))
&& (isset($this->componentData->site_views)
&& ComponentbuilderHelper::checkArray(
&& ArrayHelper::check(
$this->componentData->site_views
)))
{
@ -2398,11 +2452,11 @@ class Structure extends Get
$front = true;
}
if ((isset($this->joomlaVersionData->move->dynamic)
&& ComponentbuilderHelper::checkObject(
&& ObjectHelper::check(
$this->joomlaVersionData->move->dynamic
))
&& (isset($this->componentData->custom_admin_views)
&& ComponentbuilderHelper::checkArray(
&& ArrayHelper::check(
$this->componentData->custom_admin_views
)))
{
@ -2539,12 +2593,12 @@ class Structure extends Get
'trim',
explode(
',',
ComponentbuilderHelper::getBetween(
GetHelper::between(
$multi_field['settings']->xml, 'fields="', '"'
)
)
);
if (ComponentbuilderHelper::checkArray($ids))
if (ArrayHelper::check($ids))
{
foreach ($ids as $id)
{
@ -2569,7 +2623,7 @@ class Structure extends Get
public function getCreatedDate($view)
{
if (isset($view['settings']->created)
&& ComponentbuilderHelper::checkString($view['settings']->created))
&& StringHelper::check($view['settings']->created))
{
// first set the main date
$date = strtotime($view['settings']->created);
@ -2595,7 +2649,7 @@ class Structure extends Get
{
// first set the main date
if (isset($view['settings']->modified)
&& ComponentbuilderHelper::checkString($view['settings']->modified)
&& StringHelper::check($view['settings']->modified)
&& '0000-00-00 00:00:00' !== $view['settings']->modified)
{
$date = strtotime($view['settings']->modified);
@ -2613,18 +2667,18 @@ class Structure extends Get
if (!isset($this->lastModifiedDate[$id]))
{
if (isset($view['settings']->fields)
&& ComponentbuilderHelper::checkArray(
&& ArrayHelper::check(
$view['settings']->fields
))
{
foreach ($view['settings']->fields as $field)
{
if (isset($field['settings'])
&& ComponentbuilderHelper::checkObject(
&& ObjectHelper::check(
$field['settings']
)
&& isset($field['settings']->modified)
&& ComponentbuilderHelper::checkString(
&& StringHelper::check(
$field['settings']->modified
)
&& '0000-00-00 00:00:00'
@ -2649,7 +2703,7 @@ class Structure extends Get
if (!isset($this->lastModifiedDate[$id]))
{
if (isset($view['settings']->main_get->modified)
&& ComponentbuilderHelper::checkString(
&& StringHelper::check(
$view['settings']->main_get->modified
)
&& '0000-00-00 00:00:00'
@ -2672,7 +2726,7 @@ class Structure extends Get
if (!isset($this->lastModifiedDate[$id]))
{
if (isset($view['settings']->main_get->modified)
&& ComponentbuilderHelper::checkString(
&& StringHelper::check(
$view['settings']->main_get->modified
)
&& '0000-00-00 00:00:00'
@ -2722,13 +2776,13 @@ class Structure extends Get
// did we build the files (any number)
$build_status = false;
// check that we have the target values
if (ComponentbuilderHelper::checkArray($target))
if (ArrayHelper::check($target))
{
// search the target
foreach ($target as $main => $name)
{
// make sure it is lower case
$name = ComponentbuilderHelper::safeString($name);
$name = StringHelper::safe($name);
// setup the files
foreach (
$this->joomlaVersionData->move->dynamic->{$main} as $item =>
@ -2813,7 +2867,7 @@ class Structure extends Get
$newFIle = array('path' => $path . '/' . $new,
'name' => $new, 'view' => $name,
'zip' => $zipPath . '/' . $new);
if (ComponentbuilderHelper::checkArray($config))
if (ArrayHelper::check($config))
{
$newFIle['config'] = $config;
}
@ -2837,15 +2891,28 @@ class Structure extends Get
*/
private function setJoomlaVersionData()
{
// option to load other settings
$custom_settings = $this->templatePath . '/settings_' . $this->componentCodeName . '.json';
// set the version data
$versionData = json_decode(
ComponentbuilderHelper::getFileContents(
$this->templatePath . '/settings.json'
)
);
if (File::exists($custom_settings))
{
$version_data = json_decode(
FileHelper::getContent(
$custom_settings
)
);
}
else
{
$version_data = json_decode(
FileHelper::getContent(
$this->templatePath . '/settings.json'
)
);
}
// add custom folders
if ((isset($this->componentData->folders)
&& ComponentbuilderHelper::checkArray(
&& ArrayHelper::check(
$this->componentData->folders
))
|| $this->addEximport
@ -2917,7 +2984,7 @@ class Structure extends Get
);
// fix custom path
if (isset($custom['path'])
&& ComponentbuilderHelper::checkString($custom['path']))
&& StringHelper::check($custom['path']))
{
$custom['path'] = trim($custom['path'], '/');
}
@ -2969,31 +3036,31 @@ class Structure extends Get
$newname = '';
}
// insure we have no duplicates
$key_pointer = ComponentbuilderHelper::safeString(
$key_pointer = StringHelper::safe(
$custom['folder']
) . '_f' . $pointer_tracker;
$pointer_tracker++;
// fix custom path
$custom['path'] = ltrim($custom['path'], '/');
// set new folder to object
$versionData->move->static->{$key_pointer} = new stdClass();
$versionData->move->static->{$key_pointer}->naam
$version_data->move->static->{$key_pointer} = new stdClass();
$version_data->move->static->{$key_pointer}->naam
= str_replace(
'//', '/', $custom['folder']
);
$versionData->move->static->{$key_pointer}->path
$version_data->move->static->{$key_pointer}->path
= $_target_type
. '/' . $custom['path'];
$versionData->move->static->{$key_pointer}->rename = $rename;
$versionData->move->static->{$key_pointer}->newName = $newname;
$versionData->move->static->{$key_pointer}->type = 'folder';
$versionData->move->static->{$key_pointer}->custom
$version_data->move->static->{$key_pointer}->rename = $rename;
$version_data->move->static->{$key_pointer}->newName = $newname;
$version_data->move->static->{$key_pointer}->type = 'folder';
$version_data->move->static->{$key_pointer}->custom
= $customPath;
// set the target if type and id is found
if (isset($custom['target_id'])
&& isset($custom['target_type']))
{
$versionData->move->static->{$key_pointer}->_target
$version_data->move->static->{$key_pointer}->_target
= array('key' => $custom['target_id'] . '_'
. $custom['target_type'],
'type' => $custom['target_type']);
@ -3004,7 +3071,7 @@ class Structure extends Get
}
// add custom files
if ((isset($this->componentData->files)
&& ComponentbuilderHelper::checkArray(
&& ArrayHelper::check(
$this->componentData->files
))
|| $this->googlechart)
@ -3058,13 +3125,13 @@ class Structure extends Get
$customPath = 'full';
}
// make sure we have not duplicates
$key_pointer = ComponentbuilderHelper::safeString(
$key_pointer = StringHelper::safe(
$custom['file']
) . '_g' . $pointer_tracker;
$pointer_tracker++;
// set new file to object
$versionData->move->static->{$key_pointer} = new stdClass();
$versionData->move->static->{$key_pointer}->naam = str_replace(
$version_data->move->static->{$key_pointer} = new stdClass();
$version_data->move->static->{$key_pointer}->naam = str_replace(
'//', '/', $custom['file']
);
// update the dynamic component name placholders in file names
@ -3077,11 +3144,11 @@ class Structure extends Get
{
$pathInfo['dirname'] = trim($pathInfo['dirname'], '/');
// set the info
$versionData->move->static->{$key_pointer}->path
$version_data->move->static->{$key_pointer}->path
= $_target_type
. '/' . $pathInfo['dirname'];
$versionData->move->static->{$key_pointer}->rename = 'new';
$versionData->move->static->{$key_pointer}->newName
$version_data->move->static->{$key_pointer}->rename = 'new';
$version_data->move->static->{$key_pointer}->newName
= $pathInfo['basename'];
}
elseif ('full' === $customPath)
@ -3091,11 +3158,11 @@ class Structure extends Get
// get file array
$fileArray = (array) explode('/', $custom['file']);
// set the info
$versionData->move->static->{$key_pointer}->path
$version_data->move->static->{$key_pointer}->path
= $_target_type
. '/' . $custom['path'];
$versionData->move->static->{$key_pointer}->rename = 'new';
$versionData->move->static->{$key_pointer}->newName = end(
$version_data->move->static->{$key_pointer}->rename = 'new';
$version_data->move->static->{$key_pointer}->newName = end(
$fileArray
);
}
@ -3104,19 +3171,19 @@ class Structure extends Get
// fix custom path
$custom['path'] = ltrim($custom['path'], '/');
// set the info
$versionData->move->static->{$key_pointer}->path
$version_data->move->static->{$key_pointer}->path
= $_target_type
. '/' . $custom['path'];
$versionData->move->static->{$key_pointer}->rename = false;
$version_data->move->static->{$key_pointer}->rename = false;
}
$versionData->move->static->{$key_pointer}->type = 'file';
$versionData->move->static->{$key_pointer}->custom
$version_data->move->static->{$key_pointer}->type = 'file';
$version_data->move->static->{$key_pointer}->custom
= $customPath;
// set the target if type and id is found
if (isset($custom['target_id'])
&& isset($custom['target_type']))
{
$versionData->move->static->{$key_pointer}->_target
$version_data->move->static->{$key_pointer}->_target
= array('key' => $custom['target_id'] . '_'
. $custom['target_type'],
'type' => $custom['target_type']);
@ -3137,7 +3204,7 @@ class Structure extends Get
unset($custom);
}
return $versionData;
return $version_data;
}
/**

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -15,6 +15,10 @@ defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Filesystem\File;
use Joomla\CMS\Filesystem\Folder;
use VDM\Joomla\Utilities\StringHelper;
use VDM\Joomla\Utilities\ArrayHelper;
use VDM\Joomla\Utilities\ObjectHelper;
use VDM\Joomla\Utilities\FileHelper;
/**
* Infusion class
@ -68,7 +72,7 @@ class Infusion extends Interpretation
protected function buildFileContent()
{
if (isset($this->componentData->admin_views)
&& ComponentbuilderHelper::checkArray(
&& ArrayHelper::check(
$this->componentData->admin_views
))
{
@ -157,7 +161,7 @@ class Infusion extends Interpretation
}
// load only first two values
if (isset($versionArray)
&& ComponentbuilderHelper::checkArray(
&& ArrayHelper::check(
$versionArray
)
&& $this->componentData->mvc_versiondate == 2)
@ -167,7 +171,7 @@ class Infusion extends Interpretation
}
// load only the first value
elseif (isset($versionArray)
&& ComponentbuilderHelper::checkArray(
&& ArrayHelper::check(
$versionArray
)
&& $this->componentData->mvc_versiondate == 3)
@ -356,7 +360,7 @@ class Infusion extends Interpretation
= $this->addEmailHelper();
// load the global placeholders
if (ComponentbuilderHelper::checkArray($this->globalPlaceholders))
if (ArrayHelper::check($this->globalPlaceholders))
{
foreach (
$this->globalPlaceholders as $globalPlaceholder =>
@ -1030,7 +1034,7 @@ class Infusion extends Interpretation
$scriptNote, true,
false, PHP_EOL
)) !== false
&& ComponentbuilderHelper::checkString($footerScript))
&& StringHelper::check($footerScript))
{
// only minfy if no php is added to the footer script
if ($this->minify
@ -1296,7 +1300,7 @@ class Infusion extends Interpretation
// setup custom_admin_views and all needed stuff for the site
if (isset($this->componentData->custom_admin_views)
&& ComponentbuilderHelper::checkArray(
&& ArrayHelper::check(
$this->componentData->custom_admin_views
))
{
@ -1667,7 +1671,7 @@ class Infusion extends Interpretation
$this->setVersionController();
// only set these if default dashboard it used
if (!ComponentbuilderHelper::checkString($this->dynamicDashboard))
if (!StringHelper::check($this->dynamicDashboard))
{
// DASHBOARDVIEW
$this->fileContentStatic[$this->hhh . 'DASHBOARDVIEW'
@ -1801,7 +1805,7 @@ class Infusion extends Interpretation
// build the validation rules
if (isset($this->validationRules)
&& ComponentbuilderHelper::checkArray($this->validationRules))
&& ArrayHelper::check($this->validationRules))
{
foreach ($this->validationRules as $rule => $_php)
{
@ -1821,13 +1825,13 @@ class Infusion extends Interpretation
// run the second run if needed
if (isset($this->secondRunAdmin)
&& ComponentbuilderHelper::checkArray($this->secondRunAdmin))
&& ArrayHelper::check($this->secondRunAdmin))
{
// start dynamic build
foreach ($this->secondRunAdmin as $function => $arrays)
{
if (ComponentbuilderHelper::checkArray($arrays)
&& ComponentbuilderHelper::checkString($function))
if (ArrayHelper::check($arrays)
&& StringHelper::check($function))
{
foreach ($arrays as $array)
{
@ -1846,7 +1850,7 @@ class Infusion extends Interpretation
// setup front-views and all needed stuff for the site
if (isset($this->componentData->site_views)
&& ComponentbuilderHelper::checkArray(
&& ArrayHelper::check(
$this->componentData->site_views
))
{
@ -2072,7 +2076,7 @@ class Infusion extends Interpretation
if ($view['settings']->main_get->gettype == 1)
{
// insure the controller headers are added
if (ComponentbuilderHelper::checkString(
if (StringHelper::check(
$view['settings']->php_controller
)
&& $view['settings']->php_controller != '//')
@ -2106,7 +2110,7 @@ class Infusion extends Interpretation
elseif ($view['settings']->main_get->gettype == 2)
{
// insure the controller headers are added
if (ComponentbuilderHelper::checkString(
if (StringHelper::check(
$view['settings']->php_controller
)
&& $view['settings']->php_controller != '//')
@ -2286,7 +2290,7 @@ class Infusion extends Interpretation
$this->fileContentStatic[$this->hhh . 'ROUTER_BUILD_VIEWS'
. $this->hhh]
)
|| !ComponentbuilderHelper::checkString(
|| !StringHelper::check(
$this->fileContentStatic[$this->hhh . 'ROUTER_BUILD_VIEWS'
. $this->hhh]
))
@ -2310,18 +2314,16 @@ class Infusion extends Interpretation
= $this->componentData->readme;
}
// remove all the power placeholders
$this->fileContentStatic[$this->hhh . 'ADMIN_POWER_EVENT_HELPER' . $this->hhh] = '';
$this->fileContentStatic[$this->hhh . 'ADMIN_POWER_EVENT' . $this->hhh] = '';
$this->fileContentStatic[$this->hhh . 'SITE_POWER_EVENT_HELPER' . $this->hhh] = '';
$this->fileContentStatic[$this->hhh . 'SITE_POWER_EVENT' . $this->hhh] = '';
$this->fileContentStatic[$this->hhh . 'ADMIN_POWER_HELPER' . $this->hhh] = '';
$this->fileContentStatic[$this->hhh . 'SITE_POWER_HELPER' . $this->hhh] = '';
// infuse powers data if set
if (ComponentbuilderHelper::checkArray($this->powers))
if (ArrayHelper::check($this->powers))
{
// start the autoloader
$autoloader = array();
foreach ($this->powers as $power)
{
if (ComponentbuilderHelper::checkObject($power))
if (ObjectHelper::check($power))
{
// Trigger Event: jcb_ce_onBeforeInfusePowerData
$this->triggerEvent(
@ -2349,11 +2351,11 @@ class Infusion extends Interpretation
$_backup_lang = $this->lang;
$_backup_langPrefix = $this->langPrefix;
// infuse module data if set
if (ComponentbuilderHelper::checkArray($this->joomlaModules))
if (ArrayHelper::check($this->joomlaModules))
{
foreach ($this->joomlaModules as $module)
{
if (ComponentbuilderHelper::checkObject($module))
if (ObjectHelper::check($module))
{
// Trigger Event: jcb_ce_onBeforeInfuseModuleData
$this->triggerEvent(
@ -2394,7 +2396,7 @@ class Infusion extends Interpretation
}
// FIELDSET
if (isset($module->form_files)
&& ComponentbuilderHelper::checkArray(
&& ArrayHelper::check(
$module->form_files
))
{
@ -2428,11 +2430,11 @@ class Infusion extends Interpretation
}
}
// infuse plugin data if set
if (ComponentbuilderHelper::checkArray($this->joomlaPlugins))
if (ArrayHelper::check($this->joomlaPlugins))
{
foreach ($this->joomlaPlugins as $plugin)
{
if (ComponentbuilderHelper::checkObject($plugin))
if (ObjectHelper::check($plugin))
{
// Trigger Event: jcb_ce_onBeforeInfusePluginData
$this->triggerEvent(
@ -2456,7 +2458,7 @@ class Infusion extends Interpretation
}
// FIELDSET
if (isset($plugin->form_files)
&& ComponentbuilderHelper::checkArray(
&& ArrayHelper::check(
$plugin->form_files
))
{
@ -2524,10 +2526,10 @@ class Infusion extends Interpretation
{
// set main keys
$nameSingleCode = $view->name_single_code;
$name_single_uppercase = ComponentbuilderHelper::safeString(
$name_single_uppercase = StringHelper::safe(
$view->name_single, 'U'
);
$name_single_first_uppercase = ComponentbuilderHelper::safeString(
$name_single_first_uppercase = StringHelper::safe(
$view->name_single, 'F'
);
@ -2550,10 +2552,10 @@ class Infusion extends Interpretation
if (isset($view->name_list) && $view->name_list != 'null')
{
$nameListCode = $view->name_list_code;
$name_list_uppercase = ComponentbuilderHelper::safeString(
$name_list_uppercase = StringHelper::safe(
$view->name_list, 'U'
);
$name_list_first_uppercase = ComponentbuilderHelper::safeString(
$name_list_first_uppercase = StringHelper::safe(
$view->name_list, 'F'
);
@ -2683,7 +2685,7 @@ class Infusion extends Interpretation
$this->languages['components'][$this->langTag]['sitesys']
);
}
$values = array_unique(ComponentbuilderHelper::mergeArrays($values));
$values = array_unique(ArrayHelper::merge($values));
// get the other lang strings if there is any
$this->multiLangString = $this->getMultiLangStrings($values);
// update insert the current lang in to DB
@ -2699,7 +2701,7 @@ class Infusion extends Interpretation
&$this->langTag)
);
// now we insert the values into the files
if (ComponentbuilderHelper::checkArray($this->languages['components']))
if (ArrayHelper::check($this->languages['components']))
{
// rest xml array
$langXML = array();
@ -2775,18 +2777,18 @@ class Infusion extends Interpretation
}
}
// load the lang xml
if (ComponentbuilderHelper::checkArray($langXML))
if (ArrayHelper::check($langXML))
{
$replace = array();
if (isset($langXML['admin'])
&& ComponentbuilderHelper::checkArray($langXML['admin']))
&& ArrayHelper::check($langXML['admin']))
{
$replace[$this->hhh . 'ADMIN_LANGUAGES' . $this->hhh]
= implode(PHP_EOL . $this->_t(3), $langXML['admin']);
}
if ((!$this->removeSiteFolder || !$this->removeSiteEditFolder)
&& isset($langXML['site'])
&& ComponentbuilderHelper::checkArray($langXML['site']))
&& ArrayHelper::check($langXML['site']))
{
$replace[$this->hhh . 'SITE_LANGUAGES' . $this->hhh]
= implode(PHP_EOL . $this->_t(2), $langXML['site']);
@ -2795,7 +2797,7 @@ class Infusion extends Interpretation
$xmlPath = $this->componentPath . '/' . $this->componentCodeName
. '.xml';
// get the content in xml
$componentXML = ComponentbuilderHelper::getFileContents(
$componentXML = FileHelper::getContent(
$xmlPath
);
// update the xml content

File diff suppressed because it is too large Load Diff

View File

@ -3950,10 +3950,10 @@ COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NEW_TAB="New Tab"
COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NEW_TAB_2="New Tab 2"
COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NEXT="Next"
COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NO="No"
COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NOTE_ADD_PHP_LANGUAGE_STRING_DESCRIPTION="<code>&lt;?= JText::_(&apos;Text&apos;) ?&gt;</code><br />
<code>&lt;?= JText::sprintf(&apos;Hello %s&apos;, $this->user->name) ?&gt;</code><br />
COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NOTE_ADD_PHP_LANGUAGE_STRING_DESCRIPTION="<code>&lt;?php echo JText::_(&apos;Text&apos;); ?&gt;</code><br />
<code>&lt;?php echo JText::sprintf(&apos;Hello %s&apos;, $this->user->name); ?&gt;</code><br />
<b>Just get UPPERCASE language string:</b><br />
<code>&lt;?= JustTEXT::_(&apos;Text&apos;) ?&gt;</code>"
<code>&lt;?php echo JustTEXT::_(&apos;Text&apos;); ?&gt;</code>"
COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NOTE_ADD_PHP_LANGUAGE_STRING_LABEL="Add PHP Language String"
COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NOTE_LIBRARIES_SELECTION_DESCRIPTION="All libraries you select will dynamically be added to the header of the page according to the settings of the selected library. Each library will also get its respective buttons added to the component global options if it has any set. Please take a look at the <span id='open-libraries'>libraries</span> for more details."
COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NOTE_LIBRARIES_SELECTION_LABEL="Select libraries you would like to use in your code"
@ -6237,7 +6237,11 @@ COM_COMPONENTBUILDER_JOOMLA_MODULES_UPDATES_N_ITEMS_UNFEATURED_1="%s Joomla Modu
COM_COMPONENTBUILDER_JOOMLA_MODULES_UPDATES_N_ITEMS_UNPUBLISHED="%s Joomla Modules Updates unpublished."
COM_COMPONENTBUILDER_JOOMLA_MODULES_UPDATES_N_ITEMS_UNPUBLISHED_1="%s Joomla Module Updates unpublished."
COM_COMPONENTBUILDER_JOOMLA_MODULE_ABSTRACT_CLASS="abstract class"
COM_COMPONENTBUILDER_JOOMLA_MODULE_ADDFIELDPATH_DESCRIPTION="Set other field path"
COM_COMPONENTBUILDER_JOOMLA_MODULE_ADDFIELDPATH_LABEL="Other Field Path"
COM_COMPONENTBUILDER_JOOMLA_MODULE_ADDREADME_LABEL="Add README"
COM_COMPONENTBUILDER_JOOMLA_MODULE_ADDRULEPATH_DESCRIPTION="Set other rule path"
COM_COMPONENTBUILDER_JOOMLA_MODULE_ADDRULEPATH_LABEL="Other Rule Path"
COM_COMPONENTBUILDER_JOOMLA_MODULE_ADD_CLASS_HELPER_DESCRIPTION="You can add a helper class to your module."
COM_COMPONENTBUILDER_JOOMLA_MODULE_ADD_CLASS_HELPER_HEADER_DESCRIPTION="You can add your own custom helper header script."
COM_COMPONENTBUILDER_JOOMLA_MODULE_ADD_CLASS_HELPER_HEADER_LABEL="Add Class Helper Header"
@ -6439,10 +6443,10 @@ COM_COMPONENTBUILDER_JOOMLA_MODULE_NAME_MESSAGE="Error! Please add name here."
COM_COMPONENTBUILDER_JOOMLA_MODULE_NEW="A New Joomla Module"
COM_COMPONENTBUILDER_JOOMLA_MODULE_NO="No"
COM_COMPONENTBUILDER_JOOMLA_MODULE_NONE="None"
COM_COMPONENTBUILDER_JOOMLA_MODULE_NOTE_ADD_PHP_LANGUAGE_STRING_DESCRIPTION="<code>&lt;?= JText::_(&apos;Text&apos;) ?&gt;</code><br />
<code>&lt;?= JText::sprintf(&apos;Hello %s&apos;, $this->user->name) ?&gt;</code><br />
COM_COMPONENTBUILDER_JOOMLA_MODULE_NOTE_ADD_PHP_LANGUAGE_STRING_DESCRIPTION="<code>&lt;?php echo JText::_(&apos;Text&apos;); ?&gt;</code><br />
<code>&lt;?php echo JText::sprintf(&apos;Hello %s&apos;, $this->user->name); ?&gt;</code><br />
<b>Just get UPPERCASE language string:</b><br />
<code>&lt;?= JustTEXT::_(&apos;Text&apos;) ?&gt;</code>"
<code>&lt;?php echo JustTEXT::_(&apos;Text&apos;); ?&gt;</code>"
COM_COMPONENTBUILDER_JOOMLA_MODULE_NOTE_ADD_PHP_LANGUAGE_STRING_LABEL="Add PHP Language String"
COM_COMPONENTBUILDER_JOOMLA_MODULE_NOTE_LIBRARIES_OPTIONS_DESCRIPTION="<p>All libraries added to modules are added to the component media folder for now</p>
<p>So over here you are able to manually add HTML code to your model default tmpl.</p>"
@ -6462,6 +6466,8 @@ COM_COMPONENTBUILDER_JOOMLA_MODULE_NOTE_UPDATE_SERVER_NOTE_ZIP_LABEL="The ZIP Op
COM_COMPONENTBUILDER_JOOMLA_MODULE_NOT_REQUIRED="Not Required"
COM_COMPONENTBUILDER_JOOMLA_MODULE_ORDERING_LABEL="Ordering"
COM_COMPONENTBUILDER_JOOMLA_MODULE_OTHER="Other"
COM_COMPONENTBUILDER_JOOMLA_MODULE_PATH_LABEL="Path"
COM_COMPONENTBUILDER_JOOMLA_MODULE_PATH_MESSAGE="Error! Please add extra field path here."
COM_COMPONENTBUILDER_JOOMLA_MODULE_PERMISSION="Permissions"
COM_COMPONENTBUILDER_JOOMLA_MODULE_PHP_METHOD_UNINSTALL_DESCRIPTION="PHP script that should run during uninstall."
COM_COMPONENTBUILDER_JOOMLA_MODULE_PHP_METHOD_UNINSTALL_LABEL="PHP Method (uninstall)"
@ -6680,7 +6686,11 @@ COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_N_ITEMS_UNFEATURED="%s Joomla Plugin
COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_N_ITEMS_UNFEATURED_1="%s Joomla Plugin Updates unfeatured."
COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_N_ITEMS_UNPUBLISHED="%s Joomla Plugins Updates unpublished."
COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_N_ITEMS_UNPUBLISHED_1="%s Joomla Plugin Updates unpublished."
COM_COMPONENTBUILDER_JOOMLA_PLUGIN_ADDFIELDPATH_DESCRIPTION="Set other field path"
COM_COMPONENTBUILDER_JOOMLA_PLUGIN_ADDFIELDPATH_LABEL="Other Field Path"
COM_COMPONENTBUILDER_JOOMLA_PLUGIN_ADDREADME_LABEL="Add README"
COM_COMPONENTBUILDER_JOOMLA_PLUGIN_ADDRULEPATH_DESCRIPTION="Set other rule path"
COM_COMPONENTBUILDER_JOOMLA_PLUGIN_ADDRULEPATH_LABEL="Other Rule Path"
COM_COMPONENTBUILDER_JOOMLA_PLUGIN_ADD_HEAD_DESCRIPTION="You can add your own custom header script, combined with the default header script that make the extended class work."
COM_COMPONENTBUILDER_JOOMLA_PLUGIN_ADD_HEAD_LABEL="Add Custom Class Header"
COM_COMPONENTBUILDER_JOOMLA_PLUGIN_ADD_PHP_METHOD_UNINSTALL_LABEL="Add PHP Method (uninstall)"
@ -6935,6 +6945,8 @@ COM_COMPONENTBUILDER_JOOMLA_PLUGIN_NOTE_UPDATE_SERVER_NOTE_ZIP_LABEL="The ZIP Op
COM_COMPONENTBUILDER_JOOMLA_PLUGIN_NOT_REQUIRED="Not Required"
COM_COMPONENTBUILDER_JOOMLA_PLUGIN_ORDERING_LABEL="Ordering"
COM_COMPONENTBUILDER_JOOMLA_PLUGIN_OTHER="Other"
COM_COMPONENTBUILDER_JOOMLA_PLUGIN_PATH_LABEL="Path"
COM_COMPONENTBUILDER_JOOMLA_PLUGIN_PATH_MESSAGE="Error! Please add extra field path here."
COM_COMPONENTBUILDER_JOOMLA_PLUGIN_PERMISSION="Permissions"
COM_COMPONENTBUILDER_JOOMLA_PLUGIN_PHP_METHOD_UNINSTALL_DESCRIPTION="PHP script that should run during uninstall."
COM_COMPONENTBUILDER_JOOMLA_PLUGIN_PHP_METHOD_UNINSTALL_LABEL="PHP Method (uninstall)"
@ -7285,10 +7297,10 @@ COM_COMPONENTBUILDER_LAYOUT_NAME_LABEL="Name"
COM_COMPONENTBUILDER_LAYOUT_NAME_MESSAGE="Error! Please add name here."
COM_COMPONENTBUILDER_LAYOUT_NEW="A New Layout"
COM_COMPONENTBUILDER_LAYOUT_NO="No"
COM_COMPONENTBUILDER_LAYOUT_NOTE_ADD_PHP_LANGUAGE_STRING_DESCRIPTION="<code>&lt;?= JText::_(&apos;Text&apos;) ?&gt;</code><br />
<code>&lt;?= JText::sprintf(&apos;Hello %s&apos;, $this->user->name) ?&gt;</code><br />
COM_COMPONENTBUILDER_LAYOUT_NOTE_ADD_PHP_LANGUAGE_STRING_DESCRIPTION="<code>&lt;?php echo JText::_(&apos;Text&apos;); ?&gt;</code><br />
<code>&lt;?php echo JText::sprintf(&apos;Hello %s&apos;, $this->user->name); ?&gt;</code><br />
<b>Just get UPPERCASE language string:</b><br />
<code>&lt;?= JustTEXT::_(&apos;Text&apos;) ?&gt;</code>"
<code>&lt;?php echo JustTEXT::_(&apos;Text&apos;); ?&gt;</code>"
COM_COMPONENTBUILDER_LAYOUT_NOTE_ADD_PHP_LANGUAGE_STRING_LABEL="Add PHP Language String"
COM_COMPONENTBUILDER_LAYOUT_NOTE_LIBRARIES_SELECTION_DESCRIPTION="All libraries you select will dynamically be added to the header of the page according to the settings of the selected library. Each library will also get its respective buttons added to the component global options if it has any set. Please take a look at the <span id='open-libraries'>libraries</span> for more details."
COM_COMPONENTBUILDER_LAYOUT_NOTE_LIBRARIES_SELECTION_LABEL="Select libraries you would like to use in your code"
@ -8381,10 +8393,10 @@ COM_COMPONENTBUILDER_SITE_VIEW_NEW_TAB_2="New Tab 2"
COM_COMPONENTBUILDER_SITE_VIEW_NEXT="Next"
COM_COMPONENTBUILDER_SITE_VIEW_NO="No"
COM_COMPONENTBUILDER_SITE_VIEW_NONE="None"
COM_COMPONENTBUILDER_SITE_VIEW_NOTE_ADD_PHP_LANGUAGE_STRING_DESCRIPTION="<code>&lt;?= JText::_(&apos;Text&apos;) ?&gt;</code><br />
<code>&lt;?= JText::sprintf(&apos;Hello %s&apos;, $this->user->name) ?&gt;</code><br />
COM_COMPONENTBUILDER_SITE_VIEW_NOTE_ADD_PHP_LANGUAGE_STRING_DESCRIPTION="<code>&lt;?php echo JText::_(&apos;Text&apos;); ?&gt;</code><br />
<code>&lt;?php echo JText::sprintf(&apos;Hello %s&apos;, $this->user->name); ?&gt;</code><br />
<b>Just get UPPERCASE language string:</b><br />
<code>&lt;?= JustTEXT::_(&apos;Text&apos;) ?&gt;</code>"
<code>&lt;?php echo JustTEXT::_(&apos;Text&apos;); ?&gt;</code>"
COM_COMPONENTBUILDER_SITE_VIEW_NOTE_ADD_PHP_LANGUAGE_STRING_LABEL="Add PHP Language String"
COM_COMPONENTBUILDER_SITE_VIEW_NOTE_CUSTOM_TOOLBAR_PLACEHOLDER_DESCRIPTION="Use this placeholder in the body <code>[[[SITE_TOOLBAR]]]</code> to add the custom position of the toolbar."
COM_COMPONENTBUILDER_SITE_VIEW_NOTE_LIBRARIES_SELECTION_DESCRIPTION="All libraries you select will dynamically be added to the header of the page according to the settings of the selected library. Each library will also get its respective buttons added to the component global options if it has any set. Please take a look at the <span id='open-libraries'>libraries</span> for more details."
@ -8855,10 +8867,10 @@ COM_COMPONENTBUILDER_TEMPLATE_NAME_LABEL="Name"
COM_COMPONENTBUILDER_TEMPLATE_NAME_MESSAGE="Error! Please add name here."
COM_COMPONENTBUILDER_TEMPLATE_NEW="A New Template"
COM_COMPONENTBUILDER_TEMPLATE_NO="No"
COM_COMPONENTBUILDER_TEMPLATE_NOTE_ADD_PHP_LANGUAGE_STRING_DESCRIPTION="<code>&lt;?= JText::_(&apos;Text&apos;) ?&gt;</code><br />
<code>&lt;?= JText::sprintf(&apos;Hello %s&apos;, $this->user->name) ?&gt;</code><br />
COM_COMPONENTBUILDER_TEMPLATE_NOTE_ADD_PHP_LANGUAGE_STRING_DESCRIPTION="<code>&lt;?php echo JText::_(&apos;Text&apos;); ?&gt;</code><br />
<code>&lt;?php echo JText::sprintf(&apos;Hello %s&apos;, $this->user->name); ?&gt;</code><br />
<b>Just get UPPERCASE language string:</b><br />
<code>&lt;?= JustTEXT::_(&apos;Text&apos;) ?&gt;</code>"
<code>&lt;?php echo JustTEXT::_(&apos;Text&apos;); ?&gt;</code>"
COM_COMPONENTBUILDER_TEMPLATE_NOTE_ADD_PHP_LANGUAGE_STRING_LABEL="Add PHP Language String"
COM_COMPONENTBUILDER_TEMPLATE_NOTE_LIBRARIES_SELECTION_DESCRIPTION="All libraries you select will dynamically be added to the header of the page according to the settings of the selected library. Each library will also get its respective buttons added to the component global options if it has any set. Please take a look at the <span id='open-libraries'>libraries</span> for more details."
COM_COMPONENTBUILDER_TEMPLATE_NOTE_LIBRARIES_SELECTION_LABEL="Select libraries you would like to use in your code"

View File

@ -28,8 +28,8 @@ $fields_tab_layout = 'fields_' . $layout_path_array[1];
// get the fields
$fields = $displayData->get($fields_tab_layout) ?: array(
'note_php_dashboard_note',
'dashboard_tab',
'php_dashboard_methods'
'php_dashboard_methods',
'dashboard_tab'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();

View File

@ -203,7 +203,7 @@ class ComponentbuilderModelAdmin_views extends JModelList
*/
public function getItems()
{
// check in items
// Check in items
$this->checkInNow();
// load parent items
@ -817,17 +817,19 @@ class ComponentbuilderModelAdmin_views extends JModelList
// Get a db connection.
$db = JFactory::getDbo();
// reset query
// Reset query.
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__componentbuilder_admin_view'));
$db->setQuery($query);
// Only select items that are checked out.
$query->where($db->quoteName('checked_out') . '!=0');
$db->setQuery($query, 0, 1);
$db->execute();
if ($db->getNumRows())
{
// Get Yesterdays date
// Get Yesterdays date.
$date = JFactory::getDate()->modify($time)->toSql();
// reset query
// Reset query.
$query = $db->getQuery(true);
// Fields to update.
@ -842,7 +844,7 @@ class ComponentbuilderModelAdmin_views extends JModelList
$db->quoteName('checked_out_time') . '<\''.$date.'\''
);
// Check table
// Check table.
$query->update($db->quoteName('#__componentbuilder_admin_view'))->set($fields)->where($conditions);
$db->setQuery($query);

View File

@ -94,7 +94,7 @@ class ComponentbuilderModelAdmins_custom_tabs extends JModelList
*/
public function getItems()
{
// check in items
// Check in items
$this->checkInNow();
// load parent items
@ -240,17 +240,19 @@ class ComponentbuilderModelAdmins_custom_tabs extends JModelList
// Get a db connection.
$db = JFactory::getDbo();
// reset query
// Reset query.
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__componentbuilder_admin_custom_tabs'));
$db->setQuery($query);
// Only select items that are checked out.
$query->where($db->quoteName('checked_out') . '!=0');
$db->setQuery($query, 0, 1);
$db->execute();
if ($db->getNumRows())
{
// Get Yesterdays date
// Get Yesterdays date.
$date = JFactory::getDate()->modify($time)->toSql();
// reset query
// Reset query.
$query = $db->getQuery(true);
// Fields to update.
@ -265,7 +267,7 @@ class ComponentbuilderModelAdmins_custom_tabs extends JModelList
$db->quoteName('checked_out_time') . '<\''.$date.'\''
);
// Check table
// Check table.
$query->update($db->quoteName('#__componentbuilder_admin_custom_tabs'))->set($fields)->where($conditions);
$db->setQuery($query);

View File

@ -94,7 +94,7 @@ class ComponentbuilderModelAdmins_fields extends JModelList
*/
public function getItems()
{
// check in items
// Check in items
$this->checkInNow();
// load parent items
@ -240,17 +240,19 @@ class ComponentbuilderModelAdmins_fields extends JModelList
// Get a db connection.
$db = JFactory::getDbo();
// reset query
// Reset query.
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__componentbuilder_admin_fields'));
$db->setQuery($query);
// Only select items that are checked out.
$query->where($db->quoteName('checked_out') . '!=0');
$db->setQuery($query, 0, 1);
$db->execute();
if ($db->getNumRows())
{
// Get Yesterdays date
// Get Yesterdays date.
$date = JFactory::getDate()->modify($time)->toSql();
// reset query
// Reset query.
$query = $db->getQuery(true);
// Fields to update.
@ -265,7 +267,7 @@ class ComponentbuilderModelAdmins_fields extends JModelList
$db->quoteName('checked_out_time') . '<\''.$date.'\''
);
// Check table
// Check table.
$query->update($db->quoteName('#__componentbuilder_admin_fields'))->set($fields)->where($conditions);
$db->setQuery($query);

View File

@ -94,7 +94,7 @@ class ComponentbuilderModelAdmins_fields_conditions extends JModelList
*/
public function getItems()
{
// check in items
// Check in items
$this->checkInNow();
// load parent items
@ -240,17 +240,19 @@ class ComponentbuilderModelAdmins_fields_conditions extends JModelList
// Get a db connection.
$db = JFactory::getDbo();
// reset query
// Reset query.
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__componentbuilder_admin_fields_conditions'));
$db->setQuery($query);
// Only select items that are checked out.
$query->where($db->quoteName('checked_out') . '!=0');
$db->setQuery($query, 0, 1);
$db->execute();
if ($db->getNumRows())
{
// Get Yesterdays date
// Get Yesterdays date.
$date = JFactory::getDate()->modify($time)->toSql();
// reset query
// Reset query.
$query = $db->getQuery(true);
// Fields to update.
@ -265,7 +267,7 @@ class ComponentbuilderModelAdmins_fields_conditions extends JModelList
$db->quoteName('checked_out_time') . '<\''.$date.'\''
);
// Check table
// Check table.
$query->update($db->quoteName('#__componentbuilder_admin_fields_conditions'))->set($fields)->where($conditions);
$db->setQuery($query);

View File

@ -94,7 +94,7 @@ class ComponentbuilderModelAdmins_fields_relations extends JModelList
*/
public function getItems()
{
// check in items
// Check in items
$this->checkInNow();
// load parent items
@ -240,17 +240,19 @@ class ComponentbuilderModelAdmins_fields_relations extends JModelList
// Get a db connection.
$db = JFactory::getDbo();
// reset query
// Reset query.
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__componentbuilder_admin_fields_relations'));
$db->setQuery($query);
// Only select items that are checked out.
$query->where($db->quoteName('checked_out') . '!=0');
$db->setQuery($query, 0, 1);
$db->execute();
if ($db->getNumRows())
{
// Get Yesterdays date
// Get Yesterdays date.
$date = JFactory::getDate()->modify($time)->toSql();
// reset query
// Reset query.
$query = $db->getQuery(true);
// Fields to update.
@ -265,7 +267,7 @@ class ComponentbuilderModelAdmins_fields_relations extends JModelList
$db->quoteName('checked_out_time') . '<\''.$date.'\''
);
// Check table
// Check table.
$query->update($db->quoteName('#__componentbuilder_admin_fields_relations'))->set($fields)->where($conditions);
$db->setQuery($query);

View File

@ -1803,10 +1803,10 @@ class ComponentbuilderModelAjax extends JModelList
$db = JFactory::getDbo();
// Create a new query object.
$query = $db->getQuery(true);
$query->select($db->quoteName(array('a.id','a.alias','a.template','b.name','a.dynamic_get')));
$query->select($db->quoteName(array('a.id', 'a.alias', 'a.template', 'b.name', 'a.dynamic_get')));
$query->from($db->quoteName('#__componentbuilder_template', 'a'));
$query->join('LEFT', $db->quoteName('#__componentbuilder_dynamic_get', 'b') . ' ON (' . $db->quoteName('b.id') . ' = ' . $db->quoteName('a.dynamic_get') . ')');
$query->where($db->quoteName('a.id') . ' != '.(int) $id);
$query->where($db->quoteName('a.id') . ' != '. (int) $id);
$query->where($db->quoteName('a.published') . ' = 1');
// Reset the query using our newly populated query object.
$db->setQuery($query);
@ -1839,10 +1839,10 @@ class ComponentbuilderModelAjax extends JModelList
$templateString[] = "<td><b>".$result->name."</b> ".$editget."</td><td><code>&lt;?php echo \$this->loadTemplate('".ComponentbuilderHelper::safeString($result->alias)."'); ?&gt;</code> ".$edit."</td>";
}
// build the table
$table = '<h2>'.JText::_('COM_COMPONENTBUILDER_TEMPLATE_CODE_SNIPPETS').'</h2><div class="uk-scrollable-box"><table class="uk-table uk-table-hover uk-table-striped uk-table-condensed">';
$table .= '<caption>'.JText::_('COM_COMPONENTBUILDER_TO_ADD_SIMPLY_COPY_AND_PAST_THE_SNIPPET_INTO_YOUR_CODE').'</caption>';
$table .= '<thead><tr><th>'.JText::_('COM_COMPONENTBUILDER_NAME_OF_DYNAMICGET').'</th><th>'.JText::_('COM_COMPONENTBUILDER_SNIPPET').'</th></thead>';
$table .= '<tbody><tr>'.implode("</tr><tr>",$templateString)."</tr></tbody></table></div>";
$table = '<h2>' . JText::_('COM_COMPONENTBUILDER_TEMPLATE_CODE_SNIPPETS') . '</h2><div class="uk-scrollable-box"><table class="uk-table uk-table-hover uk-table-striped uk-table-condensed">';
$table .= '<caption>' . JText::_('COM_COMPONENTBUILDER_TO_ADD_SIMPLY_COPY_AND_PAST_THE_SNIPPET_INTO_YOUR_CODE') . '</caption>';
$table .= '<thead><tr><th>' . JText::_('COM_COMPONENTBUILDER_NAME_OF_DYNAMICGET') . '</th><th>' . JText::_('COM_COMPONENTBUILDER_SNIPPET') . '</th></thead>';
$table .= '<tbody><tr>' . implode("</tr><tr>", $templateString) . "</tr></tbody></table></div>";
}
return $table;
}
@ -1892,34 +1892,38 @@ class ComponentbuilderModelAjax extends JModelList
switch ($result->gettype)
{
case 1:
// single
$layoutString[] = "<td><b>".$result->name."</b> ".$editget."</td><td><code>&lt;?php echo JLayoutHelper::render('".ComponentbuilderHelper::safeString($result->alias)."', \$this->item); ?&gt;</code> ".$edit."</td>";
// single
$layoutString[] = "<td><b>" . $result->name . "</b> " . $editget . "</td><td><code>&lt;?php echo JLayoutHelper::render('" . ComponentbuilderHelper::safeString($result->alias) . "', \$this->item); ?&gt;</code> " . $edit . "</td>";
break;
case 2:
// list
$layoutString[] = "<td><b>".$result->name."</b> ".$editget."</td><td><code>&lt;?php echo JLayoutHelper::render('".ComponentbuilderHelper::safeString($result->alias)."', \$this->items); ?&gt;</code> ".$edit."</td>";
// list
$layoutString[] = "<td><b>" . $result->name . "</b> " . $editget . "</td><td><code>&lt;?php echo JLayoutHelper::render('" . ComponentbuilderHelper::safeString($result->alias) . "', \$this->items); ?&gt;</code> " . $edit . "</td>";
break;
case 3:
case 4:
// custom
$result->getcustom = ComponentbuilderHelper::safeString($result->getcustom);
if (substr($result->getcustom, 0, strlen('get')) == 'get')
{
$varName = substr($result->getcustom, strlen('get'));
}
else
{
$varName = $result->getcustom;
}
$layoutString[] = "<td><b>".$result->name."</b> ".$editget."</td><td><code>&lt;?php echo JLayoutHelper::render('".ComponentbuilderHelper::safeString($result->alias)."', \$this->".$varName."); ?&gt;</code> ".$edit."</td>";
// custom
$result->getcustom = ComponentbuilderHelper::safeString($result->getcustom);
if (substr($result->getcustom, 0, strlen('get')) == 'get')
{
$varName = substr($result->getcustom, strlen('get'));
}
else
{
$varName = $result->getcustom;
}
$layoutString[] = "<td><b>" . $result->name . "</b> " . $editget . "</td><td><code>&lt;?php echo JLayoutHelper::render('" . ComponentbuilderHelper::safeString($result->alias) . "', \$this->" . $varName . "); ?&gt;</code> " . $edit . "</td>";
break;
default:
// no get
$layoutString[] = "<td>" . JText::_('COM_COMPONENTBUILDER_NONE_SELECTED') . "</td><td><code>&lt;?php echo JLayoutHelper::render('" . ComponentbuilderHelper::safeString($result->alias) . "', [?]); ?&gt;</code> " . $edit . "</td>";
break;
}
}
// build the table
$table = '<h2>'.JText::_('COM_COMPONENTBUILDER_LAYOUT_CODE_SNIPPETS').'</h2><div class="uk-scrollable-box"><table class="uk-table uk-table-hover uk-table-striped uk-table-condensed">';
$table .= '<caption>'.JText::_('COM_COMPONENTBUILDER_TO_ADD_SIMPLY_COPY_AND_PAST_THE_SNIPPET_INTO_YOUR_CODE').'</caption>';
$table .= '<thead><tr><th>'.JText::_('COM_COMPONENTBUILDER_NAME_OF_DYNAMICGET').'</th><th>'.JText::_('COM_COMPONENTBUILDER_SNIPPET').'</th></thead>';
$table .= '<tbody><tr>'.implode("</tr><tr>",$layoutString)."</tr></tbody></table></div>";
$table = '<h2>' . JText::_('COM_COMPONENTBUILDER_LAYOUT_CODE_SNIPPETS') . '</h2><div class="uk-scrollable-box"><table class="uk-table uk-table-hover uk-table-striped uk-table-condensed">';
$table .= '<caption>' . JText::_('COM_COMPONENTBUILDER_TO_ADD_SIMPLY_COPY_AND_PAST_THE_SNIPPET_INTO_YOUR_CODE') . '</caption>';
$table .= '<thead><tr><th>' . JText::_('COM_COMPONENTBUILDER_NAME_OF_DYNAMICGET') . '</th><th>' . JText::_('COM_COMPONENTBUILDER_SNIPPET') . '</th></thead>';
$table .= '<tbody><tr>' . implode("</tr><tr>",$layoutString) . "</tr></tbody></table></div>";
}
return $table;
}

View File

@ -110,7 +110,7 @@ class ComponentbuilderModelClass_extendings extends JModelList
*/
public function getItems()
{
// check in items
// Check in items
$this->checkInNow();
// load parent items
@ -323,17 +323,19 @@ class ComponentbuilderModelClass_extendings extends JModelList
// Get a db connection.
$db = JFactory::getDbo();
// reset query
// Reset query.
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__componentbuilder_class_extends'));
$db->setQuery($query);
// Only select items that are checked out.
$query->where($db->quoteName('checked_out') . '!=0');
$db->setQuery($query, 0, 1);
$db->execute();
if ($db->getNumRows())
{
// Get Yesterdays date
// Get Yesterdays date.
$date = JFactory::getDate()->modify($time)->toSql();
// reset query
// Reset query.
$query = $db->getQuery(true);
// Fields to update.
@ -348,7 +350,7 @@ class ComponentbuilderModelClass_extendings extends JModelList
$db->quoteName('checked_out_time') . '<\''.$date.'\''
);
// Check table
// Check table.
$query->update($db->quoteName('#__componentbuilder_class_extends'))->set($fields)->where($conditions);
$db->setQuery($query);

View File

@ -118,7 +118,7 @@ class ComponentbuilderModelClass_methods extends JModelList
*/
public function getItems()
{
// check in items
// Check in items
$this->checkInNow();
// load parent items
@ -502,17 +502,19 @@ class ComponentbuilderModelClass_methods extends JModelList
// Get a db connection.
$db = JFactory::getDbo();
// reset query
// Reset query.
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__componentbuilder_class_method'));
$db->setQuery($query);
// Only select items that are checked out.
$query->where($db->quoteName('checked_out') . '!=0');
$db->setQuery($query, 0, 1);
$db->execute();
if ($db->getNumRows())
{
// Get Yesterdays date
// Get Yesterdays date.
$date = JFactory::getDate()->modify($time)->toSql();
// reset query
// Reset query.
$query = $db->getQuery(true);
// Fields to update.
@ -527,7 +529,7 @@ class ComponentbuilderModelClass_methods extends JModelList
$db->quoteName('checked_out_time') . '<\''.$date.'\''
);
// Check table
// Check table.
$query->update($db->quoteName('#__componentbuilder_class_method'))->set($fields)->where($conditions);
$db->setQuery($query);

View File

@ -118,7 +118,7 @@ class ComponentbuilderModelClass_properties extends JModelList
*/
public function getItems()
{
// check in items
// Check in items
$this->checkInNow();
// load parent items
@ -498,17 +498,19 @@ class ComponentbuilderModelClass_properties extends JModelList
// Get a db connection.
$db = JFactory::getDbo();
// reset query
// Reset query.
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__componentbuilder_class_property'));
$db->setQuery($query);
// Only select items that are checked out.
$query->where($db->quoteName('checked_out') . '!=0');
$db->setQuery($query, 0, 1);
$db->execute();
if ($db->getNumRows())
{
// Get Yesterdays date
// Get Yesterdays date.
$date = JFactory::getDate()->modify($time)->toSql();
// reset query
// Reset query.
$query = $db->getQuery(true);
// Fields to update.
@ -523,7 +525,7 @@ class ComponentbuilderModelClass_properties extends JModelList
$db->quoteName('checked_out_time') . '<\''.$date.'\''
);
// Check table
// Check table.
$query->update($db->quoteName('#__componentbuilder_class_property'))->set($fields)->where($conditions);
$db->setQuery($query);

View File

@ -31,8 +31,8 @@ class ComponentbuilderModelComponent_dashboard extends JModelAdmin
'dashboard' => array(
'fullwidth' => array(
'note_php_dashboard_note',
'dashboard_tab',
'php_dashboard_methods'
'php_dashboard_methods',
'dashboard_tab'
),
'above' => array(
'joomla_component'

View File

@ -423,7 +423,7 @@ class ComponentbuilderModelComponentbuilder extends JModelList
.append("<h3><a href=\"" + issue.html_url + "\" target=\"_blank\">" + issue.title + "</a></h3>")
.append("<img alt=\"@" + issue.user.login + "\" style=\"vertical-align: baseline;\" src=\"" + issue.user.avatar_url +"&amp;s=60\" width=\"30\" height=\"30\"> ")
.append("<em><a href=\"" + issue.user.html_url + "\" target=\"_blank\">" + issue.user.login + "</a> '.JText::_('COM_COMPONENTBUILDER_OPENED_THIS').' <a href=\"" + issue.html_url + "\" target=\"_blank\">'.JText::_('COM_COMPONENTBUILDER_ISSUE').'-" + issue.number + "</a> (" + timeago + ")</em> ")
.append(marked(issue.body))
.append(marked.parse(issue.body))
.append("<a href=\"" + issue.html_url + "\" target=\"_blank\"><span class=\'icon-new-tab\'></span>'.JText::_('COM_COMPONENTBUILDER_RESPOND_TO_THIS_ISSUE_ON_GITHUB').'</a>...<hr />");
});
});
@ -436,7 +436,7 @@ class ComponentbuilderModelComponentbuilder extends JModelList
.append("<h3><a href=\"" + issue.html_url + "\" target=\"_blank\">" + issue.title + "</a></h3>")
.append("<img alt=\"@" + issue.user.login + "\" style=\"vertical-align: baseline;\" src=\"" + issue.user.avatar_url +"&amp;s=60\" width=\"30\" height=\"30\"> ")
.append("<em><a href=\"" + issue.user.html_url + "\" target=\"_blank\">" + issue.user.login + "</a> '.JText::_('COM_COMPONENTBUILDER_OPENED').' <a href=\"" + issue.html_url + "\" target=\"_blank\">'.JText::_('COM_COMPONENTBUILDER_ISSUE').'-" + issue.number + "</a> (" + timeago + ")</em>")
.append(marked(issue.body))
.append(marked.parse(issue.body))
.append("<a href=\"" + issue.html_url + "\" target=\"_blank\"><span class=\'icon-new-tab\'></span>'.JText::_('COM_COMPONENTBUILDER_REVIEW_THIS_ISSUE_ON_GITHUB').'</a>...<hr />");
});
});
@ -475,7 +475,7 @@ class ComponentbuilderModelComponentbuilder extends JModelList
.append(activeNotice)
.append("<img alt=\"@" + tagrelease.author.login + "\" style=\"vertical-align: baseline;\" src=\"" + tagrelease.author.avatar_url +"&amp;s=60\" width=\"30\" height=\"30\"> ")
.append("<em><a href=\"" + tagrelease.author.html_url + "\" target=\"_blank\">" + tagrelease.author.login + "</a> '.JText::_('COM_COMPONENTBUILDER_RELEASED_THIS').'<em> <b><span class=\'icon-tag-2\'></span>" + tagrelease.tag_name+ "</b> (" + timeago + ")")
.append(marked(tagrelease.body))
.append(marked.parse(tagrelease.body))
.append(" <a class=\"hasTooltip\" href=\"" + tagrelease.assets[0].browser_download_url + "\" title=\"'.JText::_('COM_COMPONENTBUILDER_DOWNLOAD').' " + tagrelease.assets[0].name + "\" target=\"_self\"><span class=\'icon-download\'></span>" + tagrelease.assets[0].name + "</a> (<a class=\"hasTooltip\" href=\"" + tagrelease.assets[0].browser_download_url + "\" title=\"'.JText::_('COM_COMPONENTBUILDER_TOTAL_DOWNLOADS').'\"><small>" + tagrelease.assets[0].download_count + "</small></a>) ")
.append("| <a href=\"" + tagrelease.html_url + "\" target=\"_blank\" title=\"'.JText::_('COM_COMPONENTBUILDER_OPEN').' " + tagrelease.name + " '.JText::_('COM_COMPONENTBUILDER_ON_GITHUB').'\"><span class=\'icon-new-tab\'></span>'.JText::_('COM_COMPONENTBUILDER_OPEN_ON_GITHUB').'</a>...<hr />");
});
@ -503,7 +503,7 @@ class ComponentbuilderModelComponentbuilder extends JModelList
jQuery(document).ready(function () {
jQuery.get(gewiki)
.success(function(wiki) {
jQuery("#wiki-md").html(marked(wiki));
jQuery("#wiki-md").html(marked.parse(wiki));
})
.error(function(jqXHR, textStatus, errorThrown) {
jQuery("#wiki-md").html("'.JText::_('COM_COMPONENTBUILDER_PLEASE_CHECK_AGAIN_LATTER').'");
@ -527,7 +527,7 @@ class ComponentbuilderModelComponentbuilder extends JModelList
jQuery.get(noticeboard)
.success(function(board) {
if (board.length > 5) {
jQuery("#noticeboard-md").html(marked(board));
jQuery("#noticeboard-md").html(marked.parse(board));
getIS(1,board).done(function(result) {
if (result){
jQuery("#cpanel_tabTabs a").each(function() {
@ -599,7 +599,7 @@ jQuery(document).ready( function($) {
jQuery.get(proboard)
.success(function(board) {
if (board.length > 5) {
jQuery("#proboard-md").html(marked(board));
jQuery("#proboard-md").html(marked.parse(board));
} else {
jQuery("#proboard-md").html("'.JText::_('COM_COMPONENTBUILDER_ALL_IS_GOOD_PLEASE_CHECK_AGAIN_LATTER').'");
}
@ -620,7 +620,7 @@ jQuery(document).ready( function($) {
jQuery(document).ready(function () {
jQuery.get(getreadme)
.success(function(readme) {
jQuery("#readme-md").html(marked(readme));
jQuery("#readme-md").html(marked.parse(readme));
})
.error(function(jqXHR, textStatus, errorThrown) {
jQuery("#readme-md").html("'.JText::_('COM_COMPONENTBUILDER_PLEASE_CHECK_AGAIN_LATTER').'");

View File

@ -94,7 +94,7 @@ class ComponentbuilderModelComponents_admin_views extends JModelList
*/
public function getItems()
{
// check in items
// Check in items
$this->checkInNow();
// load parent items
@ -240,17 +240,19 @@ class ComponentbuilderModelComponents_admin_views extends JModelList
// Get a db connection.
$db = JFactory::getDbo();
// reset query
// Reset query.
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__componentbuilder_component_admin_views'));
$db->setQuery($query);
// Only select items that are checked out.
$query->where($db->quoteName('checked_out') . '!=0');
$db->setQuery($query, 0, 1);
$db->execute();
if ($db->getNumRows())
{
// Get Yesterdays date
// Get Yesterdays date.
$date = JFactory::getDate()->modify($time)->toSql();
// reset query
// Reset query.
$query = $db->getQuery(true);
// Fields to update.
@ -265,7 +267,7 @@ class ComponentbuilderModelComponents_admin_views extends JModelList
$db->quoteName('checked_out_time') . '<\''.$date.'\''
);
// Check table
// Check table.
$query->update($db->quoteName('#__componentbuilder_component_admin_views'))->set($fields)->where($conditions);
$db->setQuery($query);

View File

@ -94,7 +94,7 @@ class ComponentbuilderModelComponents_config extends JModelList
*/
public function getItems()
{
// check in items
// Check in items
$this->checkInNow();
// load parent items
@ -240,17 +240,19 @@ class ComponentbuilderModelComponents_config extends JModelList
// Get a db connection.
$db = JFactory::getDbo();
// reset query
// Reset query.
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__componentbuilder_component_config'));
$db->setQuery($query);
// Only select items that are checked out.
$query->where($db->quoteName('checked_out') . '!=0');
$db->setQuery($query, 0, 1);
$db->execute();
if ($db->getNumRows())
{
// Get Yesterdays date
// Get Yesterdays date.
$date = JFactory::getDate()->modify($time)->toSql();
// reset query
// Reset query.
$query = $db->getQuery(true);
// Fields to update.
@ -265,7 +267,7 @@ class ComponentbuilderModelComponents_config extends JModelList
$db->quoteName('checked_out_time') . '<\''.$date.'\''
);
// Check table
// Check table.
$query->update($db->quoteName('#__componentbuilder_component_config'))->set($fields)->where($conditions);
$db->setQuery($query);

View File

@ -94,7 +94,7 @@ class ComponentbuilderModelComponents_custom_admin_menus extends JModelList
*/
public function getItems()
{
// check in items
// Check in items
$this->checkInNow();
// load parent items
@ -240,17 +240,19 @@ class ComponentbuilderModelComponents_custom_admin_menus extends JModelList
// Get a db connection.
$db = JFactory::getDbo();
// reset query
// Reset query.
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__componentbuilder_component_custom_admin_menus'));
$db->setQuery($query);
// Only select items that are checked out.
$query->where($db->quoteName('checked_out') . '!=0');
$db->setQuery($query, 0, 1);
$db->execute();
if ($db->getNumRows())
{
// Get Yesterdays date
// Get Yesterdays date.
$date = JFactory::getDate()->modify($time)->toSql();
// reset query
// Reset query.
$query = $db->getQuery(true);
// Fields to update.
@ -265,7 +267,7 @@ class ComponentbuilderModelComponents_custom_admin_menus extends JModelList
$db->quoteName('checked_out_time') . '<\''.$date.'\''
);
// Check table
// Check table.
$query->update($db->quoteName('#__componentbuilder_component_custom_admin_menus'))->set($fields)->where($conditions);
$db->setQuery($query);

View File

@ -94,7 +94,7 @@ class ComponentbuilderModelComponents_custom_admin_views extends JModelList
*/
public function getItems()
{
// check in items
// Check in items
$this->checkInNow();
// load parent items
@ -240,17 +240,19 @@ class ComponentbuilderModelComponents_custom_admin_views extends JModelList
// Get a db connection.
$db = JFactory::getDbo();
// reset query
// Reset query.
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__componentbuilder_component_custom_admin_views'));
$db->setQuery($query);
// Only select items that are checked out.
$query->where($db->quoteName('checked_out') . '!=0');
$db->setQuery($query, 0, 1);
$db->execute();
if ($db->getNumRows())
{
// Get Yesterdays date
// Get Yesterdays date.
$date = JFactory::getDate()->modify($time)->toSql();
// reset query
// Reset query.
$query = $db->getQuery(true);
// Fields to update.
@ -265,7 +267,7 @@ class ComponentbuilderModelComponents_custom_admin_views extends JModelList
$db->quoteName('checked_out_time') . '<\''.$date.'\''
);
// Check table
// Check table.
$query->update($db->quoteName('#__componentbuilder_component_custom_admin_views'))->set($fields)->where($conditions);
$db->setQuery($query);

View File

@ -94,7 +94,7 @@ class ComponentbuilderModelComponents_dashboard extends JModelList
*/
public function getItems()
{
// check in items
// Check in items
$this->checkInNow();
// load parent items
@ -240,17 +240,19 @@ class ComponentbuilderModelComponents_dashboard extends JModelList
// Get a db connection.
$db = JFactory::getDbo();
// reset query
// Reset query.
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__componentbuilder_component_dashboard'));
$db->setQuery($query);
// Only select items that are checked out.
$query->where($db->quoteName('checked_out') . '!=0');
$db->setQuery($query, 0, 1);
$db->execute();
if ($db->getNumRows())
{
// Get Yesterdays date
// Get Yesterdays date.
$date = JFactory::getDate()->modify($time)->toSql();
// reset query
// Reset query.
$query = $db->getQuery(true);
// Fields to update.
@ -265,7 +267,7 @@ class ComponentbuilderModelComponents_dashboard extends JModelList
$db->quoteName('checked_out_time') . '<\''.$date.'\''
);
// Check table
// Check table.
$query->update($db->quoteName('#__componentbuilder_component_dashboard'))->set($fields)->where($conditions);
$db->setQuery($query);

View File

@ -94,7 +94,7 @@ class ComponentbuilderModelComponents_files_folders extends JModelList
*/
public function getItems()
{
// check in items
// Check in items
$this->checkInNow();
// load parent items
@ -240,17 +240,19 @@ class ComponentbuilderModelComponents_files_folders extends JModelList
// Get a db connection.
$db = JFactory::getDbo();
// reset query
// Reset query.
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__componentbuilder_component_files_folders'));
$db->setQuery($query);
// Only select items that are checked out.
$query->where($db->quoteName('checked_out') . '!=0');
$db->setQuery($query, 0, 1);
$db->execute();
if ($db->getNumRows())
{
// Get Yesterdays date
// Get Yesterdays date.
$date = JFactory::getDate()->modify($time)->toSql();
// reset query
// Reset query.
$query = $db->getQuery(true);
// Fields to update.
@ -265,7 +267,7 @@ class ComponentbuilderModelComponents_files_folders extends JModelList
$db->quoteName('checked_out_time') . '<\''.$date.'\''
);
// Check table
// Check table.
$query->update($db->quoteName('#__componentbuilder_component_files_folders'))->set($fields)->where($conditions);
$db->setQuery($query);

View File

@ -94,7 +94,7 @@ class ComponentbuilderModelComponents_modules extends JModelList
*/
public function getItems()
{
// check in items
// Check in items
$this->checkInNow();
// load parent items
@ -240,17 +240,19 @@ class ComponentbuilderModelComponents_modules extends JModelList
// Get a db connection.
$db = JFactory::getDbo();
// reset query
// Reset query.
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__componentbuilder_component_modules'));
$db->setQuery($query);
// Only select items that are checked out.
$query->where($db->quoteName('checked_out') . '!=0');
$db->setQuery($query, 0, 1);
$db->execute();
if ($db->getNumRows())
{
// Get Yesterdays date
// Get Yesterdays date.
$date = JFactory::getDate()->modify($time)->toSql();
// reset query
// Reset query.
$query = $db->getQuery(true);
// Fields to update.
@ -265,7 +267,7 @@ class ComponentbuilderModelComponents_modules extends JModelList
$db->quoteName('checked_out_time') . '<\''.$date.'\''
);
// Check table
// Check table.
$query->update($db->quoteName('#__componentbuilder_component_modules'))->set($fields)->where($conditions);
$db->setQuery($query);

View File

@ -94,7 +94,7 @@ class ComponentbuilderModelComponents_mysql_tweaks extends JModelList
*/
public function getItems()
{
// check in items
// Check in items
$this->checkInNow();
// load parent items
@ -240,17 +240,19 @@ class ComponentbuilderModelComponents_mysql_tweaks extends JModelList
// Get a db connection.
$db = JFactory::getDbo();
// reset query
// Reset query.
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__componentbuilder_component_mysql_tweaks'));
$db->setQuery($query);
// Only select items that are checked out.
$query->where($db->quoteName('checked_out') . '!=0');
$db->setQuery($query, 0, 1);
$db->execute();
if ($db->getNumRows())
{
// Get Yesterdays date
// Get Yesterdays date.
$date = JFactory::getDate()->modify($time)->toSql();
// reset query
// Reset query.
$query = $db->getQuery(true);
// Fields to update.
@ -265,7 +267,7 @@ class ComponentbuilderModelComponents_mysql_tweaks extends JModelList
$db->quoteName('checked_out_time') . '<\''.$date.'\''
);
// Check table
// Check table.
$query->update($db->quoteName('#__componentbuilder_component_mysql_tweaks'))->set($fields)->where($conditions);
$db->setQuery($query);

View File

@ -94,7 +94,7 @@ class ComponentbuilderModelComponents_placeholders extends JModelList
*/
public function getItems()
{
// check in items
// Check in items
$this->checkInNow();
// load parent items
@ -240,17 +240,19 @@ class ComponentbuilderModelComponents_placeholders extends JModelList
// Get a db connection.
$db = JFactory::getDbo();
// reset query
// Reset query.
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__componentbuilder_component_placeholders'));
$db->setQuery($query);
// Only select items that are checked out.
$query->where($db->quoteName('checked_out') . '!=0');
$db->setQuery($query, 0, 1);
$db->execute();
if ($db->getNumRows())
{
// Get Yesterdays date
// Get Yesterdays date.
$date = JFactory::getDate()->modify($time)->toSql();
// reset query
// Reset query.
$query = $db->getQuery(true);
// Fields to update.
@ -265,7 +267,7 @@ class ComponentbuilderModelComponents_placeholders extends JModelList
$db->quoteName('checked_out_time') . '<\''.$date.'\''
);
// Check table
// Check table.
$query->update($db->quoteName('#__componentbuilder_component_placeholders'))->set($fields)->where($conditions);
$db->setQuery($query);

View File

@ -94,7 +94,7 @@ class ComponentbuilderModelComponents_plugins extends JModelList
*/
public function getItems()
{
// check in items
// Check in items
$this->checkInNow();
// load parent items
@ -240,17 +240,19 @@ class ComponentbuilderModelComponents_plugins extends JModelList
// Get a db connection.
$db = JFactory::getDbo();
// reset query
// Reset query.
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__componentbuilder_component_plugins'));
$db->setQuery($query);
// Only select items that are checked out.
$query->where($db->quoteName('checked_out') . '!=0');
$db->setQuery($query, 0, 1);
$db->execute();
if ($db->getNumRows())
{
// Get Yesterdays date
// Get Yesterdays date.
$date = JFactory::getDate()->modify($time)->toSql();
// reset query
// Reset query.
$query = $db->getQuery(true);
// Fields to update.
@ -265,7 +267,7 @@ class ComponentbuilderModelComponents_plugins extends JModelList
$db->quoteName('checked_out_time') . '<\''.$date.'\''
);
// Check table
// Check table.
$query->update($db->quoteName('#__componentbuilder_component_plugins'))->set($fields)->where($conditions);
$db->setQuery($query);

View File

@ -94,7 +94,7 @@ class ComponentbuilderModelComponents_site_views extends JModelList
*/
public function getItems()
{
// check in items
// Check in items
$this->checkInNow();
// load parent items
@ -240,17 +240,19 @@ class ComponentbuilderModelComponents_site_views extends JModelList
// Get a db connection.
$db = JFactory::getDbo();
// reset query
// Reset query.
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__componentbuilder_component_site_views'));
$db->setQuery($query);
// Only select items that are checked out.
$query->where($db->quoteName('checked_out') . '!=0');
$db->setQuery($query, 0, 1);
$db->execute();
if ($db->getNumRows())
{
// Get Yesterdays date
// Get Yesterdays date.
$date = JFactory::getDate()->modify($time)->toSql();
// reset query
// Reset query.
$query = $db->getQuery(true);
// Fields to update.
@ -265,7 +267,7 @@ class ComponentbuilderModelComponents_site_views extends JModelList
$db->quoteName('checked_out_time') . '<\''.$date.'\''
);
// Check table
// Check table.
$query->update($db->quoteName('#__componentbuilder_component_site_views'))->set($fields)->where($conditions);
$db->setQuery($query);

View File

@ -94,7 +94,7 @@ class ComponentbuilderModelComponents_updates extends JModelList
*/
public function getItems()
{
// check in items
// Check in items
$this->checkInNow();
// load parent items
@ -240,17 +240,19 @@ class ComponentbuilderModelComponents_updates extends JModelList
// Get a db connection.
$db = JFactory::getDbo();
// reset query
// Reset query.
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__componentbuilder_component_updates'));
$db->setQuery($query);
// Only select items that are checked out.
$query->where($db->quoteName('checked_out') . '!=0');
$db->setQuery($query, 0, 1);
$db->execute();
if ($db->getNumRows())
{
// Get Yesterdays date
// Get Yesterdays date.
$date = JFactory::getDate()->modify($time)->toSql();
// reset query
// Reset query.
$query = $db->getQuery(true);
// Fields to update.
@ -265,7 +267,7 @@ class ComponentbuilderModelComponents_updates extends JModelList
$db->quoteName('checked_out_time') . '<\''.$date.'\''
);
// Check table
// Check table.
$query->update($db->quoteName('#__componentbuilder_component_updates'))->set($fields)->where($conditions);
$db->setQuery($query);

View File

@ -187,7 +187,7 @@ class ComponentbuilderModelCustom_admin_views extends JModelList
*/
public function getItems()
{
// check in items
// Check in items
$this->checkInNow();
// load parent items
@ -672,17 +672,19 @@ class ComponentbuilderModelCustom_admin_views extends JModelList
// Get a db connection.
$db = JFactory::getDbo();
// reset query
// Reset query.
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__componentbuilder_custom_admin_view'));
$db->setQuery($query);
// Only select items that are checked out.
$query->where($db->quoteName('checked_out') . '!=0');
$db->setQuery($query, 0, 1);
$db->execute();
if ($db->getNumRows())
{
// Get Yesterdays date
// Get Yesterdays date.
$date = JFactory::getDate()->modify($time)->toSql();
// reset query
// Reset query.
$query = $db->getQuery(true);
// Fields to update.
@ -697,7 +699,7 @@ class ComponentbuilderModelCustom_admin_views extends JModelList
$db->quoteName('checked_out_time') . '<\''.$date.'\''
);
// Check table
// Check table.
$query->update($db->quoteName('#__componentbuilder_custom_admin_view'))->set($fields)->where($conditions);
$db->setQuery($query);

View File

@ -134,7 +134,7 @@ class ComponentbuilderModelCustom_codes extends JModelList
*/
public function getItems()
{
// check in items
// Check in items
$this->checkInNow();
// load parent items
@ -590,17 +590,19 @@ class ComponentbuilderModelCustom_codes extends JModelList
// Get a db connection.
$db = JFactory::getDbo();
// reset query
// Reset query.
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__componentbuilder_custom_code'));
$db->setQuery($query);
// Only select items that are checked out.
$query->where($db->quoteName('checked_out') . '!=0');
$db->setQuery($query, 0, 1);
$db->execute();
if ($db->getNumRows())
{
// Get Yesterdays date
// Get Yesterdays date.
$date = JFactory::getDate()->modify($time)->toSql();
// reset query
// Reset query.
$query = $db->getQuery(true);
// Fields to update.
@ -615,7 +617,7 @@ class ComponentbuilderModelCustom_codes extends JModelList
$db->quoteName('checked_out_time') . '<\''.$date.'\''
);
// Check table
// Check table.
$query->update($db->quoteName('#__componentbuilder_custom_code'))->set($fields)->where($conditions);
$db->setQuery($query);

View File

@ -118,7 +118,7 @@ class ComponentbuilderModelDynamic_gets extends JModelList
*/
public function getItems()
{
// check in items
// Check in items
$this->checkInNow();
// load parent items
@ -503,17 +503,19 @@ class ComponentbuilderModelDynamic_gets extends JModelList
// Get a db connection.
$db = JFactory::getDbo();
// reset query
// Reset query.
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__componentbuilder_dynamic_get'));
$db->setQuery($query);
// Only select items that are checked out.
$query->where($db->quoteName('checked_out') . '!=0');
$db->setQuery($query, 0, 1);
$db->execute();
if ($db->getNumRows())
{
// Get Yesterdays date
// Get Yesterdays date.
$date = JFactory::getDate()->modify($time)->toSql();
// reset query
// Reset query.
$query = $db->getQuery(true);
// Fields to update.
@ -528,7 +530,7 @@ class ComponentbuilderModelDynamic_gets extends JModelList
$db->quoteName('checked_out_time') . '<\''.$date.'\''
);
// Check table
// Check table.
$query->update($db->quoteName('#__componentbuilder_dynamic_get'))->set($fields)->where($conditions);
$db->setQuery($query);

View File

@ -214,7 +214,7 @@ class ComponentbuilderModelFields extends JModelList
*/
public function getItems()
{
// check in items
// Check in items
$this->checkInNow();
// load parent items
@ -858,17 +858,19 @@ class ComponentbuilderModelFields extends JModelList
// Get a db connection.
$db = JFactory::getDbo();
// reset query
// Reset query.
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__componentbuilder_field'));
$db->setQuery($query);
// Only select items that are checked out.
$query->where($db->quoteName('checked_out') . '!=0');
$db->setQuery($query, 0, 1);
$db->execute();
if ($db->getNumRows())
{
// Get Yesterdays date
// Get Yesterdays date.
$date = JFactory::getDate()->modify($time)->toSql();
// reset query
// Reset query.
$query = $db->getQuery(true);
// Fields to update.
@ -883,7 +885,7 @@ class ComponentbuilderModelFields extends JModelList
$db->quoteName('checked_out_time') . '<\''.$date.'\''
);
// Check table
// Check table.
$query->update($db->quoteName('#__componentbuilder_field'))->set($fields)->where($conditions);
$db->setQuery($query);

View File

@ -126,7 +126,7 @@ class ComponentbuilderModelFieldtypes extends JModelList
*/
public function getItems()
{
// check in items
// Check in items
$this->checkInNow();
// load parent items
@ -467,17 +467,19 @@ class ComponentbuilderModelFieldtypes extends JModelList
// Get a db connection.
$db = JFactory::getDbo();
// reset query
// Reset query.
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__componentbuilder_fieldtype'));
$db->setQuery($query);
// Only select items that are checked out.
$query->where($db->quoteName('checked_out') . '!=0');
$db->setQuery($query, 0, 1);
$db->execute();
if ($db->getNumRows())
{
// Get Yesterdays date
// Get Yesterdays date.
$date = JFactory::getDate()->modify($time)->toSql();
// reset query
// Reset query.
$query = $db->getQuery(true);
// Fields to update.
@ -492,7 +494,7 @@ class ComponentbuilderModelFieldtypes extends JModelList
$db->quoteName('checked_out_time') . '<\''.$date.'\''
);
// Check table
// Check table.
$query->update($db->quoteName('#__componentbuilder_fieldtype'))->set($fields)->where($conditions);
$db->setQuery($query);

View File

@ -647,6 +647,64 @@
COM_COMPONENTBUILDER_JOOMLA_MODULE_COMPONENT</option>
<option value="2">
COM_COMPONENTBUILDER_JOOMLA_MODULE_MODULE</option>
<option value="3">
COM_COMPONENTBUILDER_JOOMLA_MODULE_OTHER</option>
</field>
<!-- Addrulepath Field. Type: Subform. (joomla) -->
<field
type="subform"
name="addrulepath"
label="COM_COMPONENTBUILDER_JOOMLA_MODULE_ADDRULEPATH_LABEL"
layout="joomla.form.field.subform.repeatable-table"
multiple="true"
buttons="add,remove,move"
description="COM_COMPONENTBUILDER_JOOMLA_MODULE_ADDRULEPATH_DESCRIPTION"
icon="list"
max="1"
showon="fields_rules_paths:3"
nested_depth="1">
<form hidden="true" name="list_addrulepath_modal" repeat="true">
<!-- Path Field. Type: Text. (joomla) -->
<field
type="text"
name="path"
label="COM_COMPONENTBUILDER_JOOMLA_MODULE_PATH_LABEL"
size="50"
maxlength="150"
class="text_area"
filter="STRING"
message="COM_COMPONENTBUILDER_JOOMLA_MODULE_PATH_MESSAGE"
autocomplete="on"
/>
</form>
</field>
<!-- Addfieldpath Field. Type: Subform. (joomla) -->
<field
type="subform"
name="addfieldpath"
label="COM_COMPONENTBUILDER_JOOMLA_MODULE_ADDFIELDPATH_LABEL"
layout="joomla.form.field.subform.repeatable-table"
multiple="true"
buttons="add,remove,move"
description="COM_COMPONENTBUILDER_JOOMLA_MODULE_ADDFIELDPATH_DESCRIPTION"
icon="list"
max="1"
showon="fields_rules_paths:3"
nested_depth="1">
<form hidden="true" name="list_addfieldpath_modal" repeat="true">
<!-- Path Field. Type: Text. (joomla) -->
<field
type="text"
name="path"
label="COM_COMPONENTBUILDER_JOOMLA_MODULE_PATH_LABEL"
size="50"
maxlength="150"
class="text_area"
filter="STRING"
message="COM_COMPONENTBUILDER_JOOMLA_MODULE_PATH_MESSAGE"
autocomplete="on"
/>
</form>
</field>
<!-- Fields Field. Type: Subform. (joomla) -->
<field

View File

@ -526,6 +526,64 @@
COM_COMPONENTBUILDER_JOOMLA_PLUGIN_COMPONENT</option>
<option value="2">
COM_COMPONENTBUILDER_JOOMLA_PLUGIN_PLUGIN</option>
<option value="3">
COM_COMPONENTBUILDER_JOOMLA_PLUGIN_OTHER</option>
</field>
<!-- Addrulepath Field. Type: Subform. (joomla) -->
<field
type="subform"
name="addrulepath"
label="COM_COMPONENTBUILDER_JOOMLA_PLUGIN_ADDRULEPATH_LABEL"
layout="joomla.form.field.subform.repeatable-table"
multiple="true"
buttons="add,remove,move"
description="COM_COMPONENTBUILDER_JOOMLA_PLUGIN_ADDRULEPATH_DESCRIPTION"
icon="list"
max="1"
showon="fields_rules_paths:3"
nested_depth="1">
<form hidden="true" name="list_addrulepath_modal" repeat="true">
<!-- Path Field. Type: Text. (joomla) -->
<field
type="text"
name="path"
label="COM_COMPONENTBUILDER_JOOMLA_PLUGIN_PATH_LABEL"
size="50"
maxlength="150"
class="text_area"
filter="STRING"
message="COM_COMPONENTBUILDER_JOOMLA_PLUGIN_PATH_MESSAGE"
autocomplete="on"
/>
</form>
</field>
<!-- Addfieldpath Field. Type: Subform. (joomla) -->
<field
type="subform"
name="addfieldpath"
label="COM_COMPONENTBUILDER_JOOMLA_PLUGIN_ADDFIELDPATH_LABEL"
layout="joomla.form.field.subform.repeatable-table"
multiple="true"
buttons="add,remove,move"
description="COM_COMPONENTBUILDER_JOOMLA_PLUGIN_ADDFIELDPATH_DESCRIPTION"
icon="list"
max="1"
showon="fields_rules_paths:3"
nested_depth="1">
<form hidden="true" name="list_addfieldpath_modal" repeat="true">
<!-- Path Field. Type: Text. (joomla) -->
<field
type="text"
name="path"
label="COM_COMPONENTBUILDER_JOOMLA_PLUGIN_PATH_LABEL"
size="50"
maxlength="150"
class="text_area"
filter="STRING"
message="COM_COMPONENTBUILDER_JOOMLA_PLUGIN_PATH_MESSAGE"
autocomplete="on"
/>
</form>
</field>
<!-- Fields Field. Type: Subform. (joomla) -->
<field

View File

@ -133,7 +133,7 @@ class ComponentbuilderModelHelp_documents extends JModelList
*/
public function getItems()
{
// check in items
// Check in items
$this->checkInNow();
// load parent items
@ -506,17 +506,19 @@ class ComponentbuilderModelHelp_documents extends JModelList
// Get a db connection.
$db = JFactory::getDbo();
// reset query
// Reset query.
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__componentbuilder_help_document'));
$db->setQuery($query);
// Only select items that are checked out.
$query->where($db->quoteName('checked_out') . '!=0');
$db->setQuery($query, 0, 1);
$db->execute();
if ($db->getNumRows())
{
// Get Yesterdays date
// Get Yesterdays date.
$date = JFactory::getDate()->modify($time)->toSql();
// reset query
// Reset query.
$query = $db->getQuery(true);
// Fields to update.
@ -531,7 +533,7 @@ class ComponentbuilderModelHelp_documents extends JModelList
$db->quoteName('checked_out_time') . '<\''.$date.'\''
);
// Check table
// Check table.
$query->update($db->quoteName('#__componentbuilder_help_document'))->set($fields)->where($conditions);
$db->setQuery($query);

View File

@ -2304,7 +2304,7 @@ class ComponentbuilderModelJoomla_components extends JModelList
*/
public function getItems()
{
// check in items
// Check in items
$this->checkInNow();
// load parent items
@ -2756,17 +2756,19 @@ class ComponentbuilderModelJoomla_components extends JModelList
// Get a db connection.
$db = JFactory::getDbo();
// reset query
// Reset query.
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__componentbuilder_joomla_component'));
$db->setQuery($query);
// Only select items that are checked out.
$query->where($db->quoteName('checked_out') . '!=0');
$db->setQuery($query, 0, 1);
$db->execute();
if ($db->getNumRows())
{
// Get Yesterdays date
// Get Yesterdays date.
$date = JFactory::getDate()->modify($time)->toSql();
// reset query
// Reset query.
$query = $db->getQuery(true);
// Fields to update.
@ -2781,7 +2783,7 @@ class ComponentbuilderModelJoomla_components extends JModelList
$db->quoteName('checked_out_time') . '<\''.$date.'\''
);
// Check table
// Check table.
$query->update($db->quoteName('#__componentbuilder_joomla_component'))->set($fields)->where($conditions);
$db->setQuery($query);

View File

@ -118,7 +118,7 @@ class ComponentbuilderModelJoomla_modules extends JModelList
*/
public function getItems()
{
// check in items
// Check in items
$this->checkInNow();
// load parent items
@ -329,17 +329,19 @@ class ComponentbuilderModelJoomla_modules extends JModelList
// Get a db connection.
$db = JFactory::getDbo();
// reset query
// Reset query.
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__componentbuilder_joomla_module'));
$db->setQuery($query);
// Only select items that are checked out.
$query->where($db->quoteName('checked_out') . '!=0');
$db->setQuery($query, 0, 1);
$db->execute();
if ($db->getNumRows())
{
// Get Yesterdays date
// Get Yesterdays date.
$date = JFactory::getDate()->modify($time)->toSql();
// reset query
// Reset query.
$query = $db->getQuery(true);
// Fields to update.
@ -354,7 +356,7 @@ class ComponentbuilderModelJoomla_modules extends JModelList
$db->quoteName('checked_out_time') . '<\''.$date.'\''
);
// Check table
// Check table.
$query->update($db->quoteName('#__componentbuilder_joomla_module'))->set($fields)->where($conditions);
$db->setQuery($query);

View File

@ -94,7 +94,7 @@ class ComponentbuilderModelJoomla_modules_files_folders_urls extends JModelList
*/
public function getItems()
{
// check in items
// Check in items
$this->checkInNow();
// load parent items
@ -240,17 +240,19 @@ class ComponentbuilderModelJoomla_modules_files_folders_urls extends JModelList
// Get a db connection.
$db = JFactory::getDbo();
// reset query
// Reset query.
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__componentbuilder_joomla_module_files_folders_urls'));
$db->setQuery($query);
// Only select items that are checked out.
$query->where($db->quoteName('checked_out') . '!=0');
$db->setQuery($query, 0, 1);
$db->execute();
if ($db->getNumRows())
{
// Get Yesterdays date
// Get Yesterdays date.
$date = JFactory::getDate()->modify($time)->toSql();
// reset query
// Reset query.
$query = $db->getQuery(true);
// Fields to update.
@ -265,7 +267,7 @@ class ComponentbuilderModelJoomla_modules_files_folders_urls extends JModelList
$db->quoteName('checked_out_time') . '<\''.$date.'\''
);
// Check table
// Check table.
$query->update($db->quoteName('#__componentbuilder_joomla_module_files_folders_urls'))->set($fields)->where($conditions);
$db->setQuery($query);

View File

@ -94,7 +94,7 @@ class ComponentbuilderModelJoomla_modules_updates extends JModelList
*/
public function getItems()
{
// check in items
// Check in items
$this->checkInNow();
// load parent items
@ -240,17 +240,19 @@ class ComponentbuilderModelJoomla_modules_updates extends JModelList
// Get a db connection.
$db = JFactory::getDbo();
// reset query
// Reset query.
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__componentbuilder_joomla_module_updates'));
$db->setQuery($query);
// Only select items that are checked out.
$query->where($db->quoteName('checked_out') . '!=0');
$db->setQuery($query, 0, 1);
$db->execute();
if ($db->getNumRows())
{
// Get Yesterdays date
// Get Yesterdays date.
$date = JFactory::getDate()->modify($time)->toSql();
// reset query
// Reset query.
$query = $db->getQuery(true);
// Fields to update.
@ -265,7 +267,7 @@ class ComponentbuilderModelJoomla_modules_updates extends JModelList
$db->quoteName('checked_out_time') . '<\''.$date.'\''
);
// Check table
// Check table.
$query->update($db->quoteName('#__componentbuilder_joomla_module_updates'))->set($fields)->where($conditions);
$db->setQuery($query);

View File

@ -110,7 +110,7 @@ class ComponentbuilderModelJoomla_plugin_groups extends JModelList
*/
public function getItems()
{
// check in items
// Check in items
$this->checkInNow();
// load parent items
@ -269,17 +269,19 @@ class ComponentbuilderModelJoomla_plugin_groups extends JModelList
// Get a db connection.
$db = JFactory::getDbo();
// reset query
// Reset query.
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__componentbuilder_joomla_plugin_group'));
$db->setQuery($query);
// Only select items that are checked out.
$query->where($db->quoteName('checked_out') . '!=0');
$db->setQuery($query, 0, 1);
$db->execute();
if ($db->getNumRows())
{
// Get Yesterdays date
// Get Yesterdays date.
$date = JFactory::getDate()->modify($time)->toSql();
// reset query
// Reset query.
$query = $db->getQuery(true);
// Fields to update.
@ -294,7 +296,7 @@ class ComponentbuilderModelJoomla_plugin_groups extends JModelList
$db->quoteName('checked_out_time') . '<\''.$date.'\''
);
// Check table
// Check table.
$query->update($db->quoteName('#__componentbuilder_joomla_plugin_group'))->set($fields)->where($conditions);
$db->setQuery($query);

View File

@ -288,7 +288,7 @@ class ComponentbuilderModelJoomla_plugins extends JModelList
*/
public function getItems()
{
// check in items
// Check in items
$this->checkInNow();
// load parent items
@ -490,17 +490,19 @@ class ComponentbuilderModelJoomla_plugins extends JModelList
// Get a db connection.
$db = JFactory::getDbo();
// reset query
// Reset query.
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__componentbuilder_joomla_plugin'));
$db->setQuery($query);
// Only select items that are checked out.
$query->where($db->quoteName('checked_out') . '!=0');
$db->setQuery($query, 0, 1);
$db->execute();
if ($db->getNumRows())
{
// Get Yesterdays date
// Get Yesterdays date.
$date = JFactory::getDate()->modify($time)->toSql();
// reset query
// Reset query.
$query = $db->getQuery(true);
// Fields to update.
@ -515,7 +517,7 @@ class ComponentbuilderModelJoomla_plugins extends JModelList
$db->quoteName('checked_out_time') . '<\''.$date.'\''
);
// Check table
// Check table.
$query->update($db->quoteName('#__componentbuilder_joomla_plugin'))->set($fields)->where($conditions);
$db->setQuery($query);

View File

@ -94,7 +94,7 @@ class ComponentbuilderModelJoomla_plugins_files_folders_urls extends JModelList
*/
public function getItems()
{
// check in items
// Check in items
$this->checkInNow();
// load parent items
@ -240,17 +240,19 @@ class ComponentbuilderModelJoomla_plugins_files_folders_urls extends JModelList
// Get a db connection.
$db = JFactory::getDbo();
// reset query
// Reset query.
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__componentbuilder_joomla_plugin_files_folders_urls'));
$db->setQuery($query);
// Only select items that are checked out.
$query->where($db->quoteName('checked_out') . '!=0');
$db->setQuery($query, 0, 1);
$db->execute();
if ($db->getNumRows())
{
// Get Yesterdays date
// Get Yesterdays date.
$date = JFactory::getDate()->modify($time)->toSql();
// reset query
// Reset query.
$query = $db->getQuery(true);
// Fields to update.
@ -265,7 +267,7 @@ class ComponentbuilderModelJoomla_plugins_files_folders_urls extends JModelList
$db->quoteName('checked_out_time') . '<\''.$date.'\''
);
// Check table
// Check table.
$query->update($db->quoteName('#__componentbuilder_joomla_plugin_files_folders_urls'))->set($fields)->where($conditions);
$db->setQuery($query);

View File

@ -94,7 +94,7 @@ class ComponentbuilderModelJoomla_plugins_updates extends JModelList
*/
public function getItems()
{
// check in items
// Check in items
$this->checkInNow();
// load parent items
@ -240,17 +240,19 @@ class ComponentbuilderModelJoomla_plugins_updates extends JModelList
// Get a db connection.
$db = JFactory::getDbo();
// reset query
// Reset query.
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__componentbuilder_joomla_plugin_updates'));
$db->setQuery($query);
// Only select items that are checked out.
$query->where($db->quoteName('checked_out') . '!=0');
$db->setQuery($query, 0, 1);
$db->execute();
if ($db->getNumRows())
{
// Get Yesterdays date
// Get Yesterdays date.
$date = JFactory::getDate()->modify($time)->toSql();
// reset query
// Reset query.
$query = $db->getQuery(true);
// Fields to update.
@ -265,7 +267,7 @@ class ComponentbuilderModelJoomla_plugins_updates extends JModelList
$db->quoteName('checked_out_time') . '<\''.$date.'\''
);
// Check table
// Check table.
$query->update($db->quoteName('#__componentbuilder_joomla_plugin_updates'))->set($fields)->where($conditions);
$db->setQuery($query);

View File

@ -189,7 +189,7 @@ class ComponentbuilderModelLanguage_translations extends JModelList
*/
public function getItems()
{
// check in items
// Check in items
$this->checkInNow();
// load parent items
@ -676,17 +676,19 @@ class ComponentbuilderModelLanguage_translations extends JModelList
// Get a db connection.
$db = JFactory::getDbo();
// reset query
// Reset query.
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__componentbuilder_language_translation'));
$db->setQuery($query);
// Only select items that are checked out.
$query->where($db->quoteName('checked_out') . '!=0');
$db->setQuery($query, 0, 1);
$db->execute();
if ($db->getNumRows())
{
// Get Yesterdays date
// Get Yesterdays date.
$date = JFactory::getDate()->modify($time)->toSql();
// reset query
// Reset query.
$query = $db->getQuery(true);
// Fields to update.
@ -701,7 +703,7 @@ class ComponentbuilderModelLanguage_translations extends JModelList
$db->quoteName('checked_out_time') . '<\''.$date.'\''
);
// Check table
// Check table.
$query->update($db->quoteName('#__componentbuilder_language_translation'))->set($fields)->where($conditions);
$db->setQuery($query);

View File

@ -233,7 +233,7 @@ class ComponentbuilderModelLanguages extends JModelList
*/
public function getItems()
{
// check in items
// Check in items
$this->checkInNow();
// load parent items
@ -514,17 +514,19 @@ class ComponentbuilderModelLanguages extends JModelList
// Get a db connection.
$db = JFactory::getDbo();
// reset query
// Reset query.
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__componentbuilder_language'));
$db->setQuery($query);
// Only select items that are checked out.
$query->where($db->quoteName('checked_out') . '!=0');
$db->setQuery($query, 0, 1);
$db->execute();
if ($db->getNumRows())
{
// Get Yesterdays date
// Get Yesterdays date.
$date = JFactory::getDate()->modify($time)->toSql();
// reset query
// Reset query.
$query = $db->getQuery(true);
// Fields to update.
@ -539,7 +541,7 @@ class ComponentbuilderModelLanguages extends JModelList
$db->quoteName('checked_out_time') . '<\''.$date.'\''
);
// Check table
// Check table.
$query->update($db->quoteName('#__componentbuilder_language'))->set($fields)->where($conditions);
$db->setQuery($query);

View File

@ -126,7 +126,7 @@ class ComponentbuilderModelLayouts extends JModelList
*/
public function getItems()
{
// check in items
// Check in items
$this->checkInNow();
// load parent items
@ -485,17 +485,19 @@ class ComponentbuilderModelLayouts extends JModelList
// Get a db connection.
$db = JFactory::getDbo();
// reset query
// Reset query.
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__componentbuilder_layout'));
$db->setQuery($query);
// Only select items that are checked out.
$query->where($db->quoteName('checked_out') . '!=0');
$db->setQuery($query, 0, 1);
$db->execute();
if ($db->getNumRows())
{
// Get Yesterdays date
// Get Yesterdays date.
$date = JFactory::getDate()->modify($time)->toSql();
// reset query
// Reset query.
$query = $db->getQuery(true);
// Fields to update.
@ -510,7 +512,7 @@ class ComponentbuilderModelLayouts extends JModelList
$db->quoteName('checked_out_time') . '<\''.$date.'\''
);
// Check table
// Check table.
$query->update($db->quoteName('#__componentbuilder_layout'))->set($fields)->where($conditions);
$db->setQuery($query);

View File

@ -134,7 +134,7 @@ class ComponentbuilderModelLibraries extends JModelList
*/
public function getItems()
{
// check in items
// Check in items
$this->checkInNow();
// load parent items
@ -418,17 +418,19 @@ class ComponentbuilderModelLibraries extends JModelList
// Get a db connection.
$db = JFactory::getDbo();
// reset query
// Reset query.
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__componentbuilder_library'));
$db->setQuery($query);
// Only select items that are checked out.
$query->where($db->quoteName('checked_out') . '!=0');
$db->setQuery($query, 0, 1);
$db->execute();
if ($db->getNumRows())
{
// Get Yesterdays date
// Get Yesterdays date.
$date = JFactory::getDate()->modify($time)->toSql();
// reset query
// Reset query.
$query = $db->getQuery(true);
// Fields to update.
@ -443,7 +445,7 @@ class ComponentbuilderModelLibraries extends JModelList
$db->quoteName('checked_out_time') . '<\''.$date.'\''
);
// Check table
// Check table.
$query->update($db->quoteName('#__componentbuilder_library'))->set($fields)->where($conditions);
$db->setQuery($query);

View File

@ -94,7 +94,7 @@ class ComponentbuilderModelLibraries_config extends JModelList
*/
public function getItems()
{
// check in items
// Check in items
$this->checkInNow();
// load parent items
@ -240,17 +240,19 @@ class ComponentbuilderModelLibraries_config extends JModelList
// Get a db connection.
$db = JFactory::getDbo();
// reset query
// Reset query.
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__componentbuilder_library_config'));
$db->setQuery($query);
// Only select items that are checked out.
$query->where($db->quoteName('checked_out') . '!=0');
$db->setQuery($query, 0, 1);
$db->execute();
if ($db->getNumRows())
{
// Get Yesterdays date
// Get Yesterdays date.
$date = JFactory::getDate()->modify($time)->toSql();
// reset query
// Reset query.
$query = $db->getQuery(true);
// Fields to update.
@ -265,7 +267,7 @@ class ComponentbuilderModelLibraries_config extends JModelList
$db->quoteName('checked_out_time') . '<\''.$date.'\''
);
// Check table
// Check table.
$query->update($db->quoteName('#__componentbuilder_library_config'))->set($fields)->where($conditions);
$db->setQuery($query);

View File

@ -94,7 +94,7 @@ class ComponentbuilderModelLibraries_files_folders_urls extends JModelList
*/
public function getItems()
{
// check in items
// Check in items
$this->checkInNow();
// load parent items
@ -240,17 +240,19 @@ class ComponentbuilderModelLibraries_files_folders_urls extends JModelList
// Get a db connection.
$db = JFactory::getDbo();
// reset query
// Reset query.
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__componentbuilder_library_files_folders_urls'));
$db->setQuery($query);
// Only select items that are checked out.
$query->where($db->quoteName('checked_out') . '!=0');
$db->setQuery($query, 0, 1);
$db->execute();
if ($db->getNumRows())
{
// Get Yesterdays date
// Get Yesterdays date.
$date = JFactory::getDate()->modify($time)->toSql();
// reset query
// Reset query.
$query = $db->getQuery(true);
// Fields to update.
@ -265,7 +267,7 @@ class ComponentbuilderModelLibraries_files_folders_urls extends JModelList
$db->quoteName('checked_out_time') . '<\''.$date.'\''
);
// Check table
// Check table.
$query->update($db->quoteName('#__componentbuilder_library_files_folders_urls'))->set($fields)->where($conditions);
$db->setQuery($query);

View File

@ -110,7 +110,7 @@ class ComponentbuilderModelPlaceholders extends JModelList
*/
public function getItems()
{
// check in items
// Check in items
$this->checkInNow();
// load parent items
@ -395,17 +395,19 @@ class ComponentbuilderModelPlaceholders extends JModelList
// Get a db connection.
$db = JFactory::getDbo();
// reset query
// Reset query.
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__componentbuilder_placeholder'));
$db->setQuery($query);
// Only select items that are checked out.
$query->where($db->quoteName('checked_out') . '!=0');
$db->setQuery($query, 0, 1);
$db->execute();
if ($db->getNumRows())
{
// Get Yesterdays date
// Get Yesterdays date.
$date = JFactory::getDate()->modify($time)->toSql();
// reset query
// Reset query.
$query = $db->getQuery(true);
// Fields to update.
@ -420,7 +422,7 @@ class ComponentbuilderModelPlaceholders extends JModelList
$db->quoteName('checked_out_time') . '<\''.$date.'\''
);
// Check table
// Check table.
$query->update($db->quoteName('#__componentbuilder_placeholder'))->set($fields)->where($conditions);
$db->setQuery($query);

View File

@ -110,7 +110,7 @@ class ComponentbuilderModelServers extends JModelList
*/
public function getItems()
{
// check in items
// Check in items
$this->checkInNow();
// load parent items
@ -510,17 +510,19 @@ class ComponentbuilderModelServers extends JModelList
// Get a db connection.
$db = JFactory::getDbo();
// reset query
// Reset query.
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__componentbuilder_server'));
$db->setQuery($query);
// Only select items that are checked out.
$query->where($db->quoteName('checked_out') . '!=0');
$db->setQuery($query, 0, 1);
$db->execute();
if ($db->getNumRows())
{
// Get Yesterdays date
// Get Yesterdays date.
$date = JFactory::getDate()->modify($time)->toSql();
// reset query
// Reset query.
$query = $db->getQuery(true);
// Fields to update.
@ -535,7 +537,7 @@ class ComponentbuilderModelServers extends JModelList
$db->quoteName('checked_out_time') . '<\''.$date.'\''
);
// Check table
// Check table.
$query->update($db->quoteName('#__componentbuilder_server'))->set($fields)->where($conditions);
$db->setQuery($query);

View File

@ -195,7 +195,7 @@ class ComponentbuilderModelSite_views extends JModelList
*/
public function getItems()
{
// check in items
// Check in items
$this->checkInNow();
// load parent items
@ -681,17 +681,19 @@ class ComponentbuilderModelSite_views extends JModelList
// Get a db connection.
$db = JFactory::getDbo();
// reset query
// Reset query.
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__componentbuilder_site_view'));
$db->setQuery($query);
// Only select items that are checked out.
$query->where($db->quoteName('checked_out') . '!=0');
$db->setQuery($query, 0, 1);
$db->execute();
if ($db->getNumRows())
{
// Get Yesterdays date
// Get Yesterdays date.
$date = JFactory::getDate()->modify($time)->toSql();
// reset query
// Reset query.
$query = $db->getQuery(true);
// Fields to update.
@ -706,7 +708,7 @@ class ComponentbuilderModelSite_views extends JModelList
$db->quoteName('checked_out_time') . '<\''.$date.'\''
);
// Check table
// Check table.
$query->update($db->quoteName('#__componentbuilder_site_view'))->set($fields)->where($conditions);
$db->setQuery($query);

View File

@ -110,7 +110,7 @@ class ComponentbuilderModelSnippet_types extends JModelList
*/
public function getItems()
{
// check in items
// Check in items
$this->checkInNow();
// load parent items
@ -269,17 +269,19 @@ class ComponentbuilderModelSnippet_types extends JModelList
// Get a db connection.
$db = JFactory::getDbo();
// reset query
// Reset query.
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__componentbuilder_snippet_type'));
$db->setQuery($query);
// Only select items that are checked out.
$query->where($db->quoteName('checked_out') . '!=0');
$db->setQuery($query, 0, 1);
$db->execute();
if ($db->getNumRows())
{
// Get Yesterdays date
// Get Yesterdays date.
$date = JFactory::getDate()->modify($time)->toSql();
// reset query
// Reset query.
$query = $db->getQuery(true);
// Fields to update.
@ -294,7 +296,7 @@ class ComponentbuilderModelSnippet_types extends JModelList
$db->quoteName('checked_out_time') . '<\''.$date.'\''
);
// Check table
// Check table.
$query->update($db->quoteName('#__componentbuilder_snippet_type'))->set($fields)->where($conditions);
$db->setQuery($query);

View File

@ -248,7 +248,7 @@ class ComponentbuilderModelSnippets extends JModelList
*/
public function getItems()
{
// check in items
// Check in items
$this->checkInNow();
// load parent items
@ -576,17 +576,19 @@ class ComponentbuilderModelSnippets extends JModelList
// Get a db connection.
$db = JFactory::getDbo();
// reset query
// Reset query.
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__componentbuilder_snippet'));
$db->setQuery($query);
// Only select items that are checked out.
$query->where($db->quoteName('checked_out') . '!=0');
$db->setQuery($query, 0, 1);
$db->execute();
if ($db->getNumRows())
{
// Get Yesterdays date
// Get Yesterdays date.
$date = JFactory::getDate()->modify($time)->toSql();
// reset query
// Reset query.
$query = $db->getQuery(true);
// Fields to update.
@ -601,7 +603,7 @@ class ComponentbuilderModelSnippets extends JModelList
$db->quoteName('checked_out_time') . '<\''.$date.'\''
);
// Check table
// Check table.
$query->update($db->quoteName('#__componentbuilder_snippet'))->set($fields)->where($conditions);
$db->setQuery($query);

View File

@ -126,7 +126,7 @@ class ComponentbuilderModelTemplates extends JModelList
*/
public function getItems()
{
// check in items
// Check in items
$this->checkInNow();
// load parent items
@ -485,17 +485,19 @@ class ComponentbuilderModelTemplates extends JModelList
// Get a db connection.
$db = JFactory::getDbo();
// reset query
// Reset query.
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__componentbuilder_template'));
$db->setQuery($query);
// Only select items that are checked out.
$query->where($db->quoteName('checked_out') . '!=0');
$db->setQuery($query, 0, 1);
$db->execute();
if ($db->getNumRows())
{
// Get Yesterdays date
// Get Yesterdays date.
$date = JFactory::getDate()->modify($time)->toSql();
// reset query
// Reset query.
$query = $db->getQuery(true);
// Fields to update.
@ -510,7 +512,7 @@ class ComponentbuilderModelTemplates extends JModelList
$db->quoteName('checked_out_time') . '<\''.$date.'\''
);
// Check table
// Check table.
$query->update($db->quoteName('#__componentbuilder_template'))->set($fields)->where($conditions);
$db->setQuery($query);

View File

@ -110,7 +110,7 @@ class ComponentbuilderModelValidation_rules extends JModelList
*/
public function getItems()
{
// check in items
// Check in items
$this->checkInNow();
// load parent items
@ -393,17 +393,19 @@ class ComponentbuilderModelValidation_rules extends JModelList
// Get a db connection.
$db = JFactory::getDbo();
// reset query
// Reset query.
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__componentbuilder_validation_rule'));
$db->setQuery($query);
// Only select items that are checked out.
$query->where($db->quoteName('checked_out') . '!=0');
$db->setQuery($query, 0, 1);
$db->execute();
if ($db->getNumRows())
{
// Get Yesterdays date
// Get Yesterdays date.
$date = JFactory::getDate()->modify($time)->toSql();
// reset query
// Reset query.
$query = $db->getQuery(true);
// Fields to update.
@ -418,7 +420,7 @@ class ComponentbuilderModelValidation_rules extends JModelList
$db->quoteName('checked_out_time') . '<\''.$date.'\''
);
// Check table
// Check table.
$query->update($db->quoteName('#__componentbuilder_validation_rule'))->set($fields)->where($conditions);
$db->setQuery($query);

View File

@ -150,10 +150,10 @@ class ComponentbuilderViewAdmin_custom_tabs extends JViewLegacy
}
JToolbarHelper::divider();
// set help url for this view if found
$help_url = ComponentbuilderHelper::getHelpUrl('admin_custom_tabs');
if (ComponentbuilderHelper::checkString($help_url))
$this->help_url = ComponentbuilderHelper::getHelpUrl('admin_custom_tabs');
if (ComponentbuilderHelper::checkString($this->help_url))
{
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $this->help_url);
}
}

View File

@ -150,10 +150,10 @@ class ComponentbuilderViewAdmin_fields extends JViewLegacy
}
JToolbarHelper::divider();
// set help url for this view if found
$help_url = ComponentbuilderHelper::getHelpUrl('admin_fields');
if (ComponentbuilderHelper::checkString($help_url))
$this->help_url = ComponentbuilderHelper::getHelpUrl('admin_fields');
if (ComponentbuilderHelper::checkString($this->help_url))
{
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $this->help_url);
}
}

View File

@ -150,10 +150,10 @@ class ComponentbuilderViewAdmin_fields_conditions extends JViewLegacy
}
JToolbarHelper::divider();
// set help url for this view if found
$help_url = ComponentbuilderHelper::getHelpUrl('admin_fields_conditions');
if (ComponentbuilderHelper::checkString($help_url))
$this->help_url = ComponentbuilderHelper::getHelpUrl('admin_fields_conditions');
if (ComponentbuilderHelper::checkString($this->help_url))
{
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $this->help_url);
}
}

View File

@ -150,10 +150,10 @@ class ComponentbuilderViewAdmin_fields_relations extends JViewLegacy
}
JToolbarHelper::divider();
// set help url for this view if found
$help_url = ComponentbuilderHelper::getHelpUrl('admin_fields_relations');
if (ComponentbuilderHelper::checkString($help_url))
$this->help_url = ComponentbuilderHelper::getHelpUrl('admin_fields_relations');
if (ComponentbuilderHelper::checkString($this->help_url))
{
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $this->help_url);
}
}

View File

@ -150,10 +150,10 @@ class ComponentbuilderViewAdmin_view extends JViewLegacy
}
JToolbarHelper::divider();
// set help url for this view if found
$help_url = ComponentbuilderHelper::getHelpUrl('admin_view');
if (ComponentbuilderHelper::checkString($help_url))
$this->help_url = ComponentbuilderHelper::getHelpUrl('admin_view');
if (ComponentbuilderHelper::checkString($this->help_url))
{
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $this->help_url);
}
}

View File

@ -152,10 +152,10 @@ class ComponentbuilderViewAdmin_views extends JViewLegacy
}
// set help url for this view if found
$help_url = ComponentbuilderHelper::getHelpUrl('admin_views');
if (ComponentbuilderHelper::checkString($help_url))
$this->help_url = ComponentbuilderHelper::getHelpUrl('admin_views');
if (ComponentbuilderHelper::checkString($this->help_url))
{
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $this->help_url);
}
// add the options comp button

View File

@ -137,10 +137,10 @@ class ComponentbuilderViewAdmins_custom_tabs extends JViewLegacy
}
// set help url for this view if found
$help_url = ComponentbuilderHelper::getHelpUrl('admins_custom_tabs');
if (ComponentbuilderHelper::checkString($help_url))
$this->help_url = ComponentbuilderHelper::getHelpUrl('admins_custom_tabs');
if (ComponentbuilderHelper::checkString($this->help_url))
{
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $this->help_url);
}
// add the options comp button

View File

@ -137,10 +137,10 @@ class ComponentbuilderViewAdmins_fields extends JViewLegacy
}
// set help url for this view if found
$help_url = ComponentbuilderHelper::getHelpUrl('admins_fields');
if (ComponentbuilderHelper::checkString($help_url))
$this->help_url = ComponentbuilderHelper::getHelpUrl('admins_fields');
if (ComponentbuilderHelper::checkString($this->help_url))
{
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $this->help_url);
}
// add the options comp button

View File

@ -137,10 +137,10 @@ class ComponentbuilderViewAdmins_fields_conditions extends JViewLegacy
}
// set help url for this view if found
$help_url = ComponentbuilderHelper::getHelpUrl('admins_fields_conditions');
if (ComponentbuilderHelper::checkString($help_url))
$this->help_url = ComponentbuilderHelper::getHelpUrl('admins_fields_conditions');
if (ComponentbuilderHelper::checkString($this->help_url))
{
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $this->help_url);
}
// add the options comp button

View File

@ -137,10 +137,10 @@ class ComponentbuilderViewAdmins_fields_relations extends JViewLegacy
}
// set help url for this view if found
$help_url = ComponentbuilderHelper::getHelpUrl('admins_fields_relations');
if (ComponentbuilderHelper::checkString($help_url))
$this->help_url = ComponentbuilderHelper::getHelpUrl('admins_fields_relations');
if (ComponentbuilderHelper::checkString($this->help_url))
{
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $this->help_url);
}
// add the options comp button

View File

@ -137,10 +137,10 @@ class ComponentbuilderViewClass_extendings extends JViewLegacy
}
// set help url for this view if found
$help_url = ComponentbuilderHelper::getHelpUrl('class_extendings');
if (ComponentbuilderHelper::checkString($help_url))
$this->help_url = ComponentbuilderHelper::getHelpUrl('class_extendings');
if (ComponentbuilderHelper::checkString($this->help_url))
{
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $this->help_url);
}
// add the options comp button

View File

@ -150,10 +150,10 @@ class ComponentbuilderViewClass_extends extends JViewLegacy
}
JToolbarHelper::divider();
// set help url for this view if found
$help_url = ComponentbuilderHelper::getHelpUrl('class_extends');
if (ComponentbuilderHelper::checkString($help_url))
$this->help_url = ComponentbuilderHelper::getHelpUrl('class_extends');
if (ComponentbuilderHelper::checkString($this->help_url))
{
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $this->help_url);
}
}

View File

@ -150,10 +150,10 @@ class ComponentbuilderViewClass_method extends JViewLegacy
}
JToolbarHelper::divider();
// set help url for this view if found
$help_url = ComponentbuilderHelper::getHelpUrl('class_method');
if (ComponentbuilderHelper::checkString($help_url))
$this->help_url = ComponentbuilderHelper::getHelpUrl('class_method');
if (ComponentbuilderHelper::checkString($this->help_url))
{
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $this->help_url);
}
}

View File

@ -147,10 +147,10 @@ class ComponentbuilderViewClass_methods extends JViewLegacy
}
// set help url for this view if found
$help_url = ComponentbuilderHelper::getHelpUrl('class_methods');
if (ComponentbuilderHelper::checkString($help_url))
$this->help_url = ComponentbuilderHelper::getHelpUrl('class_methods');
if (ComponentbuilderHelper::checkString($this->help_url))
{
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $this->help_url);
}
// add the options comp button

View File

@ -147,10 +147,10 @@ class ComponentbuilderViewClass_properties extends JViewLegacy
}
// set help url for this view if found
$help_url = ComponentbuilderHelper::getHelpUrl('class_properties');
if (ComponentbuilderHelper::checkString($help_url))
$this->help_url = ComponentbuilderHelper::getHelpUrl('class_properties');
if (ComponentbuilderHelper::checkString($this->help_url))
{
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $this->help_url);
}
// add the options comp button

View File

@ -150,10 +150,10 @@ class ComponentbuilderViewClass_property extends JViewLegacy
}
JToolbarHelper::divider();
// set help url for this view if found
$help_url = ComponentbuilderHelper::getHelpUrl('class_property');
if (ComponentbuilderHelper::checkString($help_url))
$this->help_url = ComponentbuilderHelper::getHelpUrl('class_property');
if (ComponentbuilderHelper::checkString($this->help_url))
{
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $this->help_url);
}
}

View File

@ -310,7 +310,7 @@ class ComponentbuilderViewCompiler extends JViewLegacy
jQuery.get(noticeboard)
.success(function(board) {
if (board.length > 5) {
jQuery(\".noticeboard-md\").html(marked(board));
jQuery(\".noticeboard-md\").html(marked.parse(board));
getIS(1,board).done(function(result) {
if (result){
jQuery(\".vdm-new-notice\").show();
@ -327,7 +327,7 @@ class ComponentbuilderViewCompiler extends JViewLegacy
jQuery.get(proboard)
.success(function(board) {
if (board.length > 5) {
jQuery(\".proboard-md\").html(marked(board));
jQuery(\".proboard-md\").html(marked.parse(board));
} else {
jQuery(\".proboard-md\").html(all_is_good);
}
@ -391,10 +391,10 @@ class ComponentbuilderViewCompiler extends JViewLegacy
}
// set help url for this view if found
$help_url = ComponentbuilderHelper::getHelpUrl('compiler');
if (ComponentbuilderHelper::checkString($help_url))
$this->help_url = ComponentbuilderHelper::getHelpUrl('compiler');
if (ComponentbuilderHelper::checkString($this->help_url))
{
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $this->help_url);
}
// add the options comp button

View File

@ -150,10 +150,10 @@ class ComponentbuilderViewComponent_admin_views extends JViewLegacy
}
JToolbarHelper::divider();
// set help url for this view if found
$help_url = ComponentbuilderHelper::getHelpUrl('component_admin_views');
if (ComponentbuilderHelper::checkString($help_url))
$this->help_url = ComponentbuilderHelper::getHelpUrl('component_admin_views');
if (ComponentbuilderHelper::checkString($this->help_url))
{
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $this->help_url);
}
}

View File

@ -150,10 +150,10 @@ class ComponentbuilderViewComponent_config extends JViewLegacy
}
JToolbarHelper::divider();
// set help url for this view if found
$help_url = ComponentbuilderHelper::getHelpUrl('component_config');
if (ComponentbuilderHelper::checkString($help_url))
$this->help_url = ComponentbuilderHelper::getHelpUrl('component_config');
if (ComponentbuilderHelper::checkString($this->help_url))
{
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $this->help_url);
}
}

View File

@ -150,10 +150,10 @@ class ComponentbuilderViewComponent_custom_admin_menus extends JViewLegacy
}
JToolbarHelper::divider();
// set help url for this view if found
$help_url = ComponentbuilderHelper::getHelpUrl('component_custom_admin_menus');
if (ComponentbuilderHelper::checkString($help_url))
$this->help_url = ComponentbuilderHelper::getHelpUrl('component_custom_admin_menus');
if (ComponentbuilderHelper::checkString($this->help_url))
{
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $this->help_url);
}
}

View File

@ -150,10 +150,10 @@ class ComponentbuilderViewComponent_custom_admin_views extends JViewLegacy
}
JToolbarHelper::divider();
// set help url for this view if found
$help_url = ComponentbuilderHelper::getHelpUrl('component_custom_admin_views');
if (ComponentbuilderHelper::checkString($help_url))
$this->help_url = ComponentbuilderHelper::getHelpUrl('component_custom_admin_views');
if (ComponentbuilderHelper::checkString($this->help_url))
{
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $this->help_url);
}
}

View File

@ -150,10 +150,10 @@ class ComponentbuilderViewComponent_dashboard extends JViewLegacy
}
JToolbarHelper::divider();
// set help url for this view if found
$help_url = ComponentbuilderHelper::getHelpUrl('component_dashboard');
if (ComponentbuilderHelper::checkString($help_url))
$this->help_url = ComponentbuilderHelper::getHelpUrl('component_dashboard');
if (ComponentbuilderHelper::checkString($this->help_url))
{
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $this->help_url);
}
}

Some files were not shown because too many files have changed in this diff Show More