Completed
Push — master ( 5f60bf...ff9533 )
by Patrick
10s
created
class.SecurePage.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -17,28 +17,28 @@  discard block
 block discarded – undo
17 17
         $script_dir = dirname(__FILE__);
18 18
         $this->secure_root = substr($script_dir, strlen($root));
19 19
 
20
-        if($this->secure_root === false || strlen($this->secure_root) === 0)
20
+        if ($this->secure_root === false || strlen($this->secure_root) === 0)
21 21
         {
22 22
             $this->secure_root = '/';
23 23
         }
24
-        else if($this->secure_root[strlen($this->secure_root)-1] !== '/')
24
+        else if ($this->secure_root[strlen($this->secure_root)-1] !== '/')
25 25
         {
26
-            $this->secure_root.= '/';
26
+            $this->secure_root .= '/';
27 27
         }
28 28
         $this->add_secure_css();
29 29
         $this->add_secure_script();
30 30
         $this->add_login_form();
31
-        $this->body_tags='data-login-url="'.$this->secure_root.'api/v1/login"';
31
+        $this->body_tags = 'data-login-url="'.$this->secure_root.'api/v1/login"';
32 32
         $plugin_files = glob($script_dir.'/*/plugin.php');
33 33
         $count = count($plugin_files);
34
-        for($i = 0; $i < $count; $i++)
34
+        for ($i = 0; $i < $count; $i++)
35 35
         {
36 36
             include($plugin_files[$i]);
37 37
         }
38 38
         $this->plugins = array();
39
-        foreach(get_declared_classes() as $class)
39
+        foreach (get_declared_classes() as $class)
40 40
         {
41
-            if(is_subclass_of($class, 'SecurePlugin'))
41
+            if (is_subclass_of($class, 'SecurePlugin'))
42 42
             {
43 43
                 $this->plugins[] = new $class();
44 44
             }
@@ -59,13 +59,13 @@  discard block
 block discarded – undo
59 59
 
60 60
     function add_links()
61 61
     {
62
-        if($this->user !== false)
62
+        if ($this->user !== false)
63 63
         {
64 64
             $secure_menu = array();
65
-            for($i = 0; $i < $this->plugin_count; $i++)
65
+            for ($i = 0; $i < $this->plugin_count; $i++)
66 66
             {
67 67
                 $ret = $this->plugins[$i]->get_secure_menu_entries($this, $this->user);
68
-                if($ret !== false)
68
+                if ($ret !== false)
69 69
                 {
70 70
                     $ret["<hr id='hr_$i'/>"] = false;
71 71
                     $secure_menu = array_merge($secure_menu, $ret);
@@ -79,12 +79,12 @@  discard block
 block discarded – undo
79 79
     function get_secure_child_entry_points()
80 80
     {
81 81
         $entry_points = '';
82
-        for($i = 0; $i < $this->plugin_count; $i++)
82
+        for ($i = 0; $i < $this->plugin_count; $i++)
83 83
         {
84 84
             $ret = $this->plugins[$i]->get_plugin_entry_point();
85
-            if($ret !== false)
85
+            if ($ret !== false)
86 86
             {
87
-                $entry_points .= '<li>'.$this->createLink($ret['name'],$ret['link']).'</li>';
87
+                $entry_points .= '<li>'.$this->createLink($ret['name'], $ret['link']).'</li>';
88 88
             }
89 89
         }
90 90
         return $entry_points;
Please login to merge, or discard this patch.