@@ -80,7 +80,7 @@ discard block |
||
| 80 | 80 | */ |
| 81 | 81 | public function __construct(&$calendar) |
| 82 | 82 | { |
| 83 | - $this->calendar =& $calendar; |
|
| 83 | + $this->calendar = & $calendar; |
|
| 84 | 84 | } |
| 85 | 85 | |
| 86 | 86 | /** |
@@ -403,8 +403,8 @@ discard block |
||
| 403 | 403 | if (method_exists($this->calendar, 'prevWeek')) { |
| 404 | 404 | return $this->calendar->prevWeek($format); |
| 405 | 405 | } else { |
| 406 | - require_once __DIR__ . '/PEAR.php'; |
|
| 407 | - PEAR::raiseError('Cannot call prevWeek on Calendar object of type: ' . get_class($this->calendar), 133, PEAR_ERROR_TRIGGER, E_USER_NOTICE, 'Calendar_Decorator::prevWeek()'); |
|
| 406 | + require_once __DIR__.'/PEAR.php'; |
|
| 407 | + PEAR::raiseError('Cannot call prevWeek on Calendar object of type: '.get_class($this->calendar), 133, PEAR_ERROR_TRIGGER, E_USER_NOTICE, 'Calendar_Decorator::prevWeek()'); |
|
| 408 | 408 | |
| 409 | 409 | return false; |
| 410 | 410 | } |
@@ -422,8 +422,8 @@ discard block |
||
| 422 | 422 | if (method_exists($this->calendar, 'thisWeek')) { |
| 423 | 423 | return $this->calendar->thisWeek($format); |
| 424 | 424 | } else { |
| 425 | - require_once __DIR__ . '/PEAR.php'; |
|
| 426 | - PEAR::raiseError('Cannot call thisWeek on Calendar object of type: ' . get_class($this->calendar), 133, PEAR_ERROR_TRIGGER, E_USER_NOTICE, 'Calendar_Decorator::thisWeek()'); |
|
| 425 | + require_once __DIR__.'/PEAR.php'; |
|
| 426 | + PEAR::raiseError('Cannot call thisWeek on Calendar object of type: '.get_class($this->calendar), 133, PEAR_ERROR_TRIGGER, E_USER_NOTICE, 'Calendar_Decorator::thisWeek()'); |
|
| 427 | 427 | |
| 428 | 428 | return false; |
| 429 | 429 | } |
@@ -441,8 +441,8 @@ discard block |
||
| 441 | 441 | if (method_exists($this->calendar, 'nextWeek')) { |
| 442 | 442 | return $this->calendar->nextWeek($format); |
| 443 | 443 | } else { |
| 444 | - require_once __DIR__ . '/PEAR.php'; |
|
| 445 | - PEAR::raiseError('Cannot call thisWeek on Calendar object of type: ' . get_class($this->calendar), 133, PEAR_ERROR_TRIGGER, E_USER_NOTICE, 'Calendar_Decorator::nextWeek()'); |
|
| 444 | + require_once __DIR__.'/PEAR.php'; |
|
| 445 | + PEAR::raiseError('Cannot call thisWeek on Calendar object of type: '.get_class($this->calendar), 133, PEAR_ERROR_TRIGGER, E_USER_NOTICE, 'Calendar_Decorator::nextWeek()'); |
|
| 446 | 446 | |
| 447 | 447 | return false; |
| 448 | 448 | } |
@@ -136,7 +136,7 @@ discard block |
||
| 136 | 136 | /** |
| 137 | 137 | * Returns the date as an associative array (helper method). |
| 138 | 138 | * |
| 139 | - * @param mixed $stamp timestamp (leave empty for current timestamp) |
|
| 139 | + * @param integer $stamp timestamp (leave empty for current timestamp) |
|
| 140 | 140 | * |
| 141 | 141 | * @return array |
| 142 | 142 | */ |
@@ -242,7 +242,7 @@ discard block |
||
| 242 | 242 | * |
| 243 | 243 | * @param array $sDates array containing Calendar objects to select (optional) |
| 244 | 244 | * |
| 245 | - * @return bool |
|
| 245 | + * @return boolean|null |
|
| 246 | 246 | * @abstract |
| 247 | 247 | */ |
| 248 | 248 | public function build($sDates = []) |
@@ -50,12 +50,12 @@ discard block |
||
| 50 | 50 | /** |
| 51 | 51 | * Load Calendar decorator base class. |
| 52 | 52 | */ |
| 53 | -require_once CALENDAR_ROOT . 'Decorator.php'; |
|
| 53 | +require_once CALENDAR_ROOT.'Decorator.php'; |
|
| 54 | 54 | |
| 55 | 55 | /** |
| 56 | 56 | * Load a Calendar_Day. |
| 57 | 57 | */ |
| 58 | -require_once CALENDAR_ROOT . 'Day.php'; |
|
| 58 | +require_once CALENDAR_ROOT.'Day.php'; |
|
| 59 | 59 | |
| 60 | 60 | /** |
| 61 | 61 | * Decorator for fetching the day of the week |
@@ -101,7 +101,7 @@ discard block |
||
| 101 | 101 | */ |
| 102 | 102 | public function setFirstDay($firstDay) |
| 103 | 103 | { |
| 104 | - $this->firstDay = (int)$firstDay; |
|
| 104 | + $this->firstDay = (int) $firstDay; |
|
| 105 | 105 | } |
| 106 | 106 | |
| 107 | 107 | /** |
@@ -50,12 +50,12 @@ |
||
| 50 | 50 | /** |
| 51 | 51 | * Load Calendar decorator base class. |
| 52 | 52 | */ |
| 53 | -require_once CALENDAR_ROOT . 'Decorator.php'; |
|
| 53 | +require_once CALENDAR_ROOT.'Decorator.php'; |
|
| 54 | 54 | |
| 55 | 55 | /** |
| 56 | 56 | * Load the Uri utility. |
| 57 | 57 | */ |
| 58 | -require_once CALENDAR_ROOT . 'Util/Textual.php'; |
|
| 58 | +require_once CALENDAR_ROOT.'Util/Textual.php'; |
|
| 59 | 59 | |
| 60 | 60 | /** |
| 61 | 61 | * Decorator to help with fetching textual representations of months and |
@@ -50,7 +50,7 @@ |
||
| 50 | 50 | /** |
| 51 | 51 | * Load Calendar decorator base class. |
| 52 | 52 | */ |
| 53 | -require_once CALENDAR_ROOT . 'Decorator.php'; |
|
| 53 | +require_once CALENDAR_ROOT.'Decorator.php'; |
|
| 54 | 54 | |
| 55 | 55 | /** |
| 56 | 56 | * Decorator to help with wrapping built children in another decorator. |
@@ -50,12 +50,12 @@ |
||
| 50 | 50 | /** |
| 51 | 51 | * Load Calendar decorator base class. |
| 52 | 52 | */ |
| 53 | -require_once CALENDAR_ROOT . 'Decorator.php'; |
|
| 53 | +require_once CALENDAR_ROOT.'Decorator.php'; |
|
| 54 | 54 | |
| 55 | 55 | /** |
| 56 | 56 | * Load the Uri utility. |
| 57 | 57 | */ |
| 58 | -require_once CALENDAR_ROOT . 'Util/Uri.php'; |
|
| 58 | +require_once CALENDAR_ROOT.'Util/Uri.php'; |
|
| 59 | 59 | |
| 60 | 60 | /** |
| 61 | 61 | * Decorator to help with building HTML links for navigating the calendar<br> |
@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | /** |
| 54 | 54 | * Load Calendar decorator base class. |
| 55 | 55 | */ |
| 56 | -require_once CALENDAR_ROOT . 'Decorator.php'; |
|
| 56 | +require_once CALENDAR_ROOT.'Decorator.php'; |
|
| 57 | 57 | |
| 58 | 58 | /** |
| 59 | 59 | * Static utlities to help with fetching textual representations of months and |
@@ -207,7 +207,7 @@ discard block |
||
| 207 | 207 | $days = self::weekdayNames($format); |
| 208 | 208 | $stamp = $Calendar->prevDay('timestamp'); |
| 209 | 209 | $cE = $Calendar->getEngine(); |
| 210 | - require_once __DIR__ . '/Date/Calc.php'; |
|
| 210 | + require_once __DIR__.'/Date/Calc.php'; |
|
| 211 | 211 | $day = Date_Calc::dayOfWeek($cE->stampToDay($stamp), $cE->stampToMonth($stamp), $cE->stampToYear($stamp)); |
| 212 | 212 | |
| 213 | 213 | return $days[$day]; |
@@ -226,7 +226,7 @@ discard block |
||
| 226 | 226 | public static function thisDayName($Calendar, $format = 'long') |
| 227 | 227 | { |
| 228 | 228 | $days = self::weekdayNames($format); |
| 229 | - require_once __DIR__ . '/Date/Calc.php'; |
|
| 229 | + require_once __DIR__.'/Date/Calc.php'; |
|
| 230 | 230 | $day = Date_Calc::dayOfWeek($Calendar->thisDay(), $Calendar->thisMonth(), $Calendar->thisYear()); |
| 231 | 231 | |
| 232 | 232 | return $days[$day]; |
@@ -246,7 +246,7 @@ discard block |
||
| 246 | 246 | $days = self::weekdayNames($format); |
| 247 | 247 | $stamp = $Calendar->nextDay('timestamp'); |
| 248 | 248 | $cE = $Calendar->getEngine(); |
| 249 | - require_once __DIR__ . '/Date/Calc.php'; |
|
| 249 | + require_once __DIR__.'/Date/Calc.php'; |
|
| 250 | 250 | $day = Date_Calc::dayOfWeek($cE->stampToDay($stamp), $cE->stampToMonth($stamp), $cE->stampToYear($stamp)); |
| 251 | 251 | |
| 252 | 252 | return $days[$day]; |
@@ -55,22 +55,22 @@ |
||
| 55 | 55 | $edit_delete = ''; |
| 56 | 56 | if (is_object($xoopsUser) && $isAdmin) { |
| 57 | 57 | $edit_delete = '<a href="' |
| 58 | - . XOOPS_URL |
|
| 59 | - . '/modules/extcal/admin/etablissement.php?op=edit_etablissement&etablissement_id=' |
|
| 60 | - . $etablissement_id |
|
| 61 | - . '"><img src="' |
|
| 62 | - . $pathIcon16 |
|
| 63 | - . '/edit.png" width="16px" height="16px" border="0" title="' |
|
| 64 | - . _MD_EXTCAL_ETABLISSEMENT_EDIT |
|
| 65 | - . '"></a><a href="' |
|
| 66 | - . XOOPS_URL |
|
| 67 | - . '/modules/extcal/admin/etablissement.php?op=delete_etablissement&etablissement_id=' |
|
| 68 | - . $etablissement_id |
|
| 69 | - . '"><img src="' |
|
| 70 | - . $pathIcon16 |
|
| 71 | - . '/delete.png" width="16px" height="16px" border="0" title="' |
|
| 72 | - . _MD_EXTCAL_ETABLISSEMENT_DELETE |
|
| 73 | - . '"></a>'; |
|
| 58 | + . XOOPS_URL |
|
| 59 | + . '/modules/extcal/admin/etablissement.php?op=edit_etablissement&etablissement_id=' |
|
| 60 | + . $etablissement_id |
|
| 61 | + . '"><img src="' |
|
| 62 | + . $pathIcon16 |
|
| 63 | + . '/edit.png" width="16px" height="16px" border="0" title="' |
|
| 64 | + . _MD_EXTCAL_ETABLISSEMENT_EDIT |
|
| 65 | + . '"></a><a href="' |
|
| 66 | + . XOOPS_URL |
|
| 67 | + . '/modules/extcal/admin/etablissement.php?op=delete_etablissement&etablissement_id=' |
|
| 68 | + . $etablissement_id |
|
| 69 | + . '"><img src="' |
|
| 70 | + . $pathIcon16 |
|
| 71 | + . '/delete.png" width="16px" height="16px" border="0" title="' |
|
| 72 | + . _MD_EXTCAL_ETABLISSEMENT_DELETE |
|
| 73 | + . '"></a>'; |
|
| 74 | 74 | } |
| 75 | 75 | $xoopsTpl->assign('edit_delete', $edit_delete); |
| 76 | 76 | |
@@ -19,10 +19,10 @@ discard block |
||
| 19 | 19 | |
| 20 | 20 | use XoopsModules\Extcal; |
| 21 | 21 | |
| 22 | -require_once __DIR__ . '/../../mainfile.php'; |
|
| 23 | -require_once __DIR__ . '/include/constantes.php'; |
|
| 22 | +require_once __DIR__.'/../../mainfile.php'; |
|
| 23 | +require_once __DIR__.'/include/constantes.php'; |
|
| 24 | 24 | $GLOBALS['xoopsOption']['template_main'] = 'extcal_etablissement.tpl'; |
| 25 | -require_once __DIR__ . '/header.php'; |
|
| 25 | +require_once __DIR__.'/header.php'; |
|
| 26 | 26 | |
| 27 | 27 | //require_once XOOPS_ROOT_PATH."/modules/extcal/class/etablissement.php"; |
| 28 | 28 | $etablissementHandler = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_ETABLISSEMENT); |
@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | $etablissement_exist = $etablissementHandler->getCount($criteria); |
| 39 | 39 | |
| 40 | 40 | if (0 == $etablissement_exist) { |
| 41 | - redirect_header(XOOPS_URL . '/modules/extcal/index.php', 3, _NOPERM); |
|
| 41 | + redirect_header(XOOPS_URL.'/modules/extcal/index.php', 3, _NOPERM); |
|
| 42 | 42 | } |
| 43 | 43 | |
| 44 | 44 | $view_etablissement = $etablissementHandler->getEtablissement($etablissement_id, true); |
@@ -80,12 +80,12 @@ discard block |
||
| 80 | 80 | |
| 81 | 81 | $date = mktime(0, 0, 0, date('m'), date('d'), date('y')); |
| 82 | 82 | |
| 83 | -$requete = $xoopsDB->query('SELECT event_id, event_title, event_desc, event_picture1, event_start FROM ' . $xoopsDB->prefix('extcal_event') . " WHERE event_etablissement='" . $etablissement_id . "' AND event_start >='" . $date . "'"); |
|
| 83 | +$requete = $xoopsDB->query('SELECT event_id, event_title, event_desc, event_picture1, event_start FROM '.$xoopsDB->prefix('extcal_event')." WHERE event_etablissement='".$etablissement_id."' AND event_start >='".$date."'"); |
|
| 84 | 84 | while ($donnees = $xoopsDB->fetchArray($requete)) { |
| 85 | 85 | if ($donnees['event_desc'] > 210) { |
| 86 | 86 | $event_desc = $donnees['event_desc']; |
| 87 | 87 | } else { |
| 88 | - $event_desc = substr($donnees['event_desc'], 0, 210) . '...'; |
|
| 88 | + $event_desc = substr($donnees['event_desc'], 0, 210).'...'; |
|
| 89 | 89 | } |
| 90 | 90 | $xoopsTpl->append('events', [ |
| 91 | 91 | 'event_picture1' => $donnees['event_picture1'], |
@@ -98,4 +98,4 @@ discard block |
||
| 98 | 98 | /** @var xos_opal_Theme $xoTheme */ |
| 99 | 99 | $xoTheme->addScript('browse.php?modules/extcal/assets/js/highslide.js'); |
| 100 | 100 | $xoTheme->addStylesheet('browse.php?modules/extcal/assets/js/highslide.css'); |
| 101 | -require_once XOOPS_ROOT_PATH . '/footer.php'; |
|
| 101 | +require_once XOOPS_ROOT_PATH.'/footer.php'; |
|
@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -require_once __DIR__ . '/../../include/constantes.php'; |
|
| 3 | +require_once __DIR__.'/../../include/constantes.php'; |
|
| 4 | 4 | define('_MI_EXTCAL_NAME', 'eXtCal'); |
| 5 | 5 | define('_MI_EXTCAL_ABOUT', 'About'); |
| 6 | 6 | define('_MI_EXTCAL_AFTER', 'After'); |
@@ -135,7 +135,7 @@ discard block |
||
| 135 | 135 | define('_MI_EXTCAL_START_PAGE', 'Module home page'); |
| 136 | 136 | define('_MI_EXTCAL_SUBMIT_EVENT', 'Submit Event'); |
| 137 | 137 | define('_MI_EXTCAL_TABS_WEIGHT', 'Order of the Tabs'); |
| 138 | -define('_MI_EXTCAL_TABS_WEIGHT_DESC', 'Set the tab order <br>Be careful to respect tab names:<br>' . "<span style='color:#0000FF;'>" . _EXTCAL_NAV_LIST . '</span>' . ' <br>Separator: new line'); |
|
| 138 | +define('_MI_EXTCAL_TABS_WEIGHT_DESC', 'Set the tab order <br>Be careful to respect tab names:<br>'."<span style='color:#0000FF;'>"._EXTCAL_NAV_LIST.'</span>'.' <br>Separator: new line'); |
|
| 139 | 139 | define('_MI_EXTCAL_VISIBLE_TAB_DESC', 'Define the visible view.'); |
| 140 | 140 | define('_MI_EXTCAL_VISIBLE_TABS', 'Visible tab'); |
| 141 | 141 | define('_MI_EXTCAL_WEEK_START_DAY', 'Week start Day'); |
@@ -162,6 +162,6 @@ discard block |
||
| 162 | 162 | |
| 163 | 163 | //Help |
| 164 | 164 | define('_MI_EXTCAL_DIRNAME', basename(dirname(dirname(__DIR__)))); |
| 165 | -define('_MI_EXTCAL_HELP_HEADER', __DIR__ . '/help/helpheader.tpl'); |
|
| 165 | +define('_MI_EXTCAL_HELP_HEADER', __DIR__.'/help/helpheader.tpl'); |
|
| 166 | 166 | define('_MI_EXTCAL_BACK_2_ADMIN', 'Back to Administration of '); |
| 167 | 167 | define('_MI_EXTCAL_OVERVIEW', 'Overview'); |
@@ -25,7 +25,7 @@ |
||
| 25 | 25 | public $entries = []; |
| 26 | 26 | |
| 27 | 27 | /** |
| 28 | - * @param $calendar |
|
| 28 | + * @param Calendar_Day $calendar |
|
| 29 | 29 | */ |
| 30 | 30 | public function __construct($calendar) |
| 31 | 31 | { |
@@ -11,9 +11,9 @@ discard block |
||
| 11 | 11 | define('CALENDAR_ROOT', '../../'); |
| 12 | 12 | } |
| 13 | 13 | |
| 14 | -require_once CALENDAR_ROOT . 'Month/Weekdays.php'; |
|
| 15 | -require_once CALENDAR_ROOT . 'Day.php'; |
|
| 16 | -require_once CALENDAR_ROOT . 'Decorator.php'; |
|
| 14 | +require_once CALENDAR_ROOT.'Month/Weekdays.php'; |
|
| 15 | +require_once CALENDAR_ROOT.'Day.php'; |
|
| 16 | +require_once CALENDAR_ROOT.'Decorator.php'; |
|
| 17 | 17 | |
| 18 | 18 | // accepts multiple entries |
| 19 | 19 | |
@@ -76,8 +76,8 @@ discard block |
||
| 76 | 76 | */ |
| 77 | 77 | public function build($events = []) |
| 78 | 78 | { |
| 79 | - require_once CALENDAR_ROOT . 'Day.php'; |
|
| 80 | - require_once CALENDAR_ROOT . 'Table/Helper.php'; |
|
| 79 | + require_once CALENDAR_ROOT.'Day.php'; |
|
| 80 | + require_once CALENDAR_ROOT.'Table/Helper.php'; |
|
| 81 | 81 | |
| 82 | 82 | $this->tableHelper = new Calendar_Table_Helper($this, $this->firstDay); |
| 83 | 83 | $this->cE = $this->getEngine(); |
@@ -230,7 +230,7 @@ discard block |
||
| 230 | 230 | <h2>Sample Calendar Payload Decorator (using <?php echo CALENDAR_ENGINE; ?> engine)</h2> |
| 231 | 231 | <table class="calendar" width="98%" cellspacing="0" cellpadding="0"> |
| 232 | 232 | <caption> |
| 233 | - <?php echo $MonthDecorator->thisMonth() . ' / ' . $MonthDecorator->thisYear(); ?> |
|
| 233 | + <?php echo $MonthDecorator->thisMonth().' / '.$MonthDecorator->thisYear(); ?> |
|
| 234 | 234 | </caption> |
| 235 | 235 | <tr> |
| 236 | 236 | <th>Monday</th> |
@@ -254,14 +254,14 @@ discard block |
||
| 254 | 254 | echo ' calCellEmpty'; |
| 255 | 255 | } |
| 256 | 256 | echo '">'; |
| 257 | - echo '<div class="dayNumber">' . $Day->thisDay() . '</div>'; |
|
| 257 | + echo '<div class="dayNumber">'.$Day->thisDay().'</div>'; |
|
| 258 | 258 | |
| 259 | 259 | if ($Day->isEmpty()) { |
| 260 | 260 | echo ' '; |
| 261 | 261 | } else { |
| 262 | 262 | echo '<div class="dayContents"><ul>'; |
| 263 | 263 | while ($entry = $Day->getEntry()) { |
| 264 | - echo '<li>' . $entry['desc'] . '</li>'; |
|
| 264 | + echo '<li>'.$entry['desc'].'</li>'; |
|
| 265 | 265 | //you can print the time range as well |
| 266 | 266 | } |
| 267 | 267 | echo '</ul></div>'; |