@@ -9,19 +9,19 @@ |
||
| 9 | 9 | $config = ConfigProvider::getInstance(); |
| 10 | 10 | |
| 11 | 11 | $dirs = array( |
| 12 | - $config->get('app.file.store.dir').'logs', |
|
| 13 | - $config->get('app.file.store.dir').'cache', |
|
| 14 | - $config->get('app.file.store.dir').'cache/html', |
|
| 15 | - $config->get('app.file.store.dir').'cache/images', |
|
| 16 | - $config->get('app.file.store.dir').'cache/pdf', |
|
| 17 | - $config->get('app.file.store.dir').'cache/xls', |
|
| 18 | - $config->get('app.file.store.dir').'attachments', |
|
| 19 | - ); |
|
| 12 | + $config->get('app.file.store.dir').'logs', |
|
| 13 | + $config->get('app.file.store.dir').'cache', |
|
| 14 | + $config->get('app.file.store.dir').'cache/html', |
|
| 15 | + $config->get('app.file.store.dir').'cache/images', |
|
| 16 | + $config->get('app.file.store.dir').'cache/pdf', |
|
| 17 | + $config->get('app.file.store.dir').'cache/xls', |
|
| 18 | + $config->get('app.file.store.dir').'attachments', |
|
| 19 | + ); |
|
| 20 | 20 | |
| 21 | 21 | foreach ($dirs as $dir) { |
| 22 | - if (!file_exists($dir)) { |
|
| 23 | - mkdir($dir, 0774); |
|
| 24 | - } |
|
| 22 | + if (!file_exists($dir)) { |
|
| 23 | + mkdir($dir, 0774); |
|
| 24 | + } |
|
| 25 | 25 | } |
| 26 | 26 | |
| 27 | 27 | ?> |
| 28 | 28 | \ No newline at end of file |
@@ -218,7 +218,7 @@ discard block |
||
| 218 | 218 | // work out how many columns will be in the table |
| 219 | 219 | $reflection = new ReflectionClass(get_class($this->BO)); |
| 220 | 220 | $properties = array_keys($reflection->getDefaultProperties()); |
| 221 | - $fields['colCount'] = 1 + count(array_diff($properties, $this->BO->getDefaultAttributes(), $this->BO->getTransientAttributes())); |
|
| 221 | + $fields['colCount'] = 1+count(array_diff($properties, $this->BO->getDefaultAttributes(), $this->BO->getTransientAttributes())); |
|
| 222 | 222 | |
| 223 | 223 | // get the class attributes |
| 224 | 224 | $properties = $reflection->getProperties(); |
@@ -239,7 +239,7 @@ discard block |
||
| 239 | 239 | $html .= ' <th>'.$this->BO->getDataLabel($propName).'</th>'; |
| 240 | 240 | } |
| 241 | 241 | } else { |
| 242 | - $fields['colCount'] = $fields['colCount'] - 1; |
|
| 242 | + $fields['colCount'] = $fields['colCount']-1; |
|
| 243 | 243 | } |
| 244 | 244 | } |
| 245 | 245 | $html .= '</tr><tr>'; |
@@ -1009,7 +1009,7 @@ discard block |
||
| 1009 | 1009 | if ($viewState->get('markdownTextBoxRows') == '') { |
| 1010 | 1010 | $text = new TextBox($this->BO->getPropObject($name), $label, $name, 10); |
| 1011 | 1011 | } else { |
| 1012 | - $text = new TextBox($this->BO->getPropObject($name), $label, $name, (integer) $viewState->get('markdownTextBoxRows')); |
|
| 1012 | + $text = new TextBox($this->BO->getPropObject($name), $label, $name, (integer)$viewState->get('markdownTextBoxRows')); |
|
| 1013 | 1013 | } |
| 1014 | 1014 | |
| 1015 | 1015 | $html .= $text->render(); |
@@ -103,7 +103,7 @@ discard block |
||
| 103 | 103 | // work out how many columns will be in the table |
| 104 | 104 | $reflection = new \ReflectionClass(get_class($this->BO)); |
| 105 | 105 | $properties = array_keys($reflection->getDefaultProperties()); |
| 106 | - $fields['colCount'] = 1 + count(array_diff($properties, $this->BO->getDefaultAttributes(), $this->BO->getTransientAttributes())); |
|
| 106 | + $fields['colCount'] = 1+count(array_diff($properties, $this->BO->getDefaultAttributes(), $this->BO->getTransientAttributes())); |
|
| 107 | 107 | |
| 108 | 108 | // get the class attributes |
| 109 | 109 | $properties = $reflection->getProperties(); |
@@ -124,7 +124,7 @@ discard block |
||
| 124 | 124 | $html .= ' <th>'.$this->BO->getDataLabel($propName).'</th>'; |
| 125 | 125 | } |
| 126 | 126 | } else { |
| 127 | - $fields['colCount'] = $fields['colCount'] - 1; |
|
| 127 | + $fields['colCount'] = $fields['colCount']-1; |
|
| 128 | 128 | } |
| 129 | 129 | } |
| 130 | 130 | $html .= '</tr><tr>'; |
@@ -111,7 +111,7 @@ |
||
| 111 | 111 | |
| 112 | 112 | $html .= '</tr>'; |
| 113 | 113 | |
| 114 | - $html .= '<tr><td colspan="'.($colCount + 1).'" style="text-align:center;">'; |
|
| 114 | + $html .= '<tr><td colspan="'.($colCount+1).'" style="text-align:center;">'; |
|
| 115 | 115 | // render edit buttons for admins only |
| 116 | 116 | if ($session->get('currentUser') != null && $session->get('currentUser')->inGroup('Admin')) { |
| 117 | 117 | $html .= ' '; |
@@ -218,7 +218,7 @@ |
||
| 218 | 218 | |
| 219 | 219 | $html .= '<tr>'; |
| 220 | 220 | |
| 221 | - $html .= '<td>'.$file.' <em>('.number_format(filesize($this->BO->getAttachmentsLocation().'/'.$file) / 1024).' KB)</em></td>'; |
|
| 221 | + $html .= '<td>'.$file.' <em>('.number_format(filesize($this->BO->getAttachmentsLocation().'/'.$file)/1024).' KB)</em></td>'; |
|
| 222 | 222 | |
| 223 | 223 | $js = "if(window.jQuery) { |
| 224 | 224 | BootstrapDialog.show({ |
@@ -85,7 +85,7 @@ discard block |
||
| 85 | 85 | $task = new $taskClass(); |
| 86 | 86 | |
| 87 | 87 | $startTime = microtime(true); |
| 88 | - $maxAllowedTime = $startTime + $task->getMaxRunTime(); |
|
| 88 | + $maxAllowedTime = $startTime+$task->getMaxRunTime(); |
|
| 89 | 89 | |
| 90 | 90 | self::$logger->info('Start time is ['.$startTime.'], maximum task run time is ['.$task->getMaxRunTime().']'); |
| 91 | 91 | |
@@ -93,7 +93,7 @@ discard block |
||
| 93 | 93 | set_time_limit($task->getMaxRunTime()); |
| 94 | 94 | $task->doTask(); |
| 95 | 95 | |
| 96 | - self::$logger->info('Done in ['.round(microtime(true) - $startTime, 5).'] seconds'); |
|
| 96 | + self::$logger->info('Done in ['.round(microtime(true)-$startTime, 5).'] seconds'); |
|
| 97 | 97 | } |
| 98 | 98 | |
| 99 | 99 | self::$logger->info('Finished processing all cron tasks'); |
@@ -121,7 +121,7 @@ discard block |
||
| 121 | 121 | |
| 122 | 122 | if (isset($matches[$key])) { |
| 123 | 123 | // increment the weight if the same BO is tagged more than once |
| 124 | - $weight = intval($matches[$key]) + 1; |
|
| 124 | + $weight = intval($matches[$key])+1; |
|
| 125 | 125 | $matches[$key] = $weight; |
| 126 | 126 | } else { |
| 127 | 127 | $matches[$key] = 1; |
@@ -141,7 +141,7 @@ discard block |
||
| 141 | 141 | $this->numberFound = count($matches); |
| 142 | 142 | |
| 143 | 143 | // now paginate |
| 144 | - $matches = array_slice($matches, $start, $limit + 5); // the +5 is just some padding in case of orphans |
|
| 144 | + $matches = array_slice($matches, $start, $limit+5); // the +5 is just some padding in case of orphans |
|
| 145 | 145 | |
| 146 | 146 | // now load each object |
| 147 | 147 | foreach ($matches as $key => $weight) { |
@@ -227,7 +227,7 @@ discard block |
||
| 227 | 227 | |
| 228 | 228 | if (isset($matches[$key])) { |
| 229 | 229 | // increment the weight if the same BO is tagged more than once |
| 230 | - $weight = intval($matches[$key]) + 1; |
|
| 230 | + $weight = intval($matches[$key])+1; |
|
| 231 | 231 | $matches[$key] = $weight; |
| 232 | 232 | } else { |
| 233 | 233 | $matches[$key] = 1; |
@@ -129,7 +129,7 @@ discard block |
||
| 129 | 129 | if ($this->level == 'DEBUG' || in_array($this->classname, $this->debugClasses)) { |
| 130 | 130 | $dateTime = date('Y-m-d H:i:s'); |
| 131 | 131 | $this->logProvider->writeLine(array($dateTime, 'DEBUG', $this->classname, $message, |
| 132 | - $this->request->getUserAgent(), $this->request->getIP(), gethostname(), )); |
|
| 132 | + $this->request->getUserAgent(), $this->request->getIP(), gethostname(),)); |
|
| 133 | 133 | } |
| 134 | 134 | } |
| 135 | 135 | |
@@ -145,7 +145,7 @@ discard block |
||
| 145 | 145 | if ($this->level == 'DEBUG' || $this->level == 'INFO' || in_array($this->classname, $this->debugClasses)) { |
| 146 | 146 | $dateTime = date('Y-m-d H:i:s'); |
| 147 | 147 | $this->logProvider->writeLine(array($dateTime, 'INFO', $this->classname, $message, |
| 148 | - $this->request->getUserAgent(), $this->request->getIP(), gethostname(), )); |
|
| 148 | + $this->request->getUserAgent(), $this->request->getIP(), gethostname(),)); |
|
| 149 | 149 | } |
| 150 | 150 | } |
| 151 | 151 | |
@@ -161,7 +161,7 @@ discard block |
||
| 161 | 161 | if ($this->level == 'DEBUG' || $this->level == 'INFO' || $this->level == 'WARN' || in_array($this->classname, $this->debugClasses)) { |
| 162 | 162 | $dateTime = date('Y-m-d H:i:s'); |
| 163 | 163 | $this->logProvider->writeLine(array($dateTime, 'WARN', $this->classname, $message, |
| 164 | - $this->request->getUserAgent(), $this->request->getIP(), gethostname(), )); |
|
| 164 | + $this->request->getUserAgent(), $this->request->getIP(), gethostname(),)); |
|
| 165 | 165 | } |
| 166 | 166 | } |
| 167 | 167 | |
@@ -113,7 +113,7 @@ |
||
| 113 | 113 | * |
| 114 | 114 | * @since 1.0 |
| 115 | 115 | */ |
| 116 | - protected $tagMap = array('item' => 'item','feeddesc' => 'description','itemdesc' => 'description'); |
|
| 116 | + protected $tagMap = array('item' => 'item', 'feeddesc' => 'description', 'itemdesc' => 'description'); |
|
| 117 | 117 | |
| 118 | 118 | /** |
| 119 | 119 | * The BO which we will serve up in this feed. |