@@ -236,9 +236,9 @@ |
||
236 | 236 | * |
237 | 237 | * @return string The link |
238 | 238 | */ |
239 | - public function createLink($linkName, $linkTarget = '#', $class=false) |
|
239 | + public function createLink($linkName, $linkTarget = '#', $class = false) |
|
240 | 240 | { |
241 | - $data = array('href'=>$linkTarget); |
|
241 | + $data = array('href'=>$linkTarget); |
|
242 | 242 | if($class !== false) |
243 | 243 | { |
244 | 244 | $data['class'] = $class; |
@@ -11,6 +11,9 @@ |
||
11 | 11 | $this->setTemplateName('admin.html'); |
12 | 12 | } |
13 | 13 | |
14 | + /** |
|
15 | + * @param string $adminGroup |
|
16 | + */ |
|
14 | 17 | protected function userIsAdmin($adminGroup) |
15 | 18 | { |
16 | 19 | if($this->user === false || $this->user === null) |
@@ -78,6 +78,9 @@ discard block |
||
78 | 78 | $this->loader->addPath($dir, $namespace); |
79 | 79 | } |
80 | 80 | |
81 | + /** |
|
82 | + * @param string $name |
|
83 | + */ |
|
81 | 84 | public function setTemplateName($name) |
82 | 85 | { |
83 | 86 | $this->templateName = $name; |
@@ -112,7 +115,6 @@ discard block |
||
112 | 115 | * Add a JavaScript file from a set of files known to the framework |
113 | 116 | * |
114 | 117 | * @param string $jsFileID the ID of the JS file |
115 | - * @param boolean $async Can the JS file be loaded asynchronously? |
|
116 | 118 | */ |
117 | 119 | public function addWellKnownJS($jsFileID) |
118 | 120 | { |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | $this->content['css'] = array($uri); |
90 | 90 | return; |
91 | 91 | } |
92 | - array_push($this->content['css'],$uri); |
|
92 | + array_push($this->content['css'], $uri); |
|
93 | 93 | } |
94 | 94 | |
95 | 95 | /** |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | $this->content['js'] = array($uri); |
105 | 105 | return; |
106 | 106 | } |
107 | - array_push($this->content['js'],$uri); |
|
107 | + array_push($this->content['js'], $uri); |
|
108 | 108 | } |
109 | 109 | |
110 | 110 | /** |
@@ -146,7 +146,7 @@ discard block |
||
146 | 146 | { |
147 | 147 | $data['menu'] = $submenu; |
148 | 148 | } |
149 | - $this->content['header']['right'] = array($name => $data)+$this->content['header']['right']; |
|
149 | + $this->content['header']['right'] = array($name => $data) + $this->content['header']['right']; |
|
150 | 150 | } |
151 | 151 | |
152 | 152 | /** Notification that is green for success */ |
@@ -42,8 +42,8 @@ discard block |
||
42 | 42 | |
43 | 43 | $this->aboutUrl = $this->settings->getGlobalSetting('about_url', $this->wwwUrl.'/about'); |
44 | 44 | $this->content['header']['right']['About'] = array( |
45 | - 'url' => $this->aboutUrl, |
|
46 | - 'menu' => $this->settings->getGlobalSetting('about_menu', array( |
|
45 | + 'url' => $this->aboutUrl, |
|
46 | + 'menu' => $this->settings->getGlobalSetting('about_menu', array( |
|
47 | 47 | 'Burning Flipside' => $this->wwwUrl.'/about/event', |
48 | 48 | 'AAR, LLC' => $this->wwwUrl.'/organization/aar', |
49 | 49 | 'Privacy Policy' => $this->wwwUrl.'/about/privacy' |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | $this->content['urls']['loginUrl'] = $this->loginUrl; |
60 | 60 | $this->content['urls']['logoutUrl'] = $this->logoutUrl; |
61 | 61 | |
62 | - if($this->user === false || $this->user === null) |
|
62 | + if($this->user === false || $this->user === null) |
|
63 | 63 | { |
64 | 64 | if(isset($_SERVER['REQUEST_URI']) && strstr($_SERVER['REQUEST_URI'], 'logout.php') === false) |
65 | 65 | { |
@@ -182,7 +182,7 @@ discard block |
||
182 | 182 | { |
183 | 183 | if(!isset($this->content['notifications'])) |
184 | 184 | { |
185 | - $this->content['notifications'] = array(); |
|
185 | + $this->content['notifications'] = array(); |
|
186 | 186 | } |
187 | 187 | array_push($this->content['notifications'], array('msg'=>$message, 'sev'=>$severity, 'dismissible'=>$dismissible)); |
188 | 188 | } |
@@ -195,9 +195,9 @@ discard block |
||
195 | 195 | { |
196 | 196 | if(!isset($this->content['body'])) |
197 | 197 | { |
198 | - $this->content['body'] = $this->body; |
|
198 | + $this->content['body'] = $this->body; |
|
199 | 199 | } |
200 | - //Add page JS just before rednering so it is after any added by the page explicitly |
|
200 | + //Add page JS just before rednering so it is after any added by the page explicitly |
|
201 | 201 | $this->addJS('js/'.basename($_SERVER['SCRIPT_NAME'], '.php').'.js'); |
202 | 202 | return $this->twig->render($this->templateName, $this->content); |
203 | 203 | } |
@@ -60,7 +60,7 @@ |
||
60 | 60 | $this->content['urls']['logoutUrl'] = $this->logoutUrl; |
61 | 61 | |
62 | 62 | if($this->user === false || $this->user === null) |
63 | - { |
|
63 | + { |
|
64 | 64 | if(isset($_SERVER['REQUEST_URI']) && strstr($_SERVER['REQUEST_URI'], 'logout.php') === false) |
65 | 65 | { |
66 | 66 | $this->addLink('Login', $this->loginUrl); |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | { |
25 | 25 | if($this->user === false || $this->user === null) |
26 | 26 | { |
27 | - $this->content['body'] = ' |
|
27 | + $this->content['body'] = ' |
|
28 | 28 | <div id="content"> |
29 | 29 | <div class="row"> |
30 | 30 | <div class="col-lg-12"> |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | } |
37 | 37 | else if(!isset($this->content['body'])) |
38 | 38 | { |
39 | - $this->content['body'] = $this->body; |
|
39 | + $this->content['body'] = $this->body; |
|
40 | 40 | } |
41 | 41 | //Add page JS just before rednering so it is after any added by the page explicitly |
42 | 42 | $this->addJS('js/'.basename($_SERVER['SCRIPT_NAME'], '.php').'.js'); |
@@ -108,6 +108,9 @@ discard block |
||
108 | 108 | $this->wwwUrl = $this->settings->getGlobalSetting('www_url', 'https://www.burningflipside.com/'); |
109 | 109 | } |
110 | 110 | |
111 | + /** |
|
112 | + * @param string $fieldName |
|
113 | + */ |
|
111 | 114 | protected function getCaptchField($fieldName) |
112 | 115 | { |
113 | 116 | $dataset = DataSetFactory::getDataSetByName('profiles'); |
@@ -130,6 +133,9 @@ discard block |
||
130 | 133 | return $this->getCaptchField('hint'); |
131 | 134 | } |
132 | 135 | |
136 | + /** |
|
137 | + * @return string |
|
138 | + */ |
|
133 | 139 | private function get_answer() |
134 | 140 | { |
135 | 141 | return $this->getCaptchField('answer'); |