forked from joomla/Component-Builder
Continued formatting of JCB code
This commit is contained in:
parent
8ac350e62b
commit
e44b6bc272
@ -115,7 +115,7 @@ Component Builder is mapped as a component in itself on my local development env
|
||||
+ *Version*: 2.6.7
|
||||
+ *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*: **178243**
|
||||
+ *Line count*: **178242**
|
||||
+ *File count*: **1145**
|
||||
+ *Folder count*: **184**
|
||||
|
||||
|
@ -115,7 +115,7 @@ Component Builder is mapped as a component in itself on my local development env
|
||||
+ *Version*: 2.6.7
|
||||
+ *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*: **178243**
|
||||
+ *Line count*: **178242**
|
||||
+ *File count*: **1145**
|
||||
+ *Folder count*: **184**
|
||||
|
||||
|
@ -40,101 +40,101 @@ class ###Component###Model###Component### extends JModelList
|
||||
{
|
||||
public function getIcons()
|
||||
{
|
||||
// load user for access menus
|
||||
$user = JFactory::getUser();
|
||||
// reset icon array
|
||||
// load user for access menus
|
||||
$user = JFactory::getUser();
|
||||
// reset icon array
|
||||
$icons = array();
|
||||
// view groups array
|
||||
// view groups array
|
||||
$viewGroups = array(
|
||||
'main' => array(###DASHBOARDICONS###)
|
||||
);###DASHBOARDICONACCESS###
|
||||
foreach($viewGroups as $group => $views)
|
||||
{
|
||||
{
|
||||
$i = 0;
|
||||
if (###Component###Helper::checkArray($views))
|
||||
{
|
||||
{
|
||||
foreach($views as $view)
|
||||
{
|
||||
$add = false;
|
||||
if (strpos($view,'.') !== false)
|
||||
{
|
||||
$dwd = explode('.', $view);
|
||||
if (count($dwd) == 3)
|
||||
{
|
||||
list($type, $name, $action) = $dwd;
|
||||
}
|
||||
elseif (count($dwd) == 2)
|
||||
{
|
||||
list($type, $name) = $dwd;
|
||||
$action = false;
|
||||
}
|
||||
if ($action)
|
||||
{
|
||||
$viewName = $name;
|
||||
switch($action)
|
||||
{
|
||||
case 'add':
|
||||
$url ='index.php?option=com_###component###&view='.$name.'&layout=edit';
|
||||
$image = $name.'_'.$action.'.'.$type;
|
||||
$alt = $name.' '.$action;
|
||||
$name = 'COM_###COMPONENT###_DASHBOARD_'.###Component###Helper::safeString($name,'U').'_ADD';
|
||||
$add = true;
|
||||
break;
|
||||
default:
|
||||
$url = 'index.php?option=com_categories&view=categories&extension=com_###component###.'.$name;
|
||||
$image = $name.'_'.$action.'.'.$type;
|
||||
$alt = $name.' '.$action;
|
||||
$name = 'COM_###COMPONENT###_DASHBOARD_'.###Component###Helper::safeString($name,'U').'_'.###Component###Helper::safeString($action,'U');
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$viewName = $name;
|
||||
$alt = $name;
|
||||
$url = 'index.php?option=com_###component###&view='.$name;
|
||||
$image = $name.'.'.$type;
|
||||
$name = 'COM_###COMPONENT###_DASHBOARD_'.###Component###Helper::safeString($name,'U');
|
||||
$hover = false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$viewName = $view;
|
||||
$alt = $view;
|
||||
$url = 'index.php?option=com_###component###&view='.$view;
|
||||
$image = $view.'.png';
|
||||
$name = ucwords($view).'<br /><br />';
|
||||
$hover = false;
|
||||
}
|
||||
// first make sure the view access is set
|
||||
if (###Component###Helper::checkArray($viewAccess))
|
||||
{
|
||||
{
|
||||
$dwd = explode('.', $view);
|
||||
if (count($dwd) == 3)
|
||||
{
|
||||
list($type, $name, $action) = $dwd;
|
||||
}
|
||||
elseif (count($dwd) == 2)
|
||||
{
|
||||
list($type, $name) = $dwd;
|
||||
$action = false;
|
||||
}
|
||||
if ($action)
|
||||
{
|
||||
$viewName = $name;
|
||||
switch($action)
|
||||
{
|
||||
case 'add':
|
||||
$url ='index.php?option=com_###component###&view='.$name.'&layout=edit';
|
||||
$image = $name.'_'.$action.'.'.$type;
|
||||
$alt = $name.' '.$action;
|
||||
$name = 'COM_###COMPONENT###_DASHBOARD_'.###Component###Helper::safeString($name,'U').'_ADD';
|
||||
$add = true;
|
||||
break;
|
||||
default:
|
||||
$url = 'index.php?option=com_categories&view=categories&extension=com_###component###.'.$name;
|
||||
$image = $name.'_'.$action.'.'.$type;
|
||||
$alt = $name.' '.$action;
|
||||
$name = 'COM_###COMPONENT###_DASHBOARD_'.###Component###Helper::safeString($name,'U').'_'.###Component###Helper::safeString($action,'U');
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$viewName = $name;
|
||||
$alt = $name;
|
||||
$url = 'index.php?option=com_###component###&view='.$name;
|
||||
$image = $name.'.'.$type;
|
||||
$name = 'COM_###COMPONENT###_DASHBOARD_'.###Component###Helper::safeString($name,'U');
|
||||
$hover = false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$viewName = $view;
|
||||
$alt = $view;
|
||||
$url = 'index.php?option=com_###component###&view='.$view;
|
||||
$image = $view.'.png';
|
||||
$name = ucwords($view).'<br /><br />';
|
||||
$hover = false;
|
||||
}
|
||||
// first make sure the view access is set
|
||||
if (###Component###Helper::checkArray($viewAccess))
|
||||
{
|
||||
// setup some defaults
|
||||
$dashboard_add = false;
|
||||
$dashboard_list = false;
|
||||
$accessTo = '';
|
||||
$accessAdd = '';
|
||||
// acces checking start
|
||||
$accessCreate = (isset($viewAccess[$viewName.'.create'])) ? ###Component###Helper::checkString($viewAccess[$viewName.'.create']):false;
|
||||
$accessAccess = (isset($viewAccess[$viewName.'.access'])) ? ###Component###Helper::checkString($viewAccess[$viewName.'.access']):false;
|
||||
$accessTo = '';
|
||||
$accessAdd = '';
|
||||
// acces checking start
|
||||
$accessCreate = (isset($viewAccess[$viewName.'.create'])) ? ###Component###Helper::checkString($viewAccess[$viewName.'.create']):false;
|
||||
$accessAccess = (isset($viewAccess[$viewName.'.access'])) ? ###Component###Helper::checkString($viewAccess[$viewName.'.access']):false;
|
||||
// set main controllers
|
||||
$accessDashboard_add = (isset($viewAccess[$viewName.'.dashboard_add'])) ? ###Component###Helper::checkString($viewAccess[$viewName.'.dashboard_add']):false;
|
||||
$accessDashboard_list = (isset($viewAccess[$viewName.'.dashboard_list'])) ? ###Component###Helper::checkString($viewAccess[$viewName.'.dashboard_list']):false;
|
||||
// check for adding access
|
||||
if ($add && $accessCreate)
|
||||
{
|
||||
$accessAdd = $viewAccess[$viewName.'.create'];
|
||||
}
|
||||
elseif ($add)
|
||||
{
|
||||
$accessAdd = 'core.create';
|
||||
}
|
||||
// check if acces to view is set
|
||||
if ($accessAccess)
|
||||
{
|
||||
$accessTo = $viewAccess[$viewName.'.access'];
|
||||
}
|
||||
// check for adding access
|
||||
if ($add && $accessCreate)
|
||||
{
|
||||
$accessAdd = $viewAccess[$viewName.'.create'];
|
||||
}
|
||||
elseif ($add)
|
||||
{
|
||||
$accessAdd = 'core.create';
|
||||
}
|
||||
// check if acces to view is set
|
||||
if ($accessAccess)
|
||||
{
|
||||
$accessTo = $viewAccess[$viewName.'.access'];
|
||||
}
|
||||
// set main access controllers
|
||||
if ($accessDashboard_add)
|
||||
{
|
||||
@ -144,65 +144,65 @@ class ###Component###Model###Component### extends JModelList
|
||||
{
|
||||
$dashboard_list = $user->authorise($viewAccess[$viewName.'.dashboard_list'], 'com_###component###');
|
||||
}
|
||||
if (###Component###Helper::checkString($accessAdd) && ###Component###Helper::checkString($accessTo))
|
||||
{
|
||||
// check access
|
||||
if($user->authorise($accessAdd, 'com_###component###') && $user->authorise($accessTo, 'com_###component###') && $dashboard_add)
|
||||
{
|
||||
$icons[$group][$i] = new StdClass;
|
||||
$icons[$group][$i]->url = $url;
|
||||
$icons[$group][$i]->name = $name;
|
||||
$icons[$group][$i]->image = $image;
|
||||
$icons[$group][$i]->alt = $alt;
|
||||
}
|
||||
}
|
||||
elseif (###Component###Helper::checkString($accessTo))
|
||||
{
|
||||
// check access
|
||||
if($user->authorise($accessTo, 'com_###component###') && $dashboard_list)
|
||||
{
|
||||
$icons[$group][$i] = new StdClass;
|
||||
$icons[$group][$i]->url = $url;
|
||||
$icons[$group][$i]->name = $name;
|
||||
$icons[$group][$i]->image = $image;
|
||||
$icons[$group][$i]->alt = $alt;
|
||||
}
|
||||
}
|
||||
elseif (###Component###Helper::checkString($accessAdd))
|
||||
{
|
||||
// check access
|
||||
if($user->authorise($accessAdd, 'com_###component###') && $dashboard_add)
|
||||
{
|
||||
$icons[$group][$i] = new StdClass;
|
||||
$icons[$group][$i]->url = $url;
|
||||
$icons[$group][$i]->name = $name;
|
||||
$icons[$group][$i]->image = $image;
|
||||
$icons[$group][$i]->alt = $alt;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$icons[$group][$i] = new StdClass;
|
||||
$icons[$group][$i]->url = $url;
|
||||
$icons[$group][$i]->name = $name;
|
||||
$icons[$group][$i]->image = $image;
|
||||
$icons[$group][$i]->alt = $alt;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$icons[$group][$i] = new StdClass;
|
||||
$icons[$group][$i]->url = $url;
|
||||
$icons[$group][$i]->name = $name;
|
||||
$icons[$group][$i]->image = $image;
|
||||
$icons[$group][$i]->alt = $alt;
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$icons[$group][$i] = false;
|
||||
if (###Component###Helper::checkString($accessAdd) && ###Component###Helper::checkString($accessTo))
|
||||
{
|
||||
// check access
|
||||
if($user->authorise($accessAdd, 'com_###component###') && $user->authorise($accessTo, 'com_###component###') && $dashboard_add)
|
||||
{
|
||||
$icons[$group][$i] = new StdClass;
|
||||
$icons[$group][$i]->url = $url;
|
||||
$icons[$group][$i]->name = $name;
|
||||
$icons[$group][$i]->image = $image;
|
||||
$icons[$group][$i]->alt = $alt;
|
||||
}
|
||||
}
|
||||
elseif (###Component###Helper::checkString($accessTo))
|
||||
{
|
||||
// check access
|
||||
if($user->authorise($accessTo, 'com_###component###') && $dashboard_list)
|
||||
{
|
||||
$icons[$group][$i] = new StdClass;
|
||||
$icons[$group][$i]->url = $url;
|
||||
$icons[$group][$i]->name = $name;
|
||||
$icons[$group][$i]->image = $image;
|
||||
$icons[$group][$i]->alt = $alt;
|
||||
}
|
||||
}
|
||||
elseif (###Component###Helper::checkString($accessAdd))
|
||||
{
|
||||
// check access
|
||||
if($user->authorise($accessAdd, 'com_###component###') && $dashboard_add)
|
||||
{
|
||||
$icons[$group][$i] = new StdClass;
|
||||
$icons[$group][$i]->url = $url;
|
||||
$icons[$group][$i]->name = $name;
|
||||
$icons[$group][$i]->image = $image;
|
||||
$icons[$group][$i]->alt = $alt;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$icons[$group][$i] = new StdClass;
|
||||
$icons[$group][$i]->url = $url;
|
||||
$icons[$group][$i]->name = $name;
|
||||
$icons[$group][$i]->image = $image;
|
||||
$icons[$group][$i]->alt = $alt;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$icons[$group][$i] = new StdClass;
|
||||
$icons[$group][$i]->url = $url;
|
||||
$icons[$group][$i]->name = $name;
|
||||
$icons[$group][$i]->image = $image;
|
||||
$icons[$group][$i]->alt = $alt;
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$icons[$group][$i] = false;
|
||||
}
|
||||
}
|
||||
return $icons;
|
||||
|
@ -74,15 +74,15 @@ class ###Component###View###Component### extends JViewLegacy
|
||||
$canDo = ###Component###Helper::getActions('###component###');
|
||||
JToolBarHelper::title(JText::_('COM_###COMPONENT###_DASHBOARD'), 'grid-2');
|
||||
|
||||
// set help url for this view if found
|
||||
$help_url = ###Component###Helper::getHelpUrl('###component###');
|
||||
if (###Component###Helper::checkString($help_url))
|
||||
{
|
||||
// set help url for this view if found
|
||||
$help_url = ###Component###Helper::getHelpUrl('###component###');
|
||||
if (###Component###Helper::checkString($help_url))
|
||||
{
|
||||
JToolbarHelper::help('COM_###COMPONENT###_HELP_MANAGER', false, $help_url);
|
||||
}
|
||||
}
|
||||
|
||||
if ($canDo->get('core.admin') || $canDo->get('core.options'))
|
||||
{
|
||||
{
|
||||
JToolBarHelper::preferences('com_###component###');
|
||||
}
|
||||
}
|
||||
|
@ -37,10 +37,10 @@ abstract class ###Component###Helper
|
||||
/**
|
||||
* Load the Component xml manifest.
|
||||
**/
|
||||
public static function manifest()
|
||||
public static function manifest()
|
||||
{
|
||||
$manifestUrl = JPATH_ADMINISTRATOR."/components/com_###component###/###component###.xml";
|
||||
return simplexml_load_file($manifestUrl);
|
||||
$manifestUrl = JPATH_ADMINISTRATOR."/components/com_###component###/###component###.xml";
|
||||
return simplexml_load_file($manifestUrl);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -55,22 +55,22 @@ abstract class ###Component###Helper
|
||||
// get all Contributors (max 20)
|
||||
$searchArray = range('0','20');
|
||||
foreach($searchArray as $nr)
|
||||
{
|
||||
{
|
||||
if ((NULL !== $params->get("showContributor".$nr)) && ($params->get("showContributor".$nr) == 1 || $params->get("showContributor".$nr) == 3))
|
||||
{
|
||||
{
|
||||
// set link based of selected option
|
||||
if($params->get("useContributor".$nr) == 1)
|
||||
{
|
||||
{
|
||||
$link_front = '<a href="mailto:'.$params->get("emailContributor".$nr).'" target="_blank">';
|
||||
$link_back = '</a>';
|
||||
}
|
||||
elseif($params->get("useContributor".$nr) == 2)
|
||||
{
|
||||
elseif($params->get("useContributor".$nr) == 2)
|
||||
{
|
||||
$link_front = '<a href="'.$params->get("linkContributor".$nr).'" target="_blank">';
|
||||
$link_back = '</a>';
|
||||
}
|
||||
else
|
||||
{
|
||||
else
|
||||
{
|
||||
$link_front = '';
|
||||
$link_back = '';
|
||||
}
|
||||
@ -86,10 +86,10 @@ abstract class ###Component###Helper
|
||||
**/
|
||||
public static function addSubmenu($submenu)
|
||||
{
|
||||
// load user for access menus
|
||||
$user = JFactory::getUser();
|
||||
// load the submenus to sidebar
|
||||
###SUBMENU###
|
||||
// load user for access menus
|
||||
$user = JFactory::getUser();
|
||||
// load the submenus to sidebar
|
||||
###SUBMENU###
|
||||
}###HELPER_CREATEUSER### ###HELPER_UIKIT### ###HELPER_EXEL###
|
||||
|
||||
public static function getVar($table, $where = null, $whereString = 'user', $what = 'id', $operator = '=', $main = '###component###')
|
||||
@ -182,9 +182,9 @@ abstract class ###Component###Helper
|
||||
|
||||
public static function jsonToString($value, $sperator = ", ", $table = null)
|
||||
{
|
||||
// check if string is JSON
|
||||
$result = json_decode($value, true);
|
||||
if (json_last_error() === JSON_ERROR_NONE)
|
||||
// check if string is JSON
|
||||
$result = json_decode($value, true);
|
||||
if (json_last_error() === JSON_ERROR_NONE)
|
||||
{
|
||||
// is JSON
|
||||
if (self::checkArray($result))
|
||||
@ -206,15 +206,15 @@ abstract class ###Component###Helper
|
||||
}
|
||||
return (string) implode($sperator,$result);
|
||||
}
|
||||
return (string) json_decode($value);
|
||||
}
|
||||
return $value;
|
||||
}
|
||||
return (string) json_decode($value);
|
||||
}
|
||||
return $value;
|
||||
}
|
||||
|
||||
public static function isPublished($id,$type)
|
||||
{
|
||||
if ($type == 'raw')
|
||||
{
|
||||
{
|
||||
$type = 'item';
|
||||
}
|
||||
$db = JFactory::getDbo();
|
||||
@ -227,7 +227,7 @@ abstract class ###Component###Helper
|
||||
$db->execute();
|
||||
$found = $db->getNumRows();
|
||||
if($found)
|
||||
{
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@ -244,33 +244,33 @@ abstract class ###Component###Helper
|
||||
$db->execute();
|
||||
$found = $db->getNumRows();
|
||||
if($found)
|
||||
{
|
||||
{
|
||||
return $db->loadResult();
|
||||
}
|
||||
return $id;
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* Get the actions permissions
|
||||
**/
|
||||
public static function getActions($view,&$record = null,$views = null)
|
||||
public static function getActions($view,&$record = null,$views = null)
|
||||
{
|
||||
jimport('joomla.access.access');
|
||||
|
||||
$user = JFactory::getUser();
|
||||
$result = new JObject;
|
||||
$view = self::safeString($view);
|
||||
if (self::checkString($views))
|
||||
{
|
||||
if (self::checkString($views))
|
||||
{
|
||||
$views = self::safeString($views);
|
||||
}
|
||||
}
|
||||
// get all actions from component
|
||||
$actions = JAccess::getActions('com_###component###', 'component');
|
||||
// set acctions only set in component settiongs
|
||||
$componentActions = array('core.admin','core.manage','core.options','core.export');
|
||||
// set acctions only set in component settiongs
|
||||
$componentActions = array('core.admin','core.manage','core.options','core.export');
|
||||
// loop the actions and set the permissions
|
||||
foreach ($actions as $action)
|
||||
{
|
||||
{
|
||||
// set to use component default
|
||||
$fallback= true;
|
||||
if (self::checkObject($record) && isset($record->id) && $record->id > 0 && !in_array($action->name,$componentActions))
|
||||
@ -349,17 +349,17 @@ abstract class ###Component###Helper
|
||||
}
|
||||
elseif (self::checkString($views) && isset($record->catid) && $record->catid > 0)
|
||||
{
|
||||
// make sure we use the core. action check for the categories
|
||||
if (strpos($action->name,$view) !== false && strpos($action->name,'core.') === false ) {
|
||||
$coreCheck = explode('.',$action->name);
|
||||
$coreCheck[0] = 'core';
|
||||
$categoryCheck = implode('.',$coreCheck);
|
||||
}
|
||||
else
|
||||
{
|
||||
$categoryCheck = $action->name;
|
||||
}
|
||||
// The record has a category. Check the category permissions.
|
||||
// make sure we use the core. action check for the categories
|
||||
if (strpos($action->name,$view) !== false && strpos($action->name,'core.') === false ) {
|
||||
$coreCheck = explode('.',$action->name);
|
||||
$coreCheck[0] = 'core';
|
||||
$categoryCheck = implode('.',$coreCheck);
|
||||
}
|
||||
else
|
||||
{
|
||||
$categoryCheck = $action->name;
|
||||
}
|
||||
// The record has a category. Check the category permissions.
|
||||
$catpermission = $user->authorise($categoryCheck, 'com_###component###.'.$views.'.category.' . (int) $record->catid);
|
||||
if (!$catpermission && !is_null($catpermission))
|
||||
{
|
||||
@ -740,8 +740,8 @@ abstract class ###Component###Helper
|
||||
$string = self::replaceNumbers($string);
|
||||
}
|
||||
// 0nly continue if we have a string
|
||||
if (self::checkString($string))
|
||||
{
|
||||
if (self::checkString($string))
|
||||
{
|
||||
// create file name without the extention that is safe
|
||||
if ($type === 'filename')
|
||||
{
|
||||
@ -764,12 +764,12 @@ abstract class ###Component###Helper
|
||||
$string = preg_replace("/[^A-Za-z ]/", '', $string);
|
||||
// select final adaptations
|
||||
if ($type === 'L' || $type === 'strtolower')
|
||||
{
|
||||
// replace white space with underscore
|
||||
$string = preg_replace('/\s+/', $spacer, $string);
|
||||
// default is to return lower
|
||||
return strtolower($string);
|
||||
}
|
||||
{
|
||||
// replace white space with underscore
|
||||
$string = preg_replace('/\s+/', $spacer, $string);
|
||||
// default is to return lower
|
||||
return strtolower($string);
|
||||
}
|
||||
elseif ($type === 'W')
|
||||
{
|
||||
// return a string with all first letter of each word uppercase(no undersocre)
|
||||
@ -790,21 +790,21 @@ abstract class ###Component###Helper
|
||||
// return a string with all the uppercase(no undersocre)
|
||||
return strtoupper($string);
|
||||
}
|
||||
elseif ($type === 'U' || $type === 'strtoupper')
|
||||
{
|
||||
// replace white space with underscore
|
||||
$string = preg_replace('/\s+/', $spacer, $string);
|
||||
// return all upper
|
||||
return strtoupper($string);
|
||||
}
|
||||
elseif ($type === 'F' || $type === 'ucfirst')
|
||||
{
|
||||
// replace white space with underscore
|
||||
$string = preg_replace('/\s+/', $spacer, $string);
|
||||
// return with first caracter to upper
|
||||
return ucfirst(strtolower($string));
|
||||
}
|
||||
elseif ($type === 'cA' || $type === 'cAmel' || $type === 'camelcase')
|
||||
elseif ($type === 'U' || $type === 'strtoupper')
|
||||
{
|
||||
// replace white space with underscore
|
||||
$string = preg_replace('/\s+/', $spacer, $string);
|
||||
// return all upper
|
||||
return strtoupper($string);
|
||||
}
|
||||
elseif ($type === 'F' || $type === 'ucfirst')
|
||||
{
|
||||
// replace white space with underscore
|
||||
$string = preg_replace('/\s+/', $spacer, $string);
|
||||
// return with first caracter to upper
|
||||
return ucfirst(strtolower($string));
|
||||
}
|
||||
elseif ($type === 'cA' || $type === 'cAmel' || $type === 'camelcase')
|
||||
{
|
||||
// convert all words to first letter uppercase
|
||||
$string = ucwords(strtolower($string));
|
||||
@ -813,14 +813,14 @@ abstract class ###Component###Helper
|
||||
// now return first letter lowercase
|
||||
return lcfirst($string);
|
||||
}
|
||||
// return string
|
||||
return $string;
|
||||
}
|
||||
// not a string
|
||||
return '';
|
||||
// return string
|
||||
return $string;
|
||||
}
|
||||
// not a string
|
||||
return '';
|
||||
}
|
||||
|
||||
public static function htmlEscape($var, $charset = 'UTF-8', $shorten = false, $length = 40)
|
||||
public static function htmlEscape($var, $charset = 'UTF-8', $shorten = false, $length = 40)
|
||||
{
|
||||
if (self::checkString($var))
|
||||
{
|
||||
@ -831,11 +831,11 @@ abstract class ###Component###Helper
|
||||
return self::shorten($string,$length);
|
||||
}
|
||||
return $string;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return '';
|
||||
}
|
||||
}
|
||||
}###HELPER_LICENSE_LOCK###
|
||||
|
||||
public static function replaceNumbers($string)
|
||||
|
@ -190,8 +190,7 @@ abstract class ###Component###Email
|
||||
|
||||
// load the bounce email as sender if set
|
||||
if (!is_null($bounce_email))
|
||||
{
|
||||
|
||||
{
|
||||
$mail->Sender = $bounce_email;
|
||||
}
|
||||
|
||||
|
@ -37,9 +37,9 @@ abstract class ###Component###Helper
|
||||
|
||||
public static function jsonToString($value, $sperator = ", ", $table = null)
|
||||
{
|
||||
// check if string is JSON
|
||||
$result = json_decode($value, true);
|
||||
if (json_last_error() === JSON_ERROR_NONE)
|
||||
// check if string is JSON
|
||||
$result = json_decode($value, true);
|
||||
if (json_last_error() === JSON_ERROR_NONE)
|
||||
{
|
||||
// is JSON
|
||||
if (self::checkArray($result))
|
||||
@ -69,10 +69,10 @@ abstract class ###Component###Helper
|
||||
/**
|
||||
* Load the Component xml manifest.
|
||||
**/
|
||||
public static function manifest()
|
||||
{
|
||||
$manifestUrl = JPATH_ADMINISTRATOR."/components/com_###component###/###component###.xml";
|
||||
return simplexml_load_file($manifestUrl);
|
||||
public static function manifest()
|
||||
{
|
||||
$manifestUrl = JPATH_ADMINISTRATOR."/components/com_###component###/###component###.xml";
|
||||
return simplexml_load_file($manifestUrl);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -87,9 +87,9 @@ abstract class ###Component###Helper
|
||||
// get all Contributors (max 20)
|
||||
$searchArray = range('0','20');
|
||||
foreach($searchArray as $nr)
|
||||
{
|
||||
{
|
||||
if ((NULL !== $params->get("showContributor".$nr)) && ($params->get("showContributor".$nr) == 2 || $params->get("showContributor".$nr) == 3))
|
||||
{
|
||||
{
|
||||
// set link based of selected option
|
||||
if($params->get("useContributor".$nr) == 1)
|
||||
{
|
||||
@ -368,7 +368,7 @@ abstract class ###Component###Helper
|
||||
public static function isPublished($id,$type)
|
||||
{
|
||||
if ($type == 'raw')
|
||||
{
|
||||
{
|
||||
$type = 'item';
|
||||
}
|
||||
$db = JFactory::getDbo();
|
||||
@ -381,7 +381,7 @@ abstract class ###Component###Helper
|
||||
$db->execute();
|
||||
$found = $db->getNumRows();
|
||||
if($found)
|
||||
{
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@ -398,7 +398,7 @@ abstract class ###Component###Helper
|
||||
$db->execute();
|
||||
$found = $db->getNumRows();
|
||||
if($found)
|
||||
{
|
||||
{
|
||||
return $db->loadResult();
|
||||
}
|
||||
return $id;
|
||||
@ -407,24 +407,24 @@ abstract class ###Component###Helper
|
||||
/**
|
||||
* Get the actions permissions
|
||||
**/
|
||||
public static function getActions($view,&$record = null,$views = null)
|
||||
public static function getActions($view,&$record = null,$views = null)
|
||||
{
|
||||
jimport('joomla.access.access');
|
||||
|
||||
$user = JFactory::getUser();
|
||||
$result = new JObject;
|
||||
$view = self::safeString($view);
|
||||
if (self::checkString($views))
|
||||
{
|
||||
if (self::checkString($views))
|
||||
{
|
||||
$views = self::safeString($views);
|
||||
}
|
||||
}
|
||||
// get all actions from component
|
||||
$actions = JAccess::getActions('com_###component###', 'component');
|
||||
// set acctions only set in component settiongs
|
||||
$componentActions = array('core.admin','core.manage','core.options','core.export');
|
||||
// set acctions only set in component settiongs
|
||||
$componentActions = array('core.admin','core.manage','core.options','core.export');
|
||||
// loop the actions and set the permissions
|
||||
foreach ($actions as $action)
|
||||
{
|
||||
{
|
||||
// set to use component default
|
||||
$fallback = true;
|
||||
if (self::checkObject($record) && isset($record->id) && $record->id > 0 && !in_array($action->name,$componentActions))
|
||||
@ -503,17 +503,17 @@ abstract class ###Component###Helper
|
||||
}
|
||||
elseif (self::checkString($views) && isset($record->catid) && $record->catid > 0)
|
||||
{
|
||||
// make sure we use the core. action check for the categories
|
||||
if (strpos($action->name,$view) !== false && strpos($action->name,'core.') === false ) {
|
||||
$coreCheck = explode('.',$action->name);
|
||||
$coreCheck[0] = 'core';
|
||||
$categoryCheck = implode('.',$coreCheck);
|
||||
}
|
||||
else
|
||||
{
|
||||
$categoryCheck = $action->name;
|
||||
}
|
||||
// The record has a category. Check the category permissions.
|
||||
// make sure we use the core. action check for the categories
|
||||
if (strpos($action->name,$view) !== false && strpos($action->name,'core.') === false ) {
|
||||
$coreCheck = explode('.',$action->name);
|
||||
$coreCheck[0] = 'core';
|
||||
$categoryCheck = implode('.',$coreCheck);
|
||||
}
|
||||
else
|
||||
{
|
||||
$categoryCheck = $action->name;
|
||||
}
|
||||
// The record has a category. Check the category permissions.
|
||||
$catpermission = $user->authorise($categoryCheck, 'com_###component###.'.$views.'.category.' . (int) $record->catid);
|
||||
if (!$catpermission && !is_null($catpermission))
|
||||
{
|
||||
@ -655,7 +655,7 @@ abstract class ###Component###Helper
|
||||
{
|
||||
// If example.com is down, then probably the whole internet is down, since IANA maintains the domain. Right?
|
||||
$connected = @fsockopen("www.example.com", 80);
|
||||
// website, port (try 80 or 443)
|
||||
// website, port (try 80 or 443)
|
||||
if ($connected)
|
||||
{
|
||||
//action when connected
|
||||
@ -735,8 +735,8 @@ abstract class ###Component###Helper
|
||||
$string = self::replaceNumbers($string);
|
||||
}
|
||||
// 0nly continue if we have a string
|
||||
if (self::checkString($string))
|
||||
{
|
||||
if (self::checkString($string))
|
||||
{
|
||||
// create file name without the extention that is safe
|
||||
if ($type === 'filename')
|
||||
{
|
||||
@ -759,12 +759,12 @@ abstract class ###Component###Helper
|
||||
$string = preg_replace("/[^A-Za-z ]/", '', $string);
|
||||
// select final adaptations
|
||||
if ($type === 'L' || $type === 'strtolower')
|
||||
{
|
||||
// replace white space with underscore
|
||||
$string = preg_replace('/\s+/', $spacer, $string);
|
||||
// default is to return lower
|
||||
return strtolower($string);
|
||||
}
|
||||
{
|
||||
// replace white space with underscore
|
||||
$string = preg_replace('/\s+/', $spacer, $string);
|
||||
// default is to return lower
|
||||
return strtolower($string);
|
||||
}
|
||||
elseif ($type === 'W')
|
||||
{
|
||||
// return a string with all first letter of each word uppercase(no undersocre)
|
||||
@ -785,21 +785,21 @@ abstract class ###Component###Helper
|
||||
// return a string with all the uppercase(no undersocre)
|
||||
return strtoupper($string);
|
||||
}
|
||||
elseif ($type === 'U' || $type === 'strtoupper')
|
||||
{
|
||||
// replace white space with underscore
|
||||
$string = preg_replace('/\s+/', $spacer, $string);
|
||||
// return all upper
|
||||
return strtoupper($string);
|
||||
}
|
||||
elseif ($type === 'F' || $type === 'ucfirst')
|
||||
{
|
||||
// replace white space with underscore
|
||||
$string = preg_replace('/\s+/', $spacer, $string);
|
||||
// return with first caracter to upper
|
||||
return ucfirst(strtolower($string));
|
||||
}
|
||||
elseif ($type === 'cA' || $type === 'cAmel' || $type === 'camelcase')
|
||||
elseif ($type === 'U' || $type === 'strtoupper')
|
||||
{
|
||||
// replace white space with underscore
|
||||
$string = preg_replace('/\s+/', $spacer, $string);
|
||||
// return all upper
|
||||
return strtoupper($string);
|
||||
}
|
||||
elseif ($type === 'F' || $type === 'ucfirst')
|
||||
{
|
||||
// replace white space with underscore
|
||||
$string = preg_replace('/\s+/', $spacer, $string);
|
||||
// return with first caracter to upper
|
||||
return ucfirst(strtolower($string));
|
||||
}
|
||||
elseif ($type === 'cA' || $type === 'cAmel' || $type === 'camelcase')
|
||||
{
|
||||
// convert all words to first letter uppercase
|
||||
$string = ucwords(strtolower($string));
|
||||
@ -808,11 +808,11 @@ abstract class ###Component###Helper
|
||||
// now return first letter lowercase
|
||||
return lcfirst($string);
|
||||
}
|
||||
// return string
|
||||
return $string;
|
||||
}
|
||||
// not a string
|
||||
return '';
|
||||
// return string
|
||||
return $string;
|
||||
}
|
||||
// not a string
|
||||
return '';
|
||||
}
|
||||
|
||||
public static function htmlEscape($var, $charset = 'UTF-8', $shorten = false, $length = 40)
|
||||
|
@ -49,11 +49,11 @@ class ###Component###Model###SView### extends JModelItem
|
||||
*
|
||||
* @var strings
|
||||
*/
|
||||
protected $user;
|
||||
protected $userId;
|
||||
protected $guest;
|
||||
protected $groups;
|
||||
protected $levels;
|
||||
protected $user;
|
||||
protected $userId;
|
||||
protected $guest;
|
||||
protected $groups;
|
||||
protected $levels;
|
||||
protected $app;
|
||||
protected $input;
|
||||
protected $uikitComp;
|
||||
@ -74,10 +74,10 @@ class ###Component###Model###SView### extends JModelItem
|
||||
*/
|
||||
protected function populateState()
|
||||
{
|
||||
$this->app = JFactory::getApplication();
|
||||
$this->input = $this->app->input;
|
||||
$this->app = JFactory::getApplication();
|
||||
$this->input = $this->app->input;
|
||||
// Get the item main id
|
||||
$id = $this->input->getInt('id', null);
|
||||
$id = $this->input->getInt('id', null);
|
||||
$this->setState('###sview###.id', $id);
|
||||
|
||||
// Load the parameters.
|
||||
@ -94,21 +94,21 @@ 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('###sview###.access', 'com_###component###'))
|
||||
{
|
||||
// check if this user has permission to access item
|
||||
if (!$this->user->authorise('###sview###.access', 'com_###component###'))
|
||||
{
|
||||
$app = JFactory::getApplication();
|
||||
$app->enqueueMessage(JText::_('Not authorised!'), 'error');
|
||||
// redirect away if not a correct to cPanel/default view
|
||||
$app->redirect('index.php?option=com_###component###');
|
||||
return false;
|
||||
}
|
||||
$this->userId = $this->user->get('id');
|
||||
$this->guest = $this->user->get('guest');
|
||||
$this->groups = $this->user->get('groups');
|
||||
$this->authorisedGroups = $this->user->getAuthorisedGroups();
|
||||
$this->levels = $this->user->getAuthorisedViewLevels();
|
||||
$this->initSet = true;
|
||||
}
|
||||
$this->userId = $this->user->get('id');
|
||||
$this->guest = $this->user->get('guest');
|
||||
$this->groups = $this->user->get('groups');
|
||||
$this->authorisedGroups = $this->user->getAuthorisedGroups();
|
||||
$this->levels = $this->user->getAuthorisedViewLevels();
|
||||
$this->initSet = true;
|
||||
|
||||
$pk = (!empty($pk)) ? $pk : (int) $this->getState('###sview###.id');###CUSTOM_ADMIN_BEFORE_GET_ITEM###
|
||||
|
||||
|
@ -74,10 +74,10 @@ class ###Component###Model###SView### extends JModelItem
|
||||
*/
|
||||
protected function populateState()
|
||||
{
|
||||
$this->app = JFactory::getApplication();
|
||||
$this->input = $this->app->input;
|
||||
$this->app = JFactory::getApplication();
|
||||
$this->input = $this->app->input;
|
||||
// Get the itme main id
|
||||
$id = $this->input->getInt('id', null);
|
||||
$id = $this->input->getInt('id', null);
|
||||
$this->setState('###sview###.id', $id);
|
||||
|
||||
// Load the parameters.
|
||||
@ -95,13 +95,13 @@ class ###Component###Model###SView### extends JModelItem
|
||||
*/
|
||||
public function getItem($pk = null)
|
||||
{
|
||||
$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');
|
||||
$this->authorisedGroups = $this->user->getAuthorisedGroups();
|
||||
$this->levels = $this->user->getAuthorisedViewLevels();
|
||||
$this->initSet = true;
|
||||
$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');
|
||||
$this->authorisedGroups = $this->user->getAuthorisedGroups();
|
||||
$this->levels = $this->user->getAuthorisedViewLevels();
|
||||
$this->initSet = true;
|
||||
|
||||
$pk = (!empty($pk)) ? $pk : (int) $this->getState('###sview###.id');###SITE_BEFORE_GET_ITEM###
|
||||
|
||||
|
@ -92,10 +92,10 @@ class ###Component###ModelImport extends JModelLegacy
|
||||
public function import()
|
||||
{
|
||||
$this->setState('action', 'import');
|
||||
$app = JFactory::getApplication();
|
||||
$session = JFactory::getSession();
|
||||
$package = null;
|
||||
$continue = false;
|
||||
$app = JFactory::getApplication();
|
||||
$session = JFactory::getSession();
|
||||
$package = null;
|
||||
$continue = false;
|
||||
// get import type
|
||||
$this->getType = $app->input->getString('gettype', NULL);
|
||||
// get import type
|
||||
@ -150,7 +150,7 @@ class ###Component###ModelImport extends JModelLegacy
|
||||
|
||||
// first link data to table headers
|
||||
if(!$continue){
|
||||
$package = json_encode($package);
|
||||
$package = json_encode($package);
|
||||
$session->set('package', $package);
|
||||
$session->set('dataType', $this->dataType);
|
||||
$session->set('hasPackage', true);
|
||||
@ -202,8 +202,8 @@ class ###Component###ModelImport extends JModelLegacy
|
||||
protected function _getPackageFromUpload()
|
||||
{
|
||||
// Get the uploaded file information
|
||||
$app = JFactory::getApplication();
|
||||
$input = $app->input;
|
||||
$app = JFactory::getApplication();
|
||||
$input = $app->input;
|
||||
|
||||
// Do not change the filter type 'raw'. We need this to let files containing PHP code to upload. See JInputFiles::get.
|
||||
$userfile = $input->files->get('import_package', null, 'raw');
|
||||
@ -230,9 +230,9 @@ class ###Component###ModelImport extends JModelLegacy
|
||||
}
|
||||
|
||||
// Build the appropriate paths
|
||||
$config = JFactory::getConfig();
|
||||
$tmp_dest = $config->get('tmp_path') . '/' . $userfile['name'];
|
||||
$tmp_src = $userfile['tmp_name'];
|
||||
$config = JFactory::getConfig();
|
||||
$tmp_dest = $config->get('tmp_path') . '/' . $userfile['name'];
|
||||
$tmp_src = $userfile['tmp_name'];
|
||||
|
||||
// Move uploaded file
|
||||
jimport('joomla.filesystem.file');
|
||||
@ -263,8 +263,8 @@ class ###Component###ModelImport extends JModelLegacy
|
||||
*/
|
||||
protected function _getPackageFromFolder()
|
||||
{
|
||||
$app = JFactory::getApplication();
|
||||
$input = $app->input;
|
||||
$app = JFactory::getApplication();
|
||||
$input = $app->input;
|
||||
|
||||
// Get the path to the package to import
|
||||
$p_dir = $input->getString('import_directory');
|
||||
@ -294,8 +294,8 @@ class ###Component###ModelImport extends JModelLegacy
|
||||
}
|
||||
|
||||
$package['packagename'] = null;
|
||||
$package['dir'] = $p_dir;
|
||||
$package['type'] = $type;
|
||||
$package['dir'] = $p_dir;
|
||||
$package['type'] = $type;
|
||||
|
||||
return $package;
|
||||
}
|
||||
@ -308,8 +308,8 @@ class ###Component###ModelImport extends JModelLegacy
|
||||
*/
|
||||
protected function _getPackageFromUrl()
|
||||
{
|
||||
$app = JFactory::getApplication();
|
||||
$input = $app->input;
|
||||
$app = JFactory::getApplication();
|
||||
$input = $app->input;
|
||||
|
||||
// Get the URL of the package to import
|
||||
$url = $input->getString('import_url');
|
||||
@ -348,7 +348,7 @@ class ###Component###ModelImport extends JModelLegacy
|
||||
*/
|
||||
protected function check($archivename)
|
||||
{
|
||||
$app = JFactory::getApplication();
|
||||
$app = JFactory::getApplication();
|
||||
// Clean the name
|
||||
$archivename = JPath::clean($archivename);
|
||||
|
||||
@ -361,15 +361,15 @@ class ###Component###ModelImport extends JModelLegacy
|
||||
return false;
|
||||
}
|
||||
|
||||
$config = JFactory::getConfig();
|
||||
$config = JFactory::getConfig();
|
||||
// set Package Name
|
||||
$check['packagename'] = $archivename;
|
||||
$check['packagename'] = $archivename;
|
||||
|
||||
// set directory
|
||||
$check['dir'] = $config->get('tmp_path'). '/' .$archivename;
|
||||
$check['dir'] = $config->get('tmp_path'). '/' .$archivename;
|
||||
|
||||
// set type
|
||||
$check['type'] = $this->getType;
|
||||
$check['type'] = $this->getType;
|
||||
|
||||
return $check;
|
||||
}
|
||||
@ -408,8 +408,8 @@ class ###Component###ModelImport extends JModelLegacy
|
||||
{
|
||||
jimport('joomla.filesystem.file');
|
||||
|
||||
$config = JFactory::getConfig();
|
||||
$package = $config->get('tmp_path'). '/' .$package;
|
||||
$config = JFactory::getConfig();
|
||||
$package = $config->get('tmp_path'). '/' .$package;
|
||||
|
||||
// Is the package file a valid file?
|
||||
if (is_file($package))
|
||||
@ -472,11 +472,11 @@ class ###Component###ModelImport extends JModelLegacy
|
||||
if(###Component###Helper::checkArray($data['array']))
|
||||
{
|
||||
// get user object
|
||||
$user = JFactory::getUser();
|
||||
$user = JFactory::getUser();
|
||||
// remove header if it has headers
|
||||
$id_key = $data['target_headers']['id'];
|
||||
$published_key = $data['target_headers']['published'];
|
||||
$ordering_key = $data['target_headers']['ordering'];
|
||||
$id_key = $data['target_headers']['id'];
|
||||
$published_key = $data['target_headers']['published'];
|
||||
$ordering_key = $data['target_headers']['ordering'];
|
||||
// get the first array set
|
||||
$firstSet = reset($data['array']);
|
||||
|
||||
@ -494,13 +494,13 @@ class ###Component###ModelImport extends JModelLegacy
|
||||
// Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
// set some defaults
|
||||
$todayDate = JFactory::getDate()->toSql();
|
||||
$todayDate = JFactory::getDate()->toSql();
|
||||
// get global action permissions
|
||||
$canDo = ###Component###Helper::getActions($table);
|
||||
$canEdit = $canDo->get('core.edit');
|
||||
$canState = $canDo->get('core.edit.state');
|
||||
$canCreate = $canDo->get('core.create');
|
||||
$hasAlias = $this->getAliasesUsed($table);
|
||||
$canDo = ###Component###Helper::getActions($table);
|
||||
$canEdit = $canDo->get('core.edit');
|
||||
$canState = $canDo->get('core.edit.state');
|
||||
$canCreate = $canDo->get('core.create');
|
||||
$hasAlias = $this->getAliasesUsed($table);
|
||||
// prosses the data
|
||||
foreach($data['array'] as $row)
|
||||
{
|
||||
@ -522,11 +522,11 @@ class ###Component###ModelImport extends JModelLegacy
|
||||
if($found && $canEdit)
|
||||
{
|
||||
// update item
|
||||
$id = $row[$id_key];
|
||||
$version = $db->loadResult();
|
||||
$id = $row[$id_key];
|
||||
$version = $db->loadResult();
|
||||
// reset all buckets
|
||||
$query = $db->getQuery(true);
|
||||
$fields = array();
|
||||
$query = $db->getQuery(true);
|
||||
$fields = array();
|
||||
// Fields to update.
|
||||
foreach($row as $key => $cell)
|
||||
{
|
||||
@ -571,8 +571,8 @@ class ###Component###ModelImport extends JModelLegacy
|
||||
}
|
||||
}
|
||||
// load the defaults
|
||||
$fields[] = $db->quoteName('modified_by') . ' = ' . $db->quote($user->id);
|
||||
$fields[] = $db->quoteName('modified') . ' = ' . $db->quote($todayDate);
|
||||
$fields[] = $db->quoteName('modified_by') . ' = ' . $db->quote($user->id);
|
||||
$fields[] = $db->quoteName('modified') . ' = ' . $db->quote($todayDate);
|
||||
// Conditions for which records should be updated.
|
||||
$conditions = array(
|
||||
$db->quoteName('id') . ' = ' . $id
|
||||
@ -587,9 +587,9 @@ class ###Component###ModelImport extends JModelLegacy
|
||||
// insert item
|
||||
$query = $db->getQuery(true);
|
||||
// reset all buckets
|
||||
$columns = array();
|
||||
$values = array();
|
||||
$version = false;
|
||||
$columns = array();
|
||||
$values = array();
|
||||
$version = false;
|
||||
// Insert columns. Insert values.
|
||||
foreach($row as $key => $cell)
|
||||
{
|
||||
@ -627,30 +627,30 @@ class ###Component###ModelImport extends JModelLegacy
|
||||
// set to insert array
|
||||
if(in_array($key, $data['target_headers']) && is_numeric($cell))
|
||||
{
|
||||
$columns[] = $target[$key];
|
||||
$values[] = $cell;
|
||||
$columns[] = $target[$key];
|
||||
$values[] = $cell;
|
||||
}
|
||||
elseif(in_array($key, $data['target_headers']) && is_string($cell))
|
||||
{
|
||||
$columns[] = $target[$key];
|
||||
$values[] = $db->quote($cell);
|
||||
$columns[] = $target[$key];
|
||||
$values[] = $db->quote($cell);
|
||||
}
|
||||
elseif(in_array($key, $data['target_headers']) && is_null($cell))
|
||||
{
|
||||
// if import data is null then set empty
|
||||
$columns[] = $target[$key];
|
||||
$values[] = "''";
|
||||
$columns[] = $target[$key];
|
||||
$values[] = "''";
|
||||
}
|
||||
}
|
||||
// load the defaults
|
||||
$columns[] = 'created_by';
|
||||
$values[] = $db->quote($user->id);
|
||||
$columns[] = 'created';
|
||||
$values[] = $db->quote($todayDate);
|
||||
$columns[] = 'created_by';
|
||||
$values[] = $db->quote($user->id);
|
||||
$columns[] = 'created';
|
||||
$values[] = $db->quote($todayDate);
|
||||
if (!$version)
|
||||
{
|
||||
$columns[] = 'version';
|
||||
$values[] = 1;
|
||||
$columns[] = 'version';
|
||||
$values[] = 1;
|
||||
}
|
||||
// Prepare the insert query.
|
||||
$query
|
||||
|
@ -59,8 +59,8 @@ class ###Component###Model###View### extends JModelLegacy
|
||||
/**
|
||||
* Import Settings
|
||||
*/
|
||||
protected $getType = NULL;
|
||||
protected $dataType = NULL;
|
||||
protected $getType = NULL;
|
||||
protected $dataType = NULL;
|
||||
|
||||
/**
|
||||
* Method to auto-populate the model state.
|
||||
@ -92,8 +92,8 @@ class ###Component###Model###View### extends JModelLegacy
|
||||
protected function _getPackageFromUpload()
|
||||
{
|
||||
// Get the uploaded file information
|
||||
$app = JFactory::getApplication();
|
||||
$input = $app->input;
|
||||
$app = JFactory::getApplication();
|
||||
$input = $app->input;
|
||||
|
||||
// Do not change the filter type 'raw'. We need this to let files containing PHP code to upload. See JInputFiles::get.
|
||||
$userfile = $input->files->get('import_package', null, 'raw');
|
||||
@ -120,9 +120,9 @@ class ###Component###Model###View### extends JModelLegacy
|
||||
}
|
||||
|
||||
// Build the appropriate paths
|
||||
$config = JFactory::getConfig();
|
||||
$tmp_dest = $config->get('tmp_path') . '/' . $userfile['name'];
|
||||
$tmp_src = $userfile['tmp_name'];
|
||||
$config = JFactory::getConfig();
|
||||
$tmp_dest = $config->get('tmp_path') . '/' . $userfile['name'];
|
||||
$tmp_src = $userfile['tmp_name'];
|
||||
|
||||
// Move uploaded file
|
||||
jimport('joomla.filesystem.file');
|
||||
@ -153,8 +153,8 @@ class ###Component###Model###View### extends JModelLegacy
|
||||
*/
|
||||
protected function _getPackageFromFolder()
|
||||
{
|
||||
$app = JFactory::getApplication();
|
||||
$input = $app->input;
|
||||
$app = JFactory::getApplication();
|
||||
$input = $app->input;
|
||||
|
||||
// Get the path to the package to import
|
||||
$p_dir = $input->getString('import_directory');
|
||||
@ -184,8 +184,8 @@ class ###Component###Model###View### extends JModelLegacy
|
||||
}
|
||||
|
||||
$package['packagename'] = null;
|
||||
$package['dir'] = $p_dir;
|
||||
$package['type'] = $type;
|
||||
$package['dir'] = $p_dir;
|
||||
$package['type'] = $type;
|
||||
|
||||
return $package;
|
||||
}
|
||||
@ -198,8 +198,8 @@ class ###Component###Model###View### extends JModelLegacy
|
||||
*/
|
||||
protected function _getPackageFromUrl()
|
||||
{
|
||||
$app = JFactory::getApplication();
|
||||
$input = $app->input;
|
||||
$app = JFactory::getApplication();
|
||||
$input = $app->input;
|
||||
|
||||
// Get the URL of the package to import
|
||||
$url = $input->getString('import_url');
|
||||
@ -238,7 +238,7 @@ class ###Component###Model###View### extends JModelLegacy
|
||||
*/
|
||||
protected function check($archivename)
|
||||
{
|
||||
$app = JFactory::getApplication();
|
||||
$app = JFactory::getApplication();
|
||||
// Clean the name
|
||||
$archivename = JPath::clean($archivename);
|
||||
|
||||
@ -251,15 +251,15 @@ class ###Component###Model###View### extends JModelLegacy
|
||||
return false;
|
||||
}
|
||||
|
||||
$config = JFactory::getConfig();
|
||||
$config = JFactory::getConfig();
|
||||
// set Package Name
|
||||
$check['packagename'] = $archivename;
|
||||
$check['packagename'] = $archivename;
|
||||
|
||||
// set directory
|
||||
$check['dir'] = $config->get('tmp_path'). '/' .$archivename;
|
||||
$check['dir'] = $config->get('tmp_path'). '/' .$archivename;
|
||||
|
||||
// set type
|
||||
$check['type'] = $this->getType;
|
||||
$check['type'] = $this->getType;
|
||||
|
||||
return $check;
|
||||
}
|
||||
@ -277,8 +277,8 @@ class ###Component###Model###View### extends JModelLegacy
|
||||
{
|
||||
jimport('joomla.filesystem.file');
|
||||
|
||||
$config = JFactory::getConfig();
|
||||
$package = $config->get('tmp_path'). '/' .$package;
|
||||
$config = JFactory::getConfig();
|
||||
$package = $config->get('tmp_path'). '/' .$package;
|
||||
|
||||
// Is the package file a valid file?
|
||||
if (is_file($package))
|
||||
|
@ -59,15 +59,15 @@ class ###Component###Model###SViews### extends JModelList
|
||||
protected function getListQuery()
|
||||
{
|
||||
// Get the current user for authorisation checks
|
||||
$this->user = JFactory::getUser();
|
||||
$this->userId = $this->user->get('id');
|
||||
$this->guest = $this->user->get('guest');
|
||||
$this->groups = $this->user->get('groups');
|
||||
$this->user = JFactory::getUser();
|
||||
$this->userId = $this->user->get('id');
|
||||
$this->guest = $this->user->get('guest');
|
||||
$this->groups = $this->user->get('groups');
|
||||
$this->authorisedGroups = $this->user->getAuthorisedGroups();
|
||||
$this->levels = $this->user->getAuthorisedViewLevels();
|
||||
$this->app = JFactory::getApplication();
|
||||
$this->input = $this->app->input;
|
||||
$this->initSet = true; ###CUSTOM_ADMIN_GET_LIST_QUERY###
|
||||
$this->levels = $this->user->getAuthorisedViewLevels();
|
||||
$this->app = JFactory::getApplication();
|
||||
$this->input = $this->app->input;
|
||||
$this->initSet = true; ###CUSTOM_ADMIN_GET_LIST_QUERY###
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -59,15 +59,15 @@ class ###Component###Model###SViews### extends JModelList
|
||||
protected function getListQuery()
|
||||
{
|
||||
// Get the current user for authorisation checks
|
||||
$this->user = JFactory::getUser();
|
||||
$this->userId = $this->user->get('id');
|
||||
$this->guest = $this->user->get('guest');
|
||||
$this->groups = $this->user->get('groups');
|
||||
$this->authorisedGroups = $this->user->getAuthorisedGroups();
|
||||
$this->levels = $this->user->getAuthorisedViewLevels();
|
||||
$this->app = JFactory::getApplication();
|
||||
$this->input = $this->app->input;
|
||||
$this->initSet = true; ###SITE_GET_LIST_QUERY###
|
||||
$this->user = JFactory::getUser();
|
||||
$this->userId = $this->user->get('id');
|
||||
$this->guest = $this->user->get('guest');
|
||||
$this->groups = $this->user->get('groups');
|
||||
$this->authorisedGroups = $this->user->getAuthorisedGroups();
|
||||
$this->levels = $this->user->getAuthorisedViewLevels();
|
||||
$this->app = JFactory::getApplication();
|
||||
$this->input = $this->app->input;
|
||||
$this->initSet = true; ###SITE_GET_LIST_QUERY###
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -41,13 +41,13 @@ class ###Component###View###SView### extends JViewLegacy
|
||||
function display($tpl = null)
|
||||
{
|
||||
// get component params
|
||||
$this->params = JComponentHelper::getParams('com_###component###');
|
||||
$this->params = JComponentHelper::getParams('com_###component###');
|
||||
// get the application
|
||||
$this->app = JFactory::getApplication();
|
||||
$this->app = JFactory::getApplication();
|
||||
// get the user object
|
||||
$this->user = JFactory::getUser();
|
||||
$this->user = JFactory::getUser();
|
||||
// get global action permissions
|
||||
$this->canDo = ###Component###Helper::getActions('###sview###');###CUSTOM_ADMIN_DIPLAY_METHOD###
|
||||
$this->canDo = ###Component###Helper::getActions('###sview###');###CUSTOM_ADMIN_DIPLAY_METHOD###
|
||||
}###CUSTOM_ADMIN_EXTRA_DIPLAY_METHODS###
|
||||
|
||||
/**
|
||||
|
@ -44,17 +44,17 @@ class ###Component###View###View### extends JViewLegacy
|
||||
public function display($tpl = null)
|
||||
{
|
||||
// Assign the variables
|
||||
$this->form = $this->get('Form');
|
||||
$this->item = $this->get('Item');
|
||||
$this->script = $this->get('Script');
|
||||
$this->state = $this->get('State');
|
||||
$this->form = $this->get('Form');
|
||||
$this->item = $this->get('Item');
|
||||
$this->script = $this->get('Script');
|
||||
$this->state = $this->get('State');
|
||||
// get action permissions
|
||||
$this->canDo = ###Component###Helper::getActions('###view###',$this->item);
|
||||
$this->canDo = ###Component###Helper::getActions('###view###',$this->item);
|
||||
// get input
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
$this->ref = $jinput->get('ref', 0, 'word');
|
||||
$this->refid = $jinput->get('refid', 0, 'int');
|
||||
$this->referral = '';
|
||||
$this->ref = $jinput->get('ref', 0, 'word');
|
||||
$this->refid = $jinput->get('refid', 0, 'int');
|
||||
$this->referral = '';
|
||||
if ($this->refid)
|
||||
{
|
||||
// return to the item that refered to this item
|
||||
|
@ -50,15 +50,15 @@ class ###Component###View###Views### extends JViewLegacy
|
||||
}
|
||||
|
||||
// Assign data to the view
|
||||
$this->items = $this->get('Items');
|
||||
$this->pagination = $this->get('Pagination');
|
||||
$this->state = $this->get('State');
|
||||
$this->user = JFactory::getUser();
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$this->listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$this->saveOrder = $this->listOrder == 'ordering';
|
||||
$this->items = $this->get('Items');
|
||||
$this->pagination = $this->get('Pagination');
|
||||
$this->state = $this->get('State');
|
||||
$this->user = JFactory::getUser();
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$this->listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$this->saveOrder = $this->listOrder == 'ordering';
|
||||
// get global action permissions
|
||||
$this->canDo = ###Component###Helper::getActions('###view###');###JVIEWLISTCANDO###
|
||||
$this->canDo = ###Component###Helper::getActions('###view###');###JVIEWLISTCANDO###
|
||||
|
||||
// We don't need toolbar in the modal window.
|
||||
if ($this->getLayout() !== 'modal')
|
||||
@ -153,7 +153,7 @@ class ###Component###View###Views### extends JViewLegacy
|
||||
// add the options comp button
|
||||
if ($this->canDo->get('core.admin') || $this->canDo->get('core.options'))
|
||||
{
|
||||
JToolBarHelper::preferences('com_###component###');
|
||||
JToolBarHelper::preferences('com_###component###');
|
||||
}
|
||||
|
||||
if ($this->canState)
|
||||
|
@ -41,13 +41,13 @@ class ###Component###View###SViews### extends JViewLegacy
|
||||
function display($tpl = null)
|
||||
{
|
||||
// get component params
|
||||
$this->params = JComponentHelper::getParams('com_###component###');
|
||||
$this->params = JComponentHelper::getParams('com_###component###');
|
||||
// get the application
|
||||
$this->app = JFactory::getApplication();
|
||||
$this->app = JFactory::getApplication();
|
||||
// get the user object
|
||||
$this->user = JFactory::getUser();
|
||||
// get global action permissions
|
||||
$this->canDo = ###Component###Helper::getActions('###sview###');###CUSTOM_ADMIN_DIPLAY_METHOD###
|
||||
$this->canDo = ###Component###Helper::getActions('###sview###');###CUSTOM_ADMIN_DIPLAY_METHOD###
|
||||
}###CUSTOM_ADMIN_EXTRA_DIPLAY_METHODS###
|
||||
|
||||
/**
|
||||
|
@ -2897,17 +2897,17 @@ class Interpretation extends Fields
|
||||
{
|
||||
// for single views
|
||||
$method .= PHP_EOL . "\t\t//" . $this->setLine(__LINE__) . " Initialise variables.";
|
||||
$method .= PHP_EOL . "\t\t\$this->item\t= \$this->get('Item');";
|
||||
$method .= PHP_EOL . "\t\t\$this->item = \$this->get('Item');";
|
||||
}
|
||||
elseif ($view['settings']->main_get->gettype == 2)
|
||||
{
|
||||
// for list views
|
||||
$method .= PHP_EOL . "\t\t//" . $this->setLine(__LINE__) . " Initialise variables.";
|
||||
$method .= PHP_EOL . "\t\t\$this->items\t= \$this->get('Items');";
|
||||
$method .= PHP_EOL . "\t\t\$this->items = \$this->get('Items');";
|
||||
// only add if pagination is requered
|
||||
if ($view['settings']->main_get->pagination == 1)
|
||||
{
|
||||
$method .= PHP_EOL . "\t\t\$this->pagination\t= \$this->get('Pagination');";
|
||||
$method .= PHP_EOL . "\t\t\$this->pagination = \$this->get('Pagination');";
|
||||
}
|
||||
// add id to list view
|
||||
if (isset($this->customAdminViewListId[$view['settings']->code]))
|
||||
@ -2927,7 +2927,7 @@ class Interpretation extends Fields
|
||||
foreach ($view['settings']->custom_get as $custom_get)
|
||||
{
|
||||
$custom_get_name = str_replace('get', '', $custom_get->getcustom);
|
||||
$method .= PHP_EOL . "\t\t\$this->" . ComponentbuilderHelper::safeString($custom_get_name) . "\t= \$this->get('" . $custom_get_name . "');";
|
||||
$method .= PHP_EOL . "\t\t\$this->" . ComponentbuilderHelper::safeString($custom_get_name) . " = \$this->get('" . $custom_get_name . "');";
|
||||
}
|
||||
}
|
||||
// add custom script
|
||||
@ -7111,7 +7111,7 @@ class Interpretation extends Fields
|
||||
}
|
||||
$this->fileContentDynamic[$viewName_single . '_' . $layoutCodeName]['###LAYOUTITEMSHEADER###'] = $headerscript;
|
||||
// ###LINKEDVIEWITEMS### <<<DYNAMIC>>>
|
||||
$this->fileContentDynamic[$viewName_single]['###LINKEDVIEWITEMS###'] .= PHP_EOL . PHP_EOL . "\t\t//" . $this->setLine(__LINE__) . " Get Linked view data" . PHP_EOL . "\t\t\$this->" . $codeName . "\t\t= \$this->get('" . $functionName . "');";
|
||||
$this->fileContentDynamic[$viewName_single]['###LINKEDVIEWITEMS###'] .= PHP_EOL . PHP_EOL . "\t\t//" . $this->setLine(__LINE__) . " Get Linked view data" . PHP_EOL . "\t\t\$this->" . $codeName . " = \$this->get('" . $functionName . "');";
|
||||
// ###LINKEDVIEWTABLESCRIPTS### <<<DYNAMIC>>>
|
||||
$this->fileContentDynamic[$viewName_single]['###LINKEDVIEWTABLESCRIPTS###'] = $this->setFootableScripts();
|
||||
if (strpos($parentKey, '-R>') !== false || strpos($parentKey, '-A>') !== false)
|
||||
@ -10898,47 +10898,47 @@ class Interpretation extends Fields
|
||||
// check if the item has permissions for edit.
|
||||
if ($coreLoad && isset($core['core.edit']) && isset($this->permissionBuilder['global'][$core['core.edit']]) && ComponentbuilderHelper::checkArray($this->permissionBuilder['global'][$core['core.edit']]) && in_array($viewName_single, $this->permissionBuilder['global'][$core['core.edit']]))
|
||||
{
|
||||
$allow[] = PHP_EOL . "\t\t\$this->canEdit\t\t= \$this->canDo->get('" . $core['core.edit'] . "');";
|
||||
$allow[] = PHP_EOL . "\t\t\$this->canEdit = \$this->canDo->get('" . $core['core.edit'] . "');";
|
||||
}
|
||||
else
|
||||
{
|
||||
$allow[] = PHP_EOL . "\t\t\$this->canEdit\t\t= \$this->canDo->get('core.edit');";
|
||||
$allow[] = PHP_EOL . "\t\t\$this->canEdit = \$this->canDo->get('core.edit');";
|
||||
}
|
||||
// check if the item has permissions for edit state.
|
||||
if ($coreLoad && isset($core['core.edit.state']) && isset($this->permissionBuilder['global'][$core['core.edit.state']]) && ComponentbuilderHelper::checkArray($this->permissionBuilder['global'][$core['core.edit.state']]) && in_array($viewName_single, $this->permissionBuilder['global'][$core['core.edit.state']]))
|
||||
{
|
||||
$allow[] = "\t\t\$this->canState\t\t= \$this->canDo->get('" . $core['core.edit.state'] . "');";
|
||||
$allow[] = "\t\t\$this->canState = \$this->canDo->get('" . $core['core.edit.state'] . "');";
|
||||
}
|
||||
else
|
||||
{
|
||||
$allow[] = "\t\t\$this->canState\t\t= \$this->canDo->get('core.edit.state');";
|
||||
$allow[] = "\t\t\$this->canState = \$this->canDo->get('core.edit.state');";
|
||||
}
|
||||
// check if the item has permissions for create.
|
||||
if ($coreLoad && isset($core['core.create']) && isset($this->permissionBuilder['global'][$core['core.create']]) && ComponentbuilderHelper::checkArray($this->permissionBuilder['global'][$core['core.create']]) && in_array($viewName_single, $this->permissionBuilder['global'][$core['core.create']]))
|
||||
{
|
||||
$allow[] = "\t\t\$this->canCreate\t= \$this->canDo->get('" . $core['core.create'] . "');";
|
||||
$allow[] = "\t\t\$this->canCreate = \$this->canDo->get('" . $core['core.create'] . "');";
|
||||
}
|
||||
else
|
||||
{
|
||||
$allow[] = "\t\t\$this->canCreate\t= \$this->canDo->get('core.create');";
|
||||
$allow[] = "\t\t\$this->canCreate = \$this->canDo->get('core.create');";
|
||||
}
|
||||
// check if the item has permissions for delete.
|
||||
if ($coreLoad && isset($core['core.delete']) && isset($this->permissionBuilder['global'][$core['core.delete']]) && ComponentbuilderHelper::checkArray($this->permissionBuilder['global'][$core['core.delete']]) && in_array($viewName_single, $this->permissionBuilder['global'][$core['core.delete']]))
|
||||
{
|
||||
$allow[] = "\t\t\$this->canDelete\t= \$this->canDo->get('" . $core['core.delete'] . "');";
|
||||
$allow[] = "\t\t\$this->canDelete = \$this->canDo->get('" . $core['core.delete'] . "');";
|
||||
}
|
||||
else
|
||||
{
|
||||
$allow[] = "\t\t\$this->canDelete\t= \$this->canDo->get('core.delete');";
|
||||
$allow[] = "\t\t\$this->canDelete = \$this->canDo->get('core.delete');";
|
||||
}
|
||||
// check if the item has permissions for batch.
|
||||
if ($coreLoad && isset($core['core.batch']) && isset($this->permissionBuilder['global']['global'][$core['core.batch']]) && ComponentbuilderHelper::checkArray($this->permissionBuilder['global']['global'][$core['core.batch']]) && in_array($viewName_single, $this->permissionBuilder['global']['global'][$core['core.delete']]))
|
||||
{
|
||||
$allow[] = "\t\t\$this->canBatch\t= (\$this->canDo->get('" . $core['core.batch'] . "') && \$this->canDo->get('core.batch'));";
|
||||
$allow[] = "\t\t\$this->canBatch = (\$this->canDo->get('" . $core['core.batch'] . "') && \$this->canDo->get('core.batch'));";
|
||||
}
|
||||
else
|
||||
{
|
||||
$allow[] = "\t\t\$this->canBatch\t= \$this->canDo->get('core.batch');";
|
||||
$allow[] = "\t\t\$this->canBatch = \$this->canDo->get('core.batch');";
|
||||
}
|
||||
|
||||
return implode(PHP_EOL, $allow);
|
||||
|
@ -1842,10 +1842,10 @@ abstract class ComponentbuilderHelper
|
||||
/**
|
||||
* Load the Component xml manifest.
|
||||
**/
|
||||
public static function manifest()
|
||||
public static function manifest()
|
||||
{
|
||||
$manifestUrl = JPATH_ADMINISTRATOR."/components/com_componentbuilder/componentbuilder.xml";
|
||||
return simplexml_load_file($manifestUrl);
|
||||
$manifestUrl = JPATH_ADMINISTRATOR."/components/com_componentbuilder/componentbuilder.xml";
|
||||
return simplexml_load_file($manifestUrl);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1860,22 +1860,22 @@ abstract class ComponentbuilderHelper
|
||||
// get all Contributors (max 20)
|
||||
$searchArray = range('0','20');
|
||||
foreach($searchArray as $nr)
|
||||
{
|
||||
{
|
||||
if ((NULL !== $params->get("showContributor".$nr)) && ($params->get("showContributor".$nr) == 1 || $params->get("showContributor".$nr) == 3))
|
||||
{
|
||||
{
|
||||
// set link based of selected option
|
||||
if($params->get("useContributor".$nr) == 1)
|
||||
{
|
||||
{
|
||||
$link_front = '<a href="mailto:'.$params->get("emailContributor".$nr).'" target="_blank">';
|
||||
$link_back = '</a>';
|
||||
}
|
||||
elseif($params->get("useContributor".$nr) == 2)
|
||||
{
|
||||
elseif($params->get("useContributor".$nr) == 2)
|
||||
{
|
||||
$link_front = '<a href="'.$params->get("linkContributor".$nr).'" target="_blank">';
|
||||
$link_back = '</a>';
|
||||
}
|
||||
else
|
||||
{
|
||||
else
|
||||
{
|
||||
$link_front = '';
|
||||
$link_back = '';
|
||||
}
|
||||
@ -1963,10 +1963,10 @@ abstract class ComponentbuilderHelper
|
||||
**/
|
||||
public static function addSubmenu($submenu)
|
||||
{
|
||||
// load user for access menus
|
||||
$user = JFactory::getUser();
|
||||
// load the submenus to sidebar
|
||||
JHtmlSidebar::addEntry(JText::_('COM_COMPONENTBUILDER_SUBMENU_DASHBOARD'), 'index.php?option=com_componentbuilder&view=componentbuilder', $submenu === 'componentbuilder');
|
||||
// load user for access menus
|
||||
$user = JFactory::getUser();
|
||||
// load the submenus to sidebar
|
||||
JHtmlSidebar::addEntry(JText::_('COM_COMPONENTBUILDER_SUBMENU_DASHBOARD'), 'index.php?option=com_componentbuilder&view=componentbuilder', $submenu === 'componentbuilder');
|
||||
// Access control (compiler.submenu).
|
||||
if ($user->authorise('compiler.submenu', 'com_componentbuilder'))
|
||||
{
|
||||
@ -2410,9 +2410,9 @@ abstract class ComponentbuilderHelper
|
||||
|
||||
public static function jsonToString($value, $sperator = ", ", $table = null)
|
||||
{
|
||||
// check if string is JSON
|
||||
$result = json_decode($value, true);
|
||||
if (json_last_error() === JSON_ERROR_NONE)
|
||||
// check if string is JSON
|
||||
$result = json_decode($value, true);
|
||||
if (json_last_error() === JSON_ERROR_NONE)
|
||||
{
|
||||
// is JSON
|
||||
if (self::checkArray($result))
|
||||
@ -2434,15 +2434,15 @@ abstract class ComponentbuilderHelper
|
||||
}
|
||||
return (string) implode($sperator,$result);
|
||||
}
|
||||
return (string) json_decode($value);
|
||||
}
|
||||
return $value;
|
||||
}
|
||||
return (string) json_decode($value);
|
||||
}
|
||||
return $value;
|
||||
}
|
||||
|
||||
public static function isPublished($id,$type)
|
||||
{
|
||||
if ($type == 'raw')
|
||||
{
|
||||
{
|
||||
$type = 'item';
|
||||
}
|
||||
$db = JFactory::getDbo();
|
||||
@ -2455,7 +2455,7 @@ abstract class ComponentbuilderHelper
|
||||
$db->execute();
|
||||
$found = $db->getNumRows();
|
||||
if($found)
|
||||
{
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@ -2472,33 +2472,33 @@ abstract class ComponentbuilderHelper
|
||||
$db->execute();
|
||||
$found = $db->getNumRows();
|
||||
if($found)
|
||||
{
|
||||
{
|
||||
return $db->loadResult();
|
||||
}
|
||||
return $id;
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* Get the actions permissions
|
||||
**/
|
||||
public static function getActions($view,&$record = null,$views = null)
|
||||
public static function getActions($view,&$record = null,$views = null)
|
||||
{
|
||||
jimport('joomla.access.access');
|
||||
|
||||
$user = JFactory::getUser();
|
||||
$result = new JObject;
|
||||
$view = self::safeString($view);
|
||||
if (self::checkString($views))
|
||||
{
|
||||
if (self::checkString($views))
|
||||
{
|
||||
$views = self::safeString($views);
|
||||
}
|
||||
}
|
||||
// get all actions from component
|
||||
$actions = JAccess::getActions('com_componentbuilder', 'component');
|
||||
// set acctions only set in component settiongs
|
||||
$componentActions = array('core.admin','core.manage','core.options','core.export');
|
||||
// set acctions only set in component settiongs
|
||||
$componentActions = array('core.admin','core.manage','core.options','core.export');
|
||||
// loop the actions and set the permissions
|
||||
foreach ($actions as $action)
|
||||
{
|
||||
{
|
||||
// set to use component default
|
||||
$fallback= true;
|
||||
if (self::checkObject($record) && isset($record->id) && $record->id > 0 && !in_array($action->name,$componentActions))
|
||||
@ -2577,17 +2577,17 @@ abstract class ComponentbuilderHelper
|
||||
}
|
||||
elseif (self::checkString($views) && isset($record->catid) && $record->catid > 0)
|
||||
{
|
||||
// make sure we use the core. action check for the categories
|
||||
if (strpos($action->name,$view) !== false && strpos($action->name,'core.') === false ) {
|
||||
$coreCheck = explode('.',$action->name);
|
||||
$coreCheck[0] = 'core';
|
||||
$categoryCheck = implode('.',$coreCheck);
|
||||
}
|
||||
else
|
||||
{
|
||||
$categoryCheck = $action->name;
|
||||
}
|
||||
// The record has a category. Check the category permissions.
|
||||
// make sure we use the core. action check for the categories
|
||||
if (strpos($action->name,$view) !== false && strpos($action->name,'core.') === false ) {
|
||||
$coreCheck = explode('.',$action->name);
|
||||
$coreCheck[0] = 'core';
|
||||
$categoryCheck = implode('.',$coreCheck);
|
||||
}
|
||||
else
|
||||
{
|
||||
$categoryCheck = $action->name;
|
||||
}
|
||||
// The record has a category. Check the category permissions.
|
||||
$catpermission = $user->authorise($categoryCheck, 'com_componentbuilder.'.$views.'.category.' . (int) $record->catid);
|
||||
if (!$catpermission && !is_null($catpermission))
|
||||
{
|
||||
@ -2968,8 +2968,8 @@ abstract class ComponentbuilderHelper
|
||||
$string = self::replaceNumbers($string);
|
||||
}
|
||||
// 0nly continue if we have a string
|
||||
if (self::checkString($string))
|
||||
{
|
||||
if (self::checkString($string))
|
||||
{
|
||||
// create file name without the extention that is safe
|
||||
if ($type === 'filename')
|
||||
{
|
||||
@ -2992,12 +2992,12 @@ abstract class ComponentbuilderHelper
|
||||
$string = preg_replace("/[^A-Za-z ]/", '', $string);
|
||||
// select final adaptations
|
||||
if ($type === 'L' || $type === 'strtolower')
|
||||
{
|
||||
// replace white space with underscore
|
||||
$string = preg_replace('/\s+/', $spacer, $string);
|
||||
// default is to return lower
|
||||
return strtolower($string);
|
||||
}
|
||||
{
|
||||
// replace white space with underscore
|
||||
$string = preg_replace('/\s+/', $spacer, $string);
|
||||
// default is to return lower
|
||||
return strtolower($string);
|
||||
}
|
||||
elseif ($type === 'W')
|
||||
{
|
||||
// return a string with all first letter of each word uppercase(no undersocre)
|
||||
@ -3018,21 +3018,21 @@ abstract class ComponentbuilderHelper
|
||||
// return a string with all the uppercase(no undersocre)
|
||||
return strtoupper($string);
|
||||
}
|
||||
elseif ($type === 'U' || $type === 'strtoupper')
|
||||
{
|
||||
// replace white space with underscore
|
||||
$string = preg_replace('/\s+/', $spacer, $string);
|
||||
// return all upper
|
||||
return strtoupper($string);
|
||||
}
|
||||
elseif ($type === 'F' || $type === 'ucfirst')
|
||||
{
|
||||
// replace white space with underscore
|
||||
$string = preg_replace('/\s+/', $spacer, $string);
|
||||
// return with first caracter to upper
|
||||
return ucfirst(strtolower($string));
|
||||
}
|
||||
elseif ($type === 'cA' || $type === 'cAmel' || $type === 'camelcase')
|
||||
elseif ($type === 'U' || $type === 'strtoupper')
|
||||
{
|
||||
// replace white space with underscore
|
||||
$string = preg_replace('/\s+/', $spacer, $string);
|
||||
// return all upper
|
||||
return strtoupper($string);
|
||||
}
|
||||
elseif ($type === 'F' || $type === 'ucfirst')
|
||||
{
|
||||
// replace white space with underscore
|
||||
$string = preg_replace('/\s+/', $spacer, $string);
|
||||
// return with first caracter to upper
|
||||
return ucfirst(strtolower($string));
|
||||
}
|
||||
elseif ($type === 'cA' || $type === 'cAmel' || $type === 'camelcase')
|
||||
{
|
||||
// convert all words to first letter uppercase
|
||||
$string = ucwords(strtolower($string));
|
||||
@ -3041,14 +3041,14 @@ abstract class ComponentbuilderHelper
|
||||
// now return first letter lowercase
|
||||
return lcfirst($string);
|
||||
}
|
||||
// return string
|
||||
return $string;
|
||||
}
|
||||
// not a string
|
||||
return '';
|
||||
// return string
|
||||
return $string;
|
||||
}
|
||||
// not a string
|
||||
return '';
|
||||
}
|
||||
|
||||
public static function htmlEscape($var, $charset = 'UTF-8', $shorten = false, $length = 40)
|
||||
public static function htmlEscape($var, $charset = 'UTF-8', $shorten = false, $length = 40)
|
||||
{
|
||||
if (self::checkString($var))
|
||||
{
|
||||
@ -3059,11 +3059,11 @@ abstract class ComponentbuilderHelper
|
||||
return self::shorten($string,$length);
|
||||
}
|
||||
return $string;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return '';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static function replaceNumbers($string)
|
||||
|
@ -187,8 +187,7 @@ abstract class ComponentbuilderEmail
|
||||
|
||||
// load the bounce email as sender if set
|
||||
if (!is_null($bounce_email))
|
||||
{
|
||||
|
||||
{
|
||||
$mail->Sender = $bounce_email;
|
||||
}
|
||||
|
||||
|
@ -56,15 +56,15 @@ class ComponentbuilderModelCompiler extends JModelList
|
||||
protected function getListQuery()
|
||||
{
|
||||
// Get the current user for authorisation checks
|
||||
$this->user = JFactory::getUser();
|
||||
$this->userId = $this->user->get('id');
|
||||
$this->guest = $this->user->get('guest');
|
||||
$this->groups = $this->user->get('groups');
|
||||
$this->user = JFactory::getUser();
|
||||
$this->userId = $this->user->get('id');
|
||||
$this->guest = $this->user->get('guest');
|
||||
$this->groups = $this->user->get('groups');
|
||||
$this->authorisedGroups = $this->user->getAuthorisedGroups();
|
||||
$this->levels = $this->user->getAuthorisedViewLevels();
|
||||
$this->app = JFactory::getApplication();
|
||||
$this->input = $this->app->input;
|
||||
$this->initSet = true;
|
||||
$this->levels = $this->user->getAuthorisedViewLevels();
|
||||
$this->app = JFactory::getApplication();
|
||||
$this->input = $this->app->input;
|
||||
$this->initSet = true;
|
||||
// Make sure all records load, since no pagination allowed.
|
||||
$this->setState('list.limit', 0);
|
||||
// Get a db connection.
|
||||
|
@ -37,11 +37,11 @@ class ComponentbuilderModelComponentbuilder extends JModelList
|
||||
{
|
||||
public function getIcons()
|
||||
{
|
||||
// load user for access menus
|
||||
$user = JFactory::getUser();
|
||||
// reset icon array
|
||||
// load user for access menus
|
||||
$user = JFactory::getUser();
|
||||
// reset icon array
|
||||
$icons = array();
|
||||
// view groups array
|
||||
// view groups array
|
||||
$viewGroups = array(
|
||||
'main' => array('png.compiler', 'png.joomla_component.add', 'png.joomla_components', 'png.admin_view.add', 'png.admin_views', 'png.custom_admin_view.add', 'png.custom_admin_views', 'png.site_view.add', 'png.site_views', 'png.template.add', 'png.templates', 'png.layout.add', 'png.layouts', 'png.dynamic_get.add', 'png.dynamic_gets', 'png.custom_codes', 'png.libraries', 'png.snippet.add', 'png.snippets', 'png.field.add', 'png.fields', 'png.fields.catid', 'png.fieldtype.add', 'png.fieldtypes', 'png.fieldtypes.catid', 'png.language_translations', 'png.ftps', 'png.help_document.add', 'png.help_documents')
|
||||
);
|
||||
@ -177,92 +177,92 @@ class ComponentbuilderModelComponentbuilder extends JModelList
|
||||
'libraries_files_folders_urls.access' => 'library_files_folders_urls.access',
|
||||
'library_files_folders_urls.access' => 'library_files_folders_urls.access');
|
||||
foreach($viewGroups as $group => $views)
|
||||
{
|
||||
{
|
||||
$i = 0;
|
||||
if (ComponentbuilderHelper::checkArray($views))
|
||||
{
|
||||
{
|
||||
foreach($views as $view)
|
||||
{
|
||||
$add = false;
|
||||
if (strpos($view,'.') !== false)
|
||||
{
|
||||
$dwd = explode('.', $view);
|
||||
if (count($dwd) == 3)
|
||||
{
|
||||
list($type, $name, $action) = $dwd;
|
||||
}
|
||||
elseif (count($dwd) == 2)
|
||||
{
|
||||
list($type, $name) = $dwd;
|
||||
$action = false;
|
||||
}
|
||||
if ($action)
|
||||
{
|
||||
$viewName = $name;
|
||||
switch($action)
|
||||
{
|
||||
case 'add':
|
||||
$url ='index.php?option=com_componentbuilder&view='.$name.'&layout=edit';
|
||||
$image = $name.'_'.$action.'.'.$type;
|
||||
$alt = $name.' '.$action;
|
||||
$name = 'COM_COMPONENTBUILDER_DASHBOARD_'.ComponentbuilderHelper::safeString($name,'U').'_ADD';
|
||||
$add = true;
|
||||
break;
|
||||
default:
|
||||
$url = 'index.php?option=com_categories&view=categories&extension=com_componentbuilder.'.$name;
|
||||
$image = $name.'_'.$action.'.'.$type;
|
||||
$alt = $name.' '.$action;
|
||||
$name = 'COM_COMPONENTBUILDER_DASHBOARD_'.ComponentbuilderHelper::safeString($name,'U').'_'.ComponentbuilderHelper::safeString($action,'U');
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$viewName = $name;
|
||||
$alt = $name;
|
||||
$url = 'index.php?option=com_componentbuilder&view='.$name;
|
||||
$image = $name.'.'.$type;
|
||||
$name = 'COM_COMPONENTBUILDER_DASHBOARD_'.ComponentbuilderHelper::safeString($name,'U');
|
||||
$hover = false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$viewName = $view;
|
||||
$alt = $view;
|
||||
$url = 'index.php?option=com_componentbuilder&view='.$view;
|
||||
$image = $view.'.png';
|
||||
$name = ucwords($view).'<br /><br />';
|
||||
$hover = false;
|
||||
}
|
||||
// first make sure the view access is set
|
||||
if (ComponentbuilderHelper::checkArray($viewAccess))
|
||||
{
|
||||
{
|
||||
$dwd = explode('.', $view);
|
||||
if (count($dwd) == 3)
|
||||
{
|
||||
list($type, $name, $action) = $dwd;
|
||||
}
|
||||
elseif (count($dwd) == 2)
|
||||
{
|
||||
list($type, $name) = $dwd;
|
||||
$action = false;
|
||||
}
|
||||
if ($action)
|
||||
{
|
||||
$viewName = $name;
|
||||
switch($action)
|
||||
{
|
||||
case 'add':
|
||||
$url ='index.php?option=com_componentbuilder&view='.$name.'&layout=edit';
|
||||
$image = $name.'_'.$action.'.'.$type;
|
||||
$alt = $name.' '.$action;
|
||||
$name = 'COM_COMPONENTBUILDER_DASHBOARD_'.ComponentbuilderHelper::safeString($name,'U').'_ADD';
|
||||
$add = true;
|
||||
break;
|
||||
default:
|
||||
$url = 'index.php?option=com_categories&view=categories&extension=com_componentbuilder.'.$name;
|
||||
$image = $name.'_'.$action.'.'.$type;
|
||||
$alt = $name.' '.$action;
|
||||
$name = 'COM_COMPONENTBUILDER_DASHBOARD_'.ComponentbuilderHelper::safeString($name,'U').'_'.ComponentbuilderHelper::safeString($action,'U');
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$viewName = $name;
|
||||
$alt = $name;
|
||||
$url = 'index.php?option=com_componentbuilder&view='.$name;
|
||||
$image = $name.'.'.$type;
|
||||
$name = 'COM_COMPONENTBUILDER_DASHBOARD_'.ComponentbuilderHelper::safeString($name,'U');
|
||||
$hover = false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$viewName = $view;
|
||||
$alt = $view;
|
||||
$url = 'index.php?option=com_componentbuilder&view='.$view;
|
||||
$image = $view.'.png';
|
||||
$name = ucwords($view).'<br /><br />';
|
||||
$hover = false;
|
||||
}
|
||||
// first make sure the view access is set
|
||||
if (ComponentbuilderHelper::checkArray($viewAccess))
|
||||
{
|
||||
// setup some defaults
|
||||
$dashboard_add = false;
|
||||
$dashboard_list = false;
|
||||
$accessTo = '';
|
||||
$accessAdd = '';
|
||||
// acces checking start
|
||||
$accessCreate = (isset($viewAccess[$viewName.'.create'])) ? ComponentbuilderHelper::checkString($viewAccess[$viewName.'.create']):false;
|
||||
$accessAccess = (isset($viewAccess[$viewName.'.access'])) ? ComponentbuilderHelper::checkString($viewAccess[$viewName.'.access']):false;
|
||||
$accessTo = '';
|
||||
$accessAdd = '';
|
||||
// acces checking start
|
||||
$accessCreate = (isset($viewAccess[$viewName.'.create'])) ? ComponentbuilderHelper::checkString($viewAccess[$viewName.'.create']):false;
|
||||
$accessAccess = (isset($viewAccess[$viewName.'.access'])) ? ComponentbuilderHelper::checkString($viewAccess[$viewName.'.access']):false;
|
||||
// set main controllers
|
||||
$accessDashboard_add = (isset($viewAccess[$viewName.'.dashboard_add'])) ? ComponentbuilderHelper::checkString($viewAccess[$viewName.'.dashboard_add']):false;
|
||||
$accessDashboard_list = (isset($viewAccess[$viewName.'.dashboard_list'])) ? ComponentbuilderHelper::checkString($viewAccess[$viewName.'.dashboard_list']):false;
|
||||
// check for adding access
|
||||
if ($add && $accessCreate)
|
||||
{
|
||||
$accessAdd = $viewAccess[$viewName.'.create'];
|
||||
}
|
||||
elseif ($add)
|
||||
{
|
||||
$accessAdd = 'core.create';
|
||||
}
|
||||
// check if acces to view is set
|
||||
if ($accessAccess)
|
||||
{
|
||||
$accessTo = $viewAccess[$viewName.'.access'];
|
||||
}
|
||||
// check for adding access
|
||||
if ($add && $accessCreate)
|
||||
{
|
||||
$accessAdd = $viewAccess[$viewName.'.create'];
|
||||
}
|
||||
elseif ($add)
|
||||
{
|
||||
$accessAdd = 'core.create';
|
||||
}
|
||||
// check if acces to view is set
|
||||
if ($accessAccess)
|
||||
{
|
||||
$accessTo = $viewAccess[$viewName.'.access'];
|
||||
}
|
||||
// set main access controllers
|
||||
if ($accessDashboard_add)
|
||||
{
|
||||
@ -272,65 +272,65 @@ class ComponentbuilderModelComponentbuilder extends JModelList
|
||||
{
|
||||
$dashboard_list = $user->authorise($viewAccess[$viewName.'.dashboard_list'], 'com_componentbuilder');
|
||||
}
|
||||
if (ComponentbuilderHelper::checkString($accessAdd) && ComponentbuilderHelper::checkString($accessTo))
|
||||
{
|
||||
// check access
|
||||
if($user->authorise($accessAdd, 'com_componentbuilder') && $user->authorise($accessTo, 'com_componentbuilder') && $dashboard_add)
|
||||
{
|
||||
$icons[$group][$i] = new StdClass;
|
||||
$icons[$group][$i]->url = $url;
|
||||
$icons[$group][$i]->name = $name;
|
||||
$icons[$group][$i]->image = $image;
|
||||
$icons[$group][$i]->alt = $alt;
|
||||
}
|
||||
}
|
||||
elseif (ComponentbuilderHelper::checkString($accessTo))
|
||||
{
|
||||
// check access
|
||||
if($user->authorise($accessTo, 'com_componentbuilder') && $dashboard_list)
|
||||
{
|
||||
$icons[$group][$i] = new StdClass;
|
||||
$icons[$group][$i]->url = $url;
|
||||
$icons[$group][$i]->name = $name;
|
||||
$icons[$group][$i]->image = $image;
|
||||
$icons[$group][$i]->alt = $alt;
|
||||
}
|
||||
}
|
||||
elseif (ComponentbuilderHelper::checkString($accessAdd))
|
||||
{
|
||||
// check access
|
||||
if($user->authorise($accessAdd, 'com_componentbuilder') && $dashboard_add)
|
||||
{
|
||||
$icons[$group][$i] = new StdClass;
|
||||
$icons[$group][$i]->url = $url;
|
||||
$icons[$group][$i]->name = $name;
|
||||
$icons[$group][$i]->image = $image;
|
||||
$icons[$group][$i]->alt = $alt;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$icons[$group][$i] = new StdClass;
|
||||
$icons[$group][$i]->url = $url;
|
||||
$icons[$group][$i]->name = $name;
|
||||
$icons[$group][$i]->image = $image;
|
||||
$icons[$group][$i]->alt = $alt;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$icons[$group][$i] = new StdClass;
|
||||
$icons[$group][$i]->url = $url;
|
||||
$icons[$group][$i]->name = $name;
|
||||
$icons[$group][$i]->image = $image;
|
||||
$icons[$group][$i]->alt = $alt;
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$icons[$group][$i] = false;
|
||||
if (ComponentbuilderHelper::checkString($accessAdd) && ComponentbuilderHelper::checkString($accessTo))
|
||||
{
|
||||
// check access
|
||||
if($user->authorise($accessAdd, 'com_componentbuilder') && $user->authorise($accessTo, 'com_componentbuilder') && $dashboard_add)
|
||||
{
|
||||
$icons[$group][$i] = new StdClass;
|
||||
$icons[$group][$i]->url = $url;
|
||||
$icons[$group][$i]->name = $name;
|
||||
$icons[$group][$i]->image = $image;
|
||||
$icons[$group][$i]->alt = $alt;
|
||||
}
|
||||
}
|
||||
elseif (ComponentbuilderHelper::checkString($accessTo))
|
||||
{
|
||||
// check access
|
||||
if($user->authorise($accessTo, 'com_componentbuilder') && $dashboard_list)
|
||||
{
|
||||
$icons[$group][$i] = new StdClass;
|
||||
$icons[$group][$i]->url = $url;
|
||||
$icons[$group][$i]->name = $name;
|
||||
$icons[$group][$i]->image = $image;
|
||||
$icons[$group][$i]->alt = $alt;
|
||||
}
|
||||
}
|
||||
elseif (ComponentbuilderHelper::checkString($accessAdd))
|
||||
{
|
||||
// check access
|
||||
if($user->authorise($accessAdd, 'com_componentbuilder') && $dashboard_add)
|
||||
{
|
||||
$icons[$group][$i] = new StdClass;
|
||||
$icons[$group][$i]->url = $url;
|
||||
$icons[$group][$i]->name = $name;
|
||||
$icons[$group][$i]->image = $image;
|
||||
$icons[$group][$i]->alt = $alt;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$icons[$group][$i] = new StdClass;
|
||||
$icons[$group][$i]->url = $url;
|
||||
$icons[$group][$i]->name = $name;
|
||||
$icons[$group][$i]->image = $image;
|
||||
$icons[$group][$i]->alt = $alt;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$icons[$group][$i] = new StdClass;
|
||||
$icons[$group][$i]->url = $url;
|
||||
$icons[$group][$i]->name = $name;
|
||||
$icons[$group][$i]->image = $image;
|
||||
$icons[$group][$i]->alt = $alt;
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$icons[$group][$i] = false;
|
||||
}
|
||||
}
|
||||
return $icons;
|
||||
|
@ -56,15 +56,15 @@ class ComponentbuilderModelGet_snippets extends JModelList
|
||||
protected function getListQuery()
|
||||
{
|
||||
// Get the current user for authorisation checks
|
||||
$this->user = JFactory::getUser();
|
||||
$this->userId = $this->user->get('id');
|
||||
$this->guest = $this->user->get('guest');
|
||||
$this->groups = $this->user->get('groups');
|
||||
$this->user = JFactory::getUser();
|
||||
$this->userId = $this->user->get('id');
|
||||
$this->guest = $this->user->get('guest');
|
||||
$this->groups = $this->user->get('groups');
|
||||
$this->authorisedGroups = $this->user->getAuthorisedGroups();
|
||||
$this->levels = $this->user->getAuthorisedViewLevels();
|
||||
$this->app = JFactory::getApplication();
|
||||
$this->input = $this->app->input;
|
||||
$this->initSet = true;
|
||||
$this->levels = $this->user->getAuthorisedViewLevels();
|
||||
$this->app = JFactory::getApplication();
|
||||
$this->input = $this->app->input;
|
||||
$this->initSet = true;
|
||||
// Make sure all records load, since no pagination allowed.
|
||||
$this->setState('list.limit', 0);
|
||||
// Get a db connection.
|
||||
|
@ -89,10 +89,10 @@ class ComponentbuilderModelImport extends JModelLegacy
|
||||
public function import()
|
||||
{
|
||||
$this->setState('action', 'import');
|
||||
$app = JFactory::getApplication();
|
||||
$session = JFactory::getSession();
|
||||
$package = null;
|
||||
$continue = false;
|
||||
$app = JFactory::getApplication();
|
||||
$session = JFactory::getSession();
|
||||
$package = null;
|
||||
$continue = false;
|
||||
// get import type
|
||||
$this->getType = $app->input->getString('gettype', NULL);
|
||||
// get import type
|
||||
@ -147,7 +147,7 @@ class ComponentbuilderModelImport extends JModelLegacy
|
||||
|
||||
// first link data to table headers
|
||||
if(!$continue){
|
||||
$package = json_encode($package);
|
||||
$package = json_encode($package);
|
||||
$session->set('package', $package);
|
||||
$session->set('dataType', $this->dataType);
|
||||
$session->set('hasPackage', true);
|
||||
@ -199,8 +199,8 @@ class ComponentbuilderModelImport extends JModelLegacy
|
||||
protected function _getPackageFromUpload()
|
||||
{
|
||||
// Get the uploaded file information
|
||||
$app = JFactory::getApplication();
|
||||
$input = $app->input;
|
||||
$app = JFactory::getApplication();
|
||||
$input = $app->input;
|
||||
|
||||
// Do not change the filter type 'raw'. We need this to let files containing PHP code to upload. See JInputFiles::get.
|
||||
$userfile = $input->files->get('import_package', null, 'raw');
|
||||
@ -227,9 +227,9 @@ class ComponentbuilderModelImport extends JModelLegacy
|
||||
}
|
||||
|
||||
// Build the appropriate paths
|
||||
$config = JFactory::getConfig();
|
||||
$tmp_dest = $config->get('tmp_path') . '/' . $userfile['name'];
|
||||
$tmp_src = $userfile['tmp_name'];
|
||||
$config = JFactory::getConfig();
|
||||
$tmp_dest = $config->get('tmp_path') . '/' . $userfile['name'];
|
||||
$tmp_src = $userfile['tmp_name'];
|
||||
|
||||
// Move uploaded file
|
||||
jimport('joomla.filesystem.file');
|
||||
@ -260,8 +260,8 @@ class ComponentbuilderModelImport extends JModelLegacy
|
||||
*/
|
||||
protected function _getPackageFromFolder()
|
||||
{
|
||||
$app = JFactory::getApplication();
|
||||
$input = $app->input;
|
||||
$app = JFactory::getApplication();
|
||||
$input = $app->input;
|
||||
|
||||
// Get the path to the package to import
|
||||
$p_dir = $input->getString('import_directory');
|
||||
@ -291,8 +291,8 @@ class ComponentbuilderModelImport extends JModelLegacy
|
||||
}
|
||||
|
||||
$package['packagename'] = null;
|
||||
$package['dir'] = $p_dir;
|
||||
$package['type'] = $type;
|
||||
$package['dir'] = $p_dir;
|
||||
$package['type'] = $type;
|
||||
|
||||
return $package;
|
||||
}
|
||||
@ -305,8 +305,8 @@ class ComponentbuilderModelImport extends JModelLegacy
|
||||
*/
|
||||
protected function _getPackageFromUrl()
|
||||
{
|
||||
$app = JFactory::getApplication();
|
||||
$input = $app->input;
|
||||
$app = JFactory::getApplication();
|
||||
$input = $app->input;
|
||||
|
||||
// Get the URL of the package to import
|
||||
$url = $input->getString('import_url');
|
||||
@ -345,7 +345,7 @@ class ComponentbuilderModelImport extends JModelLegacy
|
||||
*/
|
||||
protected function check($archivename)
|
||||
{
|
||||
$app = JFactory::getApplication();
|
||||
$app = JFactory::getApplication();
|
||||
// Clean the name
|
||||
$archivename = JPath::clean($archivename);
|
||||
|
||||
@ -358,15 +358,15 @@ class ComponentbuilderModelImport extends JModelLegacy
|
||||
return false;
|
||||
}
|
||||
|
||||
$config = JFactory::getConfig();
|
||||
$config = JFactory::getConfig();
|
||||
// set Package Name
|
||||
$check['packagename'] = $archivename;
|
||||
$check['packagename'] = $archivename;
|
||||
|
||||
// set directory
|
||||
$check['dir'] = $config->get('tmp_path'). '/' .$archivename;
|
||||
$check['dir'] = $config->get('tmp_path'). '/' .$archivename;
|
||||
|
||||
// set type
|
||||
$check['type'] = $this->getType;
|
||||
$check['type'] = $this->getType;
|
||||
|
||||
return $check;
|
||||
}
|
||||
@ -405,8 +405,8 @@ class ComponentbuilderModelImport extends JModelLegacy
|
||||
{
|
||||
jimport('joomla.filesystem.file');
|
||||
|
||||
$config = JFactory::getConfig();
|
||||
$package = $config->get('tmp_path'). '/' .$package;
|
||||
$config = JFactory::getConfig();
|
||||
$package = $config->get('tmp_path'). '/' .$package;
|
||||
|
||||
// Is the package file a valid file?
|
||||
if (is_file($package))
|
||||
@ -469,11 +469,11 @@ class ComponentbuilderModelImport extends JModelLegacy
|
||||
if(ComponentbuilderHelper::checkArray($data['array']))
|
||||
{
|
||||
// get user object
|
||||
$user = JFactory::getUser();
|
||||
$user = JFactory::getUser();
|
||||
// remove header if it has headers
|
||||
$id_key = $data['target_headers']['id'];
|
||||
$published_key = $data['target_headers']['published'];
|
||||
$ordering_key = $data['target_headers']['ordering'];
|
||||
$id_key = $data['target_headers']['id'];
|
||||
$published_key = $data['target_headers']['published'];
|
||||
$ordering_key = $data['target_headers']['ordering'];
|
||||
// get the first array set
|
||||
$firstSet = reset($data['array']);
|
||||
|
||||
@ -491,13 +491,13 @@ class ComponentbuilderModelImport extends JModelLegacy
|
||||
// Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
// set some defaults
|
||||
$todayDate = JFactory::getDate()->toSql();
|
||||
$todayDate = JFactory::getDate()->toSql();
|
||||
// get global action permissions
|
||||
$canDo = ComponentbuilderHelper::getActions($table);
|
||||
$canEdit = $canDo->get('core.edit');
|
||||
$canState = $canDo->get('core.edit.state');
|
||||
$canCreate = $canDo->get('core.create');
|
||||
$hasAlias = $this->getAliasesUsed($table);
|
||||
$canDo = ComponentbuilderHelper::getActions($table);
|
||||
$canEdit = $canDo->get('core.edit');
|
||||
$canState = $canDo->get('core.edit.state');
|
||||
$canCreate = $canDo->get('core.create');
|
||||
$hasAlias = $this->getAliasesUsed($table);
|
||||
// prosses the data
|
||||
foreach($data['array'] as $row)
|
||||
{
|
||||
@ -519,11 +519,11 @@ class ComponentbuilderModelImport extends JModelLegacy
|
||||
if($found && $canEdit)
|
||||
{
|
||||
// update item
|
||||
$id = $row[$id_key];
|
||||
$version = $db->loadResult();
|
||||
$id = $row[$id_key];
|
||||
$version = $db->loadResult();
|
||||
// reset all buckets
|
||||
$query = $db->getQuery(true);
|
||||
$fields = array();
|
||||
$query = $db->getQuery(true);
|
||||
$fields = array();
|
||||
// Fields to update.
|
||||
foreach($row as $key => $cell)
|
||||
{
|
||||
@ -568,8 +568,8 @@ class ComponentbuilderModelImport extends JModelLegacy
|
||||
}
|
||||
}
|
||||
// load the defaults
|
||||
$fields[] = $db->quoteName('modified_by') . ' = ' . $db->quote($user->id);
|
||||
$fields[] = $db->quoteName('modified') . ' = ' . $db->quote($todayDate);
|
||||
$fields[] = $db->quoteName('modified_by') . ' = ' . $db->quote($user->id);
|
||||
$fields[] = $db->quoteName('modified') . ' = ' . $db->quote($todayDate);
|
||||
// Conditions for which records should be updated.
|
||||
$conditions = array(
|
||||
$db->quoteName('id') . ' = ' . $id
|
||||
@ -584,9 +584,9 @@ class ComponentbuilderModelImport extends JModelLegacy
|
||||
// insert item
|
||||
$query = $db->getQuery(true);
|
||||
// reset all buckets
|
||||
$columns = array();
|
||||
$values = array();
|
||||
$version = false;
|
||||
$columns = array();
|
||||
$values = array();
|
||||
$version = false;
|
||||
// Insert columns. Insert values.
|
||||
foreach($row as $key => $cell)
|
||||
{
|
||||
@ -624,30 +624,30 @@ class ComponentbuilderModelImport extends JModelLegacy
|
||||
// set to insert array
|
||||
if(in_array($key, $data['target_headers']) && is_numeric($cell))
|
||||
{
|
||||
$columns[] = $target[$key];
|
||||
$values[] = $cell;
|
||||
$columns[] = $target[$key];
|
||||
$values[] = $cell;
|
||||
}
|
||||
elseif(in_array($key, $data['target_headers']) && is_string($cell))
|
||||
{
|
||||
$columns[] = $target[$key];
|
||||
$values[] = $db->quote($cell);
|
||||
$columns[] = $target[$key];
|
||||
$values[] = $db->quote($cell);
|
||||
}
|
||||
elseif(in_array($key, $data['target_headers']) && is_null($cell))
|
||||
{
|
||||
// if import data is null then set empty
|
||||
$columns[] = $target[$key];
|
||||
$values[] = "''";
|
||||
$columns[] = $target[$key];
|
||||
$values[] = "''";
|
||||
}
|
||||
}
|
||||
// load the defaults
|
||||
$columns[] = 'created_by';
|
||||
$values[] = $db->quote($user->id);
|
||||
$columns[] = 'created';
|
||||
$values[] = $db->quote($todayDate);
|
||||
$columns[] = 'created_by';
|
||||
$values[] = $db->quote($user->id);
|
||||
$columns[] = 'created';
|
||||
$values[] = $db->quote($todayDate);
|
||||
if (!$version)
|
||||
{
|
||||
$columns[] = 'version';
|
||||
$values[] = 1;
|
||||
$columns[] = 'version';
|
||||
$values[] = 1;
|
||||
}
|
||||
// Prepare the insert query.
|
||||
$query
|
||||
|
@ -56,8 +56,8 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
|
||||
/**
|
||||
* Import Settings
|
||||
*/
|
||||
protected $getType = NULL;
|
||||
protected $dataType = NULL;
|
||||
protected $getType = NULL;
|
||||
protected $dataType = NULL;
|
||||
|
||||
/**
|
||||
* Method to auto-populate the model state.
|
||||
@ -280,8 +280,8 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
|
||||
protected function _getPackageFromUpload()
|
||||
{
|
||||
// Get the uploaded file information
|
||||
$app = JFactory::getApplication();
|
||||
$input = $app->input;
|
||||
$app = JFactory::getApplication();
|
||||
$input = $app->input;
|
||||
|
||||
// Do not change the filter type 'raw'. We need this to let files containing PHP code to upload. See JInputFiles::get.
|
||||
$userfile = $input->files->get('import_package', null, 'raw');
|
||||
@ -308,9 +308,9 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
|
||||
}
|
||||
|
||||
// Build the appropriate paths
|
||||
$config = JFactory::getConfig();
|
||||
$tmp_dest = $config->get('tmp_path') . '/' . $userfile['name'];
|
||||
$tmp_src = $userfile['tmp_name'];
|
||||
$config = JFactory::getConfig();
|
||||
$tmp_dest = $config->get('tmp_path') . '/' . $userfile['name'];
|
||||
$tmp_src = $userfile['tmp_name'];
|
||||
|
||||
// Move uploaded file
|
||||
jimport('joomla.filesystem.file');
|
||||
@ -341,8 +341,8 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
|
||||
*/
|
||||
protected function _getPackageFromFolder()
|
||||
{
|
||||
$app = JFactory::getApplication();
|
||||
$input = $app->input;
|
||||
$app = JFactory::getApplication();
|
||||
$input = $app->input;
|
||||
|
||||
// Get the path to the package to import
|
||||
$p_dir = $input->getString('import_directory');
|
||||
@ -372,8 +372,8 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
|
||||
}
|
||||
|
||||
$package['packagename'] = null;
|
||||
$package['dir'] = $p_dir;
|
||||
$package['type'] = $type;
|
||||
$package['dir'] = $p_dir;
|
||||
$package['type'] = $type;
|
||||
|
||||
return $package;
|
||||
}
|
||||
@ -386,8 +386,8 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
|
||||
*/
|
||||
protected function _getPackageFromUrl()
|
||||
{
|
||||
$app = JFactory::getApplication();
|
||||
$input = $app->input;
|
||||
$app = JFactory::getApplication();
|
||||
$input = $app->input;
|
||||
|
||||
// Get the URL of the package to import
|
||||
$url = $input->getString('import_url');
|
||||
@ -426,7 +426,7 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
|
||||
*/
|
||||
protected function check($archivename)
|
||||
{
|
||||
$app = JFactory::getApplication();
|
||||
$app = JFactory::getApplication();
|
||||
// Clean the name
|
||||
$archivename = JPath::clean($archivename);
|
||||
|
||||
@ -439,15 +439,15 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
|
||||
return false;
|
||||
}
|
||||
|
||||
$config = JFactory::getConfig();
|
||||
$config = JFactory::getConfig();
|
||||
// set Package Name
|
||||
$check['packagename'] = $archivename;
|
||||
$check['packagename'] = $archivename;
|
||||
|
||||
// set directory
|
||||
$check['dir'] = $config->get('tmp_path'). '/' .$archivename;
|
||||
$check['dir'] = $config->get('tmp_path'). '/' .$archivename;
|
||||
|
||||
// set type
|
||||
$check['type'] = $this->getType;
|
||||
$check['type'] = $this->getType;
|
||||
|
||||
return $check;
|
||||
}
|
||||
@ -492,8 +492,8 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
|
||||
{
|
||||
jimport('joomla.filesystem.file');
|
||||
|
||||
$config = JFactory::getConfig();
|
||||
$package = $config->get('tmp_path'). '/' .$package;
|
||||
$config = JFactory::getConfig();
|
||||
$package = $config->get('tmp_path'). '/' .$package;
|
||||
|
||||
// Is the package file a valid file?
|
||||
if (is_file($package))
|
||||
|
@ -41,17 +41,17 @@ class ComponentbuilderViewAdmin_fields extends JViewLegacy
|
||||
public function display($tpl = null)
|
||||
{
|
||||
// Assign the variables
|
||||
$this->form = $this->get('Form');
|
||||
$this->item = $this->get('Item');
|
||||
$this->script = $this->get('Script');
|
||||
$this->state = $this->get('State');
|
||||
$this->form = $this->get('Form');
|
||||
$this->item = $this->get('Item');
|
||||
$this->script = $this->get('Script');
|
||||
$this->state = $this->get('State');
|
||||
// get action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('admin_fields',$this->item);
|
||||
$this->canDo = ComponentbuilderHelper::getActions('admin_fields',$this->item);
|
||||
// get input
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
$this->ref = $jinput->get('ref', 0, 'word');
|
||||
$this->refid = $jinput->get('refid', 0, 'int');
|
||||
$this->referral = '';
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
$this->ref = $jinput->get('ref', 0, 'word');
|
||||
$this->refid = $jinput->get('refid', 0, 'int');
|
||||
$this->referral = '';
|
||||
if ($this->refid)
|
||||
{
|
||||
// return to the item that refered to this item
|
||||
|
@ -41,17 +41,17 @@ class ComponentbuilderViewAdmin_fields_conditions extends JViewLegacy
|
||||
public function display($tpl = null)
|
||||
{
|
||||
// Assign the variables
|
||||
$this->form = $this->get('Form');
|
||||
$this->item = $this->get('Item');
|
||||
$this->script = $this->get('Script');
|
||||
$this->state = $this->get('State');
|
||||
$this->form = $this->get('Form');
|
||||
$this->item = $this->get('Item');
|
||||
$this->script = $this->get('Script');
|
||||
$this->state = $this->get('State');
|
||||
// get action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('admin_fields_conditions',$this->item);
|
||||
$this->canDo = ComponentbuilderHelper::getActions('admin_fields_conditions',$this->item);
|
||||
// get input
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
$this->ref = $jinput->get('ref', 0, 'word');
|
||||
$this->refid = $jinput->get('refid', 0, 'int');
|
||||
$this->referral = '';
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
$this->ref = $jinput->get('ref', 0, 'word');
|
||||
$this->refid = $jinput->get('refid', 0, 'int');
|
||||
$this->referral = '';
|
||||
if ($this->refid)
|
||||
{
|
||||
// return to the item that refered to this item
|
||||
|
@ -41,17 +41,17 @@ class ComponentbuilderViewAdmin_view extends JViewLegacy
|
||||
public function display($tpl = null)
|
||||
{
|
||||
// Assign the variables
|
||||
$this->form = $this->get('Form');
|
||||
$this->item = $this->get('Item');
|
||||
$this->script = $this->get('Script');
|
||||
$this->state = $this->get('State');
|
||||
$this->form = $this->get('Form');
|
||||
$this->item = $this->get('Item');
|
||||
$this->script = $this->get('Script');
|
||||
$this->state = $this->get('State');
|
||||
// get action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('admin_view',$this->item);
|
||||
$this->canDo = ComponentbuilderHelper::getActions('admin_view',$this->item);
|
||||
// get input
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
$this->ref = $jinput->get('ref', 0, 'word');
|
||||
$this->refid = $jinput->get('refid', 0, 'int');
|
||||
$this->referral = '';
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
$this->ref = $jinput->get('ref', 0, 'word');
|
||||
$this->refid = $jinput->get('refid', 0, 'int');
|
||||
$this->referral = '';
|
||||
if ($this->refid)
|
||||
{
|
||||
// return to the item that refered to this item
|
||||
|
@ -47,20 +47,20 @@ class ComponentbuilderViewAdmin_views extends JViewLegacy
|
||||
}
|
||||
|
||||
// Assign data to the view
|
||||
$this->items = $this->get('Items');
|
||||
$this->pagination = $this->get('Pagination');
|
||||
$this->state = $this->get('State');
|
||||
$this->user = JFactory::getUser();
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$this->listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$this->saveOrder = $this->listOrder == 'ordering';
|
||||
$this->items = $this->get('Items');
|
||||
$this->pagination = $this->get('Pagination');
|
||||
$this->state = $this->get('State');
|
||||
$this->user = JFactory::getUser();
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$this->listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$this->saveOrder = $this->listOrder == 'ordering';
|
||||
// get global action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('admin_view');
|
||||
$this->canEdit = $this->canDo->get('admin_view.edit');
|
||||
$this->canState = $this->canDo->get('admin_view.edit.state');
|
||||
$this->canCreate = $this->canDo->get('admin_view.create');
|
||||
$this->canDelete = $this->canDo->get('admin_view.delete');
|
||||
$this->canBatch = $this->canDo->get('core.batch');
|
||||
$this->canDo = ComponentbuilderHelper::getActions('admin_view');
|
||||
$this->canEdit = $this->canDo->get('admin_view.edit');
|
||||
$this->canState = $this->canDo->get('admin_view.edit.state');
|
||||
$this->canCreate = $this->canDo->get('admin_view.create');
|
||||
$this->canDelete = $this->canDo->get('admin_view.delete');
|
||||
$this->canBatch = $this->canDo->get('core.batch');
|
||||
|
||||
// We don't need toolbar in the modal window.
|
||||
if ($this->getLayout() !== 'modal')
|
||||
@ -159,7 +159,7 @@ class ComponentbuilderViewAdmin_views extends JViewLegacy
|
||||
$help_url = ComponentbuilderHelper::getHelpUrl('admin_views');
|
||||
if (ComponentbuilderHelper::checkString($help_url))
|
||||
{
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
}
|
||||
|
||||
// add the options comp button
|
||||
|
@ -47,20 +47,20 @@ class ComponentbuilderViewAdmins_fields extends JViewLegacy
|
||||
}
|
||||
|
||||
// Assign data to the view
|
||||
$this->items = $this->get('Items');
|
||||
$this->pagination = $this->get('Pagination');
|
||||
$this->state = $this->get('State');
|
||||
$this->user = JFactory::getUser();
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$this->listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$this->saveOrder = $this->listOrder == 'ordering';
|
||||
$this->items = $this->get('Items');
|
||||
$this->pagination = $this->get('Pagination');
|
||||
$this->state = $this->get('State');
|
||||
$this->user = JFactory::getUser();
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$this->listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$this->saveOrder = $this->listOrder == 'ordering';
|
||||
// get global action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('admin_fields');
|
||||
$this->canEdit = $this->canDo->get('admin_fields.edit');
|
||||
$this->canState = $this->canDo->get('admin_fields.edit.state');
|
||||
$this->canCreate = $this->canDo->get('admin_fields.create');
|
||||
$this->canDelete = $this->canDo->get('admin_fields.delete');
|
||||
$this->canBatch = $this->canDo->get('core.batch');
|
||||
$this->canDo = ComponentbuilderHelper::getActions('admin_fields');
|
||||
$this->canEdit = $this->canDo->get('admin_fields.edit');
|
||||
$this->canState = $this->canDo->get('admin_fields.edit.state');
|
||||
$this->canCreate = $this->canDo->get('admin_fields.create');
|
||||
$this->canDelete = $this->canDo->get('admin_fields.delete');
|
||||
$this->canBatch = $this->canDo->get('core.batch');
|
||||
|
||||
// We don't need toolbar in the modal window.
|
||||
if ($this->getLayout() !== 'modal')
|
||||
@ -149,7 +149,7 @@ class ComponentbuilderViewAdmins_fields extends JViewLegacy
|
||||
$help_url = ComponentbuilderHelper::getHelpUrl('admins_fields');
|
||||
if (ComponentbuilderHelper::checkString($help_url))
|
||||
{
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
}
|
||||
|
||||
// add the options comp button
|
||||
|
@ -47,20 +47,20 @@ class ComponentbuilderViewAdmins_fields_conditions extends JViewLegacy
|
||||
}
|
||||
|
||||
// Assign data to the view
|
||||
$this->items = $this->get('Items');
|
||||
$this->pagination = $this->get('Pagination');
|
||||
$this->state = $this->get('State');
|
||||
$this->user = JFactory::getUser();
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$this->listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$this->saveOrder = $this->listOrder == 'ordering';
|
||||
$this->items = $this->get('Items');
|
||||
$this->pagination = $this->get('Pagination');
|
||||
$this->state = $this->get('State');
|
||||
$this->user = JFactory::getUser();
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$this->listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$this->saveOrder = $this->listOrder == 'ordering';
|
||||
// get global action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('admin_fields_conditions');
|
||||
$this->canEdit = $this->canDo->get('admin_fields_conditions.edit');
|
||||
$this->canState = $this->canDo->get('admin_fields_conditions.edit.state');
|
||||
$this->canCreate = $this->canDo->get('admin_fields_conditions.create');
|
||||
$this->canDelete = $this->canDo->get('admin_fields_conditions.delete');
|
||||
$this->canBatch = $this->canDo->get('core.batch');
|
||||
$this->canDo = ComponentbuilderHelper::getActions('admin_fields_conditions');
|
||||
$this->canEdit = $this->canDo->get('admin_fields_conditions.edit');
|
||||
$this->canState = $this->canDo->get('admin_fields_conditions.edit.state');
|
||||
$this->canCreate = $this->canDo->get('admin_fields_conditions.create');
|
||||
$this->canDelete = $this->canDo->get('admin_fields_conditions.delete');
|
||||
$this->canBatch = $this->canDo->get('core.batch');
|
||||
|
||||
// We don't need toolbar in the modal window.
|
||||
if ($this->getLayout() !== 'modal')
|
||||
@ -149,7 +149,7 @@ class ComponentbuilderViewAdmins_fields_conditions extends JViewLegacy
|
||||
$help_url = ComponentbuilderHelper::getHelpUrl('admins_fields_conditions');
|
||||
if (ComponentbuilderHelper::checkString($help_url))
|
||||
{
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
}
|
||||
|
||||
// add the options comp button
|
||||
|
@ -38,15 +38,15 @@ class ComponentbuilderViewCompiler extends JViewLegacy
|
||||
function display($tpl = null)
|
||||
{
|
||||
// get component params
|
||||
$this->params = JComponentHelper::getParams('com_componentbuilder');
|
||||
$this->params = JComponentHelper::getParams('com_componentbuilder');
|
||||
// get the application
|
||||
$this->app = JFactory::getApplication();
|
||||
$this->app = JFactory::getApplication();
|
||||
// get the user object
|
||||
$this->user = JFactory::getUser();
|
||||
// get global action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('compiler');
|
||||
$this->canDo = ComponentbuilderHelper::getActions('compiler');
|
||||
// Initialise variables.
|
||||
$this->items = $this->get('Items');
|
||||
$this->items = $this->get('Items');
|
||||
if ($this->getLayout() !== 'modal')
|
||||
{
|
||||
// Include helper submenu
|
||||
|
@ -41,17 +41,17 @@ class ComponentbuilderViewComponent_admin_views extends JViewLegacy
|
||||
public function display($tpl = null)
|
||||
{
|
||||
// Assign the variables
|
||||
$this->form = $this->get('Form');
|
||||
$this->item = $this->get('Item');
|
||||
$this->script = $this->get('Script');
|
||||
$this->state = $this->get('State');
|
||||
$this->form = $this->get('Form');
|
||||
$this->item = $this->get('Item');
|
||||
$this->script = $this->get('Script');
|
||||
$this->state = $this->get('State');
|
||||
// get action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('component_admin_views',$this->item);
|
||||
$this->canDo = ComponentbuilderHelper::getActions('component_admin_views',$this->item);
|
||||
// get input
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
$this->ref = $jinput->get('ref', 0, 'word');
|
||||
$this->refid = $jinput->get('refid', 0, 'int');
|
||||
$this->referral = '';
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
$this->ref = $jinput->get('ref', 0, 'word');
|
||||
$this->refid = $jinput->get('refid', 0, 'int');
|
||||
$this->referral = '';
|
||||
if ($this->refid)
|
||||
{
|
||||
// return to the item that refered to this item
|
||||
|
@ -41,17 +41,17 @@ class ComponentbuilderViewComponent_config extends JViewLegacy
|
||||
public function display($tpl = null)
|
||||
{
|
||||
// Assign the variables
|
||||
$this->form = $this->get('Form');
|
||||
$this->item = $this->get('Item');
|
||||
$this->script = $this->get('Script');
|
||||
$this->state = $this->get('State');
|
||||
$this->form = $this->get('Form');
|
||||
$this->item = $this->get('Item');
|
||||
$this->script = $this->get('Script');
|
||||
$this->state = $this->get('State');
|
||||
// get action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('component_config',$this->item);
|
||||
$this->canDo = ComponentbuilderHelper::getActions('component_config',$this->item);
|
||||
// get input
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
$this->ref = $jinput->get('ref', 0, 'word');
|
||||
$this->refid = $jinput->get('refid', 0, 'int');
|
||||
$this->referral = '';
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
$this->ref = $jinput->get('ref', 0, 'word');
|
||||
$this->refid = $jinput->get('refid', 0, 'int');
|
||||
$this->referral = '';
|
||||
if ($this->refid)
|
||||
{
|
||||
// return to the item that refered to this item
|
||||
|
@ -41,17 +41,17 @@ class ComponentbuilderViewComponent_custom_admin_menus extends JViewLegacy
|
||||
public function display($tpl = null)
|
||||
{
|
||||
// Assign the variables
|
||||
$this->form = $this->get('Form');
|
||||
$this->item = $this->get('Item');
|
||||
$this->script = $this->get('Script');
|
||||
$this->state = $this->get('State');
|
||||
$this->form = $this->get('Form');
|
||||
$this->item = $this->get('Item');
|
||||
$this->script = $this->get('Script');
|
||||
$this->state = $this->get('State');
|
||||
// get action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('component_custom_admin_menus',$this->item);
|
||||
$this->canDo = ComponentbuilderHelper::getActions('component_custom_admin_menus',$this->item);
|
||||
// get input
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
$this->ref = $jinput->get('ref', 0, 'word');
|
||||
$this->refid = $jinput->get('refid', 0, 'int');
|
||||
$this->referral = '';
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
$this->ref = $jinput->get('ref', 0, 'word');
|
||||
$this->refid = $jinput->get('refid', 0, 'int');
|
||||
$this->referral = '';
|
||||
if ($this->refid)
|
||||
{
|
||||
// return to the item that refered to this item
|
||||
|
@ -41,17 +41,17 @@ class ComponentbuilderViewComponent_custom_admin_views extends JViewLegacy
|
||||
public function display($tpl = null)
|
||||
{
|
||||
// Assign the variables
|
||||
$this->form = $this->get('Form');
|
||||
$this->item = $this->get('Item');
|
||||
$this->script = $this->get('Script');
|
||||
$this->state = $this->get('State');
|
||||
$this->form = $this->get('Form');
|
||||
$this->item = $this->get('Item');
|
||||
$this->script = $this->get('Script');
|
||||
$this->state = $this->get('State');
|
||||
// get action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('component_custom_admin_views',$this->item);
|
||||
$this->canDo = ComponentbuilderHelper::getActions('component_custom_admin_views',$this->item);
|
||||
// get input
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
$this->ref = $jinput->get('ref', 0, 'word');
|
||||
$this->refid = $jinput->get('refid', 0, 'int');
|
||||
$this->referral = '';
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
$this->ref = $jinput->get('ref', 0, 'word');
|
||||
$this->refid = $jinput->get('refid', 0, 'int');
|
||||
$this->referral = '';
|
||||
if ($this->refid)
|
||||
{
|
||||
// return to the item that refered to this item
|
||||
|
@ -41,17 +41,17 @@ class ComponentbuilderViewComponent_dashboard extends JViewLegacy
|
||||
public function display($tpl = null)
|
||||
{
|
||||
// Assign the variables
|
||||
$this->form = $this->get('Form');
|
||||
$this->item = $this->get('Item');
|
||||
$this->script = $this->get('Script');
|
||||
$this->state = $this->get('State');
|
||||
$this->form = $this->get('Form');
|
||||
$this->item = $this->get('Item');
|
||||
$this->script = $this->get('Script');
|
||||
$this->state = $this->get('State');
|
||||
// get action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('component_dashboard',$this->item);
|
||||
$this->canDo = ComponentbuilderHelper::getActions('component_dashboard',$this->item);
|
||||
// get input
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
$this->ref = $jinput->get('ref', 0, 'word');
|
||||
$this->refid = $jinput->get('refid', 0, 'int');
|
||||
$this->referral = '';
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
$this->ref = $jinput->get('ref', 0, 'word');
|
||||
$this->refid = $jinput->get('refid', 0, 'int');
|
||||
$this->referral = '';
|
||||
if ($this->refid)
|
||||
{
|
||||
// return to the item that refered to this item
|
||||
|
@ -41,17 +41,17 @@ class ComponentbuilderViewComponent_files_folders extends JViewLegacy
|
||||
public function display($tpl = null)
|
||||
{
|
||||
// Assign the variables
|
||||
$this->form = $this->get('Form');
|
||||
$this->item = $this->get('Item');
|
||||
$this->script = $this->get('Script');
|
||||
$this->state = $this->get('State');
|
||||
$this->form = $this->get('Form');
|
||||
$this->item = $this->get('Item');
|
||||
$this->script = $this->get('Script');
|
||||
$this->state = $this->get('State');
|
||||
// get action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('component_files_folders',$this->item);
|
||||
$this->canDo = ComponentbuilderHelper::getActions('component_files_folders',$this->item);
|
||||
// get input
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
$this->ref = $jinput->get('ref', 0, 'word');
|
||||
$this->refid = $jinput->get('refid', 0, 'int');
|
||||
$this->referral = '';
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
$this->ref = $jinput->get('ref', 0, 'word');
|
||||
$this->refid = $jinput->get('refid', 0, 'int');
|
||||
$this->referral = '';
|
||||
if ($this->refid)
|
||||
{
|
||||
// return to the item that refered to this item
|
||||
|
@ -41,17 +41,17 @@ class ComponentbuilderViewComponent_mysql_tweaks extends JViewLegacy
|
||||
public function display($tpl = null)
|
||||
{
|
||||
// Assign the variables
|
||||
$this->form = $this->get('Form');
|
||||
$this->item = $this->get('Item');
|
||||
$this->script = $this->get('Script');
|
||||
$this->state = $this->get('State');
|
||||
$this->form = $this->get('Form');
|
||||
$this->item = $this->get('Item');
|
||||
$this->script = $this->get('Script');
|
||||
$this->state = $this->get('State');
|
||||
// get action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('component_mysql_tweaks',$this->item);
|
||||
$this->canDo = ComponentbuilderHelper::getActions('component_mysql_tweaks',$this->item);
|
||||
// get input
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
$this->ref = $jinput->get('ref', 0, 'word');
|
||||
$this->refid = $jinput->get('refid', 0, 'int');
|
||||
$this->referral = '';
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
$this->ref = $jinput->get('ref', 0, 'word');
|
||||
$this->refid = $jinput->get('refid', 0, 'int');
|
||||
$this->referral = '';
|
||||
if ($this->refid)
|
||||
{
|
||||
// return to the item that refered to this item
|
||||
|
@ -41,17 +41,17 @@ class ComponentbuilderViewComponent_site_views extends JViewLegacy
|
||||
public function display($tpl = null)
|
||||
{
|
||||
// Assign the variables
|
||||
$this->form = $this->get('Form');
|
||||
$this->item = $this->get('Item');
|
||||
$this->script = $this->get('Script');
|
||||
$this->state = $this->get('State');
|
||||
$this->form = $this->get('Form');
|
||||
$this->item = $this->get('Item');
|
||||
$this->script = $this->get('Script');
|
||||
$this->state = $this->get('State');
|
||||
// get action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('component_site_views',$this->item);
|
||||
$this->canDo = ComponentbuilderHelper::getActions('component_site_views',$this->item);
|
||||
// get input
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
$this->ref = $jinput->get('ref', 0, 'word');
|
||||
$this->refid = $jinput->get('refid', 0, 'int');
|
||||
$this->referral = '';
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
$this->ref = $jinput->get('ref', 0, 'word');
|
||||
$this->refid = $jinput->get('refid', 0, 'int');
|
||||
$this->referral = '';
|
||||
if ($this->refid)
|
||||
{
|
||||
// return to the item that refered to this item
|
||||
|
@ -41,17 +41,17 @@ class ComponentbuilderViewComponent_updates extends JViewLegacy
|
||||
public function display($tpl = null)
|
||||
{
|
||||
// Assign the variables
|
||||
$this->form = $this->get('Form');
|
||||
$this->item = $this->get('Item');
|
||||
$this->script = $this->get('Script');
|
||||
$this->state = $this->get('State');
|
||||
$this->form = $this->get('Form');
|
||||
$this->item = $this->get('Item');
|
||||
$this->script = $this->get('Script');
|
||||
$this->state = $this->get('State');
|
||||
// get action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('component_updates',$this->item);
|
||||
$this->canDo = ComponentbuilderHelper::getActions('component_updates',$this->item);
|
||||
// get input
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
$this->ref = $jinput->get('ref', 0, 'word');
|
||||
$this->refid = $jinput->get('refid', 0, 'int');
|
||||
$this->referral = '';
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
$this->ref = $jinput->get('ref', 0, 'word');
|
||||
$this->refid = $jinput->get('refid', 0, 'int');
|
||||
$this->referral = '';
|
||||
if ($this->refid)
|
||||
{
|
||||
// return to the item that refered to this item
|
||||
|
@ -75,15 +75,15 @@ class ComponentbuilderViewComponentbuilder extends JViewLegacy
|
||||
$canDo = ComponentbuilderHelper::getActions('componentbuilder');
|
||||
JToolBarHelper::title(JText::_('COM_COMPONENTBUILDER_DASHBOARD'), 'grid-2');
|
||||
|
||||
// set help url for this view if found
|
||||
$help_url = ComponentbuilderHelper::getHelpUrl('componentbuilder');
|
||||
if (ComponentbuilderHelper::checkString($help_url))
|
||||
{
|
||||
// set help url for this view if found
|
||||
$help_url = ComponentbuilderHelper::getHelpUrl('componentbuilder');
|
||||
if (ComponentbuilderHelper::checkString($help_url))
|
||||
{
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
}
|
||||
}
|
||||
|
||||
if ($canDo->get('core.admin') || $canDo->get('core.options'))
|
||||
{
|
||||
{
|
||||
JToolBarHelper::preferences('com_componentbuilder');
|
||||
}
|
||||
}
|
||||
|
@ -47,20 +47,20 @@ class ComponentbuilderViewComponents_admin_views extends JViewLegacy
|
||||
}
|
||||
|
||||
// Assign data to the view
|
||||
$this->items = $this->get('Items');
|
||||
$this->pagination = $this->get('Pagination');
|
||||
$this->state = $this->get('State');
|
||||
$this->user = JFactory::getUser();
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$this->listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$this->saveOrder = $this->listOrder == 'ordering';
|
||||
$this->items = $this->get('Items');
|
||||
$this->pagination = $this->get('Pagination');
|
||||
$this->state = $this->get('State');
|
||||
$this->user = JFactory::getUser();
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$this->listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$this->saveOrder = $this->listOrder == 'ordering';
|
||||
// get global action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('component_admin_views');
|
||||
$this->canEdit = $this->canDo->get('component_admin_views.edit');
|
||||
$this->canState = $this->canDo->get('component_admin_views.edit.state');
|
||||
$this->canCreate = $this->canDo->get('component_admin_views.create');
|
||||
$this->canDelete = $this->canDo->get('component_admin_views.delete');
|
||||
$this->canBatch = $this->canDo->get('core.batch');
|
||||
$this->canDo = ComponentbuilderHelper::getActions('component_admin_views');
|
||||
$this->canEdit = $this->canDo->get('component_admin_views.edit');
|
||||
$this->canState = $this->canDo->get('component_admin_views.edit.state');
|
||||
$this->canCreate = $this->canDo->get('component_admin_views.create');
|
||||
$this->canDelete = $this->canDo->get('component_admin_views.delete');
|
||||
$this->canBatch = $this->canDo->get('core.batch');
|
||||
|
||||
// We don't need toolbar in the modal window.
|
||||
if ($this->getLayout() !== 'modal')
|
||||
@ -149,7 +149,7 @@ class ComponentbuilderViewComponents_admin_views extends JViewLegacy
|
||||
$help_url = ComponentbuilderHelper::getHelpUrl('components_admin_views');
|
||||
if (ComponentbuilderHelper::checkString($help_url))
|
||||
{
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
}
|
||||
|
||||
// add the options comp button
|
||||
|
@ -47,20 +47,20 @@ class ComponentbuilderViewComponents_config extends JViewLegacy
|
||||
}
|
||||
|
||||
// Assign data to the view
|
||||
$this->items = $this->get('Items');
|
||||
$this->pagination = $this->get('Pagination');
|
||||
$this->state = $this->get('State');
|
||||
$this->user = JFactory::getUser();
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$this->listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$this->saveOrder = $this->listOrder == 'ordering';
|
||||
$this->items = $this->get('Items');
|
||||
$this->pagination = $this->get('Pagination');
|
||||
$this->state = $this->get('State');
|
||||
$this->user = JFactory::getUser();
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$this->listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$this->saveOrder = $this->listOrder == 'ordering';
|
||||
// get global action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('component_config');
|
||||
$this->canEdit = $this->canDo->get('component_config.edit');
|
||||
$this->canState = $this->canDo->get('component_config.edit.state');
|
||||
$this->canCreate = $this->canDo->get('component_config.create');
|
||||
$this->canDelete = $this->canDo->get('component_config.delete');
|
||||
$this->canBatch = $this->canDo->get('core.batch');
|
||||
$this->canDo = ComponentbuilderHelper::getActions('component_config');
|
||||
$this->canEdit = $this->canDo->get('component_config.edit');
|
||||
$this->canState = $this->canDo->get('component_config.edit.state');
|
||||
$this->canCreate = $this->canDo->get('component_config.create');
|
||||
$this->canDelete = $this->canDo->get('component_config.delete');
|
||||
$this->canBatch = $this->canDo->get('core.batch');
|
||||
|
||||
// We don't need toolbar in the modal window.
|
||||
if ($this->getLayout() !== 'modal')
|
||||
@ -149,7 +149,7 @@ class ComponentbuilderViewComponents_config extends JViewLegacy
|
||||
$help_url = ComponentbuilderHelper::getHelpUrl('components_config');
|
||||
if (ComponentbuilderHelper::checkString($help_url))
|
||||
{
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
}
|
||||
|
||||
// add the options comp button
|
||||
|
@ -47,20 +47,20 @@ class ComponentbuilderViewComponents_custom_admin_menus extends JViewLegacy
|
||||
}
|
||||
|
||||
// Assign data to the view
|
||||
$this->items = $this->get('Items');
|
||||
$this->pagination = $this->get('Pagination');
|
||||
$this->state = $this->get('State');
|
||||
$this->user = JFactory::getUser();
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$this->listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$this->saveOrder = $this->listOrder == 'ordering';
|
||||
$this->items = $this->get('Items');
|
||||
$this->pagination = $this->get('Pagination');
|
||||
$this->state = $this->get('State');
|
||||
$this->user = JFactory::getUser();
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$this->listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$this->saveOrder = $this->listOrder == 'ordering';
|
||||
// get global action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('component_custom_admin_menus');
|
||||
$this->canEdit = $this->canDo->get('component_custom_admin_menus.edit');
|
||||
$this->canState = $this->canDo->get('component_custom_admin_menus.edit.state');
|
||||
$this->canCreate = $this->canDo->get('component_custom_admin_menus.create');
|
||||
$this->canDelete = $this->canDo->get('component_custom_admin_menus.delete');
|
||||
$this->canBatch = $this->canDo->get('core.batch');
|
||||
$this->canDo = ComponentbuilderHelper::getActions('component_custom_admin_menus');
|
||||
$this->canEdit = $this->canDo->get('component_custom_admin_menus.edit');
|
||||
$this->canState = $this->canDo->get('component_custom_admin_menus.edit.state');
|
||||
$this->canCreate = $this->canDo->get('component_custom_admin_menus.create');
|
||||
$this->canDelete = $this->canDo->get('component_custom_admin_menus.delete');
|
||||
$this->canBatch = $this->canDo->get('core.batch');
|
||||
|
||||
// We don't need toolbar in the modal window.
|
||||
if ($this->getLayout() !== 'modal')
|
||||
@ -149,7 +149,7 @@ class ComponentbuilderViewComponents_custom_admin_menus extends JViewLegacy
|
||||
$help_url = ComponentbuilderHelper::getHelpUrl('components_custom_admin_menus');
|
||||
if (ComponentbuilderHelper::checkString($help_url))
|
||||
{
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
}
|
||||
|
||||
// add the options comp button
|
||||
|
@ -47,20 +47,20 @@ class ComponentbuilderViewComponents_custom_admin_views extends JViewLegacy
|
||||
}
|
||||
|
||||
// Assign data to the view
|
||||
$this->items = $this->get('Items');
|
||||
$this->pagination = $this->get('Pagination');
|
||||
$this->state = $this->get('State');
|
||||
$this->user = JFactory::getUser();
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$this->listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$this->saveOrder = $this->listOrder == 'ordering';
|
||||
$this->items = $this->get('Items');
|
||||
$this->pagination = $this->get('Pagination');
|
||||
$this->state = $this->get('State');
|
||||
$this->user = JFactory::getUser();
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$this->listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$this->saveOrder = $this->listOrder == 'ordering';
|
||||
// get global action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('component_custom_admin_views');
|
||||
$this->canEdit = $this->canDo->get('component_custom_admin_views.edit');
|
||||
$this->canState = $this->canDo->get('component_custom_admin_views.edit.state');
|
||||
$this->canCreate = $this->canDo->get('component_custom_admin_views.create');
|
||||
$this->canDelete = $this->canDo->get('component_custom_admin_views.delete');
|
||||
$this->canBatch = $this->canDo->get('core.batch');
|
||||
$this->canDo = ComponentbuilderHelper::getActions('component_custom_admin_views');
|
||||
$this->canEdit = $this->canDo->get('component_custom_admin_views.edit');
|
||||
$this->canState = $this->canDo->get('component_custom_admin_views.edit.state');
|
||||
$this->canCreate = $this->canDo->get('component_custom_admin_views.create');
|
||||
$this->canDelete = $this->canDo->get('component_custom_admin_views.delete');
|
||||
$this->canBatch = $this->canDo->get('core.batch');
|
||||
|
||||
// We don't need toolbar in the modal window.
|
||||
if ($this->getLayout() !== 'modal')
|
||||
@ -149,7 +149,7 @@ class ComponentbuilderViewComponents_custom_admin_views extends JViewLegacy
|
||||
$help_url = ComponentbuilderHelper::getHelpUrl('components_custom_admin_views');
|
||||
if (ComponentbuilderHelper::checkString($help_url))
|
||||
{
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
}
|
||||
|
||||
// add the options comp button
|
||||
|
@ -47,20 +47,20 @@ class ComponentbuilderViewComponents_dashboard extends JViewLegacy
|
||||
}
|
||||
|
||||
// Assign data to the view
|
||||
$this->items = $this->get('Items');
|
||||
$this->pagination = $this->get('Pagination');
|
||||
$this->state = $this->get('State');
|
||||
$this->user = JFactory::getUser();
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$this->listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$this->saveOrder = $this->listOrder == 'ordering';
|
||||
$this->items = $this->get('Items');
|
||||
$this->pagination = $this->get('Pagination');
|
||||
$this->state = $this->get('State');
|
||||
$this->user = JFactory::getUser();
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$this->listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$this->saveOrder = $this->listOrder == 'ordering';
|
||||
// get global action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('component_dashboard');
|
||||
$this->canEdit = $this->canDo->get('component_dashboard.edit');
|
||||
$this->canState = $this->canDo->get('component_dashboard.edit.state');
|
||||
$this->canCreate = $this->canDo->get('component_dashboard.create');
|
||||
$this->canDelete = $this->canDo->get('component_dashboard.delete');
|
||||
$this->canBatch = $this->canDo->get('core.batch');
|
||||
$this->canDo = ComponentbuilderHelper::getActions('component_dashboard');
|
||||
$this->canEdit = $this->canDo->get('component_dashboard.edit');
|
||||
$this->canState = $this->canDo->get('component_dashboard.edit.state');
|
||||
$this->canCreate = $this->canDo->get('component_dashboard.create');
|
||||
$this->canDelete = $this->canDo->get('component_dashboard.delete');
|
||||
$this->canBatch = $this->canDo->get('core.batch');
|
||||
|
||||
// We don't need toolbar in the modal window.
|
||||
if ($this->getLayout() !== 'modal')
|
||||
@ -149,7 +149,7 @@ class ComponentbuilderViewComponents_dashboard extends JViewLegacy
|
||||
$help_url = ComponentbuilderHelper::getHelpUrl('components_dashboard');
|
||||
if (ComponentbuilderHelper::checkString($help_url))
|
||||
{
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
}
|
||||
|
||||
// add the options comp button
|
||||
|
@ -47,20 +47,20 @@ class ComponentbuilderViewComponents_files_folders extends JViewLegacy
|
||||
}
|
||||
|
||||
// Assign data to the view
|
||||
$this->items = $this->get('Items');
|
||||
$this->pagination = $this->get('Pagination');
|
||||
$this->state = $this->get('State');
|
||||
$this->user = JFactory::getUser();
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$this->listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$this->saveOrder = $this->listOrder == 'ordering';
|
||||
$this->items = $this->get('Items');
|
||||
$this->pagination = $this->get('Pagination');
|
||||
$this->state = $this->get('State');
|
||||
$this->user = JFactory::getUser();
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$this->listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$this->saveOrder = $this->listOrder == 'ordering';
|
||||
// get global action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('component_files_folders');
|
||||
$this->canEdit = $this->canDo->get('component_files_folders.edit');
|
||||
$this->canState = $this->canDo->get('component_files_folders.edit.state');
|
||||
$this->canCreate = $this->canDo->get('component_files_folders.create');
|
||||
$this->canDelete = $this->canDo->get('component_files_folders.delete');
|
||||
$this->canBatch = $this->canDo->get('core.batch');
|
||||
$this->canDo = ComponentbuilderHelper::getActions('component_files_folders');
|
||||
$this->canEdit = $this->canDo->get('component_files_folders.edit');
|
||||
$this->canState = $this->canDo->get('component_files_folders.edit.state');
|
||||
$this->canCreate = $this->canDo->get('component_files_folders.create');
|
||||
$this->canDelete = $this->canDo->get('component_files_folders.delete');
|
||||
$this->canBatch = $this->canDo->get('core.batch');
|
||||
|
||||
// We don't need toolbar in the modal window.
|
||||
if ($this->getLayout() !== 'modal')
|
||||
@ -149,7 +149,7 @@ class ComponentbuilderViewComponents_files_folders extends JViewLegacy
|
||||
$help_url = ComponentbuilderHelper::getHelpUrl('components_files_folders');
|
||||
if (ComponentbuilderHelper::checkString($help_url))
|
||||
{
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
}
|
||||
|
||||
// add the options comp button
|
||||
|
@ -47,20 +47,20 @@ class ComponentbuilderViewComponents_mysql_tweaks extends JViewLegacy
|
||||
}
|
||||
|
||||
// Assign data to the view
|
||||
$this->items = $this->get('Items');
|
||||
$this->pagination = $this->get('Pagination');
|
||||
$this->state = $this->get('State');
|
||||
$this->user = JFactory::getUser();
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$this->listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$this->saveOrder = $this->listOrder == 'ordering';
|
||||
$this->items = $this->get('Items');
|
||||
$this->pagination = $this->get('Pagination');
|
||||
$this->state = $this->get('State');
|
||||
$this->user = JFactory::getUser();
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$this->listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$this->saveOrder = $this->listOrder == 'ordering';
|
||||
// get global action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('component_mysql_tweaks');
|
||||
$this->canEdit = $this->canDo->get('component_mysql_tweaks.edit');
|
||||
$this->canState = $this->canDo->get('component_mysql_tweaks.edit.state');
|
||||
$this->canCreate = $this->canDo->get('component_mysql_tweaks.create');
|
||||
$this->canDelete = $this->canDo->get('component_mysql_tweaks.delete');
|
||||
$this->canBatch = $this->canDo->get('core.batch');
|
||||
$this->canDo = ComponentbuilderHelper::getActions('component_mysql_tweaks');
|
||||
$this->canEdit = $this->canDo->get('component_mysql_tweaks.edit');
|
||||
$this->canState = $this->canDo->get('component_mysql_tweaks.edit.state');
|
||||
$this->canCreate = $this->canDo->get('component_mysql_tweaks.create');
|
||||
$this->canDelete = $this->canDo->get('component_mysql_tweaks.delete');
|
||||
$this->canBatch = $this->canDo->get('core.batch');
|
||||
|
||||
// We don't need toolbar in the modal window.
|
||||
if ($this->getLayout() !== 'modal')
|
||||
@ -149,7 +149,7 @@ class ComponentbuilderViewComponents_mysql_tweaks extends JViewLegacy
|
||||
$help_url = ComponentbuilderHelper::getHelpUrl('components_mysql_tweaks');
|
||||
if (ComponentbuilderHelper::checkString($help_url))
|
||||
{
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
}
|
||||
|
||||
// add the options comp button
|
||||
|
@ -47,20 +47,20 @@ class ComponentbuilderViewComponents_site_views extends JViewLegacy
|
||||
}
|
||||
|
||||
// Assign data to the view
|
||||
$this->items = $this->get('Items');
|
||||
$this->pagination = $this->get('Pagination');
|
||||
$this->state = $this->get('State');
|
||||
$this->user = JFactory::getUser();
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$this->listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$this->saveOrder = $this->listOrder == 'ordering';
|
||||
$this->items = $this->get('Items');
|
||||
$this->pagination = $this->get('Pagination');
|
||||
$this->state = $this->get('State');
|
||||
$this->user = JFactory::getUser();
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$this->listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$this->saveOrder = $this->listOrder == 'ordering';
|
||||
// get global action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('component_site_views');
|
||||
$this->canEdit = $this->canDo->get('component_site_views.edit');
|
||||
$this->canState = $this->canDo->get('component_site_views.edit.state');
|
||||
$this->canCreate = $this->canDo->get('component_site_views.create');
|
||||
$this->canDelete = $this->canDo->get('component_site_views.delete');
|
||||
$this->canBatch = $this->canDo->get('core.batch');
|
||||
$this->canDo = ComponentbuilderHelper::getActions('component_site_views');
|
||||
$this->canEdit = $this->canDo->get('component_site_views.edit');
|
||||
$this->canState = $this->canDo->get('component_site_views.edit.state');
|
||||
$this->canCreate = $this->canDo->get('component_site_views.create');
|
||||
$this->canDelete = $this->canDo->get('component_site_views.delete');
|
||||
$this->canBatch = $this->canDo->get('core.batch');
|
||||
|
||||
// We don't need toolbar in the modal window.
|
||||
if ($this->getLayout() !== 'modal')
|
||||
@ -149,7 +149,7 @@ class ComponentbuilderViewComponents_site_views extends JViewLegacy
|
||||
$help_url = ComponentbuilderHelper::getHelpUrl('components_site_views');
|
||||
if (ComponentbuilderHelper::checkString($help_url))
|
||||
{
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
}
|
||||
|
||||
// add the options comp button
|
||||
|
@ -47,20 +47,20 @@ class ComponentbuilderViewComponents_updates extends JViewLegacy
|
||||
}
|
||||
|
||||
// Assign data to the view
|
||||
$this->items = $this->get('Items');
|
||||
$this->pagination = $this->get('Pagination');
|
||||
$this->state = $this->get('State');
|
||||
$this->user = JFactory::getUser();
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$this->listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$this->saveOrder = $this->listOrder == 'ordering';
|
||||
$this->items = $this->get('Items');
|
||||
$this->pagination = $this->get('Pagination');
|
||||
$this->state = $this->get('State');
|
||||
$this->user = JFactory::getUser();
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$this->listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$this->saveOrder = $this->listOrder == 'ordering';
|
||||
// get global action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('component_updates');
|
||||
$this->canEdit = $this->canDo->get('component_updates.edit');
|
||||
$this->canState = $this->canDo->get('component_updates.edit.state');
|
||||
$this->canCreate = $this->canDo->get('component_updates.create');
|
||||
$this->canDelete = $this->canDo->get('component_updates.delete');
|
||||
$this->canBatch = $this->canDo->get('core.batch');
|
||||
$this->canDo = ComponentbuilderHelper::getActions('component_updates');
|
||||
$this->canEdit = $this->canDo->get('component_updates.edit');
|
||||
$this->canState = $this->canDo->get('component_updates.edit.state');
|
||||
$this->canCreate = $this->canDo->get('component_updates.create');
|
||||
$this->canDelete = $this->canDo->get('component_updates.delete');
|
||||
$this->canBatch = $this->canDo->get('core.batch');
|
||||
|
||||
// We don't need toolbar in the modal window.
|
||||
if ($this->getLayout() !== 'modal')
|
||||
@ -149,7 +149,7 @@ class ComponentbuilderViewComponents_updates extends JViewLegacy
|
||||
$help_url = ComponentbuilderHelper::getHelpUrl('components_updates');
|
||||
if (ComponentbuilderHelper::checkString($help_url))
|
||||
{
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
}
|
||||
|
||||
// add the options comp button
|
||||
|
@ -41,17 +41,17 @@ class ComponentbuilderViewCustom_admin_view extends JViewLegacy
|
||||
public function display($tpl = null)
|
||||
{
|
||||
// Assign the variables
|
||||
$this->form = $this->get('Form');
|
||||
$this->item = $this->get('Item');
|
||||
$this->script = $this->get('Script');
|
||||
$this->state = $this->get('State');
|
||||
$this->form = $this->get('Form');
|
||||
$this->item = $this->get('Item');
|
||||
$this->script = $this->get('Script');
|
||||
$this->state = $this->get('State');
|
||||
// get action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('custom_admin_view',$this->item);
|
||||
$this->canDo = ComponentbuilderHelper::getActions('custom_admin_view',$this->item);
|
||||
// get input
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
$this->ref = $jinput->get('ref', 0, 'word');
|
||||
$this->refid = $jinput->get('refid', 0, 'int');
|
||||
$this->referral = '';
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
$this->ref = $jinput->get('ref', 0, 'word');
|
||||
$this->refid = $jinput->get('refid', 0, 'int');
|
||||
$this->referral = '';
|
||||
if ($this->refid)
|
||||
{
|
||||
// return to the item that refered to this item
|
||||
|
@ -47,20 +47,20 @@ class ComponentbuilderViewCustom_admin_views extends JViewLegacy
|
||||
}
|
||||
|
||||
// Assign data to the view
|
||||
$this->items = $this->get('Items');
|
||||
$this->pagination = $this->get('Pagination');
|
||||
$this->state = $this->get('State');
|
||||
$this->user = JFactory::getUser();
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$this->listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$this->saveOrder = $this->listOrder == 'ordering';
|
||||
$this->items = $this->get('Items');
|
||||
$this->pagination = $this->get('Pagination');
|
||||
$this->state = $this->get('State');
|
||||
$this->user = JFactory::getUser();
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$this->listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$this->saveOrder = $this->listOrder == 'ordering';
|
||||
// get global action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('custom_admin_view');
|
||||
$this->canEdit = $this->canDo->get('core.edit');
|
||||
$this->canState = $this->canDo->get('core.edit.state');
|
||||
$this->canCreate = $this->canDo->get('core.create');
|
||||
$this->canDelete = $this->canDo->get('core.delete');
|
||||
$this->canBatch = $this->canDo->get('core.batch');
|
||||
$this->canDo = ComponentbuilderHelper::getActions('custom_admin_view');
|
||||
$this->canEdit = $this->canDo->get('core.edit');
|
||||
$this->canState = $this->canDo->get('core.edit.state');
|
||||
$this->canCreate = $this->canDo->get('core.create');
|
||||
$this->canDelete = $this->canDo->get('core.delete');
|
||||
$this->canBatch = $this->canDo->get('core.batch');
|
||||
|
||||
// We don't need toolbar in the modal window.
|
||||
if ($this->getLayout() !== 'modal')
|
||||
@ -164,7 +164,7 @@ class ComponentbuilderViewCustom_admin_views extends JViewLegacy
|
||||
$help_url = ComponentbuilderHelper::getHelpUrl('custom_admin_views');
|
||||
if (ComponentbuilderHelper::checkString($help_url))
|
||||
{
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
}
|
||||
|
||||
// add the options comp button
|
||||
|
@ -41,17 +41,17 @@ class ComponentbuilderViewCustom_code extends JViewLegacy
|
||||
public function display($tpl = null)
|
||||
{
|
||||
// Assign the variables
|
||||
$this->form = $this->get('Form');
|
||||
$this->item = $this->get('Item');
|
||||
$this->script = $this->get('Script');
|
||||
$this->state = $this->get('State');
|
||||
$this->form = $this->get('Form');
|
||||
$this->item = $this->get('Item');
|
||||
$this->script = $this->get('Script');
|
||||
$this->state = $this->get('State');
|
||||
// get action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('custom_code',$this->item);
|
||||
$this->canDo = ComponentbuilderHelper::getActions('custom_code',$this->item);
|
||||
// get input
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
$this->ref = $jinput->get('ref', 0, 'word');
|
||||
$this->refid = $jinput->get('refid', 0, 'int');
|
||||
$this->referral = '';
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
$this->ref = $jinput->get('ref', 0, 'word');
|
||||
$this->refid = $jinput->get('refid', 0, 'int');
|
||||
$this->referral = '';
|
||||
if ($this->refid)
|
||||
{
|
||||
// return to the item that refered to this item
|
||||
|
@ -47,20 +47,20 @@ class ComponentbuilderViewCustom_codes extends JViewLegacy
|
||||
}
|
||||
|
||||
// Assign data to the view
|
||||
$this->items = $this->get('Items');
|
||||
$this->pagination = $this->get('Pagination');
|
||||
$this->state = $this->get('State');
|
||||
$this->user = JFactory::getUser();
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$this->listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$this->saveOrder = $this->listOrder == 'ordering';
|
||||
$this->items = $this->get('Items');
|
||||
$this->pagination = $this->get('Pagination');
|
||||
$this->state = $this->get('State');
|
||||
$this->user = JFactory::getUser();
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$this->listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$this->saveOrder = $this->listOrder == 'ordering';
|
||||
// get global action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('custom_code');
|
||||
$this->canEdit = $this->canDo->get('custom_code.edit');
|
||||
$this->canState = $this->canDo->get('custom_code.edit.state');
|
||||
$this->canCreate = $this->canDo->get('custom_code.create');
|
||||
$this->canDelete = $this->canDo->get('custom_code.delete');
|
||||
$this->canBatch = $this->canDo->get('core.batch');
|
||||
$this->canDo = ComponentbuilderHelper::getActions('custom_code');
|
||||
$this->canEdit = $this->canDo->get('custom_code.edit');
|
||||
$this->canState = $this->canDo->get('custom_code.edit.state');
|
||||
$this->canCreate = $this->canDo->get('custom_code.create');
|
||||
$this->canDelete = $this->canDo->get('custom_code.delete');
|
||||
$this->canBatch = $this->canDo->get('core.batch');
|
||||
|
||||
// We don't need toolbar in the modal window.
|
||||
if ($this->getLayout() !== 'modal')
|
||||
@ -159,7 +159,7 @@ class ComponentbuilderViewCustom_codes extends JViewLegacy
|
||||
$help_url = ComponentbuilderHelper::getHelpUrl('custom_codes');
|
||||
if (ComponentbuilderHelper::checkString($help_url))
|
||||
{
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
}
|
||||
|
||||
// add the options comp button
|
||||
|
@ -41,17 +41,17 @@ class ComponentbuilderViewDynamic_get extends JViewLegacy
|
||||
public function display($tpl = null)
|
||||
{
|
||||
// Assign the variables
|
||||
$this->form = $this->get('Form');
|
||||
$this->item = $this->get('Item');
|
||||
$this->script = $this->get('Script');
|
||||
$this->state = $this->get('State');
|
||||
$this->form = $this->get('Form');
|
||||
$this->item = $this->get('Item');
|
||||
$this->script = $this->get('Script');
|
||||
$this->state = $this->get('State');
|
||||
// get action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('dynamic_get',$this->item);
|
||||
$this->canDo = ComponentbuilderHelper::getActions('dynamic_get',$this->item);
|
||||
// get input
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
$this->ref = $jinput->get('ref', 0, 'word');
|
||||
$this->refid = $jinput->get('refid', 0, 'int');
|
||||
$this->referral = '';
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
$this->ref = $jinput->get('ref', 0, 'word');
|
||||
$this->refid = $jinput->get('refid', 0, 'int');
|
||||
$this->referral = '';
|
||||
if ($this->refid)
|
||||
{
|
||||
// return to the item that refered to this item
|
||||
|
@ -47,20 +47,20 @@ class ComponentbuilderViewDynamic_gets extends JViewLegacy
|
||||
}
|
||||
|
||||
// Assign data to the view
|
||||
$this->items = $this->get('Items');
|
||||
$this->pagination = $this->get('Pagination');
|
||||
$this->state = $this->get('State');
|
||||
$this->user = JFactory::getUser();
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$this->listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$this->saveOrder = $this->listOrder == 'ordering';
|
||||
$this->items = $this->get('Items');
|
||||
$this->pagination = $this->get('Pagination');
|
||||
$this->state = $this->get('State');
|
||||
$this->user = JFactory::getUser();
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$this->listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$this->saveOrder = $this->listOrder == 'ordering';
|
||||
// get global action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('dynamic_get');
|
||||
$this->canEdit = $this->canDo->get('dynamic_get.edit');
|
||||
$this->canState = $this->canDo->get('dynamic_get.edit.state');
|
||||
$this->canCreate = $this->canDo->get('dynamic_get.create');
|
||||
$this->canDelete = $this->canDo->get('dynamic_get.delete');
|
||||
$this->canBatch = $this->canDo->get('core.batch');
|
||||
$this->canDo = ComponentbuilderHelper::getActions('dynamic_get');
|
||||
$this->canEdit = $this->canDo->get('dynamic_get.edit');
|
||||
$this->canState = $this->canDo->get('dynamic_get.edit.state');
|
||||
$this->canCreate = $this->canDo->get('dynamic_get.create');
|
||||
$this->canDelete = $this->canDo->get('dynamic_get.delete');
|
||||
$this->canBatch = $this->canDo->get('core.batch');
|
||||
|
||||
// We don't need toolbar in the modal window.
|
||||
if ($this->getLayout() !== 'modal')
|
||||
@ -159,7 +159,7 @@ class ComponentbuilderViewDynamic_gets extends JViewLegacy
|
||||
$help_url = ComponentbuilderHelper::getHelpUrl('dynamic_gets');
|
||||
if (ComponentbuilderHelper::checkString($help_url))
|
||||
{
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
}
|
||||
|
||||
// add the options comp button
|
||||
|
@ -41,17 +41,17 @@ class ComponentbuilderViewField extends JViewLegacy
|
||||
public function display($tpl = null)
|
||||
{
|
||||
// Assign the variables
|
||||
$this->form = $this->get('Form');
|
||||
$this->item = $this->get('Item');
|
||||
$this->script = $this->get('Script');
|
||||
$this->state = $this->get('State');
|
||||
$this->form = $this->get('Form');
|
||||
$this->item = $this->get('Item');
|
||||
$this->script = $this->get('Script');
|
||||
$this->state = $this->get('State');
|
||||
// get action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('field',$this->item);
|
||||
$this->canDo = ComponentbuilderHelper::getActions('field',$this->item);
|
||||
// get input
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
$this->ref = $jinput->get('ref', 0, 'word');
|
||||
$this->refid = $jinput->get('refid', 0, 'int');
|
||||
$this->referral = '';
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
$this->ref = $jinput->get('ref', 0, 'word');
|
||||
$this->refid = $jinput->get('refid', 0, 'int');
|
||||
$this->referral = '';
|
||||
if ($this->refid)
|
||||
{
|
||||
// return to the item that refered to this item
|
||||
|
@ -47,20 +47,20 @@ class ComponentbuilderViewFields extends JViewLegacy
|
||||
}
|
||||
|
||||
// Assign data to the view
|
||||
$this->items = $this->get('Items');
|
||||
$this->pagination = $this->get('Pagination');
|
||||
$this->state = $this->get('State');
|
||||
$this->user = JFactory::getUser();
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$this->listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$this->saveOrder = $this->listOrder == 'ordering';
|
||||
$this->items = $this->get('Items');
|
||||
$this->pagination = $this->get('Pagination');
|
||||
$this->state = $this->get('State');
|
||||
$this->user = JFactory::getUser();
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$this->listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$this->saveOrder = $this->listOrder == 'ordering';
|
||||
// get global action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('field');
|
||||
$this->canEdit = $this->canDo->get('field.edit');
|
||||
$this->canState = $this->canDo->get('field.edit.state');
|
||||
$this->canCreate = $this->canDo->get('field.create');
|
||||
$this->canDelete = $this->canDo->get('field.delete');
|
||||
$this->canBatch = $this->canDo->get('core.batch');
|
||||
$this->canDo = ComponentbuilderHelper::getActions('field');
|
||||
$this->canEdit = $this->canDo->get('field.edit');
|
||||
$this->canState = $this->canDo->get('field.edit.state');
|
||||
$this->canCreate = $this->canDo->get('field.create');
|
||||
$this->canDelete = $this->canDo->get('field.delete');
|
||||
$this->canBatch = $this->canDo->get('core.batch');
|
||||
|
||||
// We don't need toolbar in the modal window.
|
||||
if ($this->getLayout() !== 'modal')
|
||||
@ -159,7 +159,7 @@ class ComponentbuilderViewFields extends JViewLegacy
|
||||
$help_url = ComponentbuilderHelper::getHelpUrl('fields');
|
||||
if (ComponentbuilderHelper::checkString($help_url))
|
||||
{
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
}
|
||||
|
||||
// add the options comp button
|
||||
|
@ -41,17 +41,17 @@ class ComponentbuilderViewFieldtype extends JViewLegacy
|
||||
public function display($tpl = null)
|
||||
{
|
||||
// Assign the variables
|
||||
$this->form = $this->get('Form');
|
||||
$this->item = $this->get('Item');
|
||||
$this->script = $this->get('Script');
|
||||
$this->state = $this->get('State');
|
||||
$this->form = $this->get('Form');
|
||||
$this->item = $this->get('Item');
|
||||
$this->script = $this->get('Script');
|
||||
$this->state = $this->get('State');
|
||||
// get action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('fieldtype',$this->item);
|
||||
$this->canDo = ComponentbuilderHelper::getActions('fieldtype',$this->item);
|
||||
// get input
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
$this->ref = $jinput->get('ref', 0, 'word');
|
||||
$this->refid = $jinput->get('refid', 0, 'int');
|
||||
$this->referral = '';
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
$this->ref = $jinput->get('ref', 0, 'word');
|
||||
$this->refid = $jinput->get('refid', 0, 'int');
|
||||
$this->referral = '';
|
||||
if ($this->refid)
|
||||
{
|
||||
// return to the item that refered to this item
|
||||
@ -64,7 +64,7 @@ class ComponentbuilderViewFieldtype extends JViewLegacy
|
||||
}
|
||||
|
||||
// Get Linked view data
|
||||
$this->vzyfields = $this->get('Vzyfields');
|
||||
$this->vzyfields = $this->get('Vzyfields');
|
||||
|
||||
// Set the toolbar
|
||||
$this->addToolBar();
|
||||
|
@ -47,20 +47,20 @@ class ComponentbuilderViewFieldtypes extends JViewLegacy
|
||||
}
|
||||
|
||||
// Assign data to the view
|
||||
$this->items = $this->get('Items');
|
||||
$this->pagination = $this->get('Pagination');
|
||||
$this->state = $this->get('State');
|
||||
$this->user = JFactory::getUser();
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$this->listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$this->saveOrder = $this->listOrder == 'ordering';
|
||||
$this->items = $this->get('Items');
|
||||
$this->pagination = $this->get('Pagination');
|
||||
$this->state = $this->get('State');
|
||||
$this->user = JFactory::getUser();
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$this->listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$this->saveOrder = $this->listOrder == 'ordering';
|
||||
// get global action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('fieldtype');
|
||||
$this->canEdit = $this->canDo->get('fieldtype.edit');
|
||||
$this->canState = $this->canDo->get('fieldtype.edit.state');
|
||||
$this->canCreate = $this->canDo->get('fieldtype.create');
|
||||
$this->canDelete = $this->canDo->get('fieldtype.delete');
|
||||
$this->canBatch = $this->canDo->get('core.batch');
|
||||
$this->canDo = ComponentbuilderHelper::getActions('fieldtype');
|
||||
$this->canEdit = $this->canDo->get('fieldtype.edit');
|
||||
$this->canState = $this->canDo->get('fieldtype.edit.state');
|
||||
$this->canCreate = $this->canDo->get('fieldtype.create');
|
||||
$this->canDelete = $this->canDo->get('fieldtype.delete');
|
||||
$this->canBatch = $this->canDo->get('core.batch');
|
||||
|
||||
// We don't need toolbar in the modal window.
|
||||
if ($this->getLayout() !== 'modal')
|
||||
@ -159,7 +159,7 @@ class ComponentbuilderViewFieldtypes extends JViewLegacy
|
||||
$help_url = ComponentbuilderHelper::getHelpUrl('fieldtypes');
|
||||
if (ComponentbuilderHelper::checkString($help_url))
|
||||
{
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
}
|
||||
|
||||
// add the options comp button
|
||||
|
@ -41,17 +41,17 @@ class ComponentbuilderViewFtp extends JViewLegacy
|
||||
public function display($tpl = null)
|
||||
{
|
||||
// Assign the variables
|
||||
$this->form = $this->get('Form');
|
||||
$this->item = $this->get('Item');
|
||||
$this->script = $this->get('Script');
|
||||
$this->state = $this->get('State');
|
||||
$this->form = $this->get('Form');
|
||||
$this->item = $this->get('Item');
|
||||
$this->script = $this->get('Script');
|
||||
$this->state = $this->get('State');
|
||||
// get action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('ftp',$this->item);
|
||||
$this->canDo = ComponentbuilderHelper::getActions('ftp',$this->item);
|
||||
// get input
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
$this->ref = $jinput->get('ref', 0, 'word');
|
||||
$this->refid = $jinput->get('refid', 0, 'int');
|
||||
$this->referral = '';
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
$this->ref = $jinput->get('ref', 0, 'word');
|
||||
$this->refid = $jinput->get('refid', 0, 'int');
|
||||
$this->referral = '';
|
||||
if ($this->refid)
|
||||
{
|
||||
// return to the item that refered to this item
|
||||
@ -64,7 +64,7 @@ class ComponentbuilderViewFtp extends JViewLegacy
|
||||
}
|
||||
|
||||
// Get Linked view data
|
||||
$this->vzzlinked_components = $this->get('Vzzlinked_components');
|
||||
$this->vzzlinked_components = $this->get('Vzzlinked_components');
|
||||
|
||||
// Set the toolbar
|
||||
$this->addToolBar();
|
||||
|
@ -47,20 +47,20 @@ class ComponentbuilderViewFtps extends JViewLegacy
|
||||
}
|
||||
|
||||
// Assign data to the view
|
||||
$this->items = $this->get('Items');
|
||||
$this->pagination = $this->get('Pagination');
|
||||
$this->state = $this->get('State');
|
||||
$this->user = JFactory::getUser();
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$this->listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$this->saveOrder = $this->listOrder == 'ordering';
|
||||
$this->items = $this->get('Items');
|
||||
$this->pagination = $this->get('Pagination');
|
||||
$this->state = $this->get('State');
|
||||
$this->user = JFactory::getUser();
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$this->listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$this->saveOrder = $this->listOrder == 'ordering';
|
||||
// get global action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('ftp');
|
||||
$this->canEdit = $this->canDo->get('ftp.edit');
|
||||
$this->canState = $this->canDo->get('ftp.edit.state');
|
||||
$this->canCreate = $this->canDo->get('ftp.create');
|
||||
$this->canDelete = $this->canDo->get('ftp.delete');
|
||||
$this->canBatch = $this->canDo->get('core.batch');
|
||||
$this->canDo = ComponentbuilderHelper::getActions('ftp');
|
||||
$this->canEdit = $this->canDo->get('ftp.edit');
|
||||
$this->canState = $this->canDo->get('ftp.edit.state');
|
||||
$this->canCreate = $this->canDo->get('ftp.create');
|
||||
$this->canDelete = $this->canDo->get('ftp.delete');
|
||||
$this->canBatch = $this->canDo->get('core.batch');
|
||||
|
||||
// We don't need toolbar in the modal window.
|
||||
if ($this->getLayout() !== 'modal')
|
||||
@ -159,7 +159,7 @@ class ComponentbuilderViewFtps extends JViewLegacy
|
||||
$help_url = ComponentbuilderHelper::getHelpUrl('ftps');
|
||||
if (ComponentbuilderHelper::checkString($help_url))
|
||||
{
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
}
|
||||
|
||||
// add the options comp button
|
||||
|
@ -38,15 +38,15 @@ class ComponentbuilderViewGet_snippets extends JViewLegacy
|
||||
function display($tpl = null)
|
||||
{
|
||||
// get component params
|
||||
$this->params = JComponentHelper::getParams('com_componentbuilder');
|
||||
$this->params = JComponentHelper::getParams('com_componentbuilder');
|
||||
// get the application
|
||||
$this->app = JFactory::getApplication();
|
||||
$this->app = JFactory::getApplication();
|
||||
// get the user object
|
||||
$this->user = JFactory::getUser();
|
||||
// get global action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('get_snippets');
|
||||
$this->canDo = ComponentbuilderHelper::getActions('get_snippets');
|
||||
// Initialise variables.
|
||||
$this->items = $this->get('Items');
|
||||
$this->items = $this->get('Items');
|
||||
|
||||
// We don't need toolbar in the modal window.
|
||||
if ($this->getLayout() !== 'modal')
|
||||
|
@ -41,17 +41,17 @@ class ComponentbuilderViewHelp_document extends JViewLegacy
|
||||
public function display($tpl = null)
|
||||
{
|
||||
// Assign the variables
|
||||
$this->form = $this->get('Form');
|
||||
$this->item = $this->get('Item');
|
||||
$this->script = $this->get('Script');
|
||||
$this->state = $this->get('State');
|
||||
$this->form = $this->get('Form');
|
||||
$this->item = $this->get('Item');
|
||||
$this->script = $this->get('Script');
|
||||
$this->state = $this->get('State');
|
||||
// get action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('help_document',$this->item);
|
||||
$this->canDo = ComponentbuilderHelper::getActions('help_document',$this->item);
|
||||
// get input
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
$this->ref = $jinput->get('ref', 0, 'word');
|
||||
$this->refid = $jinput->get('refid', 0, 'int');
|
||||
$this->referral = '';
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
$this->ref = $jinput->get('ref', 0, 'word');
|
||||
$this->refid = $jinput->get('refid', 0, 'int');
|
||||
$this->referral = '';
|
||||
if ($this->refid)
|
||||
{
|
||||
// return to the item that refered to this item
|
||||
|
@ -47,20 +47,20 @@ class ComponentbuilderViewHelp_documents extends JViewLegacy
|
||||
}
|
||||
|
||||
// Assign data to the view
|
||||
$this->items = $this->get('Items');
|
||||
$this->pagination = $this->get('Pagination');
|
||||
$this->state = $this->get('State');
|
||||
$this->user = JFactory::getUser();
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$this->listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$this->saveOrder = $this->listOrder == 'ordering';
|
||||
$this->items = $this->get('Items');
|
||||
$this->pagination = $this->get('Pagination');
|
||||
$this->state = $this->get('State');
|
||||
$this->user = JFactory::getUser();
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$this->listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$this->saveOrder = $this->listOrder == 'ordering';
|
||||
// get global action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('help_document');
|
||||
$this->canEdit = $this->canDo->get('help_document.edit');
|
||||
$this->canState = $this->canDo->get('help_document.edit.state');
|
||||
$this->canCreate = $this->canDo->get('help_document.create');
|
||||
$this->canDelete = $this->canDo->get('help_document.delete');
|
||||
$this->canBatch = $this->canDo->get('core.batch');
|
||||
$this->canDo = ComponentbuilderHelper::getActions('help_document');
|
||||
$this->canEdit = $this->canDo->get('help_document.edit');
|
||||
$this->canState = $this->canDo->get('help_document.edit.state');
|
||||
$this->canCreate = $this->canDo->get('help_document.create');
|
||||
$this->canDelete = $this->canDo->get('help_document.delete');
|
||||
$this->canBatch = $this->canDo->get('core.batch');
|
||||
|
||||
// We don't need toolbar in the modal window.
|
||||
if ($this->getLayout() !== 'modal')
|
||||
@ -159,7 +159,7 @@ class ComponentbuilderViewHelp_documents extends JViewLegacy
|
||||
$help_url = ComponentbuilderHelper::getHelpUrl('help_documents');
|
||||
if (ComponentbuilderHelper::checkString($help_url))
|
||||
{
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
}
|
||||
|
||||
// add the options comp button
|
||||
|
@ -41,17 +41,17 @@ class ComponentbuilderViewJoomla_component extends JViewLegacy
|
||||
public function display($tpl = null)
|
||||
{
|
||||
// Assign the variables
|
||||
$this->form = $this->get('Form');
|
||||
$this->item = $this->get('Item');
|
||||
$this->script = $this->get('Script');
|
||||
$this->state = $this->get('State');
|
||||
$this->form = $this->get('Form');
|
||||
$this->item = $this->get('Item');
|
||||
$this->script = $this->get('Script');
|
||||
$this->state = $this->get('State');
|
||||
// get action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('joomla_component',$this->item);
|
||||
$this->canDo = ComponentbuilderHelper::getActions('joomla_component',$this->item);
|
||||
// get input
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
$this->ref = $jinput->get('ref', 0, 'word');
|
||||
$this->refid = $jinput->get('refid', 0, 'int');
|
||||
$this->referral = '';
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
$this->ref = $jinput->get('ref', 0, 'word');
|
||||
$this->refid = $jinput->get('refid', 0, 'int');
|
||||
$this->referral = '';
|
||||
if ($this->refid)
|
||||
{
|
||||
// return to the item that refered to this item
|
||||
@ -64,7 +64,7 @@ class ComponentbuilderViewJoomla_component extends JViewLegacy
|
||||
}
|
||||
|
||||
// Get Linked view data
|
||||
$this->vwmtranslation = $this->get('Vwmtranslation');
|
||||
$this->vwmtranslation = $this->get('Vwmtranslation');
|
||||
|
||||
// Set the toolbar
|
||||
$this->addToolBar();
|
||||
|
@ -47,20 +47,20 @@ class ComponentbuilderViewJoomla_components extends JViewLegacy
|
||||
}
|
||||
|
||||
// Assign data to the view
|
||||
$this->items = $this->get('Items');
|
||||
$this->pagination = $this->get('Pagination');
|
||||
$this->state = $this->get('State');
|
||||
$this->user = JFactory::getUser();
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$this->listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$this->saveOrder = $this->listOrder == 'ordering';
|
||||
$this->items = $this->get('Items');
|
||||
$this->pagination = $this->get('Pagination');
|
||||
$this->state = $this->get('State');
|
||||
$this->user = JFactory::getUser();
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$this->listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$this->saveOrder = $this->listOrder == 'ordering';
|
||||
// get global action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('joomla_component');
|
||||
$this->canEdit = $this->canDo->get('joomla_component.edit');
|
||||
$this->canState = $this->canDo->get('joomla_component.edit.state');
|
||||
$this->canCreate = $this->canDo->get('joomla_component.create');
|
||||
$this->canDelete = $this->canDo->get('joomla_component.delete');
|
||||
$this->canBatch = $this->canDo->get('core.batch');
|
||||
$this->canDo = ComponentbuilderHelper::getActions('joomla_component');
|
||||
$this->canEdit = $this->canDo->get('joomla_component.edit');
|
||||
$this->canState = $this->canDo->get('joomla_component.edit.state');
|
||||
$this->canCreate = $this->canDo->get('joomla_component.create');
|
||||
$this->canDelete = $this->canDo->get('joomla_component.delete');
|
||||
$this->canBatch = $this->canDo->get('core.batch');
|
||||
|
||||
// We don't need toolbar in the modal window.
|
||||
if ($this->getLayout() !== 'modal')
|
||||
@ -174,7 +174,7 @@ class ComponentbuilderViewJoomla_components extends JViewLegacy
|
||||
$help_url = ComponentbuilderHelper::getHelpUrl('joomla_components');
|
||||
if (ComponentbuilderHelper::checkString($help_url))
|
||||
{
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
}
|
||||
|
||||
// add the options comp button
|
||||
|
@ -41,17 +41,17 @@ class ComponentbuilderViewLanguage extends JViewLegacy
|
||||
public function display($tpl = null)
|
||||
{
|
||||
// Assign the variables
|
||||
$this->form = $this->get('Form');
|
||||
$this->item = $this->get('Item');
|
||||
$this->script = $this->get('Script');
|
||||
$this->state = $this->get('State');
|
||||
$this->form = $this->get('Form');
|
||||
$this->item = $this->get('Item');
|
||||
$this->script = $this->get('Script');
|
||||
$this->state = $this->get('State');
|
||||
// get action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('language',$this->item);
|
||||
$this->canDo = ComponentbuilderHelper::getActions('language',$this->item);
|
||||
// get input
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
$this->ref = $jinput->get('ref', 0, 'word');
|
||||
$this->refid = $jinput->get('refid', 0, 'int');
|
||||
$this->referral = '';
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
$this->ref = $jinput->get('ref', 0, 'word');
|
||||
$this->refid = $jinput->get('refid', 0, 'int');
|
||||
$this->referral = '';
|
||||
if ($this->refid)
|
||||
{
|
||||
// return to the item that refered to this item
|
||||
|
@ -41,17 +41,17 @@ class ComponentbuilderViewLanguage_translation extends JViewLegacy
|
||||
public function display($tpl = null)
|
||||
{
|
||||
// Assign the variables
|
||||
$this->form = $this->get('Form');
|
||||
$this->item = $this->get('Item');
|
||||
$this->script = $this->get('Script');
|
||||
$this->state = $this->get('State');
|
||||
$this->form = $this->get('Form');
|
||||
$this->item = $this->get('Item');
|
||||
$this->script = $this->get('Script');
|
||||
$this->state = $this->get('State');
|
||||
// get action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('language_translation',$this->item);
|
||||
$this->canDo = ComponentbuilderHelper::getActions('language_translation',$this->item);
|
||||
// get input
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
$this->ref = $jinput->get('ref', 0, 'word');
|
||||
$this->refid = $jinput->get('refid', 0, 'int');
|
||||
$this->referral = '';
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
$this->ref = $jinput->get('ref', 0, 'word');
|
||||
$this->refid = $jinput->get('refid', 0, 'int');
|
||||
$this->referral = '';
|
||||
if ($this->refid)
|
||||
{
|
||||
// return to the item that refered to this item
|
||||
|
@ -47,20 +47,20 @@ class ComponentbuilderViewLanguage_translations extends JViewLegacy
|
||||
}
|
||||
|
||||
// Assign data to the view
|
||||
$this->items = $this->get('Items');
|
||||
$this->pagination = $this->get('Pagination');
|
||||
$this->state = $this->get('State');
|
||||
$this->user = JFactory::getUser();
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$this->listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$this->saveOrder = $this->listOrder == 'ordering';
|
||||
$this->items = $this->get('Items');
|
||||
$this->pagination = $this->get('Pagination');
|
||||
$this->state = $this->get('State');
|
||||
$this->user = JFactory::getUser();
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$this->listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$this->saveOrder = $this->listOrder == 'ordering';
|
||||
// get global action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('language_translation');
|
||||
$this->canEdit = $this->canDo->get('language_translation.edit');
|
||||
$this->canState = $this->canDo->get('language_translation.edit.state');
|
||||
$this->canCreate = $this->canDo->get('language_translation.create');
|
||||
$this->canDelete = $this->canDo->get('language_translation.delete');
|
||||
$this->canBatch = $this->canDo->get('core.batch');
|
||||
$this->canDo = ComponentbuilderHelper::getActions('language_translation');
|
||||
$this->canEdit = $this->canDo->get('language_translation.edit');
|
||||
$this->canState = $this->canDo->get('language_translation.edit.state');
|
||||
$this->canCreate = $this->canDo->get('language_translation.create');
|
||||
$this->canDelete = $this->canDo->get('language_translation.delete');
|
||||
$this->canBatch = $this->canDo->get('core.batch');
|
||||
|
||||
// We don't need toolbar in the modal window.
|
||||
if ($this->getLayout() !== 'modal')
|
||||
@ -159,7 +159,7 @@ class ComponentbuilderViewLanguage_translations extends JViewLegacy
|
||||
$help_url = ComponentbuilderHelper::getHelpUrl('language_translations');
|
||||
if (ComponentbuilderHelper::checkString($help_url))
|
||||
{
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
}
|
||||
|
||||
// add the options comp button
|
||||
|
@ -47,20 +47,20 @@ class ComponentbuilderViewLanguages extends JViewLegacy
|
||||
}
|
||||
|
||||
// Assign data to the view
|
||||
$this->items = $this->get('Items');
|
||||
$this->pagination = $this->get('Pagination');
|
||||
$this->state = $this->get('State');
|
||||
$this->user = JFactory::getUser();
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$this->listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$this->saveOrder = $this->listOrder == 'ordering';
|
||||
$this->items = $this->get('Items');
|
||||
$this->pagination = $this->get('Pagination');
|
||||
$this->state = $this->get('State');
|
||||
$this->user = JFactory::getUser();
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$this->listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$this->saveOrder = $this->listOrder == 'ordering';
|
||||
// get global action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('language');
|
||||
$this->canEdit = $this->canDo->get('language.edit');
|
||||
$this->canState = $this->canDo->get('language.edit.state');
|
||||
$this->canCreate = $this->canDo->get('language.create');
|
||||
$this->canDelete = $this->canDo->get('language.delete');
|
||||
$this->canBatch = $this->canDo->get('core.batch');
|
||||
$this->canDo = ComponentbuilderHelper::getActions('language');
|
||||
$this->canEdit = $this->canDo->get('language.edit');
|
||||
$this->canState = $this->canDo->get('language.edit.state');
|
||||
$this->canCreate = $this->canDo->get('language.create');
|
||||
$this->canDelete = $this->canDo->get('language.delete');
|
||||
$this->canBatch = $this->canDo->get('core.batch');
|
||||
|
||||
// We don't need toolbar in the modal window.
|
||||
if ($this->getLayout() !== 'modal')
|
||||
@ -159,7 +159,7 @@ class ComponentbuilderViewLanguages extends JViewLegacy
|
||||
$help_url = ComponentbuilderHelper::getHelpUrl('languages');
|
||||
if (ComponentbuilderHelper::checkString($help_url))
|
||||
{
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
}
|
||||
|
||||
// add the options comp button
|
||||
|
@ -41,17 +41,17 @@ class ComponentbuilderViewLayout extends JViewLegacy
|
||||
public function display($tpl = null)
|
||||
{
|
||||
// Assign the variables
|
||||
$this->form = $this->get('Form');
|
||||
$this->item = $this->get('Item');
|
||||
$this->script = $this->get('Script');
|
||||
$this->state = $this->get('State');
|
||||
$this->form = $this->get('Form');
|
||||
$this->item = $this->get('Item');
|
||||
$this->script = $this->get('Script');
|
||||
$this->state = $this->get('State');
|
||||
// get action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('layout',$this->item);
|
||||
$this->canDo = ComponentbuilderHelper::getActions('layout',$this->item);
|
||||
// get input
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
$this->ref = $jinput->get('ref', 0, 'word');
|
||||
$this->refid = $jinput->get('refid', 0, 'int');
|
||||
$this->referral = '';
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
$this->ref = $jinput->get('ref', 0, 'word');
|
||||
$this->refid = $jinput->get('refid', 0, 'int');
|
||||
$this->referral = '';
|
||||
if ($this->refid)
|
||||
{
|
||||
// return to the item that refered to this item
|
||||
|
@ -47,20 +47,20 @@ class ComponentbuilderViewLayouts extends JViewLegacy
|
||||
}
|
||||
|
||||
// Assign data to the view
|
||||
$this->items = $this->get('Items');
|
||||
$this->pagination = $this->get('Pagination');
|
||||
$this->state = $this->get('State');
|
||||
$this->user = JFactory::getUser();
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$this->listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$this->saveOrder = $this->listOrder == 'ordering';
|
||||
$this->items = $this->get('Items');
|
||||
$this->pagination = $this->get('Pagination');
|
||||
$this->state = $this->get('State');
|
||||
$this->user = JFactory::getUser();
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$this->listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$this->saveOrder = $this->listOrder == 'ordering';
|
||||
// get global action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('layout');
|
||||
$this->canEdit = $this->canDo->get('core.edit');
|
||||
$this->canState = $this->canDo->get('core.edit.state');
|
||||
$this->canCreate = $this->canDo->get('core.create');
|
||||
$this->canDelete = $this->canDo->get('core.delete');
|
||||
$this->canBatch = $this->canDo->get('core.batch');
|
||||
$this->canDo = ComponentbuilderHelper::getActions('layout');
|
||||
$this->canEdit = $this->canDo->get('core.edit');
|
||||
$this->canState = $this->canDo->get('core.edit.state');
|
||||
$this->canCreate = $this->canDo->get('core.create');
|
||||
$this->canDelete = $this->canDo->get('core.delete');
|
||||
$this->canBatch = $this->canDo->get('core.batch');
|
||||
|
||||
// We don't need toolbar in the modal window.
|
||||
if ($this->getLayout() !== 'modal')
|
||||
@ -164,7 +164,7 @@ class ComponentbuilderViewLayouts extends JViewLegacy
|
||||
$help_url = ComponentbuilderHelper::getHelpUrl('layouts');
|
||||
if (ComponentbuilderHelper::checkString($help_url))
|
||||
{
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
}
|
||||
|
||||
// add the options comp button
|
||||
|
@ -47,20 +47,20 @@ class ComponentbuilderViewLibraries extends JViewLegacy
|
||||
}
|
||||
|
||||
// Assign data to the view
|
||||
$this->items = $this->get('Items');
|
||||
$this->pagination = $this->get('Pagination');
|
||||
$this->state = $this->get('State');
|
||||
$this->user = JFactory::getUser();
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$this->listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$this->saveOrder = $this->listOrder == 'ordering';
|
||||
$this->items = $this->get('Items');
|
||||
$this->pagination = $this->get('Pagination');
|
||||
$this->state = $this->get('State');
|
||||
$this->user = JFactory::getUser();
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$this->listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$this->saveOrder = $this->listOrder == 'ordering';
|
||||
// get global action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('library');
|
||||
$this->canEdit = $this->canDo->get('library.edit');
|
||||
$this->canState = $this->canDo->get('library.edit.state');
|
||||
$this->canCreate = $this->canDo->get('library.create');
|
||||
$this->canDelete = $this->canDo->get('library.delete');
|
||||
$this->canBatch = $this->canDo->get('core.batch');
|
||||
$this->canDo = ComponentbuilderHelper::getActions('library');
|
||||
$this->canEdit = $this->canDo->get('library.edit');
|
||||
$this->canState = $this->canDo->get('library.edit.state');
|
||||
$this->canCreate = $this->canDo->get('library.create');
|
||||
$this->canDelete = $this->canDo->get('library.delete');
|
||||
$this->canBatch = $this->canDo->get('core.batch');
|
||||
|
||||
// We don't need toolbar in the modal window.
|
||||
if ($this->getLayout() !== 'modal')
|
||||
@ -154,7 +154,7 @@ class ComponentbuilderViewLibraries extends JViewLegacy
|
||||
$help_url = ComponentbuilderHelper::getHelpUrl('libraries');
|
||||
if (ComponentbuilderHelper::checkString($help_url))
|
||||
{
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
}
|
||||
|
||||
// add the options comp button
|
||||
|
@ -47,20 +47,20 @@ class ComponentbuilderViewLibraries_config extends JViewLegacy
|
||||
}
|
||||
|
||||
// Assign data to the view
|
||||
$this->items = $this->get('Items');
|
||||
$this->pagination = $this->get('Pagination');
|
||||
$this->state = $this->get('State');
|
||||
$this->user = JFactory::getUser();
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$this->listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$this->saveOrder = $this->listOrder == 'ordering';
|
||||
$this->items = $this->get('Items');
|
||||
$this->pagination = $this->get('Pagination');
|
||||
$this->state = $this->get('State');
|
||||
$this->user = JFactory::getUser();
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$this->listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$this->saveOrder = $this->listOrder == 'ordering';
|
||||
// get global action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('library_config');
|
||||
$this->canEdit = $this->canDo->get('library_config.edit');
|
||||
$this->canState = $this->canDo->get('library_config.edit.state');
|
||||
$this->canCreate = $this->canDo->get('library_config.create');
|
||||
$this->canDelete = $this->canDo->get('library_config.delete');
|
||||
$this->canBatch = $this->canDo->get('core.batch');
|
||||
$this->canDo = ComponentbuilderHelper::getActions('library_config');
|
||||
$this->canEdit = $this->canDo->get('library_config.edit');
|
||||
$this->canState = $this->canDo->get('library_config.edit.state');
|
||||
$this->canCreate = $this->canDo->get('library_config.create');
|
||||
$this->canDelete = $this->canDo->get('library_config.delete');
|
||||
$this->canBatch = $this->canDo->get('core.batch');
|
||||
|
||||
// We don't need toolbar in the modal window.
|
||||
if ($this->getLayout() !== 'modal')
|
||||
@ -149,7 +149,7 @@ class ComponentbuilderViewLibraries_config extends JViewLegacy
|
||||
$help_url = ComponentbuilderHelper::getHelpUrl('libraries_config');
|
||||
if (ComponentbuilderHelper::checkString($help_url))
|
||||
{
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
}
|
||||
|
||||
// add the options comp button
|
||||
|
@ -47,20 +47,20 @@ class ComponentbuilderViewLibraries_files_folders_urls extends JViewLegacy
|
||||
}
|
||||
|
||||
// Assign data to the view
|
||||
$this->items = $this->get('Items');
|
||||
$this->pagination = $this->get('Pagination');
|
||||
$this->state = $this->get('State');
|
||||
$this->user = JFactory::getUser();
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$this->listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$this->saveOrder = $this->listOrder == 'ordering';
|
||||
$this->items = $this->get('Items');
|
||||
$this->pagination = $this->get('Pagination');
|
||||
$this->state = $this->get('State');
|
||||
$this->user = JFactory::getUser();
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$this->listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$this->saveOrder = $this->listOrder == 'ordering';
|
||||
// get global action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('library_files_folders_urls');
|
||||
$this->canEdit = $this->canDo->get('library_files_folders_urls.edit');
|
||||
$this->canState = $this->canDo->get('library_files_folders_urls.edit.state');
|
||||
$this->canCreate = $this->canDo->get('library_files_folders_urls.create');
|
||||
$this->canDelete = $this->canDo->get('library_files_folders_urls.delete');
|
||||
$this->canBatch = $this->canDo->get('core.batch');
|
||||
$this->canDo = ComponentbuilderHelper::getActions('library_files_folders_urls');
|
||||
$this->canEdit = $this->canDo->get('library_files_folders_urls.edit');
|
||||
$this->canState = $this->canDo->get('library_files_folders_urls.edit.state');
|
||||
$this->canCreate = $this->canDo->get('library_files_folders_urls.create');
|
||||
$this->canDelete = $this->canDo->get('library_files_folders_urls.delete');
|
||||
$this->canBatch = $this->canDo->get('core.batch');
|
||||
|
||||
// We don't need toolbar in the modal window.
|
||||
if ($this->getLayout() !== 'modal')
|
||||
@ -149,7 +149,7 @@ class ComponentbuilderViewLibraries_files_folders_urls extends JViewLegacy
|
||||
$help_url = ComponentbuilderHelper::getHelpUrl('libraries_files_folders_urls');
|
||||
if (ComponentbuilderHelper::checkString($help_url))
|
||||
{
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
}
|
||||
|
||||
// add the options comp button
|
||||
|
@ -41,17 +41,17 @@ class ComponentbuilderViewLibrary extends JViewLegacy
|
||||
public function display($tpl = null)
|
||||
{
|
||||
// Assign the variables
|
||||
$this->form = $this->get('Form');
|
||||
$this->item = $this->get('Item');
|
||||
$this->script = $this->get('Script');
|
||||
$this->state = $this->get('State');
|
||||
$this->form = $this->get('Form');
|
||||
$this->item = $this->get('Item');
|
||||
$this->script = $this->get('Script');
|
||||
$this->state = $this->get('State');
|
||||
// get action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('library',$this->item);
|
||||
$this->canDo = ComponentbuilderHelper::getActions('library',$this->item);
|
||||
// get input
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
$this->ref = $jinput->get('ref', 0, 'word');
|
||||
$this->refid = $jinput->get('refid', 0, 'int');
|
||||
$this->referral = '';
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
$this->ref = $jinput->get('ref', 0, 'word');
|
||||
$this->refid = $jinput->get('refid', 0, 'int');
|
||||
$this->referral = '';
|
||||
if ($this->refid)
|
||||
{
|
||||
// return to the item that refered to this item
|
||||
|
@ -41,17 +41,17 @@ class ComponentbuilderViewLibrary_config extends JViewLegacy
|
||||
public function display($tpl = null)
|
||||
{
|
||||
// Assign the variables
|
||||
$this->form = $this->get('Form');
|
||||
$this->item = $this->get('Item');
|
||||
$this->script = $this->get('Script');
|
||||
$this->state = $this->get('State');
|
||||
$this->form = $this->get('Form');
|
||||
$this->item = $this->get('Item');
|
||||
$this->script = $this->get('Script');
|
||||
$this->state = $this->get('State');
|
||||
// get action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('library_config',$this->item);
|
||||
$this->canDo = ComponentbuilderHelper::getActions('library_config',$this->item);
|
||||
// get input
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
$this->ref = $jinput->get('ref', 0, 'word');
|
||||
$this->refid = $jinput->get('refid', 0, 'int');
|
||||
$this->referral = '';
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
$this->ref = $jinput->get('ref', 0, 'word');
|
||||
$this->refid = $jinput->get('refid', 0, 'int');
|
||||
$this->referral = '';
|
||||
if ($this->refid)
|
||||
{
|
||||
// return to the item that refered to this item
|
||||
|
@ -41,17 +41,17 @@ class ComponentbuilderViewLibrary_files_folders_urls extends JViewLegacy
|
||||
public function display($tpl = null)
|
||||
{
|
||||
// Assign the variables
|
||||
$this->form = $this->get('Form');
|
||||
$this->item = $this->get('Item');
|
||||
$this->script = $this->get('Script');
|
||||
$this->state = $this->get('State');
|
||||
$this->form = $this->get('Form');
|
||||
$this->item = $this->get('Item');
|
||||
$this->script = $this->get('Script');
|
||||
$this->state = $this->get('State');
|
||||
// get action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('library_files_folders_urls',$this->item);
|
||||
$this->canDo = ComponentbuilderHelper::getActions('library_files_folders_urls',$this->item);
|
||||
// get input
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
$this->ref = $jinput->get('ref', 0, 'word');
|
||||
$this->refid = $jinput->get('refid', 0, 'int');
|
||||
$this->referral = '';
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
$this->ref = $jinput->get('ref', 0, 'word');
|
||||
$this->refid = $jinput->get('refid', 0, 'int');
|
||||
$this->referral = '';
|
||||
if ($this->refid)
|
||||
{
|
||||
// return to the item that refered to this item
|
||||
|
@ -41,17 +41,17 @@ class ComponentbuilderViewSite_view extends JViewLegacy
|
||||
public function display($tpl = null)
|
||||
{
|
||||
// Assign the variables
|
||||
$this->form = $this->get('Form');
|
||||
$this->item = $this->get('Item');
|
||||
$this->script = $this->get('Script');
|
||||
$this->state = $this->get('State');
|
||||
$this->form = $this->get('Form');
|
||||
$this->item = $this->get('Item');
|
||||
$this->script = $this->get('Script');
|
||||
$this->state = $this->get('State');
|
||||
// get action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('site_view',$this->item);
|
||||
$this->canDo = ComponentbuilderHelper::getActions('site_view',$this->item);
|
||||
// get input
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
$this->ref = $jinput->get('ref', 0, 'word');
|
||||
$this->refid = $jinput->get('refid', 0, 'int');
|
||||
$this->referral = '';
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
$this->ref = $jinput->get('ref', 0, 'word');
|
||||
$this->refid = $jinput->get('refid', 0, 'int');
|
||||
$this->referral = '';
|
||||
if ($this->refid)
|
||||
{
|
||||
// return to the item that refered to this item
|
||||
|
@ -47,20 +47,20 @@ class ComponentbuilderViewSite_views extends JViewLegacy
|
||||
}
|
||||
|
||||
// Assign data to the view
|
||||
$this->items = $this->get('Items');
|
||||
$this->pagination = $this->get('Pagination');
|
||||
$this->state = $this->get('State');
|
||||
$this->user = JFactory::getUser();
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$this->listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$this->saveOrder = $this->listOrder == 'ordering';
|
||||
$this->items = $this->get('Items');
|
||||
$this->pagination = $this->get('Pagination');
|
||||
$this->state = $this->get('State');
|
||||
$this->user = JFactory::getUser();
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$this->listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$this->saveOrder = $this->listOrder == 'ordering';
|
||||
// get global action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('site_view');
|
||||
$this->canEdit = $this->canDo->get('core.edit');
|
||||
$this->canState = $this->canDo->get('core.edit.state');
|
||||
$this->canCreate = $this->canDo->get('core.create');
|
||||
$this->canDelete = $this->canDo->get('core.delete');
|
||||
$this->canBatch = $this->canDo->get('core.batch');
|
||||
$this->canDo = ComponentbuilderHelper::getActions('site_view');
|
||||
$this->canEdit = $this->canDo->get('core.edit');
|
||||
$this->canState = $this->canDo->get('core.edit.state');
|
||||
$this->canCreate = $this->canDo->get('core.create');
|
||||
$this->canDelete = $this->canDo->get('core.delete');
|
||||
$this->canBatch = $this->canDo->get('core.batch');
|
||||
|
||||
// We don't need toolbar in the modal window.
|
||||
if ($this->getLayout() !== 'modal')
|
||||
@ -164,7 +164,7 @@ class ComponentbuilderViewSite_views extends JViewLegacy
|
||||
$help_url = ComponentbuilderHelper::getHelpUrl('site_views');
|
||||
if (ComponentbuilderHelper::checkString($help_url))
|
||||
{
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
}
|
||||
|
||||
// add the options comp button
|
||||
|
@ -41,17 +41,17 @@ class ComponentbuilderViewSnippet extends JViewLegacy
|
||||
public function display($tpl = null)
|
||||
{
|
||||
// Assign the variables
|
||||
$this->form = $this->get('Form');
|
||||
$this->item = $this->get('Item');
|
||||
$this->script = $this->get('Script');
|
||||
$this->state = $this->get('State');
|
||||
$this->form = $this->get('Form');
|
||||
$this->item = $this->get('Item');
|
||||
$this->script = $this->get('Script');
|
||||
$this->state = $this->get('State');
|
||||
// get action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('snippet',$this->item);
|
||||
$this->canDo = ComponentbuilderHelper::getActions('snippet',$this->item);
|
||||
// get input
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
$this->ref = $jinput->get('ref', 0, 'word');
|
||||
$this->refid = $jinput->get('refid', 0, 'int');
|
||||
$this->referral = '';
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
$this->ref = $jinput->get('ref', 0, 'word');
|
||||
$this->refid = $jinput->get('refid', 0, 'int');
|
||||
$this->referral = '';
|
||||
if ($this->refid)
|
||||
{
|
||||
// return to the item that refered to this item
|
||||
|
@ -41,17 +41,17 @@ class ComponentbuilderViewSnippet_type extends JViewLegacy
|
||||
public function display($tpl = null)
|
||||
{
|
||||
// Assign the variables
|
||||
$this->form = $this->get('Form');
|
||||
$this->item = $this->get('Item');
|
||||
$this->script = $this->get('Script');
|
||||
$this->state = $this->get('State');
|
||||
$this->form = $this->get('Form');
|
||||
$this->item = $this->get('Item');
|
||||
$this->script = $this->get('Script');
|
||||
$this->state = $this->get('State');
|
||||
// get action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('snippet_type',$this->item);
|
||||
$this->canDo = ComponentbuilderHelper::getActions('snippet_type',$this->item);
|
||||
// get input
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
$this->ref = $jinput->get('ref', 0, 'word');
|
||||
$this->refid = $jinput->get('refid', 0, 'int');
|
||||
$this->referral = '';
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
$this->ref = $jinput->get('ref', 0, 'word');
|
||||
$this->refid = $jinput->get('refid', 0, 'int');
|
||||
$this->referral = '';
|
||||
if ($this->refid)
|
||||
{
|
||||
// return to the item that refered to this item
|
||||
|
@ -47,20 +47,20 @@ class ComponentbuilderViewSnippet_types extends JViewLegacy
|
||||
}
|
||||
|
||||
// Assign data to the view
|
||||
$this->items = $this->get('Items');
|
||||
$this->pagination = $this->get('Pagination');
|
||||
$this->state = $this->get('State');
|
||||
$this->user = JFactory::getUser();
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$this->listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$this->saveOrder = $this->listOrder == 'ordering';
|
||||
$this->items = $this->get('Items');
|
||||
$this->pagination = $this->get('Pagination');
|
||||
$this->state = $this->get('State');
|
||||
$this->user = JFactory::getUser();
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$this->listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$this->saveOrder = $this->listOrder == 'ordering';
|
||||
// get global action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('snippet_type');
|
||||
$this->canEdit = $this->canDo->get('snippet_type.edit');
|
||||
$this->canState = $this->canDo->get('snippet_type.edit.state');
|
||||
$this->canCreate = $this->canDo->get('snippet_type.create');
|
||||
$this->canDelete = $this->canDo->get('snippet_type.delete');
|
||||
$this->canBatch = $this->canDo->get('core.batch');
|
||||
$this->canDo = ComponentbuilderHelper::getActions('snippet_type');
|
||||
$this->canEdit = $this->canDo->get('snippet_type.edit');
|
||||
$this->canState = $this->canDo->get('snippet_type.edit.state');
|
||||
$this->canCreate = $this->canDo->get('snippet_type.create');
|
||||
$this->canDelete = $this->canDo->get('snippet_type.delete');
|
||||
$this->canBatch = $this->canDo->get('core.batch');
|
||||
|
||||
// We don't need toolbar in the modal window.
|
||||
if ($this->getLayout() !== 'modal')
|
||||
@ -149,7 +149,7 @@ class ComponentbuilderViewSnippet_types extends JViewLegacy
|
||||
$help_url = ComponentbuilderHelper::getHelpUrl('snippet_types');
|
||||
if (ComponentbuilderHelper::checkString($help_url))
|
||||
{
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
}
|
||||
|
||||
// add the options comp button
|
||||
|
@ -47,20 +47,20 @@ class ComponentbuilderViewSnippets extends JViewLegacy
|
||||
}
|
||||
|
||||
// Assign data to the view
|
||||
$this->items = $this->get('Items');
|
||||
$this->pagination = $this->get('Pagination');
|
||||
$this->state = $this->get('State');
|
||||
$this->user = JFactory::getUser();
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$this->listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$this->saveOrder = $this->listOrder == 'ordering';
|
||||
$this->items = $this->get('Items');
|
||||
$this->pagination = $this->get('Pagination');
|
||||
$this->state = $this->get('State');
|
||||
$this->user = JFactory::getUser();
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$this->listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$this->saveOrder = $this->listOrder == 'ordering';
|
||||
// get global action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('snippet');
|
||||
$this->canEdit = $this->canDo->get('core.edit');
|
||||
$this->canState = $this->canDo->get('core.edit.state');
|
||||
$this->canCreate = $this->canDo->get('core.create');
|
||||
$this->canDelete = $this->canDo->get('core.delete');
|
||||
$this->canBatch = $this->canDo->get('core.batch');
|
||||
$this->canDo = ComponentbuilderHelper::getActions('snippet');
|
||||
$this->canEdit = $this->canDo->get('core.edit');
|
||||
$this->canState = $this->canDo->get('core.edit.state');
|
||||
$this->canCreate = $this->canDo->get('core.create');
|
||||
$this->canDelete = $this->canDo->get('core.delete');
|
||||
$this->canBatch = $this->canDo->get('core.batch');
|
||||
|
||||
// We don't need toolbar in the modal window.
|
||||
if ($this->getLayout() !== 'modal')
|
||||
@ -169,7 +169,7 @@ class ComponentbuilderViewSnippets extends JViewLegacy
|
||||
$help_url = ComponentbuilderHelper::getHelpUrl('snippets');
|
||||
if (ComponentbuilderHelper::checkString($help_url))
|
||||
{
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
}
|
||||
|
||||
// add the options comp button
|
||||
|
@ -41,17 +41,17 @@ class ComponentbuilderViewTemplate extends JViewLegacy
|
||||
public function display($tpl = null)
|
||||
{
|
||||
// Assign the variables
|
||||
$this->form = $this->get('Form');
|
||||
$this->item = $this->get('Item');
|
||||
$this->script = $this->get('Script');
|
||||
$this->state = $this->get('State');
|
||||
$this->form = $this->get('Form');
|
||||
$this->item = $this->get('Item');
|
||||
$this->script = $this->get('Script');
|
||||
$this->state = $this->get('State');
|
||||
// get action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('template',$this->item);
|
||||
$this->canDo = ComponentbuilderHelper::getActions('template',$this->item);
|
||||
// get input
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
$this->ref = $jinput->get('ref', 0, 'word');
|
||||
$this->refid = $jinput->get('refid', 0, 'int');
|
||||
$this->referral = '';
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
$this->ref = $jinput->get('ref', 0, 'word');
|
||||
$this->refid = $jinput->get('refid', 0, 'int');
|
||||
$this->referral = '';
|
||||
if ($this->refid)
|
||||
{
|
||||
// return to the item that refered to this item
|
||||
|
@ -47,20 +47,20 @@ class ComponentbuilderViewTemplates extends JViewLegacy
|
||||
}
|
||||
|
||||
// Assign data to the view
|
||||
$this->items = $this->get('Items');
|
||||
$this->pagination = $this->get('Pagination');
|
||||
$this->state = $this->get('State');
|
||||
$this->user = JFactory::getUser();
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$this->listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$this->saveOrder = $this->listOrder == 'ordering';
|
||||
$this->items = $this->get('Items');
|
||||
$this->pagination = $this->get('Pagination');
|
||||
$this->state = $this->get('State');
|
||||
$this->user = JFactory::getUser();
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$this->listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$this->saveOrder = $this->listOrder == 'ordering';
|
||||
// get global action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('template');
|
||||
$this->canEdit = $this->canDo->get('core.edit');
|
||||
$this->canState = $this->canDo->get('core.edit.state');
|
||||
$this->canCreate = $this->canDo->get('core.create');
|
||||
$this->canDelete = $this->canDo->get('core.delete');
|
||||
$this->canBatch = $this->canDo->get('core.batch');
|
||||
$this->canDo = ComponentbuilderHelper::getActions('template');
|
||||
$this->canEdit = $this->canDo->get('core.edit');
|
||||
$this->canState = $this->canDo->get('core.edit.state');
|
||||
$this->canCreate = $this->canDo->get('core.create');
|
||||
$this->canDelete = $this->canDo->get('core.delete');
|
||||
$this->canBatch = $this->canDo->get('core.batch');
|
||||
|
||||
// We don't need toolbar in the modal window.
|
||||
if ($this->getLayout() !== 'modal')
|
||||
@ -164,7 +164,7 @@ class ComponentbuilderViewTemplates extends JViewLegacy
|
||||
$help_url = ComponentbuilderHelper::getHelpUrl('templates');
|
||||
if (ComponentbuilderHelper::checkString($help_url))
|
||||
{
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
}
|
||||
|
||||
// add the options comp button
|
||||
|
@ -1629,9 +1629,9 @@ abstract class ComponentbuilderHelper
|
||||
|
||||
public static function jsonToString($value, $sperator = ", ", $table = null)
|
||||
{
|
||||
// check if string is JSON
|
||||
$result = json_decode($value, true);
|
||||
if (json_last_error() === JSON_ERROR_NONE)
|
||||
// check if string is JSON
|
||||
$result = json_decode($value, true);
|
||||
if (json_last_error() === JSON_ERROR_NONE)
|
||||
{
|
||||
// is JSON
|
||||
if (self::checkArray($result))
|
||||
@ -1661,10 +1661,10 @@ abstract class ComponentbuilderHelper
|
||||
/**
|
||||
* Load the Component xml manifest.
|
||||
**/
|
||||
public static function manifest()
|
||||
{
|
||||
$manifestUrl = JPATH_ADMINISTRATOR."/components/com_componentbuilder/componentbuilder.xml";
|
||||
return simplexml_load_file($manifestUrl);
|
||||
public static function manifest()
|
||||
{
|
||||
$manifestUrl = JPATH_ADMINISTRATOR."/components/com_componentbuilder/componentbuilder.xml";
|
||||
return simplexml_load_file($manifestUrl);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1679,9 +1679,9 @@ abstract class ComponentbuilderHelper
|
||||
// get all Contributors (max 20)
|
||||
$searchArray = range('0','20');
|
||||
foreach($searchArray as $nr)
|
||||
{
|
||||
{
|
||||
if ((NULL !== $params->get("showContributor".$nr)) && ($params->get("showContributor".$nr) == 2 || $params->get("showContributor".$nr) == 3))
|
||||
{
|
||||
{
|
||||
// set link based of selected option
|
||||
if($params->get("useContributor".$nr) == 1)
|
||||
{
|
||||
@ -2134,7 +2134,7 @@ abstract class ComponentbuilderHelper
|
||||
public static function isPublished($id,$type)
|
||||
{
|
||||
if ($type == 'raw')
|
||||
{
|
||||
{
|
||||
$type = 'item';
|
||||
}
|
||||
$db = JFactory::getDbo();
|
||||
@ -2147,7 +2147,7 @@ abstract class ComponentbuilderHelper
|
||||
$db->execute();
|
||||
$found = $db->getNumRows();
|
||||
if($found)
|
||||
{
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@ -2164,7 +2164,7 @@ abstract class ComponentbuilderHelper
|
||||
$db->execute();
|
||||
$found = $db->getNumRows();
|
||||
if($found)
|
||||
{
|
||||
{
|
||||
return $db->loadResult();
|
||||
}
|
||||
return $id;
|
||||
@ -2173,24 +2173,24 @@ abstract class ComponentbuilderHelper
|
||||
/**
|
||||
* Get the actions permissions
|
||||
**/
|
||||
public static function getActions($view,&$record = null,$views = null)
|
||||
public static function getActions($view,&$record = null,$views = null)
|
||||
{
|
||||
jimport('joomla.access.access');
|
||||
|
||||
$user = JFactory::getUser();
|
||||
$result = new JObject;
|
||||
$view = self::safeString($view);
|
||||
if (self::checkString($views))
|
||||
{
|
||||
if (self::checkString($views))
|
||||
{
|
||||
$views = self::safeString($views);
|
||||
}
|
||||
}
|
||||
// get all actions from component
|
||||
$actions = JAccess::getActions('com_componentbuilder', 'component');
|
||||
// set acctions only set in component settiongs
|
||||
$componentActions = array('core.admin','core.manage','core.options','core.export');
|
||||
// set acctions only set in component settiongs
|
||||
$componentActions = array('core.admin','core.manage','core.options','core.export');
|
||||
// loop the actions and set the permissions
|
||||
foreach ($actions as $action)
|
||||
{
|
||||
{
|
||||
// set to use component default
|
||||
$fallback = true;
|
||||
if (self::checkObject($record) && isset($record->id) && $record->id > 0 && !in_array($action->name,$componentActions))
|
||||
@ -2269,17 +2269,17 @@ abstract class ComponentbuilderHelper
|
||||
}
|
||||
elseif (self::checkString($views) && isset($record->catid) && $record->catid > 0)
|
||||
{
|
||||
// make sure we use the core. action check for the categories
|
||||
if (strpos($action->name,$view) !== false && strpos($action->name,'core.') === false ) {
|
||||
$coreCheck = explode('.',$action->name);
|
||||
$coreCheck[0] = 'core';
|
||||
$categoryCheck = implode('.',$coreCheck);
|
||||
}
|
||||
else
|
||||
{
|
||||
$categoryCheck = $action->name;
|
||||
}
|
||||
// The record has a category. Check the category permissions.
|
||||
// make sure we use the core. action check for the categories
|
||||
if (strpos($action->name,$view) !== false && strpos($action->name,'core.') === false ) {
|
||||
$coreCheck = explode('.',$action->name);
|
||||
$coreCheck[0] = 'core';
|
||||
$categoryCheck = implode('.',$coreCheck);
|
||||
}
|
||||
else
|
||||
{
|
||||
$categoryCheck = $action->name;
|
||||
}
|
||||
// The record has a category. Check the category permissions.
|
||||
$catpermission = $user->authorise($categoryCheck, 'com_componentbuilder.'.$views.'.category.' . (int) $record->catid);
|
||||
if (!$catpermission && !is_null($catpermission))
|
||||
{
|
||||
@ -2421,7 +2421,7 @@ abstract class ComponentbuilderHelper
|
||||
{
|
||||
// If example.com is down, then probably the whole internet is down, since IANA maintains the domain. Right?
|
||||
$connected = @fsockopen("www.example.com", 80);
|
||||
// website, port (try 80 or 443)
|
||||
// website, port (try 80 or 443)
|
||||
if ($connected)
|
||||
{
|
||||
//action when connected
|
||||
@ -2501,8 +2501,8 @@ abstract class ComponentbuilderHelper
|
||||
$string = self::replaceNumbers($string);
|
||||
}
|
||||
// 0nly continue if we have a string
|
||||
if (self::checkString($string))
|
||||
{
|
||||
if (self::checkString($string))
|
||||
{
|
||||
// create file name without the extention that is safe
|
||||
if ($type === 'filename')
|
||||
{
|
||||
@ -2525,12 +2525,12 @@ abstract class ComponentbuilderHelper
|
||||
$string = preg_replace("/[^A-Za-z ]/", '', $string);
|
||||
// select final adaptations
|
||||
if ($type === 'L' || $type === 'strtolower')
|
||||
{
|
||||
// replace white space with underscore
|
||||
$string = preg_replace('/\s+/', $spacer, $string);
|
||||
// default is to return lower
|
||||
return strtolower($string);
|
||||
}
|
||||
{
|
||||
// replace white space with underscore
|
||||
$string = preg_replace('/\s+/', $spacer, $string);
|
||||
// default is to return lower
|
||||
return strtolower($string);
|
||||
}
|
||||
elseif ($type === 'W')
|
||||
{
|
||||
// return a string with all first letter of each word uppercase(no undersocre)
|
||||
@ -2551,21 +2551,21 @@ abstract class ComponentbuilderHelper
|
||||
// return a string with all the uppercase(no undersocre)
|
||||
return strtoupper($string);
|
||||
}
|
||||
elseif ($type === 'U' || $type === 'strtoupper')
|
||||
{
|
||||
// replace white space with underscore
|
||||
$string = preg_replace('/\s+/', $spacer, $string);
|
||||
// return all upper
|
||||
return strtoupper($string);
|
||||
}
|
||||
elseif ($type === 'F' || $type === 'ucfirst')
|
||||
{
|
||||
// replace white space with underscore
|
||||
$string = preg_replace('/\s+/', $spacer, $string);
|
||||
// return with first caracter to upper
|
||||
return ucfirst(strtolower($string));
|
||||
}
|
||||
elseif ($type === 'cA' || $type === 'cAmel' || $type === 'camelcase')
|
||||
elseif ($type === 'U' || $type === 'strtoupper')
|
||||
{
|
||||
// replace white space with underscore
|
||||
$string = preg_replace('/\s+/', $spacer, $string);
|
||||
// return all upper
|
||||
return strtoupper($string);
|
||||
}
|
||||
elseif ($type === 'F' || $type === 'ucfirst')
|
||||
{
|
||||
// replace white space with underscore
|
||||
$string = preg_replace('/\s+/', $spacer, $string);
|
||||
// return with first caracter to upper
|
||||
return ucfirst(strtolower($string));
|
||||
}
|
||||
elseif ($type === 'cA' || $type === 'cAmel' || $type === 'camelcase')
|
||||
{
|
||||
// convert all words to first letter uppercase
|
||||
$string = ucwords(strtolower($string));
|
||||
@ -2574,11 +2574,11 @@ abstract class ComponentbuilderHelper
|
||||
// now return first letter lowercase
|
||||
return lcfirst($string);
|
||||
}
|
||||
// return string
|
||||
return $string;
|
||||
}
|
||||
// not a string
|
||||
return '';
|
||||
// return string
|
||||
return $string;
|
||||
}
|
||||
// not a string
|
||||
return '';
|
||||
}
|
||||
|
||||
public static function htmlEscape($var, $charset = 'UTF-8', $shorten = false, $length = 40)
|
||||
|
@ -71,10 +71,10 @@ class ComponentbuilderModelApi extends JModelItem
|
||||
*/
|
||||
protected function populateState()
|
||||
{
|
||||
$this->app = JFactory::getApplication();
|
||||
$this->input = $this->app->input;
|
||||
$this->app = JFactory::getApplication();
|
||||
$this->input = $this->app->input;
|
||||
// Get the itme main id
|
||||
$id = $this->input->getInt('id', null);
|
||||
$id = $this->input->getInt('id', null);
|
||||
$this->setState('api.id', $id);
|
||||
|
||||
// Load the parameters.
|
||||
@ -92,13 +92,13 @@ class ComponentbuilderModelApi extends JModelItem
|
||||
*/
|
||||
public function getItem($pk = null)
|
||||
{
|
||||
$this->user = JFactory::getUser();
|
||||
$this->userId = $this->user->get('id');
|
||||
$this->guest = $this->user->get('guest');
|
||||
$this->groups = $this->user->get('groups');
|
||||
$this->authorisedGroups = $this->user->getAuthorisedGroups();
|
||||
$this->levels = $this->user->getAuthorisedViewLevels();
|
||||
$this->initSet = true;
|
||||
$this->user = JFactory::getUser();
|
||||
$this->userId = $this->user->get('id');
|
||||
$this->guest = $this->user->get('guest');
|
||||
$this->groups = $this->user->get('groups');
|
||||
$this->authorisedGroups = $this->user->getAuthorisedGroups();
|
||||
$this->levels = $this->user->getAuthorisedViewLevels();
|
||||
$this->initSet = true;
|
||||
|
||||
$pk = (!empty($pk)) ? $pk : (int) $this->getState('api.id');
|
||||
|
||||
|
@ -44,7 +44,7 @@ class ComponentbuilderViewApi extends JViewLegacy
|
||||
// get the user object
|
||||
$this->user = JFactory::getUser();
|
||||
// Initialise variables.
|
||||
$this->item = $this->get('Item');
|
||||
$this->item = $this->get('Item');
|
||||
|
||||
// Set the toolbar
|
||||
$this->addToolBar();
|
||||
|
Loading…
Reference in New Issue
Block a user