@@ -30,21 +30,21 @@ discard block |
||
| 30 | 30 | { |
| 31 | 31 | global $xoopsDB; |
| 32 | 32 | |
| 33 | - $this->alterTable_event(); |
|
| 34 | - $this->alterTable_cat(); |
|
| 33 | + $this->alterTable_event(); |
|
| 34 | + $this->alterTable_cat(); |
|
| 35 | 35 | |
| 36 | 36 | } |
| 37 | 37 | //---------------------------------------------------- |
| 38 | 38 | function alterTable_event() |
| 39 | 39 | { |
| 40 | 40 | global $xoopsDB; |
| 41 | - $tbl = $xoopsDB->prefix('extcal_event'); |
|
| 41 | + $tbl = $xoopsDB->prefix('extcal_event'); |
|
| 42 | 42 | |
| 43 | 43 | $sql = <<<__sql__ |
| 44 | 44 | ALTER TABLE `{$tbl}` ADD `event_icone` VARCHAR(50) NOT NULL; |
| 45 | 45 | __sql__; |
| 46 | 46 | |
| 47 | - $xoopsDB->queryF($sql); |
|
| 47 | + $xoopsDB->queryF($sql); |
|
| 48 | 48 | } |
| 49 | 49 | |
| 50 | 50 | //----------------------------------------------------------------- |
@@ -52,13 +52,13 @@ discard block |
||
| 52 | 52 | function alterTable_cat() |
| 53 | 53 | { |
| 54 | 54 | global $xoopsDB; |
| 55 | - $tbl = $xoopsDB->prefix('extcal_cat'); |
|
| 55 | + $tbl = $xoopsDB->prefix('extcal_cat'); |
|
| 56 | 56 | |
| 57 | 57 | $sql = <<<__sql__ |
| 58 | 58 | ALTER TABLE `{$tbl}` ADD `cat_icone` VARCHAR(50) NOT NULL ; |
| 59 | 59 | __sql__; |
| 60 | 60 | |
| 61 | - $xoopsDB->queryF($sql); |
|
| 61 | + $xoopsDB->queryF($sql); |
|
| 62 | 62 | |
| 63 | 63 | } |
| 64 | 64 | |
@@ -22,7 +22,7 @@ discard block |
||
| 22 | 22 | $permHandler = ExtcalPerm::getHandler(); |
| 23 | 23 | include_once XOOPS_ROOT_PATH . "/modules/extcal/class/etablissement.php"; |
| 24 | 24 | include_once XOOPS_ROOT_PATH . "/modules/extcal/include/functions.php"; |
| 25 | -$myts =& MyTextSanitizer::getInstance(); // MyTextSanitizer object |
|
| 25 | +$myts = & MyTextSanitizer::getInstance(); // MyTextSanitizer object |
|
| 26 | 26 | |
| 27 | 27 | if (!function_exists('clear_unicodeslashes')) { |
| 28 | 28 | /** |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | $event = $eventHandler->objectToArray($eventObj, array('cat_id', 'event_submitter')); |
| 51 | 51 | $eventHandler->serverTimeToUserTime($event); |
| 52 | 52 | |
| 53 | -$configHandler =& xoops_gethandler('config'); |
|
| 53 | +$configHandler = & xoops_gethandler('config'); |
|
| 54 | 54 | $extcalConfig = $configHandler->getConfigList($module->getVar("mid")); |
| 55 | 55 | |
| 56 | 56 | // Adding formated date for start and end event |
@@ -332,102 +332,102 @@ |
||
| 332 | 332 | $modversion['config'][$i]['valuetype'] = 'array'; |
| 333 | 333 | $modversion['config'][$i]['default'] = array('doc', 'jpg', 'jpeg', 'gif', 'png', 'pdf', 'txt'); |
| 334 | 334 | $modversion['config'][$i]['options'] = array('ai' => 'ai', |
| 335 | - 'aif' => 'aif', |
|
| 336 | - 'aiff' => 'aiff', |
|
| 337 | - 'asc' => 'asc', |
|
| 338 | - 'au' => 'au', |
|
| 339 | - 'avi' => 'avi', |
|
| 340 | - 'bin' => 'bin', |
|
| 341 | - 'bmp' => 'bmp', |
|
| 342 | - 'class' => 'class', |
|
| 343 | - 'csh' => 'csh', |
|
| 344 | - 'css' => 'css', |
|
| 345 | - 'dcr' => 'dcr', |
|
| 346 | - 'dir' => 'dir', |
|
| 347 | - 'dll' => 'dll', |
|
| 348 | - 'doc' => 'doc', |
|
| 349 | - 'dot' => 'dot', |
|
| 350 | - 'dtd' => 'dtd', |
|
| 351 | - 'dxr' => 'dxr', |
|
| 352 | - 'ent' => 'ent', |
|
| 353 | - 'eps' => 'eps', |
|
| 354 | - 'exe' => 'exe', |
|
| 355 | - 'gif' => 'gif', |
|
| 356 | - 'gtar' => 'gtar', |
|
| 357 | - 'gz' => 'gz', |
|
| 358 | - 'hqx' => 'hqx', |
|
| 359 | - 'htm' => 'htm', |
|
| 360 | - 'html' => 'html', |
|
| 361 | - 'ics' => 'ics', |
|
| 362 | - 'ifb' => 'ifb', |
|
| 363 | - 'jpe' => 'jpe', |
|
| 364 | - 'jpeg' => 'jpeg', |
|
| 365 | - 'jpg' => 'jpg', |
|
| 366 | - 'js' => 'js', |
|
| 367 | - 'kar' => 'kar', |
|
| 368 | - 'lha' => 'lha', |
|
| 369 | - 'lzh' => 'lzh', |
|
| 370 | - 'm3u' => 'm3u', |
|
| 371 | - 'mid' => 'mid', |
|
| 372 | - 'midi' => 'midi', |
|
| 373 | - 'mod' => 'mod', |
|
| 374 | - 'mov' => 'mov', |
|
| 375 | - 'mp1' => 'mp1', |
|
| 376 | - 'mp2' => 'mp2', |
|
| 377 | - 'mp3' => 'mp3', |
|
| 378 | - 'mpe' => 'mpe', |
|
| 379 | - 'mpeg' => 'mpeg', |
|
| 380 | - 'mpg' => 'mpg', |
|
| 381 | - 'pbm' => 'pbm', |
|
| 382 | - 'pdf' => 'pdf', |
|
| 383 | - 'pgm' => 'pgm', |
|
| 384 | - 'php' => 'php', |
|
| 385 | - 'php3' => 'php3', |
|
| 386 | - 'php5' => 'php5', |
|
| 387 | - 'phtml' => 'phtml', |
|
| 388 | - 'png' => 'png', |
|
| 389 | - 'pnm' => 'pnm', |
|
| 390 | - 'ppm' => 'ppm', |
|
| 391 | - 'ppt' => 'ppt', |
|
| 392 | - 'ps' => 'ps', |
|
| 393 | - 'qt' => 'qt', |
|
| 394 | - 'ra' => 'ra', |
|
| 395 | - 'ram' => 'ram', |
|
| 396 | - 'rm' => 'rm', |
|
| 397 | - 'rpm' => 'rpm', |
|
| 398 | - 'rtf' => 'rtf', |
|
| 399 | - 'sgm' => 'sgm', |
|
| 400 | - 'sgml' => 'sgml', |
|
| 401 | - 'sh' => 'sh', |
|
| 402 | - 'sit' => 'sit', |
|
| 403 | - 'smi' => 'smi', |
|
| 404 | - 'smil' => 'smil', |
|
| 405 | - 'snd' => 'snd', |
|
| 406 | - 'so' => 'so', |
|
| 407 | - 'spl' => 'spl', |
|
| 408 | - 'swf' => 'swf', |
|
| 409 | - 'tar' => 'tar', |
|
| 410 | - 'tcl' => 'tcl', |
|
| 411 | - 'tif' => 'tif', |
|
| 412 | - 'tiff' => 'tiff', |
|
| 413 | - 'tsv' => 'tsv', |
|
| 414 | - 'txt' => 'txt', |
|
| 415 | - 'wav' => 'wav', |
|
| 416 | - 'wbmp' => 'wbmp', |
|
| 417 | - 'wbxml' => 'wbxml', |
|
| 418 | - 'wml' => 'wml', |
|
| 419 | - 'wmlc' => 'wmlc', |
|
| 420 | - 'wmls' => 'wmls', |
|
| 421 | - 'wmlsc' => 'wmlsc', |
|
| 422 | - 'xbm' => 'xbm', |
|
| 423 | - 'xht' => 'xht', |
|
| 424 | - 'xhtml' => 'xhtml', |
|
| 425 | - 'xla' => 'xla', |
|
| 426 | - 'xls' => 'xls', |
|
| 427 | - 'xlt' => 'xlt', |
|
| 428 | - 'xpm' => 'xpm', |
|
| 429 | - 'xsl' => 'xsl', |
|
| 430 | - 'zip' => 'zip' |
|
| 335 | + 'aif' => 'aif', |
|
| 336 | + 'aiff' => 'aiff', |
|
| 337 | + 'asc' => 'asc', |
|
| 338 | + 'au' => 'au', |
|
| 339 | + 'avi' => 'avi', |
|
| 340 | + 'bin' => 'bin', |
|
| 341 | + 'bmp' => 'bmp', |
|
| 342 | + 'class' => 'class', |
|
| 343 | + 'csh' => 'csh', |
|
| 344 | + 'css' => 'css', |
|
| 345 | + 'dcr' => 'dcr', |
|
| 346 | + 'dir' => 'dir', |
|
| 347 | + 'dll' => 'dll', |
|
| 348 | + 'doc' => 'doc', |
|
| 349 | + 'dot' => 'dot', |
|
| 350 | + 'dtd' => 'dtd', |
|
| 351 | + 'dxr' => 'dxr', |
|
| 352 | + 'ent' => 'ent', |
|
| 353 | + 'eps' => 'eps', |
|
| 354 | + 'exe' => 'exe', |
|
| 355 | + 'gif' => 'gif', |
|
| 356 | + 'gtar' => 'gtar', |
|
| 357 | + 'gz' => 'gz', |
|
| 358 | + 'hqx' => 'hqx', |
|
| 359 | + 'htm' => 'htm', |
|
| 360 | + 'html' => 'html', |
|
| 361 | + 'ics' => 'ics', |
|
| 362 | + 'ifb' => 'ifb', |
|
| 363 | + 'jpe' => 'jpe', |
|
| 364 | + 'jpeg' => 'jpeg', |
|
| 365 | + 'jpg' => 'jpg', |
|
| 366 | + 'js' => 'js', |
|
| 367 | + 'kar' => 'kar', |
|
| 368 | + 'lha' => 'lha', |
|
| 369 | + 'lzh' => 'lzh', |
|
| 370 | + 'm3u' => 'm3u', |
|
| 371 | + 'mid' => 'mid', |
|
| 372 | + 'midi' => 'midi', |
|
| 373 | + 'mod' => 'mod', |
|
| 374 | + 'mov' => 'mov', |
|
| 375 | + 'mp1' => 'mp1', |
|
| 376 | + 'mp2' => 'mp2', |
|
| 377 | + 'mp3' => 'mp3', |
|
| 378 | + 'mpe' => 'mpe', |
|
| 379 | + 'mpeg' => 'mpeg', |
|
| 380 | + 'mpg' => 'mpg', |
|
| 381 | + 'pbm' => 'pbm', |
|
| 382 | + 'pdf' => 'pdf', |
|
| 383 | + 'pgm' => 'pgm', |
|
| 384 | + 'php' => 'php', |
|
| 385 | + 'php3' => 'php3', |
|
| 386 | + 'php5' => 'php5', |
|
| 387 | + 'phtml' => 'phtml', |
|
| 388 | + 'png' => 'png', |
|
| 389 | + 'pnm' => 'pnm', |
|
| 390 | + 'ppm' => 'ppm', |
|
| 391 | + 'ppt' => 'ppt', |
|
| 392 | + 'ps' => 'ps', |
|
| 393 | + 'qt' => 'qt', |
|
| 394 | + 'ra' => 'ra', |
|
| 395 | + 'ram' => 'ram', |
|
| 396 | + 'rm' => 'rm', |
|
| 397 | + 'rpm' => 'rpm', |
|
| 398 | + 'rtf' => 'rtf', |
|
| 399 | + 'sgm' => 'sgm', |
|
| 400 | + 'sgml' => 'sgml', |
|
| 401 | + 'sh' => 'sh', |
|
| 402 | + 'sit' => 'sit', |
|
| 403 | + 'smi' => 'smi', |
|
| 404 | + 'smil' => 'smil', |
|
| 405 | + 'snd' => 'snd', |
|
| 406 | + 'so' => 'so', |
|
| 407 | + 'spl' => 'spl', |
|
| 408 | + 'swf' => 'swf', |
|
| 409 | + 'tar' => 'tar', |
|
| 410 | + 'tcl' => 'tcl', |
|
| 411 | + 'tif' => 'tif', |
|
| 412 | + 'tiff' => 'tiff', |
|
| 413 | + 'tsv' => 'tsv', |
|
| 414 | + 'txt' => 'txt', |
|
| 415 | + 'wav' => 'wav', |
|
| 416 | + 'wbmp' => 'wbmp', |
|
| 417 | + 'wbxml' => 'wbxml', |
|
| 418 | + 'wml' => 'wml', |
|
| 419 | + 'wmlc' => 'wmlc', |
|
| 420 | + 'wmls' => 'wmls', |
|
| 421 | + 'wmlsc' => 'wmlsc', |
|
| 422 | + 'xbm' => 'xbm', |
|
| 423 | + 'xht' => 'xht', |
|
| 424 | + 'xhtml' => 'xhtml', |
|
| 425 | + 'xla' => 'xla', |
|
| 426 | + 'xls' => 'xls', |
|
| 427 | + 'xlt' => 'xlt', |
|
| 428 | + 'xpm' => 'xpm', |
|
| 429 | + 'xsl' => 'xsl', |
|
| 430 | + 'zip' => 'zip' |
|
| 431 | 431 | ); |
| 432 | 432 | ++$i; |
| 433 | 433 | $modversion['config'][$i]['name'] = 'allow_html'; |
@@ -1,20 +1,20 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * classGenerator |
|
| 4 | - * walls_watermarks |
|
| 5 | - * |
|
| 6 | - * You may not change or alter any portion of this comment or credits |
|
| 7 | - * of supporting developers from this source code or any supporting source code |
|
| 8 | - * which is considered copyrighted (c) material of the original comment or credit authors. |
|
| 9 | - * This program is distributed in the hope that it will be useful, |
|
| 10 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
| 11 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
|
| 12 | - * |
|
| 13 | - * |
|
| 14 | - * |
|
| 15 | - * L'utilisation de ce formulaire d'adminitration suppose |
|
| 16 | - * que la classe correspondante de la table a été générées avec classGenerator |
|
| 17 | - **/ |
|
| 3 | + * classGenerator |
|
| 4 | + * walls_watermarks |
|
| 5 | + * |
|
| 6 | + * You may not change or alter any portion of this comment or credits |
|
| 7 | + * of supporting developers from this source code or any supporting source code |
|
| 8 | + * which is considered copyrighted (c) material of the original comment or credit authors. |
|
| 9 | + * This program is distributed in the hope that it will be useful, |
|
| 10 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
| 11 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
|
| 12 | + * |
|
| 13 | + * |
|
| 14 | + * |
|
| 15 | + * L'utilisation de ce formulaire d'adminitration suppose |
|
| 16 | + * que la classe correspondante de la table a été générées avec classGenerator |
|
| 17 | + **/ |
|
| 18 | 18 | |
| 19 | 19 | // defined("XOOPS_ROOT_PATH") || exit("XOOPS root path not defined"); |
| 20 | 20 | |
@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | $name = ''; |
| 50 | 50 | } |
| 51 | 51 | |
| 52 | -$moduleHandler =& xoops_gethandler('module'); |
|
| 52 | +$moduleHandler = & xoops_gethandler('module'); |
|
| 53 | 53 | $module = $moduleHandler->getByDirname('extcal'); |
| 54 | 54 | |
| 55 | 55 | if ($name == 'extcal' || is_object($module)) { |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | $extcalConfig = $xoopsModuleConfig; |
| 58 | 58 | |
| 59 | 59 | } else { |
| 60 | - $configHandler =& xoops_gethandler('config'); |
|
| 60 | + $configHandler = & xoops_gethandler('config'); |
|
| 61 | 61 | $extcalConfig = $configHandler->getConfigList($module->getVar("mid")); |
| 62 | 62 | } |
| 63 | 63 | } |
@@ -21,8 +21,8 @@ |
||
| 21 | 21 | } |
| 22 | 22 | |
| 23 | 23 | $moduleId = $xoopsModule->getVar('mid'); |
| 24 | - $groupPermissionHandler =& xoops_gethandler('groupperm'); |
|
| 25 | - $configHandler =& xoops_gethandler('config'); |
|
| 24 | + $groupPermissionHandler = & xoops_gethandler('groupperm'); |
|
| 25 | + $configHandler = & xoops_gethandler('config'); |
|
| 26 | 26 | |
| 27 | 27 | /** |
| 28 | 28 | * Default public category permission mask |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | $catId = $this->getInsertId(); |
| 58 | 58 | |
| 59 | 59 | // Retriving permission mask |
| 60 | - $groupPermissionHandler =& xoops_gethandler('groupperm'); |
|
| 60 | + $groupPermissionHandler = & xoops_gethandler('groupperm'); |
|
| 61 | 61 | $moduleId = $GLOBALS['xoopsModule']->getVar('mid'); |
| 62 | 62 | |
| 63 | 63 | $criteria = new CriteriaCompo(); |
@@ -66,7 +66,7 @@ discard block |
||
| 66 | 66 | $permMask = $groupPermissionHandler->getObjects($criteria); |
| 67 | 67 | |
| 68 | 68 | // Retriving group list |
| 69 | - $memberHandler =& xoops_gethandler('member'); |
|
| 69 | + $memberHandler = & xoops_gethandler('member'); |
|
| 70 | 70 | $glist = $memberHandler->getGroupList(); |
| 71 | 71 | |
| 72 | 72 | // Applying permission mask |
@@ -127,14 +127,14 @@ discard block |
||
| 127 | 127 | $min = $this->cE->getMinYears(); |
| 128 | 128 | if ($min > $y) { |
| 129 | 129 | $this->errors[] = new Calendar_Validation_Error( |
| 130 | - 'Year', $y, CALENDAR_VALUE_TOOSMALL.$min); |
|
| 130 | + 'Year', $y, CALENDAR_VALUE_TOOSMALL . $min); |
|
| 131 | 131 | |
| 132 | 132 | return false; |
| 133 | 133 | } |
| 134 | 134 | $max = $this->cE->getMaxYears(); |
| 135 | 135 | if ($y > $max) { |
| 136 | 136 | $this->errors[] = new Calendar_Validation_Error( |
| 137 | - 'Year', $y, CALENDAR_VALUE_TOOLARGE.$max); |
|
| 137 | + 'Year', $y, CALENDAR_VALUE_TOOLARGE . $max); |
|
| 138 | 138 | |
| 139 | 139 | return false; |
| 140 | 140 | } |
@@ -154,14 +154,14 @@ discard block |
||
| 154 | 154 | $min = 1; |
| 155 | 155 | if ($min > $m) { |
| 156 | 156 | $this->errors[] = new Calendar_Validation_Error( |
| 157 | - 'Month', $m, CALENDAR_VALUE_TOOSMALL.$min); |
|
| 157 | + 'Month', $m, CALENDAR_VALUE_TOOSMALL . $min); |
|
| 158 | 158 | |
| 159 | 159 | return false; |
| 160 | 160 | } |
| 161 | 161 | $max = $this->cE->getMonthsInYear($this->calendar->thisYear()); |
| 162 | 162 | if ($m > $max) { |
| 163 | 163 | $this->errors[] = new Calendar_Validation_Error( |
| 164 | - 'Month', $m, CALENDAR_VALUE_TOOLARGE.$max); |
|
| 164 | + 'Month', $m, CALENDAR_VALUE_TOOLARGE . $max); |
|
| 165 | 165 | |
| 166 | 166 | return false; |
| 167 | 167 | } |
@@ -181,7 +181,7 @@ discard block |
||
| 181 | 181 | $min = 1; |
| 182 | 182 | if ($min > $d) { |
| 183 | 183 | $this->errors[] = new Calendar_Validation_Error( |
| 184 | - 'Day', $d, CALENDAR_VALUE_TOOSMALL.$min); |
|
| 184 | + 'Day', $d, CALENDAR_VALUE_TOOSMALL . $min); |
|
| 185 | 185 | |
| 186 | 186 | return false; |
| 187 | 187 | } |
@@ -191,7 +191,7 @@ discard block |
||
| 191 | 191 | ); |
| 192 | 192 | if ($d > $max) { |
| 193 | 193 | $this->errors[] = new Calendar_Validation_Error( |
| 194 | - 'Day', $d, CALENDAR_VALUE_TOOLARGE.$max); |
|
| 194 | + 'Day', $d, CALENDAR_VALUE_TOOLARGE . $max); |
|
| 195 | 195 | |
| 196 | 196 | return false; |
| 197 | 197 | } |
@@ -211,14 +211,14 @@ discard block |
||
| 211 | 211 | $min = 0; |
| 212 | 212 | if ($min > $h) { |
| 213 | 213 | $this->errors[] = new Calendar_Validation_Error( |
| 214 | - 'Hour', $h, CALENDAR_VALUE_TOOSMALL.$min); |
|
| 214 | + 'Hour', $h, CALENDAR_VALUE_TOOSMALL . $min); |
|
| 215 | 215 | |
| 216 | 216 | return false; |
| 217 | 217 | } |
| 218 | - $max = ($this->cE->getHoursInDay($this->calendar->thisDay())-1); |
|
| 218 | + $max = ($this->cE->getHoursInDay($this->calendar->thisDay()) - 1); |
|
| 219 | 219 | if ($h > $max) { |
| 220 | 220 | $this->errors[] = new Calendar_Validation_Error( |
| 221 | - 'Hour', $h, CALENDAR_VALUE_TOOLARGE.$max); |
|
| 221 | + 'Hour', $h, CALENDAR_VALUE_TOOLARGE . $max); |
|
| 222 | 222 | |
| 223 | 223 | return false; |
| 224 | 224 | } |
@@ -238,14 +238,14 @@ discard block |
||
| 238 | 238 | $min = 0; |
| 239 | 239 | if ($min > $i) { |
| 240 | 240 | $this->errors[] = new Calendar_Validation_Error( |
| 241 | - 'Minute', $i, CALENDAR_VALUE_TOOSMALL.$min); |
|
| 241 | + 'Minute', $i, CALENDAR_VALUE_TOOSMALL . $min); |
|
| 242 | 242 | |
| 243 | 243 | return false; |
| 244 | 244 | } |
| 245 | - $max = ($this->cE->getMinutesInHour($this->calendar->thisHour())-1); |
|
| 245 | + $max = ($this->cE->getMinutesInHour($this->calendar->thisHour()) - 1); |
|
| 246 | 246 | if ($i > $max) { |
| 247 | 247 | $this->errors[] = new Calendar_Validation_Error( |
| 248 | - 'Minute', $i, CALENDAR_VALUE_TOOLARGE.$max); |
|
| 248 | + 'Minute', $i, CALENDAR_VALUE_TOOLARGE . $max); |
|
| 249 | 249 | |
| 250 | 250 | return false; |
| 251 | 251 | } |
@@ -265,14 +265,14 @@ discard block |
||
| 265 | 265 | $min = 0; |
| 266 | 266 | if ($min > $s) { |
| 267 | 267 | $this->errors[] = new Calendar_Validation_Error( |
| 268 | - 'Second', $s, CALENDAR_VALUE_TOOSMALL.$min); |
|
| 268 | + 'Second', $s, CALENDAR_VALUE_TOOSMALL . $min); |
|
| 269 | 269 | |
| 270 | 270 | return false; |
| 271 | 271 | } |
| 272 | - $max = ($this->cE->getSecondsInMinute($this->calendar->thisMinute())-1); |
|
| 272 | + $max = ($this->cE->getSecondsInMinute($this->calendar->thisMinute()) - 1); |
|
| 273 | 273 | if ($s > $max) { |
| 274 | 274 | $this->errors[] = new Calendar_Validation_Error( |
| 275 | - 'Second', $s, CALENDAR_VALUE_TOOLARGE.$max); |
|
| 275 | + 'Second', $s, CALENDAR_VALUE_TOOLARGE . $max); |
|
| 276 | 276 | |
| 277 | 277 | return false; |
| 278 | 278 | } |
@@ -389,8 +389,8 @@ discard block |
||
| 389 | 389 | * @return string |
| 390 | 390 | * @access public |
| 391 | 391 | */ |
| 392 | - function toString () |
|
| 392 | + function toString() |
|
| 393 | 393 | { |
| 394 | - return $this->unit.' = '.$this->value.' ['.$this->message.']'; |
|
| 394 | + return $this->unit . ' = ' . $this->value . ' [' . $this->message . ']'; |
|
| 395 | 395 | } |
| 396 | 396 | } |
@@ -95,58 +95,58 @@ |
||
| 95 | 95 | { |
| 96 | 96 | $firstDay = defined('CALENDAR_FIRST_DAY_OF_WEEK') ? CALENDAR_FIRST_DAY_OF_WEEK : 1; |
| 97 | 97 | switch ($type) { |
| 98 | - case 'Day': |
|
| 99 | - include_once CALENDAR_ROOT.'Day.php'; |
|
| 98 | + case 'Day': |
|
| 99 | + include_once CALENDAR_ROOT.'Day.php'; |
|
| 100 | 100 | |
| 101 | - return new Calendar_Day($y, $m, $d); |
|
| 102 | - case 'Month': |
|
| 103 | - // Set default state for which month type to build |
|
| 104 | - if (!defined('CALENDAR_MONTH_STATE')) { |
|
| 105 | - define('CALENDAR_MONTH_STATE', CALENDAR_USE_MONTH); |
|
| 106 | - } |
|
| 107 | - switch (CALENDAR_MONTH_STATE) { |
|
| 108 | - case CALENDAR_USE_MONTH_WEEKDAYS: |
|
| 109 | - include_once CALENDAR_ROOT.'Month/Weekdays.php'; |
|
| 110 | - $class = 'Calendar_Month_Weekdays'; |
|
| 111 | - break; |
|
| 112 | - case CALENDAR_USE_MONTH_WEEKS: |
|
| 113 | - include_once CALENDAR_ROOT.'Month/Weeks.php'; |
|
| 114 | - $class = 'Calendar_Month_Weeks'; |
|
| 115 | - break; |
|
| 116 | - case CALENDAR_USE_MONTH: |
|
| 117 | - default: |
|
| 118 | - include_once CALENDAR_ROOT.'Month.php'; |
|
| 119 | - $class = 'Calendar_Month'; |
|
| 120 | - break; |
|
| 121 | - } |
|
| 101 | + return new Calendar_Day($y, $m, $d); |
|
| 102 | + case 'Month': |
|
| 103 | + // Set default state for which month type to build |
|
| 104 | + if (!defined('CALENDAR_MONTH_STATE')) { |
|
| 105 | + define('CALENDAR_MONTH_STATE', CALENDAR_USE_MONTH); |
|
| 106 | + } |
|
| 107 | + switch (CALENDAR_MONTH_STATE) { |
|
| 108 | + case CALENDAR_USE_MONTH_WEEKDAYS: |
|
| 109 | + include_once CALENDAR_ROOT.'Month/Weekdays.php'; |
|
| 110 | + $class = 'Calendar_Month_Weekdays'; |
|
| 111 | + break; |
|
| 112 | + case CALENDAR_USE_MONTH_WEEKS: |
|
| 113 | + include_once CALENDAR_ROOT.'Month/Weeks.php'; |
|
| 114 | + $class = 'Calendar_Month_Weeks'; |
|
| 115 | + break; |
|
| 116 | + case CALENDAR_USE_MONTH: |
|
| 117 | + default: |
|
| 118 | + include_once CALENDAR_ROOT.'Month.php'; |
|
| 119 | + $class = 'Calendar_Month'; |
|
| 120 | + break; |
|
| 121 | + } |
|
| 122 | 122 | |
| 123 | 123 | return new $class($y, $m, $firstDay); |
| 124 | - case 'Week': |
|
| 125 | - include_once CALENDAR_ROOT.'Week.php'; |
|
| 124 | + case 'Week': |
|
| 125 | + include_once CALENDAR_ROOT.'Week.php'; |
|
| 126 | 126 | |
| 127 | - return new Calendar_Week($y, $m, $d, $firstDay); |
|
| 128 | - case 'Hour': |
|
| 129 | - include_once CALENDAR_ROOT.'Hour.php'; |
|
| 127 | + return new Calendar_Week($y, $m, $d, $firstDay); |
|
| 128 | + case 'Hour': |
|
| 129 | + include_once CALENDAR_ROOT.'Hour.php'; |
|
| 130 | 130 | |
| 131 | - return new Calendar_Hour($y, $m, $d, $h); |
|
| 132 | - case 'Minute': |
|
| 133 | - include_once CALENDAR_ROOT.'Minute.php'; |
|
| 131 | + return new Calendar_Hour($y, $m, $d, $h); |
|
| 132 | + case 'Minute': |
|
| 133 | + include_once CALENDAR_ROOT.'Minute.php'; |
|
| 134 | 134 | |
| 135 | - return new Calendar_Minute($y, $m, $d, $h, $i); |
|
| 136 | - case 'Second': |
|
| 137 | - include_once CALENDAR_ROOT.'Second.php'; |
|
| 135 | + return new Calendar_Minute($y, $m, $d, $h, $i); |
|
| 136 | + case 'Second': |
|
| 137 | + include_once CALENDAR_ROOT.'Second.php'; |
|
| 138 | 138 | |
| 139 | - return new Calendar_Second($y, $m, $d, $h, $i, $s); |
|
| 140 | - case 'Year': |
|
| 141 | - include_once CALENDAR_ROOT.'Year.php'; |
|
| 139 | + return new Calendar_Second($y, $m, $d, $h, $i, $s); |
|
| 140 | + case 'Year': |
|
| 141 | + include_once CALENDAR_ROOT.'Year.php'; |
|
| 142 | 142 | |
| 143 | - return new Calendar_Year($y); |
|
| 144 | - default: |
|
| 145 | - include_once 'PEAR.php'; |
|
| 146 | - PEAR::raiseError('Calendar_Factory::create() unrecognised type: '.$type, |
|
| 147 | - null, PEAR_ERROR_TRIGGER, E_USER_NOTICE, 'Calendar_Factory::create()'); |
|
| 143 | + return new Calendar_Year($y); |
|
| 144 | + default: |
|
| 145 | + include_once 'PEAR.php'; |
|
| 146 | + PEAR::raiseError('Calendar_Factory::create() unrecognised type: '.$type, |
|
| 147 | + null, PEAR_ERROR_TRIGGER, E_USER_NOTICE, 'Calendar_Factory::create()'); |
|
| 148 | 148 | |
| 149 | - return false; |
|
| 149 | + return false; |
|
| 150 | 150 | } |
| 151 | 151 | } |
| 152 | 152 | |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | /** |
| 49 | 49 | * Load Calendar base class |
| 50 | 50 | */ |
| 51 | -require_once CALENDAR_ROOT.'Calendar.php'; |
|
| 51 | +require_once CALENDAR_ROOT . 'Calendar.php'; |
|
| 52 | 52 | |
| 53 | 53 | /** |
| 54 | 54 | * Contains a factory method to return a Singleton instance of a class |
@@ -96,7 +96,7 @@ discard block |
||
| 96 | 96 | $firstDay = defined('CALENDAR_FIRST_DAY_OF_WEEK') ? CALENDAR_FIRST_DAY_OF_WEEK : 1; |
| 97 | 97 | switch ($type) { |
| 98 | 98 | case 'Day': |
| 99 | - include_once CALENDAR_ROOT.'Day.php'; |
|
| 99 | + include_once CALENDAR_ROOT . 'Day.php'; |
|
| 100 | 100 | |
| 101 | 101 | return new Calendar_Day($y, $m, $d); |
| 102 | 102 | case 'Month': |
@@ -106,44 +106,44 @@ discard block |
||
| 106 | 106 | } |
| 107 | 107 | switch (CALENDAR_MONTH_STATE) { |
| 108 | 108 | case CALENDAR_USE_MONTH_WEEKDAYS: |
| 109 | - include_once CALENDAR_ROOT.'Month/Weekdays.php'; |
|
| 109 | + include_once CALENDAR_ROOT . 'Month/Weekdays.php'; |
|
| 110 | 110 | $class = 'Calendar_Month_Weekdays'; |
| 111 | 111 | break; |
| 112 | 112 | case CALENDAR_USE_MONTH_WEEKS: |
| 113 | - include_once CALENDAR_ROOT.'Month/Weeks.php'; |
|
| 113 | + include_once CALENDAR_ROOT . 'Month/Weeks.php'; |
|
| 114 | 114 | $class = 'Calendar_Month_Weeks'; |
| 115 | 115 | break; |
| 116 | 116 | case CALENDAR_USE_MONTH: |
| 117 | 117 | default: |
| 118 | - include_once CALENDAR_ROOT.'Month.php'; |
|
| 118 | + include_once CALENDAR_ROOT . 'Month.php'; |
|
| 119 | 119 | $class = 'Calendar_Month'; |
| 120 | 120 | break; |
| 121 | 121 | } |
| 122 | 122 | |
| 123 | 123 | return new $class($y, $m, $firstDay); |
| 124 | 124 | case 'Week': |
| 125 | - include_once CALENDAR_ROOT.'Week.php'; |
|
| 125 | + include_once CALENDAR_ROOT . 'Week.php'; |
|
| 126 | 126 | |
| 127 | 127 | return new Calendar_Week($y, $m, $d, $firstDay); |
| 128 | 128 | case 'Hour': |
| 129 | - include_once CALENDAR_ROOT.'Hour.php'; |
|
| 129 | + include_once CALENDAR_ROOT . 'Hour.php'; |
|
| 130 | 130 | |
| 131 | 131 | return new Calendar_Hour($y, $m, $d, $h); |
| 132 | 132 | case 'Minute': |
| 133 | - include_once CALENDAR_ROOT.'Minute.php'; |
|
| 133 | + include_once CALENDAR_ROOT . 'Minute.php'; |
|
| 134 | 134 | |
| 135 | 135 | return new Calendar_Minute($y, $m, $d, $h, $i); |
| 136 | 136 | case 'Second': |
| 137 | - include_once CALENDAR_ROOT.'Second.php'; |
|
| 137 | + include_once CALENDAR_ROOT . 'Second.php'; |
|
| 138 | 138 | |
| 139 | 139 | return new Calendar_Second($y, $m, $d, $h, $i, $s); |
| 140 | 140 | case 'Year': |
| 141 | - include_once CALENDAR_ROOT.'Year.php'; |
|
| 141 | + include_once CALENDAR_ROOT . 'Year.php'; |
|
| 142 | 142 | |
| 143 | 143 | return new Calendar_Year($y); |
| 144 | 144 | default: |
| 145 | 145 | include_once 'PEAR.php'; |
| 146 | - PEAR::raiseError('Calendar_Factory::create() unrecognised type: '.$type, |
|
| 146 | + PEAR::raiseError('Calendar_Factory::create() unrecognised type: ' . $type, |
|
| 147 | 147 | null, PEAR_ERROR_TRIGGER, E_USER_NOTICE, 'Calendar_Factory::create()'); |
| 148 | 148 | |
| 149 | 149 | return false; |
@@ -47,7 +47,7 @@ |
||
| 47 | 47 | /** |
| 48 | 48 | * Load Calendar base class |
| 49 | 49 | */ |
| 50 | -require_once CALENDAR_ROOT.'Calendar.php'; |
|
| 50 | +require_once CALENDAR_ROOT . 'Calendar.php'; |
|
| 51 | 51 | |
| 52 | 52 | /** |
| 53 | 53 | * Represents a Second<br /> |