Continued formatting of JCB code

This commit is contained in:
Llewellyn van der Merwe 2017-12-15 03:10:10 +02:00
parent 8ac350e62b
commit e44b6bc272
No known key found for this signature in database
GPG Key ID: CAD7B16D27AF28C5
91 changed files with 1516 additions and 1518 deletions

View File

@ -115,7 +115,7 @@ Component Builder is mapped as a component in itself on my local development env
+ *Version*: 2.6.7 + *Version*: 2.6.7
+ *Copyright*: Copyright (C) 2015. All Rights Reserved + *Copyright*: Copyright (C) 2015. All Rights Reserved
+ *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
+ *Line count*: **178243** + *Line count*: **178242**
+ *File count*: **1145** + *File count*: **1145**
+ *Folder count*: **184** + *Folder count*: **184**

View File

@ -115,7 +115,7 @@ Component Builder is mapped as a component in itself on my local development env
+ *Version*: 2.6.7 + *Version*: 2.6.7
+ *Copyright*: Copyright (C) 2015. All Rights Reserved + *Copyright*: Copyright (C) 2015. All Rights Reserved
+ *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
+ *Line count*: **178243** + *Line count*: **178242**
+ *File count*: **1145** + *File count*: **1145**
+ *Folder count*: **184** + *Folder count*: **184**

View File

@ -191,7 +191,6 @@ abstract class ###Component###Email
// load the bounce email as sender if set // load the bounce email as sender if set
if (!is_null($bounce_email)) if (!is_null($bounce_email))
{ {
$mail->Sender = $bounce_email; $mail->Sender = $bounce_email;
} }

View File

@ -2897,17 +2897,17 @@ class Interpretation extends Fields
{ {
// for single views // for single views
$method .= PHP_EOL . "\t\t//" . $this->setLine(__LINE__) . " Initialise variables."; $method .= PHP_EOL . "\t\t//" . $this->setLine(__LINE__) . " Initialise variables.";
$method .= PHP_EOL . "\t\t\$this->item\t= \$this->get('Item');"; $method .= PHP_EOL . "\t\t\$this->item = \$this->get('Item');";
} }
elseif ($view['settings']->main_get->gettype == 2) elseif ($view['settings']->main_get->gettype == 2)
{ {
// for list views // for list views
$method .= PHP_EOL . "\t\t//" . $this->setLine(__LINE__) . " Initialise variables."; $method .= PHP_EOL . "\t\t//" . $this->setLine(__LINE__) . " Initialise variables.";
$method .= PHP_EOL . "\t\t\$this->items\t= \$this->get('Items');"; $method .= PHP_EOL . "\t\t\$this->items = \$this->get('Items');";
// only add if pagination is requered // only add if pagination is requered
if ($view['settings']->main_get->pagination == 1) if ($view['settings']->main_get->pagination == 1)
{ {
$method .= PHP_EOL . "\t\t\$this->pagination\t= \$this->get('Pagination');"; $method .= PHP_EOL . "\t\t\$this->pagination = \$this->get('Pagination');";
} }
// add id to list view // add id to list view
if (isset($this->customAdminViewListId[$view['settings']->code])) if (isset($this->customAdminViewListId[$view['settings']->code]))
@ -2927,7 +2927,7 @@ class Interpretation extends Fields
foreach ($view['settings']->custom_get as $custom_get) foreach ($view['settings']->custom_get as $custom_get)
{ {
$custom_get_name = str_replace('get', '', $custom_get->getcustom); $custom_get_name = str_replace('get', '', $custom_get->getcustom);
$method .= PHP_EOL . "\t\t\$this->" . ComponentbuilderHelper::safeString($custom_get_name) . "\t= \$this->get('" . $custom_get_name . "');"; $method .= PHP_EOL . "\t\t\$this->" . ComponentbuilderHelper::safeString($custom_get_name) . " = \$this->get('" . $custom_get_name . "');";
} }
} }
// add custom script // add custom script
@ -7111,7 +7111,7 @@ class Interpretation extends Fields
} }
$this->fileContentDynamic[$viewName_single . '_' . $layoutCodeName]['###LAYOUTITEMSHEADER###'] = $headerscript; $this->fileContentDynamic[$viewName_single . '_' . $layoutCodeName]['###LAYOUTITEMSHEADER###'] = $headerscript;
// ###LINKEDVIEWITEMS### <<<DYNAMIC>>> // ###LINKEDVIEWITEMS### <<<DYNAMIC>>>
$this->fileContentDynamic[$viewName_single]['###LINKEDVIEWITEMS###'] .= PHP_EOL . PHP_EOL . "\t\t//" . $this->setLine(__LINE__) . " Get Linked view data" . PHP_EOL . "\t\t\$this->" . $codeName . "\t\t= \$this->get('" . $functionName . "');"; $this->fileContentDynamic[$viewName_single]['###LINKEDVIEWITEMS###'] .= PHP_EOL . PHP_EOL . "\t\t//" . $this->setLine(__LINE__) . " Get Linked view data" . PHP_EOL . "\t\t\$this->" . $codeName . " = \$this->get('" . $functionName . "');";
// ###LINKEDVIEWTABLESCRIPTS### <<<DYNAMIC>>> // ###LINKEDVIEWTABLESCRIPTS### <<<DYNAMIC>>>
$this->fileContentDynamic[$viewName_single]['###LINKEDVIEWTABLESCRIPTS###'] = $this->setFootableScripts(); $this->fileContentDynamic[$viewName_single]['###LINKEDVIEWTABLESCRIPTS###'] = $this->setFootableScripts();
if (strpos($parentKey, '-R>') !== false || strpos($parentKey, '-A>') !== false) if (strpos($parentKey, '-R>') !== false || strpos($parentKey, '-A>') !== false)
@ -10898,47 +10898,47 @@ class Interpretation extends Fields
// check if the item has permissions for edit. // check if the item has permissions for edit.
if ($coreLoad && isset($core['core.edit']) && isset($this->permissionBuilder['global'][$core['core.edit']]) && ComponentbuilderHelper::checkArray($this->permissionBuilder['global'][$core['core.edit']]) && in_array($viewName_single, $this->permissionBuilder['global'][$core['core.edit']])) if ($coreLoad && isset($core['core.edit']) && isset($this->permissionBuilder['global'][$core['core.edit']]) && ComponentbuilderHelper::checkArray($this->permissionBuilder['global'][$core['core.edit']]) && in_array($viewName_single, $this->permissionBuilder['global'][$core['core.edit']]))
{ {
$allow[] = PHP_EOL . "\t\t\$this->canEdit\t\t= \$this->canDo->get('" . $core['core.edit'] . "');"; $allow[] = PHP_EOL . "\t\t\$this->canEdit = \$this->canDo->get('" . $core['core.edit'] . "');";
} }
else else
{ {
$allow[] = PHP_EOL . "\t\t\$this->canEdit\t\t= \$this->canDo->get('core.edit');"; $allow[] = PHP_EOL . "\t\t\$this->canEdit = \$this->canDo->get('core.edit');";
} }
// check if the item has permissions for edit state. // check if the item has permissions for edit state.
if ($coreLoad && isset($core['core.edit.state']) && isset($this->permissionBuilder['global'][$core['core.edit.state']]) && ComponentbuilderHelper::checkArray($this->permissionBuilder['global'][$core['core.edit.state']]) && in_array($viewName_single, $this->permissionBuilder['global'][$core['core.edit.state']])) if ($coreLoad && isset($core['core.edit.state']) && isset($this->permissionBuilder['global'][$core['core.edit.state']]) && ComponentbuilderHelper::checkArray($this->permissionBuilder['global'][$core['core.edit.state']]) && in_array($viewName_single, $this->permissionBuilder['global'][$core['core.edit.state']]))
{ {
$allow[] = "\t\t\$this->canState\t\t= \$this->canDo->get('" . $core['core.edit.state'] . "');"; $allow[] = "\t\t\$this->canState = \$this->canDo->get('" . $core['core.edit.state'] . "');";
} }
else else
{ {
$allow[] = "\t\t\$this->canState\t\t= \$this->canDo->get('core.edit.state');"; $allow[] = "\t\t\$this->canState = \$this->canDo->get('core.edit.state');";
} }
// check if the item has permissions for create. // check if the item has permissions for create.
if ($coreLoad && isset($core['core.create']) && isset($this->permissionBuilder['global'][$core['core.create']]) && ComponentbuilderHelper::checkArray($this->permissionBuilder['global'][$core['core.create']]) && in_array($viewName_single, $this->permissionBuilder['global'][$core['core.create']])) if ($coreLoad && isset($core['core.create']) && isset($this->permissionBuilder['global'][$core['core.create']]) && ComponentbuilderHelper::checkArray($this->permissionBuilder['global'][$core['core.create']]) && in_array($viewName_single, $this->permissionBuilder['global'][$core['core.create']]))
{ {
$allow[] = "\t\t\$this->canCreate\t= \$this->canDo->get('" . $core['core.create'] . "');"; $allow[] = "\t\t\$this->canCreate = \$this->canDo->get('" . $core['core.create'] . "');";
} }
else else
{ {
$allow[] = "\t\t\$this->canCreate\t= \$this->canDo->get('core.create');"; $allow[] = "\t\t\$this->canCreate = \$this->canDo->get('core.create');";
} }
// check if the item has permissions for delete. // check if the item has permissions for delete.
if ($coreLoad && isset($core['core.delete']) && isset($this->permissionBuilder['global'][$core['core.delete']]) && ComponentbuilderHelper::checkArray($this->permissionBuilder['global'][$core['core.delete']]) && in_array($viewName_single, $this->permissionBuilder['global'][$core['core.delete']])) if ($coreLoad && isset($core['core.delete']) && isset($this->permissionBuilder['global'][$core['core.delete']]) && ComponentbuilderHelper::checkArray($this->permissionBuilder['global'][$core['core.delete']]) && in_array($viewName_single, $this->permissionBuilder['global'][$core['core.delete']]))
{ {
$allow[] = "\t\t\$this->canDelete\t= \$this->canDo->get('" . $core['core.delete'] . "');"; $allow[] = "\t\t\$this->canDelete = \$this->canDo->get('" . $core['core.delete'] . "');";
} }
else else
{ {
$allow[] = "\t\t\$this->canDelete\t= \$this->canDo->get('core.delete');"; $allow[] = "\t\t\$this->canDelete = \$this->canDo->get('core.delete');";
} }
// check if the item has permissions for batch. // check if the item has permissions for batch.
if ($coreLoad && isset($core['core.batch']) && isset($this->permissionBuilder['global']['global'][$core['core.batch']]) && ComponentbuilderHelper::checkArray($this->permissionBuilder['global']['global'][$core['core.batch']]) && in_array($viewName_single, $this->permissionBuilder['global']['global'][$core['core.delete']])) if ($coreLoad && isset($core['core.batch']) && isset($this->permissionBuilder['global']['global'][$core['core.batch']]) && ComponentbuilderHelper::checkArray($this->permissionBuilder['global']['global'][$core['core.batch']]) && in_array($viewName_single, $this->permissionBuilder['global']['global'][$core['core.delete']]))
{ {
$allow[] = "\t\t\$this->canBatch\t= (\$this->canDo->get('" . $core['core.batch'] . "') && \$this->canDo->get('core.batch'));"; $allow[] = "\t\t\$this->canBatch = (\$this->canDo->get('" . $core['core.batch'] . "') && \$this->canDo->get('core.batch'));";
} }
else else
{ {
$allow[] = "\t\t\$this->canBatch\t= \$this->canDo->get('core.batch');"; $allow[] = "\t\t\$this->canBatch = \$this->canDo->get('core.batch');";
} }
return implode(PHP_EOL, $allow); return implode(PHP_EOL, $allow);

View File

@ -188,7 +188,6 @@ abstract class ComponentbuilderEmail
// load the bounce email as sender if set // load the bounce email as sender if set
if (!is_null($bounce_email)) if (!is_null($bounce_email))
{ {
$mail->Sender = $bounce_email; $mail->Sender = $bounce_email;
} }