forked from joomla/Component-Builder
fixed issue that caused some custom code not to export for a JCB packages if found in anther custom code area. Made some corrections to the router helper class. Added return_here value admin views to improve the return values in url redirection. Improved the open valid base64 method to make use of default string. Update many ajax calls to not use jsonp, and infact be more secure.
This commit is contained in:
parent
17ba6c4a89
commit
b7a5cb7285
@ -144,11 +144,11 @@ TODO
|
||||
+ *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)
|
||||
+ *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder)
|
||||
+ *First Build*: 30th April, 2015
|
||||
+ *Last Build*: 19th December, 2018
|
||||
+ *Last Build*: 29th December, 2018
|
||||
+ *Version*: 2.9.8
|
||||
+ *Copyright*: Copyright (C) 2015 - 2018 Vast Development Method. All rights reserved.
|
||||
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt
|
||||
+ *Line count*: **195562**
|
||||
+ *Line count*: **195665**
|
||||
+ *Field count*: **1087**
|
||||
+ *File count*: **1275**
|
||||
+ *Folder count*: **201**
|
||||
|
@ -144,11 +144,11 @@ TODO
|
||||
+ *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)
|
||||
+ *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder)
|
||||
+ *First Build*: 30th April, 2015
|
||||
+ *Last Build*: 19th December, 2018
|
||||
+ *Last Build*: 29th December, 2018
|
||||
+ *Version*: 2.9.8
|
||||
+ *Copyright*: Copyright (C) 2015 - 2018 Vast Development Method. All rights reserved.
|
||||
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt
|
||||
+ *Line count*: **195562**
|
||||
+ *Line count*: **195665**
|
||||
+ *Field count*: **1087**
|
||||
+ *File count*: **1275**
|
||||
+ *Folder count*: **201**
|
||||
|
@ -42,6 +42,8 @@ class ###Component###View###Views### extends JViewLegacy
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$this->listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$this->saveOrder = $this->listOrder == 'ordering';
|
||||
// set the return here value
|
||||
$this->return_here = urlencode(base64_encode((string) JUri::getInstance()));
|
||||
// get global action permissions
|
||||
$this->canDo = ###Component###Helper::getActions('###view###');###JVIEWLISTCANDO###
|
||||
|
||||
|
@ -157,6 +157,10 @@ abstract class ###Component###HelperRoute
|
||||
self::$lookup[$language][$view][$item->query['id']] = $item->id;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
self::$lookup[$language][$view][0] = $item->id;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -166,6 +170,8 @@ abstract class ###Component###HelperRoute
|
||||
foreach ($needles as $view => $ids)
|
||||
{
|
||||
if (isset(self::$lookup[$language][$view]))
|
||||
{
|
||||
if (###Component###Helper::checkArray($ids))
|
||||
{
|
||||
foreach ($ids as $id)
|
||||
{
|
||||
@ -175,6 +181,11 @@ abstract class ###Component###HelperRoute
|
||||
}
|
||||
}
|
||||
}
|
||||
elseif (isset(self::$lookup[$language][$view][0]))
|
||||
{
|
||||
return self::$lookup[$language][$view][0];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -5270,7 +5270,9 @@ class Interpretation extends Fields
|
||||
$routeHelper[] = $this->_t(2) . "else";
|
||||
$routeHelper[] = $this->_t(2) . "{";
|
||||
$routeHelper[] = $this->_t(3) . "//" . $this->setLine(__LINE__) . " Initialize the needel array.";
|
||||
$routeHelper[] = $this->_t(3) . "\$needles = array();";
|
||||
$routeHelper[] = $this->_t(3) . "\$needles = array(";
|
||||
$routeHelper[] = $this->_t(4) . "'" . $viewName_single . "' => array()";
|
||||
$routeHelper[] = $this->_t(3) . ");";
|
||||
$routeHelper[] = $this->_t(3) . "//" . $this->setLine(__LINE__) . " Create the link but don't add the id.";
|
||||
$routeHelper[] = $this->_t(3) . "\$link = 'index.php?option=com_" . $this->fileContentStatic[$this->hhh . 'component' . $this->hhh] . "&view=" . $viewName_single . "';";
|
||||
$routeHelper[] = $this->_t(2) . "}";
|
||||
@ -7110,7 +7112,7 @@ class Interpretation extends Fields
|
||||
$referal = '';
|
||||
if (!$ref)
|
||||
{
|
||||
$ref = '&ref=' . $viewName_list;
|
||||
$ref = '&return=<?php echo $this->return_here; ?>';
|
||||
}
|
||||
// in linked tab/view so must add ref to default
|
||||
else
|
||||
|
@ -2356,11 +2356,12 @@ abstract class ComponentbuilderHelper
|
||||
*
|
||||
* @param string $data The base64 string
|
||||
* @param string $key We store the string with that suffix :)
|
||||
* @param string $default The default switch
|
||||
*
|
||||
* @return string The opened string
|
||||
*
|
||||
*/
|
||||
public static function openValidBase64($data, $key = '__.o0=base64=Oo.__')
|
||||
public static function openValidBase64($data, $key = '__.o0=base64=Oo.__', $default = 'string')
|
||||
{
|
||||
// check that we have a string
|
||||
if (self::checkString($data))
|
||||
@ -2379,8 +2380,13 @@ abstract class ComponentbuilderHelper
|
||||
return base64_decode($data);
|
||||
}
|
||||
}
|
||||
// check if we should just return the string
|
||||
if ('string' === $default)
|
||||
{
|
||||
return $data;
|
||||
}
|
||||
return $default;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
|
@ -1330,16 +1330,16 @@ function checkAliasField() {
|
||||
}
|
||||
|
||||
function checkAliasField_server(type){
|
||||
var getUrl = "index.php?option=com_componentbuilder&task=ajax.checkAliasField&format=json&vdm="+vastDevMod;
|
||||
var getUrl = "index.php?option=com_componentbuilder&task=ajax.checkAliasField&format=json&raw=true&vdm="+vastDevMod;
|
||||
if(token.length > 0 && type > 0){
|
||||
var request = 'token='+token+'&type=' + type;
|
||||
}
|
||||
return jQuery.ajax({
|
||||
type: 'GET',
|
||||
url: getUrl,
|
||||
dataType: 'jsonp',
|
||||
dataType: 'json',
|
||||
data: request,
|
||||
jsonp: 'callback'
|
||||
jsonp: false
|
||||
});
|
||||
}
|
||||
|
||||
@ -1354,16 +1354,16 @@ function getAjaxDisplay(type){
|
||||
}
|
||||
|
||||
function getAjaxDisplay_server(type){
|
||||
var getUrl = "index.php?option=com_componentbuilder&task=ajax.getAjaxDisplay&format=json&vdm="+vastDevMod;
|
||||
var getUrl = "index.php?option=com_componentbuilder&task=ajax.getAjaxDisplay&format=json&raw=true&vdm="+vastDevMod;
|
||||
if(token.length > 0 && type.length > 0){
|
||||
var request = 'token='+token+'&type=' + type;
|
||||
}
|
||||
return jQuery.ajax({
|
||||
type: 'GET',
|
||||
url: getUrl,
|
||||
dataType: 'jsonp',
|
||||
dataType: 'json',
|
||||
data: request,
|
||||
jsonp: 'callback'
|
||||
jsonp: false
|
||||
});
|
||||
}
|
||||
|
||||
@ -1372,16 +1372,16 @@ function addData(result,where){
|
||||
}
|
||||
|
||||
function addButtonID_server(type, size){
|
||||
var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.getButtonID&format=json&vdm="+vastDevMod);
|
||||
var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.getButtonID&format=json&raw=true&vdm="+vastDevMod);
|
||||
if(token.length > 0 && type.length > 0 && size > 0){
|
||||
var request = 'token='+token+'&type='+type+'&size='+size;
|
||||
}
|
||||
return jQuery.ajax({
|
||||
type: 'GET',
|
||||
url: getUrl,
|
||||
dataType: 'jsonp',
|
||||
dataType: 'json',
|
||||
data: request,
|
||||
jsonp: 'callback'
|
||||
jsonp: false
|
||||
});
|
||||
}
|
||||
function addButtonID(type, where, size){
|
||||
@ -1397,16 +1397,16 @@ function addButtonID(type, where, size){
|
||||
}
|
||||
|
||||
function addButton_server(type, size){
|
||||
var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.getButton&format=json&vdm="+vastDevMod);
|
||||
var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.getButton&format=json&raw=true&vdm="+vastDevMod);
|
||||
if(token.length > 0 && type.length > 0){
|
||||
var request = 'token='+token+'&type='+type+'&size='+size;
|
||||
}
|
||||
return jQuery.ajax({
|
||||
type: 'GET',
|
||||
url: getUrl,
|
||||
dataType: 'jsonp',
|
||||
dataType: 'json',
|
||||
data: request,
|
||||
jsonp: 'callback'
|
||||
jsonp: false
|
||||
});
|
||||
}
|
||||
function addButton(type, where, size){
|
||||
@ -1424,16 +1424,16 @@ function addButton(type, where, size){
|
||||
}
|
||||
|
||||
function getLinked_server(type){
|
||||
var getUrl = "index.php?option=com_componentbuilder&task=ajax.getLinked&format=json&vdm="+vastDevMod;
|
||||
var getUrl = "index.php?option=com_componentbuilder&task=ajax.getLinked&format=json&raw=true&vdm="+vastDevMod;
|
||||
if(token.length > 0 && type > 0){
|
||||
var request = 'token='+token+'&type='+type;
|
||||
}
|
||||
return jQuery.ajax({
|
||||
type: 'GET',
|
||||
url: getUrl,
|
||||
dataType: 'jsonp',
|
||||
dataType: 'json',
|
||||
data: request,
|
||||
jsonp: 'callback'
|
||||
jsonp: false
|
||||
});
|
||||
}
|
||||
|
||||
@ -1446,16 +1446,16 @@ function getLinked(){
|
||||
}
|
||||
|
||||
function getTableColumns_server(tableName){
|
||||
var getUrl = "index.php?option=com_componentbuilder&task=ajax.tableColumns&format=json&vdm="+vastDevMod;
|
||||
var getUrl = "index.php?option=com_componentbuilder&task=ajax.tableColumns&format=json&raw=true&vdm="+vastDevMod;
|
||||
if(token.length > 0 && tableName.length > 0){
|
||||
var request = 'token='+token+'&table='+tableName;
|
||||
}
|
||||
return jQuery.ajax({
|
||||
type: 'GET',
|
||||
url: getUrl,
|
||||
dataType: 'jsonp',
|
||||
dataType: 'json',
|
||||
data: request,
|
||||
jsonp: 'callback'
|
||||
jsonp: false
|
||||
});
|
||||
}
|
||||
|
||||
@ -1477,16 +1477,16 @@ function getTableColumns(fieldKey, table_, nr_){
|
||||
}
|
||||
|
||||
function getDynamicScripts_server(typpe){
|
||||
var getUrl = "index.php?option=com_componentbuilder&task=ajax.getDynamicScripts&format=json&vdm="+vastDevMod;
|
||||
var getUrl = "index.php?option=com_componentbuilder&task=ajax.getDynamicScripts&format=json&raw=true&vdm="+vastDevMod;
|
||||
if(token.length > 0 && typpe.length > 0){
|
||||
var request = 'token='+token+'&type='+typpe;
|
||||
}
|
||||
return jQuery.ajax({
|
||||
type: 'GET',
|
||||
url: getUrl,
|
||||
dataType: 'jsonp',
|
||||
dataType: 'json',
|
||||
data: request,
|
||||
jsonp: 'callback'
|
||||
jsonp: false
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -443,16 +443,16 @@ jQuery(document).ready(function()
|
||||
});
|
||||
|
||||
function getLinked_server(type){
|
||||
var getUrl = "index.php?option=com_componentbuilder&task=ajax.getLinked&format=json&vdm="+vastDevMod;
|
||||
var getUrl = "index.php?option=com_componentbuilder&task=ajax.getLinked&format=json&raw=true&vdm="+vastDevMod;
|
||||
if(token.length > 0 && type > 0){
|
||||
var request = 'token='+token+'&type='+type;
|
||||
}
|
||||
return jQuery.ajax({
|
||||
type: 'GET',
|
||||
url: getUrl,
|
||||
dataType: 'jsonp',
|
||||
dataType: 'json',
|
||||
data: request,
|
||||
jsonp: 'callback'
|
||||
jsonp: false
|
||||
});
|
||||
}
|
||||
|
||||
@ -610,16 +610,16 @@ jQuery(document).ready(function($)
|
||||
});
|
||||
|
||||
function getSnippets_server(libraries){
|
||||
var getUrl = "index.php?option=com_componentbuilder&task=ajax.getSnippets&format=json";
|
||||
var getUrl = "index.php?option=com_componentbuilder&task=ajax.getSnippets&raw=true&format=json";
|
||||
if(token.length > 0 && libraries.length > 0){
|
||||
var request = 'token='+token+'&libraries='+JSON.stringify(libraries);
|
||||
}
|
||||
return jQuery.ajax({
|
||||
type: 'GET',
|
||||
url: getUrl,
|
||||
dataType: 'jsonp',
|
||||
dataType: 'json',
|
||||
data: request,
|
||||
jsonp: 'callback'
|
||||
jsonp: false
|
||||
});
|
||||
}
|
||||
function getSnippets(){
|
||||
|
@ -1485,16 +1485,16 @@ jQuery(document).ready(function()
|
||||
});
|
||||
|
||||
function getLinked_server(type){
|
||||
var getUrl = "index.php?option=com_componentbuilder&task=ajax.getLinked&format=json&vdm="+vastDevMod;
|
||||
var getUrl = "index.php?option=com_componentbuilder&task=ajax.getLinked&format=json&raw=true&vdm="+vastDevMod;
|
||||
if(token.length > 0 && type > 0){
|
||||
var request = 'token='+token+'&type='+type;
|
||||
}
|
||||
return jQuery.ajax({
|
||||
type: 'GET',
|
||||
url: getUrl,
|
||||
dataType: 'jsonp',
|
||||
dataType: 'json',
|
||||
data: request,
|
||||
jsonp: 'callback'
|
||||
jsonp: false
|
||||
});
|
||||
}
|
||||
|
||||
@ -1508,7 +1508,7 @@ function getLinked(){
|
||||
|
||||
function getViewTableColumns_server(viewId,asKey,rowType)
|
||||
{
|
||||
var getUrl = "index.php?option=com_componentbuilder&task=ajax.viewTableColumns&format=json";
|
||||
var getUrl = "index.php?option=com_componentbuilder&task=ajax.viewTableColumns&format=json&raw=true";
|
||||
if (token.length > 0 && viewId > 0 && asKey.length > 0)
|
||||
{
|
||||
var request = 'token='+token+'&as='+asKey+'&type='+rowType+'&id='+viewId;
|
||||
@ -1516,9 +1516,9 @@ function getViewTableColumns_server(viewId,asKey,rowType)
|
||||
return jQuery.ajax({
|
||||
type: 'GET',
|
||||
url: getUrl,
|
||||
dataType: 'jsonp',
|
||||
dataType: 'json',
|
||||
data: request,
|
||||
jsonp: 'callback'
|
||||
jsonp: false
|
||||
});
|
||||
}
|
||||
|
||||
@ -1538,7 +1538,7 @@ function getViewTableColumns(id,asKey,key,rowType,main, table_, nr_)
|
||||
|
||||
function getDbTableColumns_server(name,asKey,rowType)
|
||||
{
|
||||
var getUrl = "index.php?option=com_componentbuilder&task=ajax.dbTableColumns&format=json";
|
||||
var getUrl = "index.php?option=com_componentbuilder&task=ajax.dbTableColumns&format=json&raw=true";
|
||||
if (token.length > 0 && name.length > 0 && asKey.length > 0)
|
||||
{
|
||||
var request = 'token='+token+'&as='+asKey+'&type='+rowType+'&name='+name;
|
||||
@ -1546,9 +1546,9 @@ function getDbTableColumns_server(name,asKey,rowType)
|
||||
return jQuery.ajax({
|
||||
type: 'GET',
|
||||
url: getUrl,
|
||||
dataType: 'jsonp',
|
||||
dataType: 'json',
|
||||
data: request,
|
||||
jsonp: 'callback'
|
||||
jsonp: false
|
||||
});
|
||||
}
|
||||
|
||||
@ -1628,16 +1628,16 @@ function updateSubItems(fieldName, fieldNr, table_, nr_){
|
||||
}
|
||||
|
||||
function getDynamicScripts_server(typpe){
|
||||
var getUrl = "index.php?option=com_componentbuilder&task=ajax.getDynamicScripts&format=json&vdm="+vastDevMod;
|
||||
var getUrl = "index.php?option=com_componentbuilder&task=ajax.getDynamicScripts&format=json&raw=true&vdm="+vastDevMod;
|
||||
if(token.length > 0 && typpe.length > 0){
|
||||
var request = 'token='+token+'&type='+typpe;
|
||||
}
|
||||
return jQuery.ajax({
|
||||
type: 'GET',
|
||||
url: getUrl,
|
||||
dataType: 'jsonp',
|
||||
dataType: 'json',
|
||||
data: request,
|
||||
jsonp: 'callback'
|
||||
jsonp: false
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -522,16 +522,16 @@ jQuery(document).ready(function()
|
||||
});
|
||||
|
||||
function getLinked_server(type){
|
||||
var getUrl = "index.php?option=com_componentbuilder&task=ajax.getLinked&format=json&vdm="+vastDevMod;
|
||||
var getUrl = "index.php?option=com_componentbuilder&task=ajax.getLinked&format=json&raw=true&vdm="+vastDevMod;
|
||||
if(token.length > 0 && type > 0){
|
||||
var request = 'token='+token+'&type='+type;
|
||||
}
|
||||
return jQuery.ajax({
|
||||
type: 'GET',
|
||||
url: getUrl,
|
||||
dataType: 'jsonp',
|
||||
dataType: 'json',
|
||||
data: request,
|
||||
jsonp: 'callback'
|
||||
jsonp: false
|
||||
});
|
||||
}
|
||||
|
||||
@ -544,16 +544,16 @@ function getLinked(){
|
||||
}
|
||||
|
||||
function addButton_server(type, size){
|
||||
var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.getButton&format=json&vdm="+vastDevMod);
|
||||
var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.getButton&format=json&raw=true&vdm="+vastDevMod);
|
||||
if(token.length > 0 && type.length > 0){
|
||||
var request = 'token='+token+'&type='+type+'&size='+size;
|
||||
}
|
||||
return jQuery.ajax({
|
||||
type: 'GET',
|
||||
url: getUrl,
|
||||
dataType: 'jsonp',
|
||||
dataType: 'json',
|
||||
data: request,
|
||||
jsonp: 'callback'
|
||||
jsonp: false
|
||||
});
|
||||
}
|
||||
function addButton(type, where, size){
|
||||
@ -574,16 +574,16 @@ function addButton(type, where, size){
|
||||
var rowIdKey = 'properties';
|
||||
|
||||
function getFieldOptions_server(fieldtype){
|
||||
var getUrl = "index.php?option=com_componentbuilder&task=ajax.fieldOptions&format=json&vdm="+vastDevMod;
|
||||
var getUrl = "index.php?option=com_componentbuilder&task=ajax.fieldOptions&format=json&raw=true&vdm="+vastDevMod;
|
||||
if(token.length > 0 && fieldtype > 0){
|
||||
var request = 'token='+token+'&id='+fieldtype;
|
||||
}
|
||||
return jQuery.ajax({
|
||||
type: 'GET',
|
||||
url: getUrl,
|
||||
dataType: 'jsonp',
|
||||
dataType: 'json',
|
||||
data: request,
|
||||
jsonp: 'callback'
|
||||
jsonp: false
|
||||
});
|
||||
}
|
||||
|
||||
@ -734,31 +734,31 @@ function propertyIsSet(prop, id, targetForm) {
|
||||
}
|
||||
|
||||
function getFieldPropertyDesc_server(fieldtype, property){
|
||||
var getUrl = "index.php?option=com_componentbuilder&task=ajax.getFieldPropertyDesc&format=json&vdm="+vastDevMod;
|
||||
var getUrl = "index.php?option=com_componentbuilder&task=ajax.getFieldPropertyDesc&format=json&raw=true&vdm="+vastDevMod;
|
||||
if(token.length > 0 && (fieldtype > 0 || fieldtype.length > 0)&& property.length > 0){
|
||||
var request = 'token='+token+'&fieldtype='+fieldtype+'&property='+property;
|
||||
}
|
||||
return jQuery.ajax({
|
||||
type: 'GET',
|
||||
url: getUrl,
|
||||
dataType: 'jsonp',
|
||||
dataType: 'json',
|
||||
data: request,
|
||||
jsonp: 'callback'
|
||||
jsonp: false
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
function getValidationRulesTable_server(){
|
||||
var getUrl = "index.php?option=com_componentbuilder&task=ajax.getValidationRulesTable&format=json&vdm="+vastDevMod;
|
||||
var getUrl = "index.php?option=com_componentbuilder&task=ajax.getValidationRulesTable&format=json&raw=true&vdm="+vastDevMod;
|
||||
if(token.length > 0){
|
||||
var request = 'token='+token+'&id=1';
|
||||
}
|
||||
return jQuery.ajax({
|
||||
type: 'GET',
|
||||
url: getUrl,
|
||||
dataType: 'jsonp',
|
||||
dataType: 'json',
|
||||
data: request,
|
||||
jsonp: 'callback'
|
||||
jsonp: false
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -979,16 +979,16 @@ function getAjaxDisplay(type){
|
||||
}
|
||||
|
||||
function getAjaxDisplay_server(type){
|
||||
var getUrl = "index.php?option=com_componentbuilder&task=ajax.getAjaxDisplay&format=json&vdm="+vastDevMod;
|
||||
var getUrl = "index.php?option=com_componentbuilder&task=ajax.getAjaxDisplay&format=json&raw=true&vdm="+vastDevMod;
|
||||
if(token.length > 0 && type.length > 0){
|
||||
var request = 'token='+token+'&type=' + type;
|
||||
}
|
||||
return jQuery.ajax({
|
||||
type: 'GET',
|
||||
url: getUrl,
|
||||
dataType: 'jsonp',
|
||||
dataType: 'json',
|
||||
data: request,
|
||||
jsonp: 'callback'
|
||||
jsonp: false
|
||||
});
|
||||
}
|
||||
|
||||
@ -1012,16 +1012,16 @@ function dasboardSwitch(value){
|
||||
|
||||
|
||||
function addButtonID_server(type, size){
|
||||
var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.getButtonID&format=json&vdm="+vastDevMod);
|
||||
var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.getButtonID&format=json&raw=true&vdm="+vastDevMod);
|
||||
if(token.length > 0 && type.length > 0 && size > 0){
|
||||
var request = 'token='+token+'&type='+type+'&size='+size;
|
||||
}
|
||||
return jQuery.ajax({
|
||||
type: 'GET',
|
||||
url: getUrl,
|
||||
dataType: 'jsonp',
|
||||
dataType: 'json',
|
||||
data: request,
|
||||
jsonp: 'callback'
|
||||
jsonp: false
|
||||
});
|
||||
}
|
||||
function addButtonID(type, where, size){
|
||||
@ -1037,16 +1037,16 @@ function addButtonID(type, where, size){
|
||||
}
|
||||
|
||||
function addButton_server(type, size){
|
||||
var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.getButton&format=json&vdm="+vastDevMod);
|
||||
var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.getButton&format=json&raw=true&vdm="+vastDevMod);
|
||||
if(token.length > 0 && type.length > 0){
|
||||
var request = 'token='+token+'&type='+type+'&size='+size;
|
||||
}
|
||||
return jQuery.ajax({
|
||||
type: 'GET',
|
||||
url: getUrl,
|
||||
dataType: 'jsonp',
|
||||
dataType: 'json',
|
||||
data: request,
|
||||
jsonp: 'callback'
|
||||
jsonp: false
|
||||
});
|
||||
}
|
||||
function addButton(type, where, size){
|
||||
@ -1062,4 +1062,3 @@ function addButton(type, where, size){
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -21,16 +21,16 @@ function addData(result,where){
|
||||
}
|
||||
|
||||
function addButton_server(type, size){
|
||||
var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.getButton&format=json&vdm="+vastDevMod);
|
||||
var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.getButton&format=json&raw=true&vdm="+vastDevMod);
|
||||
if(token.length > 0 && type.length > 0){
|
||||
var request = 'token='+token+'&type='+type+'&size='+size;
|
||||
}
|
||||
return jQuery.ajax({
|
||||
type: 'GET',
|
||||
url: getUrl,
|
||||
dataType: 'jsonp',
|
||||
dataType: 'json',
|
||||
data: request,
|
||||
jsonp: 'callback'
|
||||
jsonp: false
|
||||
});
|
||||
}
|
||||
function addButton(type, where, size){
|
||||
|
@ -208,16 +208,16 @@ jQuery(document).ready(function($)
|
||||
});
|
||||
|
||||
function getSnippets_server(libraries){
|
||||
var getUrl = "index.php?option=com_componentbuilder&task=ajax.getSnippets&format=json";
|
||||
var getUrl = "index.php?option=com_componentbuilder&task=ajax.getSnippets&raw=true&format=json";
|
||||
if(token.length > 0 && libraries.length > 0){
|
||||
var request = 'token='+token+'&libraries='+JSON.stringify(libraries);
|
||||
}
|
||||
return jQuery.ajax({
|
||||
type: 'GET',
|
||||
url: getUrl,
|
||||
dataType: 'jsonp',
|
||||
dataType: 'json',
|
||||
data: request,
|
||||
jsonp: 'callback'
|
||||
jsonp: false
|
||||
});
|
||||
}
|
||||
function getSnippets(){
|
||||
|
@ -417,16 +417,16 @@ function addData(result,where){
|
||||
}
|
||||
|
||||
function addButtonID_server(type, size){
|
||||
var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.getButtonID&format=json&vdm="+vastDevMod);
|
||||
var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.getButtonID&format=json&raw=true&vdm="+vastDevMod);
|
||||
if(token.length > 0 && type.length > 0 && size > 0){
|
||||
var request = 'token='+token+'&type='+type+'&size='+size;
|
||||
}
|
||||
return jQuery.ajax({
|
||||
type: 'GET',
|
||||
url: getUrl,
|
||||
dataType: 'jsonp',
|
||||
dataType: 'json',
|
||||
data: request,
|
||||
jsonp: 'callback'
|
||||
jsonp: false
|
||||
});
|
||||
}
|
||||
function addButtonID(type, where, size){
|
||||
@ -442,16 +442,16 @@ function addButtonID(type, where, size){
|
||||
}
|
||||
|
||||
function addButton_server(type, size){
|
||||
var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.getButton&format=json&vdm="+vastDevMod);
|
||||
var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.getButton&format=json&raw=true&vdm="+vastDevMod);
|
||||
if(token.length > 0 && type.length > 0){
|
||||
var request = 'token='+token+'&type='+type+'&size='+size;
|
||||
}
|
||||
return jQuery.ajax({
|
||||
type: 'GET',
|
||||
url: getUrl,
|
||||
dataType: 'jsonp',
|
||||
dataType: 'json',
|
||||
data: request,
|
||||
jsonp: 'callback'
|
||||
jsonp: false
|
||||
});
|
||||
}
|
||||
function addButton(type, where, size){
|
||||
@ -469,16 +469,16 @@ function addButton(type, where, size){
|
||||
}
|
||||
|
||||
function getLinked_server(type){
|
||||
var getUrl = "index.php?option=com_componentbuilder&task=ajax.getLinked&format=json&vdm="+vastDevMod;
|
||||
var getUrl = "index.php?option=com_componentbuilder&task=ajax.getLinked&format=json&raw=true&vdm="+vastDevMod;
|
||||
if(token.length > 0 && type > 0){
|
||||
var request = 'token='+token+'&type='+type;
|
||||
}
|
||||
return jQuery.ajax({
|
||||
type: 'GET',
|
||||
url: getUrl,
|
||||
dataType: 'jsonp',
|
||||
dataType: 'json',
|
||||
data: request,
|
||||
jsonp: 'callback'
|
||||
jsonp: false
|
||||
});
|
||||
}
|
||||
|
||||
@ -501,30 +501,30 @@ function getAjaxDisplay(type){
|
||||
}
|
||||
|
||||
function getAjaxDisplay_server(type){
|
||||
var getUrl = "index.php?option=com_componentbuilder&task=ajax.getAjaxDisplay&format=json&vdm="+vastDevMod;
|
||||
var getUrl = "index.php?option=com_componentbuilder&task=ajax.getAjaxDisplay&format=json&raw=true&vdm="+vastDevMod;
|
||||
if (token.length > 0 && type.length > 0) {
|
||||
var request = 'token='+token+'&type=' + type;
|
||||
}
|
||||
return jQuery.ajax({
|
||||
type: 'GET',
|
||||
url: getUrl,
|
||||
dataType: 'jsonp',
|
||||
dataType: 'json',
|
||||
data: request,
|
||||
jsonp: 'callback'
|
||||
jsonp: false
|
||||
});
|
||||
}
|
||||
|
||||
function getFieldSelectOptions_server(fieldId){
|
||||
var getUrl = "index.php?option=com_componentbuilder&task=ajax.fieldSelectOptions&format=json";
|
||||
var getUrl = "index.php?option=com_componentbuilder&task=ajax.fieldSelectOptions&format=json&raw=true";
|
||||
if (token.length > 0 && fieldId > 0) {
|
||||
var request = 'token='+token+'&id='+fieldId;
|
||||
}
|
||||
return jQuery.ajax({
|
||||
type: 'GET',
|
||||
url: getUrl,
|
||||
dataType: 'jsonp',
|
||||
dataType: 'json',
|
||||
data: request,
|
||||
jsonp: 'callback'
|
||||
jsonp: false
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -484,16 +484,16 @@ jQuery(document).ready(function()
|
||||
});
|
||||
|
||||
function getLinked_server(type){
|
||||
var getUrl = "index.php?option=com_componentbuilder&task=ajax.getLinked&format=json&vdm="+vastDevMod;
|
||||
var getUrl = "index.php?option=com_componentbuilder&task=ajax.getLinked&format=json&raw=true&vdm="+vastDevMod;
|
||||
if(token.length > 0 && type > 0){
|
||||
var request = 'token='+token+'&type='+type;
|
||||
}
|
||||
return jQuery.ajax({
|
||||
type: 'GET',
|
||||
url: getUrl,
|
||||
dataType: 'jsonp',
|
||||
dataType: 'json',
|
||||
data: request,
|
||||
jsonp: 'callback'
|
||||
jsonp: false
|
||||
});
|
||||
}
|
||||
|
||||
@ -651,16 +651,16 @@ jQuery(document).ready(function($)
|
||||
});
|
||||
|
||||
function getSnippets_server(libraries){
|
||||
var getUrl = "index.php?option=com_componentbuilder&task=ajax.getSnippets&format=json";
|
||||
var getUrl = "index.php?option=com_componentbuilder&task=ajax.getSnippets&raw=true&format=json";
|
||||
if(token.length > 0 && libraries.length > 0){
|
||||
var request = 'token='+token+'&libraries='+JSON.stringify(libraries);
|
||||
}
|
||||
return jQuery.ajax({
|
||||
type: 'GET',
|
||||
url: getUrl,
|
||||
dataType: 'jsonp',
|
||||
dataType: 'json',
|
||||
data: request,
|
||||
jsonp: 'callback'
|
||||
jsonp: false
|
||||
});
|
||||
}
|
||||
function getSnippets(){
|
||||
|
@ -234,16 +234,16 @@ jQuery(document).ready(function($)
|
||||
});
|
||||
|
||||
function getSnippets_server(libraries){
|
||||
var getUrl = "index.php?option=com_componentbuilder&task=ajax.getSnippets&format=json";
|
||||
var getUrl = "index.php?option=com_componentbuilder&task=ajax.getSnippets&raw=true&format=json";
|
||||
if(token.length > 0 && libraries.length > 0){
|
||||
var request = 'token='+token+'&libraries='+JSON.stringify(libraries);
|
||||
}
|
||||
return jQuery.ajax({
|
||||
type: 'GET',
|
||||
url: getUrl,
|
||||
dataType: 'jsonp',
|
||||
dataType: 'json',
|
||||
data: request,
|
||||
jsonp: 'callback'
|
||||
jsonp: false
|
||||
});
|
||||
}
|
||||
function getSnippets(){
|
||||
|
@ -350,6 +350,15 @@ class ComponentbuilderModelJoomla_components extends JModelList
|
||||
{
|
||||
$this->setData('custom_code', array_values($this->smartIDs['custom_code']), 'id');
|
||||
}
|
||||
// set limiter
|
||||
$limit = 0;
|
||||
// and add those custom codes found in custom codes
|
||||
while (isset($this->smartIDs['custom_code']) && ComponentbuilderHelper::checkArray($this->smartIDs['custom_code']) && $limit < 100)
|
||||
{
|
||||
$this->setData('custom_code', array_values($this->smartIDs['custom_code']), 'id');
|
||||
// make sure we break
|
||||
$limit++; // just in case (should not be needed)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -604,6 +613,10 @@ class ComponentbuilderModelJoomla_components extends JModelList
|
||||
{
|
||||
$this->smartIDs['layout'] = array();
|
||||
}
|
||||
elseif ('custom_code' === $table && 'id' === $key)
|
||||
{
|
||||
$this->smartIDs['custom_code'] = array();
|
||||
}
|
||||
// start loading the data
|
||||
if (!isset($this->smartBox[$table]))
|
||||
{
|
||||
|
@ -37,6 +37,8 @@ class ComponentbuilderViewAdmin_views extends JViewLegacy
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$this->listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$this->saveOrder = $this->listOrder == 'ordering';
|
||||
// set the return here value
|
||||
$this->return_here = urlencode(base64_encode((string) JUri::getInstance()));
|
||||
// get global action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('admin_view');
|
||||
$this->canEdit = $this->canDo->get('admin_view.edit');
|
||||
|
@ -37,6 +37,8 @@ class ComponentbuilderViewAdmins_custom_tabs extends JViewLegacy
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$this->listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$this->saveOrder = $this->listOrder == 'ordering';
|
||||
// set the return here value
|
||||
$this->return_here = urlencode(base64_encode((string) JUri::getInstance()));
|
||||
// get global action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('admin_custom_tabs');
|
||||
$this->canEdit = $this->canDo->get('admin_custom_tabs.edit');
|
||||
|
@ -37,6 +37,8 @@ class ComponentbuilderViewAdmins_fields extends JViewLegacy
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$this->listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$this->saveOrder = $this->listOrder == 'ordering';
|
||||
// set the return here value
|
||||
$this->return_here = urlencode(base64_encode((string) JUri::getInstance()));
|
||||
// get global action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('admin_fields');
|
||||
$this->canEdit = $this->canDo->get('admin_fields.edit');
|
||||
|
@ -37,6 +37,8 @@ class ComponentbuilderViewAdmins_fields_conditions extends JViewLegacy
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$this->listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$this->saveOrder = $this->listOrder == 'ordering';
|
||||
// set the return here value
|
||||
$this->return_here = urlencode(base64_encode((string) JUri::getInstance()));
|
||||
// get global action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('admin_fields_conditions');
|
||||
$this->canEdit = $this->canDo->get('admin_fields_conditions.edit');
|
||||
|
@ -37,6 +37,8 @@ class ComponentbuilderViewAdmins_fields_relations extends JViewLegacy
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$this->listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$this->saveOrder = $this->listOrder == 'ordering';
|
||||
// set the return here value
|
||||
$this->return_here = urlencode(base64_encode((string) JUri::getInstance()));
|
||||
// get global action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('admin_fields_relations');
|
||||
$this->canEdit = $this->canDo->get('admin_fields_relations.edit');
|
||||
|
@ -37,6 +37,8 @@ class ComponentbuilderViewComponents_admin_views extends JViewLegacy
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$this->listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$this->saveOrder = $this->listOrder == 'ordering';
|
||||
// set the return here value
|
||||
$this->return_here = urlencode(base64_encode((string) JUri::getInstance()));
|
||||
// get global action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('component_admin_views');
|
||||
$this->canEdit = $this->canDo->get('component_admin_views.edit');
|
||||
|
@ -37,6 +37,8 @@ class ComponentbuilderViewComponents_config extends JViewLegacy
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$this->listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$this->saveOrder = $this->listOrder == 'ordering';
|
||||
// set the return here value
|
||||
$this->return_here = urlencode(base64_encode((string) JUri::getInstance()));
|
||||
// get global action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('component_config');
|
||||
$this->canEdit = $this->canDo->get('component_config.edit');
|
||||
|
@ -37,6 +37,8 @@ class ComponentbuilderViewComponents_custom_admin_menus extends JViewLegacy
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$this->listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$this->saveOrder = $this->listOrder == 'ordering';
|
||||
// set the return here value
|
||||
$this->return_here = urlencode(base64_encode((string) JUri::getInstance()));
|
||||
// get global action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('component_custom_admin_menus');
|
||||
$this->canEdit = $this->canDo->get('component_custom_admin_menus.edit');
|
||||
|
@ -37,6 +37,8 @@ class ComponentbuilderViewComponents_custom_admin_views extends JViewLegacy
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$this->listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$this->saveOrder = $this->listOrder == 'ordering';
|
||||
// set the return here value
|
||||
$this->return_here = urlencode(base64_encode((string) JUri::getInstance()));
|
||||
// get global action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('component_custom_admin_views');
|
||||
$this->canEdit = $this->canDo->get('component_custom_admin_views.edit');
|
||||
|
@ -37,6 +37,8 @@ class ComponentbuilderViewComponents_dashboard extends JViewLegacy
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$this->listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$this->saveOrder = $this->listOrder == 'ordering';
|
||||
// set the return here value
|
||||
$this->return_here = urlencode(base64_encode((string) JUri::getInstance()));
|
||||
// get global action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('component_dashboard');
|
||||
$this->canEdit = $this->canDo->get('component_dashboard.edit');
|
||||
|
@ -37,6 +37,8 @@ class ComponentbuilderViewComponents_files_folders extends JViewLegacy
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$this->listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$this->saveOrder = $this->listOrder == 'ordering';
|
||||
// set the return here value
|
||||
$this->return_here = urlencode(base64_encode((string) JUri::getInstance()));
|
||||
// get global action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('component_files_folders');
|
||||
$this->canEdit = $this->canDo->get('component_files_folders.edit');
|
||||
|
@ -37,6 +37,8 @@ class ComponentbuilderViewComponents_mysql_tweaks extends JViewLegacy
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$this->listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$this->saveOrder = $this->listOrder == 'ordering';
|
||||
// set the return here value
|
||||
$this->return_here = urlencode(base64_encode((string) JUri::getInstance()));
|
||||
// get global action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('component_mysql_tweaks');
|
||||
$this->canEdit = $this->canDo->get('component_mysql_tweaks.edit');
|
||||
|
@ -37,6 +37,8 @@ class ComponentbuilderViewComponents_site_views extends JViewLegacy
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$this->listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$this->saveOrder = $this->listOrder == 'ordering';
|
||||
// set the return here value
|
||||
$this->return_here = urlencode(base64_encode((string) JUri::getInstance()));
|
||||
// get global action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('component_site_views');
|
||||
$this->canEdit = $this->canDo->get('component_site_views.edit');
|
||||
|
@ -37,6 +37,8 @@ class ComponentbuilderViewComponents_updates extends JViewLegacy
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$this->listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$this->saveOrder = $this->listOrder == 'ordering';
|
||||
// set the return here value
|
||||
$this->return_here = urlencode(base64_encode((string) JUri::getInstance()));
|
||||
// get global action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('component_updates');
|
||||
$this->canEdit = $this->canDo->get('component_updates.edit');
|
||||
|
@ -97,7 +97,7 @@ $edit = "index.php?option=com_componentbuilder&view=custom_admin_views&task=cust
|
||||
<td class="nowrap">
|
||||
<div class="name">
|
||||
<?php if ($this->user->authorise('dynamic_get.edit', 'com_componentbuilder.dynamic_get.' . (int)$item->main_get)): ?>
|
||||
<a href="index.php?option=com_componentbuilder&view=dynamic_gets&task=dynamic_get.edit&id=<?php echo $item->main_get; ?>&ref=custom_admin_views"><?php echo $this->escape($item->main_get_name); ?></a>
|
||||
<a href="index.php?option=com_componentbuilder&view=dynamic_gets&task=dynamic_get.edit&id=<?php echo $item->main_get; ?>&return=<?php echo $this->return_here; ?>"><?php echo $this->escape($item->main_get_name); ?></a>
|
||||
<?php else: ?>
|
||||
<?php echo $this->escape($item->main_get_name); ?>
|
||||
<?php endif; ?>
|
||||
|
@ -37,6 +37,8 @@ class ComponentbuilderViewCustom_admin_views extends JViewLegacy
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$this->listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$this->saveOrder = $this->listOrder == 'ordering';
|
||||
// set the return here value
|
||||
$this->return_here = urlencode(base64_encode((string) JUri::getInstance()));
|
||||
// get global action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('custom_admin_view');
|
||||
$this->canEdit = $this->canDo->get('core.edit');
|
||||
|
@ -37,6 +37,8 @@ class ComponentbuilderViewCustom_codes extends JViewLegacy
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$this->listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$this->saveOrder = $this->listOrder == 'ordering';
|
||||
// set the return here value
|
||||
$this->return_here = urlencode(base64_encode((string) JUri::getInstance()));
|
||||
// get global action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('custom_code');
|
||||
$this->canEdit = $this->canDo->get('custom_code.edit');
|
||||
|
@ -37,6 +37,8 @@ class ComponentbuilderViewDynamic_gets extends JViewLegacy
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$this->listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$this->saveOrder = $this->listOrder == 'ordering';
|
||||
// set the return here value
|
||||
$this->return_here = urlencode(base64_encode((string) JUri::getInstance()));
|
||||
// get global action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('dynamic_get');
|
||||
$this->canEdit = $this->canDo->get('dynamic_get.edit');
|
||||
|
@ -75,7 +75,7 @@ $edit = "index.php?option=com_componentbuilder&view=fields&task=field.edit";
|
||||
<td class="nowrap">
|
||||
<div class="name">
|
||||
<?php if ($this->user->authorise('fieldtype.edit', 'com_componentbuilder.fieldtype.' . (int)$item->fieldtype)): ?>
|
||||
<a href="index.php?option=com_componentbuilder&view=fieldtypes&task=fieldtype.edit&id=<?php echo $item->fieldtype; ?>&ref=fields"><?php echo $this->escape($item->fieldtype_name); ?></a>
|
||||
<a href="index.php?option=com_componentbuilder&view=fieldtypes&task=fieldtype.edit&id=<?php echo $item->fieldtype; ?>&return=<?php echo $this->return_here; ?>"><?php echo $this->escape($item->fieldtype_name); ?></a>
|
||||
<?php else: ?>
|
||||
<?php echo $this->escape($item->fieldtype_name); ?>
|
||||
<?php endif; ?>
|
||||
|
@ -37,6 +37,8 @@ class ComponentbuilderViewFields extends JViewLegacy
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$this->listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$this->saveOrder = $this->listOrder == 'ordering';
|
||||
// set the return here value
|
||||
$this->return_here = urlencode(base64_encode((string) JUri::getInstance()));
|
||||
// get global action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('field');
|
||||
$this->canEdit = $this->canDo->get('field.edit');
|
||||
|
@ -37,6 +37,8 @@ class ComponentbuilderViewFieldtypes extends JViewLegacy
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$this->listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$this->saveOrder = $this->listOrder == 'ordering';
|
||||
// set the return here value
|
||||
$this->return_here = urlencode(base64_encode((string) JUri::getInstance()));
|
||||
// get global action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('fieldtype');
|
||||
$this->canEdit = $this->canDo->get('fieldtype.edit');
|
||||
|
@ -37,6 +37,8 @@ class ComponentbuilderViewHelp_documents extends JViewLegacy
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$this->listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$this->saveOrder = $this->listOrder == 'ordering';
|
||||
// set the return here value
|
||||
$this->return_here = urlencode(base64_encode((string) JUri::getInstance()));
|
||||
// get global action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('help_document');
|
||||
$this->canEdit = $this->canDo->get('help_document.edit');
|
||||
|
@ -37,6 +37,8 @@ class ComponentbuilderViewJoomla_components extends JViewLegacy
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$this->listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$this->saveOrder = $this->listOrder == 'ordering';
|
||||
// set the return here value
|
||||
$this->return_here = urlencode(base64_encode((string) JUri::getInstance()));
|
||||
// get global action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('joomla_component');
|
||||
$this->canEdit = $this->canDo->get('joomla_component.edit');
|
||||
|
@ -37,6 +37,8 @@ class ComponentbuilderViewLanguage_translations extends JViewLegacy
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$this->listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$this->saveOrder = $this->listOrder == 'ordering';
|
||||
// set the return here value
|
||||
$this->return_here = urlencode(base64_encode((string) JUri::getInstance()));
|
||||
// get global action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('language_translation');
|
||||
$this->canEdit = $this->canDo->get('language_translation.edit');
|
||||
|
@ -37,6 +37,8 @@ class ComponentbuilderViewLanguages extends JViewLegacy
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$this->listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$this->saveOrder = $this->listOrder == 'ordering';
|
||||
// set the return here value
|
||||
$this->return_here = urlencode(base64_encode((string) JUri::getInstance()));
|
||||
// get global action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('language');
|
||||
$this->canEdit = $this->canDo->get('language.edit');
|
||||
|
@ -85,7 +85,7 @@ $edit = "index.php?option=com_componentbuilder&view=layouts&task=layout.edit";
|
||||
<td class="nowrap">
|
||||
<div class="name">
|
||||
<?php if ($this->user->authorise('dynamic_get.edit', 'com_componentbuilder.dynamic_get.' . (int)$item->dynamic_get)): ?>
|
||||
<a href="index.php?option=com_componentbuilder&view=dynamic_gets&task=dynamic_get.edit&id=<?php echo $item->dynamic_get; ?>&ref=layouts"><?php echo $this->escape($item->dynamic_get_name); ?></a>
|
||||
<a href="index.php?option=com_componentbuilder&view=dynamic_gets&task=dynamic_get.edit&id=<?php echo $item->dynamic_get; ?>&return=<?php echo $this->return_here; ?>"><?php echo $this->escape($item->dynamic_get_name); ?></a>
|
||||
<?php else: ?>
|
||||
<?php echo $this->escape($item->dynamic_get_name); ?>
|
||||
<?php endif; ?>
|
||||
|
@ -37,6 +37,8 @@ class ComponentbuilderViewLayouts extends JViewLegacy
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$this->listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$this->saveOrder = $this->listOrder == 'ordering';
|
||||
// set the return here value
|
||||
$this->return_here = urlencode(base64_encode((string) JUri::getInstance()));
|
||||
// get global action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('layout');
|
||||
$this->canEdit = $this->canDo->get('core.edit');
|
||||
|
@ -37,6 +37,8 @@ class ComponentbuilderViewLibraries extends JViewLegacy
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$this->listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$this->saveOrder = $this->listOrder == 'ordering';
|
||||
// set the return here value
|
||||
$this->return_here = urlencode(base64_encode((string) JUri::getInstance()));
|
||||
// get global action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('library');
|
||||
$this->canEdit = $this->canDo->get('library.edit');
|
||||
|
@ -37,6 +37,8 @@ class ComponentbuilderViewLibraries_config extends JViewLegacy
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$this->listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$this->saveOrder = $this->listOrder == 'ordering';
|
||||
// set the return here value
|
||||
$this->return_here = urlencode(base64_encode((string) JUri::getInstance()));
|
||||
// get global action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('library_config');
|
||||
$this->canEdit = $this->canDo->get('library_config.edit');
|
||||
|
@ -37,6 +37,8 @@ class ComponentbuilderViewLibraries_files_folders_urls extends JViewLegacy
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$this->listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$this->saveOrder = $this->listOrder == 'ordering';
|
||||
// set the return here value
|
||||
$this->return_here = urlencode(base64_encode((string) JUri::getInstance()));
|
||||
// get global action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('library_files_folders_urls');
|
||||
$this->canEdit = $this->canDo->get('library_files_folders_urls.edit');
|
||||
|
@ -37,6 +37,8 @@ class ComponentbuilderViewServers extends JViewLegacy
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$this->listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$this->saveOrder = $this->listOrder == 'ordering';
|
||||
// set the return here value
|
||||
$this->return_here = urlencode(base64_encode((string) JUri::getInstance()));
|
||||
// get global action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('server');
|
||||
$this->canEdit = $this->canDo->get('server.edit');
|
||||
|
@ -97,7 +97,7 @@ $edit = "index.php?option=com_componentbuilder&view=site_views&task=site_view.ed
|
||||
<td class="nowrap">
|
||||
<div class="name">
|
||||
<?php if ($this->user->authorise('dynamic_get.edit', 'com_componentbuilder.dynamic_get.' . (int)$item->main_get)): ?>
|
||||
<a href="index.php?option=com_componentbuilder&view=dynamic_gets&task=dynamic_get.edit&id=<?php echo $item->main_get; ?>&ref=site_views"><?php echo $this->escape($item->main_get_name); ?></a>
|
||||
<a href="index.php?option=com_componentbuilder&view=dynamic_gets&task=dynamic_get.edit&id=<?php echo $item->main_get; ?>&return=<?php echo $this->return_here; ?>"><?php echo $this->escape($item->main_get_name); ?></a>
|
||||
<?php else: ?>
|
||||
<?php echo $this->escape($item->main_get_name); ?>
|
||||
<?php endif; ?>
|
||||
|
@ -37,6 +37,8 @@ class ComponentbuilderViewSite_views extends JViewLegacy
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$this->listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$this->saveOrder = $this->listOrder == 'ordering';
|
||||
// set the return here value
|
||||
$this->return_here = urlencode(base64_encode((string) JUri::getInstance()));
|
||||
// get global action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('site_view');
|
||||
$this->canEdit = $this->canDo->get('core.edit');
|
||||
|
@ -37,6 +37,8 @@ class ComponentbuilderViewSnippet_types extends JViewLegacy
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$this->listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$this->saveOrder = $this->listOrder == 'ordering';
|
||||
// set the return here value
|
||||
$this->return_here = urlencode(base64_encode((string) JUri::getInstance()));
|
||||
// get global action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('snippet_type');
|
||||
$this->canEdit = $this->canDo->get('snippet_type.edit');
|
||||
|
@ -84,7 +84,7 @@ $edit = "index.php?option=com_componentbuilder&view=snippets&task=snippet.edit";
|
||||
<td class="nowrap">
|
||||
<div class="name">
|
||||
<?php if ($this->user->authorise('library.edit', 'com_componentbuilder.library.' . (int)$item->library)): ?>
|
||||
<a href="index.php?option=com_componentbuilder&view=libraries&task=library.edit&id=<?php echo $item->library; ?>&ref=snippets"><?php echo $this->escape($item->library_name); ?></a>
|
||||
<a href="index.php?option=com_componentbuilder&view=libraries&task=library.edit&id=<?php echo $item->library; ?>&return=<?php echo $this->return_here; ?>"><?php echo $this->escape($item->library_name); ?></a>
|
||||
<?php else: ?>
|
||||
<?php echo $this->escape($item->library_name); ?>
|
||||
<?php endif; ?>
|
||||
|
@ -37,6 +37,8 @@ class ComponentbuilderViewSnippets extends JViewLegacy
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$this->listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$this->saveOrder = $this->listOrder == 'ordering';
|
||||
// set the return here value
|
||||
$this->return_here = urlencode(base64_encode((string) JUri::getInstance()));
|
||||
// get global action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('snippet');
|
||||
$this->canEdit = $this->canDo->get('core.edit');
|
||||
|
@ -85,7 +85,7 @@ $edit = "index.php?option=com_componentbuilder&view=templates&task=template.edit
|
||||
<td class="nowrap">
|
||||
<div class="name">
|
||||
<?php if ($this->user->authorise('dynamic_get.edit', 'com_componentbuilder.dynamic_get.' . (int)$item->dynamic_get)): ?>
|
||||
<a href="index.php?option=com_componentbuilder&view=dynamic_gets&task=dynamic_get.edit&id=<?php echo $item->dynamic_get; ?>&ref=templates"><?php echo $this->escape($item->dynamic_get_name); ?></a>
|
||||
<a href="index.php?option=com_componentbuilder&view=dynamic_gets&task=dynamic_get.edit&id=<?php echo $item->dynamic_get; ?>&return=<?php echo $this->return_here; ?>"><?php echo $this->escape($item->dynamic_get_name); ?></a>
|
||||
<?php else: ?>
|
||||
<?php echo $this->escape($item->dynamic_get_name); ?>
|
||||
<?php endif; ?>
|
||||
|
@ -37,6 +37,8 @@ class ComponentbuilderViewTemplates extends JViewLegacy
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$this->listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$this->saveOrder = $this->listOrder == 'ordering';
|
||||
// set the return here value
|
||||
$this->return_here = urlencode(base64_encode((string) JUri::getInstance()));
|
||||
// get global action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('template');
|
||||
$this->canEdit = $this->canDo->get('core.edit');
|
||||
|
@ -37,6 +37,8 @@ class ComponentbuilderViewValidation_rules extends JViewLegacy
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$this->listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$this->saveOrder = $this->listOrder == 'ordering';
|
||||
// set the return here value
|
||||
$this->return_here = urlencode(base64_encode((string) JUri::getInstance()));
|
||||
// get global action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('validation_rule');
|
||||
$this->canEdit = $this->canDo->get('validation_rule.edit');
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<extension type="component" version="3.2" method="upgrade">
|
||||
<name>COM_COMPONENTBUILDER</name>
|
||||
<creationDate>19th December, 2018</creationDate>
|
||||
<creationDate>29th December, 2018</creationDate>
|
||||
<author>Llewellyn van der Merwe</author>
|
||||
<authorEmail>llewellyn@joomlacomponentbuilder.com</authorEmail>
|
||||
<authorUrl>http://www.joomlacomponentbuilder.com</authorUrl>
|
||||
|
@ -2356,11 +2356,12 @@ abstract class ComponentbuilderHelper
|
||||
*
|
||||
* @param string $data The base64 string
|
||||
* @param string $key We store the string with that suffix :)
|
||||
* @param string $default The default switch
|
||||
*
|
||||
* @return string The opened string
|
||||
*
|
||||
*/
|
||||
public static function openValidBase64($data, $key = '__.o0=base64=Oo.__')
|
||||
public static function openValidBase64($data, $key = '__.o0=base64=Oo.__', $default = 'string')
|
||||
{
|
||||
// check that we have a string
|
||||
if (self::checkString($data))
|
||||
@ -2379,8 +2380,13 @@ abstract class ComponentbuilderHelper
|
||||
return base64_decode($data);
|
||||
}
|
||||
}
|
||||
// check if we should just return the string
|
||||
if ('string' === $default)
|
||||
{
|
||||
return $data;
|
||||
}
|
||||
return $default;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
|
@ -36,7 +36,9 @@ abstract class ComponentbuilderHelperRoute
|
||||
else
|
||||
{
|
||||
// Initialize the needel array.
|
||||
$needles = array();
|
||||
$needles = array(
|
||||
'api' => array()
|
||||
);
|
||||
// Create the link but don't add the id.
|
||||
$link = 'index.php?option=com_componentbuilder&view=api';
|
||||
}
|
||||
@ -195,6 +197,10 @@ abstract class ComponentbuilderHelperRoute
|
||||
self::$lookup[$language][$view][$item->query['id']] = $item->id;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
self::$lookup[$language][$view][0] = $item->id;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -204,6 +210,8 @@ abstract class ComponentbuilderHelperRoute
|
||||
foreach ($needles as $view => $ids)
|
||||
{
|
||||
if (isset(self::$lookup[$language][$view]))
|
||||
{
|
||||
if (ComponentbuilderHelper::checkArray($ids))
|
||||
{
|
||||
foreach ($ids as $id)
|
||||
{
|
||||
@ -213,6 +221,11 @@ abstract class ComponentbuilderHelperRoute
|
||||
}
|
||||
}
|
||||
}
|
||||
elseif (isset(self::$lookup[$language][$view][0]))
|
||||
{
|
||||
return self::$lookup[$language][$view][0];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user