Added #31 feature to build fields and views dynamically via a sql dump. Fixed #29 to insure that a redirect loop does not occur easily. Made many other compiler improvements.

This commit is contained in:
Llewellyn van der Merwe 2016-12-30 12:47:19 +02:00
parent 829384a56b
commit 0ae4e4f80d
No known key found for this signature in database
GPG Key ID: CAD7B16D27AF28C5
388 changed files with 5052 additions and 3714 deletions

View File

@ -1,4 +1,4 @@
# Component Builder (2.2.5)
# Component Builder (2.2.6)
This is a [Joomla 3.x](http://www.joomla.org/) component.
@ -8,7 +8,7 @@ The Component Builder for [Joomla](http://www.joomla.org/) that is highly advanc
Whether you're a seasoned [Joomla](http://www.joomla.org/) 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.2.5) 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.2.6) with **ALL** its features and **ALL** concepts totally open-source and free!
Once installed upgrades are quick and easy via the default Joomla upgrade area.
@ -104,13 +104,13 @@ Component Builder is mapped as a component in itself on my local development env
+ *Author*: [Llewellyn van der Merwe](mailto:info@vdm.io)
+ *Name*: [Component Builder](http://vdm.bz/component-builder)
+ *First Build*: 30th April, 2015
+ *Last Build*: 22nd December, 2016
+ *Version*: 2.2.5
+ *Last Build*: 30th December, 2016
+ *Version*: 2.2.6
+ *Copyright*: Copyright (C) 2015. All Rights Reserved
+ *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
+ *Line count*: **86690**
+ *File count*: **542**
+ *Folder count*: **99**
+ *Line count*: **87155**
+ *File count*: **545**
+ *Folder count*: **100**
> This **component** was build with a Joomla [Automated Component Builder](http://vdm.bz/component-builder).
> Developed by [Llewellyn van der Merwe](mailto:joomla@vdm.io)

View File

@ -1,4 +1,4 @@
# Component Builder (2.2.5)
# Component Builder (2.2.6)
This is a [Joomla 3.x](http://www.joomla.org/) component.
@ -8,7 +8,7 @@ The Component Builder for [Joomla](http://www.joomla.org/) that is highly advanc
Whether you're a seasoned [Joomla](http://www.joomla.org/) 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.2.5) 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.2.6) with **ALL** its features and **ALL** concepts totally open-source and free!
Once installed upgrades are quick and easy via the default Joomla upgrade area.
@ -104,13 +104,13 @@ Component Builder is mapped as a component in itself on my local development env
+ *Author*: [Llewellyn van der Merwe](mailto:info@vdm.io)
+ *Name*: [Component Builder](http://vdm.bz/component-builder)
+ *First Build*: 30th April, 2015
+ *Last Build*: 22nd December, 2016
+ *Version*: 2.2.5
+ *Last Build*: 30th December, 2016
+ *Version*: 2.2.6
+ *Copyright*: Copyright (C) 2015. All Rights Reserved
+ *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
+ *Line count*: **86690**
+ *File count*: **542**
+ *Folder count*: **99**
+ *Line count*: **87155**
+ *File count*: **545**
+ *Folder count*: **100**
> This **component** was build with a Joomla [Automated Component Builder](http://vdm.bz/component-builder).
> Developed by [Llewellyn van der Merwe](mailto:joomla@vdm.io)

View File

@ -9,8 +9,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.5
@build 22nd December, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage admin.css

View File

@ -9,8 +9,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.5
@build 22nd December, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage admin_view.css

View File

@ -9,8 +9,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.5
@build 22nd December, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage admin_views.css

View File

@ -9,8 +9,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.5
@build 22nd December, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage component.css

View File

@ -9,8 +9,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.5
@build 22nd December, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage components.css

View File

@ -9,8 +9,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.5
@build 22nd December, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage custom_admin_view.css

View File

@ -9,8 +9,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.5
@build 22nd December, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage custom_admin_views.css

View File

@ -9,8 +9,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.5
@build 22nd December, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage dashboard.css

View File

@ -9,8 +9,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.5
@build 22nd December, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage dynamic_get.css

View File

@ -9,8 +9,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.5
@build 22nd December, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage dynamic_gets.css

View File

@ -9,8 +9,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.5
@build 22nd December, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage field.css

View File

@ -9,8 +9,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.5
@build 22nd December, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage fields.css

View File

@ -9,8 +9,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.5
@build 22nd December, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage fieldtype.css

View File

@ -9,8 +9,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.5
@build 22nd December, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage fieldtypes.css

View File

@ -9,8 +9,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.5
@build 22nd December, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage help_document.css

View File

@ -9,8 +9,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.5
@build 22nd December, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage help_documents.css

View File

@ -9,8 +9,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.5
@build 22nd December, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage layout.css

View File

@ -9,8 +9,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.5
@build 22nd December, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage layouts.css

View File

@ -9,8 +9,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.5
@build 22nd December, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage site_view.css

View File

@ -9,8 +9,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.5
@build 22nd December, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage site_views.css

View File

@ -9,8 +9,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.5
@build 22nd December, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage snippet.css

View File

@ -9,8 +9,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.5
@build 22nd December, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage snippets.css

View File

@ -9,8 +9,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.5
@build 22nd December, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage template.css

View File

@ -9,8 +9,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.5
@build 22nd December, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage templates.css

View File

@ -99,7 +99,7 @@ class ###Component###Model###SView### extends JModelItem
{
$app = JFactory::getApplication();
$app->enqueueMessage(JText::_('Not authorised!'), 'error');
// redirect away if not a correct (TODO for now we go to default view)
// redirect away if not a correct to cPanel/default view
$app->redirect('index.php?option=com_###component###');
return false;
}

View File

@ -95,16 +95,7 @@ class ###Component###Model###SView### extends JModelItem
*/
public function getItem($pk = null)
{
$this->user = JFactory::getUser();
// check if this user has permission to access item
if (!$this->user->authorise('site.###sview###.access', 'com_###component###'))
{
$app = JFactory::getApplication();
$app->enqueueMessage(JText::_('Not authorised!'), 'error');
// redirect away if not a correct (TODO for now we go to default view)
$app->redirect(JRoute::_('index.php?option=com_###component###&view=###SITE_DEFAULT_VIEW###'));
return false;
}
$this->user = JFactory::getUser();###USER_PERMISSION_CHECK_ACCESS###
$this->userId = $this->user->get('id');
$this->guest = $this->user->get('guest');
$this->groups = $this->user->get('groups');

View File

@ -77,16 +77,7 @@ class ###Component###Model###SViews### extends JModelList
*/
public function getItems()
{
$user = JFactory::getUser();
// check if this user has permission to access items
if (!$user->authorise('site.###sview###.access', 'com_###component###'))
{
$app = JFactory::getApplication();
$app->enqueueMessage(JText::_('Not authorised!'), 'error');
// redirect away if not a correct (TODO for now we go to default view)
$app->redirect(JRoute::_('index.php?option=com_###component###&view=###SITE_DEFAULT_VIEW###'));
return false;
}###LICENSE_LOCKED_CHECK### ###SITE_BEFORE_GET_ITEMS###
$user = JFactory::getUser();###USER_PERMISSION_CHECK_ACCESS### ###LICENSE_LOCKED_CHECK### ###SITE_BEFORE_GET_ITEMS###
// load parent items
$items = parent::getItems();

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.5
@build 22nd December, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage componentbuilder.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.5
@build 22nd December, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage controller.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.5
@build 22nd December, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage admin_view.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.5
@build 22nd December, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage admin_views.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.5
@build 22nd December, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage ajax.json.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.5
@build 22nd December, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage compiler.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.5
@build 22nd December, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage component.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.5
@build 22nd December, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage componentbuilder.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.5
@build 22nd December, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage components.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.5
@build 22nd December, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage custom_admin_view.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.5
@build 22nd December, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage custom_admin_views.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.5
@build 22nd December, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage dynamic_get.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.5
@build 22nd December, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage dynamic_gets.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.5
@build 22nd December, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage field.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.5
@build 22nd December, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage fields.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.5
@build 22nd December, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage fieldtype.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.5
@build 22nd December, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage fieldtypes.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.5
@build 22nd December, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage help.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.5
@build 22nd December, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage help_document.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.5
@build 22nd December, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage help_documents.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.5
@build 22nd December, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage import.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.5
@build 22nd December, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage layout.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.5
@build 22nd December, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage layouts.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.5
@build 22nd December, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage site_view.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.5
@build 22nd December, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage site_views.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.5
@build 22nd December, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage snippet.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.5
@build 22nd December, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage snippets.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.5
@build 22nd December, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage template.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.5
@build 22nd December, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage templates.php

View File

@ -1699,7 +1699,7 @@ class Interpretation extends Fields
* @param $string
* @param string $type
* @return mixed
*/
*/
public function removeAsDot($string, $type = '')
{
if (strpos($string,'.') !== false)
@ -1712,6 +1712,56 @@ class Interpretation extends Fields
}
return $field;
}
/**
* @param type $view
* @param type $type
*/
public function setUserPermissionCheckAccess($view, $type)
{
if (isset($view['access']) && $view['access'] == 1)
{
switch($type)
{
case 1:
$userString = '$this->user';
break;
default:
$userString = '$user';
break;
}
// check that the default and the redirect page is not the same
if ($this->fileContentStatic['###SITE_DEFAULT_VIEW###'] != $view['settings']->code)
{
$redirectMessage = "\t\t\t//".$this->setLine(__LINE__)." redirect away to the default view if no access allowed.";
$redirectString = "JRoute::_('index.php?option=com_".$this->fileContentStatic['###component###']."&view=".$this->fileContentStatic['###SITE_DEFAULT_VIEW###']."')";
}
else
{
$redirectMessage = "\t\t\t//".$this->setLine(__LINE__)." redirect away to the home page if no access allowed.";
$redirectString = 'JURI::root()';
}
$accessCheck[] = "\n\t\t//".$this->setLine(__LINE__)." check if this user has permission to access item";
$accessCheck[] = "\t\tif (!".$userString."->authorise('site.".$view['settings']->code.".access', 'com_".$this->fileContentStatic['###component###']."'))";
$accessCheck[] = "\t\t{";
$accessCheck[] = "\t\t\t\$app = JFactory::getApplication();";
// set lang
$langKeyWord = $this->langPrefix.'_'.ComponentbuilderHelper::safeString('Not authorised to view '.$view['settings']->code.'!','U');
if (!isset($this->langContent['site'][$langKeyWord]))
{
$this->langContent['site'][$langKeyWord] = 'Not authorised to view '.$view['settings']->code.'!';
}
$accessCheck[] = "\t\t\t\$app->enqueueMessage(JText::_('".$langKeyWord."'), 'error');";
$accessCheck[] = $redirectMessage;
$accessCheck[] = "\t\t\t\$app->redirect(".$redirectString.");";
$accessCheck[] = "\t\t\treturn false;";
$accessCheck[] = "\t\t}";
// return the access check
return implode("\n",$accessCheck);
}
return '';
}
/**
* @param $get
@ -1719,7 +1769,7 @@ class Interpretation extends Fields
* @param string $tab
* @param string $type
* @return string
*/
*/
public function setCustomViewGetItem(&$get, &$code, $tab = '', $type = 'main')
{
if (ComponentbuilderHelper::checkObject($get))
@ -1758,7 +1808,16 @@ class Interpretation extends Fields
$getItem .= "\n\t".$tab."\t\t\$app->enqueueMessage(JText::_('".$langKeyWord."'), 'warning');";
if ('site' == $this->target)
{
$getItem .= "\n\t".$tab."\t\t\$app->redirect('index.php?option=com_".$this->fileContentStatic['###component###']."&view=".$this->fileContentStatic['###SITE_DEFAULT_VIEW###']."');";
// check that the default and the redirect page is not the same
if ($this->fileContentStatic['###SITE_DEFAULT_VIEW###'] != $code)
{
$redirectString = "JRoute::_('index.php?option=com_".$this->fileContentStatic['###component###']."&view=".$this->fileContentStatic['###SITE_DEFAULT_VIEW###']."')";
}
else
{
$redirectString = 'JURI::root()';
}
$getItem .= "\n\t".$tab."\t\t\$app->redirect(".$redirectString.");";
}
else
{
@ -4666,7 +4725,7 @@ class Interpretation extends Fields
// check if default field was over written
if (!isset($this->fieldsNames[$view]['id']))
{
$db .= "\n\t`id` int(11) NOT NULL AUTO_INCREMENT,";
$db .= "\n\t`id` INT(11) NOT NULL AUTO_INCREMENT,";
}
$db .= "\n\t`asset_id` INT(255) UNSIGNED NOT NULL DEFAULT '0',";
ksort($fields);
@ -4719,17 +4778,17 @@ class Interpretation extends Fields
// check if default field was over written
if (!isset($this->fieldsNames[$view]['published']))
{
$db .= "\n\t`published` tinyint(1) NOT NULL DEFAULT '1',";
$db .= "\n\t`published` TINYINT(1) NOT NULL DEFAULT '1',";
}
// check if default field was over written
if (!isset($this->fieldsNames[$view]['created_by']))
{
$db .= "\n\t`created_by` int(11) NOT NULL DEFAULT '0',";
$db .= "\n\t`created_by` INT(11) NOT NULL DEFAULT '0',";
}
// check if default field was over written
if (!isset($this->fieldsNames[$view]['modified_by']))
{
$db .= "\n\t`modified_by` int(11) NOT NULL DEFAULT '0',";
$db .= "\n\t`modified_by` INT(11) NOT NULL DEFAULT '0',";
}
// check if default field was over written
if (!isset($this->fieldsNames[$view]['created']))
@ -4744,7 +4803,7 @@ class Interpretation extends Fields
// check if default field was over written
if (!isset($this->fieldsNames[$view]['checked_out']))
{
$db .= "\n\t`checked_out` int(11) NOT NULL,";
$db .= "\n\t`checked_out` INT(11) NOT NULL,";
}
// check if default field was over written
if (!isset($this->fieldsNames[$view]['checked_out_time']))
@ -4754,22 +4813,22 @@ class Interpretation extends Fields
// check if default field was over written
if (!isset($this->fieldsNames[$view]['version']))
{
$db .= "\n\t`version` int(11) NOT NULL DEFAULT '1',";
$db .= "\n\t`version` INT(11) NOT NULL DEFAULT '1',";
}
// check if default field was over written
if (!isset($this->fieldsNames[$view]['hits']))
{
$db .= "\n\t`hits` int(11) NOT NULL DEFAULT '0',";
$db .= "\n\t`hits` INT(11) NOT NULL DEFAULT '0',";
}
// check if view has access
if (isset($this->accessBuilder[$view]) && ComponentbuilderHelper::checkString($this->accessBuilder[$view]))
{
$db .= "\n\t`access` int(11) DEFAULT NULL,";
$db .= "\n\t`access` INT(11) DEFAULT NULL,";
}
// check if default field was over written
if (!isset($this->fieldsNames[$view]['ordering']))
{
$db .= "\n\t`ordering` int(11) NOT NULL DEFAULT '0',";
$db .= "\n\t`ordering` INT(11) NOT NULL DEFAULT '0',";
}
// check if metadata is added to this view
if (isset($this->metadataBuilder[$view]) && ComponentbuilderHelper::checkString($this->metadataBuilder[$view]))
@ -13158,9 +13217,12 @@ function vdm_dkim() {
$siteTitle = $this->langPrefix.'_'.ComponentbuilderHelper::safeString($siteName.' Access Site','U');
$siteDesc = $this->langPrefix.'_'.ComponentbuilderHelper::safeString($siteName.' Access Site','U').'_DESC';
$sortKey = ComponentbuilderHelper::safeString($siteName.' Access Site');
$this->langContent['admin'][$siteTitle] = $siteName.' (Site) Access';
$this->langContent['admin'][$siteDesc] = ' Allows the users in this group to access site '.ComponentbuilderHelper::safeString($siteName,'w').'.';
$this->componentGlobal[$sortKey] = "\t\t".'<action name="site.'.$siteCode.'.access" title="'.$siteTitle.'" description="'.$siteDesc.'" />';
if (isset($site_view['access']) && $site_view['access'] == 1)
{
$this->langContent['admin'][$siteTitle] = $siteName.' (Site) Access';
$this->langContent['admin'][$siteDesc] = ' Allows the users in this group to access site '.ComponentbuilderHelper::safeString($siteName,'w').'.';
$this->componentGlobal[$sortKey] = "\t\t".'<action name="site.'.$siteCode.'.access" title="'.$siteTitle.'" description="'.$siteDesc.'" />';
}
// add the custom permissions to use the buttons of this view
/* if (ComponentbuilderHelper::checkArray($site_view['settings']->custom_buttons))
{

View File

@ -879,6 +879,8 @@ class Infusion extends Interpretation
if ($view['settings']->main_get->gettype == 1)
{
// set user permission access check ###USER_PERMISSION_CHECK_ACCESS### <<<DYNAMIC>>>
$this->fileContentDynamic[$view['settings']->code]['###USER_PERMISSION_CHECK_ACCESS###'] = $this->setUserPermissionCheckAccess($view, 1);
// check if there is any custom script
if (isset($this->customScriptBuilder[$this->target.'_php_before_getitem'][$view['settings']->code]) && ComponentbuilderHelper::checkString($this->customScriptBuilder[$this->target.'_php_before_getitem'][$view['settings']->code]))
{
@ -913,7 +915,9 @@ class Infusion extends Interpretation
}
}
elseif ($view['settings']->main_get->gettype == 2)
{
{
// set user permission access check ###USER_PERMISSION_CHECK_ACCESS### <<<DYNAMIC>>>
$this->fileContentDynamic[$view['settings']->code]['###USER_PERMISSION_CHECK_ACCESS###'] = $this->setUserPermissionCheckAccess($view, 2);
// ###SITE_GET_LIST_QUERY### <<<DYNAMIC>>>
$this->fileContentDynamic[$view['settings']->code]['###SITE_GET_LIST_QUERY###'] = $this->setCustomViewListQuery($view['settings']->main_get, $view['settings']->code);

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.5
@build 22nd December, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage componentbuilder.php
@ -33,23 +33,37 @@ abstract class ComponentbuilderHelper
{
/*
* Compiler autoloader
* Autoloader
*/
public static function autoLoader()
public static function autoLoader($type = 'compiler')
{
// load the compiler classes
foreach (glob(JPATH_ADMINISTRATOR."/components/com_componentbuilder/helpers/compiler/*.php") as $compilerFile)
foreach (glob(JPATH_ADMINISTRATOR."/components/com_componentbuilder/helpers/".$type."/*.php") as $autoFile)
{
require_once $compilerFile;
require_once $autoFile;
}
// import the Joomla librarys
jimport('joomla.filesystem.file');
jimport('joomla.filesystem.folder');
jimport('joomla.filesystem.archive');
jimport('joomla.application.component.modellist');
// load only if compiler
if ('compiler' == $type)
{
// import the Joomla librarys
jimport('joomla.filesystem.file');
jimport('joomla.filesystem.folder');
jimport('joomla.filesystem.archive');
jimport('joomla.application.component.modellist');
// include class to minify js
require_once JPATH_ADMINISTRATOR.'/components/com_componentbuilder/helpers/js.php';