@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | return; |
| 51 | 51 | } |
| 52 | 52 | |
| 53 | - if ( $history['date'] < $from |
|
| 53 | + if ($history['date'] < $from |
|
| 54 | 54 | || $history['date'] > $to) { |
| 55 | 55 | // We can ignore revisions outside the timeframe |
| 56 | 56 | continue; |
@@ -93,7 +93,7 @@ discard block |
||
| 93 | 93 | $this->_seek_updated($from); |
| 94 | 94 | |
| 95 | 95 | $i = 0; |
| 96 | - while ( $this->_updated_pages < $this->_max_pages |
|
| 96 | + while ($this->_updated_pages < $this->_max_pages |
|
| 97 | 97 | && $i < 20) { |
| 98 | 98 | // Expand seek by another two weeks |
| 99 | 99 | $to = $from; |
@@ -61,7 +61,7 @@ |
||
| 61 | 61 | public function get_link($key = 0, $rel = 'alternate') |
| 62 | 62 | { |
| 63 | 63 | $link = parent::get_link($key, $rel); |
| 64 | - if ( $rel !== 'alternate' |
|
| 64 | + if ($rel !== 'alternate' |
|
| 65 | 65 | || $key !== 0) { |
| 66 | 66 | return $link; |
| 67 | 67 | } |
@@ -137,7 +137,7 @@ |
||
| 137 | 137 | |
| 138 | 138 | private function _verify_post_data() |
| 139 | 139 | { |
| 140 | - if ( !array_key_exists('action', $_POST) |
|
| 140 | + if (!array_key_exists('action', $_POST) |
|
| 141 | 141 | || !array_key_exists('guid', $_POST)) { |
| 142 | 142 | throw new midcom_error_notfound('Incomplete POST data'); |
| 143 | 143 | } |
@@ -80,7 +80,7 @@ |
||
| 80 | 80 | */ |
| 81 | 81 | public function array2data(array $array, $root_node = 'array', $prefix = '') |
| 82 | 82 | { |
| 83 | - $data = "{$prefix}<{$root_node}>\n"; |
|
| 83 | + $data = "{$prefix}<{$root_node}>\n"; |
|
| 84 | 84 | |
| 85 | 85 | foreach ($array as $key => $field) { |
| 86 | 86 | if (is_numeric($key)) { |
@@ -54,7 +54,7 @@ |
||
| 54 | 54 | public function read_root($id) |
| 55 | 55 | { |
| 56 | 56 | if (is_numeric($id)) { |
| 57 | - $id = (int)$id; |
|
| 57 | + $id = (int) $id; |
|
| 58 | 58 | } |
| 59 | 59 | $rootdir = new midcom_db_snippetdir($id); |
| 60 | 60 | if (!$rootdir->can_do('midgard:update')) { |
@@ -50,7 +50,7 @@ |
||
| 50 | 50 | public function read_root($style_id) |
| 51 | 51 | { |
| 52 | 52 | if (is_numeric($style_id)) { |
| 53 | - $style_id = (int)$style_id; |
|
| 53 | + $style_id = (int) $style_id; |
|
| 54 | 54 | } |
| 55 | 55 | $style = new midcom_db_style($style_id); |
| 56 | 56 | |
@@ -69,7 +69,8 @@ |
||
| 69 | 69 | // Use the DB Factory to resolve the class and to get the object |
| 70 | 70 | try { |
| 71 | 71 | $object = midcom::get()->dbfactory->get_object_by_guid($identifier); |
| 72 | - } catch (midcom_error $e) { |
|
| 72 | + } |
|
| 73 | + catch (midcom_error $e) { |
|
| 73 | 74 | // This is probably a pseudo leaf, store the score to the current node |
| 74 | 75 | $this->_topic->set_parameter('midcom.helper.nav.score', $identifier, $score); |
| 75 | 76 | return true; |
@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | } |
| 90 | 90 | |
| 91 | 91 | // Approve if possible |
| 92 | - if ( $approval_status |
|
| 92 | + if ($approval_status |
|
| 93 | 93 | && $object->can_do('midcom:approve')) { |
| 94 | 94 | $object->metadata->approve(); |
| 95 | 95 | } |
@@ -135,10 +135,10 @@ discard block |
||
| 135 | 135 | // jQuery sorting |
| 136 | 136 | midcom::get()->head->enable_jquery_ui(['mouse', 'sortable']); |
| 137 | 137 | |
| 138 | - midcom::get()->head->add_jsfile(MIDCOM_STATIC_URL.'/midcom.admin.folder/jquery-postfix.js'); |
|
| 138 | + midcom::get()->head->add_jsfile(MIDCOM_STATIC_URL . '/midcom.admin.folder/jquery-postfix.js'); |
|
| 139 | 139 | |
| 140 | 140 | // Custom styles |
| 141 | - $this->add_stylesheet(MIDCOM_STATIC_URL.'/midcom.admin.folder/midcom-admin-order.css'); |
|
| 141 | + $this->add_stylesheet(MIDCOM_STATIC_URL . '/midcom.admin.folder/midcom-admin-order.css'); |
|
| 142 | 142 | } |
| 143 | 143 | } |
| 144 | 144 | |
@@ -23,7 +23,7 @@ |
||
| 23 | 23 | */ |
| 24 | 24 | public function _handler_approval($handler_id, array $args, array &$data) |
| 25 | 25 | { |
| 26 | - if ( !array_key_exists('guid', $_REQUEST) |
|
| 26 | + if (!array_key_exists('guid', $_REQUEST) |
|
| 27 | 27 | || !array_key_exists('return_to', $_REQUEST)) { |
| 28 | 28 | throw new midcom_error('Cannot process approval request, request is incomplete.'); |
| 29 | 29 | } |
@@ -30,7 +30,7 @@ |
||
| 30 | 30 | public function _on_loaded() |
| 31 | 31 | { |
| 32 | 32 | // if we are missing the component, use the nullcomponent. |
| 33 | - if ( !$this->component |
|
| 33 | + if (!$this->component |
|
| 34 | 34 | || !array_key_exists($this->component, midcom::get()->componentloader->manifests)) { |
| 35 | 35 | debug_add("Topic {$this->id} has no component assigned to it, using 'midcom.core.nullcomponent'.", |
| 36 | 36 | MIDCOM_LOG_INFO); |