@@ -286,7 +286,7 @@ discard block |
||
| 286 | 286 | |
| 287 | 287 | // all widget have static id to not change id of others widgets in page |
| 288 | 288 | |
| 289 | - $infoMessages = $_SESSION['app_msginfo']; |
|
| 289 | + $infoMessages = $_SESSION['app_msginfo']; |
|
| 290 | 290 | foreach ($infoMessages as $infoLine) { |
| 291 | 291 | $this->App()->Controller()->addMessage($infoLine); |
| 292 | 292 | } |
@@ -304,6 +304,6 @@ discard block |
||
| 304 | 304 | * @see app.jquery.js#window.babAddonLibApp.numberFormat |
| 305 | 305 | */ |
| 306 | 306 | $this->setMetadata('numberFormatSeparator', mb_substr($str, 1, 1)); |
| 307 | - $this->setMetadata('numberFormatPrecision', mb_strlen($str) -2); |
|
| 307 | + $this->setMetadata('numberFormatPrecision', mb_strlen($str) - 2); |
|
| 308 | 308 | } |
| 309 | 309 | } |
@@ -239,7 +239,7 @@ discard block |
||
| 239 | 239 | return parent::delete($criteria); |
| 240 | 240 | } |
| 241 | 241 | |
| 242 | - require_once $GLOBALS['babInstallPath'] . '/utilit/dateTime.php'; |
|
| 242 | + require_once $GLOBALS['babInstallPath'].'/utilit/dateTime.php'; |
|
| 243 | 243 | $now = BAB_DateTime::now()->getIsoDateTime(); |
| 244 | 244 | |
| 245 | 245 | $records = $this->select($criteria); |
@@ -274,7 +274,7 @@ discard block |
||
| 274 | 274 | return parent::save($record); |
| 275 | 275 | } |
| 276 | 276 | |
| 277 | - require_once $GLOBALS['babInstallPath'] . '/utilit/dateTime.php'; |
|
| 277 | + require_once $GLOBALS['babInstallPath'].'/utilit/dateTime.php'; |
|
| 278 | 278 | |
| 279 | 279 | $now = BAB_DateTime::now()->getIsoDateTime(); |
| 280 | 280 | |
@@ -304,11 +304,11 @@ discard block |
||
| 304 | 304 | */ |
| 305 | 305 | private function uuid() |
| 306 | 306 | { |
| 307 | - return sprintf( '%04x%04x-%04x-%04x-%04x-%04x%04x%04x', |
|
| 308 | - mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ), |
|
| 309 | - mt_rand( 0, 0x0fff ) | 0x4000, |
|
| 310 | - mt_rand( 0, 0x3fff ) | 0x8000, |
|
| 311 | - mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ) ); |
|
| 307 | + return sprintf('%04x%04x-%04x-%04x-%04x-%04x%04x%04x', |
|
| 308 | + mt_rand(0, 0xffff), mt_rand(0, 0xffff), mt_rand(0, 0xffff), |
|
| 309 | + mt_rand(0, 0x0fff) | 0x4000, |
|
| 310 | + mt_rand(0, 0x3fff) | 0x8000, |
|
| 311 | + mt_rand(0, 0xffff), mt_rand(0, 0xffff), mt_rand(0, 0xffff)); |
|
| 312 | 312 | } |
| 313 | 313 | |
| 314 | 314 | /** |
@@ -398,7 +398,7 @@ discard block |
||
| 398 | 398 | |
| 399 | 399 | $linkSet->hasOne('sourceId', get_class($this)); |
| 400 | 400 | |
| 401 | - $criteria = $linkSet->targetClass->is(get_class($target)) |
|
| 401 | + $criteria = $linkSet->targetClass->is(get_class($target)) |
|
| 402 | 402 | ->_AND_($linkSet->targetId->is($target->id)) |
| 403 | 403 | ->_AND_($linkSet->sourceClass->is($this->getRecordClassName())); |
| 404 | 404 | if (isset($linkType)) { |
@@ -428,7 +428,7 @@ discard block |
||
| 428 | 428 | |
| 429 | 429 | $linkSet->hasOne('targetId', get_class($this)); |
| 430 | 430 | |
| 431 | - $criteria = $linkSet->sourceClass->is(get_class($source)) |
|
| 431 | + $criteria = $linkSet->sourceClass->is(get_class($source)) |
|
| 432 | 432 | ->_AND_($linkSet->sourceId->is($source->id)) |
| 433 | 433 | ->_AND_($linkSet->targetClass->is($this->getRecordClassName())); |
| 434 | 434 | if (isset($linkType)) { |
@@ -472,7 +472,7 @@ discard block |
||
| 472 | 472 | $sourcesCriteria[] = $linkSet->sourceClass->is($sourceClass)->_AND_($linkSet->sourceId->in($sourceIds)); |
| 473 | 473 | } |
| 474 | 474 | |
| 475 | - $criteria = $linkSet->all( |
|
| 475 | + $criteria = $linkSet->all( |
|
| 476 | 476 | $linkSet->targetClass->is($this->getRecordClassName()), |
| 477 | 477 | $linkSet->any($sourcesCriteria) |
| 478 | 478 | ); |
@@ -517,7 +517,7 @@ discard block |
||
| 517 | 517 | $targetsCriteria[] = $linkSet->targetClass->is($targetClass)->_AND_($linkSet->targetId->in($targetIds)); |
| 518 | 518 | } |
| 519 | 519 | |
| 520 | - $criteria = $linkSet->all( |
|
| 520 | + $criteria = $linkSet->all( |
|
| 521 | 521 | $linkSet->sourceClass->is($this->getRecordClassName()), |
| 522 | 522 | $linkSet->any($targetsCriteria) |
| 523 | 523 | ); |
@@ -575,7 +575,7 @@ discard block |
||
| 575 | 575 | { |
| 576 | 576 | $linkSet = $this->App()->LinkSet(); |
| 577 | 577 | |
| 578 | - $criteria = $linkSet->sourceClass->is(get_class($source)) |
|
| 578 | + $criteria = $linkSet->sourceClass->is(get_class($source)) |
|
| 579 | 579 | ->_AND_($linkSet->sourceId->is($source->id)) |
| 580 | 580 | ->_AND_($linkSet->targetClass->is(get_class($this))) |
| 581 | 581 | ->_AND_($linkSet->targetId->is($this->id)); |
@@ -605,7 +605,7 @@ discard block |
||
| 605 | 605 | { |
| 606 | 606 | $linkSet = $this->App()->LinkSet(); |
| 607 | 607 | |
| 608 | - $criteria = $linkSet->targetClass->is(get_class($target)) |
|
| 608 | + $criteria = $linkSet->targetClass->is(get_class($target)) |
|
| 609 | 609 | ->_AND_($linkSet->targetId->is($target->id)) |
| 610 | 610 | ->_AND_($linkSet->sourceClass->is(get_class($this))) |
| 611 | 611 | ->_AND_($linkSet->sourceId->is($this->id)); |
@@ -21,7 +21,7 @@ discard block |
||
| 21 | 21 | * @copyright Copyright (c) 2008 by CANTICO ({@link http://www.cantico.fr}) |
| 22 | 22 | */ |
| 23 | 23 | |
| 24 | -require_once APP_CTRL_PATH . '/record.ctrl.php'; |
|
| 24 | +require_once APP_CTRL_PATH.'/record.ctrl.php'; |
|
| 25 | 25 | |
| 26 | 26 | /** |
| 27 | 27 | * This controller manages actions that can be performed on custom fields |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | $W->Link( |
| 40 | 40 | $App->translate('Add a custom field'), |
| 41 | 41 | $this->proxy()->edit() |
| 42 | - )->addClass('icon', Func_Icons::ACTIONS_LIST_ADD) |
|
| 42 | + )->addClass('icon', Func_Icons::ACTIONS_LIST_ADD) |
|
| 43 | 43 | ->setOpenMode(Widget_Link::OPEN_DIALOG_AND_RELOAD) |
| 44 | 44 | ); |
| 45 | 45 | |
@@ -21,15 +21,15 @@ |
||
| 21 | 21 | * @copyright Copyright (c) 2006 by CANTICO ({@link http://www.cantico.fr}) |
| 22 | 22 | */ |
| 23 | 23 | |
| 24 | -define('APP_PHP_PATH', dirname(__FILE__) . '/'); |
|
| 25 | -define('APP_SET_PATH', dirname(__FILE__) . '/'); |
|
| 26 | -define('APP_UI_PATH', dirname(__FILE__) . '/ui/'); |
|
| 27 | -define('APP_CTRL_PATH', dirname(__FILE__) . '/'); |
|
| 24 | +define('APP_PHP_PATH', dirname(__FILE__).'/'); |
|
| 25 | +define('APP_SET_PATH', dirname(__FILE__).'/'); |
|
| 26 | +define('APP_UI_PATH', dirname(__FILE__).'/ui/'); |
|
| 27 | +define('APP_CTRL_PATH', dirname(__FILE__).'/'); |
|
| 28 | 28 | |
| 29 | -require_once APP_PHP_PATH . 'base.class.php'; |
|
| 30 | -require_once APP_UI_PATH . 'base.ui.php'; |
|
| 29 | +require_once APP_PHP_PATH.'base.class.php'; |
|
| 30 | +require_once APP_UI_PATH.'base.ui.php'; |
|
| 31 | 31 | |
| 32 | -require_once $GLOBALS['babInstallPath'] . 'utilit/dateTime.php'; |
|
| 32 | +require_once $GLOBALS['babInstallPath'].'utilit/dateTime.php'; |
|
| 33 | 33 | |
| 34 | 34 | |
| 35 | 35 | |
@@ -74,8 +74,8 @@ discard block |
||
| 74 | 74 | */ |
| 75 | 75 | public function joinSource($sourceClass) |
| 76 | 76 | { |
| 77 | - if (get_class($this->sourceId) !== $sourceClass . 'Set') { |
|
| 78 | - $this->hasOne('sourceId', $sourceClass . 'Set'); |
|
| 77 | + if (get_class($this->sourceId) !== $sourceClass.'Set') { |
|
| 78 | + $this->hasOne('sourceId', $sourceClass.'Set'); |
|
| 79 | 79 | $this->join('sourceId'); |
| 80 | 80 | } |
| 81 | 81 | } |
@@ -86,8 +86,8 @@ discard block |
||
| 86 | 86 | */ |
| 87 | 87 | public function joinTarget($targetClass = null) |
| 88 | 88 | { |
| 89 | - if (get_class($this->targetId) !== $targetClass . 'Set') { |
|
| 90 | - $this->hasOne('targetId', $targetClass . 'Set'); |
|
| 89 | + if (get_class($this->targetId) !== $targetClass.'Set') { |
|
| 90 | + $this->hasOne('targetId', $targetClass.'Set'); |
|
| 91 | 91 | $this->join('targetId'); |
| 92 | 92 | } |
| 93 | 93 | } |
@@ -253,7 +253,7 @@ discard block |
||
| 253 | 253 | } |
| 254 | 254 | |
| 255 | 255 | if ($deleteTarget) { |
| 256 | - foreach($set->select($criteria) as $link) { |
|
| 256 | + foreach ($set->select($criteria) as $link) { |
|
| 257 | 257 | |
| 258 | 258 | $className = $link->targetClass.'Set'; |
| 259 | 259 | |
@@ -47,7 +47,7 @@ discard block |
||
| 47 | 47 | if (empty($description)) { |
| 48 | 48 | $description = $field->getName(); |
| 49 | 49 | } |
| 50 | - $fieldLabel = $W->Label($description . ':'); |
|
| 50 | + $fieldLabel = $W->Label($description.':'); |
|
| 51 | 51 | |
| 52 | 52 | if ($field instanceof ORM_DateField) { |
| 53 | 53 | $widget = $W->DatePicker(); |
@@ -103,7 +103,7 @@ discard block |
||
| 103 | 103 | if (empty($description)) { |
| 104 | 104 | $description = $field->getName(); |
| 105 | 105 | } |
| 106 | - $fieldLabel = $W->Label($description . ':'); |
|
| 106 | + $fieldLabel = $W->Label($description.':'); |
|
| 107 | 107 | |
| 108 | 108 | if ($field instanceof ORM_DateField) { |
| 109 | 109 | $widget = $W->PeriodPicker(); |
@@ -206,7 +206,7 @@ discard block |
||
| 206 | 206 | $nbOptions = 0; |
| 207 | 207 | foreach ($iterator as $record) { |
| 208 | 208 | if (isset($record->code)) { |
| 209 | - $optionText = $record->code . ' - ' . $record->$fieldName; |
|
| 209 | + $optionText = $record->code.' - '.$record->$fieldName; |
|
| 210 | 210 | } else { |
| 211 | 211 | $optionText = $record->$fieldName; |
| 212 | 212 | } |
@@ -34,13 +34,13 @@ discard block |
||
| 34 | 34 | */ |
| 35 | 35 | public function includeBase() |
| 36 | 36 | { |
| 37 | - require_once APP_UI_PATH . 'base.ui.php'; |
|
| 38 | - require_once APP_UI_PATH . 'ui.helpers.php'; |
|
| 37 | + require_once APP_UI_PATH.'base.ui.php'; |
|
| 38 | + require_once APP_UI_PATH.'ui.helpers.php'; |
|
| 39 | 39 | } |
| 40 | 40 | |
| 41 | 41 | public function includePage() |
| 42 | 42 | { |
| 43 | - require_once APP_UI_PATH . 'page.class.php'; |
|
| 43 | + require_once APP_UI_PATH.'page.class.php'; |
|
| 44 | 44 | } |
| 45 | 45 | |
| 46 | 46 | /** |
@@ -77,7 +77,7 @@ discard block |
||
| 77 | 77 | */ |
| 78 | 78 | public function ExportSelectEditor($id, app_TableModelView $tableview, $filter = null) |
| 79 | 79 | { |
| 80 | - require_once dirname(__FILE__) . '/exportselect.ui.php'; |
|
| 80 | + require_once dirname(__FILE__).'/exportselect.ui.php'; |
|
| 81 | 81 | return new app_ExportSelectEditor($this->App(), $id, $tableview, $filter); |
| 82 | 82 | } |
| 83 | 83 | } |
| 84 | 84 | \ No newline at end of file |
@@ -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(); |
@@ -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 | |