@@ -318,9 +318,9 @@ discard block |
||
| 318 | 318 | if (is_array($parameters)) { |
| 319 | 319 | $params = array(); |
| 320 | 320 | foreach ($parameters as $key => $value) { |
| 321 | - $params[] = $key . '=' . $value; |
|
| 321 | + $params[] = $key.'='.$value; |
|
| 322 | 322 | } |
| 323 | - $rawField .= ':' . implode(';', $params); |
|
| 323 | + $rawField .= ':'.implode(';', $params); |
|
| 324 | 324 | } |
| 325 | 325 | array_push($rawFields, $rawField); |
| 326 | 326 | $this->fields = implode(',', $rawFields); |
@@ -339,7 +339,7 @@ discard block |
||
| 339 | 339 | if (empty($rawField)) { |
| 340 | 340 | continue; |
| 341 | 341 | } |
| 342 | - list($fieldName, ) = explode(':', $rawField); |
|
| 342 | + list($fieldName,) = explode(':', $rawField); |
|
| 343 | 343 | |
| 344 | 344 | if ($removedFieldName == $fieldName) { |
| 345 | 345 | continue; |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | bab_Widgets()->includePhpClass('widget_InputWidget'); |
| 27 | 27 | bab_Widgets()->includePhpClass('widget_TableModelView'); |
| 28 | 28 | |
| 29 | -require_once dirname(__FILE__) . '/ui.helpers.php'; |
|
| 29 | +require_once dirname(__FILE__).'/ui.helpers.php'; |
|
| 30 | 30 | |
| 31 | 31 | /** |
| 32 | 32 | * @return Widget_Form |
@@ -680,7 +680,7 @@ discard block |
||
| 680 | 680 | continue; |
| 681 | 681 | } |
| 682 | 682 | |
| 683 | - list(, , $nbCol) = explode('-', $customSection->sizePolicy); |
|
| 683 | + list(,, $nbCol) = explode('-', $customSection->sizePolicy); |
|
| 684 | 684 | |
| 685 | 685 | if ($currentColumn + $nbCol > 12) { |
| 686 | 686 | $this->addItem($row); |
@@ -708,7 +708,7 @@ discard block |
||
| 708 | 708 | $parameters = $displayField['parameters']; |
| 709 | 709 | $classname = isset($parameters['classname']) ? $parameters['classname'] : ''; |
| 710 | 710 | $label = isset($parameters['label']) && $parameters['label'] !== '__' ? $parameters['label'] : ''; |
| 711 | - $displayFieldMethod = '_' . $displayFieldName; |
|
| 711 | + $displayFieldMethod = '_'.$displayFieldName; |
|
| 712 | 712 | |
| 713 | 713 | if (method_exists($this, $displayFieldMethod)) { |
| 714 | 714 | $widget = $this->$displayFieldMethod($customSection); |
@@ -766,7 +766,7 @@ discard block |
||
| 766 | 766 | $parameters = $displayField['parameters']; |
| 767 | 767 | $classname = isset($parameters['classname']) ? $parameters['classname'] : ''; |
| 768 | 768 | $label = isset($parameters['label']) && $parameters['label'] !== '__' ? $parameters['label'] : ''; |
| 769 | - $displayFieldMethod = '_' . $displayFieldName; |
|
| 769 | + $displayFieldMethod = '_'.$displayFieldName; |
|
| 770 | 770 | |
| 771 | 771 | if (method_exists($this, $displayFieldMethod)) { |
| 772 | 772 | $widget = $this->$displayFieldMethod($customSection); |
@@ -1036,7 +1036,7 @@ discard block |
||
| 1036 | 1036 | $row = $W->Items()->setSizePolicy('row'); |
| 1037 | 1037 | foreach ($customSections as $customSection) { |
| 1038 | 1038 | |
| 1039 | - list(, , $nbCol) = explode('-', $customSection->sizePolicy); |
|
| 1039 | + list(,, $nbCol) = explode('-', $customSection->sizePolicy); |
|
| 1040 | 1040 | |
| 1041 | 1041 | if ($currentColumn + $nbCol > 12) { |
| 1042 | 1042 | $this->addItem($row); |
@@ -1063,7 +1063,7 @@ discard block |
||
| 1063 | 1063 | $parameters = $displayField['parameters']; |
| 1064 | 1064 | $classname = isset($parameters['classname']) ? $parameters['classname'] : ''; |
| 1065 | 1065 | $label = isset($parameters['label']) ? $parameters['label'] : ''; |
| 1066 | - $displayFieldMethod = '_' . $displayFieldName; |
|
| 1066 | + $displayFieldMethod = '_'.$displayFieldName; |
|
| 1067 | 1067 | |
| 1068 | 1068 | if (method_exists($this, $displayFieldMethod)) { |
| 1069 | 1069 | $value = $this->$displayFieldMethod($customSection); |
@@ -1154,7 +1154,7 @@ discard block |
||
| 1154 | 1154 | // we try to select one according to the classname prefix. |
| 1155 | 1155 | list($prefix) = explode('_', get_class($this)); |
| 1156 | 1156 | $functionalityName = ucwords($prefix); |
| 1157 | - $this->app = @bab_functionality::get('App/' . $functionalityName); |
|
| 1157 | + $this->app = @bab_functionality::get('App/'.$functionalityName); |
|
| 1158 | 1158 | if (!$this->app) { |
| 1159 | 1159 | $this->app = @bab_functionality::get('App'); |
| 1160 | 1160 | } |
@@ -1215,7 +1215,7 @@ discard block |
||
| 1215 | 1215 | $this->setCurrentPage(isset($filter['pageNumber']) ? $filter['pageNumber'] : $pageNumber); |
| 1216 | 1216 | |
| 1217 | 1217 | if (isset($name)) { |
| 1218 | - $this->sortParameterName = $name . '[filter][sort]'; |
|
| 1218 | + $this->sortParameterName = $name.'[filter][sort]'; |
|
| 1219 | 1219 | } else { |
| 1220 | 1220 | $this->sortParameterName = 'filter[sort]'; |
| 1221 | 1221 | } |
@@ -1366,11 +1366,11 @@ discard block |
||
| 1366 | 1366 | |
| 1367 | 1367 | foreach ($columns as $fieldName => $column) { |
| 1368 | 1368 | $field = $column->getField(); |
| 1369 | - if (! $column->isSearchable()) { |
|
| 1369 | + if (!$column->isSearchable()) { |
|
| 1370 | 1370 | continue; |
| 1371 | 1371 | } |
| 1372 | 1372 | |
| 1373 | - if (! ($field instanceof ORM_Field)) { |
|
| 1373 | + if (!($field instanceof ORM_Field)) { |
|
| 1374 | 1374 | $field = null; |
| 1375 | 1375 | } |
| 1376 | 1376 | |
@@ -1387,7 +1387,7 @@ discard block |
||
| 1387 | 1387 | |
| 1388 | 1388 | $formItem = $this->handleFilterLabel($label, $input); |
| 1389 | 1389 | $formItem->setSizePolicy('col-lg-2 col-md-3 col-sm-6 col-xs-12'); |
| 1390 | - $formItem->addClass('field_' . $fieldName); |
|
| 1390 | + $formItem->addClass('field_'.$fieldName); |
|
| 1391 | 1391 | |
| 1392 | 1392 | $mainSearch = (method_exists($column, 'isMainSearch') && $column->isMainSearch()); |
| 1393 | 1393 | |
@@ -1400,7 +1400,7 @@ discard block |
||
| 1400 | 1400 | } |
| 1401 | 1401 | |
| 1402 | 1402 | |
| 1403 | - if (! $this->submit) { |
|
| 1403 | + if (!$this->submit) { |
|
| 1404 | 1404 | $this->submit = $W->SubmitButton(); |
| 1405 | 1405 | $this->submit->setLabel(widget_translate('Filter')); |
| 1406 | 1406 | } |
@@ -1473,7 +1473,7 @@ discard block |
||
| 1473 | 1473 | // $this->setCurrentPage(isset($filter['pageNumber']) ? $filter['pageNumber'] : $pageNumber); |
| 1474 | 1474 | |
| 1475 | 1475 | if (isset($name)) { |
| 1476 | - $this->sortParameterName = $name . '[filter][sort]'; |
|
| 1476 | + $this->sortParameterName = $name.'[filter][sort]'; |
|
| 1477 | 1477 | } else { |
| 1478 | 1478 | $this->sortParameterName = 'filter[sort]'; |
| 1479 | 1479 | } |
@@ -1538,7 +1538,7 @@ discard block |
||
| 1538 | 1538 | |
| 1539 | 1539 | $tableview->setCurrentPage(isset($filterValues['pageNumber']) ? $filterValues['pageNumber'] : 0); |
| 1540 | 1540 | |
| 1541 | - $tableview->sortParameterName = $name . '[filter][sort]'; |
|
| 1541 | + $tableview->sortParameterName = $name.'[filter][sort]'; |
|
| 1542 | 1542 | |
| 1543 | 1543 | if (isset($filterValues['sort'])) { |
| 1544 | 1544 | $tableview->setSortField($filterValues['sort']); |
@@ -1837,7 +1837,7 @@ discard block |
||
| 1837 | 1837 | continue; |
| 1838 | 1838 | } |
| 1839 | 1839 | |
| 1840 | - list(, , $nbCol) = explode('-', $customSection->sizePolicy); |
|
| 1840 | + list(,, $nbCol) = explode('-', $customSection->sizePolicy); |
|
| 1841 | 1841 | |
| 1842 | 1842 | if ($currentColumn + $nbCol > 12) { |
| 1843 | 1843 | $this->addItem($row); |
@@ -1879,7 +1879,7 @@ discard block |
||
| 1879 | 1879 | $classname = isset($parameters['classname']) ? $parameters['classname'] : ''; |
| 1880 | 1880 | $label = isset($parameters['label']) ? $parameters['label'] : null; |
| 1881 | 1881 | |
| 1882 | - $displayFieldMethod = '_' . $displayFieldName; |
|
| 1882 | + $displayFieldMethod = '_'.$displayFieldName; |
|
| 1883 | 1883 | if (method_exists($this, $displayFieldMethod)) { |
| 1884 | 1884 | $item = $this->$displayFieldMethod($customSection, $label); |
| 1885 | 1885 | } else { |
@@ -1908,7 +1908,7 @@ discard block |
||
| 1908 | 1908 | } |
| 1909 | 1909 | } |
| 1910 | 1910 | |
| 1911 | - if ($currentColumn + $nbCol> 0) { |
|
| 1911 | + if ($currentColumn + $nbCol > 0) { |
|
| 1912 | 1912 | $this->addItem($row); |
| 1913 | 1913 | } |
| 1914 | 1914 | } |
@@ -2022,7 +2022,7 @@ discard block |
||
| 2022 | 2022 | |
| 2023 | 2023 | $displayable = $field->output($value); |
| 2024 | 2024 | |
| 2025 | - switch(true) { |
|
| 2025 | + switch (true) { |
|
| 2026 | 2026 | case ($field instanceof ORM_TextField): |
| 2027 | 2027 | $displayable = $W->RichText($displayable)->setRenderingOptions(BAB_HTML_ALL ^ BAB_HTML_P); |
| 2028 | 2028 | break; |
@@ -21,10 +21,10 @@ 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 $GLOBALS['babInstallPath'] . 'utilit/json.php'; |
|
| 24 | +require_once $GLOBALS['babInstallPath'].'utilit/controller.class.php'; |
|
| 25 | +require_once $GLOBALS['babInstallPath'].'utilit/json.php'; |
|
| 26 | 26 | |
| 27 | -require_once dirname(__FILE__). '/functions.php'; |
|
| 27 | +require_once dirname(__FILE__).'/functions.php'; |
|
| 28 | 28 | |
| 29 | 29 | $App = app_App(); |
| 30 | 30 | $App->includeBase(); |
@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | { |
| 35 | 35 | public function __construct($action, $code = 0) |
| 36 | 36 | { |
| 37 | - $message = 'Unknown method "' . $action->getController() . '::' . $action->getMethod() . '"'; |
|
| 37 | + $message = 'Unknown method "'.$action->getController().'::'.$action->getMethod().'"'; |
|
| 38 | 38 | parent::__construct($message, $code); |
| 39 | 39 | } |
| 40 | 40 | } |
@@ -183,11 +183,11 @@ discard block |
||
| 183 | 183 | // we try to select one according to the classname prefix. |
| 184 | 184 | list($prefix) = explode('_', __CLASS__); |
| 185 | 185 | $functionalityName = ucwords($prefix); |
| 186 | - $App = @bab_functionality::get('App/' . $functionalityName); |
|
| 186 | + $App = @bab_functionality::get('App/'.$functionalityName); |
|
| 187 | 187 | |
| 188 | 188 | if (!$App) |
| 189 | 189 | { |
| 190 | - throw new app_Exception('Faild to autodetect functionality App/' . $functionalityName.', the getInstance method is deprecated, use $App->ControllerProxy() instead'); |
|
| 190 | + throw new app_Exception('Faild to autodetect functionality App/'.$functionalityName.', the getInstance method is deprecated, use $App->ControllerProxy() instead'); |
|
| 191 | 191 | } |
| 192 | 192 | |
| 193 | 193 | $controller = $App->ControllerProxy($classname, $proxy); |
@@ -206,9 +206,9 @@ discard block |
||
| 206 | 206 | static function getProxyInstance(Func_App $App, $classname) |
| 207 | 207 | { |
| 208 | 208 | $class = new ReflectionClass($classname); |
| 209 | - $proxyClassname = $class->name . self::PROXY_CLASS_SUFFIX; |
|
| 209 | + $proxyClassname = $class->name.self::PROXY_CLASS_SUFFIX; |
|
| 210 | 210 | if (!class_exists($proxyClassname)) { |
| 211 | - $classStr = 'class ' . $proxyClassname . ' extends ' . $class->name . ' {' . "\n"; |
|
| 211 | + $classStr = 'class '.$proxyClassname.' extends '.$class->name.' {'."\n"; |
|
| 212 | 212 | $methods = $class->getMethods(); |
| 213 | 213 | |
| 214 | 214 | $classStr .= ' public function __construct(Func_App $App) { |
@@ -221,24 +221,24 @@ discard block |
||
| 221 | 221 | } |
| 222 | 222 | |
| 223 | 223 | |
| 224 | - $classStr .= ' public function ' . $method->name . '('; |
|
| 224 | + $classStr .= ' public function '.$method->name.'('; |
|
| 225 | 225 | $parameters = $method->getParameters(); |
| 226 | 226 | $parametersStr = array(); |
| 227 | 227 | foreach ($parameters as $parameter) { |
| 228 | 228 | |
| 229 | 229 | if ($parameter->isDefaultValueAvailable()) { |
| 230 | - $parametersStr[] = '$' . $parameter->name . ' = ' . var_export($parameter->getDefaultValue(), true); |
|
| 230 | + $parametersStr[] = '$'.$parameter->name.' = '.var_export($parameter->getDefaultValue(), true); |
|
| 231 | 231 | } else { |
| 232 | - $parametersStr[] = '$' . $parameter->name; |
|
| 232 | + $parametersStr[] = '$'.$parameter->name; |
|
| 233 | 233 | } |
| 234 | 234 | } |
| 235 | 235 | $classStr .= implode(', ', $parametersStr); |
| 236 | - $classStr .= ') {' . "\n"; |
|
| 237 | - $classStr .= ' $args = func_get_args();' . "\n"; |
|
| 238 | - $classStr .= ' return $this->getMethodAction(__FUNCTION__, $args);' . "\n"; |
|
| 239 | - $classStr .= ' }' . "\n"; |
|
| 236 | + $classStr .= ') {'."\n"; |
|
| 237 | + $classStr .= ' $args = func_get_args();'."\n"; |
|
| 238 | + $classStr .= ' return $this->getMethodAction(__FUNCTION__, $args);'."\n"; |
|
| 239 | + $classStr .= ' }'."\n"; |
|
| 240 | 240 | } |
| 241 | - $classStr .= '}' . "\n"; |
|
| 241 | + $classStr .= '}'."\n"; |
|
| 242 | 242 | |
| 243 | 243 | // We define the proxy class |
| 244 | 244 | eval($classStr); |
@@ -362,7 +362,7 @@ discard block |
||
| 362 | 362 | $action->setParameters($actionParams); |
| 363 | 363 | |
| 364 | 364 | |
| 365 | - list(,,$file) = explode('/', $App->controllerTg); |
|
| 365 | + list(,, $file) = explode('/', $App->controllerTg); |
|
| 366 | 366 | |
| 367 | 367 | $action->setParameter('addon', $App->getAddonName().'.'.$file); |
| 368 | 368 | $action->setParameter('idx', $idx); |
@@ -386,7 +386,7 @@ discard block |
||
| 386 | 386 | return false; |
| 387 | 387 | } |
| 388 | 388 | |
| 389 | - list($objectName, ) = explode('.', $method); |
|
| 389 | + list($objectName,) = explode('.', $method); |
|
| 390 | 390 | |
| 391 | 391 | if (!method_exists($this, $objectName)) { |
| 392 | 392 | header('HTTP/1.0 400 Bad Request'); |
@@ -394,7 +394,7 @@ discard block |
||
| 394 | 394 | } |
| 395 | 395 | |
| 396 | 396 | $objectController = $this->{$objectName}(false); |
| 397 | - if ( ! ($objectController instanceof app_Controller)) { |
|
| 397 | + if (!($objectController instanceof app_Controller)) { |
|
| 398 | 398 | return false; |
| 399 | 399 | } |
| 400 | 400 | |
@@ -408,7 +408,7 @@ discard block |
||
| 408 | 408 | } else { |
| 409 | 409 | if ($this->isAjaxRequest()) { |
| 410 | 410 | |
| 411 | - header($_SERVER['SERVER_PROTOCOL'] . ' 403 Forbidden', true, 403); |
|
| 411 | + header($_SERVER['SERVER_PROTOCOL'].' 403 Forbidden', true, 403); |
|
| 412 | 412 | |
| 413 | 413 | die( |
| 414 | 414 | bab_json_encode( |
@@ -429,7 +429,7 @@ discard block |
||
| 429 | 429 | } catch (app_SaveException $e) { |
| 430 | 430 | |
| 431 | 431 | if ($this->isAjaxRequest()) { |
| 432 | - header($_SERVER['SERVER_PROTOCOL'] . ' 403 Forbidden', true, 403); |
|
| 432 | + header($_SERVER['SERVER_PROTOCOL'].' 403 Forbidden', true, 403); |
|
| 433 | 433 | header('Cache-Control: no-cache, must-revalidate'); |
| 434 | 434 | header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); |
| 435 | 435 | header('Content-type: application/json'); |
@@ -484,7 +484,7 @@ discard block |
||
| 484 | 484 | if (method_exists($htmlCanvas, 'sendPageTitle')) { |
| 485 | 485 | $htmlCanvas->sendPageTitle($pageTitle); |
| 486 | 486 | } else { |
| 487 | - header('X-Cto-PageTitle: ' . $pageTitle); |
|
| 487 | + header('X-Cto-PageTitle: '.$pageTitle); |
|
| 488 | 488 | } |
| 489 | 489 | } |
| 490 | 490 | $html = $returnedValue->display($htmlCanvas); |
@@ -543,7 +543,7 @@ discard block |
||
| 543 | 543 | private function deletedItemPage(Widget_Action $action, app_DeletedRecordException $e) |
| 544 | 544 | { |
| 545 | 545 | if ($this->isAjaxRequest()) { |
| 546 | - header($_SERVER['SERVER_PROTOCOL'] . ' 403 Forbidden', true, 403); |
|
| 546 | + header($_SERVER['SERVER_PROTOCOL'].' 403 Forbidden', true, 403); |
|
| 547 | 547 | header('Cache-Control: no-cache, must-revalidate'); |
| 548 | 548 | header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); |
| 549 | 549 | header('Content-type: application/json'); |
@@ -560,7 +560,7 @@ discard block |
||
| 560 | 560 | ); |
| 561 | 561 | |
| 562 | 562 | } |
| 563 | - header($_SERVER['SERVER_PROTOCOL'] . ' 404 Not Found', true, 404); |
|
| 563 | + header($_SERVER['SERVER_PROTOCOL'].' 404 Not Found', true, 404); |
|
| 564 | 564 | |
| 565 | 565 | $App = $this->App(); |
| 566 | 566 | $W = bab_Widgets(); |
@@ -594,7 +594,7 @@ discard block |
||
| 594 | 594 | private function notFoundPage(Widget_Action $action, app_NotFoundException $e) |
| 595 | 595 | { |
| 596 | 596 | if ($this->isAjaxRequest()) { |
| 597 | - $message = sprintf(app_translate('This %s does not exists'), $e->getObjectTitle() . ' (' . $e->getId() . ')'); |
|
| 597 | + $message = sprintf(app_translate('This %s does not exists'), $e->getObjectTitle().' ('.$e->getId().')'); |
|
| 598 | 598 | $json = array( |
| 599 | 599 | 'messages' => array( |
| 600 | 600 | array( |
@@ -606,7 +606,7 @@ discard block |
||
| 606 | 606 | echo bab_json_encode($json); |
| 607 | 607 | die; |
| 608 | 608 | } |
| 609 | - header($_SERVER['SERVER_PROTOCOL'] . ' 404 Not Found', true, 404); |
|
| 609 | + header($_SERVER['SERVER_PROTOCOL'].' 404 Not Found', true, 404); |
|
| 610 | 610 | header('Cache-Control: no-cache, must-revalidate'); |
| 611 | 611 | header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); |
| 612 | 612 | |
@@ -626,14 +626,14 @@ discard block |
||
| 626 | 626 | |
| 627 | 627 | private function errorPage(Exception $e) |
| 628 | 628 | { |
| 629 | - header($_SERVER['SERVER_PROTOCOL'] . ' 500 Internal server error', true, 500); |
|
| 629 | + header($_SERVER['SERVER_PROTOCOL'].' 500 Internal server error', true, 500); |
|
| 630 | 630 | |
| 631 | - require_once $GLOBALS['babInstallPath'] . 'utilit/uiutil.php'; |
|
| 631 | + require_once $GLOBALS['babInstallPath'].'utilit/uiutil.php'; |
|
| 632 | 632 | $popup = new babBodyPopup(); |
| 633 | 633 | $popup->babEcho( |
| 634 | - '<h1>' . $this->App()->translate('There was a problem when trying to perform this operation') . '</h1>' |
|
| 635 | - . '<h2 class="error">' . $this->App()->translate('Additional debugging information:') . '</h2>' |
|
| 636 | - . '<p class="error">' . $e->getMessage() . ' ' . $e->getFile() . ' ' . $e->getLine() . ' ' . $e->getTraceAsString() . '</p>' |
|
| 634 | + '<h1>'.$this->App()->translate('There was a problem when trying to perform this operation').'</h1>' |
|
| 635 | + . '<h2 class="error">'.$this->App()->translate('Additional debugging information:').'</h2>' |
|
| 636 | + . '<p class="error">'.$e->getMessage().' '.$e->getFile().' '.$e->getLine().' '.$e->getTraceAsString().'</p>' |
|
| 637 | 637 | ); |
| 638 | 638 | |
| 639 | 639 | |
@@ -678,7 +678,7 @@ discard block |
||
| 678 | 678 | */ |
| 679 | 679 | public function CustomField($proxy = true) |
| 680 | 680 | { |
| 681 | - require_once APP_CTRL_PATH . 'customfield.ctrl.php'; |
|
| 681 | + require_once APP_CTRL_PATH.'customfield.ctrl.php'; |
|
| 682 | 682 | return $this->App()->ControllerProxy('app_CtrlCustomField', $proxy); |
| 683 | 683 | } |
| 684 | 684 | |
@@ -689,7 +689,7 @@ discard block |
||
| 689 | 689 | */ |
| 690 | 690 | public function CustomSection($proxy = true) |
| 691 | 691 | { |
| 692 | - require_once APP_CTRL_PATH . 'customsection.ctrl.php'; |
|
| 692 | + require_once APP_CTRL_PATH.'customsection.ctrl.php'; |
|
| 693 | 693 | return $this->App()->ControllerProxy('app_CtrlCustomSection', $proxy); |
| 694 | 694 | } |
| 695 | 695 | } |
@@ -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; |
@@ -104,9 +104,9 @@ discard block |
||
| 104 | 104 | if ($showLabel) { |
| 105 | 105 | $text = $actions->getTitle(); |
| 106 | 106 | } |
| 107 | - $html = '<li><a class="icon ' . $actions->getIcon() . '" href="' . $actions->url() . '">' . $text . '</a></li>'; |
|
| 107 | + $html = '<li><a class="icon '.$actions->getIcon().'" href="'.$actions->url().'">'.$text.'</a></li>'; |
|
| 108 | 108 | } elseif ($actions instanceof Widget_Link) { |
| 109 | - $html = '<li>' . $actions->display($canvas) . '</li>'; |
|
| 109 | + $html = '<li>'.$actions->display($canvas).'</li>'; |
|
| 110 | 110 | } elseif (is_array($actions)) { |
| 111 | 111 | if (isset($actions['items'])) { |
| 112 | 112 | $items = $actions['items']; |
@@ -119,10 +119,10 @@ discard block |
||
| 119 | 119 | if (isset($actions['icon'])) { |
| 120 | 120 | |
| 121 | 121 | $html = '<li class="dropdown">' |
| 122 | - . '<a href="#" class="' . $actions['icon'] . ' icon dropdown-toogle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">' |
|
| 122 | + . '<a href="#" class="'.$actions['icon'].' icon dropdown-toogle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">' |
|
| 123 | 123 | . ($actions['icon'] === 'actions-context-menu'/*Func_Icons::ACTIONS_CONTEXT_MENU*/ ? '' : '<span class="caret"></span>') |
| 124 | 124 | . '</a>' |
| 125 | - . '<ul class="dropdown-menu dropdown-menu-right ' . Func_Icons::ICON_LEFT_SYMBOLIC . '">' |
|
| 125 | + . '<ul class="dropdown-menu dropdown-menu-right '.Func_Icons::ICON_LEFT_SYMBOLIC.'">' |
|
| 126 | 126 | . $html |
| 127 | 127 | . '</ul>'; |
| 128 | 128 | } |
@@ -145,7 +145,7 @@ discard block |
||
| 145 | 145 | |
| 146 | 146 | $recordClassname = $this->getRecordClassName(); |
| 147 | 147 | |
| 148 | - $viewClassname = $recordClassname . 'TableView'; |
|
| 148 | + $viewClassname = $recordClassname.'TableView'; |
|
| 149 | 149 | if (method_exists($Ui, $viewClassname)) { |
| 150 | 150 | $types['table'] = array( |
| 151 | 151 | 'classname' => $viewClassname, |
@@ -154,7 +154,7 @@ discard block |
||
| 154 | 154 | ); |
| 155 | 155 | } |
| 156 | 156 | |
| 157 | - $viewClassname = $recordClassname . 'CardsView'; |
|
| 157 | + $viewClassname = $recordClassname.'CardsView'; |
|
| 158 | 158 | if (method_exists($Ui, $viewClassname)) { |
| 159 | 159 | $types['cards'] = array( |
| 160 | 160 | 'classname' => $viewClassname, |
@@ -163,7 +163,7 @@ discard block |
||
| 163 | 163 | ); |
| 164 | 164 | } |
| 165 | 165 | |
| 166 | - $viewClassname = $recordClassname . 'MapView'; |
|
| 166 | + $viewClassname = $recordClassname.'MapView'; |
|
| 167 | 167 | if (method_exists($Ui, $viewClassname)) { |
| 168 | 168 | $types['map'] = array( |
| 169 | 169 | 'classname' => $viewClassname, |
@@ -172,7 +172,7 @@ discard block |
||
| 172 | 172 | ); |
| 173 | 173 | } |
| 174 | 174 | |
| 175 | - $viewClassname = $recordClassname . 'CalendarView'; |
|
| 175 | + $viewClassname = $recordClassname.'CalendarView'; |
|
| 176 | 176 | if (method_exists($Ui, $viewClassname)) { |
| 177 | 177 | $types['calendar'] = array( |
| 178 | 178 | 'classname' => $viewClassname, |
@@ -246,11 +246,11 @@ discard block |
||
| 246 | 246 | $recordSet = $this->getEditRecordSet(); |
| 247 | 247 | |
| 248 | 248 | $recordClassname = $this->getRecordClassName(); |
| 249 | - $editorClassname = $recordClassname . 'SectionEditor'; |
|
| 249 | + $editorClassname = $recordClassname.'SectionEditor'; |
|
| 250 | 250 | /* @var $editor app_RecordEditor */ |
| 251 | 251 | $editor = $Ui->$editorClassname(); |
| 252 | 252 | if (!isset($itemId)) { |
| 253 | - $itemId = $this->getClass() . '_' . __FUNCTION__; |
|
| 253 | + $itemId = $this->getClass().'_'.__FUNCTION__; |
|
| 254 | 254 | } |
| 255 | 255 | $editor->setId($itemId); |
| 256 | 256 | $editor->setHiddenValue('tg', $App->controllerTg); |
@@ -293,7 +293,7 @@ discard block |
||
| 293 | 293 | public function getModelViewDefaultId($itemId = null) |
| 294 | 294 | { |
| 295 | 295 | if (!isset($itemId)) { |
| 296 | - $itemId = $this->getClass() . '_modelView'; |
|
| 296 | + $itemId = $this->getClass().'_modelView'; |
|
| 297 | 297 | } |
| 298 | 298 | |
| 299 | 299 | return $itemId; |
@@ -327,20 +327,20 @@ discard block |
||
| 327 | 327 | |
| 328 | 328 | switch ($type) { |
| 329 | 329 | case 'cards': |
| 330 | - $tableviewClassname = $recordClassname . 'CardsView'; |
|
| 330 | + $tableviewClassname = $recordClassname.'CardsView'; |
|
| 331 | 331 | break; |
| 332 | 332 | |
| 333 | 333 | case 'map': |
| 334 | - $tableviewClassname = $recordClassname . 'MapView'; |
|
| 334 | + $tableviewClassname = $recordClassname.'MapView'; |
|
| 335 | 335 | break; |
| 336 | 336 | |
| 337 | 337 | case 'calendar': |
| 338 | - $tableviewClassname = $recordClassname . 'CalendarView'; |
|
| 338 | + $tableviewClassname = $recordClassname.'CalendarView'; |
|
| 339 | 339 | break; |
| 340 | 340 | |
| 341 | 341 | case 'table': |
| 342 | 342 | default: |
| 343 | - $tableviewClassname = $recordClassname . 'TableView'; |
|
| 343 | + $tableviewClassname = $recordClassname.'TableView'; |
|
| 344 | 344 | break; |
| 345 | 345 | } |
| 346 | 346 | |
@@ -406,10 +406,10 @@ discard block |
||
| 406 | 406 | $Ui = $App->Ui(); |
| 407 | 407 | |
| 408 | 408 | $recordClassname = $this->getRecordClassName(); |
| 409 | - $editorClassname = $recordClassname . 'Editor'; |
|
| 409 | + $editorClassname = $recordClassname.'Editor'; |
|
| 410 | 410 | $editor = $Ui->$editorClassname(); |
| 411 | 411 | if (!isset($itemId)) { |
| 412 | - $itemId = $this->getClass() . '_' . __FUNCTION__; |
|
| 412 | + $itemId = $this->getClass().'_'.__FUNCTION__; |
|
| 413 | 413 | } |
| 414 | 414 | $editor->setId($itemId); |
| 415 | 415 | $editor->setHiddenValue('tg', $App->controllerTg); |
@@ -454,7 +454,7 @@ discard block |
||
| 454 | 454 | $W->Link( |
| 455 | 455 | '', |
| 456 | 456 | $proxy->setFilteredViewType($tableView->getId(), $viewTypeId) |
| 457 | - )->addClass('icon', $viewType['icon'] . ($filteredViewType=== $viewTypeId ? ' active' : '')) |
|
| 457 | + )->addClass('icon', $viewType['icon'].($filteredViewType === $viewTypeId ? ' active' : '')) |
|
| 458 | 458 | // ->setSizePolicy('btn btn-xs btn-default ' . ($filteredViewType === $viewTypeId ? 'active' : '')) |
| 459 | 459 | ->setTitle($viewType['label']) |
| 460 | 460 | ->setAjaxAction() |
@@ -498,7 +498,7 @@ discard block |
||
| 498 | 498 | |
| 499 | 499 | $filterVisibility = $this->getFilterVisibility($itemId); |
| 500 | 500 | $filterVisibility = !$filterVisibility; |
| 501 | - $W->setUserConfiguration($itemId . '/filterVisibility', $filterVisibility); |
|
| 501 | + $W->setUserConfiguration($itemId.'/filterVisibility', $filterVisibility); |
|
| 502 | 502 | |
| 503 | 503 | return true; |
| 504 | 504 | } |
@@ -511,10 +511,10 @@ discard block |
||
| 511 | 511 | protected function getFilterVisibility($itemId) |
| 512 | 512 | { |
| 513 | 513 | $W = bab_Widgets(); |
| 514 | - $filterVisibility = $W->getUserConfiguration($itemId . '/filterVisibility'); |
|
| 514 | + $filterVisibility = $W->getUserConfiguration($itemId.'/filterVisibility'); |
|
| 515 | 515 | if (!isset($filterVisibility)) { |
| 516 | 516 | $filterVisibility = false; |
| 517 | - $W->setUserConfiguration($itemId . '/filterVisibility', $filterVisibility); |
|
| 517 | + $W->setUserConfiguration($itemId.'/filterVisibility', $filterVisibility); |
|
| 518 | 518 | } |
| 519 | 519 | return $filterVisibility; |
| 520 | 520 | } |
@@ -528,7 +528,7 @@ discard block |
||
| 528 | 528 | protected function getFilteredViewType($itemId) |
| 529 | 529 | { |
| 530 | 530 | $W = bab_Widgets(); |
| 531 | - $type = $W->getUserConfiguration($itemId . '/viewType'); |
|
| 531 | + $type = $W->getUserConfiguration($itemId.'/viewType'); |
|
| 532 | 532 | if (!isset($type)) { |
| 533 | 533 | $type = 'table'; |
| 534 | 534 | } |
@@ -544,7 +544,7 @@ discard block |
||
| 544 | 544 | public function setFilteredViewType($itemId, $type = null) |
| 545 | 545 | { |
| 546 | 546 | $W = bab_Widgets(); |
| 547 | - $W->setUserConfiguration($itemId . '/viewType', $type); |
|
| 547 | + $W->setUserConfiguration($itemId.'/viewType', $type); |
|
| 548 | 548 | |
| 549 | 549 | return true; |
| 550 | 550 | } |
@@ -686,17 +686,17 @@ discard block |
||
| 686 | 686 | |
| 687 | 687 | switch ($format) { |
| 688 | 688 | case 'xlsx': |
| 689 | - $tableview->downloadXlsx($filename . '.xlsx'); |
|
| 689 | + $tableview->downloadXlsx($filename.'.xlsx'); |
|
| 690 | 690 | break; |
| 691 | 691 | case 'xls': |
| 692 | - $tableview->downloadExcel($filename . '.xls'); |
|
| 692 | + $tableview->downloadExcel($filename.'.xls'); |
|
| 693 | 693 | break; |
| 694 | 694 | case 'ssv': |
| 695 | - $tableview->downloadCsv($filename . '.csv', ';', $inline, 'Windows-1252'); |
|
| 695 | + $tableview->downloadCsv($filename.'.csv', ';', $inline, 'Windows-1252'); |
|
| 696 | 696 | break; |
| 697 | 697 | case 'csv': |
| 698 | 698 | default: |
| 699 | - $tableview->downloadCsv($filename . '.csv', ',', $inline, bab_charset::getIso()); |
|
| 699 | + $tableview->downloadCsv($filename.'.csv', ',', $inline, bab_charset::getIso()); |
|
| 700 | 700 | break; |
| 701 | 701 | } |
| 702 | 702 | } |
@@ -725,7 +725,7 @@ discard block |
||
| 725 | 725 | $Ui = $App->Ui(); |
| 726 | 726 | |
| 727 | 727 | $recordClassname = $this->getRecordClassName(); |
| 728 | - $fullFrameClassname = $recordClassname . 'FullFrame'; |
|
| 728 | + $fullFrameClassname = $recordClassname.'FullFrame'; |
|
| 729 | 729 | $fullFrame = $Ui->$fullFrameClassname($record, $view); |
| 730 | 730 | |
| 731 | 731 | |
@@ -888,7 +888,7 @@ discard block |
||
| 888 | 888 | |
| 889 | 889 | $recordTitle = $record->getRecordTitle(); |
| 890 | 890 | |
| 891 | - $message = sprintf($App->translate('%s has been deleted'), $App->translate($recordSet->getDescription()) . ' "' . $recordTitle . '"'); |
|
| 891 | + $message = sprintf($App->translate('%s has been deleted'), $App->translate($recordSet->getDescription()).' "'.$recordTitle.'"'); |
|
| 892 | 892 | return $message; |
| 893 | 893 | } |
| 894 | 894 | |
@@ -987,7 +987,7 @@ discard block |
||
| 987 | 987 | $this->addMessage($message); |
| 988 | 988 | } |
| 989 | 989 | |
| 990 | - $this->addReloadSelector('.depends-' . $this->getRecordClassName()); |
|
| 990 | + $this->addReloadSelector('.depends-'.$this->getRecordClassName()); |
|
| 991 | 991 | return true; |
| 992 | 992 | } |
| 993 | 993 | |
@@ -1019,7 +1019,7 @@ discard block |
||
| 1019 | 1019 | $this->addMessage($deletedMessage); |
| 1020 | 1020 | } |
| 1021 | 1021 | |
| 1022 | - $this->addReloadSelector('.depends-' . strtolower($record->getClassName())); |
|
| 1022 | + $this->addReloadSelector('.depends-'.strtolower($record->getClassName())); |
|
| 1023 | 1023 | |
| 1024 | 1024 | return true; |
| 1025 | 1025 | } |
@@ -1050,7 +1050,7 @@ discard block |
||
| 1050 | 1050 | |
| 1051 | 1051 | $recordTitle = $record->getRecordTitle(); |
| 1052 | 1052 | |
| 1053 | - $subTitle = $App->translate($recordSet->getDescription()) . ' "' . $recordTitle . '"'; |
|
| 1053 | + $subTitle = $App->translate($recordSet->getDescription()).' "'.$recordTitle.'"'; |
|
| 1054 | 1054 | $form->addItem($W->Title($subTitle, 5)); |
| 1055 | 1055 | |
| 1056 | 1056 | $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_CTRL_PATH . '/record.ctrl.php'; |
|
| 25 | +require_once APP_CTRL_PATH.'/record.ctrl.php'; |
|
| 26 | 26 | |
| 27 | 27 | |
| 28 | 28 | /** |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | foreach ($allViewSections as $viewSection) {
|
| 59 | 59 | $fields = $viewSection->getFields(); |
| 60 | 60 | foreach ($fields as $field) {
|
| 61 | - $allViewFieldNames[$field['fieldname']] = $viewSection->view . ',' . $viewSection->rank . ',' . $viewSection->id; |
|
| 61 | + $allViewFieldNames[$field['fieldname']] = $viewSection->view.','.$viewSection->rank.','.$viewSection->id; |
|
| 62 | 62 | } |
| 63 | 63 | } |
| 64 | 64 | |
@@ -81,7 +81,7 @@ discard block |
||
| 81 | 81 | bab_Sort::asort($availableFields, 'description', bab_Sort::CASE_INSENSITIVE); |
| 82 | 82 | |
| 83 | 83 | foreach ($availableFields as $field) {
|
| 84 | - $fieldName = $field['name']; |
|
| 84 | + $fieldName = $field['name']; |
|
| 85 | 85 | $fieldDescription = $field['description']; |
| 86 | 86 | |
| 87 | 87 | $used = isset($allViewFieldNames[$fieldName]); |
@@ -390,7 +390,7 @@ discard block |
||
| 390 | 390 | $recordSet = $this->getRecordSet(); |
| 391 | 391 | $record = $recordSet->request($id); |
| 392 | 392 | |
| 393 | - $object = $record->object . 'Set'; |
|
| 393 | + $object = $record->object.'Set'; |
|
| 394 | 394 | |
| 395 | 395 | $objectRecordSet = $App->$object(); |
| 396 | 396 | |
@@ -464,7 +464,7 @@ discard block |
||
| 464 | 464 | $recordSet = $this->getRecordSet(); |
| 465 | 465 | $record = $recordSet->request($data['id']); |
| 466 | 466 | |
| 467 | - $object = $record->object . 'Set'; |
|
| 467 | + $object = $record->object.'Set'; |
|
| 468 | 468 | |
| 469 | 469 | $objectRecordSet = $App->$object(); |
| 470 | 470 | |
@@ -536,17 +536,17 @@ discard block |
||
| 536 | 536 | $nbCol = 0; |
| 537 | 537 | foreach ($customSections as $customSection) {
|
| 538 | 538 | |
| 539 | - list(, , $nbCol) = explode('-', $customSection->sizePolicy);
|
|
| 539 | + list(,, $nbCol) = explode('-', $customSection->sizePolicy);
|
|
| 540 | 540 | |
| 541 | 541 | $currentColumn += $nbCol; |
| 542 | 542 | |
| 543 | 543 | $sectionSection = $W->Section( |
| 544 | - $customSection->name . ' (' . $customSection->rank . ')',
|
|
| 545 | - $sectionBox = $W->VBoxItems($W->Hidden()->setName('#' . $customSection->id))
|
|
| 544 | + $customSection->name.' ('.$customSection->rank.')',
|
|
| 545 | + $sectionBox = $W->VBoxItems($W->Hidden()->setName('#'.$customSection->id))
|
|
| 546 | 546 | ); |
| 547 | 547 | $sectionSection->addClass('app-custom-section');
|
| 548 | 548 | $sectionSection->addClass($customSection->classname); |
| 549 | - $sectionSection->setSizePolicy($customSection->sizePolicy . ' widget-sameheight'); |
|
| 549 | + $sectionSection->setSizePolicy($customSection->sizePolicy.' widget-sameheight'); |
|
| 550 | 550 | |
| 551 | 551 | $row->addItem($sectionSection); |
| 552 | 552 | |
@@ -588,7 +588,7 @@ discard block |
||
| 588 | 588 | $fieldItem = $W->HBoxItems( |
| 589 | 589 | $W->Label($fieldDescription)->setSizePolicy('maximum')->addClass('icon', Func_Icons::ACTIONS_ZOOM_FIT_HEIGHT),
|
| 590 | 590 | $W->HBoxItems( |
| 591 | - $W->Hidden()->setName($customSection->id . '.' . $fieldId)->setValue($field['name']), |
|
| 591 | + $W->Hidden()->setName($customSection->id.'.'.$fieldId)->setValue($field['name']), |
|
| 592 | 592 | $W->Link('', $customSectionCtrl->editDisplayField($customSection->id, $field['name']))
|
| 593 | 593 | ->addClass('icon', Func_Icons::ACTIONS_DOCUMENT_EDIT)
|
| 594 | 594 | ->setOpenMode(Widget_Link::OPEN_DIALOG), |
@@ -665,7 +665,7 @@ discard block |
||
| 665 | 665 | } |
| 666 | 666 | |
| 667 | 667 | header('Content-type: application/json');
|
| 668 | - header('Content-Disposition: attachment; filename="' . $object . '.' . ($view === '' ? 'default' : $view) . '.json"'."\n");
|
|
| 668 | + header('Content-Disposition: attachment; filename="'.$object.'.'.($view === '' ? 'default' : $view).'.json"'."\n");
|
|
| 669 | 669 | |
| 670 | 670 | $json = bab_json_encode($sectionsValues); |
| 671 | 671 | $json = bab_convertStringFromDatabase($json, bab_charset::UTF_8); |
@@ -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 | |
@@ -55,14 +55,14 @@ discard block |
||
| 55 | 55 | $this->addonName = 'libapp'; |
| 56 | 56 | $this->addonPrefix = 'app'; |
| 57 | 57 | |
| 58 | - $this->classPrefix = $this->addonPrefix . '_'; |
|
| 59 | - $this->controllerTg = 'addon/' . $this->addonName . '/main'; |
|
| 58 | + $this->classPrefix = $this->addonPrefix.'_'; |
|
| 59 | + $this->controllerTg = 'addon/'.$this->addonName.'/main'; |
|
| 60 | 60 | |
| 61 | 61 | $addon = bab_getAddonInfosInstance($this->addonName); |
| 62 | 62 | $this->phpPath = $addon->getPhpPath(); |
| 63 | 63 | $this->recordSetPath = $this->phpPath; |
| 64 | 64 | $this->ctrlPath = $this->phpPath; |
| 65 | - $this->uiPath = $this->phpPath . 'ui/'; |
|
| 65 | + $this->uiPath = $this->phpPath.'ui/'; |
|
| 66 | 66 | |
| 67 | 67 | $babDB = bab_getDB(); |
| 68 | 68 | |
@@ -109,8 +109,8 @@ discard block |
||
| 109 | 109 | public function getRecordSetPathname($class) |
| 110 | 110 | { |
| 111 | 111 | // $App->MyRecordSet() -> myrecord.class.php |
| 112 | - $file = strtolower(substr($class, strlen($this->classPrefix), -3)) . '.class.php'; |
|
| 113 | - return $this->recordSetPath . $file; |
|
| 112 | + $file = strtolower(substr($class, strlen($this->classPrefix), -3)).'.class.php'; |
|
| 113 | + return $this->recordSetPath.$file; |
|
| 114 | 114 | } |
| 115 | 115 | |
| 116 | 116 | /** |
@@ -122,8 +122,8 @@ discard block |
||
| 122 | 122 | public function getRecordPathname($class) |
| 123 | 123 | { |
| 124 | 124 | // $App->MyRecord() -> myrecord.class.php |
| 125 | - $file = strtolower(substr($class, strlen($this->classPrefix))) . '.class.php'; |
|
| 126 | - return $this->recordSetPath . $file; |
|
| 125 | + $file = strtolower(substr($class, strlen($this->classPrefix))).'.class.php'; |
|
| 126 | + return $this->recordSetPath.$file; |
|
| 127 | 127 | } |
| 128 | 128 | |
| 129 | 129 | /** |
@@ -227,7 +227,7 @@ discard block |
||
| 227 | 227 | |
| 228 | 228 | if (substr($method, 0, 7) === 'include' && substr($method, -3) === 'Set') { |
| 229 | 229 | $incl = $method; |
| 230 | - $classNameMethod = substr($method, strlen('include')) . 'ClassName'; |
|
| 230 | + $classNameMethod = substr($method, strlen('include')).'ClassName'; |
|
| 231 | 231 | |
| 232 | 232 | |
| 233 | 233 | $classname = $this->$classNameMethod(); |
@@ -249,7 +249,7 @@ discard block |
||
| 249 | 249 | // We need to revert to multilang fields before synchronizing. |
| 250 | 250 | $set->useLang(false); |
| 251 | 251 | } |
| 252 | - $sql .= $mysqlbackend->setToSql($set) . "\n"; |
|
| 252 | + $sql .= $mysqlbackend->setToSql($set)."\n"; |
|
| 253 | 253 | } |
| 254 | 254 | } |
| 255 | 255 | } |
@@ -280,7 +280,7 @@ discard block |
||
| 280 | 280 | |
| 281 | 281 | if (substr($method, 0, strlen('include')) === 'include' && substr($method, -strlen('Set')) === 'Set') { |
| 282 | 282 | $incl = $method; |
| 283 | - $classNameMethod = substr($method, strlen('include')) . 'ClassName'; |
|
| 283 | + $classNameMethod = substr($method, strlen('include')).'ClassName'; |
|
| 284 | 284 | |
| 285 | 285 | $classname = $this->$classNameMethod(); |
| 286 | 286 | |
@@ -294,7 +294,7 @@ discard block |
||
| 294 | 294 | |
| 295 | 295 | if (class_exists($classname) && method_exists($this, $call)) { |
| 296 | 296 | $set = $this->$call(); |
| 297 | - $sql .= $mysqlbackend->setToSql($set) . "\n"; |
|
| 297 | + $sql .= $mysqlbackend->setToSql($set)."\n"; |
|
| 298 | 298 | } |
| 299 | 299 | } |
| 300 | 300 | } |
@@ -308,7 +308,7 @@ discard block |
||
| 308 | 308 | |
| 309 | 309 | public function includeBase() |
| 310 | 310 | { |
| 311 | - require_once APP_PHP_PATH . 'base.class.php'; |
|
| 311 | + require_once APP_PHP_PATH.'base.class.php'; |
|
| 312 | 312 | } |
| 313 | 313 | |
| 314 | 314 | /** |
@@ -316,7 +316,7 @@ discard block |
||
| 316 | 316 | */ |
| 317 | 317 | public function includeRecordSet() |
| 318 | 318 | { |
| 319 | - require_once APP_SET_PATH . 'record.class.php'; |
|
| 319 | + require_once APP_SET_PATH.'record.class.php'; |
|
| 320 | 320 | } |
| 321 | 321 | |
| 322 | 322 | |
@@ -325,7 +325,7 @@ discard block |
||
| 325 | 325 | */ |
| 326 | 326 | public function includeTraceableRecordSet() |
| 327 | 327 | { |
| 328 | - require_once APP_SET_PATH . 'traceablerecord.class.php'; |
|
| 328 | + require_once APP_SET_PATH.'traceablerecord.class.php'; |
|
| 329 | 329 | } |
| 330 | 330 | |
| 331 | 331 | |
@@ -341,7 +341,7 @@ discard block |
||
| 341 | 341 | */ |
| 342 | 342 | public function includeLogSet() |
| 343 | 343 | { |
| 344 | - require_once APP_SET_PATH . 'log.class.php'; |
|
| 344 | + require_once APP_SET_PATH.'log.class.php'; |
|
| 345 | 345 | } |
| 346 | 346 | |
| 347 | 347 | /** |
@@ -357,7 +357,7 @@ discard block |
||
| 357 | 357 | */ |
| 358 | 358 | public function LogSetClassName() |
| 359 | 359 | { |
| 360 | - return $this->LogClassName() . 'Set'; |
|
| 360 | + return $this->LogClassName().'Set'; |
|
| 361 | 361 | } |
| 362 | 362 | |
| 363 | 363 | /** |
@@ -379,7 +379,7 @@ discard block |
||
| 379 | 379 | */ |
| 380 | 380 | public function includeLinkSet() |
| 381 | 381 | { |
| 382 | - require_once APP_SET_PATH . 'link.class.php'; |
|
| 382 | + require_once APP_SET_PATH.'link.class.php'; |
|
| 383 | 383 | } |
| 384 | 384 | |
| 385 | 385 | /** |
@@ -395,7 +395,7 @@ discard block |
||
| 395 | 395 | */ |
| 396 | 396 | public function LinkSetClassName() |
| 397 | 397 | { |
| 398 | - return $this->LinkClassName() . 'Set'; |
|
| 398 | + return $this->LinkClassName().'Set'; |
|
| 399 | 399 | } |
| 400 | 400 | |
| 401 | 401 | /** |
@@ -429,7 +429,7 @@ discard block |
||
| 429 | 429 | return null; |
| 430 | 430 | } |
| 431 | 431 | list($classname, $id) = $refParts; |
| 432 | - $classSet = $classname . 'Set'; |
|
| 432 | + $classSet = $classname.'Set'; |
|
| 433 | 433 | $set = $this->$classSet(); |
| 434 | 434 | if (isset($set)) { |
| 435 | 435 | return $set->get($id); |
@@ -448,7 +448,7 @@ discard block |
||
| 448 | 448 | { |
| 449 | 449 | $fullClassName = get_class($record); |
| 450 | 450 | list(, $className) = explode('_', $fullClassName); |
| 451 | - return $className . ':' . $record->id; |
|
| 451 | + return $className.':'.$record->id; |
|
| 452 | 452 | } |
| 453 | 453 | |
| 454 | 454 | |
@@ -539,16 +539,16 @@ discard block |
||
| 539 | 539 | */ |
| 540 | 540 | public function mailTo($addr, $subject = null, $body = null) |
| 541 | 541 | { |
| 542 | - $mailTo = 'mailto:' . $addr; |
|
| 542 | + $mailTo = 'mailto:'.$addr; |
|
| 543 | 543 | $parameters = array(); |
| 544 | 544 | if (isset($subject)) { |
| 545 | - $parameters[] = 'subject=' . $subject; |
|
| 545 | + $parameters[] = 'subject='.$subject; |
|
| 546 | 546 | } |
| 547 | 547 | if (isset($body)) { |
| 548 | - $parameters[] = 'body=' . $body; |
|
| 548 | + $parameters[] = 'body='.$body; |
|
| 549 | 549 | } |
| 550 | 550 | if (!empty($parameters)) { |
| 551 | - $mailTo .= '?' . implode('&', $parameters); |
|
| 551 | + $mailTo .= '?'.implode('&', $parameters); |
|
| 552 | 552 | } |
| 553 | 553 | |
| 554 | 554 | return $mailTo; |
@@ -599,7 +599,7 @@ discard block |
||
| 599 | 599 | } |
| 600 | 600 | |
| 601 | 601 | $number = number_format($number, $decimals, ',', ' '); |
| 602 | - return str_replace(' ', bab_nbsp(), $number . ' ' . $prefix . $unitSymbol); |
|
| 602 | + return str_replace(' ', bab_nbsp(), $number.' '.$prefix.$unitSymbol); |
|
| 603 | 603 | } |
| 604 | 604 | |
| 605 | 605 | |
@@ -619,7 +619,7 @@ discard block |
||
| 619 | 619 | } |
| 620 | 620 | |
| 621 | 621 | if (!isset($format)) { |
| 622 | - $format = bab_registry::get('/' . $this->addonName . '/numberFormat', $PhoneNumber->getDefaultFormat()); |
|
| 622 | + $format = bab_registry::get('/'.$this->addonName.'/numberFormat', $PhoneNumber->getDefaultFormat()); |
|
| 623 | 623 | } |
| 624 | 624 | $phoneNumberUtil = $PhoneNumber->PhoneNumberUtil(); |
| 625 | 625 | |
@@ -640,7 +640,7 @@ discard block |
||
| 640 | 640 | */ |
| 641 | 641 | public function includeController() |
| 642 | 642 | { |
| 643 | - require_once APP_PHP_PATH . '/controller.class.php'; |
|
| 643 | + require_once APP_PHP_PATH.'/controller.class.php'; |
|
| 644 | 644 | } |
| 645 | 645 | |
| 646 | 646 | |
@@ -649,7 +649,7 @@ discard block |
||
| 649 | 649 | */ |
| 650 | 650 | public function includeRecordController() |
| 651 | 651 | { |
| 652 | - require_once APP_CTRL_PATH . '/record.ctrl.php'; |
|
| 652 | + require_once APP_CTRL_PATH.'/record.ctrl.php'; |
|
| 653 | 653 | } |
| 654 | 654 | |
| 655 | 655 | |
@@ -689,7 +689,7 @@ discard block |
||
| 689 | 689 | */ |
| 690 | 690 | public function includeUi() |
| 691 | 691 | { |
| 692 | - require_once APP_UI_PATH . 'ui.class.php'; |
|
| 692 | + require_once APP_UI_PATH.'ui.class.php'; |
|
| 693 | 693 | } |
| 694 | 694 | |
| 695 | 695 | |
@@ -701,7 +701,7 @@ discard block |
||
| 701 | 701 | public function Ui() |
| 702 | 702 | { |
| 703 | 703 | $this->includeUi(); |
| 704 | - return bab_getInstance($this->classPrefix . 'Ui');//->setApp($this); |
|
| 704 | + return bab_getInstance($this->classPrefix.'Ui'); //->setApp($this); |
|
| 705 | 705 | } |
| 706 | 706 | |
| 707 | 707 | /** |
@@ -729,29 +729,29 @@ discard block |
||
| 729 | 729 | |
| 730 | 730 | case substr($name, -strlen('SetClassName')) === 'SetClassName': |
| 731 | 731 | $setName = substr($name, 0, strlen($name) - strlen('ClassName')); |
| 732 | - return $this->classPrefix . $setName; |
|
| 732 | + return $this->classPrefix.$setName; |
|
| 733 | 733 | |
| 734 | 734 | case substr($name, -strlen('ClassName')) === 'ClassName': |
| 735 | 735 | $recordName = substr($name, 0, strlen($name) - strlen('ClassName')); |
| 736 | - return $this->classPrefix . $recordName; |
|
| 736 | + return $this->classPrefix.$recordName; |
|
| 737 | 737 | |
| 738 | 738 | case substr($name, 0, strlen('include')) === 'include' && substr($name, -strlen('Set')) === 'Set': |
| 739 | 739 | $fileNameBase = strtolower(substr(substr($name, 0, strlen($name) - strlen('Set')), strlen('include'))); |
| 740 | - require_once PHP_SET_PATH . $fileNameBase . '.class.php'; |
|
| 740 | + require_once PHP_SET_PATH.$fileNameBase.'.class.php'; |
|
| 741 | 741 | return; |
| 742 | 742 | |
| 743 | 743 | case substr($name, -strlen('Set')) === 'Set': |
| 744 | - $includeMethod = 'include' . $name; |
|
| 744 | + $includeMethod = 'include'.$name; |
|
| 745 | 745 | $this->$includeMethod(); |
| 746 | - $setClassNameMethod = $name . 'ClassName'; |
|
| 746 | + $setClassNameMethod = $name.'ClassName'; |
|
| 747 | 747 | $className = $this->$setClassNameMethod(); |
| 748 | 748 | $set = new $className($this); |
| 749 | 749 | return $set; |
| 750 | 750 | |
| 751 | 751 | //case method_exists($this, $name . 'Set'): |
| 752 | 752 | default: |
| 753 | - $setName = $name . 'Set'; |
|
| 754 | - $recordClassNameMethod = $name . 'ClassName'; |
|
| 753 | + $setName = $name.'Set'; |
|
| 754 | + $recordClassNameMethod = $name.'ClassName'; |
|
| 755 | 755 | $recordClassName = $this->$recordClassNameMethod(); |
| 756 | 756 | if (isset($arguments[0])) { |
| 757 | 757 | if ($arguments[0] instanceof $recordClassName) { |