@@ -2,16 +2,16 @@ discard block |
||
2 | 2 | |
3 | 3 | use XoopsModules\Extcal; |
4 | 4 | |
5 | -include __DIR__ . '/../../mainfile.php'; |
|
6 | -require_once __DIR__ . '/include/constantes.php'; |
|
7 | -require_once __DIR__ . '/header.php'; |
|
5 | +include __DIR__.'/../../mainfile.php'; |
|
6 | +require_once __DIR__.'/include/constantes.php'; |
|
7 | +require_once __DIR__.'/header.php'; |
|
8 | 8 | |
9 | -require_once XOOPS_ROOT_PATH . '/class/template.php'; |
|
9 | +require_once XOOPS_ROOT_PATH.'/class/template.php'; |
|
10 | 10 | $eventHandler = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_EVENT); |
11 | 11 | if (!isset($_GET['cat'])) { |
12 | 12 | $cat = 0; |
13 | 13 | } else { |
14 | - $cat = (int)$_GET['cat']; |
|
14 | + $cat = (int) $_GET['cat']; |
|
15 | 15 | } |
16 | 16 | if (function_exists('mb_http_output')) { |
17 | 17 | mb_http_output('pass'); |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | $events = $eventHandler->getUpcommingEvent($xoopsModuleConfig['rss_nb_event'], $cat); |
25 | 25 | if (is_array($events)) { |
26 | 26 | $tpl->assign('channel_title', xoops_utf8_encode(htmlspecialchars($xoopsConfig['sitename'], ENT_QUOTES))); |
27 | - $tpl->assign('channel_link', XOOPS_URL . '/'); |
|
27 | + $tpl->assign('channel_link', XOOPS_URL.'/'); |
|
28 | 28 | $tpl->assign('channel_desc', xoops_utf8_encode(htmlspecialchars($xoopsConfig['slogan'], ENT_QUOTES))); |
29 | 29 | $tpl->assign('channel_lastbuild', formatTimestamp(time(), 'rss')); |
30 | 30 | $tpl->assign('channel_webmaster', $xoopsConfig['adminmail']); |
@@ -32,14 +32,14 @@ discard block |
||
32 | 32 | $tpl->assign('channel_category', 'Event'); |
33 | 33 | $tpl->assign('channel_generator', 'XOOPS'); |
34 | 34 | $tpl->assign('channel_language', _LANGCODE); |
35 | - $tpl->assign('image_url', XOOPS_URL . '/modules/extcal/assets/images/extcal_logo.png'); |
|
35 | + $tpl->assign('image_url', XOOPS_URL.'/modules/extcal/assets/images/extcal_logo.png'); |
|
36 | 36 | $tpl->assign('image_width', 92); |
37 | 37 | $tpl->assign('image_height', 52); |
38 | 38 | foreach ($events as $event) { |
39 | 39 | $tpl->append('items', [ |
40 | 40 | 'title' => xoops_utf8_encode(htmlspecialchars($event->getVar('event_title'), ENT_QUOTES)), |
41 | - 'link' => XOOPS_URL . '/modules/extcal/event.php?event=' . $event->getVar('event_id'), |
|
42 | - 'guid' => XOOPS_URL . '/modules/extcal/event.php?event=' . $event->getVar('event_id'), |
|
41 | + 'link' => XOOPS_URL.'/modules/extcal/event.php?event='.$event->getVar('event_id'), |
|
42 | + 'guid' => XOOPS_URL.'/modules/extcal/event.php?event='.$event->getVar('event_id'), |
|
43 | 43 | 'pubdate' => formatTimestamp($event->getVar('event_start'), 'rss'), |
44 | 44 | 'description' => xoops_utf8_encode(htmlspecialchars($event->getVar('event_desc'), ENT_QUOTES)), |
45 | 45 | ]); |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | //Kraven 30 |
21 | 21 | // defined('XOOPS_ROOT_PATH') || exit('Restricted access.'); |
22 | 22 | |
23 | -require_once XOOPS_ROOT_PATH . '/kernel/object.php'; |
|
23 | +require_once XOOPS_ROOT_PATH.'/kernel/object.php'; |
|
24 | 24 | |
25 | 25 | //class Event extends \XoopsObject |
26 | 26 | //class extcal_etablissement extends \XoopsObject |
@@ -70,34 +70,34 @@ discard block |
||
70 | 70 | |
71 | 71 | $title = $this->isNew() ? sprintf(_MD_EXTCAL_ETABLISSEMENT_ADD) : sprintf(_MD_EXTCAL_ETABLISSEMENT_EDIT); |
72 | 72 | |
73 | - require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; |
|
73 | + require_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; |
|
74 | 74 | |
75 | 75 | $form = new \XoopsThemeForm($title, 'form', $action, 'post', true); |
76 | 76 | $form->setExtra('enctype="multipart/form-data"'); |
77 | 77 | |
78 | - $form->addElement( new \XoopsFormText(_MD_EXTCAL_ETABLISSEMENT_NOM, 'nom', 50, 255, $this->getVar('nom')), true); |
|
79 | - $form->addElement( new \XoopsFormDhtmlTextArea(_MD_EXTCAL_ETABLISSEMENT_DESCRIPTION, 'description', $this->getVar('description'), 10), false); |
|
80 | - $form->addElement( new \XoopsFormText(_MD_EXTCAL_ETABLISSEMENT_CATEGORIE, 'categorie', 40, 255, $this->getVar('categorie')), false); |
|
81 | - $form->addElement( new \XoopsFormText(_MD_EXTCAL_ETABLISSEMENT_ADRESSE, 'adresse', 50, 255, $this->getVar('adresse')), false); |
|
82 | - $form->addElement( new \XoopsFormText(_MD_EXTCAL_ETABLISSEMENT_ADRESSE2, 'adresse2', 50, 255, $this->getVar('adresse2')), false); |
|
83 | - $form->addElement( new \XoopsFormText(_MD_EXTCAL_ETABLISSEMENT_CP, 'cp', 10, 10, $this->getVar('cp')), false); |
|
84 | - $form->addElement( new \XoopsFormText(_MD_EXTCAL_ETABLISSEMENT_VILLE, 'ville', 20, 255, $this->getVar('ville')), false); |
|
85 | - $form->addElement( new \XoopsFormText(_MD_EXTCAL_ETABLISSEMENT_TEL_FIXE, 'tel_fixe', 20, 20, $this->getVar('tel_fixe')), false); |
|
86 | - $form->addElement( new \XoopsFormText(_MD_EXTCAL_ETABLISSEMENT_TEL_PORTABLE, 'tel_portable', 20, 20, $this->getVar('tel_portable')), false); |
|
87 | - $form->addElement( new \XoopsFormText(_MD_EXTCAL_ETABLISSEMENT_MAIL, 'mail', 50, 255, $this->getVar('mail')), false); |
|
88 | - $form->addElement( new \XoopsFormText(_MD_EXTCAL_ETABLISSEMENT_SITE, 'site', 50, 255, $this->getVar('site')), false); |
|
89 | - $form->addElement( new \XoopsFormTextArea(_MD_EXTCAL_ETABLISSEMENT_HORAIRES, 'horaires', $this->getVar('horaires'), 3, 40)); |
|
90 | - $form->addElement( new \XoopsFormTextArea(_MD_EXTCAL_ETABLISSEMENT_DIVERS, 'divers', $this->getVar('divers'), 5, 40)); |
|
78 | + $form->addElement(new \XoopsFormText(_MD_EXTCAL_ETABLISSEMENT_NOM, 'nom', 50, 255, $this->getVar('nom')), true); |
|
79 | + $form->addElement(new \XoopsFormDhtmlTextArea(_MD_EXTCAL_ETABLISSEMENT_DESCRIPTION, 'description', $this->getVar('description'), 10), false); |
|
80 | + $form->addElement(new \XoopsFormText(_MD_EXTCAL_ETABLISSEMENT_CATEGORIE, 'categorie', 40, 255, $this->getVar('categorie')), false); |
|
81 | + $form->addElement(new \XoopsFormText(_MD_EXTCAL_ETABLISSEMENT_ADRESSE, 'adresse', 50, 255, $this->getVar('adresse')), false); |
|
82 | + $form->addElement(new \XoopsFormText(_MD_EXTCAL_ETABLISSEMENT_ADRESSE2, 'adresse2', 50, 255, $this->getVar('adresse2')), false); |
|
83 | + $form->addElement(new \XoopsFormText(_MD_EXTCAL_ETABLISSEMENT_CP, 'cp', 10, 10, $this->getVar('cp')), false); |
|
84 | + $form->addElement(new \XoopsFormText(_MD_EXTCAL_ETABLISSEMENT_VILLE, 'ville', 20, 255, $this->getVar('ville')), false); |
|
85 | + $form->addElement(new \XoopsFormText(_MD_EXTCAL_ETABLISSEMENT_TEL_FIXE, 'tel_fixe', 20, 20, $this->getVar('tel_fixe')), false); |
|
86 | + $form->addElement(new \XoopsFormText(_MD_EXTCAL_ETABLISSEMENT_TEL_PORTABLE, 'tel_portable', 20, 20, $this->getVar('tel_portable')), false); |
|
87 | + $form->addElement(new \XoopsFormText(_MD_EXTCAL_ETABLISSEMENT_MAIL, 'mail', 50, 255, $this->getVar('mail')), false); |
|
88 | + $form->addElement(new \XoopsFormText(_MD_EXTCAL_ETABLISSEMENT_SITE, 'site', 50, 255, $this->getVar('site')), false); |
|
89 | + $form->addElement(new \XoopsFormTextArea(_MD_EXTCAL_ETABLISSEMENT_HORAIRES, 'horaires', $this->getVar('horaires'), 3, 40)); |
|
90 | + $form->addElement(new \XoopsFormTextArea(_MD_EXTCAL_ETABLISSEMENT_DIVERS, 'divers', $this->getVar('divers'), 5, 40)); |
|
91 | 91 | //$form->addElement( new \XoopsFormTextArea(_MD_EXTCAL_ETABLISSEMENT_TARIFS, 'tarifs', $this->getVar("tarifs"), 5, 40)); |
92 | - $form->addElement( new \XoopsFormText(_MD_EXTCAL_ETABLISSEMENT_TARIFS . ' ( ' . _MD_EXTCAL_DEVISE2 . ' )', 'tarifs', 20, 20, $this->getVar('tarifs')), false); |
|
92 | + $form->addElement(new \XoopsFormText(_MD_EXTCAL_ETABLISSEMENT_TARIFS.' ( '._MD_EXTCAL_DEVISE2.' )', 'tarifs', 20, 20, $this->getVar('tarifs')), false); |
|
93 | 93 | |
94 | 94 | //$form->addElement( new \XoopsFormTextArea(_MD_EXTCAL_ETABLISSEMENT_MAP, 'map', $this->getVar("map"), 5, 40)); |
95 | - $form->addElement( new \XoopsFormText(_MD_EXTCAL_ETABLISSEMENT_MAP, 'map', 150, 255, $this->getVar('map')), false); |
|
95 | + $form->addElement(new \XoopsFormText(_MD_EXTCAL_ETABLISSEMENT_MAP, 'map', 150, 255, $this->getVar('map')), false); |
|
96 | 96 | |
97 | 97 | //Logo |
98 | 98 | $file_tray = new \XoopsFormElementTray(sprintf(_MD_EXTCAL_FORM_IMG, 2), ''); |
99 | 99 | if ('' != $this->getVar('logo')) { |
100 | - $file_tray->addElement( new \XoopsFormLabel('', "<img src='" . XOOPS_URL . '/uploads/extcal/etablissement/' . $this->getVar('logo') . "' name='image' id='image' alt=''><br><br>")); |
|
100 | + $file_tray->addElement(new \XoopsFormLabel('', "<img src='".XOOPS_URL.'/uploads/extcal/etablissement/'.$this->getVar('logo')."' name='image' id='image' alt=''><br><br>")); |
|
101 | 101 | $check_del_img = new \XoopsFormCheckBox('', 'delimg'); |
102 | 102 | $check_del_img->addOption(1, _MD_EXTCAL_DEL_IMG); |
103 | 103 | $file_tray->addElement($check_del_img); |
@@ -108,15 +108,15 @@ discard block |
||
108 | 108 | } |
109 | 109 | $file_img->setExtra("size ='40'"); |
110 | 110 | $file_tray->addElement($file_img); |
111 | - $msg = sprintf(_MD_EXTCAL_IMG_CONFIG, (int)(3145728 / 1000), 500, 500); |
|
112 | - $file_label = new \XoopsFormLabel('', '<br>' . $msg); |
|
111 | + $msg = sprintf(_MD_EXTCAL_IMG_CONFIG, (int) (3145728 / 1000), 500, 500); |
|
112 | + $file_label = new \XoopsFormLabel('', '<br>'.$msg); |
|
113 | 113 | $file_tray->addElement($file_label); |
114 | 114 | $form->addElement($file_tray); |
115 | - $form->addElement( new \XoopsFormHidden('file', $this->getVar('logo'))); |
|
115 | + $form->addElement(new \XoopsFormHidden('file', $this->getVar('logo'))); |
|
116 | 116 | unset($file_img, $file_tray); |
117 | 117 | |
118 | - $form->addElement( new \XoopsFormHidden('op', 'save_etablissement')); |
|
119 | - $form->addElement( new \XoopsFormButton('', 'submit', _SUBMIT, 'submit')); |
|
118 | + $form->addElement(new \XoopsFormHidden('op', 'save_etablissement')); |
|
119 | + $form->addElement(new \XoopsFormButton('', 'submit', _SUBMIT, 'submit')); |
|
120 | 120 | $form->display(); |
121 | 121 | |
122 | 122 | return $form; |
@@ -61,9 +61,9 @@ discard block |
||
61 | 61 | $groupPermissionHandler = xoops_getHandler('groupperm'); |
62 | 62 | $moduleId = $GLOBALS['xoopsModule']->getVar('mid'); |
63 | 63 | |
64 | - $criteria = new \CriteriaCompo(); |
|
65 | - $criteria->add( new \Criteria('gperm_name', 'extcal_perm_mask')); |
|
66 | - $criteria->add( new \Criteria('gperm_modid', $moduleId)); |
|
64 | + $criteria = new \CriteriaCompo(); |
|
65 | + $criteria->add(new \Criteria('gperm_name', 'extcal_perm_mask')); |
|
66 | + $criteria->add(new \Criteria('gperm_modid', $moduleId)); |
|
67 | 67 | $permMask = $groupPermissionHandler->getObjects($criteria); |
68 | 68 | |
69 | 69 | // Retriving group list |
@@ -124,8 +124,8 @@ discard block |
||
124 | 124 | */ |
125 | 125 | public function getCat($catId, $skipPerm = false) |
126 | 126 | { |
127 | - $criteriaCompo = new \CriteriaCompo(); |
|
128 | - $criteriaCompo->add( new \Criteria('cat_id', $catId)); |
|
127 | + $criteriaCompo = new \CriteriaCompo(); |
|
128 | + $criteriaCompo->add(new \Criteria('cat_id', $catId)); |
|
129 | 129 | if (!$skipPerm) { |
130 | 130 | $this->_addCatPermCriteria($criteriaCompo, $GLOBALS['xoopsUser']); |
131 | 131 | } |
@@ -145,7 +145,7 @@ discard block |
||
145 | 145 | */ |
146 | 146 | public function getAllCat($user, $perm = 'extcal_cat_view') |
147 | 147 | { |
148 | - $criteriaCompo = new \CriteriaCompo(); |
|
148 | + $criteriaCompo = new \CriteriaCompo(); |
|
149 | 149 | if ('all' !== $perm) { |
150 | 150 | $this->_addCatPermCriteria($criteriaCompo, $user, $perm); |
151 | 151 | } |
@@ -161,7 +161,7 @@ discard block |
||
161 | 161 | */ |
162 | 162 | public function getAllCatById($user, $perm = 'all') |
163 | 163 | { |
164 | - $criteriaCompo = new \CriteriaCompo(); |
|
164 | + $criteriaCompo = new \CriteriaCompo(); |
|
165 | 165 | if ('all' !== $perm) { |
166 | 166 | $this->_addCatPermCriteria($criteriaCompo, $user, $perm); |
167 | 167 | } |
@@ -186,15 +186,15 @@ discard block |
||
186 | 186 | $authorizedAccessCats = $this->_extcalPerm->getAuthorizedCat($user, 'extcal_cat_view'); |
187 | 187 | $count = count($authorizedAccessCats); |
188 | 188 | if ($count > 0) { |
189 | - $in = '(' . $authorizedAccessCats[0]; |
|
189 | + $in = '('.$authorizedAccessCats[0]; |
|
190 | 190 | array_shift($authorizedAccessCats); |
191 | 191 | foreach ($authorizedAccessCats as $authorizedAccessCat) { |
192 | - $in .= ',' . $authorizedAccessCat; |
|
192 | + $in .= ','.$authorizedAccessCat; |
|
193 | 193 | } |
194 | 194 | $in .= ')'; |
195 | - $criteria->add( new \Criteria('cat_id', $in, 'IN')); |
|
195 | + $criteria->add(new \Criteria('cat_id', $in, 'IN')); |
|
196 | 196 | } else { |
197 | - $criteria->add( new \Criteria('cat_id', '(0)', 'IN')); |
|
197 | + $criteria->add(new \Criteria('cat_id', '(0)', 'IN')); |
|
198 | 198 | } |
199 | 199 | } |
200 | 200 |
@@ -4,7 +4,7 @@ discard block |
||
4 | 4 | |
5 | 5 | // defined('XOOPS_ROOT_PATH') || exit('Restricted access.'); |
6 | 6 | |
7 | -require_once XOOPS_ROOT_PATH . '/language/' . $GLOBALS['xoopsConfig']['language'] . '/calendar.php'; |
|
7 | +require_once XOOPS_ROOT_PATH.'/language/'.$GLOBALS['xoopsConfig']['language'].'/calendar.php'; |
|
8 | 8 | |
9 | 9 | $moduleDirName = basename(dirname(__DIR__)); |
10 | 10 | Extcal\Helper::getInstance()->loadLanguage('main'); |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | */ |
93 | 93 | public function getFormatedDate($format, $timestamp) |
94 | 94 | { |
95 | - $patterns = [ |
|
95 | + $patterns = [ |
|
96 | 96 | '/January/', |
97 | 97 | '/February/', |
98 | 98 | '/March/', |
@@ -145,18 +145,18 @@ discard block |
||
145 | 145 | _CAL_OCTOBER, |
146 | 146 | _CAL_NOVEMBER, |
147 | 147 | _CAL_DECEMBER, |
148 | - substr(_CAL_JANUARY, 0, 3) . ' ', |
|
149 | - substr(_CAL_FEBRUARY, 0, 3) . ' ', |
|
150 | - substr(_CAL_MARCH, 0, 3) . ' ', |
|
151 | - substr(_CAL_APRIL, 0, 3) . ' ', |
|
152 | - substr(_CAL_MAY, 0, 3) . ' ', |
|
153 | - substr(_CAL_JUNE, 0, 3) . ' ', |
|
154 | - substr(_CAL_JULY, 0, 3) . ' ', |
|
155 | - substr(_CAL_AUGUST, 0, 3) . ' ', |
|
156 | - substr(_CAL_SEPTEMBER, 0, 3) . ' ', |
|
157 | - substr(_CAL_OCTOBER, 0, 3) . ' ', |
|
158 | - substr(_CAL_NOVEMBER, 0, 3) . ' ', |
|
159 | - substr(_CAL_DECEMBER, 0, 3) . ' ', |
|
148 | + substr(_CAL_JANUARY, 0, 3).' ', |
|
149 | + substr(_CAL_FEBRUARY, 0, 3).' ', |
|
150 | + substr(_CAL_MARCH, 0, 3).' ', |
|
151 | + substr(_CAL_APRIL, 0, 3).' ', |
|
152 | + substr(_CAL_MAY, 0, 3).' ', |
|
153 | + substr(_CAL_JUNE, 0, 3).' ', |
|
154 | + substr(_CAL_JULY, 0, 3).' ', |
|
155 | + substr(_CAL_AUGUST, 0, 3).' ', |
|
156 | + substr(_CAL_SEPTEMBER, 0, 3).' ', |
|
157 | + substr(_CAL_OCTOBER, 0, 3).' ', |
|
158 | + substr(_CAL_NOVEMBER, 0, 3).' ', |
|
159 | + substr(_CAL_DECEMBER, 0, 3).' ', |
|
160 | 160 | _CAL_SUNDAY, |
161 | 161 | _CAL_MONDAY, |
162 | 162 | _CAL_TUESDAY, |
@@ -164,13 +164,13 @@ discard block |
||
164 | 164 | _CAL_THURSDAY, |
165 | 165 | _CAL_FRIDAY, |
166 | 166 | _CAL_SATURDAY, |
167 | - substr(_CAL_SUNDAY, 0, 3) . ' ', |
|
168 | - substr(_CAL_MONDAY, 0, 3) . ' ', |
|
169 | - substr(_CAL_TUESDAY, 0, 3) . ' ', |
|
170 | - substr(_CAL_WEDNESDAY, 0, 3) . ' ', |
|
171 | - substr(_CAL_THURSDAY, 0, 3) . ' ', |
|
172 | - substr(_CAL_FRIDAY, 0, 3) . ' ', |
|
173 | - substr(_CAL_SATURDAY, 0, 3) . ' ', |
|
167 | + substr(_CAL_SUNDAY, 0, 3).' ', |
|
168 | + substr(_CAL_MONDAY, 0, 3).' ', |
|
169 | + substr(_CAL_TUESDAY, 0, 3).' ', |
|
170 | + substr(_CAL_WEDNESDAY, 0, 3).' ', |
|
171 | + substr(_CAL_THURSDAY, 0, 3).' ', |
|
172 | + substr(_CAL_FRIDAY, 0, 3).' ', |
|
173 | + substr(_CAL_SATURDAY, 0, 3).' ', |
|
174 | 174 | ]; |
175 | 175 | |
176 | 176 | return preg_replace($patterns, $replacements, date($format, $timestamp)); |
@@ -212,7 +212,7 @@ discard block |
||
212 | 212 | array_shift($eventOptions); |
213 | 213 | $day = ''; |
214 | 214 | foreach ($eventOptions as $option) { |
215 | - $day .= ' ' . $daysName[$option] . ', '; |
|
215 | + $day .= ' '.$daysName[$option].', '; |
|
216 | 216 | } |
217 | 217 | $ret = sprintf(_MD_EXTCAL_RR_WEEKLY, $day, $interval); |
218 | 218 | |
@@ -331,7 +331,7 @@ discard block |
||
331 | 331 | array_shift($eventOptions); |
332 | 332 | $month = ''; |
333 | 333 | foreach ($eventOptions as $option) { |
334 | - $month .= ' ' . $monthName[$option] . ', '; |
|
334 | + $month .= ' '.$monthName[$option].', '; |
|
335 | 335 | } |
336 | 336 | $dayString = $day; |
337 | 337 | if (array_key_exists($day, $monthDays)) { |
@@ -19,7 +19,7 @@ |
||
19 | 19 | |
20 | 20 | // defined('XOOPS_ROOT_PATH') || exit('Restricted access.'); |
21 | 21 | |
22 | - // require_once __DIR__ . '/ExtcalPersistableObjectHandler.php'; |
|
22 | + // require_once __DIR__ . '/ExtcalPersistableObjectHandler.php'; |
|
23 | 23 | require_once __DIR__ . '/perm.php'; |
24 | 24 | require_once __DIR__ . '/time.php'; |
25 | 25 | require_once __DIR__ . '/config.php'; |
@@ -20,12 +20,12 @@ discard block |
||
20 | 20 | // defined('XOOPS_ROOT_PATH') || exit('Restricted access.'); |
21 | 21 | |
22 | 22 | // require_once __DIR__ . '/ExtcalPersistableObjectHandler.php'; |
23 | -require_once __DIR__ . '/perm.php'; |
|
24 | -require_once __DIR__ . '/time.php'; |
|
25 | -require_once __DIR__ . '/config.php'; |
|
26 | -require_once __DIR__ . '/extDateTime.php'; |
|
27 | -require_once __DIR__ . '/utility.php'; |
|
28 | -require_once __DIR__ . '/../include/constantes.php'; |
|
23 | +require_once __DIR__.'/perm.php'; |
|
24 | +require_once __DIR__.'/time.php'; |
|
25 | +require_once __DIR__.'/config.php'; |
|
26 | +require_once __DIR__.'/extDateTime.php'; |
|
27 | +require_once __DIR__.'/utility.php'; |
|
28 | +require_once __DIR__.'/../include/constantes.php'; |
|
29 | 29 | |
30 | 30 | /** |
31 | 31 | * Class Event. |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | $this->initVar('event_etablissement', XOBJ_DTYPE_INT, 5, false); |
67 | 67 | $this->initVar('event_icone', XOBJ_DTYPE_TXTBOX, '', false); |
68 | 68 | |
69 | - $this->externalKey['cat_id'] = [ |
|
69 | + $this->externalKey['cat_id'] = [ |
|
70 | 70 | 'className' => 'Category', |
71 | 71 | 'getMethodeName' => 'getCat', |
72 | 72 | 'keyName' => 'cat', |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | throw new \RuntimeException(sprintf('Unable to create the %s directory', $folder)); |
33 | 33 | } |
34 | 34 | |
35 | - file_put_contents($folder . '/index.html', '<script>history.go(-1);</script>'); |
|
35 | + file_put_contents($folder.'/index.html', '<script>history.go(-1);</script>'); |
|
36 | 36 | } |
37 | 37 | } |
38 | 38 | catch (Exception $e) { |
@@ -61,10 +61,10 @@ discard block |
||
61 | 61 | if (!mkdir($dst) && !is_dir($dst)) { |
62 | 62 | while (false !== ($file = readdir($dir))) { |
63 | 63 | if (('.' !== $file) && ('..' !== $file)) { |
64 | - if (is_dir($src . '/' . $file)) { |
|
65 | - self::recurseCopy($src . '/' . $file, $dst . '/' . $file); |
|
64 | + if (is_dir($src.'/'.$file)) { |
|
65 | + self::recurseCopy($src.'/'.$file, $dst.'/'.$file); |
|
66 | 66 | } else { |
67 | - copy($src . '/' . $file, $dst . '/' . $file); |
|
67 | + copy($src.'/'.$file, $dst.'/'.$file); |
|
68 | 68 | } |
69 | 69 | } |
70 | 70 | } |
@@ -159,7 +159,7 @@ discard block |
||
159 | 159 | self::rrmdir($fObj->getPathname()); |
160 | 160 | } |
161 | 161 | } |
162 | - $iterator = null; // clear iterator Obj to close file/directory |
|
162 | + $iterator = null; // clear iterator Obj to close file/directory |
|
163 | 163 | return rmdir($src); // remove the directory & return results |
164 | 164 | } |
165 | 165 | |
@@ -192,14 +192,14 @@ discard block |
||
192 | 192 | $iterator = new DirectoryIterator($src); |
193 | 193 | foreach ($iterator as $fObj) { |
194 | 194 | if ($fObj->isFile()) { |
195 | - rename($fObj->getPathname(), "{$dest}/" . $fObj->getFilename()); |
|
195 | + rename($fObj->getPathname(), "{$dest}/".$fObj->getFilename()); |
|
196 | 196 | } elseif (!$fObj->isDot() && $fObj->isDir()) { |
197 | 197 | // Try recursively on directory |
198 | - self::rmove($fObj->getPathname(), "{$dest}/" . $fObj->getFilename()); |
|
198 | + self::rmove($fObj->getPathname(), "{$dest}/".$fObj->getFilename()); |
|
199 | 199 | // rmdir($fObj->getPath()); // now delete the directory |
200 | 200 | } |
201 | 201 | } |
202 | - $iterator = null; // clear iterator Obj to close file/directory |
|
202 | + $iterator = null; // clear iterator Obj to close file/directory |
|
203 | 203 | return rmdir($src); // remove the directory & return results |
204 | 204 | } |
205 | 205 | |
@@ -235,9 +235,9 @@ discard block |
||
235 | 235 | $iterator = new DirectoryIterator($src); |
236 | 236 | foreach ($iterator as $fObj) { |
237 | 237 | if ($fObj->isFile()) { |
238 | - copy($fObj->getPathname(), "{$dest}/" . $fObj->getFilename()); |
|
238 | + copy($fObj->getPathname(), "{$dest}/".$fObj->getFilename()); |
|
239 | 239 | } elseif (!$fObj->isDot() && $fObj->isDir()) { |
240 | - self::rcopy($fObj->getPathname(), "{$dest}/" . $fObj->getFilename()); |
|
240 | + self::rcopy($fObj->getPathname(), "{$dest}/".$fObj->getFilename()); |
|
241 | 241 | } |
242 | 242 | } |
243 | 243 | return true; |
@@ -34,8 +34,7 @@ |
||
34 | 34 | |
35 | 35 | file_put_contents($folder . '/index.html', '<script>history.go(-1);</script>'); |
36 | 36 | } |
37 | - } |
|
38 | - catch (Exception $e) { |
|
37 | + } catch (Exception $e) { |
|
39 | 38 | echo 'Caught exception: ', $e->getMessage(), "\n", '<br>'; |
40 | 39 | } |
41 | 40 | } |
@@ -37,13 +37,13 @@ discard block |
||
37 | 37 | //check for minimum XOOPS version |
38 | 38 | $currentVer = substr(XOOPS_VERSION, 6); // get the numeric part of string |
39 | 39 | if (null === $requiredVer) { |
40 | - $requiredVer = '' . $module->getInfo('min_xoops'); //making sure it's a string |
|
40 | + $requiredVer = ''.$module->getInfo('min_xoops'); //making sure it's a string |
|
41 | 41 | } |
42 | - $success = true; |
|
42 | + $success = true; |
|
43 | 43 | |
44 | - if (version_compare($currentVer, $requiredVer, '<')){ |
|
45 | - $success = false; |
|
46 | - $module->setErrors(sprintf(constant('CO_' . $moduleDirNameUpper . '_ERROR_BAD_XOOPS'), $requiredVer, $currentVer)); |
|
44 | + if (version_compare($currentVer, $requiredVer, '<')) { |
|
45 | + $success = false; |
|
46 | + $module->setErrors(sprintf(constant('CO_'.$moduleDirNameUpper.'_ERROR_BAD_XOOPS'), $requiredVer, $currentVer)); |
|
47 | 47 | } |
48 | 48 | |
49 | 49 | return $success; |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | $reqVer = $module->getInfo('min_php'); |
67 | 67 | if (false !== $reqVer && '' !== $reqVer) { |
68 | 68 | if (version_compare($verNum, $reqVer, '<')) { |
69 | - $module->setErrors(sprintf(constant('CO_' . $moduleDirNameUpper . '_ERROR_BAD_PHP'), $reqVer, $verNum)); |
|
69 | + $module->setErrors(sprintf(constant('CO_'.$moduleDirNameUpper.'_ERROR_BAD_PHP'), $reqVer, $verNum)); |
|
70 | 70 | $success = false; |
71 | 71 | } |
72 | 72 | } |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | * |
20 | 20 | */ |
21 | 21 | |
22 | -require_once __DIR__ . '/../../include/common.php'; |
|
22 | +require_once __DIR__.'/../../include/common.php'; |
|
23 | 23 | |
24 | 24 | /** |
25 | 25 | * Class Configurator |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | $moduleDirName = basename(dirname(__DIR__)); |
45 | 45 | $capsDirName = strtoupper($moduleDirName); |
46 | 46 | |
47 | - $config = include __DIR__ . '/../../include/config.php'; |
|
47 | + $config = include __DIR__.'/../../include/config.php'; |
|
48 | 48 | |
49 | 49 | $this->name = $config->name; |
50 | 50 | $this->paths = $config->paths; |
@@ -34,19 +34,19 @@ discard block |
||
34 | 34 | // $sql .= " WHERE metakey='version' LIMIT 1"; |
35 | 35 | // $query = $GLOBALS['xoopsDB']->query($sql); |
36 | 36 | // list($meta) = $GLOBALS['xoopsDB']->fetchRow($query); |
37 | - $html .= "<fieldset><legend style='font-weight: bold; color: #900;'>" . constant('CO_' . $moduleDirNameUpper . '_IMAGEINFO') . "</legend>\n"; |
|
37 | + $html .= "<fieldset><legend style='font-weight: bold; color: #900;'>".constant('CO_'.$moduleDirNameUpper.'_IMAGEINFO')."</legend>\n"; |
|
38 | 38 | $html .= "<div style='padding: 8px;'>\n"; |
39 | 39 | // $html .= '<div>' . constant('CO_' . $moduleDirNameUpper . '_METAVERSION') . $meta . "</div>\n"; |
40 | 40 | // $html .= "<br>\n"; |
41 | 41 | // $html .= "<br>\n"; |
42 | - $html .= '<div>' . constant('CO_' . $moduleDirNameUpper . '_SPHPINI') . "</div>\n"; |
|
42 | + $html .= '<div>'.constant('CO_'.$moduleDirNameUpper.'_SPHPINI')."</div>\n"; |
|
43 | 43 | $html .= "<ul>\n"; |
44 | 44 | // |
45 | - $gdlib = function_exists('gd_info') ? '<span style="color: green;">' . constant('CO_' . $moduleDirNameUpper . '_GDON') . '</span>' : '<span style="color: red;">' . constant('CO_' . $moduleDirNameUpper . '_GDOFF') . '</span>'; |
|
46 | - $html .= '<li>' . constant('CO_' . $moduleDirNameUpper . '_GDLIBSTATUS') . $gdlib; |
|
45 | + $gdlib = function_exists('gd_info') ? '<span style="color: green;">'.constant('CO_'.$moduleDirNameUpper.'_GDON').'</span>' : '<span style="color: red;">'.constant('CO_'.$moduleDirNameUpper.'_GDOFF').'</span>'; |
|
46 | + $html .= '<li>'.constant('CO_'.$moduleDirNameUpper.'_GDLIBSTATUS').$gdlib; |
|
47 | 47 | if (function_exists('gd_info')) { |
48 | 48 | if ($gdlib = true === gd_info()) { |
49 | - $html .= '<li>' . constant('CO_' . $moduleDirNameUpper . '_GDLIBVERSION') . '<b>' . $gdlib['GD Version'] . '</b>'; |
|
49 | + $html .= '<li>'.constant('CO_'.$moduleDirNameUpper.'_GDLIBVERSION').'<b>'.$gdlib['GD Version'].'</b>'; |
|
50 | 50 | } |
51 | 51 | } |
52 | 52 | // |
@@ -56,18 +56,18 @@ discard block |
||
56 | 56 | // $registerglobals = (!ini_get('register_globals')) ? "<span style=\"color: green;\">" . constant('CO_' . $moduleDirNameUpper . '_OFF') . '</span>' : "<span style=\"color: red;\">" . constant('CO_' . $moduleDirNameUpper . '_ON') . '</span>'; |
57 | 57 | // $html .= '<li>' . constant('CO_' . $moduleDirNameUpper . '_REGISTERGLOBALS . $registerglobals; |
58 | 58 | // |
59 | - $downloads = ini_get('file_uploads') ? '<span style="color: green;">' . constant('CO_' . $moduleDirNameUpper . '_ON') . '</span>' : '<span style="color: red;">' . constant('CO_' . $moduleDirNameUpper . '_OFF') . '</span>'; |
|
60 | - $html .= '<li>' . constant('CO_' . $moduleDirNameUpper . '_SERVERUPLOADSTATUS') . $downloads; |
|
59 | + $downloads = ini_get('file_uploads') ? '<span style="color: green;">'.constant('CO_'.$moduleDirNameUpper.'_ON').'</span>' : '<span style="color: red;">'.constant('CO_'.$moduleDirNameUpper.'_OFF').'</span>'; |
|
60 | + $html .= '<li>'.constant('CO_'.$moduleDirNameUpper.'_SERVERUPLOADSTATUS').$downloads; |
|
61 | 61 | // |
62 | - $html .= '<li>' . constant('CO_' . $moduleDirNameUpper . '_MAXUPLOADSIZE') . ' <b><span style="color: blue;">' . ini_get('upload_max_filesize') . "</span></b>\n"; |
|
63 | - $html .= '<li>' . constant('CO_' . $moduleDirNameUpper . '_MAXPOSTSIZE') . ' <b><span style="color: blue;">' . ini_get('post_max_size') . "</span></b>\n"; |
|
64 | - $html .= '<li>' . constant('CO_' . $moduleDirNameUpper . '_MEMORYLIMIT') . ' <b><span style="color: blue;">' . ini_get('memory_limit') . "</span></b>\n"; |
|
62 | + $html .= '<li>'.constant('CO_'.$moduleDirNameUpper.'_MAXUPLOADSIZE').' <b><span style="color: blue;">'.ini_get('upload_max_filesize')."</span></b>\n"; |
|
63 | + $html .= '<li>'.constant('CO_'.$moduleDirNameUpper.'_MAXPOSTSIZE').' <b><span style="color: blue;">'.ini_get('post_max_size')."</span></b>\n"; |
|
64 | + $html .= '<li>'.constant('CO_'.$moduleDirNameUpper.'_MEMORYLIMIT').' <b><span style="color: blue;">'.ini_get('memory_limit')."</span></b>\n"; |
|
65 | 65 | $html .= "</ul>\n"; |
66 | 66 | $html .= "<ul>\n"; |
67 | - $html .= '<li>' . constant('CO_' . $moduleDirNameUpper . '_SERVERPATH') . ' <b>' . XOOPS_ROOT_PATH . "</b>\n"; |
|
67 | + $html .= '<li>'.constant('CO_'.$moduleDirNameUpper.'_SERVERPATH').' <b>'.XOOPS_ROOT_PATH."</b>\n"; |
|
68 | 68 | $html .= "</ul>\n"; |
69 | 69 | $html .= "<br>\n"; |
70 | - $html .= constant('CO_' . $moduleDirNameUpper . '_UPLOADPATHDSC') . "\n"; |
|
70 | + $html .= constant('CO_'.$moduleDirNameUpper.'_UPLOADPATHDSC')."\n"; |
|
71 | 71 | $html .= '</div>'; |
72 | 72 | $html .= '</fieldset><br>'; |
73 | 73 |