diff --git a/README.md b/README.md index 096f091e6..9dc75a875 100644 --- a/README.md +++ b/README.md @@ -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.13.1) 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 (3.1.2) 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*: 11th June, 2022 -+ *Version*: 2.13.1 ++ *Last Build*: 9th July, 2022 ++ *Version*: 3.1.2 + *Copyright*: Copyright (C) 2015 Vast Development Method. All rights reserved. + *License*: GNU General Public License version 2 or later; see LICENSE.txt -+ *Line count*: **287256** -+ *Field count*: **1581** -+ *File count*: **1853** -+ *Folder count*: **261** ++ *Line count*: **312818** ++ *Field count*: **2002** ++ *File count*: **2049** ++ *Folder count*: **349** > 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) diff --git a/admin/README.txt b/admin/README.txt index 096f091e6..9dc75a875 100644 --- a/admin/README.txt +++ b/admin/README.txt @@ -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.13.1) 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 (3.1.2) 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*: 11th June, 2022 -+ *Version*: 2.13.1 ++ *Last Build*: 9th July, 2022 ++ *Version*: 3.1.2 + *Copyright*: Copyright (C) 2015 Vast Development Method. All rights reserved. + *License*: GNU General Public License version 2 or later; see LICENSE.txt -+ *Line count*: **287256** -+ *Field count*: **1581** -+ *File count*: **1853** -+ *Folder count*: **261** ++ *Line count*: **312818** ++ *Field count*: **2002** ++ *File count*: **2049** ++ *Folder count*: **349** > 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) diff --git a/admin/access.xml b/admin/access.xml index 7464de0f4..1e51d294b 100644 --- a/admin/access.xml +++ b/admin/access.xml @@ -274,6 +274,7 @@ + @@ -347,6 +348,7 @@ + @@ -357,6 +359,7 @@ + @@ -482,6 +485,19 @@ + + + + + + + + + + + + + @@ -578,6 +594,17 @@ +
+ + + + + + + + + +
diff --git a/admin/views/componentbuilder/tmpl/default_notice_board_jcb_pro_membership.php b/admin/assets/css/power.css similarity index 80% rename from admin/views/componentbuilder/tmpl/default_notice_board_jcb_pro_membership.php rename to admin/assets/css/power.css index b0225bb84..298820a33 100644 --- a/admin/views/componentbuilder/tmpl/default_notice_board_jcb_pro_membership.php +++ b/admin/assets/css/power.css @@ -1,4 +1,3 @@ - -proboard; ?> diff --git a/admin/views/componentbuilder/tmpl/default_releases_information.php b/admin/assets/css/powers.css similarity index 79% rename from admin/views/componentbuilder/tmpl/default_releases_information.php rename to admin/assets/css/powers.css index dce7097e3..298820a33 100644 --- a/admin/views/componentbuilder/tmpl/default_releases_information.php +++ b/admin/assets/css/powers.css @@ -1,4 +1,3 @@ - -github->tagreleases; ?> diff --git a/admin/assets/images/icons/field_add.png b/admin/assets/images/icons/field_add.png new file mode 100644 index 000000000..a207756a7 Binary files /dev/null and b/admin/assets/images/icons/field_add.png differ diff --git a/admin/assets/images/icons/powers.png b/admin/assets/images/icons/powers.png new file mode 100644 index 000000000..51d768c5f Binary files /dev/null and b/admin/assets/images/icons/powers.png differ diff --git a/admin/config.xml b/admin/config.xml index 2643f5541..97e710fa5 100644 --- a/admin/config.xml +++ b/admin/config.xml @@ -134,6 +134,22 @@ folder="editors" filter="cmd" /> + + + + diff --git a/admin/controller.php b/admin/controller.php index 8f0ae9839..a1c93c8c1 100644 --- a/admin/controller.php +++ b/admin/controller.php @@ -97,6 +97,7 @@ class ComponentbuilderController extends BaseController 'joomla_component' => 'joomla_components', 'joomla_module' => 'joomla_modules', 'joomla_plugin' => 'joomla_plugins', + 'power' => 'powers', 'admin_view' => 'admin_views', 'custom_admin_view' => 'custom_admin_views', 'site_view' => 'site_views', diff --git a/admin/controllers/ajax.json.php b/admin/controllers/ajax.json.php index 7e3b70406..f65f7e487 100644 --- a/admin/controllers/ajax.json.php +++ b/admin/controllers/ajax.json.php @@ -35,6 +35,7 @@ class ComponentbuilderControllerAjax extends BaseController $this->registerTask('isRead', 'ajax'); $this->registerTask('getComponentDetails', 'ajax'); $this->registerTask('getCronPath', 'ajax'); + $this->registerTask('getWiki', 'ajax'); $this->registerTask('getJCBpackageInfo', 'ajax'); $this->registerTask('getCrowdinDetails', 'ajax'); $this->registerTask('getModuleCode', 'ajax'); @@ -254,6 +255,47 @@ class ComponentbuilderControllerAjax extends BaseController } } break; + case 'getWiki': + try + { + $nameValue = $jinput->get('name', NULL, 'WORD'); + if($nameValue && $user->id != 0) + { + $result = $this->getModel('ajax')->getWiki($nameValue); + } + else + { + $result = false; + } + if($callback) + { + echo $callback . "(".json_encode($result).");"; + } + elseif($returnRaw) + { + echo json_encode($result); + } + else + { + echo "(".json_encode($result).");"; + } + } + catch(Exception $e) + { + if($callback) + { + echo $callback."(".json_encode($e).");"; + } + elseif($returnRaw) + { + echo json_encode($e); + } + else + { + echo "(".json_encode($e).");"; + } + } + break; case 'getJCBpackageInfo': try { diff --git a/admin/controllers/joomla_modules.php b/admin/controllers/joomla_modules.php index 51bcb45a4..aeda88cdc 100644 --- a/admin/controllers/joomla_modules.php +++ b/admin/controllers/joomla_modules.php @@ -45,6 +45,69 @@ class ComponentbuilderControllerJoomla_modules extends AdminController return parent::getModel($name, $prefix, $config); } + public function exportData() + { + // Check for request forgeries + JSession::checkToken() or die(JText::_('JINVALID_TOKEN')); + // check if export is allowed for this user. + $user = JFactory::getUser(); + if ($user->authorise('joomla_module.export', 'com_componentbuilder') && $user->authorise('core.export', 'com_componentbuilder')) + { + // Get the input + $input = JFactory::getApplication()->input; + $pks = $input->post->get('cid', array(), 'array'); + // Sanitize the input + $pks = ArrayHelper::toInteger($pks); + // Get the model + $model = $this->getModel('Joomla_modules'); + // get the data to export + $data = $model->getExportData($pks); + if (ComponentbuilderHelper::checkArray($data)) + { + // now set the data to the spreadsheet + $date = JFactory::getDate(); + ComponentbuilderHelper::xls($data,'Joomla_modules_'.$date->format('jS_F_Y'),'Joomla modules exported ('.$date->format('jS F, Y').')','joomla modules'); + } + } + // Redirect to the list screen with error. + $message = JText::_('COM_COMPONENTBUILDER_EXPORT_FAILED'); + $this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=joomla_modules', false), $message, 'error'); + return; + } + + + public function importData() + { + // Check for request forgeries + JSession::checkToken() or die(JText::_('JINVALID_TOKEN')); + // check if import is allowed for this user. + $user = JFactory::getUser(); + if ($user->authorise('joomla_module.import', 'com_componentbuilder') && $user->authorise('core.import', 'com_componentbuilder')) + { + // Get the import model + $model = $this->getModel('Joomla_modules'); + // get the headers to import + $headers = $model->getExImPortHeaders(); + if (ComponentbuilderHelper::checkObject($headers)) + { + // Load headers to session. + $session = JFactory::getSession(); + $headers = json_encode($headers); + $session->set('joomla_module_VDM_IMPORTHEADERS', $headers); + $session->set('backto_VDM_IMPORT', 'joomla_modules'); + $session->set('dataType_VDM_IMPORTINTO', 'joomla_module'); + // Redirect to import view. + $message = JText::_('COM_COMPONENTBUILDER_IMPORT_SELECT_FILE_FOR_JOOMLA_MODULES'); + $this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=import', false), $message); + return; + } + } + // Redirect to the list screen with error. + $message = JText::_('COM_COMPONENTBUILDER_IMPORT_FAILED'); + $this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=joomla_modules', false), $message, 'error'); + return; + } + public function getSnippets() { // Check for request forgeries diff --git a/admin/controllers/power.php b/admin/controllers/power.php new file mode 100644 index 000000000..c5d89c93c --- /dev/null +++ b/admin/controllers/power.php @@ -0,0 +1,325 @@ + + * @gitea Joomla Component Builder + * @github 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'); + +use Joomla\CMS\MVC\Controller\FormController; +use Joomla\Utilities\ArrayHelper; + +/** + * Power Form Controller + */ +class ComponentbuilderControllerPower extends FormController +{ + /** + * Current or most recently performed task. + * + * @var string + * @since 12.2 + * @note Replaces _task. + */ + protected $task; + + /** + * Class constructor. + * + * @param array $config A named array of configuration variables. + * + * @since 1.6 + */ + public function __construct($config = array()) + { + $this->view_list = 'Powers'; // safeguard for setting the return view listing to the main view. + parent::__construct($config); + } + + /** + * Method override to check if you can add a new record. + * + * @param array $data An array of input data. + * + * @return boolean + * + * @since 1.6 + */ + protected function allowAdd($data = array()) + { + // Get user object. + $user = JFactory::getUser(); + // Access check. + $access = $user->authorise('power.access', 'com_componentbuilder'); + if (!$access) + { + return false; + } + + // In the absense of better information, revert to the component permissions. + return $user->authorise('power.create', $this->option); + } + + /** + * Method override to check if you can edit an existing record. + * + * @param array $data An array of input data. + * @param string $key The name of the key for the primary key. + * + * @return boolean + * + * @since 1.6 + */ + protected function allowEdit($data = array(), $key = 'id') + { + // get user object. + $user = JFactory::getUser(); + // get record id. + $recordId = (int) isset($data[$key]) ? $data[$key] : 0; + + + // Access check. + $access = ($user->authorise('power.access', 'com_componentbuilder.power.' . (int) $recordId) && $user->authorise('power.access', 'com_componentbuilder')); + if (!$access) + { + return false; + } + + if ($recordId) + { + // The record has been set. Check the record permissions. + $permission = $user->authorise('power.edit', 'com_componentbuilder.power.' . (int) $recordId); + if (!$permission) + { + if ($user->authorise('power.edit.own', 'com_componentbuilder.power.' . $recordId)) + { + // Now test the owner is the user. + $ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0; + if (empty($ownerId)) + { + // Need to do a lookup from the model. + $record = $this->getModel()->getItem($recordId); + + if (empty($record)) + { + return false; + } + $ownerId = $record->created_by; + } + + // If the owner matches 'me' then allow. + if ($ownerId == $user->id) + { + if ($user->authorise('power.edit.own', 'com_componentbuilder')) + { + return true; + } + } + } + return false; + } + } + // Since there is no permission, revert to the component permissions. + return $user->authorise('power.edit', $this->option); + } + + /** + * Gets the URL arguments to append to an item redirect. + * + * @param integer $recordId The primary key id for the item. + * @param string $urlVar The name of the URL variable for the id. + * + * @return string The arguments to append to the redirect URL. + * + * @since 1.6 + */ + protected function getRedirectToItemAppend($recordId = null, $urlVar = 'id') + { + // get the referral options (old method use return instead see parent) + $ref = $this->input->get('ref', 0, 'string'); + $refid = $this->input->get('refid', 0, 'int'); + + // get redirect info. + $append = parent::getRedirectToItemAppend($recordId, $urlVar); + + // set the referral options + if ($refid && $ref) + { + $append = '&ref=' . (string)$ref . '&refid='. (int)$refid . $append; + } + elseif ($ref) + { + $append = '&ref='. (string)$ref . $append; + } + + return $append; + } + + /** + * Method to run batch operations. + * + * @param object $model The model. + * + * @return boolean True if successful, false otherwise and internal error is set. + * + * @since 2.5 + */ + public function batch($model = null) + { + JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN')); + + // Set the model + $model = $this->getModel('Power', '', array()); + + // Preset the redirect + $this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=powers' . $this->getRedirectToListAppend(), false)); + + return parent::batch($model); + } + + /** + * Method to cancel an edit. + * + * @param string $key The name of the primary key of the URL variable. + * + * @return boolean True if access level checks pass, false otherwise. + * + * @since 12.2 + */ + public function cancel($key = null) + { + // get the referral options + $this->ref = $this->input->get('ref', 0, 'word'); + $this->refid = $this->input->get('refid', 0, 'int'); + + // Check if there is a return value + $return = $this->input->get('return', null, 'base64'); + + $cancel = parent::cancel($key); + + if (!is_null($return) && JUri::isInternal(base64_decode($return))) + { + $redirect = base64_decode($return); + + // Redirect to the return value. + $this->setRedirect( + JRoute::_( + $redirect, false + ) + ); + } + elseif ($this->refid && $this->ref) + { + $redirect = '&view=' . (string)$this->ref . '&layout=edit&id=' . (int)$this->refid; + + // Redirect to the item screen. + $this->setRedirect( + JRoute::_( + 'index.php?option=' . $this->option . $redirect, false + ) + ); + } + elseif ($this->ref) + { + $redirect = '&view='.(string)$this->ref; + + // Redirect to the list screen. + $this->setRedirect( + JRoute::_( + 'index.php?option=' . $this->option . $redirect, false + ) + ); + } + return $cancel; + } + + /** + * Method to save a record. + * + * @param string $key The name of the primary key of the URL variable. + * @param string $urlVar The name of the URL variable if different from the primary key (sometimes required to avoid router collisions). + * + * @return boolean True if successful, false otherwise. + * + * @since 12.2 + */ + public function save($key = null, $urlVar = null) + { + // get the referral options + $this->ref = $this->input->get('ref', 0, 'word'); + $this->refid = $this->input->get('refid', 0, 'int'); + + // Check if there is a return value + $return = $this->input->get('return', null, 'base64'); + $canReturn = (!is_null($return) && JUri::isInternal(base64_decode($return))); + + if ($this->ref || $this->refid || $canReturn) + { + // to make sure the item is checkedin on redirect + $this->task = 'save'; + } + + $saved = parent::save($key, $urlVar); + + // This is not needed since parent save already does this + // Due to the ref and refid implementation we need to add this + if ($canReturn) + { + $redirect = base64_decode($return); + + // Redirect to the return value. + $this->setRedirect( + JRoute::_( + $redirect, false + ) + ); + } + elseif ($this->refid && $this->ref) + { + $redirect = '&view=' . (string)$this->ref . '&layout=edit&id=' . (int)$this->refid; + + // Redirect to the item screen. + $this->setRedirect( + JRoute::_( + 'index.php?option=' . $this->option . $redirect, false + ) + ); + } + elseif ($this->ref) + { + $redirect = '&view=' . (string)$this->ref; + + // Redirect to the list screen. + $this->setRedirect( + JRoute::_( + 'index.php?option=' . $this->option . $redirect, false + ) + ); + } + return $saved; + } + + /** + * Function that allows child controller access to model data + * after the data has been saved. + * + * @param JModel &$model The data model object. + * @param array $validData The validated data. + * + * @return void + * + * @since 11.1 + */ + protected function postSaveHook(JModelLegacy $model, $validData = array()) + { + return; + } + +} diff --git a/admin/controllers/powers.php b/admin/controllers/powers.php new file mode 100644 index 000000000..aea01a12b --- /dev/null +++ b/admin/controllers/powers.php @@ -0,0 +1,88 @@ + + * @gitea Joomla Component Builder + * @github 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'); + +use Joomla\CMS\MVC\Controller\AdminController; +use Joomla\Utilities\ArrayHelper; + +/** + * Powers Admin Controller + */ +class ComponentbuilderControllerPowers extends AdminController +{ + /** + * The prefix to use with controller messages. + * + * @var string + * @since 1.6 + */ + protected $text_prefix = 'COM_COMPONENTBUILDER_POWERS'; + + /** + * Method to get a model object, loading it if required. + * + * @param string $name The model name. Optional. + * @param string $prefix The class prefix. Optional. + * @param array $config Configuration array for model. Optional. + * + * @return JModelLegacy The model. + * + * @since 1.6 + */ + public function getModel($name = 'Power', $prefix = 'ComponentbuilderModel', $config = array('ignore_request' => true)) + { + return parent::getModel($name, $prefix, $config); + } + + + /** + * Run the Expansion + * + * @return void + */ + public function runExpansion() + { + // Check for request forgeries + JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN')); + // check if user has the right + $user = JFactory::getUser(); + // set page redirect + $redirect_url = JRoute::_('index.php?option=com_componentbuilder&view=powers', false); + // set massage + $message = JText::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RUN_THE_EXPANSION_MODULE'); + // check if this user has the right to run expansion + if($user->authorise('powers.run_expansion', 'com_componentbuilder')) + { + // set massage + $message = JText::_('COM_COMPONENTBUILDER_EXPANSION_FAILED_PLEASE_CHECK_YOUR_SETTINGS_IN_THE_GLOBAL_OPTIONS_OF_JCB_UNDER_THE_DEVELOPMENT_METHOD_TAB'); + // run expansion via API + $result = ComponentbuilderHelper::getFileContents(JURI::root() . 'index.php?option=com_componentbuilder&task=api.expand'); + // is there a message returned + if (!is_numeric($result) && ComponentbuilderHelper::checkString($result)) + { + $this->setRedirect($redirect_url, $result); + return true; + } + elseif (is_numeric($result) && 1 == $result) + { + $message = JText::_('COM_COMPONENTBUILDER_BTHE_EXPANSION_WAS_SUCCESSFULLYB_TO_SEE_MORE_INFORMATION_CHANGE_THE_BRETURN_OPTIONS_FOR_BUILDB_TO_BDISPLAY_MESSAGEB_IN_THE_GLOBAL_OPTIONS_OF_JCB_UNDER_THE_DEVELOPMENT_METHOD_TABB'); + $this->setRedirect($redirect_url, $message, 'message'); + return true; + } + } + $this->setRedirect($redirect_url, $message, 'error'); + return false; + } + +} diff --git a/admin/helpers/compiler/e_Interpretation.php b/admin/helpers/compiler/e_Interpretation.php index 10cb11d62..710054f9f 100644 --- a/admin/helpers/compiler/e_Interpretation.php +++ b/admin/helpers/compiler/e_Interpretation.php @@ -29128,32 +29128,33 @@ function vdm_dkim() { { // check if we are using a plugin $use_plugin = isset($this->fileContentStatic[$this->hhh . 'PLUGIN_POWER_AUTOLOADER' . $this->hhh]); - // build the helper method - $helperMethod = array(); + // build the methods + $autoloadNotSiteMethod = array(); + $autoloadMethod = array(); // add only if we are not using a plugin $tab_space = 2; if (!$use_plugin) { - $helperMethod[] = PHP_EOL . PHP_EOL; + $autoloadNotSiteMethod[] = PHP_EOL . PHP_EOL; $tab_space = 0; } elseif (!$loadSite) { // we add code to prevent this plugin from triggering on the site area - $helperMethod[] = PHP_EOL . $this->_t(2) . '//' + $autoloadNotSiteMethod[] = PHP_EOL . $this->_t(2) . '//' . $this->setLine(__LINE__) . ' do not run the autoloader in the site area'; - $helperMethod[] = $this->_t(2) . 'if ($this->app->isClient(\'site\'))'; - $helperMethod[] = $this->_t(2) . '{'; - $helperMethod[] = $this->_t(3) . 'return;'; - $helperMethod[] = $this->_t(2) . '}' . PHP_EOL; + $autoloadNotSiteMethod[] = $this->_t(2) . 'if ($this->app->isClient(\'site\'))'; + $autoloadNotSiteMethod[] = $this->_t(2) . '{'; + $autoloadNotSiteMethod[] = $this->_t(3) . 'return;'; + $autoloadNotSiteMethod[] = $this->_t(2) . '}' . PHP_EOL; } // we start building the spl_autoload_register function call - $helperMethod[] = $this->_t($tab_space) . '//' + $autoloadMethod[] = $this->_t($tab_space) . '//' . $this->setLine(__LINE__) . ' register this component namespace'; - $helperMethod[] = $this->_t($tab_space) . 'spl_autoload_register(function ($class) {'; - $helperMethod[] = $this->_t($tab_space) . $this->_t(1) . '//' + $autoloadMethod[] = $this->_t($tab_space) . 'spl_autoload_register(function ($class) {'; + $autoloadMethod[] = $this->_t($tab_space) . $this->_t(1) . '//' . $this->setLine(__LINE__) . ' project-specific base directories and namespace prefix'; - $helperMethod[] = $this->_t($tab_space) . $this->_t(1) . '$search = array('; + $autoloadMethod[] = $this->_t($tab_space) . $this->_t(1) . '$search = array('; // ==== IMPORTANT NOTICE ===== // make sure the name space values are sorted from the longest string to the shortest // so that the search do not mistakenly match a shorter namespace before a longer one @@ -29175,74 +29176,78 @@ function vdm_dkim() { // don't add the ending comma on last value if ($size == $counter) { - $helperMethod[] = $this->_t($tab_space) . $this->_t(2) . "'$this->jcbPowersPath/$base_dir' => '" . implode('\\\\', $prefix) . "'"; + $autoloadMethod[] = $this->_t($tab_space) . $this->_t(2) . "'$this->jcbPowersPath/$base_dir' => '" . implode('\\\\', $prefix) . "'"; } else { - $helperMethod[] = $this->_t($tab_space) . $this->_t(2) . "'$this->jcbPowersPath/$base_dir' => '" . implode('\\\\', $prefix) . "',"; + $autoloadMethod[] = $this->_t($tab_space) . $this->_t(2) . "'$this->jcbPowersPath/$base_dir' => '" . implode('\\\\', $prefix) . "',"; } $counter++; } - $helperMethod[] = $this->_t($tab_space) . $this->_t(1) . ');'; - $helperMethod[] = $this->_t($tab_space) . $this->_t(1) . '// Start the search and load if found'; - $helperMethod[] = $this->_t($tab_space) . $this->_t(1) . '$found = false;'; - $helperMethod[] = $this->_t($tab_space) . $this->_t(1) . '$found_base_dir = "";'; - $helperMethod[] = $this->_t($tab_space) . $this->_t(1) . '$found_len = 0;'; - $helperMethod[] = $this->_t($tab_space) . $this->_t(1) . 'foreach ($search as $base_dir => $prefix)'; - $helperMethod[] = $this->_t($tab_space) . $this->_t(1) . '{'; - $helperMethod[] = $this->_t($tab_space) . $this->_t(2) . '//' + $autoloadMethod[] = $this->_t($tab_space) . $this->_t(1) . ');'; + $autoloadMethod[] = $this->_t($tab_space) . $this->_t(1) . '// Start the search and load if found'; + $autoloadMethod[] = $this->_t($tab_space) . $this->_t(1) . '$found = false;'; + $autoloadMethod[] = $this->_t($tab_space) . $this->_t(1) . '$found_base_dir = "";'; + $autoloadMethod[] = $this->_t($tab_space) . $this->_t(1) . '$found_len = 0;'; + $autoloadMethod[] = $this->_t($tab_space) . $this->_t(1) . 'foreach ($search as $base_dir => $prefix)'; + $autoloadMethod[] = $this->_t($tab_space) . $this->_t(1) . '{'; + $autoloadMethod[] = $this->_t($tab_space) . $this->_t(2) . '//' . $this->setLine(__LINE__) . ' does the class use the namespace prefix?'; - $helperMethod[] = $this->_t($tab_space) . $this->_t(2) . '$len = strlen($prefix);'; - $helperMethod[] = $this->_t($tab_space) . $this->_t(2) . 'if (strncmp($prefix, $class, $len) === 0)'; - $helperMethod[] = $this->_t($tab_space) . $this->_t(2) . '{'; - $helperMethod[] = $this->_t($tab_space) . $this->_t(3) . '//' + $autoloadMethod[] = $this->_t($tab_space) . $this->_t(2) . '$len = strlen($prefix);'; + $autoloadMethod[] = $this->_t($tab_space) . $this->_t(2) . 'if (strncmp($prefix, $class, $len) === 0)'; + $autoloadMethod[] = $this->_t($tab_space) . $this->_t(2) . '{'; + $autoloadMethod[] = $this->_t($tab_space) . $this->_t(3) . '//' . $this->setLine(__LINE__) . ' we have a match so load the values'; - $helperMethod[] = $this->_t($tab_space) . $this->_t(3) . '$found = true;'; - $helperMethod[] = $this->_t($tab_space) . $this->_t(3) . '$found_base_dir = $base_dir;'; - $helperMethod[] = $this->_t($tab_space) . $this->_t(3) . '$found_len = $len;'; - $helperMethod[] = $this->_t($tab_space) . $this->_t(3) . '//' + $autoloadMethod[] = $this->_t($tab_space) . $this->_t(3) . '$found = true;'; + $autoloadMethod[] = $this->_t($tab_space) . $this->_t(3) . '$found_base_dir = $base_dir;'; + $autoloadMethod[] = $this->_t($tab_space) . $this->_t(3) . '$found_len = $len;'; + $autoloadMethod[] = $this->_t($tab_space) . $this->_t(3) . '//' . $this->setLine(__LINE__) . ' done here'; - $helperMethod[] = $this->_t($tab_space) . $this->_t(3) . 'break;'; - $helperMethod[] = $this->_t($tab_space) . $this->_t(2) . '}'; - $helperMethod[] = $this->_t($tab_space) . $this->_t(1) . '}'; - $helperMethod[] = $this->_t($tab_space) . $this->_t(1) . '//' + $autoloadMethod[] = $this->_t($tab_space) . $this->_t(3) . 'break;'; + $autoloadMethod[] = $this->_t($tab_space) . $this->_t(2) . '}'; + $autoloadMethod[] = $this->_t($tab_space) . $this->_t(1) . '}'; + $autoloadMethod[] = $this->_t($tab_space) . $this->_t(1) . '//' . $this->setLine(__LINE__) . ' check if we found a match'; - $helperMethod[] = $this->_t($tab_space) . $this->_t(1) . 'if (!$found)'; - $helperMethod[] = $this->_t($tab_space) . $this->_t(1) . '{'; - $helperMethod[] = $this->_t($tab_space) . $this->_t(2) . '//' + $autoloadMethod[] = $this->_t($tab_space) . $this->_t(1) . 'if (!$found)'; + $autoloadMethod[] = $this->_t($tab_space) . $this->_t(1) . '{'; + $autoloadMethod[] = $this->_t($tab_space) . $this->_t(2) . '//' . $this->setLine(__LINE__) . ' no, move to the next registered autoloader'; - $helperMethod[] = $this->_t($tab_space) . $this->_t(2) . 'return;'; - $helperMethod[] = $this->_t($tab_space) . $this->_t(1) . '}'; - $helperMethod[] = $this->_t($tab_space) . $this->_t(1) . '//' + $autoloadMethod[] = $this->_t($tab_space) . $this->_t(2) . 'return;'; + $autoloadMethod[] = $this->_t($tab_space) . $this->_t(1) . '}'; + $autoloadMethod[] = $this->_t($tab_space) . $this->_t(1) . '//' . $this->setLine(__LINE__) . ' get the relative class name'; - $helperMethod[] = $this->_t($tab_space) . $this->_t(1) . '$relative_class = substr($class, $found_len);'; - $helperMethod[] = $this->_t($tab_space) . $this->_t(1) . '//' + $autoloadMethod[] = $this->_t($tab_space) . $this->_t(1) . '$relative_class = substr($class, $found_len);'; + $autoloadMethod[] = $this->_t($tab_space) . $this->_t(1) . '//' . $this->setLine(__LINE__) . ' replace the namespace prefix with the base directory, replace namespace'; - $helperMethod[] = $this->_t($tab_space) . $this->_t(1) . '// separators with directory separators in the relative class name, append'; - $helperMethod[] = $this->_t($tab_space) . $this->_t(1) . '// with .php'; - $helperMethod[] = $this->_t($tab_space) . $this->_t(1) . "\$file = JPATH_ROOT . '/' . \$found_base_dir . '/src' . str_replace('\\\\', '/', \$relative_class) . '.php';"; - $helperMethod[] = $this->_t($tab_space) . $this->_t(1) . '//' + $autoloadMethod[] = $this->_t($tab_space) . $this->_t(1) . '// separators with directory separators in the relative class name, append'; + $autoloadMethod[] = $this->_t($tab_space) . $this->_t(1) . '// with .php'; + $autoloadMethod[] = $this->_t($tab_space) . $this->_t(1) . "\$file = JPATH_ROOT . '/' . \$found_base_dir . '/src' . str_replace('\\\\', '/', \$relative_class) . '.php';"; + $autoloadMethod[] = $this->_t($tab_space) . $this->_t(1) . '//' . $this->setLine(__LINE__) . ' if the file exists, require it'; - $helperMethod[] = $this->_t($tab_space) . $this->_t(1) . 'if (file_exists($file))'; - $helperMethod[] = $this->_t($tab_space) . $this->_t(1) . '{'; - $helperMethod[] = $this->_t($tab_space) . $this->_t(2) . 'require $file;'; - $helperMethod[] = $this->_t($tab_space) . $this->_t(1) . '}'; - $helperMethod[] = $this->_t($tab_space) . '});'; + $autoloadMethod[] = $this->_t($tab_space) . $this->_t(1) . 'if (file_exists($file))'; + $autoloadMethod[] = $this->_t($tab_space) . $this->_t(1) . '{'; + $autoloadMethod[] = $this->_t($tab_space) . $this->_t(2) . 'require $file;'; + $autoloadMethod[] = $this->_t($tab_space) . $this->_t(1) . '}'; + $autoloadMethod[] = $this->_t($tab_space) . '});'; + // create the method string + $autoloader = implode(PHP_EOL, $autoloadNotSiteMethod) . implode(PHP_EOL, $autoloadMethod); // check if we are using a plugin if ($use_plugin) { - $this->fileContentStatic[$this->hhh . 'PLUGIN_POWER_AUTOLOADER' . $this->hhh] = PHP_EOL . implode(PHP_EOL, $helperMethod); + $this->fileContentStatic[$this->hhh . 'PLUGIN_POWER_AUTOLOADER' . $this->hhh] = PHP_EOL . $autoloader; } else { // load to events placeholders - $this->fileContentStatic[$this->hhh . 'ADMIN_POWER_HELPER' . $this->hhh] .= implode(PHP_EOL, $helperMethod); + $this->fileContentStatic[$this->hhh . 'ADMIN_POWER_HELPER' . $this->hhh] .= $autoloader; // load to site if needed if ($loadSite) { - $this->fileContentStatic[$this->hhh . 'SITE_POWER_HELPER' . $this->hhh] .= implode(PHP_EOL, $helperMethod); + $this->fileContentStatic[$this->hhh . 'SITE_POWER_HELPER' . $this->hhh] .= $autoloader; } } + // to add to custom files + $this->fileContentStatic[$this->hhh . 'CUSTOM_POWER_AUTOLOADER' . $this->hhh] .= PHP_EOL . implode(PHP_EOL, $autoloadMethod); } } diff --git a/admin/helpers/compiler/f_Infusion.php b/admin/helpers/compiler/f_Infusion.php index 2354ad3f9..88d2b1996 100644 --- a/admin/helpers/compiler/f_Infusion.php +++ b/admin/helpers/compiler/f_Infusion.php @@ -2316,6 +2316,7 @@ class Infusion extends Interpretation // remove all the power placeholders $this->fileContentStatic[$this->hhh . 'ADMIN_POWER_HELPER' . $this->hhh] = ''; $this->fileContentStatic[$this->hhh . 'SITE_POWER_HELPER' . $this->hhh] = ''; + $this->fileContentStatic[$this->hhh . 'CUSTOM_POWER_AUTOLOADER' . $this->hhh] = ''; // infuse powers data if set if (ArrayHelper::check($this->powers)) { diff --git a/admin/helpers/componentbuilder.php b/admin/helpers/componentbuilder.php index 06ecf63b5..89fea2180 100644 --- a/admin/helpers/componentbuilder.php +++ b/admin/helpers/componentbuilder.php @@ -13,12 +13,12 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); - // register this component namespace spl_autoload_register(function ($class) { // project-specific base directories and namespace prefix $search = array( - 'libraries/jcb_powers/VDM.Joomla' => 'VDM\\Joomla' + 'libraries/jcb_powers/VDM.Joomla' => 'VDM\\Joomla', + 'libraries/jcb_powers/VDM.Gitea' => 'VDM\\Gitea' ); // Start the search and load if found $found = false; @@ -3524,13 +3524,13 @@ abstract class ComponentbuilderHelper 'accesslevel', 'cachehandler', 'calendar', 'captcha', 'category', 'checkbox', 'checkboxes', 'chromestyle', 'color', 'combo', 'componentlayout', 'contentlanguage', 'contenttype', 'databaseconnection', 'components', 'editor', 'editors', 'email', 'file', 'file', 'filelist', 'folderlist', 'groupedlist', 'headertag', 'helpsite', 'hidden', 'imagelist', - 'integer', 'language', 'list', 'media', 'menu', 'menuitem', 'meter', 'modulelayout', 'moduleorder', 'moduleposition', + 'integer', 'language', 'list', 'media', 'menu', 'modal_menu', 'menuitem', 'meter', 'modulelayout', 'moduleorder', 'moduleposition', 'moduletag', 'note', 'number', 'password', 'plugins', 'predefinedlist', 'radio', 'range', 'repeatable', 'rules', 'sessionhandler', 'spacer', 'sql', 'subform', 'tag', 'tel', 'templatestyle', 'text', 'textarea', 'timezone', 'url', 'user', 'usergroup' ), 'plain' => array( 'cachehandler', 'calendar', 'checkbox', 'chromestyle', 'color', 'componentlayout', 'contenttype', 'editor', 'editors', 'captcha', - 'email', 'file', 'headertag', 'helpsite', 'hidden', 'integer', 'language', 'media', 'menu', 'menuitem', 'meter', 'modulelayout', 'templatestyle', + 'email', 'file', 'headertag', 'helpsite', 'hidden', 'integer', 'language', 'media', 'menu', 'modal_menu', 'menuitem', 'meter', 'modulelayout', 'templatestyle', 'moduleorder', 'moduletag', 'number', 'password', 'range', 'rules', 'tag', 'tel', 'text', 'textarea', 'timezone', 'url', 'user', 'usergroup' ), 'option' => array( @@ -6327,6 +6327,10 @@ abstract class ComponentbuilderHelper { JHtmlSidebar::addEntry(JText::_('COM_COMPONENTBUILDER_SUBMENU_JOOMLA_PLUGINS'), 'index.php?option=com_componentbuilder&view=joomla_plugins', $submenu === 'joomla_plugins'); } + if ($user->authorise('power.access', 'com_componentbuilder') && $user->authorise('power.submenu', 'com_componentbuilder')) + { + JHtmlSidebar::addEntry(JText::_('COM_COMPONENTBUILDER_SUBMENU_POWERS'), 'index.php?option=com_componentbuilder&view=powers', $submenu === 'powers'); + } if ($user->authorise('admin_view.access', 'com_componentbuilder') && $user->authorise('admin_view.submenu', 'com_componentbuilder')) { JHtmlSidebar::addEntry(JText::_('COM_COMPONENTBUILDER_SUBMENU_ADMIN_VIEWS'), 'index.php?option=com_componentbuilder&view=admin_views', $submenu === 'admin_views'); diff --git a/admin/language/en-GB/en-GB.com_componentbuilder.ini b/admin/language/en-GB/en-GB.com_componentbuilder.ini index a9e73f7b0..d2a91744a 100644 --- a/admin/language/en-GB/en-GB.com_componentbuilder.ini +++ b/admin/language/en-GB/en-GB.com_componentbuilder.ini @@ -1317,8 +1317,6 @@ COM_COMPONENTBUILDER_AUTHOR_NAME="Author Name" COM_COMPONENTBUILDER_AUTHOR_WEBSITE="Author Website" COM_COMPONENTBUILDER_AUTO_CHECKIN="Auto Check-in" COM_COMPONENTBUILDER_AVAILABLE_LIBRARIES="Available Libraries" -COM_COMPONENTBUILDER_A_FEW_CLOSED_ISSUES_FROM_GITHUB_IS_LOADING="A few closed issues from Github is loading" -COM_COMPONENTBUILDER_A_FEW_OPEN_ISSUES_FROM_GITHUB_IS_LOADING="A few open issues from Github is loading" COM_COMPONENTBUILDER_A_S_SPAN_CLASSICONFLAG_SPANREPORT_BROKEN_PACKAGEA=" Report Broken Package" COM_COMPONENTBUILDER_BACK="Back" COM_COMPONENTBUILDER_BACKUP="Backup" @@ -3487,6 +3485,9 @@ COM_COMPONENTBUILDER_CONFIG_FORCE_LOAD="Force" COM_COMPONENTBUILDER_CONFIG_FROMNAME_DESCRIPTION="Text displayed in the header "From:" field when sending a site email. Usually the site name." COM_COMPONENTBUILDER_CONFIG_FROMNAME_HINT="From Name Here" COM_COMPONENTBUILDER_CONFIG_FROMNAME_LABEL="From Name" +COM_COMPONENTBUILDER_CONFIG_GITEA_TOKEN_DESCRIPTION="To get updates, add your access token from VDM here." +COM_COMPONENTBUILDER_CONFIG_GITEA_TOKEN_HINT="API Access Tokens" +COM_COMPONENTBUILDER_CONFIG_GITEA_TOKEN_LABEL="VDM Access Token
Get token from VDM." COM_COMPONENTBUILDER_CONFIG_GITHUB_ACCESS_TOKEN_DESCRIPTION="This is only needed when you are on a shared IP or/and have reached the public free limit of API queries to gitHub. So unless you have seen some kind of error that directed you here to add an access token you can just ignore this field." COM_COMPONENTBUILDER_CONFIG_GITHUB_ACCESS_TOKEN_HINT="OAUTH-TOKEN" COM_COMPONENTBUILDER_CONFIG_GITHUB_ACCESS_TOKEN_LABEL="gitHub Access Token
Check https://developer.github.com/v3/#authentication for more info." @@ -3508,6 +3509,10 @@ COM_COMPONENTBUILDER_CONFIG_JCB_COMMUNITY_PACKAGES="JCB Community Packages" COM_COMPONENTBUILDER_CONFIG_JCB_PACKAGES="JCB Packages" COM_COMPONENTBUILDER_CONFIG_JCB_PACKAGE_DIRECTORIES_DESCRIPTION="Here you can manage what package directories show in the JCB package import area." COM_COMPONENTBUILDER_CONFIG_JCB_PACKAGE_DIRECTORIES_LABEL="Directories" +COM_COMPONENTBUILDER_CONFIG_JCB_POWERS_PATH_DESCRIPTION="Here you can set the path to the powers folder. Recommended that you always place it inside the libraries. You don't need to add a full path here, so libraries/jcb_powers will mean /home/username/public_html/libraries/jcb_powers when installed. You should always use two folders here, libraries + one more for example:
libraries/jcb_powers" +COM_COMPONENTBUILDER_CONFIG_JCB_POWERS_PATH_HINT="libraries/jcb_powers" +COM_COMPONENTBUILDER_CONFIG_JCB_POWERS_PATH_LABEL="JCB Powers Path
example: libraries/jcb_powers" +COM_COMPONENTBUILDER_CONFIG_JCB_POWERS_PATH_MESSAGE="Error! Please add folder path here." COM_COMPONENTBUILDER_CONFIG_JOOMLA_MODULE_UPDATES_VERSION_UPDATE="Joomla Module Updates (version_update)" COM_COMPONENTBUILDER_CONFIG_JOOMLA_PLUGIN_UPDATES_VERSION_UPDATE="Joomla Plugin Updates (version_update)" COM_COMPONENTBUILDER_CONFIG_LANGUAGE_LABEL="Language" @@ -4362,6 +4367,7 @@ COM_COMPONENTBUILDER_DASHBOARD_FIELDS="Fields

" COM_COMPONENTBUILDER_DASHBOARD_FIELDS_CATID="Categories For
Fields" COM_COMPONENTBUILDER_DASHBOARD_FIELDTYPES="Fieldtypes

" COM_COMPONENTBUILDER_DASHBOARD_FIELDTYPES_CATID="Categories For
Fieldtypes" +COM_COMPONENTBUILDER_DASHBOARD_FIELD_ADD="Add Field

" COM_COMPONENTBUILDER_DASHBOARD_GET_SNIPPETS="Get Snippets

" COM_COMPONENTBUILDER_DASHBOARD_HELP_DOCUMENTS="Help Documents

" COM_COMPONENTBUILDER_DASHBOARD_IMPORTJCBPACKAGES="Import JCB Packages

" @@ -4373,6 +4379,7 @@ COM_COMPONENTBUILDER_DASHBOARD_LAYOUTS="Layouts

" COM_COMPONENTBUILDER_DASHBOARD_LIBRARIES="Libraries

" COM_COMPONENTBUILDER_DASHBOARD_LIST_OF_RECORDS="Dashboard (list of records)" COM_COMPONENTBUILDER_DASHBOARD_PLACEHOLDERS="Placeholders

" +COM_COMPONENTBUILDER_DASHBOARD_POWERS="Powers

" COM_COMPONENTBUILDER_DASHBOARD_SERVERS="Servers

" COM_COMPONENTBUILDER_DASHBOARD_SITE_VIEWS="Site Views

" COM_COMPONENTBUILDER_DASHBOARD_SITE_VIEW_ADD="Add Site View

" @@ -4391,7 +4398,7 @@ COM_COMPONENTBUILDER_DISPLAY_SWITCH_FOR_DYNAMIC_PLACEMENT_IN_RELATION_TO_THE_USE COM_COMPONENTBUILDER_DIVERGED="Diverged" COM_COMPONENTBUILDER_DIVERGED_MEANS_YOUR_BLOCAL_SNIPPETB_WITH_THE_SAME_NAME_LIBRARY_AND_TYPE_HAS_A_BDIVERGEDB_FROM_THE_COMMUNITY_SNIPPET_WITH_THE_SAME_NAME_LIBRARY_AND_TYPE_IN_THAT_IT_DOES_NOT_HAVE_THE_SAME_BCREATIONB_OR_BMODIFIED_DATEB="Diverged means your local snippet (with the same name, library and type) has a diverged from the community snippet (with the same name, library and type) in that it does not have the same creation or modified date." COM_COMPONENTBUILDER_DOES_THIS_PACKAGE_REQUIRE_A_KEY_TO_INSTALL="Does this package require a key to install." -COM_COMPONENTBUILDER_DOWNLOAD="download" +COM_COMPONENTBUILDER_DOWNLOAD_UPDATE="Download Update" COM_COMPONENTBUILDER_DO_NOT_ADD="Do not add" COM_COMPONENTBUILDER_DTCOMPANYDTDDSDD="
Company
%s
" COM_COMPONENTBUILDER_DTCOPYRIGHTDTDDSDD="
Copyright
%s
" @@ -4734,6 +4741,7 @@ COM_COMPONENTBUILDER_EXPORT_DATA_DESC="Allows users in this group to export data COM_COMPONENTBUILDER_EXPORT_FAILED="Export Failed" COM_COMPONENTBUILDER_EXPORT_FAILED_PLEASE_TRY_AGAIN_LATTER="Export failed, please try again latter!" COM_COMPONENTBUILDER_EXPORT_JCB_PACKAGES="Export JCB Packages" +COM_COMPONENTBUILDER_EXTENDS="Extends" COM_COMPONENTBUILDER_EXTRA_PROPERTIES_LIKE_LISTCLASS_ESCAPE_DISPLAY_VALIDATEBR_SMALLHERE_YOU_CAN_SET_THE_EXTRA_PROPERTIES_FOR_THIS_FIELDSMALL="Extra properties like (listclass, escape, display, validate)
Here you can set the extra properties for this field" COM_COMPONENTBUILDER_FADE_IN="Fade In" COM_COMPONENTBUILDER_FIELD="Field" @@ -4746,6 +4754,8 @@ COM_COMPONENTBUILDER_FIELDS_BATCH_USE="Fields Batch Use" COM_COMPONENTBUILDER_FIELDS_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch fields" COM_COMPONENTBUILDER_FIELDS_CREATE="Fields Create" COM_COMPONENTBUILDER_FIELDS_CREATE_DESC="Allows the users in this group to create create fields" +COM_COMPONENTBUILDER_FIELDS_DASHBOARD_ADD="Fields Dashboard Add" +COM_COMPONENTBUILDER_FIELDS_DASHBOARD_ADD_DESC="Allows the users in this group to dashboard add of field" COM_COMPONENTBUILDER_FIELDS_DASHBOARD_LIST="Fields Dashboard List" COM_COMPONENTBUILDER_FIELDS_DASHBOARD_LIST_DESC="Allows the users in this group to dashboard list of field" COM_COMPONENTBUILDER_FIELDS_DELETE="Fields Delete" @@ -5251,6 +5261,8 @@ COM_COMPONENTBUILDER_FILTER_MODELING_METHOD_ASCENDING="Modeling Method ascending COM_COMPONENTBUILDER_FILTER_MODELING_METHOD_DESCENDING="Modeling Method descending" COM_COMPONENTBUILDER_FILTER_MODIFIED_DATE_ASCENDING="Modified Date ascending" COM_COMPONENTBUILDER_FILTER_MODIFIED_DATE_DESCENDING="Modified Date descending" +COM_COMPONENTBUILDER_FILTER_NAMESPACE_ASCENDING="Namespace ascending" +COM_COMPONENTBUILDER_FILTER_NAMESPACE_DESCENDING="Namespace descending" COM_COMPONENTBUILDER_FILTER_NAME_ASCENDING="Name ascending" COM_COMPONENTBUILDER_FILTER_NAME_DESCENDING="Name descending" COM_COMPONENTBUILDER_FILTER_NAME_IN_CODE_NAMING_CONVENTIONS_ASCENDING="Name in Code @@ -5307,6 +5319,7 @@ COM_COMPONENTBUILDER_FILTER_PUBLISHED_LIBRARIES="Status options for libraries" COM_COMPONENTBUILDER_FILTER_PUBLISHED_LIBRARIES_CONFIG="Status options for libraries config" COM_COMPONENTBUILDER_FILTER_PUBLISHED_LIBRARIES_FILES_FOLDERS_URLS="Status options for libraries files folders urls" COM_COMPONENTBUILDER_FILTER_PUBLISHED_PLACEHOLDERS="Status options for placeholders" +COM_COMPONENTBUILDER_FILTER_PUBLISHED_POWERS="Status options for powers" COM_COMPONENTBUILDER_FILTER_PUBLISHED_SERVERS="Status options for servers" COM_COMPONENTBUILDER_FILTER_PUBLISHED_SITE_VIEWS="Status options for site views" COM_COMPONENTBUILDER_FILTER_PUBLISHED_SNIPPETS="Status options for snippets" @@ -5355,6 +5368,7 @@ COM_COMPONENTBUILDER_FILTER_SEARCH_LIBRARIES="Search the library items. Prefix w COM_COMPONENTBUILDER_FILTER_SEARCH_LIBRARIES_CONFIG="Search the library config items. Prefix with ID: to search for an item by ID." COM_COMPONENTBUILDER_FILTER_SEARCH_LIBRARIES_FILES_FOLDERS_URLS="Search the library files folders urls items. Prefix with ID: to search for an item by ID." COM_COMPONENTBUILDER_FILTER_SEARCH_PLACEHOLDERS="Search the placeholder items. Prefix with ID: to search for an item by ID." +COM_COMPONENTBUILDER_FILTER_SEARCH_POWERS="Search the power items. Prefix with ID: to search for an item by ID." COM_COMPONENTBUILDER_FILTER_SEARCH_SERVERS="Search the server items. Prefix with ID: to search for an item by ID." COM_COMPONENTBUILDER_FILTER_SEARCH_SITE_VIEWS="Search the site view items. Prefix with ID: to search for an item by ID." COM_COMPONENTBUILDER_FILTER_SEARCH_SNIPPETS="Search the snippet items. Prefix with ID: to search for an item by ID." @@ -5396,6 +5410,8 @@ COM_COMPONENTBUILDER_FILTER_SELECT_TARGET_AREA="Select Target Area" COM_COMPONENTBUILDER_FILTER_SELECT_TARGET_FOLDER="Select Target Folder" COM_COMPONENTBUILDER_FILTER_SELECT_TYPE="Select Type" COM_COMPONENTBUILDER_FILTER_SELECT_TYPE_BEHAVIOR="Select Type Behavior" +COM_COMPONENTBUILDER_FILTER_SELECT_TYPE_OF_POWER="Select Type of Power" +COM_COMPONENTBUILDER_FILTER_SELECT_VERSION="Select Version" COM_COMPONENTBUILDER_FILTER_SELECT_VISIBILITY="Select Visibility" COM_COMPONENTBUILDER_FILTER_SET_STRING_VALUE_ASCENDING="Set String Value ascending" COM_COMPONENTBUILDER_FILTER_SET_STRING_VALUE_DESCENDING="Set String Value descending" @@ -5419,8 +5435,12 @@ COM_COMPONENTBUILDER_FILTER_TYPE_ASCENDING="Type ascending" COM_COMPONENTBUILDER_FILTER_TYPE_BEHAVIOR_ASCENDING="Type Behavior ascending" COM_COMPONENTBUILDER_FILTER_TYPE_BEHAVIOR_DESCENDING="Type Behavior descending" COM_COMPONENTBUILDER_FILTER_TYPE_DESCENDING="Type descending" +COM_COMPONENTBUILDER_FILTER_TYPE_OF_POWER_ASCENDING="Type of Power ascending" +COM_COMPONENTBUILDER_FILTER_TYPE_OF_POWER_DESCENDING="Type of Power descending" COM_COMPONENTBUILDER_FILTER_URL_ASCENDING="URL ascending" COM_COMPONENTBUILDER_FILTER_URL_DESCENDING="URL descending" +COM_COMPONENTBUILDER_FILTER_VERSION_ASCENDING="Version ascending" +COM_COMPONENTBUILDER_FILTER_VERSION_DESCENDING="Version descending" COM_COMPONENTBUILDER_FILTER_VISIBILITY_ASCENDING="Visibility ascending" COM_COMPONENTBUILDER_FILTER_VISIBILITY_DESCENDING="Visibility descending" COM_COMPONENTBUILDER_FOLDER="Folder" @@ -5462,6 +5482,8 @@ COM_COMPONENTBUILDER_GET_SNIPPETS_TEMPLATES_BUTTON_ACCESS="Get Snippets Template COM_COMPONENTBUILDER_GET_SNIPPETS_TEMPLATES_BUTTON_ACCESS_DESC="Allows the users in this group to access the templates button." COM_COMPONENTBUILDER_GET_THE_SNIPPET_FROM_GITHUB_AND_INSTALL_IT_LOCALLY="Get the snippet from gitHub and install it locally" COM_COMPONENTBUILDER_GET_THE_SNIPPET_FROM_GITHUB_AND_UPDATE_THE_LOCAL_VERSION="Get the snippet from gitHub and update the local version" +COM_COMPONENTBUILDER_GET_TOKEN="Get Token" +COM_COMPONENTBUILDER_GET_TOKEN_FROM_VDM_FOR_UPDATES_AND_ADD_IT_TO_YOUR_GLOBAL_OPTIONS="Get token from VDM for updates, and add it to your global options" COM_COMPONENTBUILDER_GLOBAL="Global" COM_COMPONENTBUILDER_GLUECODE="Glue/Code" COM_COMPONENTBUILDER_GREAT_THIS_FUNCTION_NAME_WILL_WORK="Great, this function name will work!" @@ -5627,6 +5649,7 @@ COM_COMPONENTBUILDER_IMPORT_SELECT_FILE_FOR_FIELDS="Select the file to import da COM_COMPONENTBUILDER_IMPORT_SELECT_FILE_FOR_FIELDTYPES="Select the file to import data to fieldtypes." COM_COMPONENTBUILDER_IMPORT_SELECT_FILE_FOR_HELP_DOCUMENTS="Select the file to import data to help_documents." COM_COMPONENTBUILDER_IMPORT_SELECT_FILE_FOR_JOOMLA_COMPONENTS="Select the file to import data to joomla_components." +COM_COMPONENTBUILDER_IMPORT_SELECT_FILE_FOR_JOOMLA_MODULES="Select the file to import data to joomla_modules." COM_COMPONENTBUILDER_IMPORT_SELECT_FILE_FOR_LANGUAGES="Select the file to import data to languages." COM_COMPONENTBUILDER_IMPORT_SELECT_FILE_FOR_LANGUAGE_TRANSLATIONS="Select the file to import data to language_translations." COM_COMPONENTBUILDER_IMPORT_SELECT_FILE_FOR_LAYOUTS="Select the file to import data to layouts." @@ -5646,7 +5669,6 @@ COM_COMPONENTBUILDER_IMPORT_UPLOAD_BOTTON="Upload File" COM_COMPONENTBUILDER_INACTIVE="Inactive" COM_COMPONENTBUILDER_IN_SYNC="In Sync" COM_COMPONENTBUILDER_ISOLATE="Isolate" -COM_COMPONENTBUILDER_ISSUE="issue" COM_COMPONENTBUILDER_IS_BEING_COMPILED="is being compiled" COM_COMPONENTBUILDER_IS_NOT_ONLY_FOUR_LISTRADIOCHECKBOXES="Is Not (only 4 list/radio/checkboxes)" COM_COMPONENTBUILDER_IS_ONLY_FOUR_LISTRADIOCHECKBOXES="Is (only 4 list/radio/checkboxes)" @@ -6140,6 +6162,8 @@ COM_COMPONENTBUILDER_JOOMLA_MODULES_EDIT_STATE="Joomla Modules Edit State" COM_COMPONENTBUILDER_JOOMLA_MODULES_EDIT_STATE_DESC="Allows the users in this group to update the state of the joomla module" COM_COMPONENTBUILDER_JOOMLA_MODULES_EDIT_VERSION="Joomla Modules Edit Version" COM_COMPONENTBUILDER_JOOMLA_MODULES_EDIT_VERSION_DESC="Allows users in this group to edit versions of version joomla modules" +COM_COMPONENTBUILDER_JOOMLA_MODULES_EXPORT="Joomla Modules Export" +COM_COMPONENTBUILDER_JOOMLA_MODULES_EXPORT_DESC="Allows the users in this group to export export joomla modules" COM_COMPONENTBUILDER_JOOMLA_MODULES_FILES_FOLDERS_URLS="Joomla Modules Files, Folders & URLs" COM_COMPONENTBUILDER_JOOMLA_MODULES_FILES_FOLDERS_URLS_ACCESS="Joomla Modules Files Folders Urls Access" COM_COMPONENTBUILDER_JOOMLA_MODULES_FILES_FOLDERS_URLS_ACCESS_DESC="Allows the users in this group to access access joomla modules files folders urls" @@ -6182,6 +6206,8 @@ COM_COMPONENTBUILDER_JOOMLA_MODULES_FILES_FOLDERS_URLS_N_ITEMS_UNFEATURED="%s Jo COM_COMPONENTBUILDER_JOOMLA_MODULES_FILES_FOLDERS_URLS_N_ITEMS_UNFEATURED_1="%s Joomla Module Files, Folders & URLs unfeatured." COM_COMPONENTBUILDER_JOOMLA_MODULES_FILES_FOLDERS_URLS_N_ITEMS_UNPUBLISHED="%s Joomla Modules Files, Folders & URLs unpublished." COM_COMPONENTBUILDER_JOOMLA_MODULES_FILES_FOLDERS_URLS_N_ITEMS_UNPUBLISHED_1="%s Joomla Module Files, Folders & URLs unpublished." +COM_COMPONENTBUILDER_JOOMLA_MODULES_IMPORT="Joomla Modules Import" +COM_COMPONENTBUILDER_JOOMLA_MODULES_IMPORT_DESC="Allows the users in this group to import import joomla modules" COM_COMPONENTBUILDER_JOOMLA_MODULES_N_ITEMS_ARCHIVED="%s Joomla Modules archived." COM_COMPONENTBUILDER_JOOMLA_MODULES_N_ITEMS_ARCHIVED_1="%s Joomla Module archived." COM_COMPONENTBUILDER_JOOMLA_MODULES_N_ITEMS_CHECKED_IN_0="No Joomla Module successfully checked in." @@ -7216,8 +7242,6 @@ COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_VERSION_DESC="A count of the number of COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_VERSION_LABEL="Version" COM_COMPONENTBUILDER_LANGUAGE_VERSION_DESC="A count of the number of times this Language has been revised." COM_COMPONENTBUILDER_LANGUAGE_VERSION_LABEL="Version" -COM_COMPONENTBUILDER_LAST_FEW_RELEASES_FROM_GITHUB_IS_LOADING="Last few releases from Github is loading" -COM_COMPONENTBUILDER_LATEST_RELEASE="Latest Release" COM_COMPONENTBUILDER_LAYOUT="Layout" COM_COMPONENTBUILDER_LAYOUTS="Layouts" COM_COMPONENTBUILDER_LAYOUTS_ACCESS="Layouts Access" @@ -7740,12 +7764,12 @@ COM_COMPONENTBUILDER_NAME_DESC="Name (Desc)" COM_COMPONENTBUILDER_NAME_OF_DYNAMICGET="Name of dynamicGet" COM_COMPONENTBUILDER_NEED_HELP="Need help?" COM_COMPONENTBUILDER_NEW="New" -COM_COMPONENTBUILDER_NEW_ISSUE="New Issue" COM_COMPONENTBUILDER_NEW_MEANS_THAT_WE_COULD_NOT_FIND_A_LOCAL_SNIPPET_WITH_THE_SAME_NAME_LIBRARY_AND_TYPE_AND_SO_HAVE_MARKED_THIS_SNIPPET_AS_NEW="New means that we could not find a local snippet with the same name, library and type, and so have marked this snippet as new." COM_COMPONENTBUILDER_NEW_NOTICE="New Notice" COM_COMPONENTBUILDER_NO="No" COM_COMPONENTBUILDER_NONE="None" COM_COMPONENTBUILDER_NONE_DB="None DB" +COM_COMPONENTBUILDER_NONE_FOUND="None found" COM_COMPONENTBUILDER_NONE_SELECTED="None selected" COM_COMPONENTBUILDER_NOTICE_BOARD="Notice Board" COM_COMPONENTBUILDER_NOTRANSLATION="no-translation" @@ -7781,12 +7805,7 @@ COM_COMPONENTBUILDER_ONLY_IN_LINKED_LIST_VIEWS="Only in Linked List Views" COM_COMPONENTBUILDER_ONLY_ONE_COMPONENT_CAN_BE_CLONED_AT_A_TIME_PLEASE_SELECT_ONE_AND_TRY_AGAIN="Only one component can be cloned at a time, please select one and try again!" COM_COMPONENTBUILDER_ONLY_SZIP_FILE_WAS_REMOVED_THE_FROM_TMP_FOLDER_DURING_INSTALLATION="Only (%s.zip) file was removed the from tmp folder during installation!" COM_COMPONENTBUILDER_ONLY_USE_THE_BNONE_DBB_OPTION_IF_YOU_ARE_PLANNING_ON_TARGETING_THIS_FIELD_WITH_JAVASCRIPTCUSTOM_PHP_TO_MOVE_ITS_VALUE_INTO_ANOTHER_FIELD_THAT_DOES_GET_SAVED_TO_THE_DATABASE="Only use the None DB option if you are planning on targeting this field with JavaScript/Custom PHP to move its value into another field that does get saved to the database." -COM_COMPONENTBUILDER_ON_GITHUB="on Github" -COM_COMPONENTBUILDER_OPEN="Open" -COM_COMPONENTBUILDER_OPENED="opened" -COM_COMPONENTBUILDER_OPENED_THIS="opened this" COM_COMPONENTBUILDER_OPEN_LIBRARY_SNIPPETS="Open Library Snippets" -COM_COMPONENTBUILDER_OPEN_ON_GITHUB="Open on Github" COM_COMPONENTBUILDER_OPTIONS="Options" COM_COMPONENTBUILDER_ORDER_BEFORE="Order Before" COM_COMPONENTBUILDER_ORDER_IN_EDIT="Order in Edit" @@ -7923,6 +7942,172 @@ COM_COMPONENTBUILDER_PLEASE_WAIT="Please wait!" COM_COMPONENTBUILDER_PLEASE_WAIT_LOADING="Please wait, loading" COM_COMPONENTBUILDER_PLUGIN="Plugin" COM_COMPONENTBUILDER_PLUGINS="Plugins" +COM_COMPONENTBUILDER_POWER="Power" +COM_COMPONENTBUILDER_POWERS="Powers" +COM_COMPONENTBUILDER_POWERS_ACCESS="Powers Access" +COM_COMPONENTBUILDER_POWERS_ACCESS_DESC="Allows the users in this group to access access powers" +COM_COMPONENTBUILDER_POWERS_A_HREFS_TARGET_BLANK_TITLEOPEN_POWERSA_WITH_VERSION_S_ALREADY_EXIST="Power:%s [%s] with version (%s) already exist." +COM_COMPONENTBUILDER_POWERS_BATCH_OPTIONS="Batch process the selected Powers" +COM_COMPONENTBUILDER_POWERS_BATCH_TIP="All changes will be applied to all selected Powers" +COM_COMPONENTBUILDER_POWERS_BATCH_USE="Powers Batch Use" +COM_COMPONENTBUILDER_POWERS_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch powers" +COM_COMPONENTBUILDER_POWERS_CREATE="Powers Create" +COM_COMPONENTBUILDER_POWERS_CREATE_DESC="Allows the users in this group to create create powers" +COM_COMPONENTBUILDER_POWERS_DASHBOARD_LIST="Powers Dashboard List" +COM_COMPONENTBUILDER_POWERS_DASHBOARD_LIST_DESC="Allows the users in this group to dashboard list of power" +COM_COMPONENTBUILDER_POWERS_DELETE="Powers Delete" +COM_COMPONENTBUILDER_POWERS_DELETE_DESC="Allows the users in this group to delete delete powers" +COM_COMPONENTBUILDER_POWERS_DETAILS="Details" +COM_COMPONENTBUILDER_POWERS_EDIT="Powers Edit" +COM_COMPONENTBUILDER_POWERS_EDIT_CREATED_BY="Powers Edit Created By" +COM_COMPONENTBUILDER_POWERS_EDIT_CREATED_BY_DESC="Allows the users in this group to update the created by of the edit created by powers" +COM_COMPONENTBUILDER_POWERS_EDIT_CREATED_DATE="Powers Edit Created Date" +COM_COMPONENTBUILDER_POWERS_EDIT_CREATED_DATE_DESC="Allows the users in this group to update the created date of the edit created powers" +COM_COMPONENTBUILDER_POWERS_EDIT_DESC="Allows the users in this group to edit the power" +COM_COMPONENTBUILDER_POWERS_EDIT_OWN="Powers Edit Own" +COM_COMPONENTBUILDER_POWERS_EDIT_OWN_DESC="Allows the users in this group to edit edit own powers created by them" +COM_COMPONENTBUILDER_POWERS_EDIT_STATE="Powers Edit State" +COM_COMPONENTBUILDER_POWERS_EDIT_STATE_DESC="Allows the users in this group to update the state of the power" +COM_COMPONENTBUILDER_POWERS_EDIT_VERSION="Powers Edit Version" +COM_COMPONENTBUILDER_POWERS_EDIT_VERSION_DESC="Allows users in this group to edit versions of version powers" +COM_COMPONENTBUILDER_POWERS_NAME="Name" +COM_COMPONENTBUILDER_POWERS_N_ITEMS_ARCHIVED="%s Powers archived." +COM_COMPONENTBUILDER_POWERS_N_ITEMS_ARCHIVED_1="%s Power archived." +COM_COMPONENTBUILDER_POWERS_N_ITEMS_CHECKED_IN_0="No Power successfully checked in." +COM_COMPONENTBUILDER_POWERS_N_ITEMS_CHECKED_IN_1="%d Power successfully checked in." +COM_COMPONENTBUILDER_POWERS_N_ITEMS_CHECKED_IN_MORE="%d Powers successfully checked in." +COM_COMPONENTBUILDER_POWERS_N_ITEMS_DELETED="%s Powers deleted." +COM_COMPONENTBUILDER_POWERS_N_ITEMS_DELETED_1="%s Power deleted." +COM_COMPONENTBUILDER_POWERS_N_ITEMS_FAILED_PUBLISHING="%s Powers failed publishing." +COM_COMPONENTBUILDER_POWERS_N_ITEMS_FAILED_PUBLISHING_1="%s Power failed publishing." +COM_COMPONENTBUILDER_POWERS_N_ITEMS_FEATURED="%s Powers featured." +COM_COMPONENTBUILDER_POWERS_N_ITEMS_FEATURED_1="%s Power featured." +COM_COMPONENTBUILDER_POWERS_N_ITEMS_PUBLISHED="%s Powers published." +COM_COMPONENTBUILDER_POWERS_N_ITEMS_PUBLISHED_1="%s Power published." +COM_COMPONENTBUILDER_POWERS_N_ITEMS_TRASHED="%s Powers trashed." +COM_COMPONENTBUILDER_POWERS_N_ITEMS_TRASHED_1="%s Power trashed." +COM_COMPONENTBUILDER_POWERS_N_ITEMS_UNFEATURED="%s Powers unfeatured." +COM_COMPONENTBUILDER_POWERS_N_ITEMS_UNFEATURED_1="%s Power unfeatured." +COM_COMPONENTBUILDER_POWERS_N_ITEMS_UNPUBLISHED="%s Powers unpublished." +COM_COMPONENTBUILDER_POWERS_N_ITEMS_UNPUBLISHED_1="%s Power unpublished." +COM_COMPONENTBUILDER_POWERS_SUBMENU="Powers Submenu" +COM_COMPONENTBUILDER_POWERS_SUBMENU_DESC="Allows the users in this group to submenu of power" +COM_COMPONENTBUILDER_POWER_ABSTRACT_CLASS="abstract class" +COM_COMPONENTBUILDER_POWER_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_POWER_ADD_HEAD_LABEL="Add Custom Class Header" +COM_COMPONENTBUILDER_POWER_AS_LABEL="as" +COM_COMPONENTBUILDER_POWER_CLASS="class" +COM_COMPONENTBUILDER_POWER_CODE="Code" +COM_COMPONENTBUILDER_POWER_CREATED_BY_DESC="The user that created this Power." +COM_COMPONENTBUILDER_POWER_CREATED_BY_LABEL="Created By" +COM_COMPONENTBUILDER_POWER_CREATED_DATE_DESC="The date this Power was created." +COM_COMPONENTBUILDER_POWER_CREATED_DATE_LABEL="Created Date" +COM_COMPONENTBUILDER_POWER_DESCRIPTION_DESCRIPTION="Add Description Here" +COM_COMPONENTBUILDER_POWER_DESCRIPTION_HINT="Add Description Here" +COM_COMPONENTBUILDER_POWER_DESCRIPTION_LABEL="Description" +COM_COMPONENTBUILDER_POWER_EDIT="Editing the Power" +COM_COMPONENTBUILDER_POWER_ERROR_UNIQUE_ALIAS="Another Power has the same alias." +COM_COMPONENTBUILDER_POWER_EXTENDS_CUSTOM_DESCRIPTION="The custom class, this class should extend" +COM_COMPONENTBUILDER_POWER_EXTENDS_CUSTOM_LABEL="Extends - Custom" +COM_COMPONENTBUILDER_POWER_EXTENDS_CUSTOM_MESSAGE="Error! Please add the custom class, this class should extend." +COM_COMPONENTBUILDER_POWER_EXTENDS_DESCRIPTION="The class, this class should extend" +COM_COMPONENTBUILDER_POWER_EXTENDS_LABEL="Extends" +COM_COMPONENTBUILDER_POWER_FINAL_CLASS="final class" +COM_COMPONENTBUILDER_POWER_GUID_DESCRIPTION="Globally Unique Identifier" +COM_COMPONENTBUILDER_POWER_GUID_HINT="Auto Generated" +COM_COMPONENTBUILDER_POWER_GUID_LABEL="GUID" +COM_COMPONENTBUILDER_POWER_HEAD_DESCRIPTION="The class header to add any header values can be added." +COM_COMPONENTBUILDER_POWER_HEAD_LABEL="Class Header" +COM_COMPONENTBUILDER_POWER_ID="Id" +COM_COMPONENTBUILDER_POWER_IMPLEMENTS_CUSTOM_DESCRIPTION="Add the custom interface(s) this class must implement. Comma separate them, and remember to manually add their use statements to the header area." +COM_COMPONENTBUILDER_POWER_IMPLEMENTS_CUSTOM_LABEL="Implements interface(s) - Custom" +COM_COMPONENTBUILDER_POWER_IMPLEMENTS_CUSTOM_MESSAGE="Error! Please add the custom interface(s) this class must implement." +COM_COMPONENTBUILDER_POWER_IMPLEMENTS_DESCRIPTION="The interface(s), this class should implement." +COM_COMPONENTBUILDER_POWER_IMPLEMENTS_LABEL="Implements interface(s)" +COM_COMPONENTBUILDER_POWER_INTERFACE="interface" +COM_COMPONENTBUILDER_POWER_LOAD="Load" +COM_COMPONENTBUILDER_POWER_LOAD_LABEL="load" +COM_COMPONENTBUILDER_POWER_LOAD_POWERS_NOTE_DESCRIPTION="

When you would like to load a power to the project, but you do not want that power to be part of the use namespace declarations in the header of this power.

+

You do not need to again select any power that is already selected in the Extends, Implements, or Use Selection fields, since they are already being loaded.

" +COM_COMPONENTBUILDER_POWER_LOAD_POWERS_NOTE_LABEL="When to Load Powers Here?" +COM_COMPONENTBUILDER_POWER_LOAD_SELECTION_DESCRIPTION="Select powers that you want to make sure also load when this power is loaded." +COM_COMPONENTBUILDER_POWER_LOAD_SELECTION_LABEL="Load Powers" +COM_COMPONENTBUILDER_POWER_MAIN_CLASS_CODE_DESCRIPTION="Add the properties & methods here." +COM_COMPONENTBUILDER_POWER_MAIN_CLASS_CODE_LABEL="Properties & Methods" +COM_COMPONENTBUILDER_POWER_METHOD="Method" +COM_COMPONENTBUILDER_POWER_METHOD_LABEL="Methods" +COM_COMPONENTBUILDER_POWER_METHOD_SELECTION_DESCRIPTION="Select methods you want to use in your power." +COM_COMPONENTBUILDER_POWER_METHOD_SELECTION_LABEL="Method Selection" +COM_COMPONENTBUILDER_POWER_MODIFIED_BY_DESC="The last user that modified this Power." +COM_COMPONENTBUILDER_POWER_MODIFIED_BY_LABEL="Modified By" +COM_COMPONENTBUILDER_POWER_MODIFIED_DATE_DESC="The date this Power was modified." +COM_COMPONENTBUILDER_POWER_MODIFIED_DATE_LABEL="Modified Date" +COM_COMPONENTBUILDER_POWER_NAMESPACE_DESCRIPTION="Add the namespace of this class." +COM_COMPONENTBUILDER_POWER_NAMESPACE_DETAILS_DESCRIPTION="
+

We will use the namespace value to build the folder structure and filename. This namespace will also directly be used as the use declaration wherever you link this power. Therefore the namespace declared here must end with the filename, and this file name must match the case of the terminating class name.
+Example (namespace): ComponentName\Sub\ClassName
+JCB will build the following file path
+Example (filepath): root/libraries/jcb_powers/ComponentName.Sub/src/ClassName.php
+With a four section namespace
+Example (namespace): ComponentName\Sub\Type\ClassName
+JCB will build the following file path
+Example (filepath): root/libraries/jcb_powers/ComponentName.Sub.Type/src/ClassName.php
+To add a folder inside the src folder use [.] in class name
+Example (namespace): ComponentName\Sub\Util.ClassName
+Example (JCB builds this namespace): ComponentName\Sub\Util\ClassName
+JCB will build the following file path
+Example (filepath): root/libraries/jcb_powers/ComponentName.Sub/src/Util/ClassName.php

+ +

The component placeholder also works in namespacing, as well as normal placeholders:
+Example: [[[Component]]]\SubNamespaceNames\ClassName

+ +

We will also use the namespacing for auto loading in your project wherever you link this power.

+

The jcb_powers can be changed globally and per/component (soon).
Make your powers load system wide with a plugin (soon).

+ +

For more info on how all this works: https://www.php-fig.org/psr/psr-4/

+
" +COM_COMPONENTBUILDER_POWER_NAMESPACE_DETAILS_LABEL="Namespacing in JCB" +COM_COMPONENTBUILDER_POWER_NAMESPACE_HINT="ComponentName\Powers\ClassName" +COM_COMPONENTBUILDER_POWER_NAMESPACE_LABEL="Namespace" +COM_COMPONENTBUILDER_POWER_NAMESPACE_MESSAGE="Error! Please add namespace here." +COM_COMPONENTBUILDER_POWER_NAME_DESCRIPTION="Enter Name Here" +COM_COMPONENTBUILDER_POWER_NAME_HINT="Name Here" +COM_COMPONENTBUILDER_POWER_NAME_LABEL="Name" +COM_COMPONENTBUILDER_POWER_NAME_MESSAGE="Error! Please add name here." +COM_COMPONENTBUILDER_POWER_NEW="A New Power" +COM_COMPONENTBUILDER_POWER_NO="No" +COM_COMPONENTBUILDER_POWER_NOTE_LINKED_TO_NOTICE_DESCRIPTION="
Searching the database.
" +COM_COMPONENTBUILDER_POWER_NOTE_LINKED_TO_NOTICE_LABEL="Linked To" +COM_COMPONENTBUILDER_POWER_NOT_REQUIRED="Not Required" +COM_COMPONENTBUILDER_POWER_ORDERING_LABEL="Ordering" +COM_COMPONENTBUILDER_POWER_PERMISSION="Permissions" +COM_COMPONENTBUILDER_POWER_POWER_VERSION_DESCRIPTION="Add Version Number Here" +COM_COMPONENTBUILDER_POWER_POWER_VERSION_HINT="1.0.0" +COM_COMPONENTBUILDER_POWER_POWER_VERSION_LABEL="Version" +COM_COMPONENTBUILDER_POWER_POWER_VERSION_MESSAGE="Error! Please add version here." +COM_COMPONENTBUILDER_POWER_PROPERTY="Property" +COM_COMPONENTBUILDER_POWER_PROPERTY_LABEL="Properties" +COM_COMPONENTBUILDER_POWER_PROPERTY_SELECTION_DESCRIPTION="Select properties you want to use in your power." +COM_COMPONENTBUILDER_POWER_PROPERTY_SELECTION_LABEL="Property Selection" +COM_COMPONENTBUILDER_POWER_PUBLISHING="Publishing" +COM_COMPONENTBUILDER_POWER_RUN_EXPANSION_BUTTON_ACCESS="Power Run Expansion Button Access" +COM_COMPONENTBUILDER_POWER_RUN_EXPANSION_BUTTON_ACCESS_DESC="Allows the users in this group to access the run expansion button." +COM_COMPONENTBUILDER_POWER_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Power to customise the alias." +COM_COMPONENTBUILDER_POWER_STATUS="Status" +COM_COMPONENTBUILDER_POWER_SYSTEM_NAME_DESCRIPTION="Used only in the system." +COM_COMPONENTBUILDER_POWER_SYSTEM_NAME_HINT="The System Name Here" +COM_COMPONENTBUILDER_POWER_SYSTEM_NAME_LABEL="System Name" +COM_COMPONENTBUILDER_POWER_SYSTEM_NAME_MESSAGE="Error! Please add some text here." +COM_COMPONENTBUILDER_POWER_TRAIT="trait" +COM_COMPONENTBUILDER_POWER_TYPE_DESCRIPTION="The type of power being build" +COM_COMPONENTBUILDER_POWER_TYPE_LABEL="Type of Power" +COM_COMPONENTBUILDER_POWER_USE="Use" +COM_COMPONENTBUILDER_POWER_USE_LABEL="use" +COM_COMPONENTBUILDER_POWER_USE_SELECTION_DESCRIPTION="Select namespace you want to use in your power." +COM_COMPONENTBUILDER_POWER_USE_SELECTION_LABEL="Use Selection" +COM_COMPONENTBUILDER_POWER_VERSION_DESC="A count of the number of times this Power has been revised." +COM_COMPONENTBUILDER_POWER_VERSION_LABEL="Version" +COM_COMPONENTBUILDER_POWER_YES="Yes" COM_COMPONENTBUILDER_PROPERTIES="Properties" COM_COMPONENTBUILDER_PROPERTIESBR_SMALLHERE_YOU_CAN_SET_THE_PROPERTIES_FOR_THIS_FIELDSMALL="Properties
Here you can set the properties for this field." COM_COMPONENTBUILDER_PROPERTY="Property" @@ -7934,7 +8119,6 @@ COM_COMPONENTBUILDER_PUBLISHED="Published" COM_COMPONENTBUILDER_PUBLISHING="Publishing" COM_COMPONENTBUILDER_READY_TO_COMPILE_A_COMPONENT="Ready to compile a component" COM_COMPONENTBUILDER_REFRESH="Refresh" -COM_COMPONENTBUILDER_RELEASED_THIS="released this" COM_COMPONENTBUILDER_REMOVE="Remove" COM_COMPONENTBUILDER_REMOVING_ALL_ZIP_PACKAGES_FROM_THE_TEMPORARY_FOLDER_OF_THE_JOOMLA_INSTALL="Removing all zip packages from the temporary folder of the Joomla install" COM_COMPONENTBUILDER_RENAME="Rename" @@ -7942,9 +8126,7 @@ COM_COMPONENTBUILDER_REPORT_AN_ISSUE_BSB="Report an issue: %s" COM_COMPONENTBUILDER_REQUIRES_THE_VALUE_ENTERED_BE_ONE_OF_THE_OPTIONS_IN_AN_ELEMENT_OF_TYPEQUOTLISTQUOT_THAT_IS_THAT_THE_ELEMENT_IS_A_SELECT_LIST="Requires the value entered be one of the options in an element of type="list": that is, that the element is a select list." COM_COMPONENTBUILDER_REQUIRES_THE_VALUE_TO_BE_A_TELEPHONE_NUMBER_COMPLYING_WITH_THE_STANDARDS_OF_NANPA_ITUT_TRECEONE_HUNDRED_AND_SIXTY_FOUR_OR_IETF_RFCFOUR_THOUSAND_NINE_HUNDRED_AND_THIRTY_THREE="Requires the value to be a Telephone number complying with the standards of nanpa, ITU-T T-REC-E.164 or ietf rfc4933." COM_COMPONENTBUILDER_REQUIRES_THE_VALUE_TO_BE_THE_SAME_AS_THAT_HELD_IN_THE_FIELD_NAMED_QUOTFIELDQUOT_EGS="Requires the value to be the same as that held in the field named "field", eg:%s" -COM_COMPONENTBUILDER_RESPOND_TO_THIS_ISSUE_ON_GITHUB="Respond to this issue on Github" COM_COMPONENTBUILDER_REVERT_ALL_AHEAD_SNIPPETS="Revert All Ahead Snippets" -COM_COMPONENTBUILDER_REVIEW_THIS_ISSUE_ON_GITHUB="Review this issue on Github" COM_COMPONENTBUILDER_RIGHT_IN_TAB="Right in Tab" COM_COMPONENTBUILDER_RIGHT_OF_TABS="Right of Tabs" COM_COMPONENTBUILDER_RUN_EXPANSION="Run Expansion" @@ -8104,6 +8286,7 @@ COM_COMPONENTBUILDER_SERVER_USERNAME_MESSAGE="Error! Please add the username her COM_COMPONENTBUILDER_SERVER_VERSION_DESC="A count of the number of times this Server has been revised." COM_COMPONENTBUILDER_SERVER_VERSION_LABEL="Version" COM_COMPONENTBUILDER_SET_A_CLASS_VALUE_FOR_THE_LIST_VIEW_OF_THIS_FIELD="Set a class value for the list view of this field." +COM_COMPONENTBUILDER_SET_CUSTOM="Set Custom" COM_COMPONENTBUILDER_SHARE_SNIPPETS="Share Snippets" COM_COMPONENTBUILDER_SHOULD_JCB_ADD_ANY_POWERS_THAT_ARE_CONNECTED_TO_THIS_COMPONENT_THIS_MAY_BE_HELPFUL_IF_YOU_ARE_LOADING_POWERS_VIA_ANOTHER_COMPONENT_AND_WOULD_LIKE_TO_AVOID_ADDING_IT_TO_BOTH_JUST_REMEMBER_THAT_IN_THIS_CASE_YOU_NEED_TO_LOAD_THE_POWERS_VIA_A_PLUGIN="Should JCB add any powers that are connected to this component? This may be helpful if you are loading powers via another component, and would like to avoid adding it to both, just remember that in this case you need to load the powers via a plugin." COM_COMPONENTBUILDER_SHOULD_JCB_INSERT_THE_CUSTOM_CODE_PLACEHOLDERS_THIS_IS_ONLY_APPLICABLE_IF_THIS_COMPONENT_HAS_CUSTOM_CODE="Should JCB insert the custom code placeholders? This is only applicable if this component has custom code." @@ -8768,6 +8951,7 @@ COM_COMPONENTBUILDER_SUBMENU_LANGUAGE_TRANSLATIONS="Language Translations" COM_COMPONENTBUILDER_SUBMENU_LAYOUTS="Layouts" COM_COMPONENTBUILDER_SUBMENU_LIBRARIES="Libraries" COM_COMPONENTBUILDER_SUBMENU_PLACEHOLDERS="Placeholders" +COM_COMPONENTBUILDER_SUBMENU_POWERS="Powers" COM_COMPONENTBUILDER_SUBMENU_SERVERS="Servers" COM_COMPONENTBUILDER_SUBMENU_SITE_VIEWS="Site Views" COM_COMPONENTBUILDER_SUBMENU_SNIPPETS="Snippets" @@ -8971,13 +9155,13 @@ COM_COMPONENTBUILDER_THE_URL_S_SET_TO_RETRIEVE_THE_PACKAGES_DID_NOT_RETURN_S_DAT COM_COMPONENTBUILDER_THE_URL_S_SET_TO_RETRIEVE_THE_PACKAGES_DID_NOT_RETURN_VALID_DATA="The url (%s) set to retrieve the packages did not return valid data!" COM_COMPONENTBUILDER_THE_URL_S_SET_TO_RETRIEVE_THE_PACKAGES_DOES_NOT_EXIST="The url (%s) set to retrieve the packages does not exist!" COM_COMPONENTBUILDER_THE_URL_S_SET_TO_RETRIEVE_THE_PACKAGES_DOES_NOT_RETURN_ANY_DATA="The url (%s) set to retrieve the packages does not return any data!" +COM_COMPONENTBUILDER_THE_WIKI_CAN_ONLY_BE_LOADED_WHEN_YOUR_JCB_SYSTEM_HAS_INTERNET_CONNECTION="The wiki can only be loaded when your JCB system has internet connection." COM_COMPONENTBUILDER_THE_WIKI_IS_LOADING="The wiki is loading" COM_COMPONENTBUILDER_THIS_BSB_IS_NOT_LINKED_TO_ANY_OTHER_AREAS_OF_JCB_AT_THIS_TIME="This %s is not linked to any other areas of JCB at this time!" COM_COMPONENTBUILDER_THIS_MAY_TAKE_A_WHILE_DEPENDING_ON_THE_SIZE_OF_YOUR_PROJECT="This may take a while depending on the size of your project." COM_COMPONENTBUILDER_THIS_PACKAGE_BPASSEDB_THE_CHECKSUM_VALIDATIONBR_BR_SMALLMANUALLY_ALSO_VALIDATE_THAT_THE_CORRECT_CHECKSUM_WAS_USEDSMALLBR_THIS_CHECKSUM_BSB_MUST_BE_THE_SAME_AS_THE_ONE_FOUND_A_S_SA="This package PASSED the checksum validation!

Manually also validate that the correct checksum was used.
This checksum: %s must be the same as the one found @ " COM_COMPONENTBUILDER_THIS_PACKAGE_HAS_NO_KEY="This package has no key." COM_COMPONENTBUILDER_TITLE="Title" -COM_COMPONENTBUILDER_TOTAL_DOWNLOADS="total downloads" COM_COMPONENTBUILDER_TO_ADD_SIMPLY_COPY_AND_PAST_THE_SNIPPET_INTO_YOUR_CODE="To add simply copy and past the snippet into your code." COM_COMPONENTBUILDER_TO_ADD_VALIDATION_TO_A_FIELD_IF_VALIDATION_IS_NOT_PART_OF_FIELD_TYPE_PROPERTIES_LOADED_ABOVE_SO_IF_YOU_HAVE_VALIDATION_SET_AS_A_FIELD_PROPERTY_THIS_EXTRA_PROPERTY_WILL_NOT_BE_NEEDED="To add validation to a field if validation is not part of field type properties loaded above. So if you have validation set as a field property this extra property will not be needed." COM_COMPONENTBUILDER_TO_CHANGE_THE_PACKAGE_OWNER_DEFAULTS_OPEN_THE_BJCB_GLOBAL_OPTIONSB_GO_TO_THE_BCOMPANYB_TAB_AND_ADD_THE_CORRECT_COMPANY_DETAILS_THERE="To change the package owner defaults. Open the JCB Global Options, go to the Company tab and add the correct company details there." @@ -9039,6 +9223,7 @@ COM_COMPONENTBUILDER_TYPE_LIBRARY_FILES_FOLDERS_URLS="Library Files, Folders & U COM_COMPONENTBUILDER_TYPE_NAME="Type - Name" COM_COMPONENTBUILDER_TYPE_OR_SELECT_SOME_OPTIONS="Type or select some options" COM_COMPONENTBUILDER_TYPE_PLACEHOLDER="Placeholder" +COM_COMPONENTBUILDER_TYPE_POWER="Power" COM_COMPONENTBUILDER_TYPE_SERVER="Server" COM_COMPONENTBUILDER_TYPE_SITE_VIEW="Site View" COM_COMPONENTBUILDER_TYPE_SNIPPET="Snippet" @@ -9149,8 +9334,6 @@ COM_COMPONENTBUILDER_VIEW="View" COM_COMPONENTBUILDER_VIEWS="Views" COM_COMPONENTBUILDER_VIEW_BLAME="View Blame" COM_COMPONENTBUILDER_VIEW_DESCRIPTION_OF_COMMUNITY_VERSION="View Description of community version" -COM_COMPONENTBUILDER_VIEW_MORE_ISSUES_ON_GITHUB="View more issues on Github" -COM_COMPONENTBUILDER_VIEW_MORE_RELEASES_ON_GITHUB="View more releases on Github" COM_COMPONENTBUILDER_VIEW_SNIPPET_OF_COMMUNITY_VERSION="View Snippet of community version" COM_COMPONENTBUILDER_VIEW_SNIPPET_REFERENCE_URL="View Snippet Reference URL" COM_COMPONENTBUILDER_VIEW_THE_CONTRIBUTOR_DETAILS="View the contributor details" @@ -9169,6 +9352,7 @@ COM_COMPONENTBUILDER_YOUR_DATA_IS_ENCRYPTED_WITH_A_AES_ONE_HUNDRED_AND_TWENTY_EI COM_COMPONENTBUILDER_YOUR_DATA_IS_ENCRYPTED_WITH_A_AES_ONE_HUNDRED_AND_TWENTY_EIGHT_BIT_ENCRYPTION_USING_THE_ABOVE_THIRTY_TWO_CHARACTER_KEY_WITHOUT_THIS_KEY_IT_WILL_TAKE_THE_CURRENT_TECHNOLOGY_WITH_A_BRUTE_FORCE_ATTACK_METHOD_MORE_THEN_A_HREFHTTPRANDOMIZECOMHOWLONGTOHACKPASS_TARGET_BLANK_TITLEHOW_LONG_TO_HACK_PASSSEVEN_HUNDRED_ZERO_ZERO_ZERO_ZERO_ZERO_ZERO_ZERO_ZERO_ZERO_ZEROA_YEARS_TO_CRACK_THEORETICALLY_UNLESS_THEY_HAVE_THIS_KEY_ABOVE_SO_DO_KEEP_IT_SAFE="Your data is encrypted with a AES 128 bit encryption using the above 32 character key. Without this key it will take the current technology with a brute force attack method more then 700 000 000 000 000 000 000 000 000 000 000 years to crack theoretically. Unless they have this key above, so do keep it safe." COM_COMPONENTBUILDER_YOU_ARE_CURRENTLY_VIEWING_THE_TRASHED_ITEMS="You are currently viewing the trashed items." COM_COMPONENTBUILDER_YOU_ARE_CURRENTLY_VIEWING_THE_TRASH_AREA_AND_YOU_DONT_HAVE_ANY_ITEMS_IN_TRASH_AT_THE_MOMENT="You are currently viewing the trash area, and you don't have any items in trash at the moment!" +COM_COMPONENTBUILDER_YOU_CAN_DIRECTLY_DOWNLOAD_THE_LATEST_UPDATE_OR_USE_THE_JOOMLA_UPDATE_AREA="You can directly download the latest update, or use the Joomla update area." COM_COMPONENTBUILDER_YOU_CAN_NOW_SELECT_THE_COMPONENT_BZIPB_PACKAGE_YOU_WOULD_LIKE_TO_IMPORTBR_SMALLPLEASE_NOTE_THAT_SMART_COMPONENT_IMPORT_ONLY_WORKS_WITH_THE_FOLLOWING_FORMAT_BZIPBSMALL="You can now select the component zip package you would like to import.
Please note that smart component import only works with the following format: (.zip)" COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_ACCESS_THE_SERVER_DETAILS_BS_DENIEDB_PLEASE_CONTACT_YOUR_SYSTEM_ADMINISTRATOR_FOR_MORE_INFO="You do not have permission to access the server details (%s - denied), please contact your system administrator for more info." COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_CLONE_A_COMPONENT_PLEASE_CONTACT_YOUR_SYSTEM_ADMINISTRATOR_FOR_MORE_HELP="You do not have permission to clone a component, please contact your system administrator for more help." diff --git a/admin/language/en-GB/en-GB.com_componentbuilder.sys.ini b/admin/language/en-GB/en-GB.com_componentbuilder.sys.ini index 2586687a3..4e7b3ff77 100644 --- a/admin/language/en-GB/en-GB.com_componentbuilder.sys.ini +++ b/admin/language/en-GB/en-GB.com_componentbuilder.sys.ini @@ -534,6 +534,8 @@ COM_COMPONENTBUILDER_FIELDS_BATCH_USE="Fields Batch Use" COM_COMPONENTBUILDER_FIELDS_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch fields" COM_COMPONENTBUILDER_FIELDS_CREATE="Fields Create" COM_COMPONENTBUILDER_FIELDS_CREATE_DESC="Allows the users in this group to create create fields" +COM_COMPONENTBUILDER_FIELDS_DASHBOARD_ADD="Fields Dashboard Add" +COM_COMPONENTBUILDER_FIELDS_DASHBOARD_ADD_DESC="Allows the users in this group to dashboard add of field" COM_COMPONENTBUILDER_FIELDS_DASHBOARD_LIST="Fields Dashboard List" COM_COMPONENTBUILDER_FIELDS_DASHBOARD_LIST_DESC="Allows the users in this group to dashboard list of field" COM_COMPONENTBUILDER_FIELDS_DELETE="Fields Delete" @@ -680,6 +682,8 @@ COM_COMPONENTBUILDER_JOOMLA_MODULES_EDIT_STATE="Joomla Modules Edit State" COM_COMPONENTBUILDER_JOOMLA_MODULES_EDIT_STATE_DESC="Allows the users in this group to update the state of the joomla module" COM_COMPONENTBUILDER_JOOMLA_MODULES_EDIT_VERSION="Joomla Modules Edit Version" COM_COMPONENTBUILDER_JOOMLA_MODULES_EDIT_VERSION_DESC="Allows users in this group to edit versions of version joomla modules" +COM_COMPONENTBUILDER_JOOMLA_MODULES_EXPORT="Joomla Modules Export" +COM_COMPONENTBUILDER_JOOMLA_MODULES_EXPORT_DESC="Allows the users in this group to export export joomla modules" COM_COMPONENTBUILDER_JOOMLA_MODULES_FILES_FOLDERS_URLS_ACCESS="Joomla Modules Files Folders Urls Access" COM_COMPONENTBUILDER_JOOMLA_MODULES_FILES_FOLDERS_URLS_ACCESS_DESC="Allows the users in this group to access access joomla modules files folders urls" COM_COMPONENTBUILDER_JOOMLA_MODULES_FILES_FOLDERS_URLS_BATCH_USE="Joomla Modules Files Folders Urls Batch Use" @@ -700,6 +704,8 @@ COM_COMPONENTBUILDER_JOOMLA_MODULES_FILES_FOLDERS_URLS_EDIT_STATE="Joomla Module COM_COMPONENTBUILDER_JOOMLA_MODULES_FILES_FOLDERS_URLS_EDIT_STATE_DESC="Allows the users in this group to update the state of the joomla module files folders urls" COM_COMPONENTBUILDER_JOOMLA_MODULES_FILES_FOLDERS_URLS_EDIT_VERSION="Joomla Modules Files Folders Urls Edit Version" COM_COMPONENTBUILDER_JOOMLA_MODULES_FILES_FOLDERS_URLS_EDIT_VERSION_DESC="Allows users in this group to edit versions of version joomla modules files folders urls" +COM_COMPONENTBUILDER_JOOMLA_MODULES_IMPORT="Joomla Modules Import" +COM_COMPONENTBUILDER_JOOMLA_MODULES_IMPORT_DESC="Allows the users in this group to import import joomla modules" COM_COMPONENTBUILDER_JOOMLA_MODULES_SUBMENU="Joomla Modules Submenu" COM_COMPONENTBUILDER_JOOMLA_MODULES_SUBMENU_DESC="Allows the users in this group to submenu of joomla module" COM_COMPONENTBUILDER_JOOMLA_MODULES_UPDATES_ACCESS="Joomla Modules Updates Access" @@ -956,6 +962,7 @@ COM_COMPONENTBUILDER_MENU_LANGUAGE_TRANSLATIONS="Language Translations" COM_COMPONENTBUILDER_MENU_LAYOUTS="Layouts" COM_COMPONENTBUILDER_MENU_LIBRARIES="Libraries" COM_COMPONENTBUILDER_MENU_PLACEHOLDERS="Placeholders" +COM_COMPONENTBUILDER_MENU_POWERS="Powers" COM_COMPONENTBUILDER_MENU_SITE_VIEWS="Site Views" COM_COMPONENTBUILDER_MENU_SNIPPETS="Snippets" COM_COMPONENTBUILDER_MENU_TEMPLATES="Templates" @@ -984,6 +991,32 @@ COM_COMPONENTBUILDER_PLACEHOLDERS_IMPORT="Placeholders Import" COM_COMPONENTBUILDER_PLACEHOLDERS_IMPORT_DESC="Allows the users in this group to import import placeholders" COM_COMPONENTBUILDER_PLACEHOLDERS_SUBMENU="Placeholders Submenu" COM_COMPONENTBUILDER_PLACEHOLDERS_SUBMENU_DESC="Allows the users in this group to submenu of placeholder" +COM_COMPONENTBUILDER_POWERS_ACCESS="Powers Access" +COM_COMPONENTBUILDER_POWERS_ACCESS_DESC="Allows the users in this group to access access powers" +COM_COMPONENTBUILDER_POWERS_BATCH_USE="Powers Batch Use" +COM_COMPONENTBUILDER_POWERS_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch powers" +COM_COMPONENTBUILDER_POWERS_CREATE="Powers Create" +COM_COMPONENTBUILDER_POWERS_CREATE_DESC="Allows the users in this group to create create powers" +COM_COMPONENTBUILDER_POWERS_DASHBOARD_LIST="Powers Dashboard List" +COM_COMPONENTBUILDER_POWERS_DASHBOARD_LIST_DESC="Allows the users in this group to dashboard list of power" +COM_COMPONENTBUILDER_POWERS_DELETE="Powers Delete" +COM_COMPONENTBUILDER_POWERS_DELETE_DESC="Allows the users in this group to delete delete powers" +COM_COMPONENTBUILDER_POWERS_EDIT="Powers Edit" +COM_COMPONENTBUILDER_POWERS_EDIT_CREATED_BY="Powers Edit Created By" +COM_COMPONENTBUILDER_POWERS_EDIT_CREATED_BY_DESC="Allows the users in this group to update the created by of the edit created by powers" +COM_COMPONENTBUILDER_POWERS_EDIT_CREATED_DATE="Powers Edit Created Date" +COM_COMPONENTBUILDER_POWERS_EDIT_CREATED_DATE_DESC="Allows the users in this group to update the created date of the edit created powers" +COM_COMPONENTBUILDER_POWERS_EDIT_DESC="Allows the users in this group to edit the power" +COM_COMPONENTBUILDER_POWERS_EDIT_OWN="Powers Edit Own" +COM_COMPONENTBUILDER_POWERS_EDIT_OWN_DESC="Allows the users in this group to edit edit own powers created by them" +COM_COMPONENTBUILDER_POWERS_EDIT_STATE="Powers Edit State" +COM_COMPONENTBUILDER_POWERS_EDIT_STATE_DESC="Allows the users in this group to update the state of the power" +COM_COMPONENTBUILDER_POWERS_EDIT_VERSION="Powers Edit Version" +COM_COMPONENTBUILDER_POWERS_EDIT_VERSION_DESC="Allows users in this group to edit versions of version powers" +COM_COMPONENTBUILDER_POWERS_SUBMENU="Powers Submenu" +COM_COMPONENTBUILDER_POWERS_SUBMENU_DESC="Allows the users in this group to submenu of power" +COM_COMPONENTBUILDER_POWER_RUN_EXPANSION_BUTTON_ACCESS="Power Run Expansion Button Access" +COM_COMPONENTBUILDER_POWER_RUN_EXPANSION_BUTTON_ACCESS_DESC="Allows the users in this group to access the run expansion button." COM_COMPONENTBUILDER_SERVERS_ACCESS="Servers Access" COM_COMPONENTBUILDER_SERVERS_ACCESS_DESC="Allows the users in this group to access access servers" COM_COMPONENTBUILDER_SERVERS_BATCH_USE="Servers Batch Use" diff --git a/admin/layouts/power/code_above.php b/admin/layouts/power/code_above.php new file mode 100644 index 000000000..9075940fd --- /dev/null +++ b/admin/layouts/power/code_above.php @@ -0,0 +1,47 @@ + + * @gitea Joomla Component Builder + * @github 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'); + +// get the form +$form = $displayData->getForm(); + +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( + 'system_name', + 'type', + 'power_version' +); + +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + +?> + +
+ + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + +
+ diff --git a/admin/layouts/power/code_fullwidth.php b/admin/layouts/power/code_fullwidth.php new file mode 100644 index 000000000..7d2b9e74c --- /dev/null +++ b/admin/layouts/power/code_fullwidth.php @@ -0,0 +1,51 @@ + + * @gitea Joomla Component Builder + * @github 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'); + +// get the form +$form = $displayData->getForm(); + +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( + 'head', + 'use_selection', + 'main_class_code', + 'load_powers_note', + 'load_selection', + 'note_linked_to_notice', + 'not_required' +); + +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + +?> + +
+ + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + +
+ diff --git a/admin/layouts/power/code_left.php b/admin/layouts/power/code_left.php new file mode 100644 index 000000000..630bf6414 --- /dev/null +++ b/admin/layouts/power/code_left.php @@ -0,0 +1,50 @@ + + * @gitea Joomla Component Builder + * @github 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'); + +// get the form +$form = $displayData->getForm(); + +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( + 'name', + 'description', + 'extends', + 'implements_custom', + 'implements', + 'namespace', + 'extends_custom', + 'add_head' +); + +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + +?> + + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + + diff --git a/admin/layouts/power/code_right.php b/admin/layouts/power/code_right.php new file mode 100644 index 000000000..d128e4dec --- /dev/null +++ b/admin/layouts/power/code_right.php @@ -0,0 +1,45 @@ + + * @gitea Joomla Component Builder + * @github 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'); + +// get the form +$form = $displayData->getForm(); + +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( + 'property_selection', + 'method_selection', + 'namespace_details' +); + +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + +?> + + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + + diff --git a/admin/layouts/power/index.html b/admin/layouts/power/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/admin/layouts/power/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/admin/layouts/power/publishing.php b/admin/layouts/power/publishing.php new file mode 100644 index 000000000..0f6c89856 --- /dev/null +++ b/admin/layouts/power/publishing.php @@ -0,0 +1,48 @@ + + * @gitea Joomla Component Builder + * @github 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'); + +// get the form +$form = $displayData->getForm(); + +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( + 'guid', + 'title', + 'created', + 'created_by', + 'modified', + 'modified_by' +); + +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + +?> + + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + + diff --git a/admin/layouts/power/publlshing.php b/admin/layouts/power/publlshing.php new file mode 100644 index 000000000..27cf89597 --- /dev/null +++ b/admin/layouts/power/publlshing.php @@ -0,0 +1,48 @@ + + * @gitea Joomla Component Builder + * @github 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'); + +// get the form +$form = $displayData->getForm(); + +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( + 'published', + 'ordering', + 'access', + 'version', + 'hits', + 'id' +); + +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + +?> + + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + + diff --git a/admin/models/ajax.php b/admin/models/ajax.php index 39b3d2dca..f87a2578f 100644 --- a/admin/models/ajax.php +++ b/admin/models/ajax.php @@ -15,6 +15,8 @@ defined('_JEXEC') or die('Restricted access'); use Joomla\CMS\MVC\Model\ListModel; use Joomla\Utilities\ArrayHelper; +use Joomla\Registry\Registry; +use VDM\Gitea\Gitea; /** * Componentbuilder Ajax List Model @@ -278,6 +280,60 @@ class ComponentbuilderModelAjax extends ListModel protected function hasCurl() { return function_exists('curl_version'); + } + + public function getWiki($name = 'Home') + { + // get the token if set + $token = JComponentHelper::getParams('com_componentbuilder')->get('gitea_token', false); + + // setup a registry + $options = new Registry; + + // only add if token is set + if ($token) + { + $options->set('access.token', $token); + } + + try + { + // get gitea object + $gitea = new Gitea($options); + + // get the gitea wiki page TODO: we hard coded the page name + $page = $gitea->repo->wiki->getHtml('joomla', 'Component-Builder', 'Home'); + } + catch (DomainException $e) + { + return $this->getTokenFromVDM($e->getMessage()); + } + catch (InvalidArgumentException $e) + { + return $this->getTokenFromVDM($e->getMessage()); + } + catch (Exception $e) + { + return $this->getTokenFromVDM($e->getMessage()); + } + + // get the html + if (isset($page)) + { + return ['page' => $page]; + } + + return $this->getTokenFromVDM(); + } + + protected function getTokenFromVDM($message = null) + { + if ($message) + { + return ['error' => $message]; + } + + return ['error' => JText::_('COM_COMPONENTBUILDER_THE_WIKI_CAN_ONLY_BE_LOADED_WHEN_YOUR_JCB_SYSTEM_HAS_INTERNET_CONNECTION')]; } // Used in joomla_module diff --git a/admin/models/componentbuilder.php b/admin/models/componentbuilder.php index cb2bbd14e..852cb0ee1 100644 --- a/admin/models/componentbuilder.php +++ b/admin/models/componentbuilder.php @@ -15,6 +15,8 @@ defined('_JEXEC') or die('Restricted access'); use Joomla\CMS\MVC\Model\ListModel; use Joomla\Utilities\ArrayHelper; +use Joomla\Registry\Registry; +use VDM\Gitea\Gitea; /** * Componentbuilder List Model @@ -29,7 +31,7 @@ class ComponentbuilderModelComponentbuilder extends ListModel $icons = array(); // view groups array $viewGroups = array( - 'main' => array('png.compiler', 'png.joomla_components', 'png.joomla_modules', 'png.joomla_plugins', 'png||importjcbpackages||index.php?option=com_componentbuilder&view=joomla_components&task=joomla_components.smartImport', 'png.admin_view.add', 'png.admin_views', 'png.custom_admin_view.add', 'png.custom_admin_views', 'png.site_view.add', 'png.site_views', 'png.template.add', 'png.templates', 'png.layouts', 'png.dynamic_get.add', 'png.dynamic_gets', 'png.custom_codes', 'png.placeholders', 'png.libraries', 'png.snippets', 'png.get_snippets', 'png.validation_rules', 'png.fields', 'png.fields.catid_qpo0O0oqp_com_componentbuilder_po0O0oq_field', 'png.fieldtypes', 'png.fieldtypes.catid_qpo0O0oqp_com_componentbuilder_po0O0oq_fieldtype', 'png.language_translations', 'png.servers', 'png.help_documents') + 'main' => array('png.compiler', 'png.joomla_components', 'png.joomla_modules', 'png.joomla_plugins', 'png.powers', 'png||importjcbpackages||index.php?option=com_componentbuilder&view=joomla_components&task=joomla_components.smartImport', 'png.admin_view.add', 'png.admin_views', 'png.custom_admin_view.add', 'png.custom_admin_views', 'png.site_view.add', 'png.site_views', 'png.template.add', 'png.templates', 'png.layouts', 'png.dynamic_get.add', 'png.dynamic_gets', 'png.custom_codes', 'png.placeholders', 'png.libraries', 'png.snippets', 'png.get_snippets', 'png.validation_rules', 'png.field.add', 'png.fields', 'png.fields.catid_qpo0O0oqp_com_componentbuilder_po0O0oq_field', 'png.fieldtypes', 'png.fieldtypes.catid_qpo0O0oqp_com_componentbuilder_po0O0oq_fieldtype', 'png.language_translations', 'png.servers', 'png.help_documents') ); // view access array $viewAccess = array( @@ -52,6 +54,11 @@ class ComponentbuilderModelComponentbuilder extends ListModel 'joomla_plugin.access' => 'joomla_plugin.access', 'joomla_plugins.submenu' => 'joomla_plugin.submenu', 'joomla_plugins.dashboard_list' => 'joomla_plugin.dashboard_list', + 'power.create' => 'power.create', + 'powers.access' => 'power.access', + 'power.access' => 'power.access', + 'powers.submenu' => 'power.submenu', + 'powers.dashboard_list' => 'power.dashboard_list', 'admin_view.create' => 'admin_view.create', 'admin_views.access' => 'admin_view.access', 'admin_view.access' => 'admin_view.access', @@ -118,6 +125,7 @@ class ComponentbuilderModelComponentbuilder extends ListModel 'field.access' => 'field.access', 'fields.submenu' => 'field.submenu', 'fields.dashboard_list' => 'field.dashboard_list', + 'field.dashboard_add' => 'field.dashboard_add', 'fieldtype.create' => 'fieldtype.create', 'fieldtypes.access' => 'fieldtype.access', 'fieldtype.access' => 'fieldtype.access', @@ -403,118 +411,95 @@ class ComponentbuilderModelComponentbuilder extends ListModel } - public function getGithub() - { - // load jquery (not sure why... but else the timeago breaks) - JHtml::_('jquery.framework'); - // get the document to load the scripts - $document = JFactory::getDocument(); - $document->addScript(JURI::root() . "media/com_componentbuilder/js/timeago.js"); - $document->addScriptDeclaration(' - var urlToGetAllOpenIssues = "https://api.github.com/repos/vdm-io/Joomla-Component-Builder/issues?state=open&page=1&per_page=5"; - var urlToGetAllClosedIssues = "https://api.github.com/repos/vdm-io/Joomla-Component-Builder/issues?state=closed&page=1&per_page=5"; - var urlToGetAllReleases = "https://api.github.com/repos/vdm-io/Joomla-Component-Builder/releases?page=1&per_page=5"; - jQuery(document).ready(function () { - jQuery.getJSON(urlToGetAllOpenIssues, function (openissues) { - jQuery("#openissues").html(""); - jQuery.each(openissues, function (i, issue) { - // set time ago - var timeago = jQuery.timeago(new Date(issue.created_at)); - jQuery("#openissues") - .append("

" + issue.title + "

") - .append("\"@" ") - .append("" + issue.user.login + " '.JText::_('COM_COMPONENTBUILDER_OPENED_THIS').' '.JText::_('COM_COMPONENTBUILDER_ISSUE').'-" + issue.number + " (" + timeago + ") ") - .append(marked.parse(issue.body)) - .append("'.JText::_('COM_COMPONENTBUILDER_RESPOND_TO_THIS_ISSUE_ON_GITHUB').'...
"); - }); - }); - jQuery.getJSON(urlToGetAllClosedIssues, function (closedissues) { - jQuery("#closedissues").html(""); - jQuery.each(closedissues, function (i, issue) { - // set time ago - var timeago = jQuery.timeago(new Date(issue.created_at)); - jQuery("#closedissues") - .append("

" + issue.title + "

") - .append("\"@" ") - .append("" + issue.user.login + " '.JText::_('COM_COMPONENTBUILDER_OPENED').' '.JText::_('COM_COMPONENTBUILDER_ISSUE').'-" + issue.number + " (" + timeago + ")") - .append(marked.parse(issue.body)) - .append("'.JText::_('COM_COMPONENTBUILDER_REVIEW_THIS_ISSUE_ON_GITHUB').'...
"); - }); - }); - jQuery.getJSON(urlToGetAllReleases, function (tagreleases) { - // set the update notice while we are at it - var activeVersion = tagreleases[0].tag_name.substring(1); - if (activeVersion === manifest.version) { - // local version is in sync with latest release - jQuery(".update-notice").html("'.JText::_('COM_COMPONENTBUILDER_UP_TO_DATE').'"); - } else { - // split versions in to array - var activeVersionArray = activeVersion.split("."); - var localVersionArray = manifest.version.split("."); - if ((+localVersionArray[0] > +activeVersionArray[0]) || - (+localVersionArray[0] == +activeVersionArray[0] && +localVersionArray[1] > +activeVersionArray[1]) || - (+localVersionArray[0] == +activeVersionArray[0] && +localVersionArray[1] == +activeVersionArray[1] && +localVersionArray[2] > +activeVersionArray[2])) { - // local version head latest release - jQuery(".update-notice").html("'.JText::_('COM_COMPONENTBUILDER_BETA_RELEASE').'"); - } else { - // local version behind latest release - jQuery(".update-notice").html("'.JText::_('COM_COMPONENTBUILDER_OUT_OF_DATE').'"); - } - } - // set the taged releases - jQuery("#tagreleases").html(""); - jQuery.each(tagreleases, function (i, tagrelease) { - // set active release - var activeNotice = ""; - if (i === 0) { - var activeNotice = " '.JText::_('COM_COMPONENTBUILDER_LATEST_RELEASE').'

"; - } - // set time ago - var timeago = jQuery.timeago(new Date(tagrelease.published_at)); - jQuery("#tagreleases") - .append("

" + tagrelease.name + "

") - .append(activeNotice) - .append("\"@" ") - .append("" + tagrelease.author.login + " '.JText::_('COM_COMPONENTBUILDER_RELEASED_THIS').' " + tagrelease.tag_name+ " (" + timeago + ")") - .append(marked.parse(tagrelease.body)) - .append(" " + tagrelease.assets[0].name + " (" + tagrelease.assets[0].download_count + ") ") - .append("| '.JText::_('COM_COMPONENTBUILDER_OPEN_ON_GITHUB').'...
"); - }); - }); - });'); - $create = '
'; - $moreopen = ''.JText::_('COM_COMPONENTBUILDER_VIEW_MORE_ISSUES_ON_GITHUB').'... '; - $moreclosed = ''.JText::_('COM_COMPONENTBUILDER_VIEW_MORE_ISSUES_ON_GITHUB').'... '; - $viewissues = ''.JText::_('COM_COMPONENTBUILDER_VIEW_MORE_RELEASES_ON_GITHUB').'... '; - - return (object) array( - 'openissues' => $create.'
'.JText::_('COM_COMPONENTBUILDER_A_FEW_OPEN_ISSUES_FROM_GITHUB_IS_LOADING').'..
'.$moreopen, - 'closedissues' => $create.'
'.JText::_('COM_COMPONENTBUILDER_A_FEW_CLOSED_ISSUES_FROM_GITHUB_IS_LOADING').'..
'.$moreclosed, - 'tagreleases' => '
'.JText::_('COM_COMPONENTBUILDER_LAST_FEW_RELEASES_FROM_GITHUB_IS_LOADING').'..
'.$viewissues - ); - } - public function getWiki() { + // the call URL + $call_url = JUri::base() . 'index.php?option=com_componentbuilder&task=ajax.getWiki&format=json&raw=true&' . JSession::getFormToken() . '=1&name=Home'; $document = JFactory::getDocument(); $document->addScriptDeclaration(' - var gewiki = "https://raw.githubusercontent.com/wiki/vdm-io/Joomla-Component-Builder/Home.md"; - jQuery(document).ready(function () { - jQuery.get(gewiki) - .success(function(wiki) { - jQuery("#wiki-md").html(marked.parse(wiki)); - }) - .error(function(jqXHR, textStatus, errorThrown) { - jQuery("#wiki-md").html("'.JText::_('COM_COMPONENTBUILDER_PLEASE_CHECK_AGAIN_LATTER').'"); - }); + fetch("' . $call_url . '").then((response) => { + if (response.ok) { + return response.json(); + } + }).then((result) => { + if (typeof result.page !== "undefined") { + document.getElementById("wiki-md").innerHTML = result.page; + } else if (typeof result.error !== "undefined") { + document.getElementById("wiki-md-error").innerHTML = result.error + } });'); - return '
'.JText::_('COM_COMPONENTBUILDER_THE_WIKI_IS_LOADING').'..
'; + return '
'.JText::_('COM_COMPONENTBUILDER_THE_WIKI_IS_LOADING').'..
'; + } + + + public function getGitea() + { + // get the document + $document = JFactory::getDocument(); + // get the token if set + $token = JComponentHelper::getParams('com_componentbuilder')->get('gitea_token', false); + // only add if token is set + if ($token) + { + // setup a registry + $options = new Registry; + $options->set('access.token', $token); + // get the gitea http + try + { + // get gitea object + $gitea = new Gitea($options); + // get a list of all the repos tags + $tags = $gitea->repo->getListTags('joomla', 'Component-Builder'); + } + catch (DomainException $m) + { + $token = false; + } + // get the document to load the scripts + if ($token && isset($tags[0]) && isset($tags[0]->name)) + { + // download link of the latest version + $download = "https://git.vdm.dev/api/v1/repos/joomla/Component-Builder/archive/" . $tags[0]->name . ".zip?access_token=" . $token; + // load the JavaScript to the page + $document->addScriptDeclaration(' + jQuery(document).ready(function () { + var activeVersion = "' . trim($tags[0]->name, 'vV') . '"; + if (activeVersion === manifest.version) { + // local version is in sync with latest release + jQuery(".update-notice").html("' . JText::_('COM_COMPONENTBUILDER_UP_TO_DATE') . '"); + } else { + // split versions in to array + var activeVersionArray = activeVersion.split("."); + var localVersionArray = manifest.version.split("."); + if ((+localVersionArray[0] > +activeVersionArray[0]) || + (+localVersionArray[0] == +activeVersionArray[0] && +localVersionArray[1] > +activeVersionArray[1]) || + (+localVersionArray[0] == +activeVersionArray[0] && +localVersionArray[1] == +activeVersionArray[1] && +localVersionArray[2] > +activeVersionArray[2])) { + // local version head latest release + jQuery(".update-notice").html("' . JText::_('COM_COMPONENTBUILDER_BETA_RELEASE') . '"); + } else { + // local version behind latest release + jQuery(".update-notice").html("' . JText::_('COM_COMPONENTBUILDER_OUT_OF_DATE') . ' ' . + JText::_('COM_COMPONENTBUILDER_DOWNLOAD_UPDATE') . '!"); + } + } + });'); + + return; + } + } + // the URL + $url = 'https://git.vdm.dev/user/settings/applications'; + // give a notice to get the token + $document->addScriptDeclaration( + 'jQuery(document).ready(function () {jQuery(".update-notice").html("' . + JText::_('COM_COMPONENTBUILDER_GET_TOKEN') . '!");});' + ); } - public function getNoticeboard() { @@ -590,29 +575,6 @@ jQuery(document).ready( function($) { return '
'.JText::_('COM_COMPONENTBUILDER_THE_NOTICE_BOARD_IS_LOADING').'..
'; } - public function getProboard() - { - // get the document to load the scripts - $document = JFactory::getDocument(); - $document->addScriptDeclaration(' - var proboard = "https://vdm.bz/componentbuilder-pro-noticeboard-md"; - jQuery(document).ready(function () { - jQuery.get(proboard) - .success(function(board) { - if (board.length > 5) { - jQuery("#proboard-md").html(marked.parse(board)); - } else { - jQuery("#proboard-md").html("'.JText::_('COM_COMPONENTBUILDER_ALL_IS_GOOD_PLEASE_CHECK_AGAIN_LATTER').'"); - } - }) - .error(function(jqXHR, textStatus, errorThrown) { - jQuery("#proboard-md").html("'.JText::_('COM_COMPONENTBUILDER_ALL_IS_GOOD_PLEASE_CHECK_AGAIN_LATTER').'"); - }); - });'); - - return '
'.JText::_('COM_COMPONENTBUILDER_THE_PRO_BOARD_IS_LOADING').'..
'; - } - public function getReadme() { $document = JFactory::getDocument(); diff --git a/admin/models/fields/adminlistvieworderfields.php b/admin/models/fields/adminlistvieworderfields.php new file mode 100644 index 000000000..c7b65bec9 --- /dev/null +++ b/admin/models/fields/adminlistvieworderfields.php @@ -0,0 +1,133 @@ + + * @gitea Joomla Component Builder + * @github 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'); + +// import the list field type +jimport('joomla.form.helper'); +JFormHelper::loadFieldClass('list'); + +/** + * Adminlistvieworderfields Form Field class for the Componentbuilder component + */ +class JFormFieldAdminlistvieworderfields extends JFormFieldList +{ + /** + * The adminlistvieworderfields field type. + * + * @var string + */ + public $type = 'adminlistvieworderfields'; + + /** + * Method to get a list of options for a list input. + * + * @return array An array of JHtml options. + */ + protected function getOptions() + { + // load the db object + $db = JFactory::getDBO(); + // get the input from url + $jinput = JFactory::getApplication()->input; + // get the id + $adminView = $jinput->getInt('id', 0); + // set the field trackers + $fieldIds = array(); + $sortIds = array(); + // check if we have an admin view + if (is_numeric($adminView) && $adminView >= 1) + { + // get all the fields linked to the admin view + if ($addFields = ComponentbuilderHelper::getVar('admin_fields', (int) $adminView, 'admin_view', 'addfields')) + { + if (ComponentbuilderHelper::checkJson($addFields)) + { + $addFields = json_decode($addFields, true); + if (ComponentbuilderHelper::checkArray($addFields)) + { + foreach($addFields as $addField) + { + // admin list view and ordering + if (isset($addField['field']) && isset($addField['list']) && ($addField['list'] == 1 || $addField['list'] == 3) + && isset($addField['sort']) && $addField['sort']) + { + $fieldIds[(int) $addField['field']] = (int) $addField['field']; + } + // do track all fields set as sorted + if (isset($addField['field']) && isset($addField['sort']) && $addField['sort']) + { + $sortIds[(int) $addField['field']] = (int) $addField['field']; + } + } + } + } + } + // get all the fields that are also having a relationship on the list view as sorted + if ($addFields = ComponentbuilderHelper::getVar('admin_fields_relations', (int) $adminView, 'admin_view', 'addrelations')) + { + if (ComponentbuilderHelper::checkJson($addFields)) + { + $addFields = json_decode($addFields, true); + if (ComponentbuilderHelper::checkArray($addFields)) + { + foreach($addFields as $addField) + { + // admin list view and ordering + if (isset($addField['joinfields']) && ComponentbuilderHelper::checkArray($addField['joinfields'])) + { + foreach($addField['joinfields'] as $joinfield) + { + if (isset($sortIds[$joinfield])) + { + $fieldIds[(int) $joinfield] = (int) $joinfield; + } + } + } + } + } + } + } + // filter by fields linked + if (ComponentbuilderHelper::checkArray($fieldIds)) + { + $query = $db->getQuery(true); + $query->select($db->quoteName(array('a.id','a.name', 'a.xml', 'b.name'),array('id','name', 'xml', 'type'))); + $query->from($db->quoteName('#__componentbuilder_field', 'a')); + $query->join('LEFT', '#__componentbuilder_fieldtype AS b ON b.id = a.fieldtype'); + $query->where($db->quoteName('a.published') . ' >= 1'); + // only load these fields + $query->where($db->quoteName('a.id') . ' IN (' . implode(',', $fieldIds) . ')'); + $query->order('a.name ASC'); + $db->setQuery((string)$query); + $items = $db->loadObjectList(); + $options = array(); + if ($items) + { + $options[] = JHtml::_('select.option', '', JText::_('PLG_CONTENT_COMPONENTBUILDERFIELDORDERINGTABS_SELECT_AN_OPTION')); + $options[] = JHtml::_('select.option', -1, JText::_('PLG_CONTENT_COMPONENTBUILDERFIELDORDERINGTABS_ID'). ' [ id - text ]'); + $options[] = JHtml::_('select.option', -2, JText::_('PLG_CONTENT_COMPONENTBUILDERFIELDORDERINGTABS_ORDERING'). ' [ ordering - number ]'); + $options[] = JHtml::_('select.option', -3, JText::_('PLG_CONTENT_COMPONENTBUILDERFIELDORDERINGTABS_STATUS'). ' [ published - list ]'); + foreach($items as $item) + { + // get the field name (TODO this could slow down the system so we will need to improve on this) + $field_name = ComponentbuilderHelper::safeFieldName(ComponentbuilderHelper::getBetween(json_decode($item->xml),'name="','"')); + $options[] = JHtml::_('select.option', $item->id, $item->name . ' [ ' . $field_name . ' - ' . $item->type . ' ]'); + } + } + return $options; + } + } + return false; + } +} diff --git a/admin/models/fields/classpowers.php b/admin/models/fields/classpowers.php new file mode 100644 index 000000000..c4000312c --- /dev/null +++ b/admin/models/fields/classpowers.php @@ -0,0 +1,196 @@ + + * @gitea Joomla Component Builder + * @github 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'); + +// import the list field type +jimport('joomla.form.helper'); +JFormHelper::loadFieldClass('list'); + +/** + * Classpowers Form Field class for the Componentbuilder component + */ +class JFormFieldClasspowers extends JFormFieldList +{ + /** + * The classpowers field type. + * + * @var string + */ + public $type = 'classpowers'; + + /** + * Override to add new button + * + * @return string The field input markup. + * + * @since 3.2 + */ + protected function getInput() + { + // see if we should add buttons + $set_button = $this->getAttribute('button'); + // get html + $html = parent::getInput(); + // if true set button + if ($set_button === 'true') + { + $button = array(); + $script = array(); + $button_code_name = $this->getAttribute('name'); + // get the input from url + $app = JFactory::getApplication(); + $jinput = $app->input; + // get the view name & id + $values = $jinput->getArray(array( + 'id' => 'int', + 'view' => 'word' + )); + // check if new item + $ref = ''; + $refJ = ''; + if (!is_null($values['id']) && strlen($values['view'])) + { + // only load referral if not new item. + $ref = '&ref=' . $values['view'] . '&refid=' . $values['id']; + $refJ = '&ref=' . $values['view'] . '&refid=' . $values['id']; + // get the return value. + $_uri = (string) JUri::getInstance(); + $_return = urlencode(base64_encode($_uri)); + // load return value. + $ref .= '&return=' . $_return; + $refJ .= '&return=' . $_return; + } + // get button label + $button_label = trim($button_code_name); + $button_label = preg_replace('/_+/', ' ', $button_label); + $button_label = preg_replace('/\s+/', ' ', $button_label); + $button_label = preg_replace("/[^A-Za-z ]/", '', $button_label); + $button_label = ucfirst(strtolower($button_label)); + // get user object + $user = JFactory::getUser(); + // only add if user allowed to create power + if ($user->authorise('power.create', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area. + { + // build Create button + $button[] = ' + '; + } + // only add if user allowed to edit power + if ($user->authorise('power.edit', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area. + { + // build edit button + $button[] = ''; + // build script + $script[] = " + jQuery(document).ready(function() { + jQuery('#adminForm').on('change', '#jform_".$button_code_name."',function (e) { + e.preventDefault(); + var ".$button_code_name."Value = jQuery('#jform_".$button_code_name."').val(); + ".$button_code_name."Button(".$button_code_name."Value); + }); + var ".$button_code_name."Value = jQuery('#jform_".$button_code_name."').val(); + ".$button_code_name."Button(".$button_code_name."Value); + }); + function ".$button_code_name."Button(value) { + if (value > 0) { + // hide the create button + jQuery('#".$button_code_name."Create').hide(); + // show edit button + jQuery('#".$button_code_name."Edit').show(); + var url = 'index.php?option=com_componentbuilder&view=powers&task=power.edit&id='+value+'".$refJ."'; + jQuery('#".$button_code_name."Edit').attr('href', url); + } else { + // show the create button + jQuery('#".$button_code_name."Create').show(); + // hide edit button + jQuery('#".$button_code_name."Edit').hide(); + } + }"; + } + // check if button was created for power field. + if (is_array($button) && count($button) > 0) + { + // Load the needed script. + $document = JFactory::getDocument(); + $document->addScriptDeclaration(implode(' ',$script)); + // return the button attached to input field. + return '
' .$html . implode('',$button).'
'; + } + } + return $html; + } + + /** + * Method to get a list of options for a list input. + * + * @return array An array of JHtml options. + */ + protected function getOptions() + { + // Get the user object. + $user = JFactory::getUser(); + // Get the databse object. + $db = JFactory::getDBO(); + $query = $db->getQuery(true); + $query->select($db->quoteName(array('a.guid','a.name','a.system_name','a.type','a.power_version'),array('guid','extends_name','system_name','type','version'))); + $query->from($db->quoteName('#__componentbuilder_power', 'a')); + $query->where($db->quoteName('a.published') . ' >= 1'); + $query->where('(' . $db->quoteName('a.type') . ' = ' . $db->quote('class') . ' OR ' . $db->quoteName('a.type') . ' = ' . $db->quote('abstract class') . ')'); + $query->order('a.name ASC'); + $query->order('a.type ASC'); + // Implement View Level Access (if set in table) + if (!$user->authorise('core.options', 'com_componentbuilder')) + { + $columns = $db->getTableColumns('#__componentbuilder_power'); + if(isset($columns['access'])) + { + $groups = implode(',', $user->getAuthorisedViewLevels()); + $query->where('a.access IN (' . $groups . ')'); + } + } + // get the input + $jinput = JFactory::getApplication()->input; + // get the id + $power_id = $jinput->getInt('id', 0); + // if we have an id we remove all classes of the same namespace and name + if ($power_id > 0 && ($exclude_powers = ComponentbuilderHelper::excludePowers($power_id)) !== false) + { + $query->where('a.id NOT IN (' . implode(',', $exclude_powers) . ')'); + } + $db->setQuery((string)$query); + $items = $db->loadObjectList(); + $options = array(); + // if none was found, we add this to set an alternative to set custom + if (!$items) + { + $options[] = JHtml::_('select.option', '', JText::_('COM_COMPONENTBUILDER_NONE_FOUND')); + } + if ($items) + { + if ($this->multiple === false) + { + $options[] = JHtml::_('select.option', '', JText::_('COM_COMPONENTBUILDER_SELECT_AN_OPTION')); + } + foreach($items as $item) + { + $options[] = JHtml::_('select.option', $item->guid, $item->system_name . ' [' . $item->type . ' ' . $item->extends_name . '] (v' . $item->version . ')'); + } + } + // set the other option to enter text + $options[] = JHtml::_('select.option', -1, JText::_('COM_COMPONENTBUILDER_SET_CUSTOM')); + return $options; + } +} diff --git a/admin/models/fields/excludedlanguages.php b/admin/models/fields/excludedlanguages.php new file mode 100644 index 000000000..f6c1e0037 --- /dev/null +++ b/admin/models/fields/excludedlanguages.php @@ -0,0 +1,177 @@ + + * @gitea Joomla Component Builder + * @github 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'); + +// import the list field type +jimport('joomla.form.helper'); +JFormHelper::loadFieldClass('list'); + +/** + * Excludedlanguages Form Field class for the Componentbuilder component + */ +class JFormFieldExcludedlanguages extends JFormFieldList +{ + /** + * The excludedlanguages field type. + * + * @var string + */ + public $type = 'excludedlanguages'; + + /** + * Override to add new button + * + * @return string The field input markup. + * + * @since 3.2 + */ + protected function getInput() + { + // see if we should add buttons + $set_button = $this->getAttribute('button'); + // get html + $html = parent::getInput(); + // if true set button + if ($set_button === 'true') + { + $button = array(); + $script = array(); + $button_code_name = $this->getAttribute('name'); + // get the input from url + $app = JFactory::getApplication(); + $jinput = $app->input; + // get the view name & id + $values = $jinput->getArray(array( + 'id' => 'int', + 'view' => 'word' + )); + // check if new item + $ref = ''; + $refJ = ''; + if (!is_null($values['id']) && strlen($values['view'])) + { + // only load referral if not new item. + $ref = '&ref=' . $values['view'] . '&refid=' . $values['id']; + $refJ = '&ref=' . $values['view'] . '&refid=' . $values['id']; + // get the return value. + $_uri = (string) JUri::getInstance(); + $_return = urlencode(base64_encode($_uri)); + // load return value. + $ref .= '&return=' . $_return; + $refJ .= '&return=' . $_return; + } + // get button label + $button_label = trim($button_code_name); + $button_label = preg_replace('/_+/', ' ', $button_label); + $button_label = preg_replace('/\s+/', ' ', $button_label); + $button_label = preg_replace("/[^A-Za-z ]/", '', $button_label); + $button_label = ucfirst(strtolower($button_label)); + // get user object + $user = JFactory::getUser(); + // only add if user allowed to create language + if ($user->authorise('language.create', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area. + { + // build Create button + $button[] = ' + '; + } + // only add if user allowed to edit language + if ($user->authorise('language.edit', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area. + { + // build edit button + $button[] = ''; + // build script + $script[] = " + jQuery(document).ready(function() { + jQuery('#adminForm').on('change', '#jform_".$button_code_name."',function (e) { + e.preventDefault(); + var ".$button_code_name."Value = jQuery('#jform_".$button_code_name."').val(); + ".$button_code_name."Button(".$button_code_name."Value); + }); + var ".$button_code_name."Value = jQuery('#jform_".$button_code_name."').val(); + ".$button_code_name."Button(".$button_code_name."Value); + }); + function ".$button_code_name."Button(value) { + if (value > 0) { + // hide the create button + jQuery('#".$button_code_name."Create').hide(); + // show edit button + jQuery('#".$button_code_name."Edit').show(); + var url = 'index.php?option=com_componentbuilder&view=languages&task=language.edit&id='+value+'".$refJ."'; + jQuery('#".$button_code_name."Edit').attr('href', url); + } else { + // show the create button + jQuery('#".$button_code_name."Create').show(); + // hide edit button + jQuery('#".$button_code_name."Edit').hide(); + } + }"; + } + // check if button was created for language field. + if (is_array($button) && count($button) > 0) + { + // Load the needed script. + $document = JFactory::getDocument(); + $document->addScriptDeclaration(implode(' ',$script)); + // return the button attached to input field. + return '
' .$html . implode('',$button).'
'; + } + } + return $html; + } + + /** + * Method to get a list of options for a list input. + * + * @return array An array of JHtml options. + */ + protected function getOptions() + { + $db = JFactory::getDBO(); + $query = $db->getQuery(true); + $query->select($db->quoteName(array('a.langtag','a.name'),array('langtag','languages_name'))); + $query->from($db->quoteName('#__componentbuilder_language', 'a')); + $query->where($db->quoteName('a.published') . ' >= 1'); + $query->order('a.langtag ASC'); + $db->setQuery((string)$query); + $items = $db->loadObjectList(); + // add the main language + $main_lang = trim(JComponentHelper::getParams('com_componentbuilder')->get('language', 'en-GB')); + // check if any language was added + $wasAdded = false; + $options = array(); + if ($items) + { + $options[] = JHtml::_('select.option', '', 'Select an option'); + foreach($items as $item) + { + $item->langtag = trim($item->langtag); + // do not add main language + if ($main_lang !== $item->langtag) + { + $options[] = JHtml::_('select.option', $item->langtag, $item->languages_name . ' (' .$item->langtag.')'); + $wasAdded = true; + } + } + } + // now if none was added give notice + if (!$wasAdded) + { + $options[] = JHtml::_('select.option', '', 'Add languages to select'); + } + return $options; + } +} diff --git a/admin/models/fields/interfacepowers.php b/admin/models/fields/interfacepowers.php new file mode 100644 index 000000000..b61c2f745 --- /dev/null +++ b/admin/models/fields/interfacepowers.php @@ -0,0 +1,191 @@ + + * @gitea Joomla Component Builder + * @github 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'); + +// import the list field type +jimport('joomla.form.helper'); +JFormHelper::loadFieldClass('list'); + +/** + * Interfacepowers Form Field class for the Componentbuilder component + */ +class JFormFieldInterfacepowers extends JFormFieldList +{ + /** + * The interfacepowers field type. + * + * @var string + */ + public $type = 'interfacepowers'; + + /** + * Override to add new button + * + * @return string The field input markup. + * + * @since 3.2 + */ + protected function getInput() + { + // see if we should add buttons + $set_button = $this->getAttribute('button'); + // get html + $html = parent::getInput(); + // if true set button + if ($set_button === 'true') + { + $button = array(); + $script = array(); + $button_code_name = $this->getAttribute('name'); + // get the input from url + $app = JFactory::getApplication(); + $jinput = $app->input; + // get the view name & id + $values = $jinput->getArray(array( + 'id' => 'int', + 'view' => 'word' + )); + // check if new item + $ref = ''; + $refJ = ''; + if (!is_null($values['id']) && strlen($values['view'])) + { + // only load referral if not new item. + $ref = '&ref=' . $values['view'] . '&refid=' . $values['id']; + $refJ = '&ref=' . $values['view'] . '&refid=' . $values['id']; + // get the return value. + $_uri = (string) JUri::getInstance(); + $_return = urlencode(base64_encode($_uri)); + // load return value. + $ref .= '&return=' . $_return; + $refJ .= '&return=' . $_return; + } + // get button label + $button_label = trim($button_code_name); + $button_label = preg_replace('/_+/', ' ', $button_label); + $button_label = preg_replace('/\s+/', ' ', $button_label); + $button_label = preg_replace("/[^A-Za-z ]/", '', $button_label); + $button_label = ucfirst(strtolower($button_label)); + // get user object + $user = JFactory::getUser(); + // only add if user allowed to create power + if ($user->authorise('power.create', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area. + { + // build Create button + $button[] = ' + '; + } + // only add if user allowed to edit power + if ($user->authorise('power.edit', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area. + { + // build edit button + $button[] = ''; + // build script + $script[] = " + jQuery(document).ready(function() { + jQuery('#adminForm').on('change', '#jform_".$button_code_name."',function (e) { + e.preventDefault(); + var ".$button_code_name."Value = jQuery('#jform_".$button_code_name."').val(); + ".$button_code_name."Button(".$button_code_name."Value); + }); + var ".$button_code_name."Value = jQuery('#jform_".$button_code_name."').val(); + ".$button_code_name."Button(".$button_code_name."Value); + }); + function ".$button_code_name."Button(value) { + if (value > 0) { + // hide the create button + jQuery('#".$button_code_name."Create').hide(); + // show edit button + jQuery('#".$button_code_name."Edit').show(); + var url = 'index.php?option=com_componentbuilder&view=powers&task=power.edit&id='+value+'".$refJ."'; + jQuery('#".$button_code_name."Edit').attr('href', url); + } else { + // show the create button + jQuery('#".$button_code_name."Create').show(); + // hide edit button + jQuery('#".$button_code_name."Edit').hide(); + } + }"; + } + // check if button was created for power field. + if (is_array($button) && count($button) > 0) + { + // Load the needed script. + $document = JFactory::getDocument(); + $document->addScriptDeclaration(implode(' ',$script)); + // return the button attached to input field. + return '
' .$html . implode('',$button).'
'; + } + } + return $html; + } + + /** + * Method to get a list of options for a list input. + * + * @return array An array of JHtml options. + */ + protected function getOptions() + { + // Get the user object. + $user = JFactory::getUser(); + // Get the databse object. + $db = JFactory::getDBO(); + $query = $db->getQuery(true); + $query->select($db->quoteName(array('a.guid','a.name','a.system_name','a.type','a.power_version'),array('guid','implements_name','system_name','type','version'))); + $query->from($db->quoteName('#__componentbuilder_power', 'a')); + $query->where($db->quoteName('a.published') . ' >= 1'); + $query->where($db->quoteName('a.type') . ' = ' . $db->quote('interface')); + $query->order('a.name ASC'); + $query->order('a.type ASC'); + // Implement View Level Access (if set in table) + if (!$user->authorise('core.options', 'com_componentbuilder')) + { + $columns = $db->getTableColumns('#__componentbuilder_power'); + if(isset($columns['access'])) + { + $groups = implode(',', $user->getAuthorisedViewLevels()); + $query->where('a.access IN (' . $groups . ')'); + } + } + // get the input + $jinput = JFactory::getApplication()->input; + // get the id + $power_id = $jinput->getInt('id', 0); + // if we have an id we remove all classes of the same namespace and name + if ($power_id > 0 && ($exclude_powers = ComponentbuilderHelper::excludePowers($power_id)) !== false) + { + $query->where('a.id NOT IN (' . implode(',', $exclude_powers) . ')'); + } + $db->setQuery((string)$query); + $items = $db->loadObjectList(); + $options = array(); + // set the other option to enter text + $options[] = JHtml::_('select.option', -1, JText::_('COM_COMPONENTBUILDER_SET_CUSTOM')); + if ($items) + { + if ($this->multiple === false) + { + $options[] = JHtml::_('select.option', '', JText::_('COM_COMPONENTBUILDER_SELECT_AN_OPTION')); + } + foreach($items as $item) + { + $options[] = JHtml::_('select.option', $item->guid, $item->system_name . ' (v' . $item->version . ') [' . $item->type . ' ' . $item->implements_name . ']'); + } + } + return $options; + } +} diff --git a/admin/models/fields/joomlacomponents.php b/admin/models/fields/joomlacomponents.php index fd2945fef..32b209af4 100644 --- a/admin/models/fields/joomlacomponents.php +++ b/admin/models/fields/joomlacomponents.php @@ -36,7 +36,7 @@ class JFormFieldJoomlacomponents extends JFormFieldList */ protected function getOptions() { - $db = JFactory::getDBO(); + $db = JFactory::getDBO(); $query = $db->getQuery(true); $query->select($db->quoteName(array('a.id','a.system_name'),array('id','components_system_name'))); $query->from($db->quoteName('#__componentbuilder_joomla_component', 'a')); diff --git a/admin/models/fields/joomlaplugins.php b/admin/models/fields/joomlaplugins.php index ce13f5984..1ed1b6c73 100644 --- a/admin/models/fields/joomlaplugins.php +++ b/admin/models/fields/joomlaplugins.php @@ -29,6 +29,110 @@ class JFormFieldJoomlaplugins extends JFormFieldList */ public $type = 'joomlaplugins'; + /** + * Override to add new button + * + * @return string The field input markup. + * + * @since 3.2 + */ + protected function getInput() + { + // see if we should add buttons + $set_button = $this->getAttribute('button'); + // get html + $html = parent::getInput(); + // if true set button + if ($set_button === 'true') + { + $button = array(); + $script = array(); + $button_code_name = $this->getAttribute('name'); + // get the input from url + $app = JFactory::getApplication(); + $jinput = $app->input; + // get the view name & id + $values = $jinput->getArray(array( + 'id' => 'int', + 'view' => 'word' + )); + // check if new item + $ref = ''; + $refJ = ''; + if (!is_null($values['id']) && strlen($values['view'])) + { + // only load referral if not new item. + $ref = '&ref=' . $values['view'] . '&refid=' . $values['id']; + $refJ = '&ref=' . $values['view'] . '&refid=' . $values['id']; + // get the return value. + $_uri = (string) JUri::getInstance(); + $_return = urlencode(base64_encode($_uri)); + // load return value. + $ref .= '&return=' . $_return; + $refJ .= '&return=' . $_return; + } + // get button label + $button_label = trim($button_code_name); + $button_label = preg_replace('/_+/', ' ', $button_label); + $button_label = preg_replace('/\s+/', ' ', $button_label); + $button_label = preg_replace("/[^A-Za-z ]/", '', $button_label); + $button_label = ucfirst(strtolower($button_label)); + // get user object + $user = JFactory::getUser(); + // only add if user allowed to create joomla_plugin + if ($user->authorise('joomla_plugin.create', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area. + { + // build Create button + $button[] = ' + '; + } + // only add if user allowed to edit joomla_plugin + if ($user->authorise('joomla_plugin.edit', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area. + { + // build edit button + $button[] = ''; + // build script + $script[] = " + jQuery(document).ready(function() { + jQuery('#adminForm').on('change', '#jform_".$button_code_name."',function (e) { + e.preventDefault(); + var ".$button_code_name."Value = jQuery('#jform_".$button_code_name."').val(); + ".$button_code_name."Button(".$button_code_name."Value); + }); + var ".$button_code_name."Value = jQuery('#jform_".$button_code_name."').val(); + ".$button_code_name."Button(".$button_code_name."Value); + }); + function ".$button_code_name."Button(value) { + if (value > 0) { + // hide the create button + jQuery('#".$button_code_name."Create').hide(); + // show edit button + jQuery('#".$button_code_name."Edit').show(); + var url = 'index.php?option=com_componentbuilder&view=joomla_plugins&task=joomla_plugin.edit&id='+value+'".$refJ."'; + jQuery('#".$button_code_name."Edit').attr('href', url); + } else { + // show the create button + jQuery('#".$button_code_name."Create').show(); + // hide edit button + jQuery('#".$button_code_name."Edit').hide(); + } + }"; + } + // check if button was created for joomla_plugin field. + if (is_array($button) && count($button) > 0) + { + // Load the needed script. + $document = JFactory::getDocument(); + $document->addScriptDeclaration(implode(' ',$script)); + // return the button attached to input field. + return '
' .$html . implode('',$button).'
'; + } + } + return $html; + } + /** * Method to get a list of options for a list input. * diff --git a/admin/models/fields/linkedviewsorderfields.php b/admin/models/fields/linkedviewsorderfields.php new file mode 100644 index 000000000..a0dc0cbb5 --- /dev/null +++ b/admin/models/fields/linkedviewsorderfields.php @@ -0,0 +1,100 @@ + + * @gitea Joomla Component Builder + * @github 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'); + +// import the list field type +jimport('joomla.form.helper'); +JFormHelper::loadFieldClass('list'); + +/** + * Linkedviewsorderfields Form Field class for the Componentbuilder component + */ +class JFormFieldLinkedviewsorderfields extends JFormFieldList +{ + /** + * The linkedviewsorderfields field type. + * + * @var string + */ + public $type = 'linkedviewsorderfields'; + + /** + * Method to get a list of options for a list input. + * + * @return array An array of JHtml options. + */ + protected function getOptions() + { + // load the db object + $db = JFactory::getDBO(); + // get the input from url + $jinput = JFactory::getApplication()->input; + // get the id + $adminView = $jinput->getInt('id', 0); + // check if we have an admin view + if (is_numeric($adminView) && $adminView >= 1) + { + // get all the fields linked to the admin view + if ($addFields = ComponentbuilderHelper::getVar('admin_fields', (int) $adminView, 'admin_view', 'addfields')) + { + if (ComponentbuilderHelper::checkJson($addFields)) + { + $addFields = json_decode($addFields, true); + if (ComponentbuilderHelper::checkArray($addFields)) + { + foreach($addFields as $addField) + { + // linked list views and ordering + if (isset($addField['field']) && isset($addField['list']) && ($addField['list'] == 1 || $addField['list'] == 4) + && isset($addField['sort']) && $addField['sort']) + { + $fieldIds[] = (int) $addField['field']; + } + } + } + } + } + // filter by fields linked + if (ComponentbuilderHelper::checkArray($fieldIds)) + { + $query = $db->getQuery(true); + $query->select($db->quoteName(array('a.id','a.name', 'a.xml', 'b.name'),array('id','name', 'xml', 'type'))); + $query->from($db->quoteName('#__componentbuilder_field', 'a')); + $query->join('LEFT', '#__componentbuilder_fieldtype AS b ON b.id = a.fieldtype'); + $query->where($db->quoteName('a.published') . ' >= 1'); + // only load these fields + $query->where($db->quoteName('a.id') . ' IN (' . implode(',', $fieldIds) . ')'); + $query->order('a.name ASC'); + $db->setQuery((string)$query); + $items = $db->loadObjectList(); + $options = array(); + if ($items) + { + $options[] = JHtml::_('select.option', '', JText::_('PLG_CONTENT_COMPONENTBUILDERFIELDORDERINGTABS_SELECT_AN_OPTION')); + $options[] = JHtml::_('select.option', -1, JText::_('PLG_CONTENT_COMPONENTBUILDERFIELDORDERINGTABS_ID'). ' [ id - text ]'); + $options[] = JHtml::_('select.option', -2, JText::_('PLG_CONTENT_COMPONENTBUILDERFIELDORDERINGTABS_ORDERING'). ' [ ordering - number ]'); + $options[] = JHtml::_('select.option', -3, JText::_('PLG_CONTENT_COMPONENTBUILDERFIELDORDERINGTABS_STATUS'). ' [ published - list ]'); + foreach($items as $item) + { + // get the field name (TODO this could slow down the system so we will need to improve on this) + $field_name = ComponentbuilderHelper::safeFieldName(ComponentbuilderHelper::getBetween(json_decode($item->xml),'name="','"')); + $options[] = JHtml::_('select.option', $item->id, $item->name . ' [ ' . $field_name . ' - ' . $item->type . ' ]'); + } + } + return $options; + } + } + return false; + } +} diff --git a/admin/models/fields/namespaces.php b/admin/models/fields/namespaces.php new file mode 100644 index 000000000..f486a5b69 --- /dev/null +++ b/admin/models/fields/namespaces.php @@ -0,0 +1,90 @@ + + * @gitea Joomla Component Builder + * @github 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'); + +// import the list field type +jimport('joomla.form.helper'); +JFormHelper::loadFieldClass('list'); + +/** + * Namespaces Form Field class for the Componentbuilder component + */ +class JFormFieldNamespaces extends JFormFieldList +{ + /** + * The namespaces field type. + * + * @var string + */ + public $type = 'namespaces'; + + /** + * Method to get a list of options for a list input. + * + * @return array An array of JHtml options. + */ + protected function getOptions() + { + // Get the user object. + $user = JFactory::getUser(); + // Get the databse object. + $db = JFactory::getDBO(); + $query = $db->getQuery(true); + $query->select($db->quoteName(array('a.guid','a.name','a.namespace','a.type','a.power_version'),array('guid','use_name','namespace','type','version'))); + $query->from($db->quoteName('#__componentbuilder_power', 'a')); + $query->where($db->quoteName('a.published') . ' >= 1'); + $query->order('a.name ASC'); + $query->order('a.type ASC'); + // Implement View Level Access (if set in table) + if (!$user->authorise('core.options', 'com_componentbuilder')) + { + $columns = $db->getTableColumns('#__componentbuilder_power'); + if(isset($columns['access'])) + { + $groups = implode(',', $user->getAuthorisedViewLevels()); + $query->where('a.access IN (' . $groups . ')'); + } + } + // get the input + $jinput = JFactory::getApplication()->input; + // get the id + $power_id = $jinput->getInt('id', 0); + // if we have an id we remove all classes of the same namespace and name + if ($power_id > 0 && ($exclude_powers = ComponentbuilderHelper::excludePowers($power_id)) !== false) + { + $query->where('a.id NOT IN (' . implode(',', $exclude_powers) . ')'); + } + $db->setQuery((string)$query); + $items = $db->loadObjectList(); + $options = array(); + // if none was found, we add this to set an alternative to set custom + if (!$items) + { + $options[] = JHtml::_('select.option', '', JText::_('COM_COMPONENTBUILDER_NONE_FOUND')); + } + if ($items) + { + if ($this->multiple === false) + { + $options[] = JHtml::_('select.option', '', JText::_('COM_COMPONENTBUILDER_SELECT_AN_OPTION')); + } + foreach($items as $item) + { + $options[] = JHtml::_('select.option', $item->guid, str_replace('.','\\', $item->namespace) . ' [' . $item->use_name . '] (v' . $item->version . ' - ' . $item->type . ')'); + } + } + return $options; + + } +} diff --git a/admin/models/fields/powers.php b/admin/models/fields/powers.php new file mode 100644 index 000000000..4f0972b15 --- /dev/null +++ b/admin/models/fields/powers.php @@ -0,0 +1,81 @@ + + * @gitea Joomla Component Builder + * @github 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'); + +// import the list field type +jimport('joomla.form.helper'); +JFormHelper::loadFieldClass('list'); + +/** + * Powers Form Field class for the Componentbuilder component + */ +class JFormFieldPowers extends JFormFieldList +{ + /** + * The powers field type. + * + * @var string + */ + public $type = 'powers'; + + /** + * Method to get a list of options for a list input. + * + * @return array An array of JHtml options. + */ + protected function getOptions() + { + // Get the user object. + $user = JFactory::getUser(); + // Get the databse object. + $db = JFactory::getDBO(); + $query = $db->getQuery(true); + $query->select($db->quoteName(array('a.guid','a.system_name','a.namespace','a.type','a.power_version'),array('guid','power_system_name','namespace','type','version'))); + $query->from($db->quoteName('#__componentbuilder_power', 'a')); + $query->where($db->quoteName('a.published') . ' >= 1'); + $query->order('a.system_name ASC'); + $query->order('a.type ASC'); + // Implement View Level Access (if set in table) + if (!$user->authorise('core.options', 'com_componentbuilder')) + { + $columns = $db->getTableColumns('#__componentbuilder_power'); + if(isset($columns['access'])) + { + $groups = implode(',', $user->getAuthorisedViewLevels()); + $query->where('a.access IN (' . $groups . ')'); + } + } + $db->setQuery((string)$query); + $items = $db->loadObjectList(); + $options = array(); + // if none was found, we add this to set an alternative to set custom + if (!$items) + { + $options[] = JHtml::_('select.option', '', 'None found'); + } + if ($items) + { + if ($this->multiple === false) + { + $options[] = JHtml::_('select.option', '', 'Select an option'); + } + foreach($items as $item) + { + $options[] = JHtml::_('select.option', $item->guid, str_replace('.','\\', $item->namespace) . ' [' . $item->power_system_name . '] (v' . $item->version . ' - ' . $item->type . ')'); + } + } + return $options; + + } +} diff --git a/admin/models/fields/powersfilterpowerversion.php b/admin/models/fields/powersfilterpowerversion.php new file mode 100644 index 000000000..2e9990fd6 --- /dev/null +++ b/admin/models/fields/powersfilterpowerversion.php @@ -0,0 +1,68 @@ + + * @gitea Joomla Component Builder + * @github 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'); + +// import the list field type +jimport('joomla.form.helper'); +JFormHelper::loadFieldClass('list'); + +/** + * Powersfilterpowerversion Form Field class for the Componentbuilder component + */ +class JFormFieldPowersfilterpowerversion extends JFormFieldList +{ + /** + * The powersfilterpowerversion field type. + * + * @var string + */ + public $type = 'powersfilterpowerversion'; + + /** + * Method to get a list of options for a list input. + * + * @return array An array of JHtml options. + */ + protected function getOptions() + { + // Get a db connection. + $db = JFactory::getDbo(); + + // Create a new query object. + $query = $db->getQuery(true); + + // Select the text. + $query->select($db->quoteName('power_version')); + $query->from($db->quoteName('#__componentbuilder_power')); + $query->order($db->quoteName('power_version') . ' ASC'); + + // Reset the query using our newly populated query object. + $db->setQuery($query); + + $results = $db->loadColumn(); + $_filter = array(); + $_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_VERSION') . ' -'); + + if ($results) + { + $results = array_unique($results); + foreach ($results as $power_version) + { + // Now add the power_version and its text to the options array + $_filter[] = JHtml::_('select.option', $power_version, $power_version); + } + } + return $_filter; + } +} diff --git a/admin/models/fields/powersfiltertype.php b/admin/models/fields/powersfiltertype.php new file mode 100644 index 000000000..b82ec017a --- /dev/null +++ b/admin/models/fields/powersfiltertype.php @@ -0,0 +1,71 @@ + + * @gitea Joomla Component Builder + * @github 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'); + +// import the list field type +jimport('joomla.form.helper'); +JFormHelper::loadFieldClass('list'); + +/** + * Powersfiltertype Form Field class for the Componentbuilder component + */ +class JFormFieldPowersfiltertype extends JFormFieldList +{ + /** + * The powersfiltertype field type. + * + * @var string + */ + public $type = 'powersfiltertype'; + + /** + * Method to get a list of options for a list input. + * + * @return array An array of JHtml options. + */ + protected function getOptions() + { + // Get a db connection. + $db = JFactory::getDbo(); + + // Create a new query object. + $query = $db->getQuery(true); + + // Select the text. + $query->select($db->quoteName('type')); + $query->from($db->quoteName('#__componentbuilder_power')); + $query->order($db->quoteName('type') . ' ASC'); + + // Reset the query using our newly populated query object. + $db->setQuery($query); + + $results = $db->loadColumn(); + $_filter = array(); + + if ($results) + { + // get powersmodel + $model = ComponentbuilderHelper::getModel('powers'); + $results = array_unique($results); + foreach ($results as $type) + { + // Translate the type selection + $text = $model->selectionTranslation($type,'type'); + // Now add the type and its text to the options array + $_filter[] = JHtml::_('select.option', $type, JText::_($text)); + } + } + return $_filter; + } +} diff --git a/admin/models/forms/filter_powers.xml b/admin/models/forms/filter_powers.xml new file mode 100644 index 000000000..6571e0783 --- /dev/null +++ b/admin/models/forms/filter_powers.xml @@ -0,0 +1,95 @@ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
\ No newline at end of file diff --git a/admin/models/forms/help_document.xml b/admin/models/forms/help_document.xml index c713ef32d..a5833d977 100644 --- a/admin/models/forms/help_document.xml +++ b/admin/models/forms/help_document.xml @@ -194,7 +194,6 @@ label="COM_COMPONENTBUILDER_HELP_DOCUMENT_URL_LABEL" size="60" maxlength="150" - default="" description="COM_COMPONENTBUILDER_HELP_DOCUMENT_URL_DESCRIPTION" class="text_area" required="true" diff --git a/admin/models/forms/power.xml b/admin/models/forms/power.xml new file mode 100644 index 000000000..718caf46b --- /dev/null +++ b/admin/models/forms/power.xml @@ -0,0 +1,451 @@ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ + + + +
+ \ No newline at end of file diff --git a/admin/models/forms/snippet.xml b/admin/models/forms/snippet.xml index 7fbff3968..31c799b11 100644 --- a/admin/models/forms/snippet.xml +++ b/admin/models/forms/snippet.xml @@ -114,7 +114,6 @@ label="COM_COMPONENTBUILDER_SNIPPET_URL_LABEL" size="60" maxlength="150" - default="" description="COM_COMPONENTBUILDER_SNIPPET_URL_DESCRIPTION" class="text_area" required="true" diff --git a/admin/models/joomla_modules.php b/admin/models/joomla_modules.php index e8e44fa43..590fba40f 100644 --- a/admin/models/joomla_modules.php +++ b/admin/models/joomla_modules.php @@ -279,6 +279,156 @@ class ComponentbuilderModelJoomla_modules extends ListModel return $query; } + + /** + * Method to get list export data. + * + * @param array $pks The ids of the items to get + * @param JUser $user The user making the request + * + * @return mixed An array of data items on success, false on failure. + */ + public function getExportData($pks, $user = null) + { + // setup the query + if (($pks_size = ComponentbuilderHelper::checkArray($pks)) !== false || 'bulk' === $pks) + { + // Set a value to know this is export method. (USE IN CUSTOM CODE TO ALTER OUTCOME) + $_export = true; + // Get the user object if not set. + if (!isset($user) || !ComponentbuilderHelper::checkObject($user)) + { + $user = JFactory::getUser(); + } + // Create a new query object. + $db = JFactory::getDBO(); + $query = $db->getQuery(true); + + // Select some fields + $query->select('a.*'); + + // From the componentbuilder_joomla_module table + $query->from($db->quoteName('#__componentbuilder_joomla_module', 'a')); + // The bulk export path + if ('bulk' === $pks) + { + $query->where('a.id > 0'); + } + // A large array of ID's will not work out well + elseif ($pks_size > 500) + { + // Use lowest ID + $query->where('a.id >= ' . (int) min($pks)); + // Use highest ID + $query->where('a.id <= ' . (int) max($pks)); + } + // The normal default path + else + { + $query->where('a.id IN (' . implode(',',$pks) . ')'); + } + // Implement View Level Access + if (!$user->authorise('core.options', 'com_componentbuilder')) + { + $groups = implode(',', $user->getAuthorisedViewLevels()); + $query->where('a.access IN (' . $groups . ')'); + } + + // Order the results by ordering + $query->order('a.id desc'); + + // Load the items + $db->setQuery($query); + $db->execute(); + if ($db->getNumRows()) + { + $items = $db->loadObjectList(); + + // Set values to display correctly. + if (ComponentbuilderHelper::checkArray($items)) + { + foreach ($items as $nr => &$item) + { + // Remove items the user can't access. + $access = ($user->authorise('joomla_module.access', 'com_componentbuilder.joomla_module.' . (int) $item->id) && $user->authorise('joomla_module.access', 'com_componentbuilder')); + if (!$access) + { + unset($items[$nr]); + continue; + } + + // decode default + $item->default = base64_decode($item->default); + // decode php_preflight_update + $item->php_preflight_update = base64_decode($item->php_preflight_update); + // decode php_preflight_uninstall + $item->php_preflight_uninstall = base64_decode($item->php_preflight_uninstall); + // decode mod_code + $item->mod_code = base64_decode($item->mod_code); + // decode php_postflight_install + $item->php_postflight_install = base64_decode($item->php_postflight_install); + // decode php_postflight_update + $item->php_postflight_update = base64_decode($item->php_postflight_update); + // decode php_method_uninstall + $item->php_method_uninstall = base64_decode($item->php_method_uninstall); + // decode class_helper_header + $item->class_helper_header = base64_decode($item->class_helper_header); + // decode sql + $item->sql = base64_decode($item->sql); + // decode class_helper_code + $item->class_helper_code = base64_decode($item->class_helper_code); + // decode sql_uninstall + $item->sql_uninstall = base64_decode($item->sql_uninstall); + // decode readme + $item->readme = base64_decode($item->readme); + // decode php_script_construct + $item->php_script_construct = base64_decode($item->php_script_construct); + // decode php_preflight_install + $item->php_preflight_install = base64_decode($item->php_preflight_install); + // unset the values we don't want exported. + unset($item->asset_id); + unset($item->checked_out); + unset($item->checked_out_time); + } + } + // Add headers to items array. + $headers = $this->getExImPortHeaders(); + if (ComponentbuilderHelper::checkObject($headers)) + { + array_unshift($items,$headers); + } + return $items; + } + } + return false; + } + + /** + * Method to get header. + * + * @return mixed An array of data items on success, false on failure. + */ + public function getExImPortHeaders() + { + // Get a db connection. + $db = JFactory::getDbo(); + // get the columns + $columns = $db->getTableColumns("#__componentbuilder_joomla_module"); + if (ComponentbuilderHelper::checkArray($columns)) + { + // remove the headers you don't import/export. + unset($columns['asset_id']); + unset($columns['checked_out']); + unset($columns['checked_out_time']); + $headers = new stdClass(); + foreach ($columns as $column => $type) + { + $headers->{$column} = $column; + } + return $headers; + } + return false; + } /** * Method to get a store id based on model configuration state. diff --git a/admin/models/power.php b/admin/models/power.php new file mode 100644 index 000000000..afdbea94e --- /dev/null +++ b/admin/models/power.php @@ -0,0 +1,1180 @@ + + * @gitea Joomla Component Builder + * @github 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'); + +use Joomla\CMS\MVC\Model\AdminModel; +use Joomla\Registry\Registry; +use Joomla\String\StringHelper; +use Joomla\Utilities\ArrayHelper; + +/** + * Componentbuilder Power Admin Model + */ +class ComponentbuilderModelPower extends AdminModel +{ + /** + * The tab layout fields array. + * + * @var array + */ + protected $tabLayoutFields = array( + 'code' => array( + 'left' => array( + 'name', + 'description', + 'extends', + 'implements_custom', + 'implements', + 'namespace', + 'extends_custom', + 'add_head' + ), + 'right' => array( + 'property_selection', + 'method_selection', + 'namespace_details' + ), + 'fullwidth' => array( + 'head', + 'use_selection', + 'main_class_code', + 'load_powers_note', + 'load_selection', + 'note_linked_to_notice', + 'not_required' + ), + 'above' => array( + 'system_name', + 'type', + 'power_version' + ) + ) + ); + + /** + * @var string The prefix to use with controller messages. + * @since 1.6 + */ + protected $text_prefix = 'COM_COMPONENTBUILDER'; + + /** + * The type alias for this content type. + * + * @var string + * @since 3.2 + */ + public $typeAlias = 'com_componentbuilder.power'; + + /** + * Returns a Table object, always creating it + * + * @param type $type The table type to instantiate + * @param string $prefix A prefix for the table class name. Optional. + * @param array $config Configuration array for model. Optional. + * + * @return JTable A database object + * + * @since 1.6 + */ + public function getTable($type = 'power', $prefix = 'ComponentbuilderTable', $config = array()) + { + // add table path for when model gets used from other component + $this->addTablePath(JPATH_ADMINISTRATOR . '/components/com_componentbuilder/tables'); + // get instance of the table + return JTable::getInstance($type, $prefix, $config); + } + + + /** + * get VDM internal session key + * + * @return string the session key + * + */ + public function getVDM() + { + if (!isset($this->vastDevMod)) + { + $_id = 0; // new item probably (since it was not set in the getItem method) + + if (empty($_id)) + { + $id = 0; + } + else + { + $id = $_id; + } + // set the id and view name to session + if ($vdm = ComponentbuilderHelper::get('power__'.$id)) + { + $this->vastDevMod = $vdm; + } + else + { + // set the vast development method key + $this->vastDevMod = ComponentbuilderHelper::randomkey(50); + ComponentbuilderHelper::set($this->vastDevMod, 'power__'.$id); + ComponentbuilderHelper::set('power__'.$id, $this->vastDevMod); + // set a return value if found + $jinput = JFactory::getApplication()->input; + $return = $jinput->get('return', null, 'base64'); + ComponentbuilderHelper::set($this->vastDevMod . '__return', $return); + // set a GUID value if found + if (isset($item) && ComponentbuilderHelper::checkObject($item) && isset($item->guid) + && method_exists('ComponentbuilderHelper', 'validGUID') + && ComponentbuilderHelper::validGUID($item->guid)) + { + ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid); + } + } + } + return $this->vastDevMod; + } + + + /** + * Method to get a single record. + * + * @param integer $pk The id of the primary key. + * + * @return mixed Object on success, false on failure. + * + * @since 1.6 + */ + public function getItem($pk = null) + { + if ($item = parent::getItem($pk)) + { + if (!empty($item->params) && !is_array($item->params)) + { + // Convert the params field to an array. + $registry = new Registry; + $registry->loadString($item->params); + $item->params = $registry->toArray(); + } + + if (!empty($item->metadata)) + { + // Convert the metadata field to an array. + $registry = new Registry; + $registry->loadString($item->metadata); + $item->metadata = $registry->toArray(); + } + + if (!empty($item->main_class_code)) + { + // base64 Decode main_class_code. + $item->main_class_code = base64_decode($item->main_class_code); + } + + if (!empty($item->head)) + { + // base64 Decode head. + $item->head = base64_decode($item->head); + } + + if (!empty($item->load_selection)) + { + // Convert the load_selection field to an array. + $load_selection = new Registry; + $load_selection->loadString($item->load_selection); + $item->load_selection = $load_selection->toArray(); + } + + if (!empty($item->use_selection)) + { + // Convert the use_selection field to an array. + $use_selection = new Registry; + $use_selection->loadString($item->use_selection); + $item->use_selection = $use_selection->toArray(); + } + + if (!empty($item->property_selection)) + { + // Convert the property_selection field to an array. + $property_selection = new Registry; + $property_selection->loadString($item->property_selection); + $item->property_selection = $property_selection->toArray(); + } + + if (!empty($item->implements)) + { + // Convert the implements field to an array. + $implements = new Registry; + $implements->loadString($item->implements); + $item->implements = $implements->toArray(); + } + + if (!empty($item->method_selection)) + { + // Convert the method_selection field to an array. + $method_selection = new Registry; + $method_selection->loadString($item->method_selection); + $item->method_selection = $method_selection->toArray(); + } + + + if (empty($item->id)) + { + $id = 0; + } + else + { + $id = $item->id; + } + // set the id and view name to session + if ($vdm = ComponentbuilderHelper::get('power__'.$id)) + { + $this->vastDevMod = $vdm; + } + else + { + // set the vast development method key + $this->vastDevMod = ComponentbuilderHelper::randomkey(50); + ComponentbuilderHelper::set($this->vastDevMod, 'power__'.$id); + ComponentbuilderHelper::set('power__'.$id, $this->vastDevMod); + // set a return value if found + $jinput = JFactory::getApplication()->input; + $return = $jinput->get('return', null, 'base64'); + ComponentbuilderHelper::set($this->vastDevMod . '__return', $return); + // set a GUID value if found + if (isset($item) && ComponentbuilderHelper::checkObject($item) && isset($item->guid) + && method_exists('ComponentbuilderHelper', 'validGUID') + && ComponentbuilderHelper::validGUID($item->guid)) + { + ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid); + } + } + } + + return $item; + } + + /** + * Method to get the record form. + * + * @param array $data Data for the form. + * @param boolean $loadData True if the form is to load its own data (default case), false if not. + * @param array $options Optional array of options for the form creation. + * + * @return mixed A JForm object on success, false on failure + * + * @since 1.6 + */ + public function getForm($data = array(), $loadData = true, $options = array('control' => 'jform')) + { + // set load data option + $options['load_data'] = $loadData; + // check if xpath was set in options + $xpath = false; + if (isset($options['xpath'])) + { + $xpath = $options['xpath']; + unset($options['xpath']); + } + // check if clear form was set in options + $clear = false; + if (isset($options['clear'])) + { + $clear = $options['clear']; + unset($options['clear']); + } + + // Get the form. + $form = $this->loadForm('com_componentbuilder.power', 'power', $options, $clear, $xpath); + + if (empty($form)) + { + return false; + } + + $jinput = JFactory::getApplication()->input; + + // The front end calls this model and uses a_id to avoid id clashes so we need to check for that first. + if ($jinput->get('a_id')) + { + $id = $jinput->get('a_id', 0, 'INT'); + } + // The back end uses id so we use that the rest of the time and set it to 0 by default. + else + { + $id = $jinput->get('id', 0, 'INT'); + } + + $user = JFactory::getUser(); + + // Check for existing item. + // Modify the form based on Edit State access controls. + if ($id != 0 && (!$user->authorise('power.edit.state', 'com_componentbuilder.power.' . (int) $id)) + || ($id == 0 && !$user->authorise('power.edit.state', 'com_componentbuilder'))) + { + // Disable fields for display. + $form->setFieldAttribute('ordering', 'disabled', 'true'); + $form->setFieldAttribute('published', 'disabled', 'true'); + // Disable fields while saving. + $form->setFieldAttribute('ordering', 'filter', 'unset'); + $form->setFieldAttribute('published', 'filter', 'unset'); + } + // If this is a new item insure the greated by is set. + if (0 == $id) + { + // Set the created_by to this user + $form->setValue('created_by', null, $user->id); + } + // Modify the form based on Edit Creaded By access controls. + if ($id != 0 && (!$user->authorise('power.edit.created_by', 'com_componentbuilder.power.' . (int) $id)) + || ($id == 0 && !$user->authorise('power.edit.created_by', 'com_componentbuilder'))) + { + // Disable fields for display. + $form->setFieldAttribute('created_by', 'disabled', 'true'); + // Disable fields for display. + $form->setFieldAttribute('created_by', 'readonly', 'true'); + // Disable fields while saving. + $form->setFieldAttribute('created_by', 'filter', 'unset'); + } + // Modify the form based on Edit Creaded Date access controls. + if ($id != 0 && (!$user->authorise('power.edit.created', 'com_componentbuilder.power.' . (int) $id)) + || ($id == 0 && !$user->authorise('power.edit.created', 'com_componentbuilder'))) + { + // Disable fields for display. + $form->setFieldAttribute('created', 'disabled', 'true'); + // Disable fields while saving. + $form->setFieldAttribute('created', 'filter', 'unset'); + } + // Only load these values if no id is found + if (0 == $id) + { + // Set redirected view name + $redirectedView = $jinput->get('ref', null, 'STRING'); + // Set field name (or fall back to view name) + $redirectedField = $jinput->get('field', $redirectedView, 'STRING'); + // Set redirected view id + $redirectedId = $jinput->get('refid', 0, 'INT'); + // Set field id (or fall back to redirected view id) + $redirectedValue = $jinput->get('field_id', $redirectedId, 'INT'); + if (0 != $redirectedValue && $redirectedField) + { + // Now set the local-redirected field default value + $form->setValue($redirectedField, null, $redirectedValue); + } + } + + // update all editors to use this components global editor + $global_editor = JComponentHelper::getParams('com_componentbuilder')->get('editor', 'none'); + // now get all the editor fields + $editors = $form->getXml()->xpath("//field[@type='editor']"); + // check if we found any + if (ComponentbuilderHelper::checkArray($editors)) + { + foreach ($editors as $editor) + { + // get the field names + $name = (string) $editor['name']; + // set the field editor value (with none as fallback) + $form->setFieldAttribute($name, 'editor', $global_editor . '|none'); + } + } + + + // Only load the GUID if new item (or empty) + if (0 == $id || !($val = $form->getValue('guid'))) + { + $form->setValue('guid', null, ComponentbuilderHelper::GUID()); + } + + return $form; + } + + /** + * Method to get the script that have to be included on the form + * + * @return string script files + */ + public function getScript() + { + return 'media/com_componentbuilder/js/power.js'; + } + + /** + * Method to test whether a record can be deleted. + * + * @param object $record A record object. + * + * @return boolean True if allowed to delete the record. Defaults to the permission set in the component. + * + * @since 1.6 + */ + protected function canDelete($record) + { + if (!empty($record->id)) + { + if ($record->published != -2) + { + return; + } + + $user = JFactory::getUser(); + // The record has been set. Check the record permissions. + return $user->authorise('power.delete', 'com_componentbuilder.power.' . (int) $record->id); + } + return false; + } + + /** + * Method to test whether a record can have its state edited. + * + * @param object $record A record object. + * + * @return boolean True if allowed to change the state of the record. Defaults to the permission set in the component. + * + * @since 1.6 + */ + protected function canEditState($record) + { + $user = JFactory::getUser(); + $recordId = (!empty($record->id)) ? $record->id : 0; + + if ($recordId) + { + // The record has been set. Check the record permissions. + $permission = $user->authorise('power.edit.state', 'com_componentbuilder.power.' . (int) $recordId); + if (!$permission && !is_null($permission)) + { + return false; + } + } + // In the absense of better information, revert to the component permissions. + return $user->authorise('power.edit.state', 'com_componentbuilder'); + } + + /** + * Method override to check if you can edit an existing record. + * + * @param array $data An array of input data. + * @param string $key The name of the key for the primary key. + * + * @return boolean + * @since 2.5 + */ + protected function allowEdit($data = array(), $key = 'id') + { + // Check specific edit permission then general edit permission. + $user = JFactory::getUser(); + + return $user->authorise('power.edit', 'com_componentbuilder.power.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or $user->authorise('power.edit', 'com_componentbuilder'); + } + + /** + * Prepare and sanitise the table data prior to saving. + * + * @param JTable $table A JTable object. + * + * @return void + * + * @since 1.6 + */ + protected function prepareTable($table) + { + $date = JFactory::getDate(); + $user = JFactory::getUser(); + + if (isset($table->name)) + { + $table->name = htmlspecialchars_decode($table->name, ENT_QUOTES); + } + + if (isset($table->alias) && empty($table->alias)) + { + $table->generateAlias(); + } + + if (empty($table->id)) + { + $table->created = $date->toSql(); + // set the user + if ($table->created_by == 0 || empty($table->created_by)) + { + $table->created_by = $user->id; + } + // Set ordering to the last item if not set + if (empty($table->ordering)) + { + $db = JFactory::getDbo(); + $query = $db->getQuery(true) + ->select('MAX(ordering)') + ->from($db->quoteName('#__componentbuilder_power')); + $db->setQuery($query); + $max = $db->loadResult(); + + $table->ordering = $max + 1; + } + } + else + { + $table->modified = $date->toSql(); + $table->modified_by = $user->id; + } + + if (!empty($table->id)) + { + // Increment the items version number. + $table->version++; + } + } + + /** + * Method to get the data that should be injected in the form. + * + * @return mixed The data for the form. + * + * @since 1.6 + */ + protected function loadFormData() + { + // Check the session for previously entered form data. + $data = JFactory::getApplication()->getUserState('com_componentbuilder.edit.power.data', array()); + + if (empty($data)) + { + $data = $this->getItem(); + // run the perprocess of the data + $this->preprocessData('com_componentbuilder.power', $data); + } + + return $data; + } + + /** + * Method to get the unique fields of this table. + * + * @return mixed An array of field names, boolean false if none is set. + * + * @since 3.0 + */ + protected function getUniqueFields() + { + return array('guid'); + } + + /** + * Method to delete one or more records. + * + * @param array &$pks An array of record primary keys. + * + * @return boolean True if successful, false if an error occurs. + * + * @since 12.2 + */ + public function delete(&$pks) + { + if (!parent::delete($pks)) + { + return false; + } + + return true; + } + + /** + * Method to change the published state of one or more records. + * + * @param array &$pks A list of the primary keys to change. + * @param integer $value The value of the published state. + * + * @return boolean True on success. + * + * @since 12.2 + */ + public function publish(&$pks, $value = 1) + { + if (!parent::publish($pks, $value)) + { + return false; + } + + return true; + } + + /** + * Method to perform batch operations on an item or a set of items. + * + * @param array $commands An array of commands to perform. + * @param array $pks An array of item ids. + * @param array $contexts An array of item contexts. + * + * @return boolean Returns true on success, false on failure. + * + * @since 12.2 + */ + public function batch($commands, $pks, $contexts) + { + // Sanitize ids. + $pks = array_unique($pks); + ArrayHelper::toInteger($pks); + + // Remove any values of zero. + if (array_search(0, $pks, true)) + { + unset($pks[array_search(0, $pks, true)]); + } + + if (empty($pks)) + { + $this->setError(JText::_('JGLOBAL_NO_ITEM_SELECTED')); + return false; + } + + $done = false; + + // Set some needed variables. + $this->user = JFactory::getUser(); + $this->table = $this->getTable(); + $this->tableClassName = get_class($this->table); + $this->contentType = new JUcmType; + $this->type = $this->contentType->getTypeByTable($this->tableClassName); + $this->canDo = ComponentbuilderHelper::getActions('power'); + $this->batchSet = true; + + if (!$this->canDo->get('core.batch')) + { + $this->setError(JText::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); + return false; + } + + if ($this->type == false) + { + $type = new JUcmType; + $this->type = $type->getTypeByAlias($this->typeAlias); + } + + $this->tagsObserver = $this->table->getObserverOfClass('JTableObserverTags'); + + if (!empty($commands['move_copy'])) + { + $cmd = ArrayHelper::getValue($commands, 'move_copy', 'c'); + + if ($cmd == 'c') + { + $result = $this->batchCopy($commands, $pks, $contexts); + + if (is_array($result)) + { + foreach ($result as $old => $new) + { + $contexts[$new] = $contexts[$old]; + } + $pks = array_values($result); + } + else + { + return false; + } + } + elseif ($cmd == 'm' && !$this->batchMove($commands, $pks, $contexts)) + { + return false; + } + + $done = true; + } + + if (!$done) + { + $this->setError(JText::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); + + return false; + } + + // Clear the cache + $this->cleanCache(); + + return true; + } + + /** + * Batch copy items to a new category or current. + * + * @param integer $values The new values. + * @param array $pks An array of row IDs. + * @param array $contexts An array of item contexts. + * + * @return mixed An array of new IDs on success, boolean false on failure. + * + * @since 12.2 + */ + protected function batchCopy($values, $pks, $contexts) + { + if (empty($this->batchSet)) + { + // Set some needed variables. + $this->user = JFactory::getUser(); + $this->table = $this->getTable(); + $this->tableClassName = get_class($this->table); + $this->canDo = ComponentbuilderHelper::getActions('power'); + } + + if (!$this->canDo->get('power.create') && !$this->canDo->get('power.batch')) + { + return false; + } + + // get list of unique fields + $uniqueFields = $this->getUniqueFields(); + // remove move_copy from array + unset($values['move_copy']); + + // make sure published is set + if (!isset($values['published'])) + { + $values['published'] = 0; + } + elseif (isset($values['published']) && !$this->canDo->get('power.edit.state')) + { + $values['published'] = 0; + } + + $newIds = array(); + // Parent exists so let's proceed + while (!empty($pks)) + { + // Pop the first ID off the stack + $pk = array_shift($pks); + + $this->table->reset(); + + // only allow copy if user may edit this item. + if (!$this->user->authorise('power.edit', $contexts[$pk])) + { + // Not fatal error + $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); + continue; + } + + // Check that the row actually exists + if (!$this->table->load($pk)) + { + if ($error = $this->table->getError()) + { + // Fatal error + $this->setError($error); + return false; + } + else + { + // Not fatal error + $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); + continue; + } + } + + // Only for strings + if (ComponentbuilderHelper::checkString($this->table->system_name) && !is_numeric($this->table->system_name)) + { + $this->table->system_name = $this->generateUnique('system_name',$this->table->system_name); + } + + // insert all set values + if (ComponentbuilderHelper::checkArray($values)) + { + foreach ($values as $key => $value) + { + if (strlen($value) > 0 && isset($this->table->$key)) + { + $this->table->$key = $value; + } + } + } + + // update all unique fields + if (ComponentbuilderHelper::checkArray($uniqueFields)) + { + foreach ($uniqueFields as $uniqueField) + { + $this->table->$uniqueField = $this->generateUnique($uniqueField,$this->table->$uniqueField); + } + } + + // Reset the ID because we are making a copy + $this->table->id = 0; + + // TODO: Deal with ordering? + // $this->table->ordering = 1; + + // Check the row. + if (!$this->table->check()) + { + $this->setError($this->table->getError()); + + return false; + } + + if (!empty($this->type)) + { + $this->createTagsHelper($this->tagsObserver, $this->type, $pk, $this->typeAlias, $this->table); + } + + // Store the row. + if (!$this->table->store()) + { + $this->setError($this->table->getError()); + + return false; + } + + // Get the new item ID + $newId = $this->table->get('id'); + + // Add the new ID to the array + $newIds[$pk] = $newId; + } + + // Clean the cache + $this->cleanCache(); + + return $newIds; + } + + /** + * Batch move items to a new category + * + * @param integer $value The new category ID. + * @param array $pks An array of row IDs. + * @param array $contexts An array of item contexts. + * + * @return boolean True if successful, false otherwise and internal error is set. + * + * @since 12.2 + */ + protected function batchMove($values, $pks, $contexts) + { + if (empty($this->batchSet)) + { + // Set some needed variables. + $this->user = JFactory::getUser(); + $this->table = $this->getTable(); + $this->tableClassName = get_class($this->table); + $this->canDo = ComponentbuilderHelper::getActions('power'); + } + + if (!$this->canDo->get('power.edit') && !$this->canDo->get('power.batch')) + { + $this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); + return false; + } + + // make sure published only updates if user has the permission. + if (isset($values['published']) && !$this->canDo->get('power.edit.state')) + { + unset($values['published']); + } + // remove move_copy from array + unset($values['move_copy']); + + // Parent exists so we proceed + foreach ($pks as $pk) + { + if (!$this->user->authorise('power.edit', $contexts[$pk])) + { + $this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); + return false; + } + + // Check that the row actually exists + if (!$this->table->load($pk)) + { + if ($error = $this->table->getError()) + { + // Fatal error + $this->setError($error); + return false; + } + else + { + // Not fatal error + $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); + continue; + } + } + + // insert all set values. + if (ComponentbuilderHelper::checkArray($values)) + { + foreach ($values as $key => $value) + { + // Do special action for access. + if ('access' === $key && strlen($value) > 0) + { + $this->table->$key = $value; + } + elseif (strlen($value) > 0 && isset($this->table->$key)) + { + $this->table->$key = $value; + } + } + } + + + // Check the row. + if (!$this->table->check()) + { + $this->setError($this->table->getError()); + + return false; + } + + if (!empty($this->type)) + { + $this->createTagsHelper($this->tagsObserver, $this->type, $pk, $this->typeAlias, $this->table); + } + + // Store the row. + if (!$this->table->store()) + { + $this->setError($this->table->getError()); + + return false; + } + } + + // Clean the cache + $this->cleanCache(); + + return true; + } + + /** + * Method to save the form data. + * + * @param array $data The form data. + * + * @return boolean True on success. + * + * @since 1.6 + */ + public function save($data) + { + $input = JFactory::getApplication()->input; + $filter = JFilterInput::getInstance(); + + // set the metadata to the Item Data + if (isset($data['metadata']) && isset($data['metadata']['author'])) + { + $data['metadata']['author'] = $filter->clean($data['metadata']['author'], 'TRIM'); + + $metadata = new JRegistry; + $metadata->loadArray($data['metadata']); + $data['metadata'] = (string) $metadata; + } + + // check if the name has placeholder + if (strpos($data['name'], '[[[') === false && strpos($data['name'], '###') === false) + { + // make sure the name is safe to be used as a function name + $data['name'] = ComponentbuilderHelper::safeClassFunctionName($data['name']); + } + // if system name is empty create from name + if (empty($data['system_name']) || !ComponentbuilderHelper::checkString($data['system_name'])) + { + $data['system_name'] = $data['name']; + } + // must set the version if empty + if (empty($data['power_version']) && $data['id'] > 0 && ($power_version = ComponentbuilderHelper::getVar('power', $data['id'], 'id', 'power_version')) !== false) + { + $data['power_version'] = $power_version; + } + // we must preserve versions (so that a change to the version number must result in save as copy) + elseif ($data['id'] > 0 && ($old_version = ComponentbuilderHelper::getVar('power', $data['id'], 'id', 'power_version')) && $data['power_version'] != $old_version) + { + // lets check if we already have this version + if (($existing_id = ComponentbuilderHelper::checkExist('power', ['power_version' => $data['power_version'], 'name' => $data['name'], 'namespace' => $data['namespace']])) !== false) + { + // class of that version already exist so we reset the version + \JFactory::getApplication()->enqueueMessage(JText::sprintf("COM_COMPONENTBUILDER_POWERS_A_HREFS_TARGET_BLANK_TITLEOPEN_POWERSA_WITH_VERSION_S_ALREADY_EXIST", $existing_id, 'index.php?option=com_componentbuilder&view=powers&task=power.edit&id=' . $existing_id, $data['namespace'] . '\\' . $data['name'], $data['power_version']), 'error'); + $data['power_version'] = $old_version; + } + else + { + // does not exist so we allow save2copy + $data['id'] = 0; + JFactory::getApplication()->input->set('task', 'save2copy'); + } + } + + // Set the GUID if empty or not valid + if (empty($data['guid']) && $data['id'] > 0) + { + // get the existing one + $data['guid'] = (string) ComponentbuilderHelper::getVar('power', $data['id'], 'id', 'guid'); + } + // Set the GUID if empty or not valid + while (!ComponentbuilderHelper::validGUID($data['guid'], "power", $data['id'])) + { + // must always be set + $data['guid'] = (string) ComponentbuilderHelper::GUID(); + } + + + // Set the load_selection items to data. + if (isset($data['load_selection']) && is_array($data['load_selection'])) + { + $load_selection = new JRegistry; + $load_selection->loadArray($data['load_selection']); + $data['load_selection'] = (string) $load_selection; + } + elseif (!isset($data['load_selection'])) + { + // Set the empty load_selection to data + $data['load_selection'] = ''; + } + + // Set the use_selection items to data. + if (isset($data['use_selection']) && is_array($data['use_selection'])) + { + $use_selection = new JRegistry; + $use_selection->loadArray($data['use_selection']); + $data['use_selection'] = (string) $use_selection; + } + elseif (!isset($data['use_selection'])) + { + // Set the empty use_selection to data + $data['use_selection'] = ''; + } + + // Set the property_selection items to data. + if (isset($data['property_selection']) && is_array($data['property_selection'])) + { + $property_selection = new JRegistry; + $property_selection->loadArray($data['property_selection']); + $data['property_selection'] = (string) $property_selection; + } + elseif (!isset($data['property_selection'])) + { + // Set the empty property_selection to data + $data['property_selection'] = ''; + } + + // Set the implements items to data. + if (isset($data['implements']) && is_array($data['implements'])) + { + $implements = new JRegistry; + $implements->loadArray($data['implements']); + $data['implements'] = (string) $implements; + } + elseif (!isset($data['implements'])) + { + // Set the empty implements to data + $data['implements'] = ''; + } + + // Set the method_selection items to data. + if (isset($data['method_selection']) && is_array($data['method_selection'])) + { + $method_selection = new JRegistry; + $method_selection->loadArray($data['method_selection']); + $data['method_selection'] = (string) $method_selection; + } + elseif (!isset($data['method_selection'])) + { + // Set the empty method_selection to data + $data['method_selection'] = ''; + } + + // Set the main_class_code string to base64 string. + if (isset($data['main_class_code'])) + { + $data['main_class_code'] = base64_encode($data['main_class_code']); + } + + // Set the head string to base64 string. + if (isset($data['head'])) + { + $data['head'] = base64_encode($data['head']); + } + + // Set the Params Items to data + if (isset($data['params']) && is_array($data['params'])) + { + $params = new JRegistry; + $params->loadArray($data['params']); + $data['params'] = (string) $params; + } + + // Alter the unique field for save as copy + if ($input->get('task') === 'save2copy') + { + // Automatic handling of other unique fields + $uniqueFields = $this->getUniqueFields(); + if (ComponentbuilderHelper::checkArray($uniqueFields)) + { + foreach ($uniqueFields as $uniqueField) + { + $data[$uniqueField] = $this->generateUnique($uniqueField,$data[$uniqueField]); + } + } + } + + if (parent::save($data)) + { + return true; + } + return false; + } + + /** + * Method to generate a unique value. + * + * @param string $field name. + * @param string $value data. + * + * @return string New value. + * + * @since 3.0 + */ + protected function generateUnique($field,$value) + { + + // set field value unique + $table = $this->getTable(); + + while ($table->load(array($field => $value))) + { + $value = StringHelper::increment($value); + } + + return $value; + } + + /** + * Method to change the title + * + * @param string $title The title. + * + * @return array Contains the modified title and alias. + * + */ + protected function _generateNewTitle($title) + { + + // Alter the title + $table = $this->getTable(); + + while ($table->load(array('title' => $title))) + { + $title = StringHelper::increment($title); + } + + return $title; + } +} diff --git a/admin/models/powers.php b/admin/models/powers.php new file mode 100644 index 000000000..798ae5bfb --- /dev/null +++ b/admin/models/powers.php @@ -0,0 +1,464 @@ + + * @gitea Joomla Component Builder + * @github 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'); + +use Joomla\CMS\MVC\Model\ListModel; +use Joomla\Utilities\ArrayHelper; + +/** + * Powers List Model + */ +class ComponentbuilderModelPowers extends ListModel +{ + public function __construct($config = array()) + { + if (empty($config['filter_fields'])) + { + $config['filter_fields'] = array( + 'a.id','id', + 'a.published','published', + 'a.access','access', + 'a.ordering','ordering', + 'a.created_by','created_by', + 'a.modified_by','modified_by', + 'a.type','type', + 'a.power_version','power_version', + 'h.name','extends', + 'a.system_name','system_name', + 'a.namespace','namespace' + ); + } + + parent::__construct($config); + } + + /** + * Method to auto-populate the model state. + * + * Note. Calling getState in this method will result in recursion. + * + * @param string $ordering An optional ordering field. + * @param string $direction An optional direction (asc|desc). + * + * @return void + * + */ + protected function populateState($ordering = null, $direction = null) + { + $app = JFactory::getApplication(); + + // Adjust the context to support modal layouts. + if ($layout = $app->input->get('layout')) + { + $this->context .= '.' . $layout; + } + + // Check if the form was submitted + $formSubmited = $app->input->post->get('form_submited'); + + $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int'); + if ($formSubmited) + { + $access = $app->input->post->get('access'); + $this->setState('filter.access', $access); + } + + $published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', ''); + $this->setState('filter.published', $published); + + $created_by = $this->getUserStateFromRequest($this->context . '.filter.created_by', 'filter_created_by', ''); + $this->setState('filter.created_by', $created_by); + + $created = $this->getUserStateFromRequest($this->context . '.filter.created', 'filter_created'); + $this->setState('filter.created', $created); + + $sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int'); + $this->setState('filter.sorting', $sorting); + + $search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search'); + $this->setState('filter.search', $search); + + $type = $this->getUserStateFromRequest($this->context . '.filter.type', 'filter_type'); + if ($formSubmited) + { + $type = $app->input->post->get('type'); + $this->setState('filter.type', $type); + } + + $power_version = $this->getUserStateFromRequest($this->context . '.filter.power_version', 'filter_power_version'); + if ($formSubmited) + { + $power_version = $app->input->post->get('power_version'); + $this->setState('filter.power_version', $power_version); + } + + $extends = $this->getUserStateFromRequest($this->context . '.filter.extends', 'filter_extends'); + if ($formSubmited) + { + $extends = $app->input->post->get('extends'); + $this->setState('filter.extends', $extends); + } + + $system_name = $this->getUserStateFromRequest($this->context . '.filter.system_name', 'filter_system_name'); + if ($formSubmited) + { + $system_name = $app->input->post->get('system_name'); + $this->setState('filter.system_name', $system_name); + } + + $namespace = $this->getUserStateFromRequest($this->context . '.filter.namespace', 'filter_namespace'); + if ($formSubmited) + { + $namespace = $app->input->post->get('namespace'); + $this->setState('filter.namespace', $namespace); + } + + // List state information. + parent::populateState($ordering, $direction); + } + + /** + * Method to get an array of data items. + * + * @return mixed An array of data items on success, false on failure. + */ + public function getItems() + { + // Check in items + $this->checkInNow(); + + // load parent items + $items = parent::getItems(); + + // Set values to display correctly. + if (ComponentbuilderHelper::checkArray($items)) + { + // Get the user object if not set. + if (!isset($user) || !ComponentbuilderHelper::checkObject($user)) + { + $user = JFactory::getUser(); + } + foreach ($items as $nr => &$item) + { + // Remove items the user can't access. + $access = ($user->authorise('power.access', 'com_componentbuilder.power.' . (int) $item->id) && $user->authorise('power.access', 'com_componentbuilder')); + if (!$access) + { + unset($items[$nr]); + continue; + } + + } + } + + // set selection value to a translatable value + if (ComponentbuilderHelper::checkArray($items)) + { + foreach ($items as $nr => &$item) + { + // convert type + $item->type = $this->selectionTranslation($item->type, 'type'); + } + } + + + // return items + return $items; + } + + /** + * Method to convert selection values to translatable string. + * + * @return translatable string + */ + public function selectionTranslation($value,$name) + { + // Array of type language strings + if ($name === 'type') + { + $typeArray = array( + 'class' => 'COM_COMPONENTBUILDER_POWER_CLASS', + 'abstract class' => 'COM_COMPONENTBUILDER_POWER_ABSTRACT_CLASS', + 'final class' => 'COM_COMPONENTBUILDER_POWER_FINAL_CLASS', + 'interface' => 'COM_COMPONENTBUILDER_POWER_INTERFACE', + 'trait' => 'COM_COMPONENTBUILDER_POWER_TRAIT' + ); + // Now check if value is found in this array + if (isset($typeArray[$value]) && ComponentbuilderHelper::checkString($typeArray[$value])) + { + return $typeArray[$value]; + } + } + return $value; + } + + /** + * Method to build an SQL query to load the list data. + * + * @return string An SQL query + */ + protected function getListQuery() + { + // Get the user object. + $user = JFactory::getUser(); + // Create a new query object. + $db = JFactory::getDBO(); + $query = $db->getQuery(true); + + // Select some fields + $query->select('a.*'); + + // From the componentbuilder_item table + $query->from($db->quoteName('#__componentbuilder_power', 'a')); + + // From the componentbuilder_power table. + $query->select($db->quoteName(['h.name','h.id'],['extends_name','extends_id'])); + $query->join('LEFT', $db->quoteName('#__componentbuilder_power', 'h') . ' ON (' . $db->quoteName('a.extends') . ' = ' . $db->quoteName('h.guid') . ')'); + + // Filter by published state + $published = $this->getState('filter.published'); + if (is_numeric($published)) + { + $query->where('a.published = ' . (int) $published); + } + elseif ($published === '') + { + $query->where('(a.published = 0 OR a.published = 1)'); + } + + // Join over the asset groups. + $query->select('ag.title AS access_level'); + $query->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access'); + // Filter by access level. + $_access = $this->getState('filter.access'); + if ($_access && is_numeric($_access)) + { + $query->where('a.access = ' . (int) $_access); + } + elseif (ComponentbuilderHelper::checkArray($_access)) + { + // Secure the array for the query + $_access = ArrayHelper::toInteger($_access); + // Filter by the Access Array. + $query->where('a.access IN (' . implode(',', $_access) . ')'); + } + // Implement View Level Access + if (!$user->authorise('core.options', 'com_componentbuilder')) + { + $groups = implode(',', $user->getAuthorisedViewLevels()); + $query->where('a.access IN (' . $groups . ')'); + } + // Filter by search. + $search = $this->getState('filter.search'); + if (!empty($search)) + { + if (stripos($search, 'id:') === 0) + { + $query->where('a.id = ' . (int) substr($search, 3)); + } + else + { + $search = $db->quote('%' . $db->escape($search) . '%'); + $query->where('(a.system_name LIKE '.$search.' OR a.type LIKE '.$search.' OR a.description LIKE '.$search.' OR a.extends_custom LIKE '.$search.' OR a.extends LIKE '.$search.' OR a.name LIKE '.$search.')'); + } + } + + // Filter by Type. + $_type = $this->getState('filter.type'); + if (is_numeric($_type)) + { + if (is_float($_type)) + { + $query->where('a.type = ' . (float) $_type); + } + else + { + $query->where('a.type = ' . (int) $_type); + } + } + elseif (ComponentbuilderHelper::checkString($_type)) + { + $query->where('a.type = ' . $db->quote($db->escape($_type))); + } + elseif (ComponentbuilderHelper::checkArray($_type)) + { + // Secure the array for the query + $_type = array_map( function ($val) use(&$db) { + if (is_numeric($val)) + { + if (is_float($val)) + { + return (float) $val; + } + else + { + return (int) $val; + } + } + elseif (ComponentbuilderHelper::checkString($val)) + { + return $db->quote($db->escape($val)); + } + }, $_type); + // Filter by the Type Array. + $query->where('a.type IN (' . implode(',', $_type) . ')'); + } + // Filter by Power_version. + $_power_version = $this->getState('filter.power_version'); + if (is_numeric($_power_version)) + { + if (is_float($_power_version)) + { + $query->where('a.power_version = ' . (float) $_power_version); + } + else + { + $query->where('a.power_version = ' . (int) $_power_version); + } + } + elseif (ComponentbuilderHelper::checkString($_power_version)) + { + $query->where('a.power_version = ' . $db->quote($db->escape($_power_version))); + } + // Filter by Extends. + $_extends = $this->getState('filter.extends'); + if (is_numeric($_extends)) + { + if (is_float($_extends)) + { + $query->where('a.extends = ' . (float) $_extends); + } + else + { + $query->where('a.extends = ' . (int) $_extends); + } + } + elseif (ComponentbuilderHelper::checkString($_extends)) + { + $query->where('a.extends = ' . $db->quote($db->escape($_extends))); + } + + // Add the list ordering clause. + $orderCol = $this->state->get('list.ordering', 'a.id'); + $orderDirn = $this->state->get('list.direction', 'desc'); + if ($orderCol != '') + { + $query->order($db->escape($orderCol . ' ' . $orderDirn)); + } + + return $query; + } + + /** + * Method to get a store id based on model configuration state. + * + * @return string A store id. + * + */ + protected function getStoreId($id = '') + { + // Compile the store id. + $id .= ':' . $this->getState('filter.id'); + $id .= ':' . $this->getState('filter.search'); + $id .= ':' . $this->getState('filter.published'); + // Check if the value is an array + $_access = $this->getState('filter.access'); + if (ComponentbuilderHelper::checkArray($_access)) + { + $id .= ':' . implode(':', $_access); + } + // Check if this is only an number or string + elseif (is_numeric($_access) + || ComponentbuilderHelper::checkString($_access)) + { + $id .= ':' . $_access; + } + $id .= ':' . $this->getState('filter.ordering'); + $id .= ':' . $this->getState('filter.created_by'); + $id .= ':' . $this->getState('filter.modified_by'); + // Check if the value is an array + $_type = $this->getState('filter.type'); + if (ComponentbuilderHelper::checkArray($_type)) + { + $id .= ':' . implode(':', $_type); + } + // Check if this is only an number or string + elseif (is_numeric($_type) + || ComponentbuilderHelper::checkString($_type)) + { + $id .= ':' . $_type; + } + $id .= ':' . $this->getState('filter.power_version'); + $id .= ':' . $this->getState('filter.extends'); + $id .= ':' . $this->getState('filter.system_name'); + $id .= ':' . $this->getState('filter.namespace'); + + return parent::getStoreId($id); + } + + /** + * Build an SQL query to checkin all items left checked out longer then a set time. + * + * @return a bool + * + */ + protected function checkInNow() + { + // Get set check in time + $time = JComponentHelper::getParams('com_componentbuilder')->get('check_in'); + + if ($time) + { + + // Get a db connection. + $db = JFactory::getDbo(); + // Reset query. + $query = $db->getQuery(true); + $query->select('*'); + $query->from($db->quoteName('#__componentbuilder_power')); + // 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. + $date = JFactory::getDate()->modify($time)->toSql(); + // Reset query. + $query = $db->getQuery(true); + + // Fields to update. + $fields = array( + $db->quoteName('checked_out_time') . '=\'0000-00-00 00:00:00\'', + $db->quoteName('checked_out') . '=0' + ); + + // Conditions for which records should be updated. + $conditions = array( + $db->quoteName('checked_out') . '!=0', + $db->quoteName('checked_out_time') . '<\''.$date.'\'' + ); + + // Check table. + $query->update($db->quoteName('#__componentbuilder_power'))->set($fields)->where($conditions); + + $db->setQuery($query); + + $db->execute(); + } + } + + return false; + } +} diff --git a/admin/sql/install.mysql.utf8.sql b/admin/sql/install.mysql.utf8.sql index 680b4a69e..9fd04d5ce 100644 --- a/admin/sql/install.mysql.utf8.sql +++ b/admin/sql/install.mysql.utf8.sql @@ -309,6 +309,54 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_joomla_plugin` ( KEY `idx_state` (`published`) ) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +CREATE TABLE IF NOT EXISTS `#__componentbuilder_power` ( + `id` INT(11) NOT NULL AUTO_INCREMENT, + `asset_id` INT(10) unsigned NOT NULL DEFAULT 0 COMMENT 'FK to the #__assets table.', + `add_head` TINYINT(1) NOT NULL DEFAULT 0, + `description` TEXT NOT NULL, + `extends` VARCHAR(36) NOT NULL DEFAULT '', + `extends_custom` VARCHAR(64) NOT NULL DEFAULT '', + `guid` VARCHAR(36) NOT NULL DEFAULT '', + `head` TEXT NOT NULL, + `implements` TEXT NULL, + `implements_custom` VARCHAR(1024) NOT NULL DEFAULT '', + `load_selection` TEXT NOT NULL, + `main_class_code` MEDIUMTEXT NOT NULL, + `method_selection` TEXT NOT NULL, + `name` VARCHAR(255) NOT NULL DEFAULT '', + `namespace` VARCHAR(255) NOT NULL DEFAULT '', + `power_version` CHAR(64) NOT NULL DEFAULT '', + `property_selection` TEXT NOT NULL, + `system_name` VARCHAR(255) NOT NULL DEFAULT '', + `type` VARCHAR(64) NOT NULL DEFAULT '', + `use_selection` TEXT NOT NULL, + `params` text NULL, + `published` TINYINT(3) NOT NULL DEFAULT 1, + `created_by` INT(10) unsigned NOT NULL DEFAULT 0, + `modified_by` INT(10) unsigned NOT NULL DEFAULT 0, + `created` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', + `modified` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', + `checked_out` int(11) unsigned NOT NULL DEFAULT 0, + `checked_out_time` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', + `version` INT(10) unsigned NOT NULL DEFAULT 1, + `hits` INT(10) unsigned NOT NULL DEFAULT 0, + `access` INT(10) unsigned NOT NULL DEFAULT 0, + `ordering` INT(11) NOT NULL DEFAULT 0, + PRIMARY KEY (`id`), + KEY `idx_system_name` (`system_name`), + KEY `idx_namespace` (`namespace`), + KEY `idx_type` (`type`), + KEY `idx_implements_custom` (`implements_custom`), + KEY `idx_extends_custom` (`extends_custom`), + KEY `idx_guid` (`guid`), + KEY `idx_name` (`name`), + KEY `idx_access` (`access`), + KEY `idx_checkout` (`checked_out`), + KEY `idx_createdby` (`created_by`), + KEY `idx_modifiedby` (`modified_by`), + KEY `idx_state` (`published`) +) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; + CREATE TABLE IF NOT EXISTS `#__componentbuilder_admin_view` ( `id` INT(11) NOT NULL AUTO_INCREMENT, `asset_id` INT(10) unsigned NOT NULL DEFAULT 0 COMMENT 'FK to the #__assets table.', @@ -1914,6 +1962,41 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_joomla_plugin_files_folders_urls INSERT INTO `#__componentbuilder_joomla_component` (`id`, `add_license`, `license_type`, `mvc_versiondate`, `add_css_admin`, `add_css_site`, `add_email_helper`, `add_javascript`, `add_php_helper_admin`, `add_php_helper_both`, `add_php_helper_site`, `add_php_postflight_install`, `add_php_method_uninstall`, `add_php_postflight_update`, `add_php_preflight_install`, `add_php_preflight_update`, `add_placeholders`, `add_sql`, `add_sql_uninstall`, `addfootable`, `adduikit`, `add_admin_event`, `add_site_event`, `add_update_server`, `add_sales_server`, `sales_server`, `update_server`, `update_server_target`, `update_server_url`, `php_admin_event`, `php_site_event`, `addreadme`, `readme`, `author`, `bom`, `buildcomp`, `buildcompsql`, `companyname`, `component_version`, `copyright`, `creatuserhelper`, `css_admin`, `css_site`, `dashboard`, `dashboard_type`, `debug_linenr`, `description`, `email`, `emptycontributors`, `export_buy_link`, `joomla_source_link`, `export_key`, `image`, `javascript`, `license`, `name`, `system_name`, `toignore`, `name_code`, `number`, `php_helper_admin`, `php_helper_both`, `php_helper_site`, `php_postflight_install`, `php_method_uninstall`, `php_postflight_update`, `php_preflight_install`, `php_preflight_update`, `short_description`, `sql`, `sql_uninstall`, `website`, `published`, `created`, `modified`, `hits`, `ordering`, `whmcs_key`, `whmcs_url`, `guid`) VALUES (25, '', 1, '', '', '', '', '', '', '', 1, 1, '', '', '', '', '', '', '', '', 1, '', '', 1, '', '', '', 2, 'https://raw.githubusercontent.com/namibia/demo-joomla-3-component/master/demo_updateserver.xml', '', '', 1, 'IyAjIyNDb21wb25lbnRfbmFtZSMjIyAoIyMjVkVSU0lPTiMjIykNCg0KIVsjIyNDb21wb25lbnRfbmFtZSMjIyBpbWFnZV0oaHR0cHM6Ly9yYXcuZ2l0aHVidXNlcmNvbnRlbnQuY29tL25hbWliaWEvZGVtby1qb29tbGEtMy1jb21wb25lbnQvbWFzdGVyL2FkbWluL2Fzc2V0cy9pbWFnZXMvdmRtLWNvbXBvbmVudC5qcGcgIlRoZSAjIyNDb21wb25lbnRfbmFtZSMjIyIpDQoNCiMjI0RFU0NSSVBUSU9OIyMjDQoNCiMgQnVpbGQgRGV0YWlscw0KDQorICpDb21wYW55KjogWyMjI0NPTVBBTllOQU1FIyMjXSgjIyNBVVRIT1JXRUJTSVRFIyMjKQ0KKyAqQXV0aG9yKjogWyMjI0FVVEhPUiMjI10obWFp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vb21sYSBbQXV0b21hdGVkIENvbXBvbmVudCBCdWlsZGVyXShodHRwczovL3d3dy52ZG0uaW8vam9vbWxhLWNvbXBvbmVudC1idWlsZGVyKS4NCj4gRGV2ZWxvcGVkIGJ5IFtMbGV3ZWxseW4gdmFuIGRlciBNZXJ3ZV0obWFpbHRvOmpvb21sYUB2ZG0uaW8pDQoNCltDVVNUT01DT0RFPXJlYWRNRWNvbnRyaWJ1dG9yc10=', 'Llewellyn van der Merwe', 'default.txt', '', '', 'Vast Development Method', '2.1.0', 'Copyright (C) 2015. All Rights Reserved', '', '', '', '', 1, '', 'Just a basic demo of the most basic implementations of the [Joomla](http://www.joomla.org) Component Builder\'s ability.', 'joomla@vdm.io', '', '', 'https://github.com/Llewellynvdm/Joomla-Demo-Component', 'hcYWdyvSGveEnSAqqDG8ybLDgwZ50qMcicGZ3GYQkHc=', 'images/vdm/demo500.jpg', '', 'GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html', 'Demo', 'Demo (public)', '.git', 'demo', 4, '', '', 'CS8qKg0KCSAqCUNoYW5nZSB0byBuaWNlIGZhbmN5IGRhdGUNCgkgKi8NCglwdWJsaWMgc3RhdGljIGZ1bmN0aW9uIGZhbmN5RGF0ZSgkZGF0ZSkNCgl7DQoJCWlmICghc2VsZjo6aXNWYWxpZFRpbWVTdGFtcCgkZGF0ZSkpDQoJCXsNCgkJCSRkYXRlID0gc3RydG90aW1lKCRkYXRlKTsNCgkJfQ0KCQlyZXR1cm4gZGF0ZSgnalMgXG9cZiBGIFknLCRkYXRlKTsNCgl9DQoNCgkvKioNCgkgKglDaGFuZ2UgdG8gbmljZSBmYW5jeSB0aW1lIGFuZCBkYXRlDQoJICovDQoJcHVibGljIHN0YXRpYyBmdW5jdGlvbiBmYW5jeURhdGVUaW1lKCR0aW1lKQ0KCXsNCgkJaWYgKCFzZWxmOjppc1ZhbGlkVGltZVN0YW1wKCR0aW1lKSkNCgkJew0KCQkJJHRpbWUgPSBzdHJ0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dCBvdXIgcGFnZSBvbiA8YSBocmVmPSJodHRwczovL2dpdGh1Yi5jb20vdmRtLWlvL0pvb21sYS1Db21wb25lbnQtQnVpbGRlciIgdGFnZXQ9Il9iYWxuayIgdGl0bGU9Ikpvb21sYSBDb21wb25lbnQgQnVpbGRlciI+Z2l0aHViPC9hPiBmb3IgbW9yZSBpbmZvLiBUaGUgZnV0dXJlIG9mIDxhIGhyZWY9Imh0dHA6Ly92ZG0uYnovY29tcG9uZW50LWJ1aWxkZXIiIHRhZ2V0PSJfYmFsbmsiIHRpdGxlPSJKb29tbGEgQ29tcG9uZW50IEJ1aWxkZXIiPkpvb21sYSBDb21wb25lbnQgRGV2ZWxvcG1lbnQ8L2E+IGlzIEhlcmUhJywgJ0luZm8nKTs=', '', '', '', '', 'Demo Component', '', '', 'https://www.vdm.io/', 1, '2016-10-18 11:44:09', '2020-11-17 17:19:57', '', 10, 'G2Rww7JuEI+de+Bm1ljKg72Hgt3MUfutTh1P15UayKU=', '', 'efde995e-60aa-4b39-b644-44349dfb660d'); +-- +-- Dumping data for table `#__componentbuilder_power` +-- + +INSERT INTO `#__componentbuilder_power` (`id`, `add_head`, `description`, `extends`, `extends_custom`, `guid`, `head`, `implements`, `implements_custom`, `load_selection`, `main_class_code`, `method_selection`, `name`, `namespace`, `power_version`, `property_selection`, `system_name`, `type`, `use_selection`, `params`, `published`, `created`, `modified`, `version`, `ordering`) VALUES +(1, '', 'Basic shared utilities, a legacy implementation\r\n\r\n@since 3.0.9', '', '', '79d765b3-7319-4988-9730-446c7f347020', '', '', '', '{}', 'CS8qKg0KCSAqIFRoZSBNYWluIEFjdGl2ZSBMYW5ndWFnZQ0KCSAqIA0KCSAqIEB2YXIgICAgICBzdHJpbmcNCgkgKiANCgkgKiBAc2luY2UgIDMuMC45DQoJICovDQoJcHVibGljIHN0YXRpYyAkbGFuZ1RhZzsNCg0KCS8qKg0KCSAqIENoZWNrIGlmIGhhdmUgYSBzdHJpbmcgd2l0aCBhIGxlbmd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udC4NCgkgKg0KCSAqIEBzaW5jZSAgMy4wLjExDQoJICovDQoJcHVibGljIHN0YXRpYyBmdW5jdGlvbiBzZXRDb21wb25lbnRPcHRpb24oJG9wdGlvbiA9IG51bGwpDQoJew0KCQkvLyBzZXQgdGhlIGxvY2FsIGNvbXBvbmVudCBvcHRpb24NCgkJaWYgKGVtcHR5KCRvcHRpb24pKQ0KCQl7DQoJCQlpZiAoZW1wdHkoSGVscGVyOjokb3B0aW9uKSAmJiBwcm9wZXJ0eV9leGlzdHMoX19DTEFTU19fLCAnQ29tcG9uZW50Q29kZU5hbWUnKSkNCgkJCXsNCgkJCQlIZWxwZXI6OiRvcHRpb24gPSAnY29tXycgLiBzZWxmOjokQ29tcG9uZW50Q29kZU5hbWU7DQoJCQl9DQoJCX0NCgkJZWxzZQ0KCQl7DQoJCQlIZWxwZXI6OiRvcHRpb24gPSAkb3B0aW9uOw0KCQl9DQoJfQ0K', '{}', 'Utilities', 'VDM\\Joomla\\Utilities', '1.0.0', '{}', 'Utilities', 'trait', '{\"use_selection0\":{\"use\":\"1f28cb53-60d9-4db1-b517-3c7dc6b429ef\",\"as\":\"default\"},\"use_selection1\":{\"use\":\"4b225c51-d293-48e4-b3f6-5136cf5c3f18\",\"as\":\"default\"},\"use_selection2\":{\"use\":\"0a59c65c-9daf-4bc9-baf4-e063ff9e6a8a\",\"as\":\"default\"},\"use_selection3\":{\"use\":\"91004529-94a9-4590-b842-e7c6b624ecf5\",\"as\":\"default\"},\"use_selection4\":{\"use\":\"152c8793-8b75-4715-996a-257b9f65451c\",\"as\":\"default\"},\"use_selection5\":{\"use\":\"db87c339-5bb6-4291-a7ef-2c48ea1b06bc\",\"as\":\"default\"},\"use_selection6\":{\"use\":\"9c513baf-b279-43fd-ae29-a585c8cbc4f0\",\"as\":\"default\"},\"use_selection7\":{\"use\":\"a223b31e-ea1d-4cdf-92ae-5f9becffaff0\",\"as\":\"default\"},\"use_selection8\":{\"use\":\"9ef0eb24-aae4-4f5a-99af-d724db44808f\",\"as\":\"default\"},\"use_selection9\":{\"use\":\"a8935cbe-7701-40dc-bfd5-675f2d600954\",\"as\":\"default\"},\"use_selection10\":{\"use\":\"30c5b4c2-f75f-4d15-869a-f8bfedd87358\",\"as\":\"default\"},\"use_selection11\":{\"use\":\"ce8cf834-6bac-44fb-941c-861f7e046cc0\",\"as\":\"default\"},\"use_selection12\":{\"use\":\"3cf76fbf-fd95-4a33-878e-7aff6d36b7f6\",\"as\":\"default\"},\"use_selection13\":{\"use\":\"640b5352-fb09-425f-a26e-cd44eda03f15\",\"as\":\"default\"}}', '', 1, '2021-11-06 13:25:19', '2022-06-07 13:29:51', 69, 1), +(2, 1, 'To extrude tables structures from lila', '', '', '050f5a27-3aab-4087-8a3d-e2302fcfd5db', 'dXNlIERpcmVjdG9yeUl0ZXJhdG9yOw0KdXNlIFNwbEZpbGVPYmplY3Q7DQp1c2Ugc3RkQ2xhc3M7DQp1c2UgZnVuY3Rpb24gYXJyYXlfcG9wOw0KdXNlIGZ1bmN0aW9uIGNvdW50Ow0KdXNlIGZ1bmN0aW9uIGV4cGxvZGU7DQp1c2UgZnVuY3Rpb24gZmlsZV9leGlzdHM7DQp1c2UgZnVuY3Rpb24gaXNfbnVsbDsNCnVzZSBmdW5jdGlvbiBhcnJheV9yZXZlcnNlOw0KdXNlIGZ1bmN0aW9uIHN0cl9yZXBsYWNlOw0KdXNlIGZ1bmN0aW9uIHN0cmxlbjsNCnVzZSBmdW5jdGlvbiBzdHJwb3M7DQp1c2UgZnVuY3Rpb24gc3RycnBvczsNCnVzZSBmdW5jdGlvbiBzdWJzdHI7DQp1c2UgZnVuY3Rpb24gdHJpbTsNCg==', '', '', '', 'CS8qKg0KCSAqIEFkZGluZyB0aGUgdXRpbGl0aWVzIHRyYWl0IHRvIHRoaXMgY2xhc3MNCgkgKiBTaW5jZSB3ZSBuZWVkIHNvbWUgb2YgaXRzIGZ1bmN0aW9ucw0KCSAqLw0KCXVzZSBVdGlsOw0KDQoJLyo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yBub3cgd2UgZG8gdGhlIGJydXRlZm9yY2Ugd2F5DQoJCWZvcmVhY2ggKCR0aGlzLT50YWJsZXMgYXMgJG1vZCA9PiAkbW9kcykNCgkJew0KCQkJaWYgKGlzc2V0KCRtb2RzWyR0YWJsZV0pKQ0KCQkJew0KCQkJCXJldHVybiAkbW9kOw0KCQkJfQ0KCQl9DQoNCgkJcmV0dXJuIGZhbHNlOw0KCX0NCg==', '{}', 'ExtrudeTables', '[[[COMPANY]]]\\[[[Component]]]\\ExtrudeTables', '1.0.0', '{}', 'Lila Extrude Tables', 'class', '{\"use_selection0\":{\"use\":\"79d765b3-7319-4988-9730-446c7f347020\"}}', '', 1, '2021-11-06 14:28:17', '2021-11-13 16:34:22', 33, 2), +(3, '', '', '', '', '7e6e7fe8-725d-411e-889a-4f1618c11840', '', '', '', '', 'Ly8gaGVscA==', '{}', 'TestingInterface', '[[[Component]]]\\Power\\TestingInterface', '1.0.0', '{}', 'Testing Interface', 'interface', '{}', '', 1, '2021-11-07 15:54:41', '2021-11-09 04:37:44', 7, 3), +(4, '', 'To store tables structures from lila', '', '', 'c4469632-3914-400e-b861-972b2d463963', '', '', '', '', 'CS8qKg0KCSAqIEFkZGluZyB0aGUgdXRpbGl0aWVzIHRyYWl0IHRvIHRoaXMgY2xhc3MNCgkgKiBTaW5jZSB3ZSBuZWVkIHNvbWUgb2YgaXRzIGZ1bmN0aW9ucw0KCSAqLw0KCXVzZSBVdGlsOw0KDQoJLyoqDQoJICogVGhlIGRhdGENCgkgKg0KCSAqIEB2YXIgRXh0cnVkZQ0KCSAqLw0KCXByb3RlY3RlZCAkZGF0YTsNCg0KCS8qKg0KCSAqIENvbnN0cnVjdG9yDQoJICoNCgkgKiBAcGFyYW0gICBFeHRydWRlICAkZGF0YSAgVGhlIGV4dHJ1ZGVkIGRhdGENCgkgKi8NCglwdWJsaWMgZnVuY3Rpb24gX19jb25zdHJ1Y3QoRXh0cnVkZVRhYmxlcyAkZGF0YSkNCgl7DQoJCS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JCXsNCgkJCXJldHVybiBhcnJheSgpOw0KCQl9DQoJCS8vIHJldHVybiBhbGwgb24gbnVsbCBhcmVhDQoJCXJldHVybiAkcGFyYW1zOw0KCX0NCg==', '{}', 'StoreTables', '[[[COMPANY]]]\\[[[Component]]]\\StoreTables', '1.0.0', '{}', 'Lila Store Tables', 'class', '{\"use_selection0\":{\"use\":\"79d765b3-7319-4988-9730-446c7f347020\"}}', '', 1, '2021-11-13 17:52:23', '2021-11-13 22:21:46', 14, 2), +(5, 1, '', '', '', 'db4a1e4d-be59-4e87-8b4d-c40512752232', 'dXNlIEpvb21sYVxDTVNcSHR0cFxIdHRwIGFzIEJhc2VIdHRwOw0KdXNlIEpvb21sYVxDTVNcSHR0cFxIdHRwRmFjdG9yeTsNCnVzZSBKb29tbGFcUmVnaXN0cnlcUmVnaXN0cnk7', '', '', '{\"load_selection0\":{\"load\":\"aa253bac-f4b4-41b4-8ace-071a73fc4d96\"},\"load_selection1\":{\"load\":\"c65aaf1f-817c-49a2-8202-282e3904f5b1\"},\"load_selection2\":{\"load\":\"51195163-1e87-4251-b755-a03c376798a6\"},\"load_selection3\":{\"load\":\"ef011ee1-64f0-4048-b013-777473b727dd\"},\"load_selection4\":{\"load\":\"c4a188de-ad78-4a6d-9d5b-01866846d701\"}}', 'CS8qKg0KCSAqIE9wdGlvbnMgZm9yIHRoZSBHaXRlYSBvYmplY3QuDQoJICoNCgkgKiBAdmFyICAgIGFycmF5DQoJICogQHNpbmNlICAxLjANCgkgKi8NCglwcm90ZWN0ZWQgJG9wdGlvbnM7DQoNCgkvKioNCgkgKiBUaGUgSFRUUCBjbGllbnQgb2JqZWN0IHRvIHVzZSBpbiBzZW5kaW5nIEhUVFAgcmVxdWVzdHMuDQoJICoNCgkgKiBAdmFyICAgIEJhc2VIdHRwDQoJICogQHNpbmNlICAxLjANCgkgKi8NCglwcm90ZWN0ZWQgJGNsaWVudDsNCg0KCS8qKg0KCSAqIENvbnN0cnVjdG9yLg0KCSAqDQoJ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0KCR0aGlzLT5vcHRpb25zWyRrZXldKSA/ICR0aGlzLT5vcHRpb25zWyRrZXldIDogbnVsbDsNCgl9DQoNCgkvKioNCgkgKiBTZXQgYW4gb3B0aW9uIGZvciB0aGUgR2l0ZWEgaW5zdGFuY2UuDQoJICoNCgkgKiBAcGFyYW0gICBzdHJpbmcgICRrZXkgICAgVGhlIG5hbWUgb2YgdGhlIG9wdGlvbiB0byBzZXQuDQoJICogQHBhcmFtICAgbWl4ZWQgICAkdmFsdWUgIFRoZSBvcHRpb24gdmFsdWUgdG8gc2V0Lg0KCSAqDQoJICogQHJldHVybiAgR2l0ZWEgIFRoaXMgb2JqZWN0IGZvciBtZXRob2QgY2hhaW5pbmcuDQoJICoNCgkgKiBAc2luY2UgICAxLjANCgkgKi8NCglwdWJsaWMgZnVuY3Rpb24gc2V0T3B0aW9uKCRrZXksICR2YWx1ZSkNCgl7DQoJCSR0aGlzLT5vcHRpb25zWyRrZXldID0gJHZhbHVlOw0KDQoJCXJldHVybiAkdGhpczsNCgl9DQo=', '{}', 'Gitea', 'VDM\\Gitea\\Gitea', '1.0.0', '{}', 'Gitea', 'class', '{}', '', 1, '2021-12-03 14:18:38', '2022-07-09 13:56:22', 27, 4), +(6, 1, '', '', '', 'aa253bac-f4b4-41b4-8ace-071a73fc4d96', 'dXNlIEpvb21sYVxDTVNcSHR0cFxIdHRwIGFzIEJhc2VIdHRwOw0KdXNlIEpvb21sYVxDTVNcSHR0cFxIdHRwRmFjdG9yeTsNCnVzZSBKb29tbGFcQ01TXEh0dHBcUmVzcG9uc2U7DQp1c2UgSm9vbWxhXFJlZ2lzdHJ5XFJlZ2lzdHJ5Ow0KdXNlIEpvb21sYVxVcmlcVXJpOw==', '', '', '{}', 'CS8qKg0KCSAqIE9wdGlvbnMgZm9yIHRoZSBHaXRlYSBvYmplY3QuDQoJICoNCgkgKiBAdmFyICAgIFJlZ2lzdHJ5DQoJICogQHNpbmNlICAxLjANCgkgKi8NCglwcm90ZWN0ZWQg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FzZTY0X2RlY29kZSgkYm9keS0+Y29udGVudF9iYXNlNjQpOw0KCQkJfQ0KCQl9DQoJCWVsc2UNCgkJew0KCQkJJGJvZHkgPSAkcmVzcG9uc2UtPmJvZHk7DQoJCX0NCg0KCQlyZXR1cm4gJGJvZHk7DQoJfQ0K', '{}', 'AbstractGiteaObject', 'VDM\\Gitea\\AbstractGiteaObject', '1.0.0', '{}', 'Abstract Gitea Object', 'abstract class', '{\"use_selection0\":{\"use\":\"4b225c51-d293-48e4-b3f6-5136cf5c3f18\",\"as\":\"default\"}}', '', 1, '2021-12-03 16:00:26', '2022-07-09 12:15:49', 20, 4), +(7, 1, '', 'aa253bac-f4b4-41b4-8ace-071a73fc4d96', '', 'c65aaf1f-817c-49a2-8202-282e3904f5b1', 'dXNlIEpvb21sYVxDTVNcSHR0cFxIdHRwIGFzIEJhc2VIdHRwOw0KdXNlIEpvb21sYVxSZWdpc3RyeVxSZWdpc3RyeTs=', '', '', '{}', 'CS8qKg0KCSAqIENvbnN0cnVjdG9yLg0KCSAqDQoJICogQHBhcmFtICAgUmVnaXN0cnkgICRvcHRpb25zICBHaXRlYSBvcHRpb25zIG9iamVjdC4NCgkgKiBAcGFyYW0gICBIdHRwICAgICAgJGNsaWVudCAgIFRoZSBIVFRQIGNsaWVudCBvYmplY3QuDQoJICoNCgkgKiBAc2luY2UgICAxLjANCgkgKi8NCglwdWJsaWMgZnVuY3Rpb24gX19jb25zdHJ1Y3QoUmVnaXN0cnkgJG9wdGlvbnMgPSBudWxsLCBCYXNlSHR0cCAkY2xpZW50ID0gbnVsbCkNCgl7DQoJCXBhcmVudDo6X19jb25zdHJ1Y3QoJG9wdGlvbnMsICRjbGllbnQpOw0KDQoJCSR0aGlzLT5wYWNrYWdlID0gXGdldF9jbGFzcygkdGhpcyk7DQoJCSR0aGlzLT5wYWNrYWdlID0gc3Vic3RyKCR0aGlzLT5wYWNrYWdlLCBzdHJycG9zKCR0aGlzLT5wYWNrYWdlLCAnXFwnKSArID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abstract class', '{}', '', 1, '2021-12-03 16:03:06', '2022-05-27 08:31:35', 15, 4), +(8, 1, '', 'c65aaf1f-817c-49a2-8202-282e3904f5b1', '', '51195163-1e87-4251-b755-a03c376798a6', 'dXNlIEpvb21sYVxDTVNcSHR0cFxIdHRwOw0KdXNlIEpvb21sYVxSZWdpc3RyeVxSZWdpc3RyeTs=', '', '', '{}', 'CS8qKg0KCSAqIExpc3QgeW91ciByZXBvc2l0b3JpZXMuDQoJICoNCgkgKiBMaXN0IHJlcG9zaXRvcmllcyBmb3IgdGhlIGF1dGhlbnRpY2F0ZWQgdXNlci4NCgkgKg0KCSAqIEByZXR1cm4gIG9iamVjdA0KCSAqDQoJICogQHNpbmNlICAgMS4wDQoJICovDQoJcHVibGljIGZ1bmN0aW9uIGdldExpc3RPd24oKQ0KCXsNCgkJLy8gQnVpbGQgdGhlIHJlcXVlc3QgcGF0aC4NCgkJJHVyaSA9ICR0aGlzLT5mZXRjaFVybCgnL3VzZXIvcmVwb3MnKTsNCg0KCQkvLyBTZW5kIHRoZSByZXF1ZXN0Lg0KCQlyZXR1cm4gJHRoaXMtPnByb2Nlc3NSZXNwb25zZSgkdGhpcy0+Y2xpZW50LT5nZXQoJHVyaSkpOw0KCX0NCg0KCS8qKg0KCSAqIExpc3QgdXNlciByZXBvc2l0b3JpZXMuDQoJICoNCgkgKiBMaXN0IHB1YmxpYyByZXBvc2l0b3JpZXMgZm9yIHRoZSBzcGVjaWZpZWQgdXNlci4NCgkgKg0KCSAqIEBwYXJhbSAgIHN0cmluZyAgJHVzZXIgICAgICAgVGhlIHVzZXIgbmFtZS4NCgkgKg0KCSAqIEByZXR1cm4gIG9iamVjdA0KCSAqDQoJICogQHNpbmNlICAgMS4wDQoJICovDQoJcHVibGljIGZ1bmN0aW9uIGdldExpc3RVc2VyKCR1c2VyKQ0KCXsNCgkJLy8gQnVpbGQgdGhlIHJlcXVlc3QgcGF0aC4NCgkJJHVyaSA9ICR0aGlzLT5mZXRjaFVybCgnL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4gIG9iamVjdA0KCSAqDQoJICogQHNpbmNlICAgMS4wDQoJICovDQoJcHVibGljIGZ1bmN0aW9uIGRlbGV0ZSgkb3duZXIsICRyZXBvKQ0KCXsNCgkJLy8gQnVpbGQgdGhlIHJlcXVlc3QgcGF0aC4NCgkJJHBhdGggPSAnL3JlcG9zLycgLiAkb3duZXIgLiAnLycgLiAkcmVwbzsNCg0KCQkvLyBTZW5kIHRoZSByZXF1ZXN0Lg0KCQlyZXR1cm4gJHRoaXMtPnByb2Nlc3NSZXNwb25zZSgNCgkJCSR0aGlzLT5jbGllbnQtPmRlbGV0ZSgkdGhpcy0+ZmV0Y2hVcmwoJHBhdGgpKQ0KCQkpOw0KCX0NCg==', '{}', 'Repo', 'VDM\\Gitea\\Package.Repo', '1.0.0', '{}', 'Gitea Repo', 'class', '{}', '', 1, '2021-12-03 16:37:20', '2022-07-09 10:28:45', 13, 4), +(9, 1, '', '', '', '011813ba-8dd2-4beb-98f9-50ab3f3665d1', 'dXNlIEpvb21sYVxDTVNcSHR0cFxIdHRwIGFzIEJhc2VIdHRwOw0KdXNlIEpvb21sYVxDTVNcSHR0cFxIdHRwRmFjdG9yeTsNCnVzZSBKb29tbGFcUmVnaXN0cnlcUmVnaXN0cnk7', '', '', '{\"load_selection0\":{\"load\":\"aa253bac-f4b4-41b4-8ace-071a73fc4d96\"},\"load_selection1\":{\"load\":\"c65aaf1f-817c-49a2-8202-282e3904f5b1\"},\"load_selection2\":{\"load\":\"51195163-1e87-4251-b755-a03c376798a6\"}}', 'CS8qKg0KCSAqIE9wdGlvbnMgZm9yIHRoZSBbW1tBcGldXV0gb2JqZWN0Lg0KCSAqDQoJICogQHZhciAgICBhcnJheQ0KCSAqIEBzaW5jZSAgMS4wDQoJICovDQoJcHJvdGVjdGVkICRvcHRpb25zOw0KDQoJLyoqDQoJICogVGhlIEhUVFAgY2xpZW50IG9iamVjdCB0byB1c2UgaW4gc2VuZGluZyBIVFRQIHJlcXVlc3RzLg0KCSAqDQoJ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byBnZXQuDQoJICoNCgkgKiBAcmV0dXJuICBtaXhlZCAgVGhlIG9wdGlvbiB2YWx1ZS4NCgkgKg0KCSAqIEBzaW5jZSAgIDEuMA0KCSAqLw0KCXB1YmxpYyBmdW5jdGlvbiBnZXRPcHRpb24oJGtleSkNCgl7DQoJCXJldHVybiBpc3NldCgkdGhpcy0+b3B0aW9uc1ska2V5XSkgPyAkdGhpcy0+b3B0aW9uc1ska2V5XSA6IG51bGw7DQoJfQ0KDQoJLyoqDQoJICogU2V0IGFuIG9wdGlvbiBmb3IgdGhlIFtbW0FwaV1dXSBpbnN0YW5jZS4NCgkgKg0KCSAqIEBwYXJhbSAgIHN0cmluZyAgJGtleSAgICBUaGUgbmFtZSBvZiB0aGUgb3B0aW9uIHRvIHNldC4NCgkgKiBAcGFyYW0gICBtaXhlZCAgICR2YWx1ZSAgVGhlIG9wdGlvbiB2YWx1ZSB0byBzZXQuDQoJICoNCgkgKiBAcmV0dXJuICBbW1tBcGldXV0gIFRoaXMgb2JqZWN0IGZvciBtZXRob2QgY2hhaW5pbmcuDQoJICoNCgkgKiBAc2luY2UgICAxLjANCgkgKi8NCglwdWJsaWMgZnVuY3Rpb24gc2V0T3B0aW9uKCRrZXksICR2YWx1ZSkNCgl7DQoJCSR0aGlzLT5vcHRpb25zWyRrZXldID0gJHZhbHVlOw0KDQoJCXJldHVybiAkdGhpczsNCgl9DQo=', '{}', '[[[Api]]]', '[[[COMPANY]]]\\[[[Api]]]\\[[[Api]]]', '1.0.0', '{}', 'API', 'class', '{}', '', 1, '2022-01-05 00:44:15', '2022-03-09 01:43:33', 5, 4), +(10, 1, 'Control the naming of a field\r\n\r\n@since 3.0.9', '', '', '9ef0eb24-aae4-4f5a-99af-d724db44808f', 'dXNlIEpvb21sYVxDTVNcQ29tcG9uZW50XENvbXBvbmVudEhlbHBlcjs=', '', '', '{}', 'CS8qKg0KCSAqIFRoZSBmaWVsZCBidWlsZGVyIHN3aXRjaA0KCSAqIA0KCSAqIEBza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CQkvLyByZXR1cm4gYWxsIGNhcHMNCgkJaWYgKCRhbGxjYXApDQoJCXsNCgkJCXJldHVybiBTdHJpbmdIZWxwZXI6OnNhZmUoJHN0cmluZywgJ1UnKTsNCgkJfQ0KDQoJCS8vIHVzZSB0aGUgZGVmYXVsdCAob3JpZ2luYWwgYmVoYXZpb3IvY29udmVudGlvbikNCgkJcmV0dXJuIFN0cmluZ0hlbHBlcjo6c2FmZSgkc3RyaW5nKTsNCgl9DQo=', '{}', 'FieldHelper', 'VDM\\Joomla\\Utilities.String.FieldHelper', '1.0.0', '{}', 'String Field Helper', 'abstract class', '{\"use_selection0\":{\"use\":\"1f28cb53-60d9-4db1-b517-3c7dc6b429ef\"},\"use_selection1\":{\"use\":\"640b5352-fb09-425f-a26e-cd44eda03f15\"}}', '', 1, '2022-03-08 20:46:56', '2022-05-21 13:27:39', 20, 5), +(11, '', 'The json checker\r\n\r\n@since 3.0.9', '', '', '4b225c51-d293-48e4-b3f6-5136cf5c3f18', '', '', '', '{\"load_selection0\":{\"load\":\"1f28cb53-60d9-4db1-b517-3c7dc6b429ef\"},\"load_selection1\":{\"load\":\"0a59c65c-9daf-4bc9-baf4-e063ff9e6a8a\"},\"load_selection2\":{\"load\":\"db87c339-5bb6-4291-a7ef-2c48ea1b06bc\"}}', 'CS8qKg0KCSAqIENoZWNrIGlmIHlvdSBoYXZlIGEganNvbiBzdHJpbmcNCgkgKg0KCSAqIEBpbnB1dCAgICBzdHJpbmcgICRzdHJpbmcgIFRoZSBqc29uIHN0cmluZyB0byBjaGVjaw0KCSAqDQoJICogQHJldHVybnMgYm9vbCB0cnVlIG9uIHN1Y2Nlc3MNCgkgKiANCgkgKiBAc2luY2UgIDMuMC45DQoJICovDQoJcHVibGljIHN0YXRpYyBmdW5jdGlvbiBjaGVjaygkc3RyaW5nKTogYm9vbA0KCXsNCgkJaWYgKFN0cmluZ0hlbHBlcjo6Y2hlY2soJHN0cmluZykpDQoJCXsNCgkJCWpzb25fZGVjb2Rl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YWNoICgkcmVzdWx0IGFzICR2YWwpDQoJCQkJCXsNCgkJCQkJCWlmICgkZXh0ZXJuYWwpDQoJCQkJCQl7DQoJCQkJCQkJaWYgKCRfbmFtZSA9IEdldEhlbHBlcjo6dmFyKG51bGwsICR2YWwsICRpZCwgJG5hbWUsICc9JywgJHRhYmxlKSkNCgkJCQkJCQl7DQoJCQkJCQkJCSRuYW1lc1tdID0gJF9uYW1lOw0KCQkJCQkJCX0NCgkJCQkJCX0NCgkJCQkJCWVsc2UNCgkJCQkJCXsNCgkJCQkJCQlpZiAoJF9uYW1lID0gR2V0SGVscGVyOjp2YXIoJHRhYmxlLCAkdmFsLCAkaWQsICRuYW1lKSkNCgkJCQkJCQl7DQoJCQkJCQkJCSRuYW1lc1tdID0gJF9uYW1lOw0KCQkJCQkJCX0NCgkJCQkJCX0NCgkJCQkJfQ0KCQkJCQlpZiAoQXJyYXlIZWxwZXI6OmNoZWNrKCRuYW1lcykpDQoJCQkJCXsNCgkJCQkJCXJldHVybiAoc3RyaW5nKSBpbXBsb2RlKCRzZXBhcmF0b3IsICRuYW1lcyk7DQoJCQkJCX0JDQoJCQkJfQ0KCQkJCXJldHVybiAoc3RyaW5nKSBpbXBsb2RlKCRzZXBhcmF0b3IsICRyZXN1bHQpOw0KCQkJfQ0KCQkJcmV0dXJuIChzdHJpbmcpIGpzb25fZGVjb2RlKCR2YWx1ZSk7DQoJCX0NCgkJcmV0dXJuICR2YWx1ZTsNCgl9DQo=', '{}', 'JsonHelper', 'VDM\\Joomla\\Utilities.JsonHelper', '1.0.0', '{}', 'Utilities Json Helper', 'abstract class', '{}', '', 1, '2022-03-08 21:03:54', '2022-05-21 13:27:39', 18, 6), +(12, 1, 'Some string tricks\r\n\r\n@since 3.0.9', '', '', '1f28cb53-60d9-4db1-b517-3c7dc6b429ef', 'dXNlIEpvb21sYVxDTVNcRmlsdGVyXElucHV0RmlsdGVyOw0KdXNlIEpvb21sYVxDTVNcTGFuZ3VhZ2VcTGFuZ3V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xpb24nOw0KCQkJCSRyID0gZm1vZCgkeCwgMTAwMDAwMCk7DQoJCQkJaWYoJHIgPiAwKQ0KCQkJCXsNCgkJCQkJJHcgLj0gJyAnOw0KCQkJCQlpZigkciA8IDEwMCkNCgkJCQkJew0KCQkJCQkJJHcgLj0gJ2FuZCAnOw0KCQkJCQl9DQoJCQkJCSR3IC49IHNlbGY6Om51bWJlcigkcik7DQoJCQkJfQ0KCQkJfQ0KCQl9DQoJCXJldHVybiAkdzsNCgl9DQoNCgkvKioNCgkgKiBSYW5kb20gS2V5DQoJICoNCgkgKiBAcmV0dXJucyBhIHN0cmluZw0KCSAqIA0KCSAqIEBzaW5jZSAgMy4wLjkNCgkgKi8NCglwdWJsaWMgc3RhdGljIGZ1bmN0aW9uIHJhbmRvbSgkc2l6ZSkNCgl7DQoJCSRiYWcgPSAiYWJjZWZnaGlqa25vcHFyc3R1d3h5ekFCQ0RERUZHSElKS0xMTU1OT1BRUlNUVVZWV1hZWmFiY2RkZWZnaGlqa2xsbW1ub3BxcnN0dXZ2d3h5ekFCQ0VGR0hJSktOT1BRUlNUVVdYWVoiOw0KCQkka2V5ID0gYXJyYXkoKTsNCgkJJGJhZ3NpemUgPSBzdHJsZW4oJGJhZykgLSAxOw0KDQoJCWZvciAoJGkgPSAwOyAkaSA8ICRzaXplOyAkaSsrKQ0KCQl7DQoJCQkkZ2V0ID0gcmFuZCgwLCAkYmFnc2l6ZSk7DQoJCQkka2V5W10gPSAkYmFnWyRnZXRdOw0KCQl9DQoNCgkJcmV0dXJuIGltcGxvZGUoJGtleSk7DQoJfQ0K', '{}', 'StringHelper', 'VDM\\Joomla\\Utilities.StringHelper', '1.0.0', '{}', 'Utilities String Helper', 'abstract class', '{\"use_selection0\":{\"use\":\"640b5352-fb09-425f-a26e-cd44eda03f15\",\"as\":\"default\"}}', '', 1, '2022-03-08 21:35:37', '2022-05-27 08:31:35', 25, 7), +(13, '', 'Some array tricks helper\r\n\r\n@since 3.0.9', '', '', '0a59c65c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la\\Utilities.ArrayHelper', '1.0.0', '{}', 'Utilities Array Helper', 'abstract class', '{}', '', 1, '2022-03-08 22:53:52', '2022-06-13 10:25:15', 14, 8), +(14, '', 'Control the naming of a namespace helper\r\n\r\n@since 3.0.9', '', '', 'ce8cf834-6bac-44fb-941c-861f7e046cc0', '', '', '', '{}', 'CS8qKg0KCSAqIE1ha2luZyBuYW1lc3BhY2Ugc2FmZQ0KCSAqDQoJICogQGlucHV0CXN0cmluZyAgICAgICBUaGUgeW91IHdvdWxkIGxpa2UgdG8gbWFrZSBzYWZlDQoJICoNCgkgKiBAcmV0dXJucyBzdHJpbmcgb24gc3VjY2Vzcw0KCSAqIA0KCSAqIEBzaW5jZSAgMy4wLjkNCgkgKi8NCglwdWJsaWMgc3RhdGljIGZ1bmN0aW9uIHNhZmUoJHN0cmluZykNCgl7DQoJCS8vIDBubHkgY29udGludWUgaWYgd2UgaGF2ZSBhIHN0cmluZw0KCQlpZiAoU3RyaW5nSGVscGVyOjpjaGVjaygkc3RyaW5nKSkNCgkJew0KCQkJLy8gbWFrZSBzdXJlIGl0IGhhcyBub3QgbnVtYmVycw0KCQkJJHN0cmluZyA9IFN0cmluZ0hlbHBlcjo6bnVtYmVycygkc3RyaW5nKTsNCg0KCQkJLy8gVHJhbnNsaXRlcmF0ZSBzdHJpbmcgVE9ETzogbG9vayBhZ2FpbiBhcyB0aGlzIG1ha2UgaXQgbG93ZXJjYXNlDQoJCQkvLyAkc3RyaW5nID0gU3RyaW5nSGVscGVyOjp0cmFuc2xpdGVyYXRlKCRzdHJpbmcpOw0KDQoJCQkvLyBmaXJzdCByZW1vdmUgYWxsIFtcXSBiYWNrc2xhc2hlcw0KCQkJJHN0cmluZyA9IHN0cl9yZXBsYWNlKCdcXCcsICcxJywgJHN0cmluZyk7DQoNCgkJCS8vIHJlbW92ZSBhbGwgYW5kIGtlZXAgb25seSBjaGFyYWN0ZXJzIGFuZCBbXF0gYmFja3NsYXNoZXMgaW5zaWRlIG9mIHRoZSBzdHJpbmcNCgkJCSRzdHJpbmcgPSB0cmltKCBwcmVnX3JlcGxhY2UoIi9bXkEtWmEtejFdLyIsICcnLCAkc3RyaW5nKSwgJzEnKTsNCg0KCQkJLy8gcGxhY2UgdGhlIFtcXSBiYWNrc2xhc2hlcyBiYWNrDQoJCQlyZXR1cm4gdHJpbSggcHJlZ19yZXBsYWNlKCIvMSsvIiwgJ1xcJywgJHN0cmluZykpOw0KCQl9DQoJCS8vIG5vdCBhIHN0cmluZw0KCQlyZXR1cm4gJyc7DQoJfQ0K', '{}', 'NamespaceHelper', 'VDM\\Joomla\\Utilities.String.NamespaceHelper', '1.0.0', '{}', 'String Namespace Helper', 'abstract class', '{\"use_selection0\":{\"use\":\"1f28cb53-60d9-4db1-b517-3c7dc6b429ef\"}}', '', 1, '2022-03-08 23:27:57', '2022-05-21 13:27:39', 15, 5), +(15, 1, 'Control the naming of a field type\r\n\r\n@since 3.0.9', '', '', 'a8935cbe-7701-40dc-bfd5-675f2d600954', 'dXNlIEpvb21sYVxDTVNcQ29tcG9uZW50XENvbXBvbmVudEhlbHBlcjs=', '', '', '{}', 'CS8qKg0KCSAqIFRoZSBmaWVsZCBidWlsZGVyIHN3aXRjaA0KCSAqIA0KCSAqIEBzaW5jZSAgMy4wLjkNCgkgKi8NCglwcm90ZWN0ZWQgc3RhdGljICRidWlsZGVyID0gZmFsc2U7DQoNCgkvKioNCgkgKiBNYWtpbmcgZmllbGQgdHlwZSBuYW1lIHNhZmUNCgkgKg0KCSAqIEBwYXJhbSAgIFN0cmluZyAgICAgICRzdHJpbmcgICAgIFRoZSB5b3Ugd291bGQgbGlrZSB0byBtYWtlIHNhZmUNCgkgKiBAcGFyYW0gICBTdHJpbmcgICAgICAkb3B0aW9uICAgIFRoZSBvcHRpb24gZm9yIHRoZSBjb21wb25lbnQuDQoJICoNCgkgKiBAcmV0dXJucyBzdHJpbmcgb24gc3VjY2Vzcw0KCSAqIA0KCSAqIEBzaW5jZSAgMy4wLjkNCgkgK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gc3RyaW5nIGVxdWFsaXR5IGluIGNvbXBpbGVyKQ0KCQkJCXJldHVybiBzdHJ0b2xvd2VyKCRzdHJpbmcpOw0KCQkJfQ0KCQkJLy8gbm90IGEgc3RyaW5nDQoJCQlyZXR1cm4gJyc7DQoJCX0NCg0KCQkvLyB1c2UgdGhlIGRlZmF1bHQgKG9yaWdpbmFsIGJlaGF2aW91ci9jb252ZW50aW9uKQ0KCQlyZXR1cm4gU3RyaW5nSGVscGVyOjpzYWZlKCRzdHJpbmcpOw0KCX0NCg==', '{}', 'TypeHelper', 'VDM\\Joomla\\Utilities.String.TypeHelper', '1.0.0', '{}', 'String Type Helper', 'abstract class', '{\"use_selection0\":{\"use\":\"1f28cb53-60d9-4db1-b517-3c7dc6b429ef\"},\"use_selection1\":{\"use\":\"640b5352-fb09-425f-a26e-cd44eda03f15\"}}', '', 1, '2022-03-08 23:33:09', '2022-05-21 13:27:39', 14, 5), +(16, '', 'Control the naming of a class and function\r\n\r\n@since 3.0.9', '', '', '30c5b4c2-f75f-4d15-869a-f8bfedd87358', '', '', '', '{}', 'CS8qKg0KCSAqIE1ha2luZyBjbGFzcyBvciBmdW5jdGlvbiBuYW1lIHNhZmUNCgkgKg0KCSAqIEBpbnB1dAlzdHJpbmcgICAgICAgVGhlIG5hbWUgeW91IHdvdWxkIGxpa2UgdG8gbWFrZSBzYWZlDQoJICoNCgkgKiBAcmV0dXJucyBzdHJpbmcgb24gc3VjY2Vzcw0KCSAqIA0KCSAqIEBzaW5jZSAgMy4wLjkNCgkgKi8NCglwdWJsaWMgc3RhdGljIGZ1bmN0aW9uIHNhZmUoJG5hbWUpDQoJew0KCQkvLyByZW1vdmUgbnVtYmVycyBpZiB0aGUgZmlyc3QgY2hhcmFjdGVyIGlzIGEgbnVtYmVyDQoJCWlmIChpc19udW1lcmljKHN1YnN0cigkbmFtZSwgMCwgMSkpKQ0KCQl7DQoJCQkkbmFtZSA9IFN0cmluZ0hlbHBlcjo6bnVtYmVycygkbmFtZSk7DQoJCX0NCg0KCQkvLyByZW1vdmUgYWxsIHNwYWNlcyBhbmQgc3RyYW5nZSBjaGFyYWN0ZXJzDQoJCXJldHVybiB0cmltKHByZWdfcmVwbGFjZSgiL1teQS1aYS16MC05Xy1dLyIsICcnLCAkbmFtZSkpOw0KCX0NCg==', '{}', 'ClassfunctionHelper', 'VDM\\Joomla\\Utilities.String.ClassfunctionHelper', '1.0.0', '{}', 'String Classfunction Helper', 'abstract class', '{\"use_selection0\":{\"use\":\"1f28cb53-60d9-4db1-b517-3c7dc6b429ef\"}}', '', 1, '2022-03-08 23:43:10', '2022-05-21 13:27:39', 14, 5), +(17, 1, 'Some easy get...\r\n\r\n@since 3.0.9', '', '', 'db87c339-5bb6-4291-a7ef-2c48ea1b06bc', 'dXNlIEpvb21sYVxDTVNcRmFjdG9yeTs=', '', '', '{\"load_selection0\":{\"load\":\"0a59c65c-9daf-4bc9-baf4-e063ff9e6a8a\"},\"load_selection1\":{\"load\":\"1f28cb53-60d9-4db1-b517-3c7dc6b429ef\"}}', 'CS8qKg0KCSAqIEdldCBhIFZhcmlhYmxlIA0KCSAqDQoJICogQHBhcmFtICAgc3RyaW5nICAgJHRhYmxlICAgICAgICBUaGUgdGFibGUgZnJvbSB3aGljaCB0byBnZXQgdGhlIHZhcmlhYmxlDQoJICogQHBhcmFtICAgc3RyaW5nICAgJHdoZXJlICAgICAgICBUaGUgdmFsdWUgd2hlcmUNCgkgKiBAcGFyYW0gICBzdHJpbmcgICAkd2hlcmVTdHJpbmcgIFRoZSB0YXJnZXQvZmllbGQgc3RyaW5nIHdoZXJlL25hbWUNCgkgKiBAcGFyYW0gICBzdHJpbmcgICAkd2hhdCAgICAgICAgIFRoZSByZXR1cm4gZmllbGQNCgkgKiBAcGFyYW0gICBzdHJpbmcgICAkb3BlcmF0b3IgICAgIFRoZSBvcGVyYXRvciBiZXR3ZWVuICR3aGVyZVN0cmluZy9maWVsZCBhbmQgJHdoZXJlL3ZhbHVlDQoJICogQHBhcm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clsxXSkpDQoJCXsNCgkJCSRyID0gZXhwbG9kZSgkZW5kLCAkclsxXSk7DQoJCQlyZXR1cm4gJHJbMF07DQoJCX0NCgkJcmV0dXJuICRkZWZhdWx0Ow0KCX0NCg==', '{}', 'GetHelper', 'VDM\\Joomla\\Utilities.GetHelper', '1.0.0', '{}', 'Utilities GetHelper', 'abstract class', '{\"use_selection0\":{\"use\":\"640b5352-fb09-425f-a26e-cd44eda03f15\"}}', '', 1, '2022-03-09 00:21:06', '2022-05-21 13:27:39', 20, 9), +(18, '', 'Some object tricks\r\n\r\n@since 3.0.9', '', '', '91004529-94a9-4590-b842-e7c6b624ecf5', '', '', '', '{}', 'CS8qKg0KCSAqIENoZWNrIGlmIGhhdmUgYW4gb2JqZWN0IHdpdGggYSBsZW5ndGgNCgkgKg0KCSAqIEBpbnB1dAlvYmplY3QgICBUaGUgb2JqZWN0IHRvIGNoZWNrDQoJICoNCgkgKiBAcmV0dXJucyBib29sIHRydWUgb24gc3VjY2Vzcw0KCSAqIA0KCSAqIEBzaW5jZSAgMy4wLjkNCgkgKi8NCglwdWJsaWMgc3RhdGljIGZ1bmN0aW9uIGNoZWNrKCRvYmplY3QpDQoJew0KCQlpZiAoaXNfb2JqZWN0KCRvYmplY3QpKQ0KCQl7DQoJCQlyZXR1cm4gY291bnQoKGFycmF5KSAkb2JqZWN0KSA+IDA7DQoJCX0NCg0KCQlyZXR1cm4gZmFsc2U7DQoJfQ0K', '{}', 'ObjectHelper', 'VDM\\Joomla\\Utilities.ObjectHelper', '1.0.0', '{}', 'Utilities Object Helper', 'abstract class', '{}', '', 1, '2022-03-09 00:35:23', '2022-05-21 13:27:39', 12, 8), +(19, '', 'Basic Math Helper\r\n\r\n@since 3.0.9', '', '', '152c8793-8b75-4715-996a-257b9f65451c', '', '', '', '{}', 'CS8qKg0KCSAqIGJjIG1hdGggd3JhcHBlciAodmVyeSBiYXNpYyBub3QgZm9yIGFjY291bnRpbmcpDQoJICoNCgkgKiBAcGFyYW0g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pb24gaWYgYXZhaWxhYmxlDQoJCWlmIChmdW5jdGlvbl9leGlzdHMoJ2JjYWRkJykpDQoJCXsNCgkJCS8vIHNldCB0aGUgc3RhcnQgdmFsdWUNCgkJCSR2YWx1ZSA9IDAuMDsNCgkJCS8vIGxvb3AgdGhlIHZhbHVlcyBhbmQgcnVuIGJjYWRkDQoJCQlmb3JlYWNoKCRhcnJheSBhcyAkdmFsKQ0KCQkJew0KCQkJCSR2YWx1ZSA9IGJjYWRkKCR2YWx1ZSwgJHZhbCwgJHNjYWxlKTsNCgkJCX0NCgkJCXJldHVybiAkdmFsdWU7DQoJCX0NCgkJLy8gZmFsbCBiYWNrIG9uIGFycmF5IHN1bQ0KCQlyZXR1cm4gYXJyYXlfc3VtKCRhcnJheSk7DQoJfQ0K', '{}', 'MathHelper', 'VDM\\Joomla\\Utilities.MathHelper', '1.0.0', '{}', 'Utilities Math Helper', 'abstract class', '{}', '', 1, '2022-03-09 13:05:39', '2022-05-21 13:27:39', 8, 9), +(20, '', 'Control the naming of a plugin\r\n\r\n@since 3.0.9', '', '', '3cf76fbf-fd95-4a33-878e-7aff6d36b7f6', '', '', '', '{}', 'CS8qKg0KCSAqIE1ha2luZyBwbHVnaW4gZm9sZGVyIG5hbWUgc2FmZQ0KCSAqDQoJICogQGlucHV0CXN0cmluZyAgICAkY29kZU5hbWUgICBUaGUgbmFtZQ0KCSAqIEBpbnB1dAlzdHJpbmcgICAgJGdyb3VwICAgVGhlIGdyb3VwIG5hbWUNCgkgKg0KCSAqIEByZXR1cm5zIHN0cmluZyBvbiBzdWNjZXNzDQoJICogDQoJICogQHNpbmNlICAzLjAuOQ0KCSAqLw0KCXB1YmxpYyBzdGF0aWMgZnVuY3Rpb24gc2FmZUZvbGRlck5hbWUoJGNvZGVOYW1lLCAkZ3JvdXApDQoJew0KCQkvLyBlZGl0b3JzLXh0ZCBncm91cCBwbHVnaW5zIG11c3QgaGF2ZSBhIGNsYXNzIHdpdGggcGxnQnV0dG9uPFBsd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0b24nOw0KCQl9DQoNCgkJcmV0dXJuICdQTEdfJyAuIHN0cnRvdXBwZXIoJGdyb3VwKSAuICdfJyAuIHN0cnRvdXBwZXIoDQoJCQkkY29kZU5hbWUNCgkJKTsNCgl9DQo=', '{}', 'PluginHelper', 'VDM\\Joomla\\Utilities.String.PluginHelper', '1.0.0', '{}', 'String Plugin Helper', 'abstract class', '{}', '', 1, '2022-03-09 14:44:58', '2022-05-21 13:27:39', 13, 5), +(21, 1, 'Global Unique ID Helper\r\n\r\n@since 3.0.9', '', '', '9c513baf-b279-43fd-ae29-a585c8cbc4f0', 'dXNlIEpvb21sYVxDTVNcRmFjdG9yeTs=', '', '', '{\"load_selection0\":{\"load\":\"0a59c65c-9daf-4bc9-baf4-e063ff9e6a8a\"},\"load_selection1\":{\"load\":\"1f28cb53-60d9-4db1-b517-3c7dc6b429ef\"}}', 'CS8qKg0KCSAqIFJldHVybnMgYSBHVUlEdjQgc3RyaW5nDQoJICogDQoJICogVGhhbmtzIHRvIERhdmUgUGVhcnNvbiAoYW5kIG90aGVyKQ0KCSAqIGh0dHBzOi8vd3d3LnBocC5uZXQvbWFudWFsL2VuL2Z1bmN0aW9uLmNvbS1jcmVhdGUtZ3VpZC5waHAjMTE5MTY4IA0KCSAqDQoJICogVXNlcyB0aGUgYmVzdCBjcnlwdG9ncmFwaGljYWxseSBzZWN1cmUgbWV0aG9kDQoJICogZm9yIGFsbCBzdXBwb3J0ZWQgcGxhdGZvcm1zIHdpdGggZmFsbGJhY2sgdG8gYW4gb2xkZXIsDQoJICogbGVzcyBzZWN1cmUgdmVyc2lvbi4NCgkgKg0KCSAqIEBwYXJhbSBib29sICR0cmltDQoJICoNCgkgKiBAcmV0dXJuIHN0cmluZw0KCSAqDQoJICogQHNpbmNlICAzLjAuOQ0KCSAqLw0KCXB1YmxpYyBzdGF0aWMgZnVuY3Rpb24gZ2V0KCR0cmltID0gdHJ1ZSkNCgl7DQoJCS8vIFdpbmRvd3MNCgkJaWYgKGZ1b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DQoJICoNCgkgKiBAcmV0dXJuIGJvb2wNCgkgKg0KCSAqIEBzaW5jZSAgMy4wLjkNCgkgKi8NCglwcm90ZWN0ZWQgc3RhdGljIGZ1bmN0aW9uIHZhbGlkYXRlKCRndWlkKQ0KCXsNCgkJLy8gY2hlY2sgaWYgd2UgaGF2ZSBhIHN0cmluZw0KCQlpZiAoU3RyaW5nSGVscGVyOjpjaGVjaygkZ3VpZCkpDQoJCXsNCgkJCXJldHVybiBwcmVnX21hdGNoKCIvXihceyk/W2EtZlxkXXs4fSgtW2EtZlxkXXs0fSl7NH1bYS1mXGRdezh9KD8oMSlcfSkkL2kiLCAkZ3VpZCk7DQoJCX0NCgkJcmV0dXJuIGZhbHNlOw0KCX0NCg==', '{}', 'GuidHelper', 'VDM\\Joomla\\Utilities.GuidHelper', '1.0.0', '{}', 'Utilities GuidHelper', 'abstract class', '{\"use_selection0\":{\"use\":\"640b5352-fb09-425f-a26e-cd44eda03f15\"}}', '', 1, '2022-03-12 01:27:10', '2022-05-21 13:27:39', 12, 9), +(22, 1, 'File helper\r\n\r\n@since 3.0.9', '', '', 'a223b31e-ea1d-4cdf-92ae-5f9becffaff0', 'dXNlIEpvb21sYVxDTVNcVXJpXFVyaTsNCnVzZSBKb29tbGFcQ01TXEZhY3Rvcnk7DQp1c2UgSm9vbWxhXENNU1xMYW5ndWFnZVxUZXh0Ow0KdXNlIEpvb21sYVxDTVNcRmlsZXN5c3RlbVxQYXRoOw0KdXNlIEpvb21sYVxDTVNcRmlsZXN5c3RlbVxGaWxlOw0KdXNlIEpvb21sYVxDTVNcRmlsZXN5c3RlbVxGb2xkZXI7DQp1c2UgSm9vbWxhXEFyY2hpdmVcQXJjaGl2ZTs=', '', '', '{\"load_selection0\":{\"load\":\"0a59c65c-9daf-4bc9-baf4-e063ff9e6a8a\"},\"load_selection1\":{\"load\":\"1f28cb53-60d9-4db1-b517-3c7dc6b429ef\"},\"load_selection2\":{\"load\":\"91004529-94a9-4590-b842-e7c6b624ec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NCgkJfQ0KCQllbHNlaWYgKCRoZWFkZXJzID0gQGdldF9oZWFkZXJzKCRwYXRoKSkNCgkJew0KCQkJaWYoaXNzZXQoJGhlYWRlcnNbMF0pICYmIGlzX3N0cmluZygkaGVhZGVyc1swXSkgJiYgc3RycG9zKCRoZWFkZXJzWzBdLCc0MDQnKSA9PT0gZmFsc2UpDQoJCQl7DQoJCQkJJGV4aXN0cyA9IHRydWU7DQoJCQl9DQoJCX0NCgkJcmV0dXJuICRleGlzdHM7DQoJfQ0K', '{}', 'FileHelper', 'VDM\\Joomla\\Utilities.FileHelper', '1.0.0', '{}', 'Utilities FileHelper', 'abstract class', '{\"use_selection0\":{\"use\":\"640b5352-fb09-425f-a26e-cd44eda03f15\",\"as\":\"default\"}}', '', 1, '2022-03-12 02:09:18', '2022-06-11 16:54:51', 24, 9), +(23, 1, 'Some component helper\r\n\r\n@since 3.0.11', '', '', '640b5352-fb09-425f-a26e-cd44eda03f15', 'dXNlIEpvb21sYVxJbnB1dFxJbnB1dDsNCnVzZSBKb29tbGFcQ01TXENvbXBvbmVudFxDb21wb25lbnRIZWxwZXI7DQp1c2UgSm9vbWxhXFJlZ2lzdHJ5XFJlZ2lzdHJ5Ow==', '', '', '{}', 'CS8qKg0KCSAqIFRoZSBjdXJyZW50IG9wdGlvbg0KCSAqDQoJICogQHZhciAgICBTdHJpbmcNCgkgKiBAc2luY2UgICAzLjAuMTENCgkgKi8NCglwdWJsaWMgc3RhdGljICRvcHRpb247DQoNCgkvKioNCgkgKiBUaGUgY29tcG9uZW50IHBhcmFtcyBsaXN0IGNhY2hlDQoJICoNCgkgKiBAdmFyICAgIFJlZ2lzdHJ5W10NCgkgKiBAc2luY2UgICAzLjAuMTENCgkgKi8NCglwcm90ZWN0ZWQgc3RhdGljICRwYXJhbXMgPSBhcnJheSgpOw0KDQoJLyoqDQoJICogR2V0cyB0aGUgcGFyYW1ldGVyIG9iamVjdCBmb3IgdGhlIGNvbXBvbmVudA0KCSAqDQoJICogQH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kJfQ0KCQl9DQoNCgkJcmV0dXJuICRkZWZhdWx0Ow0KCX0NCg0KCS8qKg0KCSAqIENoZWNrIGlmIHRoZSBoZWxwZXIgY2xhc3Mgb2YgdGhpcyBjb21wb25lbnQgaGFzIGEgbWV0aG9kDQoJICoNCgkgKiBAcGFyYW0gICBTdHJpbmcgICAgICAgJG1ldGhvZCAgVGhlIG1ldGhvZCBuYW1lIHRvIHNlYXJjaCBmb3INCgkgKiBAcGFyYW0gICBTdHJpbmcgICAgICAgJG9wdGlvbiAgICBUaGUgb3B0aW9uIGZvciB0aGUgY29tcG9uZW50Lg0KCSAqDQoJICogQHJldHVybiAgYm9vbCAgICAgICAgICB0cnVlIGlmIG1ldGhvZCBleGlzdA0KCSAqDQoJICogQHNpbmNlICAgMy4wLjExDQoJICovDQoJcHVibGljIHN0YXRpYyBmdW5jdGlvbiBtZXRob2RFeGlzdHMoJG1ldGhvZCwgJG9wdGlvbiA9IG51bGwpDQoJew0KCQkvLyBnZXQgdGhlIGhlbHBlciBjbGFzcw0KCQlpZiAoKCRoZWxwZXIgPSBzZWxmOjpnZXQoJG9wdGlvbiwgZmFsc2UpKSAhPT0gZmFsc2UpDQoJCXsNCgkJCWlmIChtZXRob2RfZXhpc3RzKCRoZWxwZXIsICRtZXRob2QpKQ0KCQkJew0KCQkJCXJldHVybiB0cnVlOw0KCQkJfQ0KCQl9DQoNCgkJcmV0dXJuIGZhbHNlOw0KCX0NCg==', '{}', 'Helper', 'VDM\\Joomla\\Utilities.Component.Helper', '1.0.0', '{}', 'Utilities Component Helper', 'abstract class', '{}', '', 1, '2022-05-13 05:36:32', '2022-05-21 13:27:39', 17, 7), +(24, 1, 'Image helper\r\n\r\n@since 3.0.11', '', '', '962b15d8-915f-4cd7-aea6-7cf82afdc20b', 'dXNlIEpvb21sYVxDTVNcRmlsZXN5c3RlbVxGaWxlOw0KdXNlIEpvb21sYVxDTVNcRmlsZXN5c3RlbVxGb2xkZXI7DQp1c2UgSm9vbWxhXENNU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bWUpLCAnLycpIC4gJy8nIC4gJG5hbWU7DQoJCQkJLy8gbm93IGFkZCB0aGUgc3JjIHBhdGggdG8gc2hvdyB0aGUgaW1hZ2UNCgkJCQkkcHJvcGVydGllcy0+c3JjID0gVXJpOjpyb290KCkgLiAkaW1hZ2VfcHVibGljX3BhdGg7DQoJCQkJLy8gcmV0dXJuIHRoZSBpbWFnZSBwcm9wZXJ0aWVzDQoJCQkJcmV0dXJuICRwcm9wZXJ0aWVzOw0KCQkJfQ0KCQl9DQoJCXJldHVybiBmYWxzZTsNCgl9DQo=', '{}', 'ImageHelper', 'VDM\\Joomla\\Utilities.ImageHelper', '1.0.0', '{}', 'Utilities ImageHelper', 'abstract class', '{\"use_selection0\":{\"use\":\"640b5352-fb09-425f-a26e-cd44eda03f15\",\"as\":\"default\"}}', '', 1, '2022-05-16 10:59:17', '2022-05-21 13:27:39', 17, 9), +(25, 1, 'Upload Helper\r\n\r\n@since 3.0.11', '', '', 'd7600b43-771a-4747-9f5d-952765721799', 'dXNlIEpvb21sYVxDTVNcRmFjdG9yeTsNCnVzZSBKb29tbGFcQ01TXExhbmd1YWdlXFRleHQ7DQp1c2UgSm9vbWxhXENNU1xGaWxlc3lzdGVtXEZpbGU7DQp1c2UgSm9vbWxhXENNU1xGaWxlc3lzdGVtXEZvbGRlcjsNCnVzZSBKb29tbGFcQ01TXEZpbGVzeXN0ZW1cUGF0aDs=', '', '', '{\"load_selection0\":{\"load\":\"f11dc790-713e-4706-9a85-a318ed3ad56e\"},\"load_selection1\":{\"load\":\"1f28cb53-60d9-4db1-b517-3c7dc6b429ef\"}}', 'CS8qKg0KCSAqIFRydWUgdG8gdXNlIHN0cmVhbXMNCgkgKg0KCSAqIEB2YXIgICAgYm9vbA0KCSAqDQoJICogQHNpbmNlICAzLjAuMTENCgkgKi8NCglwdWJsaWMgc3RhdGljICR1c2VTdHJlYW1zID0gZmFsc2U7DQoNCgkvKioNCgkgKiBBbGxvdyB0aGUgdXBsb2FkIG9mIHV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3VjY2Vzcw0KCSAqDQoJICovDQoJcHJvdGVjdGVkIHN0YXRpYyBmdW5jdGlvbiByZW1vdmUoJGZ1bGxQYXRoKQ0KCXsNCgkJLy8gSXMgdGhlIHBhY2thZ2UgZmlsZSBhIHZhbGlkIGZpbGU/DQoJCWlmIChpc19maWxlKCRmdWxsUGF0aCkpDQoJCXsNCgkJCUZpbGU6OmRlbGV0ZSgkZnVsbFBhdGgpOw0KCQl9DQoJCWVsc2VpZiAoaXNfZmlsZShQYXRoOjpjbGVhbigkZnVsbFBhdGgpKSkNCgkJew0KCQkJLy8gSXQgbWlnaHQgYWxzbyBiZSBqdXN0IGEgYmFzZSBmaWxlbmFtZQ0KCQkJRmlsZTo6ZGVsZXRlKFBhdGg6OmNsZWFuKCRmdWxsUGF0aCkpOw0KCQl9DQoJfQ0KDQoJLyoqDQoJICogU2V0IHRoZSBlcnJvcnMNCgkgKg0KCSAqIEBwYXJhbSAgc3RyaW5nICAgICAgICAkbWVzc2FnZSAgIFRoZSBlcnJvciBtZXNzYWdlDQoJICoNCgkgKiBAcmV0dXJuICB2b2lkDQoJICogQHNpbmNlICAzLjAuMTENCgkgKi8NCglwcm90ZWN0ZWQgc3RhdGljIGZ1bmN0aW9uIHNldEVycm9yKCRtZXNzYWdlKQ0KCXsNCgkJaWYgKHNlbGY6OiRlbnF1ZXVlRXJyb3IpDQoJCXsNCgkJCUZhY3Rvcnk6OmdldEFwcGxpY2F0aW9uKCktPmVucXVldWVNZXNzYWdlKCRtZXNzYWdlLCAnZXJyb3InKTsNCgkJfQ0KCQllbHNlDQoJCXsNCgkJCXNlbGY6OiRlcnJvcnNbXSA9ICRtZXNzYWdlOw0KCQl9DQoJfQ==', '{}', 'UploadHelper', 'VDM\\Joomla\\Utilities.UploadHelper', '1.0.0', '{}', 'Utilities UploadHelper', 'abstract class', '{\"use_selection0\":{\"use\":\"640b5352-fb09-425f-a26e-cd44eda03f15\",\"as\":\"default\"}}', '', 1, '2022-05-16 13:20:50', '2022-05-21 13:27:39', 31, 9), +(26, '', 'Mime Helper\r\n\r\n@since 3.0.11', '', '', 'f11dc790-713e-4706-9a85-a318ed3ad56e', '', '', '', '{}', 'W0VYVEVSTkFMQ09ERT1odHRwczovL2dpc3QuZ2l0aHVidXNlcmNvbnRlbnQuY29tL0xsZXdlbGx5bnZkbS83NGJlMzczMzU3ZTEzMWI4Nzc1YTc1ODJjM2RlNTA4Yi9yYXcvbWltZV90eXBlcy5waHBdDQoNCltFWFRFUk5BTENPREU9aHR0cHM6Ly9naXN0LmdpdGh1YnVzZXJjb250ZW50LmNvbS9MbGV3ZWxseW52ZG0vNzRiZTM3MzM1N2UxMzFiODc3NWE3NTgyYzNkZTUwOGIvcmF3L2dldC5waHBdDQoNCltFWFRFUk5BTENPREU9aHR0cHM6Ly9naXN0LmdpdGh1YnVzZXJjb250ZW50LmNvbS9MbGV3ZWxseW52ZG0vNzRiZTM3MzM1N2UxMzFiODc3NWE3NTgyYzNkZTUwOGIvcmF3L2V4dGVuc2lvbnMucGhwXQ==', '{}', 'MimeHelper', 'VDM\\Joomla\\Utilities.MimeHelper', '1.0.0', '{}', 'Utilities MimeHelper', 'abstract class', '{}', '', 1, '2022-05-16 14:27:38', '2022-05-21 13:27:39', 3, 9), +(27, '', 'Just to link powers to the power updater component', '', '', '8025e71c-8e21-44cb-b23e-dce2fb5a1ab5', '', '', '', '{\"load_selection0\":{\"load\":\"db4a1e4d-be59-4e87-8b4d-c40512752232\"},\"load_selection1\":{\"load\":\"79d765b3-7319-4988-9730-446c7f347020\"},\"load_selection2\":{\"load\":\"d7600b43-771a-4747-9f5d-952765721799\"},\"load_selection3\":{\"load\":\"962b15d8-915f-4cd7-aea6-7cf82afdc20b\"},\"load_selection4\":{\"load\":\"f11dc790-713e-4706-9a85-a318ed3ad56e\"}}', '', '{}', 'Updater', 'VDM\\Powe\\Updater', '1.0.0', '{}', 'Power Updater', 'class', '{}', '', 1, '2022-05-21 13:15:55', '2022-06-11 16:54:51', 3, 13), +(28, 1, 'Start looking here:\r\nhttps://git.vdm.dev/api/swagger#/repository/repoGetContents', 'c65aaf1f-817c-49a2-8202-282e3904f5b1', '', 'ef011ee1-64f0-4048-b013-777473b727dd', 'dXNlIEpvb21sYVxDTVNcSHR0cFxIdHRwOw0KdXNlIEpvb21sYVxSZWdpc3RyeVxSZWdpc3RyeTs=', '', '', '{}', 'CS8qKg0KCSAqIEdldHMgdGhlIG1ldGFkYXRhIGFuZCBjb250ZW50cyAoaWYgYSBmaWxlKSBvZiBhbiBlbnRyeSBpbiBhIHJlcG9zaXRvcnksIG9yIGEgbGlzdCBvZiBlbnRyaWVzIGlmIGEgZGlyDQoJICoNCgkgKiBAcGFyYW0gICBzdHJpbmcgICRvd25lciAgICAgICBSZXBvc2l0b3J5IG93bmVyLg0KCSAqIEBwYXJhbSAgIHN0cmluZyAgJHJlcG8gICAgICAgICBSZXBvc2l0b3J5IG5hbWUuDQoJICogQHBhcmFtICAgc3RyaW5nICAkZmlsZXBhdGggICAgUmVwb3NpdG9yeSBmaWxlIHBhdGguDQoJICoNCgkgKiBAcmV0dXJuICBvYmplY3QNCgkgKg0KCSAqIEBzaW5jZSAgIDEuMA0KCSAqLw0KCXB1YmxpYyBmdW5jdGlvbiBnZXQoJG93bmVyLCAkcmVwbywgJGZpbGVwYXRoKQ0KCXsNCgkJLy8gQnVpbGQgdGhlIHJlcXVlc3QgcGF0aC4NCgkJJHBhdGggPSAnL3JlcG9zLycgLiAkb3duZXIgLiAnLycgLiAkcmVwbyAuICcvY29udGVudHMvJyAuICRmaWxlcGF0aDsNCg0KCQkvLyBTZW5kIHRoZSByZXF1ZXN0Lg0KCQlyZXR1cm4gJHRoaXMtPnByb2Nlc3NSZXNwb25zZSgNCgkJCSR0aGlzLT5jbGllbnQtPmdldCgkdGhpcy0+ZmV0Y2hVcmwoJHBhdGgpKQ0KCQkpOw0KCX0NCg==', '{}', 'File', 'VDM\\Gitea\\Package.Repo.File', '1.0.0', '{}', 'Gitea Repo File', 'class', '{}', '', 1, '2022-05-21 13:40:09', '2022-07-09 10:28:20', 10, 4), +(29, 1, 'Start looking here:\r\nhttps://git.vdm.dev/api/swagger#/repository/repoCreateWikiPage', 'c65aaf1f-817c-49a2-8202-282e3904f5b1', '', 'c4a188de-ad78-4a6d-9d5b-01866846d701', 'dXNlIEpvb21sYVxDTVNcSHR0cFxIdHRwOw0KdXNlIEpvb21sYVxSZWdpc3RyeVxSZWdpc3RyeTs=', '', '', '{}', 'CS8qKg0KCSAqIEdldCBhIHJlcG9zaXRvcnkgd2lraSBwYWdlDQoJICoNCgkgKiBAcGFyYW0gICBzdHJpbmcgICRvd25lciAgICAgICAgICAgICAgIFRoZSByZXBvc2l0b3J5IG93bmVyDQoJICogQHBhcmFtICAgc3RyaW5nICAkcmVwbyAgICAgICAgICAgICAgICAgVGhlIHJlcG9zaXRvcnkgbmFtZQ0KCSAqIEBwYXJhbSAgIHN0cmluZyAgJHBhZ2VOYW1lICAgICAgIFRoZSBwYWdlIG5hbWUNCgkgKg0KCSAqIEByZXR1cm4gIG9iamVjdA0KCSAqDQoJICogQHNpbmNlICAgMS4wDQoJICovDQoJcHVibGljIGZ1bmN0aW9uIGdldChzdHJpbmcgJG93bmVyLCBzdHJpbmcgJHJlcG8sIHN0cmluZyAkcGFnZU5hbWUpDQoJew0KCQkvLyBCdWlsZCB0aGUgcmVxdWVzdCBwYXRoLg0KCQkkcGF0aCA9ICcvcmVwb3MvJyAuICRvd25lciAuICcvJyAuICRyZXBvIC4gJy93aWtpL3BhZ2UvJyAuICRwYWdlTmFtZTsNCg0KCQkvLyBTZW5kIHRoZSByZXF1ZXN0Lg0KCQlyZXR1cm4gJHRoaXMtPnByb2Nlc3NSZXNwb25zZSgNCgkJCSR0aGlzLT5jbGllbnQtPmdldCgkdGhpcy0+ZmV0Y2hVcmwoJHBhdGgpKQ0KCQkpOw0KCX0NCg0KCS8qKg0KCSAqIEdldCBhIHJlcG9zaXRvcnkgd2lraSBodG1sIHBhZ2UNCgkgK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3N0cmluZycsDQoJCQknVGV4dCcgPT4gJHBhZ2UtPmNvbnRlbnQsDQoJCQknV2lraScgPT4gdHJ1ZQ0KCQldOw0KDQoJCS8vIFBvc3QgdGhlIHJlcXVlc3QuDQoJCXJldHVybiAkdGhpcy0+cHJvY2Vzc1Jlc3BvbnNlKA0KCQkJJHRoaXMtPmNsaWVudC0+cG9zdCgkdGhpcy0+ZmV0Y2hVcmwoJHBhdGgpLCBqc29uX2VuY29kZSgkZGF0YSksICRoZWFkZXJzKQ0KCQkpOw0KCX0NCg==', '{}', 'Wiki', 'VDM\\Gitea\\Package.Repo.Wiki', '1.0.0', '{}', 'Gitea Repo Wiki', 'class', '{}', '', 1, '2022-07-09 10:21:53', '2022-07-09 12:18:07', 9, 4); + -- -- Dumping data for table `#__componentbuilder_admin_view` -- diff --git a/admin/sql/uninstall.mysql.utf8.sql b/admin/sql/uninstall.mysql.utf8.sql index 5af4b7be1..606f7c32d 100644 --- a/admin/sql/uninstall.mysql.utf8.sql +++ b/admin/sql/uninstall.mysql.utf8.sql @@ -1,6 +1,7 @@ DROP TABLE IF EXISTS `#__componentbuilder_joomla_component`; DROP TABLE IF EXISTS `#__componentbuilder_joomla_module`; DROP TABLE IF EXISTS `#__componentbuilder_joomla_plugin`; +DROP TABLE IF EXISTS `#__componentbuilder_power`; DROP TABLE IF EXISTS `#__componentbuilder_admin_view`; DROP TABLE IF EXISTS `#__componentbuilder_custom_admin_view`; DROP TABLE IF EXISTS `#__componentbuilder_site_view`; diff --git a/admin/sql/updates/mysql/2.13.1.sql b/admin/sql/updates/mysql/2.13.1.sql new file mode 100644 index 000000000..a4255d34d --- /dev/null +++ b/admin/sql/updates/mysql/2.13.1.sql @@ -0,0 +1,47 @@ +CREATE TABLE IF NOT EXISTS `#__componentbuilder_power` ( + `id` INT(11) NOT NULL AUTO_INCREMENT, + `asset_id` INT(10) unsigned NOT NULL DEFAULT 0 COMMENT 'FK to the #__assets table.', + `add_head` TINYINT(1) NOT NULL DEFAULT 0, + `description` TEXT NOT NULL, + `extends` VARCHAR(36) NOT NULL DEFAULT '', + `extends_custom` VARCHAR(64) NOT NULL DEFAULT '', + `guid` VARCHAR(36) NOT NULL DEFAULT '', + `head` TEXT NOT NULL, + `implements` TEXT NULL, + `implements_custom` VARCHAR(1024) NOT NULL DEFAULT '', + `load_selection` TEXT NOT NULL, + `main_class_code` MEDIUMTEXT NOT NULL, + `method_selection` TEXT NOT NULL, + `name` VARCHAR(255) NOT NULL DEFAULT '', + `namespace` VARCHAR(255) NOT NULL DEFAULT '', + `power_version` CHAR(64) NOT NULL DEFAULT '', + `property_selection` TEXT NOT NULL, + `system_name` VARCHAR(255) NOT NULL DEFAULT '', + `type` VARCHAR(64) NOT NULL DEFAULT '', + `use_selection` TEXT NOT NULL, + `params` text NULL, + `published` TINYINT(3) NOT NULL DEFAULT 1, + `created_by` INT(10) unsigned NOT NULL DEFAULT 0, + `modified_by` INT(10) unsigned NOT NULL DEFAULT 0, + `created` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', + `modified` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', + `checked_out` int(11) unsigned NOT NULL DEFAULT 0, + `checked_out_time` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', + `version` INT(10) unsigned NOT NULL DEFAULT 1, + `hits` INT(10) unsigned NOT NULL DEFAULT 0, + `access` INT(10) unsigned NOT NULL DEFAULT 0, + `ordering` INT(11) NOT NULL DEFAULT 0, + PRIMARY KEY (`id`), + KEY `idx_system_name` (`system_name`), + KEY `idx_namespace` (`namespace`), + KEY `idx_type` (`type`), + KEY `idx_implements_custom` (`implements_custom`), + KEY `idx_extends_custom` (`extends_custom`), + KEY `idx_guid` (`guid`), + KEY `idx_name` (`name`), + KEY `idx_access` (`access`), + KEY `idx_checkout` (`checked_out`), + KEY `idx_createdby` (`created_by`), + KEY `idx_modifiedby` (`modified_by`), + KEY `idx_state` (`published`) +) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; diff --git a/admin/tables/power.php b/admin/tables/power.php new file mode 100644 index 000000000..0dae0bbe6 --- /dev/null +++ b/admin/tables/power.php @@ -0,0 +1,325 @@ + + * @gitea Joomla Component Builder + * @github 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'); + +use Joomla\CMS\Table\Table; +use Joomla\Registry\Registry; +use Joomla\String\StringHelper; +use Joomla\Utilities\ArrayHelper; + +/** + * Powers Table class + */ +class ComponentbuilderTablePower extends Table +{ + /** + * Ensure the params and metadata in json encoded in the bind method + * + * @var array + * @since 3.3 + */ + protected $_jsonEncode = array('params', 'metadata'); + + /** + * Constructor + * + * @param object Database connector object + */ + function __construct(&$db) + { + parent::__construct('#__componentbuilder_power', 'id', $db); + + // Adding History Options + JTableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_componentbuilder.power')); + } + + public function bind($array, $ignore = '') + { + + if (isset($array['params']) && is_array($array['params'])) + { + $registry = new JRegistry; + $registry->loadArray($array['params']); + $array['params'] = (string) $registry; + } + + if (isset($array['metadata']) && is_array($array['metadata'])) + { + $registry = new JRegistry; + $registry->loadArray($array['metadata']); + $array['metadata'] = (string) $registry; + } + + // Bind the rules. + if (isset($array['rules']) && is_array($array['rules'])) + { + $rules = new JAccessRules($array['rules']); + $this->setRules($rules); + } + return parent::bind($array, $ignore); + } + + /** + * Overload the store method for the Power table. + * + * @param boolean Toggle whether null values should be updated. + * @return boolean True on success, false on failure. + * @since 1.6 + */ + public function store($updateNulls = false) + { + $date = JFactory::getDate(); + $user = JFactory::getUser(); + + if ($this->id) + { + // Existing item + $this->modified = $date->toSql(); + $this->modified_by = $user->get('id'); + } + else + { + // New power. A power created and created_by field can be set by the user, + // so we don't touch either of these if they are set. + if (!(int) $this->created) + { + $this->created = $date->toSql(); + } + if (empty($this->created_by)) + { + $this->created_by = $user->get('id'); + } + } + + if (isset($this->alias)) + { + // Verify that the alias is unique + $table = JTable::getInstance('power', 'ComponentbuilderTable'); + + if ($table->load(array('alias' => $this->alias)) && ($table->id != $this->id || $this->id == 0)) + { + $this->setError(JText::_('COM_COMPONENTBUILDER_POWER_ERROR_UNIQUE_ALIAS')); + return false; + } + } + + if (isset($this->url)) + { + // Convert IDN urls to punycode + $this->url = JStringPunycode::urlToPunycode($this->url); + } + if (isset($this->website)) + { + // Convert IDN urls to punycode + $this->website = JStringPunycode::urlToPunycode($this->website); + } + + return parent::store($updateNulls); + } + + /** + * Overloaded check method to ensure data integrity. + * + * @return boolean True on success. + */ + public function check() + { + if (isset($this->alias)) + { + // Generate a valid alias + $this->generateAlias(); + + $table = JTable::getInstance('power', 'componentbuilderTable'); + + while ($table->load(array('alias' => $this->alias)) && ($table->id != $this->id || $this->id == 0)) + { + $this->alias = StringHelper::increment($this->alias, 'dash'); + } + } + + /* + * Clean up keywords -- eliminate extra spaces between phrases + * and cr (\r) and lf (\n) characters from string. + * Only process if not empty. + */ + if (!empty($this->metakey)) + { + // Array of characters to remove. + $bad_characters = array("\n", "\r", "\"", "<", ">"); + + // Remove bad characters. + $after_clean = StringHelper::str_ireplace($bad_characters, "", $this->metakey); + + // Create array using commas as delimiter. + $keys = explode(',', $after_clean); + $clean_keys = array(); + + foreach ($keys as $key) + { + // Ignore blank keywords. + if (trim($key)) + { + $clean_keys[] = trim($key); + } + } + + // Put array back together delimited by ", " + $this->metakey = implode(", ", $clean_keys); + } + + // Clean up description -- eliminate quotes and <> brackets + if (!empty($this->metadesc)) + { + // Only process if not empty + $bad_characters = array("\"", "<", ">"); + $this->metadesc = StringHelper::str_ireplace($bad_characters, "", $this->metadesc); + } + + // If we don't have any access rules set at this point just use an empty JAccessRules class + if (!$this->getRules()) + { + $rules = $this->getDefaultAssetValues('com_componentbuilder.power.'.$this->id); + $this->setRules($rules); + } + + // Set ordering + if ($this->published < 0) + { + // Set ordering to 0 if state is archived or trashed + $this->ordering = 0; + } + + return true; + } + + /** + * Gets the default asset values for a component. + * + * @param $string $component The component asset name to search for + * + * @return JAccessRules The JAccessRules object for the asset + */ + protected function getDefaultAssetValues($component, $try = true) + { + // 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(); + if ($db->loadRowList()) + { + // asset already set so use saved rules + $assetId = (int) $db->loadResult(); + return JAccess::getAssetRules($assetId); // (TODO) instead of keeping inherited Allowed it becomes Allowed. + } + // try again + elseif ($try) + { + $try = explode('.',$component); + $result = $this->getDefaultAssetValues($try[0], false); + if ($result instanceof JAccessRules) + { + if (isset($try[1])) + { + $_result = (string) $result; + $_result = json_decode($_result); + foreach ($_result as $name => &$rule) + { + $v = explode('.', $name); + if ($try[1] !== $v[0]) + { + // remove since it is not part of this view + unset($_result->$name); + } + else + { + // 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; + $rules->mergeCollection($_result); + + return $rules; + } + } + return $result; + } + } + return JAccess::getAssetRules(0); + } + + /** + * Method to compute the default name of the asset. + * The default name is in the form 'table_name.id' + * where id is the value of the primary key of the table. + * + * @return string + * @since 2.5 + */ + protected function _getAssetName() + { + $k = $this->_tbl_key; + return 'com_componentbuilder.power.'.(int) $this->$k; + } + + /** + * Method to return the title to use for the asset table. + * + * @return string + * @since 2.5 + */ + protected function _getAssetTitle() + { + if (isset($this->title)) + { + return $this->title; + } + return ''; + } + + /** + * Get the parent asset id for the record + * + * @return int + * @since 2.5 + */ + protected function _getAssetParentId(JTable $table = NULL, $id = NULL) + { + $asset = JTable::getInstance('Asset'); + $asset->loadByName('com_componentbuilder'); + + return $asset->id; + } + + /** + * This view does not actually have an alias + * + * @return bool + */ + public function generateAlias() + { + return false; + } + +} diff --git a/admin/views/admin_view/tmpl/edit.php b/admin/views/admin_view/tmpl/edit.php index 40b914f96..846da7b6a 100644 --- a/admin/views/admin_view/tmpl/edit.php +++ b/admin/views/admin_view/tmpl/edit.php @@ -208,491 +208,476 @@ $componentParams = $this->params; // will be removed just use $this->params inst + + + diff --git a/admin/views/power/tmpl/index.html b/admin/views/power/tmpl/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/admin/views/power/tmpl/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/admin/views/power/view.html.php b/admin/views/power/view.html.php new file mode 100644 index 000000000..e10fb693c --- /dev/null +++ b/admin/views/power/view.html.php @@ -0,0 +1,258 @@ + + * @gitea Joomla Component Builder + * @github 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'); + +use Joomla\CMS\MVC\View\HtmlView; + +/** + * Power Html View class + */ +class ComponentbuilderViewPower extends HtmlView +{ + /** + * display method of View + * @return void + */ + public function display($tpl = null) + { + // set params + $this->params = JComponentHelper::getParams('com_componentbuilder'); + // Assign the variables + $this->form = $this->get('Form'); + $this->item = $this->get('Item'); + $this->script = $this->get('Script'); + $this->state = $this->get('State'); + // get action permissions + $this->canDo = ComponentbuilderHelper::getActions('power', $this->item); + // get input + $jinput = JFactory::getApplication()->input; + $this->ref = $jinput->get('ref', 0, 'word'); + $this->refid = $jinput->get('refid', 0, 'int'); + $return = $jinput->get('return', null, 'base64'); + // set the referral string + $this->referral = ''; + if ($this->refid && $this->ref) + { + // return to the item that referred to this item + $this->referral = '&ref=' . (string)$this->ref . '&refid=' . (int)$this->refid; + } + elseif($this->ref) + { + // return to the list view that referred to this item + $this->referral = '&ref=' . (string)$this->ref; + } + // check return value + if (!is_null($return)) + { + // add the return value + $this->referral .= '&return=' . (string)$return; + } + + // Set the toolbar + $this->addToolBar(); + + // Check for errors. + if (count($errors = $this->get('Errors'))) + { + throw new Exception(implode("\n", $errors), 500); + } + + // Display the template + parent::display($tpl); + + // Set the document + $this->setDocument(); + } + + + /** + * Setting the toolbar + */ + protected function addToolBar() + { + JFactory::getApplication()->input->set('hidemainmenu', true); + $user = JFactory::getUser(); + $userId = $user->id; + $isNew = $this->item->id == 0; + + JToolbarHelper::title( JText::_($isNew ? 'COM_COMPONENTBUILDER_POWER_NEW' : 'COM_COMPONENTBUILDER_POWER_EDIT'), 'pencil-2 article-add'); + // Built the actions for new and existing records. + if (ComponentbuilderHelper::checkString($this->referral)) + { + if ($this->canDo->get('power.create') && $isNew) + { + // We can create the record. + JToolBarHelper::save('power.save', 'JTOOLBAR_SAVE'); + } + elseif ($this->canDo->get('power.edit')) + { + // We can save the record. + JToolBarHelper::save('power.save', 'JTOOLBAR_SAVE'); + } + if ($isNew) + { + // Do not creat but cancel. + JToolBarHelper::cancel('power.cancel', 'JTOOLBAR_CANCEL'); + } + else + { + // We can close it. + JToolBarHelper::cancel('power.cancel', 'JTOOLBAR_CLOSE'); + } + } + else + { + if ($isNew) + { + // For new records, check the create permission. + if ($this->canDo->get('power.create')) + { + JToolBarHelper::apply('power.apply', 'JTOOLBAR_APPLY'); + JToolBarHelper::save('power.save', 'JTOOLBAR_SAVE'); + JToolBarHelper::custom('power.save2new', 'save-new.png', 'save-new_f2.png', 'JTOOLBAR_SAVE_AND_NEW', false); + }; + JToolBarHelper::cancel('power.cancel', 'JTOOLBAR_CANCEL'); + } + else + { + if ($this->canDo->get('power.edit')) + { + // We can save the new record + JToolBarHelper::apply('power.apply', 'JTOOLBAR_APPLY'); + JToolBarHelper::save('power.save', 'JTOOLBAR_SAVE'); + // We can save this record, but check the create permission to see + // if we can return to make a new one. + if ($this->canDo->get('power.create')) + { + JToolBarHelper::custom('power.save2new', 'save-new.png', 'save-new_f2.png', 'JTOOLBAR_SAVE_AND_NEW', false); + } + } + $canVersion = ($this->canDo->get('core.version') && $this->canDo->get('power.version')); + if ($this->state->params->get('save_history', 1) && $this->canDo->get('power.edit') && $canVersion) + { + JToolbarHelper::versions('com_componentbuilder.power', $this->item->id); + } + if ($this->canDo->get('power.create')) + { + JToolBarHelper::custom('power.save2copy', 'save-copy.png', 'save-copy_f2.png', 'JTOOLBAR_SAVE_AS_COPY', false); + } + JToolBarHelper::cancel('power.cancel', 'JTOOLBAR_CLOSE'); + } + } + JToolbarHelper::divider(); + // set help url for this view if found + $this->help_url = ComponentbuilderHelper::getHelpUrl('power'); + if (ComponentbuilderHelper::checkString($this->help_url)) + { + JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $this->help_url); + } + } + + /** + * Escapes a value for output in a view script. + * + * @param mixed $var The output to escape. + * + * @return mixed The escaped value. + */ + public function escape($var) + { + if(strlen($var) > 30) + { + // use the helper htmlEscape method instead and shorten the string + return ComponentbuilderHelper::htmlEscape($var, $this->_charset, true, 30); + } + // use the helper htmlEscape method instead. + return ComponentbuilderHelper::htmlEscape($var, $this->_charset); + } + + /** + * Method to set up the document properties + * + * @return void + */ + protected function setDocument() + { + $isNew = ($this->item->id < 1); + if (!isset($this->document)) + { + $this->document = JFactory::getDocument(); + } + $this->document->setTitle(JText::_($isNew ? 'COM_COMPONENTBUILDER_POWER_NEW' : 'COM_COMPONENTBUILDER_POWER_EDIT')); + $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/power.css", (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); + // Add Ajax Token + $this->document->addScriptDeclaration("var token = '".JSession::getFormToken()."';"); + $this->document->addScript(JURI::root() . $this->script, (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/power/submitbutton.js", (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + + + // add the Uikit v2 style sheets + $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/uikit.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); + // add Uikit v2 JavaScripts + $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/uikit.min.js' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + + // add the Uikit v2 extra style sheets + $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/components/notify.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); + // add Uikit v2 extra JavaScripts + $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/lightbox.min.js', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true); + $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/notify.min.js', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true); + // Add the JavaScript for JStore + $this->document->addScript(JURI::root() .'media/com_componentbuilder/js/jquery.json.min.js'); + $this->document->addScript(JURI::root() .'media/com_componentbuilder/js/jstorage.min.js'); + $this->document->addScript(JURI::root() .'media/com_componentbuilder/js/strtotime.js'); + // add var key + $this->document->addScriptDeclaration("var vastDevMod = '" . $this->get('VDM') . "';"); + // add return_here + $this->document->addScriptDeclaration("var return_here = '" . urlencode(base64_encode((string) JUri::getInstance())) . "';"); + // set some lang + JText::script('COM_COMPONENTBUILDER_ALREADY_SELECTED_TRY_ANOTHER'); + JText::script('COM_COMPONENTBUILDER_TYPE_OR_SELECT_SOME_OPTIONS'); + JText::script('COM_COMPONENTBUILDER_NO_RESULTS_MATCH'); + JText::script('COM_COMPONENTBUILDER_SELECT_A_PROPERTY'); + JText::script('COM_COMPONENTBUILDER_NO_DESCRIPTION_FOUND'); + // check if we should use browser storage + $setBrowserStorage = $this->params->get('set_browser_storage', null); + if ($setBrowserStorage) + { + // check what (Time To Live) show we use + $storageTimeToLive = $this->params->get('storage_time_to_live', 'global'); + if ('global' == $storageTimeToLive) + { + // use the global session time + $session = JFactory::getSession(); + // must have itin milliseconds + $expire = ($session->getExpire()*60)* 1000; + } + else + { + // use the Componentbuilder Global setting + if (0 != $storageTimeToLive) + { + // this will convert the time into milliseconds + $storageTimeToLive = $storageTimeToLive * 1000; + } + $expire = $storageTimeToLive; + } + } + else + { + // set to use no storage + $expire = 30000; // only 30 seconds + } + // Set the Time To Live To JavaScript + $this->document->addScriptDeclaration("var expire = ". (int) $expire.";"); + $this->document->addScriptDeclaration("selectionArray = {'property':{},'method':{}};"); + JText::script('view not acceptable. Error'); + } +} diff --git a/admin/views/powers/index.html b/admin/views/powers/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/admin/views/powers/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/admin/views/powers/tmpl/default.php b/admin/views/powers/tmpl/default.php new file mode 100644 index 000000000..93fd6e918 --- /dev/null +++ b/admin/views/powers/tmpl/default.php @@ -0,0 +1,92 @@ + + * @gitea Joomla Component Builder + * @github 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'); + +JHtml::_('behavior.multiselect'); +JHtml::_('dropdown.init'); +JHtml::_('formbehavior.chosen', '.multiplePowersfiltertype', null, array('placeholder_text_multiple' => '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_TYPE_OF_POWER') . ' -')); +JHtml::_('formbehavior.chosen', '.multipleAccessLevels', null, array('placeholder_text_multiple' => '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_ACCESS') . ' -')); +JHtml::_('formbehavior.chosen', 'select'); +if ($this->saveOrder) +{ + $saveOrderingUrl = 'index.php?option=com_componentbuilder&task=powers.saveOrderAjax&tmpl=component'; + JHtml::_('sortablelist.sortable', 'powerList', 'adminForm', strtolower($this->listDirn), $saveOrderingUrl); +} +?> +
+sidebar)): ?> +
+ sidebar; ?> +
+
+ +
+ + $this)); +?> +items)): ?> +
+ +
+ + + loadTemplate('head');?> + loadTemplate('foot');?> + loadTemplate('body');?> +
+ + canCreate && $this->canEdit) : ?> + JText::_('COM_COMPONENTBUILDER_POWERS_BATCH_OPTIONS'), + 'footer' => $this->loadTemplate('batch_footer') + ), + $this->loadTemplate('batch_body') + ); ?> + + +
+ + + + + diff --git a/admin/views/componentbuilder/tmpl/default_issues_the_open_issues_on_github.php b/admin/views/powers/tmpl/default_batch_body.php similarity index 84% rename from admin/views/componentbuilder/tmpl/default_issues_the_open_issues_on_github.php rename to admin/views/powers/tmpl/default_batch_body.php index 91ddc86c7..3e63d205d 100644 --- a/admin/views/componentbuilder/tmpl/default_issues_the_open_issues_on_github.php +++ b/admin/views/powers/tmpl/default_batch_body.php @@ -14,4 +14,6 @@ defined('_JEXEC') or die('Restricted access'); ?> -github->openissues; ?> + +

+batchDisplay; ?> \ No newline at end of file diff --git a/admin/views/powers/tmpl/default_batch_footer.php b/admin/views/powers/tmpl/default_batch_footer.php new file mode 100644 index 000000000..a6d598a0b --- /dev/null +++ b/admin/views/powers/tmpl/default_batch_footer.php @@ -0,0 +1,24 @@ + + * @gitea Joomla Component Builder + * @github 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'); + +?> + + + + \ No newline at end of file diff --git a/admin/views/powers/tmpl/default_body.php b/admin/views/powers/tmpl/default_body.php new file mode 100644 index 000000000..af9fd9615 --- /dev/null +++ b/admin/views/powers/tmpl/default_body.php @@ -0,0 +1,109 @@ + + * @gitea Joomla Component Builder + * @github 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'); + +$edit = "index.php?option=com_componentbuilder&view=powers&task=power.edit"; + +?> +items as $i => $item): ?> + user->authorise('core.manage', 'com_checkin') || $item->checked_out == $this->user->id || $item->checked_out == 0; + $userChkOut = JFactory::getUser($item->checked_out); + $canDo = ComponentbuilderHelper::getActions('power',$item,'powers'); + ?> + + + get('power.edit.state')): ?> + saveOrder) + { + $iconClass = ' inactive tip-top" hasTooltip" title="' . JHtml::tooltipText('JORDERINGDISABLED'); + } + ?> + + + + saveOrder) : ?> + + + + ⋮ + + + + get('power.edit')): ?> + checked_out) : ?> + + id); ?> + + □ + + + id); ?> + + + □ + + + +
+ get('power.edit')): ?> + escape($item->system_name); ?> + checked_out): ?> + name, $item->checked_out_time, 'powers.', $canCheckin); ?> + + + escape($item->system_name); ?> +
GUID: + escape($item->guid); ?> +
+ + + escape($item->namespace); ?> + + +
: + type); ?>extends)) : ?>
: + user->authorise('power.edit', 'com_componentbuilder.power.' . (int) $item->extends_id)): ?> + escape($item->extends_name); ?> + + escape($item->extends_name); ?> + +
+ + + escape($item->power_version); ?> + + + get('power.edit.state')) : ?> + checked_out) : ?> + + published, $i, 'powers.', true, 'cb'); ?> + + published, $i, 'powers.', false, 'cb'); ?> + + + published, $i, 'powers.', true, 'cb'); ?> + + + published, $i, 'powers.', false, 'cb'); ?> + + + + id; ?> + + + \ No newline at end of file diff --git a/admin/views/componentbuilder/tmpl/default_issues_the_closed_issues_on_github.php b/admin/views/powers/tmpl/default_foot.php similarity index 87% rename from admin/views/componentbuilder/tmpl/default_issues_the_closed_issues_on_github.php rename to admin/views/powers/tmpl/default_foot.php index e680967be..e334c948a 100644 --- a/admin/views/componentbuilder/tmpl/default_issues_the_closed_issues_on_github.php +++ b/admin/views/powers/tmpl/default_foot.php @@ -14,4 +14,6 @@ defined('_JEXEC') or die('Restricted access'); ?> -github->closedissues; ?> + + pagination->getListFooter(); ?> + \ No newline at end of file diff --git a/admin/views/powers/tmpl/default_head.php b/admin/views/powers/tmpl/default_head.php new file mode 100644 index 000000000..2497a6c39 --- /dev/null +++ b/admin/views/powers/tmpl/default_head.php @@ -0,0 +1,57 @@ + + * @gitea Joomla Component Builder + * @github 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'); + +?> + + canEdit&& $this->canState): ?> + + listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING', 'icon-menu-2'); ?> + + + + + + + ▾ + + + ■ + + + + listDirn, $this->listOrder); ?> + + + listDirn, $this->listOrder); ?> + + + listDirn, $this->listOrder); ?> + + + listDirn, $this->listOrder); ?> + + canState): ?> + + listDirn, $this->listOrder); ?> + + + + + + + + listDirn, $this->listOrder); ?> + + \ No newline at end of file diff --git a/admin/views/powers/tmpl/default_toolbar.php b/admin/views/powers/tmpl/default_toolbar.php new file mode 100644 index 000000000..819baf8dd --- /dev/null +++ b/admin/views/powers/tmpl/default_toolbar.php @@ -0,0 +1,46 @@ + + * @gitea Joomla Component Builder + * @github 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'); + +?> +
+ +
+ + +
+
+ + pagination->getLimitBox(); ?> +
+
+ + +
+
+ + +
+
+
\ No newline at end of file diff --git a/admin/views/powers/tmpl/index.html b/admin/views/powers/tmpl/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/admin/views/powers/tmpl/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/admin/views/powers/view.html.php b/admin/views/powers/view.html.php new file mode 100644 index 000000000..1d2fba317 --- /dev/null +++ b/admin/views/powers/view.html.php @@ -0,0 +1,290 @@ + + * @gitea Joomla Component Builder + * @github 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'); + +use Joomla\CMS\MVC\View\HtmlView; + +/** + * Componentbuilder Html View class for the Powers + */ +class ComponentbuilderViewPowers extends HtmlView +{ + /** + * Powers view display method + * @return void + */ + function display($tpl = null) + { + if ($this->getLayout() !== 'modal') + { + // Include helper submenu + ComponentbuilderHelper::addSubmenu('powers'); + } + + // Assign data to the view + $this->items = $this->get('Items'); + $this->pagination = $this->get('Pagination'); + $this->state = $this->get('State'); + $this->user = JFactory::getUser(); + // Load the filter form from xml. + $this->filterForm = $this->get('FilterForm'); + // Load the active filters. + $this->activeFilters = $this->get('ActiveFilters'); + // Add the list ordering clause. + $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); + $this->listDirn = $this->escape($this->state->get('list.direction', 'desc')); + $this->saveOrder = $this->listOrder == 'a.ordering'; + // set the return here value + $this->return_here = urlencode(base64_encode((string) JUri::getInstance())); + // get global action permissions + $this->canDo = ComponentbuilderHelper::getActions('power'); + $this->canEdit = $this->canDo->get('power.edit'); + $this->canState = $this->canDo->get('power.edit.state'); + $this->canCreate = $this->canDo->get('power.create'); + $this->canDelete = $this->canDo->get('power.delete'); + $this->canBatch = $this->canDo->get('core.batch'); + + // We don't need toolbar in the modal window. + if ($this->getLayout() !== 'modal') + { + $this->addToolbar(); + $this->sidebar = JHtmlSidebar::render(); + // load the batch html + if ($this->canCreate && $this->canEdit && $this->canState) + { + $this->batchDisplay = JHtmlBatch_::render(); + } + } + + // Check for errors. + if (count($errors = $this->get('Errors'))) + { + throw new Exception(implode("\n", $errors), 500); + } + + // Display the template + parent::display($tpl); + + // Set the document + $this->setDocument(); + } + + /** + * Setting the toolbar + */ + protected function addToolBar() + { + JToolBarHelper::title(JText::_('COM_COMPONENTBUILDER_POWERS'), 'flash'); + JHtmlSidebar::setAction('index.php?option=com_componentbuilder&view=powers'); + JFormHelper::addFieldPath(JPATH_COMPONENT . '/models/fields'); + + if ($this->canCreate) + { + JToolBarHelper::addNew('power.add'); + } + + // Only load if there are items + if (ComponentbuilderHelper::checkArray($this->items)) + { + if ($this->canEdit) + { + JToolBarHelper::editList('power.edit'); + } + + if ($this->canState) + { + JToolBarHelper::publishList('powers.publish'); + JToolBarHelper::unpublishList('powers.unpublish'); + JToolBarHelper::archiveList('powers.archive'); + + if ($this->canDo->get('core.admin')) + { + JToolBarHelper::checkin('powers.checkin'); + } + } + + // Add a batch button + if ($this->canBatch && $this->canCreate && $this->canEdit && $this->canState) + { + // Get the toolbar object instance + $bar = JToolBar::getInstance('toolbar'); + // set the batch button name + $title = JText::_('JTOOLBAR_BATCH'); + // Instantiate a new JLayoutFile instance and render the batch button + $layout = new JLayoutFile('joomla.toolbar.batch'); + // add the button to the page + $dhtml = $layout->render(array('title' => $title)); + $bar->appendButton('Custom', $dhtml, 'batch'); + } + + if ($this->state->get('filter.published') == -2 && ($this->canState && $this->canDelete)) + { + JToolbarHelper::deleteList('', 'powers.delete', 'JTOOLBAR_EMPTY_TRASH'); + } + elseif ($this->canState && $this->canDelete) + { + JToolbarHelper::trash('powers.trash'); + } + } + if ($this->user->authorise('power.run_expansion', 'com_componentbuilder')) + { + // add Run Expansion button. + JToolBarHelper::custom('powers.runExpansion', 'expand-2 custom-button-runexpansion', '', 'COM_COMPONENTBUILDER_RUN_EXPANSION', false); + } + + // set help url for this view if found + $this->help_url = ComponentbuilderHelper::getHelpUrl('powers'); + if (ComponentbuilderHelper::checkString($this->help_url)) + { + JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $this->help_url); + } + + // add the options comp button + if ($this->canDo->get('core.admin') || $this->canDo->get('core.options')) + { + JToolBarHelper::preferences('com_componentbuilder'); + } + + // Only load published batch if state and batch is allowed + if ($this->canState && $this->canBatch) + { + JHtmlBatch_::addListSelection( + JText::_('COM_COMPONENTBUILDER_KEEP_ORIGINAL_STATE'), + 'batch[published]', + JHtml::_('select.options', JHtml::_('jgrid.publishedOptions', array('all' => false)), 'value', 'text', '', true) + ); + } + + // Only load access batch if create, edit and batch is allowed + if ($this->canBatch && $this->canCreate && $this->canEdit) + { + JHtmlBatch_::addListSelection( + JText::_('COM_COMPONENTBUILDER_KEEP_ORIGINAL_ACCESS'), + 'batch[access]', + JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text') + ); + } + + // Only load Type batch if create, edit, and batch is allowed + if ($this->canBatch && $this->canCreate && $this->canEdit) + { + // Set Type Selection + $this->typeOptions = JFormHelper::loadFieldType('powersfiltertype')->options; + // We do some sanitation for Type filter + if (ComponentbuilderHelper::checkArray($this->typeOptions) && + isset($this->typeOptions[0]->value) && + !ComponentbuilderHelper::checkString($this->typeOptions[0]->value)) + { + unset($this->typeOptions[0]); + } + // Type Batch Selection + JHtmlBatch_::addListSelection( + '- Keep Original '.JText::_('COM_COMPONENTBUILDER_POWER_TYPE_LABEL').' -', + 'batch[type]', + JHtml::_('select.options', $this->typeOptions, 'value', 'text') + ); + } + + // Only load Power Version batch if create, edit, and batch is allowed + if ($this->canBatch && $this->canCreate && $this->canEdit) + { + // Set Power Version Selection + $this->power_versionOptions = JFormHelper::loadFieldType('powersfilterpowerversion')->options; + // We do some sanitation for Power Version filter + if (ComponentbuilderHelper::checkArray($this->power_versionOptions) && + isset($this->power_versionOptions[0]->value) && + !ComponentbuilderHelper::checkString($this->power_versionOptions[0]->value)) + { + unset($this->power_versionOptions[0]); + } + // Power Version Batch Selection + JHtmlBatch_::addListSelection( + '- Keep Original '.JText::_('COM_COMPONENTBUILDER_POWER_POWER_VERSION_LABEL').' -', + 'batch[power_version]', + JHtml::_('select.options', $this->power_versionOptions, 'value', 'text') + ); + } + + // Only load Extends Name batch if create, edit, and batch is allowed + if ($this->canBatch && $this->canCreate && $this->canEdit) + { + // Set Extends Name Selection + $this->extendsNameOptions = JFormHelper::loadFieldType('Classpowers')->options; + // We do some sanitation for Extends Name filter + if (ComponentbuilderHelper::checkArray($this->extendsNameOptions) && + isset($this->extendsNameOptions[0]->value) && + !ComponentbuilderHelper::checkString($this->extendsNameOptions[0]->value)) + { + unset($this->extendsNameOptions[0]); + } + // Extends Name Batch Selection + JHtmlBatch_::addListSelection( + '- Keep Original '.JText::_('COM_COMPONENTBUILDER_POWER_EXTENDS_LABEL').' -', + 'batch[extends]', + JHtml::_('select.options', $this->extendsNameOptions, 'value', 'text') + ); + } + } + + /** + * Method to set up the document properties + * + * @return void + */ + protected function setDocument() + { + if (!isset($this->document)) + { + $this->document = JFactory::getDocument(); + } + $this->document->setTitle(JText::_('COM_COMPONENTBUILDER_POWERS')); + $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/powers.css", (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); + } + + /** + * Escapes a value for output in a view script. + * + * @param mixed $var The output to escape. + * + * @return mixed The escaped value. + */ + public function escape($var) + { + if(strlen($var) > 50) + { + // use the helper htmlEscape method instead and shorten the string + return ComponentbuilderHelper::htmlEscape($var, $this->_charset, true); + } + // use the helper htmlEscape method instead. + return ComponentbuilderHelper::htmlEscape($var, $this->_charset); + } + + /** + * Returns an array of fields the table can be sorted by + * + * @return array Array containing the field name to sort by as the key and display text as value + */ + protected function getSortFields() + { + return array( + 'a.ordering' => JText::_('JGRID_HEADING_ORDERING'), + 'a.published' => JText::_('JSTATUS'), + 'a.system_name' => JText::_('COM_COMPONENTBUILDER_POWER_SYSTEM_NAME_LABEL'), + 'a.namespace' => JText::_('COM_COMPONENTBUILDER_POWER_NAMESPACE_LABEL'), + 'a.type' => JText::_('COM_COMPONENTBUILDER_POWER_TYPE_LABEL'), + 'a.power_version' => JText::_('COM_COMPONENTBUILDER_POWER_POWER_VERSION_LABEL'), + 'a.id' => JText::_('JGRID_HEADING_ID') + ); + } +} diff --git a/admin/views/server/tmpl/edit.php b/admin/views/server/tmpl/edit.php index 773e14787..cc11b7de2 100644 --- a/admin/views/server/tmpl/edit.php +++ b/admin/views/server/tmpl/edit.php @@ -125,21 +125,6 @@ $componentParams = $this->params; // will be removed just use $this->params inst