@@ -23,12 +23,12 @@ |
||
| 23 | 23 | |
| 24 | 24 | |
| 25 | 25 | |
| 26 | -require_once dirname(__FILE__). '/functions.php'; |
|
| 26 | +require_once dirname(__FILE__).'/functions.php'; |
|
| 27 | 27 | |
| 28 | 28 | |
| 29 | 29 | function LibApp_upgrade($sVersionBase, $sVersionIni) |
| 30 | 30 | { |
| 31 | - require_once dirname(__FILE__) . '/app.php'; |
|
| 31 | + require_once dirname(__FILE__).'/app.php'; |
|
| 32 | 32 | Func_App::register(); |
| 33 | 33 | |
| 34 | 34 | $App = app_App(); |
@@ -21,7 +21,7 @@ discard block |
||
| 21 | 21 | * @copyright Copyright (c) 2006 by CANTICO ({@link http://www.cantico.fr}) |
| 22 | 22 | */ |
| 23 | 23 | |
| 24 | -require_once dirname(__FILE__) . '/controller.class.php'; |
|
| 24 | +require_once dirname(__FILE__).'/controller.class.php'; |
|
| 25 | 25 | |
| 26 | 26 | |
| 27 | 27 | |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | { |
| 53 | 53 | $App = $this->App(); |
| 54 | 54 | $recordClassname = $this->getRecordClassName(); |
| 55 | - $recordSetClassname = $recordClassname . 'Set'; |
|
| 55 | + $recordSetClassname = $recordClassname.'Set'; |
|
| 56 | 56 | |
| 57 | 57 | $recordSet = $App->$recordSetClassname(); |
| 58 | 58 | return $recordSet; |
@@ -103,7 +103,7 @@ discard block |
||
| 103 | 103 | if ($showLabel) { |
| 104 | 104 | $text = $actions->getTitle(); |
| 105 | 105 | } |
| 106 | - $html = '<li><a class="icon ' . $actions->getIcon() . '"href="' . $actions->url() . '">' . $text . '</a></li>'; |
|
| 106 | + $html = '<li><a class="icon '.$actions->getIcon().'"href="'.$actions->url().'">'.$text.'</a></li>'; |
|
| 107 | 107 | } elseif (is_array($actions)) { |
| 108 | 108 | if (isset($actions['items'])) { |
| 109 | 109 | $items = $actions['items']; |
@@ -116,10 +116,10 @@ discard block |
||
| 116 | 116 | if (isset($actions['icon'])) { |
| 117 | 117 | |
| 118 | 118 | $html = '<li class="dropdown">' |
| 119 | - . '<a href="#" class="' . $actions['icon'] . ' icon dropdown-toogle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">' |
|
| 119 | + . '<a href="#" class="'.$actions['icon'].' icon dropdown-toogle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">' |
|
| 120 | 120 | . ($actions['icon'] === 'actions-context-menu'/*Func_Icons::ACTIONS_CONTEXT_MENU*/ ? '' : '<span class="caret"></span>') |
| 121 | 121 | . '</a>' |
| 122 | - . '<ul class="dropdown-menu dropdown-menu-right ' . Func_Icons::ICON_LEFT_SYMBOLIC . '">' |
|
| 122 | + . '<ul class="dropdown-menu dropdown-menu-right '.Func_Icons::ICON_LEFT_SYMBOLIC.'">' |
|
| 123 | 123 | . $html |
| 124 | 124 | . '</ul>'; |
| 125 | 125 | } |
@@ -142,7 +142,7 @@ discard block |
||
| 142 | 142 | |
| 143 | 143 | $recordClassname = $this->getRecordClassName(); |
| 144 | 144 | |
| 145 | - $viewClassname = $recordClassname . 'TableView'; |
|
| 145 | + $viewClassname = $recordClassname.'TableView'; |
|
| 146 | 146 | if (method_exists($Ui, $viewClassname)) { |
| 147 | 147 | $types['table'] = array( |
| 148 | 148 | 'classname' => $viewClassname, |
@@ -151,7 +151,7 @@ discard block |
||
| 151 | 151 | ); |
| 152 | 152 | } |
| 153 | 153 | |
| 154 | - $viewClassname = $recordClassname . 'CardsView'; |
|
| 154 | + $viewClassname = $recordClassname.'CardsView'; |
|
| 155 | 155 | if (method_exists($Ui, $viewClassname)) { |
| 156 | 156 | $types['cards'] = array( |
| 157 | 157 | 'classname' => $viewClassname, |
@@ -160,7 +160,7 @@ discard block |
||
| 160 | 160 | ); |
| 161 | 161 | } |
| 162 | 162 | |
| 163 | - $viewClassname = $recordClassname . 'MapView'; |
|
| 163 | + $viewClassname = $recordClassname.'MapView'; |
|
| 164 | 164 | if (method_exists($Ui, $viewClassname)) { |
| 165 | 165 | $types['map'] = array( |
| 166 | 166 | 'classname' => $viewClassname, |
@@ -232,7 +232,7 @@ discard block |
||
| 232 | 232 | foreach ($allViewSections as $viewSection) { |
| 233 | 233 | $fields = $viewSection->getFields(); |
| 234 | 234 | foreach ($fields as $field) { |
| 235 | - $allViewFieldNames[$field['fieldname']] = $viewSection->view . ',' . $viewSection->rank . ',' . $viewSection->id; |
|
| 235 | + $allViewFieldNames[$field['fieldname']] = $viewSection->view.','.$viewSection->rank.','.$viewSection->id; |
|
| 236 | 236 | } |
| 237 | 237 | } |
| 238 | 238 | |
@@ -256,7 +256,7 @@ discard block |
||
| 256 | 256 | bab_Sort::asort($availableFields, 'description', bab_Sort::CASE_INSENSITIVE); |
| 257 | 257 | |
| 258 | 258 | foreach ($availableFields as $field) { |
| 259 | - $fieldName = $field['name']; |
|
| 259 | + $fieldName = $field['name']; |
|
| 260 | 260 | $fieldDescription = $field['description']; |
| 261 | 261 | |
| 262 | 262 | $used = isset($allViewFieldNames[$fieldName]); |
@@ -450,7 +450,7 @@ discard block |
||
| 450 | 450 | $nbCol = 0; |
| 451 | 451 | foreach ($customSections as $customSection) { |
| 452 | 452 | |
| 453 | - list(, , $nbCol) = explode('-', $customSection->sizePolicy); |
|
| 453 | + list(,, $nbCol) = explode('-', $customSection->sizePolicy); |
|
| 454 | 454 | |
| 455 | 455 | // if ($currentColumn + $nbCol > 12) { |
| 456 | 456 | // $sectionsSection->addItem($row); |
@@ -461,8 +461,8 @@ discard block |
||
| 461 | 461 | $currentColumn += $nbCol; |
| 462 | 462 | |
| 463 | 463 | $sectionSection = $W->Section( |
| 464 | - $customSection->name . ' (' . $customSection->rank . ')', |
|
| 465 | - $sectionBox = $W->VBoxItems($W->Hidden()->setName('#' . $customSection->id)) |
|
| 464 | + $customSection->name.' ('.$customSection->rank.')', |
|
| 465 | + $sectionBox = $W->VBoxItems($W->Hidden()->setName('#'.$customSection->id)) |
|
| 466 | 466 | // ->addClass('widget-dockable-content') |
| 467 | 467 | ); |
| 468 | 468 | $sectionSection->addClass('crm-custom-section'); |
@@ -507,16 +507,16 @@ discard block |
||
| 507 | 507 | } |
| 508 | 508 | |
| 509 | 509 | $fieldItem = $W->FlowItems( |
| 510 | - $W->Label($fieldDescription)->setSizePolicy(Func_Icons::ICON_LEFT_16 . ' widget-80pc' ), |
|
| 510 | + $W->Label($fieldDescription)->setSizePolicy(Func_Icons::ICON_LEFT_16.' widget-80pc'), |
|
| 511 | 511 | $W->FlowItems( |
| 512 | - $W->Hidden()->setName($customSection->id . '.' . $fieldId)->setValue($field['name']), |
|
| 512 | + $W->Hidden()->setName($customSection->id.'.'.$fieldId)->setValue($field['name']), |
|
| 513 | 513 | $W->Link('', $this->proxy()->editDisplayField($customSection->id, $field['name'])) |
| 514 | 514 | ->addClass('icon', Func_Icons::ACTIONS_DOCUMENT_EDIT) |
| 515 | 515 | ->setOpenMode(Widget_Link::OPEN_DIALOG), |
| 516 | 516 | $W->Link('', $this->proxy()->removeDisplayField($customSection->id, $field['name'])) |
| 517 | 517 | ->addClass('icon', Func_Icons::ACTIONS_LIST_REMOVE) |
| 518 | 518 | ->setAjaxAction() |
| 519 | - )->setSizePolicy(Func_Icons::ICON_LEFT_16 . ' widget-20pc widget-align-right widget-actions' ) |
|
| 519 | + )->setSizePolicy(Func_Icons::ICON_LEFT_16.' widget-20pc widget-align-right widget-actions') |
|
| 520 | 520 | )->setSizePolicy('widget-list-element widget-actions-target'); |
| 521 | 521 | |
| 522 | 522 | $sectionBox->addItem($fieldItem); |
@@ -589,7 +589,7 @@ discard block |
||
| 589 | 589 | } |
| 590 | 590 | |
| 591 | 591 | header('Content-type: application/json'); |
| 592 | - header('Content-Disposition: attachment; filename="' . $objectName . '.' . ($view === '' ? 'default' : $view) . '.json"'."\n"); |
|
| 592 | + header('Content-Disposition: attachment; filename="'.$objectName.'.'.($view === '' ? 'default' : $view).'.json"'."\n"); |
|
| 593 | 593 | |
| 594 | 594 | $json = bab_json_encode($sectionsValues); |
| 595 | 595 | $json = bab_convertStringFromDatabase($json, bab_charset::UTF_8); |
@@ -833,11 +833,11 @@ discard block |
||
| 833 | 833 | $recordSet = $this->getEditRecordSet(); |
| 834 | 834 | |
| 835 | 835 | $recordClassname = $this->getRecordClassName(); |
| 836 | - $editorClassname = $recordClassname . 'SectionEditor'; |
|
| 836 | + $editorClassname = $recordClassname.'SectionEditor'; |
|
| 837 | 837 | /* @var $editor app_RecordEditor */ |
| 838 | 838 | $editor = $Ui->$editorClassname(); |
| 839 | 839 | if (!isset($itemId)) { |
| 840 | - $itemId = $this->getClass() . '.' . __FUNCTION__; |
|
| 840 | + $itemId = $this->getClass().'.'.__FUNCTION__; |
|
| 841 | 841 | } |
| 842 | 842 | $editor->setId($itemId); |
| 843 | 843 | $editor->setHiddenValue('tg', $App->controllerTg); |
@@ -880,7 +880,7 @@ discard block |
||
| 880 | 880 | public function getModelViewDefaultId($itemId = null) |
| 881 | 881 | { |
| 882 | 882 | if (!isset($itemId)) { |
| 883 | - $itemId = $this->getClass() . '.modelView'; |
|
| 883 | + $itemId = $this->getClass().'.modelView'; |
|
| 884 | 884 | } |
| 885 | 885 | |
| 886 | 886 | return $itemId; |
@@ -914,16 +914,16 @@ discard block |
||
| 914 | 914 | |
| 915 | 915 | switch ($type) { |
| 916 | 916 | case 'cards': |
| 917 | - $tableviewClassname = $recordClassname . 'CardsView'; |
|
| 917 | + $tableviewClassname = $recordClassname.'CardsView'; |
|
| 918 | 918 | break; |
| 919 | 919 | |
| 920 | 920 | case 'map': |
| 921 | - $tableviewClassname = $recordClassname . 'MapView'; |
|
| 921 | + $tableviewClassname = $recordClassname.'MapView'; |
|
| 922 | 922 | break; |
| 923 | 923 | |
| 924 | 924 | case 'table': |
| 925 | 925 | default: |
| 926 | - $tableviewClassname = $recordClassname . 'TableView'; |
|
| 926 | + $tableviewClassname = $recordClassname.'TableView'; |
|
| 927 | 927 | break; |
| 928 | 928 | } |
| 929 | 929 | |
@@ -989,10 +989,10 @@ discard block |
||
| 989 | 989 | $Ui = $App->Ui(); |
| 990 | 990 | |
| 991 | 991 | $recordClassname = $this->getRecordClassName(); |
| 992 | - $editorClassname = $recordClassname . 'Editor'; |
|
| 992 | + $editorClassname = $recordClassname.'Editor'; |
|
| 993 | 993 | $editor = $Ui->$editorClassname(); |
| 994 | 994 | if (!isset($itemId)) { |
| 995 | - $itemId = $this->getClass() . '_' . __FUNCTION__; |
|
| 995 | + $itemId = $this->getClass().'_'.__FUNCTION__; |
|
| 996 | 996 | } |
| 997 | 997 | $editor->setId($itemId); |
| 998 | 998 | $editor->setHiddenValue('tg', $App->controllerTg); |
@@ -1037,7 +1037,7 @@ discard block |
||
| 1037 | 1037 | $W->Link( |
| 1038 | 1038 | '', |
| 1039 | 1039 | $proxy->setFilteredViewType($tableView->getId(), $viewTypeId) |
| 1040 | - )->addClass('icon', $viewType['icon'] . ($filteredViewType=== $viewTypeId ? ' active' : '')) |
|
| 1040 | + )->addClass('icon', $viewType['icon'].($filteredViewType === $viewTypeId ? ' active' : '')) |
|
| 1041 | 1041 | // ->setSizePolicy('btn btn-xs btn-default ' . ($filteredViewType === $viewTypeId ? 'active' : '')) |
| 1042 | 1042 | ->setTitle($viewType['label']) |
| 1043 | 1043 | ->setAjaxAction() |
@@ -1081,7 +1081,7 @@ discard block |
||
| 1081 | 1081 | |
| 1082 | 1082 | $filterVisibility = $this->getFilterVisibility($itemId); |
| 1083 | 1083 | $filterVisibility = !$filterVisibility; |
| 1084 | - $W->setUserConfiguration($itemId . '/filterVisibility', $filterVisibility); |
|
| 1084 | + $W->setUserConfiguration($itemId.'/filterVisibility', $filterVisibility); |
|
| 1085 | 1085 | |
| 1086 | 1086 | return true; |
| 1087 | 1087 | } |
@@ -1094,10 +1094,10 @@ discard block |
||
| 1094 | 1094 | protected function getFilterVisibility($itemId) |
| 1095 | 1095 | { |
| 1096 | 1096 | $W = bab_Widgets(); |
| 1097 | - $filterVisibility = $W->getUserConfiguration($itemId . '/filterVisibility'); |
|
| 1097 | + $filterVisibility = $W->getUserConfiguration($itemId.'/filterVisibility'); |
|
| 1098 | 1098 | if (!isset($filterVisibility)) { |
| 1099 | 1099 | $filterVisibility = false; |
| 1100 | - $W->setUserConfiguration($itemId . '/filterVisibility', $filterVisibility); |
|
| 1100 | + $W->setUserConfiguration($itemId.'/filterVisibility', $filterVisibility); |
|
| 1101 | 1101 | } |
| 1102 | 1102 | return $filterVisibility; |
| 1103 | 1103 | } |
@@ -1111,7 +1111,7 @@ discard block |
||
| 1111 | 1111 | protected function getFilteredViewType($itemId) |
| 1112 | 1112 | { |
| 1113 | 1113 | $W = bab_Widgets(); |
| 1114 | - $type = $W->getUserConfiguration($itemId . '/viewType'); |
|
| 1114 | + $type = $W->getUserConfiguration($itemId.'/viewType'); |
|
| 1115 | 1115 | if (!isset($type)) { |
| 1116 | 1116 | $type = 'table'; |
| 1117 | 1117 | } |
@@ -1127,7 +1127,7 @@ discard block |
||
| 1127 | 1127 | public function setFilteredViewType($itemId, $type = null) |
| 1128 | 1128 | { |
| 1129 | 1129 | $W = bab_Widgets(); |
| 1130 | - $W->setUserConfiguration($itemId . '/viewType', $type); |
|
| 1130 | + $W->setUserConfiguration($itemId.'/viewType', $type); |
|
| 1131 | 1131 | |
| 1132 | 1132 | return true; |
| 1133 | 1133 | } |
@@ -1272,14 +1272,14 @@ discard block |
||
| 1272 | 1272 | |
| 1273 | 1273 | switch ($format) { |
| 1274 | 1274 | case 'xlsx': |
| 1275 | - $tableview->downloadXlsx($filename . '.xlsx'); |
|
| 1275 | + $tableview->downloadXlsx($filename.'.xlsx'); |
|
| 1276 | 1276 | case 'xls': |
| 1277 | - $tableview->downloadExcel($filename . '.xls'); |
|
| 1277 | + $tableview->downloadExcel($filename.'.xls'); |
|
| 1278 | 1278 | case 'ssv': |
| 1279 | - $tableview->downloadCsv($filename . '.csv', ';', $inline, 'Windows-1252'); |
|
| 1279 | + $tableview->downloadCsv($filename.'.csv', ';', $inline, 'Windows-1252'); |
|
| 1280 | 1280 | case 'csv': |
| 1281 | 1281 | default: |
| 1282 | - $tableview->downloadCsv($filename . '.csv', ',', $inline, bab_charset::getIso()); |
|
| 1282 | + $tableview->downloadCsv($filename.'.csv', ',', $inline, bab_charset::getIso()); |
|
| 1283 | 1283 | } |
| 1284 | 1284 | } |
| 1285 | 1285 | |
@@ -1307,7 +1307,7 @@ discard block |
||
| 1307 | 1307 | $Ui = $App->Ui(); |
| 1308 | 1308 | |
| 1309 | 1309 | $recordClassname = $this->getRecordClassName(); |
| 1310 | - $fullFrameClassname = $recordClassname . 'FullFrame'; |
|
| 1310 | + $fullFrameClassname = $recordClassname.'FullFrame'; |
|
| 1311 | 1311 | $fullFrame = $Ui->$fullFrameClassname($record, $view); |
| 1312 | 1312 | |
| 1313 | 1313 | |
@@ -1470,7 +1470,7 @@ discard block |
||
| 1470 | 1470 | |
| 1471 | 1471 | $recordTitle = $record->getRecordTitle(); |
| 1472 | 1472 | |
| 1473 | - $message = sprintf($App->translate('%s has been deleted'), $App->translate($recordSet->getDescription()) . ' "' . $recordTitle . '"'); |
|
| 1473 | + $message = sprintf($App->translate('%s has been deleted'), $App->translate($recordSet->getDescription()).' "'.$recordTitle.'"'); |
|
| 1474 | 1474 | return $message; |
| 1475 | 1475 | } |
| 1476 | 1476 | |
@@ -1626,7 +1626,7 @@ discard block |
||
| 1626 | 1626 | |
| 1627 | 1627 | $recordTitle = $record->getRecordTitle(); |
| 1628 | 1628 | |
| 1629 | - $subTitle = $App->translate($recordSet->getDescription()) . ' "' . $recordTitle . '"'; |
|
| 1629 | + $subTitle = $App->translate($recordSet->getDescription()).' "'.$recordTitle.'"'; |
|
| 1630 | 1630 | $form->addItem($W->Title($subTitle, 5)); |
| 1631 | 1631 | |
| 1632 | 1632 | $form->addItem($W->Title($App->translate('Confirm delete?'), 6)); |
@@ -22,7 +22,7 @@ discard block |
||
| 22 | 22 | */ |
| 23 | 23 | |
| 24 | 24 | |
| 25 | -require_once APP_SET_PATH . 'traceablerecord.class.php'; |
|
| 25 | +require_once APP_SET_PATH.'traceablerecord.class.php'; |
|
| 26 | 26 | |
| 27 | 27 | |
| 28 | 28 | /** |
@@ -317,9 +317,9 @@ discard block |
||
| 317 | 317 | if (is_array($parameters)) { |
| 318 | 318 | $params = array(); |
| 319 | 319 | foreach ($parameters as $key => $value) { |
| 320 | - $params[] = $key . '=' . $value; |
|
| 320 | + $params[] = $key.'='.$value; |
|
| 321 | 321 | } |
| 322 | - $rawField .= ':' . implode(';', $params); |
|
| 322 | + $rawField .= ':'.implode(';', $params); |
|
| 323 | 323 | } |
| 324 | 324 | array_push($rawFields, $rawField); |
| 325 | 325 | $this->fields = implode(',', $rawFields); |
@@ -338,7 +338,7 @@ discard block |
||
| 338 | 338 | if (empty($rawField)) { |
| 339 | 339 | continue; |
| 340 | 340 | } |
| 341 | - list($fieldName, ) = explode(':', $rawField); |
|
| 341 | + list($fieldName,) = explode(':', $rawField); |
|
| 342 | 342 | |
| 343 | 343 | if ($removedFieldName == $fieldName) { |
| 344 | 344 | continue; |
@@ -21,8 +21,8 @@ discard block |
||
| 21 | 21 | * @copyright Copyright (c) 2008 by CANTICO ({@link http://www.cantico.fr}) |
| 22 | 22 | */ |
| 23 | 23 | |
| 24 | -require_once $GLOBALS['babInstallPath'] . 'utilit/controller.class.php'; |
|
| 25 | -require_once dirname(__FILE__). '/functions.php'; |
|
| 24 | +require_once $GLOBALS['babInstallPath'].'utilit/controller.class.php'; |
|
| 25 | +require_once dirname(__FILE__).'/functions.php'; |
|
| 26 | 26 | |
| 27 | 27 | $App = app_App(); |
| 28 | 28 | $App->includeBase(); |
@@ -32,7 +32,7 @@ discard block |
||
| 32 | 32 | { |
| 33 | 33 | public function __construct($action, $code = 0) |
| 34 | 34 | { |
| 35 | - $message = 'Unknown method "' . $action->getController() . '::' . $action->getMethod() . '"'; |
|
| 35 | + $message = 'Unknown method "'.$action->getController().'::'.$action->getMethod().'"'; |
|
| 36 | 36 | parent::__construct($message, $code); |
| 37 | 37 | } |
| 38 | 38 | } |
@@ -215,11 +215,11 @@ discard block |
||
| 215 | 215 | // we try to select one according to the classname prefix. |
| 216 | 216 | list($prefix) = explode('_', __CLASS__); |
| 217 | 217 | $functionalityName = ucwords($prefix); |
| 218 | - $App = @bab_functionality::get('App/' . $functionalityName); |
|
| 218 | + $App = @bab_functionality::get('App/'.$functionalityName); |
|
| 219 | 219 | |
| 220 | 220 | if (!$App) |
| 221 | 221 | { |
| 222 | - throw new app_Exception('Faild to autodetect functionality App/' . $functionalityName.', the getInstance method is deprecated, use $App->ControllerProxy() instead'); |
|
| 222 | + throw new app_Exception('Faild to autodetect functionality App/'.$functionalityName.', the getInstance method is deprecated, use $App->ControllerProxy() instead'); |
|
| 223 | 223 | } |
| 224 | 224 | |
| 225 | 225 | $controller = $App->ControllerProxy($classname, $proxy); |
@@ -238,9 +238,9 @@ discard block |
||
| 238 | 238 | static function getProxyInstance(Func_App $App, $classname) |
| 239 | 239 | { |
| 240 | 240 | $class = new ReflectionClass($classname); |
| 241 | - $proxyClassname = $class->name . self::PROXY_CLASS_SUFFIX; |
|
| 241 | + $proxyClassname = $class->name.self::PROXY_CLASS_SUFFIX; |
|
| 242 | 242 | if (!class_exists($proxyClassname)) { |
| 243 | - $classStr = 'class ' . $proxyClassname . ' extends ' . $class->name . ' {' . "\n"; |
|
| 243 | + $classStr = 'class '.$proxyClassname.' extends '.$class->name.' {'."\n"; |
|
| 244 | 244 | $methods = $class->getMethods(); |
| 245 | 245 | |
| 246 | 246 | $classStr .= ' public function __construct(Func_App $App) { |
@@ -253,24 +253,24 @@ discard block |
||
| 253 | 253 | } |
| 254 | 254 | |
| 255 | 255 | |
| 256 | - $classStr .= ' public function ' . $method->name . '('; |
|
| 256 | + $classStr .= ' public function '.$method->name.'('; |
|
| 257 | 257 | $parameters = $method->getParameters(); |
| 258 | 258 | $parametersStr = array(); |
| 259 | 259 | foreach ($parameters as $parameter) { |
| 260 | 260 | |
| 261 | 261 | if ($parameter->isDefaultValueAvailable()) { |
| 262 | - $parametersStr[] = '$' . $parameter->name . ' = ' . var_export($parameter->getDefaultValue(), true); |
|
| 262 | + $parametersStr[] = '$'.$parameter->name.' = '.var_export($parameter->getDefaultValue(), true); |
|
| 263 | 263 | } else { |
| 264 | - $parametersStr[] = '$' . $parameter->name; |
|
| 264 | + $parametersStr[] = '$'.$parameter->name; |
|
| 265 | 265 | } |
| 266 | 266 | } |
| 267 | 267 | $classStr .= implode(', ', $parametersStr); |
| 268 | - $classStr .= ') {' . "\n"; |
|
| 269 | - $classStr .= ' $args = func_get_args();' . "\n"; |
|
| 270 | - $classStr .= ' return $this->getMethodAction(__FUNCTION__, $args);' . "\n"; |
|
| 271 | - $classStr .= ' }' . "\n"; |
|
| 268 | + $classStr .= ') {'."\n"; |
|
| 269 | + $classStr .= ' $args = func_get_args();'."\n"; |
|
| 270 | + $classStr .= ' return $this->getMethodAction(__FUNCTION__, $args);'."\n"; |
|
| 271 | + $classStr .= ' }'."\n"; |
|
| 272 | 272 | } |
| 273 | - $classStr .= '}' . "\n"; |
|
| 273 | + $classStr .= '}'."\n"; |
|
| 274 | 274 | |
| 275 | 275 | // We define the proxy class |
| 276 | 276 | eval($classStr); |
@@ -394,7 +394,7 @@ discard block |
||
| 394 | 394 | $action->setParameters($actionParams); |
| 395 | 395 | |
| 396 | 396 | |
| 397 | - list(,,$file) = explode('/', $App->controllerTg); |
|
| 397 | + list(,, $file) = explode('/', $App->controllerTg); |
|
| 398 | 398 | |
| 399 | 399 | $action->setParameter('addon', $App->getAddonName().'.'.$file); |
| 400 | 400 | $action->setParameter('idx', $idx); |
@@ -418,7 +418,7 @@ discard block |
||
| 418 | 418 | return false; |
| 419 | 419 | } |
| 420 | 420 | |
| 421 | - list($objectName, ) = explode('.', $method); |
|
| 421 | + list($objectName,) = explode('.', $method); |
|
| 422 | 422 | |
| 423 | 423 | if (!method_exists($this, $objectName)) { |
| 424 | 424 | header('HTTP/1.0 400 Bad Request'); |
@@ -426,7 +426,7 @@ discard block |
||
| 426 | 426 | } |
| 427 | 427 | |
| 428 | 428 | $objectController = $this->{$objectName}(false); |
| 429 | - if ( ! ($objectController instanceof app_Controller)) { |
|
| 429 | + if (!($objectController instanceof app_Controller)) { |
|
| 430 | 430 | return false; |
| 431 | 431 | } |
| 432 | 432 | |
@@ -440,7 +440,7 @@ discard block |
||
| 440 | 440 | } else { |
| 441 | 441 | if ($this->isAjaxRequest()) { |
| 442 | 442 | |
| 443 | - header($_SERVER['SERVER_PROTOCOL'] . ' 403 Forbidden', true, 403); |
|
| 443 | + header($_SERVER['SERVER_PROTOCOL'].' 403 Forbidden', true, 403); |
|
| 444 | 444 | |
| 445 | 445 | die( |
| 446 | 446 | bab_json_encode( |
@@ -461,7 +461,7 @@ discard block |
||
| 461 | 461 | } catch (app_SaveException $e) { |
| 462 | 462 | |
| 463 | 463 | if ($this->isAjaxRequest()) { |
| 464 | - header($_SERVER['SERVER_PROTOCOL'] . ' 403 Forbidden', true, 403); |
|
| 464 | + header($_SERVER['SERVER_PROTOCOL'].' 403 Forbidden', true, 403); |
|
| 465 | 465 | header('Cache-Control: no-cache, must-revalidate'); |
| 466 | 466 | header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); |
| 467 | 467 | header('Content-type: application/json'); |
@@ -528,7 +528,7 @@ discard block |
||
| 528 | 528 | if (method_exists($htmlCanvas, 'sendPageTitle')) { |
| 529 | 529 | $htmlCanvas->sendPageTitle($pageTitle); |
| 530 | 530 | } else { |
| 531 | - header('X-Cto-PageTitle: ' . $pageTitle); |
|
| 531 | + header('X-Cto-PageTitle: '.$pageTitle); |
|
| 532 | 532 | } |
| 533 | 533 | } |
| 534 | 534 | $html = $returnedValue->display($htmlCanvas); |
@@ -588,7 +588,7 @@ discard block |
||
| 588 | 588 | private function deletedItemPage(Widget_Action $action, app_DeletedRecordException $e) |
| 589 | 589 | { |
| 590 | 590 | if ($this->isAjaxRequest()) { |
| 591 | - header($_SERVER['SERVER_PROTOCOL'] . ' 403 Forbidden', true, 403); |
|
| 591 | + header($_SERVER['SERVER_PROTOCOL'].' 403 Forbidden', true, 403); |
|
| 592 | 592 | header('Cache-Control: no-cache, must-revalidate'); |
| 593 | 593 | header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); |
| 594 | 594 | header('Content-type: application/json'); |
@@ -605,7 +605,7 @@ discard block |
||
| 605 | 605 | ); |
| 606 | 606 | |
| 607 | 607 | } |
| 608 | - header($_SERVER['SERVER_PROTOCOL'] . ' 404 Not Found', true, 404); |
|
| 608 | + header($_SERVER['SERVER_PROTOCOL'].' 404 Not Found', true, 404); |
|
| 609 | 609 | |
| 610 | 610 | $App = $this->App(); |
| 611 | 611 | $W = bab_Widgets(); |
@@ -639,7 +639,7 @@ discard block |
||
| 639 | 639 | private function notFoundPage(Widget_Action $action, app_NotFoundException $e) |
| 640 | 640 | { |
| 641 | 641 | if ($this->isAjaxRequest()) { |
| 642 | - $message = sprintf(app_translate('This %s does not exists'), $e->getObjectTitle() . ' (' . $e->getId() . ')'); |
|
| 642 | + $message = sprintf(app_translate('This %s does not exists'), $e->getObjectTitle().' ('.$e->getId().')'); |
|
| 643 | 643 | $json = array( |
| 644 | 644 | 'messages' => array( |
| 645 | 645 | array( |
@@ -651,7 +651,7 @@ discard block |
||
| 651 | 651 | echo bab_json_encode($json); |
| 652 | 652 | die; |
| 653 | 653 | } |
| 654 | - header($_SERVER['SERVER_PROTOCOL'] . ' 404 Not Found', true, 404); |
|
| 654 | + header($_SERVER['SERVER_PROTOCOL'].' 404 Not Found', true, 404); |
|
| 655 | 655 | header('Cache-Control: no-cache, must-revalidate'); |
| 656 | 656 | header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); |
| 657 | 657 | |
@@ -671,14 +671,14 @@ discard block |
||
| 671 | 671 | |
| 672 | 672 | private function errorPage(Exception $e) |
| 673 | 673 | { |
| 674 | - header($_SERVER['SERVER_PROTOCOL'] . ' 500 Internal server error', true, 500); |
|
| 674 | + header($_SERVER['SERVER_PROTOCOL'].' 500 Internal server error', true, 500); |
|
| 675 | 675 | |
| 676 | - require_once $GLOBALS['babInstallPath'] . 'utilit/uiutil.php'; |
|
| 676 | + require_once $GLOBALS['babInstallPath'].'utilit/uiutil.php'; |
|
| 677 | 677 | $popup = new babBodyPopup(); |
| 678 | 678 | $popup->babEcho( |
| 679 | - '<h1>' . $this->App()->translate('There was a problem when trying to perform this operation') . '</h1>' |
|
| 680 | - . '<h2 class="error">' . $this->App()->translate('Additional debugging information:') . '</h2>' |
|
| 681 | - . '<p class="error">' . $e->getMessage() . ' ' . $e->getFile() . ' ' . $e->getLine() . ' ' . $e->getTraceAsString() . '</p>' |
|
| 679 | + '<h1>'.$this->App()->translate('There was a problem when trying to perform this operation').'</h1>' |
|
| 680 | + . '<h2 class="error">'.$this->App()->translate('Additional debugging information:').'</h2>' |
|
| 681 | + . '<p class="error">'.$e->getMessage().' '.$e->getFile().' '.$e->getLine().' '.$e->getTraceAsString().'</p>' |
|
| 682 | 682 | ); |
| 683 | 683 | |
| 684 | 684 | |
@@ -175,7 +175,7 @@ discard block |
||
| 175 | 175 | { |
| 176 | 176 | $App = $this->App(); |
| 177 | 177 | |
| 178 | - $customFieldSet= $App->CustomFieldSet(); |
|
| 178 | + $customFieldSet = $App->CustomFieldSet(); |
|
| 179 | 179 | $object = mb_substr(get_class($this), mb_strlen($App->classPrefix), -mb_strlen('Set')); |
| 180 | 180 | |
| 181 | 181 | $customFields = $customFieldSet->select($customFieldSet->object->is($object)); |
@@ -390,7 +390,7 @@ discard block |
||
| 390 | 390 | throw new app_Exception('Trying to get the reference string of a record without an id.'); |
| 391 | 391 | } |
| 392 | 392 | $classname = $this->getClassName(); |
| 393 | - return $classname . ':' . $this->id; |
|
| 393 | + return $classname.':'.$this->id; |
|
| 394 | 394 | } |
| 395 | 395 | |
| 396 | 396 | |
@@ -650,13 +650,13 @@ discard block |
||
| 650 | 650 | */ |
| 651 | 651 | protected function importDate($name, $value) |
| 652 | 652 | { |
| 653 | - if (preg_match('/[0-9]{4}-[0-9]{2}-[0-9]{2}/',$value)) { |
|
| 653 | + if (preg_match('/[0-9]{4}-[0-9]{2}-[0-9]{2}/', $value)) { |
|
| 654 | 654 | return $this->importProperty($name, $value); |
| 655 | 655 | } |
| 656 | 656 | |
| 657 | 657 | // try in DD/MM/YYYY format |
| 658 | 658 | |
| 659 | - if (preg_match('/(?P<day>[0-9]+)\/(?P<month>[0-9]+)\/(?P<year>[0-9]{2,4})/',$value, $matches)) { |
|
| 659 | + if (preg_match('/(?P<day>[0-9]+)\/(?P<month>[0-9]+)\/(?P<year>[0-9]{2,4})/', $value, $matches)) { |
|
| 660 | 660 | |
| 661 | 661 | $value = sprintf('%04d-%02d-%02d', (int) $matches['year'], (int) $matches['month'], (int) $matches['day']); |
| 662 | 662 | |
@@ -21,8 +21,8 @@ discard block |
||
| 21 | 21 | * @copyright Copyright (c) 2018 by CANTICO ({@link http://www.cantico.fr}) |
| 22 | 22 | */ |
| 23 | 23 | |
| 24 | -require_once dirname(__FILE__) . '/define.php'; |
|
| 25 | -require_once dirname(__FILE__) . '/functions.php'; |
|
| 24 | +require_once dirname(__FILE__).'/define.php'; |
|
| 25 | +require_once dirname(__FILE__).'/functions.php'; |
|
| 26 | 26 | |
| 27 | 27 | /** |
| 28 | 28 | * Provides extensible functionalities to manage an application. |
@@ -45,8 +45,8 @@ discard block |
||
| 45 | 45 | $this->addonPrefix = 'libapp'; |
| 46 | 46 | $this->addonName = 'libapp'; |
| 47 | 47 | |
| 48 | - $this->classPrefix = $this->addonPrefix . '_'; |
|
| 49 | - $this->controllerTg = 'addon/' . $this->addonName . '/main'; |
|
| 48 | + $this->classPrefix = $this->addonPrefix.'_'; |
|
| 49 | + $this->controllerTg = 'addon/'.$this->addonName.'/main'; |
|
| 50 | 50 | |
| 51 | 51 | $babDB = bab_getDB(); |
| 52 | 52 | |
@@ -158,7 +158,7 @@ discard block |
||
| 158 | 158 | |
| 159 | 159 | if (substr($method, 0, 7) === 'include' && substr($method, -3) === 'Set') { |
| 160 | 160 | $incl = $method; |
| 161 | - $classNameMethod = substr($method, strlen('include')) . 'ClassName'; |
|
| 161 | + $classNameMethod = substr($method, strlen('include')).'ClassName'; |
|
| 162 | 162 | |
| 163 | 163 | |
| 164 | 164 | $classname = $this->$classNameMethod(); |
@@ -180,7 +180,7 @@ discard block |
||
| 180 | 180 | // We need to revert to multilang fields before synchronizing. |
| 181 | 181 | $set->useLang(false); |
| 182 | 182 | } |
| 183 | - $sql .= $mysqlbackend->setToSql($set) . "\n"; |
|
| 183 | + $sql .= $mysqlbackend->setToSql($set)."\n"; |
|
| 184 | 184 | } |
| 185 | 185 | } |
| 186 | 186 | } |
@@ -211,7 +211,7 @@ discard block |
||
| 211 | 211 | |
| 212 | 212 | if (substr($method, 0, strlen('include')) === 'include' && substr($method, -strlen('Set')) === 'Set') { |
| 213 | 213 | $incl = $method; |
| 214 | - $classNameMethod = substr($method, strlen('include')) . 'ClassName'; |
|
| 214 | + $classNameMethod = substr($method, strlen('include')).'ClassName'; |
|
| 215 | 215 | |
| 216 | 216 | $classname = $this->$classNameMethod(); |
| 217 | 217 | |
@@ -225,7 +225,7 @@ discard block |
||
| 225 | 225 | |
| 226 | 226 | if (class_exists($classname) && method_exists($this, $call)) { |
| 227 | 227 | $set = $this->$call(); |
| 228 | - $sql .= $mysqlbackend->setToSql($set) . "\n"; |
|
| 228 | + $sql .= $mysqlbackend->setToSql($set)."\n"; |
|
| 229 | 229 | } |
| 230 | 230 | } |
| 231 | 231 | } |
@@ -239,7 +239,7 @@ discard block |
||
| 239 | 239 | |
| 240 | 240 | public function includeBase() |
| 241 | 241 | { |
| 242 | - require_once APP_PHP_PATH . 'base.class.php'; |
|
| 242 | + require_once APP_PHP_PATH.'base.class.php'; |
|
| 243 | 243 | } |
| 244 | 244 | |
| 245 | 245 | /** |
@@ -247,7 +247,7 @@ discard block |
||
| 247 | 247 | */ |
| 248 | 248 | public function includeRecordSet() |
| 249 | 249 | { |
| 250 | - require_once APP_SET_PATH . 'record.class.php'; |
|
| 250 | + require_once APP_SET_PATH.'record.class.php'; |
|
| 251 | 251 | } |
| 252 | 252 | |
| 253 | 253 | |
@@ -256,7 +256,7 @@ discard block |
||
| 256 | 256 | */ |
| 257 | 257 | public function includeTraceableRecordSet() |
| 258 | 258 | { |
| 259 | - require_once APP_SET_PATH . 'traceablerecord.class.php'; |
|
| 259 | + require_once APP_SET_PATH.'traceablerecord.class.php'; |
|
| 260 | 260 | } |
| 261 | 261 | |
| 262 | 262 | |
@@ -272,7 +272,7 @@ discard block |
||
| 272 | 272 | */ |
| 273 | 273 | public function includeLogSet() |
| 274 | 274 | { |
| 275 | - require_once APP_SET_PATH . 'log.class.php'; |
|
| 275 | + require_once APP_SET_PATH.'log.class.php'; |
|
| 276 | 276 | } |
| 277 | 277 | |
| 278 | 278 | /** |
@@ -288,7 +288,7 @@ discard block |
||
| 288 | 288 | */ |
| 289 | 289 | public function LogSetClassName() |
| 290 | 290 | { |
| 291 | - return $this->LogClassName() . 'Set'; |
|
| 291 | + return $this->LogClassName().'Set'; |
|
| 292 | 292 | } |
| 293 | 293 | |
| 294 | 294 | /** |
@@ -310,7 +310,7 @@ discard block |
||
| 310 | 310 | */ |
| 311 | 311 | public function includeLinkSet() |
| 312 | 312 | { |
| 313 | - require_once APP_SET_PATH . 'link.class.php'; |
|
| 313 | + require_once APP_SET_PATH.'link.class.php'; |
|
| 314 | 314 | } |
| 315 | 315 | |
| 316 | 316 | /** |
@@ -326,7 +326,7 @@ discard block |
||
| 326 | 326 | */ |
| 327 | 327 | public function LinkSetClassName() |
| 328 | 328 | { |
| 329 | - return $this->LinkClassName() . 'Set'; |
|
| 329 | + return $this->LinkClassName().'Set'; |
|
| 330 | 330 | } |
| 331 | 331 | |
| 332 | 332 | /** |
@@ -347,7 +347,7 @@ discard block |
||
| 347 | 347 | */ |
| 348 | 348 | public function includeCustomFieldSet() |
| 349 | 349 | { |
| 350 | - require_once APP_SET_PATH . 'customfield.class.php'; |
|
| 350 | + require_once APP_SET_PATH.'customfield.class.php'; |
|
| 351 | 351 | } |
| 352 | 352 | |
| 353 | 353 | /** |
@@ -363,7 +363,7 @@ discard block |
||
| 363 | 363 | */ |
| 364 | 364 | public function CustomFieldSetClassName() |
| 365 | 365 | { |
| 366 | - return $this->CustomFieldClassName() . 'Set'; |
|
| 366 | + return $this->CustomFieldClassName().'Set'; |
|
| 367 | 367 | } |
| 368 | 368 | |
| 369 | 369 | /** |
@@ -385,8 +385,8 @@ discard block |
||
| 385 | 385 | */ |
| 386 | 386 | public function includeCustomSectionSet() |
| 387 | 387 | { |
| 388 | - require_once APP_SET_PATH . 'traceablerecord.class.php'; |
|
| 389 | - require_once APP_SET_PATH . 'customsection.class.php'; |
|
| 388 | + require_once APP_SET_PATH.'traceablerecord.class.php'; |
|
| 389 | + require_once APP_SET_PATH.'customsection.class.php'; |
|
| 390 | 390 | } |
| 391 | 391 | |
| 392 | 392 | /** |
@@ -402,7 +402,7 @@ discard block |
||
| 402 | 402 | */ |
| 403 | 403 | public function CustomSectionSetClassName() |
| 404 | 404 | { |
| 405 | - return $this->CustomSectionClassName() . 'Set'; |
|
| 405 | + return $this->CustomSectionClassName().'Set'; |
|
| 406 | 406 | } |
| 407 | 407 | |
| 408 | 408 | /** |
@@ -424,7 +424,7 @@ discard block |
||
| 424 | 424 | */ |
| 425 | 425 | public function includeTagSet() |
| 426 | 426 | { |
| 427 | - require_once APP_SET_PATH . 'tag.class.php'; |
|
| 427 | + require_once APP_SET_PATH.'tag.class.php'; |
|
| 428 | 428 | } |
| 429 | 429 | |
| 430 | 430 | /** |
@@ -440,7 +440,7 @@ discard block |
||
| 440 | 440 | */ |
| 441 | 441 | public function TagSetClassName() |
| 442 | 442 | { |
| 443 | - return $this->TagClassName() . 'Set'; |
|
| 443 | + return $this->TagClassName().'Set'; |
|
| 444 | 444 | } |
| 445 | 445 | |
| 446 | 446 | /** |
@@ -475,7 +475,7 @@ discard block |
||
| 475 | 475 | return null; |
| 476 | 476 | } |
| 477 | 477 | list($classname, $id) = $refParts; |
| 478 | - $classSet = $classname . 'Set'; |
|
| 478 | + $classSet = $classname.'Set'; |
|
| 479 | 479 | $set = $this->$classSet(); |
| 480 | 480 | if (isset($set)) { |
| 481 | 481 | return $set->get($id); |
@@ -494,7 +494,7 @@ discard block |
||
| 494 | 494 | { |
| 495 | 495 | $fullClassName = get_class($record); |
| 496 | 496 | list(, $className) = explode('_', $fullClassName); |
| 497 | - return $className . ':' . $record->id; |
|
| 497 | + return $className.':'.$record->id; |
|
| 498 | 498 | } |
| 499 | 499 | |
| 500 | 500 | |
@@ -521,7 +521,7 @@ discard block |
||
| 521 | 521 | */ |
| 522 | 522 | public function translate($str, $str_plurals = null, $number = null) |
| 523 | 523 | { |
| 524 | - require_once APP_PHP_PATH . 'functions.php'; |
|
| 524 | + require_once APP_PHP_PATH.'functions.php'; |
|
| 525 | 525 | $translation = $str; |
| 526 | 526 | if ($translate = bab_functionality::get('Translate/Gettext')) { |
| 527 | 527 | /* @var $translate Func_Translate_Gettext */ |
@@ -572,16 +572,16 @@ discard block |
||
| 572 | 572 | */ |
| 573 | 573 | public function mailTo($addr, $subject = null, $body = null) |
| 574 | 574 | { |
| 575 | - $mailTo = 'mailto:' . $addr; |
|
| 575 | + $mailTo = 'mailto:'.$addr; |
|
| 576 | 576 | $parameters = array(); |
| 577 | 577 | if (isset($subject)) { |
| 578 | - $parameters[] = 'subject=' . $subject; |
|
| 578 | + $parameters[] = 'subject='.$subject; |
|
| 579 | 579 | } |
| 580 | 580 | if (isset($body)) { |
| 581 | - $parameters[] = 'body=' . $body; |
|
| 581 | + $parameters[] = 'body='.$body; |
|
| 582 | 582 | } |
| 583 | 583 | if (!empty($parameters)) { |
| 584 | - $mailTo .= '?' . implode('&', $parameters); |
|
| 584 | + $mailTo .= '?'.implode('&', $parameters); |
|
| 585 | 585 | } |
| 586 | 586 | |
| 587 | 587 | return $mailTo; |
@@ -632,7 +632,7 @@ discard block |
||
| 632 | 632 | } |
| 633 | 633 | |
| 634 | 634 | $number = number_format($number, $decimals, ',', ' '); |
| 635 | - return str_replace(' ', bab_nbsp(), $number . ' ' . $prefix . $unitSymbol); |
|
| 635 | + return str_replace(' ', bab_nbsp(), $number.' '.$prefix.$unitSymbol); |
|
| 636 | 636 | } |
| 637 | 637 | |
| 638 | 638 | |
@@ -652,7 +652,7 @@ discard block |
||
| 652 | 652 | } |
| 653 | 653 | |
| 654 | 654 | if (!isset($format)) { |
| 655 | - $format = bab_registry::get('/' . $this->addonName . '/numberFormat', $PhoneNumber->getDefaultFormat()); |
|
| 655 | + $format = bab_registry::get('/'.$this->addonName.'/numberFormat', $PhoneNumber->getDefaultFormat()); |
|
| 656 | 656 | } |
| 657 | 657 | $phoneNumberUtil = $PhoneNumber->PhoneNumberUtil(); |
| 658 | 658 | |
@@ -673,7 +673,7 @@ discard block |
||
| 673 | 673 | */ |
| 674 | 674 | public function includeController() |
| 675 | 675 | { |
| 676 | - require_once APP_PHP_PATH . '/controller.class.php'; |
|
| 676 | + require_once APP_PHP_PATH.'/controller.class.php'; |
|
| 677 | 677 | } |
| 678 | 678 | |
| 679 | 679 | |
@@ -682,7 +682,7 @@ discard block |
||
| 682 | 682 | */ |
| 683 | 683 | public function includeRecordController() |
| 684 | 684 | { |
| 685 | - require_once APP_CTRL_PATH . '/record.ctrl.php'; |
|
| 685 | + require_once APP_CTRL_PATH.'/record.ctrl.php'; |
|
| 686 | 686 | } |
| 687 | 687 | |
| 688 | 688 | |
@@ -722,7 +722,7 @@ discard block |
||
| 722 | 722 | */ |
| 723 | 723 | public function includeUi() |
| 724 | 724 | { |
| 725 | - require_once APP_UI_PATH . 'ui.class.php'; |
|
| 725 | + require_once APP_UI_PATH.'ui.class.php'; |
|
| 726 | 726 | } |
| 727 | 727 | |
| 728 | 728 | |
@@ -734,14 +734,14 @@ discard block |
||
| 734 | 734 | public function Ui() |
| 735 | 735 | { |
| 736 | 736 | $this->includeUi(); |
| 737 | - return bab_getInstance($this->classPrefix . 'Ui');//->setApp($this); |
|
| 737 | + return bab_getInstance($this->classPrefix.'Ui'); //->setApp($this); |
|
| 738 | 738 | } |
| 739 | 739 | |
| 740 | 740 | |
| 741 | 741 | |
| 742 | 742 | protected function includeAccess() |
| 743 | 743 | { |
| 744 | - require_once WORKSPACE_PHP_PATH . '/access.class.php'; |
|
| 744 | + require_once WORKSPACE_PHP_PATH.'/access.class.php'; |
|
| 745 | 745 | } |
| 746 | 746 | |
| 747 | 747 | |
@@ -773,29 +773,29 @@ discard block |
||
| 773 | 773 | |
| 774 | 774 | case substr($name, -strlen('SetClassName')) === 'SetClassName': |
| 775 | 775 | $setName = substr($name, 0, strlen($name) - strlen('ClassName')); |
| 776 | - return $this->classPrefix . $setName; |
|
| 776 | + return $this->classPrefix.$setName; |
|
| 777 | 777 | |
| 778 | 778 | case substr($name, -strlen('ClassName')) === 'ClassName': |
| 779 | 779 | $recordName = substr($name, 0, strlen($name) - strlen('ClassName')); |
| 780 | - return $this->classPrefix . $recordName; |
|
| 780 | + return $this->classPrefix.$recordName; |
|
| 781 | 781 | |
| 782 | 782 | case substr($name, 0, strlen('include')) === 'include' && substr($name, -strlen('Set')) === 'Set': |
| 783 | 783 | $fileNameBase = strtolower(substr(substr($name, 0, strlen($name) - strlen('Set')), strlen('include'))); |
| 784 | - require_once PHP_SET_PATH . $fileNameBase . '.class.php'; |
|
| 784 | + require_once PHP_SET_PATH.$fileNameBase.'.class.php'; |
|
| 785 | 785 | return; |
| 786 | 786 | |
| 787 | 787 | case substr($name, -strlen('Set')) === 'Set': |
| 788 | - $includeMethod = 'include' . $name; |
|
| 788 | + $includeMethod = 'include'.$name; |
|
| 789 | 789 | $this->$includeMethod(); |
| 790 | - $setClassNameMethod = $name . 'ClassName'; |
|
| 790 | + $setClassNameMethod = $name.'ClassName'; |
|
| 791 | 791 | $className = $this->$setClassNameMethod(); |
| 792 | 792 | $set = new $className($this); |
| 793 | 793 | return $set; |
| 794 | 794 | |
| 795 | 795 | //case method_exists($this, $name . 'Set'): |
| 796 | 796 | default: |
| 797 | - $setName = $name . 'Set'; |
|
| 798 | - $recordClassNameMethod = $name . 'ClassName'; |
|
| 797 | + $setName = $name.'Set'; |
|
| 798 | + $recordClassNameMethod = $name.'ClassName'; |
|
| 799 | 799 | $recordClassName = $this->$recordClassNameMethod(); |
| 800 | 800 | if (isset($arguments[0])) { |
| 801 | 801 | if ($arguments[0] instanceof $recordClassName) { |