@@ -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 | } |
@@ -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]; |
@@ -144,7 +144,7 @@ discard block |
||
144 | 144 | */ |
145 | 145 | public function prev($Calendar, $unit) |
146 | 146 | { |
147 | - $method = 'prev' . $unit; |
|
147 | + $method = 'prev'.$unit; |
|
148 | 148 | $stamp = $Calendar->{$method}('timestamp'); |
149 | 149 | |
150 | 150 | return $this->buildUriString($Calendar, $method, $stamp); |
@@ -160,7 +160,7 @@ discard block |
||
160 | 160 | */ |
161 | 161 | public function this($Calendar, $unit) |
162 | 162 | { |
163 | - $method = 'this' . $unit; |
|
163 | + $method = 'this'.$unit; |
|
164 | 164 | $stamp = $Calendar->{$method}('timestamp'); |
165 | 165 | |
166 | 166 | return $this->buildUriString($Calendar, $method, $stamp); |
@@ -176,7 +176,7 @@ discard block |
||
176 | 176 | */ |
177 | 177 | public function next($Calendar, $unit) |
178 | 178 | { |
179 | - $method = 'next' . $unit; |
|
179 | + $method = 'next'.$unit; |
|
180 | 180 | $stamp = $Calendar->{$method}('timestamp'); |
181 | 181 | |
182 | 182 | return $this->buildUriString($Calendar, $method, $stamp); |
@@ -197,10 +197,10 @@ discard block |
||
197 | 197 | $cE = $Calendar->getEngine(); |
198 | 198 | $separator = ''; |
199 | 199 | foreach ($this->uris as $unit => $uri) { |
200 | - $call = 'stampTo' . $unit; |
|
200 | + $call = 'stampTo'.$unit; |
|
201 | 201 | $uriString .= $separator; |
202 | 202 | if (!$this->scalar) { |
203 | - $uriString .= $uri . '='; |
|
203 | + $uriString .= $uri.'='; |
|
204 | 204 | } |
205 | 205 | $uriString .= $cE->{$call}($stamp); |
206 | 206 | $separator = $this->separator; |
@@ -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 (false !== ($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'); |