@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | /** |
73 | 73 | * Who is this email going to |
74 | 74 | * |
75 | - * @return array The recipients of the email |
|
75 | + * @return string The recipients of the email |
|
76 | 76 | */ |
77 | 77 | public function getToAddresses() |
78 | 78 | { |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | /** |
83 | 83 | * Who is this email going to (CC) |
84 | 84 | * |
85 | - * @return array The recipients of the email |
|
85 | + * @return string The recipients of the email |
|
86 | 86 | */ |
87 | 87 | public function getCCAddresses() |
88 | 88 | { |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | /** |
93 | 93 | * Who is this email going to (BCC) |
94 | 94 | * |
95 | - * @return array The recipients of the email |
|
95 | + * @return string The recipients of the email |
|
96 | 96 | */ |
97 | 97 | public function getBCCAddresses() |
98 | 98 | { |
@@ -59,239 +59,239 @@ |
||
59 | 59 | |
60 | 60 | global $jsArray; |
61 | 61 | $jsArray = array( |
62 | - JS_JQUERY => array( |
|
63 | - 'no' => array( |
|
64 | - 'no' => '/js/common/jquery.js', |
|
65 | - 'min' => '/js/common/jquery.min.js' |
|
66 | - ), |
|
67 | - 'cdn' => array( |
|
68 | - 'no' => '//ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.js', |
|
69 | - 'min' => '//ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js' |
|
70 | - ) |
|
71 | - ), |
|
72 | - JS_JQUERY_UI => array( |
|
73 | - 'no' => array( |
|
74 | - 'no' => '/js/common/jquery-ui.js', |
|
75 | - 'min' => '/js/common/jquery-ui.min.js' |
|
76 | - ), |
|
77 | - 'cdn' => array( |
|
78 | - 'no' => '//ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/jquery-ui.js', |
|
79 | - 'min' => '//ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/jquery-ui.min.js' |
|
80 | - ) |
|
81 | - ), |
|
82 | - JS_BOOTSTRAP => array( |
|
83 | - 'no' => array( |
|
84 | - 'no' => '/js/common/bootstrap.js', |
|
85 | - 'min' => '/js/common/bootstrap.min.js' |
|
86 | - ), |
|
87 | - 'cdn' => array( |
|
88 | - 'no' => '//maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.js', |
|
89 | - 'min' => '//maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js' |
|
90 | - ) |
|
91 | - ), |
|
92 | - JQUERY_VALIDATE => array( |
|
93 | - 'no' => array( |
|
94 | - 'no' => '/js/common/jquery.validate.js', |
|
95 | - 'min' => '/js/common/jquery.validate.min.js' |
|
96 | - ), |
|
97 | - 'cdn' => array( |
|
98 | - 'no' => '//ajax.aspnetcdn.com/ajax/jquery.validate/1.13.1/jquery.validate.js', |
|
99 | - 'min' => '//ajax.aspnetcdn.com/ajax/jquery.validate/1.13.1/jquery.validate.min.js' |
|
100 | - ) |
|
101 | - ), |
|
102 | - JQUERY_TOUCH => array( |
|
103 | - 'no' => array( |
|
104 | - 'no' => '/js/common/jquery.ui.touch-punch.min.js', |
|
105 | - 'min' => '/js/common/jquery.ui.touch-punch.min.js' |
|
106 | - ), |
|
107 | - 'cdn' => array( |
|
108 | - 'no' => '//cdnjs.cloudflare.com/ajax/libs/jqueryui-touch-punch/0.2.3/jquery.ui.touch-punch.min.js', |
|
109 | - 'min' => '//cdnjs.cloudflare.com/ajax/libs/jqueryui-touch-punch/0.2.3/jquery.ui.touch-punch.min.js' |
|
110 | - ) |
|
111 | - ), |
|
112 | - JS_TINYNAV => array( |
|
113 | - 'no' => array( |
|
114 | - 'no' => '/js/common/tinynav.js', |
|
115 | - 'min' => '/js/common/tinynav.min.js' |
|
116 | - ), |
|
117 | - 'cdn' => array( |
|
118 | - 'no' => '//cdnjs.cloudflare.com/ajax/libs/TinyNav.js/1.2.0/tinynav.js', |
|
119 | - 'min' => '//cdnjs.cloudflare.com/ajax/libs/TinyNav.js/1.2.0/tinynav.min.js' |
|
120 | - ) |
|
121 | - ), |
|
122 | - JS_BOOTSTRAP_FH => array( |
|
123 | - 'no' => array( |
|
124 | - 'no' => '/js/common/bootstrap-formhelpers.js', |
|
125 | - 'min' => '/js/common/bootstrap-formhelpers.min.js' |
|
126 | - ), |
|
127 | - 'cdn' => array( |
|
128 | - 'no' => '//cdnjs.cloudflare.com/ajax/libs/bootstrap-formhelpers/2.3.0/js/bootstrap-formhelpers.js', |
|
129 | - 'min' => '//cdnjs.cloudflare.com/ajax/libs/bootstrap-formhelpers/2.3.0/js/bootstrap-formhelpers.min.js' |
|
130 | - ) |
|
131 | - ), |
|
132 | - JS_BOOTSTRAP_SW => array( |
|
133 | - 'no' => array( |
|
134 | - 'no' => '/js/common/bootstrap-switch.js', |
|
135 | - 'min' => '/js/common/bootstrap-switch.min.js' |
|
136 | - ), |
|
137 | - 'cdn' => array( |
|
138 | - 'no' => '//cdnjs.cloudflare.com/ajax/libs/bootstrap-switch/3.3.2/js/bootstrap-switch.js', |
|
139 | - 'min' => '//cdnjs.cloudflare.com/ajax/libs/bootstrap-switch/3.3.2/js/bootstrap-switch.min.js' |
|
140 | - ) |
|
141 | - ), |
|
142 | - JS_DATATABLE => array( |
|
143 | - 'no' => array( |
|
144 | - 'no' => '/js/common/jquery.dataTables.js', |
|
145 | - 'min' => '/js/common/jquery.dataTables.min.js' |
|
146 | - ), |
|
147 | - 'cdn' => array( |
|
148 | - 'no' => '//cdn.datatables.net/1.10.7/js/jquery.dataTables.js', |
|
149 | - 'min' => '//cdn.datatables.net/1.10.7/js/jquery.dataTables.min.js' |
|
150 | - ) |
|
151 | - ), |
|
152 | - JS_CHART => array( |
|
153 | - 'no' => array( |
|
154 | - 'no' => '/js/common/Chart.js', |
|
155 | - 'min' => '/js/common/Chart.min.js' |
|
156 | - ), |
|
157 | - 'cdn' => array( |
|
158 | - 'no' => '//cdnjs.cloudflare.com/ajax/libs/Chart.js/1.0.2/Chart.js', |
|
159 | - 'min' => '//cdnjs.cloudflare.com/ajax/libs/Chart.js/1.0.2/Chart.min.js' |
|
160 | - ) |
|
161 | - ), |
|
162 | - JS_METISMENU => array( |
|
163 | - 'no' => array( |
|
164 | - 'no' => '/js/common/metisMenu.js', |
|
165 | - 'min' => '/js/common/metisMenu.min.js' |
|
166 | - ), |
|
167 | - 'cdn' => array( |
|
168 | - 'no' => '//cdnjs.cloudflare.com/ajax/libs/metisMenu/2.0.2/metisMenu.js', |
|
169 | - 'min' => '//cdnjs.cloudflare.com/ajax/libs/metisMenu/2.0.2/metisMenu.min.js' |
|
170 | - ) |
|
171 | - ), |
|
172 | - JS_BOOTBOX => array( |
|
173 | - 'no' => array( |
|
174 | - 'no' => '/js/common/bootbox.js', |
|
175 | - 'min' => '/js/common/bootbox.min.js' |
|
176 | - ), |
|
177 | - 'cdn' => array( |
|
178 | - 'no' => '//cdnjs.cloudflare.com/ajax/libs/bootbox.js/4.3.0/bootbox.js', |
|
179 | - 'min' => '//cdnjs.cloudflare.com/ajax/libs/bootbox.js/4.3.0/bootbox.min.js' |
|
180 | - ) |
|
181 | - ), |
|
182 | - JS_DATATABLE_ODATA => array( |
|
183 | - 'no' => array( |
|
184 | - 'no' => '/js/common/jquery.dataTables.odata.js', |
|
185 | - 'min' => '/js/common/jquery.dataTables.odata.js', |
|
186 | - ), |
|
187 | - 'cdn' => array( |
|
188 | - 'no' => '/js/common/jquery.dataTables.odata.js', |
|
189 | - 'min' => '/js/common/jquery.dataTables.odata.js', |
|
190 | - ) |
|
191 | - ), |
|
192 | - JS_CRYPTO_MD5_JS => array( |
|
193 | - 'no' => array( |
|
194 | - 'no' => '/js/common/md5.js', |
|
195 | - 'min' => '/js/common/md5.js', |
|
196 | - ), |
|
197 | - 'cdn' => array( |
|
198 | - 'no' => '//cdnjs.cloudflare.com/ajax/libs/crypto-js/3.1.2/rollups/md5.js', |
|
199 | - 'min' => '//cdnjs.cloudflare.com/ajax/libs/crypto-js/3.1.2/rollups/md5.js', |
|
200 | - ) |
|
201 | - ), |
|
202 | - JS_JCROP => array( |
|
203 | - 'no' => array( |
|
204 | - 'no' => '/js/common/jquery.Jcrop.min.js', |
|
205 | - 'min' => '/js/common/jquery.Jcrop.min.js' |
|
206 | - ), |
|
207 | - 'cdn' => array( |
|
208 | - 'no' => '//cdnjs.cloudflare.com/ajax/libs/jquery-jcrop/0.9.12/js/jquery.Jcrop.min.js', |
|
209 | - 'min' => '//cdnjs.cloudflare.com/ajax/libs/jquery-jcrop/0.9.12/js/jquery.Jcrop.min.js' |
|
210 | - ) |
|
211 | - ), |
|
212 | - JS_TYPEAHEAD => array( |
|
213 | - 'no' => array( |
|
214 | - 'no' => '/js/common/typeahead.bundle.js', |
|
215 | - 'min' => '/js/common/typeahead.bundle.min.js' |
|
216 | - ), |
|
217 | - 'cdn' => array( |
|
218 | - 'no' => '//cdnjs.cloudflare.com/ajax/libs/typeahead.js/0.11.1/typeahead.bundle.js', |
|
219 | - 'min' => '//cdnjs.cloudflare.com/ajax/libs/typeahead.js/0.11.1/typeahead.bundle.min.js' |
|
220 | - ) |
|
221 | - ), |
|
222 | - JS_FLIPSIDE => array( |
|
223 | - 'no' => array( |
|
224 | - 'no' => '/js/common/flipside.js', |
|
225 | - 'min' => '/js/common/flipside.min.js' |
|
226 | - ), |
|
227 | - 'cdn' => array( |
|
228 | - 'no' => '/js/common/flipside.js', |
|
229 | - 'min' => '/js/common/flipside.min.js' |
|
230 | - ) |
|
231 | - ), |
|
232 | - JS_LOGIN => array( |
|
233 | - 'no' => array( |
|
234 | - 'no' => '/js/common/login.js', |
|
235 | - 'min' => '/js/common/login.min.js' |
|
236 | - ), |
|
237 | - 'cdn' => array( |
|
238 | - 'no' => '/js/common/login.js', |
|
239 | - 'min' => '/js/common/login.min.js' |
|
240 | - ) |
|
241 | - ) |
|
62 | + JS_JQUERY => array( |
|
63 | + 'no' => array( |
|
64 | + 'no' => '/js/common/jquery.js', |
|
65 | + 'min' => '/js/common/jquery.min.js' |
|
66 | + ), |
|
67 | + 'cdn' => array( |
|
68 | + 'no' => '//ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.js', |
|
69 | + 'min' => '//ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js' |
|
70 | + ) |
|
71 | + ), |
|
72 | + JS_JQUERY_UI => array( |
|
73 | + 'no' => array( |
|
74 | + 'no' => '/js/common/jquery-ui.js', |
|
75 | + 'min' => '/js/common/jquery-ui.min.js' |
|
76 | + ), |
|
77 | + 'cdn' => array( |
|
78 | + 'no' => '//ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/jquery-ui.js', |
|
79 | + 'min' => '//ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/jquery-ui.min.js' |
|
80 | + ) |
|
81 | + ), |
|
82 | + JS_BOOTSTRAP => array( |
|
83 | + 'no' => array( |
|
84 | + 'no' => '/js/common/bootstrap.js', |
|
85 | + 'min' => '/js/common/bootstrap.min.js' |
|
86 | + ), |
|
87 | + 'cdn' => array( |
|
88 | + 'no' => '//maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.js', |
|
89 | + 'min' => '//maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js' |
|
90 | + ) |
|
91 | + ), |
|
92 | + JQUERY_VALIDATE => array( |
|
93 | + 'no' => array( |
|
94 | + 'no' => '/js/common/jquery.validate.js', |
|
95 | + 'min' => '/js/common/jquery.validate.min.js' |
|
96 | + ), |
|
97 | + 'cdn' => array( |
|
98 | + 'no' => '//ajax.aspnetcdn.com/ajax/jquery.validate/1.13.1/jquery.validate.js', |
|
99 | + 'min' => '//ajax.aspnetcdn.com/ajax/jquery.validate/1.13.1/jquery.validate.min.js' |
|
100 | + ) |
|
101 | + ), |
|
102 | + JQUERY_TOUCH => array( |
|
103 | + 'no' => array( |
|
104 | + 'no' => '/js/common/jquery.ui.touch-punch.min.js', |
|
105 | + 'min' => '/js/common/jquery.ui.touch-punch.min.js' |
|
106 | + ), |
|
107 | + 'cdn' => array( |
|
108 | + 'no' => '//cdnjs.cloudflare.com/ajax/libs/jqueryui-touch-punch/0.2.3/jquery.ui.touch-punch.min.js', |
|
109 | + 'min' => '//cdnjs.cloudflare.com/ajax/libs/jqueryui-touch-punch/0.2.3/jquery.ui.touch-punch.min.js' |
|
110 | + ) |
|
111 | + ), |
|
112 | + JS_TINYNAV => array( |
|
113 | + 'no' => array( |
|
114 | + 'no' => '/js/common/tinynav.js', |
|
115 | + 'min' => '/js/common/tinynav.min.js' |
|
116 | + ), |
|
117 | + 'cdn' => array( |
|
118 | + 'no' => '//cdnjs.cloudflare.com/ajax/libs/TinyNav.js/1.2.0/tinynav.js', |
|
119 | + 'min' => '//cdnjs.cloudflare.com/ajax/libs/TinyNav.js/1.2.0/tinynav.min.js' |
|
120 | + ) |
|
121 | + ), |
|
122 | + JS_BOOTSTRAP_FH => array( |
|
123 | + 'no' => array( |
|
124 | + 'no' => '/js/common/bootstrap-formhelpers.js', |
|
125 | + 'min' => '/js/common/bootstrap-formhelpers.min.js' |
|
126 | + ), |
|
127 | + 'cdn' => array( |
|
128 | + 'no' => '//cdnjs.cloudflare.com/ajax/libs/bootstrap-formhelpers/2.3.0/js/bootstrap-formhelpers.js', |
|
129 | + 'min' => '//cdnjs.cloudflare.com/ajax/libs/bootstrap-formhelpers/2.3.0/js/bootstrap-formhelpers.min.js' |
|
130 | + ) |
|
131 | + ), |
|
132 | + JS_BOOTSTRAP_SW => array( |
|
133 | + 'no' => array( |
|
134 | + 'no' => '/js/common/bootstrap-switch.js', |
|
135 | + 'min' => '/js/common/bootstrap-switch.min.js' |
|
136 | + ), |
|
137 | + 'cdn' => array( |
|
138 | + 'no' => '//cdnjs.cloudflare.com/ajax/libs/bootstrap-switch/3.3.2/js/bootstrap-switch.js', |
|
139 | + 'min' => '//cdnjs.cloudflare.com/ajax/libs/bootstrap-switch/3.3.2/js/bootstrap-switch.min.js' |
|
140 | + ) |
|
141 | + ), |
|
142 | + JS_DATATABLE => array( |
|
143 | + 'no' => array( |
|
144 | + 'no' => '/js/common/jquery.dataTables.js', |
|
145 | + 'min' => '/js/common/jquery.dataTables.min.js' |
|
146 | + ), |
|
147 | + 'cdn' => array( |
|
148 | + 'no' => '//cdn.datatables.net/1.10.7/js/jquery.dataTables.js', |
|
149 | + 'min' => '//cdn.datatables.net/1.10.7/js/jquery.dataTables.min.js' |
|
150 | + ) |
|
151 | + ), |
|
152 | + JS_CHART => array( |
|
153 | + 'no' => array( |
|
154 | + 'no' => '/js/common/Chart.js', |
|
155 | + 'min' => '/js/common/Chart.min.js' |
|
156 | + ), |
|
157 | + 'cdn' => array( |
|
158 | + 'no' => '//cdnjs.cloudflare.com/ajax/libs/Chart.js/1.0.2/Chart.js', |
|
159 | + 'min' => '//cdnjs.cloudflare.com/ajax/libs/Chart.js/1.0.2/Chart.min.js' |
|
160 | + ) |
|
161 | + ), |
|
162 | + JS_METISMENU => array( |
|
163 | + 'no' => array( |
|
164 | + 'no' => '/js/common/metisMenu.js', |
|
165 | + 'min' => '/js/common/metisMenu.min.js' |
|
166 | + ), |
|
167 | + 'cdn' => array( |
|
168 | + 'no' => '//cdnjs.cloudflare.com/ajax/libs/metisMenu/2.0.2/metisMenu.js', |
|
169 | + 'min' => '//cdnjs.cloudflare.com/ajax/libs/metisMenu/2.0.2/metisMenu.min.js' |
|
170 | + ) |
|
171 | + ), |
|
172 | + JS_BOOTBOX => array( |
|
173 | + 'no' => array( |
|
174 | + 'no' => '/js/common/bootbox.js', |
|
175 | + 'min' => '/js/common/bootbox.min.js' |
|
176 | + ), |
|
177 | + 'cdn' => array( |
|
178 | + 'no' => '//cdnjs.cloudflare.com/ajax/libs/bootbox.js/4.3.0/bootbox.js', |
|
179 | + 'min' => '//cdnjs.cloudflare.com/ajax/libs/bootbox.js/4.3.0/bootbox.min.js' |
|
180 | + ) |
|
181 | + ), |
|
182 | + JS_DATATABLE_ODATA => array( |
|
183 | + 'no' => array( |
|
184 | + 'no' => '/js/common/jquery.dataTables.odata.js', |
|
185 | + 'min' => '/js/common/jquery.dataTables.odata.js', |
|
186 | + ), |
|
187 | + 'cdn' => array( |
|
188 | + 'no' => '/js/common/jquery.dataTables.odata.js', |
|
189 | + 'min' => '/js/common/jquery.dataTables.odata.js', |
|
190 | + ) |
|
191 | + ), |
|
192 | + JS_CRYPTO_MD5_JS => array( |
|
193 | + 'no' => array( |
|
194 | + 'no' => '/js/common/md5.js', |
|
195 | + 'min' => '/js/common/md5.js', |
|
196 | + ), |
|
197 | + 'cdn' => array( |
|
198 | + 'no' => '//cdnjs.cloudflare.com/ajax/libs/crypto-js/3.1.2/rollups/md5.js', |
|
199 | + 'min' => '//cdnjs.cloudflare.com/ajax/libs/crypto-js/3.1.2/rollups/md5.js', |
|
200 | + ) |
|
201 | + ), |
|
202 | + JS_JCROP => array( |
|
203 | + 'no' => array( |
|
204 | + 'no' => '/js/common/jquery.Jcrop.min.js', |
|
205 | + 'min' => '/js/common/jquery.Jcrop.min.js' |
|
206 | + ), |
|
207 | + 'cdn' => array( |
|
208 | + 'no' => '//cdnjs.cloudflare.com/ajax/libs/jquery-jcrop/0.9.12/js/jquery.Jcrop.min.js', |
|
209 | + 'min' => '//cdnjs.cloudflare.com/ajax/libs/jquery-jcrop/0.9.12/js/jquery.Jcrop.min.js' |
|
210 | + ) |
|
211 | + ), |
|
212 | + JS_TYPEAHEAD => array( |
|
213 | + 'no' => array( |
|
214 | + 'no' => '/js/common/typeahead.bundle.js', |
|
215 | + 'min' => '/js/common/typeahead.bundle.min.js' |
|
216 | + ), |
|
217 | + 'cdn' => array( |
|
218 | + 'no' => '//cdnjs.cloudflare.com/ajax/libs/typeahead.js/0.11.1/typeahead.bundle.js', |
|
219 | + 'min' => '//cdnjs.cloudflare.com/ajax/libs/typeahead.js/0.11.1/typeahead.bundle.min.js' |
|
220 | + ) |
|
221 | + ), |
|
222 | + JS_FLIPSIDE => array( |
|
223 | + 'no' => array( |
|
224 | + 'no' => '/js/common/flipside.js', |
|
225 | + 'min' => '/js/common/flipside.min.js' |
|
226 | + ), |
|
227 | + 'cdn' => array( |
|
228 | + 'no' => '/js/common/flipside.js', |
|
229 | + 'min' => '/js/common/flipside.min.js' |
|
230 | + ) |
|
231 | + ), |
|
232 | + JS_LOGIN => array( |
|
233 | + 'no' => array( |
|
234 | + 'no' => '/js/common/login.js', |
|
235 | + 'min' => '/js/common/login.min.js' |
|
236 | + ), |
|
237 | + 'cdn' => array( |
|
238 | + 'no' => '/js/common/login.js', |
|
239 | + 'min' => '/js/common/login.min.js' |
|
240 | + ) |
|
241 | + ) |
|
242 | 242 | ); |
243 | 243 | |
244 | 244 | global $cssArray; |
245 | 245 | $cssArray = array( |
246 | 246 | CSS_JQUERY_UI => array( |
247 | 247 | 'no' => array( |
248 | - 'no' => '/css/common/jquery-ui.css', |
|
249 | - 'min' => '/css/common/jquery-ui.min.css' |
|
250 | - ), |
|
251 | - 'cdn' => array( |
|
252 | - 'no' => '//ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/themes/smoothness/jquery-ui.css', |
|
253 | - 'min' => '//ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/themes/smoothness/jquery-ui.min.css' |
|
254 | - ) |
|
248 | + 'no' => '/css/common/jquery-ui.css', |
|
249 | + 'min' => '/css/common/jquery-ui.min.css' |
|
250 | + ), |
|
251 | + 'cdn' => array( |
|
252 | + 'no' => '//ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/themes/smoothness/jquery-ui.css', |
|
253 | + 'min' => '//ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/themes/smoothness/jquery-ui.min.css' |
|
254 | + ) |
|
255 | 255 | ), |
256 | 256 | CSS_BOOTSTRAP => array( |
257 | - 'no' => array( |
|
258 | - 'no' => '/css/common/bootstrap.css', |
|
259 | - 'min' => '/css/common/bootstrap.min.css' |
|
260 | - ), |
|
261 | - 'cdn' => array( |
|
262 | - 'no' => '//maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.css', |
|
263 | - 'min' => '//maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css' |
|
264 | - ) |
|
257 | + 'no' => array( |
|
258 | + 'no' => '/css/common/bootstrap.css', |
|
259 | + 'min' => '/css/common/bootstrap.min.css' |
|
260 | + ), |
|
261 | + 'cdn' => array( |
|
262 | + 'no' => '//maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.css', |
|
263 | + 'min' => '//maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css' |
|
264 | + ) |
|
265 | 265 | ), |
266 | 266 | CSS_BOOTSTRAP_FH => array( |
267 | 267 | 'no' => array( |
268 | - 'no' => '/css/common/bootstrap-formhelpers.css', |
|
269 | - 'min' => '/css/common/bootstrap-formhelpers.min.css' |
|
270 | - ), |
|
271 | - 'cdn' => array( |
|
272 | - 'no' => '//cdnjs.cloudflare.com/ajax/libs/bootstrap-formhelpers/2.3.0/css/bootstrap-formhelpers.css', |
|
273 | - 'min' => '//cdnjs.cloudflare.com/ajax/libs/bootstrap-formhelpers/2.3.0/css/bootstrap-formhelpers.min.css' |
|
274 | - ) |
|
268 | + 'no' => '/css/common/bootstrap-formhelpers.css', |
|
269 | + 'min' => '/css/common/bootstrap-formhelpers.min.css' |
|
270 | + ), |
|
271 | + 'cdn' => array( |
|
272 | + 'no' => '//cdnjs.cloudflare.com/ajax/libs/bootstrap-formhelpers/2.3.0/css/bootstrap-formhelpers.css', |
|
273 | + 'min' => '//cdnjs.cloudflare.com/ajax/libs/bootstrap-formhelpers/2.3.0/css/bootstrap-formhelpers.min.css' |
|
274 | + ) |
|
275 | 275 | ), |
276 | 276 | CSS_BOOTSTRAP_SW => array( |
277 | - 'no' => array( |
|
278 | - 'no' => '/css/common/bootstrap-switch.css', |
|
279 | - 'min' => '/css/common/bootstrap-switch.min.css' |
|
280 | - ), |
|
281 | - 'cdn' => array( |
|
282 | - 'no' => '//cdnjs.cloudflare.com/ajax/libs/bootstrap-switch/3.3.2/css/bootstrap3/bootstrap-switch.css', |
|
283 | - 'min' => '//cdnjs.cloudflare.com/ajax/libs/bootstrap-switch/3.3.2/css/bootstrap3/bootstrap-switch.min.css' |
|
284 | - ) |
|
277 | + 'no' => array( |
|
278 | + 'no' => '/css/common/bootstrap-switch.css', |
|
279 | + 'min' => '/css/common/bootstrap-switch.min.css' |
|
280 | + ), |
|
281 | + 'cdn' => array( |
|
282 | + 'no' => '//cdnjs.cloudflare.com/ajax/libs/bootstrap-switch/3.3.2/css/bootstrap3/bootstrap-switch.css', |
|
283 | + 'min' => '//cdnjs.cloudflare.com/ajax/libs/bootstrap-switch/3.3.2/css/bootstrap3/bootstrap-switch.min.css' |
|
284 | + ) |
|
285 | 285 | ), |
286 | 286 | CSS_DATATABLE => array( |
287 | 287 | 'no' => array( |
288 | - 'no' => '/css/common/jquery.dataTables.css', |
|
289 | - 'min' => '/css/common/jquery.dataTables.min.css' |
|
290 | - ), |
|
291 | - 'cdn' => array( |
|
292 | - 'no' => '//cdn.datatables.net/1.10.7/css/jquery.dataTables.css', |
|
293 | - 'min' => '//cdn.datatables.net/1.10.7/css/jquery.dataTables.min.css' |
|
294 | - ) |
|
288 | + 'no' => '/css/common/jquery.dataTables.css', |
|
289 | + 'min' => '/css/common/jquery.dataTables.min.css' |
|
290 | + ), |
|
291 | + 'cdn' => array( |
|
292 | + 'no' => '//cdn.datatables.net/1.10.7/css/jquery.dataTables.css', |
|
293 | + 'min' => '//cdn.datatables.net/1.10.7/css/jquery.dataTables.min.css' |
|
294 | + ) |
|
295 | 295 | ), |
296 | 296 | CSS_JCROP => array( |
297 | 297 | 'no' => array( |
@@ -41,10 +41,16 @@ |
||
41 | 41 | switch($orderby[$keys[0]]) |
42 | 42 | { |
43 | 43 | case 1: |
44 | - if($d > 0) swap($array, $i, $j); |
|
44 | + if($d > 0) |
|
45 | + { |
|
46 | + swap($array, $i, $j); |
|
47 | + } |
|
45 | 48 | break; |
46 | 49 | case 0: |
47 | - if($d < 0) swap($array, $i, $j); |
|
50 | + if($d < 0) |
|
51 | + { |
|
52 | + swap($array, $i, $j); |
|
53 | + } |
|
48 | 54 | break; |
49 | 55 | } |
50 | 56 | } |
@@ -288,10 +288,10 @@ discard block |
||
288 | 288 | |
289 | 289 | /** |
290 | 290 | # @param array $data The array data to filter and sort |
291 | - * @param boolean|array $select The fields to return |
|
292 | - * @param boolean|integer $top The number of records to return |
|
293 | - * @param boolean|integer $skip The number of records to skip |
|
294 | - * @param boolean|array $orderby The fields to sort by |
|
291 | + * @param boolean $select The fields to return |
|
292 | + * @param boolean $top The number of records to return |
|
293 | + * @param boolean $skip The number of records to skip |
|
294 | + * @param boolean $orderby The fields to sort by |
|
295 | 295 | */ |
296 | 296 | private function processFilteringParams(&$data, &$select, $top, $skip, $orderby) |
297 | 297 | { |
@@ -317,6 +317,9 @@ discard block |
||
317 | 317 | } |
318 | 318 | } |
319 | 319 | |
320 | + /** |
|
321 | + * @param \Data\Filter $filter |
|
322 | + */ |
|
320 | 323 | public function getUsersByFilter($filter, $select = false, $top = false, $skip = false, $orderby = false) |
321 | 324 | { |
322 | 325 | $server = $this->get_and_bind_server(); |
@@ -1,24 +1,24 @@ |
||
1 | 1 | <?php |
2 | 2 | namespace Auth; |
3 | 3 | |
4 | -class NullAuthenticator extends Authenticator |
|
5 | -{ |
|
6 | - public function login($username, $password) |
|
7 | - { |
|
4 | +class NullAuthenticator extends Authenticator |
|
5 | +{ |
|
6 | + public function login($username, $password) |
|
7 | + { |
|
8 | 8 | return array('res'=>true, 'extended'=>null); |
9 | 9 | } |
10 | 10 | |
11 | - public function isLoggedIn($data) |
|
12 | - { |
|
13 | - if(isset($data['res'])) |
|
14 | - { |
|
11 | + public function isLoggedIn($data) |
|
12 | + { |
|
13 | + if(isset($data['res'])) |
|
14 | + { |
|
15 | 15 | return $data['res']; |
16 | 16 | } |
17 | 17 | return false; |
18 | 18 | } |
19 | 19 | |
20 | - public function getUser($data) |
|
21 | - { |
|
20 | + public function getUser($data) |
|
21 | + { |
|
22 | 22 | return null; |
23 | 23 | } |
24 | 24 | } |
@@ -16,8 +16,14 @@ |
||
16 | 16 | $ret = array(); |
17 | 17 | foreach ($this as $key => $value) |
18 | 18 | { |
19 | - if($key === 'server' || $key === 'count') continue; |
|
20 | - if(is_numeric($key)) continue; |
|
19 | + if($key === 'server' || $key === 'count') |
|
20 | + { |
|
21 | + continue; |
|
22 | + } |
|
23 | + if(is_numeric($key)) |
|
24 | + { |
|
25 | + continue; |
|
26 | + } |
|
21 | 27 | if($key === 'jpegphoto') |
22 | 28 | { |
23 | 29 | $ret[$key] = base64_encode($value[0]); |
@@ -1,6 +1,8 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | require_once('Autoload.php'); |
3 | -if(!isset($_SESSION) && php_sapi_name() !== 'cli') { session_start(); } |
|
3 | +if(!isset($_SESSION) && php_sapi_name() !== 'cli') |
|
4 | +{ |
|
5 | +session_start(); } |
|
4 | 6 | if(!isset($_SESSION['ip_address']) && isset($_SERVER['REMOTE_ADDR'])) |
5 | 7 | { |
6 | 8 | $_SESSION['ip_address'] = $_SERVER['REMOTE_ADDR']; |
@@ -156,7 +158,10 @@ discard block |
||
156 | 158 | $pos = strpos($sessionData, "|", $offset); |
157 | 159 | $len = $pos - $offset; |
158 | 160 | $name = substr($sessionData, $offset, $len); |
159 | - if($name === false) break; |
|
161 | + if($name === false) |
|
162 | + { |
|
163 | + break; |
|
164 | + } |
|
160 | 165 | $offset += $len+1; |
161 | 166 | $data = @unserialize(substr($sessionData, $offset)); |
162 | 167 | $res[$name] = $data; |
@@ -90,7 +90,10 @@ |
||
90 | 90 | { |
91 | 91 | $isLast = true; |
92 | 92 | } |
93 | - if(!isset($group->member[$i]->type)) continue; |
|
93 | + if(!isset($group->member[$i]->type)) |
|
94 | + { |
|
95 | + continue; |
|
96 | + } |
|
94 | 97 | if($group->member[$i]->type === 'Group') |
95 | 98 | { |
96 | 99 | $this->addMember($group->member[$i]->cn, true, $isLast); |
@@ -44,7 +44,7 @@ |
||
44 | 44 | /** |
45 | 45 | * Get the UID's of the Group Members |
46 | 46 | * |
47 | - * @param boolean $recursie Include members of child groups |
|
47 | + * @param boolean $recursive Include members of child groups |
|
48 | 48 | * |
49 | 49 | * @return array Array of UIDs |
50 | 50 | * |
@@ -2,20 +2,20 @@ discard block |
||
2 | 2 | namespace Auth; |
3 | 3 | require dirname(__FILE__).'/../libs/google/src/Google/autoload.php'; |
4 | 4 | |
5 | -class GoogleAuthenticator extends Authenticator |
|
6 | -{ |
|
5 | +class GoogleAuthenticator extends Authenticator |
|
6 | +{ |
|
7 | 7 | protected $client; |
8 | 8 | protected $token = null; |
9 | 9 | |
10 | - public function __construct($params) |
|
11 | - { |
|
10 | + public function __construct($params) |
|
11 | + { |
|
12 | 12 | parent::__construct($params); |
13 | - if(!isset($params['client_secrets_path'])) |
|
14 | - { |
|
13 | + if(!isset($params['client_secrets_path'])) |
|
14 | + { |
|
15 | 15 | throw new \Exception('Missing required parameter client_secrets_path!'); |
16 | 16 | } |
17 | - if(!isset($params['redirect_url'])) |
|
18 | - { |
|
17 | + if(!isset($params['redirect_url'])) |
|
18 | + { |
|
19 | 19 | $params['redirect_url'] = 'https://'.$_SERVER['HTTP_HOST'].'/oauth2callback.php?src=google'; |
20 | 20 | } |
21 | 21 | $this->token = \FlipSession::getVar('GoogleToken', null); |
@@ -25,63 +25,64 @@ discard block |
||
25 | 25 | $this->client->setRedirectUri($params['redirect_url']); |
26 | 26 | } |
27 | 27 | |
28 | - public function getSupplementLink() |
|
29 | - { |
|
28 | + public function getSupplementLink() |
|
29 | + { |
|
30 | 30 | $authUrl = $this->client->createAuthUrl(); |
31 | 31 | return '<a href="'.filter_var($authUrl, FILTER_SANITIZE_URL).'"><img src="/img/common/google_sign_in.png" style="width: 2em;"/></a>'; |
32 | 32 | } |
33 | 33 | |
34 | - public function authenticate($code, &$currentUser = false) |
|
35 | - { |
|
34 | + public function authenticate($code, &$currentUser = false) |
|
35 | + { |
|
36 | 36 | $googleUser = false; |
37 | - try |
|
38 | - { |
|
37 | + try |
|
38 | + { |
|
39 | 39 | $this->client->authenticate($code); |
40 | 40 | $this->token = $this->client->getAccessToken(); |
41 | 41 | \FlipSession::setVar('GoogleToken', $this->token); |
42 | 42 | $oauth2Service = new \Google_Service_Oauth2($this->client); |
43 | 43 | $googleUser = $oauth2Service->userinfo->get(); |
44 | - } |
|
45 | - catch(\Exception $ex) |
|
46 | - { |
|
44 | + } |
|
45 | + catch(\Exception $ex) |
|
46 | + { |
|
47 | 47 | return self::LOGIN_FAILED; |
48 | 48 | } |
49 | 49 | |
50 | 50 | $auth = \AuthProvider::getInstance(); |
51 | 51 | $localUsers = $auth->getUsersByFilter(new \Data\Filter('mail eq '.$googleUser->email)); |
52 | - if($localUsers !== false && isset($localUsers[0])) |
|
53 | - { |
|
54 | - if($localUsers[0]->canLoginWith('google.com')) |
|
55 | - { |
|
52 | + if($localUsers !== false && isset($localUsers[0])) |
|
53 | + { |
|
54 | + if($localUsers[0]->canLoginWith('google.com')) |
|
55 | + { |
|
56 | 56 | $auth->impersonateUser($localUsers[0]); |
57 | 57 | return self::SUCCESS; |
58 | 58 | } |
59 | 59 | $currentUser = $localUsers[0]; |
60 | 60 | return self::ALREADY_PRESENT; |
61 | - } |
|
62 | - else |
|
63 | - { |
|
61 | + } |
|
62 | + else |
|
63 | + { |
|
64 | 64 | $user = new PendingUser(); |
65 | 65 | $user->setEmail($googleUser->email); |
66 | 66 | $user->setGivenName($googleUser->givenName); |
67 | 67 | $user->setLastName($googleUser->familyName); |
68 | 68 | $user->addLoginProvider('google.com'); |
69 | 69 | $ret = $auth->activatePendingUser($user); |
70 | - if($ret === false) |
|
71 | - { |
|
70 | + if($ret === false) |
|
71 | + { |
|
72 | 72 | throw new \Exception('Unable to create user! '.$res); |
73 | 73 | } |
74 | 74 | return self::SUCCESS; |
75 | 75 | } |
76 | 76 | } |
77 | 77 | |
78 | - public function getUser($data = false) |
|
79 | - { |
|
80 | - if($data === false) |
|
81 | - { |
|
78 | + public function getUser($data = false) |
|
79 | + { |
|
80 | + if($data === false) |
|
81 | + { |
|
82 | 82 | $data = $this->token; |
83 | 83 | } |
84 | - try { |
|
84 | + try |
|
85 | + { |
|
85 | 86 | $this->client->setAccessToken($data); |
86 | 87 | $oauth2Service = new \Google_Service_Oauth2($this->client); |
87 | 88 | $googleUser = $oauth2Service->userinfo->get(); |
@@ -92,8 +93,9 @@ discard block |
||
92 | 93 | $profileUser['displayName'] = $googleUser->name; |
93 | 94 | $profileUser['jpegPhoto'] = base64_encode(file_get_contents($googleUser->picture)); |
94 | 95 | return $profileUser; |
95 | - } catch(\Exception $e) |
|
96 | - { |
|
96 | + } |
|
97 | + catch(\Exception $e) |
|
98 | + { |
|
97 | 99 | return false; |
98 | 100 | } |
99 | 101 | } |
@@ -88,6 +88,9 @@ discard block |
||
88 | 88 | return $this->appendFieldServer($fieldName, $fieldValue); |
89 | 89 | } |
90 | 90 | |
91 | + /** |
|
92 | + * @param string $fieldName |
|
93 | + */ |
|
91 | 94 | private function getFieldLocal($fieldName) |
92 | 95 | { |
93 | 96 | if($this->ldapObj === false) |
@@ -101,6 +104,9 @@ discard block |
||
101 | 104 | return $this->ldapObj[$fieldName]; |
102 | 105 | } |
103 | 106 | |
107 | + /** |
|
108 | + * @param string $fieldName |
|
109 | + */ |
|
104 | 110 | private function getFieldServer($fieldName) |
105 | 111 | { |
106 | 112 | $lowerName = strtolower($fieldName); |
@@ -111,6 +117,9 @@ discard block |
||
111 | 117 | return $this->ldapObj->{$lowerName}; |
112 | 118 | } |
113 | 119 | |
120 | + /** |
|
121 | + * @param string $fieldName |
|
122 | + */ |
|
114 | 123 | private function getFieldLocalSingleValue($fieldName) |
115 | 124 | { |
116 | 125 | if($this->ldapObj === false) |
@@ -128,6 +137,9 @@ discard block |
||
128 | 137 | return $this->ldapObj[$fieldName]; |
129 | 138 | } |
130 | 139 | |
140 | + /** |
|
141 | + * @param string $fieldName |
|
142 | + */ |
|
131 | 143 | private function getFieldServerSingleValue($fieldName) |
132 | 144 | { |
133 | 145 | $lowerName = strtolower($fieldName); |
@@ -143,6 +155,9 @@ discard block |
||
143 | 155 | return $field[0]; |
144 | 156 | } |
145 | 157 | |
158 | + /** |
|
159 | + * @param string $fieldName |
|
160 | + */ |
|
146 | 161 | private function setFieldServer($fieldName, $fieldValue) |
147 | 162 | { |
148 | 163 | $obj = array('dn'=>$this->ldapObj->dn); |
@@ -159,6 +174,9 @@ discard block |
||
159 | 174 | return $this->update($obj); |
160 | 175 | } |
161 | 176 | |
177 | + /** |
|
178 | + * @param string $fieldName |
|
179 | + */ |
|
162 | 180 | private function appendFieldServer($fieldName, $fieldValue) |
163 | 181 | { |
164 | 182 | $obj = array('dn'=>$this->ldapObj->dn); |
@@ -175,6 +193,9 @@ discard block |
||
175 | 193 | return $this->update($obj); |
176 | 194 | } |
177 | 195 | |
196 | + /** |
|
197 | + * @param string $fieldName |
|
198 | + */ |
|
178 | 199 | private function setFieldLocal($fieldName, $fieldValue) |
179 | 200 | { |
180 | 201 | if($this->ldapObj === false) |
@@ -193,6 +214,9 @@ discard block |
||
193 | 214 | return true; |
194 | 215 | } |
195 | 216 | |
217 | + /** |
|
218 | + * @param string $fieldName |
|
219 | + */ |
|
196 | 220 | private function appendFieldLocal($fieldName, $fieldValue) |
197 | 221 | { |
198 | 222 | if($this->ldapObj === false) |