forked from joomla/Component-Builder
fixed a line break incorrectly escaped, added better description to new fields layout
This commit is contained in:
parent
5a14049afd
commit
c2972c3e17
@ -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**
|
||||
|
||||
|
@ -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**
|
||||
|
||||
|
@ -153,8 +153,15 @@
|
||||
<action name="joomla_component.import_components" title="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_IMPORT_COMPONENTS_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_IMPORT_COMPONENTS_BUTTON_ACCESS_DESC" />
|
||||
<action name="joomla_component.access" title="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_ACCESS" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_ACCESS_DESC" />
|
||||
<action name="joomla_component.batch" title="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_BATCH_USE" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_BATCH_USE_DESC" />
|
||||
<action name="joomla_component.create" title="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_CREATE" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_CREATE_DESC" />
|
||||
<action name="joomla_component.dashboard_add" title="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_DASHBOARD_ADD" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_DASHBOARD_ADD_DESC" />
|
||||
<action name="joomla_component.dashboard_list" title="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_DASHBOARD_LIST" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_DASHBOARD_LIST_DESC" />
|
||||
<action name="joomla_component.delete" title="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_DELETE" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_DELETE_DESC" />
|
||||
<action name="joomla_component.edit" title="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_EDIT" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_EDIT_DESC" />
|
||||
<action name="joomla_component.edit.created_by" title="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_EDIT_CREATED_BY" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_EDIT_CREATED_BY_DESC" />
|
||||
<action name="joomla_component.edit.created" title="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_EDIT_CREATED_DATE" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_EDIT_CREATED_DATE_DESC" />
|
||||
<action name="joomla_component.edit.own" title="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_EDIT_OWN" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_EDIT_OWN_DESC" />
|
||||
<action name="joomla_component.edit.state" title="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_EDIT_STATE" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_EDIT_STATE_DESC" />
|
||||
<action name="joomla_component.version" title="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_EDIT_VERSION" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_EDIT_VERSION_DESC" />
|
||||
<action name="joomla_component.export" title="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_EXPORT" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_EXPORT_DESC" />
|
||||
<action name="joomla_component.import" title="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_IMPORT" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_IMPORT_DESC" />
|
||||
@ -216,6 +223,14 @@
|
||||
<action name="template.submenu" title="COM_COMPONENTBUILDER_TEMPLATES_SUBMENU" description="COM_COMPONENTBUILDER_TEMPLATES_SUBMENU_DESC" />
|
||||
</section>
|
||||
<section name="joomla_component">
|
||||
<action name="joomla_component.edit" title="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_EDIT" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_EDIT_DESC" />
|
||||
<action name="joomla_component.edit.own" title="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_EDIT_OWN" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_EDIT_OWN_DESC" />
|
||||
<action name="joomla_component.edit.state" title="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_EDIT_STATE" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_EDIT_STATE_DESC" />
|
||||
<action name="joomla_component.edit.created_by" title="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_EDIT_CREATED_BY" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_EDIT_CREATED_BY_DESC" />
|
||||
<action name="joomla_component.edit.created" title="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_EDIT_CREATED_DATE" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_EDIT_CREATED_DATE_DESC" />
|
||||
<action name="joomla_component.create" title="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_CREATE" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_CREATE_DESC" />
|
||||
<action name="joomla_component.delete" title="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_DELETE" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_DELETE_DESC" />
|
||||
<action name="joomla_component.access" title="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_ACCESS" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_ACCESS_DESC" />
|
||||
<action name="joomla_component.version" title="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_EDIT_VERSION" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_EDIT_VERSION_DESC" />
|
||||
</section>
|
||||
<section name="admin_view">
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -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
|
||||
|
@ -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);";
|
||||
|
@ -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('<br />', \$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}";
|
||||
|
@ -581,7 +581,7 @@ COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_BEGINNER_IMPORT_DESCRIPTION="<p>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<hr /><div id='jform_create_edit_buttons'></div>"
|
||||
COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_CREATE_EDIT_DISPLAY_DESCRIPTION="<hr /><h4>Linked Fields <span id='header_admin_fields_buttons'></span></h4><div id='display_admin_fields'>Display of the fields will load here!</div><hr /><h4>Field Conditions <span id='header_admin_fields_conditions_buttons'></span></h4><div id='display_admin_fields_conditions'>Display of the fields conditions will load here!</div>"
|
||||
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="<h5>Welcome to the new improved fields and conditions layout.</h5><p>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.</p><p>You can still <a href='https://youtu.be/CdSKSCTzmRA?list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=32m28s' target='_blank'>watch the tutorials</a>, and though it was made during the time repeatable fields were still being used, the various concepts and layouts still look mostly the same.</p>"
|
||||
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 <a href='https://youtu.be/CdSKSCTzmRA?list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=22m20s' target='_blank'>tutorial</a> 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. <small>(Make <b>SURE</b> to move this zipped backup package out of the tmp folder before doing an import)</small><br />If you are importing a package of a 3rd party JCB package developer, <b>make sure it is a reputable JCB package developers!</b>"
|
||||
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"
|
||||
|
@ -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"
|
||||
|
@ -74,7 +74,7 @@ $edit = "index.php?option=com_componentbuilder&view=joomla_components&task=jooml
|
||||
?>
|
||||
<tr>
|
||||
<td class="nowrap">
|
||||
<?php if ($canDo->get('core.edit')): ?>
|
||||
<?php if ($canDo->get('joomla_component.edit')): ?>
|
||||
<a href="<?php echo $edit; ?>&id=<?php echo $item->id; ?>&ref=admin_view&refid=<?php echo $id; ?>"><?php echo $displayData->escape($item->system_name); ?></a>
|
||||
<?php if ($item->checked_out): ?>
|
||||
<?php echo JHtml::_('jgrid.checkedout', $i, $userChkOut->name, $item->checked_out_time, 'joomla_components.', $canCheckin); ?>
|
||||
|
@ -74,7 +74,7 @@ $edit = "index.php?option=com_componentbuilder&view=joomla_components&task=jooml
|
||||
?>
|
||||
<tr>
|
||||
<td class="nowrap">
|
||||
<?php if ($canDo->get('core.edit')): ?>
|
||||
<?php if ($canDo->get('joomla_component.edit')): ?>
|
||||
<a href="<?php echo $edit; ?>&id=<?php echo $item->id; ?>&ref=custom_admin_view&refid=<?php echo $id; ?>"><?php echo $displayData->escape($item->system_name); ?></a>
|
||||
<?php if ($item->checked_out): ?>
|
||||
<?php echo JHtml::_('jgrid.checkedout', $i, $userChkOut->name, $item->checked_out_time, 'joomla_components.', $canCheckin); ?>
|
||||
|
@ -74,7 +74,7 @@ $edit = "index.php?option=com_componentbuilder&view=joomla_components&task=jooml
|
||||
?>
|
||||
<tr>
|
||||
<td class="nowrap">
|
||||
<?php if ($canDo->get('core.edit')): ?>
|
||||
<?php if ($canDo->get('joomla_component.edit')): ?>
|
||||
<a href="<?php echo $edit; ?>&id=<?php echo $item->id; ?>&ref=ftp&refid=<?php echo $id; ?>"><?php echo $displayData->escape($item->system_name); ?></a>
|
||||
<?php if ($item->checked_out): ?>
|
||||
<?php echo JHtml::_('jgrid.checkedout', $i, $userChkOut->name, $item->checked_out_time, 'joomla_components.', $canCheckin); ?>
|
||||
|
@ -74,7 +74,7 @@ $edit = "index.php?option=com_componentbuilder&view=joomla_components&task=jooml
|
||||
?>
|
||||
<tr>
|
||||
<td class="nowrap">
|
||||
<?php if ($canDo->get('core.edit')): ?>
|
||||
<?php if ($canDo->get('joomla_component.edit')): ?>
|
||||
<a href="<?php echo $edit; ?>&id=<?php echo $item->id; ?>&ref=site_view&refid=<?php echo $id; ?>"><?php echo $displayData->escape($item->system_name); ?></a>
|
||||
<?php if ($item->checked_out): ?>
|
||||
<?php echo JHtml::_('jgrid.checkedout', $i, $userChkOut->name, $item->checked_out_time, 'joomla_components.', $canCheckin); ?>
|
||||
|
@ -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
|
||||
@ -523,6 +523,23 @@ class ComponentbuilderModelAdmin_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 addadmin_viewsvvvz in this Repetable Field
|
||||
if (ComponentbuilderHelper::checkArray($items) && isset($this->addadmin_viewsvvvz))
|
||||
{
|
||||
|
@ -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
|
||||
|
@ -238,7 +238,7 @@ class ComponentbuilderModelAjax extends JModelList
|
||||
<label>' . ucwords($type) . '</label>
|
||||
</div>
|
||||
<div class="controls">
|
||||
<a class="btn btn-success vdm-button-new" onclick="UIkit.modal.confirm(\''.JText::_('COM_COMPONENTBUILDER_ALL_UNSAVED_WORK_WILL_BE_LOST_ARE_YOU_SURE_YOU_WANT_TO_CONTINUE').'\', function(){ window.location.href = \'index.php?option=com_componentbuilder&view='.$type.'&layout=edit'.$ref.'\' })" href="javascript:void(0)" >
|
||||
<a class="btn btn-success vdm-button-new" onclick="UIkit.modal.confirm(\''.JText::_('COM_COMPONENTBUILDER_ALL_UNSAVED_WORK_ON_THIS_PAGE_WILL_BE_LOST_ARE_YOU_SURE_YOU_WANT_TO_CONTINUE').'\', function(){ window.location.href = \'index.php?option=com_componentbuilder&view='.$type.'&layout=edit'.$ref.'\' })" href="javascript:void(0)" >
|
||||
<span class="icon-new icon-white"></span>
|
||||
' . JText::_('COM_COMPONENTBUILDER_NEW') . '
|
||||
</a>
|
||||
@ -293,7 +293,7 @@ class ComponentbuilderModelAjax extends JModelList
|
||||
$button[] = '</div>';
|
||||
$button[] = '<div class="controls">';
|
||||
}
|
||||
$button[] = '<a class="btn btn-success vdm-button-new" onclick="UIkit.modal.confirm(\''.JText::_('COM_COMPONENTBUILDER_ALL_UNSAVED_WORK_WILL_BE_LOST_ARE_YOU_SURE_YOU_WANT_TO_CONTINUE').'\', function(){ window.location.href = \''.$editThis.$ref.'\' })" href="javascript:void(0)" >';
|
||||
$button[] = '<a class="btn btn-success vdm-button-new" onclick="UIkit.modal.confirm(\''.JText::_('COM_COMPONENTBUILDER_ALL_UNSAVED_WORK_ON_THIS_PAGE_WILL_BE_LOST_ARE_YOU_SURE_YOU_WANT_TO_CONTINUE').'\', function(){ window.location.href = \''.$editThis.$ref.'\' })" href="javascript:void(0)" >';
|
||||
if (1 == $size)
|
||||
{
|
||||
$button[] = '<span class="'.$icon.' icon-white"></span>';
|
||||
@ -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 ' <a onclick="UIkit.modal.confirm(\''.JText::_('COM_COMPONENTBUILDER_ALL_UNSAVED_WORK_WILL_BE_LOST_ARE_YOU_SURE_YOU_WANT_TO_CONTINUE').'\', function(){ window.location.href = \''.$edit.'\' })" href="javascript:void(0)" class="uk-icon-pencil"></a>';
|
||||
return ' <a onclick="UIkit.modal.confirm(\''.JText::_('COM_COMPONENTBUILDER_ALL_UNSAVED_WORK_ON_THIS_PAGE_WILL_BE_LOST_ARE_YOU_SURE_YOU_WANT_TO_CONTINUE').'\', function(){ window.location.href = \''.$edit.'\' })" href="javascript:void(0)" class="uk-icon-pencil"></a>';
|
||||
|
||||
}
|
||||
return '';
|
||||
|
@ -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',
|
||||
|
@ -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))
|
||||
{
|
||||
|
@ -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
|
||||
<span class="icon-new icon-white"></span></a>';
|
||||
}
|
||||
// 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);
|
||||
|
@ -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
|
||||
<span class="icon-new icon-white"></span></a>';
|
||||
}
|
||||
// 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);
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
|
@ -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'));
|
||||
|
||||
|
@ -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
|
||||
|
@ -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))
|
||||
{
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
|
@ -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
|
||||
|
@ -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');
|
||||
<?php echo JHtml::_('bootstrap.endTab'); ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->canDo->get('core.delete') || $this->canDo->get('core.edit.created_by') || $this->canDo->get('core.edit.state') || $this->canDo->get('core.edit.created')) : ?>
|
||||
<?php if ($this->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')) : ?>
|
||||
<?php echo JHtml::_('bootstrap.addTab', 'joomla_componentTab', 'publishing', JText::_('COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PUBLISHING', true)); ?>
|
||||
<div class="row-fluid form-horizontal-desktop">
|
||||
<div class="span6">
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
?>
|
||||
<tr class="row<?php echo $i % 2; ?>">
|
||||
<td class="order nowrap center hidden-phone">
|
||||
<?php if ($canDo->get('core.edit.state')): ?>
|
||||
<?php if ($canDo->get('joomla_component.edit.state')): ?>
|
||||
<?php
|
||||
if ($this->saveOrder)
|
||||
{
|
||||
@ -60,7 +60,7 @@ $edit = "index.php?option=com_componentbuilder&view=joomla_components&task=jooml
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td class="nowrap center">
|
||||
<?php if ($canDo->get('core.edit')): ?>
|
||||
<?php if ($canDo->get('joomla_component.edit')): ?>
|
||||
<?php if ($item->checked_out) : ?>
|
||||
<?php if ($canCheckin) : ?>
|
||||
<?php echo JHtml::_('grid.id', $i, $item->id); ?>
|
||||
@ -75,7 +75,7 @@ $edit = "index.php?option=com_componentbuilder&view=joomla_components&task=jooml
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td class="nowrap">
|
||||
<?php if ($canDo->get('core.edit')): ?>
|
||||
<?php if ($canDo->get('joomla_component.edit')): ?>
|
||||
<div class="name">
|
||||
<a href="<?php echo $edit; ?>&id=<?php echo $item->id; ?>"><?php echo $this->escape($item->system_name); ?></a>
|
||||
<?php if ($item->checked_out): ?>
|
||||
@ -102,7 +102,7 @@ $edit = "index.php?option=com_componentbuilder&view=joomla_components&task=jooml
|
||||
<?php echo $this->escape($item->author); ?>
|
||||
</td>
|
||||
<td class="center">
|
||||
<?php if ($canDo->get('core.edit.state')) : ?>
|
||||
<?php if ($canDo->get('joomla_component.edit.state')) : ?>
|
||||
<?php if ($item->checked_out) : ?>
|
||||
<?php if ($canCheckin) : ?>
|
||||
<?php echo JHtml::_('jgrid.published', $item->published, $i, 'joomla_components.', true, 'cb'); ?>
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
@ -56,10 +56,10 @@ class ComponentbuilderViewJoomla_components extends JViewLegacy
|
||||
$this->saveOrder = $this->listOrder == 'ordering';
|
||||
// get global action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('joomla_component');
|
||||
$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->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.
|
||||
|
@ -468,11 +468,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('<br />', \$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');";
|
||||
@ -498,6 +493,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}";
|
||||
|
@ -55,8 +55,7 @@ class ComponentbuilderViewApi 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);
|
||||
|
Loading…
Reference in New Issue
Block a user