Resolved gh-287 that adds the feature to join/combine results of multiple fields in the admin list view. Update the tab string to make tabs dynamic in nature. Imporved the compiler building of the admin list view
This commit is contained in:
parent
fef3460772
commit
f7be7ddad0
@ -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.7.11) 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.8.0) 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)
|
||||
|
||||
@ -125,11 +125,11 @@ Watch the [proposed development workflow](https://vdm.bz/proposed-development-wo
|
||||
+ *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)
|
||||
+ *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder)
|
||||
+ *First Build*: 30th April, 2015
|
||||
+ *Last Build*: 24th May, 2018
|
||||
+ *Version*: 2.7.11
|
||||
+ *Last Build*: 26th May, 2018
|
||||
+ *Version*: 2.8.0
|
||||
+ *Copyright*: Copyright (C) 2015 - 2018 Vast Development Method. All rights reserved.
|
||||
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt
|
||||
+ *Line count*: **185617**
|
||||
+ *Line count*: **185523**
|
||||
+ *Field count*: **1053**
|
||||
+ *File count*: **1236**
|
||||
+ *Folder count*: **197**
|
||||
|
@ -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.7.11) 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.8.0) 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)
|
||||
|
||||
@ -125,11 +125,11 @@ Watch the [proposed development workflow](https://vdm.bz/proposed-development-wo
|
||||
+ *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)
|
||||
+ *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder)
|
||||
+ *First Build*: 30th April, 2015
|
||||
+ *Last Build*: 24th May, 2018
|
||||
+ *Version*: 2.7.11
|
||||
+ *Last Build*: 26th May, 2018
|
||||
+ *Version*: 2.8.0
|
||||
+ *Copyright*: Copyright (C) 2015 - 2018 Vast Development Method. All rights reserved.
|
||||
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt
|
||||
+ *Line count*: **185617**
|
||||
+ *Line count*: **185523**
|
||||
+ *Field count*: **1053**
|
||||
+ *File count*: **1236**
|
||||
+ *Folder count*: **197**
|
||||
|
@ -69,9 +69,9 @@ class ComponentbuilderControllerAdmin_fields extends JControllerForm
|
||||
protected function allowEdit($data = array(), $key = 'id')
|
||||
{
|
||||
// get user object.
|
||||
$user = JFactory::getUser();
|
||||
$user = JFactory::getUser();
|
||||
// get record id.
|
||||
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
|
||||
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
|
||||
|
||||
|
||||
// Access check.
|
||||
|
@ -69,9 +69,9 @@ class ComponentbuilderControllerAdmin_fields_conditions extends JControllerForm
|
||||
protected function allowEdit($data = array(), $key = 'id')
|
||||
{
|
||||
// get user object.
|
||||
$user = JFactory::getUser();
|
||||
$user = JFactory::getUser();
|
||||
// get record id.
|
||||
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
|
||||
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
|
||||
|
||||
|
||||
// Access check.
|
||||
|
@ -69,9 +69,9 @@ class ComponentbuilderControllerAdmin_fields_relations extends JControllerForm
|
||||
protected function allowEdit($data = array(), $key = 'id')
|
||||
{
|
||||
// get user object.
|
||||
$user = JFactory::getUser();
|
||||
$user = JFactory::getUser();
|
||||
// get record id.
|
||||
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
|
||||
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
|
||||
|
||||
|
||||
// Access check.
|
||||
|
@ -69,9 +69,9 @@ class ComponentbuilderControllerAdmin_view extends JControllerForm
|
||||
protected function allowEdit($data = array(), $key = 'id')
|
||||
{
|
||||
// get user object.
|
||||
$user = JFactory::getUser();
|
||||
$user = JFactory::getUser();
|
||||
// get record id.
|
||||
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
|
||||
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
|
||||
|
||||
|
||||
// Access check.
|
||||
|
@ -69,9 +69,9 @@ class ComponentbuilderControllerComponent_admin_views extends JControllerForm
|
||||
protected function allowEdit($data = array(), $key = 'id')
|
||||
{
|
||||
// get user object.
|
||||
$user = JFactory::getUser();
|
||||
$user = JFactory::getUser();
|
||||
// get record id.
|
||||
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
|
||||
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
|
||||
|
||||
|
||||
// Access check.
|
||||
|
@ -69,9 +69,9 @@ class ComponentbuilderControllerComponent_config extends JControllerForm
|
||||
protected function allowEdit($data = array(), $key = 'id')
|
||||
{
|
||||
// get user object.
|
||||
$user = JFactory::getUser();
|
||||
$user = JFactory::getUser();
|
||||
// get record id.
|
||||
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
|
||||
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
|
||||
|
||||
|
||||
// Access check.
|
||||
|
@ -69,9 +69,9 @@ class ComponentbuilderControllerComponent_custom_admin_menus extends JController
|
||||
protected function allowEdit($data = array(), $key = 'id')
|
||||
{
|
||||
// get user object.
|
||||
$user = JFactory::getUser();
|
||||
$user = JFactory::getUser();
|
||||
// get record id.
|
||||
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
|
||||
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
|
||||
|
||||
|
||||
// Access check.
|
||||
|
@ -69,9 +69,9 @@ class ComponentbuilderControllerComponent_custom_admin_views extends JController
|
||||
protected function allowEdit($data = array(), $key = 'id')
|
||||
{
|
||||
// get user object.
|
||||
$user = JFactory::getUser();
|
||||
$user = JFactory::getUser();
|
||||
// get record id.
|
||||
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
|
||||
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
|
||||
|
||||
|
||||
// Access check.
|
||||
|
@ -69,9 +69,9 @@ class ComponentbuilderControllerComponent_dashboard extends JControllerForm
|
||||
protected function allowEdit($data = array(), $key = 'id')
|
||||
{
|
||||
// get user object.
|
||||
$user = JFactory::getUser();
|
||||
$user = JFactory::getUser();
|
||||
// get record id.
|
||||
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
|
||||
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
|
||||
|
||||
|
||||
// Access check.
|
||||
|
@ -69,9 +69,9 @@ class ComponentbuilderControllerComponent_files_folders extends JControllerForm
|
||||
protected function allowEdit($data = array(), $key = 'id')
|
||||
{
|
||||
// get user object.
|
||||
$user = JFactory::getUser();
|
||||
$user = JFactory::getUser();
|
||||
// get record id.
|
||||
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
|
||||
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
|
||||
|
||||
|
||||
// Access check.
|
||||
|
@ -69,9 +69,9 @@ class ComponentbuilderControllerComponent_mysql_tweaks extends JControllerForm
|
||||
protected function allowEdit($data = array(), $key = 'id')
|
||||
{
|
||||
// get user object.
|
||||
$user = JFactory::getUser();
|
||||
$user = JFactory::getUser();
|
||||
// get record id.
|
||||
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
|
||||
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
|
||||
|
||||
|
||||
// Access check.
|
||||
|
@ -69,9 +69,9 @@ class ComponentbuilderControllerComponent_site_views extends JControllerForm
|
||||
protected function allowEdit($data = array(), $key = 'id')
|
||||
{
|
||||
// get user object.
|
||||
$user = JFactory::getUser();
|
||||
$user = JFactory::getUser();
|
||||
// get record id.
|
||||
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
|
||||
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
|
||||
|
||||
|
||||
// Access check.
|
||||
|
@ -69,9 +69,9 @@ class ComponentbuilderControllerComponent_updates extends JControllerForm
|
||||
protected function allowEdit($data = array(), $key = 'id')
|
||||
{
|
||||
// get user object.
|
||||
$user = JFactory::getUser();
|
||||
$user = JFactory::getUser();
|
||||
// get record id.
|
||||
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
|
||||
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
|
||||
|
||||
|
||||
// Access check.
|
||||
|
@ -69,9 +69,9 @@ class ComponentbuilderControllerCustom_admin_view extends JControllerForm
|
||||
protected function allowEdit($data = array(), $key = 'id')
|
||||
{
|
||||
// get user object.
|
||||
$user = JFactory::getUser();
|
||||
$user = JFactory::getUser();
|
||||
// get record id.
|
||||
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
|
||||
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
|
||||
|
||||
|
||||
// Access check.
|
||||
|
@ -69,9 +69,9 @@ class ComponentbuilderControllerCustom_code extends JControllerForm
|
||||
protected function allowEdit($data = array(), $key = 'id')
|
||||
{
|
||||
// get user object.
|
||||
$user = JFactory::getUser();
|
||||
$user = JFactory::getUser();
|
||||
// get record id.
|
||||
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
|
||||
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
|
||||
|
||||
|
||||
// Access check.
|
||||
|
@ -69,9 +69,9 @@ class ComponentbuilderControllerDynamic_get extends JControllerForm
|
||||
protected function allowEdit($data = array(), $key = 'id')
|
||||
{
|
||||
// get user object.
|
||||
$user = JFactory::getUser();
|
||||
$user = JFactory::getUser();
|
||||
// get record id.
|
||||
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
|
||||
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
|
||||
|
||||
|
||||
// Access check.
|
||||
|
@ -68,9 +68,9 @@ class ComponentbuilderControllerField extends JControllerForm
|
||||
*/
|
||||
protected function allowEdit($data = array(), $key = 'id')
|
||||
{ // get user object.
|
||||
$user = JFactory::getUser();
|
||||
$user = JFactory::getUser();
|
||||
// get record id.
|
||||
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
|
||||
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
|
||||
|
||||
|
||||
// Access check.
|
||||
|
@ -68,9 +68,9 @@ class ComponentbuilderControllerFieldtype extends JControllerForm
|
||||
*/
|
||||
protected function allowEdit($data = array(), $key = 'id')
|
||||
{ // get user object.
|
||||
$user = JFactory::getUser();
|
||||
$user = JFactory::getUser();
|
||||
// get record id.
|
||||
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
|
||||
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
|
||||
|
||||
|
||||
// Access check.
|
||||
|
@ -69,9 +69,9 @@ class ComponentbuilderControllerHelp_document extends JControllerForm
|
||||
protected function allowEdit($data = array(), $key = 'id')
|
||||
{
|
||||
// get user object.
|
||||
$user = JFactory::getUser();
|
||||
$user = JFactory::getUser();
|
||||
// get record id.
|
||||
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
|
||||
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
|
||||
|
||||
|
||||
// Access check.
|
||||
|
@ -69,9 +69,9 @@ class ComponentbuilderControllerJoomla_component extends JControllerForm
|
||||
protected function allowEdit($data = array(), $key = 'id')
|
||||
{
|
||||
// get user object.
|
||||
$user = JFactory::getUser();
|
||||
$user = JFactory::getUser();
|
||||
// get record id.
|
||||
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
|
||||
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
|
||||
|
||||
|
||||
// Access check.
|
||||
|
@ -69,9 +69,9 @@ class ComponentbuilderControllerLanguage extends JControllerForm
|
||||
protected function allowEdit($data = array(), $key = 'id')
|
||||
{
|
||||
// get user object.
|
||||
$user = JFactory::getUser();
|
||||
$user = JFactory::getUser();
|
||||
// get record id.
|
||||
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
|
||||
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
|
||||
|
||||
|
||||
// Access check.
|
||||
|
@ -69,9 +69,9 @@ class ComponentbuilderControllerLanguage_translation extends JControllerForm
|
||||
protected function allowEdit($data = array(), $key = 'id')
|
||||
{
|
||||
// get user object.
|
||||
$user = JFactory::getUser();
|
||||
$user = JFactory::getUser();
|
||||
// get record id.
|
||||
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
|
||||
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
|
||||
|
||||
|
||||
// Access check.
|
||||
|
@ -69,9 +69,9 @@ class ComponentbuilderControllerLayout extends JControllerForm
|
||||
protected function allowEdit($data = array(), $key = 'id')
|
||||
{
|
||||
// get user object.
|
||||
$user = JFactory::getUser();
|
||||
$user = JFactory::getUser();
|
||||
// get record id.
|
||||
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
|
||||
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
|
||||
|
||||
|
||||
// Access check.
|
||||
|
@ -69,9 +69,9 @@ class ComponentbuilderControllerLibrary extends JControllerForm
|
||||
protected function allowEdit($data = array(), $key = 'id')
|
||||
{
|
||||
// get user object.
|
||||
$user = JFactory::getUser();
|
||||
$user = JFactory::getUser();
|
||||
// get record id.
|
||||
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
|
||||
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
|
||||
|
||||
|
||||
// Access check.
|
||||
|
@ -69,9 +69,9 @@ class ComponentbuilderControllerLibrary_config extends JControllerForm
|
||||
protected function allowEdit($data = array(), $key = 'id')
|
||||
{
|
||||
// get user object.
|
||||
$user = JFactory::getUser();
|
||||
$user = JFactory::getUser();
|
||||
// get record id.
|
||||
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
|
||||
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
|
||||
|
||||
|
||||
// Access check.
|
||||
|
@ -69,9 +69,9 @@ class ComponentbuilderControllerLibrary_files_folders_urls extends JControllerFo
|
||||
protected function allowEdit($data = array(), $key = 'id')
|
||||
{
|
||||
// get user object.
|
||||
$user = JFactory::getUser();
|
||||
$user = JFactory::getUser();
|
||||
// get record id.
|
||||
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
|
||||
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
|
||||
|
||||
|
||||
// Access check.
|
||||
|
@ -69,9 +69,9 @@ class ComponentbuilderControllerServer extends JControllerForm
|
||||
protected function allowEdit($data = array(), $key = 'id')
|
||||
{
|
||||
// get user object.
|
||||
$user = JFactory::getUser();
|
||||
$user = JFactory::getUser();
|
||||
// get record id.
|
||||
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
|
||||
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
|
||||
|
||||
|
||||
// Access check.
|
||||
|
@ -69,9 +69,9 @@ class ComponentbuilderControllerSite_view extends JControllerForm
|
||||
protected function allowEdit($data = array(), $key = 'id')
|
||||
{
|
||||
// get user object.
|
||||
$user = JFactory::getUser();
|
||||
$user = JFactory::getUser();
|
||||
// get record id.
|
||||
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
|
||||
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
|
||||
|
||||
|
||||
// Access check.
|
||||
|
@ -69,9 +69,9 @@ class ComponentbuilderControllerSnippet extends JControllerForm
|
||||
protected function allowEdit($data = array(), $key = 'id')
|
||||
{
|
||||
// get user object.
|
||||
$user = JFactory::getUser();
|
||||
$user = JFactory::getUser();
|
||||
// get record id.
|
||||
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
|
||||
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
|
||||
|
||||
|
||||
// Access check.
|
||||
|
@ -69,9 +69,9 @@ class ComponentbuilderControllerSnippet_type extends JControllerForm
|
||||
protected function allowEdit($data = array(), $key = 'id')
|
||||
{
|
||||
// get user object.
|
||||
$user = JFactory::getUser();
|
||||
$user = JFactory::getUser();
|
||||
// get record id.
|
||||
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
|
||||
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
|
||||
|
||||
|
||||
// Access check.
|
||||
|
@ -69,9 +69,9 @@ class ComponentbuilderControllerTemplate extends JControllerForm
|
||||
protected function allowEdit($data = array(), $key = 'id')
|
||||
{
|
||||
// get user object.
|
||||
$user = JFactory::getUser();
|
||||
$user = JFactory::getUser();
|
||||
// get record id.
|
||||
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
|
||||
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
|
||||
|
||||
|
||||
// Access check.
|
||||
|
@ -69,9 +69,9 @@ class ComponentbuilderControllerValidation_rule extends JControllerForm
|
||||
protected function allowEdit($data = array(), $key = 'id')
|
||||
{
|
||||
// get user object.
|
||||
$user = JFactory::getUser();
|
||||
$user = JFactory::getUser();
|
||||
// get record id.
|
||||
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
|
||||
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
|
||||
|
||||
|
||||
// Access check.
|
||||
|
@ -25,7 +25,6 @@ class Compiler extends Infusion
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
|
||||
private $tempPath;
|
||||
|
||||
/*
|
||||
@ -677,4 +676,5 @@ class Compiler extends Infusion
|
||||
|
||||
// any help to improve this is welcome...
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -655,7 +655,14 @@ class Get
|
||||
*/
|
||||
public $setTidyWarning = false;
|
||||
|
||||
/* * *
|
||||
/**
|
||||
* Set tab/spacer
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $tabSpacer = "\t";
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
|
||||
@ -745,6 +752,19 @@ class Get
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the tab/space
|
||||
*
|
||||
* @param int $nr The number of tag/space
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
*/
|
||||
public function _t($nr)
|
||||
{
|
||||
return str_repeat($this->tabSpacer, (int) $nr);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the line number in comments
|
||||
*
|
||||
@ -1676,6 +1696,11 @@ class Get
|
||||
isset($relationsValue['joinfields']) &&
|
||||
ComponentbuilderHelper::checkArray($relationsValue['joinfields']))
|
||||
{
|
||||
// do a dynamic update on the set values
|
||||
if (isset($relationsValue['set']) && ComponentbuilderHelper::checkString($relationsValue['set']))
|
||||
{
|
||||
$relationsValue['set'] = $this->setDynamicValues($relationsValue['set']);
|
||||
}
|
||||
// load the field relations
|
||||
$this->fieldRelations[$name_list][(int) $relationsValue['listfield']] = $relationsValue;
|
||||
// load the list joints
|
||||
@ -3876,7 +3901,7 @@ class Get
|
||||
}
|
||||
if (ComponentbuilderHelper::checkArray($gets) && ComponentbuilderHelper::checkArray($keys))
|
||||
{
|
||||
$querySelect = '$query->select($db->quoteName(' . PHP_EOL . "\t\t\t" . 'array(' . implode(',', $gets) . '),' . PHP_EOL . "\t\t\t" . 'array(' . implode(',', $keys) . ')));';
|
||||
$querySelect = '$query->select($db->quoteName(' . PHP_EOL . $this->_t(3) . 'array(' . implode(',', $gets) . '),' . PHP_EOL . $this->_t(3) . 'array(' . implode(',', $keys) . ')));';
|
||||
$queryFrom = '$db->quoteName(' . $this->db->quote($table) . ', ' . $this->db->quote($as) . ')';
|
||||
// return the select query
|
||||
return array('select' => $querySelect, 'from' => $queryFrom, 'name' => $queryName, 'table' => $table, 'type' => $type, 'select_gets' => $gets, 'select_keys' => $keys);
|
||||
@ -4005,9 +4030,9 @@ class Get
|
||||
$data = $this->db->loadObjectList();
|
||||
// start building the MySql dump
|
||||
$dump = "--";
|
||||
$dump .= PHP_EOL . "-- Dumping data for table `#__".$this->bbb."component".$this->ddd."_" . $view . "`";
|
||||
$dump .= PHP_EOL . "-- Dumping data for table `#__" . $this->bbb . "component" . $this->ddd . "_" . $view . "`";
|
||||
$dump .= PHP_EOL . "--";
|
||||
$dump .= PHP_EOL . PHP_EOL . "INSERT INTO `#__".$this->bbb."component".$this->ddd."_" . $view . "` (";
|
||||
$dump .= PHP_EOL . PHP_EOL . "INSERT INTO `#__" . $this->bbb . "component" . $this->ddd . "_" . $view . "` (";
|
||||
foreach ($data as $line)
|
||||
{
|
||||
$comaSet = 0;
|
||||
|
@ -494,7 +494,7 @@ class Structure extends Get
|
||||
{
|
||||
$this->fileContentStatic[$this->hhh . 'EXSTRA_MEDIA_FOLDERS' . $this->hhh] = '';
|
||||
}
|
||||
$this->fileContentStatic[$this->hhh . 'EXSTRA_MEDIA_FOLDERS' . $this->hhh] .= PHP_EOL . "\t\t<folder>" . $libFolder . "</folder>";
|
||||
$this->fileContentStatic[$this->hhh . 'EXSTRA_MEDIA_FOLDERS' . $this->hhh] .= PHP_EOL . $this->_t(2) . "<folder>" . $libFolder . "</folder>";
|
||||
}
|
||||
}
|
||||
// if config fields are found load into component config (avoiding dublicates)
|
||||
@ -1285,7 +1285,7 @@ class Structure extends Get
|
||||
}
|
||||
if (count($pathArray) == 1 && $firstFolder === 'media')
|
||||
{
|
||||
$this->fileContentStatic[$this->hhh . 'EXSTRA_MEDIA_FOLDERS' . $this->hhh] .= PHP_EOL . "\t\t<folder>" . $lastFolder . "</folder>";
|
||||
$this->fileContentStatic[$this->hhh . 'EXSTRA_MEDIA_FOLDERS' . $this->hhh] .= PHP_EOL . $this->_t(2) . "<folder>" . $lastFolder . "</folder>";
|
||||
}
|
||||
// check if we sould add it to the site xml list
|
||||
if (!isset($this->fileContentStatic[$this->hhh . 'EXSTRA_SITE_FOLDERS' . $this->hhh]))
|
||||
@ -1294,7 +1294,7 @@ class Structure extends Get
|
||||
}
|
||||
if (count($pathArray) == 1 && $firstFolder === 'site')
|
||||
{
|
||||
$this->fileContentStatic[$this->hhh . 'EXSTRA_SITE_FOLDERS' . $this->hhh] .= PHP_EOL . "\t\t<folder>" . $lastFolder . "</folder>";
|
||||
$this->fileContentStatic[$this->hhh . 'EXSTRA_SITE_FOLDERS' . $this->hhh] .= PHP_EOL . $this->_t(2) . "<folder>" . $lastFolder . "</folder>";
|
||||
}
|
||||
// check if we sould add it to the admin xml list
|
||||
if (!isset($this->fileContentStatic[$this->hhh . 'EXSTRA_ADMIN_FOLDERS' . $this->hhh]))
|
||||
@ -1303,7 +1303,7 @@ class Structure extends Get
|
||||
}
|
||||
if (count($pathArray) == 1 && $firstFolder === 'admin')
|
||||
{
|
||||
$this->fileContentStatic[$this->hhh . 'EXSTRA_ADMIN_FOLDERS' . $this->hhh] .= PHP_EOL . "\t\t\t<folder>" . $lastFolder . "</folder>";
|
||||
$this->fileContentStatic[$this->hhh . 'EXSTRA_ADMIN_FOLDERS' . $this->hhh] .= PHP_EOL . $this->_t(3) . "<folder>" . $lastFolder . "</folder>";
|
||||
}
|
||||
// make we have not duplicates
|
||||
$key_pointer = ComponentbuilderHelper::safeString($custom['folder']) . '_f' . $pointer_tracker;
|
||||
|
@ -457,7 +457,7 @@ class Fields extends Structure
|
||||
$readOnly = false;
|
||||
if ($view['settings']->type == 2)
|
||||
{
|
||||
$readOnly = "\t\t\t" . 'readonly="true"' . PHP_EOL . "\t\t\t" . 'disabled="true"';
|
||||
$readOnly = $this->_t(3) . 'readonly="true"' . PHP_EOL . $this->_t(3) . 'disabled="true"';
|
||||
}
|
||||
// start adding dynamc fields
|
||||
$dynamicFields = '';
|
||||
@ -471,157 +471,157 @@ class Fields extends Structure
|
||||
// set the default fields
|
||||
$fieldSet = array();
|
||||
$fieldSet[] = '<fieldset name="details">';
|
||||
$fieldSet[] = "\t\t<!--" . $this->setLine(__LINE__) . " Default Fields. -->";
|
||||
$fieldSet[] = "\t\t<!--" . $this->setLine(__LINE__) . " Id Field. Type: Text (joomla) -->";
|
||||
$fieldSet[] = $this->_t(2) . "<!--" . $this->setLine(__LINE__) . " Default Fields. -->";
|
||||
$fieldSet[] = $this->_t(2) . "<!--" . $this->setLine(__LINE__) . " Id Field. Type: Text (joomla) -->";
|
||||
// if id is not set
|
||||
if (!isset($this->fieldsNames[$view_name_single]['id']))
|
||||
{
|
||||
$fieldSet[] = "\t\t<field";
|
||||
$fieldSet[] = "\t\t\tname=" . '"id"';
|
||||
$fieldSet[] = "\t\t\t" . 'type="text" class="readonly" label="JGLOBAL_FIELD_ID_LABEL"';
|
||||
$fieldSet[] = "\t\t\t" . 'description ="JGLOBAL_FIELD_ID_DESC" size="10" default="0"';
|
||||
$fieldSet[] = "\t\t\t" . 'readonly="true"';
|
||||
$fieldSet[] = "\t\t/>";
|
||||
$fieldSet[] = $this->_t(2) . "<field";
|
||||
$fieldSet[] = $this->_t(3) . "name=" . '"id"';
|
||||
$fieldSet[] = $this->_t(3) . 'type="text" class="readonly" label="JGLOBAL_FIELD_ID_LABEL"';
|
||||
$fieldSet[] = $this->_t(3) . 'description ="JGLOBAL_FIELD_ID_DESC" size="10" default="0"';
|
||||
$fieldSet[] = $this->_t(3) . 'readonly="true"';
|
||||
$fieldSet[] = $this->_t(2) . "/>";
|
||||
// count the static field created
|
||||
$this->fieldCount++;
|
||||
}
|
||||
// if created is not set
|
||||
if (!isset($this->fieldsNames[$view_name_single]['created']))
|
||||
{
|
||||
$fieldSet[] = "\t\t<!--" . $this->setLine(__LINE__) . " Date Created Field. Type: Calendar (joomla) -->";
|
||||
$fieldSet[] = "\t\t<field";
|
||||
$fieldSet[] = "\t\t\tname=" . '"created"';
|
||||
$fieldSet[] = "\t\t\ttype=" . '"calendar"';
|
||||
$fieldSet[] = "\t\t\tlabel=" . '"' . $langView . '_CREATED_DATE_LABEL"';
|
||||
$fieldSet[] = "\t\t\tdescription=" . '"' . $langView . '_CREATED_DATE_DESC"';
|
||||
$fieldSet[] = "\t\t\tsize=" . '"22"';
|
||||
$fieldSet[] = $this->_t(2) . "<!--" . $this->setLine(__LINE__) . " Date Created Field. Type: Calendar (joomla) -->";
|
||||
$fieldSet[] = $this->_t(2) . "<field";
|
||||
$fieldSet[] = $this->_t(3) . "name=" . '"created"';
|
||||
$fieldSet[] = $this->_t(3) . "type=" . '"calendar"';
|
||||
$fieldSet[] = $this->_t(3) . "label=" . '"' . $langView . '_CREATED_DATE_LABEL"';
|
||||
$fieldSet[] = $this->_t(3) . "description=" . '"' . $langView . '_CREATED_DATE_DESC"';
|
||||
$fieldSet[] = $this->_t(3) . "size=" . '"22"';
|
||||
if ($readOnly)
|
||||
{
|
||||
$fieldSet[] = $readOnly;
|
||||
}
|
||||
$fieldSet[] = "\t\t\tformat=" . '"%Y-%m-%d %H:%M:%S"';
|
||||
$fieldSet[] = "\t\t\tfilter=" . '"user_utc"';
|
||||
$fieldSet[] = "\t\t/>";
|
||||
$fieldSet[] = $this->_t(3) . "format=" . '"%Y-%m-%d %H:%M:%S"';
|
||||
$fieldSet[] = $this->_t(3) . "filter=" . '"user_utc"';
|
||||
$fieldSet[] = $this->_t(2) . "/>";
|
||||
// count the static field created
|
||||
$this->fieldCount++;
|
||||
}
|
||||
// if created_by is not set
|
||||
if (!isset($this->fieldsNames[$view_name_single]['created_by']))
|
||||
{
|
||||
$fieldSet[] = "\t\t<!--" . $this->setLine(__LINE__) . " User Created Field. Type: User (joomla) -->";
|
||||
$fieldSet[] = "\t\t<field";
|
||||
$fieldSet[] = "\t\t\tname=" . '"created_by"';
|
||||
$fieldSet[] = "\t\t\ttype=" . '"user"';
|
||||
$fieldSet[] = "\t\t\tlabel=" . '"' . $langView . '_CREATED_BY_LABEL"';
|
||||
$fieldSet[] = $this->_t(2) . "<!--" . $this->setLine(__LINE__) . " User Created Field. Type: User (joomla) -->";
|
||||
$fieldSet[] = $this->_t(2) . "<field";
|
||||
$fieldSet[] = $this->_t(3) . "name=" . '"created_by"';
|
||||
$fieldSet[] = $this->_t(3) . "type=" . '"user"';
|
||||
$fieldSet[] = $this->_t(3) . "label=" . '"' . $langView . '_CREATED_BY_LABEL"';
|
||||
if ($readOnly)
|
||||
{
|
||||
$fieldSet[] = $readOnly;
|
||||
}
|
||||
$fieldSet[] = "\t\t\tdescription=" . '"' . $langView . '_CREATED_BY_DESC"';
|
||||
$fieldSet[] = "\t\t/>";
|
||||
$fieldSet[] = $this->_t(3) . "description=" . '"' . $langView . '_CREATED_BY_DESC"';
|
||||
$fieldSet[] = $this->_t(2) . "/>";
|
||||
// count the static field created
|
||||
$this->fieldCount++;
|
||||
}
|
||||
// if published is not set
|
||||
if (!isset($this->fieldsNames[$view_name_single]['published']))
|
||||
{
|
||||
$fieldSet[] = "\t\t<!--" . $this->setLine(__LINE__) . " Published Field. Type: List (joomla) -->";
|
||||
$fieldSet[] = "\t\t<field name=" . '"published" type="list" label="JSTATUS"';
|
||||
$fieldSet[] = "\t\t\tdescription=" . '"JFIELD_PUBLISHED_DESC" class="chzn-color-state"';
|
||||
$fieldSet[] = $this->_t(2) . "<!--" . $this->setLine(__LINE__) . " Published Field. Type: List (joomla) -->";
|
||||
$fieldSet[] = $this->_t(2) . "<field name=" . '"published" type="list" label="JSTATUS"';
|
||||
$fieldSet[] = $this->_t(3) . "description=" . '"JFIELD_PUBLISHED_DESC" class="chzn-color-state"';
|
||||
if ($readOnly)
|
||||
{
|
||||
$fieldSet[] = $readOnly;
|
||||
}
|
||||
$fieldSet[] = "\t\t\tfilter=" . '"intval" size="1" default="1" >';
|
||||
$fieldSet[] = "\t\t\t<option value=" . '"1">';
|
||||
$fieldSet[] = "\t\t\t\tJPUBLISHED</option>";
|
||||
$fieldSet[] = "\t\t\t<option value=" . '"0">';
|
||||
$fieldSet[] = "\t\t\t\tJUNPUBLISHED</option>";
|
||||
$fieldSet[] = "\t\t\t<option value=" . '"2">';
|
||||
$fieldSet[] = "\t\t\t\tJARCHIVED</option>";
|
||||
$fieldSet[] = "\t\t\t<option value=" . '"-2">';
|
||||
$fieldSet[] = "\t\t\t\tJTRASHED</option>";
|
||||
$fieldSet[] = "\t\t</field>";
|
||||
$fieldSet[] = $this->_t(3) . "filter=" . '"intval" size="1" default="1" >';
|
||||
$fieldSet[] = $this->_t(3) . "<option value=" . '"1">';
|
||||
$fieldSet[] = $this->_t(4) . "JPUBLISHED</option>";
|
||||
$fieldSet[] = $this->_t(3) . "<option value=" . '"0">';
|
||||
$fieldSet[] = $this->_t(4) . "JUNPUBLISHED</option>";
|
||||
$fieldSet[] = $this->_t(3) . "<option value=" . '"2">';
|
||||
$fieldSet[] = $this->_t(4) . "JARCHIVED</option>";
|
||||
$fieldSet[] = $this->_t(3) . "<option value=" . '"-2">';
|
||||
$fieldSet[] = $this->_t(4) . "JTRASHED</option>";
|
||||
$fieldSet[] = $this->_t(2) . "</field>";
|
||||
// count the static field created
|
||||
$this->fieldCount++;
|
||||
}
|
||||
// if modified is not set
|
||||
if (!isset($this->fieldsNames[$view_name_single]['modified']))
|
||||
{
|
||||
$fieldSet[] = "\t\t<!--" . $this->setLine(__LINE__) . " Date Modified Field. Type: Calendar (joomla) -->";
|
||||
$fieldSet[] = "\t\t" . '<field name="modified" type="calendar" class="readonly"';
|
||||
$fieldSet[] = "\t\t\t" . 'label="' . $langView . '_MODIFIED_DATE_LABEL" description="' . $langView . '_MODIFIED_DATE_DESC"';
|
||||
$fieldSet[] = "\t\t\t" . 'size="22" readonly="true" format="%Y-%m-%d %H:%M:%S" filter="user_utc" />';
|
||||
$fieldSet[] = $this->_t(2) . "<!--" . $this->setLine(__LINE__) . " Date Modified Field. Type: Calendar (joomla) -->";
|
||||
$fieldSet[] = $this->_t(2) . '<field name="modified" type="calendar" class="readonly"';
|
||||
$fieldSet[] = $this->_t(3) . 'label="' . $langView . '_MODIFIED_DATE_LABEL" description="' . $langView . '_MODIFIED_DATE_DESC"';
|
||||
$fieldSet[] = $this->_t(3) . 'size="22" readonly="true" format="%Y-%m-%d %H:%M:%S" filter="user_utc" />';
|
||||
// count the static field created
|
||||
$this->fieldCount++;
|
||||
}
|
||||
// if modified_by is not set
|
||||
if (!isset($this->fieldsNames[$view_name_single]['modified_by']))
|
||||
{
|
||||
$fieldSet[] = "\t\t<!--" . $this->setLine(__LINE__) . " User Modified Field. Type: User (joomla) -->";
|
||||
$fieldSet[] = "\t\t" . '<field name="modified_by" type="user"';
|
||||
$fieldSet[] = "\t\t\t" . 'label="' . $langView . '_MODIFIED_BY_LABEL"';
|
||||
$fieldSet[] = "\t\t\tdescription=" . '"' . $langView . '_MODIFIED_BY_DESC"';
|
||||
$fieldSet[] = "\t\t\t" . 'class="readonly"';
|
||||
$fieldSet[] = "\t\t\t" . 'readonly="true"';
|
||||
$fieldSet[] = "\t\t\t" . 'filter="unset"';
|
||||
$fieldSet[] = "\t\t/>";
|
||||
$fieldSet[] = $this->_t(2) . "<!--" . $this->setLine(__LINE__) . " User Modified Field. Type: User (joomla) -->";
|
||||
$fieldSet[] = $this->_t(2) . '<field name="modified_by" type="user"';
|
||||
$fieldSet[] = $this->_t(3) . 'label="' . $langView . '_MODIFIED_BY_LABEL"';
|
||||
$fieldSet[] = $this->_t(3) . "description=" . '"' . $langView . '_MODIFIED_BY_DESC"';
|
||||
$fieldSet[] = $this->_t(3) . 'class="readonly"';
|
||||
$fieldSet[] = $this->_t(3) . 'readonly="true"';
|
||||
$fieldSet[] = $this->_t(3) . 'filter="unset"';
|
||||
$fieldSet[] = $this->_t(2) . "/>";
|
||||
// count the static field created
|
||||
$this->fieldCount++;
|
||||
}
|
||||
// check if view has access
|
||||
if (isset($this->accessBuilder[$view_name_single]) && ComponentbuilderHelper::checkString($this->accessBuilder[$view_name_single]) && !isset($this->fieldsNames[$view_name_single]['access']))
|
||||
{
|
||||
$fieldSet[] = "\t\t<!--" . $this->setLine(__LINE__) . " Access Field. Type: Accesslevel (joomla) -->";
|
||||
$fieldSet[] = "\t\t" . '<field name="access"';
|
||||
$fieldSet[] = "\t\t\t" . 'type="accesslevel"';
|
||||
$fieldSet[] = "\t\t\t" . 'label="JFIELD_ACCESS_LABEL"';
|
||||
$fieldSet[] = "\t\t\t" . 'description="JFIELD_ACCESS_DESC"';
|
||||
$fieldSet[] = "\t\t\t" . 'default="1"';
|
||||
$fieldSet[] = $this->_t(2) . "<!--" . $this->setLine(__LINE__) . " Access Field. Type: Accesslevel (joomla) -->";
|
||||
$fieldSet[] = $this->_t(2) . '<field name="access"';
|
||||
$fieldSet[] = $this->_t(3) . 'type="accesslevel"';
|
||||
$fieldSet[] = $this->_t(3) . 'label="JFIELD_ACCESS_LABEL"';
|
||||
$fieldSet[] = $this->_t(3) . 'description="JFIELD_ACCESS_DESC"';
|
||||
$fieldSet[] = $this->_t(3) . 'default="1"';
|
||||
if ($readOnly)
|
||||
{
|
||||
$fieldSet[] = $readOnly;
|
||||
}
|
||||
$fieldSet[] = "\t\t\t" . 'required="false"';
|
||||
$fieldSet[] = "\t\t/>";
|
||||
$fieldSet[] = $this->_t(3) . 'required="false"';
|
||||
$fieldSet[] = $this->_t(2) . "/>";
|
||||
// count the static field created
|
||||
$this->fieldCount++;
|
||||
}
|
||||
// if ordering is not set
|
||||
if (!isset($this->fieldsNames[$view_name_single]['ordering']))
|
||||
{
|
||||
$fieldSet[] = "\t\t<!--" . $this->setLine(__LINE__) . " Ordering Field. Type: Numbers (joomla) -->";
|
||||
$fieldSet[] = "\t\t<field";
|
||||
$fieldSet[] = "\t\t\t" . 'name="ordering"';
|
||||
$fieldSet[] = "\t\t\t" . 'type="number"';
|
||||
$fieldSet[] = "\t\t\t" . 'class="inputbox validate-ordering"';
|
||||
$fieldSet[] = "\t\t\t" . 'label="' . $langView . '_ORDERING_LABEL' . '"';
|
||||
$fieldSet[] = "\t\t\t" . 'description=""';
|
||||
$fieldSet[] = "\t\t\t" . 'default="0"';
|
||||
$fieldSet[] = "\t\t\t" . 'size="6"';
|
||||
$fieldSet[] = $this->_t(2) . "<!--" . $this->setLine(__LINE__) . " Ordering Field. Type: Numbers (joomla) -->";
|
||||
$fieldSet[] = $this->_t(2) . "<field";
|
||||
$fieldSet[] = $this->_t(3) . 'name="ordering"';
|
||||
$fieldSet[] = $this->_t(3) . 'type="number"';
|
||||
$fieldSet[] = $this->_t(3) . 'class="inputbox validate-ordering"';
|
||||
$fieldSet[] = $this->_t(3) . 'label="' . $langView . '_ORDERING_LABEL' . '"';
|
||||
$fieldSet[] = $this->_t(3) . 'description=""';
|
||||
$fieldSet[] = $this->_t(3) . 'default="0"';
|
||||
$fieldSet[] = $this->_t(3) . 'size="6"';
|
||||
if ($readOnly)
|
||||
{
|
||||
$fieldSet[] = $readOnly;
|
||||
}
|
||||
$fieldSet[] = "\t\t\t" . 'required="false"';
|
||||
$fieldSet[] = "\t\t/>";
|
||||
$fieldSet[] = $this->_t(3) . 'required="false"';
|
||||
$fieldSet[] = $this->_t(2) . "/>";
|
||||
// count the static field created
|
||||
$this->fieldCount++;
|
||||
}
|
||||
// if version is not set
|
||||
if (!isset($this->fieldsNames[$view_name_single]['version']))
|
||||
{
|
||||
$fieldSet[] = "\t\t<!--" . $this->setLine(__LINE__) . " Version Field. Type: Text (joomla) -->";
|
||||
$fieldSet[] = "\t\t<field";
|
||||
$fieldSet[] = "\t\t\t" . 'name="version"';
|
||||
$fieldSet[] = "\t\t\t" . 'type="text"';
|
||||
$fieldSet[] = "\t\t\t" . 'class="readonly"';
|
||||
$fieldSet[] = "\t\t\t" . 'label="' . $langView . '_VERSION_LABEL"';
|
||||
$fieldSet[] = "\t\t\t" . 'description="' . $langView . '_VERSION_DESC"';
|
||||
$fieldSet[] = "\t\t\t" . 'size="6"';
|
||||
$fieldSet[] = "\t\t\t" . 'readonly="true"';
|
||||
$fieldSet[] = "\t\t\t" . 'filter="unset"';
|
||||
$fieldSet[] = "\t\t/>";
|
||||
$fieldSet[] = $this->_t(2) . "<!--" . $this->setLine(__LINE__) . " Version Field. Type: Text (joomla) -->";
|
||||
$fieldSet[] = $this->_t(2) . "<field";
|
||||
$fieldSet[] = $this->_t(3) . 'name="version"';
|
||||
$fieldSet[] = $this->_t(3) . 'type="text"';
|
||||
$fieldSet[] = $this->_t(3) . 'class="readonly"';
|
||||
$fieldSet[] = $this->_t(3) . 'label="' . $langView . '_VERSION_LABEL"';
|
||||
$fieldSet[] = $this->_t(3) . 'description="' . $langView . '_VERSION_DESC"';
|
||||
$fieldSet[] = $this->_t(3) . 'size="6"';
|
||||
$fieldSet[] = $this->_t(3) . 'readonly="true"';
|
||||
$fieldSet[] = $this->_t(3) . 'filter="unset"';
|
||||
$fieldSet[] = $this->_t(2) . "/>";
|
||||
// count the static field created
|
||||
$this->fieldCount++;
|
||||
}
|
||||
@ -629,77 +629,77 @@ class Fields extends Structure
|
||||
if (isset($this->metadataBuilder[$view_name_single]) && ComponentbuilderHelper::checkString($this->metadataBuilder[$view_name_single]))
|
||||
{
|
||||
// metakey
|
||||
$fieldSet[] = "\t\t<!--" . $this->setLine(__LINE__) . " Metakey Field. Type: Textarea (joomla) -->";
|
||||
$fieldSet[] = "\t\t<field";
|
||||
$fieldSet[] = "\t\t\t" . 'name="metakey"';
|
||||
$fieldSet[] = "\t\t\t" . 'type="textarea"';
|
||||
$fieldSet[] = "\t\t\t" . 'label="JFIELD_META_KEYWORDS_LABEL"';
|
||||
$fieldSet[] = "\t\t\t" . 'description="JFIELD_META_KEYWORDS_DESC"';
|
||||
$fieldSet[] = "\t\t\t" . 'rows="3"';
|
||||
$fieldSet[] = "\t\t\t" . 'cols="30"';
|
||||
$fieldSet[] = "\t\t/>";
|
||||
$fieldSet[] = $this->_t(2) . "<!--" . $this->setLine(__LINE__) . " Metakey Field. Type: Textarea (joomla) -->";
|
||||
$fieldSet[] = $this->_t(2) . "<field";
|
||||
$fieldSet[] = $this->_t(3) . 'name="metakey"';
|
||||
$fieldSet[] = $this->_t(3) . 'type="textarea"';
|
||||
$fieldSet[] = $this->_t(3) . 'label="JFIELD_META_KEYWORDS_LABEL"';
|
||||
$fieldSet[] = $this->_t(3) . 'description="JFIELD_META_KEYWORDS_DESC"';
|
||||
$fieldSet[] = $this->_t(3) . 'rows="3"';
|
||||
$fieldSet[] = $this->_t(3) . 'cols="30"';
|
||||
$fieldSet[] = $this->_t(2) . "/>";
|
||||
// count the static field created
|
||||
$this->fieldCount++;
|
||||
// metadesc
|
||||
$fieldSet[] = "\t\t<!--" . $this->setLine(__LINE__) . " Metadesc Field. Type: Textarea (joomla) -->";
|
||||
$fieldSet[] = "\t\t<field";
|
||||
$fieldSet[] = "\t\t\t" . 'name="metadesc"';
|
||||
$fieldSet[] = "\t\t\t" . 'type="textarea"';
|
||||
$fieldSet[] = "\t\t\t" . 'label="JFIELD_META_DESCRIPTION_LABEL"';
|
||||
$fieldSet[] = "\t\t\t" . 'description="JFIELD_META_DESCRIPTION_DESC"';
|
||||
$fieldSet[] = "\t\t\t" . 'rows="3"';
|
||||
$fieldSet[] = "\t\t\t" . 'cols="30"';
|
||||
$fieldSet[] = "\t\t/>";
|
||||
$fieldSet[] = $this->_t(2) . "<!--" . $this->setLine(__LINE__) . " Metadesc Field. Type: Textarea (joomla) -->";
|
||||
$fieldSet[] = $this->_t(2) . "<field";
|
||||
$fieldSet[] = $this->_t(3) . 'name="metadesc"';
|
||||
$fieldSet[] = $this->_t(3) . 'type="textarea"';
|
||||
$fieldSet[] = $this->_t(3) . 'label="JFIELD_META_DESCRIPTION_LABEL"';
|
||||
$fieldSet[] = $this->_t(3) . 'description="JFIELD_META_DESCRIPTION_DESC"';
|
||||
$fieldSet[] = $this->_t(3) . 'rows="3"';
|
||||
$fieldSet[] = $this->_t(3) . 'cols="30"';
|
||||
$fieldSet[] = $this->_t(2) . "/>";
|
||||
// count the static field created
|
||||
$this->fieldCount++;
|
||||
}
|
||||
// load the dynamic fields now
|
||||
if (ComponentbuilderHelper::checkString($dynamicFields))
|
||||
{
|
||||
$fieldSet[] = "\t\t<!--" . $this->setLine(__LINE__) . " Dynamic Fields. -->" . $dynamicFields;
|
||||
$fieldSet[] = $this->_t(2) . "<!--" . $this->setLine(__LINE__) . " Dynamic Fields. -->" . $dynamicFields;
|
||||
}
|
||||
// close fieldset
|
||||
$fieldSet[] = "\t</fieldset>";
|
||||
$fieldSet[] = $this->_t(1) . "</fieldset>";
|
||||
// check if metadata is added to this view
|
||||
if (isset($this->metadataBuilder[$view_name_single]) && ComponentbuilderHelper::checkString($this->metadataBuilder[$view_name_single]))
|
||||
{
|
||||
$fieldSet[] = PHP_EOL . "\t<!--" . $this->setLine(__LINE__) . " Metadata Fields. -->";
|
||||
$fieldSet[] = "\t<fields" . ' name="metadata" label="JGLOBAL_FIELDSET_METADATA_OPTIONS">';
|
||||
$fieldSet[] = "\t\t" . '<fieldset name="vdmmetadata"';
|
||||
$fieldSet[] = "\t\t\t" . 'label="JGLOBAL_FIELDSET_METADATA_OPTIONS">';
|
||||
$fieldSet[] = PHP_EOL . $this->_t(1) . "<!--" . $this->setLine(__LINE__) . " Metadata Fields. -->";
|
||||
$fieldSet[] = $this->_t(1) . "<fields" . ' name="metadata" label="JGLOBAL_FIELDSET_METADATA_OPTIONS">';
|
||||
$fieldSet[] = $this->_t(2) . '<fieldset name="vdmmetadata"';
|
||||
$fieldSet[] = $this->_t(3) . 'label="JGLOBAL_FIELDSET_METADATA_OPTIONS">';
|
||||
// robots
|
||||
$fieldSet[] = "\t\t\t<!--" . $this->setLine(__LINE__) . " Robots Field. Type: List (joomla) -->";
|
||||
$fieldSet[] = "\t\t\t" . '<field name="robots"';
|
||||
$fieldSet[] = "\t\t\t\t" . 'type="list"';
|
||||
$fieldSet[] = "\t\t\t\t" . 'label="JFIELD_METADATA_ROBOTS_LABEL"';
|
||||
$fieldSet[] = "\t\t\t\t" . 'description="JFIELD_METADATA_ROBOTS_DESC" >';
|
||||
$fieldSet[] = "\t\t\t\t" . '<option value="">JGLOBAL_USE_GLOBAL</option>';
|
||||
$fieldSet[] = "\t\t\t\t" . '<option value="index, follow">JGLOBAL_INDEX_FOLLOW</option>';
|
||||
$fieldSet[] = "\t\t\t\t" . '<option value="noindex, follow">JGLOBAL_NOINDEX_FOLLOW</option>';
|
||||
$fieldSet[] = "\t\t\t\t" . '<option value="index, nofollow">JGLOBAL_INDEX_NOFOLLOW</option>';
|
||||
$fieldSet[] = "\t\t\t\t" . '<option value="noindex, nofollow">JGLOBAL_NOINDEX_NOFOLLOW</option>';
|
||||
$fieldSet[] = "\t\t\t" . '</field>';
|
||||
$fieldSet[] = $this->_t(3) . "<!--" . $this->setLine(__LINE__) . " Robots Field. Type: List (joomla) -->";
|
||||
$fieldSet[] = $this->_t(3) . '<field name="robots"';
|
||||
$fieldSet[] = $this->_t(4) . 'type="list"';
|
||||
$fieldSet[] = $this->_t(4) . 'label="JFIELD_METADATA_ROBOTS_LABEL"';
|
||||
$fieldSet[] = $this->_t(4) . 'description="JFIELD_METADATA_ROBOTS_DESC" >';
|
||||
$fieldSet[] = $this->_t(4) . '<option value="">JGLOBAL_USE_GLOBAL</option>';
|
||||
$fieldSet[] = $this->_t(4) . '<option value="index, follow">JGLOBAL_INDEX_FOLLOW</option>';
|
||||
$fieldSet[] = $this->_t(4) . '<option value="noindex, follow">JGLOBAL_NOINDEX_FOLLOW</option>';
|
||||
$fieldSet[] = $this->_t(4) . '<option value="index, nofollow">JGLOBAL_INDEX_NOFOLLOW</option>';
|
||||
$fieldSet[] = $this->_t(4) . '<option value="noindex, nofollow">JGLOBAL_NOINDEX_NOFOLLOW</option>';
|
||||
$fieldSet[] = $this->_t(3) . '</field>';
|
||||
// count the static field created
|
||||
$this->fieldCount++;
|
||||
// author
|
||||
$fieldSet[] = "\t\t\t<!--" . $this->setLine(__LINE__) . " Author Field. Type: Text (joomla) -->";
|
||||
$fieldSet[] = "\t\t\t" . '<field name="author"';
|
||||
$fieldSet[] = "\t\t\t\t" . 'type="text"';
|
||||
$fieldSet[] = "\t\t\t\t" . 'label="JAUTHOR" description="JFIELD_METADATA_AUTHOR_DESC"';
|
||||
$fieldSet[] = "\t\t\t\t" . 'size="20"';
|
||||
$fieldSet[] = "\t\t\t/>";
|
||||
$fieldSet[] = $this->_t(3) . "<!--" . $this->setLine(__LINE__) . " Author Field. Type: Text (joomla) -->";
|
||||
$fieldSet[] = $this->_t(3) . '<field name="author"';
|
||||
$fieldSet[] = $this->_t(4) . 'type="text"';
|
||||
$fieldSet[] = $this->_t(4) . 'label="JAUTHOR" description="JFIELD_METADATA_AUTHOR_DESC"';
|
||||
$fieldSet[] = $this->_t(4) . 'size="20"';
|
||||
$fieldSet[] = $this->_t(3) . "/>";
|
||||
// count the static field created
|
||||
$this->fieldCount++;
|
||||
// rights
|
||||
$fieldSet[] = "\t\t\t<!--" . $this->setLine(__LINE__) . " Rights Field. Type: Textarea (joomla) -->";
|
||||
$fieldSet[] = "\t\t\t" . '<field name="rights" type="textarea" label="JFIELD_META_RIGHTS_LABEL"';
|
||||
$fieldSet[] = "\t\t\t\t" . 'description="JFIELD_META_RIGHTS_DESC" required="false" filter="string"';
|
||||
$fieldSet[] = "\t\t\t\t" . 'cols="30" rows="2"';
|
||||
$fieldSet[] = "\t\t\t/>";
|
||||
$fieldSet[] = $this->_t(3) . "<!--" . $this->setLine(__LINE__) . " Rights Field. Type: Textarea (joomla) -->";
|
||||
$fieldSet[] = $this->_t(3) . '<field name="rights" type="textarea" label="JFIELD_META_RIGHTS_LABEL"';
|
||||
$fieldSet[] = $this->_t(4) . 'description="JFIELD_META_RIGHTS_DESC" required="false" filter="string"';
|
||||
$fieldSet[] = $this->_t(4) . 'cols="30" rows="2"';
|
||||
$fieldSet[] = $this->_t(3) . "/>";
|
||||
// count the static field created
|
||||
$this->fieldCount++;
|
||||
$fieldSet[] = "\t\t</fieldset>";
|
||||
$fieldSet[] = "\t</fields>";
|
||||
$fieldSet[] = $this->_t(2) . "</fieldset>";
|
||||
$fieldSet[] = $this->_t(1) . "</fields>";
|
||||
}
|
||||
// retunr the set
|
||||
return implode(PHP_EOL, $fieldSet);
|
||||
@ -1212,14 +1212,14 @@ class Fields extends Structure
|
||||
if ($setType === 'option')
|
||||
{
|
||||
// now add to the field set
|
||||
$field .= PHP_EOL . "\t" . $taber . "\t<!--" . $this->setLine(__LINE__) . " " . ComponentbuilderHelper::safeString($name, 'F') . " Field. Type: " . ComponentbuilderHelper::safeString($typeName, 'F') . ". (joomla) -->";
|
||||
$field .= PHP_EOL . "\t" . $taber . "\t<field";
|
||||
$field .= PHP_EOL . $this->_t(1) . $taber . $this->_t(1) . "<!--" . $this->setLine(__LINE__) . " " . ComponentbuilderHelper::safeString($name, 'F') . " Field. Type: " . ComponentbuilderHelper::safeString($typeName, 'F') . ". (joomla) -->";
|
||||
$field .= PHP_EOL . $this->_t(1) . $taber . $this->_t(1) . "<field";
|
||||
$optionSet = '';
|
||||
foreach ($fieldAttributes as $property => $value)
|
||||
{
|
||||
if ($property != 'option')
|
||||
{
|
||||
$field .= PHP_EOL . "\t\t" . $taber . "\t" . $property . '="' . $value . '"';
|
||||
$field .= PHP_EOL . $this->_t(2) . $taber . $this->_t(1) . $property . '="' . $value . '"';
|
||||
}
|
||||
elseif ($property === 'option')
|
||||
{
|
||||
@ -1238,7 +1238,7 @@ class Fields extends Structure
|
||||
// add to lang array
|
||||
$this->langContent[$this->lang][$langValue] = $t;
|
||||
// no add to option set
|
||||
$optionSet .= PHP_EOL . "\t" . $taber . "\t\t" . '<option value="' . $v . '">' . PHP_EOL . "\t" . $taber . "\t\t\t" . $langValue . '</option>';
|
||||
$optionSet .= PHP_EOL . $this->_t(1) . $taber . $this->_t(2) . '<option value="' . $v . '">' . PHP_EOL . $this->_t(1) . $taber . $this->_t(3) . $langValue . '</option>';
|
||||
$optionArray[$v] = $langValue;
|
||||
}
|
||||
else
|
||||
@ -1248,7 +1248,7 @@ class Fields extends Structure
|
||||
// add to lang array
|
||||
$this->langContent[$this->lang][$langValue] = $option;
|
||||
// no add to option set
|
||||
$optionSet .= PHP_EOL . "\t\t" . $taber . "\t" . '<option value="' . $option . '">' . PHP_EOL . "\t\t" . $taber . "\t\t" . $langValue . '</option>';
|
||||
$optionSet .= PHP_EOL . $this->_t(2) . $taber . $this->_t(1) . '<option value="' . $option . '">' . PHP_EOL . $this->_t(2) . $taber . $this->_t(2) . $langValue . '</option>';
|
||||
$optionArray[$option] = $langValue;
|
||||
}
|
||||
}
|
||||
@ -1264,7 +1264,7 @@ class Fields extends Structure
|
||||
// add to lang array
|
||||
$this->langContent[$this->lang][$langValue] = $t;
|
||||
// no add to option set
|
||||
$optionSet .= PHP_EOL . "\t\t" . $taber . "\t" . '<option value="' . $v . '">' . PHP_EOL . "\t\t" . $taber . "\t\t" . $langValue . '</option>';
|
||||
$optionSet .= PHP_EOL . $this->_t(2) . $taber . $this->_t(1) . '<option value="' . $v . '">' . PHP_EOL . $this->_t(2) . $taber . $this->_t(2) . $langValue . '</option>';
|
||||
$optionArray[$v] = $langValue;
|
||||
}
|
||||
else
|
||||
@ -1274,7 +1274,7 @@ class Fields extends Structure
|
||||
// add to lang array
|
||||
$this->langContent[$this->lang][$langValue] = $value;
|
||||
// no add to option set
|
||||
$optionSet .= PHP_EOL . "\t\t" . $taber . "\t" . '<option value="' . $value . '">' . PHP_EOL . "\t\t" . $taber . "\t\t" . $langValue . '</option>';
|
||||
$optionSet .= PHP_EOL . $this->_t(2) . $taber . $this->_t(1) . '<option value="' . $value . '">' . PHP_EOL . $this->_t(2) . $taber . $this->_t(2) . $langValue . '</option>';
|
||||
$optionArray[$value] = $langValue;
|
||||
}
|
||||
}
|
||||
@ -1283,41 +1283,41 @@ class Fields extends Structure
|
||||
if (ComponentbuilderHelper::checkString($optionSet))
|
||||
{
|
||||
$field .= '>';
|
||||
$field .= PHP_EOL . "\t\t\t" . $taber . "<!--" . $this->setLine(__LINE__) . " Option Set. -->";
|
||||
$field .= PHP_EOL . $this->_t(3) . $taber . "<!--" . $this->setLine(__LINE__) . " Option Set. -->";
|
||||
$field .= $optionSet;
|
||||
$field .= PHP_EOL . "\t\t" . $taber . "</field>";
|
||||
$field .= PHP_EOL . $this->_t(2) . $taber . "</field>";
|
||||
}
|
||||
elseif ($typeName === 'sql')
|
||||
{
|
||||
$optionArray = false;
|
||||
$field .= PHP_EOL . "\t\t" . $taber . "/>";
|
||||
$field .= PHP_EOL . $this->_t(2) . $taber . "/>";
|
||||
}
|
||||
else
|
||||
{
|
||||
$optionArray = false;
|
||||
$field .= PHP_EOL . "\t\t\t" . $taber . "<!--" . $this->setLine(__LINE__) . " No Manual Options Were Added In Field Settings. -->";
|
||||
$field .= PHP_EOL . "\t\t" . $taber . "/>";
|
||||
$field .= PHP_EOL . $this->_t(3) . $taber . "<!--" . $this->setLine(__LINE__) . " No Manual Options Were Added In Field Settings. -->";
|
||||
$field .= PHP_EOL . $this->_t(2) . $taber . "/>";
|
||||
}
|
||||
}
|
||||
elseif ($setType === 'plain')
|
||||
{
|
||||
// now add to the field set
|
||||
$field .= PHP_EOL . "\t\t" . $taber . "<!--" . $this->setLine(__LINE__) . " " . ComponentbuilderHelper::safeString($name, 'F') . " Field. Type: " . ComponentbuilderHelper::safeString($typeName, 'F') . ". (joomla) -->";
|
||||
$field .= PHP_EOL . "\t\t" . $taber . "<field";
|
||||
$field .= PHP_EOL . $this->_t(2) . $taber . "<!--" . $this->setLine(__LINE__) . " " . ComponentbuilderHelper::safeString($name, 'F') . " Field. Type: " . ComponentbuilderHelper::safeString($typeName, 'F') . ". (joomla) -->";
|
||||
$field .= PHP_EOL . $this->_t(2) . $taber . "<field";
|
||||
foreach ($fieldAttributes as $property => $value)
|
||||
{
|
||||
if ($property != 'option')
|
||||
{
|
||||
$field .= PHP_EOL . "\t\t" . $taber . "\t" . $property . '="' . $value . '"';
|
||||
$field .= PHP_EOL . $this->_t(2) . $taber . $this->_t(1) . $property . '="' . $value . '"';
|
||||
}
|
||||
}
|
||||
$field .= PHP_EOL . "\t\t" . $taber . "/>";
|
||||
$field .= PHP_EOL . $this->_t(2) . $taber . "/>";
|
||||
}
|
||||
elseif ($setType === 'spacer')
|
||||
{
|
||||
// now add to the field set
|
||||
$field .= PHP_EOL . "\t\t<!--" . $this->setLine(__LINE__) . " " . ComponentbuilderHelper::safeString($name, 'F') . " Field. Type: " . ComponentbuilderHelper::safeString($typeName, 'F') . ". A None Database Field. (joomla) -->";
|
||||
$field .= PHP_EOL . "\t\t<field";
|
||||
$field .= PHP_EOL . $this->_t(2) . "<!--" . $this->setLine(__LINE__) . " " . ComponentbuilderHelper::safeString($name, 'F') . " Field. Type: " . ComponentbuilderHelper::safeString($typeName, 'F') . ". A None Database Field. (joomla) -->";
|
||||
$field .= PHP_EOL . $this->_t(2) . "<field";
|
||||
foreach ($fieldAttributes as $property => $value)
|
||||
{
|
||||
if ($property != 'option')
|
||||
@ -1333,19 +1333,19 @@ class Fields extends Structure
|
||||
if ($typeName === 'repeatable')
|
||||
{
|
||||
// now add to the field set
|
||||
$field .= PHP_EOL . "\t\t<!--" . $this->setLine(__LINE__) . " " . ComponentbuilderHelper::safeString($name, 'F') . " Field. Type: " . ComponentbuilderHelper::safeString($typeName, 'F') . ". (joomla) -->";
|
||||
$field .= PHP_EOL . "\t\t<field";
|
||||
$field .= PHP_EOL . $this->_t(2) . "<!--" . $this->setLine(__LINE__) . " " . ComponentbuilderHelper::safeString($name, 'F') . " Field. Type: " . ComponentbuilderHelper::safeString($typeName, 'F') . ". (joomla) -->";
|
||||
$field .= PHP_EOL . $this->_t(2) . "<field";
|
||||
$fieldsSet = array();
|
||||
foreach ($fieldAttributes as $property => $value)
|
||||
{
|
||||
if ($property != 'fields')
|
||||
{
|
||||
$field .= PHP_EOL . "\t\t\t" . $property . '="' . $value . '"';
|
||||
$field .= PHP_EOL . $this->_t(3) . $property . '="' . $value . '"';
|
||||
}
|
||||
}
|
||||
$field .= ">";
|
||||
$field .= PHP_EOL . "\t\t\t" . '<fields name="' . $fieldAttributes['name'] . '_fields" label="">';
|
||||
$field .= PHP_EOL . "\t\t\t\t" . '<fieldset hidden="true" name="' . $fieldAttributes['name'] . '_modal" repeat="true">';
|
||||
$field .= PHP_EOL . $this->_t(3) . '<fields name="' . $fieldAttributes['name'] . '_fields" label="">';
|
||||
$field .= PHP_EOL . $this->_t(4) . '<fieldset hidden="true" name="' . $fieldAttributes['name'] . '_modal" repeat="true">';
|
||||
if (strpos($fieldAttributes['fields'], ',') !== false)
|
||||
{
|
||||
// mulitpal fields
|
||||
@ -1370,7 +1370,7 @@ class Fields extends Structure
|
||||
$r_multiple = false;
|
||||
$r_langLabel = '';
|
||||
// add the tabs needed
|
||||
$r_taber = "\t\t\t";
|
||||
$r_taber = $this->_t(3);
|
||||
// get field values
|
||||
$r_fieldValues = $this->setFieldAttributes($fieldData, $view, $r_name, $r_typeName, $r_multiple, $r_langLabel, $langView, $view_name_list, $view_name_single, $placeholders, true);
|
||||
// check if values were set
|
||||
@ -1413,26 +1413,26 @@ class Fields extends Structure
|
||||
}
|
||||
}
|
||||
}
|
||||
$field .= PHP_EOL . "\t\t\t\t</fieldset>";
|
||||
$field .= PHP_EOL . "\t\t\t</fields>";
|
||||
$field .= PHP_EOL . "\t\t</field>";
|
||||
$field .= PHP_EOL . $this->_t(4) . "</fieldset>";
|
||||
$field .= PHP_EOL . $this->_t(3) . "</fields>";
|
||||
$field .= PHP_EOL . $this->_t(2) . "</field>";
|
||||
}
|
||||
// set the subform fields (it is a repeatable without the modal)
|
||||
elseif ($typeName === 'subform')
|
||||
{
|
||||
// now add to the field set
|
||||
$field .= PHP_EOL . "\t\t<!--" . $this->setLine(__LINE__) . " " . ComponentbuilderHelper::safeString($name, 'F') . " Field. Type: " . ComponentbuilderHelper::safeString($typeName, 'F') . ". (joomla) -->";
|
||||
$field .= PHP_EOL . "\t\t<field";
|
||||
$field .= PHP_EOL . $this->_t(2) . "<!--" . $this->setLine(__LINE__) . " " . ComponentbuilderHelper::safeString($name, 'F') . " Field. Type: " . ComponentbuilderHelper::safeString($typeName, 'F') . ". (joomla) -->";
|
||||
$field .= PHP_EOL . $this->_t(2) . "<field";
|
||||
$fieldsSet = array();
|
||||
foreach ($fieldAttributes as $property => $value)
|
||||
{
|
||||
if ($property != 'fields')
|
||||
{
|
||||
$field .= PHP_EOL . "\t\t\t" . $property . '="' . $value . '"';
|
||||
$field .= PHP_EOL . $this->_t(3) . $property . '="' . $value . '"';
|
||||
}
|
||||
}
|
||||
$field .= ">";
|
||||
$field .= PHP_EOL . "\t\t\t" . '<form hidden="true" name="list_' . $fieldAttributes['name'] . '_modal" repeat="true">';
|
||||
$field .= PHP_EOL . $this->_t(3) . '<form hidden="true" name="list_' . $fieldAttributes['name'] . '_modal" repeat="true">';
|
||||
if (strpos($fieldAttributes['fields'], ',') !== false)
|
||||
{
|
||||
// mulitpal fields
|
||||
@ -1457,7 +1457,7 @@ class Fields extends Structure
|
||||
$r_multiple = false;
|
||||
$r_langLabel = '';
|
||||
// add the tabs needed
|
||||
$r_taber = "\t\t";
|
||||
$r_taber = $this->_t(2);
|
||||
// get field values
|
||||
$r_fieldValues = $this->setFieldAttributes($fieldData, $view, $r_name, $r_typeName, $r_multiple, $r_langLabel, $langView, $view_name_list, $view_name_single, $placeholders, true);
|
||||
// check if values were set
|
||||
@ -1500,23 +1500,23 @@ class Fields extends Structure
|
||||
}
|
||||
}
|
||||
}
|
||||
$field .= PHP_EOL . "\t\t\t</form>";
|
||||
$field .= PHP_EOL . "\t\t</field>";
|
||||
$field .= PHP_EOL . $this->_t(3) . "</form>";
|
||||
$field .= PHP_EOL . $this->_t(2) . "</field>";
|
||||
}
|
||||
}
|
||||
elseif ($setType === 'custom')
|
||||
{
|
||||
// now add to the field set
|
||||
$field .= PHP_EOL . "\t\t" . $taber . "<!--" . $this->setLine(__LINE__) . " " . ComponentbuilderHelper::safeString($name, 'F') . " Field. Type: " . ComponentbuilderHelper::safeString($typeName, 'F') . ". (custom) -->";
|
||||
$field .= PHP_EOL . "\t\t" . $taber . "<field";
|
||||
$field .= PHP_EOL . $this->_t(2) . $taber . "<!--" . $this->setLine(__LINE__) . " " . ComponentbuilderHelper::safeString($name, 'F') . " Field. Type: " . ComponentbuilderHelper::safeString($typeName, 'F') . ". (custom) -->";
|
||||
$field .= PHP_EOL . $this->_t(2) . $taber . "<field";
|
||||
foreach ($fieldAttributes as $property => $value)
|
||||
{
|
||||
if ($property != 'option')
|
||||
{
|
||||
$field .= PHP_EOL . "\t\t" . $taber . "\t" . $property . '="' . $value . '"';
|
||||
$field .= PHP_EOL . $this->_t(2) . $taber . $this->_t(1) . $property . '="' . $value . '"';
|
||||
}
|
||||
}
|
||||
$field .= PHP_EOL . "\t\t" . $taber . "/>";
|
||||
$field .= PHP_EOL . $this->_t(2) . $taber . "/>";
|
||||
// incase the field is in the config and has not been set
|
||||
if ('config' === $view_name_single && 'configs' === $view_name_list)
|
||||
{
|
||||
@ -2465,27 +2465,34 @@ class Fields extends Structure
|
||||
'multiple' => $multiple,
|
||||
'options' => $options);
|
||||
}
|
||||
// load the list join builder
|
||||
elseif ($listJoin)
|
||||
{
|
||||
$this->listJoinBuilder[$view_name_list][(int) $field['field']] = array(
|
||||
'type' => $typeName,
|
||||
'code' => $name,
|
||||
'lang' => $listLangName,
|
||||
'title' => (isset($field['title']) && $field['title']) ? true : false,
|
||||
'alias' => (isset($field['alias']) && $field['alias']) ? true : false,
|
||||
'link' => (isset($field['link']) && $field['link']) ? true : false,
|
||||
'sort' => (isset($field['sort']) && $field['sort']) ? true : false,
|
||||
'custom' => $custom,
|
||||
'multiple' => $multiple,
|
||||
'options' => $options);
|
||||
}
|
||||
// build custom builder list
|
||||
if ($listSwitch || $listJoin)
|
||||
{
|
||||
$this->customBuilderList[$view_name_list][] = $name;
|
||||
}
|
||||
}
|
||||
// load the list join builder
|
||||
if ($listJoin)
|
||||
{
|
||||
$this->listJoinBuilder[$view_name_list][(int) $field['field']] = array(
|
||||
'type' => $typeName,
|
||||
'code' => $name,
|
||||
'lang' => $listLangName,
|
||||
'title' => (isset($field['title']) && $field['title']) ? true : false,
|
||||
'alias' => (isset($field['alias']) && $field['alias']) ? true : false,
|
||||
'link' => (isset($field['link']) && $field['link']) ? true : false,
|
||||
'sort' => (isset($field['sort']) && $field['sort']) ? true : false,
|
||||
'custom' => $custom,
|
||||
'multiple' => $multiple,
|
||||
'options' => $options);
|
||||
}
|
||||
// update the field relations
|
||||
if (isset($this->fieldRelations[$view_name_list]) && isset($this->fieldRelations[$view_name_list][(int) $field['field']]))
|
||||
{
|
||||
$this->fieldRelations[$view_name_list][(int) $field['field']]['type'] = $typeName;
|
||||
$this->fieldRelations[$view_name_list][(int) $field['field']]['code'] = $name;
|
||||
$this->fieldRelations[$view_name_list][(int) $field['field']]['custom'] = $custom;
|
||||
}
|
||||
// set the hidden field of this view
|
||||
if ($typeName === 'hidden')
|
||||
{
|
||||
@ -2717,7 +2724,7 @@ class Fields extends Structure
|
||||
$this->buildDynamique($target, 'field' . $data['custom']['extends'], $data['custom']['type']);
|
||||
// set tab and break replacements
|
||||
$tabBreak = array(
|
||||
'\t' => "\t",
|
||||
'\t' => $this->_t(1),
|
||||
'\n' => PHP_EOL
|
||||
);
|
||||
// make field dynamic
|
||||
@ -2749,7 +2756,7 @@ class Fields extends Structure
|
||||
}
|
||||
else
|
||||
{
|
||||
$phpCode .= PHP_EOL . "\t\t" . $this->setPlaceholders($code, $tabBreak);
|
||||
$phpCode .= PHP_EOL . $this->_t(2) . $this->setPlaceholders($code, $tabBreak);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -2783,7 +2790,7 @@ class Fields extends Structure
|
||||
}
|
||||
else
|
||||
{
|
||||
$phpxCode .= PHP_EOL . "\t\t" . $this->setPlaceholders($code, $tabBreak);
|
||||
$phpxCode .= PHP_EOL . $this->_t(2) . $this->setPlaceholders($code, $tabBreak);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -2882,137 +2889,137 @@ class Fields extends Structure
|
||||
}
|
||||
// start building the add buttons/s
|
||||
$addButton = array();
|
||||
$addButton[] = PHP_EOL . PHP_EOL . "\t/**";
|
||||
$addButton[] = "\t * Override to add new button";
|
||||
$addButton[] = "\t *";
|
||||
$addButton[] = "\t * @return string The field input markup.";
|
||||
$addButton[] = "\t *";
|
||||
$addButton[] = "\t * @since 3.2";
|
||||
$addButton[] = "\t */";
|
||||
$addButton[] = "\tprotected function getInput()";
|
||||
$addButton[] = "\t{";
|
||||
$addButton[] = "\t\t//" . $this->setLine(__LINE__) . " see if we should add buttons";
|
||||
$addButton[] = "\t\t\$setButton = \$this->getAttribute('button');";
|
||||
$addButton[] = "\t\t//" . $this->setLine(__LINE__) . " get html";
|
||||
$addButton[] = "\t\t\$html = parent::getInput();";
|
||||
$addButton[] = "\t\t//" . $this->setLine(__LINE__) . " if true set button";
|
||||
$addButton[] = "\t\tif (\$setButton === 'true')";
|
||||
$addButton[] = "\t\t{";
|
||||
$addButton[] = "\t\t\t\$button = array();";
|
||||
$addButton[] = "\t\t\t\$script = array();";
|
||||
$addButton[] = "\t\t\t\$buttonName = \$this->getAttribute('name');";
|
||||
$addButton[] = "\t\t\t//" . $this->setLine(__LINE__) . " get the input from url";
|
||||
$addButton[] = "\t\t\t\$app = JFactory::getApplication();";
|
||||
$addButton[] = "\t\t\t\$jinput = \$app->input;";
|
||||
$addButton[] = "\t\t\t//" . $this->setLine(__LINE__) . " get the view name & id";
|
||||
$addButton[] = "\t\t\t\$values = \$jinput->getArray(array(";
|
||||
$addButton[] = "\t\t\t\t'id' => 'int',";
|
||||
$addButton[] = "\t\t\t\t'view' => 'word'";
|
||||
$addButton[] = "\t\t\t));";
|
||||
$addButton[] = "\t\t\t//" . $this->setLine(__LINE__) . " check if new item";
|
||||
$addButton[] = "\t\t\t\$ref = '';";
|
||||
$addButton[] = "\t\t\t\$refJ = '';";
|
||||
$addButton[] = PHP_EOL . PHP_EOL . $this->_t(1) . "/**";
|
||||
$addButton[] = $this->_t(1) . " * Override to add new button";
|
||||
$addButton[] = $this->_t(1) . " *";
|
||||
$addButton[] = $this->_t(1) . " * @return string The field input markup.";
|
||||
$addButton[] = $this->_t(1) . " *";
|
||||
$addButton[] = $this->_t(1) . " * @since 3.2";
|
||||
$addButton[] = $this->_t(1) . " */";
|
||||
$addButton[] = $this->_t(1) . "protected function getInput()";
|
||||
$addButton[] = $this->_t(1) . "{";
|
||||
$addButton[] = $this->_t(2) . "//" . $this->setLine(__LINE__) . " see if we should add buttons";
|
||||
$addButton[] = $this->_t(2) . "\$setButton = \$this->getAttribute('button');";
|
||||
$addButton[] = $this->_t(2) . "//" . $this->setLine(__LINE__) . " get html";
|
||||
$addButton[] = $this->_t(2) . "\$html = parent::getInput();";
|
||||
$addButton[] = $this->_t(2) . "//" . $this->setLine(__LINE__) . " if true set button";
|
||||
$addButton[] = $this->_t(2) . "if (\$setButton === 'true')";
|
||||
$addButton[] = $this->_t(2) . "{";
|
||||
$addButton[] = $this->_t(3) . "\$button = array();";
|
||||
$addButton[] = $this->_t(3) . "\$script = array();";
|
||||
$addButton[] = $this->_t(3) . "\$buttonName = \$this->getAttribute('name');";
|
||||
$addButton[] = $this->_t(3) . "//" . $this->setLine(__LINE__) . " get the input from url";
|
||||
$addButton[] = $this->_t(3) . "\$app = JFactory::getApplication();";
|
||||
$addButton[] = $this->_t(3) . "\$jinput = \$app->input;";
|
||||
$addButton[] = $this->_t(3) . "//" . $this->setLine(__LINE__) . " get the view name & id";
|
||||
$addButton[] = $this->_t(3) . "\$values = \$jinput->getArray(array(";
|
||||
$addButton[] = $this->_t(4) . "'id' => 'int',";
|
||||
$addButton[] = $this->_t(4) . "'view' => 'word'";
|
||||
$addButton[] = $this->_t(3) . "));";
|
||||
$addButton[] = $this->_t(3) . "//" . $this->setLine(__LINE__) . " check if new item";
|
||||
$addButton[] = $this->_t(3) . "\$ref = '';";
|
||||
$addButton[] = $this->_t(3) . "\$refJ = '';";
|
||||
if ($refLoad)
|
||||
{
|
||||
$addButton[] = "\t\t\tif (!is_null(\$values['id']) && strlen(\$values['view']))";
|
||||
$addButton[] = "\t\t\t{";
|
||||
$addButton[] = "\t\t\t\t//" . $this->setLine(__LINE__) . " only load referal if not new item.";
|
||||
$addButton[] = "\t\t\t\t\$ref = '&ref=' . \$values['view'] . '&refid=' . \$values['id'];";
|
||||
$addButton[] = "\t\t\t\t\$refJ = '&ref=' . \$values['view'] . '&refid=' . \$values['id'];";
|
||||
$addButton[] = "\t\t\t}";
|
||||
$addButton[] = $this->_t(3) . "if (!is_null(\$values['id']) && strlen(\$values['view']))";
|
||||
$addButton[] = $this->_t(3) . "{";
|
||||
$addButton[] = $this->_t(4) . "//" . $this->setLine(__LINE__) . " only load referal if not new item.";
|
||||
$addButton[] = $this->_t(4) . "\$ref = '&ref=' . \$values['view'] . '&refid=' . \$values['id'];";
|
||||
$addButton[] = $this->_t(4) . "\$refJ = '&ref=' . \$values['view'] . '&refid=' . \$values['id'];";
|
||||
$addButton[] = $this->_t(3) . "}";
|
||||
}
|
||||
else
|
||||
{
|
||||
$addButton[] = "\t\t\tif (!is_null(\$values['id']) && strlen(\$values['view']))";
|
||||
$addButton[] = "\t\t\t{";
|
||||
$addButton[] = "\t\t\t\t//" . $this->setLine(__LINE__) . " get the return value.";
|
||||
$addButton[] = "\t\t\t\t\$_uri = (string) JUri::getInstance();";
|
||||
$addButton[] = "\t\t\t\t\$_return = urlencode(base64_encode(\$_uri));";
|
||||
$addButton[] = "\t\t\t\t//" . $this->setLine(__LINE__) . " load return value.";
|
||||
$addButton[] = "\t\t\t\t\$ref = '&return=' . \$_return;";
|
||||
$addButton[] = "\t\t\t\t\$refJ = '&return=' . \$_return;";
|
||||
$addButton[] = "\t\t\t}";
|
||||
$addButton[] = $this->_t(3) . "if (!is_null(\$values['id']) && strlen(\$values['view']))";
|
||||
$addButton[] = $this->_t(3) . "{";
|
||||
$addButton[] = $this->_t(4) . "//" . $this->setLine(__LINE__) . " get the return value.";
|
||||
$addButton[] = $this->_t(4) . "\$_uri = (string) JUri::getInstance();";
|
||||
$addButton[] = $this->_t(4) . "\$_return = urlencode(base64_encode(\$_uri));";
|
||||
$addButton[] = $this->_t(4) . "//" . $this->setLine(__LINE__) . " load return value.";
|
||||
$addButton[] = $this->_t(4) . "\$ref = '&return=' . \$_return;";
|
||||
$addButton[] = $this->_t(4) . "\$refJ = '&return=' . \$_return;";
|
||||
$addButton[] = $this->_t(3) . "}";
|
||||
}
|
||||
$addButton[] = "\t\t\t\$user = JFactory::getUser();";
|
||||
$addButton[] = "\t\t\t//" . $this->setLine(__LINE__) . " only add if user allowed to create " . $fieldData['view'];
|
||||
$addButton[] = $this->_t(3) . "\$user = JFactory::getUser();";
|
||||
$addButton[] = $this->_t(3) . "//" . $this->setLine(__LINE__) . " only add if user allowed to create " . $fieldData['view'];
|
||||
// check if the item has permissions.
|
||||
if ($coreLoad && isset($core['core.create']) && isset($this->permissionBuilder['global'][$core['core.create']]) && ComponentbuilderHelper::checkArray($this->permissionBuilder['global'][$core['core.create']]) && in_array($fieldData['view'], $this->permissionBuilder['global'][$core['core.create']]))
|
||||
{
|
||||
$addButton[] = "\t\t\tif (\$user->authorise('" . $core['core.create'] . "', '" . $component . "') && \$app->isAdmin()) // TODO for now only in admin area.";
|
||||
$addButton[] = $this->_t(3) . "if (\$user->authorise('" . $core['core.create'] . "', '" . $component . "') && \$app->isAdmin()) // TODO for now only in admin area.";
|
||||
}
|
||||
else
|
||||
{
|
||||
$addButton[] = "\t\t\tif (\$user->authorise('core.create', '" . $component . "') && \$app->isAdmin()) // TODO for now only in admin area.";
|
||||
$addButton[] = $this->_t(3) . "if (\$user->authorise('core.create', '" . $component . "') && \$app->isAdmin()) // TODO for now only in admin area.";
|
||||
}
|
||||
$addButton[] = "\t\t\t{";
|
||||
$addButton[] = "\t\t\t\t//" . $this->setLine(__LINE__) . " build Create button";
|
||||
$addButton[] = "\t\t\t\t\$buttonNamee = trim(\$buttonName);";
|
||||
$addButton[] = "\t\t\t\t\$buttonNamee = preg_replace('/_+/', ' ', \$buttonNamee);";
|
||||
$addButton[] = "\t\t\t\t\$buttonNamee = preg_replace('/\s+/', ' ', \$buttonNamee);";
|
||||
$addButton[] = "\t\t\t\t\$buttonNamee = preg_replace(\"/[^A-Za-z ]/\", '', \$buttonNamee);";
|
||||
$addButton[] = "\t\t\t\t\$buttonNamee = ucfirst(strtolower(\$buttonNamee));";
|
||||
$addButton[] = "\t\t\t\t\$button[] = '<a id=\"'.\$buttonName.'Create\" class=\"btn btn-small btn-success hasTooltip\" title=\"'.JText:" . ":sprintf('" . $this->langPrefix . "_CREATE_NEW_S', \$buttonNamee).'\" style=\"border-radius: 0px 4px 4px 0px; padding: 4px 4px 4px 7px;\"";
|
||||
$addButton[] = "\t\t\t\t\thref=\"index.php?option=" . $fieldData['component'] . "&view=" . $fieldData['view'] . "&layout=edit'.\$ref.'\" >";
|
||||
$addButton[] = "\t\t\t\t\t<span class=\"icon-new icon-white\"></span></a>';";
|
||||
$addButton[] = "\t\t\t}";
|
||||
$addButton[] = "\t\t\t//" . $this->setLine(__LINE__) . " only add if user allowed to edit " . $fieldData['view'];
|
||||
$addButton[] = $this->_t(3) . "{";
|
||||
$addButton[] = $this->_t(4) . "//" . $this->setLine(__LINE__) . " build Create button";
|
||||
$addButton[] = $this->_t(4) . "\$buttonNamee = trim(\$buttonName);";
|
||||
$addButton[] = $this->_t(4) . "\$buttonNamee = preg_replace('/_+/', ' ', \$buttonNamee);";
|
||||
$addButton[] = $this->_t(4) . "\$buttonNamee = preg_replace('/\s+/', ' ', \$buttonNamee);";
|
||||
$addButton[] = $this->_t(4) . "\$buttonNamee = preg_replace(\"/[^A-Za-z ]/\", '', \$buttonNamee);";
|
||||
$addButton[] = $this->_t(4) . "\$buttonNamee = ucfirst(strtolower(\$buttonNamee));";
|
||||
$addButton[] = $this->_t(4) . "\$button[] = '<a id=\"'.\$buttonName.'Create\" class=\"btn btn-small btn-success hasTooltip\" title=\"'.JText:" . ":sprintf('" . $this->langPrefix . "_CREATE_NEW_S', \$buttonNamee).'\" style=\"border-radius: 0px 4px 4px 0px; padding: 4px 4px 4px 7px;\"";
|
||||
$addButton[] = $this->_t(5) . "href=\"index.php?option=" . $fieldData['component'] . "&view=" . $fieldData['view'] . "&layout=edit'.\$ref.'\" >";
|
||||
$addButton[] = $this->_t(5) . "<span class=\"icon-new icon-white\"></span></a>';";
|
||||
$addButton[] = $this->_t(3) . "}";
|
||||
$addButton[] = $this->_t(3) . "//" . $this->setLine(__LINE__) . " only add if user allowed to edit " . $fieldData['view'];
|
||||
// check if the item has permissions.
|
||||
if ($coreLoad && isset($core['core.edit']) && isset($this->permissionBuilder['global'][$core['core.edit']]) && ComponentbuilderHelper::checkArray($this->permissionBuilder['global'][$core['core.edit']]) && in_array($fieldData['view'], $this->permissionBuilder['global'][$core['core.edit']]))
|
||||
{
|
||||
$addButton[] = "\t\t\tif ((\$buttonName === '" . $fieldData['view'] . "' || \$buttonName === '" . $fieldData['views'] . "') && \$user->authorise('" . $core['core.edit'] . "', '" . $component . "') && \$app->isAdmin()) // TODO for now only in admin area.";
|
||||
$addButton[] = $this->_t(3) . "if ((\$buttonName === '" . $fieldData['view'] . "' || \$buttonName === '" . $fieldData['views'] . "') && \$user->authorise('" . $core['core.edit'] . "', '" . $component . "') && \$app->isAdmin()) // TODO for now only in admin area.";
|
||||
}
|
||||
else
|
||||
{
|
||||
$addButton[] = "\t\t\tif ((\$buttonName === '" . $fieldData['view'] . "' || \$buttonName === '" . $fieldData['views'] . "') && \$user->authorise('core.edit', '" . $component . "') && \$app->isAdmin()) // TODO for now only in admin area.";
|
||||
$addButton[] = $this->_t(3) . "if ((\$buttonName === '" . $fieldData['view'] . "' || \$buttonName === '" . $fieldData['views'] . "') && \$user->authorise('core.edit', '" . $component . "') && \$app->isAdmin()) // TODO for now only in admin area.";
|
||||
}
|
||||
$addButton[] = "\t\t\t{";
|
||||
$addButton[] = "\t\t\t\t//" . $this->setLine(__LINE__) . " build edit button";
|
||||
$addButton[] = "\t\t\t\t\$buttonNamee = trim(\$buttonName);";
|
||||
$addButton[] = "\t\t\t\t\$buttonNamee = preg_replace('/_+/', ' ', \$buttonNamee);";
|
||||
$addButton[] = "\t\t\t\t\$buttonNamee = preg_replace('/\s+/', ' ', \$buttonNamee);";
|
||||
$addButton[] = "\t\t\t\t\$buttonNamee = preg_replace(\"/[^A-Za-z ]/\", '', \$buttonNamee);";
|
||||
$addButton[] = "\t\t\t\t\$buttonNamee = ucfirst(strtolower(\$buttonNamee));";
|
||||
$addButton[] = "\t\t\t\t\$button[] = '<a id=\"'.\$buttonName.'Edit\" class=\"btn btn-small hasTooltip\" title=\"'.JText:" . ":sprintf('" . $this->langPrefix . "_EDIT_S', \$buttonNamee).'\" style=\"display: none; padding: 4px 4px 4px 7px;\" href=\"#\" >";
|
||||
$addButton[] = "\t\t\t\t\t<span class=\"icon-edit\"></span></a>';";
|
||||
$addButton[] = "\t\t\t\t//" . $this->setLine(__LINE__) . " build script";
|
||||
$addButton[] = "\t\t\t\t\$script[] = \"";
|
||||
$addButton[] = "\t\t\t\t\tjQuery(document).ready(function() {";
|
||||
$addButton[] = "\t\t\t\t\t\tjQuery('#adminForm').on('change', '#jform_\".\$buttonName.\"',function (e) {";
|
||||
$addButton[] = "\t\t\t\t\t\t\te.preventDefault();";
|
||||
$addButton[] = "\t\t\t\t\t\t\tvar \".\$buttonName.\"Value = jQuery('#jform_\".\$buttonName.\"').val();";
|
||||
$addButton[] = "\t\t\t\t\t\t\t\".\$buttonName.\"Button(\".\$buttonName.\"Value);";
|
||||
$addButton[] = "\t\t\t\t\t\t});";
|
||||
$addButton[] = "\t\t\t\t\t\tvar \".\$buttonName.\"Value = jQuery('#jform_\".\$buttonName.\"').val();";
|
||||
$addButton[] = "\t\t\t\t\t\t\".\$buttonName.\"Button(\".\$buttonName.\"Value);";
|
||||
$addButton[] = "\t\t\t\t\t});";
|
||||
$addButton[] = "\t\t\t\t\tfunction \".\$buttonName.\"Button(value) {";
|
||||
$addButton[] = "\t\t\t\t\t\tif (value > 0) {"; // TODO not ideal since value may not be an (int)
|
||||
$addButton[] = "\t\t\t\t\t\t\t// hide the create button";
|
||||
$addButton[] = "\t\t\t\t\t\t\tjQuery('#\".\$buttonName.\"Create').hide();";
|
||||
$addButton[] = "\t\t\t\t\t\t\t// show edit button";
|
||||
$addButton[] = "\t\t\t\t\t\t\tjQuery('#\".\$buttonName.\"Edit').show();";
|
||||
$addButton[] = "\t\t\t\t\t\t\tvar url = 'index.php?option=" . $fieldData['component'] . "&view=" . $fieldData['views'] . "&task=" . $fieldData['view'] . ".edit&id='+value+'\".\$refJ.\"';"; // TODO this value may not be the ID
|
||||
$addButton[] = "\t\t\t\t\t\t\tjQuery('#\".\$buttonName.\"Edit').attr('href', url);";
|
||||
$addButton[] = "\t\t\t\t\t\t} else {";
|
||||
$addButton[] = "\t\t\t\t\t\t\t// show the create button";
|
||||
$addButton[] = "\t\t\t\t\t\t\tjQuery('#\".\$buttonName.\"Create').show();";
|
||||
$addButton[] = "\t\t\t\t\t\t\t// hide edit button";
|
||||
$addButton[] = "\t\t\t\t\t\t\tjQuery('#\".\$buttonName.\"Edit').hide();";
|
||||
$addButton[] = "\t\t\t\t\t\t}";
|
||||
$addButton[] = "\t\t\t\t\t}\";";
|
||||
$addButton[] = "\t\t\t}";
|
||||
$addButton[] = "\t\t\t//" . $this->setLine(__LINE__) . " check if button was created for " . $fieldData['view'] . " field.";
|
||||
$addButton[] = "\t\t\tif (is_array(\$button) && count(\$button) > 0)";
|
||||
$addButton[] = "\t\t\t{";
|
||||
$addButton[] = "\t\t\t\t//" . $this->setLine(__LINE__) . " Load the needed script.";
|
||||
$addButton[] = "\t\t\t\t\$document = JFactory::getDocument();";
|
||||
$addButton[] = "\t\t\t\t\$document->addScriptDeclaration(implode(' ',\$script));";
|
||||
$addButton[] = "\t\t\t\t//" . $this->setLine(__LINE__) . " return the button attached to input field.";
|
||||
$addButton[] = "\t\t\t\treturn '<div class=\"input-append\">' .\$html . implode('',\$button).'</div>';";
|
||||
$addButton[] = "\t\t\t}";
|
||||
$addButton[] = "\t\t}";
|
||||
$addButton[] = "\t\treturn \$html;";
|
||||
$addButton[] = "\t}";
|
||||
$addButton[] = $this->_t(3) . "{";
|
||||
$addButton[] = $this->_t(4) . "//" . $this->setLine(__LINE__) . " build edit button";
|
||||
$addButton[] = $this->_t(4) . "\$buttonNamee = trim(\$buttonName);";
|
||||
$addButton[] = $this->_t(4) . "\$buttonNamee = preg_replace('/_+/', ' ', \$buttonNamee);";
|
||||
$addButton[] = $this->_t(4) . "\$buttonNamee = preg_replace('/\s+/', ' ', \$buttonNamee);";
|
||||
$addButton[] = $this->_t(4) . "\$buttonNamee = preg_replace(\"/[^A-Za-z ]/\", '', \$buttonNamee);";
|
||||
$addButton[] = $this->_t(4) . "\$buttonNamee = ucfirst(strtolower(\$buttonNamee));";
|
||||
$addButton[] = $this->_t(4) . "\$button[] = '<a id=\"'.\$buttonName.'Edit\" class=\"btn btn-small hasTooltip\" title=\"'.JText:" . ":sprintf('" . $this->langPrefix . "_EDIT_S', \$buttonNamee).'\" style=\"display: none; padding: 4px 4px 4px 7px;\" href=\"#\" >";
|
||||
$addButton[] = $this->_t(5) . "<span class=\"icon-edit\"></span></a>';";
|
||||
$addButton[] = $this->_t(4) . "//" . $this->setLine(__LINE__) . " build script";
|
||||
$addButton[] = $this->_t(4) . "\$script[] = \"";
|
||||
$addButton[] = $this->_t(5) . "jQuery(document).ready(function() {";
|
||||
$addButton[] = $this->_t(6) . "jQuery('#adminForm').on('change', '#jform_\".\$buttonName.\"',function (e) {";
|
||||
$addButton[] = $this->_t(7) . "e.preventDefault();";
|
||||
$addButton[] = $this->_t(7) . "var \".\$buttonName.\"Value = jQuery('#jform_\".\$buttonName.\"').val();";
|
||||
$addButton[] = $this->_t(7) . "\".\$buttonName.\"Button(\".\$buttonName.\"Value);";
|
||||
$addButton[] = $this->_t(6) . "});";
|
||||
$addButton[] = $this->_t(6) . "var \".\$buttonName.\"Value = jQuery('#jform_\".\$buttonName.\"').val();";
|
||||
$addButton[] = $this->_t(6) . "\".\$buttonName.\"Button(\".\$buttonName.\"Value);";
|
||||
$addButton[] = $this->_t(5) . "});";
|
||||
$addButton[] = $this->_t(5) . "function \".\$buttonName.\"Button(value) {";
|
||||
$addButton[] = $this->_t(6) . "if (value > 0) {"; // TODO not ideal since value may not be an (int)
|
||||
$addButton[] = $this->_t(7) . "// hide the create button";
|
||||
$addButton[] = $this->_t(7) . "jQuery('#\".\$buttonName.\"Create').hide();";
|
||||
$addButton[] = $this->_t(7) . "// show edit button";
|
||||
$addButton[] = $this->_t(7) . "jQuery('#\".\$buttonName.\"Edit').show();";
|
||||
$addButton[] = $this->_t(7) . "var url = 'index.php?option=" . $fieldData['component'] . "&view=" . $fieldData['views'] . "&task=" . $fieldData['view'] . ".edit&id='+value+'\".\$refJ.\"';"; // TODO this value may not be the ID
|
||||
$addButton[] = $this->_t(7) . "jQuery('#\".\$buttonName.\"Edit').attr('href', url);";
|
||||
$addButton[] = $this->_t(6) . "} else {";
|
||||
$addButton[] = $this->_t(7) . "// show the create button";
|
||||
$addButton[] = $this->_t(7) . "jQuery('#\".\$buttonName.\"Create').show();";
|
||||
$addButton[] = $this->_t(7) . "// hide edit button";
|
||||
$addButton[] = $this->_t(7) . "jQuery('#\".\$buttonName.\"Edit').hide();";
|
||||
$addButton[] = $this->_t(6) . "}";
|
||||
$addButton[] = $this->_t(5) . "}\";";
|
||||
$addButton[] = $this->_t(3) . "}";
|
||||
$addButton[] = $this->_t(3) . "//" . $this->setLine(__LINE__) . " check if button was created for " . $fieldData['view'] . " field.";
|
||||
$addButton[] = $this->_t(3) . "if (is_array(\$button) && count(\$button) > 0)";
|
||||
$addButton[] = $this->_t(3) . "{";
|
||||
$addButton[] = $this->_t(4) . "//" . $this->setLine(__LINE__) . " Load the needed script.";
|
||||
$addButton[] = $this->_t(4) . "\$document = JFactory::getDocument();";
|
||||
$addButton[] = $this->_t(4) . "\$document->addScriptDeclaration(implode(' ',\$script));";
|
||||
$addButton[] = $this->_t(4) . "//" . $this->setLine(__LINE__) . " return the button attached to input field.";
|
||||
$addButton[] = $this->_t(4) . "return '<div class=\"input-append\">' .\$html . implode('',\$button).'</div>';";
|
||||
$addButton[] = $this->_t(3) . "}";
|
||||
$addButton[] = $this->_t(2) . "}";
|
||||
$addButton[] = $this->_t(2) . "return \$html;";
|
||||
$addButton[] = $this->_t(1) . "}";
|
||||
|
||||
return implode(PHP_EOL, $addButton);
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -184,19 +184,19 @@ class Infusion extends Interpretation
|
||||
$this->fileContentStatic[$this->hhh . 'ADMIN_GLOBAL_EVENT' . $this->hhh] = PHP_EOL . PHP_EOL . '// Triger the Global Admin Event';
|
||||
$this->fileContentStatic[$this->hhh . 'ADMIN_GLOBAL_EVENT' . $this->hhh] .= PHP_EOL . $this->fileContentStatic[$this->hhh . 'Component' . $this->hhh] . 'Helper::globalEvent($document);';
|
||||
// ADMIN_GLOBAL_EVENT_HELPER
|
||||
$this->fileContentStatic[$this->hhh . 'ADMIN_GLOBAL_EVENT_HELPER' . $this->hhh] = PHP_EOL . PHP_EOL . "\t" . '/**';
|
||||
$this->fileContentStatic[$this->hhh . 'ADMIN_GLOBAL_EVENT_HELPER' . $this->hhh] .= PHP_EOL . "\t" . '* The Global Admin Event Method.';
|
||||
$this->fileContentStatic[$this->hhh . 'ADMIN_GLOBAL_EVENT_HELPER' . $this->hhh] .= PHP_EOL . "\t" . '**/';
|
||||
$this->fileContentStatic[$this->hhh . 'ADMIN_GLOBAL_EVENT_HELPER' . $this->hhh] .= PHP_EOL . "\t" . 'public static function globalEvent($document)';
|
||||
$this->fileContentStatic[$this->hhh . 'ADMIN_GLOBAL_EVENT_HELPER' . $this->hhh] .= PHP_EOL . "\t" . '{';
|
||||
$this->fileContentStatic[$this->hhh . 'ADMIN_GLOBAL_EVENT_HELPER' . $this->hhh] = PHP_EOL . PHP_EOL . $this->_t(1) . '/**';
|
||||
$this->fileContentStatic[$this->hhh . 'ADMIN_GLOBAL_EVENT_HELPER' . $this->hhh] .= PHP_EOL . $this->_t(1) . '* The Global Admin Event Method.';
|
||||
$this->fileContentStatic[$this->hhh . 'ADMIN_GLOBAL_EVENT_HELPER' . $this->hhh] .= PHP_EOL . $this->_t(1) . '**/';
|
||||
$this->fileContentStatic[$this->hhh . 'ADMIN_GLOBAL_EVENT_HELPER' . $this->hhh] .= PHP_EOL . $this->_t(1) . 'public static function globalEvent($document)';
|
||||
$this->fileContentStatic[$this->hhh . 'ADMIN_GLOBAL_EVENT_HELPER' . $this->hhh] .= PHP_EOL . $this->_t(1) . '{';
|
||||
$this->fileContentStatic[$this->hhh . 'ADMIN_GLOBAL_EVENT_HELPER' . $this->hhh] .= PHP_EOL . $this->setPlaceholders($this->customScriptBuilder['component_php_admin_event'], $this->placeholders);
|
||||
$this->fileContentStatic[$this->hhh . 'ADMIN_GLOBAL_EVENT_HELPER' . $this->hhh] .= PHP_EOL . "\t" . '}';
|
||||
$this->fileContentStatic[$this->hhh . 'ADMIN_GLOBAL_EVENT_HELPER' . $this->hhh] .= PHP_EOL . $this->_t(1) . '}';
|
||||
}
|
||||
|
||||
// now load the readme file if needed
|
||||
if ($this->componentData->addreadme == 1)
|
||||
{
|
||||
$this->fileContentStatic[$this->hhh . 'EXSTRA_ADMIN_FILES' . $this->hhh] .= PHP_EOL . "\t\t\t<filename>README.txt</filename>";
|
||||
$this->fileContentStatic[$this->hhh . 'EXSTRA_ADMIN_FILES' . $this->hhh] .= PHP_EOL . $this->_t(3) . "<filename>README.txt</filename>";
|
||||
}
|
||||
|
||||
// HELPER_CREATEUSER
|
||||
@ -243,7 +243,7 @@ class Infusion extends Interpretation
|
||||
// set site edit view array
|
||||
if (isset($view['edit_create_site_view']) && $view['edit_create_site_view'])
|
||||
{
|
||||
$site_edit_view_array[] = "\t\t\t\t'" . $viewName_single . "'";
|
||||
$site_edit_view_array[] = $this->_t(4) . "'" . $viewName_single . "'";
|
||||
$this->lang = 'both';
|
||||
}
|
||||
// check if help is being loaded
|
||||
@ -252,7 +252,7 @@ class Infusion extends Interpretation
|
||||
$this->setCustomAdminViewListLink($view, $viewName_list);
|
||||
|
||||
// set view array
|
||||
$viewarray[] = "\t\t\t\t'" . $viewName_single . "' => '" . $viewName_list . "'";
|
||||
$viewarray[] = $this->_t(4) . "'" . $viewName_single . "' => '" . $viewName_list . "'";
|
||||
// set the view names
|
||||
if (isset($view['settings']->name_single) && $view['settings']->name_single != 'null')
|
||||
{
|
||||
@ -342,7 +342,7 @@ class Infusion extends Interpretation
|
||||
$this->fileContentDynamic[$viewName_single][$this->hhh . 'METHOD_ITEM_SAVE' . $this->hhh] = $this->setMethodItemSave($viewName_single);
|
||||
|
||||
// POSTSAVEHOOK <<<DYNAMIC>>>
|
||||
$this->fileContentDynamic[$viewName_single][$this->hhh . 'POSTSAVEHOOK' . $this->hhh] = $this->getCustomScriptBuilder('php_postsavehook', $viewName_single, PHP_EOL, null, true, PHP_EOL . "\t\treturn;", PHP_EOL . PHP_EOL . "\t\treturn;");
|
||||
$this->fileContentDynamic[$viewName_single][$this->hhh . 'POSTSAVEHOOK' . $this->hhh] = $this->getCustomScriptBuilder('php_postsavehook', $viewName_single, PHP_EOL, null, true, PHP_EOL . $this->_t(2) . "return;", PHP_EOL . PHP_EOL . $this->_t(2) . "return;");
|
||||
|
||||
// VIEWCSS <<<DYNAMIC>>>
|
||||
$this->fileContentDynamic[$viewName_single][$this->hhh . 'VIEWCSS' . $this->hhh] = $this->getCustomScriptBuilder('css_view', $viewName_single, '', null, true);
|
||||
@ -393,11 +393,11 @@ class Infusion extends Interpretation
|
||||
$this->fileContentDynamic[$viewName_list][$this->hhh . 'CHECKINCALL' . $this->hhh] = '';
|
||||
}
|
||||
// ADMIN_CUSTOM_BUTTONS_LIST
|
||||
$this->fileContentDynamic[$viewName_list][$this->hhh . 'ADMIN_CUSTOM_BUTTONS_LIST' . $this->hhh] = $this->setCustomButtons($view, 3, "\t");
|
||||
$this->fileContentDynamic[$viewName_list][$this->hhh . 'ADMIN_CUSTOM_BUTTONS_LIST' . $this->hhh] = $this->setCustomButtons($view, 3, $this->_t(1));
|
||||
$this->fileContentDynamic[$viewName_list][$this->hhh . 'ADMIN_CUSTOM_FUNCTION_ONLY_BUTTONS_LIST' . $this->hhh] = $this->setFunctionOnlyButtons($viewName_list);
|
||||
|
||||
// GET_ITEMS_METHOD_STRING_FIX <<<DYNAMIC>>>
|
||||
$this->fileContentDynamic[$viewName_list][$this->hhh . 'GET_ITEMS_METHOD_STRING_FIX' . $this->hhh] = $this->setGetItemsMethodStringFix($viewName_single, $this->fileContentStatic[$this->hhh . 'Component' . $this->hhh]);
|
||||
$this->fileContentDynamic[$viewName_list][$this->hhh . 'GET_ITEMS_METHOD_STRING_FIX' . $this->hhh] = $this->setGetItemsMethodStringFix($viewName_single, $viewName_list, $this->fileContentStatic[$this->hhh . 'Component' . $this->hhh]);
|
||||
|
||||
// GET_ITEMS_METHOD_AFTER_ALL <<<DYNAMIC>>>
|
||||
$this->fileContentDynamic[$viewName_list][$this->hhh . 'GET_ITEMS_METHOD_AFTER_ALL' . $this->hhh] = $this->getCustomScriptBuilder('php_getitems_after_all', $viewName_single, PHP_EOL);
|
||||
@ -611,7 +611,7 @@ class Infusion extends Interpretation
|
||||
$this->fileContentDynamic[$view['settings']->code][$this->hhh . 'CUSTOM_ADMIN_BEFORE_GET_ITEM' . $this->hhh] = $this->getCustomScriptBuilder($this->target . '_php_before_getitem', $view['settings']->code, '', null, true);
|
||||
|
||||
// CUSTOM_ADMIN_GET_ITEM <<<DYNAMIC>>>
|
||||
$this->fileContentDynamic[$view['settings']->code][$this->hhh . 'CUSTOM_ADMIN_GET_ITEM' . $this->hhh] = $this->setCustomViewGetItem($view['settings']->main_get, $view['settings']->code, "\t\t");
|
||||
$this->fileContentDynamic[$view['settings']->code][$this->hhh . 'CUSTOM_ADMIN_GET_ITEM' . $this->hhh] = $this->setCustomViewGetItem($view['settings']->main_get, $view['settings']->code, $this->_t(2));
|
||||
|
||||
// CUSTOM_ADMIN_AFTER_GET_ITEM <<<DYNAMIC>>>
|
||||
$this->fileContentDynamic[$view['settings']->code][$this->hhh . 'CUSTOM_ADMIN_AFTER_GET_ITEM' . $this->hhh] = $this->getCustomScriptBuilder($this->target . '_php_after_getitem', $view['settings']->code, '', null, true);
|
||||
@ -848,7 +848,7 @@ class Infusion extends Interpretation
|
||||
$this->fileContentDynamic[$view['settings']->code][$this->hhh . 'SITE_BEFORE_GET_ITEM' . $this->hhh] = $this->getCustomScriptBuilder($this->target . '_php_before_getitem', $view['settings']->code, '', null, true);
|
||||
|
||||
// SITE_GET_ITEM <<<DYNAMIC>>>
|
||||
$this->fileContentDynamic[$view['settings']->code][$this->hhh . 'SITE_GET_ITEM' . $this->hhh] = $this->setCustomViewGetItem($view['settings']->main_get, $view['settings']->code, "\t\t");
|
||||
$this->fileContentDynamic[$view['settings']->code][$this->hhh . 'SITE_GET_ITEM' . $this->hhh] = $this->setCustomViewGetItem($view['settings']->main_get, $view['settings']->code, $this->_t(2));
|
||||
|
||||
// SITE_AFTER_GET_ITEM <<<DYNAMIC>>>
|
||||
$this->fileContentDynamic[$view['settings']->code][$this->hhh . 'SITE_AFTER_GET_ITEM' . $this->hhh] = $this->getCustomScriptBuilder($this->target . '_php_after_getitem', $view['settings']->code, '', null, true);
|
||||
@ -913,13 +913,13 @@ class Infusion extends Interpretation
|
||||
$this->fileContentStatic[$this->hhh . 'SITE_GLOBAL_EVENT' . $this->hhh] = PHP_EOL . PHP_EOL . '// Triger the Global Site Event';
|
||||
$this->fileContentStatic[$this->hhh . 'SITE_GLOBAL_EVENT' . $this->hhh] .= PHP_EOL . $this->fileContentStatic[$this->hhh . 'Component' . $this->hhh] . 'Helper::globalEvent($document);';
|
||||
// SITE_GLOBAL_EVENT_HELPER
|
||||
$this->fileContentStatic[$this->hhh . 'SITE_GLOBAL_EVENT_HELPER' . $this->hhh] = PHP_EOL . PHP_EOL . "\t" . '/**';
|
||||
$this->fileContentStatic[$this->hhh . 'SITE_GLOBAL_EVENT_HELPER' . $this->hhh] .= PHP_EOL . "\t" . '* The Global Site Event Method.';
|
||||
$this->fileContentStatic[$this->hhh . 'SITE_GLOBAL_EVENT_HELPER' . $this->hhh] .= PHP_EOL . "\t" . '**/';
|
||||
$this->fileContentStatic[$this->hhh . 'SITE_GLOBAL_EVENT_HELPER' . $this->hhh] .= PHP_EOL . "\t" . 'public static function globalEvent($document)';
|
||||
$this->fileContentStatic[$this->hhh . 'SITE_GLOBAL_EVENT_HELPER' . $this->hhh] .= PHP_EOL . "\t" . '{';
|
||||
$this->fileContentStatic[$this->hhh . 'SITE_GLOBAL_EVENT_HELPER' . $this->hhh] = PHP_EOL . PHP_EOL . $this->_t(1) . '/**';
|
||||
$this->fileContentStatic[$this->hhh . 'SITE_GLOBAL_EVENT_HELPER' . $this->hhh] .= PHP_EOL . $this->_t(1) . '* The Global Site Event Method.';
|
||||
$this->fileContentStatic[$this->hhh . 'SITE_GLOBAL_EVENT_HELPER' . $this->hhh] .= PHP_EOL . $this->_t(1) . '**/';
|
||||
$this->fileContentStatic[$this->hhh . 'SITE_GLOBAL_EVENT_HELPER' . $this->hhh] .= PHP_EOL . $this->_t(1) . 'public static function globalEvent($document)';
|
||||
$this->fileContentStatic[$this->hhh . 'SITE_GLOBAL_EVENT_HELPER' . $this->hhh] .= PHP_EOL . $this->_t(1) . '{';
|
||||
$this->fileContentStatic[$this->hhh . 'SITE_GLOBAL_EVENT_HELPER' . $this->hhh] .= PHP_EOL . $this->setPlaceholders($this->customScriptBuilder['component_php_site_event'], $this->placeholders);
|
||||
$this->fileContentStatic[$this->hhh . 'SITE_GLOBAL_EVENT_HELPER' . $this->hhh] .= PHP_EOL . "\t" . '}';
|
||||
$this->fileContentStatic[$this->hhh . 'SITE_GLOBAL_EVENT_HELPER' . $this->hhh] .= PHP_EOL . $this->_t(1) . '}';
|
||||
}
|
||||
// setup the layouts
|
||||
$this->setCustomViewLayouts();
|
||||
@ -1179,11 +1179,11 @@ class Infusion extends Interpretation
|
||||
$replace = array();
|
||||
if (isset($langXML['admin']) && ComponentbuilderHelper::checkArray($langXML['admin']))
|
||||
{
|
||||
$replace[$this->hhh . 'ADMIN_LANGUAGES' . $this->hhh] = implode(PHP_EOL . "\t\t\t", $langXML['admin']);
|
||||
$replace[$this->hhh . 'ADMIN_LANGUAGES' . $this->hhh] = implode(PHP_EOL . $this->_t(3), $langXML['admin']);
|
||||
}
|
||||
if (!$this->removeSiteFolder && isset($langXML['site']) && ComponentbuilderHelper::checkArray($langXML['site']))
|
||||
{
|
||||
$replace[$this->hhh . 'SITE_LANGUAGES' . $this->hhh] = implode(PHP_EOL . "\t\t", $langXML['site']);
|
||||
$replace[$this->hhh . 'SITE_LANGUAGES' . $this->hhh] = implode(PHP_EOL . $this->_t(2), $langXML['site']);
|
||||
}
|
||||
// build xml path
|
||||
$xmlPath = $this->componentPath . '/' . $this->fileContentStatic[$this->hhh . 'component' . $this->hhh] . '.xml';
|
||||
|
@ -3646,8 +3646,8 @@ abstract class ComponentbuilderHelper
|
||||
}
|
||||
|
||||
/**
|
||||
* Load the Component Help URLs.
|
||||
**/
|
||||
* Load the Component Help URLs.
|
||||
**/
|
||||
public static function getHelpUrl($view)
|
||||
{
|
||||
$user = JFactory::getUser();
|
||||
@ -3684,15 +3684,15 @@ abstract class ComponentbuilderHelper
|
||||
// set joomla article
|
||||
case 1:
|
||||
return self::loadArticleLink($help->article);
|
||||
break;
|
||||
break;
|
||||
// set help text
|
||||
case 2:
|
||||
return self::loadHelpTextLink($help->id);
|
||||
break;
|
||||
break;
|
||||
// set Link
|
||||
case 3:
|
||||
return $help->url;
|
||||
break;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -3701,16 +3701,16 @@ abstract class ComponentbuilderHelper
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Article Link.
|
||||
**/
|
||||
* Get the Article Link.
|
||||
**/
|
||||
protected static function loadArticleLink($id)
|
||||
{
|
||||
return JURI::root().'index.php?option=com_content&view=article&id='.$id.'&tmpl=component&layout=modal';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Help Text Link.
|
||||
**/
|
||||
* Get the Help Text Link.
|
||||
**/
|
||||
protected static function loadHelpTextLink($id)
|
||||
{
|
||||
$token = JSession::getFormToken();
|
||||
@ -3809,8 +3809,8 @@ abstract class ComponentbuilderHelper
|
||||
}
|
||||
|
||||
/**
|
||||
* UIKIT Component Classes
|
||||
**/
|
||||
* UIKIT Component Classes
|
||||
**/
|
||||
public static $uk_components = array(
|
||||
'data-uk-grid' => array(
|
||||
'grid' ),
|
||||
@ -3866,13 +3866,13 @@ abstract class ComponentbuilderHelper
|
||||
);
|
||||
|
||||
/**
|
||||
* Add UIKIT Components
|
||||
**/
|
||||
* Add UIKIT Components
|
||||
**/
|
||||
public static $uikit = false;
|
||||
|
||||
/**
|
||||
* Get UIKIT Components
|
||||
**/
|
||||
* Get UIKIT Components
|
||||
**/
|
||||
public static function getUikitComp($content,$classes = array())
|
||||
{
|
||||
if (strpos($content,'class="uk-') !== false)
|
||||
@ -3947,10 +3947,10 @@ abstract class ComponentbuilderHelper
|
||||
|
||||
// Set document properties
|
||||
$objPHPExcel->getProperties()->setCreator($creator)
|
||||
->setCompany('Joomla Component Builder')
|
||||
->setLastModifiedBy($modified)
|
||||
->setTitle($title)
|
||||
->setSubject($subjectTab);
|
||||
->setCompany('Joomla Component Builder')
|
||||
->setLastModifiedBy($modified)
|
||||
->setTitle($title)
|
||||
->setSubject($subjectTab);
|
||||
if (!$description)
|
||||
{
|
||||
$objPHPExcel->getProperties()->setDescription($description);
|
||||
@ -4038,17 +4038,17 @@ abstract class ComponentbuilderHelper
|
||||
}
|
||||
|
||||
/**
|
||||
* Get CSV Headers
|
||||
*/
|
||||
* Get CSV Headers
|
||||
*/
|
||||
public static function getFileHeaders($dataType)
|
||||
{
|
||||
// make sure these files are loaded
|
||||
JLoader::import('PHPExcel', JPATH_COMPONENT_ADMINISTRATOR . '/helpers');
|
||||
JLoader::import('ChunkReadFilter', JPATH_COMPONENT_ADMINISTRATOR . '/helpers/PHPExcel/Reader');
|
||||
// get session object
|
||||
$session = JFactory::getSession();
|
||||
$package = $session->get('package', null);
|
||||
$package = json_decode($package, true);
|
||||
$session = JFactory::getSession();
|
||||
$package = $session->get('package', null);
|
||||
$package = json_decode($package, true);
|
||||
// set the headers
|
||||
if(isset($package['dir']))
|
||||
{
|
||||
|
@ -271,7 +271,8 @@ COM_COMPONENTBUILDER_ADMIN_FIELDS_RELATIONS_JOIN_TYPE_LABEL="Join Type"
|
||||
COM_COMPONENTBUILDER_ADMIN_FIELDS_RELATIONS_LISTFIELD="Listfield"
|
||||
COM_COMPONENTBUILDER_ADMIN_FIELDS_RELATIONS_LISTFIELD_DESCRIPTION="Select the target list field."
|
||||
COM_COMPONENTBUILDER_ADMIN_FIELDS_RELATIONS_LISTFIELD_LABEL="List Field"
|
||||
COM_COMPONENTBUILDER_ADMIN_FIELDS_RELATIONS_MODEL="Model"
|
||||
COM_COMPONENTBUILDER_ADMIN_FIELDS_RELATIONS_MODEL_AFTER_MODELLING="Model (after modelling)"
|
||||
COM_COMPONENTBUILDER_ADMIN_FIELDS_RELATIONS_MODEL_BEFORE_MODELLING="Model (before modelling)"
|
||||
COM_COMPONENTBUILDER_ADMIN_FIELDS_RELATIONS_MODIFIED_BY_DESC="The last user that modified this Admin Fields Relations."
|
||||
COM_COMPONENTBUILDER_ADMIN_FIELDS_RELATIONS_MODIFIED_BY_LABEL="Modified By"
|
||||
COM_COMPONENTBUILDER_ADMIN_FIELDS_RELATIONS_MODIFIED_DATE_DESC="The date this Admin Fields Relations was modified."
|
||||
|
@ -256,7 +256,7 @@ class ComponentbuilderModelAdmin_fields extends JModelAdmin
|
||||
protected function canEditState($record)
|
||||
{
|
||||
$user = JFactory::getUser();
|
||||
$recordId = (!empty($record->id)) ? $record->id : 0;
|
||||
$recordId = (!empty($record->id)) ? $record->id : 0;
|
||||
|
||||
if ($recordId)
|
||||
{
|
||||
@ -522,7 +522,7 @@ class ComponentbuilderModelAdmin_fields extends JModelAdmin
|
||||
*
|
||||
* @return mixed An array of new IDs on success, boolean false on failure.
|
||||
*
|
||||
* @since 12.2
|
||||
* @since 12.2
|
||||
*/
|
||||
protected function batchCopy($values, $pks, $contexts)
|
||||
{
|
||||
@ -620,7 +620,7 @@ class ComponentbuilderModelAdmin_fields extends JModelAdmin
|
||||
$this->table->id = 0;
|
||||
|
||||
// TODO: Deal with ordering?
|
||||
// $this->table->ordering = 1;
|
||||
// $this->table->ordering = 1;
|
||||
|
||||
// Check the row.
|
||||
if (!$this->table->check())
|
||||
@ -665,7 +665,7 @@ class ComponentbuilderModelAdmin_fields extends JModelAdmin
|
||||
*
|
||||
* @return boolean True if successful, false otherwise and internal error is set.
|
||||
*
|
||||
* @since 12.2
|
||||
* @since 12.2
|
||||
*/
|
||||
protected function batchMove($values, $pks, $contexts)
|
||||
{
|
||||
@ -865,13 +865,13 @@ class ComponentbuilderModelAdmin_fields extends JModelAdmin
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to change the title
|
||||
*
|
||||
* @param string $title The title.
|
||||
*
|
||||
* @return array Contains the modified title and alias.
|
||||
*
|
||||
*/
|
||||
* Method to change the title
|
||||
*
|
||||
* @param string $title The title.
|
||||
*
|
||||
* @return array Contains the modified title and alias.
|
||||
*
|
||||
*/
|
||||
protected function _generateNewTitle($title)
|
||||
{
|
||||
|
||||
|
@ -256,7 +256,7 @@ class ComponentbuilderModelAdmin_fields_conditions extends JModelAdmin
|
||||
protected function canEditState($record)
|
||||
{
|
||||
$user = JFactory::getUser();
|
||||
$recordId = (!empty($record->id)) ? $record->id : 0;
|
||||
$recordId = (!empty($record->id)) ? $record->id : 0;
|
||||
|
||||
if ($recordId)
|
||||
{
|
||||
@ -522,7 +522,7 @@ class ComponentbuilderModelAdmin_fields_conditions extends JModelAdmin
|
||||
*
|
||||
* @return mixed An array of new IDs on success, boolean false on failure.
|
||||
*
|
||||
* @since 12.2
|
||||
* @since 12.2
|
||||
*/
|
||||
protected function batchCopy($values, $pks, $contexts)
|
||||
{
|
||||
@ -620,7 +620,7 @@ class ComponentbuilderModelAdmin_fields_conditions extends JModelAdmin
|
||||
$this->table->id = 0;
|
||||
|
||||
// TODO: Deal with ordering?
|
||||
// $this->table->ordering = 1;
|
||||
// $this->table->ordering = 1;
|
||||
|
||||
// Check the row.
|
||||
if (!$this->table->check())
|
||||
@ -665,7 +665,7 @@ class ComponentbuilderModelAdmin_fields_conditions extends JModelAdmin
|
||||
*
|
||||
* @return boolean True if successful, false otherwise and internal error is set.
|
||||
*
|
||||
* @since 12.2
|
||||
* @since 12.2
|
||||
*/
|
||||
protected function batchMove($values, $pks, $contexts)
|
||||
{
|
||||
@ -855,13 +855,13 @@ class ComponentbuilderModelAdmin_fields_conditions extends JModelAdmin
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to change the title
|
||||
*
|
||||
* @param string $title The title.
|
||||
*
|
||||
* @return array Contains the modified title and alias.
|
||||
*
|
||||
*/
|
||||
* Method to change the title
|
||||
*
|
||||
* @param string $title The title.
|
||||
*
|
||||
* @return array Contains the modified title and alias.
|
||||
*
|
||||
*/
|
||||
protected function _generateNewTitle($title)
|
||||
{
|
||||
|
||||
|
@ -236,7 +236,7 @@ class ComponentbuilderModelAdmin_fields_relations extends JModelAdmin
|
||||
protected function canEditState($record)
|
||||
{
|
||||
$user = JFactory::getUser();
|
||||
$recordId = (!empty($record->id)) ? $record->id : 0;
|
||||
$recordId = (!empty($record->id)) ? $record->id : 0;
|
||||
|
||||
if ($recordId)
|
||||
{
|
||||
@ -502,7 +502,7 @@ class ComponentbuilderModelAdmin_fields_relations extends JModelAdmin
|
||||
*
|
||||
* @return mixed An array of new IDs on success, boolean false on failure.
|
||||
*
|
||||
* @since 12.2
|
||||
* @since 12.2
|
||||
*/
|
||||
protected function batchCopy($values, $pks, $contexts)
|
||||
{
|
||||
@ -600,7 +600,7 @@ class ComponentbuilderModelAdmin_fields_relations extends JModelAdmin
|
||||
$this->table->id = 0;
|
||||
|
||||
// TODO: Deal with ordering?
|
||||
// $this->table->ordering = 1;
|
||||
// $this->table->ordering = 1;
|
||||
|
||||
// Check the row.
|
||||
if (!$this->table->check())
|
||||
@ -645,7 +645,7 @@ class ComponentbuilderModelAdmin_fields_relations extends JModelAdmin
|
||||
*
|
||||
* @return boolean True if successful, false otherwise and internal error is set.
|
||||
*
|
||||
* @since 12.2
|
||||
* @since 12.2
|
||||
*/
|
||||
protected function batchMove($values, $pks, $contexts)
|
||||
{
|
||||
@ -835,13 +835,13 @@ class ComponentbuilderModelAdmin_fields_relations extends JModelAdmin
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to change the title
|
||||
*
|
||||
* @param string $title The title.
|
||||
*
|
||||
* @return array Contains the modified title and alias.
|
||||
*
|
||||
*/
|
||||
* Method to change the title
|
||||
*
|
||||
* @param string $title The title.
|
||||
*
|
||||
* @return array Contains the modified title and alias.
|
||||
*
|
||||
*/
|
||||
protected function _generateNewTitle($title)
|
||||
{
|
||||
|
||||
|
@ -550,7 +550,7 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin
|
||||
protected function canEditState($record)
|
||||
{
|
||||
$user = JFactory::getUser();
|
||||
$recordId = (!empty($record->id)) ? $record->id : 0;
|
||||
$recordId = (!empty($record->id)) ? $record->id : 0;
|
||||
|
||||
if ($recordId)
|
||||
{
|
||||
@ -661,18 +661,18 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin
|
||||
}
|
||||
|
||||
/**
|
||||
* 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
|
||||
*/
|
||||
* 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
|
||||
@ -894,7 +894,7 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin
|
||||
*
|
||||
* @return mixed An array of new IDs on success, boolean false on failure.
|
||||
*
|
||||
* @since 12.2
|
||||
* @since 12.2
|
||||
*/
|
||||
protected function batchCopy($values, $pks, $contexts)
|
||||
{
|
||||
@ -986,7 +986,7 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin
|
||||
$this->table->id = 0;
|
||||
|
||||
// TODO: Deal with ordering?
|
||||
// $this->table->ordering = 1;
|
||||
// $this->table->ordering = 1;
|
||||
|
||||
// Check the row.
|
||||
if (!$this->table->check())
|
||||
@ -1051,7 +1051,7 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin
|
||||
*
|
||||
* @return boolean True if successful, false otherwise and internal error is set.
|
||||
*
|
||||
* @since 12.2
|
||||
* @since 12.2
|
||||
*/
|
||||
protected function batchMove($values, $pks, $contexts)
|
||||
{
|
||||
|
@ -104,11 +104,9 @@ class ComponentbuilderModelAdmin_views extends JModelList
|
||||
// set values to display correctly.
|
||||
if (ComponentbuilderHelper::checkArray($items))
|
||||
{
|
||||
// get user object.
|
||||
$user = JFactory::getUser();
|
||||
foreach ($items as $nr => &$item)
|
||||
{
|
||||
$access = ($user->authorise('admin_view.access', 'com_componentbuilder.admin_view.' . (int) $item->id) && $user->authorise('admin_view.access', 'com_componentbuilder'));
|
||||
$access = (JFactory::getUser()->authorise('admin_view.access', 'com_componentbuilder.admin_view.' . (int) $item->id) && JFactory::getUser()->authorise('admin_view.access', 'com_componentbuilder'));
|
||||
if (!$access)
|
||||
{
|
||||
unset($items[$nr]);
|
||||
@ -194,10 +192,10 @@ class ComponentbuilderModelAdmin_views extends JModelList
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to get list export data.
|
||||
*
|
||||
* @return mixed An array of data items on success, false on failure.
|
||||
*/
|
||||
* Method to get list export data.
|
||||
*
|
||||
* @return mixed An array of data items on success, false on failure.
|
||||
*/
|
||||
public function getExportData($pks)
|
||||
{
|
||||
// setup the query
|
||||
@ -237,11 +235,9 @@ class ComponentbuilderModelAdmin_views extends JModelList
|
||||
// set values to display correctly.
|
||||
if (ComponentbuilderHelper::checkArray($items))
|
||||
{
|
||||
// get user object.
|
||||
$user = JFactory::getUser();
|
||||
foreach ($items as $nr => &$item)
|
||||
{
|
||||
$access = ($user->authorise('admin_view.access', 'com_componentbuilder.admin_view.' . (int) $item->id) && $user->authorise('admin_view.access', 'com_componentbuilder'));
|
||||
$access = (JFactory::getUser()->authorise('admin_view.access', 'com_componentbuilder.admin_view.' . (int) $item->id) && JFactory::getUser()->authorise('admin_view.access', 'com_componentbuilder'));
|
||||
if (!$access)
|
||||
{
|
||||
unset($items[$nr]);
|
||||
@ -385,11 +381,11 @@ class ComponentbuilderModelAdmin_views extends JModelList
|
||||
}
|
||||
|
||||
/**
|
||||
* Build an SQL query to checkin all items left checked out longer then a set time.
|
||||
*
|
||||
* @return a bool
|
||||
*
|
||||
*/
|
||||
* Build an SQL query to checkin all items left checked out longer then a set time.
|
||||
*
|
||||
* @return a bool
|
||||
*
|
||||
*/
|
||||
protected function checkInNow()
|
||||
{
|
||||
// Get set check in time
|
||||
|
@ -90,11 +90,9 @@ class ComponentbuilderModelAdmins_fields extends JModelList
|
||||
// set values to display correctly.
|
||||
if (ComponentbuilderHelper::checkArray($items))
|
||||
{
|
||||
// get user object.
|
||||
$user = JFactory::getUser();
|
||||
foreach ($items as $nr => &$item)
|
||||
{
|
||||
$access = ($user->authorise('admin_fields.access', 'com_componentbuilder.admin_fields.' . (int) $item->id) && $user->authorise('admin_fields.access', 'com_componentbuilder'));
|
||||
$access = (JFactory::getUser()->authorise('admin_fields.access', 'com_componentbuilder.admin_fields.' . (int) $item->id) && JFactory::getUser()->authorise('admin_fields.access', 'com_componentbuilder'));
|
||||
if (!$access)
|
||||
{
|
||||
unset($items[$nr]);
|
||||
@ -188,11 +186,11 @@ class ComponentbuilderModelAdmins_fields extends JModelList
|
||||
}
|
||||
|
||||
/**
|
||||
* Build an SQL query to checkin all items left checked out longer then a set time.
|
||||
*
|
||||
* @return a bool
|
||||
*
|
||||
*/
|
||||
* Build an SQL query to checkin all items left checked out longer then a set time.
|
||||
*
|
||||
* @return a bool
|
||||
*
|
||||
*/
|
||||
protected function checkInNow()
|
||||
{
|
||||
// Get set check in time
|
||||
|
@ -90,11 +90,9 @@ class ComponentbuilderModelAdmins_fields_conditions extends JModelList
|
||||
// set values to display correctly.
|
||||
if (ComponentbuilderHelper::checkArray($items))
|
||||
{
|
||||
// get user object.
|
||||
$user = JFactory::getUser();
|
||||
foreach ($items as $nr => &$item)
|
||||
{
|
||||
$access = ($user->authorise('admin_fields_conditions.access', 'com_componentbuilder.admin_fields_conditions.' . (int) $item->id) && $user->authorise('admin_fields_conditions.access', 'com_componentbuilder'));
|
||||
$access = (JFactory::getUser()->authorise('admin_fields_conditions.access', 'com_componentbuilder.admin_fields_conditions.' . (int) $item->id) && JFactory::getUser()->authorise('admin_fields_conditions.access', 'com_componentbuilder'));
|
||||
if (!$access)
|
||||
{
|
||||
unset($items[$nr]);
|
||||
@ -188,11 +186,11 @@ class ComponentbuilderModelAdmins_fields_conditions extends JModelList
|
||||
}
|
||||
|
||||
/**
|
||||
* Build an SQL query to checkin all items left checked out longer then a set time.
|
||||
*
|
||||
* @return a bool
|
||||
*
|
||||
*/
|
||||
* Build an SQL query to checkin all items left checked out longer then a set time.
|
||||
*
|
||||
* @return a bool
|
||||
*
|
||||
*/
|
||||
protected function checkInNow()
|
||||
{
|
||||
// Get set check in time
|
||||
|
@ -90,11 +90,9 @@ class ComponentbuilderModelAdmins_fields_relations extends JModelList
|
||||
// set values to display correctly.
|
||||
if (ComponentbuilderHelper::checkArray($items))
|
||||
{
|
||||
// get user object.
|
||||
$user = JFactory::getUser();
|
||||
foreach ($items as $nr => &$item)
|
||||
{
|
||||
$access = ($user->authorise('admin_fields_relations.access', 'com_componentbuilder.admin_fields_relations.' . (int) $item->id) && $user->authorise('admin_fields_relations.access', 'com_componentbuilder'));
|
||||
$access = (JFactory::getUser()->authorise('admin_fields_relations.access', 'com_componentbuilder.admin_fields_relations.' . (int) $item->id) && JFactory::getUser()->authorise('admin_fields_relations.access', 'com_componentbuilder'));
|
||||
if (!$access)
|
||||
{
|
||||
unset($items[$nr]);
|
||||
@ -188,11 +186,11 @@ class ComponentbuilderModelAdmins_fields_relations extends JModelList
|
||||
}
|
||||
|
||||
/**
|
||||
* Build an SQL query to checkin all items left checked out longer then a set time.
|
||||
*
|
||||
* @return a bool
|
||||
*
|
||||
*/
|
||||
* Build an SQL query to checkin all items left checked out longer then a set time.
|
||||
*
|
||||
* @return a bool
|
||||
*
|
||||
*/
|
||||
protected function checkInNow()
|
||||
{
|
||||
// Get set check in time
|
||||
|
@ -2092,6 +2092,13 @@ class ComponentbuilderModelAjax extends JModelList
|
||||
$targets['admin_view']['not_base64'] = array();
|
||||
$targets['admin_view']['name'] = 'system_name';
|
||||
|
||||
// #__componentbuilder_admin_fields_relations
|
||||
$targets['library'] = array();
|
||||
$targets['library']['search'] = array('id', 'admin_view', 'addrelations');
|
||||
$targets['library']['view'] = 'admin_fields_relations';
|
||||
$targets['library']['not_base64'] = array('addrelations' => 'json');
|
||||
$targets['library']['name'] = 'admin_view->id:admin_view.system_name';
|
||||
|
||||
// #__componentbuilder_custom_admin_view
|
||||
$targets['custom_admin_view'] = array();
|
||||
$targets['custom_admin_view']['search'] = array('id', 'system_name', 'default','php_view','php_jview','php_jview_display','php_document',
|
||||
@ -2139,7 +2146,6 @@ class ComponentbuilderModelAjax extends JModelList
|
||||
|
||||
// #__componentbuilder_library
|
||||
$targets['library'] = array();
|
||||
$targets['library']['view'] = 'libraries';
|
||||
$targets['library']['search'] = array('id', 'name', 'php_setdocument');
|
||||
$targets['library']['view'] = 'libraries';
|
||||
$targets['library']['not_base64'] = array();
|
||||
@ -2597,17 +2603,19 @@ class ComponentbuilderModelAjax extends JModelList
|
||||
$names = array_map( function ($id) {
|
||||
return '[' . $id . ']=> ' . ComponentbuilderHelper::getVar('field', $id, 'id', 'name');
|
||||
}, $fields);
|
||||
// create note
|
||||
$note = "// ". implode('; ', $names);
|
||||
// MODEL
|
||||
if ($area == 1)
|
||||
if ($area == 1 || $area == 3)
|
||||
{
|
||||
return $note . PHP_EOL . PHP_EOL . '$item->[' . implode("] . ', ' . \$item->[", $fields) . '];';
|
||||
// create note
|
||||
$note = "// ". implode('; ', $names);
|
||||
return $note . PHP_EOL . '$item->{'.(int)$listfield.'} = $item->{' . implode("} . ', ' . \$item->{", $fields) . '};';
|
||||
}
|
||||
// VIEW
|
||||
elseif ($area == 2)
|
||||
{
|
||||
return '$this->escape($item->[' . implode("]) . '<br />' . \$this->escape(\$item->[", $fields). ']);' . PHP_EOL . PHP_EOL . $note;
|
||||
// create note
|
||||
$note = "<!-- " . implode('; ', $names) . " -->";
|
||||
return '[field=' . implode("]<br />[field=", $fields). ']' . PHP_EOL . PHP_EOL . $note;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
@ -122,11 +122,11 @@ class ComponentbuilderModelCompiler extends JModelList
|
||||
|
||||
|
||||
/**
|
||||
* Get the uikit needed components
|
||||
*
|
||||
* @return mixed An array of objects on success.
|
||||
*
|
||||
*/
|
||||
* Get the uikit needed components
|
||||
*
|
||||
* @return mixed An array of objects on success.
|
||||
*
|
||||
*/
|
||||
public function getUikitComp()
|
||||
{
|
||||
if (isset($this->uikitComp) && ComponentbuilderHelper::checkArray($this->uikitComp))
|
||||
|
@ -267,7 +267,7 @@ class ComponentbuilderModelComponent_admin_views extends JModelAdmin
|
||||
protected function canEditState($record)
|
||||
{
|
||||
$user = JFactory::getUser();
|
||||
$recordId = (!empty($record->id)) ? $record->id : 0;
|
||||
$recordId = (!empty($record->id)) ? $record->id : 0;
|
||||
|
||||
if ($recordId)
|
||||
{
|
||||
@ -533,7 +533,7 @@ class ComponentbuilderModelComponent_admin_views extends JModelAdmin
|
||||
*
|
||||
* @return mixed An array of new IDs on success, boolean false on failure.
|
||||
*
|
||||
* @since 12.2
|
||||
* @since 12.2
|
||||
*/
|
||||
protected function batchCopy($values, $pks, $contexts)
|
||||
{
|
||||
@ -631,7 +631,7 @@ class ComponentbuilderModelComponent_admin_views extends JModelAdmin
|
||||
$this->table->id = 0;
|
||||
|
||||
// TODO: Deal with ordering?
|
||||
// $this->table->ordering = 1;
|
||||
// $this->table->ordering = 1;
|
||||
|
||||
// Check the row.
|
||||
if (!$this->table->check())
|
||||
@ -676,7 +676,7 @@ class ComponentbuilderModelComponent_admin_views extends JModelAdmin
|
||||
*
|
||||
* @return boolean True if successful, false otherwise and internal error is set.
|
||||
*
|
||||
* @since 12.2
|
||||
* @since 12.2
|
||||
*/
|
||||
protected function batchMove($values, $pks, $contexts)
|
||||
{
|
||||
@ -866,13 +866,13 @@ class ComponentbuilderModelComponent_admin_views extends JModelAdmin
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to change the title
|
||||
*
|
||||
* @param string $title The title.
|
||||
*
|
||||
* @return array Contains the modified title and alias.
|
||||
*
|
||||
*/
|
||||
* Method to change the title
|
||||
*
|
||||
* @param string $title The title.
|
||||
*
|
||||
* @return array Contains the modified title and alias.
|
||||
*
|
||||
*/
|
||||
protected function _generateNewTitle($title)
|
||||
{
|
||||
|
||||
|
@ -267,7 +267,7 @@ class ComponentbuilderModelComponent_config extends JModelAdmin
|
||||
protected function canEditState($record)
|
||||
{
|
||||
$user = JFactory::getUser();
|
||||
$recordId = (!empty($record->id)) ? $record->id : 0;
|
||||
$recordId = (!empty($record->id)) ? $record->id : 0;
|
||||
|
||||
if ($recordId)
|
||||
{
|
||||
@ -533,7 +533,7 @@ class ComponentbuilderModelComponent_config extends JModelAdmin
|
||||
*
|
||||
* @return mixed An array of new IDs on success, boolean false on failure.
|
||||
*
|
||||
* @since 12.2
|
||||
* @since 12.2
|
||||
*/
|
||||
protected function batchCopy($values, $pks, $contexts)
|
||||
{
|
||||
@ -631,7 +631,7 @@ class ComponentbuilderModelComponent_config extends JModelAdmin
|
||||
$this->table->id = 0;
|
||||
|
||||
// TODO: Deal with ordering?
|
||||
// $this->table->ordering = 1;
|
||||
// $this->table->ordering = 1;
|
||||
|
||||
// Check the row.
|
||||
if (!$this->table->check())
|
||||
@ -676,7 +676,7 @@ class ComponentbuilderModelComponent_config extends JModelAdmin
|
||||
*
|
||||
* @return boolean True if successful, false otherwise and internal error is set.
|
||||
*
|
||||
* @since 12.2
|
||||
* @since 12.2
|
||||
*/
|
||||
protected function batchMove($values, $pks, $contexts)
|
||||
{
|
||||
@ -866,13 +866,13 @@ class ComponentbuilderModelComponent_config extends JModelAdmin
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to change the title
|
||||
*
|
||||
* @param string $title The title.
|
||||
*
|
||||
* @return array Contains the modified title and alias.
|
||||
*
|
||||
*/
|
||||
* Method to change the title
|
||||
*
|
||||
* @param string $title The title.
|
||||
*
|
||||
* @return array Contains the modified title and alias.
|
||||
*
|
||||
*/
|
||||
protected function _generateNewTitle($title)
|
||||
{
|
||||
|
||||
|
@ -267,7 +267,7 @@ class ComponentbuilderModelComponent_custom_admin_menus extends JModelAdmin
|
||||
protected function canEditState($record)
|
||||
{
|
||||
$user = JFactory::getUser();
|
||||
$recordId = (!empty($record->id)) ? $record->id : 0;
|
||||
$recordId = (!empty($record->id)) ? $record->id : 0;
|
||||
|
||||
if ($recordId)
|
||||
{
|
||||
@ -533,7 +533,7 @@ class ComponentbuilderModelComponent_custom_admin_menus extends JModelAdmin
|
||||
*
|
||||
* @return mixed An array of new IDs on success, boolean false on failure.
|
||||
*
|
||||
* @since 12.2
|
||||
* @since 12.2
|
||||
*/
|
||||
protected function batchCopy($values, $pks, $contexts)
|
||||
{
|
||||
@ -631,7 +631,7 @@ class ComponentbuilderModelComponent_custom_admin_menus extends JModelAdmin
|
||||
$this->table->id = 0;
|
||||
|
||||
// TODO: Deal with ordering?
|
||||
// $this->table->ordering = 1;
|
||||
// $this->table->ordering = 1;
|
||||
|
||||
// Check the row.
|
||||
if (!$this->table->check())
|
||||
@ -676,7 +676,7 @@ class ComponentbuilderModelComponent_custom_admin_menus extends JModelAdmin
|
||||
*
|
||||
* @return boolean True if successful, false otherwise and internal error is set.
|
||||
*
|
||||
* @since 12.2
|
||||
* @since 12.2
|
||||
*/
|
||||
protected function batchMove($values, $pks, $contexts)
|
||||
{
|
||||
@ -866,13 +866,13 @@ class ComponentbuilderModelComponent_custom_admin_menus extends JModelAdmin
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to change the title
|
||||
*
|
||||
* @param string $title The title.
|
||||
*
|
||||
* @return array Contains the modified title and alias.
|
||||
*
|
||||
*/
|
||||
* Method to change the title
|
||||
*
|
||||
* @param string $title The title.
|
||||
*
|
||||
* @return array Contains the modified title and alias.
|
||||
*
|
||||
*/
|
||||
protected function _generateNewTitle($title)
|
||||
{
|
||||
|
||||
|
@ -267,7 +267,7 @@ class ComponentbuilderModelComponent_custom_admin_views extends JModelAdmin
|
||||
protected function canEditState($record)
|
||||
{
|
||||
$user = JFactory::getUser();
|
||||
$recordId = (!empty($record->id)) ? $record->id : 0;
|
||||
$recordId = (!empty($record->id)) ? $record->id : 0;
|
||||
|
||||
if ($recordId)
|
||||
{
|
||||
@ -533,7 +533,7 @@ class ComponentbuilderModelComponent_custom_admin_views extends JModelAdmin
|
||||
*
|
||||
* @return mixed An array of new IDs on success, boolean false on failure.
|
||||
*
|
||||
* @since 12.2
|
||||
* @since 12.2
|
||||
*/
|
||||
protected function batchCopy($values, $pks, $contexts)
|
||||
{
|
||||
@ -631,7 +631,7 @@ class ComponentbuilderModelComponent_custom_admin_views extends JModelAdmin
|
||||
$this->table->id = 0;
|
||||
|
||||
// TODO: Deal with ordering?
|
||||
// $this->table->ordering = 1;
|
||||
// $this->table->ordering = 1;
|
||||
|
||||
// Check the row.
|
||||
if (!$this->table->check())
|
||||
@ -676,7 +676,7 @@ class ComponentbuilderModelComponent_custom_admin_views extends JModelAdmin
|
||||
*
|
||||
* @return boolean True if successful, false otherwise and internal error is set.
|
||||
*
|
||||
* @since 12.2
|
||||
* @since 12.2
|
||||
*/
|
||||
protected function batchMove($values, $pks, $contexts)
|
||||
{
|
||||
@ -866,13 +866,13 @@ class ComponentbuilderModelComponent_custom_admin_views extends JModelAdmin
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to change the title
|
||||
*
|
||||
* @param string $title The title.
|
||||
*
|
||||
* @return array Contains the modified title and alias.
|
||||
*
|
||||
*/
|
||||
* Method to change the title
|
||||
*
|
||||
* @param string $title The title.
|
||||
*
|
||||
* @return array Contains the modified title and alias.
|
||||
*
|
||||
*/
|
||||
protected function _generateNewTitle($title)
|
||||
{
|
||||
|
||||
|
@ -273,7 +273,7 @@ class ComponentbuilderModelComponent_dashboard extends JModelAdmin
|
||||
protected function canEditState($record)
|
||||
{
|
||||
$user = JFactory::getUser();
|
||||
$recordId = (!empty($record->id)) ? $record->id : 0;
|
||||
$recordId = (!empty($record->id)) ? $record->id : 0;
|
||||
|
||||
if ($recordId)
|
||||
{
|
||||
@ -539,7 +539,7 @@ class ComponentbuilderModelComponent_dashboard extends JModelAdmin
|
||||
*
|
||||
* @return mixed An array of new IDs on success, boolean false on failure.
|
||||
*
|
||||
* @since 12.2
|
||||
* @since 12.2
|
||||
*/
|
||||
protected function batchCopy($values, $pks, $contexts)
|
||||
{
|
||||
@ -637,7 +637,7 @@ class ComponentbuilderModelComponent_dashboard extends JModelAdmin
|
||||
$this->table->id = 0;
|
||||
|
||||
// TODO: Deal with ordering?
|
||||
// $this->table->ordering = 1;
|
||||
// $this->table->ordering = 1;
|
||||
|
||||
// Check the row.
|
||||
if (!$this->table->check())
|
||||
@ -682,7 +682,7 @@ class ComponentbuilderModelComponent_dashboard extends JModelAdmin
|
||||
*
|
||||
* @return boolean True if successful, false otherwise and internal error is set.
|
||||
*
|
||||
* @since 12.2
|
||||
* @since 12.2
|
||||
*/
|
||||
protected function batchMove($values, $pks, $contexts)
|
||||
{
|
||||
@ -878,13 +878,13 @@ class ComponentbuilderModelComponent_dashboard extends JModelAdmin
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to change the title
|
||||
*
|
||||
* @param string $title The title.
|
||||
*
|
||||
* @return array Contains the modified title and alias.
|
||||
*
|
||||
*/
|
||||
* Method to change the title
|
||||
*
|
||||
* @param string $title The title.
|
||||
*
|
||||
* @return array Contains the modified title and alias.
|
||||
*
|
||||
*/
|
||||
protected function _generateNewTitle($title)
|
||||
{
|
||||
|
||||
|
@ -292,7 +292,7 @@ class ComponentbuilderModelComponent_files_folders extends JModelAdmin
|
||||
protected function canEditState($record)
|
||||
{
|
||||
$user = JFactory::getUser();
|
||||
$recordId = (!empty($record->id)) ? $record->id : 0;
|
||||
$recordId = (!empty($record->id)) ? $record->id : 0;
|
||||
|
||||
if ($recordId)
|
||||
{
|
||||
@ -558,7 +558,7 @@ class ComponentbuilderModelComponent_files_folders extends JModelAdmin
|
||||
*
|
||||
* @return mixed An array of new IDs on success, boolean false on failure.
|
||||
*
|
||||
* @since 12.2
|
||||
* @since 12.2
|
||||
*/
|
||||
protected function batchCopy($values, $pks, $contexts)
|
||||
{
|
||||
@ -656,7 +656,7 @@ class ComponentbuilderModelComponent_files_folders extends JModelAdmin
|
||||
$this->table->id = 0;
|
||||
|
||||
// TODO: Deal with ordering?
|
||||
// $this->table->ordering = 1;
|
||||
// $this->table->ordering = 1;
|
||||
|
||||
// Check the row.
|
||||
if (!$this->table->check())
|
||||
@ -701,7 +701,7 @@ class ComponentbuilderModelComponent_files_folders extends JModelAdmin
|
||||
*
|
||||
* @return boolean True if successful, false otherwise and internal error is set.
|
||||
*
|
||||
* @since 12.2
|
||||
* @since 12.2
|
||||
*/
|
||||
protected function batchMove($values, $pks, $contexts)
|
||||
{
|
||||
@ -930,13 +930,13 @@ class ComponentbuilderModelComponent_files_folders extends JModelAdmin
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to change the title
|
||||
*
|
||||
* @param string $title The title.
|
||||
*
|
||||
* @return array Contains the modified title and alias.
|
||||
*
|
||||
*/
|
||||
* Method to change the title
|
||||
*
|
||||
* @param string $title The title.
|
||||
*
|
||||
* @return array Contains the modified title and alias.
|
||||
*
|
||||
*/
|
||||
protected function _generateNewTitle($title)
|
||||
{
|
||||
|
||||
|
@ -267,7 +267,7 @@ class ComponentbuilderModelComponent_mysql_tweaks extends JModelAdmin
|
||||
protected function canEditState($record)
|
||||
{
|
||||
$user = JFactory::getUser();
|
||||
$recordId = (!empty($record->id)) ? $record->id : 0;
|
||||
$recordId = (!empty($record->id)) ? $record->id : 0;
|
||||
|
||||
if ($recordId)
|
||||
{
|
||||
@ -533,7 +533,7 @@ class ComponentbuilderModelComponent_mysql_tweaks extends JModelAdmin
|
||||
*
|
||||
* @return mixed An array of new IDs on success, boolean false on failure.
|
||||
*
|
||||
* @since 12.2
|
||||
* @since 12.2
|
||||
*/
|
||||
protected function batchCopy($values, $pks, $contexts)
|
||||
{
|
||||
@ -631,7 +631,7 @@ class ComponentbuilderModelComponent_mysql_tweaks extends JModelAdmin
|
||||
$this->table->id = 0;
|
||||
|
||||
// TODO: Deal with ordering?
|
||||
// $this->table->ordering = 1;
|
||||
// $this->table->ordering = 1;
|
||||
|
||||
// Check the row.
|
||||
if (!$this->table->check())
|
||||
@ -676,7 +676,7 @@ class ComponentbuilderModelComponent_mysql_tweaks extends JModelAdmin
|
||||
*
|
||||
* @return boolean True if successful, false otherwise and internal error is set.
|
||||
*
|
||||
* @since 12.2
|
||||
* @since 12.2
|
||||
*/
|
||||
protected function batchMove($values, $pks, $contexts)
|
||||
{
|
||||
@ -866,13 +866,13 @@ class ComponentbuilderModelComponent_mysql_tweaks extends JModelAdmin
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to change the title
|
||||
*
|
||||
* @param string $title The title.
|
||||
*
|
||||
* @return array Contains the modified title and alias.
|
||||
*
|
||||
*/
|
||||
* Method to change the title
|
||||
*
|
||||
* @param string $title The title.
|
||||
*
|
||||
* @return array Contains the modified title and alias.
|
||||
*
|
||||
*/
|
||||
protected function _generateNewTitle($title)
|
||||
{
|
||||
|
||||
|
@ -267,7 +267,7 @@ class ComponentbuilderModelComponent_site_views extends JModelAdmin
|
||||
protected function canEditState($record)
|
||||
{
|
||||
$user = JFactory::getUser();
|
||||
$recordId = (!empty($record->id)) ? $record->id : 0;
|
||||
$recordId = (!empty($record->id)) ? $record->id : 0;
|
||||
|
||||
if ($recordId)
|
||||
{
|
||||
@ -533,7 +533,7 @@ class ComponentbuilderModelComponent_site_views extends JModelAdmin
|
||||
*
|
||||
* @return mixed An array of new IDs on success, boolean false on failure.
|
||||
*
|
||||
* @since 12.2
|
||||
* @since 12.2
|
||||
*/
|
||||
protected function batchCopy($values, $pks, $contexts)
|
||||
{
|
||||
@ -631,7 +631,7 @@ class ComponentbuilderModelComponent_site_views extends JModelAdmin
|
||||
$this->table->id = 0;
|
||||
|
||||
// TODO: Deal with ordering?
|
||||
// $this->table->ordering = 1;
|
||||
// $this->table->ordering = 1;
|
||||
|
||||
// Check the row.
|
||||
if (!$this->table->check())
|
||||
@ -676,7 +676,7 @@ class ComponentbuilderModelComponent_site_views extends JModelAdmin
|
||||
*
|
||||
* @return boolean True if successful, false otherwise and internal error is set.
|
||||
*
|
||||
* @since 12.2
|
||||
* @since 12.2
|
||||
*/
|
||||
protected function batchMove($values, $pks, $contexts)
|
||||
{
|
||||
@ -866,13 +866,13 @@ class ComponentbuilderModelComponent_site_views extends JModelAdmin
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to change the title
|
||||
*
|
||||
* @param string $title The title.
|
||||
*
|
||||
* @return array Contains the modified title and alias.
|
||||
*
|
||||
*/
|
||||
* Method to change the title
|
||||
*
|
||||
* @param string $title The title.
|
||||
*
|
||||
* @return array Contains the modified title and alias.
|
||||
*
|
||||
*/
|
||||
protected function _generateNewTitle($title)
|
||||
{
|
||||
|
||||
|
@ -267,7 +267,7 @@ class ComponentbuilderModelComponent_updates extends JModelAdmin
|
||||
protected function canEditState($record)
|
||||
{
|
||||
$user = JFactory::getUser();
|
||||
$recordId = (!empty($record->id)) ? $record->id : 0;
|
||||
$recordId = (!empty($record->id)) ? $record->id : 0;
|
||||
|
||||
if ($recordId)
|
||||
{
|
||||
@ -533,7 +533,7 @@ class ComponentbuilderModelComponent_updates extends JModelAdmin
|
||||
*
|
||||
* @return mixed An array of new IDs on success, boolean false on failure.
|
||||
*
|
||||
* @since 12.2
|
||||
* @since 12.2
|
||||
*/
|
||||
protected function batchCopy($values, $pks, $contexts)
|
||||
{
|
||||
@ -631,7 +631,7 @@ class ComponentbuilderModelComponent_updates extends JModelAdmin
|
||||
$this->table->id = 0;
|
||||
|
||||
// TODO: Deal with ordering?
|
||||
// $this->table->ordering = 1;
|
||||
// $this->table->ordering = 1;
|
||||
|
||||
// Check the row.
|
||||
if (!$this->table->check())
|
||||
@ -676,7 +676,7 @@ class ComponentbuilderModelComponent_updates extends JModelAdmin
|
||||
*
|
||||
* @return boolean True if successful, false otherwise and internal error is set.
|
||||
*
|
||||
* @since 12.2
|
||||
* @since 12.2
|
||||
*/
|
||||
protected function batchMove($values, $pks, $contexts)
|
||||
{
|
||||
@ -866,13 +866,13 @@ class ComponentbuilderModelComponent_updates extends JModelAdmin
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to change the title
|
||||
*
|
||||
* @param string $title The title.
|
||||
*
|
||||
* @return array Contains the modified title and alias.
|
||||
*
|
||||
*/
|
||||
* Method to change the title
|
||||
*
|
||||
* @param string $title The title.
|
||||
*
|
||||
* @return array Contains the modified title and alias.
|
||||
*
|
||||
*/
|
||||
protected function _generateNewTitle($title)
|
||||
{
|
||||
|
||||
|
@ -90,11 +90,9 @@ class ComponentbuilderModelComponents_admin_views extends JModelList
|
||||
// set values to display correctly.
|
||||
if (ComponentbuilderHelper::checkArray($items))
|
||||
{
|
||||
// get user object.
|
||||
$user = JFactory::getUser();
|
||||
foreach ($items as $nr => &$item)
|
||||
{
|
||||
$access = ($user->authorise('component_admin_views.access', 'com_componentbuilder.component_admin_views.' . (int) $item->id) && $user->authorise('component_admin_views.access', 'com_componentbuilder'));
|
||||
$access = (JFactory::getUser()->authorise('component_admin_views.access', 'com_componentbuilder.component_admin_views.' . (int) $item->id) && JFactory::getUser()->authorise('component_admin_views.access', 'com_componentbuilder'));
|
||||
if (!$access)
|
||||
{
|
||||
unset($items[$nr]);
|
||||
@ -188,11 +186,11 @@ class ComponentbuilderModelComponents_admin_views extends JModelList
|
||||
}
|
||||
|
||||
/**
|
||||
* Build an SQL query to checkin all items left checked out longer then a set time.
|
||||
*
|
||||
* @return a bool
|
||||
*
|
||||
*/
|
||||
* Build an SQL query to checkin all items left checked out longer then a set time.
|
||||
*
|
||||
* @return a bool
|
||||
*
|
||||
*/
|
||||
protected function checkInNow()
|
||||
{
|
||||
// Get set check in time
|
||||
|
@ -90,11 +90,9 @@ class ComponentbuilderModelComponents_config extends JModelList
|
||||
// set values to display correctly.
|
||||
if (ComponentbuilderHelper::checkArray($items))
|
||||
{
|
||||
// get user object.
|
||||
$user = JFactory::getUser();
|
||||
foreach ($items as $nr => &$item)
|
||||
{
|
||||
$access = ($user->authorise('component_config.access', 'com_componentbuilder.component_config.' . (int) $item->id) && $user->authorise('component_config.access', 'com_componentbuilder'));
|
||||
$access = (JFactory::getUser()->authorise('component_config.access', 'com_componentbuilder.component_config.' . (int) $item->id) && JFactory::getUser()->authorise('component_config.access', 'com_componentbuilder'));
|
||||
if (!$access)
|
||||
{
|
||||
unset($items[$nr]);
|
||||
@ -188,11 +186,11 @@ class ComponentbuilderModelComponents_config extends JModelList
|
||||
}
|
||||
|
||||
/**
|
||||
* Build an SQL query to checkin all items left checked out longer then a set time.
|
||||
*
|
||||
* @return a bool
|
||||
*
|
||||
*/
|
||||
* Build an SQL query to checkin all items left checked out longer then a set time.
|
||||
*
|
||||
* @return a bool
|
||||
*
|
||||
*/
|
||||
protected function checkInNow()
|
||||
{
|
||||
// Get set check in time
|
||||
|
@ -90,11 +90,9 @@ class ComponentbuilderModelComponents_custom_admin_menus extends JModelList
|
||||
// set values to display correctly.
|
||||
if (ComponentbuilderHelper::checkArray($items))
|
||||
{
|
||||
// get user object.
|
||||
$user = JFactory::getUser();
|
||||
foreach ($items as $nr => &$item)
|
||||
{
|
||||
$access = ($user->authorise('component_custom_admin_menus.access', 'com_componentbuilder.component_custom_admin_menus.' . (int) $item->id) && $user->authorise('component_custom_admin_menus.access', 'com_componentbuilder'));
|
||||
$access = (JFactory::getUser()->authorise('component_custom_admin_menus.access', 'com_componentbuilder.component_custom_admin_menus.' . (int) $item->id) && JFactory::getUser()->authorise('component_custom_admin_menus.access', 'com_componentbuilder'));
|
||||
if (!$access)
|
||||
{
|
||||
unset($items[$nr]);
|
||||
@ -188,11 +186,11 @@ class ComponentbuilderModelComponents_custom_admin_menus extends JModelList
|
||||
}
|
||||
|
||||
/**
|
||||
* Build an SQL query to checkin all items left checked out longer then a set time.
|
||||
*
|
||||
* @return a bool
|
||||
*
|
||||
*/
|
||||
* Build an SQL query to checkin all items left checked out longer then a set time.
|
||||
*
|
||||
* @return a bool
|
||||
*
|
||||
*/
|
||||
protected function checkInNow()
|
||||
{
|
||||
// Get set check in time
|
||||
|
@ -90,11 +90,9 @@ class ComponentbuilderModelComponents_custom_admin_views extends JModelList
|
||||
// set values to display correctly.
|
||||
if (ComponentbuilderHelper::checkArray($items))
|
||||
{
|
||||
// get user object.
|
||||
$user = JFactory::getUser();
|
||||
foreach ($items as $nr => &$item)
|
||||
{
|
||||
$access = ($user->authorise('component_custom_admin_views.access', 'com_componentbuilder.component_custom_admin_views.' . (int) $item->id) && $user->authorise('component_custom_admin_views.access', 'com_componentbuilder'));
|
||||
$access = (JFactory::getUser()->authorise('component_custom_admin_views.access', 'com_componentbuilder.component_custom_admin_views.' . (int) $item->id) && JFactory::getUser()->authorise('component_custom_admin_views.access', 'com_componentbuilder'));
|
||||
if (!$access)
|
||||
{
|
||||
unset($items[$nr]);
|
||||
@ -188,11 +186,11 @@ class ComponentbuilderModelComponents_custom_admin_views extends JModelList
|
||||
}
|
||||
|
||||
/**
|
||||
* Build an SQL query to checkin all items left checked out longer then a set time.
|
||||
*
|
||||
* @return a bool
|
||||
*
|
||||
*/
|
||||
* Build an SQL query to checkin all items left checked out longer then a set time.
|
||||
*
|
||||
* @return a bool
|
||||
*
|
||||
*/
|
||||
protected function checkInNow()
|
||||
{
|
||||
// Get set check in time
|
||||
|
@ -90,11 +90,9 @@ class ComponentbuilderModelComponents_dashboard extends JModelList
|
||||
// set values to display correctly.
|
||||
if (ComponentbuilderHelper::checkArray($items))
|
||||
{
|
||||
// get user object.
|
||||
$user = JFactory::getUser();
|
||||
foreach ($items as $nr => &$item)
|
||||
{
|
||||
$access = ($user->authorise('component_dashboard.access', 'com_componentbuilder.component_dashboard.' . (int) $item->id) && $user->authorise('component_dashboard.access', 'com_componentbuilder'));
|
||||
$access = (JFactory::getUser()->authorise('component_dashboard.access', 'com_componentbuilder.component_dashboard.' . (int) $item->id) && JFactory::getUser()->authorise('component_dashboard.access', 'com_componentbuilder'));
|
||||
if (!$access)
|
||||
{
|
||||
unset($items[$nr]);
|
||||
@ -188,11 +186,11 @@ class ComponentbuilderModelComponents_dashboard extends JModelList
|
||||
}
|
||||
|
||||
/**
|
||||
* Build an SQL query to checkin all items left checked out longer then a set time.
|
||||
*
|
||||
* @return a bool
|
||||
*
|
||||
*/
|
||||
* Build an SQL query to checkin all items left checked out longer then a set time.
|
||||
*
|
||||
* @return a bool
|
||||
*
|
||||
*/
|
||||
protected function checkInNow()
|
||||
{
|
||||
// Get set check in time
|
||||
|
@ -90,11 +90,9 @@ class ComponentbuilderModelComponents_files_folders extends JModelList
|
||||
// set values to display correctly.
|
||||
if (ComponentbuilderHelper::checkArray($items))
|
||||
{
|
||||
// get user object.
|
||||
$user = JFactory::getUser();
|
||||
foreach ($items as $nr => &$item)
|
||||
{
|
||||
$access = ($user->authorise('component_files_folders.access', 'com_componentbuilder.component_files_folders.' . (int) $item->id) && $user->authorise('component_files_folders.access', 'com_componentbuilder'));
|
||||
$access = (JFactory::getUser()->authorise('component_files_folders.access', 'com_componentbuilder.component_files_folders.' . (int) $item->id) && JFactory::getUser()->authorise('component_files_folders.access', 'com_componentbuilder'));
|
||||
if (!$access)
|
||||
{
|
||||
unset($items[$nr]);
|
||||
@ -188,11 +186,11 @@ class ComponentbuilderModelComponents_files_folders extends JModelList
|
||||
}
|
||||
|
||||
/**
|
||||
* Build an SQL query to checkin all items left checked out longer then a set time.
|
||||
*
|
||||
* @return a bool
|
||||
*
|
||||
*/
|
||||
* Build an SQL query to checkin all items left checked out longer then a set time.
|
||||
*
|
||||
* @return a bool
|
||||
*
|
||||
*/
|
||||
protected function checkInNow()
|
||||
{
|
||||
// Get set check in time
|
||||
|
@ -90,11 +90,9 @@ class ComponentbuilderModelComponents_mysql_tweaks extends JModelList
|
||||
// set values to display correctly.
|
||||
if (ComponentbuilderHelper::checkArray($items))
|
||||
{
|
||||
// get user object.
|
||||
$user = JFactory::getUser();
|
||||
foreach ($items as $nr => &$item)
|
||||
{
|
||||
$access = ($user->authorise('component_mysql_tweaks.access', 'com_componentbuilder.component_mysql_tweaks.' . (int) $item->id) && $user->authorise('component_mysql_tweaks.access', 'com_componentbuilder'));
|
||||
$access = (JFactory::getUser()->authorise('component_mysql_tweaks.access', 'com_componentbuilder.component_mysql_tweaks.' . (int) $item->id) && JFactory::getUser()->authorise('component_mysql_tweaks.access', 'com_componentbuilder'));
|
||||
if (!$access)
|
||||
{
|
||||
unset($items[$nr]);
|
||||
@ -188,11 +186,11 @@ class ComponentbuilderModelComponents_mysql_tweaks extends JModelList
|
||||
}
|
||||
|
||||
/**
|
||||
* Build an SQL query to checkin all items left checked out longer then a set time.
|
||||
*
|
||||
* @return a bool
|
||||
*
|
||||
*/
|
||||
* Build an SQL query to checkin all items left checked out longer then a set time.
|
||||
*
|
||||
* @return a bool
|
||||
*
|
||||
*/
|
||||
protected function checkInNow()
|
||||
{
|
||||
// Get set check in time
|
||||
|
@ -90,11 +90,9 @@ class ComponentbuilderModelComponents_site_views extends JModelList
|
||||
// set values to display correctly.
|
||||
if (ComponentbuilderHelper::checkArray($items))
|
||||
{
|
||||
// get user object.
|
||||
$user = JFactory::getUser();
|
||||
foreach ($items as $nr => &$item)
|
||||
{
|
||||
$access = ($user->authorise('component_site_views.access', 'com_componentbuilder.component_site_views.' . (int) $item->id) && $user->authorise('component_site_views.access', 'com_componentbuilder'));
|
||||
$access = (JFactory::getUser()->authorise('component_site_views.access', 'com_componentbuilder.component_site_views.' . (int) $item->id) && JFactory::getUser()->authorise('component_site_views.access', 'com_componentbuilder'));
|
||||
if (!$access)
|
||||
{
|
||||
unset($items[$nr]);
|
||||
@ -188,11 +186,11 @@ class ComponentbuilderModelComponents_site_views extends JModelList
|
||||
}
|
||||
|
||||
/**
|
||||
* Build an SQL query to checkin all items left checked out longer then a set time.
|
||||
*
|
||||
* @return a bool
|
||||
*
|
||||
*/
|
||||
* Build an SQL query to checkin all items left checked out longer then a set time.
|
||||
*
|
||||
* @return a bool
|
||||
*
|
||||
*/
|
||||
protected function checkInNow()
|
||||
{
|
||||
// Get set check in time
|
||||
|
@ -90,11 +90,9 @@ class ComponentbuilderModelComponents_updates extends JModelList
|
||||
// set values to display correctly.
|
||||
if (ComponentbuilderHelper::checkArray($items))
|
||||
{
|
||||
// get user object.
|
||||
$user = JFactory::getUser();
|
||||
foreach ($items as $nr => &$item)
|
||||
{
|
||||
$access = ($user->authorise('component_updates.access', 'com_componentbuilder.component_updates.' . (int) $item->id) && $user->authorise('component_updates.access', 'com_componentbuilder'));
|
||||
$access = (JFactory::getUser()->authorise('component_updates.access', 'com_componentbuilder.component_updates.' . (int) $item->id) && JFactory::getUser()->authorise('component_updates.access', 'com_componentbuilder'));
|
||||
if (!$access)
|
||||
{
|
||||
unset($items[$nr]);
|
||||
@ -188,11 +186,11 @@ class ComponentbuilderModelComponents_updates extends JModelList
|
||||
}
|
||||
|
||||
/**
|
||||
* Build an SQL query to checkin all items left checked out longer then a set time.
|
||||
*
|
||||
* @return a bool
|
||||
*
|
||||
*/
|
||||
* Build an SQL query to checkin all items left checked out longer then a set time.
|
||||
*
|
||||
* @return a bool
|
||||
*
|
||||
*/
|
||||
protected function checkInNow()
|
||||
{
|
||||
// Get set check in time
|
||||
|
@ -377,7 +377,7 @@ class ComponentbuilderModelCustom_admin_view extends JModelAdmin
|
||||
protected function canEditState($record)
|
||||
{
|
||||
$user = JFactory::getUser();
|
||||
$recordId = (!empty($record->id)) ? $record->id : 0;
|
||||
$recordId = (!empty($record->id)) ? $record->id : 0;
|
||||
|
||||
if ($recordId)
|
||||
{
|
||||
@ -488,18 +488,18 @@ class ComponentbuilderModelCustom_admin_view extends JModelAdmin
|
||||
}
|
||||
|
||||
/**
|
||||
* 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
|
||||
*/
|
||||
* 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
|
||||
@ -679,7 +679,7 @@ class ComponentbuilderModelCustom_admin_view extends JModelAdmin
|
||||
*
|
||||
* @return mixed An array of new IDs on success, boolean false on failure.
|
||||
*
|
||||
* @since 12.2
|
||||
* @since 12.2
|
||||
*/
|
||||
protected function batchCopy($values, $pks, $contexts)
|
||||
{
|
||||
@ -777,7 +777,7 @@ class ComponentbuilderModelCustom_admin_view extends JModelAdmin
|
||||
$this->table->id = 0;
|
||||
|
||||
// TODO: Deal with ordering?
|
||||
// $this->table->ordering = 1;
|
||||
// $this->table->ordering = 1;
|
||||
|
||||
// Check the row.
|
||||
if (!$this->table->check())
|
||||
@ -822,7 +822,7 @@ class ComponentbuilderModelCustom_admin_view extends JModelAdmin
|
||||
*
|
||||
* @return boolean True if successful, false otherwise and internal error is set.
|
||||
*
|
||||
* @since 12.2
|
||||
* @since 12.2
|
||||
*/
|
||||
protected function batchMove($values, $pks, $contexts)
|
||||
{
|
||||
@ -1126,13 +1126,13 @@ class ComponentbuilderModelCustom_admin_view extends JModelAdmin
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to change the title
|
||||
*
|
||||
* @param string $title The title.
|
||||
*
|
||||
* @return array Contains the modified title and alias.
|
||||
*
|
||||
*/
|
||||
* Method to change the title
|
||||
*
|
||||
* @param string $title The title.
|
||||
*
|
||||
* @return array Contains the modified title and alias.
|
||||
*
|
||||
*/
|
||||
protected function _generateNewTitle($title)
|
||||
{
|
||||
|
||||
|
@ -104,11 +104,9 @@ class ComponentbuilderModelCustom_admin_views extends JModelList
|
||||
// set values to display correctly.
|
||||
if (ComponentbuilderHelper::checkArray($items))
|
||||
{
|
||||
// get user object.
|
||||
$user = JFactory::getUser();
|
||||
foreach ($items as $nr => &$item)
|
||||
{
|
||||
$access = ($user->authorise('custom_admin_view.access', 'com_componentbuilder.custom_admin_view.' . (int) $item->id) && $user->authorise('custom_admin_view.access', 'com_componentbuilder'));
|
||||
$access = (JFactory::getUser()->authorise('custom_admin_view.access', 'com_componentbuilder.custom_admin_view.' . (int) $item->id) && JFactory::getUser()->authorise('custom_admin_view.access', 'com_componentbuilder'));
|
||||
if (!$access)
|
||||
{
|
||||
unset($items[$nr]);
|
||||
@ -198,10 +196,10 @@ class ComponentbuilderModelCustom_admin_views extends JModelList
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to get list export data.
|
||||
*
|
||||
* @return mixed An array of data items on success, false on failure.
|
||||
*/
|
||||
* Method to get list export data.
|
||||
*
|
||||
* @return mixed An array of data items on success, false on failure.
|
||||
*/
|
||||
public function getExportData($pks)
|
||||
{
|
||||
// setup the query
|
||||
@ -241,11 +239,9 @@ class ComponentbuilderModelCustom_admin_views extends JModelList
|
||||
// set values to display correctly.
|
||||
if (ComponentbuilderHelper::checkArray($items))
|
||||
{
|
||||
// get user object.
|
||||
$user = JFactory::getUser();
|
||||
foreach ($items as $nr => &$item)
|
||||
{
|
||||
$access = ($user->authorise('custom_admin_view.access', 'com_componentbuilder.custom_admin_view.' . (int) $item->id) && $user->authorise('custom_admin_view.access', 'com_componentbuilder'));
|
||||
$access = (JFactory::getUser()->authorise('custom_admin_view.access', 'com_componentbuilder.custom_admin_view.' . (int) $item->id) && JFactory::getUser()->authorise('custom_admin_view.access', 'com_componentbuilder'));
|
||||
if (!$access)
|
||||
{
|
||||
unset($items[$nr]);
|
||||
@ -345,11 +341,11 @@ class ComponentbuilderModelCustom_admin_views extends JModelList
|
||||
}
|
||||
|
||||
/**
|
||||
* Build an SQL query to checkin all items left checked out longer then a set time.
|
||||
*
|
||||
* @return a bool
|
||||
*
|
||||
*/
|
||||
* Build an SQL query to checkin all items left checked out longer then a set time.
|
||||
*
|
||||
* @return a bool
|
||||
*
|
||||
*/
|
||||
protected function checkInNow()
|
||||
{
|
||||
// Get set check in time
|
||||
|
@ -234,7 +234,7 @@ class ComponentbuilderModelCustom_code extends JModelAdmin
|
||||
protected function canEditState($record)
|
||||
{
|
||||
$user = JFactory::getUser();
|
||||
$recordId = (!empty($record->id)) ? $record->id : 0;
|
||||
$recordId = (!empty($record->id)) ? $record->id : 0;
|
||||
|
||||
if ($recordId)
|
||||
{
|
||||
@ -345,18 +345,18 @@ class ComponentbuilderModelCustom_code extends JModelAdmin
|
||||
}
|
||||
|
||||
/**
|
||||
* 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
|
||||
*/
|
||||
* 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
|
||||
@ -536,7 +536,7 @@ class ComponentbuilderModelCustom_code extends JModelAdmin
|
||||
*
|
||||
* @return mixed An array of new IDs on success, boolean false on failure.
|
||||
*
|
||||
* @since 12.2
|
||||
* @since 12.2
|
||||
*/
|
||||
protected function batchCopy($values, $pks, $contexts)
|
||||
{
|
||||
@ -634,7 +634,7 @@ class ComponentbuilderModelCustom_code extends JModelAdmin
|
||||
$this->table->id = 0;
|
||||
|
||||
// TODO: Deal with ordering?
|
||||
// $this->table->ordering = 1;
|
||||
// $this->table->ordering = 1;
|
||||
|
||||
// Check the row.
|
||||
if (!$this->table->check())
|
||||
@ -679,7 +679,7 @@ class ComponentbuilderModelCustom_code extends JModelAdmin
|
||||
*
|
||||
* @return boolean True if successful, false otherwise and internal error is set.
|
||||
*
|
||||
* @since 12.2
|
||||
* @since 12.2
|
||||
*/
|
||||
protected function batchMove($values, $pks, $contexts)
|
||||
{
|
||||
@ -862,13 +862,13 @@ class ComponentbuilderModelCustom_code extends JModelAdmin
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to change the title
|
||||
*
|
||||
* @param string $title The title.
|
||||
*
|
||||
* @return array Contains the modified title and alias.
|
||||
*
|
||||
*/
|
||||
* Method to change the title
|
||||
*
|
||||
* @param string $title The title.
|
||||
*
|
||||
* @return array Contains the modified title and alias.
|
||||
*
|
||||
*/
|
||||
protected function _generateNewTitle($title)
|
||||
{
|
||||
|
||||
|
@ -108,11 +108,9 @@ class ComponentbuilderModelCustom_codes extends JModelList
|
||||
// set values to display correctly.
|
||||
if (ComponentbuilderHelper::checkArray($items))
|
||||
{
|
||||
// get user object.
|
||||
$user = JFactory::getUser();
|
||||
foreach ($items as $nr => &$item)
|
||||
{
|
||||
$access = ($user->authorise('custom_code.access', 'com_componentbuilder.custom_code.' . (int) $item->id) && $user->authorise('custom_code.access', 'com_componentbuilder'));
|
||||
$access = (JFactory::getUser()->authorise('custom_code.access', 'com_componentbuilder.custom_code.' . (int) $item->id) && JFactory::getUser()->authorise('custom_code.access', 'com_componentbuilder'));
|
||||
if (!$access)
|
||||
{
|
||||
unset($items[$nr]);
|
||||
@ -159,10 +157,10 @@ class ComponentbuilderModelCustom_codes extends JModelList
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to convert selection values to translatable string.
|
||||
*
|
||||
* @return translatable string
|
||||
*/
|
||||
* Method to convert selection values to translatable string.
|
||||
*
|
||||
* @return translatable string
|
||||
*/
|
||||
public function selectionTranslation($value,$name)
|
||||
{
|
||||
// Array of target language strings
|
||||
@ -303,10 +301,10 @@ class ComponentbuilderModelCustom_codes extends JModelList
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to get list export data.
|
||||
*
|
||||
* @return mixed An array of data items on success, false on failure.
|
||||
*/
|
||||
* Method to get list export data.
|
||||
*
|
||||
* @return mixed An array of data items on success, false on failure.
|
||||
*/
|
||||
public function getExportData($pks)
|
||||
{
|
||||
// setup the query
|
||||
@ -346,11 +344,9 @@ class ComponentbuilderModelCustom_codes extends JModelList
|
||||
// set values to display correctly.
|
||||
if (ComponentbuilderHelper::checkArray($items))
|
||||
{
|
||||
// get user object.
|
||||
$user = JFactory::getUser();
|
||||
foreach ($items as $nr => &$item)
|
||||
{
|
||||
$access = ($user->authorise('custom_code.access', 'com_componentbuilder.custom_code.' . (int) $item->id) && $user->authorise('custom_code.access', 'com_componentbuilder'));
|
||||
$access = (JFactory::getUser()->authorise('custom_code.access', 'com_componentbuilder.custom_code.' . (int) $item->id) && JFactory::getUser()->authorise('custom_code.access', 'com_componentbuilder'));
|
||||
if (!$access)
|
||||
{
|
||||
unset($items[$nr]);
|
||||
@ -446,11 +442,11 @@ class ComponentbuilderModelCustom_codes extends JModelList
|
||||
}
|
||||
|
||||
/**
|
||||
* Build an SQL query to checkin all items left checked out longer then a set time.
|
||||
*
|
||||
* @return a bool
|
||||
*
|
||||
*/
|
||||
* Build an SQL query to checkin all items left checked out longer then a set time.
|
||||
*
|
||||
* @return a bool
|
||||
*
|
||||
*/
|
||||
protected function checkInNow()
|
||||
{
|
||||
// Get set check in time
|
||||
|
@ -384,7 +384,7 @@ class ComponentbuilderModelDynamic_get extends JModelAdmin
|
||||
protected function canEditState($record)
|
||||
{
|
||||
$user = JFactory::getUser();
|
||||
$recordId = (!empty($record->id)) ? $record->id : 0;
|
||||
$recordId = (!empty($record->id)) ? $record->id : 0;
|
||||
|
||||
if ($recordId)
|
||||
{
|
||||
@ -495,18 +495,18 @@ class ComponentbuilderModelDynamic_get extends JModelAdmin
|
||||
}
|
||||
|
||||
/**
|
||||
* 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
|
||||
*/
|
||||
* 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
|
||||
@ -686,7 +686,7 @@ class ComponentbuilderModelDynamic_get extends JModelAdmin
|
||||
*
|
||||
* @return mixed An array of new IDs on success, boolean false on failure.
|
||||
*
|
||||
* @since 12.2
|
||||
* @since 12.2
|
||||
*/
|
||||
protected function batchCopy($values, $pks, $contexts)
|
||||
{
|
||||
@ -784,7 +784,7 @@ class ComponentbuilderModelDynamic_get extends JModelAdmin
|
||||
$this->table->id = 0;
|
||||
|
||||
// TODO: Deal with ordering?
|
||||
// $this->table->ordering = 1;
|
||||
// $this->table->ordering = 1;
|
||||
|
||||
// Check the row.
|
||||
if (!$this->table->check())
|
||||
@ -829,7 +829,7 @@ class ComponentbuilderModelDynamic_get extends JModelAdmin
|
||||
*
|
||||
* @return boolean True if successful, false otherwise and internal error is set.
|
||||
*
|
||||
* @since 12.2
|
||||
* @since 12.2
|
||||
*/
|
||||
protected function batchMove($values, $pks, $contexts)
|
||||
{
|
||||
@ -1132,13 +1132,13 @@ class ComponentbuilderModelDynamic_get extends JModelAdmin
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to change the title
|
||||
*
|
||||
* @param string $title The title.
|
||||
*
|
||||
* @return array Contains the modified title and alias.
|
||||
*
|
||||
*/
|
||||
* Method to change the title
|
||||
*
|
||||
* @param string $title The title.
|
||||
*
|
||||
* @return array Contains the modified title and alias.
|
||||
*
|
||||
*/
|
||||
protected function _generateNewTitle($title)
|
||||
{
|
||||
|
||||
|
@ -100,11 +100,9 @@ class ComponentbuilderModelDynamic_gets extends JModelList
|
||||
// set values to display correctly.
|
||||
if (ComponentbuilderHelper::checkArray($items))
|
||||
{
|
||||
// get user object.
|
||||
$user = JFactory::getUser();
|
||||
foreach ($items as $nr => &$item)
|
||||
{
|
||||
$access = ($user->authorise('dynamic_get.access', 'com_componentbuilder.dynamic_get.' . (int) $item->id) && $user->authorise('dynamic_get.access', 'com_componentbuilder'));
|
||||
$access = (JFactory::getUser()->authorise('dynamic_get.access', 'com_componentbuilder.dynamic_get.' . (int) $item->id) && JFactory::getUser()->authorise('dynamic_get.access', 'com_componentbuilder'));
|
||||
if (!$access)
|
||||
{
|
||||
unset($items[$nr]);
|
||||
@ -123,8 +121,6 @@ class ComponentbuilderModelDynamic_gets extends JModelList
|
||||
$item->main_source = $this->selectionTranslation($item->main_source, 'main_source');
|
||||
// convert gettype
|
||||
$item->gettype = $this->selectionTranslation($item->gettype, 'gettype');
|
||||
// convert addcalculation
|
||||
$item->addcalculation = $this->selectionTranslation($item->addcalculation, 'addcalculation');
|
||||
}
|
||||
}
|
||||
|
||||
@ -134,10 +130,10 @@ class ComponentbuilderModelDynamic_gets extends JModelList
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to convert selection values to translatable string.
|
||||
*
|
||||
* @return translatable string
|
||||
*/
|
||||
* Method to convert selection values to translatable string.
|
||||
*
|
||||
* @return translatable string
|
||||
*/
|
||||
public function selectionTranslation($value,$name)
|
||||
{
|
||||
// Array of main_source language strings
|
||||
@ -170,19 +166,6 @@ class ComponentbuilderModelDynamic_gets extends JModelList
|
||||
return $gettypeArray[$value];
|
||||
}
|
||||
}
|
||||
// Array of addcalculation language strings
|
||||
if ($name === 'addcalculation')
|
||||
{
|
||||
$addcalculationArray = array(
|
||||
1 => 'COM_COMPONENTBUILDER_DYNAMIC_GET_YES',
|
||||
0 => 'COM_COMPONENTBUILDER_DYNAMIC_GET_NO'
|
||||
);
|
||||
// Now check if value is found in this array
|
||||
if (isset($addcalculationArray[$value]) && ComponentbuilderHelper::checkString($addcalculationArray[$value]))
|
||||
{
|
||||
return $addcalculationArray[$value];
|
||||
}
|
||||
}
|
||||
return $value;
|
||||
}
|
||||
|
||||
@ -205,10 +188,6 @@ class ComponentbuilderModelDynamic_gets extends JModelList
|
||||
// From the componentbuilder_item table
|
||||
$query->from($db->quoteName('#__componentbuilder_dynamic_get', 'a'));
|
||||
|
||||
// From the componentbuilder_admin_view table.
|
||||
$query->select($db->quoteName('h.system_name','view_table_main_system_name'));
|
||||
$query->join('LEFT', $db->quoteName('#__componentbuilder_admin_view', 'h') . ' ON (' . $db->quoteName('a.view_table_main') . ' = ' . $db->quoteName('h.id') . ')');
|
||||
|
||||
// Filter by published state
|
||||
$published = $this->getState('filter.published');
|
||||
if (is_numeric($published))
|
||||
@ -272,10 +251,10 @@ class ComponentbuilderModelDynamic_gets extends JModelList
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to get list export data.
|
||||
*
|
||||
* @return mixed An array of data items on success, false on failure.
|
||||
*/
|
||||
* Method to get list export data.
|
||||
*
|
||||
* @return mixed An array of data items on success, false on failure.
|
||||
*/
|
||||
public function getExportData($pks)
|
||||
{
|
||||
// setup the query
|
||||
@ -315,11 +294,9 @@ class ComponentbuilderModelDynamic_gets extends JModelList
|
||||
// set values to display correctly.
|
||||
if (ComponentbuilderHelper::checkArray($items))
|
||||
{
|
||||
// get user object.
|
||||
$user = JFactory::getUser();
|
||||
foreach ($items as $nr => &$item)
|
||||
{
|
||||
$access = ($user->authorise('dynamic_get.access', 'com_componentbuilder.dynamic_get.' . (int) $item->id) && $user->authorise('dynamic_get.access', 'com_componentbuilder'));
|
||||
$access = (JFactory::getUser()->authorise('dynamic_get.access', 'com_componentbuilder.dynamic_get.' . (int) $item->id) && JFactory::getUser()->authorise('dynamic_get.access', 'com_componentbuilder'));
|
||||
if (!$access)
|
||||
{
|
||||
unset($items[$nr]);
|
||||
@ -410,11 +387,11 @@ class ComponentbuilderModelDynamic_gets extends JModelList
|
||||
}
|
||||
|
||||
/**
|
||||
* Build an SQL query to checkin all items left checked out longer then a set time.
|
||||
*
|
||||
* @return a bool
|
||||
*
|
||||
*/
|
||||
* Build an SQL query to checkin all items left checked out longer then a set time.
|
||||
*
|
||||
* @return a bool
|
||||
*
|
||||
*/
|
||||
protected function checkInNow()
|
||||
{
|
||||
// Get set check in time
|
||||
|
@ -282,7 +282,7 @@ class ComponentbuilderModelField extends JModelAdmin
|
||||
protected function canEditState($record)
|
||||
{
|
||||
$user = JFactory::getUser();
|
||||
$recordId = (!empty($record->id)) ? $record->id : 0;
|
||||
$recordId = (!empty($record->id)) ? $record->id : 0;
|
||||
|
||||
if ($recordId)
|
||||
{
|
||||
@ -393,18 +393,18 @@ class ComponentbuilderModelField extends JModelAdmin
|
||||
}
|
||||
|
||||
/**
|
||||
* 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
|
||||
*/
|
||||
* 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
|
||||
@ -584,7 +584,7 @@ class ComponentbuilderModelField extends JModelAdmin
|
||||
*
|
||||
* @return mixed An array of new IDs on success, boolean false on failure.
|
||||
*
|
||||
* @since 12.2
|
||||
* @since 12.2
|
||||
*/
|
||||
protected function batchCopy($values, $pks, $contexts)
|
||||
{
|
||||
@ -691,7 +691,7 @@ class ComponentbuilderModelField extends JModelAdmin
|
||||
$this->table->id = 0;
|
||||
|
||||
// TODO: Deal with ordering?
|
||||
// $this->table->ordering = 1;
|
||||
// $this->table->ordering = 1;
|
||||
|
||||
// Check the row.
|
||||
if (!$this->table->check())
|
||||
@ -736,7 +736,7 @@ class ComponentbuilderModelField extends JModelAdmin
|
||||
*
|
||||
* @return boolean True if successful, false otherwise and internal error is set.
|
||||
*
|
||||
* @since 12.2
|
||||
* @since 12.2
|
||||
*/
|
||||
protected function batchMove($values, $pks, $contexts)
|
||||
{
|
||||
@ -1024,13 +1024,13 @@ class ComponentbuilderModelField extends JModelAdmin
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to change the title
|
||||
*
|
||||
* @param string $title The title.
|
||||
*
|
||||
* @return array Contains the modified title and alias.
|
||||
*
|
||||
*/
|
||||
* Method to change the title
|
||||
*
|
||||
* @param string $title The title.
|
||||
*
|
||||
* @return array Contains the modified title and alias.
|
||||
*
|
||||
*/
|
||||
protected function _generateNewTitle($title)
|
||||
{
|
||||
|
||||
|
@ -124,11 +124,9 @@ class ComponentbuilderModelFields extends JModelList
|
||||
// set values to display correctly.
|
||||
if (ComponentbuilderHelper::checkArray($items))
|
||||
{
|
||||
// get user object.
|
||||
$user = JFactory::getUser();
|
||||
foreach ($items as $nr => &$item)
|
||||
{
|
||||
$access = ($user->authorise('field.access', 'com_componentbuilder.field.' . (int) $item->id) && $user->authorise('field.access', 'com_componentbuilder'));
|
||||
$access = (JFactory::getUser()->authorise('field.access', 'com_componentbuilder.field.' . (int) $item->id) && JFactory::getUser()->authorise('field.access', 'com_componentbuilder'));
|
||||
if (!$access)
|
||||
{
|
||||
unset($items[$nr]);
|
||||
@ -160,10 +158,10 @@ class ComponentbuilderModelFields extends JModelList
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to convert selection values to translatable string.
|
||||
*
|
||||
* @return translatable string
|
||||
*/
|
||||
* Method to convert selection values to translatable string.
|
||||
*
|
||||
* @return translatable string
|
||||
*/
|
||||
public function selectionTranslation($value,$name)
|
||||
{
|
||||
// Array of datatype language strings
|
||||
@ -364,10 +362,10 @@ class ComponentbuilderModelFields extends JModelList
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to get list export data.
|
||||
*
|
||||
* @return mixed An array of data items on success, false on failure.
|
||||
*/
|
||||
* Method to get list export data.
|
||||
*
|
||||
* @return mixed An array of data items on success, false on failure.
|
||||
*/
|
||||
public function getExportData($pks)
|
||||
{
|
||||
// setup the query
|
||||
@ -407,11 +405,9 @@ class ComponentbuilderModelFields extends JModelList
|
||||
// set values to display correctly.
|
||||
if (ComponentbuilderHelper::checkArray($items))
|
||||
{
|
||||
// get user object.
|
||||
$user = JFactory::getUser();
|
||||
foreach ($items as $nr => &$item)
|
||||
{
|
||||
$access = ($user->authorise('field.access', 'com_componentbuilder.field.' . (int) $item->id) && $user->authorise('field.access', 'com_componentbuilder'));
|
||||
$access = (JFactory::getUser()->authorise('field.access', 'com_componentbuilder.field.' . (int) $item->id) && JFactory::getUser()->authorise('field.access', 'com_componentbuilder'));
|
||||
if (!$access)
|
||||
{
|
||||
unset($items[$nr]);
|
||||
@ -500,11 +496,11 @@ class ComponentbuilderModelFields extends JModelList
|
||||
}
|
||||
|
||||
/**
|
||||
* Build an SQL query to checkin all items left checked out longer then a set time.
|
||||
*
|
||||
* @return a bool
|
||||
*
|
||||
*/
|
||||
* Build an SQL query to checkin all items left checked out longer then a set time.
|
||||
*
|
||||
* @return a bool
|
||||
*
|
||||
*/
|
||||
protected function checkInNow()
|
||||
{
|
||||
// Get set check in time
|
||||
|
@ -121,10 +121,10 @@ class ComponentbuilderModelFieldtype extends JModelAdmin
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to get list data.
|
||||
*
|
||||
* @return mixed An array of data items on success, false on failure.
|
||||
*/
|
||||
* Method to get list data.
|
||||
*
|
||||
* @return mixed An array of data items on success, false on failure.
|
||||
*/
|
||||
public function getWadfields()
|
||||
{
|
||||
// Get the user object.
|
||||
@ -189,11 +189,9 @@ class ComponentbuilderModelFieldtype extends JModelAdmin
|
||||
// set values to display correctly.
|
||||
if (ComponentbuilderHelper::checkArray($items))
|
||||
{
|
||||
// get user object.
|
||||
$user = JFactory::getUser();
|
||||
foreach ($items as $nr => &$item)
|
||||
{
|
||||
$access = ($user->authorise('field.access', 'com_componentbuilder.field.' . (int) $item->id) && $user->authorise('field.access', 'com_componentbuilder'));
|
||||
$access = (JFactory::getUser()->authorise('field.access', 'com_componentbuilder.field.' . (int) $item->id) && JFactory::getUser()->authorise('field.access', 'com_componentbuilder'));
|
||||
if (!$access)
|
||||
{
|
||||
unset($items[$nr]);
|
||||
@ -225,10 +223,10 @@ class ComponentbuilderModelFieldtype extends JModelAdmin
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to convert selection values to translatable string.
|
||||
*
|
||||
* @return translatable string
|
||||
*/
|
||||
* Method to convert selection values to translatable string.
|
||||
*
|
||||
* @return translatable string
|
||||
*/
|
||||
public function selectionTranslationWadfields($value,$name)
|
||||
{
|
||||
// Array of datatype language strings
|
||||
@ -503,7 +501,7 @@ class ComponentbuilderModelFieldtype extends JModelAdmin
|
||||
protected function canEditState($record)
|
||||
{
|
||||
$user = JFactory::getUser();
|
||||
$recordId = (!empty($record->id)) ? $record->id : 0;
|
||||
$recordId = (!empty($record->id)) ? $record->id : 0;
|
||||
|
||||
if ($recordId)
|
||||
{
|
||||
@ -769,7 +767,7 @@ class ComponentbuilderModelFieldtype extends JModelAdmin
|
||||
*
|
||||
* @return mixed An array of new IDs on success, boolean false on failure.
|
||||
*
|
||||
* @since 12.2
|
||||
* @since 12.2
|
||||
*/
|
||||
protected function batchCopy($values, $pks, $contexts)
|
||||
{
|
||||
@ -876,7 +874,7 @@ class ComponentbuilderModelFieldtype extends JModelAdmin
|
||||
$this->table->id = 0;
|
||||
|
||||
// TODO: Deal with ordering?
|
||||
// $this->table->ordering = 1;
|
||||
// $this->table->ordering = 1;
|
||||
|
||||
// Check the row.
|
||||
if (!$this->table->check())
|
||||
@ -921,7 +919,7 @@ class ComponentbuilderModelFieldtype extends JModelAdmin
|
||||
*
|
||||
* @return boolean True if successful, false otherwise and internal error is set.
|
||||
*
|
||||
* @since 12.2
|
||||
* @since 12.2
|
||||
*/
|
||||
protected function batchMove($values, $pks, $contexts)
|
||||
{
|
||||
@ -1127,13 +1125,13 @@ class ComponentbuilderModelFieldtype extends JModelAdmin
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to change the title
|
||||
*
|
||||
* @param string $title The title.
|
||||
*
|
||||
* @return array Contains the modified title and alias.
|
||||
*
|
||||
*/
|
||||
* Method to change the title
|
||||
*
|
||||
* @param string $title The title.
|
||||
*
|
||||
* @return array Contains the modified title and alias.
|
||||
*
|
||||
*/
|
||||
protected function _generateNewTitle($title)
|
||||
{
|
||||
|
||||
|
@ -108,11 +108,9 @@ class ComponentbuilderModelFieldtypes extends JModelList
|
||||
// set values to display correctly.
|
||||
if (ComponentbuilderHelper::checkArray($items))
|
||||
{
|
||||
// get user object.
|
||||
$user = JFactory::getUser();
|
||||
foreach ($items as $nr => &$item)
|
||||
{
|
||||
$access = ($user->authorise('fieldtype.access', 'com_componentbuilder.fieldtype.' . (int) $item->id) && $user->authorise('fieldtype.access', 'com_componentbuilder'));
|
||||
$access = (JFactory::getUser()->authorise('fieldtype.access', 'com_componentbuilder.fieldtype.' . (int) $item->id) && JFactory::getUser()->authorise('fieldtype.access', 'com_componentbuilder'));
|
||||
if (!$access)
|
||||
{
|
||||
unset($items[$nr]);
|
||||
@ -222,10 +220,10 @@ class ComponentbuilderModelFieldtypes extends JModelList
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to get list export data.
|
||||
*
|
||||
* @return mixed An array of data items on success, false on failure.
|
||||
*/
|
||||
* Method to get list export data.
|
||||
*
|
||||
* @return mixed An array of data items on success, false on failure.
|
||||
*/
|
||||
public function getExportData($pks)
|
||||
{
|
||||
// setup the query
|
||||
@ -265,11 +263,9 @@ class ComponentbuilderModelFieldtypes extends JModelList
|
||||
// set values to display correctly.
|
||||
if (ComponentbuilderHelper::checkArray($items))
|
||||
{
|
||||
// get user object.
|
||||
$user = JFactory::getUser();
|
||||
foreach ($items as $nr => &$item)
|
||||
{
|
||||
$access = ($user->authorise('fieldtype.access', 'com_componentbuilder.fieldtype.' . (int) $item->id) && $user->authorise('fieldtype.access', 'com_componentbuilder'));
|
||||
$access = (JFactory::getUser()->authorise('fieldtype.access', 'com_componentbuilder.fieldtype.' . (int) $item->id) && JFactory::getUser()->authorise('fieldtype.access', 'com_componentbuilder'));
|
||||
if (!$access)
|
||||
{
|
||||
unset($items[$nr]);
|
||||
@ -346,11 +342,11 @@ class ComponentbuilderModelFieldtypes extends JModelList
|
||||
}
|
||||
|
||||
/**
|
||||
* Build an SQL query to checkin all items left checked out longer then a set time.
|
||||
*
|
||||
* @return a bool
|
||||
*
|
||||
*/
|
||||
* Build an SQL query to checkin all items left checked out longer then a set time.
|
||||
*
|
||||
* @return a bool
|
||||
*
|
||||
*/
|
||||
protected function checkInNow()
|
||||
{
|
||||
// Get set check in time
|
||||
|
@ -144,7 +144,9 @@
|
||||
onchange="getCodeGlueOptions(this)">
|
||||
<!-- Option Set. -->
|
||||
<option value="1">
|
||||
COM_COMPONENTBUILDER_ADMIN_FIELDS_RELATIONS_MODEL</option>
|
||||
COM_COMPONENTBUILDER_ADMIN_FIELDS_RELATIONS_MODEL_BEFORE_MODELLING</option>
|
||||
<option value="3">
|
||||
COM_COMPONENTBUILDER_ADMIN_FIELDS_RELATIONS_MODEL_AFTER_MODELLING</option>
|
||||
<option value="2">
|
||||
COM_COMPONENTBUILDER_ADMIN_FIELDS_RELATIONS_VIEW</option>
|
||||
</field>
|
||||
|
@ -123,11 +123,11 @@ class ComponentbuilderModelGet_snippets extends JModelList
|
||||
|
||||
|
||||
/**
|
||||
* Get the uikit needed components
|
||||
*
|
||||
* @return mixed An array of objects on success.
|
||||
*
|
||||
*/
|
||||
* Get the uikit needed components
|
||||
*
|
||||
* @return mixed An array of objects on success.
|
||||
*
|
||||
*/
|
||||
public function getUikitComp()
|
||||
{
|
||||
if (isset($this->uikitComp) && ComponentbuilderHelper::checkArray($this->uikitComp))
|
||||
|
@ -232,7 +232,7 @@ class ComponentbuilderModelHelp_document extends JModelAdmin
|
||||
protected function canEditState($record)
|
||||
{
|
||||
$user = JFactory::getUser();
|
||||
$recordId = (!empty($record->id)) ? $record->id : 0;
|
||||
$recordId = (!empty($record->id)) ? $record->id : 0;
|
||||
|
||||
if ($recordId)
|
||||
{
|
||||
@ -343,18 +343,18 @@ class ComponentbuilderModelHelp_document extends JModelAdmin
|
||||
}
|
||||
|
||||
/**
|
||||
* 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
|
||||
*/
|
||||
* 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
|
||||
@ -534,7 +534,7 @@ class ComponentbuilderModelHelp_document extends JModelAdmin
|
||||
*
|
||||
* @return mixed An array of new IDs on success, boolean false on failure.
|
||||
*
|
||||
* @since 12.2
|
||||
* @since 12.2
|
||||
*/
|
||||
protected function batchCopy($values, $pks, $contexts)
|
||||
{
|
||||
@ -627,7 +627,7 @@ class ComponentbuilderModelHelp_document extends JModelAdmin
|
||||
$this->table->id = 0;
|
||||
|
||||
// TODO: Deal with ordering?
|
||||
// $this->table->ordering = 1;
|
||||
// $this->table->ordering = 1;
|
||||
|
||||
// Check the row.
|
||||
if (!$this->table->check())
|
||||
@ -672,7 +672,7 @@ class ComponentbuilderModelHelp_document extends JModelAdmin
|
||||
*
|
||||
* @return boolean True if successful, false otherwise and internal error is set.
|
||||
*
|
||||
* @since 12.2
|
||||
* @since 12.2
|
||||
*/
|
||||
protected function batchMove($values, $pks, $contexts)
|
||||
{
|
||||
@ -908,14 +908,14 @@ class ComponentbuilderModelHelp_document extends JModelAdmin
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to change the title/s & alias.
|
||||
*
|
||||
* @param string $alias The alias.
|
||||
* @param string/array $title The title.
|
||||
*
|
||||
* @return array/string Contains the modified title/s and/or alias.
|
||||
*
|
||||
*/
|
||||
* Method to change the title/s & alias.
|
||||
*
|
||||
* @param string $alias The alias.
|
||||
* @param string/array $title The title.
|
||||
*
|
||||
* @return array/string Contains the modified title/s and/or alias.
|
||||
*
|
||||
*/
|
||||
protected function _generateNewTitle($alias, $title = null)
|
||||
{
|
||||
|
||||
|
@ -108,11 +108,9 @@ class ComponentbuilderModelHelp_documents extends JModelList
|
||||
// set values to display correctly.
|
||||
if (ComponentbuilderHelper::checkArray($items))
|
||||
{
|
||||
// get user object.
|
||||
$user = JFactory::getUser();
|
||||
foreach ($items as $nr => &$item)
|
||||
{
|
||||
$access = ($user->authorise('help_document.access', 'com_componentbuilder.help_document.' . (int) $item->id) && $user->authorise('help_document.access', 'com_componentbuilder'));
|
||||
$access = (JFactory::getUser()->authorise('help_document.access', 'com_componentbuilder.help_document.' . (int) $item->id) && JFactory::getUser()->authorise('help_document.access', 'com_componentbuilder'));
|
||||
if (!$access)
|
||||
{
|
||||
unset($items[$nr]);
|
||||
@ -160,10 +158,10 @@ class ComponentbuilderModelHelp_documents extends JModelList
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to convert selection values to translatable string.
|
||||
*
|
||||
* @return translatable string
|
||||
*/
|
||||
* Method to convert selection values to translatable string.
|
||||
*
|
||||
* @return translatable string
|
||||
*/
|
||||
public function selectionTranslation($value,$name)
|
||||
{
|
||||
// Array of type language strings
|
||||
@ -289,10 +287,10 @@ class ComponentbuilderModelHelp_documents extends JModelList
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to get list export data.
|
||||
*
|
||||
* @return mixed An array of data items on success, false on failure.
|
||||
*/
|
||||
* Method to get list export data.
|
||||
*
|
||||
* @return mixed An array of data items on success, false on failure.
|
||||
*/
|
||||
public function getExportData($pks)
|
||||
{
|
||||
// setup the query
|
||||
@ -332,11 +330,9 @@ class ComponentbuilderModelHelp_documents extends JModelList
|
||||
// set values to display correctly.
|
||||
if (ComponentbuilderHelper::checkArray($items))
|
||||
{
|
||||
// get user object.
|
||||
$user = JFactory::getUser();
|
||||
foreach ($items as $nr => &$item)
|
||||
{
|
||||
$access = ($user->authorise('help_document.access', 'com_componentbuilder.help_document.' . (int) $item->id) && $user->authorise('help_document.access', 'com_componentbuilder'));
|
||||
$access = (JFactory::getUser()->authorise('help_document.access', 'com_componentbuilder.help_document.' . (int) $item->id) && JFactory::getUser()->authorise('help_document.access', 'com_componentbuilder'));
|
||||
if (!$access)
|
||||
{
|
||||
unset($items[$nr]);
|
||||
@ -413,11 +409,11 @@ class ComponentbuilderModelHelp_documents extends JModelList
|
||||
}
|
||||
|
||||
/**
|
||||
* Build an SQL query to checkin all items left checked out longer then a set time.
|
||||
*
|
||||
* @return a bool
|
||||
*
|
||||
*/
|
||||
* Build an SQL query to checkin all items left checked out longer then a set time.
|
||||
*
|
||||
* @return a bool
|
||||
*
|
||||
*/
|
||||
protected function checkInNow()
|
||||
{
|
||||
// Get set check in time
|
||||
|
@ -698,7 +698,7 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
|
||||
$tables = array(
|
||||
'validation_rule', 'fieldtype', 'field', 'admin_view', 'snippet', 'dynamic_get', 'custom_admin_view', 'site_view',
|
||||
'template', 'layout', 'joomla_component', 'language', 'language_translation', 'custom_code',
|
||||
'admin_fields', 'admin_fields_conditions', 'component_admin_views', 'component_site_views',
|
||||
'admin_fields', 'admin_fields_conditions', 'admin_fields_relations', 'component_admin_views', 'component_site_views',
|
||||
'component_custom_admin_views', 'component_updates', 'component_mysql_tweaks',
|
||||
'component_custom_admin_menus', 'component_config', 'component_dashboard', 'component_files_folders'
|
||||
);
|
||||
@ -2009,12 +2009,14 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
|
||||
break;
|
||||
case 'admin_fields':
|
||||
case 'admin_fields_conditions':
|
||||
case 'admin_fields_relations':
|
||||
// diverged id already updated
|
||||
if (!$diverged)
|
||||
{
|
||||
// update the admin_view ID where needed
|
||||
$item = $this->setNewID($item, 'admin_view', 'admin_view', $type);
|
||||
}
|
||||
$updaterR = array();
|
||||
// set the updater
|
||||
if ('admin_fields' === $type)
|
||||
{
|
||||
@ -2034,7 +2036,7 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
|
||||
unset($item->addconditions);
|
||||
}
|
||||
}
|
||||
else
|
||||
elseif ('admin_fields_conditions' === $type)
|
||||
{
|
||||
// repeatable fields to update
|
||||
$updaterR = array(
|
||||
@ -2047,10 +2049,20 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
|
||||
'addconditions' => array('target_field' => 'field', 'match_field' => 'field')
|
||||
);
|
||||
}
|
||||
elseif ('admin_fields_relations' === $type)
|
||||
{
|
||||
// subform fields to target
|
||||
$updaterT = array(
|
||||
// subformfield => field => type_value
|
||||
'addrelations' => array('listfield' => 'field', 'joinfields' => 'field')
|
||||
);
|
||||
}
|
||||
|
||||
// update the repeatable fields
|
||||
$item = ComponentbuilderHelper::convertRepeatableFields($item, $updaterR);
|
||||
|
||||
if (isset($updaterR) && ComponentbuilderHelper::checkArray($updaterR))
|
||||
{
|
||||
$item = ComponentbuilderHelper::convertRepeatableFields($item, $updaterR);
|
||||
}
|
||||
// update the subform ids
|
||||
$this->updateSubformsIDs($item, $type, $updaterT);
|
||||
}
|
||||
@ -2390,6 +2402,7 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
|
||||
{
|
||||
case 'admin_fields':
|
||||
case 'admin_fields_conditions':
|
||||
case 'admin_fields_relations':
|
||||
// get by admin_view (since there should only be one of each name)
|
||||
$getter = array('admin_view');
|
||||
$this->specialValue = array();
|
||||
|
@ -412,7 +412,7 @@ class ComponentbuilderModelJoomla_component extends JModelAdmin
|
||||
protected function canEditState($record)
|
||||
{
|
||||
$user = JFactory::getUser();
|
||||
$recordId = (!empty($record->id)) ? $record->id : 0;
|
||||
$recordId = (!empty($record->id)) ? $record->id : 0;
|
||||
|
||||
if ($recordId)
|
||||
{
|
||||
@ -523,18 +523,18 @@ class ComponentbuilderModelJoomla_component extends JModelAdmin
|
||||
}
|
||||
|
||||
/**
|
||||
* 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
|
||||
*/
|
||||
* 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
|
||||
@ -770,7 +770,7 @@ class ComponentbuilderModelJoomla_component extends JModelAdmin
|
||||
*
|
||||
* @return mixed An array of new IDs on success, boolean false on failure.
|
||||
*
|
||||
* @since 12.2
|
||||
* @since 12.2
|
||||
*/
|
||||
protected function batchCopy($values, $pks, $contexts)
|
||||
{
|
||||
@ -868,7 +868,7 @@ class ComponentbuilderModelJoomla_component extends JModelAdmin
|
||||
$this->table->id = 0;
|
||||
|
||||
// TODO: Deal with ordering?
|
||||
// $this->table->ordering = 1;
|
||||
// $this->table->ordering = 1;
|
||||
|
||||
// Check the row.
|
||||
if (!$this->table->check())
|
||||
@ -913,7 +913,7 @@ class ComponentbuilderModelJoomla_component extends JModelAdmin
|
||||
*
|
||||
* @return boolean True if successful, false otherwise and internal error is set.
|
||||
*
|
||||
* @since 12.2
|
||||
* @since 12.2
|
||||
*/
|
||||
protected function batchMove($values, $pks, $contexts)
|
||||
{
|
||||
@ -1231,13 +1231,13 @@ class ComponentbuilderModelJoomla_component extends JModelAdmin
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to change the title
|
||||
*
|
||||
* @param string $title The title.
|
||||
*
|
||||
* @return array Contains the modified title and alias.
|
||||
*
|
||||
*/
|
||||
* Method to change the title
|
||||
*
|
||||
* @param string $title The title.
|
||||
*
|
||||
* @return array Contains the modified title and alias.
|
||||
*
|
||||
*/
|
||||
protected function _generateNewTitle($title)
|
||||
{
|
||||
|
||||
|
@ -307,11 +307,12 @@ class ComponentbuilderModelJoomla_components extends JModelList
|
||||
{
|
||||
$this->setData($table, $pks, $field);
|
||||
}
|
||||
// add fields and conditions
|
||||
// add fields conditions and relations
|
||||
if (isset($this->smartIDs['admin_view']) && ComponentbuilderHelper::checkArray($this->smartIDs['admin_view']))
|
||||
{
|
||||
$this->setData('admin_fields', array_values($this->smartIDs['admin_view']), 'admin_view');
|
||||
$this->setData('admin_fields_conditions', array_values($this->smartIDs['admin_view']), 'admin_view');
|
||||
$this->setData('admin_fields_relations', array_values($this->smartIDs['admin_view']), 'admin_view');
|
||||
}
|
||||
// add validation rules
|
||||
if (isset($this->smartIDs['validation_rule']) && ComponentbuilderHelper::checkArray($this->smartIDs['validation_rule']))
|
||||
@ -715,10 +716,17 @@ class ComponentbuilderModelJoomla_components extends JModelList
|
||||
// actions to take if table is admin_fields_conditions
|
||||
if ('admin_fields_conditions' === $table)
|
||||
{
|
||||
// add fields
|
||||
// add fields (all should already be added)
|
||||
$this->setData('field', $this->getValues($item->addconditions, 'subform', 'target_field'), 'id');
|
||||
$this->setData('field', $this->getValues($item->addconditions, 'subform', 'match_field'), 'id');
|
||||
}
|
||||
// actions to take if table is admin_fields_relations
|
||||
if ('admin_fields_relations' === $table)
|
||||
{
|
||||
// add fields (all should already be added)
|
||||
$this->setData('field', $this->getValues($item->addrelations, 'subform', 'listfield'), 'id');
|
||||
$this->setData('field', $this->getValues($item->addrelations, 'subform', 'joinfields'), 'id');
|
||||
}
|
||||
// actions to take if table is field
|
||||
if ('field' === $table)
|
||||
{
|
||||
@ -847,7 +855,7 @@ class ComponentbuilderModelJoomla_components extends JModelList
|
||||
$tables = array(
|
||||
'fieldtype', 'field', 'admin_view', 'snippet', 'dynamic_get', 'custom_admin_view', 'site_view',
|
||||
'template', 'layout', 'joomla_component', 'language', 'language_translation', 'custom_code',
|
||||
'admin_fields', 'admin_fields_conditions', 'component_admin_views', 'component_site_views',
|
||||
'admin_fields', 'admin_fields_conditions', 'admin_fields_relations', 'component_admin_views', 'component_site_views',
|
||||
'component_custom_admin_views', 'component_updates', 'component_mysql_tweaks',
|
||||
'component_custom_admin_menus', 'component_config', 'component_dashboard', 'component_files_folders'
|
||||
);
|
||||
@ -1604,6 +1612,13 @@ class ComponentbuilderModelJoomla_components extends JModelList
|
||||
$targets['admin_view']['not_base64'] = array();
|
||||
$targets['admin_view']['name'] = 'system_name';
|
||||
|
||||
// #__componentbuilder_admin_fields_relations
|
||||
$targets['library'] = array();
|
||||
$targets['library']['search'] = array('id', 'admin_view', 'addrelations');
|
||||
$targets['library']['view'] = 'admin_fields_relations';
|
||||
$targets['library']['not_base64'] = array('addrelations' => 'json');
|
||||
$targets['library']['name'] = 'admin_view->id:admin_view.system_name';
|
||||
|
||||
// #__componentbuilder_custom_admin_view
|
||||
$targets['custom_admin_view'] = array();
|
||||
$targets['custom_admin_view']['search'] = array('id', 'system_name', 'default','php_view','php_jview','php_jview_display','php_document',
|
||||
@ -1651,7 +1666,6 @@ class ComponentbuilderModelJoomla_components extends JModelList
|
||||
|
||||
// #__componentbuilder_library
|
||||
$targets['library'] = array();
|
||||
$targets['library']['view'] = 'libraries';
|
||||
$targets['library']['search'] = array('id', 'name', 'php_setdocument');
|
||||
$targets['library']['view'] = 'libraries';
|
||||
$targets['library']['not_base64'] = array();
|
||||
@ -1748,11 +1762,9 @@ class ComponentbuilderModelJoomla_components extends JModelList
|
||||
// set values to display correctly.
|
||||
if (ComponentbuilderHelper::checkArray($items))
|
||||
{
|
||||
// get user object.
|
||||
$user = JFactory::getUser();
|
||||
foreach ($items as $nr => &$item)
|
||||
{
|
||||
$access = ($user->authorise('joomla_component.access', 'com_componentbuilder.joomla_component.' . (int) $item->id) && $user->authorise('joomla_component.access', 'com_componentbuilder'));
|
||||
$access = (JFactory::getUser()->authorise('joomla_component.access', 'com_componentbuilder.joomla_component.' . (int) $item->id) && JFactory::getUser()->authorise('joomla_component.access', 'com_componentbuilder'));
|
||||
if (!$access)
|
||||
{
|
||||
unset($items[$nr]);
|
||||
@ -1848,10 +1860,10 @@ class ComponentbuilderModelJoomla_components extends JModelList
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to get list export data.
|
||||
*
|
||||
* @return mixed An array of data items on success, false on failure.
|
||||
*/
|
||||
* Method to get list export data.
|
||||
*
|
||||
* @return mixed An array of data items on success, false on failure.
|
||||
*/
|
||||
public function getExportData($pks)
|
||||
{
|
||||
// setup the query
|
||||
@ -1896,11 +1908,9 @@ class ComponentbuilderModelJoomla_components extends JModelList
|
||||
// set values to display correctly.
|
||||
if (ComponentbuilderHelper::checkArray($items))
|
||||
{
|
||||
// get user object.
|
||||
$user = JFactory::getUser();
|
||||
foreach ($items as $nr => &$item)
|
||||
{
|
||||
$access = ($user->authorise('joomla_component.access', 'com_componentbuilder.joomla_component.' . (int) $item->id) && $user->authorise('joomla_component.access', 'com_componentbuilder'));
|
||||
$access = (JFactory::getUser()->authorise('joomla_component.access', 'com_componentbuilder.joomla_component.' . (int) $item->id) && JFactory::getUser()->authorise('joomla_component.access', 'com_componentbuilder'));
|
||||
if (!$access)
|
||||
{
|
||||
unset($items[$nr]);
|
||||
@ -2022,11 +2032,11 @@ class ComponentbuilderModelJoomla_components extends JModelList
|
||||
}
|
||||
|
||||
/**
|
||||
* Build an SQL query to checkin all items left checked out longer then a set time.
|
||||
*
|
||||
* @return a bool
|
||||
*
|
||||
*/
|
||||
* Build an SQL query to checkin all items left checked out longer then a set time.
|
||||
*
|
||||
* @return a bool
|
||||
*
|
||||
*/
|
||||
protected function checkInNow()
|
||||
{
|
||||
// Get set check in time
|
||||
|
@ -226,7 +226,7 @@ class ComponentbuilderModelLanguage extends JModelAdmin
|
||||
protected function canEditState($record)
|
||||
{
|
||||
$user = JFactory::getUser();
|
||||
$recordId = (!empty($record->id)) ? $record->id : 0;
|
||||
$recordId = (!empty($record->id)) ? $record->id : 0;
|
||||
|
||||
if ($recordId)
|
||||
{
|
||||
@ -492,7 +492,7 @@ class ComponentbuilderModelLanguage extends JModelAdmin
|
||||
*
|
||||
* @return mixed An array of new IDs on success, boolean false on failure.
|
||||
*
|
||||
* @since 12.2
|
||||
* @since 12.2
|
||||
*/
|
||||
protected function batchCopy($values, $pks, $contexts)
|
||||
{
|
||||
@ -590,7 +590,7 @@ class ComponentbuilderModelLanguage extends JModelAdmin
|
||||
$this->table->id = 0;
|
||||
|
||||
// TODO: Deal with ordering?
|
||||
// $this->table->ordering = 1;
|
||||
// $this->table->ordering = 1;
|
||||
|
||||
// Check the row.
|
||||
if (!$this->table->check())
|
||||
@ -635,7 +635,7 @@ class ComponentbuilderModelLanguage extends JModelAdmin
|
||||
*
|
||||
* @return boolean True if successful, false otherwise and internal error is set.
|
||||
*
|
||||
* @since 12.2
|
||||
* @since 12.2
|
||||
*/
|
||||
protected function batchMove($values, $pks, $contexts)
|
||||
{
|
||||
@ -812,13 +812,13 @@ class ComponentbuilderModelLanguage extends JModelAdmin
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to change the title
|
||||
*
|
||||
* @param string $title The title.
|
||||
*
|
||||
* @return array Contains the modified title and alias.
|
||||
*
|
||||
*/
|
||||
* Method to change the title
|
||||
*
|
||||
* @param string $title The title.
|
||||
*
|
||||
* @return array Contains the modified title and alias.
|
||||
*
|
||||
*/
|
||||
protected function _generateNewTitle($title)
|
||||
{
|
||||
|
||||
|
@ -266,7 +266,7 @@ class ComponentbuilderModelLanguage_translation extends JModelAdmin
|
||||
protected function canEditState($record)
|
||||
{
|
||||
$user = JFactory::getUser();
|
||||
$recordId = (!empty($record->id)) ? $record->id : 0;
|
||||
$recordId = (!empty($record->id)) ? $record->id : 0;
|
||||
|
||||
if ($recordId)
|
||||
{
|
||||
@ -532,7 +532,7 @@ class ComponentbuilderModelLanguage_translation extends JModelAdmin
|
||||
*
|
||||
* @return mixed An array of new IDs on success, boolean false on failure.
|
||||
*
|
||||
* @since 12.2
|
||||
* @since 12.2
|
||||
*/
|
||||
protected function batchCopy($values, $pks, $contexts)
|
||||
{
|
||||
@ -630,7 +630,7 @@ class ComponentbuilderModelLanguage_translation extends JModelAdmin
|
||||
$this->table->id = 0;
|
||||
|
||||
// TODO: Deal with ordering?
|
||||
// $this->table->ordering = 1;
|
||||
// $this->table->ordering = 1;
|
||||
|
||||
// Check the row.
|
||||
if (!$this->table->check())
|
||||
@ -675,7 +675,7 @@ class ComponentbuilderModelLanguage_translation extends JModelAdmin
|
||||
*
|
||||
* @return boolean True if successful, false otherwise and internal error is set.
|
||||
*
|
||||
* @since 12.2
|
||||
* @since 12.2
|
||||
*/
|
||||
protected function batchMove($values, $pks, $contexts)
|
||||
{
|
||||
@ -871,13 +871,13 @@ class ComponentbuilderModelLanguage_translation extends JModelAdmin
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to change the title
|
||||
*
|
||||
* @param string $title The title.
|
||||
*
|
||||
* @return array Contains the modified title and alias.
|
||||
*
|
||||
*/
|
||||
* Method to change the title
|
||||
*
|
||||
* @param string $title The title.
|
||||
*
|
||||
* @return array Contains the modified title and alias.
|
||||
*
|
||||
*/
|
||||
protected function _generateNewTitle($title)
|
||||
{
|
||||
|
||||
|
@ -92,11 +92,9 @@ class ComponentbuilderModelLanguage_translations extends JModelList
|
||||
// set values to display correctly.
|
||||
if (ComponentbuilderHelper::checkArray($items))
|
||||
{
|
||||
// get user object.
|
||||
$user = JFactory::getUser();
|
||||
foreach ($items as $nr => &$item)
|
||||
{
|
||||
$access = ($user->authorise('language_translation.access', 'com_componentbuilder.language_translation.' . (int) $item->id) && $user->authorise('language_translation.access', 'com_componentbuilder'));
|
||||
$access = (JFactory::getUser()->authorise('language_translation.access', 'com_componentbuilder.language_translation.' . (int) $item->id) && JFactory::getUser()->authorise('language_translation.access', 'com_componentbuilder'));
|
||||
if (!$access)
|
||||
{
|
||||
unset($items[$nr]);
|
||||
@ -271,10 +269,10 @@ class ComponentbuilderModelLanguage_translations extends JModelList
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to get list export data.
|
||||
*
|
||||
* @return mixed An array of data items on success, false on failure.
|
||||
*/
|
||||
* Method to get list export data.
|
||||
*
|
||||
* @return mixed An array of data items on success, false on failure.
|
||||
*/
|
||||
public function getExportData($pks)
|
||||
{
|
||||
// setup the query
|
||||
@ -314,11 +312,9 @@ class ComponentbuilderModelLanguage_translations extends JModelList
|
||||
// set values to display correctly.
|
||||
if (ComponentbuilderHelper::checkArray($items))
|
||||
{
|
||||
// get user object.
|
||||
$user = JFactory::getUser();
|
||||
foreach ($items as $nr => &$item)
|
||||
{
|
||||
$access = ($user->authorise('language_translation.access', 'com_componentbuilder.language_translation.' . (int) $item->id) && $user->authorise('language_translation.access', 'com_componentbuilder'));
|
||||
$access = (JFactory::getUser()->authorise('language_translation.access', 'com_componentbuilder.language_translation.' . (int) $item->id) && JFactory::getUser()->authorise('language_translation.access', 'com_componentbuilder'));
|
||||
if (!$access)
|
||||
{
|
||||
unset($items[$nr]);
|
||||
@ -477,11 +473,11 @@ class ComponentbuilderModelLanguage_translations extends JModelList
|
||||
}
|
||||
|
||||
/**
|
||||
* Build an SQL query to checkin all items left checked out longer then a set time.
|
||||
*
|
||||
* @return a bool
|
||||
*
|
||||
*/
|
||||
* Build an SQL query to checkin all items left checked out longer then a set time.
|
||||
*
|
||||
* @return a bool
|
||||
*
|
||||
*/
|
||||
protected function checkInNow()
|
||||
{
|
||||
// Get set check in time
|
||||
|
@ -219,11 +219,9 @@ class ComponentbuilderModelLanguages extends JModelList
|
||||
// set values to display correctly.
|
||||
if (ComponentbuilderHelper::checkArray($items))
|
||||
{
|
||||
// get user object.
|
||||
$user = JFactory::getUser();
|
||||
foreach ($items as $nr => &$item)
|
||||
{
|
||||
$access = ($user->authorise('language.access', 'com_componentbuilder.language.' . (int) $item->id) && $user->authorise('language.access', 'com_componentbuilder'));
|
||||
$access = (JFactory::getUser()->authorise('language.access', 'com_componentbuilder.language.' . (int) $item->id) && JFactory::getUser()->authorise('language.access', 'com_componentbuilder'));
|
||||
if (!$access)
|
||||
{
|
||||
unset($items[$nr]);
|
||||
@ -309,10 +307,10 @@ class ComponentbuilderModelLanguages extends JModelList
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to get list export data.
|
||||
*
|
||||
* @return mixed An array of data items on success, false on failure.
|
||||
*/
|
||||
* Method to get list export data.
|
||||
*
|
||||
* @return mixed An array of data items on success, false on failure.
|
||||
*/
|
||||
public function getExportData($pks)
|
||||
{
|
||||
// setup the query
|
||||
@ -352,11 +350,9 @@ class ComponentbuilderModelLanguages extends JModelList
|
||||
// set values to display correctly.
|
||||
if (ComponentbuilderHelper::checkArray($items))
|
||||
{
|
||||
// get user object.
|
||||
$user = JFactory::getUser();
|
||||
foreach ($items as $nr => &$item)
|
||||
{
|
||||
$access = ($user->authorise('language.access', 'com_componentbuilder.language.' . (int) $item->id) && $user->authorise('language.access', 'com_componentbuilder'));
|
||||
$access = (JFactory::getUser()->authorise('language.access', 'com_componentbuilder.language.' . (int) $item->id) && JFactory::getUser()->authorise('language.access', 'com_componentbuilder'));
|
||||
if (!$access)
|
||||
{
|
||||
unset($items[$nr]);
|
||||
@ -430,11 +426,11 @@ class ComponentbuilderModelLanguages extends JModelList
|
||||
}
|
||||
|
||||
/**
|
||||
* Build an SQL query to checkin all items left checked out longer then a set time.
|
||||
*
|
||||
* @return a bool
|
||||
*
|
||||
*/
|
||||
* Build an SQL query to checkin all items left checked out longer then a set time.
|
||||
*
|
||||
* @return a bool
|
||||
*
|
||||
*/
|
||||
protected function checkInNow()
|
||||
{
|
||||
// Get set check in time
|
||||
|
@ -272,7 +272,7 @@ class ComponentbuilderModelLayout extends JModelAdmin
|
||||
protected function canEditState($record)
|
||||
{
|
||||
$user = JFactory::getUser();
|
||||
$recordId = (!empty($record->id)) ? $record->id : 0;
|
||||
$recordId = (!empty($record->id)) ? $record->id : 0;
|
||||
|
||||
if ($recordId)
|
||||
{
|
||||
@ -383,18 +383,18 @@ class ComponentbuilderModelLayout extends JModelAdmin
|
||||
}
|
||||
|
||||
/**
|
||||
* 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
|
||||
*/
|
||||
* 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
|
||||
@ -574,7 +574,7 @@ class ComponentbuilderModelLayout extends JModelAdmin
|
||||
*
|
||||
* @return mixed An array of new IDs on success, boolean false on failure.
|
||||
*
|
||||
* @since 12.2
|
||||
* @since 12.2
|
||||
*/
|
||||
protected function batchCopy($values, $pks, $contexts)
|
||||
{
|
||||
@ -667,7 +667,7 @@ class ComponentbuilderModelLayout extends JModelAdmin
|
||||
$this->table->id = 0;
|
||||
|
||||
// TODO: Deal with ordering?
|
||||
// $this->table->ordering = 1;
|
||||
// $this->table->ordering = 1;
|
||||
|
||||
// Check the row.
|
||||
if (!$this->table->check())
|
||||
@ -712,7 +712,7 @@ class ComponentbuilderModelLayout extends JModelAdmin
|
||||
*
|
||||
* @return boolean True if successful, false otherwise and internal error is set.
|
||||
*
|
||||
* @since 12.2
|
||||
* @since 12.2
|
||||
*/
|
||||
protected function batchMove($values, $pks, $contexts)
|
||||
{
|
||||
@ -970,14 +970,14 @@ class ComponentbuilderModelLayout extends JModelAdmin
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to change the title/s & alias.
|
||||
*
|
||||
* @param string $alias The alias.
|
||||
* @param string/array $title The title.
|
||||
*
|
||||
* @return array/string Contains the modified title/s and/or alias.
|
||||
*
|
||||
*/
|
||||
* Method to change the title/s & alias.
|
||||
*
|
||||
* @param string $alias The alias.
|
||||
* @param string/array $title The title.
|
||||
*
|
||||
* @return array/string Contains the modified title/s and/or alias.
|
||||
*
|
||||
*/
|
||||
protected function _generateNewTitle($alias, $title = null)
|
||||
{
|
||||
|
||||
|
@ -104,11 +104,9 @@ class ComponentbuilderModelLayouts extends JModelList
|
||||
// set values to display correctly.
|
||||
if (ComponentbuilderHelper::checkArray($items))
|
||||
{
|
||||
// get user object.
|
||||
$user = JFactory::getUser();
|
||||
foreach ($items as $nr => &$item)
|
||||
{
|
||||
$access = ($user->authorise('layout.access', 'com_componentbuilder.layout.' . (int) $item->id) && $user->authorise('layout.access', 'com_componentbuilder'));
|
||||
$access = (JFactory::getUser()->authorise('layout.access', 'com_componentbuilder.layout.' . (int) $item->id) && JFactory::getUser()->authorise('layout.access', 'com_componentbuilder'));
|
||||
if (!$access)
|
||||
{
|
||||
unset($items[$nr]);
|
||||
@ -203,10 +201,10 @@ class ComponentbuilderModelLayouts extends JModelList
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to get list export data.
|
||||
*
|
||||
* @return mixed An array of data items on success, false on failure.
|
||||
*/
|
||||
* Method to get list export data.
|
||||
*
|
||||
* @return mixed An array of data items on success, false on failure.
|
||||
*/
|
||||
public function getExportData($pks)
|
||||
{
|
||||
// setup the query
|
||||
@ -246,11 +244,9 @@ class ComponentbuilderModelLayouts extends JModelList
|
||||
// set values to display correctly.
|
||||
if (ComponentbuilderHelper::checkArray($items))
|
||||
{
|
||||
// get user object.
|
||||
$user = JFactory::getUser();
|
||||
foreach ($items as $nr => &$item)
|
||||
{
|
||||
$access = ($user->authorise('layout.access', 'com_componentbuilder.layout.' . (int) $item->id) && $user->authorise('layout.access', 'com_componentbuilder'));
|
||||
$access = (JFactory::getUser()->authorise('layout.access', 'com_componentbuilder.layout.' . (int) $item->id) && JFactory::getUser()->authorise('layout.access', 'com_componentbuilder'));
|
||||
if (!$access)
|
||||
{
|
||||
unset($items[$nr]);
|
||||
@ -330,11 +326,11 @@ class ComponentbuilderModelLayouts extends JModelList
|
||||
}
|
||||
|
||||
/**
|
||||
* Build an SQL query to checkin all items left checked out longer then a set time.
|
||||
*
|
||||
* @return a bool
|
||||
*
|
||||
*/
|
||||
* Build an SQL query to checkin all items left checked out longer then a set time.
|
||||
*
|
||||
* @return a bool
|
||||
*
|
||||
*/
|
||||
protected function checkInNow()
|
||||
{
|
||||
// Get set check in time
|
||||
|
@ -104,17 +104,19 @@ class ComponentbuilderModelLibraries extends JModelList
|
||||
// set values to display correctly.
|
||||
if (ComponentbuilderHelper::checkArray($items))
|
||||
{
|
||||
// get user object.
|
||||
$user = JFactory::getUser();
|
||||
foreach ($items as $nr => &$item)
|
||||
{
|
||||
$access = ($user->authorise('library.access', 'com_componentbuilder.library.' . (int) $item->id) && $user->authorise('library.access', 'com_componentbuilder'));
|
||||
$access = (JFactory::getUser()->authorise('library.access', 'com_componentbuilder.library.' . (int) $item->id) && JFactory::getUser()->authorise('library.access', 'com_componentbuilder'));
|
||||
if (!$access)
|
||||
{
|
||||
unset($items[$nr]);
|
||||
continue;
|
||||
}
|
||||
|
||||
// convert how
|
||||
$item->how = $this->selectionTranslation($item->how, 'how');
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -125,10 +127,6 @@ class ComponentbuilderModelLibraries extends JModelList
|
||||
{
|
||||
// convert type
|
||||
$item->type = $this->selectionTranslation($item->type, 'type');
|
||||
|
||||
// convert how
|
||||
$item->how = $this->selectionTranslation($item->how, 'how');
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -138,10 +136,10 @@ class ComponentbuilderModelLibraries extends JModelList
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to convert selection values to translatable string.
|
||||
*
|
||||
* @return translatable string
|
||||
*/
|
||||
* Method to convert selection values to translatable string.
|
||||
*
|
||||
* @return translatable string
|
||||
*/
|
||||
public function selectionTranslation($value,$name)
|
||||
{
|
||||
// Array of type language strings
|
||||
@ -283,11 +281,11 @@ class ComponentbuilderModelLibraries extends JModelList
|
||||
}
|
||||
|
||||
/**
|
||||
* Build an SQL query to checkin all items left checked out longer then a set time.
|
||||
*
|
||||
* @return a bool
|
||||
*
|
||||
*/
|
||||
* Build an SQL query to checkin all items left checked out longer then a set time.
|
||||
*
|
||||
* @return a bool
|
||||
*
|
||||
*/
|
||||
protected function checkInNow()
|
||||
{
|
||||
// Get set check in time
|
||||
|
@ -90,11 +90,9 @@ class ComponentbuilderModelLibraries_config extends JModelList
|
||||
// set values to display correctly.
|
||||
if (ComponentbuilderHelper::checkArray($items))
|
||||
{
|
||||
// get user object.
|
||||
$user = JFactory::getUser();
|
||||
foreach ($items as $nr => &$item)
|
||||
{
|
||||
$access = ($user->authorise('library_config.access', 'com_componentbuilder.library_config.' . (int) $item->id) && $user->authorise('library_config.access', 'com_componentbuilder'));
|
||||
$access = (JFactory::getUser()->authorise('library_config.access', 'com_componentbuilder.library_config.' . (int) $item->id) && JFactory::getUser()->authorise('library_config.access', 'com_componentbuilder'));
|
||||
if (!$access)
|
||||
{
|
||||
unset($items[$nr]);
|
||||
@ -188,11 +186,11 @@ class ComponentbuilderModelLibraries_config extends JModelList
|
||||
}
|
||||
|
||||
/**
|
||||
* Build an SQL query to checkin all items left checked out longer then a set time.
|
||||
*
|
||||
* @return a bool
|
||||
*
|
||||
*/
|
||||
* Build an SQL query to checkin all items left checked out longer then a set time.
|
||||
*
|
||||
* @return a bool
|
||||
*
|
||||
*/
|
||||
protected function checkInNow()
|
||||
{
|
||||
// Get set check in time
|
||||
|
@ -90,11 +90,9 @@ class ComponentbuilderModelLibraries_files_folders_urls extends JModelList
|
||||
// set values to display correctly.
|
||||
if (ComponentbuilderHelper::checkArray($items))
|
||||
{
|
||||
// get user object.
|
||||
$user = JFactory::getUser();
|
||||
foreach ($items as $nr => &$item)
|
||||
{
|
||||
$access = ($user->authorise('library_files_folders_urls.access', 'com_componentbuilder.library_files_folders_urls.' . (int) $item->id) && $user->authorise('library_files_folders_urls.access', 'com_componentbuilder'));
|
||||
$access = (JFactory::getUser()->authorise('library_files_folders_urls.access', 'com_componentbuilder.library_files_folders_urls.' . (int) $item->id) && JFactory::getUser()->authorise('library_files_folders_urls.access', 'com_componentbuilder'));
|
||||
if (!$access)
|
||||
{
|
||||
unset($items[$nr]);
|
||||
@ -188,11 +186,11 @@ class ComponentbuilderModelLibraries_files_folders_urls extends JModelList
|
||||
}
|
||||
|
||||
/**
|
||||
* Build an SQL query to checkin all items left checked out longer then a set time.
|
||||
*
|
||||
* @return a bool
|
||||
*
|
||||
*/
|
||||
* Build an SQL query to checkin all items left checked out longer then a set time.
|
||||
*
|
||||
* @return a bool
|
||||
*
|
||||
*/
|
||||
protected function checkInNow()
|
||||
{
|
||||
// Get set check in time
|
||||
|
@ -274,7 +274,7 @@ class ComponentbuilderModelLibrary extends JModelAdmin
|
||||
protected function canEditState($record)
|
||||
{
|
||||
$user = JFactory::getUser();
|
||||
$recordId = (!empty($record->id)) ? $record->id : 0;
|
||||
$recordId = (!empty($record->id)) ? $record->id : 0;
|
||||
|
||||
if ($recordId)
|
||||
{
|
||||
@ -385,18 +385,18 @@ class ComponentbuilderModelLibrary extends JModelAdmin
|
||||
}
|
||||
|
||||
/**
|
||||
* 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
|
||||
*/
|
||||
* 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
|
||||
@ -638,7 +638,7 @@ class ComponentbuilderModelLibrary extends JModelAdmin
|
||||
*
|
||||
* @return mixed An array of new IDs on success, boolean false on failure.
|
||||
*
|
||||
* @since 12.2
|
||||
* @since 12.2
|
||||
*/
|
||||
protected function batchCopy($values, $pks, $contexts)
|
||||
{
|
||||
@ -736,7 +736,7 @@ class ComponentbuilderModelLibrary extends JModelAdmin
|
||||
$this->table->id = 0;
|
||||
|
||||
// TODO: Deal with ordering?
|
||||
// $this->table->ordering = 1;
|
||||
// $this->table->ordering = 1;
|
||||
|
||||
// Check the row.
|
||||
if (!$this->table->check())
|
||||
@ -781,7 +781,7 @@ class ComponentbuilderModelLibrary extends JModelAdmin
|
||||
*
|
||||
* @return boolean True if successful, false otherwise and internal error is set.
|
||||
*
|
||||
* @since 12.2
|
||||
* @since 12.2
|
||||
*/
|
||||
protected function batchMove($values, $pks, $contexts)
|
||||
{
|
||||
@ -1012,13 +1012,13 @@ class ComponentbuilderModelLibrary extends JModelAdmin
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to change the title
|
||||
*
|
||||
* @param string $title The title.
|
||||
*
|
||||
* @return array Contains the modified title and alias.
|
||||
*
|
||||
*/
|
||||
* Method to change the title
|
||||
*
|
||||
* @param string $title The title.
|
||||
*
|
||||
* @return array Contains the modified title and alias.
|
||||
*
|
||||
*/
|
||||
protected function _generateNewTitle($title)
|
||||
{
|
||||
|
||||
|
@ -236,7 +236,7 @@ class ComponentbuilderModelLibrary_config extends JModelAdmin
|
||||
protected function canEditState($record)
|
||||
{
|
||||
$user = JFactory::getUser();
|
||||
$recordId = (!empty($record->id)) ? $record->id : 0;
|
||||
$recordId = (!empty($record->id)) ? $record->id : 0;
|
||||
|
||||
if ($recordId)
|
||||
{
|
||||
@ -502,7 +502,7 @@ class ComponentbuilderModelLibrary_config extends JModelAdmin
|
||||
*
|
||||
* @return mixed An array of new IDs on success, boolean false on failure.
|
||||
*
|
||||
* @since 12.2
|
||||
* @since 12.2
|
||||
*/
|
||||
protected function batchCopy($values, $pks, $contexts)
|
||||
{
|
||||
@ -600,7 +600,7 @@ class ComponentbuilderModelLibrary_config extends JModelAdmin
|
||||
$this->table->id = 0;
|
||||
|
||||
// TODO: Deal with ordering?
|
||||
// $this->table->ordering = 1;
|
||||
// $this->table->ordering = 1;
|
||||
|
||||
// Check the row.
|
||||
if (!$this->table->check())
|
||||
@ -645,7 +645,7 @@ class ComponentbuilderModelLibrary_config extends JModelAdmin
|
||||
*
|
||||
* @return boolean True if successful, false otherwise and internal error is set.
|
||||
*
|
||||
* @since 12.2
|
||||
* @since 12.2
|
||||
*/
|
||||
protected function batchMove($values, $pks, $contexts)
|
||||
{
|
||||
@ -835,13 +835,13 @@ class ComponentbuilderModelLibrary_config extends JModelAdmin
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to change the title
|
||||
*
|
||||
* @param string $title The title.
|
||||
*
|
||||
* @return array Contains the modified title and alias.
|
||||
*
|
||||
*/
|
||||
* Method to change the title
|
||||
*
|
||||
* @param string $title The title.
|
||||
*
|
||||
* @return array Contains the modified title and alias.
|
||||
*
|
||||
*/
|
||||
protected function _generateNewTitle($title)
|
||||
{
|
||||
|
||||
|
@ -268,7 +268,7 @@ class ComponentbuilderModelLibrary_files_folders_urls extends JModelAdmin
|
||||
protected function canEditState($record)
|
||||
{
|
||||
$user = JFactory::getUser();
|
||||
$recordId = (!empty($record->id)) ? $record->id : 0;
|
||||
$recordId = (!empty($record->id)) ? $record->id : 0;
|
||||
|
||||
if ($recordId)
|
||||
{
|
||||
@ -534,7 +534,7 @@ class ComponentbuilderModelLibrary_files_folders_urls extends JModelAdmin
|
||||
*
|
||||
* @return mixed An array of new IDs on success, boolean false on failure.
|
||||
*
|
||||
* @since 12.2
|
||||
* @since 12.2
|
||||
*/
|
||||
protected function batchCopy($values, $pks, $contexts)
|
||||
{
|
||||
@ -632,7 +632,7 @@ class ComponentbuilderModelLibrary_files_folders_urls extends JModelAdmin
|
||||
$this->table->id = 0;
|
||||
|
||||
// TODO: Deal with ordering?
|
||||
// $this->table->ordering = 1;
|
||||
// $this->table->ordering = 1;
|
||||
|
||||
// Check the row.
|
||||
if (!$this->table->check())
|
||||
@ -677,7 +677,7 @@ class ComponentbuilderModelLibrary_files_folders_urls extends JModelAdmin
|
||||
*
|
||||
* @return boolean True if successful, false otherwise and internal error is set.
|
||||
*
|
||||
* @since 12.2
|
||||
* @since 12.2
|
||||
*/
|
||||
protected function batchMove($values, $pks, $contexts)
|
||||
{
|
||||
@ -919,13 +919,13 @@ class ComponentbuilderModelLibrary_files_folders_urls extends JModelAdmin
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to change the title
|
||||
*
|
||||
* @param string $title The title.
|
||||
*
|
||||
* @return array Contains the modified title and alias.
|
||||
*
|
||||
*/
|
||||
* Method to change the title
|
||||
*
|
||||
* @param string $title The title.
|
||||
*
|
||||
* @return array Contains the modified title and alias.
|
||||
*
|
||||
*/
|
||||
protected function _generateNewTitle($title)
|
||||
{
|
||||
|
||||
|
@ -152,10 +152,10 @@ class ComponentbuilderModelServer extends JModelAdmin
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to get list data.
|
||||
*
|
||||
* @return mixed An array of data items on success, false on failure.
|
||||
*/
|
||||
* Method to get list data.
|
||||
*
|
||||
* @return mixed An array of data items on success, false on failure.
|
||||
*/
|
||||
public function getWanlinked_components()
|
||||
{
|
||||
// Get the user object.
|
||||
@ -214,11 +214,9 @@ class ComponentbuilderModelServer extends JModelAdmin
|
||||
// set values to display correctly.
|
||||
if (ComponentbuilderHelper::checkArray($items))
|
||||
{
|
||||
// get user object.
|
||||
$user = JFactory::getUser();
|
||||
foreach ($items as $nr => &$item)
|
||||
{
|
||||
$access = ($user->authorise('joomla_component.access', 'com_componentbuilder.joomla_component.' . (int) $item->id) && $user->authorise('joomla_component.access', 'com_componentbuilder'));
|
||||
$access = (JFactory::getUser()->authorise('joomla_component.access', 'com_componentbuilder.joomla_component.' . (int) $item->id) && JFactory::getUser()->authorise('joomla_component.access', 'com_componentbuilder'));
|
||||
if (!$access)
|
||||
{
|
||||
unset($items[$nr]);
|
||||
@ -369,7 +367,7 @@ class ComponentbuilderModelServer extends JModelAdmin
|
||||
protected function canEditState($record)
|
||||
{
|
||||
$user = JFactory::getUser();
|
||||
$recordId = (!empty($record->id)) ? $record->id : 0;
|
||||
$recordId = (!empty($record->id)) ? $record->id : 0;
|
||||
|
||||
if ($recordId)
|
||||
{
|
||||
@ -480,18 +478,18 @@ class ComponentbuilderModelServer extends JModelAdmin
|
||||
}
|
||||
|
||||
/**
|
||||
* 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
|
||||
*/
|
||||
* 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
|
||||
@ -671,7 +669,7 @@ class ComponentbuilderModelServer extends JModelAdmin
|
||||
*
|
||||
* @return mixed An array of new IDs on success, boolean false on failure.
|
||||
*
|
||||
* @since 12.2
|
||||
* @since 12.2
|
||||
*/
|
||||
protected function batchCopy($values, $pks, $contexts)
|
||||
{
|
||||
@ -769,7 +767,7 @@ class ComponentbuilderModelServer extends JModelAdmin
|
||||
$this->table->id = 0;
|
||||
|
||||
// TODO: Deal with ordering?
|
||||
// $this->table->ordering = 1;
|
||||
// $this->table->ordering = 1;
|
||||
|
||||
// Check the row.
|
||||
if (!$this->table->check())
|
||||
@ -814,7 +812,7 @@ class ComponentbuilderModelServer extends JModelAdmin
|
||||
*
|
||||
* @return boolean True if successful, false otherwise and internal error is set.
|
||||
*
|
||||
* @since 12.2
|
||||
* @since 12.2
|
||||
*/
|
||||
protected function batchMove($values, $pks, $contexts)
|
||||
{
|
||||
@ -1050,13 +1048,13 @@ class ComponentbuilderModelServer extends JModelAdmin
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to change the title
|
||||
*
|
||||
* @param string $title The title.
|
||||
*
|
||||
* @return array Contains the modified title and alias.
|
||||
*
|
||||
*/
|
||||
* Method to change the title
|
||||
*
|
||||
* @param string $title The title.
|
||||
*
|
||||
* @return array Contains the modified title and alias.
|
||||
*
|
||||
*/
|
||||
protected function _generateNewTitle($title)
|
||||
{
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user