@@ -72,7 +72,10 @@ discard block |
||
| 72 | 72 | <div class="form-group"> |
| 73 | 73 | <label class="col-sm-3 control-label"><?php echo get_lang('SessionCategoryName') ?></label> |
| 74 | 74 | <div class="col-sm-6"> |
| 75 | - <input type="text" class="form-control" name="name" placeholder="<?php echo get_lang('Category') ?>" size="50" maxlength="50" value="<?php if($formSent) echo api_htmlentities($name,ENT_QUOTES,$charset); ?>"> |
|
| 75 | + <input type="text" class="form-control" name="name" placeholder="<?php echo get_lang('Category') ?>" size="50" maxlength="50" value="<?php if($formSent) { |
|
| 76 | + echo api_htmlentities($name,ENT_QUOTES,$charset); |
|
| 77 | +} |
|
| 78 | +?>"> |
|
| 76 | 79 | </div> |
| 77 | 80 | <div class="col-md-3"></div> |
| 78 | 81 | </div> |
@@ -90,58 +93,184 @@ discard block |
||
| 90 | 93 | <div class="col-sm-6"> |
| 91 | 94 | <select name="day_start"> |
| 92 | 95 | <option value="1">01</option> |
| 93 | - <option value="2" <?php if((!$formSent && $thisDay == 2) || ($formSent && $day_start == 2)) echo 'selected="selected"'; ?> >02</option> |
|
| 94 | - <option value="3" <?php if((!$formSent && $thisDay == 3) || ($formSent && $day_start == 3)) echo 'selected="selected"'; ?> >03</option> |
|
| 95 | - <option value="4" <?php if((!$formSent && $thisDay == 4) || ($formSent && $day_start == 4)) echo 'selected="selected"'; ?> >04</option> |
|
| 96 | - <option value="5" <?php if((!$formSent && $thisDay == 5) || ($formSent && $day_start == 5)) echo 'selected="selected"'; ?> >05</option> |
|
| 97 | - <option value="6" <?php if((!$formSent && $thisDay == 6) || ($formSent && $day_start == 6)) echo 'selected="selected"'; ?> >06</option> |
|
| 98 | - <option value="7" <?php if((!$formSent && $thisDay == 7) || ($formSent && $day_start == 7)) echo 'selected="selected"'; ?> >07</option> |
|
| 99 | - <option value="8" <?php if((!$formSent && $thisDay == 8) || ($formSent && $day_start == 8)) echo 'selected="selected"'; ?> >08</option> |
|
| 100 | - <option value="9" <?php if((!$formSent && $thisDay == 9) || ($formSent && $day_start == 9)) echo 'selected="selected"'; ?> >09</option> |
|
| 101 | - <option value="10" <?php if((!$formSent && $thisDay == 10) || ($formSent && $day_start == 10)) echo 'selected="selected"'; ?> >10</option> |
|
| 102 | - <option value="11" <?php if((!$formSent && $thisDay == 11) || ($formSent && $day_start == 11)) echo 'selected="selected"'; ?> >11</option> |
|
| 103 | - <option value="12" <?php if((!$formSent && $thisDay == 12) || ($formSent && $day_start == 12)) echo 'selected="selected"'; ?> >12</option> |
|
| 104 | - <option value="13" <?php if((!$formSent && $thisDay == 13) || ($formSent && $day_start == 13)) echo 'selected="selected"'; ?> >13</option> |
|
| 105 | - <option value="14" <?php if((!$formSent && $thisDay == 14) || ($formSent && $day_start == 14)) echo 'selected="selected"'; ?> >14</option> |
|
| 106 | - <option value="15" <?php if((!$formSent && $thisDay == 15) || ($formSent && $day_start == 15)) echo 'selected="selected"'; ?> >15</option> |
|
| 107 | - <option value="16" <?php if((!$formSent && $thisDay == 16) || ($formSent && $day_start == 16)) echo 'selected="selected"'; ?> >16</option> |
|
| 108 | - <option value="17" <?php if((!$formSent && $thisDay == 17) || ($formSent && $day_start == 17)) echo 'selected="selected"'; ?> >17</option> |
|
| 109 | - <option value="18" <?php if((!$formSent && $thisDay == 18) || ($formSent && $day_start == 18)) echo 'selected="selected"'; ?> >18</option> |
|
| 110 | - <option value="19" <?php if((!$formSent && $thisDay == 19) || ($formSent && $day_start == 19)) echo 'selected="selected"'; ?> >19</option> |
|
| 111 | - <option value="20" <?php if((!$formSent && $thisDay == 20) || ($formSent && $day_start == 20)) echo 'selected="selected"'; ?> >20</option> |
|
| 112 | - <option value="21" <?php if((!$formSent && $thisDay == 21) || ($formSent && $day_start == 21)) echo 'selected="selected"'; ?> >21</option> |
|
| 113 | - <option value="22" <?php if((!$formSent && $thisDay == 22) || ($formSent && $day_start == 22)) echo 'selected="selected"'; ?> >22</option> |
|
| 114 | - <option value="23" <?php if((!$formSent && $thisDay == 23) || ($formSent && $day_start == 23)) echo 'selected="selected"'; ?> >23</option> |
|
| 115 | - <option value="24" <?php if((!$formSent && $thisDay == 24) || ($formSent && $day_start == 24)) echo 'selected="selected"'; ?> >24</option> |
|
| 116 | - <option value="25" <?php if((!$formSent && $thisDay == 25) || ($formSent && $day_start == 25)) echo 'selected="selected"'; ?> >25</option> |
|
| 117 | - <option value="26" <?php if((!$formSent && $thisDay == 26) || ($formSent && $day_start == 26)) echo 'selected="selected"'; ?> >26</option> |
|
| 118 | - <option value="27" <?php if((!$formSent && $thisDay == 27) || ($formSent && $day_start == 27)) echo 'selected="selected"'; ?> >27</option> |
|
| 119 | - <option value="28" <?php if((!$formSent && $thisDay == 28) || ($formSent && $day_start == 28)) echo 'selected="selected"'; ?> >28</option> |
|
| 120 | - <option value="29" <?php if((!$formSent && $thisDay == 29) || ($formSent && $day_start == 29)) echo 'selected="selected"'; ?> >29</option> |
|
| 121 | - <option value="30" <?php if((!$formSent && $thisDay == 30) || ($formSent && $day_start == 30)) echo 'selected="selected"'; ?> >30</option> |
|
| 122 | - <option value="31" <?php if((!$formSent && $thisDay == 31) || ($formSent && $day_start == 31)) echo 'selected="selected"'; ?> >31</option> |
|
| 96 | + <option value="2" <?php if((!$formSent && $thisDay == 2) || ($formSent && $day_start == 2)) { |
|
| 97 | + echo 'selected="selected"'; |
|
| 98 | +} |
|
| 99 | +?> >02</option> |
|
| 100 | + <option value="3" <?php if((!$formSent && $thisDay == 3) || ($formSent && $day_start == 3)) { |
|
| 101 | + echo 'selected="selected"'; |
|
| 102 | +} |
|
| 103 | +?> >03</option> |
|
| 104 | + <option value="4" <?php if((!$formSent && $thisDay == 4) || ($formSent && $day_start == 4)) { |
|
| 105 | + echo 'selected="selected"'; |
|
| 106 | +} |
|
| 107 | +?> >04</option> |
|
| 108 | + <option value="5" <?php if((!$formSent && $thisDay == 5) || ($formSent && $day_start == 5)) { |
|
| 109 | + echo 'selected="selected"'; |
|
| 110 | +} |
|
| 111 | +?> >05</option> |
|
| 112 | + <option value="6" <?php if((!$formSent && $thisDay == 6) || ($formSent && $day_start == 6)) { |
|
| 113 | + echo 'selected="selected"'; |
|
| 114 | +} |
|
| 115 | +?> >06</option> |
|
| 116 | + <option value="7" <?php if((!$formSent && $thisDay == 7) || ($formSent && $day_start == 7)) { |
|
| 117 | + echo 'selected="selected"'; |
|
| 118 | +} |
|
| 119 | +?> >07</option> |
|
| 120 | + <option value="8" <?php if((!$formSent && $thisDay == 8) || ($formSent && $day_start == 8)) { |
|
| 121 | + echo 'selected="selected"'; |
|
| 122 | +} |
|
| 123 | +?> >08</option> |
|
| 124 | + <option value="9" <?php if((!$formSent && $thisDay == 9) || ($formSent && $day_start == 9)) { |
|
| 125 | + echo 'selected="selected"'; |
|
| 126 | +} |
|
| 127 | +?> >09</option> |
|
| 128 | + <option value="10" <?php if((!$formSent && $thisDay == 10) || ($formSent && $day_start == 10)) { |
|
| 129 | + echo 'selected="selected"'; |
|
| 130 | +} |
|
| 131 | +?> >10</option> |
|
| 132 | + <option value="11" <?php if((!$formSent && $thisDay == 11) || ($formSent && $day_start == 11)) { |
|
| 133 | + echo 'selected="selected"'; |
|
| 134 | +} |
|
| 135 | +?> >11</option> |
|
| 136 | + <option value="12" <?php if((!$formSent && $thisDay == 12) || ($formSent && $day_start == 12)) { |
|
| 137 | + echo 'selected="selected"'; |
|
| 138 | +} |
|
| 139 | +?> >12</option> |
|
| 140 | + <option value="13" <?php if((!$formSent && $thisDay == 13) || ($formSent && $day_start == 13)) { |
|
| 141 | + echo 'selected="selected"'; |
|
| 142 | +} |
|
| 143 | +?> >13</option> |
|
| 144 | + <option value="14" <?php if((!$formSent && $thisDay == 14) || ($formSent && $day_start == 14)) { |
|
| 145 | + echo 'selected="selected"'; |
|
| 146 | +} |
|
| 147 | +?> >14</option> |
|
| 148 | + <option value="15" <?php if((!$formSent && $thisDay == 15) || ($formSent && $day_start == 15)) { |
|
| 149 | + echo 'selected="selected"'; |
|
| 150 | +} |
|
| 151 | +?> >15</option> |
|
| 152 | + <option value="16" <?php if((!$formSent && $thisDay == 16) || ($formSent && $day_start == 16)) { |
|
| 153 | + echo 'selected="selected"'; |
|
| 154 | +} |
|
| 155 | +?> >16</option> |
|
| 156 | + <option value="17" <?php if((!$formSent && $thisDay == 17) || ($formSent && $day_start == 17)) { |
|
| 157 | + echo 'selected="selected"'; |
|
| 158 | +} |
|
| 159 | +?> >17</option> |
|
| 160 | + <option value="18" <?php if((!$formSent && $thisDay == 18) || ($formSent && $day_start == 18)) { |
|
| 161 | + echo 'selected="selected"'; |
|
| 162 | +} |
|
| 163 | +?> >18</option> |
|
| 164 | + <option value="19" <?php if((!$formSent && $thisDay == 19) || ($formSent && $day_start == 19)) { |
|
| 165 | + echo 'selected="selected"'; |
|
| 166 | +} |
|
| 167 | +?> >19</option> |
|
| 168 | + <option value="20" <?php if((!$formSent && $thisDay == 20) || ($formSent && $day_start == 20)) { |
|
| 169 | + echo 'selected="selected"'; |
|
| 170 | +} |
|
| 171 | +?> >20</option> |
|
| 172 | + <option value="21" <?php if((!$formSent && $thisDay == 21) || ($formSent && $day_start == 21)) { |
|
| 173 | + echo 'selected="selected"'; |
|
| 174 | +} |
|
| 175 | +?> >21</option> |
|
| 176 | + <option value="22" <?php if((!$formSent && $thisDay == 22) || ($formSent && $day_start == 22)) { |
|
| 177 | + echo 'selected="selected"'; |
|
| 178 | +} |
|
| 179 | +?> >22</option> |
|
| 180 | + <option value="23" <?php if((!$formSent && $thisDay == 23) || ($formSent && $day_start == 23)) { |
|
| 181 | + echo 'selected="selected"'; |
|
| 182 | +} |
|
| 183 | +?> >23</option> |
|
| 184 | + <option value="24" <?php if((!$formSent && $thisDay == 24) || ($formSent && $day_start == 24)) { |
|
| 185 | + echo 'selected="selected"'; |
|
| 186 | +} |
|
| 187 | +?> >24</option> |
|
| 188 | + <option value="25" <?php if((!$formSent && $thisDay == 25) || ($formSent && $day_start == 25)) { |
|
| 189 | + echo 'selected="selected"'; |
|
| 190 | +} |
|
| 191 | +?> >25</option> |
|
| 192 | + <option value="26" <?php if((!$formSent && $thisDay == 26) || ($formSent && $day_start == 26)) { |
|
| 193 | + echo 'selected="selected"'; |
|
| 194 | +} |
|
| 195 | +?> >26</option> |
|
| 196 | + <option value="27" <?php if((!$formSent && $thisDay == 27) || ($formSent && $day_start == 27)) { |
|
| 197 | + echo 'selected="selected"'; |
|
| 198 | +} |
|
| 199 | +?> >27</option> |
|
| 200 | + <option value="28" <?php if((!$formSent && $thisDay == 28) || ($formSent && $day_start == 28)) { |
|
| 201 | + echo 'selected="selected"'; |
|
| 202 | +} |
|
| 203 | +?> >28</option> |
|
| 204 | + <option value="29" <?php if((!$formSent && $thisDay == 29) || ($formSent && $day_start == 29)) { |
|
| 205 | + echo 'selected="selected"'; |
|
| 206 | +} |
|
| 207 | +?> >29</option> |
|
| 208 | + <option value="30" <?php if((!$formSent && $thisDay == 30) || ($formSent && $day_start == 30)) { |
|
| 209 | + echo 'selected="selected"'; |
|
| 210 | +} |
|
| 211 | +?> >30</option> |
|
| 212 | + <option value="31" <?php if((!$formSent && $thisDay == 31) || ($formSent && $day_start == 31)) { |
|
| 213 | + echo 'selected="selected"'; |
|
| 214 | +} |
|
| 215 | +?> >31</option> |
|
| 123 | 216 | </select> |
| 124 | 217 | / |
| 125 | 218 | <select name="month_start"> |
| 126 | 219 | <option value="1">01</option> |
| 127 | - <option value="2" <?php if((!$formSent && $thisMonth == 2) || ($formSent && $month_start == 2)) echo 'selected="selected"'; ?> >02</option> |
|
| 128 | - <option value="3" <?php if((!$formSent && $thisMonth == 3) || ($formSent && $month_start == 3)) echo 'selected="selected"'; ?> >03</option> |
|
| 129 | - <option value="4" <?php if((!$formSent && $thisMonth == 4) || ($formSent && $month_start == 4)) echo 'selected="selected"'; ?> >04</option> |
|
| 130 | - <option value="5" <?php if((!$formSent && $thisMonth == 5) || ($formSent && $month_start == 5)) echo 'selected="selected"'; ?> >05</option> |
|
| 131 | - <option value="6" <?php if((!$formSent && $thisMonth == 6) || ($formSent && $month_start == 6)) echo 'selected="selected"'; ?> >06</option> |
|
| 132 | - <option value="7" <?php if((!$formSent && $thisMonth == 7) || ($formSent && $month_start == 7)) echo 'selected="selected"'; ?> >07</option> |
|
| 133 | - <option value="8" <?php if((!$formSent && $thisMonth == 8) || ($formSent && $month_start == 8)) echo 'selected="selected"'; ?> >08</option> |
|
| 134 | - <option value="9" <?php if((!$formSent && $thisMonth == 9) || ($formSent && $month_start == 9)) echo 'selected="selected"'; ?> >09</option> |
|
| 135 | - <option value="10" <?php if((!$formSent && $thisMonth == 10) || ($formSent && $month_start == 10)) echo 'selected="selected"'; ?> >10</option> |
|
| 136 | - <option value="11" <?php if((!$formSent && $thisMonth == 11) || ($formSent && $month_start == 11)) echo 'selected="selected"'; ?> >11</option> |
|
| 137 | - <option value="12" <?php if((!$formSent && $thisMonth == 12) || ($formSent && $month_start == 12)) echo 'selected="selected"'; ?> >12</option> |
|
| 220 | + <option value="2" <?php if((!$formSent && $thisMonth == 2) || ($formSent && $month_start == 2)) { |
|
| 221 | + echo 'selected="selected"'; |
|
| 222 | +} |
|
| 223 | +?> >02</option> |
|
| 224 | + <option value="3" <?php if((!$formSent && $thisMonth == 3) || ($formSent && $month_start == 3)) { |
|
| 225 | + echo 'selected="selected"'; |
|
| 226 | +} |
|
| 227 | +?> >03</option> |
|
| 228 | + <option value="4" <?php if((!$formSent && $thisMonth == 4) || ($formSent && $month_start == 4)) { |
|
| 229 | + echo 'selected="selected"'; |
|
| 230 | +} |
|
| 231 | +?> >04</option> |
|
| 232 | + <option value="5" <?php if((!$formSent && $thisMonth == 5) || ($formSent && $month_start == 5)) { |
|
| 233 | + echo 'selected="selected"'; |
|
| 234 | +} |
|
| 235 | +?> >05</option> |
|
| 236 | + <option value="6" <?php if((!$formSent && $thisMonth == 6) || ($formSent && $month_start == 6)) { |
|
| 237 | + echo 'selected="selected"'; |
|
| 238 | +} |
|
| 239 | +?> >06</option> |
|
| 240 | + <option value="7" <?php if((!$formSent && $thisMonth == 7) || ($formSent && $month_start == 7)) { |
|
| 241 | + echo 'selected="selected"'; |
|
| 242 | +} |
|
| 243 | +?> >07</option> |
|
| 244 | + <option value="8" <?php if((!$formSent && $thisMonth == 8) || ($formSent && $month_start == 8)) { |
|
| 245 | + echo 'selected="selected"'; |
|
| 246 | +} |
|
| 247 | +?> >08</option> |
|
| 248 | + <option value="9" <?php if((!$formSent && $thisMonth == 9) || ($formSent && $month_start == 9)) { |
|
| 249 | + echo 'selected="selected"'; |
|
| 250 | +} |
|
| 251 | +?> >09</option> |
|
| 252 | + <option value="10" <?php if((!$formSent && $thisMonth == 10) || ($formSent && $month_start == 10)) { |
|
| 253 | + echo 'selected="selected"'; |
|
| 254 | +} |
|
| 255 | +?> >10</option> |
|
| 256 | + <option value="11" <?php if((!$formSent && $thisMonth == 11) || ($formSent && $month_start == 11)) { |
|
| 257 | + echo 'selected="selected"'; |
|
| 258 | +} |
|
| 259 | +?> >11</option> |
|
| 260 | + <option value="12" <?php if((!$formSent && $thisMonth == 12) || ($formSent && $month_start == 12)) { |
|
| 261 | + echo 'selected="selected"'; |
|
| 262 | +} |
|
| 263 | +?> >12</option> |
|
| 138 | 264 | </select> |
| 139 | 265 | / |
| 140 | 266 | <select name="year_start"> |
| 141 | 267 | <?php |
| 142 | 268 | for ($i=$thisYear-5;$i <= ($thisYear+5);$i++) { |
| 143 | 269 | ?> |
| 144 | - <option value="<?php echo $i; ?>" <?php if((!$formSent && $thisYear == $i) || ($formSent && $year_start == $i)) echo 'selected="selected"'; ?> ><?php echo $i; ?></option> |
|
| 270 | + <option value="<?php echo $i; ?>" <?php if((!$formSent && $thisYear == $i) || ($formSent && $year_start == $i)) { |
|
| 271 | + echo 'selected="selected"'; |
|
| 272 | +} |
|
| 273 | +?> ><?php echo $i; ?></option> |
|
| 145 | 274 | <?php |
| 146 | 275 | } |
| 147 | 276 | ?> |
@@ -29,8 +29,9 @@ |
||
| 29 | 29 | while (($file = readdir($dh)) !== false) { |
| 30 | 30 | if ($file[0] <> '.' && substr($file, -4, strlen($file)) == '.php') { |
| 31 | 31 | if ($only_main_name) { |
| 32 | - if ($file != '' && strpos($file, '.inc.php')) |
|
| 33 | - $content_dir[] = substr($file, 0, strpos($file, '.inc.php')); |
|
| 32 | + if ($file != '' && strpos($file, '.inc.php')) { |
|
| 33 | + $content_dir[] = substr($file, 0, strpos($file, '.inc.php')); |
|
| 34 | + } |
|
| 34 | 35 | } else { |
| 35 | 36 | $content_dir[] = $file; |
| 36 | 37 | } |
@@ -158,8 +158,9 @@ discard block |
||
| 158 | 158 | $array[] = $this->build_setting($status, '[INI]', 'display_errors', 'http://www.php.net/manual/en/ini.core.php#ini.display_errors', $setting, $req_setting, 'on_off', get_lang('DisplayErrorsInfo')); |
| 159 | 159 | |
| 160 | 160 | $setting = ini_get('default_charset'); |
| 161 | - if ($setting == '') |
|
| 162 | - $setting = null; |
|
| 161 | + if ($setting == '') { |
|
| 162 | + $setting = null; |
|
| 163 | + } |
|
| 163 | 164 | $req_setting = null; |
| 164 | 165 | $status = $setting == $req_setting ? self :: STATUS_OK : self :: STATUS_ERROR; |
| 165 | 166 | $array[] = $this->build_setting($status, '[INI]', 'default_charset', 'http://www.php.net/manual/en/ini.core.php#ini.default-charset', $setting, $req_setting, null, get_lang('DefaultCharsetInfo')); |
@@ -177,22 +178,25 @@ discard block |
||
| 177 | 178 | $setting = ini_get('memory_limit'); |
| 178 | 179 | $req_setting = '>= '.REQUIRED_MIN_MEMORY_LIMIT.'M'; |
| 179 | 180 | $status = self :: STATUS_ERROR; |
| 180 | - if ((float)$setting >= REQUIRED_MIN_MEMORY_LIMIT) |
|
| 181 | - $status = self :: STATUS_OK; |
|
| 181 | + if ((float)$setting >= REQUIRED_MIN_MEMORY_LIMIT) { |
|
| 182 | + $status = self :: STATUS_OK; |
|
| 183 | + } |
|
| 182 | 184 | $array[] = $this->build_setting($status, '[INI]', 'memory_limit', 'http://www.php.net/manual/en/ini.core.php#ini.memory-limit', $setting, $req_setting, null, get_lang('MemoryLimitInfo')); |
| 183 | 185 | |
| 184 | 186 | $setting = ini_get('post_max_size'); |
| 185 | 187 | $req_setting = '>= '.REQUIRED_MIN_POST_MAX_SIZE.'M'; |
| 186 | 188 | $status = self :: STATUS_ERROR; |
| 187 | - if ((float)$setting >= REQUIRED_MIN_POST_MAX_SIZE) |
|
| 188 | - $status = self :: STATUS_OK; |
|
| 189 | + if ((float)$setting >= REQUIRED_MIN_POST_MAX_SIZE) { |
|
| 190 | + $status = self :: STATUS_OK; |
|
| 191 | + } |
|
| 189 | 192 | $array[] = $this->build_setting($status, '[INI]', 'post_max_size', 'http://www.php.net/manual/en/ini.core.php#ini.post-max-size', $setting, $req_setting, null, get_lang('PostMaxSizeInfo')); |
| 190 | 193 | |
| 191 | 194 | $setting = ini_get('upload_max_filesize'); |
| 192 | 195 | $req_setting = '>= '.REQUIRED_MIN_UPLOAD_MAX_FILESIZE.'M'; |
| 193 | 196 | $status = self :: STATUS_ERROR; |
| 194 | - if ((float)$setting >= REQUIRED_MIN_UPLOAD_MAX_FILESIZE) |
|
| 195 | - $status = self :: STATUS_OK; |
|
| 197 | + if ((float)$setting >= REQUIRED_MIN_UPLOAD_MAX_FILESIZE) { |
|
| 198 | + $status = self :: STATUS_OK; |
|
| 199 | + } |
|
| 196 | 200 | $array[] = $this->build_setting($status, '[INI]', 'upload_max_filesize', 'http://www.php.net/manual/en/ini.core.php#ini.upload_max_filesize', $setting, $req_setting, null, get_lang('UploadMaxFilesizeInfo')); |
| 197 | 201 | |
| 198 | 202 | $setting = ini_get('variables_order'); |
@@ -205,7 +209,7 @@ discard block |
||
| 205 | 209 | $status = $setting == $req_setting ? self :: STATUS_OK : self :: STATUS_WARNING; |
| 206 | 210 | $array[] = $this->build_setting($status, '[SESSION]', 'session.gc_maxlifetime', 'http://www.php.net/manual/en/ini.core.php#session.gc-maxlifetime', $setting, $req_setting, null, get_lang('SessionGCMaxLifetimeInfo')); |
| 207 | 211 | |
| 208 | - if (api_check_browscap()){$setting = true;}else{$setting=false;} |
|
| 212 | + if (api_check_browscap()){$setting = true;} else{$setting=false;} |
|
| 209 | 213 | $req_setting = true; |
| 210 | 214 | $status = $setting == $req_setting ? self :: STATUS_OK : self :: STATUS_WARNING; |
| 211 | 215 | $array[] = $this->build_setting($status, '[INI]', 'browscap', 'http://www.php.net/manual/en/misc.configuration.php#ini.browscap', $setting, $req_setting, 'on_off', get_lang('BrowscapInfo')); |
@@ -219,10 +219,10 @@ |
||
| 219 | 219 | // action links |
| 220 | 220 | echo '<div class="actions">'; |
| 221 | 221 | if (!api_is_anonymous()) { |
| 222 | - if (api_get_session_id() == 0) |
|
| 223 | - echo '<a href="index.php?' . api_get_cidreq() . '&action=addnote">' . |
|
| 222 | + if (api_get_session_id() == 0) { |
|
| 223 | + echo '<a href="index.php?' . api_get_cidreq() . '&action=addnote">' . |
|
| 224 | 224 | Display::return_icon('new_note.png', get_lang('NoteAddNew'), '', '32') . '</a>'; |
| 225 | - elseif (api_is_allowed_to_session_edit(false, true)) { |
|
| 225 | + } elseif (api_is_allowed_to_session_edit(false, true)) { |
|
| 226 | 226 | echo '<a href="index.php?' . api_get_cidreq() . '&action=addnote">' . |
| 227 | 227 | Display::return_icon('new_note.png', get_lang('NoteAddNew'), '', '32') . '</a>'; |
| 228 | 228 | } |
@@ -666,9 +666,10 @@ |
||
| 666 | 666 | $result = ''; |
| 667 | 667 | for ($i = $min; $i <= $max; $i ++) { |
| 668 | 668 | $result .= '<option value="'.$i.'"'; |
| 669 | - if (is_int($selected_num)) |
|
| 670 | - if ($selected_num == $i) { |
|
| 669 | + if (is_int($selected_num)) { |
|
| 670 | + if ($selected_num == $i) { |
|
| 671 | 671 | $result .= ' selected="selected"'; |
| 672 | + } |
|
| 672 | 673 | } |
| 673 | 674 | $result .= '>'.$i.'</option>'; |
| 674 | 675 | } |
@@ -333,8 +333,12 @@ discard block |
||
| 333 | 333 | ) { |
| 334 | 334 | global $debug; |
| 335 | 335 | |
| 336 | - if ($debug) error_log('Called to update_event_exercice'); |
|
| 337 | - if ($debug) error_log('duration:' . $duration); |
|
| 336 | + if ($debug) { |
|
| 337 | + error_log('Called to update_event_exercice'); |
|
| 338 | + } |
|
| 339 | + if ($debug) { |
|
| 340 | + error_log('duration:' . $duration); |
|
| 341 | + } |
|
| 338 | 342 | |
| 339 | 343 | if ($exeid != '') { |
| 340 | 344 | /* |
@@ -386,8 +390,12 @@ discard block |
||
| 386 | 390 | WHERE exe_id = '".Database::escape_string($exeid)."'"; |
| 387 | 391 | $res = Database::query($sql); |
| 388 | 392 | |
| 389 | - if ($debug) error_log('update_event_exercice called'); |
|
| 390 | - if ($debug) error_log("$sql"); |
|
| 393 | + if ($debug) { |
|
| 394 | + error_log('update_event_exercice called'); |
|
| 395 | + } |
|
| 396 | + if ($debug) { |
|
| 397 | + error_log("$sql"); |
|
| 398 | + } |
|
| 391 | 399 | |
| 392 | 400 | //Deleting control time session track |
| 393 | 401 | //ExerciseLib::exercise_time_control_delete($exo_id); |
@@ -70,13 +70,16 @@ |
||
| 70 | 70 | */ |
| 71 | 71 | function connectDb($path = null, $dbMode = null, $lang = 'english') |
| 72 | 72 | { |
| 73 | - if ($this->db != null) |
|
| 74 | - return $this->db; |
|
| 75 | - if ($dbMode == null) |
|
| 76 | - $dbMode = Xapian::DB_CREATE_OR_OPEN; |
|
| 73 | + if ($this->db != null) { |
|
| 74 | + return $this->db; |
|
| 75 | + } |
|
| 76 | + if ($dbMode == null) { |
|
| 77 | + $dbMode = Xapian::DB_CREATE_OR_OPEN; |
|
| 78 | + } |
|
| 77 | 79 | |
| 78 | - if ($path == null) |
|
| 79 | - $path = api_get_path(SYS_UPLOAD_PATH).'plugins/xapian/searchdb/'; |
|
| 80 | + if ($path == null) { |
|
| 81 | + $path = api_get_path(SYS_UPLOAD_PATH).'plugins/xapian/searchdb/'; |
|
| 82 | + } |
|
| 80 | 83 | |
| 81 | 84 | try { |
| 82 | 85 | $this->db = new XapianWritableDatabase($path, $dbMode); |
@@ -36,8 +36,9 @@ discard block |
||
| 36 | 36 | $stored_terms = $this->get_terms_on_db($prefix, $course_code, $tool_id, $ref_id_high_level); |
| 37 | 37 | |
| 38 | 38 | // don't do anything if no change, verify only at DB, not the search engine |
| 39 | - if ((count(array_diff($terms, $stored_terms)) == 0) && (count(array_diff($stored_terms, $terms)) == 0)) |
|
| 40 | - return FALSE; |
|
| 39 | + if ((count(array_diff($terms, $stored_terms)) == 0) && (count(array_diff($stored_terms, $terms)) == 0)) { |
|
| 40 | + return FALSE; |
|
| 41 | + } |
|
| 41 | 42 | |
| 42 | 43 | require_once api_get_path(LIBRARY_PATH) . 'search/xapian/XapianQuery.php'; |
| 43 | 44 | |
@@ -45,8 +46,9 @@ discard block |
||
| 45 | 46 | $doc = $this->get_document($search_did); |
| 46 | 47 | $xapian_terms = xapian_get_doc_terms($doc, $prefix); |
| 47 | 48 | $xterms = array(); |
| 48 | - foreach ($xapian_terms as $xapian_term) |
|
| 49 | - $xterms[] = substr($xapian_term['name'], 1); |
|
| 49 | + foreach ($xapian_terms as $xapian_term) { |
|
| 50 | + $xterms[] = substr($xapian_term['name'], 1); |
|
| 51 | + } |
|
| 50 | 52 | |
| 51 | 53 | $dterms = $terms; |
| 52 | 54 | |
@@ -94,8 +94,9 @@ discard block |
||
| 94 | 94 | // Read the magic bytes and verify |
| 95 | 95 | $retval = substr($png,0,8); |
| 96 | 96 | $ipos = 8; |
| 97 | - if ($retval != "\x89PNG\x0d\x0a\x1a\x0a") |
|
| 98 | - throw new Exception('Is not a valid PNG image'); |
|
| 97 | + if ($retval != "\x89PNG\x0d\x0a\x1a\x0a") { |
|
| 98 | + throw new Exception('Is not a valid PNG image'); |
|
| 99 | + } |
|
| 99 | 100 | // Loop through the chunks. Byte 0-3 is length, Byte 4-7 is type |
| 100 | 101 | $chunkHeader = substr($png,$ipos,8); |
| 101 | 102 | $ipos = $ipos + 8; |
@@ -107,13 +108,17 @@ discard block |
||
| 107 | 108 | $data = substr($png,$ipos,$chunk['size']); |
| 108 | 109 | $sections = explode("\0", $data); |
| 109 | 110 | print_r($sections); |
| 110 | - if ( $sections[0] == $key ) $skip = true; |
|
| 111 | + if ( $sections[0] == $key ) { |
|
| 112 | + $skip = true; |
|
| 113 | + } |
|
| 111 | 114 | } |
| 112 | 115 | // Extract the data and the CRC |
| 113 | 116 | $data = substr($png,$ipos,$chunk['size']+4); |
| 114 | 117 | $ipos = $ipos + $chunk['size'] + 4; |
| 115 | 118 | // Add in the header, data, and CRC |
| 116 | - if ( ! $skip ) $retval = $retval . $chunkHeader . $data; |
|
| 119 | + if ( ! $skip ) { |
|
| 120 | + $retval = $retval . $chunkHeader . $data; |
|
| 121 | + } |
|
| 117 | 122 | // Read next chunk header |
| 118 | 123 | $chunkHeader = substr($png,$ipos,8); |
| 119 | 124 | $ipos = $ipos + 8; |