Test Setup Failed
Pull Request — master (#190)
by
unknown
10:36
created
lib/net/nemein/wiki/parser.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -224,7 +224,7 @@  discard block
 block discarded – undo
224 224
                 return $this->render_link($parts[1], $parts[2]) . $after;
225 225
 
226 226
             // Macro [something: <data>] (for example [abbr: BOFH - Bastard Operator From Hell] or [photo: <GUID>])
227
-            case (   preg_match('/^(.*?): (.*)/', $fulltext, $macro_parts)
227
+            case (preg_match('/^(.*?): (.*)/', $fulltext, $macro_parts)
228 228
                   && method_exists($this, "_run_macro_{$macro_parts[1]}")):
229 229
                 $method = "_run_macro_{$macro_parts[1]}";
230 230
                 return $this->$method($macro_parts[2], $match[0], $after);
@@ -257,7 +257,7 @@  discard block
 block discarded – undo
257 257
                 $folder = $wikipage_match['latest_parent'];
258 258
             }
259 259
 
260
-            if (   isset($folder[MIDCOM_NAV_OBJECT])
260
+            if (isset($folder[MIDCOM_NAV_OBJECT])
261 261
                 && $folder[MIDCOM_NAV_OBJECT]->can_do('midgard:create')) {
262 262
                 $workflow = $this->get_workflow('datamanager2');
263 263
                 return "<a href=\"{$folder[MIDCOM_NAV_ABSOLUTEURL]}create/?wikiword={$wikipage_match['remaining_path']}\" " . $workflow->render_attributes() . " class=\"wiki_missing\" title=\"" . $this->_l10n->get('click to create') . "\">{$text}</a>";
@@ -300,7 +300,7 @@  discard block
 block discarded – undo
300 300
                     $links[$parts[1]] = $parts[2];
301 301
                     break;
302 302
                 // Ignore macros [something: <data>] (for example [abbr: BOFH - Bastard Operator From Hell] or [photo: <GUID>])
303
-                case (   preg_match('/^(.*?): (.*)/', $fulltext, $macro_parts)
303
+                case (preg_match('/^(.*?): (.*)/', $fulltext, $macro_parts)
304 304
                       && method_exists($this, "_run_macro_{$macro_parts[1]}")):
305 305
                     continue 2;
306 306
 
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -63,7 +63,8 @@
 block discarded – undo
63 63
 
64 64
         try {
65 65
             $attachment = new midcom_db_attachment($guid);
66
-        } catch (midcom_error $e) {
66
+        }
67
+        catch (midcom_error $e) {
67 68
             $e->log();
68 69
             return "<span class=\"missing_photo\" title=\"{$guid}\">{$fulltag}</span>{$after}";
69 70
         }
Please login to merge, or discard this patch.
lib/net/nemein/wiki/handler/create.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@
 block discarded – undo
65 65
 
66 66
         if (!$this->_page->create()) {
67 67
             debug_print_r('We operated on this object:', $this->_page);
68
-            throw new midcom_error('Failed to create a new page. Last Midgard error was: '. midcom_connection::get_error_string());
68
+            throw new midcom_error('Failed to create a new page. Last Midgard error was: ' . midcom_connection::get_error_string());
69 69
         }
70 70
 
71 71
         return $this->_page;
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -114,7 +114,8 @@
 block discarded – undo
114 114
             } else {
115 115
                 try {
116 116
                     net_nemein_wiki_viewer::initialize_index_article($topic);
117
-                } catch (midcom_error $e) {
117
+                }
118
+                catch (midcom_error $e) {
118 119
                     // Could not create index
119 120
                     $topic->delete();
120 121
                     throw $e;
Please login to merge, or discard this patch.
lib/net/nemein/wiki/handler/view.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 
37 37
     public function __construct()
38 38
     {
39
-        $this->_request_data['page'] =& $this->_page;
39
+        $this->_request_data['page'] = & $this->_page;
40 40
     }
41 41
 
42 42
     /**
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
     {
47 47
         if (midcom::get()->config->get('enable_ajax_editing')) {
48 48
             $this->_controller = midcom_helper_datamanager2_controller::create('ajax');
49
-            $this->_controller->schemadb =& $this->_request_data['schemadb'];
49
+            $this->_controller->schemadb = & $this->_request_data['schemadb'];
50 50
             $this->_controller->set_storage($this->_page);
51 51
             $this->_controller->process_ajax();
52 52
             $this->_datamanager = $this->_controller->datamanager;
@@ -272,9 +272,9 @@  discard block
 block discarded – undo
272 272
         $toc .= "\n<ol class=\"midcom_helper_toc_formatter level_{$current_list_level}\">\n";
273 273
         foreach ($headings[4] as $key => $heading) {
274 274
             $anchor = 'heading-' . md5($heading);
275
-            $tag_level =& $headings[3][$key];
276
-            $heading_code =& $headings[0][$key];
277
-            $heading_tag =& $headings[2][$key];
275
+            $tag_level = & $headings[3][$key];
276
+            $heading_code = & $headings[0][$key];
277
+            $heading_tag = & $headings[2][$key];
278 278
             $heading_new_code = "<a id='{$anchor}'></a>{$heading_code}";
279 279
             $content = str_replace($heading_code, $heading_new_code, $content);
280 280
             if ($current_tag_level === false) {
@@ -300,7 +300,7 @@  discard block
 block discarded – undo
300 300
                     }
301 301
                 }
302 302
             }
303
-            $toc .= "<li class='{$heading_tag}'><a href='#{$anchor}'>" . strip_tags($heading) .  "</a>";
303
+            $toc .= "<li class='{$heading_tag}'><a href='#{$anchor}'>" . strip_tags($heading) . "</a>";
304 304
         }
305 305
         for ($i = $current_list_level; $i > 0; $i--) {
306 306
             $toc .= "</li>\n</ol>\n";
@@ -367,7 +367,7 @@  discard block
 block discarded – undo
367 367
 
368 368
         $user = midcom::get()->auth->user->get_storage();
369 369
 
370
-        if (   array_key_exists('target', $_POST)
370
+        if (array_key_exists('target', $_POST)
371 371
             && $_POST['target'] == 'folder') {
372 372
             // We're subscribing to the whole wiki
373 373
             $object = $this->_topic;
Please login to merge, or discard this patch.
lib/net/nemein/rss/cron/fetchfeeds.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,8 @@
 block discarded – undo
31 31
         foreach ($feeds as $feed) {
32 32
             try {
33 33
                 midcom_db_topic::get_cached($feed->node);
34
-            } catch (midcom_error $e) {
34
+            }
35
+            catch (midcom_error $e) {
35 36
                 debug_add("Node #{$feed->node} does not exist, skipping feed #{$feed->id}", MIDCOM_LOG_ERROR);
36 37
                 continue;
37 38
             }
Please login to merge, or discard this patch.
lib/net/nemein/rss/fetch.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
             $etag = trim($parser->data['headers']['etag']);
102 102
 
103 103
             $feed_etag = $this->_feed->get_parameter('net.nemein.rss', 'etag');
104
-            if (   !empty($feed_etag)
104
+            if (!empty($feed_etag)
105 105
                 && $feed_etag == $etag) {
106 106
                 // Feed hasn't changed, skip updating
107 107
                 debug_add("Feed {$this->_feed->url} has not changed since " . date('c', $this->_feed->latestfetch), MIDCOM_LOG_WARN);
@@ -187,7 +187,7 @@  discard block
 block discarded – undo
187 187
         $guid = $item->get_id();
188 188
         $title = $item->get_title();
189 189
 
190
-        if (   (   empty($title)
190
+        if ((empty($title)
191 191
                 || trim($title) == '...')
192 192
             && empty($guid)) {
193 193
             // Something wrong with this entry, skip it
@@ -255,7 +255,7 @@  discard block
 block discarded – undo
255 255
                 $meta_values['published'] = $article_date;
256 256
             }
257 257
 
258
-            if (   $this->apply_values($article, $values, $meta_values)
258
+            if ($this->apply_values($article, $values, $meta_values)
259 259
                 && !$article->update()) {
260 260
                 return false;
261 261
             }
@@ -284,14 +284,14 @@  discard block
 block discarded – undo
284 284
     private function find_author(net_nemein_rss_parser_item $item)
285 285
     {
286 286
         // Try to figure out item author
287
-        if (   $this->_feed->forceauthor
287
+        if ($this->_feed->forceauthor
288 288
             && $this->_feed->defaultauthor) {
289 289
             // Feed has a "default author" set, use it
290 290
             return new midcom_db_person($this->_feed->defaultauthor);
291 291
         }
292 292
         $author = $this->match_item_author($item);
293 293
         $fallback_person_id = 1;
294
-        if (   !$author
294
+        if (!$author
295 295
             || $author->id == $fallback_person_id) {
296 296
             if ($this->_feed->defaultauthor) {
297 297
                 // Feed has a "default author" set, use it
@@ -477,7 +477,7 @@  discard block
 block discarded – undo
477 477
             }
478 478
         }
479 479
 
480
-        if (   !empty($author_info['username'])
480
+        if (!empty($author_info['username'])
481 481
             && $person = midcom::get()->auth->get_user_by_name($author_info['username'])) {
482 482
             return $person->get_storage();
483 483
         }
Please login to merge, or discard this patch.
lib/net/nemein/rss/handler/admin.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
     {
18 18
         $data['schemadb'] = midcom_helper_datamanager2_schema::load_database($this->_config->get('schemadb_feed'));
19 19
         $data['controller'] = midcom_helper_datamanager2_controller::create('simple');
20
-        $data['controller']->schemadb =& $data['schemadb'];
20
+        $data['controller']->schemadb = & $data['schemadb'];
21 21
         $data['controller']->set_storage($data['feed']);
22 22
         if (!$data['controller']->initialize()) {
23 23
             throw new midcom_error("Failed to initialize a DM2 controller instance for feed {$data['feed']->id}.");
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
         }
85 85
 
86 86
         // OPML subscription list import support
87
-        if (   array_key_exists('net_nemein_rss_manage_opml', $_FILES)
87
+        if (array_key_exists('net_nemein_rss_manage_opml', $_FILES)
88 88
             && is_uploaded_file($_FILES['net_nemein_rss_manage_opml']['tmp_name'])) {
89 89
             $opml_file = $_FILES['net_nemein_rss_manage_opml']['tmp_name'];
90 90
 
Please login to merge, or discard this patch.
lib/net/nemein/rss/manage.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,8 @@
 block discarded – undo
25 25
     {
26 26
         try {
27 27
             $viewer->register_plugin_namespace('__feeds', array('rss' => array('class' => __CLASS__)));
28
-        } catch (midcom_error $e) {
28
+        }
29
+        catch (midcom_error $e) {
29 30
             $e->log();
30 31
         }
31 32
     }
Please login to merge, or discard this patch.
lib/net/nehmer/blog/handler/admin.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -60,8 +60,8 @@  discard block
 block discarded – undo
60 60
      */
61 61
     private function _load_schemadb()
62 62
     {
63
-        $this->_schemadb =& $this->_request_data['schemadb'];
64
-        if (   $this->_config->get('simple_name_handling')
63
+        $this->_schemadb = & $this->_request_data['schemadb'];
64
+        if ($this->_config->get('simple_name_handling')
65 65
             && !midcom::get()->auth->admin) {
66 66
             foreach (array_keys($this->_schemadb) as $name) {
67 67
                 $this->_schemadb[$name]->fields['name']['readonly'] = true;
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
     {
77 77
         $this->_load_schemadb();
78 78
         $this->_controller = midcom_helper_datamanager2_controller::create('simple');
79
-        $this->_controller->schemadb =& $this->_schemadb;
79
+        $this->_controller->schemadb = & $this->_schemadb;
80 80
         $this->_controller->set_storage($this->_article);
81 81
         if (!$this->_controller->initialize()) {
82 82
             throw new midcom_error("Failed to initialize a DM2 controller instance for article {$this->_article->id}.");
Please login to merge, or discard this patch.
lib/net/nehmer/blog/handler/create.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -61,8 +61,8 @@  discard block
 block discarded – undo
61 61
      */
62 62
     public function load_schemadb()
63 63
     {
64
-        $this->_schemadb =& $this->_request_data['schemadb'];
65
-        if (   $this->_config->get('simple_name_handling')
64
+        $this->_schemadb = & $this->_request_data['schemadb'];
65
+        if ($this->_config->get('simple_name_handling')
66 66
             && !midcom::get()->auth->can_user_do('midcom:urlname')) {
67 67
             foreach (array_keys($this->_schemadb) as $name) {
68 68
                 $this->_schemadb[$name]->fields['name']['readonly'] = true;
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
 
87 87
         if (!$this->_article->create()) {
88 88
             debug_print_r('We operated on this object:', $this->_article);
89
-            throw new midcom_error('Failed to create a new article. Last Midgard error was: '. midcom_connection::get_error_string());
89
+            throw new midcom_error('Failed to create a new article. Last Midgard error was: ' . midcom_connection::get_error_string());
90 90
         }
91 91
 
92 92
         // Callback possibility
Please login to merge, or discard this patch.