Passed
Branch master (974a6c)
by Mark
02:27
created
syntax.php 1 patch
Braces   +15 added lines, -5 removed lines patch added patch discarded remove patch
@@ -7,11 +7,19 @@  discard block
 block discarded – undo
7 7
  */
8 8
 
9 9
 // must be run within Dokuwiki
10
-if(!defined('DOKU_INC')) die();
10
+if(!defined('DOKU_INC')) {
11
+    die();
12
+}
11 13
 
12
-if (!defined('DOKU_LF')) define('DOKU_LF', "\n");
13
-if (!defined('DOKU_TAB')) define('DOKU_TAB', "\t");
14
-if (!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN',DOKU_INC.'lib/plugins/');
14
+if (!defined('DOKU_LF')) {
15
+    define('DOKU_LF', "\n");
16
+}
17
+if (!defined('DOKU_TAB')) {
18
+    define('DOKU_TAB', "\t");
19
+}
20
+if (!defined('DOKU_PLUGIN')) {
21
+    define('DOKU_PLUGIN',DOKU_INC.'lib/plugins/');
22
+}
15 23
 
16 24
 require_once(DOKU_PLUGIN.'syntax.php');
17 25
 
@@ -36,7 +44,9 @@  discard block
 block discarded – undo
36 44
         global $conf;
37 45
         global $ID;       
38 46
         $description = $data[0];
39
-        if(empty($description)) return false;
47
+        if(empty($description)) {
48
+            return false;
49
+        }
40 50
 
41 51
         if ($mode == 'metadata') {
42 52
             $renderer->meta['plugin_description']['keywords'] = $description;
Please login to merge, or discard this patch.
action.php 1 patch
Braces   +24 added lines, -8 removed lines patch added patch discarded remove patch
@@ -9,8 +9,12 @@  discard block
 block discarded – undo
9 9
  *  @version      2012-07-02
10 10
  */
11 11
 
12
-if(!defined('DOKU_INC')) die();
13
-if(!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN',DOKU_INC.'lib/plugins/');
12
+if(!defined('DOKU_INC')) {
13
+    die();
14
+}
15
+if(!defined('DOKU_PLUGIN')) {
16
+    define('DOKU_PLUGIN',DOKU_INC.'lib/plugins/');
17
+}
14 18
 
15 19
 require_once(DOKU_PLUGIN.'action.php');
16 20
 
@@ -28,11 +32,15 @@  discard block
 block discarded – undo
28 32
      * Add an abstract, global value or a specified string to meta header
29 33
      */
30 34
     function description(&$event, $param) {
31
-        if(empty($event->data) || empty($event->data['meta'])) return;
35
+        if(empty($event->data) || empty($event->data['meta'])) {
36
+            return;
37
+        }
32 38
         
33 39
         global $ID;
34 40
         $source = $this->getConf('keyword_source');
35
-        if(empty($source)) $source = 'abstract';
41
+        if(empty($source)) {
42
+            $source = 'abstract';
43
+        }
36 44
         
37 45
         if($source == KEYWORD_SOURCE_ABSTRACT) {
38 46
             if (auth_quickaclcheck($ID) < AUTH_READ) {
@@ -41,15 +49,21 @@  discard block
 block discarded – undo
41 49
             }
42 50
 
43 51
             $d = p_get_metadata($ID, 'description');
44
-            if(empty($d)) return;
52
+            if(empty($d)) {
53
+                return;
54
+            }
45 55
     
46 56
             $a = str_replace("\n", " ", $d['abstract']);
47
-            if(empty($a)) return;
57
+            if(empty($a)) {
58
+                return;
59
+            }
48 60
         }
49 61
         
50 62
         if($source == KEYWORD_SOURCE_GLOBAL) {
51 63
             $a = $this->getConf('global_description');
52
-            if(empty($a)) return;
64
+            if(empty($a)) {
65
+                return;
66
+            }
53 67
         }
54 68
 
55 69
         if($source == KEYWORD_SOURCE_SYNTAX) {
@@ -59,7 +73,9 @@  discard block
 block discarded – undo
59 73
             }
60 74
             $metadata = p_get_metadata($ID);
61 75
             $a = $metadata['plugin_description']['keywords'];
62
-            if(empty($a)) return;
76
+            if(empty($a)) {
77
+                return;
78
+            }
63 79
         }
64 80
         
65 81
         $m = array("name" => "description", "content" => $a);
Please login to merge, or discard this patch.