Completed
Push — master ( c5e256...c1e637 )
by Patrick
03:21
created
class.SecurePage.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -10,11 +10,11 @@  discard block
 block discarded – undo
10 10
         $script_dir = dirname(__FILE__);
11 11
         $ret = substr($script_dir, strlen($root));
12 12
 
13
-        if($ret === false || strlen($ret) === 0)
13
+        if ($ret === false || strlen($ret) === 0)
14 14
         {
15 15
             return '/';
16 16
         }
17
-        else if($ret[strlen($ret)-1] !== '/')
17
+        else if ($ret[strlen($ret)-1] !== '/')
18 18
         {
19 19
             $ret .= '/';
20 20
         }
@@ -26,14 +26,14 @@  discard block
 block discarded – undo
26 26
         $script_dir = dirname(__FILE__);
27 27
         $plugin_files = glob($script_dir.'/*/plugin.php');
28 28
         $count = count($plugin_files);
29
-        for($i = 0; $i < $count; $i++)
29
+        for ($i = 0; $i < $count; $i++)
30 30
         {
31 31
             include($plugin_files[$i]);
32 32
         }
33 33
         $ret = array();
34
-        foreach(get_declared_classes() as $class)
34
+        foreach (get_declared_classes() as $class)
35 35
         {
36
-            if(is_subclass_of($class, 'SecurePlugin'))
36
+            if (is_subclass_of($class, 'SecurePlugin'))
37 37
             {
38 38
                 $ret[] = new $class();
39 39
             }
@@ -44,10 +44,10 @@  discard block
 block discarded – undo
44 44
     public function addPluginLinks($count, $plugins)
45 45
     {
46 46
         $secure_menu = array();
47
-        for($i = 0; $i < $count; $i++)
47
+        for ($i = 0; $i < $count; $i++)
48 48
         {
49 49
             $ret = $plugins[$i]->get_secure_menu_entries($this, $this->user);
50
-            if($ret !== false)
50
+            if ($ret !== false)
51 51
             {
52 52
                 $secure_menu = array_merge($secure_menu, $ret);
53 53
             }
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
 
79 79
     function add_links()
80 80
     {
81
-        if($this->user !== false)
81
+        if ($this->user !== false)
82 82
         {
83 83
             $this->addPluginLinks($this->plugin_count, $this->plugins);
84 84
         }
@@ -87,10 +87,10 @@  discard block
 block discarded – undo
87 87
     function get_secure_child_entry_points()
88 88
     {
89 89
         $entry_points = '';
90
-        for($i = 0; $i < $this->plugin_count; $i++)
90
+        for ($i = 0; $i < $this->plugin_count; $i++)
91 91
         {
92 92
             $ret = $this->plugins[$i]->get_plugin_entry_point();
93
-            if($ret !== false)
93
+            if ($ret !== false)
94 94
             {
95 95
                 $entry_points .= '<li><a href="'.$ret['link'].'">'.$ret['name'].'</a></li>';
96 96
             }
Please login to merge, or discard this patch.
class.SecureLoginRequiredPage.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
 
21 21
     function add_links()
22 22
     {
23
-        if($this->user !== false)
23
+        if ($this->user !== false)
24 24
         {
25 25
             $this->addPluginLinks($this->plugin_count, $this->plugins);
26 26
         }
Please login to merge, or discard this patch.