diff --git a/README.md b/README.md
index 066ddd6e4..57184ca93 100644
--- a/README.md
+++ b/README.md
@@ -114,7 +114,7 @@ Component Builder is mapped as a component in itself on my local development env
+ *Version*: 2.5.8
+ *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*: **124408**
++ *Line count*: **124552**
+ *File count*: **741**
+ *Folder count*: **129**
diff --git a/admin/README.txt b/admin/README.txt
index 066ddd6e4..57184ca93 100644
--- a/admin/README.txt
+++ b/admin/README.txt
@@ -114,7 +114,7 @@ Component Builder is mapped as a component in itself on my local development env
+ *Version*: 2.5.8
+ *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*: **124408**
++ *Line count*: **124552**
+ *File count*: **741**
+ *Folder count*: **129**
diff --git a/admin/access.xml b/admin/access.xml
index 744012ee6..20bd779a2 100644
--- a/admin/access.xml
+++ b/admin/access.xml
@@ -153,8 +153,15 @@
+
+
+
+
+
+
+
@@ -216,6 +223,14 @@
+
+
+
+
+
+
+
+
diff --git a/admin/assets/css/admin_view.css b/admin/assets/css/admin_view.css
index c15c77917..632ba6c4f 100644
--- a/admin/assets/css/admin_view.css
+++ b/admin/assets/css/admin_view.css
@@ -9,7 +9,7 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
- @version @update number 184 of this MVC
+ @version @update number 185 of this MVC
@build 14th October, 2017
@created 30th April, 2015
@package Component Builder
diff --git a/admin/assets/css/admin_views.css b/admin/assets/css/admin_views.css
index 90abc7897..f09e3b965 100644
--- a/admin/assets/css/admin_views.css
+++ b/admin/assets/css/admin_views.css
@@ -9,7 +9,7 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
- @version @update number 184 of this MVC
+ @version @update number 185 of this MVC
@build 14th October, 2017
@created 30th April, 2015
@package Component Builder
diff --git a/admin/assets/css/joomla_component.css b/admin/assets/css/joomla_component.css
index 505c76715..fd1f1e74a 100644
--- a/admin/assets/css/joomla_component.css
+++ b/admin/assets/css/joomla_component.css
@@ -9,7 +9,7 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
- @version @update number 388 of this MVC
+ @version @update number 389 of this MVC
@build 14th October, 2017
@created 6th May, 2015
@package Component Builder
diff --git a/admin/assets/css/joomla_components.css b/admin/assets/css/joomla_components.css
index 674cb60a3..ffd5f4a86 100644
--- a/admin/assets/css/joomla_components.css
+++ b/admin/assets/css/joomla_components.css
@@ -9,7 +9,7 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
- @version @update number 388 of this MVC
+ @version @update number 389 of this MVC
@build 14th October, 2017
@created 6th May, 2015
@package Component Builder
diff --git a/admin/controllers/admin_view.php b/admin/controllers/admin_view.php
index 73d40233a..84bea94e8 100644
--- a/admin/controllers/admin_view.php
+++ b/admin/controllers/admin_view.php
@@ -10,7 +10,7 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
- @version @update number 184 of this MVC
+ @version @update number 185 of this MVC
@build 14th October, 2017
@created 30th April, 2015
@package Component Builder
diff --git a/admin/controllers/admin_views.php b/admin/controllers/admin_views.php
index da4e2fa24..4304b9191 100644
--- a/admin/controllers/admin_views.php
+++ b/admin/controllers/admin_views.php
@@ -10,7 +10,7 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
- @version @update number 184 of this MVC
+ @version @update number 185 of this MVC
@build 14th October, 2017
@created 30th April, 2015
@package Component Builder
diff --git a/admin/controllers/joomla_component.php b/admin/controllers/joomla_component.php
index 681eaca24..2474ffe52 100644
--- a/admin/controllers/joomla_component.php
+++ b/admin/controllers/joomla_component.php
@@ -10,7 +10,7 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
- @version @update number 388 of this MVC
+ @version @update number 389 of this MVC
@build 14th October, 2017
@created 6th May, 2015
@package Component Builder
@@ -67,7 +67,7 @@ class ComponentbuilderControllerJoomla_component extends JControllerForm
return false;
}
// In the absense of better information, revert to the component permissions.
- return parent::allowAdd($data);
+ return JFactory::getUser()->authorise('joomla_component.create', $this->option);
}
/**
@@ -88,13 +88,20 @@ class ComponentbuilderControllerJoomla_component extends JControllerForm
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
+ // Access check.
+ $access = ($user->authorise('joomla_component.access', 'com_componentbuilder.joomla_component.' . (int) $recordId) && $user->authorise('joomla_component.access', 'com_componentbuilder'));
+ if (!$access)
+ {
+ return false;
+ }
+
if ($recordId)
{
// The record has been set. Check the record permissions.
- $permission = $user->authorise('core.edit', 'com_componentbuilder.joomla_component.' . (int) $recordId);
+ $permission = $user->authorise('joomla_component.edit', 'com_componentbuilder.joomla_component.' . (int) $recordId);
if (!$permission)
{
- if ($user->authorise('core.edit.own', 'com_componentbuilder.joomla_component.' . $recordId))
+ if ($user->authorise('joomla_component.edit.own', 'com_componentbuilder.joomla_component.' . $recordId))
{
// Now test the owner is the user.
$ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0;
@@ -113,7 +120,7 @@ class ComponentbuilderControllerJoomla_component extends JControllerForm
// If the owner matches 'me' then allow.
if ($ownerId == $user->id)
{
- if ($user->authorise('core.edit.own', 'com_componentbuilder'))
+ if ($user->authorise('joomla_component.edit.own', 'com_componentbuilder'))
{
return true;
}
@@ -123,7 +130,7 @@ class ComponentbuilderControllerJoomla_component extends JControllerForm
}
}
// Since there is no permission, revert to the component permissions.
- return parent::allowEdit($data, $key);
+ return $user->authorise('joomla_component.edit', $this->option);
}
/**
diff --git a/admin/controllers/joomla_components.php b/admin/controllers/joomla_components.php
index 00847f20b..e072a8ed3 100644
--- a/admin/controllers/joomla_components.php
+++ b/admin/controllers/joomla_components.php
@@ -10,7 +10,7 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
- @version @update number 388 of this MVC
+ @version @update number 389 of this MVC
@build 14th October, 2017
@created 6th May, 2015
@package Component Builder
diff --git a/admin/helpers/compiler/e_Interpretation.php b/admin/helpers/compiler/e_Interpretation.php
index bd06a8ba1..4bed05d35 100644
--- a/admin/helpers/compiler/e_Interpretation.php
+++ b/admin/helpers/compiler/e_Interpretation.php
@@ -2872,7 +2872,7 @@ class Interpretation extends Fields
$method .= PHP_EOL.PHP_EOL."\t\t//".$this->setLine(__LINE__)." Check for errors.";
$method .= PHP_EOL."\t\tif (count(\$errors = \$this->get('Errors')))";
$method .= PHP_EOL."\t\t{";
- $method .= PHP_EOL."\t\t\tthrow new Exception(implode(\"\n\", \$errors), 500);";
+ $method .= PHP_EOL."\t\t\tthrow new Exception(implode(".'"\n", $errors), 500);';
$method .= PHP_EOL."\t\t}";
$method .= PHP_EOL.PHP_EOL."\t\tparent::display(\$tpl);";
diff --git a/admin/helpers/componentbuilder.php b/admin/helpers/componentbuilder.php
index 2e91d16c0..c3e496543 100644
--- a/admin/helpers/componentbuilder.php
+++ b/admin/helpers/componentbuilder.php
@@ -477,11 +477,6 @@ abstract class ComponentbuilderHelper
$script['display'][] = "\t\t\t// Include helper submenu";
$script['display'][] = "\t\t\t###-#-#-Component###Helper::addSubmenu('import');";
$script['display'][] = "\t\t}";
- $script['display'][] = "\n\t\t// Check for errors.";
- $script['display'][] = "\t\tif (count(\$errors = \$this->get('Errors'))){";
- $script['display'][] = "\t\t\tJError::raiseError(500, implode(' ', \$errors));";
- $script['display'][] = "\t\t\treturn false;";
- $script['display'][] = "\t\t}";
$script['display'][] = "\n\t\t\$paths = new stdClass;";
$script['display'][] = "\t\t\$paths->first = '';";
$script['display'][] = "\t\t\$state = \$this->get('state');";
@@ -507,6 +502,10 @@ abstract class ComponentbuilderHelper
$script['display'][] = "\t\t\t// clear the data type";
$script['display'][] = "\t\t\t\$session->clear('dataType');";
$script['display'][] = "\t\t}";
+ $script['display'][] = "\n\t\t// Check for errors.";
+ $script['display'][] = "\t\tif (count(\$errors = \$this->get('Errors'))){";
+ $script['display'][] = "\t\t\tthrow new Exception(implode(".'"\n", $errors), 500);';
+ $script['display'][] = "\t\t}";
$script['display'][] = "\n\t\t// Display the template";
$script['display'][] = "\t\tparent::display(\$tpl);";
$script['display'][] = "\t}";
diff --git a/admin/language/en-GB/en-GB.com_componentbuilder.ini b/admin/language/en-GB/en-GB.com_componentbuilder.ini
index da6d3558c..88ae1d0eb 100644
--- a/admin/language/en-GB/en-GB.com_componentbuilder.ini
+++ b/admin/language/en-GB/en-GB.com_componentbuilder.ini
@@ -581,7 +581,7 @@ COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_BEGINNER_IMPORT_DESCRIPTION="
Please do n
COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_BEGINNER_IMPORT_LABEL="Beginners notice."
COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_CREATE_EDIT_BUTTONS_DESCRIPTION="Some Shortcut Buttons
"
-COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_CREATE_EDIT_NOTICE_DESCRIPTION="Here we can add some description to explain how things now work."
+COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_CREATE_EDIT_NOTICE_DESCRIPTION="
Welcome to the new improved fields and conditions layout.
We had to remove the repeatable fields layouts since Joomla has depreciated it. With this new improved layout we trust your experience will be better then ever before.
You can still watch the tutorials, and though it was made during the time repeatable fields were still being used, the various concepts and layouts still look mostly the same.
"
COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_CREATE_EDIT_NOTICE_LABEL="Fields & Conditions"
COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_ON_LINKED_VIEWS_DESCRIPTION="You can link other views that has relationship with this view. Please watch this tutorial for more info. "
COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_ON_LINKED_VIEWS_LABEL="Linked Views Options"
@@ -843,7 +843,7 @@ COM_COMPONENTBUILDER_ADMIN_VIEW_ZOOM_IN="Zoom In"
COM_COMPONENTBUILDER_ADMIN_VIEW_ZOOM_OUT="Zoom Out"
COM_COMPONENTBUILDER_ALL_IS_GOOD_PLEASE_CHECK_AGAIN_LATTER="All is good, please check again latter."
COM_COMPONENTBUILDER_ALL_IS_GOOD_THERE_IN_NO_NOTICE_AT_THIS_TIME="All is good, there in no notice at this time."
-COM_COMPONENTBUILDER_ALL_UNSAVED_WORK_WILL_BE_LOST_ARE_YOU_SURE_YOU_WANT_TO_CONTINUE="All unsaved work will be lost, are you sure you want to continue?"
+COM_COMPONENTBUILDER_ALL_UNSAVED_WORK_ON_THIS_PAGE_WILL_BE_LOST_ARE_YOU_SURE_YOU_WANT_TO_CONTINUE="All unsaved work on this page will be lost, are you sure you want to continue?"
COM_COMPONENTBUILDER_ALWAYS_INSURE_THAT_YOU_HAVE_YOUR_LOCAL_COMPONENTS_BACKED_UP_BY_MAKING_AN_EXPORT_OF_ALL_YOUR_LOCAL_COMPONENTS_BEFORE_IMPORTING_ANY_NEW_COMPONENTS_SMALLMAKE_BSUREB_TO_MOVE_THIS_ZIPPED_BACKUP_PACKAGE_OUT_OF_THE_TMP_FOLDER_BEFORE_DOING_AN_IMPORTSMALLBR_IF_YOU_ARE_IMPORTING_A_PACKAGE_OF_A_THREERD_PARTY_JCB_PACKAGE_DEVELOPER_BMAKE_SURE_IT_IS_A_REPUTABLE_JCB_PACKAGE_DEVELOPERSB="Always insure that you have your local components backed up, by making an export of all your local components before importing any new components. (Make SURE to move this zipped backup package out of the tmp folder before doing an import) If you are importing a package of a 3rd party JCB package developer, make sure it is a reputable JCB package developers!"
COM_COMPONENTBUILDER_ANY_SELECTION_ONLY_FOUR_LISTRADIOCHECKBOXESDYNAMIC_LIST="Any Selection (only 4 list/radio/checkboxes/dynamic_list)"
COM_COMPONENTBUILDER_AUTHOR="Author"
@@ -2706,10 +2706,24 @@ COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_BATCH_OPTIONS="Batch process the selected
COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_BATCH_TIP="All changes will be applied to all selected Joomla Components"
COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_BATCH_USE="Joomla Components Batch Use"
COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch joomla components"
+COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_CREATE="Joomla Components Create"
+COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_CREATE_DESC="Allows the users in this group to create create joomla components"
COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_DASHBOARD_ADD="Joomla Components Dashboard Add"
COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_DASHBOARD_ADD_DESC="Allows the users in this group to update the dashboard add of the joomla component"
COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_DASHBOARD_LIST="Joomla Components Dashboard List"
COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_DASHBOARD_LIST_DESC="Allows the users in this group to update the dashboard list of the joomla component"
+COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_DELETE="Joomla Components Delete"
+COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_DELETE_DESC="Allows the users in this group to delete delete joomla components"
+COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_EDIT="Joomla Components Edit"
+COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_EDIT_CREATED_BY="Joomla Components Edit Created By"
+COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_EDIT_CREATED_BY_DESC="Allows the users in this group to update the created by of the edit created by joomla components"
+COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_EDIT_CREATED_DATE="Joomla Components Edit Created Date"
+COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_EDIT_CREATED_DATE_DESC="Allows the users in this group to update the created date of the edit created joomla components"
+COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_EDIT_DESC="Allows the users in this group to edit the joomla component"
+COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_EDIT_OWN="Joomla Components Edit Own"
+COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_EDIT_OWN_DESC="Allows the users in this group to edit edit own joomla components created by them"
+COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_EDIT_STATE="Joomla Components Edit State"
+COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_EDIT_STATE_DESC="Allows the users in this group to update the state of the joomla component"
COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_EDIT_VERSION="Joomla Components Edit Version"
COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_EDIT_VERSION_DESC="Allows users in this group to edit versions of version joomla components"
COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_EXPORT="Joomla Components Export"
diff --git a/admin/language/en-GB/en-GB.com_componentbuilder.sys.ini b/admin/language/en-GB/en-GB.com_componentbuilder.sys.ini
index f3c9677cb..2a16ad8a9 100644
--- a/admin/language/en-GB/en-GB.com_componentbuilder.sys.ini
+++ b/admin/language/en-GB/en-GB.com_componentbuilder.sys.ini
@@ -290,10 +290,24 @@ COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_ACCESS="Joomla Components Access"
COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_ACCESS_DESC="Allows the users in this group to access access joomla components"
COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_BATCH_USE="Joomla Components Batch Use"
COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch joomla components"
+COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_CREATE="Joomla Components Create"
+COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_CREATE_DESC="Allows the users in this group to create create joomla components"
COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_DASHBOARD_ADD="Joomla Components Dashboard Add"
COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_DASHBOARD_ADD_DESC="Allows the users in this group to update the dashboard add of the joomla component"
COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_DASHBOARD_LIST="Joomla Components Dashboard List"
COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_DASHBOARD_LIST_DESC="Allows the users in this group to update the dashboard list of the joomla component"
+COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_DELETE="Joomla Components Delete"
+COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_DELETE_DESC="Allows the users in this group to delete delete joomla components"
+COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_EDIT="Joomla Components Edit"
+COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_EDIT_CREATED_BY="Joomla Components Edit Created By"
+COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_EDIT_CREATED_BY_DESC="Allows the users in this group to update the created by of the edit created by joomla components"
+COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_EDIT_CREATED_DATE="Joomla Components Edit Created Date"
+COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_EDIT_CREATED_DATE_DESC="Allows the users in this group to update the created date of the edit created joomla components"
+COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_EDIT_DESC="Allows the users in this group to edit the joomla component"
+COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_EDIT_OWN="Joomla Components Edit Own"
+COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_EDIT_OWN_DESC="Allows the users in this group to edit edit own joomla components created by them"
+COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_EDIT_STATE="Joomla Components Edit State"
+COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_EDIT_STATE_DESC="Allows the users in this group to update the state of the joomla component"
COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_EDIT_VERSION="Joomla Components Edit Version"
COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_EDIT_VERSION_DESC="Allows users in this group to edit versions of version joomla components"
COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_EXPORT="Joomla Components Export"
diff --git a/admin/layouts/admin_view/linked_components_fullwidth.php b/admin/layouts/admin_view/linked_components_fullwidth.php
index c5469c3be..2b7ce7757 100644
--- a/admin/layouts/admin_view/linked_components_fullwidth.php
+++ b/admin/layouts/admin_view/linked_components_fullwidth.php
@@ -74,7 +74,7 @@ $edit = "index.php?option=com_componentbuilder&view=joomla_components&task=jooml
?>
';
}
- $button[] = '';
+ $button[] = '';
if (1 == $size)
{
$button[] = '';
@@ -563,7 +563,7 @@ class ComponentbuilderModelAjax extends JModelList
if ($this->canEdit($id))
{
$edit = "index.php?option=com_componentbuilder&view=".$views."&task=".$view.".edit&id=".$id.$this->ref;
- return ' ';
+ return ' ';
}
return '';
diff --git a/admin/models/componentbuilder.php b/admin/models/componentbuilder.php
index dc0c84fac..6b0e4f697 100644
--- a/admin/models/componentbuilder.php
+++ b/admin/models/componentbuilder.php
@@ -49,6 +49,7 @@ class ComponentbuilderModelComponentbuilder extends JModelList
$viewAccess = array(
'compiler.submenu' => 'compiler.submenu',
'compiler.dashboard_list' => 'compiler.dashboard_list',
+ 'joomla_component.create' => 'joomla_component.create',
'joomla_components.access' => 'joomla_component.access',
'joomla_component.access' => 'joomla_component.access',
'joomla_components.submenu' => 'joomla_component.submenu',
diff --git a/admin/models/custom_admin_view.php b/admin/models/custom_admin_view.php
index f2dcafa6a..a91c9f59d 100644
--- a/admin/models/custom_admin_view.php
+++ b/admin/models/custom_admin_view.php
@@ -248,6 +248,23 @@ class ComponentbuilderModelCustom_admin_view extends JModelAdmin
{
$items = $db->loadObjectList();
+ // set values to display correctly.
+ if (ComponentbuilderHelper::checkArray($items))
+ {
+ // get user object.
+ $user = JFactory::getUser();
+ foreach ($items as $nr => &$item)
+ {
+ $access = ($user->authorise('joomla_component.access', 'com_componentbuilder.joomla_component.' . (int) $item->id) && $user->authorise('joomla_component.access', 'com_componentbuilder'));
+ if (!$access)
+ {
+ unset($items[$nr]);
+ continue;
+ }
+
+ }
+ }
+
// Filter by addcustom_admin_viewsvvwa in this Repetable Field
if (ComponentbuilderHelper::checkArray($items) && isset($this->addcustom_admin_viewsvvwa))
{
diff --git a/admin/models/fields/component.php b/admin/models/fields/component.php
index 7896ae864..d460b9d1c 100644
--- a/admin/models/fields/component.php
+++ b/admin/models/fields/component.php
@@ -79,7 +79,7 @@ class JFormFieldComponent extends JFormFieldList
}
$user = JFactory::getUser();
// only add if user allowed to create joomla_component
- if ($user->authorise('core.create', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area.
+ if ($user->authorise('joomla_component.create', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area.
{
// build Create button
$buttonNamee = trim($buttonName);
@@ -92,7 +92,7 @@ class JFormFieldComponent extends JFormFieldList
';
}
// only add if user allowed to edit joomla_component
- if (($buttonName === 'joomla_component' || $buttonName === 'joomla_components') && $user->authorise('core.edit', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area.
+ if (($buttonName === 'joomla_component' || $buttonName === 'joomla_components') && $user->authorise('joomla_component.edit', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area.
{
// build edit button
$buttonNamee = trim($buttonName);
diff --git a/admin/models/fields/components.php b/admin/models/fields/components.php
index ea5c032d1..0590e7b82 100644
--- a/admin/models/fields/components.php
+++ b/admin/models/fields/components.php
@@ -79,7 +79,7 @@ class JFormFieldComponents extends JFormFieldList
}
$user = JFactory::getUser();
// only add if user allowed to create joomla_component
- if ($user->authorise('core.create', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area.
+ if ($user->authorise('joomla_component.create', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area.
{
// build Create button
$buttonNamee = trim($buttonName);
@@ -92,7 +92,7 @@ class JFormFieldComponents extends JFormFieldList
';
}
// only add if user allowed to edit joomla_component
- if (($buttonName === 'joomla_component' || $buttonName === 'joomla_components') && $user->authorise('core.edit', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area.
+ if (($buttonName === 'joomla_component' || $buttonName === 'joomla_components') && $user->authorise('joomla_component.edit', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area.
{
// build edit button
$buttonNamee = trim($buttonName);
diff --git a/admin/models/forms/admin_view.js b/admin/models/forms/admin_view.js
index 9e7fce9ff..ba83e4ef1 100644
--- a/admin/models/forms/admin_view.js
+++ b/admin/models/forms/admin_view.js
@@ -9,7 +9,7 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
- @version @update number 184 of this MVC
+ @version @update number 185 of this MVC
@build 14th October, 2017
@created 30th April, 2015
@package Component Builder
diff --git a/admin/models/forms/joomla_component.js b/admin/models/forms/joomla_component.js
index b7a9c5371..bb63a056e 100644
--- a/admin/models/forms/joomla_component.js
+++ b/admin/models/forms/joomla_component.js
@@ -9,7 +9,7 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
- @version @update number 388 of this MVC
+ @version @update number 389 of this MVC
@build 14th October, 2017
@created 6th May, 2015
@package Component Builder
diff --git a/admin/models/ftp.php b/admin/models/ftp.php
index e159f9927..b50d284cc 100644
--- a/admin/models/ftp.php
+++ b/admin/models/ftp.php
@@ -176,6 +176,23 @@ class ComponentbuilderModelFtp extends JModelAdmin
if ($db->getNumRows())
{
$items = $db->loadObjectList();
+
+ // set values to display correctly.
+ if (ComponentbuilderHelper::checkArray($items))
+ {
+ // get user object.
+ $user = JFactory::getUser();
+ foreach ($items as $nr => &$item)
+ {
+ $access = ($user->authorise('joomla_component.access', 'com_componentbuilder.joomla_component.' . (int) $item->id) && $user->authorise('joomla_component.access', 'com_componentbuilder'));
+ if (!$access)
+ {
+ unset($items[$nr]);
+ continue;
+ }
+
+ }
+ }
return $items;
}
return false;
diff --git a/admin/models/joomla_component.php b/admin/models/joomla_component.php
index 6c032b573..e99310e76 100644
--- a/admin/models/joomla_component.php
+++ b/admin/models/joomla_component.php
@@ -10,7 +10,7 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
- @version @update number 388 of this MVC
+ @version @update number 389 of this MVC
@build 14th October, 2017
@created 6th May, 2015
@package Component Builder
@@ -619,8 +619,8 @@ class ComponentbuilderModelJoomla_component extends JModelAdmin
// Check for existing item.
// Modify the form based on Edit State access controls.
- if ($id != 0 && (!$user->authorise('core.edit.state', 'com_componentbuilder.joomla_component.' . (int) $id))
- || ($id == 0 && !$user->authorise('core.edit.state', 'com_componentbuilder')))
+ if ($id != 0 && (!$user->authorise('joomla_component.edit.state', 'com_componentbuilder.joomla_component.' . (int) $id))
+ || ($id == 0 && !$user->authorise('joomla_component.edit.state', 'com_componentbuilder')))
{
// Disable fields for display.
$form->setFieldAttribute('ordering', 'disabled', 'true');
@@ -636,7 +636,8 @@ class ComponentbuilderModelJoomla_component extends JModelAdmin
$form->setValue('created_by', null, $user->id);
}
// Modify the form based on Edit Creaded By access controls.
- if (!$user->authorise('core.edit.created_by', 'com_componentbuilder'))
+ if ($id != 0 && (!$user->authorise('joomla_component.edit.created_by', 'com_componentbuilder.joomla_component.' . (int) $id))
+ || ($id == 0 && !$user->authorise('joomla_component.edit.created_by', 'com_componentbuilder')))
{
// Disable fields for display.
$form->setFieldAttribute('created_by', 'disabled', 'true');
@@ -646,7 +647,8 @@ class ComponentbuilderModelJoomla_component extends JModelAdmin
$form->setFieldAttribute('created_by', 'filter', 'unset');
}
// Modify the form based on Edit Creaded Date access controls.
- if (!$user->authorise('core.edit.created', 'com_componentbuilder'))
+ if ($id != 0 && (!$user->authorise('joomla_component.edit.created', 'com_componentbuilder.joomla_component.' . (int) $id))
+ || ($id == 0 && !$user->authorise('joomla_component.edit.created', 'com_componentbuilder')))
{
// Disable fields for display.
$form->setFieldAttribute('created', 'disabled', 'true');
@@ -700,7 +702,7 @@ class ComponentbuilderModelJoomla_component extends JModelAdmin
$user = JFactory::getUser();
// The record has been set. Check the record permissions.
- return $user->authorise('core.delete', 'com_componentbuilder.joomla_component.' . (int) $record->id);
+ return $user->authorise('joomla_component.delete', 'com_componentbuilder.joomla_component.' . (int) $record->id);
}
return false;
}
@@ -722,14 +724,14 @@ class ComponentbuilderModelJoomla_component extends JModelAdmin
if ($recordId)
{
// The record has been set. Check the record permissions.
- $permission = $user->authorise('core.edit.state', 'com_componentbuilder.joomla_component.' . (int) $recordId);
+ $permission = $user->authorise('joomla_component.edit.state', 'com_componentbuilder.joomla_component.' . (int) $recordId);
if (!$permission && !is_null($permission))
{
return false;
}
}
// In the absense of better information, revert to the component permissions.
- return parent::canEditState($record);
+ return $user->authorise('joomla_component.edit.state', 'com_componentbuilder');
}
/**
@@ -744,8 +746,9 @@ class ComponentbuilderModelJoomla_component extends JModelAdmin
protected function allowEdit($data = array(), $key = 'id')
{
// Check specific edit permission then general edit permission.
+ $user = JFactory::getUser();
- return JFactory::getUser()->authorise('core.edit', 'com_componentbuilder.joomla_component.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or parent::allowEdit($data, $key);
+ return $user->authorise('joomla_component.edit', 'com_componentbuilder.joomla_component.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or $user->authorise('joomla_component.edit', 'com_componentbuilder');
}
/**
@@ -1033,7 +1036,7 @@ class ComponentbuilderModelJoomla_component extends JModelAdmin
$this->canDo = ComponentbuilderHelper::getActions('joomla_component');
}
- if (!$this->canDo->get('core.create') || !$this->canDo->get('core.batch'))
+ if (!$this->canDo->get('joomla_component.create') && !$this->canDo->get('joomla_component.batch'))
{
return false;
}
@@ -1048,7 +1051,7 @@ class ComponentbuilderModelJoomla_component extends JModelAdmin
{
$values['published'] = 0;
}
- elseif (isset($values['published']) && !$this->canDo->get('core.edit.state'))
+ elseif (isset($values['published']) && !$this->canDo->get('joomla_component.edit.state'))
{
$values['published'] = 0;
}
@@ -1065,7 +1068,7 @@ class ComponentbuilderModelJoomla_component extends JModelAdmin
// only allow copy if user may edit this item.
- if (!$this->user->authorise('core.edit', $contexts[$pk]))
+ if (!$this->user->authorise('joomla_component.edit', $contexts[$pk]))
{
@@ -1182,14 +1185,14 @@ class ComponentbuilderModelJoomla_component extends JModelAdmin
$this->canDo = ComponentbuilderHelper::getActions('joomla_component');
}
- if (!$this->canDo->get('core.edit') && !$this->canDo->get('core.batch'))
+ if (!$this->canDo->get('joomla_component.edit') && !$this->canDo->get('joomla_component.batch'))
{
$this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT'));
return false;
}
// make sure published only updates if user has the permission.
- if (isset($values['published']) && !$this->canDo->get('core.edit.state'))
+ if (isset($values['published']) && !$this->canDo->get('joomla_component.edit.state'))
{
unset($values['published']);
}
@@ -1199,7 +1202,7 @@ class ComponentbuilderModelJoomla_component extends JModelAdmin
// Parent exists so we proceed
foreach ($pks as $pk)
{
- if (!$this->user->authorise('core.edit', $contexts[$pk]))
+ if (!$this->user->authorise('joomla_component.edit', $contexts[$pk]))
{
$this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT'));
diff --git a/admin/models/joomla_components.php b/admin/models/joomla_components.php
index 39016e611..09569b74d 100644
--- a/admin/models/joomla_components.php
+++ b/admin/models/joomla_components.php
@@ -10,7 +10,7 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
- @version @update number 388 of this MVC
+ @version @update number 389 of this MVC
@build 14th October, 2017
@created 6th May, 2015
@package Component Builder
@@ -1212,7 +1212,24 @@ class ComponentbuilderModelJoomla_components extends JModelList
$this->checkInNow();
// load parent items
- $items = parent::getItems();
+ $items = parent::getItems();
+
+ // set values to display correctly.
+ if (ComponentbuilderHelper::checkArray($items))
+ {
+ // get user object.
+ $user = JFactory::getUser();
+ foreach ($items as $nr => &$item)
+ {
+ $access = ($user->authorise('joomla_component.access', 'com_componentbuilder.joomla_component.' . (int) $item->id) && $user->authorise('joomla_component.access', 'com_componentbuilder'));
+ if (!$access)
+ {
+ unset($items[$nr]);
+ continue;
+ }
+
+ }
+ }
// return items
return $items;
@@ -1348,8 +1365,17 @@ class ComponentbuilderModelJoomla_components extends JModelList
// set values to display correctly.
if (ComponentbuilderHelper::checkArray($items))
{
+ // get user object.
+ $user = JFactory::getUser();
foreach ($items as $nr => &$item)
{
+ $access = ($user->authorise('joomla_component.access', 'com_componentbuilder.joomla_component.' . (int) $item->id) && $user->authorise('joomla_component.access', 'com_componentbuilder'));
+ if (!$access)
+ {
+ unset($items[$nr]);
+ continue;
+ }
+
// decode sql
$item->sql = base64_decode($item->sql);
// decode php_preflight_update
diff --git a/admin/models/site_view.php b/admin/models/site_view.php
index 951fb39a8..9b5ddddcd 100644
--- a/admin/models/site_view.php
+++ b/admin/models/site_view.php
@@ -280,6 +280,23 @@ class ComponentbuilderModelSite_view extends JModelAdmin
{
$items = $db->loadObjectList();
+ // set values to display correctly.
+ if (ComponentbuilderHelper::checkArray($items))
+ {
+ // get user object.
+ $user = JFactory::getUser();
+ foreach ($items as $nr => &$item)
+ {
+ $access = ($user->authorise('joomla_component.access', 'com_componentbuilder.joomla_component.' . (int) $item->id) && $user->authorise('joomla_component.access', 'com_componentbuilder'));
+ if (!$access)
+ {
+ unset($items[$nr]);
+ continue;
+ }
+
+ }
+ }
+
// Filter by addsite_viewsvvwb in this Repetable Field
if (ComponentbuilderHelper::checkArray($items) && isset($this->addsite_viewsvvwb))
{
diff --git a/admin/tables/admin_view.php b/admin/tables/admin_view.php
index 23b0c8e54..9b79b4e68 100644
--- a/admin/tables/admin_view.php
+++ b/admin/tables/admin_view.php
@@ -10,7 +10,7 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
- @version @update number 184 of this MVC
+ @version @update number 185 of this MVC
@build 14th October, 2017
@created 30th April, 2015
@package Component Builder
diff --git a/admin/tables/joomla_component.php b/admin/tables/joomla_component.php
index 7d418c718..e16c10e3f 100644
--- a/admin/tables/joomla_component.php
+++ b/admin/tables/joomla_component.php
@@ -10,7 +10,7 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
- @version @update number 388 of this MVC
+ @version @update number 389 of this MVC
@build 14th October, 2017
@created 6th May, 2015
@package Component Builder
diff --git a/admin/views/admin_view/submitbutton.js b/admin/views/admin_view/submitbutton.js
index c8048cf6d..1f6498f9f 100644
--- a/admin/views/admin_view/submitbutton.js
+++ b/admin/views/admin_view/submitbutton.js
@@ -9,7 +9,7 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
- @version @update number 184 of this MVC
+ @version @update number 185 of this MVC
@build 14th October, 2017
@created 30th April, 2015
@package Component Builder
diff --git a/admin/views/admin_view/tmpl/edit.php b/admin/views/admin_view/tmpl/edit.php
index 488816fdc..f68a425b7 100644
--- a/admin/views/admin_view/tmpl/edit.php
+++ b/admin/views/admin_view/tmpl/edit.php
@@ -10,7 +10,7 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
- @version @update number 184 of this MVC
+ @version @update number 185 of this MVC
@build 14th October, 2017
@created 30th April, 2015
@package Component Builder
diff --git a/admin/views/admin_view/view.html.php b/admin/views/admin_view/view.html.php
index ed136929e..b2b4f7b26 100644
--- a/admin/views/admin_view/view.html.php
+++ b/admin/views/admin_view/view.html.php
@@ -10,7 +10,7 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
- @version @update number 184 of this MVC
+ @version @update number 185 of this MVC
@build 14th October, 2017
@created 30th April, 2015
@package Component Builder
diff --git a/admin/views/admin_views/tmpl/default.php b/admin/views/admin_views/tmpl/default.php
index 94535d8de..7a5937aa5 100644
--- a/admin/views/admin_views/tmpl/default.php
+++ b/admin/views/admin_views/tmpl/default.php
@@ -10,7 +10,7 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
- @version @update number 184 of this MVC
+ @version @update number 185 of this MVC
@build 14th October, 2017
@created 30th April, 2015
@package Component Builder
diff --git a/admin/views/admin_views/tmpl/default_batch_body.php b/admin/views/admin_views/tmpl/default_batch_body.php
index 06b04c4c2..fc5d46eea 100644
--- a/admin/views/admin_views/tmpl/default_batch_body.php
+++ b/admin/views/admin_views/tmpl/default_batch_body.php
@@ -10,7 +10,7 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
- @version @update number 184 of this MVC
+ @version @update number 185 of this MVC
@build 14th October, 2017
@created 30th April, 2015
@package Component Builder
diff --git a/admin/views/admin_views/tmpl/default_batch_footer.php b/admin/views/admin_views/tmpl/default_batch_footer.php
index 354a1732f..546eb9bd6 100644
--- a/admin/views/admin_views/tmpl/default_batch_footer.php
+++ b/admin/views/admin_views/tmpl/default_batch_footer.php
@@ -10,7 +10,7 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
- @version @update number 184 of this MVC
+ @version @update number 185 of this MVC
@build 14th October, 2017
@created 30th April, 2015
@package Component Builder
diff --git a/admin/views/admin_views/tmpl/default_body.php b/admin/views/admin_views/tmpl/default_body.php
index 69a929a98..154119810 100644
--- a/admin/views/admin_views/tmpl/default_body.php
+++ b/admin/views/admin_views/tmpl/default_body.php
@@ -10,7 +10,7 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
- @version @update number 184 of this MVC
+ @version @update number 185 of this MVC
@build 14th October, 2017
@created 30th April, 2015
@package Component Builder
diff --git a/admin/views/admin_views/tmpl/default_foot.php b/admin/views/admin_views/tmpl/default_foot.php
index 016124a73..0713c344a 100644
--- a/admin/views/admin_views/tmpl/default_foot.php
+++ b/admin/views/admin_views/tmpl/default_foot.php
@@ -10,7 +10,7 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
- @version @update number 184 of this MVC
+ @version @update number 185 of this MVC
@build 14th October, 2017
@created 30th April, 2015
@package Component Builder
diff --git a/admin/views/admin_views/tmpl/default_head.php b/admin/views/admin_views/tmpl/default_head.php
index b46aa2708..ad468e54a 100644
--- a/admin/views/admin_views/tmpl/default_head.php
+++ b/admin/views/admin_views/tmpl/default_head.php
@@ -10,7 +10,7 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
- @version @update number 184 of this MVC
+ @version @update number 185 of this MVC
@build 14th October, 2017
@created 30th April, 2015
@package Component Builder
diff --git a/admin/views/admin_views/tmpl/default_toolbar.php b/admin/views/admin_views/tmpl/default_toolbar.php
index 3a34a14d5..7d4445773 100644
--- a/admin/views/admin_views/tmpl/default_toolbar.php
+++ b/admin/views/admin_views/tmpl/default_toolbar.php
@@ -10,7 +10,7 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
- @version @update number 184 of this MVC
+ @version @update number 185 of this MVC
@build 14th October, 2017
@created 30th April, 2015
@package Component Builder
diff --git a/admin/views/admin_views/view.html.php b/admin/views/admin_views/view.html.php
index 9496270b7..690e85072 100644
--- a/admin/views/admin_views/view.html.php
+++ b/admin/views/admin_views/view.html.php
@@ -10,7 +10,7 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
- @version @update number 184 of this MVC
+ @version @update number 185 of this MVC
@build 14th October, 2017
@created 30th April, 2015
@package Component Builder
diff --git a/admin/views/compiler/view.html.php b/admin/views/compiler/view.html.php
index 5175aada4..45c041f7a 100644
--- a/admin/views/compiler/view.html.php
+++ b/admin/views/compiler/view.html.php
@@ -70,8 +70,7 @@ class ComponentbuilderViewCompiler extends JViewLegacy
// Check for errors.
if (count($errors = $this->get('Errors')))
{
- throw new Exception(implode("
-", $errors), 500);
+ throw new Exception(implode("\n", $errors), 500);
}
parent::display($tpl);
diff --git a/admin/views/joomla_component/submitbutton.js b/admin/views/joomla_component/submitbutton.js
index 7d588e846..085e88f04 100644
--- a/admin/views/joomla_component/submitbutton.js
+++ b/admin/views/joomla_component/submitbutton.js
@@ -9,7 +9,7 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
- @version @update number 388 of this MVC
+ @version @update number 389 of this MVC
@build 14th October, 2017
@created 6th May, 2015
@package Component Builder
diff --git a/admin/views/joomla_component/tmpl/edit.php b/admin/views/joomla_component/tmpl/edit.php
index 078e7bc94..bbf300ea4 100644
--- a/admin/views/joomla_component/tmpl/edit.php
+++ b/admin/views/joomla_component/tmpl/edit.php
@@ -10,7 +10,7 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
- @version @update number 388 of this MVC
+ @version @update number 389 of this MVC
@build 14th October, 2017
@created 6th May, 2015
@package Component Builder
@@ -194,7 +194,7 @@ $componentParams = JComponentHelper::getParams('com_componentbuilder');
- canDo->get('core.delete') || $this->canDo->get('core.edit.created_by') || $this->canDo->get('core.edit.state') || $this->canDo->get('core.edit.created')) : ?>
+ canDo->get('joomla_component.delete') || $this->canDo->get('joomla_component.edit.created_by') || $this->canDo->get('joomla_component.edit.state') || $this->canDo->get('joomla_component.edit.created')) : ?>
diff --git a/admin/views/joomla_component/view.html.php b/admin/views/joomla_component/view.html.php
index 7d3aeb65a..6958c5176 100644
--- a/admin/views/joomla_component/view.html.php
+++ b/admin/views/joomla_component/view.html.php
@@ -10,7 +10,7 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
- @version @update number 388 of this MVC
+ @version @update number 389 of this MVC
@build 14th October, 2017
@created 6th May, 2015
@package Component Builder
@@ -106,12 +106,12 @@ class ComponentbuilderViewJoomla_component extends JViewLegacy
// Built the actions for new and existing records.
if ($this->refid || $this->ref)
{
- if ($this->canDo->get('core.create') && $isNew)
+ if ($this->canDo->get('joomla_component.create') && $isNew)
{
// We can create the record.
JToolBarHelper::save('joomla_component.save', 'JTOOLBAR_SAVE');
}
- elseif ($this->canDo->get('core.edit'))
+ elseif ($this->canDo->get('joomla_component.edit'))
{
// We can save the record.
JToolBarHelper::save('joomla_component.save', 'JTOOLBAR_SAVE');
@@ -132,7 +132,7 @@ class ComponentbuilderViewJoomla_component extends JViewLegacy
if ($isNew)
{
// For new records, check the create permission.
- if ($this->canDo->get('core.create'))
+ if ($this->canDo->get('joomla_component.create'))
{
JToolBarHelper::apply('joomla_component.apply', 'JTOOLBAR_APPLY');
JToolBarHelper::save('joomla_component.save', 'JTOOLBAR_SAVE');
@@ -142,24 +142,24 @@ class ComponentbuilderViewJoomla_component extends JViewLegacy
}
else
{
- if ($this->canDo->get('core.edit'))
+ if ($this->canDo->get('joomla_component.edit'))
{
// We can save the new record
JToolBarHelper::apply('joomla_component.apply', 'JTOOLBAR_APPLY');
JToolBarHelper::save('joomla_component.save', 'JTOOLBAR_SAVE');
// We can save this record, but check the create permission to see
// if we can return to make a new one.
- if ($this->canDo->get('core.create'))
+ if ($this->canDo->get('joomla_component.create'))
{
JToolBarHelper::custom('joomla_component.save2new', 'save-new.png', 'save-new_f2.png', 'JTOOLBAR_SAVE_AND_NEW', false);
}
}
$canVersion = ($this->canDo->get('core.version') && $this->canDo->get('joomla_component.version'));
- if ($this->state->params->get('save_history', 1) && $this->canDo->get('core.edit') && $canVersion)
+ if ($this->state->params->get('save_history', 1) && $this->canDo->get('joomla_component.edit') && $canVersion)
{
JToolbarHelper::versions('com_componentbuilder.joomla_component', $this->item->id);
}
- if ($this->canDo->get('core.create'))
+ if ($this->canDo->get('joomla_component.create'))
{
JToolBarHelper::custom('joomla_component.save2copy', 'save-copy.png', 'save-copy_f2.png', 'JTOOLBAR_SAVE_AS_COPY', false);
}
diff --git a/admin/views/joomla_components/tmpl/default.php b/admin/views/joomla_components/tmpl/default.php
index f1ac9bbf3..3878eb34b 100644
--- a/admin/views/joomla_components/tmpl/default.php
+++ b/admin/views/joomla_components/tmpl/default.php
@@ -10,7 +10,7 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
- @version @update number 388 of this MVC
+ @version @update number 389 of this MVC
@build 14th October, 2017
@created 6th May, 2015
@package Component Builder
diff --git a/admin/views/joomla_components/tmpl/default_batch_body.php b/admin/views/joomla_components/tmpl/default_batch_body.php
index 4abaca76c..33efe3611 100644
--- a/admin/views/joomla_components/tmpl/default_batch_body.php
+++ b/admin/views/joomla_components/tmpl/default_batch_body.php
@@ -10,7 +10,7 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
- @version @update number 388 of this MVC
+ @version @update number 389 of this MVC
@build 14th October, 2017
@created 6th May, 2015
@package Component Builder
diff --git a/admin/views/joomla_components/tmpl/default_batch_footer.php b/admin/views/joomla_components/tmpl/default_batch_footer.php
index 0f6242e74..a2db00a40 100644
--- a/admin/views/joomla_components/tmpl/default_batch_footer.php
+++ b/admin/views/joomla_components/tmpl/default_batch_footer.php
@@ -10,7 +10,7 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
- @version @update number 388 of this MVC
+ @version @update number 389 of this MVC
@build 14th October, 2017
@created 6th May, 2015
@package Component Builder
diff --git a/admin/views/joomla_components/tmpl/default_body.php b/admin/views/joomla_components/tmpl/default_body.php
index 27d6db2b5..090b9d4c5 100644
--- a/admin/views/joomla_components/tmpl/default_body.php
+++ b/admin/views/joomla_components/tmpl/default_body.php
@@ -10,7 +10,7 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
- @version @update number 388 of this MVC
+ @version @update number 389 of this MVC
@build 14th October, 2017
@created 6th May, 2015
@package Component Builder
@@ -37,7 +37,7 @@ $edit = "index.php?option=com_componentbuilder&view=joomla_components&task=jooml
?>