@@ -32,13 +32,13 @@ |
||
| 32 | 32 | public function testPrevDay_Array() |
| 33 | 33 | { |
| 34 | 34 | $this->assertEqual(array( |
| 35 | - 'year' => 2003, |
|
| 36 | - 'month' => 9, |
|
| 37 | - 'day' => 30, |
|
| 38 | - 'hour' => 0, |
|
| 39 | - 'minute' => 0, |
|
| 40 | - 'second' => 0, |
|
| 41 | - ), $this->cal->prevDay('array')); |
|
| 35 | + 'year' => 2003, |
|
| 36 | + 'month' => 9, |
|
| 37 | + 'day' => 30, |
|
| 38 | + 'hour' => 0, |
|
| 39 | + 'minute' => 0, |
|
| 40 | + 'second' => 0, |
|
| 41 | + ), $this->cal->prevDay('array')); |
|
| 42 | 42 | } |
| 43 | 43 | |
| 44 | 44 | public function testThisDay() |
@@ -27,13 +27,13 @@ |
||
| 27 | 27 | public function testPrevDay_Array() |
| 28 | 28 | { |
| 29 | 29 | $this->assertEqual(array( |
| 30 | - 'year' => 2003, |
|
| 31 | - 'month' => 10, |
|
| 32 | - 'day' => 24, |
|
| 33 | - 'hour' => 0, |
|
| 34 | - 'minute' => 0, |
|
| 35 | - 'second' => 0, |
|
| 36 | - ), $this->cal->prevDay('array')); |
|
| 30 | + 'year' => 2003, |
|
| 31 | + 'month' => 10, |
|
| 32 | + 'day' => 24, |
|
| 33 | + 'hour' => 0, |
|
| 34 | + 'minute' => 0, |
|
| 35 | + 'second' => 0, |
|
| 36 | + ), $this->cal->prevDay('array')); |
|
| 37 | 37 | } |
| 38 | 38 | } |
| 39 | 39 | |
@@ -65,8 +65,8 @@ |
||
| 65 | 65 | // Flag current day |
| 66 | 66 | $selectedDays = array( |
| 67 | 67 | new Calendar_Day(date('Y', xoops_getUserTimestamp(time(), $extcalTimeHandler->_getUserTimeZone($xoopsUser))), |
| 68 | - date('n', xoops_getUserTimestamp(time(), $extcalTimeHandler->_getUserTimeZone($xoopsUser))), |
|
| 69 | - date('j', xoops_getUserTimestamp(time(), $extcalTimeHandler->_getUserTimeZone($xoopsUser)))), |
|
| 68 | + date('n', xoops_getUserTimestamp(time(), $extcalTimeHandler->_getUserTimeZone($xoopsUser))), |
|
| 69 | + date('j', xoops_getUserTimestamp(time(), $extcalTimeHandler->_getUserTimeZone($xoopsUser)))), |
|
| 70 | 70 | ); |
| 71 | 71 | |
| 72 | 72 | // Build calendar object |
@@ -1,16 +1,16 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -include __DIR__ . '/../../mainfile.php'; |
|
| 4 | -include_once __DIR__ . '/include/constantes.php'; |
|
| 3 | +include __DIR__.'/../../mainfile.php'; |
|
| 4 | +include_once __DIR__.'/include/constantes.php'; |
|
| 5 | 5 | $params = array('view' => _EXTCAL_NAV_WEEK, 'file' => _EXTCAL_FILE_WEEK); |
| 6 | 6 | $GLOBALS['xoopsOption']['template_main'] = "extcal_view_{$params['view']}.tpl"; |
| 7 | -include_once __DIR__ . '/header.php'; |
|
| 7 | +include_once __DIR__.'/header.php'; |
|
| 8 | 8 | |
| 9 | 9 | /* ========================================================================== */ |
| 10 | -$year = isset($_GET['year']) ? (int)$_GET['year'] : date('Y'); |
|
| 11 | -$month = isset($_GET['month']) ? (int)$_GET['month'] : date('n'); |
|
| 12 | -$day = isset($_GET['day']) ? (int)$_GET['day'] : date('j'); |
|
| 13 | -$cat = isset($_GET['cat']) ? (int)$_GET['cat'] : 0; |
|
| 10 | +$year = isset($_GET['year']) ? (int) $_GET['year'] : date('Y'); |
|
| 11 | +$month = isset($_GET['month']) ? (int) $_GET['month'] : date('n'); |
|
| 12 | +$day = isset($_GET['day']) ? (int) $_GET['day'] : date('j'); |
|
| 13 | +$cat = isset($_GET['cat']) ? (int) $_GET['cat'] : 0; |
|
| 14 | 14 | /* ========================================================================== */ |
| 15 | 15 | |
| 16 | 16 | // Validate the date (day, month and year) |
@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | 'cat' => $cat, |
| 46 | 46 | 'externalKeys' => 'cat_id', |
| 47 | 47 | ); |
| 48 | -$events = $eventHandler->getEventsOnPeriode($criteres); |
|
| 48 | +$events = $eventHandler->getEventsOnPeriode($criteres); |
|
| 49 | 49 | /**********************************************************************/ |
| 50 | 50 | $eventsArray = $events; |
| 51 | 51 | // Formating date |
@@ -86,21 +86,21 @@ discard block |
||
| 86 | 86 | $nWeekCalObj = $weekCalObj->nextWeek('object'); |
| 87 | 87 | $navig = array( |
| 88 | 88 | 'prev' => array( |
| 89 | - 'uri' => 'year=' . $pWeekCalObj->thisYear() . '&month=' . $pWeekCalObj->thisMonth() . '&day=' . $pWeekCalObj->thisDay(), |
|
| 89 | + 'uri' => 'year='.$pWeekCalObj->thisYear().'&month='.$pWeekCalObj->thisMonth().'&day='.$pWeekCalObj->thisDay(), |
|
| 90 | 90 | 'name' => $extcalTimeHandler->getFormatedDate($extcalConfig['nav_date_week'], $pWeekCalObj->getTimestamp()), |
| 91 | 91 | ), |
| 92 | 92 | 'this' => array( |
| 93 | - 'uri' => 'year=' . $weekCalObj->thisYear() . '&month=' . $weekCalObj->thisMonth() . '&day=' . $weekCalObj->thisDay(), |
|
| 93 | + 'uri' => 'year='.$weekCalObj->thisYear().'&month='.$weekCalObj->thisMonth().'&day='.$weekCalObj->thisDay(), |
|
| 94 | 94 | 'name' => $extcalTimeHandler->getFormatedDate($extcalConfig['nav_date_week'], $weekCalObj->getTimestamp()), |
| 95 | 95 | ), |
| 96 | 96 | 'next' => array( |
| 97 | - 'uri' => 'year=' . $nWeekCalObj->thisYear() . '&month=' . $nWeekCalObj->thisMonth() . '&day=' . $nWeekCalObj->thisDay(), |
|
| 97 | + 'uri' => 'year='.$nWeekCalObj->thisYear().'&month='.$nWeekCalObj->thisMonth().'&day='.$nWeekCalObj->thisDay(), |
|
| 98 | 98 | 'name' => $extcalTimeHandler->getFormatedDate($extcalConfig['nav_date_week'], $nWeekCalObj->getTimestamp()), |
| 99 | 99 | ), |
| 100 | 100 | ); |
| 101 | 101 | |
| 102 | 102 | // Title of the page |
| 103 | -$xoopsTpl->assign('xoops_pagetitle', $xoopsModule->getVar('name') . ' ' . $navig['this']['name']); |
|
| 103 | +$xoopsTpl->assign('xoops_pagetitle', $xoopsModule->getVar('name').' '.$navig['this']['name']); |
|
| 104 | 104 | |
| 105 | 105 | // Assigning navig data to the template |
| 106 | 106 | $xoopsTpl->assign('navig', $navig); |
@@ -160,4 +160,4 @@ discard block |
||
| 160 | 160 | $xoopsTpl->assign('lang', $lang); |
| 161 | 161 | $xoopsTpl->assign('view', 'week'); |
| 162 | 162 | |
| 163 | -include XOOPS_ROOT_PATH . '/footer.php'; |
|
| 163 | +include XOOPS_ROOT_PATH.'/footer.php'; |
|
@@ -39,32 +39,32 @@ |
||
| 39 | 39 | } |
| 40 | 40 | |
| 41 | 41 | switch (@$_GET['view']) { |
| 42 | - default: |
|
| 43 | - $_GET['view'] = 'calendar_year'; |
|
| 44 | - case 'calendar_year': |
|
| 45 | - require_once CALENDAR_ROOT.'Year.php'; |
|
| 46 | - $c = new Calendar_Year($_GET['y']); |
|
| 47 | - break; |
|
| 48 | - case 'calendar_month': |
|
| 49 | - require_once CALENDAR_ROOT.'Month.php'; |
|
| 50 | - $c = new Calendar_Month($_GET['y'], $_GET['m']); |
|
| 51 | - break; |
|
| 52 | - case 'calendar_day': |
|
| 53 | - require_once CALENDAR_ROOT.'Day.php'; |
|
| 54 | - $c = new Calendar_Day($_GET['y'], $_GET['m'], $_GET['d']); |
|
| 55 | - break; |
|
| 56 | - case 'calendar_hour': |
|
| 57 | - require_once CALENDAR_ROOT.'Hour.php'; |
|
| 58 | - $c = new Calendar_Hour($_GET['y'], $_GET['m'], $_GET['d'], $_GET['h']); |
|
| 59 | - break; |
|
| 60 | - case 'calendar_minute': |
|
| 61 | - require_once CALENDAR_ROOT.'Minute.php'; |
|
| 62 | - $c = new Calendar_Minute($_GET['y'], $_GET['m'], $_GET['d'], $_GET['h'], $_GET['i']); |
|
| 63 | - break; |
|
| 64 | - case 'calendar_second': |
|
| 65 | - require_once CALENDAR_ROOT.'Second.php'; |
|
| 66 | - $c = new Calendar_Second($_GET['y'], $_GET['m'], $_GET['d'], $_GET['h'], $_GET['i'], $_GET['s']); |
|
| 67 | - break; |
|
| 42 | + default: |
|
| 43 | + $_GET['view'] = 'calendar_year'; |
|
| 44 | + case 'calendar_year': |
|
| 45 | + require_once CALENDAR_ROOT.'Year.php'; |
|
| 46 | + $c = new Calendar_Year($_GET['y']); |
|
| 47 | + break; |
|
| 48 | + case 'calendar_month': |
|
| 49 | + require_once CALENDAR_ROOT.'Month.php'; |
|
| 50 | + $c = new Calendar_Month($_GET['y'], $_GET['m']); |
|
| 51 | + break; |
|
| 52 | + case 'calendar_day': |
|
| 53 | + require_once CALENDAR_ROOT.'Day.php'; |
|
| 54 | + $c = new Calendar_Day($_GET['y'], $_GET['m'], $_GET['d']); |
|
| 55 | + break; |
|
| 56 | + case 'calendar_hour': |
|
| 57 | + require_once CALENDAR_ROOT.'Hour.php'; |
|
| 58 | + $c = new Calendar_Hour($_GET['y'], $_GET['m'], $_GET['d'], $_GET['h']); |
|
| 59 | + break; |
|
| 60 | + case 'calendar_minute': |
|
| 61 | + require_once CALENDAR_ROOT.'Minute.php'; |
|
| 62 | + $c = new Calendar_Minute($_GET['y'], $_GET['m'], $_GET['d'], $_GET['h'], $_GET['i']); |
|
| 63 | + break; |
|
| 64 | + case 'calendar_second': |
|
| 65 | + require_once CALENDAR_ROOT.'Second.php'; |
|
| 66 | + $c = new Calendar_Second($_GET['y'], $_GET['m'], $_GET['d'], $_GET['h'], $_GET['i'], $_GET['s']); |
|
| 67 | + break; |
|
| 68 | 68 | } |
| 69 | 69 | |
| 70 | 70 | // Convert timestamp to human readable date |
@@ -27,13 +27,13 @@ |
||
| 27 | 27 | public function testPrevDay_Array() |
| 28 | 28 | { |
| 29 | 29 | $this->assertEqual(array( |
| 30 | - 'year' => 2003, |
|
| 31 | - 'month' => 10, |
|
| 32 | - 'day' => 24, |
|
| 33 | - 'hour' => 0, |
|
| 34 | - 'minute' => 0, |
|
| 35 | - 'second' => 0, |
|
| 36 | - ), $this->cal->prevDay('array')); |
|
| 30 | + 'year' => 2003, |
|
| 31 | + 'month' => 10, |
|
| 32 | + 'day' => 24, |
|
| 33 | + 'hour' => 0, |
|
| 34 | + 'minute' => 0, |
|
| 35 | + 'second' => 0, |
|
| 36 | + ), $this->cal->prevDay('array')); |
|
| 37 | 37 | } |
| 38 | 38 | } |
| 39 | 39 | |
@@ -27,13 +27,13 @@ |
||
| 27 | 27 | public function testPrevDay_Array() |
| 28 | 28 | { |
| 29 | 29 | $this->assertEqual(array( |
| 30 | - 'year' => 2003, |
|
| 31 | - 'month' => 10, |
|
| 32 | - 'day' => 24, |
|
| 33 | - 'hour' => 0, |
|
| 34 | - 'minute' => 0, |
|
| 35 | - 'second' => 0, |
|
| 36 | - ), $this->cal->prevDay('array')); |
|
| 30 | + 'year' => 2003, |
|
| 31 | + 'month' => 10, |
|
| 32 | + 'day' => 24, |
|
| 33 | + 'hour' => 0, |
|
| 34 | + 'minute' => 0, |
|
| 35 | + 'second' => 0, |
|
| 36 | + ), $this->cal->prevDay('array')); |
|
| 37 | 37 | } |
| 38 | 38 | } |
| 39 | 39 | |
@@ -32,13 +32,13 @@ |
||
| 32 | 32 | public function testPrevDay_Array() |
| 33 | 33 | { |
| 34 | 34 | $this->assertEqual(array( |
| 35 | - 'year' => 2003, |
|
| 36 | - 'month' => 9, |
|
| 37 | - 'day' => 30, |
|
| 38 | - 'hour' => 0, |
|
| 39 | - 'minute' => 0, |
|
| 40 | - 'second' => 0, |
|
| 41 | - ), $this->cal->prevDay('array')); |
|
| 35 | + 'year' => 2003, |
|
| 36 | + 'month' => 9, |
|
| 37 | + 'day' => 30, |
|
| 38 | + 'hour' => 0, |
|
| 39 | + 'minute' => 0, |
|
| 40 | + 'second' => 0, |
|
| 41 | + ), $this->cal->prevDay('array')); |
|
| 42 | 42 | } |
| 43 | 43 | |
| 44 | 44 | public function testThisDay() |
@@ -32,13 +32,13 @@ |
||
| 32 | 32 | public function testPrevDay_Array() |
| 33 | 33 | { |
| 34 | 34 | $this->assertEqual(array( |
| 35 | - 'year' => 2003, |
|
| 36 | - 'month' => 9, |
|
| 37 | - 'day' => 30, |
|
| 38 | - 'hour' => 0, |
|
| 39 | - 'minute' => 0, |
|
| 40 | - 'second' => 0, |
|
| 41 | - ), $this->cal->prevDay('array')); |
|
| 35 | + 'year' => 2003, |
|
| 36 | + 'month' => 9, |
|
| 37 | + 'day' => 30, |
|
| 38 | + 'hour' => 0, |
|
| 39 | + 'minute' => 0, |
|
| 40 | + 'second' => 0, |
|
| 41 | + ), $this->cal->prevDay('array')); |
|
| 42 | 42 | } |
| 43 | 43 | |
| 44 | 44 | public function testThisDay() |
@@ -27,13 +27,13 @@ |
||
| 27 | 27 | public function testPrevDay_Array() |
| 28 | 28 | { |
| 29 | 29 | $this->assertEqual(array( |
| 30 | - 'year' => 2003, |
|
| 31 | - 'month' => 10, |
|
| 32 | - 'day' => 24, |
|
| 33 | - 'hour' => 0, |
|
| 34 | - 'minute' => 0, |
|
| 35 | - 'second' => 0, |
|
| 36 | - ), $this->cal->prevDay('array')); |
|
| 30 | + 'year' => 2003, |
|
| 31 | + 'month' => 10, |
|
| 32 | + 'day' => 24, |
|
| 33 | + 'hour' => 0, |
|
| 34 | + 'minute' => 0, |
|
| 35 | + 'second' => 0, |
|
| 36 | + ), $this->cal->prevDay('array')); |
|
| 37 | 37 | } |
| 38 | 38 | } |
| 39 | 39 | |