diff --git a/README.md b/README.md index 24e8c358b..0aab735df 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,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 safe 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.6.14) with **ALL** its features and **ALL** concepts totally open-source and free! +You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.6.15) 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) @@ -126,13 +126,13 @@ Component Builder is mapped as a component in itself on my local development env + *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com) + *Name*: [Component Builder](http://joomlacomponentbuilder.com) + *First Build*: 30th April, 2015 -+ *Last Build*: 6th February, 2018 -+ *Version*: 2.6.14 ++ *Last Build*: 15th February, 2018 ++ *Version*: 2.6.15 + *Copyright*: Copyright (C) 2015. All Rights Reserved + *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html -+ *Line count*: **180952** -+ *Field count*: **1577** -+ *File count*: **1159** ++ *Line count*: **182233** ++ *Field count*: **1601** ++ *File count*: **1162** + *Folder count*: **186** > This **component** was build with a Joomla [Automated Component Builder](http://joomlacomponentbuilder.com). diff --git a/admin/README.txt b/admin/README.txt index 24e8c358b..0aab735df 100644 --- a/admin/README.txt +++ b/admin/README.txt @@ -9,7 +9,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 safe 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.6.14) with **ALL** its features and **ALL** concepts totally open-source and free! +You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.6.15) 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) @@ -126,13 +126,13 @@ Component Builder is mapped as a component in itself on my local development env + *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com) + *Name*: [Component Builder](http://joomlacomponentbuilder.com) + *First Build*: 30th April, 2015 -+ *Last Build*: 6th February, 2018 -+ *Version*: 2.6.14 ++ *Last Build*: 15th February, 2018 ++ *Version*: 2.6.15 + *Copyright*: Copyright (C) 2015. All Rights Reserved + *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html -+ *Line count*: **180952** -+ *Field count*: **1577** -+ *File count*: **1159** ++ *Line count*: **182233** ++ *Field count*: **1601** ++ *File count*: **1162** + *Folder count*: **186** > This **component** was build with a Joomla [Automated Component Builder](http://joomlacomponentbuilder.com). diff --git a/admin/access.xml b/admin/access.xml index a27e152b2..e81f9fc5a 100644 --- a/admin/access.xml +++ b/admin/access.xml @@ -210,22 +210,6 @@ - - - - - - - - - - - - - - - - @@ -325,6 +309,20 @@ + + + + + + + + + + + + + + @@ -498,18 +496,16 @@ -
- - - - - - - - - - - +
+ + + + + + + + +
diff --git a/admin/assets/css/ftp.css b/admin/assets/css/server.css similarity index 97% rename from admin/assets/css/ftp.css rename to admin/assets/css/server.css index 7b57c64e3..5f90e8254 100644 --- a/admin/assets/css/ftp.css +++ b/admin/assets/css/server.css @@ -12,7 +12,7 @@ @version 2.6.x @created 30th April, 2015 @package Component Builder - @subpackage ftp.css + @subpackage server.css @author Llewellyn van der Merwe @github Joomla Component Builder @copyright Copyright (C) 2015. All Rights Reserved diff --git a/admin/assets/css/ftps.css b/admin/assets/css/servers.css similarity index 97% rename from admin/assets/css/ftps.css rename to admin/assets/css/servers.css index dc8824b1b..010fc42a8 100644 --- a/admin/assets/css/ftps.css +++ b/admin/assets/css/servers.css @@ -12,7 +12,7 @@ @version 2.6.x @created 30th April, 2015 @package Component Builder - @subpackage ftps.css + @subpackage servers.css @author Llewellyn van der Merwe @github Joomla Component Builder @copyright Copyright (C) 2015. All Rights Reserved diff --git a/admin/assets/images/icons/ftps.png b/admin/assets/images/icons/servers.png similarity index 100% rename from admin/assets/images/icons/ftps.png rename to admin/assets/images/icons/servers.png diff --git a/admin/controller.php b/admin/controller.php index 6994dc32f..2a95e81fe 100644 --- a/admin/controller.php +++ b/admin/controller.php @@ -102,7 +102,7 @@ class ComponentbuilderController extends JControllerLegacy 'fieldtype' => 'fieldtypes', 'language_translation' => 'language_translations', 'language' => 'languages', - 'ftp' => 'ftps', + 'server' => 'servers', 'help_document' => 'help_documents', 'admin_fields' => 'admins_fields', 'admin_fields_conditions' => 'admins_fields_conditions', diff --git a/admin/controllers/ftp.php b/admin/controllers/server.php similarity index 86% rename from admin/controllers/ftp.php rename to admin/controllers/server.php index 1c4c381f8..b6ca061ac 100644 --- a/admin/controllers/ftp.php +++ b/admin/controllers/server.php @@ -13,7 +13,7 @@ @version 2.6.x @created 30th April, 2015 @package Component Builder - @subpackage ftp.php + @subpackage server.php @author Llewellyn van der Merwe @github Joomla Component Builder @copyright Copyright (C) 2015. All Rights Reserved @@ -30,9 +30,9 @@ defined('_JEXEC') or die('Restricted access'); jimport('joomla.application.component.controllerform'); /** - * Ftp Controller + * Server Controller */ -class ComponentbuilderControllerFtp extends JControllerForm +class ComponentbuilderControllerServer extends JControllerForm { /** * Current or most recently performed task. @@ -45,7 +45,7 @@ class ComponentbuilderControllerFtp extends JControllerForm public function __construct($config = array()) { - $this->view_list = 'Ftps'; // safeguard for setting the return view listing to the main view. + $this->view_list = 'Servers'; // safeguard for setting the return view listing to the main view. parent::__construct($config); } @@ -61,13 +61,13 @@ class ComponentbuilderControllerFtp extends JControllerForm protected function allowAdd($data = array()) { // Access check. - $access = JFactory::getUser()->authorise('ftp.access', 'com_componentbuilder'); + $access = JFactory::getUser()->authorise('server.access', 'com_componentbuilder'); if (!$access) { return false; } // In the absense of better information, revert to the component permissions. - return JFactory::getUser()->authorise('ftp.create', $this->option); + return JFactory::getUser()->authorise('server.create', $this->option); } /** @@ -89,7 +89,7 @@ class ComponentbuilderControllerFtp extends JControllerForm // Access check. - $access = ($user->authorise('ftp.access', 'com_componentbuilder.ftp.' . (int) $recordId) && $user->authorise('ftp.access', 'com_componentbuilder')); + $access = ($user->authorise('server.access', 'com_componentbuilder.server.' . (int) $recordId) && $user->authorise('server.access', 'com_componentbuilder')); if (!$access) { return false; @@ -98,10 +98,10 @@ class ComponentbuilderControllerFtp extends JControllerForm if ($recordId) { // The record has been set. Check the record permissions. - $permission = $user->authorise('ftp.edit', 'com_componentbuilder.ftp.' . (int) $recordId); + $permission = $user->authorise('server.edit', 'com_componentbuilder.server.' . (int) $recordId); if (!$permission) { - if ($user->authorise('ftp.edit.own', 'com_componentbuilder.ftp.' . $recordId)) + if ($user->authorise('server.edit.own', 'com_componentbuilder.server.' . $recordId)) { // Now test the owner is the user. $ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0; @@ -120,7 +120,7 @@ class ComponentbuilderControllerFtp extends JControllerForm // If the owner matches 'me' then allow. if ($ownerId == $user->id) { - if ($user->authorise('ftp.edit.own', 'com_componentbuilder')) + if ($user->authorise('server.edit.own', 'com_componentbuilder')) { return true; } @@ -130,7 +130,7 @@ class ComponentbuilderControllerFtp extends JControllerForm } } // Since there is no permission, revert to the component permissions. - return $user->authorise('ftp.edit', $this->option); + return $user->authorise('server.edit', $this->option); } /** @@ -196,10 +196,10 @@ class ComponentbuilderControllerFtp extends JControllerForm JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN')); // Set the model - $model = $this->getModel('Ftp', '', array()); + $model = $this->getModel('Server', '', array()); // Preset the redirect - $this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=ftps' . $this->getRedirectToListAppend(), false)); + $this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=servers' . $this->getRedirectToListAppend(), false)); return parent::batch($model); } diff --git a/admin/controllers/ftps.php b/admin/controllers/servers.php similarity index 78% rename from admin/controllers/ftps.php rename to admin/controllers/servers.php index 63af9b703..4e284055b 100644 --- a/admin/controllers/ftps.php +++ b/admin/controllers/servers.php @@ -13,7 +13,7 @@ @version 2.6.x @created 30th April, 2015 @package Component Builder - @subpackage ftps.php + @subpackage servers.php @author Llewellyn van der Merwe @github Joomla Component Builder @copyright Copyright (C) 2015. All Rights Reserved @@ -30,16 +30,16 @@ defined('_JEXEC') or die('Restricted access'); jimport('joomla.application.component.controlleradmin'); /** - * Ftps Controller + * Servers Controller */ -class ComponentbuilderControllerFtps extends JControllerAdmin +class ComponentbuilderControllerServers extends JControllerAdmin { - protected $text_prefix = 'COM_COMPONENTBUILDER_FTPS'; + protected $text_prefix = 'COM_COMPONENTBUILDER_SERVERS'; /** * Proxy for getModel. * @since 2.5 */ - public function getModel($name = 'Ftp', $prefix = 'ComponentbuilderModel', $config = array()) + public function getModel($name = 'Server', $prefix = 'ComponentbuilderModel', $config = array()) { $model = parent::getModel($name, $prefix, array('ignore_request' => true)); @@ -52,7 +52,7 @@ class ComponentbuilderControllerFtps extends JControllerAdmin JSession::checkToken() or die(JText::_('JINVALID_TOKEN')); // check if export is allowed for this user. $user = JFactory::getUser(); - if ($user->authorise('ftp.export', 'com_componentbuilder') && $user->authorise('core.export', 'com_componentbuilder')) + if ($user->authorise('server.export', 'com_componentbuilder') && $user->authorise('core.export', 'com_componentbuilder')) { // Get the input $input = JFactory::getApplication()->input; @@ -60,19 +60,19 @@ class ComponentbuilderControllerFtps extends JControllerAdmin // Sanitize the input JArrayHelper::toInteger($pks); // Get the model - $model = $this->getModel('Ftps'); + $model = $this->getModel('Servers'); // 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,'Ftps_'.$date->format('jS_F_Y'),'Ftps exported ('.$date->format('jS F, Y').')','ftps'); + ComponentbuilderHelper::xls($data,'Servers_'.$date->format('jS_F_Y'),'Servers exported ('.$date->format('jS F, Y').')','servers'); } } // Redirect to the list screen with error. $message = JText::_('COM_COMPONENTBUILDER_EXPORT_FAILED'); - $this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=ftps', false), $message, 'error'); + $this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=servers', false), $message, 'error'); return; } @@ -83,10 +83,10 @@ class ComponentbuilderControllerFtps extends JControllerAdmin JSession::checkToken() or die(JText::_('JINVALID_TOKEN')); // check if import is allowed for this user. $user = JFactory::getUser(); - if ($user->authorise('ftp.import', 'com_componentbuilder') && $user->authorise('core.import', 'com_componentbuilder')) + if ($user->authorise('server.import', 'com_componentbuilder') && $user->authorise('core.import', 'com_componentbuilder')) { // Get the import model - $model = $this->getModel('Ftps'); + $model = $this->getModel('Servers'); // get the headers to import $headers = $model->getExImPortHeaders(); if (ComponentbuilderHelper::checkObject($headers)) @@ -94,18 +94,18 @@ class ComponentbuilderControllerFtps extends JControllerAdmin // Load headers to session. $session = JFactory::getSession(); $headers = json_encode($headers); - $session->set('ftp_VDM_IMPORTHEADERS', $headers); - $session->set('backto_VDM_IMPORT', 'ftps'); - $session->set('dataType_VDM_IMPORTINTO', 'ftp'); + $session->set('server_VDM_IMPORTHEADERS', $headers); + $session->set('backto_VDM_IMPORT', 'servers'); + $session->set('dataType_VDM_IMPORTINTO', 'server'); // Redirect to import view. - $message = JText::_('COM_COMPONENTBUILDER_IMPORT_SELECT_FILE_FOR_FTPS'); + $message = JText::_('COM_COMPONENTBUILDER_IMPORT_SELECT_FILE_FOR_SERVERS'); $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=ftps', false), $message, 'error'); + $this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=servers', false), $message, 'error'); return; } } diff --git a/admin/helpers/compiler.php b/admin/helpers/compiler.php index 11f51b4fe..2cb7a0378 100644 --- a/admin/helpers/compiler.php +++ b/admin/helpers/compiler.php @@ -316,19 +316,19 @@ class Compiler extends Infusion { $xml_update_server_path = $this->componentPath . '/' . $this->updateServerFileName . '.xml'; // make sure we have the correct file - if (JFile::exists($xml_update_server_path) && isset($this->componentData->update_server_ftp)) + if (JFile::exists($xml_update_server_path) && isset($this->componentData->update_server)) { // Get the basic encription. $basickey = ComponentbuilderHelper::getCryptKey('basic'); // Get the encription object. $basic = new FOFEncryptAes($basickey, 128); - if (!empty($this->componentData->update_server_ftp) && $basickey && !is_numeric($this->componentData->update_server_ftp) && $this->componentData->update_server_ftp === base64_encode(base64_decode($this->componentData->update_server_ftp, true))) + if (!empty($this->componentData->update_server) && $basickey && !is_numeric($this->componentData->update_server) && $this->componentData->update_server === base64_encode(base64_decode($this->componentData->update_server, true))) { - // basic decript data update_server_ftp. - $this->componentData->update_server_ftp = rtrim($basic->decryptString($this->componentData->update_server_ftp), "\0"); + // basic decript data update_server. + $this->componentData->update_server = rtrim($basic->decryptString($this->componentData->update_server), "\0"); } // now move the file - $this->moveFileToFtpServer($xml_update_server_path, $this->componentData->update_server_ftp); + $this->moveFileToFtpServer($xml_update_server_path, $this->componentData->update_server); } } } @@ -497,19 +497,19 @@ class Compiler extends Infusion if ($this->componentData->add_sales_server == 1 && $this->dynamicIntegration) { // make sure we have the correct file - if (isset($this->componentData->sales_server_ftp)) + if (isset($this->componentData->sales_server)) { // Get the basic encription. $basickey = ComponentbuilderHelper::getCryptKey('basic'); // Get the encription object. $basic = new FOFEncryptAes($basickey, 128); - if (!empty($this->componentData->sales_server_ftp) && $basickey && !is_numeric($this->componentData->sales_server_ftp) && $this->componentData->sales_server_ftp === base64_encode(base64_decode($this->componentData->sales_server_ftp, true))) + if (!empty($this->componentData->sales_server) && $basickey && !is_numeric($this->componentData->sales_server) && $this->componentData->sales_server === base64_encode(base64_decode($this->componentData->sales_server, true))) { - // basic decript data update_server_ftp. - $this->componentData->sales_server_ftp = rtrim($basic->decryptString($this->componentData->sales_server_ftp), "\0"); + // basic decript data update_server. + $this->componentData->sales_server = rtrim($basic->decryptString($this->componentData->sales_server), "\0"); } // now move the file - $this->moveFileToFtpServer($this->filepath, $this->componentData->sales_server_ftp, $this->componentSalesName . '.zip', false); + $this->moveFileToFtpServer($this->filepath, $this->componentData->sales_server, $this->componentSalesName . '.zip', false); } } // remove the component folder since we are done diff --git a/admin/helpers/compiler/a_Get.php b/admin/helpers/compiler/a_Get.php index aafa75836..c68b8d811 100644 --- a/admin/helpers/compiler/a_Get.php +++ b/admin/helpers/compiler/a_Get.php @@ -1141,23 +1141,23 @@ class Get // reset back to nowlang $this->lang = $nowLang; - // add the update FTP server sig - if ($component->add_update_server == 1 && is_numeric($component->update_server_ftp) && $component->update_server_ftp > 0) + // add the update server details + if ($component->add_update_server == 1 && is_numeric($component->update_server) && $component->update_server > 0) { - $component->update_server_ftp = ComponentbuilderHelper::getVar('ftp', (int) $component->update_server_ftp, 'id', 'signature'); + $component->update_server = ComponentbuilderHelper::getVar('server', (int) $component->update_server, 'id', 'signature'); } else { - $component->update_server_ftp = 0; + $component->update_server = 0; } - // add the sales FTP server sig - if ($component->add_sales_server == 1 && is_numeric($component->sales_server_ftp) && $component->sales_server_ftp > 0) + // add the sales server details + if ($component->add_sales_server == 1 && is_numeric($component->sales_server) && $component->sales_server > 0) { - $component->sales_server_ftp = ComponentbuilderHelper::getVar('ftp', (int) $component->sales_server_ftp, 'id', 'signature'); + $component->sales_server = ComponentbuilderHelper::getVar('server', (int) $component->sales_server, 'id', 'signature'); } else { - $component->sales_server_ftp = 0; + $component->sales_server = 0; $component->add_sales_server = 0; } // set the ignore folders for repo if found diff --git a/admin/helpers/compiler/e_Interpretation.php b/admin/helpers/compiler/e_Interpretation.php index 2112ea662..ec87cc0c8 100644 --- a/admin/helpers/compiler/e_Interpretation.php +++ b/admin/helpers/compiler/e_Interpretation.php @@ -700,7 +700,7 @@ class Interpretation extends Fields { $updateXML[] = ''; // ###UPDATE_SERVER_XML### - $name = str_replace('.xml', '', substr($this->componentData->update_server, strrpos($this->componentData->update_server, '/') + 1)); + $name = str_replace('.xml', '', substr($this->componentData->update_server_url, strrpos($this->componentData->update_server_url, '/') + 1)); $target = array('admin' => $name); $this->buildDynamique($target, 'update_server'); $this->fileContentDynamic[$name]['###UPDATE_SERVER_XML###'] = implode(PHP_EOL, $updateXML); @@ -710,12 +710,12 @@ class Interpretation extends Fields } } // add the update server link to component XML - if ($this->componentData->add_update_server && isset($this->componentData->update_server) && ComponentbuilderHelper::checkString($this->componentData->update_server)) + if ($this->componentData->add_update_server && isset($this->componentData->update_server_url) && ComponentbuilderHelper::checkString($this->componentData->update_server_url)) { // ###UPDATESERVER### $updateServer = array(); $updateServer[] = PHP_EOL . "\t"; - $updateServer[] = "\t\t" . '' . $this->componentData->update_server . ''; + $updateServer[] = "\t\t" . '' . $this->componentData->update_server_url . ''; $updateServer[] = "\t"; // return the array to string $updateServer = implode(PHP_EOL, $updateServer); @@ -2241,9 +2241,14 @@ class Interpretation extends Fields $getItem .= PHP_EOL . PHP_EOL . "\t" . $tab . "\t//" . $this->setLine(__LINE__) . " set data object to item."; $getItem .= PHP_EOL . "\t" . $tab . "\t\$this->_item[\$pk] = \$data;"; } - // check if the dispather should be added - if (isset($this->JEventDispatcher) && ComponentbuilderHelper::checkArray($this->JEventDispatcher)) + // only update if dispacher placholder is found + if (strpos($getItem, '###DISPATCHER###') !== false) { + // check if the dispather should be added + if (!isset($this->JEventDispatcher) || !ComponentbuilderHelper::checkArray($this->JEventDispatcher)) + { + $this->JEventDispatcher = array('###DISPATCHER###' => ''); + } $getItem = str_replace(array_keys($this->JEventDispatcher), array_values($this->JEventDispatcher), $getItem); } return $getItem; @@ -2696,9 +2701,14 @@ class Interpretation extends Fields $methods = str_replace('###CRYPT###', '', $methods); } } - // check if the dispatcher must be set - if (isset($this->JEventDispatcher) && ComponentbuilderHelper::checkArray($this->JEventDispatcher)) + // only update if dispacher placholder is found + if (strpos($methods, '###DISPATCHER###') !== false) { + // check if the dispather should be added + if (!isset($this->JEventDispatcher) || !ComponentbuilderHelper::checkArray($this->JEventDispatcher)) + { + $this->JEventDispatcher = array('###DISPATCHER###' => ''); + } $methods = str_replace(array_keys($this->JEventDispatcher), array_values($this->JEventDispatcher), $methods); } return $methods . PHP_EOL; @@ -2849,9 +2859,14 @@ class Interpretation extends Fields $asBucket[] = $main_get['as']; } } - // check if we should load the dispatcher - if (isset($this->JEventDispatcher) && ComponentbuilderHelper::checkArray($this->JEventDispatcher)) + // only update if dispacher placholder is found + if (strpos($getItem, '###DISPATCHER###') !== false) { + // check if the dispather should be added + if (!isset($this->JEventDispatcher) || !ComponentbuilderHelper::checkArray($this->JEventDispatcher)) + { + $this->JEventDispatcher = array('###DISPATCHER###' => ''); + } $getItem = str_replace(array_keys($this->JEventDispatcher), array_values($this->JEventDispatcher), $getItem); } // setup Globals diff --git a/admin/helpers/componentbuilder.php b/admin/helpers/componentbuilder.php index 8d2e6fe9a..83f9119a1 100644 --- a/admin/helpers/componentbuilder.php +++ b/admin/helpers/componentbuilder.php @@ -1932,6 +1932,13 @@ abstract class ComponentbuilderHelper return $content; } } + elseif (property_exists('ComponentbuilderHelper', 'curlErrorLoaded') && !self::$curlErrorLoaded) + { + // set the notice + JFactory::getApplication()->enqueueMessage(JText::_('COM_COMPONENTBUILDER_HTWOCURL_NOT_FOUNDHTWOPPLEASE_SETUP_CURL_ON_YOUR_SYSTEM_OR_BCOMPONENTBUILDERB_WILL_NOT_FUNCTION_CORRECTLYP'), 'Error'); + // load this notice only once + self::$curlErrorLoaded = true; + } } return $none; } @@ -2150,9 +2157,9 @@ abstract class ComponentbuilderHelper { JHtmlSidebar::addEntry(JText::_('COM_COMPONENTBUILDER_SUBMENU_LANGUAGES'), 'index.php?option=com_componentbuilder&view=languages', $submenu === 'languages'); } - if ($user->authorise('ftp.access', 'com_componentbuilder') && $user->authorise('ftp.submenu', 'com_componentbuilder')) + if ($user->authorise('server.access', 'com_componentbuilder') && $user->authorise('server.submenu', 'com_componentbuilder')) { - JHtmlSidebar::addEntry(JText::_('COM_COMPONENTBUILDER_SUBMENU_FTPS'), 'index.php?option=com_componentbuilder&view=ftps', $submenu === 'ftps'); + JHtmlSidebar::addEntry(JText::_('COM_COMPONENTBUILDER_SUBMENU_SERVERS'), 'index.php?option=com_componentbuilder&view=servers', $submenu === 'servers'); } if ($user->authorise('help_document.access', 'com_componentbuilder') && $user->authorise('help_document.submenu', 'com_componentbuilder')) { diff --git a/admin/language/en-GB/en-GB.com_componentbuilder.ini b/admin/language/en-GB/en-GB.com_componentbuilder.ini index 32afdf735..70eb9ab4a 100644 --- a/admin/language/en-GB/en-GB.com_componentbuilder.ini +++ b/admin/language/en-GB/en-GB.com_componentbuilder.ini @@ -3118,7 +3118,6 @@ COM_COMPONENTBUILDER_DASHBOARD_FIELDTYPES="Fieldtypes

" COM_COMPONENTBUILDER_DASHBOARD_FIELDTYPES_CATID="Category  For
Fieldtypes" COM_COMPONENTBUILDER_DASHBOARD_FIELDTYPE_ADD="Add Fieldtype

" COM_COMPONENTBUILDER_DASHBOARD_FIELD_ADD="Add Field

" -COM_COMPONENTBUILDER_DASHBOARD_FTPS="Ftps

" COM_COMPONENTBUILDER_DASHBOARD_HELP_DOCUMENTS="Help Documents

" COM_COMPONENTBUILDER_DASHBOARD_HELP_DOCUMENT_ADD="Add Help Document

" COM_COMPONENTBUILDER_DASHBOARD_JOOMLA_COMPONENTS="Joomla Components

" @@ -3128,6 +3127,7 @@ COM_COMPONENTBUILDER_DASHBOARD_LAYOUTS="Layouts

" COM_COMPONENTBUILDER_DASHBOARD_LAYOUT_ADD="Add Layout

" COM_COMPONENTBUILDER_DASHBOARD_LIBRARIES="Libraries

" COM_COMPONENTBUILDER_DASHBOARD_LIST_OF_RECORDS="Dashboard (list of records)" +COM_COMPONENTBUILDER_DASHBOARD_SERVERS="Servers

" COM_COMPONENTBUILDER_DASHBOARD_SITE_VIEWS="Site Views

" COM_COMPONENTBUILDER_DASHBOARD_SITE_VIEW_ADD="Add Site View

" COM_COMPONENTBUILDER_DASHBOARD_SNIPPETS="Snippets

" @@ -3808,92 +3808,6 @@ COM_COMPONENTBUILDER_FILE="File" COM_COMPONENTBUILDER_FILTER="Filter" COM_COMPONENTBUILDER_FOLDER="Folder" COM_COMPONENTBUILDER_FORCE_LOCAL_UPDATE="Force Local Update" -COM_COMPONENTBUILDER_FTP="FTP" -COM_COMPONENTBUILDER_FTPS="FTP's" -COM_COMPONENTBUILDER_FTPS_ACCESS="Ftps Access" -COM_COMPONENTBUILDER_FTPS_ACCESS_DESC="Allows the users in this group to access access ftps" -COM_COMPONENTBUILDER_FTPS_BATCH_OPTIONS="Batch process the selected FTP's" -COM_COMPONENTBUILDER_FTPS_BATCH_TIP="All changes will be applied to all selected FTP's" -COM_COMPONENTBUILDER_FTPS_BATCH_USE="Ftps Batch Use" -COM_COMPONENTBUILDER_FTPS_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch ftps" -COM_COMPONENTBUILDER_FTPS_CREATE="Ftps Create" -COM_COMPONENTBUILDER_FTPS_CREATE_DESC="Allows the users in this group to create create ftps" -COM_COMPONENTBUILDER_FTPS_DASHBOARD_LIST="Ftps Dashboard List" -COM_COMPONENTBUILDER_FTPS_DASHBOARD_LIST_DESC="Allows the users in this group to update the dashboard list of the ftp" -COM_COMPONENTBUILDER_FTPS_DELETE="Ftps Delete" -COM_COMPONENTBUILDER_FTPS_DELETE_DESC="Allows the users in this group to delete delete ftps" -COM_COMPONENTBUILDER_FTPS_EDIT="Ftps Edit" -COM_COMPONENTBUILDER_FTPS_EDIT_CREATED_BY="Ftps Edit Created By" -COM_COMPONENTBUILDER_FTPS_EDIT_CREATED_BY_DESC="Allows the users in this group to update the created by of the edit created by ftps" -COM_COMPONENTBUILDER_FTPS_EDIT_CREATED_DATE="Ftps Edit Created Date" -COM_COMPONENTBUILDER_FTPS_EDIT_CREATED_DATE_DESC="Allows the users in this group to update the created date of the edit created ftps" -COM_COMPONENTBUILDER_FTPS_EDIT_DESC="Allows the users in this group to edit the ftp" -COM_COMPONENTBUILDER_FTPS_EDIT_NAME="Ftps Edit Name" -COM_COMPONENTBUILDER_FTPS_EDIT_NAME_DESC="Allows the users in this group to update the edit name of the ftp" -COM_COMPONENTBUILDER_FTPS_EDIT_OWN="Ftps Edit Own" -COM_COMPONENTBUILDER_FTPS_EDIT_OWN_DESC="Allows the users in this group to edit edit own ftps created by them" -COM_COMPONENTBUILDER_FTPS_EDIT_SIGNATURE="Ftps Edit Signature" -COM_COMPONENTBUILDER_FTPS_EDIT_SIGNATURE_DESC="Allows the users in this group to update the edit signature of the ftp" -COM_COMPONENTBUILDER_FTPS_EDIT_STATE="Ftps Edit State" -COM_COMPONENTBUILDER_FTPS_EDIT_STATE_DESC="Allows the users in this group to update the state of the ftp" -COM_COMPONENTBUILDER_FTPS_EDIT_VERSION="Ftps Edit Version" -COM_COMPONENTBUILDER_FTPS_EDIT_VERSION_DESC="Allows users in this group to edit versions of version ftps" -COM_COMPONENTBUILDER_FTPS_EXPORT="Ftps Export" -COM_COMPONENTBUILDER_FTPS_EXPORT_DESC="Allows the users in this group to export export ftps" -COM_COMPONENTBUILDER_FTPS_IMPORT="Ftps Import" -COM_COMPONENTBUILDER_FTPS_IMPORT_DESC="Allows the users in this group to import import ftps" -COM_COMPONENTBUILDER_FTPS_N_ITEMS_ARCHIVED="%s FTP's archived." -COM_COMPONENTBUILDER_FTPS_N_ITEMS_ARCHIVED_1="%s FTP archived." -COM_COMPONENTBUILDER_FTPS_N_ITEMS_CHECKED_IN_0="No FTP successfully checked in." -COM_COMPONENTBUILDER_FTPS_N_ITEMS_CHECKED_IN_1="%d FTP successfully checked in." -COM_COMPONENTBUILDER_FTPS_N_ITEMS_CHECKED_IN_MORE="%d FTP's successfully checked in." -COM_COMPONENTBUILDER_FTPS_N_ITEMS_DELETED="%s FTP's deleted." -COM_COMPONENTBUILDER_FTPS_N_ITEMS_DELETED_1="%s FTP deleted." -COM_COMPONENTBUILDER_FTPS_N_ITEMS_FEATURED="%s FTP's featured." -COM_COMPONENTBUILDER_FTPS_N_ITEMS_FEATURED_1="%s FTP featured." -COM_COMPONENTBUILDER_FTPS_N_ITEMS_PUBLISHED="%s FTP's published." -COM_COMPONENTBUILDER_FTPS_N_ITEMS_PUBLISHED_1="%s FTP published." -COM_COMPONENTBUILDER_FTPS_N_ITEMS_TRASHED="%s FTP's trashed." -COM_COMPONENTBUILDER_FTPS_N_ITEMS_TRASHED_1="%s FTP trashed." -COM_COMPONENTBUILDER_FTPS_N_ITEMS_UNFEATURED="%s FTP's unfeatured." -COM_COMPONENTBUILDER_FTPS_N_ITEMS_UNFEATURED_1="%s FTP unfeatured." -COM_COMPONENTBUILDER_FTPS_N_ITEMS_UNPUBLISHED="%s FTP's unpublished." -COM_COMPONENTBUILDER_FTPS_N_ITEMS_UNPUBLISHED_1="%s FTP unpublished." -COM_COMPONENTBUILDER_FTPS_SUBMENU="Ftps Submenu" -COM_COMPONENTBUILDER_FTPS_SUBMENU_DESC="Allows the users in this group to update the submenu of the ftp" -COM_COMPONENTBUILDER_FTP_CREATED_BY_DESC="The user that created this FTP." -COM_COMPONENTBUILDER_FTP_CREATED_BY_LABEL="Created By" -COM_COMPONENTBUILDER_FTP_CREATED_DATE_DESC="The date this FTP was created." -COM_COMPONENTBUILDER_FTP_CREATED_DATE_LABEL="Created Date" -COM_COMPONENTBUILDER_FTP_DETAILS="Details" -COM_COMPONENTBUILDER_FTP_EDIT="Editing the FTP" -COM_COMPONENTBUILDER_FTP_ERROR_UNIQUE_ALIAS="Another FTP has the same alias." -COM_COMPONENTBUILDER_FTP_ID="Id" -COM_COMPONENTBUILDER_FTP_LINKED_COMPONENTS="Linked Components" -COM_COMPONENTBUILDER_FTP_MODIFIED_BY_DESC="The last user that modified this FTP." -COM_COMPONENTBUILDER_FTP_MODIFIED_BY_LABEL="Modified By" -COM_COMPONENTBUILDER_FTP_MODIFIED_DATE_DESC="The date this FTP was modified." -COM_COMPONENTBUILDER_FTP_MODIFIED_DATE_LABEL="Modified Date" -COM_COMPONENTBUILDER_FTP_NAME="Name" -COM_COMPONENTBUILDER_FTP_NAME_DESCRIPTION="Enter Name Here" -COM_COMPONENTBUILDER_FTP_NAME_HINT="Name Here" -COM_COMPONENTBUILDER_FTP_NAME_LABEL="Name" -COM_COMPONENTBUILDER_FTP_NAME_MESSAGE="Error! Please add name here." -COM_COMPONENTBUILDER_FTP_NEW="A New FTP" -COM_COMPONENTBUILDER_FTP_NOTE_FTP_SIGNATURE_DESCRIPTION="Add your FTP signature in the given field.
Here are the details of the signature:
   string $host = '127.0.0.1'
   string $port = '21'
   array $options = array()
   string $user = null
   string $pass = null
   OPTIONS = Array with any of these options:
      type=>[FTP_AUTOASCII|FTP_ASCII|FTP_BINARY]
      timeout=>(int)
Here is an example signature:
host=HOSTNAME&port=PORT_INT&options[type]=FTP_BINARY&options[timeout]=15&username=user@name.com&password=password" -COM_COMPONENTBUILDER_FTP_NOTE_FTP_SIGNATURE_LABEL="The FTP Signature Details" -COM_COMPONENTBUILDER_FTP_ORDERING_LABEL="Ordering" -COM_COMPONENTBUILDER_FTP_PERMISSION="Permissions" -COM_COMPONENTBUILDER_FTP_PUBLISHING="Publishing" -COM_COMPONENTBUILDER_FTP_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the FTP to customise the alias." -COM_COMPONENTBUILDER_FTP_SIGNATURE="Signature" -COM_COMPONENTBUILDER_FTP_SIGNATURE_DESCRIPTION="The FTP login details needed. If the basic key was not set when you created this FTP signature, then add the basic key, come back here and save this FTP signature again to ensure that it gets encrypted." -COM_COMPONENTBUILDER_FTP_SIGNATURE_HINT="host=HOSTNAME&port=PORT_INT&options[type]=FTP_BINARY&options[timeout]=15&username=user@name.com&password=password" -COM_COMPONENTBUILDER_FTP_SIGNATURE_LABEL="FTP Server (Signature)
(encrypted field)
This field is only encrypted if your basic key in the JCB global settings is set." -COM_COMPONENTBUILDER_FTP_SIGNATURE_MESSAGE="Error! Please add some text here." -COM_COMPONENTBUILDER_FTP_STATUS="Status" -COM_COMPONENTBUILDER_FTP_VERSION_DESC="A count of the number of times this FTP has been revised." -COM_COMPONENTBUILDER_FTP_VERSION_LABEL="Revision" COM_COMPONENTBUILDER_FULL_WIDTH_IN_TAB="Full Width in Tab" COM_COMPONENTBUILDER_GENERAL_OVERVIEW_OF_HOW_THINGS_WORK_BSB="General overview of how things work: %s" COM_COMPONENTBUILDER_GETTING_AVAILABLE_LIBRARIES="Getting available libraries" @@ -4035,6 +3949,7 @@ COM_COMPONENTBUILDER_HELP_DOCUMENT_VERSION_LABEL="Revision" COM_COMPONENTBUILDER_HELP_MANAGER="Help" COM_COMPONENTBUILDER_HI="Hi" COM_COMPONENTBUILDER_HIDE="Hide" +COM_COMPONENTBUILDER_HTWOCURL_NOT_FOUNDHTWOPPLEASE_SETUP_CURL_ON_YOUR_SYSTEM_OR_BCOMPONENTBUILDERB_WILL_NOT_FUNCTION_CORRECTLYP="

Curl Not Found!

Please setup curl on your system, or componentbuilder will not function correctly!

" COM_COMPONENTBUILDER_HTWODATA_IS_CORRUPTHTWOTHIS_COULD_BE_DUE_TO_BROKEN_PACKAGE="

Data is corrupt!

This could be due to broken package!" COM_COMPONENTBUILDER_HTWODATA_IS_CORRUPTHTWOTHIS_COULD_BE_DUE_TO_KEY_ERROR_OR_BROKEN_PACKAGE="

Data is corrupt!

This could be due to key error, or broken package!" COM_COMPONENTBUILDER_ICON="Icon" @@ -4074,12 +3989,12 @@ COM_COMPONENTBUILDER_IMPORT_SELECT_FILE_FOR_CUSTOM_CODES="Select the file to imp COM_COMPONENTBUILDER_IMPORT_SELECT_FILE_FOR_DYNAMIC_GETS="Select the file to import data to dynamic_gets." COM_COMPONENTBUILDER_IMPORT_SELECT_FILE_FOR_FIELDS="Select the file to import data to fields." COM_COMPONENTBUILDER_IMPORT_SELECT_FILE_FOR_FIELDTYPES="Select the file to import data to fieldtypes." -COM_COMPONENTBUILDER_IMPORT_SELECT_FILE_FOR_FTPS="Select the file to import data to ftps." 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_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." +COM_COMPONENTBUILDER_IMPORT_SELECT_FILE_FOR_SERVERS="Select the file to import data to servers." COM_COMPONENTBUILDER_IMPORT_SELECT_FILE_FOR_SITE_VIEWS="Select the file to import data to site_views." COM_COMPONENTBUILDER_IMPORT_SELECT_FILE_FOR_SNIPPETS="Select the file to import data to snippets." COM_COMPONENTBUILDER_IMPORT_SELECT_FILE_FOR_TEMPLATES="Select the file to import data to templates." @@ -4292,7 +4207,6 @@ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EXPORT_PACKAGE_LINK_HINT="http://www.examp COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EXPORT_PACKAGE_LINK_LABEL="Package Link
(to get updated package)" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EXPORT_PACKAGE_LINK_MESSAGE="Error! Please add link here." COM_COMPONENTBUILDER_JOOMLA_COMPONENT_FRONT="Front" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_FTP="FTP" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ID="Id" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_IMAGE="Image" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_IMAGE_DESCRIPTION="The component image (product box) for the dashboard and install page, must be 300px X 300px." @@ -4477,10 +4391,11 @@ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PHP_SITE_EVENT_LABEL="Global Helper Site E COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PUBLISHING="Publishing" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_README="Readme" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_README_LABEL="README.md" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_SALES_SERVER_FTP="Sales Server Ftp" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_SALES_SERVER_FTP_DESCRIPTION="Select your sales server (FTP) for this component" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_SALES_SERVER_FTP_LABEL="Sales Server (FTP)" +COM_COMPONENTBUILDER_JOOMLA_COMPONENT_SALES_SERVER="Sales Server" +COM_COMPONENTBUILDER_JOOMLA_COMPONENT_SALES_SERVER_DESCRIPTION="Select your sales server for this component" +COM_COMPONENTBUILDER_JOOMLA_COMPONENT_SALES_SERVER_LABEL="Sales Server" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Joomla Component to customise the alias." +COM_COMPONENTBUILDER_JOOMLA_COMPONENT_SERVER="Server" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_SETTINGS="Settings" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_SHORT_DESCRIPTION="Short Description" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_SHORT_DESCRIPTION_DESCRIPTION="Enter short description" @@ -4513,16 +4428,16 @@ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_TO_IGNORE_NOTE_LABEL="Repository Folders o COM_COMPONENTBUILDER_JOOMLA_COMPONENT_TRANSLATION="Translation" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_UPDATES_USED_IN_JOOMLA_UPDATER="Updates (used in Joomla updater)" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_UPDATE_SERVER="Update Server" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_UPDATE_SERVER_DESCRIPTION="Enter Update Server URL" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_UPDATE_SERVER_FTP="Update Server Ftp" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_UPDATE_SERVER_FTP_DESCRIPTION="Select your update server (FTP) for this component." -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_UPDATE_SERVER_FTP_LABEL="Update Server (FTP)" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_UPDATE_SERVER_HINT="http://www.example.com/update/component.xml" +COM_COMPONENTBUILDER_JOOMLA_COMPONENT_UPDATE_SERVER_DESCRIPTION="Select your update server for this component." COM_COMPONENTBUILDER_JOOMLA_COMPONENT_UPDATE_SERVER_LABEL="Update Server" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_UPDATE_SERVER_MESSAGE="Error! Please add url here." COM_COMPONENTBUILDER_JOOMLA_COMPONENT_UPDATE_SERVER_TARGET="Update Server Target" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_UPDATE_SERVER_TARGET_DESCRIPTION="Select the type of way you would like the update server to be set." COM_COMPONENTBUILDER_JOOMLA_COMPONENT_UPDATE_SERVER_TARGET_LABEL="Update Server Target" +COM_COMPONENTBUILDER_JOOMLA_COMPONENT_UPDATE_SERVER_URL="Update Server Url" +COM_COMPONENTBUILDER_JOOMLA_COMPONENT_UPDATE_SERVER_URL_DESCRIPTION="Enter Update Server URL" +COM_COMPONENTBUILDER_JOOMLA_COMPONENT_UPDATE_SERVER_URL_HINT="http://www.example.com/update/component.xml" +COM_COMPONENTBUILDER_JOOMLA_COMPONENT_UPDATE_SERVER_URL_LABEL="Update Server" +COM_COMPONENTBUILDER_JOOMLA_COMPONENT_UPDATE_SERVER_URL_MESSAGE="Error! Please add url here." COM_COMPONENTBUILDER_JOOMLA_COMPONENT_USE_DESCRIPTION="How should we link to this contributor." COM_COMPONENTBUILDER_JOOMLA_COMPONENT_USE_GLOBAL_VERSION="Use Global Version" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_USE_LABEL="Use" @@ -5234,6 +5149,137 @@ COM_COMPONENTBUILDER_SAVE_WARNING="The value already existed so please select an COM_COMPONENTBUILDER_SEARCHABLE="Searchable" COM_COMPONENTBUILDER_SELECT_A_SNIPPET="select a snippet" COM_COMPONENTBUILDER_SELECT_THE_COMPONENT_TO_COMPILE="Select the component to compile" +COM_COMPONENTBUILDER_SERVER="Server" +COM_COMPONENTBUILDER_SERVERS="Servers" +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_OPTIONS="Batch process the selected Servers" +COM_COMPONENTBUILDER_SERVERS_BATCH_TIP="All changes will be applied to all selected Servers" +COM_COMPONENTBUILDER_SERVERS_BATCH_USE="Servers Batch Use" +COM_COMPONENTBUILDER_SERVERS_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch servers" +COM_COMPONENTBUILDER_SERVERS_CREATE="Servers Create" +COM_COMPONENTBUILDER_SERVERS_CREATE_DESC="Allows the users in this group to create create servers" +COM_COMPONENTBUILDER_SERVERS_DASHBOARD_LIST="Servers Dashboard List" +COM_COMPONENTBUILDER_SERVERS_DASHBOARD_LIST_DESC="Allows the users in this group to update the dashboard list of the server" +COM_COMPONENTBUILDER_SERVERS_DELETE="Servers Delete" +COM_COMPONENTBUILDER_SERVERS_DELETE_DESC="Allows the users in this group to delete delete servers" +COM_COMPONENTBUILDER_SERVERS_EDIT="Servers Edit" +COM_COMPONENTBUILDER_SERVERS_EDIT_CREATED_BY="Servers Edit Created By" +COM_COMPONENTBUILDER_SERVERS_EDIT_CREATED_BY_DESC="Allows the users in this group to update the created by of the edit created by servers" +COM_COMPONENTBUILDER_SERVERS_EDIT_CREATED_DATE="Servers Edit Created Date" +COM_COMPONENTBUILDER_SERVERS_EDIT_CREATED_DATE_DESC="Allows the users in this group to update the created date of the edit created servers" +COM_COMPONENTBUILDER_SERVERS_EDIT_DESC="Allows the users in this group to edit the server" +COM_COMPONENTBUILDER_SERVERS_EDIT_OWN="Servers Edit Own" +COM_COMPONENTBUILDER_SERVERS_EDIT_OWN_DESC="Allows the users in this group to edit edit own servers created by them" +COM_COMPONENTBUILDER_SERVERS_EDIT_STATE="Servers Edit State" +COM_COMPONENTBUILDER_SERVERS_EDIT_STATE_DESC="Allows the users in this group to update the state of the server" +COM_COMPONENTBUILDER_SERVERS_EDIT_VERSION="Servers Edit Version" +COM_COMPONENTBUILDER_SERVERS_EDIT_VERSION_DESC="Allows users in this group to edit versions of version servers" +COM_COMPONENTBUILDER_SERVERS_EXPORT="Servers Export" +COM_COMPONENTBUILDER_SERVERS_EXPORT_DESC="Allows the users in this group to export export servers" +COM_COMPONENTBUILDER_SERVERS_IMPORT="Servers Import" +COM_COMPONENTBUILDER_SERVERS_IMPORT_DESC="Allows the users in this group to import import servers" +COM_COMPONENTBUILDER_SERVERS_N_ITEMS_ARCHIVED="%s Servers archived." +COM_COMPONENTBUILDER_SERVERS_N_ITEMS_ARCHIVED_1="%s Server archived." +COM_COMPONENTBUILDER_SERVERS_N_ITEMS_CHECKED_IN_0="No Server successfully checked in." +COM_COMPONENTBUILDER_SERVERS_N_ITEMS_CHECKED_IN_1="%d Server successfully checked in." +COM_COMPONENTBUILDER_SERVERS_N_ITEMS_CHECKED_IN_MORE="%d Servers successfully checked in." +COM_COMPONENTBUILDER_SERVERS_N_ITEMS_DELETED="%s Servers deleted." +COM_COMPONENTBUILDER_SERVERS_N_ITEMS_DELETED_1="%s Server deleted." +COM_COMPONENTBUILDER_SERVERS_N_ITEMS_FEATURED="%s Servers featured." +COM_COMPONENTBUILDER_SERVERS_N_ITEMS_FEATURED_1="%s Server featured." +COM_COMPONENTBUILDER_SERVERS_N_ITEMS_PUBLISHED="%s Servers published." +COM_COMPONENTBUILDER_SERVERS_N_ITEMS_PUBLISHED_1="%s Server published." +COM_COMPONENTBUILDER_SERVERS_N_ITEMS_TRASHED="%s Servers trashed." +COM_COMPONENTBUILDER_SERVERS_N_ITEMS_TRASHED_1="%s Server trashed." +COM_COMPONENTBUILDER_SERVERS_N_ITEMS_UNFEATURED="%s Servers unfeatured." +COM_COMPONENTBUILDER_SERVERS_N_ITEMS_UNFEATURED_1="%s Server unfeatured." +COM_COMPONENTBUILDER_SERVERS_N_ITEMS_UNPUBLISHED="%s Servers unpublished." +COM_COMPONENTBUILDER_SERVERS_N_ITEMS_UNPUBLISHED_1="%s Server unpublished." +COM_COMPONENTBUILDER_SERVERS_SUBMENU="Servers Submenu" +COM_COMPONENTBUILDER_SERVERS_SUBMENU_DESC="Allows the users in this group to update the submenu of the server" +COM_COMPONENTBUILDER_SERVER_AUTHENTICATION="Authentication" +COM_COMPONENTBUILDER_SERVER_AUTHENTICATION_DESCRIPTION="Select the authentication type to use with ssh." +COM_COMPONENTBUILDER_SERVER_AUTHENTICATION_LABEL="Authentication Type" +COM_COMPONENTBUILDER_SERVER_CREATED_BY_DESC="The user that created this Server." +COM_COMPONENTBUILDER_SERVER_CREATED_BY_LABEL="Created By" +COM_COMPONENTBUILDER_SERVER_CREATED_DATE_DESC="The date this Server was created." +COM_COMPONENTBUILDER_SERVER_CREATED_DATE_LABEL="Created Date" +COM_COMPONENTBUILDER_SERVER_DETAILS="Details" +COM_COMPONENTBUILDER_SERVER_EDIT="Editing the Server" +COM_COMPONENTBUILDER_SERVER_ERROR_UNIQUE_ALIAS="Another Server has the same alias." +COM_COMPONENTBUILDER_SERVER_FTP="FTP" +COM_COMPONENTBUILDER_SERVER_HOST="Host" +COM_COMPONENTBUILDER_SERVER_HOST_DESCRIPTION="Add the server host name here" +COM_COMPONENTBUILDER_SERVER_HOST_HINT="yourhost.com" +COM_COMPONENTBUILDER_SERVER_HOST_LABEL="Host
(basic encryption)" +COM_COMPONENTBUILDER_SERVER_HOST_MESSAGE="Error! Please add server host name here." +COM_COMPONENTBUILDER_SERVER_ID="Id" +COM_COMPONENTBUILDER_SERVER_LINKED_COMPONENTS="Linked Components" +COM_COMPONENTBUILDER_SERVER_MODIFIED_BY_DESC="The last user that modified this Server." +COM_COMPONENTBUILDER_SERVER_MODIFIED_BY_LABEL="Modified By" +COM_COMPONENTBUILDER_SERVER_MODIFIED_DATE_DESC="The date this Server was modified." +COM_COMPONENTBUILDER_SERVER_MODIFIED_DATE_LABEL="Modified Date" +COM_COMPONENTBUILDER_SERVER_NAME="Name" +COM_COMPONENTBUILDER_SERVER_NAME_DESCRIPTION="Enter Name Here" +COM_COMPONENTBUILDER_SERVER_NAME_HINT="Name Here" +COM_COMPONENTBUILDER_SERVER_NAME_LABEL="Name" +COM_COMPONENTBUILDER_SERVER_NAME_MESSAGE="Error! Please add name here." +COM_COMPONENTBUILDER_SERVER_NEW="A New Server" +COM_COMPONENTBUILDER_SERVER_NOTE_FTP_SIGNATURE_DESCRIPTION="Add your FTP signature in the given field.
Here are the details of the signature:
   string $host = '127.0.0.1'
   string $port = '21'
   array $options = array()
   string $user = null
   string $pass = null
   OPTIONS = Array with any of these options:
      type=>[FTP_AUTOASCII|FTP_ASCII|FTP_BINARY]
      timeout=>(int)
Here is an example signature:
host=HOSTNAME&port=PORT_INT&options[type]=FTP_BINARY&options[timeout]=15&username=user@name.com&password=password" +COM_COMPONENTBUILDER_SERVER_NOTE_FTP_SIGNATURE_LABEL="The FTP Signature Details" +COM_COMPONENTBUILDER_SERVER_NOTE_SSH_SECURITY_DESCRIPTION="Do not use this feature if you do not know exactly what you are doing! SSH is a cryptographic network protocol for operating network services securely over an unsecured network, but if not used correctly it can cause a major breach in security." +COM_COMPONENTBUILDER_SERVER_NOTE_SSH_SECURITY_LABEL="The SSH Security Cautions!" +COM_COMPONENTBUILDER_SERVER_NOT_REQUIRED="Not Required" +COM_COMPONENTBUILDER_SERVER_ORDERING_LABEL="Ordering" +COM_COMPONENTBUILDER_SERVER_PASSWORD="Password" +COM_COMPONENTBUILDER_SERVER_PASSWORD_DESCRIPTION="Enter the password." +COM_COMPONENTBUILDER_SERVER_PASSWORD_LABEL="Password
(basic encryption)" +COM_COMPONENTBUILDER_SERVER_PATH="Path" +COM_COMPONENTBUILDER_SERVER_PATH_DESCRIPTION="Set the path to the remote destination folder. The user must have write permissions to this folder." +COM_COMPONENTBUILDER_SERVER_PATH_HINT="/home/username/folder/" +COM_COMPONENTBUILDER_SERVER_PATH_LABEL="Remote Destination Folder Path
(basic encryption)" +COM_COMPONENTBUILDER_SERVER_PATH_MESSAGE="Error! Please add destination path." +COM_COMPONENTBUILDER_SERVER_PERMISSION="Permissions" +COM_COMPONENTBUILDER_SERVER_PORT="Port" +COM_COMPONENTBUILDER_SERVER_PORT_DESCRIPTION="The port number" +COM_COMPONENTBUILDER_SERVER_PORT_HINT="22" +COM_COMPONENTBUILDER_SERVER_PORT_LABEL="Port Number
(basic encryption)" +COM_COMPONENTBUILDER_SERVER_PORT_MESSAGE="Error! Please add port number here." +COM_COMPONENTBUILDER_SERVER_PRIVATE="Private" +COM_COMPONENTBUILDER_SERVER_PRIVATE_DESCRIPTION="Set the path to the private key." +COM_COMPONENTBUILDER_SERVER_PRIVATE_HINT="/home/username/.ssh/id_rsa" +COM_COMPONENTBUILDER_SERVER_PRIVATE_KEY="Private Key" +COM_COMPONENTBUILDER_SERVER_PRIVATE_LABEL="Private Key Path
(basic encryption)" +COM_COMPONENTBUILDER_SERVER_PRIVATE_MESSAGE="Error! Please add private key path." +COM_COMPONENTBUILDER_SERVER_PROTOCOL="Protocol" +COM_COMPONENTBUILDER_SERVER_PROTOCOL_DESCRIPTION="Select the protocol used to connect to this server." +COM_COMPONENTBUILDER_SERVER_PROTOCOL_LABEL="Protocol" +COM_COMPONENTBUILDER_SERVER_PUBLIC="Public" +COM_COMPONENTBUILDER_SERVER_PUBLIC_DESCRIPTION="Set the path to the public key." +COM_COMPONENTBUILDER_SERVER_PUBLIC_HINT="/home/username/.ssh/id_rsa.pub" +COM_COMPONENTBUILDER_SERVER_PUBLIC_LABEL="Public Key Path
(basic encryption)" +COM_COMPONENTBUILDER_SERVER_PUBLIC_MESSAGE="Error! Please add public key path." +COM_COMPONENTBUILDER_SERVER_PUBLISHING="Publishing" +COM_COMPONENTBUILDER_SERVER_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Server to customise the alias." +COM_COMPONENTBUILDER_SERVER_SECRET="Secret" +COM_COMPONENTBUILDER_SERVER_SECRET_DESCRIPTION="If private key file is encrypted (which it should be), the passphrase must be provided." +COM_COMPONENTBUILDER_SERVER_SECRET_LABEL="Passphrase
(basic encryption)" +COM_COMPONENTBUILDER_SERVER_SELECT_AN_OPTION="Select an option" +COM_COMPONENTBUILDER_SERVER_SIGNATURE="Signature" +COM_COMPONENTBUILDER_SERVER_SIGNATURE_DESCRIPTION="The FTP login details needed. If the basic key was not set when you created this FTP signature, then add the basic key, come back here and save this FTP signature again to ensure that it gets encrypted." +COM_COMPONENTBUILDER_SERVER_SIGNATURE_HINT="host=HOSTNAME&port=PORT_INT&options[type]=FTP_BINARY&options[timeout]=15&username=user@name.com&password=password" +COM_COMPONENTBUILDER_SERVER_SIGNATURE_LABEL="FTP Server (Signature)
(encrypted field)
This field is only encrypted if your basic key in the JCB global settings is set." +COM_COMPONENTBUILDER_SERVER_SIGNATURE_MESSAGE="Error! Please add some text here." +COM_COMPONENTBUILDER_SERVER_SSH="SSH" +COM_COMPONENTBUILDER_SERVER_STATUS="Status" +COM_COMPONENTBUILDER_SERVER_USERNAME="Username" +COM_COMPONENTBUILDER_SERVER_USERNAME_DESCRIPTION="Enter the username." +COM_COMPONENTBUILDER_SERVER_USERNAME_HINT="root" +COM_COMPONENTBUILDER_SERVER_USERNAME_LABEL="Username
(basic encryption)" +COM_COMPONENTBUILDER_SERVER_USERNAME_MESSAGE="Error! Please add the username here." +COM_COMPONENTBUILDER_SERVER_VERSION_DESC="A count of the number of times this Server has been revised." +COM_COMPONENTBUILDER_SERVER_VERSION_LABEL="Revision" COM_COMPONENTBUILDER_SHARE_SNIPPETS="Share Snippets" 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." COM_COMPONENTBUILDER_SHOULD_THE_COMPONENT_BE_MOVED_TO_YOUR_LOCAL_REPOSITORY_FOLDER="Should the component be moved to your local repository folder?" @@ -5909,7 +5955,6 @@ COM_COMPONENTBUILDER_SUBMENU_DASHBOARD="Dashboard" COM_COMPONENTBUILDER_SUBMENU_DYNAMIC_GETS="Dynamic Gets" COM_COMPONENTBUILDER_SUBMENU_FIELDS="Fields" COM_COMPONENTBUILDER_SUBMENU_FIELDTYPES="Fieldtypes" -COM_COMPONENTBUILDER_SUBMENU_FTPS="FTP's" COM_COMPONENTBUILDER_SUBMENU_GET_SNIPPETS="Get Snippets" COM_COMPONENTBUILDER_SUBMENU_HELP_DOCUMENTS="Help Documents" COM_COMPONENTBUILDER_SUBMENU_JOOMLA_COMPONENTS="Joomla Components" @@ -5917,6 +5962,7 @@ COM_COMPONENTBUILDER_SUBMENU_LANGUAGES="Languages" COM_COMPONENTBUILDER_SUBMENU_LANGUAGE_TRANSLATIONS="Language Translations" COM_COMPONENTBUILDER_SUBMENU_LAYOUTS="Layouts" COM_COMPONENTBUILDER_SUBMENU_LIBRARIES="Libraries" +COM_COMPONENTBUILDER_SUBMENU_SERVERS="Servers" COM_COMPONENTBUILDER_SUBMENU_SITE_VIEWS="Site Views" COM_COMPONENTBUILDER_SUBMENU_SNIPPETS="Snippets" COM_COMPONENTBUILDER_SUBMENU_TEMPLATES="Templates" 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 558ce49a2..4c001d1ce 100644 --- a/admin/language/en-GB/en-GB.com_componentbuilder.sys.ini +++ b/admin/language/en-GB/en-GB.com_componentbuilder.sys.ini @@ -408,38 +408,6 @@ COM_COMPONENTBUILDER_FIELDTYPES_IMPORT="Fieldtypes Import" COM_COMPONENTBUILDER_FIELDTYPES_IMPORT_DESC="Allows the users in this group to import import fieldtypes" COM_COMPONENTBUILDER_FIELDTYPES_SUBMENU="Fieldtypes Submenu" COM_COMPONENTBUILDER_FIELDTYPES_SUBMENU_DESC="Allows the users in this group to update the submenu of the fieldtype" -COM_COMPONENTBUILDER_FTPS_ACCESS="Ftps Access" -COM_COMPONENTBUILDER_FTPS_ACCESS_DESC="Allows the users in this group to access access ftps" -COM_COMPONENTBUILDER_FTPS_BATCH_USE="Ftps Batch Use" -COM_COMPONENTBUILDER_FTPS_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch ftps" -COM_COMPONENTBUILDER_FTPS_CREATE="Ftps Create" -COM_COMPONENTBUILDER_FTPS_CREATE_DESC="Allows the users in this group to create create ftps" -COM_COMPONENTBUILDER_FTPS_DASHBOARD_LIST="Ftps Dashboard List" -COM_COMPONENTBUILDER_FTPS_DASHBOARD_LIST_DESC="Allows the users in this group to update the dashboard list of the ftp" -COM_COMPONENTBUILDER_FTPS_DELETE="Ftps Delete" -COM_COMPONENTBUILDER_FTPS_DELETE_DESC="Allows the users in this group to delete delete ftps" -COM_COMPONENTBUILDER_FTPS_EDIT="Ftps Edit" -COM_COMPONENTBUILDER_FTPS_EDIT_CREATED_BY="Ftps Edit Created By" -COM_COMPONENTBUILDER_FTPS_EDIT_CREATED_BY_DESC="Allows the users in this group to update the created by of the edit created by ftps" -COM_COMPONENTBUILDER_FTPS_EDIT_CREATED_DATE="Ftps Edit Created Date" -COM_COMPONENTBUILDER_FTPS_EDIT_CREATED_DATE_DESC="Allows the users in this group to update the created date of the edit created ftps" -COM_COMPONENTBUILDER_FTPS_EDIT_DESC="Allows the users in this group to edit the ftp" -COM_COMPONENTBUILDER_FTPS_EDIT_NAME="Ftps Edit Name" -COM_COMPONENTBUILDER_FTPS_EDIT_NAME_DESC="Allows the users in this group to update the edit name of the ftp" -COM_COMPONENTBUILDER_FTPS_EDIT_OWN="Ftps Edit Own" -COM_COMPONENTBUILDER_FTPS_EDIT_OWN_DESC="Allows the users in this group to edit edit own ftps created by them" -COM_COMPONENTBUILDER_FTPS_EDIT_SIGNATURE="Ftps Edit Signature" -COM_COMPONENTBUILDER_FTPS_EDIT_SIGNATURE_DESC="Allows the users in this group to update the edit signature of the ftp" -COM_COMPONENTBUILDER_FTPS_EDIT_STATE="Ftps Edit State" -COM_COMPONENTBUILDER_FTPS_EDIT_STATE_DESC="Allows the users in this group to update the state of the ftp" -COM_COMPONENTBUILDER_FTPS_EDIT_VERSION="Ftps Edit Version" -COM_COMPONENTBUILDER_FTPS_EDIT_VERSION_DESC="Allows users in this group to edit versions of version ftps" -COM_COMPONENTBUILDER_FTPS_EXPORT="Ftps Export" -COM_COMPONENTBUILDER_FTPS_EXPORT_DESC="Allows the users in this group to export export ftps" -COM_COMPONENTBUILDER_FTPS_IMPORT="Ftps Import" -COM_COMPONENTBUILDER_FTPS_IMPORT_DESC="Allows the users in this group to import import ftps" -COM_COMPONENTBUILDER_FTPS_SUBMENU="Ftps Submenu" -COM_COMPONENTBUILDER_FTPS_SUBMENU_DESC="Allows the users in this group to update the submenu of the ftp" COM_COMPONENTBUILDER_GET_SNIPPETS_ACCESS="Get Snippets Access" COM_COMPONENTBUILDER_GET_SNIPPETS_ACCESS_DESC=" Allows the users in this group to access get snippets." COM_COMPONENTBUILDER_GET_SNIPPETS_CUSTOM_ADMIN_VIEWS_BUTTON_ACCESS="Get Snippets Custom Admin Views Button Access" @@ -666,6 +634,34 @@ COM_COMPONENTBUILDER_MENU_LIBRARIES="Libraries" COM_COMPONENTBUILDER_MENU_SITE_VIEWS="Site Views" COM_COMPONENTBUILDER_MENU_SNIPPETS="Snippets" COM_COMPONENTBUILDER_MENU_TEMPLATES="Templates" +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" +COM_COMPONENTBUILDER_SERVERS_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch servers" +COM_COMPONENTBUILDER_SERVERS_CREATE="Servers Create" +COM_COMPONENTBUILDER_SERVERS_CREATE_DESC="Allows the users in this group to create create servers" +COM_COMPONENTBUILDER_SERVERS_DASHBOARD_LIST="Servers Dashboard List" +COM_COMPONENTBUILDER_SERVERS_DASHBOARD_LIST_DESC="Allows the users in this group to update the dashboard list of the server" +COM_COMPONENTBUILDER_SERVERS_DELETE="Servers Delete" +COM_COMPONENTBUILDER_SERVERS_DELETE_DESC="Allows the users in this group to delete delete servers" +COM_COMPONENTBUILDER_SERVERS_EDIT="Servers Edit" +COM_COMPONENTBUILDER_SERVERS_EDIT_CREATED_BY="Servers Edit Created By" +COM_COMPONENTBUILDER_SERVERS_EDIT_CREATED_BY_DESC="Allows the users in this group to update the created by of the edit created by servers" +COM_COMPONENTBUILDER_SERVERS_EDIT_CREATED_DATE="Servers Edit Created Date" +COM_COMPONENTBUILDER_SERVERS_EDIT_CREATED_DATE_DESC="Allows the users in this group to update the created date of the edit created servers" +COM_COMPONENTBUILDER_SERVERS_EDIT_DESC="Allows the users in this group to edit the server" +COM_COMPONENTBUILDER_SERVERS_EDIT_OWN="Servers Edit Own" +COM_COMPONENTBUILDER_SERVERS_EDIT_OWN_DESC="Allows the users in this group to edit edit own servers created by them" +COM_COMPONENTBUILDER_SERVERS_EDIT_STATE="Servers Edit State" +COM_COMPONENTBUILDER_SERVERS_EDIT_STATE_DESC="Allows the users in this group to update the state of the server" +COM_COMPONENTBUILDER_SERVERS_EDIT_VERSION="Servers Edit Version" +COM_COMPONENTBUILDER_SERVERS_EDIT_VERSION_DESC="Allows users in this group to edit versions of version servers" +COM_COMPONENTBUILDER_SERVERS_EXPORT="Servers Export" +COM_COMPONENTBUILDER_SERVERS_EXPORT_DESC="Allows the users in this group to export export servers" +COM_COMPONENTBUILDER_SERVERS_IMPORT="Servers Import" +COM_COMPONENTBUILDER_SERVERS_IMPORT_DESC="Allows the users in this group to import import servers" +COM_COMPONENTBUILDER_SERVERS_SUBMENU="Servers Submenu" +COM_COMPONENTBUILDER_SERVERS_SUBMENU_DESC="Allows the users in this group to update the submenu of the server" COM_COMPONENTBUILDER_SITE_VIEWS_ACCESS="Site Views Access" COM_COMPONENTBUILDER_SITE_VIEWS_ACCESS_DESC="Allows the users in this group to access access site views" COM_COMPONENTBUILDER_SITE_VIEWS_BATCH_USE="Site Views Batch Use" diff --git a/admin/layouts/joomla_component/dynamic_integration_fullwidth.php b/admin/layouts/joomla_component/dynamic_integration_fullwidth.php index 45e699f90..cd681f93d 100644 --- a/admin/layouts/joomla_component/dynamic_integration_fullwidth.php +++ b/admin/layouts/joomla_component/dynamic_integration_fullwidth.php @@ -31,14 +31,14 @@ $form = $displayData->getForm(); $fields = $displayData->get('fields') ?: array( 'add_update_server', - 'update_server', + 'update_server_url', 'update_server_target', 'note_update_server_note_ftp', 'note_update_server_note_zip', 'note_update_server_note_other', - 'update_server_ftp', + 'update_server', 'add_sales_server', - 'sales_server_ftp' + 'sales_server' ); ?> diff --git a/admin/layouts/ftp/details_above.php b/admin/layouts/server/details_above.php similarity index 97% rename from admin/layouts/ftp/details_above.php rename to admin/layouts/server/details_above.php index fda8f1726..258ec2c2b 100644 --- a/admin/layouts/ftp/details_above.php +++ b/admin/layouts/server/details_above.php @@ -30,7 +30,8 @@ defined('_JEXEC') or die('Restricted access'); $form = $displayData->getForm(); $fields = array( - 'name' + 'name', + 'protocol' ); ?> diff --git a/admin/layouts/ftp/details_fullwidth.php b/admin/layouts/server/details_fullwidth.php similarity index 95% rename from admin/layouts/ftp/details_fullwidth.php rename to admin/layouts/server/details_fullwidth.php index e88c1c962..bfc32694e 100644 --- a/admin/layouts/ftp/details_fullwidth.php +++ b/admin/layouts/server/details_fullwidth.php @@ -31,7 +31,9 @@ $form = $displayData->getForm(); $fields = $displayData->get('fields') ?: array( 'note_ftp_signature', - 'signature' + 'signature', + 'note_ssh_security', + 'not_required' ); ?> diff --git a/admin/models/forms/ftp.js b/admin/layouts/server/details_left.php similarity index 73% rename from admin/models/forms/ftp.js rename to admin/layouts/server/details_left.php index a2921281f..27d4e3f50 100644 --- a/admin/models/forms/ftp.js +++ b/admin/layouts/server/details_left.php @@ -1,3 +1,4 @@ + @github Joomla Component Builder @copyright Copyright (C) 2015. All Rights Reserved @@ -22,4 +23,35 @@ /-----------------------------------------------------------------------------------------------------------------------------*/ - +// No direct access to this file + +defined('_JEXEC') or die('Restricted access'); + +$form = $displayData->getForm(); + +$fields = $displayData->get('fields') ?: array( + 'username', + 'host', + 'port', + 'path' +); + +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + +foreach ($fields as $field) +{ + $field = is_array($field) ? $field : array($field); + foreach ($field as $f) + { + if ($form->getField($f)) + { + if (in_array($f, $hiddenFields)) + { + $form->setFieldAttribute($f, 'type', 'hidden'); + } + + echo $form->renderField($f); + break; + } + } +} diff --git a/admin/layouts/server/details_right.php b/admin/layouts/server/details_right.php new file mode 100644 index 000000000..6814f6bcc --- /dev/null +++ b/admin/layouts/server/details_right.php @@ -0,0 +1,58 @@ + + @github Joomla Component Builder + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file + +defined('_JEXEC') or die('Restricted access'); + +$form = $displayData->getForm(); + +$fields = $displayData->get('fields') ?: array( + 'authentication', + 'password', + 'private', + 'public', + 'secret' +); + +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + +foreach ($fields as $field) +{ + $field = is_array($field) ? $field : array($field); + foreach ($field as $f) + { + if ($form->getField($f)) + { + if (in_array($f, $hiddenFields)) + { + $form->setFieldAttribute($f, 'type', 'hidden'); + } + + echo $form->renderField($f); + break; + } + } +} diff --git a/admin/layouts/ftp/index.html b/admin/layouts/server/index.html similarity index 100% rename from admin/layouts/ftp/index.html rename to admin/layouts/server/index.html diff --git a/admin/layouts/ftp/linked_components_fullwidth.php b/admin/layouts/server/linked_components_fullwidth.php similarity index 97% rename from admin/layouts/ftp/linked_components_fullwidth.php rename to admin/layouts/server/linked_components_fullwidth.php index ad21cc25e..5a27bff4c 100644 --- a/admin/layouts/ftp/linked_components_fullwidth.php +++ b/admin/layouts/server/linked_components_fullwidth.php @@ -28,7 +28,7 @@ defined('_JEXEC') or die('Restricted access'); // set the defaults -$items = $displayData->waelinked_components; +$items = $displayData->waplinked_components; $user = JFactory::getUser(); $id = $displayData->item->id; $edit = "index.php?option=com_componentbuilder&view=joomla_components&task=joomla_component.edit"; @@ -75,7 +75,7 @@ $edit = "index.php?option=com_componentbuilder&view=joomla_components&task=jooml get('joomla_component.edit')): ?> - escape($item->system_name); ?> + escape($item->system_name); ?> checked_out): ?> name, $item->checked_out_time, 'joomla_components.', $canCheckin); ?> diff --git a/admin/layouts/ftp/publishing.php b/admin/layouts/server/publishing.php similarity index 100% rename from admin/layouts/ftp/publishing.php rename to admin/layouts/server/publishing.php diff --git a/admin/layouts/ftp/publlshing.php b/admin/layouts/server/publlshing.php similarity index 100% rename from admin/layouts/ftp/publlshing.php rename to admin/layouts/server/publlshing.php diff --git a/admin/models/componentbuilder.php b/admin/models/componentbuilder.php index 2cf552ad1..8c307c3a2 100644 --- a/admin/models/componentbuilder.php +++ b/admin/models/componentbuilder.php @@ -43,7 +43,7 @@ class ComponentbuilderModelComponentbuilder extends JModelList $icons = array(); // view groups array $viewGroups = array( - 'main' => array('png.compiler', 'png.joomla_component.add', 'png.joomla_components', '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.layout.add', 'png.layouts', 'png.dynamic_get.add', 'png.dynamic_gets', 'png.custom_codes', 'png.libraries', 'png.snippet.add', 'png.snippets', 'png.field.add', 'png.fields', 'png.fields.catid', 'png.fieldtype.add', 'png.fieldtypes', 'png.fieldtypes.catid', 'png.language_translations', 'png.ftps', 'png.help_document.add', 'png.help_documents') + 'main' => array('png.compiler', 'png.joomla_component.add', 'png.joomla_components', '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.layout.add', 'png.layouts', 'png.dynamic_get.add', 'png.dynamic_gets', 'png.custom_codes', 'png.libraries', 'png.snippet.add', 'png.snippets', 'png.field.add', 'png.fields', 'png.fields.catid', 'png.fieldtype.add', 'png.fieldtypes', 'png.fieldtypes.catid', 'png.language_translations', 'png.servers', 'png.help_document.add', 'png.help_documents') ); // view access array $viewAccess = array( @@ -123,11 +123,11 @@ class ComponentbuilderModelComponentbuilder extends JModelList 'languages.access' => 'language.access', 'language.access' => 'language.access', 'languages.submenu' => 'language.submenu', - 'ftp.create' => 'ftp.create', - 'ftps.access' => 'ftp.access', - 'ftp.access' => 'ftp.access', - 'ftps.submenu' => 'ftp.submenu', - 'ftps.dashboard_list' => 'ftp.dashboard_list', + 'server.create' => 'server.create', + 'servers.access' => 'server.access', + 'server.access' => 'server.access', + 'servers.submenu' => 'server.submenu', + 'servers.dashboard_list' => 'server.dashboard_list', 'help_document.create' => 'help_document.create', 'help_documents.access' => 'help_document.access', 'help_document.access' => 'help_document.access', diff --git a/admin/models/fields/ftps.php b/admin/models/fields/servers.php similarity index 83% rename from admin/models/fields/ftps.php rename to admin/models/fields/servers.php index ce323628c..feb95aa29 100644 --- a/admin/models/fields/ftps.php +++ b/admin/models/fields/servers.php @@ -13,7 +13,7 @@ @version 2.6.x @created 30th April, 2015 @package Component Builder - @subpackage ftps.php + @subpackage servers.php @author Llewellyn van der Merwe @github Joomla Component Builder @copyright Copyright (C) 2015. All Rights Reserved @@ -31,16 +31,16 @@ jimport('joomla.form.helper'); JFormHelper::loadFieldClass('list'); /** - * Ftps Form Field class for the Componentbuilder component + * Servers Form Field class for the Componentbuilder component */ -class JFormFieldFtps extends JFormFieldList +class JFormFieldServers extends JFormFieldList { /** - * The ftps field type. + * The servers field type. * * @var string */ - public $type = 'ftps'; + public $type = 'servers'; /** * Override to add new button * @@ -78,8 +78,8 @@ class JFormFieldFtps extends JFormFieldList $refJ = '&ref=' . $values['view'] . '&refid=' . $values['id']; } $user = JFactory::getUser(); - // only add if user allowed to create ftp - if ($user->authorise('ftp.create', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area. + // only add if user allowed to create server + if ($user->authorise('server.create', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area. { // build Create button $buttonNamee = trim($buttonName); @@ -88,11 +88,11 @@ class JFormFieldFtps extends JFormFieldList $buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee); $buttonNamee = ucfirst(strtolower($buttonNamee)); $button[] = ' + href="index.php?option=com_componentbuilder&view=server&layout=edit'.$ref.'" > '; } - // only add if user allowed to edit ftp - if (($buttonName === 'ftp' || $buttonName === 'ftps') && $user->authorise('ftp.edit', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area. + // only add if user allowed to edit server + if (($buttonName === 'server' || $buttonName === 'servers') && $user->authorise('server.edit', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area. { // build edit button $buttonNamee = trim($buttonName); @@ -119,7 +119,7 @@ class JFormFieldFtps extends JFormFieldList jQuery('#".$buttonName."Create').hide(); // show edit button jQuery('#".$buttonName."Edit').show(); - var url = 'index.php?option=com_componentbuilder&view=ftps&task=ftp.edit&id='+value+'".$refJ."'; + var url = 'index.php?option=com_componentbuilder&view=servers&task=server.edit&id='+value+'".$refJ."'; jQuery('#".$buttonName."Edit').attr('href', url); } else { // show the create button @@ -129,7 +129,7 @@ class JFormFieldFtps extends JFormFieldList } }"; } - // check if button was created for ftp field. + // check if button was created for server field. if (is_array($button) && count($button) > 0) { // Load the needed script. @@ -151,8 +151,8 @@ class JFormFieldFtps extends JFormFieldList { $db = JFactory::getDBO(); $query = $db->getQuery(true); - $query->select($db->quoteName(array('a.id','a.name'),array('id','update_server_ftp_name'))); - $query->from($db->quoteName('#__componentbuilder_ftp', 'a')); + $query->select($db->quoteName(array('a.id','a.name','a.protocol'),array('id','update_server_name', 'protocol'))); + $query->from($db->quoteName('#__componentbuilder_server', 'a')); $query->where($db->quoteName('a.published') . ' >= 1'); $query->order('a.name ASC'); $db->setQuery((string)$query); @@ -163,7 +163,8 @@ class JFormFieldFtps extends JFormFieldList $options[] = JHtml::_('select.option', '', 'Select an option'); foreach($items as $item) { - $options[] = JHtml::_('select.option', $item->id, $item->update_server_ftp_name); + $item->protocol = ($item->protocol == 2) ? JText::_('SSH') : JText::_('FTP'); + $options[] = JHtml::_('select.option', $item->id, $item->update_server_name.' ['.$item->protocol.']'); } } return $options; diff --git a/admin/models/forms/ftp.xml b/admin/models/forms/ftp.xml deleted file mode 100644 index e82c0dfca..000000000 --- a/admin/models/forms/ftp.xml +++ /dev/null @@ -1,139 +0,0 @@ - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - -
- - - - -
-
\ No newline at end of file diff --git a/admin/models/forms/help_document.js b/admin/models/forms/help_document.js index 6702fea58..fb2bd54da 100644 --- a/admin/models/forms/help_document.js +++ b/admin/models/forms/help_document.js @@ -23,289 +23,289 @@ /-----------------------------------------------------------------------------------------------------------------------------*/ // Some Global Values -jform_vvvvwatwaf_required = false; -jform_vvvvwauwag_required = false; -jform_vvvvwavwah_required = false; -jform_vvvvwawwai_required = false; -jform_vvvvwaxwaj_required = false; -jform_vvvvwaywak_required = false; +jform_vvvvwazwaq_required = false; +jform_vvvvwbawar_required = false; +jform_vvvvwbbwas_required = false; +jform_vvvvwbcwat_required = false; +jform_vvvvwbdwau_required = false; +jform_vvvvwbewav_required = false; // Initial Script jQuery(document).ready(function() { - var location_vvvvwat = jQuery("#jform_location input[type='radio']:checked").val(); - vvvvwat(location_vvvvwat); + var location_vvvvwaz = jQuery("#jform_location input[type='radio']:checked").val(); + vvvvwaz(location_vvvvwaz); - var location_vvvvwau = jQuery("#jform_location input[type='radio']:checked").val(); - vvvvwau(location_vvvvwau); + var location_vvvvwba = jQuery("#jform_location input[type='radio']:checked").val(); + vvvvwba(location_vvvvwba); - var type_vvvvwav = jQuery("#jform_type").val(); - vvvvwav(type_vvvvwav); + var type_vvvvwbb = jQuery("#jform_type").val(); + vvvvwbb(type_vvvvwbb); - var type_vvvvwaw = jQuery("#jform_type").val(); - vvvvwaw(type_vvvvwaw); + var type_vvvvwbc = jQuery("#jform_type").val(); + vvvvwbc(type_vvvvwbc); - var type_vvvvwax = jQuery("#jform_type").val(); - vvvvwax(type_vvvvwax); + var type_vvvvwbd = jQuery("#jform_type").val(); + vvvvwbd(type_vvvvwbd); - var target_vvvvway = jQuery("#jform_target input[type='radio']:checked").val(); - vvvvway(target_vvvvway); + var target_vvvvwbe = jQuery("#jform_target input[type='radio']:checked").val(); + vvvvwbe(target_vvvvwbe); }); -// the vvvvwat function -function vvvvwat(location_vvvvwat) +// the vvvvwaz function +function vvvvwaz(location_vvvvwaz) { // set the function logic - if (location_vvvvwat == 1) + if (location_vvvvwaz == 1) { jQuery('#jform_admin_view').closest('.control-group').show(); - if (jform_vvvvwatwaf_required) + if (jform_vvvvwazwaq_required) { updateFieldRequired('admin_view',0); jQuery('#jform_admin_view').prop('required','required'); jQuery('#jform_admin_view').attr('aria-required',true); jQuery('#jform_admin_view').addClass('required'); - jform_vvvvwatwaf_required = false; + jform_vvvvwazwaq_required = false; } } else { jQuery('#jform_admin_view').closest('.control-group').hide(); - if (!jform_vvvvwatwaf_required) + if (!jform_vvvvwazwaq_required) { updateFieldRequired('admin_view',1); jQuery('#jform_admin_view').removeAttr('required'); jQuery('#jform_admin_view').removeAttr('aria-required'); jQuery('#jform_admin_view').removeClass('required'); - jform_vvvvwatwaf_required = true; + jform_vvvvwazwaq_required = true; } } } -// the vvvvwau function -function vvvvwau(location_vvvvwau) +// the vvvvwba function +function vvvvwba(location_vvvvwba) { // set the function logic - if (location_vvvvwau == 2) + if (location_vvvvwba == 2) { jQuery('#jform_site_view').closest('.control-group').show(); - if (jform_vvvvwauwag_required) + if (jform_vvvvwbawar_required) { updateFieldRequired('site_view',0); jQuery('#jform_site_view').prop('required','required'); jQuery('#jform_site_view').attr('aria-required',true); jQuery('#jform_site_view').addClass('required'); - jform_vvvvwauwag_required = false; + jform_vvvvwbawar_required = false; } } else { jQuery('#jform_site_view').closest('.control-group').hide(); - if (!jform_vvvvwauwag_required) + if (!jform_vvvvwbawar_required) { updateFieldRequired('site_view',1); jQuery('#jform_site_view').removeAttr('required'); jQuery('#jform_site_view').removeAttr('aria-required'); jQuery('#jform_site_view').removeClass('required'); - jform_vvvvwauwag_required = true; + jform_vvvvwbawar_required = true; } } } -// the vvvvwav function -function vvvvwav(type_vvvvwav) +// the vvvvwbb function +function vvvvwbb(type_vvvvwbb) { - if (isSet(type_vvvvwav) && type_vvvvwav.constructor !== Array) + if (isSet(type_vvvvwbb) && type_vvvvwbb.constructor !== Array) { - var temp_vvvvwav = type_vvvvwav; - var type_vvvvwav = []; - type_vvvvwav.push(temp_vvvvwav); + var temp_vvvvwbb = type_vvvvwbb; + var type_vvvvwbb = []; + type_vvvvwbb.push(temp_vvvvwbb); } - else if (!isSet(type_vvvvwav)) + else if (!isSet(type_vvvvwbb)) { - var type_vvvvwav = []; + var type_vvvvwbb = []; } - var type = type_vvvvwav.some(type_vvvvwav_SomeFunc); + var type = type_vvvvwbb.some(type_vvvvwbb_SomeFunc); // set this function logic if (type) { jQuery('#jform_url').closest('.control-group').show(); - if (jform_vvvvwavwah_required) + if (jform_vvvvwbbwas_required) { updateFieldRequired('url',0); jQuery('#jform_url').prop('required','required'); jQuery('#jform_url').attr('aria-required',true); jQuery('#jform_url').addClass('required'); - jform_vvvvwavwah_required = false; + jform_vvvvwbbwas_required = false; } } else { jQuery('#jform_url').closest('.control-group').hide(); - if (!jform_vvvvwavwah_required) + if (!jform_vvvvwbbwas_required) { updateFieldRequired('url',1); jQuery('#jform_url').removeAttr('required'); jQuery('#jform_url').removeAttr('aria-required'); jQuery('#jform_url').removeClass('required'); - jform_vvvvwavwah_required = true; + jform_vvvvwbbwas_required = true; } } } -// the vvvvwav Some function -function type_vvvvwav_SomeFunc(type_vvvvwav) +// the vvvvwbb Some function +function type_vvvvwbb_SomeFunc(type_vvvvwbb) { // set the function logic - if (type_vvvvwav == 3) + if (type_vvvvwbb == 3) { return true; } return false; } -// the vvvvwaw function -function vvvvwaw(type_vvvvwaw) +// the vvvvwbc function +function vvvvwbc(type_vvvvwbc) { - if (isSet(type_vvvvwaw) && type_vvvvwaw.constructor !== Array) + if (isSet(type_vvvvwbc) && type_vvvvwbc.constructor !== Array) { - var temp_vvvvwaw = type_vvvvwaw; - var type_vvvvwaw = []; - type_vvvvwaw.push(temp_vvvvwaw); + var temp_vvvvwbc = type_vvvvwbc; + var type_vvvvwbc = []; + type_vvvvwbc.push(temp_vvvvwbc); } - else if (!isSet(type_vvvvwaw)) + else if (!isSet(type_vvvvwbc)) { - var type_vvvvwaw = []; + var type_vvvvwbc = []; } - var type = type_vvvvwaw.some(type_vvvvwaw_SomeFunc); + var type = type_vvvvwbc.some(type_vvvvwbc_SomeFunc); // set this function logic if (type) { jQuery('#jform_article').closest('.control-group').show(); - if (jform_vvvvwawwai_required) + if (jform_vvvvwbcwat_required) { updateFieldRequired('article',0); jQuery('#jform_article').prop('required','required'); jQuery('#jform_article').attr('aria-required',true); jQuery('#jform_article').addClass('required'); - jform_vvvvwawwai_required = false; + jform_vvvvwbcwat_required = false; } } else { jQuery('#jform_article').closest('.control-group').hide(); - if (!jform_vvvvwawwai_required) + if (!jform_vvvvwbcwat_required) { updateFieldRequired('article',1); jQuery('#jform_article').removeAttr('required'); jQuery('#jform_article').removeAttr('aria-required'); jQuery('#jform_article').removeClass('required'); - jform_vvvvwawwai_required = true; + jform_vvvvwbcwat_required = true; } } } -// the vvvvwaw Some function -function type_vvvvwaw_SomeFunc(type_vvvvwaw) +// the vvvvwbc Some function +function type_vvvvwbc_SomeFunc(type_vvvvwbc) { // set the function logic - if (type_vvvvwaw == 1) + if (type_vvvvwbc == 1) { return true; } return false; } -// the vvvvwax function -function vvvvwax(type_vvvvwax) +// the vvvvwbd function +function vvvvwbd(type_vvvvwbd) { - if (isSet(type_vvvvwax) && type_vvvvwax.constructor !== Array) + if (isSet(type_vvvvwbd) && type_vvvvwbd.constructor !== Array) { - var temp_vvvvwax = type_vvvvwax; - var type_vvvvwax = []; - type_vvvvwax.push(temp_vvvvwax); + var temp_vvvvwbd = type_vvvvwbd; + var type_vvvvwbd = []; + type_vvvvwbd.push(temp_vvvvwbd); } - else if (!isSet(type_vvvvwax)) + else if (!isSet(type_vvvvwbd)) { - var type_vvvvwax = []; + var type_vvvvwbd = []; } - var type = type_vvvvwax.some(type_vvvvwax_SomeFunc); + var type = type_vvvvwbd.some(type_vvvvwbd_SomeFunc); // set this function logic if (type) { jQuery('#jform_content-lbl').closest('.control-group').show(); - if (jform_vvvvwaxwaj_required) + if (jform_vvvvwbdwau_required) { updateFieldRequired('content',0); jQuery('#jform_content').prop('required','required'); jQuery('#jform_content').attr('aria-required',true); jQuery('#jform_content').addClass('required'); - jform_vvvvwaxwaj_required = false; + jform_vvvvwbdwau_required = false; } } else { jQuery('#jform_content-lbl').closest('.control-group').hide(); - if (!jform_vvvvwaxwaj_required) + if (!jform_vvvvwbdwau_required) { updateFieldRequired('content',1); jQuery('#jform_content').removeAttr('required'); jQuery('#jform_content').removeAttr('aria-required'); jQuery('#jform_content').removeClass('required'); - jform_vvvvwaxwaj_required = true; + jform_vvvvwbdwau_required = true; } } } -// the vvvvwax Some function -function type_vvvvwax_SomeFunc(type_vvvvwax) +// the vvvvwbd Some function +function type_vvvvwbd_SomeFunc(type_vvvvwbd) { // set the function logic - if (type_vvvvwax == 2) + if (type_vvvvwbd == 2) { return true; } return false; } -// the vvvvway function -function vvvvway(target_vvvvway) +// the vvvvwbe function +function vvvvwbe(target_vvvvwbe) { // set the function logic - if (target_vvvvway == 1) + if (target_vvvvwbe == 1) { jQuery('#jform_groups').closest('.control-group').show(); - if (jform_vvvvwaywak_required) + if (jform_vvvvwbewav_required) { updateFieldRequired('groups',0); jQuery('#jform_groups').prop('required','required'); jQuery('#jform_groups').attr('aria-required',true); jQuery('#jform_groups').addClass('required'); - jform_vvvvwaywak_required = false; + jform_vvvvwbewav_required = false; } } else { jQuery('#jform_groups').closest('.control-group').hide(); - if (!jform_vvvvwaywak_required) + if (!jform_vvvvwbewav_required) { updateFieldRequired('groups',1); jQuery('#jform_groups').removeAttr('required'); jQuery('#jform_groups').removeAttr('aria-required'); jQuery('#jform_groups').removeClass('required'); - jform_vvvvwaywak_required = true; + jform_vvvvwbewav_required = true; } } } diff --git a/admin/models/forms/joomla_component.js b/admin/models/forms/joomla_component.js index efa0011d5..a46843aa4 100644 --- a/admin/models/forms/joomla_component.js +++ b/admin/models/forms/joomla_component.js @@ -491,11 +491,11 @@ function vvvvvwh(add_update_server_vvvvvwh) // set the function logic if (add_update_server_vvvvvwh == 1) { - jQuery('#jform_update_server').closest('.control-group').show(); + jQuery('#jform_update_server_url').closest('.control-group').show(); } else { - jQuery('#jform_update_server').closest('.control-group').hide(); + jQuery('#jform_update_server_url').closest('.control-group').hide(); } } @@ -505,11 +505,11 @@ function vvvvvwi(add_sales_server_vvvvvwi) // set the function logic if (add_sales_server_vvvvvwi == 1) { - jQuery('#jform_sales_server_ftp').closest('.control-group').show(); + jQuery('#jform_sales_server').closest('.control-group').show(); } else { - jQuery('#jform_sales_server_ftp').closest('.control-group').hide(); + jQuery('#jform_sales_server').closest('.control-group').hide(); } } @@ -692,12 +692,12 @@ function vvvvvwp(update_server_target_vvvvvwp,add_update_server_vvvvvwp) // set the function logic if (update_server_target_vvvvvwp == 1 && add_update_server_vvvvvwp == 1) { - jQuery('#jform_update_server_ftp').closest('.control-group').show(); + jQuery('#jform_update_server').closest('.control-group').show(); jQuery('.note_update_server_note_ftp').closest('.control-group').show(); } else { - jQuery('#jform_update_server_ftp').closest('.control-group').hide(); + jQuery('#jform_update_server').closest('.control-group').hide(); jQuery('.note_update_server_note_ftp').closest('.control-group').hide(); } } @@ -708,12 +708,12 @@ function vvvvvwq(add_update_server_vvvvvwq,update_server_target_vvvvvwq) // set the function logic if (add_update_server_vvvvvwq == 1 && update_server_target_vvvvvwq == 1) { - jQuery('#jform_update_server_ftp').closest('.control-group').show(); + jQuery('#jform_update_server').closest('.control-group').show(); jQuery('.note_update_server_note_ftp').closest('.control-group').show(); } else { - jQuery('#jform_update_server_ftp').closest('.control-group').hide(); + jQuery('#jform_update_server').closest('.control-group').hide(); jQuery('.note_update_server_note_ftp').closest('.control-group').hide(); } } diff --git a/admin/models/forms/joomla_component.xml b/admin/models/forms/joomla_component.xml index ff5c295e3..595374cb3 100644 --- a/admin/models/forms/joomla_component.xml +++ b/admin/models/forms/joomla_component.xml @@ -247,11 +247,11 @@ class="text_area span12" filter="HTML" hint="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_DESCRIPTION_HINT" /> - - + - + @@ -615,11 +615,11 @@ - - + COM_COMPONENTBUILDER_JOOMLA_COMPONENT_YES - + + message="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_UPDATE_SERVER_URL_MESSAGE" + hint="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_UPDATE_SERVER_URL_HINT" /> + @github Joomla Component Builder + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// Some Global Values +jform_vvvvwatwae_required = false; +jform_vvvvwatwaf_required = false; +jform_vvvvwatwag_required = false; +jform_vvvvwatwah_required = false; +jform_vvvvwatwai_required = false; +jform_vvvvwauwaj_required = false; +jform_vvvvwavwak_required = false; +jform_vvvvwaxwal_required = false; +jform_vvvvwaxwam_required = false; +jform_vvvvwaywan_required = false; +jform_vvvvwaywao_required = false; + +// Initial Script +jQuery(document).ready(function() +{ + var protocol_vvvvwat = jQuery("#jform_protocol").val(); + vvvvwat(protocol_vvvvwat); + + var protocol_vvvvwau = jQuery("#jform_protocol").val(); + vvvvwau(protocol_vvvvwau); + + var protocol_vvvvwav = jQuery("#jform_protocol").val(); + var authentication_vvvvwav = jQuery("#jform_authentication input[type='radio']:checked").val(); + vvvvwav(protocol_vvvvwav,authentication_vvvvwav); + + var protocol_vvvvwax = jQuery("#jform_protocol").val(); + var authentication_vvvvwax = jQuery("#jform_authentication input[type='radio']:checked").val(); + vvvvwax(protocol_vvvvwax,authentication_vvvvwax); + + var authentication_vvvvway = jQuery("#jform_authentication input[type='radio']:checked").val(); + var protocol_vvvvway = jQuery("#jform_protocol").val(); + vvvvway(authentication_vvvvway,protocol_vvvvway); +}); + +// the vvvvwat function +function vvvvwat(protocol_vvvvwat) +{ + if (isSet(protocol_vvvvwat) && protocol_vvvvwat.constructor !== Array) + { + var temp_vvvvwat = protocol_vvvvwat; + var protocol_vvvvwat = []; + protocol_vvvvwat.push(temp_vvvvwat); + } + else if (!isSet(protocol_vvvvwat)) + { + var protocol_vvvvwat = []; + } + var protocol = protocol_vvvvwat.some(protocol_vvvvwat_SomeFunc); + + + // set this function logic + if (protocol) + { + jQuery('#jform_authentication').closest('.control-group').show(); + if (jform_vvvvwatwae_required) + { + updateFieldRequired('authentication',0); + jQuery('#jform_authentication').prop('required','required'); + jQuery('#jform_authentication').attr('aria-required',true); + jQuery('#jform_authentication').addClass('required'); + jform_vvvvwatwae_required = false; + } + + jQuery('#jform_host').closest('.control-group').show(); + if (jform_vvvvwatwaf_required) + { + updateFieldRequired('host',0); + jQuery('#jform_host').prop('required','required'); + jQuery('#jform_host').attr('aria-required',true); + jQuery('#jform_host').addClass('required'); + jform_vvvvwatwaf_required = false; + } + + jQuery('#jform_port').closest('.control-group').show(); + if (jform_vvvvwatwag_required) + { + updateFieldRequired('port',0); + jQuery('#jform_port').prop('required','required'); + jQuery('#jform_port').attr('aria-required',true); + jQuery('#jform_port').addClass('required'); + jform_vvvvwatwag_required = false; + } + + jQuery('#jform_path').closest('.control-group').show(); + if (jform_vvvvwatwah_required) + { + updateFieldRequired('path',0); + jQuery('#jform_path').prop('required','required'); + jQuery('#jform_path').attr('aria-required',true); + jQuery('#jform_path').addClass('required'); + jform_vvvvwatwah_required = false; + } + + jQuery('.note_ssh_security').closest('.control-group').show(); + jQuery('#jform_username').closest('.control-group').show(); + if (jform_vvvvwatwai_required) + { + updateFieldRequired('username',0); + jQuery('#jform_username').prop('required','required'); + jQuery('#jform_username').attr('aria-required',true); + jQuery('#jform_username').addClass('required'); + jform_vvvvwatwai_required = false; + } + + } + else + { + jQuery('#jform_authentication').closest('.control-group').hide(); + if (!jform_vvvvwatwae_required) + { + updateFieldRequired('authentication',1); + jQuery('#jform_authentication').removeAttr('required'); + jQuery('#jform_authentication').removeAttr('aria-required'); + jQuery('#jform_authentication').removeClass('required'); + jform_vvvvwatwae_required = true; + } + jQuery('#jform_host').closest('.control-group').hide(); + if (!jform_vvvvwatwaf_required) + { + updateFieldRequired('host',1); + jQuery('#jform_host').removeAttr('required'); + jQuery('#jform_host').removeAttr('aria-required'); + jQuery('#jform_host').removeClass('required'); + jform_vvvvwatwaf_required = true; + } + jQuery('#jform_port').closest('.control-group').hide(); + if (!jform_vvvvwatwag_required) + { + updateFieldRequired('port',1); + jQuery('#jform_port').removeAttr('required'); + jQuery('#jform_port').removeAttr('aria-required'); + jQuery('#jform_port').removeClass('required'); + jform_vvvvwatwag_required = true; + } + jQuery('#jform_path').closest('.control-group').hide(); + if (!jform_vvvvwatwah_required) + { + updateFieldRequired('path',1); + jQuery('#jform_path').removeAttr('required'); + jQuery('#jform_path').removeAttr('aria-required'); + jQuery('#jform_path').removeClass('required'); + jform_vvvvwatwah_required = true; + } + jQuery('.note_ssh_security').closest('.control-group').hide(); + jQuery('#jform_username').closest('.control-group').hide(); + if (!jform_vvvvwatwai_required) + { + updateFieldRequired('username',1); + jQuery('#jform_username').removeAttr('required'); + jQuery('#jform_username').removeAttr('aria-required'); + jQuery('#jform_username').removeClass('required'); + jform_vvvvwatwai_required = true; + } + } +} + +// the vvvvwat Some function +function protocol_vvvvwat_SomeFunc(protocol_vvvvwat) +{ + // set the function logic + if (protocol_vvvvwat == 2) + { + return true; + } + return false; +} + +// the vvvvwau function +function vvvvwau(protocol_vvvvwau) +{ + if (isSet(protocol_vvvvwau) && protocol_vvvvwau.constructor !== Array) + { + var temp_vvvvwau = protocol_vvvvwau; + var protocol_vvvvwau = []; + protocol_vvvvwau.push(temp_vvvvwau); + } + else if (!isSet(protocol_vvvvwau)) + { + var protocol_vvvvwau = []; + } + var protocol = protocol_vvvvwau.some(protocol_vvvvwau_SomeFunc); + + + // set this function logic + if (protocol) + { + jQuery('.note_ftp_signature').closest('.control-group').show(); + jQuery('#jform_signature').closest('.control-group').show(); + if (jform_vvvvwauwaj_required) + { + updateFieldRequired('signature',0); + jQuery('#jform_signature').prop('required','required'); + jQuery('#jform_signature').attr('aria-required',true); + jQuery('#jform_signature').addClass('required'); + jform_vvvvwauwaj_required = false; + } + + } + else + { + jQuery('.note_ftp_signature').closest('.control-group').hide(); + jQuery('#jform_signature').closest('.control-group').hide(); + if (!jform_vvvvwauwaj_required) + { + updateFieldRequired('signature',1); + jQuery('#jform_signature').removeAttr('required'); + jQuery('#jform_signature').removeAttr('aria-required'); + jQuery('#jform_signature').removeClass('required'); + jform_vvvvwauwaj_required = true; + } + } +} + +// the vvvvwau Some function +function protocol_vvvvwau_SomeFunc(protocol_vvvvwau) +{ + // set the function logic + if (protocol_vvvvwau == 1) + { + return true; + } + return false; +} + +// the vvvvwav function +function vvvvwav(protocol_vvvvwav,authentication_vvvvwav) +{ + if (isSet(protocol_vvvvwav) && protocol_vvvvwav.constructor !== Array) + { + var temp_vvvvwav = protocol_vvvvwav; + var protocol_vvvvwav = []; + protocol_vvvvwav.push(temp_vvvvwav); + } + else if (!isSet(protocol_vvvvwav)) + { + var protocol_vvvvwav = []; + } + var protocol = protocol_vvvvwav.some(protocol_vvvvwav_SomeFunc); + + if (isSet(authentication_vvvvwav) && authentication_vvvvwav.constructor !== Array) + { + var temp_vvvvwav = authentication_vvvvwav; + var authentication_vvvvwav = []; + authentication_vvvvwav.push(temp_vvvvwav); + } + else if (!isSet(authentication_vvvvwav)) + { + var authentication_vvvvwav = []; + } + var authentication = authentication_vvvvwav.some(authentication_vvvvwav_SomeFunc); + + + // set this function logic + if (protocol && authentication) + { + jQuery('#jform_password').closest('.control-group').show(); + if (jform_vvvvwavwak_required) + { + updateFieldRequired('password',0); + jQuery('#jform_password').prop('required','required'); + jQuery('#jform_password').attr('aria-required',true); + jQuery('#jform_password').addClass('required'); + jform_vvvvwavwak_required = false; + } + + } + else + { + jQuery('#jform_password').closest('.control-group').hide(); + if (!jform_vvvvwavwak_required) + { + updateFieldRequired('password',1); + jQuery('#jform_password').removeAttr('required'); + jQuery('#jform_password').removeAttr('aria-required'); + jQuery('#jform_password').removeClass('required'); + jform_vvvvwavwak_required = true; + } + } +} + +// the vvvvwav Some function +function protocol_vvvvwav_SomeFunc(protocol_vvvvwav) +{ + // set the function logic + if (protocol_vvvvwav == 2) + { + return true; + } + return false; +} + +// the vvvvwav Some function +function authentication_vvvvwav_SomeFunc(authentication_vvvvwav) +{ + // set the function logic + if (authentication_vvvvwav == 1) + { + return true; + } + return false; +} + +// the vvvvwax function +function vvvvwax(protocol_vvvvwax,authentication_vvvvwax) +{ + if (isSet(protocol_vvvvwax) && protocol_vvvvwax.constructor !== Array) + { + var temp_vvvvwax = protocol_vvvvwax; + var protocol_vvvvwax = []; + protocol_vvvvwax.push(temp_vvvvwax); + } + else if (!isSet(protocol_vvvvwax)) + { + var protocol_vvvvwax = []; + } + var protocol = protocol_vvvvwax.some(protocol_vvvvwax_SomeFunc); + + if (isSet(authentication_vvvvwax) && authentication_vvvvwax.constructor !== Array) + { + var temp_vvvvwax = authentication_vvvvwax; + var authentication_vvvvwax = []; + authentication_vvvvwax.push(temp_vvvvwax); + } + else if (!isSet(authentication_vvvvwax)) + { + var authentication_vvvvwax = []; + } + var authentication = authentication_vvvvwax.some(authentication_vvvvwax_SomeFunc); + + + // set this function logic + if (protocol && authentication) + { + jQuery('#jform_private').closest('.control-group').show(); + if (jform_vvvvwaxwal_required) + { + updateFieldRequired('private',0); + jQuery('#jform_private').prop('required','required'); + jQuery('#jform_private').attr('aria-required',true); + jQuery('#jform_private').addClass('required'); + jform_vvvvwaxwal_required = false; + } + + jQuery('#jform_public').closest('.control-group').show(); + if (jform_vvvvwaxwam_required) + { + updateFieldRequired('public',0); + jQuery('#jform_public').prop('required','required'); + jQuery('#jform_public').attr('aria-required',true); + jQuery('#jform_public').addClass('required'); + jform_vvvvwaxwam_required = false; + } + + jQuery('#jform_secret').closest('.control-group').show(); + } + else + { + jQuery('#jform_private').closest('.control-group').hide(); + if (!jform_vvvvwaxwal_required) + { + updateFieldRequired('private',1); + jQuery('#jform_private').removeAttr('required'); + jQuery('#jform_private').removeAttr('aria-required'); + jQuery('#jform_private').removeClass('required'); + jform_vvvvwaxwal_required = true; + } + jQuery('#jform_public').closest('.control-group').hide(); + if (!jform_vvvvwaxwam_required) + { + updateFieldRequired('public',1); + jQuery('#jform_public').removeAttr('required'); + jQuery('#jform_public').removeAttr('aria-required'); + jQuery('#jform_public').removeClass('required'); + jform_vvvvwaxwam_required = true; + } + jQuery('#jform_secret').closest('.control-group').hide(); + } +} + +// the vvvvwax Some function +function protocol_vvvvwax_SomeFunc(protocol_vvvvwax) +{ + // set the function logic + if (protocol_vvvvwax == 2) + { + return true; + } + return false; +} + +// the vvvvwax Some function +function authentication_vvvvwax_SomeFunc(authentication_vvvvwax) +{ + // set the function logic + if (authentication_vvvvwax == 2) + { + return true; + } + return false; +} + +// the vvvvway function +function vvvvway(authentication_vvvvway,protocol_vvvvway) +{ + if (isSet(authentication_vvvvway) && authentication_vvvvway.constructor !== Array) + { + var temp_vvvvway = authentication_vvvvway; + var authentication_vvvvway = []; + authentication_vvvvway.push(temp_vvvvway); + } + else if (!isSet(authentication_vvvvway)) + { + var authentication_vvvvway = []; + } + var authentication = authentication_vvvvway.some(authentication_vvvvway_SomeFunc); + + if (isSet(protocol_vvvvway) && protocol_vvvvway.constructor !== Array) + { + var temp_vvvvway = protocol_vvvvway; + var protocol_vvvvway = []; + protocol_vvvvway.push(temp_vvvvway); + } + else if (!isSet(protocol_vvvvway)) + { + var protocol_vvvvway = []; + } + var protocol = protocol_vvvvway.some(protocol_vvvvway_SomeFunc); + + + // set this function logic + if (authentication && protocol) + { + jQuery('#jform_private').closest('.control-group').show(); + if (jform_vvvvwaywan_required) + { + updateFieldRequired('private',0); + jQuery('#jform_private').prop('required','required'); + jQuery('#jform_private').attr('aria-required',true); + jQuery('#jform_private').addClass('required'); + jform_vvvvwaywan_required = false; + } + + jQuery('#jform_public').closest('.control-group').show(); + if (jform_vvvvwaywao_required) + { + updateFieldRequired('public',0); + jQuery('#jform_public').prop('required','required'); + jQuery('#jform_public').attr('aria-required',true); + jQuery('#jform_public').addClass('required'); + jform_vvvvwaywao_required = false; + } + + jQuery('#jform_secret').closest('.control-group').show(); + } + else + { + jQuery('#jform_private').closest('.control-group').hide(); + if (!jform_vvvvwaywan_required) + { + updateFieldRequired('private',1); + jQuery('#jform_private').removeAttr('required'); + jQuery('#jform_private').removeAttr('aria-required'); + jQuery('#jform_private').removeClass('required'); + jform_vvvvwaywan_required = true; + } + jQuery('#jform_public').closest('.control-group').hide(); + if (!jform_vvvvwaywao_required) + { + updateFieldRequired('public',1); + jQuery('#jform_public').removeAttr('required'); + jQuery('#jform_public').removeAttr('aria-required'); + jQuery('#jform_public').removeClass('required'); + jform_vvvvwaywao_required = true; + } + jQuery('#jform_secret').closest('.control-group').hide(); + } +} + +// the vvvvway Some function +function authentication_vvvvway_SomeFunc(authentication_vvvvway) +{ + // set the function logic + if (authentication_vvvvway == 2) + { + return true; + } + return false; +} + +// the vvvvway Some function +function protocol_vvvvway_SomeFunc(protocol_vvvvway) +{ + // set the function logic + if (protocol_vvvvway == 2) + { + return true; + } + return false; +} + +// update required fields +function updateFieldRequired(name,status) +{ + var not_required = jQuery('#jform_not_required').val(); + + if(status == 1) + { + if (isSet(not_required) && not_required != 0) + { + not_required = not_required+','+name; + } + else + { + not_required = ','+name; + } + } + else + { + if (isSet(not_required) && not_required != 0) + { + not_required = not_required.replace(','+name,''); + } + } + + jQuery('#jform_not_required').val(not_required); +} + +// the isSet function +function isSet(val) +{ + if ((val != undefined) && (val != null) && 0 !== val.length){ + return true; + } + return false; +} diff --git a/admin/models/forms/server.xml b/admin/models/forms/server.xml new file mode 100644 index 000000000..4b58a9def --- /dev/null +++ b/admin/models/forms/server.xml @@ -0,0 +1,274 @@ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ + + + +
+
\ No newline at end of file diff --git a/admin/models/ftp.php b/admin/models/server.php similarity index 74% rename from admin/models/ftp.php rename to admin/models/server.php index 801cf08f8..19489f202 100644 --- a/admin/models/ftp.php +++ b/admin/models/server.php @@ -13,7 +13,7 @@ @version 2.6.x @created 30th April, 2015 @package Component Builder - @subpackage ftp.php + @subpackage server.php @author Llewellyn van der Merwe @github Joomla Component Builder @copyright Copyright (C) 2015. All Rights Reserved @@ -32,9 +32,9 @@ use Joomla\Registry\Registry; jimport('joomla.application.component.modeladmin'); /** - * Componentbuilder Ftp Model + * Componentbuilder Server Model */ -class ComponentbuilderModelFtp extends JModelAdmin +class ComponentbuilderModelServer extends JModelAdmin { /** * @var string The prefix to use with controller messages. @@ -48,7 +48,7 @@ class ComponentbuilderModelFtp extends JModelAdmin * @var string * @since 3.2 */ - public $typeAlias = 'com_componentbuilder.ftp'; + public $typeAlias = 'com_componentbuilder.server'; /** * Returns a Table object, always creating it @@ -61,7 +61,7 @@ class ComponentbuilderModelFtp extends JModelAdmin * * @since 1.6 */ - public function getTable($type = 'ftp', $prefix = 'ComponentbuilderTable', $config = array()) + public function getTable($type = 'server', $prefix = 'ComponentbuilderTable', $config = array()) { return JTable::getInstance($type, $prefix, $config); } @@ -100,19 +100,67 @@ class ComponentbuilderModelFtp extends JModelAdmin // Get the encryption object. $basic = new FOFEncryptAes($basickey, 128); + if (!empty($item->path) && $basickey && !is_numeric($item->path) && $item->path === base64_encode(base64_decode($item->path, true))) + { + // basic decrypt data path. + $item->path = rtrim($basic->decryptString($item->path), "\0"); + } + + if (!empty($item->port) && $basickey && !is_numeric($item->port) && $item->port === base64_encode(base64_decode($item->port, true))) + { + // basic decrypt data port. + $item->port = rtrim($basic->decryptString($item->port), "\0"); + } + + if (!empty($item->password) && $basickey && !is_numeric($item->password) && $item->password === base64_encode(base64_decode($item->password, true))) + { + // basic decrypt data password. + $item->password = rtrim($basic->decryptString($item->password), "\0"); + } + + if (!empty($item->secret) && $basickey && !is_numeric($item->secret) && $item->secret === base64_encode(base64_decode($item->secret, true))) + { + // basic decrypt data secret. + $item->secret = rtrim($basic->decryptString($item->secret), "\0"); + } + + if (!empty($item->host) && $basickey && !is_numeric($item->host) && $item->host === base64_encode(base64_decode($item->host, true))) + { + // basic decrypt data host. + $item->host = rtrim($basic->decryptString($item->host), "\0"); + } + if (!empty($item->signature) && $basickey && !is_numeric($item->signature) && $item->signature === base64_encode(base64_decode($item->signature, true))) { // basic decrypt data signature. $item->signature = rtrim($basic->decryptString($item->signature), "\0"); + } + + if (!empty($item->username) && $basickey && !is_numeric($item->username) && $item->username === base64_encode(base64_decode($item->username, true))) + { + // basic decrypt data username. + $item->username = rtrim($basic->decryptString($item->username), "\0"); + } + + if (!empty($item->private) && $basickey && !is_numeric($item->private) && $item->private === base64_encode(base64_decode($item->private, true))) + { + // basic decrypt data private. + $item->private = rtrim($basic->decryptString($item->private), "\0"); + } + + if (!empty($item->public) && $basickey && !is_numeric($item->public) && $item->public === base64_encode(base64_decode($item->public, true))) + { + // basic decrypt data public. + $item->public = rtrim($basic->decryptString($item->public), "\0"); } if (!empty($item->id)) { $item->tags = new JHelperTags; - $item->tags->getTagIds($item->id, 'com_componentbuilder.ftp'); + $item->tags->getTagIds($item->id, 'com_componentbuilder.server'); } } - $this->sales_server_ftpupdate_server_ftp_vvvx = $item->id; + $this->sales_serverupdate_servervvvx = $item->id; return $item; } @@ -122,7 +170,7 @@ class ComponentbuilderModelFtp extends JModelAdmin * * @return mixed An array of data items on success, false on failure. */ - public function getWaelinked_components() + public function getWaplinked_components() { // Get the user object. $user = JFactory::getUser(); @@ -136,19 +184,19 @@ class ComponentbuilderModelFtp extends JModelAdmin // From the componentbuilder_joomla_component table $query->from($db->quoteName('#__componentbuilder_joomla_component', 'a')); - // Filter by sales_server_ftpupdate_server_ftp_vvvx global. - $sales_server_ftpupdate_server_ftp_vvvx = $this->sales_server_ftpupdate_server_ftp_vvvx; - if (is_numeric($sales_server_ftpupdate_server_ftp_vvvx )) + // Filter by sales_serverupdate_servervvvx global. + $sales_serverupdate_servervvvx = $this->sales_serverupdate_servervvvx; + if (is_numeric($sales_serverupdate_servervvvx )) { - $query->where('a.sales_server_ftp = ' . (int) $sales_server_ftpupdate_server_ftp_vvvx . ' OR a.update_server_ftp = ' . (int) $sales_server_ftpupdate_server_ftp_vvvx, ' OR'); + $query->where('a.sales_server = ' . (int) $sales_serverupdate_servervvvx . ' OR a.update_server = ' . (int) $sales_serverupdate_servervvvx, ' OR'); } - elseif (is_string($sales_server_ftpupdate_server_ftp_vvvx)) + elseif (is_string($sales_serverupdate_servervvvx)) { - $query->where('a.sales_server_ftp = ' . $db->quote($sales_server_ftpupdate_server_ftp_vvvx) . ' OR a.update_server_ftp = ' . $db->quote($sales_server_ftpupdate_server_ftp_vvvx), ' OR'); + $query->where('a.sales_server = ' . $db->quote($sales_serverupdate_servervvvx) . ' OR a.update_server = ' . $db->quote($sales_serverupdate_servervvvx), ' OR'); } else { - $query->where('a.update_server_ftp = -5'); + $query->where('a.update_server = -5'); } // Join over the asset groups. @@ -211,7 +259,7 @@ class ComponentbuilderModelFtp extends JModelAdmin public function getForm($data = array(), $loadData = true) { // Get the form. - $form = $this->loadForm('com_componentbuilder.ftp', 'ftp', array('control' => 'jform', 'load_data' => $loadData)); + $form = $this->loadForm('com_componentbuilder.server', 'server', array('control' => 'jform', 'load_data' => $loadData)); if (empty($form)) { @@ -235,8 +283,8 @@ class ComponentbuilderModelFtp extends JModelAdmin // Check for existing item. // Modify the form based on Edit State access controls. - if ($id != 0 && (!$user->authorise('ftp.edit.state', 'com_componentbuilder.ftp.' . (int) $id)) - || ($id == 0 && !$user->authorise('ftp.edit.state', 'com_componentbuilder'))) + if ($id != 0 && (!$user->authorise('server.edit.state', 'com_componentbuilder.server.' . (int) $id)) + || ($id == 0 && !$user->authorise('server.edit.state', 'com_componentbuilder'))) { // Disable fields for display. $form->setFieldAttribute('ordering', 'disabled', 'true'); @@ -252,8 +300,8 @@ class ComponentbuilderModelFtp extends JModelAdmin $form->setValue('created_by', null, $user->id); } // Modify the form based on Edit Creaded By access controls. - if ($id != 0 && (!$user->authorise('ftp.edit.created_by', 'com_componentbuilder.ftp.' . (int) $id)) - || ($id == 0 && !$user->authorise('ftp.edit.created_by', 'com_componentbuilder'))) + if ($id != 0 && (!$user->authorise('server.edit.created_by', 'com_componentbuilder.server.' . (int) $id)) + || ($id == 0 && !$user->authorise('server.edit.created_by', 'com_componentbuilder'))) { // Disable fields for display. $form->setFieldAttribute('created_by', 'disabled', 'true'); @@ -263,46 +311,14 @@ class ComponentbuilderModelFtp extends JModelAdmin $form->setFieldAttribute('created_by', 'filter', 'unset'); } // Modify the form based on Edit Creaded Date access controls. - if ($id != 0 && (!$user->authorise('ftp.edit.created', 'com_componentbuilder.ftp.' . (int) $id)) - || ($id == 0 && !$user->authorise('ftp.edit.created', 'com_componentbuilder'))) + if ($id != 0 && (!$user->authorise('server.edit.created', 'com_componentbuilder.server.' . (int) $id)) + || ($id == 0 && !$user->authorise('server.edit.created', 'com_componentbuilder'))) { // Disable fields for display. $form->setFieldAttribute('created', 'disabled', 'true'); // Disable fields while saving. $form->setFieldAttribute('created', 'filter', 'unset'); } - // Modify the form based on Edit Name access controls. - if ($id != 0 && (!$user->authorise('ftp.edit.name', 'com_componentbuilder.ftp.' . (int) $id)) - || ($id == 0 && !$user->authorise('ftp.edit.name', 'com_componentbuilder'))) - { - // Disable fields for display. - $form->setFieldAttribute('name', 'disabled', 'true'); - // Disable fields for display. - $form->setFieldAttribute('name', 'readonly', 'true'); - if (!$form->getValue('name')) - { - // Disable fields while saving. - $form->setFieldAttribute('name', 'filter', 'unset'); - // Disable fields while saving. - $form->setFieldAttribute('name', 'required', 'false'); - } - } - // Modify the form based on Edit Signature access controls. - if ($id != 0 && (!$user->authorise('ftp.edit.signature', 'com_componentbuilder.ftp.' . (int) $id)) - || ($id == 0 && !$user->authorise('ftp.edit.signature', 'com_componentbuilder'))) - { - // Disable fields for display. - $form->setFieldAttribute('signature', 'disabled', 'true'); - // Disable fields for display. - $form->setFieldAttribute('signature', 'readonly', 'true'); - if (!$form->getValue('signature')) - { - // Disable fields while saving. - $form->setFieldAttribute('signature', 'filter', 'unset'); - // Disable fields while saving. - $form->setFieldAttribute('signature', 'required', 'false'); - } - } // Only load these values if no id is found if (0 == $id) { @@ -327,7 +343,7 @@ class ComponentbuilderModelFtp extends JModelAdmin */ public function getScript() { - return 'administrator/components/com_componentbuilder/models/forms/ftp.js'; + return 'administrator/components/com_componentbuilder/models/forms/server.js'; } /** @@ -350,7 +366,7 @@ class ComponentbuilderModelFtp extends JModelAdmin $user = JFactory::getUser(); // The record has been set. Check the record permissions. - return $user->authorise('ftp.delete', 'com_componentbuilder.ftp.' . (int) $record->id); + return $user->authorise('server.delete', 'com_componentbuilder.server.' . (int) $record->id); } return false; } @@ -372,14 +388,14 @@ class ComponentbuilderModelFtp extends JModelAdmin if ($recordId) { // The record has been set. Check the record permissions. - $permission = $user->authorise('ftp.edit.state', 'com_componentbuilder.ftp.' . (int) $recordId); + $permission = $user->authorise('server.edit.state', 'com_componentbuilder.server.' . (int) $recordId); if (!$permission && !is_null($permission)) { return false; } } // In the absense of better information, revert to the component permissions. - return $user->authorise('ftp.edit.state', 'com_componentbuilder'); + return $user->authorise('server.edit.state', 'com_componentbuilder'); } /** @@ -396,7 +412,7 @@ class ComponentbuilderModelFtp extends JModelAdmin // Check specific edit permission then general edit permission. $user = JFactory::getUser(); - return $user->authorise('ftp.edit', 'com_componentbuilder.ftp.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or $user->authorise('ftp.edit', 'com_componentbuilder'); + return $user->authorise('server.edit', 'com_componentbuilder.server.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or $user->authorise('server.edit', 'com_componentbuilder'); } /** @@ -437,7 +453,7 @@ class ComponentbuilderModelFtp extends JModelAdmin $db = JFactory::getDbo(); $query = $db->getQuery(true) ->select('MAX(ordering)') - ->from($db->quoteName('#__componentbuilder_ftp')); + ->from($db->quoteName('#__componentbuilder_server')); $db->setQuery($query); $max = $db->loadResult(); @@ -467,7 +483,7 @@ class ComponentbuilderModelFtp extends JModelAdmin protected function loadFormData() { // Check the session for previously entered form data. - $data = JFactory::getApplication()->getUserState('com_componentbuilder.edit.ftp.data', array()); + $data = JFactory::getApplication()->getUserState('com_componentbuilder.edit.server.data', array()); if (empty($data)) { @@ -475,6 +491,42 @@ class ComponentbuilderModelFtp extends JModelAdmin } return $data; + } + + /** + * Method to validate the form data. + * + * @param JForm $form The form to validate against. + * @param array $data The data to validate. + * @param string $group The name of the field group to validate. + * + * @return mixed Array of filtered data if valid, false otherwise. + * + * @see JFormRule + * @see JFilterInput + * @since 12.2 + */ + public function validate($form, $data, $group = null) + { + // check if the not_required field is set + if (ComponentbuilderHelper::checkString($data['not_required'])) + { + $requiredFields = (array) explode(',',(string) $data['not_required']); + $requiredFields = array_unique($requiredFields); + // now change the required field attributes value + foreach ($requiredFields as $requiredField) + { + // make sure there is a string value + if (ComponentbuilderHelper::checkString($requiredField)) + { + // change to false + $form->setFieldAttribute($requiredField, 'required', 'false'); + // also clear the data set + $data[$requiredField] = ''; + } + } + } + return parent::validate($form, $data, $group); } /** @@ -565,7 +617,7 @@ class ComponentbuilderModelFtp extends JModelAdmin $this->tableClassName = get_class($this->table); $this->contentType = new JUcmType; $this->type = $this->contentType->getTypeByTable($this->tableClassName); - $this->canDo = ComponentbuilderHelper::getActions('ftp'); + $this->canDo = ComponentbuilderHelper::getActions('server'); $this->batchSet = true; if (!$this->canDo->get('core.batch')) @@ -645,10 +697,10 @@ class ComponentbuilderModelFtp extends JModelAdmin $this->tableClassName = get_class($this->table); $this->contentType = new JUcmType; $this->type = $this->contentType->getTypeByTable($this->tableClassName); - $this->canDo = ComponentbuilderHelper::getActions('ftp'); + $this->canDo = ComponentbuilderHelper::getActions('server'); } - if (!$this->canDo->get('ftp.create') && !$this->canDo->get('ftp.batch')) + if (!$this->canDo->get('server.create') && !$this->canDo->get('server.batch')) { return false; } @@ -663,7 +715,7 @@ class ComponentbuilderModelFtp extends JModelAdmin { $values['published'] = 0; } - elseif (isset($values['published']) && !$this->canDo->get('ftp.edit.state')) + elseif (isset($values['published']) && !$this->canDo->get('server.edit.state')) { $values['published'] = 0; } @@ -680,7 +732,7 @@ class ComponentbuilderModelFtp extends JModelAdmin // only allow copy if user may edit this item. - if (!$this->user->authorise('ftp.edit', $contexts[$pk])) + if (!$this->user->authorise('server.edit', $contexts[$pk])) { @@ -794,17 +846,17 @@ class ComponentbuilderModelFtp extends JModelAdmin $this->tableClassName = get_class($this->table); $this->contentType = new JUcmType; $this->type = $this->contentType->getTypeByTable($this->tableClassName); - $this->canDo = ComponentbuilderHelper::getActions('ftp'); + $this->canDo = ComponentbuilderHelper::getActions('server'); } - if (!$this->canDo->get('ftp.edit') && !$this->canDo->get('ftp.batch')) + if (!$this->canDo->get('server.edit') && !$this->canDo->get('server.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('ftp.edit.state')) + if (isset($values['published']) && !$this->canDo->get('server.edit.state')) { unset($values['published']); } @@ -814,7 +866,7 @@ class ComponentbuilderModelFtp extends JModelAdmin // Parent exists so we proceed foreach ($pks as $pk) { - if (!$this->user->authorise('ftp.edit', $contexts[$pk])) + if (!$this->user->authorise('server.edit', $contexts[$pk])) { $this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); @@ -914,10 +966,58 @@ class ComponentbuilderModelFtp extends JModelAdmin // Get the encryption object $basic = new FOFEncryptAes($basickey, 128); + // Encrypt data path. + if (isset($data['path']) && $basickey) + { + $data['path'] = $basic->encryptString($data['path']); + } + + // Encrypt data port. + if (isset($data['port']) && $basickey) + { + $data['port'] = $basic->encryptString($data['port']); + } + + // Encrypt data password. + if (isset($data['password']) && $basickey) + { + $data['password'] = $basic->encryptString($data['password']); + } + + // Encrypt data secret. + if (isset($data['secret']) && $basickey) + { + $data['secret'] = $basic->encryptString($data['secret']); + } + + // Encrypt data host. + if (isset($data['host']) && $basickey) + { + $data['host'] = $basic->encryptString($data['host']); + } + // Encrypt data signature. if (isset($data['signature']) && $basickey) { $data['signature'] = $basic->encryptString($data['signature']); + } + + // Encrypt data username. + if (isset($data['username']) && $basickey) + { + $data['username'] = $basic->encryptString($data['username']); + } + + // Encrypt data private. + if (isset($data['private']) && $basickey) + { + $data['private'] = $basic->encryptString($data['private']); + } + + // Encrypt data public. + if (isset($data['public']) && $basickey) + { + $data['public'] = $basic->encryptString($data['public']); } // Set the Params Items to data diff --git a/admin/models/ftps.php b/admin/models/servers.php similarity index 71% rename from admin/models/ftps.php rename to admin/models/servers.php index e68b7ffbe..14b9b38f0 100644 --- a/admin/models/ftps.php +++ b/admin/models/servers.php @@ -13,7 +13,7 @@ @version 2.6.x @created 30th April, 2015 @package Component Builder - @subpackage ftps.php + @subpackage servers.php @author Llewellyn van der Merwe @github Joomla Component Builder @copyright Copyright (C) 2015. All Rights Reserved @@ -30,9 +30,9 @@ defined('_JEXEC') or die('Restricted access'); jimport('joomla.application.component.modellist'); /** - * Ftps Model + * Servers Model */ -class ComponentbuilderModelFtps extends JModelList +class ComponentbuilderModelServers extends JModelList { public function __construct($config = array()) { @@ -44,7 +44,8 @@ class ComponentbuilderModelFtps extends JModelList 'a.ordering','ordering', 'a.created_by','created_by', 'a.modified_by','modified_by', - 'a.name','name' + 'a.name','name', + 'a.protocol','protocol' ); } @@ -66,7 +67,10 @@ class ComponentbuilderModelFtps extends JModelList $this->context .= '.' . $layout; } $name = $this->getUserStateFromRequest($this->context . '.filter.name', 'filter_name'); - $this->setState('filter.name', $name); + $this->setState('filter.name', $name); + + $protocol = $this->getUserStateFromRequest($this->context . '.filter.protocol', 'filter_protocol'); + $this->setState('filter.protocol', $protocol); $sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int'); $this->setState('filter.sorting', $sorting); @@ -110,7 +114,7 @@ class ComponentbuilderModelFtps extends JModelList $user = JFactory::getUser(); foreach ($items as $nr => &$item) { - $access = ($user->authorise('ftp.access', 'com_componentbuilder.ftp.' . (int) $item->id) && $user->authorise('ftp.access', 'com_componentbuilder')); + $access = ($user->authorise('server.access', 'com_componentbuilder.server.' . (int) $item->id) && $user->authorise('server.access', 'com_componentbuilder')); if (!$access) { unset($items[$nr]); @@ -118,10 +122,45 @@ class ComponentbuilderModelFtps extends JModelList } } - } + } + + // set selection value to a translatable value + if (ComponentbuilderHelper::checkArray($items)) + { + foreach ($items as $nr => &$item) + { + // convert protocol + $item->protocol = $this->selectionTranslation($item->protocol, 'protocol'); + } + } + // return items return $items; + } + + /** + * Method to convert selection values to translatable string. + * + * @return translatable string + */ + public function selectionTranslation($value,$name) + { + // Array of protocol language strings + if ($name === 'protocol') + { + $protocolArray = array( + 0 => 'COM_COMPONENTBUILDER_SERVER_SELECT_AN_OPTION', + 1 => 'COM_COMPONENTBUILDER_SERVER_FTP', + 2 => 'COM_COMPONENTBUILDER_SERVER_SSH' + ); + // Now check if value is found in this array + if (isset($protocolArray[$value]) && ComponentbuilderHelper::checkString($protocolArray[$value])) + { + return $protocolArray[$value]; + } + } + return $value; } /** @@ -141,7 +180,7 @@ class ComponentbuilderModelFtps extends JModelList $query->select('a.*'); // From the componentbuilder_item table - $query->from($db->quoteName('#__componentbuilder_ftp', 'a')); + $query->from($db->quoteName('#__componentbuilder_server', 'a')); // Filter by published state $published = $this->getState('filter.published'); @@ -179,7 +218,7 @@ class ComponentbuilderModelFtps extends JModelList else { $search = $db->quote('%' . $db->escape($search) . '%'); - $query->where('(a.name LIKE '.$search.')'); + $query->where('(a.name LIKE '.$search.' OR a.protocol LIKE '.$search.')'); } } @@ -188,6 +227,11 @@ class ComponentbuilderModelFtps extends JModelList { $query->where('a.name = ' . $db->quote($db->escape($name))); } + // Filter by Protocol. + if ($protocol = $this->getState('filter.protocol')) + { + $query->where('a.protocol = ' . $db->quote($db->escape($protocol))); + } // Add the list ordering clause. $orderCol = $this->state->get('list.ordering', 'a.id'); @@ -221,8 +265,8 @@ class ComponentbuilderModelFtps extends JModelList // Select some fields $query->select('a.*'); - // From the componentbuilder_ftp table - $query->from($db->quoteName('#__componentbuilder_ftp', 'a')); + // From the componentbuilder_server table + $query->from($db->quoteName('#__componentbuilder_server', 'a')); $query->where('a.id IN (' . implode(',',$pks) . ')'); // Implement View Level Access if (!$user->authorise('core.options', 'com_componentbuilder')) @@ -253,18 +297,58 @@ class ComponentbuilderModelFtps extends JModelList $user = JFactory::getUser(); foreach ($items as $nr => &$item) { - $access = ($user->authorise('ftp.access', 'com_componentbuilder.ftp.' . (int) $item->id) && $user->authorise('ftp.access', 'com_componentbuilder')); + $access = ($user->authorise('server.access', 'com_componentbuilder.server.' . (int) $item->id) && $user->authorise('server.access', 'com_componentbuilder')); if (!$access) { unset($items[$nr]); continue; } + if ($basickey && !is_numeric($item->path) && $item->path === base64_encode(base64_decode($item->path, true))) + { + // decrypt path + $item->path = $basic->decryptString($item->path); + } + if ($basickey && !is_numeric($item->port) && $item->port === base64_encode(base64_decode($item->port, true))) + { + // decrypt port + $item->port = $basic->decryptString($item->port); + } + if ($basickey && !is_numeric($item->password) && $item->password === base64_encode(base64_decode($item->password, true))) + { + // decrypt password + $item->password = $basic->decryptString($item->password); + } + if ($basickey && !is_numeric($item->secret) && $item->secret === base64_encode(base64_decode($item->secret, true))) + { + // decrypt secret + $item->secret = $basic->decryptString($item->secret); + } + if ($basickey && !is_numeric($item->host) && $item->host === base64_encode(base64_decode($item->host, true))) + { + // decrypt host + $item->host = $basic->decryptString($item->host); + } if ($basickey && !is_numeric($item->signature) && $item->signature === base64_encode(base64_decode($item->signature, true))) { // decrypt signature $item->signature = $basic->decryptString($item->signature); } + if ($basickey && !is_numeric($item->username) && $item->username === base64_encode(base64_decode($item->username, true))) + { + // decrypt username + $item->username = $basic->decryptString($item->username); + } + if ($basickey && !is_numeric($item->private) && $item->private === base64_encode(base64_decode($item->private, true))) + { + // decrypt private + $item->private = $basic->decryptString($item->private); + } + if ($basickey && !is_numeric($item->public) && $item->public === base64_encode(base64_decode($item->public, true))) + { + // decrypt public + $item->public = $basic->decryptString($item->public); + } // unset the values we don't want exported. unset($item->asset_id); unset($item->checked_out); @@ -293,7 +377,7 @@ class ComponentbuilderModelFtps extends JModelList // Get a db connection. $db = JFactory::getDbo(); // get the columns - $columns = $db->getTableColumns("#__componentbuilder_ftp"); + $columns = $db->getTableColumns("#__componentbuilder_server"); if (ComponentbuilderHelper::checkArray($columns)) { // remove the headers you don't import/export. @@ -325,7 +409,8 @@ class ComponentbuilderModelFtps extends JModelList $id .= ':' . $this->getState('filter.ordering'); $id .= ':' . $this->getState('filter.created_by'); $id .= ':' . $this->getState('filter.modified_by'); - $id .= ':' . $this->getState('filter.name'); + $id .= ':' . $this->getState('filter.name'); + $id .= ':' . $this->getState('filter.protocol'); return parent::getStoreId($id); } @@ -349,7 +434,7 @@ class ComponentbuilderModelFtps extends JModelList // reset query $query = $db->getQuery(true); $query->select('*'); - $query->from($db->quoteName('#__componentbuilder_ftp')); + $query->from($db->quoteName('#__componentbuilder_server')); $db->setQuery($query); $db->execute(); if ($db->getNumRows()) @@ -372,7 +457,7 @@ class ComponentbuilderModelFtps extends JModelList ); // Check table - $query->update($db->quoteName('#__componentbuilder_ftp'))->set($fields)->where($conditions); + $query->update($db->quoteName('#__componentbuilder_server'))->set($fields)->where($conditions); $db->setQuery($query); diff --git a/admin/sql/install.mysql.utf8.sql b/admin/sql/install.mysql.utf8.sql index 7d5b57cb3..43e9f2e92 100644 --- a/admin/sql/install.mysql.utf8.sql +++ b/admin/sql/install.mysql.utf8.sql @@ -61,14 +61,14 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_joomla_component` ( `php_preflight_update` MEDIUMTEXT NOT NULL, `php_site_event` MEDIUMTEXT NOT NULL, `readme` TEXT NOT NULL, - `sales_server_ftp` INT(11) NOT NULL DEFAULT 0, + `sales_server` INT(11) NOT NULL DEFAULT 0, `short_description` VARCHAR(255) NOT NULL DEFAULT '', `sql` MEDIUMTEXT NOT NULL, `system_name` VARCHAR(255) NOT NULL DEFAULT '', `toignore` TEXT NOT NULL, - `update_server` VARCHAR(255) NOT NULL DEFAULT '', - `update_server_ftp` INT(11) NOT NULL DEFAULT 0, + `update_server` INT(11) NOT NULL DEFAULT 0, `update_server_target` TINYINT(1) NOT NULL DEFAULT 0, + `update_server_url` VARCHAR(255) NOT NULL DEFAULT '', `website` CHAR(255) NOT NULL DEFAULT '', `whmcs_key` VARCHAR(255) NOT NULL DEFAULT '', `whmcs_url` VARCHAR(255) NOT NULL DEFAULT '', @@ -792,11 +792,22 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_language` ( KEY `idx_name` (`name`) ) ENGINE=MyISAM AUTO_INCREMENT=0 DEFAULT CHARSET=utf8; -CREATE TABLE IF NOT EXISTS `#__componentbuilder_ftp` ( +CREATE TABLE IF NOT EXISTS `#__componentbuilder_server` ( `id` INT(11) NOT NULL AUTO_INCREMENT, `asset_id` INT(10) unsigned NOT NULL DEFAULT 0 COMMENT 'FK to the #__assets table.', + `authentication` TINYINT(1) NOT NULL DEFAULT 0, + `host` TEXT NOT NULL, `name` VARCHAR(255) NOT NULL DEFAULT '', + `not_required` INT(1) NOT NULL DEFAULT 0, + `password` TEXT NOT NULL, + `path` TEXT NOT NULL, + `port` TEXT NOT NULL, + `private` TEXT NOT NULL, + `protocol` TINYINT(1) NOT NULL DEFAULT 0, + `public` TEXT NOT NULL, + `secret` TEXT NOT NULL, `signature` TEXT NOT NULL, + `username` TEXT NOT NULL, `params` text NOT NULL DEFAULT '', `published` TINYINT(3) NOT NULL DEFAULT 1, `created_by` INT(10) unsigned NOT NULL DEFAULT 0, @@ -815,7 +826,8 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_ftp` ( KEY `idx_createdby` (`created_by`), KEY `idx_modifiedby` (`modified_by`), KEY `idx_state` (`published`), - KEY `idx_name` (`name`) + KEY `idx_name` (`name`), + KEY `idx_protocol` (`protocol`) ) ENGINE=MyISAM AUTO_INCREMENT=0 DEFAULT CHARSET=utf8; CREATE TABLE IF NOT EXISTS `#__componentbuilder_help_document` ( @@ -1231,8 +1243,8 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_library_files_folders_urls` ( -- Dumping data for table `#__componentbuilder_joomla_component` -- -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`, `addfootable`, `adduikit`, `add_admin_event`, `add_site_event`, `add_update_server`, `add_sales_server`, `sales_server_ftp`, `update_server_ftp`, `update_server_target`, `php_admin_event`, `php_site_event`, `addreadme`, `readme`, `author`, `bom`, `buildcomp`, `buildcompsql`, `companyname`, `component_version`, `update_server`, `copyright`, `creatuserhelper`, `css_admin`, `css_site`, `debug_linenr`, `description`, `email`, `emptycontributors`, `export_buy_link`, `export_package_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`, `website`, `published`, `created`, `modified`, `hits`, `ordering`, `whmcs_key`, `whmcs_url`) VALUES -(25, '', 1, '', '', '', '', '', '', '', 1, 1, '', '', '', '', '', '', '', 1, '', '', 1, '', '', '', 2, '', '', 1, 'IyAjIyNDb21wb25lbnRfbmFtZSMjIyAoIyMjVkVSU0lPTiMjIykNCg0KIVsjIyNDb21wb25lbnRfbmFtZSMjIyBpbWFnZV0oaHR0cHM6Ly9yYXcuZ2l0aHVidXNlcmNvbnRlbnQuY29tL25hbWliaWEvZGVtby1qb29tbGEtMy1jb21wb25lbnQvbWFzdGVyL2FkbWluL2Fzc2V0cy9pbWFnZXMvdmRtLWNvbXBvbmVudC5qcGcgIlRoZSAjIyNDb21wb25lbnRfbmFtZSMjIyIpDQoNCiMjI0RFU0NSSVBUSU9OIyMjDQoNCiMgQnVpbGQgRGV0YWlscw0KDQorICpDb21wYW55KjogWyMjI0NPTVBBTllOQU1FIyMjXSgjIyNBVVRIT1JXRUJTSVRFIyMjKQ0KKyAqQXV0aG9yKjogWyMjI0FVVEhPUiMjI10obWFpbHRvOiMjI0FVVEhPUkVNQUlMIyMjKQ0KKyAqTmFtZSo6IFsjIyNDb21wb25lbnRfbmFtZSMjI10oIyMjQVVUSE9SV0VCU0lURSMjIykNCisgKkZpcnN0IEJ1aWxkKjogIyMjQ1JFQVRJT05EQVRFIyMjDQorICpMYXN0IEJ1aWxkKjogIyMjQlVJTEREQVRFIyMjDQorICpWZXJzaW9uKjogIyMjVkVSU0lPTiMjIw0KKyAqQ29weXJpZ2h0KjogIyMjQ09QWVJJR0hUIyMjDQorICpMaWNlbnNlKjogIyMjTElDRU5TRSMjIw0KDQojIyBCdWlsZCBUaW1lDQoNCioqIyMjdG90YWxIb3VycyMjIyBIb3VycyoqIG9yICoqIyMjdG90YWxEYXlzIyMjIEVpZ2h0IEhvdXIgRGF5cyoqIChhY3R1YWwgdGltZSB0aGUgYXV0aG9yIHNhdmVkIC0NCmR1ZSB0byBbQXV0b21hdGVkIENvbXBvbmVudCBCdWlsZGVyXShodHRwczovL3d3dy52ZG0uaW8vam9vbWxhLWNvbXBvbmVudC1idWlsZGVyKSkNCg0KPiAoaWYgY3JlYXRpbmcgYSBmb2xkZXIgYW5kIGZpbGUgdG9vayAqKjUgc2Vjb25kcyoqIGFuZCB3cml0aW5nIG9uZSBsaW5lIG9mIGNvZGUgdG9vayAqKjEwIHNlY29uZHMqKiwNCj4gbmV2ZXIgbWFraW5nIG9uZSBtaXN0YWtlIG9yIHRha2luZyBhbnkgY29mZmVlIGJyZWFrLikNCg0KKyAqTGluZSBjb3VudCo6ICoqIyMjTElORV9DT1VOVCMjIyoqDQorICpGaWxlIGNvdW50KjogKiojIyNGSUxFX0NPVU5UIyMjKioNCisgKkZvbGRlciBjb3VudCo6ICoqIyMjRk9MREVSX0NPVU5UIyMjKioNCg0KKiojIyNhY3R1YWxIb3Vyc1NwZW50IyMjIEhvdXJzKiogb3IgKiojIyNhY3R1YWxEYXlzU3BlbnQjIyMgRWlnaHQgSG91ciBEYXlzKiogKHRoZSBhY3R1YWwgdGltZSB0aGUgYXV0aG9yIHNwZW50KQ0KDQo+ICh3aXRoIHRoZSBmb2xsb3dpbmcgYnJlYWsgZG93bjoNCj4gKipkZWJ1Z2dpbmcgQCMjI2RlYnVnZ2luZ0hvdXJzIyMjaG91cnMqKiA9IGNvZGluZ3RpbWUgLyA0Ow0KPiAqKnBsYW5uaW5nIEAjIyNwbGFubmluZ0hvdXJzIyMjaG91cnMqKiA9IGNvZGluZ3RpbWUgLyA3Ow0KPiAqKm1hcHBpbmcgQCMjI21hcHBpbmdIb3VycyMjI2hvdXJzKiogPSBjb2Rpbmd0aW1lIC8gMTA7DQo+ICoqb2ZmaWNlIEAjIyNvZmZpY2VIb3VycyMjI2hvdXJzKiogPSBjb2Rpbmd0aW1lIC8gNjspDQoNCioqIyMjYWN0dWFsVG90YWxIb3VycyMjIyBIb3VycyoqIG9yICoqIyMjYWN0dWFsVG90YWxEYXlzIyMjIEVpZ2h0IEhvdXIgRGF5cyoqDQooYSB0b3RhbCBvZiB0aGUgcmVhbGlzdGljIHRpbWUgZnJhbWUgZm9yIHRoaXMgcHJvamVjdCkNCg0KPiAoaWYgY3JlYXRpbmcgYSBmb2xkZXIgYW5kIGZpbGUgdG9vayAqKjUgc2Vjb25kcyoqIGFuZCB3cml0aW5nIG9uZSBsaW5lIG9mIGNvZGUgdG9vayAqKjEwIHNlY29uZHMqKiwNCj4gd2l0aCB0aGUgbm9ybWFsIGV2ZXJ5ZGF5IHJlYWxpdGllcyBhdCB0aGUgb2ZmaWNlLCB0aGF0IGluY2x1ZGVzIHRoZSBjb21wb25lbnQgcGxhbm5pbmcsIG1hcHBpbmcgJiBkZWJ1Z2dpbmcuKQ0KDQpQcm9qZWN0IGR1cmF0aW9uOiAqKiMjI3Byb2plY3RXZWVrVGltZSMjIyB3ZWVrcyoqIG9yICoqIyMjcHJvamVjdE1vbnRoVGltZSMjIyBtb250aHMqKg0KDQo+IFRoaXMgKipjb21wb25lbnQqKiB3YXMgYnVpbGQgd2l0aCBhIEpvb21sYSBbQXV0b21hdGVkIENvbXBvbmVudCBCdWlsZGVyXShodHRwczovL3d3dy52ZG0uaW8vam9vbWxhLWNvbXBvbmVudC1idWlsZGVyKS4NCj4gRGV2ZWxvcGVkIGJ5IFtMbGV3ZWxseW4gdmFuIGRlciBNZXJ3ZV0obWFpbHRvOmpvb21sYUB2ZG0uaW8pDQoNCiMjIERvbmF0aW9ucw0KDQpJZiB5b3Ugd2FudCB0byBzdXBwb3J0IHRoaXMgcHJvamVjdCwgcGxlYXNlIGNvbnNpZGVyIGRvbmF0aW5nOg0KKiBQYXlQYWw6IFtwYXlwYWwubWUvcGF5dmRtXShodHRwczovL3d3dy5wYXlwYWwubWUvcGF5dmRtKQ0KKiBCaXRjb2luOiAxRkx4aVQ2d3l4Z1ozYm9ldmlMa1lKMURScHA0MXV6cHhhDQoqIEV0aGVyZXVtOiAweDI0MzM5MmRhYTNjOWM4YmM4NDFmY2FjZjdjN2Y3MjU0MWNiMTY4MjMg', 'Llewellyn van der Merwe', 'default.txt', '', '', 'Vast Development Method', '2.0.0', 'https://www.vdm.io/updates/demo_update_server.xml', 'Copyright (C) 2015. All Rights Reserved', '', '', '', '', 'Just a basic demo of the most basic implementations of the [Joomla](http://www.joomla.org) Component Builder\'s ability.', 'info@vdm.io', '', '', '', 'q59UiiKBVT2mWzkz3EPBrdIANxfa0dSmp+5sEgzgC+s=', 'images/vdm/demo500.jpg', '', 'GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html', 'Demo', 'Demo', '', 'demo', 4, '', '', 'CS8qKg0KCSAqCUNoYW5nZSB0byBuaWNlIGZhbmN5IGRhdGUNCgkgKi8NCglwdWJsaWMgc3RhdGljIGZ1bmN0aW9uIGZhbmN5RGF0ZSgkZGF0ZSkNCgl7DQoJCWlmICghc2VsZjo6aXNWYWxpZFRpbWVTdGFtcCgkZGF0ZSkpDQoJCXsNCgkJCSRkYXRlID0gc3RydG90aW1lKCRkYXRlKTsNCgkJfQ0KCQlyZXR1cm4gZGF0ZSgnalMgXG9cZiBGIFknLCRkYXRlKTsNCgl9DQoNCgkvKioNCgkgKglDaGFuZ2UgdG8gbmljZSBmYW5jeSB0aW1lIGFuZCBkYXRlDQoJICovDQoJcHVibGljIHN0YXRpYyBmdW5jdGlvbiBmYW5jeURhdGVUaW1lKCR0aW1lKQ0KCXsNCgkJaWYgKCFzZWxmOjppc1ZhbGlkVGltZVN0YW1wKCR0aW1lKSkNCgkJew0KCQkJJHRpbWUgPSBzdHJ0b3RpbWUoJHRpbWUpOw0KCQl9DQoJCXJldHVybiBkYXRlKCcoRzppKSBqUyBcb1xmIEYgWScsJHRpbWUpOw0KCX0NCg0KCS8qKg0KCSAqCUNoYW5nZSB0byBuaWNlIGhvdXI6bWludXRlcyB0aW1lDQoJICovDQoJcHVibGljIHN0YXRpYyBmdW5jdGlvbiBmYW5jeVRpbWUoJHRpbWUpDQoJew0KCQlpZiAoIXNlbGY6OmlzVmFsaWRUaW1lU3RhbXAoJHRpbWUpKQ0KCQl7DQoJCQkkdGltZSA9IHN0cnRvdGltZSgkdGltZSk7DQoJCX0NCgkJcmV0dXJuIGRhdGUoJ0c6aScsJHRpbWUpOw0KCX0NCg0KCS8qKg0KCSAqCUNoZWNrIGlmIHN0cmluZyBpcyBhIHZhbGlkIHRpbWUgc3RhbXANCgkgKi8NCglwdWJsaWMgc3RhdGljIGZ1bmN0aW9uIGlzVmFsaWRUaW1lU3RhbXAoJHRpbWVzdGFtcCkNCgl7DQoJCXJldHVybiAoKGludCkgJHRpbWVzdGFtcCA9PT0gJHRpbWVzdGFtcCkNCgkJJiYgKCR0aW1lc3RhbXAgPD0gUEhQX0lOVF9NQVgpDQoJCSYmICgkdGltZXN0YW1wID49IH5QSFBfSU5UX01BWCk7DQoJfQ0K', 'CQkvLyBHZXQgQXBwbGljYXRpb24gb2JqZWN0DQoJCSRhcHAgPSBKRmFjdG9yeTo6Z2V0QXBwbGljYXRpb24oKTsNCgkJJGFwcC0+ZW5xdWV1ZU1lc3NhZ2UoJ1RoaXMgaXMgYSBkZW1vIGNvbXBvbmVudCBkZXZlbG9wZWQgaW4gPGEgaHJlZj0iaHR0cDovL3ZkbS5iei9jb21wb25lbnQtYnVpbGRlciIgdGFnZXQ9Il9iYWxuayIgdGl0bGU9Ikpvb21sYSBDb21wb25lbnQgQnVpbGRlciI+SkNCPC9hPiEgWW91IGNhbiBidWlsZCBtb3JlIGNvbXBvbmVudHMgbGlrZSB0aGlzIHdpdGggSkNCLCBjaGVja291dCBvdXIgcGFnZSBvbiA8YSBocmVmPSJodHRwczovL2dpdGh1Yi5jb20vdmRtLWlvL0pvb21sYS1Db21wb25lbnQtQnVpbGRlciIgdGFnZXQ9Il9iYWxuayIgdGl0bGU9Ikpvb21sYSBDb21wb25lbnQgQnVpbGRlciI+Z2l0aHViPC9hPiBmb3IgbW9yZSBpbmZvLiBUaGUgZnV0dXJlIG9mIDxhIGhyZWY9Imh0dHA6Ly92ZG0uYnovY29tcG9uZW50LWJ1aWxkZXIiIHRhZ2V0PSJfYmFsbmsiIHRpdGxlPSJKb29tbGEgQ29tcG9uZW50IEJ1aWxkZXIiPkpvb21sYSBDb21wb25lbnQgRGV2ZWxvcG1lbnQ8L2E+IGlzIEhlcmUhJywgJ0luZm8nKTs=', '', '', '', '', 'Demo Component', '', 'https://www.vdm.io/', 1, '2016-10-18 11:44:09', '2017-08-25 00:36:01', '', 3, 'V6inNhoApqD2JvhSrOd+R/OzoW8mTod30wXoypEZacY=', ''); +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`, `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`, `debug_linenr`, `description`, `email`, `emptycontributors`, `export_buy_link`, `export_package_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`, `website`, `published`, `created`, `modified`, `hits`, `ordering`, `whmcs_key`, `whmcs_url`) VALUES +(25, '', 1, '', '', '', '', '', '', '', 1, 1, '', '', '', '', '', '', '', 1, '', '', 1, '', '', '', 2, 'https://www.vdm.io/updates/demo_update_server.xml', '', '', 1, 'IyAjIyNDb21wb25lbnRfbmFtZSMjIyAoIyMjVkVSU0lPTiMjIykNCg0KIVsjIyNDb21wb25lbnRfbmFtZSMjIyBpbWFnZV0oaHR0cHM6Ly9yYXcuZ2l0aHVidXNlcmNvbnRlbnQuY29tL25hbWliaWEvZGVtby1qb29tbGEtMy1jb21wb25lbnQvbWFzdGVyL2FkbWluL2Fzc2V0cy9pbWFnZXMvdmRtLWNvbXBvbmVudC5qcGcgIlRoZSAjIyNDb21wb25lbnRfbmFtZSMjIyIpDQoNCiMjI0RFU0NSSVBUSU9OIyMjDQoNCiMgQnVpbGQgRGV0YWlscw0KDQorICpDb21wYW55KjogWyMjI0NPTVBBTllOQU1FIyMjXSgjIyNBVVRIT1JXRUJTSVRFIyMjKQ0KKyAqQXV0aG9yKjogWyMjI0FVVEhPUiMjI10obWFpbHRvOiMjI0FVVEhPUkVNQUlMIyMjKQ0KKyAqTmFtZSo6IFsjIyNDb21wb25lbnRfbmFtZSMjI10oIyMjQVVUSE9SV0VCU0lURSMjIykNCisgKkZpcnN0IEJ1aWxkKjogIyMjQ1JFQVRJT05EQVRFIyMjDQorICpMYXN0IEJ1aWxkKjogIyMjQlVJTEREQVRFIyMjDQorICpWZXJzaW9uKjogIyMjVkVSU0lPTiMjIw0KKyAqQ29weXJpZ2h0KjogIyMjQ09QWVJJR0hUIyMjDQorICpMaWNlbnNlKjogIyMjTElDRU5TRSMjIw0KDQojIyBCdWlsZCBUaW1lDQoNCioqIyMjdG90YWxIb3VycyMjIyBIb3VycyoqIG9yICoqIyMjdG90YWxEYXlzIyMjIEVpZ2h0IEhvdXIgRGF5cyoqIChhY3R1YWwgdGltZSB0aGUgYXV0aG9yIHNhdmVkIC0NCmR1ZSB0byBbQXV0b21hdGVkIENvbXBvbmVudCBCdWlsZGVyXShodHRwczovL3d3dy52ZG0uaW8vam9vbWxhLWNvbXBvbmVudC1idWlsZGVyKSkNCg0KPiAoaWYgY3JlYXRpbmcgYSBmb2xkZXIgYW5kIGZpbGUgdG9vayAqKjUgc2Vjb25kcyoqIGFuZCB3cml0aW5nIG9uZSBsaW5lIG9mIGNvZGUgdG9vayAqKjEwIHNlY29uZHMqKiwNCj4gbmV2ZXIgbWFraW5nIG9uZSBtaXN0YWtlIG9yIHRha2luZyBhbnkgY29mZmVlIGJyZWFrLikNCg0KKyAqTGluZSBjb3VudCo6ICoqIyMjTElORV9DT1VOVCMjIyoqDQorICpGaWxlIGNvdW50KjogKiojIyNGSUxFX0NPVU5UIyMjKioNCisgKkZvbGRlciBjb3VudCo6ICoqIyMjRk9MREVSX0NPVU5UIyMjKioNCg0KKiojIyNhY3R1YWxIb3Vyc1NwZW50IyMjIEhvdXJzKiogb3IgKiojIyNhY3R1YWxEYXlzU3BlbnQjIyMgRWlnaHQgSG91ciBEYXlzKiogKHRoZSBhY3R1YWwgdGltZSB0aGUgYXV0aG9yIHNwZW50KQ0KDQo+ICh3aXRoIHRoZSBmb2xsb3dpbmcgYnJlYWsgZG93bjoNCj4gKipkZWJ1Z2dpbmcgQCMjI2RlYnVnZ2luZ0hvdXJzIyMjaG91cnMqKiA9IGNvZGluZ3RpbWUgLyA0Ow0KPiAqKnBsYW5uaW5nIEAjIyNwbGFubmluZ0hvdXJzIyMjaG91cnMqKiA9IGNvZGluZ3RpbWUgLyA3Ow0KPiAqKm1hcHBpbmcgQCMjI21hcHBpbmdIb3VycyMjI2hvdXJzKiogPSBjb2Rpbmd0aW1lIC8gMTA7DQo+ICoqb2ZmaWNlIEAjIyNvZmZpY2VIb3VycyMjI2hvdXJzKiogPSBjb2Rpbmd0aW1lIC8gNjspDQoNCioqIyMjYWN0dWFsVG90YWxIb3VycyMjIyBIb3VycyoqIG9yICoqIyMjYWN0dWFsVG90YWxEYXlzIyMjIEVpZ2h0IEhvdXIgRGF5cyoqDQooYSB0b3RhbCBvZiB0aGUgcmVhbGlzdGljIHRpbWUgZnJhbWUgZm9yIHRoaXMgcHJvamVjdCkNCg0KPiAoaWYgY3JlYXRpbmcgYSBmb2xkZXIgYW5kIGZpbGUgdG9vayAqKjUgc2Vjb25kcyoqIGFuZCB3cml0aW5nIG9uZSBsaW5lIG9mIGNvZGUgdG9vayAqKjEwIHNlY29uZHMqKiwNCj4gd2l0aCB0aGUgbm9ybWFsIGV2ZXJ5ZGF5IHJlYWxpdGllcyBhdCB0aGUgb2ZmaWNlLCB0aGF0IGluY2x1ZGVzIHRoZSBjb21wb25lbnQgcGxhbm5pbmcsIG1hcHBpbmcgJiBkZWJ1Z2dpbmcuKQ0KDQpQcm9qZWN0IGR1cmF0aW9uOiAqKiMjI3Byb2plY3RXZWVrVGltZSMjIyB3ZWVrcyoqIG9yICoqIyMjcHJvamVjdE1vbnRoVGltZSMjIyBtb250aHMqKg0KDQo+IFRoaXMgKipjb21wb25lbnQqKiB3YXMgYnVpbGQgd2l0aCBhIEpvb21sYSBbQXV0b21hdGVkIENvbXBvbmVudCBCdWlsZGVyXShodHRwczovL3d3dy52ZG0uaW8vam9vbWxhLWNvbXBvbmVudC1idWlsZGVyKS4NCj4gRGV2ZWxvcGVkIGJ5IFtMbGV3ZWxseW4gdmFuIGRlciBNZXJ3ZV0obWFpbHRvOmpvb21sYUB2ZG0uaW8pDQoNCiMjIERvbmF0aW9ucw0KDQpJZiB5b3Ugd2FudCB0byBzdXBwb3J0IHRoaXMgcHJvamVjdCwgcGxlYXNlIGNvbnNpZGVyIGRvbmF0aW5nOg0KKiBQYXlQYWw6IFtwYXlwYWwubWUvcGF5dmRtXShodHRwczovL3d3dy5wYXlwYWwubWUvcGF5dmRtKQ0KKiBCaXRjb2luOiAxRkx4aVQ2d3l4Z1ozYm9ldmlMa1lKMURScHA0MXV6cHhhDQoqIEV0aGVyZXVtOiAweDI0MzM5MmRhYTNjOWM4YmM4NDFmY2FjZjdjN2Y3MjU0MWNiMTY4MjMg', 'Llewellyn van der Merwe', 'default.txt', '', '', 'Vast Development Method', '2.0.0', 'Copyright (C) 2015. All Rights Reserved', '', '', '', '', 'Just a basic demo of the most basic implementations of the [Joomla](http://www.joomla.org) Component Builder\'s ability.', 'info@vdm.io', '', '', '', 'q59UiiKBVT2mWzkz3EPBrdIANxfa0dSmp+5sEgzgC+s=', 'images/vdm/demo500.jpg', '', 'GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html', 'Demo', 'Demo', '', 'demo', 4, '', '', 'CS8qKg0KCSAqCUNoYW5nZSB0byBuaWNlIGZhbmN5IGRhdGUNCgkgKi8NCglwdWJsaWMgc3RhdGljIGZ1bmN0aW9uIGZhbmN5RGF0ZSgkZGF0ZSkNCgl7DQoJCWlmICghc2VsZjo6aXNWYWxpZFRpbWVTdGFtcCgkZGF0ZSkpDQoJCXsNCgkJCSRkYXRlID0gc3RydG90aW1lKCRkYXRlKTsNCgkJfQ0KCQlyZXR1cm4gZGF0ZSgnalMgXG9cZiBGIFknLCRkYXRlKTsNCgl9DQoNCgkvKioNCgkgKglDaGFuZ2UgdG8gbmljZSBmYW5jeSB0aW1lIGFuZCBkYXRlDQoJICovDQoJcHVibGljIHN0YXRpYyBmdW5jdGlvbiBmYW5jeURhdGVUaW1lKCR0aW1lKQ0KCXsNCgkJaWYgKCFzZWxmOjppc1ZhbGlkVGltZVN0YW1wKCR0aW1lKSkNCgkJew0KCQkJJHRpbWUgPSBzdHJ0b3RpbWUoJHRpbWUpOw0KCQl9DQoJCXJldHVybiBkYXRlKCcoRzppKSBqUyBcb1xmIEYgWScsJHRpbWUpOw0KCX0NCg0KCS8qKg0KCSAqCUNoYW5nZSB0byBuaWNlIGhvdXI6bWludXRlcyB0aW1lDQoJICovDQoJcHVibGljIHN0YXRpYyBmdW5jdGlvbiBmYW5jeVRpbWUoJHRpbWUpDQoJew0KCQlpZiAoIXNlbGY6OmlzVmFsaWRUaW1lU3RhbXAoJHRpbWUpKQ0KCQl7DQoJCQkkdGltZSA9IHN0cnRvdGltZSgkdGltZSk7DQoJCX0NCgkJcmV0dXJuIGRhdGUoJ0c6aScsJHRpbWUpOw0KCX0NCg0KCS8qKg0KCSAqCUNoZWNrIGlmIHN0cmluZyBpcyBhIHZhbGlkIHRpbWUgc3RhbXANCgkgKi8NCglwdWJsaWMgc3RhdGljIGZ1bmN0aW9uIGlzVmFsaWRUaW1lU3RhbXAoJHRpbWVzdGFtcCkNCgl7DQoJCXJldHVybiAoKGludCkgJHRpbWVzdGFtcCA9PT0gJHRpbWVzdGFtcCkNCgkJJiYgKCR0aW1lc3RhbXAgPD0gUEhQX0lOVF9NQVgpDQoJCSYmICgkdGltZXN0YW1wID49IH5QSFBfSU5UX01BWCk7DQoJfQ0K', 'CQkvLyBHZXQgQXBwbGljYXRpb24gb2JqZWN0DQoJCSRhcHAgPSBKRmFjdG9yeTo6Z2V0QXBwbGljYXRpb24oKTsNCgkJJGFwcC0+ZW5xdWV1ZU1lc3NhZ2UoJ1RoaXMgaXMgYSBkZW1vIGNvbXBvbmVudCBkZXZlbG9wZWQgaW4gPGEgaHJlZj0iaHR0cDovL3ZkbS5iei9jb21wb25lbnQtYnVpbGRlciIgdGFnZXQ9Il9iYWxuayIgdGl0bGU9Ikpvb21sYSBDb21wb25lbnQgQnVpbGRlciI+SkNCPC9hPiEgWW91IGNhbiBidWlsZCBtb3JlIGNvbXBvbmVudHMgbGlrZSB0aGlzIHdpdGggSkNCLCBjaGVja291dCBvdXIgcGFnZSBvbiA8YSBocmVmPSJodHRwczovL2dpdGh1Yi5jb20vdmRtLWlvL0pvb21sYS1Db21wb25lbnQtQnVpbGRlciIgdGFnZXQ9Il9iYWxuayIgdGl0bGU9Ikpvb21sYSBDb21wb25lbnQgQnVpbGRlciI+Z2l0aHViPC9hPiBmb3IgbW9yZSBpbmZvLiBUaGUgZnV0dXJlIG9mIDxhIGhyZWY9Imh0dHA6Ly92ZG0uYnovY29tcG9uZW50LWJ1aWxkZXIiIHRhZ2V0PSJfYmFsbmsiIHRpdGxlPSJKb29tbGEgQ29tcG9uZW50IEJ1aWxkZXIiPkpvb21sYSBDb21wb25lbnQgRGV2ZWxvcG1lbnQ8L2E+IGlzIEhlcmUhJywgJ0luZm8nKTs=', '', '', '', '', 'Demo Component', '', 'https://www.vdm.io/', 1, '2016-10-18 11:44:09', '2017-08-25 00:36:01', '', 3, 'V6inNhoApqD2JvhSrOd+R/OzoW8mTod30wXoypEZacY=', ''); -- -- Dumping data for table `#__componentbuilder_admin_view` diff --git a/admin/sql/uninstall.mysql.utf8.sql b/admin/sql/uninstall.mysql.utf8.sql index 1b44b007d..8e7f5563c 100644 --- a/admin/sql/uninstall.mysql.utf8.sql +++ b/admin/sql/uninstall.mysql.utf8.sql @@ -12,7 +12,7 @@ DROP TABLE IF EXISTS `#__componentbuilder_field`; DROP TABLE IF EXISTS `#__componentbuilder_fieldtype`; DROP TABLE IF EXISTS `#__componentbuilder_language_translation`; DROP TABLE IF EXISTS `#__componentbuilder_language`; -DROP TABLE IF EXISTS `#__componentbuilder_ftp`; +DROP TABLE IF EXISTS `#__componentbuilder_server`; DROP TABLE IF EXISTS `#__componentbuilder_help_document`; DROP TABLE IF EXISTS `#__componentbuilder_admin_fields`; DROP TABLE IF EXISTS `#__componentbuilder_admin_fields_conditions`; diff --git a/admin/sql/updates/mysql/2.6.14.sql b/admin/sql/updates/mysql/2.6.14.sql new file mode 100644 index 000000000..5e90adb5e --- /dev/null +++ b/admin/sql/updates/mysql/2.6.14.sql @@ -0,0 +1,18 @@ +RENAME TABLE `#__componentbuilder_ftp` to `#__componentbuilder_server`; + +ALTER TABLE `#__componentbuilder_server` ADD `host` TEXT NOT NULL AFTER `asset_id`; +ALTER TABLE `#__componentbuilder_server` ADD `authentication` TINYINT(1) NOT NULL DEFAULT 0 AFTER `asset_id`; +ALTER TABLE `#__componentbuilder_server` ADD `password` TEXT NOT NULL AFTER `name`; +ALTER TABLE `#__componentbuilder_server` ADD `path` TEXT NOT NULL AFTER `password`; +ALTER TABLE `#__componentbuilder_server` ADD `port` TEXT NOT NULL AFTER `path`; +ALTER TABLE `#__componentbuilder_server` ADD `private` TEXT NOT NULL AFTER `port`; +ALTER TABLE `#__componentbuilder_server` ADD `protocol` TINYINT(1) NOT NULL DEFAULT 0 AFTER `private`; +ALTER TABLE `#__componentbuilder_server` ADD `public` TEXT NOT NULL AFTER `protocol`; +ALTER TABLE `#__componentbuilder_server` ADD `secret` TEXT NOT NULL AFTER `public`; +ALTER TABLE `#__componentbuilder_server` ADD `username` TEXT NOT NULL AFTER `signature`; + +ALTER TABLE `#__componentbuilder_joomla_component` CHANGE `update_server` `update_server_url` VARCHAR(255) NOT NULL DEFAULT ''; +ALTER TABLE `#__componentbuilder_joomla_component` CHANGE `sales_server_ftp` `sales_server` INT(11) NOT NULL DEFAULT 0; +ALTER TABLE `#__componentbuilder_joomla_component` CHANGE `update_server_ftp` `update_server` INT(11) NOT NULL DEFAULT 0; + +UPDATE `#__componentbuilder_server` SET `protocol` = 1; diff --git a/admin/tables/ftp.php b/admin/tables/server.php similarity index 89% rename from admin/tables/ftp.php rename to admin/tables/server.php index 5a0f976d0..f07b27df3 100644 --- a/admin/tables/ftp.php +++ b/admin/tables/server.php @@ -13,7 +13,7 @@ @version 2.6.x @created 30th April, 2015 @package Component Builder - @subpackage ftp.php + @subpackage server.php @author Llewellyn van der Merwe @github Joomla Component Builder @copyright Copyright (C) 2015. All Rights Reserved @@ -32,9 +32,9 @@ use Joomla\Registry\Registry; jimport('joomla.database.table'); /** - * Ftps Table class + * Servers Table class */ -class ComponentbuilderTableFtp extends JTable +class ComponentbuilderTableServer extends JTable { /** * Ensure the params and metadata in json encoded in the bind method @@ -51,10 +51,10 @@ class ComponentbuilderTableFtp extends JTable */ function __construct(&$db) { - parent::__construct('#__componentbuilder_ftp', 'id', $db); + parent::__construct('#__componentbuilder_server', 'id', $db); // Adding History Options - JTableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_componentbuilder.ftp')); + JTableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_componentbuilder.server')); } public function bind($array, $ignore = '') @@ -84,7 +84,7 @@ class ComponentbuilderTableFtp extends JTable } /** - * Overload the store method for the Ftp table. + * Overload the store method for the Server table. * * @param boolean Toggle whether null values should be updated. * @return boolean True on success, false on failure. @@ -103,7 +103,7 @@ class ComponentbuilderTableFtp extends JTable } else { - // New ftp. A ftp created and created_by field can be set by the user, + // New server. A server 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) { @@ -118,11 +118,11 @@ class ComponentbuilderTableFtp extends JTable if (isset($this->alias)) { // Verify that the alias is unique - $table = JTable::getInstance('ftp', 'ComponentbuilderTable'); + $table = JTable::getInstance('server', 'ComponentbuilderTable'); if ($table->load(array('alias' => $this->alias)) && ($table->id != $this->id || $this->id == 0)) { - $this->setError(JText::_('COM_COMPONENTBUILDER_FTP_ERROR_UNIQUE_ALIAS')); + $this->setError(JText::_('COM_COMPONENTBUILDER_SERVER_ERROR_UNIQUE_ALIAS')); return false; } } @@ -153,7 +153,7 @@ class ComponentbuilderTableFtp extends JTable // Generate a valid alias $this->generateAlias(); - $table = JTable::getInstance('ftp', 'componentbuilderTable'); + $table = JTable::getInstance('server', 'componentbuilderTable'); while ($table->load(array('alias' => $this->alias)) && ($table->id != $this->id || $this->id == 0)) { @@ -202,7 +202,7 @@ class ComponentbuilderTableFtp extends JTable // 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.ftp.'.$this->id); + $rules = $this->getDefaultAssetValues('com_componentbuilder.server.'.$this->id); $this->setRules($rules); } @@ -293,7 +293,7 @@ class ComponentbuilderTableFtp extends JTable protected function _getAssetName() { $k = $this->_tbl_key; - return 'com_componentbuilder.ftp.'.(int) $this->$k; + return 'com_componentbuilder.server.'.(int) $this->$k; } /** diff --git a/admin/views/ftp/tmpl/edit.php b/admin/views/ftp/tmpl/edit.php deleted file mode 100644 index 0f3ba2b7e..000000000 --- a/admin/views/ftp/tmpl/edit.php +++ /dev/null @@ -1,129 +0,0 @@ - - @github Joomla Component Builder - @copyright Copyright (C) 2015. All Rights Reserved - @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - - Builds Complex Joomla Components - -/-----------------------------------------------------------------------------------------------------------------------------*/ - -// No direct access to this file -defined('_JEXEC') or die('Restricted access'); - -JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html'); -JHtml::_('behavior.tooltip'); -JHtml::_('behavior.formvalidation'); -JHtml::_('formbehavior.chosen', 'select'); -JHtml::_('behavior.keepalive'); -$componentParams = JComponentHelper::getParams('com_componentbuilder'); -?> - - - - diff --git a/admin/views/help_document/tmpl/edit.php b/admin/views/help_document/tmpl/edit.php index 08456971f..5361997e2 100644 --- a/admin/views/help_document/tmpl/edit.php +++ b/admin/views/help_document/tmpl/edit.php @@ -127,93 +127,93 @@ $componentParams = JComponentHelper::getParams('com_componentbuilder'); + + + + + diff --git a/admin/views/ftp/tmpl/index.html b/admin/views/server/tmpl/index.html similarity index 100% rename from admin/views/ftp/tmpl/index.html rename to admin/views/server/tmpl/index.html diff --git a/admin/views/ftp/view.html.php b/admin/views/server/view.html.php similarity index 74% rename from admin/views/ftp/view.html.php rename to admin/views/server/view.html.php index 4d7f321be..49944c97c 100644 --- a/admin/views/ftp/view.html.php +++ b/admin/views/server/view.html.php @@ -30,9 +30,9 @@ defined('_JEXEC') or die('Restricted access'); jimport('joomla.application.component.view'); /** - * Ftp View class + * Server View class */ -class ComponentbuilderViewFtp extends JViewLegacy +class ComponentbuilderViewServer extends JViewLegacy { /** * display method of View @@ -46,7 +46,7 @@ class ComponentbuilderViewFtp extends JViewLegacy $this->script = $this->get('Script'); $this->state = $this->get('State'); // get action permissions - $this->canDo = ComponentbuilderHelper::getActions('ftp',$this->item); + $this->canDo = ComponentbuilderHelper::getActions('server',$this->item); // get input $jinput = JFactory::getApplication()->input; $this->ref = $jinput->get('ref', 0, 'word'); @@ -64,7 +64,7 @@ class ComponentbuilderViewFtp extends JViewLegacy } // Get Linked view data - $this->waelinked_components = $this->get('Waelinked_components'); + $this->waplinked_components = $this->get('Waplinked_components'); // Set the toolbar $this->addToolBar(); @@ -93,29 +93,29 @@ class ComponentbuilderViewFtp extends JViewLegacy $userId = $user->id; $isNew = $this->item->id == 0; - JToolbarHelper::title( JText::_($isNew ? 'COM_COMPONENTBUILDER_FTP_NEW' : 'COM_COMPONENTBUILDER_FTP_EDIT'), 'pencil-2 article-add'); + JToolbarHelper::title( JText::_($isNew ? 'COM_COMPONENTBUILDER_SERVER_NEW' : 'COM_COMPONENTBUILDER_SERVER_EDIT'), 'pencil-2 article-add'); // Built the actions for new and existing records. if ($this->refid || $this->ref) { - if ($this->canDo->get('ftp.create') && $isNew) + if ($this->canDo->get('server.create') && $isNew) { // We can create the record. - JToolBarHelper::save('ftp.save', 'JTOOLBAR_SAVE'); + JToolBarHelper::save('server.save', 'JTOOLBAR_SAVE'); } - elseif ($this->canDo->get('ftp.edit')) + elseif ($this->canDo->get('server.edit')) { // We can save the record. - JToolBarHelper::save('ftp.save', 'JTOOLBAR_SAVE'); + JToolBarHelper::save('server.save', 'JTOOLBAR_SAVE'); } if ($isNew) { // Do not creat but cancel. - JToolBarHelper::cancel('ftp.cancel', 'JTOOLBAR_CANCEL'); + JToolBarHelper::cancel('server.cancel', 'JTOOLBAR_CANCEL'); } else { // We can close it. - JToolBarHelper::cancel('ftp.cancel', 'JTOOLBAR_CLOSE'); + JToolBarHelper::cancel('server.cancel', 'JTOOLBAR_CLOSE'); } } else @@ -123,43 +123,43 @@ class ComponentbuilderViewFtp extends JViewLegacy if ($isNew) { // For new records, check the create permission. - if ($this->canDo->get('ftp.create')) + if ($this->canDo->get('server.create')) { - JToolBarHelper::apply('ftp.apply', 'JTOOLBAR_APPLY'); - JToolBarHelper::save('ftp.save', 'JTOOLBAR_SAVE'); - JToolBarHelper::custom('ftp.save2new', 'save-new.png', 'save-new_f2.png', 'JTOOLBAR_SAVE_AND_NEW', false); + JToolBarHelper::apply('server.apply', 'JTOOLBAR_APPLY'); + JToolBarHelper::save('server.save', 'JTOOLBAR_SAVE'); + JToolBarHelper::custom('server.save2new', 'save-new.png', 'save-new_f2.png', 'JTOOLBAR_SAVE_AND_NEW', false); }; - JToolBarHelper::cancel('ftp.cancel', 'JTOOLBAR_CANCEL'); + JToolBarHelper::cancel('server.cancel', 'JTOOLBAR_CANCEL'); } else { - if ($this->canDo->get('ftp.edit')) + if ($this->canDo->get('server.edit')) { // We can save the new record - JToolBarHelper::apply('ftp.apply', 'JTOOLBAR_APPLY'); - JToolBarHelper::save('ftp.save', 'JTOOLBAR_SAVE'); + JToolBarHelper::apply('server.apply', 'JTOOLBAR_APPLY'); + JToolBarHelper::save('server.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('ftp.create')) + if ($this->canDo->get('server.create')) { - JToolBarHelper::custom('ftp.save2new', 'save-new.png', 'save-new_f2.png', 'JTOOLBAR_SAVE_AND_NEW', false); + JToolBarHelper::custom('server.save2new', 'save-new.png', 'save-new_f2.png', 'JTOOLBAR_SAVE_AND_NEW', false); } } - $canVersion = ($this->canDo->get('core.version') && $this->canDo->get('ftp.version')); - if ($this->state->params->get('save_history', 1) && $this->canDo->get('ftp.edit') && $canVersion) + $canVersion = ($this->canDo->get('core.version') && $this->canDo->get('server.version')); + if ($this->state->params->get('save_history', 1) && $this->canDo->get('server.edit') && $canVersion) { - JToolbarHelper::versions('com_componentbuilder.ftp', $this->item->id); + JToolbarHelper::versions('com_componentbuilder.server', $this->item->id); } - if ($this->canDo->get('ftp.create')) + if ($this->canDo->get('server.create')) { - JToolBarHelper::custom('ftp.save2copy', 'save-copy.png', 'save-copy_f2.png', 'JTOOLBAR_SAVE_AS_COPY', false); + JToolBarHelper::custom('server.save2copy', 'save-copy.png', 'save-copy_f2.png', 'JTOOLBAR_SAVE_AS_COPY', false); } - JToolBarHelper::cancel('ftp.cancel', 'JTOOLBAR_CLOSE'); + JToolBarHelper::cancel('server.cancel', 'JTOOLBAR_CLOSE'); } } JToolbarHelper::divider(); // set help url for this view if found - $help_url = ComponentbuilderHelper::getHelpUrl('ftp'); + $help_url = ComponentbuilderHelper::getHelpUrl('server'); if (ComponentbuilderHelper::checkString($help_url)) { JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url); @@ -196,8 +196,8 @@ class ComponentbuilderViewFtp extends JViewLegacy { $this->document = JFactory::getDocument(); } - $this->document->setTitle(JText::_($isNew ? 'COM_COMPONENTBUILDER_FTP_NEW' : 'COM_COMPONENTBUILDER_FTP_EDIT')); - $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/ftp.css", (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); + $this->document->setTitle(JText::_($isNew ? 'COM_COMPONENTBUILDER_SERVER_NEW' : 'COM_COMPONENTBUILDER_SERVER_EDIT')); + $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/server.css", (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); // Add the CSS for Footable $this->document->addStyleSheet('https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css'); @@ -209,7 +209,7 @@ class ComponentbuilderViewFtp extends JViewLegacy $this->document->addScriptDeclaration($footable); $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/ftp/submitbutton.js", (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/server/submitbutton.js", (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); JText::script('view not acceptable. Error'); } } diff --git a/admin/views/ftps/index.html b/admin/views/servers/index.html similarity index 100% rename from admin/views/ftps/index.html rename to admin/views/servers/index.html diff --git a/admin/views/ftps/tmpl/default.php b/admin/views/servers/tmpl/default.php similarity index 89% rename from admin/views/ftps/tmpl/default.php rename to admin/views/servers/tmpl/default.php index 33d6a9d6a..f2195d4f6 100644 --- a/admin/views/ftps/tmpl/default.php +++ b/admin/views/servers/tmpl/default.php @@ -34,8 +34,8 @@ JHtml::_('formbehavior.chosen', 'select'); if ($this->saveOrder) { - $saveOrderingUrl = 'index.php?option=com_componentbuilder&task=ftps.saveOrderAjax&tmpl=component'; - JHtml::_('sortablelist.sortable', 'ftpList', 'adminForm', strtolower($this->listDirn), $saveOrderingUrl); + $saveOrderingUrl = 'index.php?option=com_componentbuilder&task=servers.saveOrderAjax&tmpl=component'; + JHtml::_('sortablelist.sortable', 'serverList', 'adminForm', strtolower($this->listDirn), $saveOrderingUrl); } ?> @@ -56,7 +56,7 @@ if ($this->saveOrder) Joomla.tableOrdering(order, dirn, ''); } -
+ sidebar)): ?>
sidebar; ?> @@ -72,7 +72,7 @@ if ($this->saveOrder)
loadTemplate('toolbar');?> - +
loadTemplate('head');?>loadTemplate('foot');?>loadTemplate('body');?> @@ -83,7 +83,7 @@ if ($this->saveOrder) 'bootstrap.renderModal', 'collapseModal', array( - 'title' => JText::_('COM_COMPONENTBUILDER_FTPS_BATCH_OPTIONS'), + 'title' => JText::_('COM_COMPONENTBUILDER_SERVERS_BATCH_OPTIONS'), 'footer' => $this->loadTemplate('batch_footer') ), $this->loadTemplate('batch_body') diff --git a/admin/views/ftps/tmpl/default_batch_body.php b/admin/views/servers/tmpl/default_batch_body.php similarity index 93% rename from admin/views/ftps/tmpl/default_batch_body.php rename to admin/views/servers/tmpl/default_batch_body.php index 26c66be6a..caf0cddd7 100644 --- a/admin/views/ftps/tmpl/default_batch_body.php +++ b/admin/views/servers/tmpl/default_batch_body.php @@ -28,5 +28,5 @@ defined('_JEXEC') or die('Restricted access'); ?> -

+

batchDisplay; ?> \ No newline at end of file diff --git a/admin/views/ftps/tmpl/default_batch_footer.php b/admin/views/servers/tmpl/default_batch_footer.php similarity index 96% rename from admin/views/ftps/tmpl/default_batch_footer.php rename to admin/views/servers/tmpl/default_batch_footer.php index f1866380a..61c554033 100644 --- a/admin/views/ftps/tmpl/default_batch_footer.php +++ b/admin/views/servers/tmpl/default_batch_footer.php @@ -32,6 +32,6 @@ defined('_JEXEC') or die('Restricted access'); - \ No newline at end of file diff --git a/admin/views/ftps/tmpl/default_body.php b/admin/views/servers/tmpl/default_body.php similarity index 86% rename from admin/views/ftps/tmpl/default_body.php rename to admin/views/servers/tmpl/default_body.php index 7efb42561..97541fbcf 100644 --- a/admin/views/ftps/tmpl/default_body.php +++ b/admin/views/servers/tmpl/default_body.php @@ -26,18 +26,18 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); -$edit = "index.php?option=com_componentbuilder&view=ftps&task=ftp.edit"; +$edit = "index.php?option=com_componentbuilder&view=servers&task=server.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('ftp',$item,'ftps'); + $canDo = ComponentbuilderHelper::getActions('server',$item,'servers'); ?> + - + \ No newline at end of file diff --git a/admin/views/ftps/tmpl/default_head.php b/admin/views/servers/tmpl/default_head.php similarity index 80% rename from admin/views/ftps/tmpl/default_head.php rename to admin/views/servers/tmpl/default_head.php index cef811d57..04adef085 100644 --- a/admin/views/ftps/tmpl/default_head.php +++ b/admin/views/servers/tmpl/default_head.php @@ -44,18 +44,21 @@ defined('_JEXEC') or die('Restricted access'); + canState): ?> \ No newline at end of file diff --git a/admin/views/ftps/tmpl/default_toolbar.php b/admin/views/servers/tmpl/default_toolbar.php similarity index 97% rename from admin/views/ftps/tmpl/default_toolbar.php rename to admin/views/servers/tmpl/default_toolbar.php index c7942c13f..58647c999 100644 --- a/admin/views/ftps/tmpl/default_toolbar.php +++ b/admin/views/servers/tmpl/default_toolbar.php @@ -30,7 +30,7 @@ defined('_JEXEC') or die('Restricted access');
diff --git a/admin/views/ftps/tmpl/index.html b/admin/views/servers/tmpl/index.html similarity index 100% rename from admin/views/ftps/tmpl/index.html rename to admin/views/servers/tmpl/index.html diff --git a/admin/views/ftps/view.html.php b/admin/views/servers/view.html.php similarity index 67% rename from admin/views/ftps/view.html.php rename to admin/views/servers/view.html.php index dd5bd6ed4..cad9e42bf 100644 --- a/admin/views/ftps/view.html.php +++ b/admin/views/servers/view.html.php @@ -30,12 +30,12 @@ defined('_JEXEC') or die('Restricted access'); jimport('joomla.application.component.view'); /** - * Componentbuilder View class for the Ftps + * Componentbuilder View class for the Servers */ -class ComponentbuilderViewFtps extends JViewLegacy +class ComponentbuilderViewServers extends JViewLegacy { /** - * Ftps view display method + * Servers view display method * @return void */ function display($tpl = null) @@ -43,7 +43,7 @@ class ComponentbuilderViewFtps extends JViewLegacy if ($this->getLayout() !== 'modal') { // Include helper submenu - ComponentbuilderHelper::addSubmenu('ftps'); + ComponentbuilderHelper::addSubmenu('servers'); } // Assign data to the view @@ -55,11 +55,11 @@ class ComponentbuilderViewFtps extends JViewLegacy $this->listDirn = $this->escape($this->state->get('list.direction')); $this->saveOrder = $this->listOrder == 'ordering'; // get global action permissions - $this->canDo = ComponentbuilderHelper::getActions('ftp'); - $this->canEdit = $this->canDo->get('ftp.edit'); - $this->canState = $this->canDo->get('ftp.edit.state'); - $this->canCreate = $this->canDo->get('ftp.create'); - $this->canDelete = $this->canDo->get('ftp.delete'); + $this->canDo = ComponentbuilderHelper::getActions('server'); + $this->canEdit = $this->canDo->get('server.edit'); + $this->canState = $this->canDo->get('server.edit.state'); + $this->canCreate = $this->canDo->get('server.create'); + $this->canDelete = $this->canDo->get('server.delete'); $this->canBatch = $this->canDo->get('core.batch'); // We don't need toolbar in the modal window. @@ -92,13 +92,13 @@ class ComponentbuilderViewFtps extends JViewLegacy */ protected function addToolBar() { - JToolBarHelper::title(JText::_('COM_COMPONENTBUILDER_FTPS'), 'flash'); - JHtmlSidebar::setAction('index.php?option=com_componentbuilder&view=ftps'); + JToolBarHelper::title(JText::_('COM_COMPONENTBUILDER_SERVERS'), 'flash'); + JHtmlSidebar::setAction('index.php?option=com_componentbuilder&view=servers'); JFormHelper::addFieldPath(JPATH_COMPONENT . '/models/fields'); if ($this->canCreate) { - JToolBarHelper::addNew('ftp.add'); + JToolBarHelper::addNew('server.add'); } // Only load if there are items @@ -106,18 +106,18 @@ class ComponentbuilderViewFtps extends JViewLegacy { if ($this->canEdit) { - JToolBarHelper::editList('ftp.edit'); + JToolBarHelper::editList('server.edit'); } if ($this->canState) { - JToolBarHelper::publishList('ftps.publish'); - JToolBarHelper::unpublishList('ftps.unpublish'); - JToolBarHelper::archiveList('ftps.archive'); + JToolBarHelper::publishList('servers.publish'); + JToolBarHelper::unpublishList('servers.unpublish'); + JToolBarHelper::archiveList('servers.archive'); if ($this->canDo->get('core.admin')) { - JToolBarHelper::checkin('ftps.checkin'); + JToolBarHelper::checkin('servers.checkin'); } } @@ -137,26 +137,26 @@ class ComponentbuilderViewFtps extends JViewLegacy if ($this->state->get('filter.published') == -2 && ($this->canState && $this->canDelete)) { - JToolbarHelper::deleteList('', 'ftps.delete', 'JTOOLBAR_EMPTY_TRASH'); + JToolbarHelper::deleteList('', 'servers.delete', 'JTOOLBAR_EMPTY_TRASH'); } elseif ($this->canState && $this->canDelete) { - JToolbarHelper::trash('ftps.trash'); + JToolbarHelper::trash('servers.trash'); } - if ($this->canDo->get('core.export') && $this->canDo->get('ftp.export')) + if ($this->canDo->get('core.export') && $this->canDo->get('server.export')) { - JToolBarHelper::custom('ftps.exportData', 'download', '', 'COM_COMPONENTBUILDER_EXPORT_DATA', true); + JToolBarHelper::custom('servers.exportData', 'download', '', 'COM_COMPONENTBUILDER_EXPORT_DATA', true); } } - if ($this->canDo->get('core.import') && $this->canDo->get('ftp.import')) + if ($this->canDo->get('core.import') && $this->canDo->get('server.import')) { - JToolBarHelper::custom('ftps.importData', 'upload', '', 'COM_COMPONENTBUILDER_IMPORT_DATA', false); + JToolBarHelper::custom('servers.importData', 'upload', '', 'COM_COMPONENTBUILDER_IMPORT_DATA', false); } // set help url for this view if found - $help_url = ComponentbuilderHelper::getHelpUrl('ftps'); + $help_url = ComponentbuilderHelper::getHelpUrl('servers'); if (ComponentbuilderHelper::checkString($help_url)) { JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url); @@ -207,7 +207,7 @@ class ComponentbuilderViewFtps extends JViewLegacy { // Name Filter JHtmlSidebar::addFilter( - '- Select '.JText::_('COM_COMPONENTBUILDER_FTP_NAME_LABEL').' -', + '- Select '.JText::_('COM_COMPONENTBUILDER_SERVER_NAME_LABEL').' -', 'filter_name', JHtml::_('select.options', $this->nameOptions, 'value', 'text', $this->state->get('filter.name')) ); @@ -216,11 +216,33 @@ class ComponentbuilderViewFtps extends JViewLegacy { // Name Batch Selection JHtmlBatch_::addListSelection( - '- Keep Original '.JText::_('COM_COMPONENTBUILDER_FTP_NAME_LABEL').' -', + '- Keep Original '.JText::_('COM_COMPONENTBUILDER_SERVER_NAME_LABEL').' -', 'batch[name]', JHtml::_('select.options', $this->nameOptions, 'value', 'text') ); } + } + + // Set Protocol Selection + $this->protocolOptions = $this->getTheProtocolSelections(); + if ($this->protocolOptions) + { + // Protocol Filter + JHtmlSidebar::addFilter( + '- Select '.JText::_('COM_COMPONENTBUILDER_SERVER_PROTOCOL_LABEL').' -', + 'filter_protocol', + JHtml::_('select.options', $this->protocolOptions, 'value', 'text', $this->state->get('filter.protocol')) + ); + + if ($this->canBatch && $this->canCreate && $this->canEdit) + { + // Protocol Batch Selection + JHtmlBatch_::addListSelection( + '- Keep Original '.JText::_('COM_COMPONENTBUILDER_SERVER_PROTOCOL_LABEL').' -', + 'batch[protocol]', + JHtml::_('select.options', $this->protocolOptions, 'value', 'text') + ); + } } } @@ -235,8 +257,8 @@ class ComponentbuilderViewFtps extends JViewLegacy { $this->document = JFactory::getDocument(); } - $this->document->setTitle(JText::_('COM_COMPONENTBUILDER_FTPS')); - $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/ftps.css", (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); + $this->document->setTitle(JText::_('COM_COMPONENTBUILDER_SERVERS')); + $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/servers.css", (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); } /** @@ -267,7 +289,8 @@ class ComponentbuilderViewFtps extends JViewLegacy return array( 'a.sorting' => JText::_('JGRID_HEADING_ORDERING'), 'a.published' => JText::_('JSTATUS'), - 'a.name' => JText::_('COM_COMPONENTBUILDER_FTP_NAME_LABEL'), + 'a.name' => JText::_('COM_COMPONENTBUILDER_SERVER_NAME_LABEL'), + 'a.protocol' => JText::_('COM_COMPONENTBUILDER_SERVER_PROTOCOL_LABEL'), 'a.id' => JText::_('JGRID_HEADING_ID') ); } @@ -282,7 +305,7 @@ class ComponentbuilderViewFtps extends JViewLegacy // Select the text. $query->select($db->quoteName('name')); - $query->from($db->quoteName('#__componentbuilder_ftp')); + $query->from($db->quoteName('#__componentbuilder_server')); $query->order($db->quoteName('name') . ' ASC'); // Reset the query using our newly populated query object. @@ -302,5 +325,41 @@ class ComponentbuilderViewFtps extends JViewLegacy return $_filter; } return false; + } + + protected function getTheProtocolSelections() + { + // Get a db connection. + $db = JFactory::getDbo(); + + // Create a new query object. + $query = $db->getQuery(true); + + // Select the text. + $query->select($db->quoteName('protocol')); + $query->from($db->quoteName('#__componentbuilder_server')); + $query->order($db->quoteName('protocol') . ' ASC'); + + // Reset the query using our newly populated query object. + $db->setQuery($query); + + $results = $db->loadColumn(); + + if ($results) + { + // get model + $model = $this->getModel(); + $results = array_unique($results); + $_filter = array(); + foreach ($results as $protocol) + { + // Translate the protocol selection + $text = $model->selectionTranslation($protocol,'protocol'); + // Now add the protocol and its text to the options array + $_filter[] = JHtml::_('select.option', $protocol, JText::_($text)); + } + return $_filter; + } + return false; } } diff --git a/componentbuilder.xml b/componentbuilder.xml index 252ecd6c8..50b1fd24f 100644 --- a/componentbuilder.xml +++ b/componentbuilder.xml @@ -1,15 +1,15 @@ COM_COMPONENTBUILDER - 6th February, 2018 + 15th February, 2018 Llewellyn van der Merwe llewellyn@joomlacomponentbuilder.com http://joomlacomponentbuilder.com Copyright (C) 2015. All Rights Reserved GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - 2.6.14 + 2.6.15 Component Builder (v.2.6.14) +

Component Builder (v.2.6.15)

The Component Builder for [Joomla](https://extensions.joomla.org/extension/component-builder/) is highly advanced tool that is truly able to build extremely complex components in a fraction of the time. diff --git a/componentbuilder_update_server.xml b/componentbuilder_update_server.xml index 94cba8316..2fb63636a 100644 --- a/componentbuilder_update_server.xml +++ b/componentbuilder_update_server.xml @@ -407,4 +407,21 @@ http://joomlacomponentbuilder.com + + Component Builder + Builds Complex Joomla Components + com_componentbuilder + component + 2.6.15 + http://joomlacomponentbuilder.com + + https://github.com/vdm-io/Joomla-Component-Builder/releases/download/v2.6.15/JCB_v2.6.15.zip + + + stable + + Llewellyn van der Merwe + http://joomlacomponentbuilder.com + + \ No newline at end of file diff --git a/script.php b/script.php index 4639c8a46..e57abac0a 100644 --- a/script.php +++ b/script.php @@ -1439,83 +1439,83 @@ class com_componentbuilderInstallerScript // Select id from content type table $query->select($db->quoteName('type_id')); $query->from($db->quoteName('#__content_types')); - // Where Ftp alias is found - $query->where( $db->quoteName('type_alias') . ' = '. $db->quote('com_componentbuilder.ftp') ); + // Where Server alias is found + $query->where( $db->quoteName('type_alias') . ' = '. $db->quote('com_componentbuilder.server') ); $db->setQuery($query); // Execute query to see if alias is found $db->execute(); - $ftp_found = $db->getNumRows(); + $server_found = $db->getNumRows(); // Now check if there were any rows - if ($ftp_found) + if ($server_found) { - // Since there are load the needed ftp type ids - $ftp_ids = $db->loadColumn(); - // Remove Ftp from the content type table - $ftp_condition = array( $db->quoteName('type_alias') . ' = '. $db->quote('com_componentbuilder.ftp') ); + // Since there are load the needed server type ids + $server_ids = $db->loadColumn(); + // Remove Server from the content type table + $server_condition = array( $db->quoteName('type_alias') . ' = '. $db->quote('com_componentbuilder.server') ); // Create a new query object. $query = $db->getQuery(true); $query->delete($db->quoteName('#__content_types')); - $query->where($ftp_condition); + $query->where($server_condition); $db->setQuery($query); - // Execute the query to remove Ftp items - $ftp_done = $db->execute(); - if ($ftp_done); + // Execute the query to remove Server items + $server_done = $db->execute(); + if ($server_done); { - // If succesfully remove Ftp add queued success message. - $app->enqueueMessage(JText::_('The (com_componentbuilder.ftp) type alias was removed from the #__content_type table')); + // If succesfully remove Server add queued success message. + $app->enqueueMessage(JText::_('The (com_componentbuilder.server) type alias was removed from the #__content_type table')); } - // Remove Ftp items from the contentitem tag map table - $ftp_condition = array( $db->quoteName('type_alias') . ' = '. $db->quote('com_componentbuilder.ftp') ); + // Remove Server items from the contentitem tag map table + $server_condition = array( $db->quoteName('type_alias') . ' = '. $db->quote('com_componentbuilder.server') ); // Create a new query object. $query = $db->getQuery(true); $query->delete($db->quoteName('#__contentitem_tag_map')); - $query->where($ftp_condition); + $query->where($server_condition); $db->setQuery($query); - // Execute the query to remove Ftp items - $ftp_done = $db->execute(); - if ($ftp_done); + // Execute the query to remove Server items + $server_done = $db->execute(); + if ($server_done); { - // If succesfully remove Ftp add queued success message. - $app->enqueueMessage(JText::_('The (com_componentbuilder.ftp) type alias was removed from the #__contentitem_tag_map table')); + // If succesfully remove Server add queued success message. + $app->enqueueMessage(JText::_('The (com_componentbuilder.server) type alias was removed from the #__contentitem_tag_map table')); } - // Remove Ftp items from the ucm content table - $ftp_condition = array( $db->quoteName('core_type_alias') . ' = ' . $db->quote('com_componentbuilder.ftp') ); + // Remove Server items from the ucm content table + $server_condition = array( $db->quoteName('core_type_alias') . ' = ' . $db->quote('com_componentbuilder.server') ); // Create a new query object. $query = $db->getQuery(true); $query->delete($db->quoteName('#__ucm_content')); - $query->where($ftp_condition); + $query->where($server_condition); $db->setQuery($query); - // Execute the query to remove Ftp items - $ftp_done = $db->execute(); - if ($ftp_done); + // Execute the query to remove Server items + $server_done = $db->execute(); + if ($server_done); { - // If succesfully remove Ftp add queued success message. - $app->enqueueMessage(JText::_('The (com_componentbuilder.ftp) type alias was removed from the #__ucm_content table')); + // If succesfully remove Server add queued success message. + $app->enqueueMessage(JText::_('The (com_componentbuilder.server) type alias was removed from the #__ucm_content table')); } - // Make sure that all the Ftp items are cleared from DB - foreach ($ftp_ids as $ftp_id) + // Make sure that all the Server items are cleared from DB + foreach ($server_ids as $server_id) { - // Remove Ftp items from the ucm base table - $ftp_condition = array( $db->quoteName('ucm_type_id') . ' = ' . $ftp_id); + // Remove Server items from the ucm base table + $server_condition = array( $db->quoteName('ucm_type_id') . ' = ' . $server_id); // Create a new query object. $query = $db->getQuery(true); $query->delete($db->quoteName('#__ucm_base')); - $query->where($ftp_condition); + $query->where($server_condition); $db->setQuery($query); - // Execute the query to remove Ftp items + // Execute the query to remove Server items $db->execute(); - // Remove Ftp items from the ucm history table - $ftp_condition = array( $db->quoteName('ucm_type_id') . ' = ' . $ftp_id); + // Remove Server items from the ucm history table + $server_condition = array( $db->quoteName('ucm_type_id') . ' = ' . $server_id); // Create a new query object. $query = $db->getQuery(true); $query->delete($db->quoteName('#__ucm_history')); - $query->where($ftp_condition); + $query->where($server_condition); $db->setQuery($query); - // Execute the query to remove Ftp items + // Execute the query to remove Server items $db->execute(); } } @@ -3206,9 +3206,9 @@ class com_componentbuilderInstallerScript $joomla_component->type_title = 'Componentbuilder Joomla_component'; $joomla_component->type_alias = 'com_componentbuilder.joomla_component'; $joomla_component->table = '{"special": {"dbtable": "#__componentbuilder_joomla_component","key": "id","type": "Joomla_component","prefix": "componentbuilderTable","config": "array()"},"common": {"dbtable": "#__ucm_content","key": "ucm_id","type": "Corecontent","prefix": "JTable","config": "array()"}}'; - $joomla_component->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "system_name","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "readme","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "metadata","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "metakey","core_metadesc": "metadesc","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"system_name":"system_name","name_code":"name_code","component_version":"component_version","short_description":"short_description","companyname":"companyname","author":"author","readme":"readme","add_css_site":"add_css_site","mvc_versiondate":"mvc_versiondate","php_postflight_install":"php_postflight_install","description":"description","update_server_ftp":"update_server_ftp","copyright":"copyright","add_placeholders":"add_placeholders","php_preflight_install":"php_preflight_install","addfootable":"addfootable","php_method_uninstall":"php_method_uninstall","add_php_helper_admin":"add_php_helper_admin","update_server_target":"update_server_target","add_php_helper_site":"add_php_helper_site","debug_linenr":"debug_linenr","add_javascript":"add_javascript","creatuserhelper":"creatuserhelper","email":"email","add_php_helper_both":"add_php_helper_both","website":"website","add_admin_event":"add_admin_event","add_license":"add_license","add_site_event":"add_site_event","license_type":"license_type","add_css_admin":"add_css_admin","whmcs_key":"whmcs_key","php_preflight_update":"php_preflight_update","whmcs_url":"whmcs_url","php_postflight_update":"php_postflight_update","license":"license","sql":"sql","bom":"bom","add_update_server":"add_update_server","image":"image","buildcomp":"buildcomp","sales_server_ftp":"sales_server_ftp","not_required":"not_required","name":"name","adduikit":"adduikit","add_email_helper":"add_email_helper","php_helper_both":"php_helper_both","php_helper_admin":"php_helper_admin","php_admin_event":"php_admin_event","php_helper_site":"php_helper_site","php_site_event":"php_site_event","javascript":"javascript","css_admin":"css_admin","toignore":"toignore","css_site":"css_site","add_php_preflight_install":"add_php_preflight_install","add_php_preflight_update":"add_php_preflight_update","export_key":"export_key","add_php_postflight_install":"add_php_postflight_install","export_package_link":"export_package_link","add_php_postflight_update":"add_php_postflight_update","export_buy_link":"export_buy_link","add_php_method_uninstall":"add_php_method_uninstall","add_sql":"add_sql","addreadme":"addreadme","emptycontributors":"emptycontributors","update_server":"update_server","number":"number","add_sales_server":"add_sales_server","buildcompsql":"buildcompsql"}}'; + $joomla_component->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "system_name","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "readme","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "metadata","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "metakey","core_metadesc": "metadesc","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"system_name":"system_name","name_code":"name_code","component_version":"component_version","short_description":"short_description","companyname":"companyname","author":"author","readme":"readme","add_css_site":"add_css_site","mvc_versiondate":"mvc_versiondate","php_postflight_install":"php_postflight_install","description":"description","update_server":"update_server","copyright":"copyright","add_placeholders":"add_placeholders","php_preflight_install":"php_preflight_install","addfootable":"addfootable","php_method_uninstall":"php_method_uninstall","add_php_helper_admin":"add_php_helper_admin","update_server_target":"update_server_target","add_php_helper_site":"add_php_helper_site","debug_linenr":"debug_linenr","add_javascript":"add_javascript","creatuserhelper":"creatuserhelper","email":"email","add_php_helper_both":"add_php_helper_both","website":"website","add_admin_event":"add_admin_event","add_license":"add_license","add_site_event":"add_site_event","license_type":"license_type","add_css_admin":"add_css_admin","whmcs_key":"whmcs_key","php_preflight_update":"php_preflight_update","whmcs_url":"whmcs_url","php_postflight_update":"php_postflight_update","license":"license","sql":"sql","bom":"bom","add_update_server":"add_update_server","image":"image","buildcomp":"buildcomp","sales_server":"sales_server","not_required":"not_required","name":"name","adduikit":"adduikit","add_email_helper":"add_email_helper","php_helper_both":"php_helper_both","php_helper_admin":"php_helper_admin","php_admin_event":"php_admin_event","php_helper_site":"php_helper_site","php_site_event":"php_site_event","javascript":"javascript","css_admin":"css_admin","toignore":"toignore","css_site":"css_site","add_php_preflight_install":"add_php_preflight_install","add_php_preflight_update":"add_php_preflight_update","export_key":"export_key","add_php_postflight_install":"add_php_postflight_install","export_package_link":"export_package_link","add_php_postflight_update":"add_php_postflight_update","export_buy_link":"export_buy_link","add_php_method_uninstall":"add_php_method_uninstall","add_sql":"add_sql","addreadme":"addreadme","emptycontributors":"emptycontributors","update_server_url":"update_server_url","number":"number","add_sales_server":"add_sales_server","buildcompsql":"buildcompsql"}}'; $joomla_component->router = 'ComponentbuilderHelperRoute::getJoomla_componentRoute'; - $joomla_component->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/joomla_component.xml","hideFields": ["asset_id","checked_out","checked_out_time","version","not_required"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","add_css_site","mvc_versiondate","update_server_ftp","add_placeholders","addfootable","add_php_helper_admin","update_server_target","add_php_helper_site","debug_linenr","add_javascript","creatuserhelper","add_php_helper_both","add_admin_event","add_license","add_site_event","license_type","add_css_admin","add_update_server","buildcomp","sales_server_ftp","not_required","adduikit","add_email_helper","add_php_preflight_install","add_php_preflight_update","add_php_postflight_install","add_php_postflight_update","add_php_method_uninstall","add_sql","addreadme","emptycontributors","number","add_sales_server"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "update_server_ftp","targetTable": "#__componentbuilder_ftp","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "sales_server_ftp","targetTable": "#__componentbuilder_ftp","targetColumn": "id","displayColumn": "name"}]}'; + $joomla_component->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/joomla_component.xml","hideFields": ["asset_id","checked_out","checked_out_time","version","not_required"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","add_css_site","mvc_versiondate","update_server","add_placeholders","addfootable","add_php_helper_admin","update_server_target","add_php_helper_site","debug_linenr","add_javascript","creatuserhelper","add_php_helper_both","add_admin_event","add_license","add_site_event","license_type","add_css_admin","add_update_server","buildcomp","sales_server","not_required","adduikit","add_email_helper","add_php_preflight_install","add_php_preflight_update","add_php_postflight_install","add_php_postflight_update","add_php_method_uninstall","add_sql","addreadme","emptycontributors","number","add_sales_server"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "update_server","targetTable": "#__componentbuilder_server","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "sales_server","targetTable": "#__componentbuilder_server","targetColumn": "id","displayColumn": "name"}]}'; // Set the object into the content types table. $joomla_component_Inserted = $db->insertObject('#__content_types', $joomla_component); @@ -3393,17 +3393,17 @@ class com_componentbuilderInstallerScript // Set the object into the content types table. $language_Inserted = $db->insertObject('#__content_types', $language); - // Create the ftp content type object. - $ftp = new stdClass(); - $ftp->type_title = 'Componentbuilder Ftp'; - $ftp->type_alias = 'com_componentbuilder.ftp'; - $ftp->table = '{"special": {"dbtable": "#__componentbuilder_ftp","key": "id","type": "Ftp","prefix": "componentbuilderTable","config": "array()"},"common": {"dbtable": "#__ucm_content","key": "ucm_id","type": "Corecontent","prefix": "JTable","config": "array()"}}'; - $ftp->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "name","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "null","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"name":"name","signature":"signature"}}'; - $ftp->router = 'ComponentbuilderHelperRoute::getFtpRoute'; - $ftp->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/ftp.xml","hideFields": ["asset_id","checked_out","checked_out_time","version"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"}]}'; + // Create the server content type object. + $server = new stdClass(); + $server->type_title = 'Componentbuilder Server'; + $server->type_alias = 'com_componentbuilder.server'; + $server->table = '{"special": {"dbtable": "#__componentbuilder_server","key": "id","type": "Server","prefix": "componentbuilderTable","config": "array()"},"common": {"dbtable": "#__ucm_content","key": "ucm_id","type": "Corecontent","prefix": "JTable","config": "array()"}}'; + $server->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "name","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "null","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"name":"name","protocol":"protocol","path":"path","port":"port","authentication":"authentication","password":"password","secret":"secret","host":"host","signature":"signature","username":"username","not_required":"not_required","private":"private","public":"public"}}'; + $server->router = 'ComponentbuilderHelperRoute::getServerRoute'; + $server->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/server.xml","hideFields": ["asset_id","checked_out","checked_out_time","version","not_required"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","protocol","authentication","not_required"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"}]}'; // Set the object into the content types table. - $ftp_Inserted = $db->insertObject('#__content_types', $ftp); + $server_Inserted = $db->insertObject('#__content_types', $server); // Create the help_document content type object. $help_document = new stdClass(); @@ -3616,9 +3616,9 @@ class com_componentbuilderInstallerScript $joomla_component->type_title = 'Componentbuilder Joomla_component'; $joomla_component->type_alias = 'com_componentbuilder.joomla_component'; $joomla_component->table = '{"special": {"dbtable": "#__componentbuilder_joomla_component","key": "id","type": "Joomla_component","prefix": "componentbuilderTable","config": "array()"},"common": {"dbtable": "#__ucm_content","key": "ucm_id","type": "Corecontent","prefix": "JTable","config": "array()"}}'; - $joomla_component->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "system_name","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "readme","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "metadata","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "metakey","core_metadesc": "metadesc","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"system_name":"system_name","name_code":"name_code","component_version":"component_version","short_description":"short_description","companyname":"companyname","author":"author","readme":"readme","add_css_site":"add_css_site","mvc_versiondate":"mvc_versiondate","php_postflight_install":"php_postflight_install","description":"description","update_server_ftp":"update_server_ftp","copyright":"copyright","add_placeholders":"add_placeholders","php_preflight_install":"php_preflight_install","addfootable":"addfootable","php_method_uninstall":"php_method_uninstall","add_php_helper_admin":"add_php_helper_admin","update_server_target":"update_server_target","add_php_helper_site":"add_php_helper_site","debug_linenr":"debug_linenr","add_javascript":"add_javascript","creatuserhelper":"creatuserhelper","email":"email","add_php_helper_both":"add_php_helper_both","website":"website","add_admin_event":"add_admin_event","add_license":"add_license","add_site_event":"add_site_event","license_type":"license_type","add_css_admin":"add_css_admin","whmcs_key":"whmcs_key","php_preflight_update":"php_preflight_update","whmcs_url":"whmcs_url","php_postflight_update":"php_postflight_update","license":"license","sql":"sql","bom":"bom","add_update_server":"add_update_server","image":"image","buildcomp":"buildcomp","sales_server_ftp":"sales_server_ftp","not_required":"not_required","name":"name","adduikit":"adduikit","add_email_helper":"add_email_helper","php_helper_both":"php_helper_both","php_helper_admin":"php_helper_admin","php_admin_event":"php_admin_event","php_helper_site":"php_helper_site","php_site_event":"php_site_event","javascript":"javascript","css_admin":"css_admin","toignore":"toignore","css_site":"css_site","add_php_preflight_install":"add_php_preflight_install","add_php_preflight_update":"add_php_preflight_update","export_key":"export_key","add_php_postflight_install":"add_php_postflight_install","export_package_link":"export_package_link","add_php_postflight_update":"add_php_postflight_update","export_buy_link":"export_buy_link","add_php_method_uninstall":"add_php_method_uninstall","add_sql":"add_sql","addreadme":"addreadme","emptycontributors":"emptycontributors","update_server":"update_server","number":"number","add_sales_server":"add_sales_server","buildcompsql":"buildcompsql"}}'; + $joomla_component->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "system_name","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "readme","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "metadata","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "metakey","core_metadesc": "metadesc","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"system_name":"system_name","name_code":"name_code","component_version":"component_version","short_description":"short_description","companyname":"companyname","author":"author","readme":"readme","add_css_site":"add_css_site","mvc_versiondate":"mvc_versiondate","php_postflight_install":"php_postflight_install","description":"description","update_server":"update_server","copyright":"copyright","add_placeholders":"add_placeholders","php_preflight_install":"php_preflight_install","addfootable":"addfootable","php_method_uninstall":"php_method_uninstall","add_php_helper_admin":"add_php_helper_admin","update_server_target":"update_server_target","add_php_helper_site":"add_php_helper_site","debug_linenr":"debug_linenr","add_javascript":"add_javascript","creatuserhelper":"creatuserhelper","email":"email","add_php_helper_both":"add_php_helper_both","website":"website","add_admin_event":"add_admin_event","add_license":"add_license","add_site_event":"add_site_event","license_type":"license_type","add_css_admin":"add_css_admin","whmcs_key":"whmcs_key","php_preflight_update":"php_preflight_update","whmcs_url":"whmcs_url","php_postflight_update":"php_postflight_update","license":"license","sql":"sql","bom":"bom","add_update_server":"add_update_server","image":"image","buildcomp":"buildcomp","sales_server":"sales_server","not_required":"not_required","name":"name","adduikit":"adduikit","add_email_helper":"add_email_helper","php_helper_both":"php_helper_both","php_helper_admin":"php_helper_admin","php_admin_event":"php_admin_event","php_helper_site":"php_helper_site","php_site_event":"php_site_event","javascript":"javascript","css_admin":"css_admin","toignore":"toignore","css_site":"css_site","add_php_preflight_install":"add_php_preflight_install","add_php_preflight_update":"add_php_preflight_update","export_key":"export_key","add_php_postflight_install":"add_php_postflight_install","export_package_link":"export_package_link","add_php_postflight_update":"add_php_postflight_update","export_buy_link":"export_buy_link","add_php_method_uninstall":"add_php_method_uninstall","add_sql":"add_sql","addreadme":"addreadme","emptycontributors":"emptycontributors","update_server_url":"update_server_url","number":"number","add_sales_server":"add_sales_server","buildcompsql":"buildcompsql"}}'; $joomla_component->router = 'ComponentbuilderHelperRoute::getJoomla_componentRoute'; - $joomla_component->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/joomla_component.xml","hideFields": ["asset_id","checked_out","checked_out_time","version","not_required"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","add_css_site","mvc_versiondate","update_server_ftp","add_placeholders","addfootable","add_php_helper_admin","update_server_target","add_php_helper_site","debug_linenr","add_javascript","creatuserhelper","add_php_helper_both","add_admin_event","add_license","add_site_event","license_type","add_css_admin","add_update_server","buildcomp","sales_server_ftp","not_required","adduikit","add_email_helper","add_php_preflight_install","add_php_preflight_update","add_php_postflight_install","add_php_postflight_update","add_php_method_uninstall","add_sql","addreadme","emptycontributors","number","add_sales_server"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "update_server_ftp","targetTable": "#__componentbuilder_ftp","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "sales_server_ftp","targetTable": "#__componentbuilder_ftp","targetColumn": "id","displayColumn": "name"}]}'; + $joomla_component->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/joomla_component.xml","hideFields": ["asset_id","checked_out","checked_out_time","version","not_required"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","add_css_site","mvc_versiondate","update_server","add_placeholders","addfootable","add_php_helper_admin","update_server_target","add_php_helper_site","debug_linenr","add_javascript","creatuserhelper","add_php_helper_both","add_admin_event","add_license","add_site_event","license_type","add_css_admin","add_update_server","buildcomp","sales_server","not_required","adduikit","add_email_helper","add_php_preflight_install","add_php_preflight_update","add_php_postflight_install","add_php_postflight_update","add_php_method_uninstall","add_sql","addreadme","emptycontributors","number","add_sales_server"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "update_server","targetTable": "#__componentbuilder_server","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "sales_server","targetTable": "#__componentbuilder_server","targetColumn": "id","displayColumn": "name"}]}'; // Check if joomla_component type is already in content_type DB. $joomla_component_id = null; @@ -4075,33 +4075,33 @@ class com_componentbuilderInstallerScript $language_Inserted = $db->insertObject('#__content_types', $language); } - // Create the ftp content type object. - $ftp = new stdClass(); - $ftp->type_title = 'Componentbuilder Ftp'; - $ftp->type_alias = 'com_componentbuilder.ftp'; - $ftp->table = '{"special": {"dbtable": "#__componentbuilder_ftp","key": "id","type": "Ftp","prefix": "componentbuilderTable","config": "array()"},"common": {"dbtable": "#__ucm_content","key": "ucm_id","type": "Corecontent","prefix": "JTable","config": "array()"}}'; - $ftp->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "name","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "null","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"name":"name","signature":"signature"}}'; - $ftp->router = 'ComponentbuilderHelperRoute::getFtpRoute'; - $ftp->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/ftp.xml","hideFields": ["asset_id","checked_out","checked_out_time","version"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"}]}'; + // Create the server content type object. + $server = new stdClass(); + $server->type_title = 'Componentbuilder Server'; + $server->type_alias = 'com_componentbuilder.server'; + $server->table = '{"special": {"dbtable": "#__componentbuilder_server","key": "id","type": "Server","prefix": "componentbuilderTable","config": "array()"},"common": {"dbtable": "#__ucm_content","key": "ucm_id","type": "Corecontent","prefix": "JTable","config": "array()"}}'; + $server->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "name","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "null","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"name":"name","protocol":"protocol","path":"path","port":"port","authentication":"authentication","password":"password","secret":"secret","host":"host","signature":"signature","username":"username","not_required":"not_required","private":"private","public":"public"}}'; + $server->router = 'ComponentbuilderHelperRoute::getServerRoute'; + $server->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/server.xml","hideFields": ["asset_id","checked_out","checked_out_time","version","not_required"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","protocol","authentication","not_required"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"}]}'; - // Check if ftp type is already in content_type DB. - $ftp_id = null; + // Check if server type is already in content_type DB. + $server_id = null; $query = $db->getQuery(true); $query->select($db->quoteName(array('type_id'))); $query->from($db->quoteName('#__content_types')); - $query->where($db->quoteName('type_alias') . ' LIKE '. $db->quote($ftp->type_alias)); + $query->where($db->quoteName('type_alias') . ' LIKE '. $db->quote($server->type_alias)); $db->setQuery($query); $db->execute(); // Set the object into the content types table. if ($db->getNumRows()) { - $ftp->type_id = $db->loadResult(); - $ftp_Updated = $db->updateObject('#__content_types', $ftp, 'type_id'); + $server->type_id = $db->loadResult(); + $server_Updated = $db->updateObject('#__content_types', $server, 'type_id'); } else { - $ftp_Inserted = $db->insertObject('#__content_types', $ftp); + $server_Inserted = $db->insertObject('#__content_types', $server); } // Create the help_document content type object. @@ -4739,7 +4739,7 @@ class com_componentbuilderInstallerScript echo ' -

Upgrade to Version 2.6.14 Was Successful! Let us know if anything is not working as expected.

'; +

Upgrade to Version 2.6.15 Was Successful! Let us know if anything is not working as expected.

'; } } } diff --git a/site/helpers/componentbuilder.php b/site/helpers/componentbuilder.php index 1d2e94de8..1e60296ed 100644 --- a/site/helpers/componentbuilder.php +++ b/site/helpers/componentbuilder.php @@ -998,6 +998,13 @@ abstract class ComponentbuilderHelper return $content; } } + elseif (property_exists('ComponentbuilderHelper', 'curlErrorLoaded') && !self::$curlErrorLoaded) + { + // set the notice + JFactory::getApplication()->enqueueMessage(JText::_('COM_COMPONENTBUILDER_HTWOCURL_NOT_FOUNDHTWOPPLEASE_SETUP_CURL_ON_YOUR_SYSTEM_OR_BCOMPONENTBUILDERB_WILL_NOT_FUNCTION_CORRECTLYP'), 'Error'); + // load this notice only once + self::$curlErrorLoaded = true; + } } return $none; } diff --git a/site/language/en-GB/en-GB.com_componentbuilder.ini b/site/language/en-GB/en-GB.com_componentbuilder.ini index a6b23b910..eb4706a7c 100644 --- a/site/language/en-GB/en-GB.com_componentbuilder.ini +++ b/site/language/en-GB/en-GB.com_componentbuilder.ini @@ -19,6 +19,7 @@ COM_COMPONENTBUILDER_EMWEBSITEEM_BSB="Website: %s" COM_COMPONENTBUILDER_ERROR="Error!" COM_COMPONENTBUILDER_FILE="File" COM_COMPONENTBUILDER_FOLDER="Folder" +COM_COMPONENTBUILDER_HTWOCURL_NOT_FOUNDHTWOPPLEASE_SETUP_CURL_ON_YOUR_SYSTEM_OR_BCOMPONENTBUILDERB_WILL_NOT_FUNCTION_CORRECTLYP="

Curl Not Found!

Please setup curl on your system, or componentbuilder will not function correctly!

" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_BUILDER_BACKUP_KEY="Joomla Component Builder - Backup Key" COM_COMPONENTBUILDER_KEY_HAS_NOT_CHANGED="Key has not changed" COM_COMPONENTBUILDER_LICENSE_S="License: %s"
- get('ftp.edit.state')): ?> + get('server.edit.state')): ?> saveOrder) { @@ -60,7 +60,7 @@ $edit = "index.php?option=com_componentbuilder&view=ftps&task=ftp.edit"; - get('ftp.edit')): ?> + get('server.edit')): ?> checked_out) : ?> id); ?> @@ -75,30 +75,33 @@ $edit = "index.php?option=com_componentbuilder&view=ftps&task=ftp.edit"; - get('ftp.edit')): ?> + get('server.edit')): ?>
escape($item->name); ?> checked_out): ?> - name, $item->checked_out_time, 'ftps.', $canCheckin); ?> + name, $item->checked_out_time, 'servers.', $canCheckin); ?>
escape($item->name); ?>
+ protocol); ?> + - get('ftp.edit.state')) : ?> + get('server.edit.state')) : ?> checked_out) : ?> - published, $i, 'ftps.', true, 'cb'); ?> + published, $i, 'servers.', true, 'cb'); ?> - published, $i, 'ftps.', false, 'cb'); ?> + published, $i, 'servers.', false, 'cb'); ?> - published, $i, 'ftps.', true, 'cb'); ?> + published, $i, 'servers.', true, 'cb'); ?> - published, $i, 'ftps.', false, 'cb'); ?> + published, $i, 'servers.', false, 'cb'); ?> diff --git a/admin/views/ftps/tmpl/default_foot.php b/admin/views/servers/tmpl/default_foot.php similarity index 95% rename from admin/views/ftps/tmpl/default_foot.php rename to admin/views/servers/tmpl/default_foot.php index a9a16850c..90fd85d30 100644 --- a/admin/views/ftps/tmpl/default_foot.php +++ b/admin/views/servers/tmpl/default_foot.php @@ -28,5 +28,5 @@ defined('_JEXEC') or die('Restricted access'); ?>
pagination->getListFooter(); ?>pagination->getListFooter(); ?>
- listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> + + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - + - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?>