Completed
Branch master (838035)
by Michael
03:45
created
htdocs/modules/extcal/class/pear/Calendar/Minute.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
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 Minute and builds Seconds
@@ -96,10 +96,10 @@  discard block
 block discarded – undo
96 96
      */
97 97
     function build($sDates = array())
98 98
     {
99
-        include_once CALENDAR_ROOT.'Second.php';
99
+        include_once CALENDAR_ROOT . 'Second.php';
100 100
         $sIM = $this->cE->getSecondsInMinute($this->year, $this->month,
101 101
                 $this->day, $this->hour, $this->minute);
102
-        for ($i=0; $i < $sIM; ++$i) {
102
+        for ($i = 0; $i < $sIM; ++$i) {
103 103
             $this->children[$i] = new Calendar_Second($this->year, $this->month,
104 104
                 $this->day, $this->hour, $this->minute, $i);
105 105
         }
Please login to merge, or discard this patch.
htdocs/modules/extcal/class/pear/Calendar/Calendar.php 3 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -499,7 +499,7 @@  discard block
 block discarded – undo
499 499
         if (defined('CALENDAR_FIRST_DAY_OF_WEEK')) {
500 500
             if (!is_null($firstDay) && ($firstDay != CALENDAR_FIRST_DAY_OF_WEEK)) {
501 501
                 $msg = 'CALENDAR_FIRST_DAY_OF_WEEK constant already defined.'
502
-                  .' The $firstDay parameter will be ignored.';
502
+                    .' The $firstDay parameter will be ignored.';
503 503
                 trigger_error($msg, E_USER_WARNING);
504 504
             }
505 505
 
@@ -738,8 +738,8 @@  discard block
 block discarded – undo
738 738
     }
739 739
 
740 740
     /**
741
-    * Returns the value for the next minute
742
-    *
741
+     * Returns the value for the next minute
742
+     *
743 743
      * @param string $format return value format ['int'|'timestamp'|'object'|'array']
744 744
      *
745 745
      * @return int e.g. 25 or timestamp
@@ -774,8 +774,8 @@  discard block
 block discarded – undo
774 774
     /**
775 775
      * Returns the value for this second
776 776
      *
777
-    * @param string $format return value format ['int'|'timestamp'|'object'|'array']
778
-    *
777
+     * @param string $format return value format ['int'|'timestamp'|'object'|'array']
778
+     *
779 779
      * @return int e.g. 44 or timestamp
780 780
      * @access public
781 781
      */
Please login to merge, or discard this patch.
Switch Indentation   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -87,13 +87,13 @@  discard block
 block discarded – undo
87 87
     {
88 88
         static $engine = false;
89 89
         switch (CALENDAR_ENGINE) {
90
-        case 'PearDate':
91
-            $class = 'Calendar_Engine_PearDate';
92
-            break;
93
-        case 'UnixTS':
94
-        default:
95
-            $class = 'Calendar_Engine_UnixTS';
96
-            break;
90
+            case 'PearDate':
91
+                $class = 'Calendar_Engine_PearDate';
92
+                break;
93
+            case 'UnixTS':
94
+            default:
95
+                $class = 'Calendar_Engine_UnixTS';
96
+                break;
97 97
         }
98 98
         if (!$engine) {
99 99
             if (!class_exists($class)) {
@@ -342,20 +342,20 @@  discard block
 block discarded – undo
342 342
     function returnValue($returnType, $format, $stamp, $default)
343 343
     {
344 344
         switch (strtolower($format)) {
345
-        case 'int':
346
-            return $default;
347
-        case 'array':
348
-            return $this->toArray($stamp);
349
-            break;
350
-        case 'object':
351
-            include_once CALENDAR_ROOT.'Factory.php';
352
-
353
-            return Calendar_Factory::createByTimestamp($returnType, $stamp);
354
-            break;
355
-        case 'timestamp':
356
-        default:
357
-            return $stamp;
358
-            break;
345
+            case 'int':
346
+                return $default;
347
+            case 'array':
348
+                return $this->toArray($stamp);
349
+                break;
350
+            case 'object':
351
+                include_once CALENDAR_ROOT.'Factory.php';
352
+
353
+                return Calendar_Factory::createByTimestamp($returnType, $stamp);
354
+                break;
355
+            case 'timestamp':
356
+            default:
357
+                return $stamp;
358
+                break;
359 359
         }
360 360
     }
361 361
 
Please login to merge, or discard this patch.
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -54,9 +54,9 @@  discard block
 block discarded – undo
54 54
 /**
55 55
  * Define Calendar Month states
56 56
  */
57
-define('CALENDAR_USE_MONTH',          1);
57
+define('CALENDAR_USE_MONTH', 1);
58 58
 define('CALENDAR_USE_MONTH_WEEKDAYS', 2);
59
-define('CALENDAR_USE_MONTH_WEEKS',    3);
59
+define('CALENDAR_USE_MONTH_WEEKS', 3);
60 60
 
61 61
 /**
62 62
  * Contains a factory method to return a Singleton instance of a class
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
         }
98 98
         if (!$engine) {
99 99
             if (!class_exists($class)) {
100
-                include_once CALENDAR_ROOT.'Engine'. '/' .CALENDAR_ENGINE.'.php';
100
+                include_once CALENDAR_ROOT . 'Engine' . '/' . CALENDAR_ENGINE . '.php';
101 101
             }
102 102
             $engine = new $class;
103 103
         }
@@ -312,7 +312,7 @@  discard block
 block discarded – undo
312 312
      * @return array
313 313
      * @access public
314 314
      */
315
-    function toArray($stamp=null)
315
+    function toArray($stamp = null)
316 316
     {
317 317
         if (is_null($stamp)) {
318 318
             $stamp = $this->getTimeStamp();
@@ -348,7 +348,7 @@  discard block
 block discarded – undo
348 348
             return $this->toArray($stamp);
349 349
             break;
350 350
         case 'object':
351
-            include_once CALENDAR_ROOT.'Factory.php';
351
+            include_once CALENDAR_ROOT . 'Factory.php';
352 352
 
353 353
             return Calendar_Factory::createByTimestamp($returnType, $stamp);
354 354
             break;
@@ -463,7 +463,7 @@  discard block
 block discarded – undo
463 463
     function & getValidator()
464 464
     {
465 465
         if (!isset($this->validator)) {
466
-            include_once CALENDAR_ROOT.'Validator.php';
466
+            include_once CALENDAR_ROOT . 'Validator.php';
467 467
             $this->validator = new Calendar_Validator($this);
468 468
         }
469 469
 
@@ -527,9 +527,9 @@  discard block
 block discarded – undo
527 527
      */
528 528
     function prevYear($format = 'int')
529 529
     {
530
-        $ts = $this->cE->dateToStamp($this->year-1, 1, 1, 0, 0, 0);
530
+        $ts = $this->cE->dateToStamp($this->year - 1, 1, 1, 0, 0, 0);
531 531
 
532
-        return $this->returnValue('Year', $format, $ts, $this->year-1);
532
+        return $this->returnValue('Year', $format, $ts, $this->year - 1);
533 533
     }
534 534
 
535 535
     /**
@@ -557,9 +557,9 @@  discard block
 block discarded – undo
557 557
      */
558 558
     function nextYear($format = 'int')
559 559
     {
560
-        $ts = $this->cE->dateToStamp($this->year+1, 1, 1, 0, 0, 0);
560
+        $ts = $this->cE->dateToStamp($this->year + 1, 1, 1, 0, 0, 0);
561 561
 
562
-        return $this->returnValue('Year', $format, $ts, $this->year+1);
562
+        return $this->returnValue('Year', $format, $ts, $this->year + 1);
563 563
     }
564 564
 
565 565
     /**
@@ -572,7 +572,7 @@  discard block
 block discarded – undo
572 572
      */
573 573
     function prevMonth($format = 'int')
574 574
     {
575
-        $ts = $this->cE->dateToStamp($this->year, $this->month-1, 1, 0, 0, 0);
575
+        $ts = $this->cE->dateToStamp($this->year, $this->month - 1, 1, 0, 0, 0);
576 576
 
577 577
         return $this->returnValue('Month', $format, $ts, $this->cE->stampToMonth($ts));
578 578
     }
@@ -602,7 +602,7 @@  discard block
 block discarded – undo
602 602
      */
603 603
     function nextMonth($format = 'int')
604 604
     {
605
-        $ts = $this->cE->dateToStamp($this->year, $this->month+1, 1, 0, 0, 0);
605
+        $ts = $this->cE->dateToStamp($this->year, $this->month + 1, 1, 0, 0, 0);
606 606
 
607 607
         return $this->returnValue('Month', $format, $ts, $this->cE->stampToMonth($ts));
608 608
     }
@@ -618,7 +618,7 @@  discard block
 block discarded – undo
618 618
     function prevDay($format = 'int')
619 619
     {
620 620
         $ts = $this->cE->dateToStamp(
621
-            $this->year, $this->month, $this->day-1, 0, 0, 0);
621
+            $this->year, $this->month, $this->day - 1, 0, 0, 0);
622 622
 
623 623
         return $this->returnValue('Day', $format, $ts, $this->cE->stampToDay($ts));
624 624
     }
@@ -650,7 +650,7 @@  discard block
 block discarded – undo
650 650
     function nextDay($format = 'int')
651 651
     {
652 652
         $ts = $this->cE->dateToStamp(
653
-            $this->year, $this->month, $this->day+1, 0, 0, 0);
653
+            $this->year, $this->month, $this->day + 1, 0, 0, 0);
654 654
 
655 655
         return $this->returnValue('Day', $format, $ts, $this->cE->stampToDay($ts));
656 656
     }
@@ -666,7 +666,7 @@  discard block
 block discarded – undo
666 666
     function prevHour($format = 'int')
667 667
     {
668 668
         $ts = $this->cE->dateToStamp(
669
-            $this->year, $this->month, $this->day, $this->hour-1, 0, 0);
669
+            $this->year, $this->month, $this->day, $this->hour - 1, 0, 0);
670 670
 
671 671
         return $this->returnValue('Hour', $format, $ts, $this->cE->stampToHour($ts));
672 672
     }
@@ -698,7 +698,7 @@  discard block
 block discarded – undo
698 698
     function nextHour($format = 'int')
699 699
     {
700 700
         $ts = $this->cE->dateToStamp(
701
-            $this->year, $this->month, $this->day, $this->hour+1, 0, 0);
701
+            $this->year, $this->month, $this->day, $this->hour + 1, 0, 0);
702 702
 
703 703
         return $this->returnValue('Hour', $format, $ts, $this->cE->stampToHour($ts));
704 704
     }
@@ -715,7 +715,7 @@  discard block
 block discarded – undo
715 715
     {
716 716
         $ts = $this->cE->dateToStamp(
717 717
             $this->year, $this->month, $this->day,
718
-            $this->hour, $this->minute-1, 0);
718
+            $this->hour, $this->minute - 1, 0);
719 719
 
720 720
         return $this->returnValue('Minute', $format, $ts, $this->cE->stampToMinute($ts));
721 721
     }
@@ -749,7 +749,7 @@  discard block
 block discarded – undo
749 749
     {
750 750
         $ts = $this->cE->dateToStamp(
751 751
             $this->year, $this->month, $this->day,
752
-            $this->hour, $this->minute+1, 0);
752
+            $this->hour, $this->minute + 1, 0);
753 753
 
754 754
         return $this->returnValue('Minute', $format, $ts, $this->cE->stampToMinute($ts));
755 755
     }
@@ -766,7 +766,7 @@  discard block
 block discarded – undo
766 766
     {
767 767
         $ts = $this->cE->dateToStamp(
768 768
             $this->year, $this->month, $this->day,
769
-            $this->hour, $this->minute, $this->second-1);
769
+            $this->hour, $this->minute, $this->second - 1);
770 770
 
771 771
         return $this->returnValue('Second', $format, $ts, $this->cE->stampToSecond($ts));
772 772
     }
@@ -800,7 +800,7 @@  discard block
 block discarded – undo
800 800
     {
801 801
         $ts = $this->cE->dateToStamp(
802 802
             $this->year, $this->month, $this->day,
803
-            $this->hour, $this->minute, $this->second+1);
803
+            $this->hour, $this->minute, $this->second + 1);
804 804
 
805 805
         return $this->returnValue('Second', $format, $ts, $this->cE->stampToSecond($ts));
806 806
     }
Please login to merge, or discard this patch.
htdocs/modules/extcal/class/pear/Calendar/Decorator/Wrapper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@
 block discarded – undo
48 48
 /**
49 49
  * Load Calendar decorator base class
50 50
  */
51
-require_once CALENDAR_ROOT.'Decorator.php';
51
+require_once CALENDAR_ROOT . 'Decorator.php';
52 52
 
53 53
 /**
54 54
  * Decorator to help with wrapping built children in another decorator
Please login to merge, or discard this patch.
htdocs/modules/extcal/class/pear/Calendar/Decorator/Weekday.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -48,12 +48,12 @@
 block discarded – undo
48 48
 /**
49 49
  * Load Calendar decorator base class
50 50
  */
51
-require_once CALENDAR_ROOT.'Decorator.php';
51
+require_once CALENDAR_ROOT . 'Decorator.php';
52 52
 
53 53
 /**
54 54
  * Load a Calendar_Day
55 55
  */
56
-require_once CALENDAR_ROOT.'Day.php';
56
+require_once CALENDAR_ROOT . 'Day.php';
57 57
 /**
58 58
  * Decorator for fetching the day of the week
59 59
  * <code>
Please login to merge, or discard this patch.
htdocs/modules/extcal/class/pear/Calendar/Decorator/Uri.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -48,12 +48,12 @@
 block discarded – undo
48 48
 /**
49 49
  * Load Calendar decorator base class
50 50
  */
51
-require_once CALENDAR_ROOT.'Decorator.php';
51
+require_once CALENDAR_ROOT . 'Decorator.php';
52 52
 
53 53
 /**
54 54
  * Load the Uri utility
55 55
  */
56
-require_once CALENDAR_ROOT.'Util/Uri.php';
56
+require_once CALENDAR_ROOT . 'Util/Uri.php';
57 57
 
58 58
 /**
59 59
  * Decorator to help with building HTML links for navigating the calendar<br />
Please login to merge, or discard this patch.
htdocs/modules/extcal/class/pear/Calendar/Decorator/Textual.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -48,12 +48,12 @@
 block discarded – undo
48 48
 /**
49 49
  * Load Calendar decorator base class
50 50
  */
51
-require_once CALENDAR_ROOT.'Decorator.php';
51
+require_once CALENDAR_ROOT . 'Decorator.php';
52 52
 
53 53
 /**
54 54
  * Load the Uri utility
55 55
  */
56
-require_once CALENDAR_ROOT.'Util/Textual.php';
56
+require_once CALENDAR_ROOT . 'Util/Textual.php';
57 57
 
58 58
 /**
59 59
  * Decorator to help with fetching textual representations of months and
Please login to merge, or discard this patch.
htdocs/modules/extcal/class/perm.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -46,8 +46,8 @@
 block discarded – undo
46 46
         static $authorizedCat;
47 47
         $userId = ($user) ? $user->getVar('uid') : 0;
48 48
         if (!isset($authorizedCat[$perm][$userId])) {
49
-            $groupPermHandler =& xoops_gethandler('groupperm');
50
-            $moduleHandler    =& xoops_gethandler('module');
49
+            $groupPermHandler = & xoops_gethandler('groupperm');
50
+            $moduleHandler    = & xoops_gethandler('module');
51 51
             $module           = $moduleHandler->getByDirname('extcal');
52 52
             if (!$module) {
53 53
                 return false;
Please login to merge, or discard this patch.
htdocs/modules/extcal/class/config.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -30,9 +30,9 @@
 block discarded – undo
30 30
             $moduleConfig = $GLOBALS['xoopsModuleConfig'];
31 31
         } else {
32 32
             if (!isset($moduleConfig)) {
33
-                $moduleHandler =& xoops_gethandler('module');
33
+                $moduleHandler = & xoops_gethandler('module');
34 34
                 $module        = $moduleHandler->getByDirname('extcal');
35
-                $configHandler =& xoops_gethandler('config');
35
+                $configHandler = & xoops_gethandler('config');
36 36
                 $moduleConfig  = $configHandler->getConfigList($module->getVar("mid"));
37 37
             }
38 38
         }
Please login to merge, or discard this patch.
htdocs/modules/extcal/post.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -152,7 +152,7 @@
 block discarded – undo
152 152
             $notifyEvent = 'new_event';
153 153
         }
154 154
 
155
-        $notificationHandler =& xoops_gethandler('notification');
155
+        $notificationHandler = & xoops_gethandler('notification');
156 156
         $notificationHandler->triggerEvent('global', 0, $notifyEvent, array('EVENT_TITLE' => $_POST['event_title']));
157 157
         if ($approve == 1) {
158 158
             $catHandler = xoops_getmodulehandler(_EXTCAL_CLS_CAT, _EXTCAL_MODULE);
Please login to merge, or discard this patch.