fixed copy error and undeclared variable in ajax.php
This commit is contained in:
parent
f15b67cff1
commit
18946f8ef6
@ -114,7 +114,7 @@ Component Builder is mapped as a component in itself on my local development env
|
||||
+ *Version*: 2.5.9
|
||||
+ *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*: **160841**
|
||||
+ *Line count*: **160810**
|
||||
+ *File count*: **1000**
|
||||
+ *Folder count*: **165**
|
||||
|
||||
|
@ -114,7 +114,7 @@ Component Builder is mapped as a component in itself on my local development env
|
||||
+ *Version*: 2.5.9
|
||||
+ *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*: **160841**
|
||||
+ *Line count*: **160810**
|
||||
+ *File count*: **1000**
|
||||
+ *Folder count*: **165**
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version @update number 228 of this MVC
|
||||
@version @update number 229 of this MVC
|
||||
@build 26th October, 2017
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
|
@ -9,7 +9,7 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version @update number 228 of this MVC
|
||||
@version @update number 229 of this MVC
|
||||
@build 26th October, 2017
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
|
@ -10,7 +10,7 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version @update number 228 of this MVC
|
||||
@version @update number 229 of this MVC
|
||||
@build 26th October, 2017
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
|
@ -10,7 +10,7 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version @update number 228 of this MVC
|
||||
@version @update number 229 of this MVC
|
||||
@build 26th October, 2017
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
|
@ -1270,7 +1270,7 @@ class Get
|
||||
// if Details tab is not set, then set it here
|
||||
if (!isset($view->tabs[1]))
|
||||
{
|
||||
$view->tabs[1] = 'details';
|
||||
$view->tabs[1] = 'Details';
|
||||
}
|
||||
// always make sure that publishing is lowercase
|
||||
if (($removeKey = array_search('publishing', array_map('strtolower', $view->tabs))) !== false)
|
||||
|
@ -42,7 +42,7 @@ abstract class ComponentbuilderHelper
|
||||
}
|
||||
|
||||
/**
|
||||
* Copy Any Item
|
||||
* Copy Any Item (only use for direct database copying)
|
||||
*
|
||||
* @param int $id The item to copy
|
||||
* @param string $table The table and model to copy from and with
|
||||
@ -95,41 +95,8 @@ abstract class ComponentbuilderHelper
|
||||
unset($data['asset_id']);
|
||||
unset($data['checked_out']);
|
||||
unset($data['checked_out_time']);
|
||||
// get the form
|
||||
$form = $model->getForm($data, false);
|
||||
// make sure we have the form
|
||||
if (!$form)
|
||||
{
|
||||
$app->enqueueMessage($model->getError(), 'error');
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
// Test whether the data is valid.
|
||||
$validData = $model->validate($form, $data);
|
||||
|
||||
// Check for validation errors.
|
||||
if ($validData === false)
|
||||
{
|
||||
// Get the validation messages.
|
||||
$errors = $model->getErrors();
|
||||
|
||||
// Push up to three validation messages out to the user.
|
||||
for ($i = 0, $n = count($errors); $i < $n && $i < 3; $i++)
|
||||
{
|
||||
if ($errors[$i] instanceof \Exception)
|
||||
{
|
||||
$app->enqueueMessage($errors[$i]->getMessage(), 'warning');
|
||||
}
|
||||
else
|
||||
{
|
||||
$app->enqueueMessage($errors[$i], 'warning');
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
// Attempt to save the data.
|
||||
if ($model->save($validData))
|
||||
if ($model->save($data))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@ -411,7 +378,8 @@ abstract class ComponentbuilderHelper
|
||||
return $indenter->indent($html);
|
||||
}
|
||||
|
||||
public static function checkFileType($file, $sufix) {
|
||||
public static function checkFileType($file, $sufix)
|
||||
{
|
||||
// now check if the file ends with the sufix
|
||||
return $sufix === "" || ($sufix == substr(strrchr($file, "."), -strlen($sufix)));
|
||||
}
|
||||
@ -513,7 +481,7 @@ abstract class ComponentbuilderHelper
|
||||
'chromestyle','contenttype','databaseconnection','editors','email','file',
|
||||
'filelist','folderlist','groupedlist','hidden','file','headertag','helpsite',
|
||||
'imagelist','integer','language','list','media','menu','note','password',
|
||||
'plugins','range','radio','repeatable','rules','sessionhandler','spacer','sql','tag',
|
||||
'plugins','range','radio','repeatable','rules','subform','sessionhandler','spacer','sql','tag',
|
||||
'tel','menuitem','modulelayout','meter','moduleorder','moduleposition','moduletag',
|
||||
'templatestyle','text','textarea','timezone','url','user','usergroup'
|
||||
),
|
||||
|
@ -10,7 +10,7 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version @update number 228 of this MVC
|
||||
@version @update number 229 of this MVC
|
||||
@build 26th October, 2017
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
|
@ -10,7 +10,7 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version @update number 228 of this MVC
|
||||
@version @update number 229 of this MVC
|
||||
@build 26th October, 2017
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
|
@ -617,7 +617,7 @@ class ComponentbuilderModelAjax extends JModelList
|
||||
$this->customadminviewNames[$view] = JText::_('COM_COMPONENTBUILDER_NO_CUSTOM_ADMIN_VIEW_FOUND');
|
||||
}
|
||||
}
|
||||
$bucket[] = $this->customadminviewNames[$view] . $this->addEditLink($value, 'custom_admin_view', 'custom_admin_views');
|
||||
$bucket[] = $this->customadminviewNames[$view] . $this->addEditLink($view, 'custom_admin_view', 'custom_admin_views');
|
||||
}
|
||||
}
|
||||
elseif (is_numeric($value))
|
||||
@ -655,7 +655,7 @@ class ComponentbuilderModelAjax extends JModelList
|
||||
$this->adminviewNames[$view] = JText::_('COM_COMPONENTBUILDER_NO_ADMIN_VIEW_FOUND');
|
||||
}
|
||||
}
|
||||
$bucket[] = $this->adminviewNames[$view] . $this->addEditLink($value, 'admin_view', 'admin_views');
|
||||
$bucket[] = $this->adminviewNames[$view] . $this->addEditLink($view, 'admin_view', 'admin_views');
|
||||
}
|
||||
}
|
||||
elseif (is_numeric($value))
|
||||
@ -693,7 +693,7 @@ class ComponentbuilderModelAjax extends JModelList
|
||||
$this->siteviewNames[$view] = JText::_('COM_COMPONENTBUILDER_NO_SITE_VIEW_FOUND');
|
||||
}
|
||||
}
|
||||
$bucket[] = $this->siteviewNames[$view] . $this->addEditLink($value, 'site_view', 'site_views');
|
||||
$bucket[] = $this->siteviewNames[$view] . $this->addEditLink($view, 'site_view', 'site_views');
|
||||
}
|
||||
}
|
||||
elseif (is_numeric($value))
|
||||
|
@ -9,7 +9,7 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version @update number 228 of this MVC
|
||||
@version @update number 229 of this MVC
|
||||
@build 26th October, 2017
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
|
@ -10,7 +10,7 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version @update number 228 of this MVC
|
||||
@version @update number 229 of this MVC
|
||||
@build 26th October, 2017
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
|
@ -9,7 +9,7 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version @update number 228 of this MVC
|
||||
@version @update number 229 of this MVC
|
||||
@build 26th October, 2017
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
|
@ -10,7 +10,7 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version @update number 228 of this MVC
|
||||
@version @update number 229 of this MVC
|
||||
@build 26th October, 2017
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
|
@ -10,7 +10,7 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version @update number 228 of this MVC
|
||||
@version @update number 229 of this MVC
|
||||
@build 26th October, 2017
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
|
@ -10,7 +10,7 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version @update number 228 of this MVC
|
||||
@version @update number 229 of this MVC
|
||||
@build 26th October, 2017
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
|
@ -10,7 +10,7 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version @update number 228 of this MVC
|
||||
@version @update number 229 of this MVC
|
||||
@build 26th October, 2017
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
|
@ -10,7 +10,7 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version @update number 228 of this MVC
|
||||
@version @update number 229 of this MVC
|
||||
@build 26th October, 2017
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
|
@ -10,7 +10,7 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version @update number 228 of this MVC
|
||||
@version @update number 229 of this MVC
|
||||
@build 26th October, 2017
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
|
@ -10,7 +10,7 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version @update number 228 of this MVC
|
||||
@version @update number 229 of this MVC
|
||||
@build 26th October, 2017
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
|
@ -10,7 +10,7 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version @update number 228 of this MVC
|
||||
@version @update number 229 of this MVC
|
||||
@build 26th October, 2017
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
|
@ -10,7 +10,7 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version @update number 228 of this MVC
|
||||
@version @update number 229 of this MVC
|
||||
@build 26th October, 2017
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
|
@ -10,7 +10,7 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version @update number 228 of this MVC
|
||||
@version @update number 229 of this MVC
|
||||
@build 26th October, 2017
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
|
@ -305,7 +305,8 @@ abstract class ComponentbuilderHelper
|
||||
return $indenter->indent($html);
|
||||
}
|
||||
|
||||
public static function checkFileType($file, $sufix) {
|
||||
public static function checkFileType($file, $sufix)
|
||||
{
|
||||
// now check if the file ends with the sufix
|
||||
return $sufix === "" || ($sufix == substr(strrchr($file, "."), -strlen($sufix)));
|
||||
}
|
||||
@ -407,7 +408,7 @@ abstract class ComponentbuilderHelper
|
||||
'chromestyle','contenttype','databaseconnection','editors','email','file',
|
||||
'filelist','folderlist','groupedlist','hidden','file','headertag','helpsite',
|
||||
'imagelist','integer','language','list','media','menu','note','password',
|
||||
'plugins','range','radio','repeatable','rules','sessionhandler','spacer','sql','tag',
|
||||
'plugins','range','radio','repeatable','rules','subform','sessionhandler','spacer','sql','tag',
|
||||
'tel','menuitem','modulelayout','meter','moduleorder','moduleposition','moduletag',
|
||||
'templatestyle','text','textarea','timezone','url','user','usergroup'
|
||||
),
|
||||
|
Loading…
Reference in New Issue
Block a user