@@ -20,11 +20,11 @@ discard block |
||
20 | 20 | use Xmf\Request; |
21 | 21 | use XoopsModules\Extcal; |
22 | 22 | |
23 | -require_once __DIR__ . '/../../../include/cp_header.php'; |
|
24 | -include __DIR__ . '/../../../class/xoopsformloader.php'; |
|
25 | -require_once __DIR__ . '/admin_header.php'; |
|
23 | +require_once __DIR__.'/../../../include/cp_header.php'; |
|
24 | +include __DIR__.'/../../../class/xoopsformloader.php'; |
|
25 | +require_once __DIR__.'/admin_header.php'; |
|
26 | 26 | // require_once __DIR__ . '/../class/Utility.php'; |
27 | -require_once __DIR__ . '/../include/constantes.php'; |
|
27 | +require_once __DIR__.'/../include/constantes.php'; |
|
28 | 28 | |
29 | 29 | //$gepeto = array_merge($_GET, $_POST); |
30 | 30 | //while (list($key, $value) = each($gepeto)) { |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | $form->addElement(new \XoopsFormText(_AM_EXTCAL_WEIGHT, 'cat_weight', 30, 5, 0), false); |
96 | 96 | $form->addElement(new \XoopsFormColorPicker(_AM_EXTCAL_COLOR, 'cat_color', '#FF0000')); |
97 | 97 | |
98 | - $file_path = __DIR__ . '/../assets/css/images'; |
|
98 | + $file_path = __DIR__.'/../assets/css/images'; |
|
99 | 99 | $tf = \XoopsLists::getImgListAsArray($file_path); |
100 | 100 | array_unshift($tf, _MD_EXTCAL_NONE); |
101 | 101 | //$xfIcones = new \XoopsFormSelect(_AM_EXTCAL_ICONE, "cat_icone", $cat->getVar('cat_icone'), ''); |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | |
108 | 108 | $form->display(); |
109 | 109 | |
110 | - require_once __DIR__ . '/admin_footer.php'; |
|
110 | + require_once __DIR__.'/admin_footer.php'; |
|
111 | 111 | break; |
112 | 112 | |
113 | 113 | case 'edit': |
@@ -120,15 +120,15 @@ discard block |
||
120 | 120 | // $cat = $catHandler->getCat($cat_id, true); |
121 | 121 | } |
122 | 122 | |
123 | - echo '<fieldset><legend style="font-weight:bold; color:#990000;">' . _AM_EXTCAL_EDIT_CATEGORY . '</legend>'; |
|
123 | + echo '<fieldset><legend style="font-weight:bold; color:#990000;">'._AM_EXTCAL_EDIT_CATEGORY.'</legend>'; |
|
124 | 124 | |
125 | 125 | $form = new \XoopsThemeForm(_AM_EXTCAL_ADD_CATEGORY, 'add_cat', 'cat.php?op=enreg', 'post', true); |
126 | 126 | $form->addElement(new \XoopsFormText(_AM_EXTCAL_NAME, 'cat_name', 30, 255, $cat->getVar('cat_name')), true); |
127 | 127 | $form->addElement(new \XoopsFormDhtmlTextArea(_AM_EXTCAL_DESCRIPTION, 'cat_desc', $cat->getVar('cat_desc')), false); |
128 | 128 | $form->addElement(new \XoopsFormText(_AM_EXTCAL_WEIGHT, 'cat_weight', 30, 5, $cat->getVar('cat_weight')), false); |
129 | - $form->addElement(new \XoopsFormColorPicker(_AM_EXTCAL_COLOR, 'cat_color', '#' . $cat->getVar('cat_color'))); |
|
129 | + $form->addElement(new \XoopsFormColorPicker(_AM_EXTCAL_COLOR, 'cat_color', '#'.$cat->getVar('cat_color'))); |
|
130 | 130 | |
131 | - $file_path = __DIR__ . '/../assets/css/images'; |
|
131 | + $file_path = __DIR__.'/../assets/css/images'; |
|
132 | 132 | $tf = \XoopsLists::getImgListAsArray($file_path); |
133 | 133 | array_unshift($tf, _MD_EXTCAL_NONE); |
134 | 134 | $xfIcones = new \XoopsFormSelect(_AM_EXTCAL_ICONE, 'cat_icone', $cat->getVar('cat_icone'), ''); |
@@ -284,6 +284,6 @@ discard block |
||
284 | 284 | //$xoopsTpl->assign("module_dirname", $xoopsModule->getVar("dirname") ); |
285 | 285 | |
286 | 286 | $xoopsTpl->display('db:admin/extcal_admin_cat_list.tpl'); |
287 | - require_once __DIR__ . '/admin_footer.php'; |
|
287 | + require_once __DIR__.'/admin_footer.php'; |
|
288 | 288 | break; |
289 | 289 | } |
@@ -162,7 +162,7 @@ discard block |
||
162 | 162 | public function convertResultSet($result, $idAsKey = false, $asObject = true) |
163 | 163 | { |
164 | 164 | $ret = []; |
165 | - while (false !== ($myrow = $this->db->fetchArray($result))) { |
|
165 | + while (false !== ($myrow = $this->db->fetchArray($result))) { |
|
166 | 166 | $obj = $this->create(false); |
167 | 167 | $obj->assignVars($myrow); |
168 | 168 | if (!$idAsKey) { |
@@ -233,7 +233,7 @@ discard block |
||
233 | 233 | } |
234 | 234 | |
235 | 235 | $myts = \MyTextSanitizer::getInstance(); |
236 | - while (false !== ($myrow = $this->db->fetchArray($result))) { |
|
236 | + while (false !== ($myrow = $this->db->fetchArray($result))) { |
|
237 | 237 | //identifiers should be textboxes, so sanitize them like that |
238 | 238 | $ret[$myrow[$this->keyName]] = empty($this->identifierName) ? 1 : $myts->htmlSpecialChars($myrow[$this->identifierName]); |
239 | 239 | } |
@@ -104,13 +104,13 @@ discard block |
||
104 | 104 | if (is_array($this->keyName)) { |
105 | 105 | $criteria = new \CriteriaCompo(); |
106 | 106 | for ($i = 0, $iMax = count($this->keyName); $i < $iMax; ++$i) { |
107 | - $criteria->add(new \Criteria($this->keyName[$i], (int)$id[$i])); |
|
107 | + $criteria->add(new \Criteria($this->keyName[$i], (int) $id[$i])); |
|
108 | 108 | } |
109 | 109 | } else { |
110 | - $criteria = new \Criteria($this->keyName, (int)$id); |
|
110 | + $criteria = new \Criteria($this->keyName, (int) $id); |
|
111 | 111 | } |
112 | 112 | $criteria->setLimit(1); |
113 | - $objectArray =& $this->getObjects($criteria, false, true); |
|
113 | + $objectArray = & $this->getObjects($criteria, false, true); |
|
114 | 114 | if (1 != count($objectArray)) { |
115 | 115 | return $this->create(); |
116 | 116 | } |
@@ -131,11 +131,11 @@ discard block |
||
131 | 131 | { |
132 | 132 | $ret = []; |
133 | 133 | $limit = $start = 0; |
134 | - $sql = 'SELECT * FROM ' . $this->table; |
|
134 | + $sql = 'SELECT * FROM '.$this->table; |
|
135 | 135 | if (isset($criteria) && is_subclass_of($criteria, 'CriteriaElement')) { |
136 | - $sql .= ' ' . $criteria->renderWhere(); |
|
136 | + $sql .= ' '.$criteria->renderWhere(); |
|
137 | 137 | if ('' != $criteria->getSort()) { |
138 | - $sql .= ' ORDER BY ' . $criteria->getSort() . ' ' . $criteria->getOrder(); |
|
138 | + $sql .= ' ORDER BY '.$criteria->getSort().' '.$criteria->getOrder(); |
|
139 | 139 | } |
140 | 140 | $limit = $criteria->getLimit(); |
141 | 141 | $start = $criteria->getStart(); |
@@ -170,7 +170,7 @@ discard block |
||
170 | 170 | $ret[] = $obj; |
171 | 171 | } else { |
172 | 172 | $row = []; |
173 | - $vars =& $obj->getVars(); |
|
173 | + $vars = & $obj->getVars(); |
|
174 | 174 | foreach (array_keys($vars) as $i) { |
175 | 175 | $row[$i] = $obj->getVar($i); |
176 | 176 | } |
@@ -181,7 +181,7 @@ discard block |
||
181 | 181 | $ret[$myrow[$this->keyName]] = $obj; |
182 | 182 | } else { |
183 | 183 | $row = []; |
184 | - $vars =& $obj->getVars(); |
|
184 | + $vars = & $obj->getVars(); |
|
185 | 185 | foreach (array_keys($vars) as $i) { |
186 | 186 | $row[$i] = $obj->getVar($i); |
187 | 187 | } |
@@ -214,15 +214,15 @@ discard block |
||
214 | 214 | $criteria->setSort($this->identifierName); |
215 | 215 | } |
216 | 216 | |
217 | - $sql = 'SELECT ' . $this->keyName; |
|
217 | + $sql = 'SELECT '.$this->keyName; |
|
218 | 218 | if (!empty($this->identifierName)) { |
219 | - $sql .= ', ' . $this->identifierName; |
|
219 | + $sql .= ', '.$this->identifierName; |
|
220 | 220 | } |
221 | - $sql .= ' FROM ' . $this->table; |
|
221 | + $sql .= ' FROM '.$this->table; |
|
222 | 222 | if (isset($criteria) && is_subclass_of($criteria, 'CriteriaElement')) { |
223 | - $sql .= ' ' . $criteria->renderWhere(); |
|
223 | + $sql .= ' '.$criteria->renderWhere(); |
|
224 | 224 | if ('' != $criteria->getSort()) { |
225 | - $sql .= ' ORDER BY ' . $criteria->getSort() . ' ' . $criteria->getOrder(); |
|
225 | + $sql .= ' ORDER BY '.$criteria->getSort().' '.$criteria->getOrder(); |
|
226 | 226 | } |
227 | 227 | $limit = $criteria->getLimit(); |
228 | 228 | $start = $criteria->getStart(); |
@@ -255,12 +255,12 @@ discard block |
||
255 | 255 | if (isset($criteria) && is_subclass_of($criteria, 'CriteriaElement')) { |
256 | 256 | if ('' != $criteria->groupby) { |
257 | 257 | $groupby = true; |
258 | - $field = $criteria->groupby . ', '; //Not entirely secure unless you KNOW that no criteria's groupby clause is going to be mis-used |
|
258 | + $field = $criteria->groupby.', '; //Not entirely secure unless you KNOW that no criteria's groupby clause is going to be mis-used |
|
259 | 259 | } |
260 | 260 | } |
261 | - $sql = 'SELECT ' . $field . 'COUNT(*) FROM ' . $this->table; |
|
261 | + $sql = 'SELECT '.$field.'COUNT(*) FROM '.$this->table; |
|
262 | 262 | if (isset($criteria) && is_subclass_of($criteria, 'CriteriaElement')) { |
263 | - $sql .= ' ' . $criteria->renderWhere(); |
|
263 | + $sql .= ' '.$criteria->renderWhere(); |
|
264 | 264 | if ('' != $criteria->groupby) { |
265 | 265 | $sql .= $criteria->getGroupby(); |
266 | 266 | } |
@@ -296,13 +296,13 @@ discard block |
||
296 | 296 | if (is_array($this->keyName)) { |
297 | 297 | $clause = []; |
298 | 298 | for ($i = 0, $iMax = count($this->keyName); $i < $iMax; ++$i) { |
299 | - $clause[] = $this->keyName[$i] . ' = ' . $id[$i]; |
|
299 | + $clause[] = $this->keyName[$i].' = '.$id[$i]; |
|
300 | 300 | } |
301 | 301 | $whereclause = implode(' AND ', $clause); |
302 | 302 | } else { |
303 | - $whereclause = $this->keyName . ' = ' . $id; |
|
303 | + $whereclause = $this->keyName.' = '.$id; |
|
304 | 304 | } |
305 | - $sql = 'DELETE FROM ' . $this->table . ' WHERE ' . $whereclause; |
|
305 | + $sql = 'DELETE FROM '.$this->table.' WHERE '.$whereclause; |
|
306 | 306 | if (false !== $force) { |
307 | 307 | $result = $this->db->queryF($sql); |
308 | 308 | } else { |
@@ -333,7 +333,7 @@ discard block |
||
333 | 333 | } |
334 | 334 | |
335 | 335 | if (!($obj instanceof $this->className && class_exists($this->className))) { |
336 | - $obj->setErrors(get_class($obj) . ' Differs from ' . $this->className); |
|
336 | + $obj->setErrors(get_class($obj).' Differs from '.$this->className); |
|
337 | 337 | |
338 | 338 | return false; |
339 | 339 | } |
@@ -344,7 +344,7 @@ discard block |
||
344 | 344 | |
345 | 345 | foreach ($obj->cleanVars as $k => $v) { |
346 | 346 | if (XOBJ_DTYPE_INT == $obj->vars[$k]['data_type']) { |
347 | - $cleanvars[$k] = (int)$v; |
|
347 | + $cleanvars[$k] = (int) $v; |
|
348 | 348 | } elseif (is_array($v)) { |
349 | 349 | $cleanvars[$k] = $this->db->quoteString(implode(',', $v)); |
350 | 350 | } else { |
@@ -354,12 +354,12 @@ discard block |
||
354 | 354 | if ($obj->isNew()) { |
355 | 355 | if (!is_array($this->keyName)) { |
356 | 356 | if ($cleanvars[$this->keyName] < 1) { |
357 | - $cleanvars[$this->keyName] = $this->db->genId($this->table . '_' . $this->keyName . '_seq'); |
|
357 | + $cleanvars[$this->keyName] = $this->db->genId($this->table.'_'.$this->keyName.'_seq'); |
|
358 | 358 | } |
359 | 359 | } |
360 | - $sql = 'INSERT INTO ' . $this->table . ' (' . implode(',', array_keys($cleanvars)) . ') VALUES (' . implode(',', array_values($cleanvars)) . ')'; |
|
360 | + $sql = 'INSERT INTO '.$this->table.' ('.implode(',', array_keys($cleanvars)).') VALUES ('.implode(',', array_values($cleanvars)).')'; |
|
361 | 361 | } else { |
362 | - $sql = 'UPDATE ' . $this->table . ' SET'; |
|
362 | + $sql = 'UPDATE '.$this->table.' SET'; |
|
363 | 363 | foreach ($cleanvars as $key => $value) { |
364 | 364 | if ((!is_array($this->keyName) && $key == $this->keyName) |
365 | 365 | || (is_array($this->keyName) |
@@ -369,7 +369,7 @@ discard block |
||
369 | 369 | if (isset($notfirst)) { |
370 | 370 | $sql .= ','; |
371 | 371 | } |
372 | - $sql .= ' ' . $key . ' = ' . $value; |
|
372 | + $sql .= ' '.$key.' = '.$value; |
|
373 | 373 | $notfirst = true; |
374 | 374 | } |
375 | 375 | if (is_array($this->keyName)) { |
@@ -378,12 +378,12 @@ discard block |
||
378 | 378 | if ($i > 0) { |
379 | 379 | $whereclause .= ' AND '; |
380 | 380 | } |
381 | - $whereclause .= $this->keyName[$i] . ' = ' . $obj->getVar($this->keyName[$i]); |
|
381 | + $whereclause .= $this->keyName[$i].' = '.$obj->getVar($this->keyName[$i]); |
|
382 | 382 | } |
383 | 383 | } else { |
384 | - $whereclause = $this->keyName . ' = ' . $obj->getVar($this->keyName); |
|
384 | + $whereclause = $this->keyName.' = '.$obj->getVar($this->keyName); |
|
385 | 385 | } |
386 | - $sql .= ' WHERE ' . $whereclause; |
|
386 | + $sql .= ' WHERE '.$whereclause; |
|
387 | 387 | } |
388 | 388 | if (false !== $force) { |
389 | 389 | $result = $this->db->queryF($sql); |
@@ -412,7 +412,7 @@ discard block |
||
412 | 412 | */ |
413 | 413 | public function updateAll($fieldname, $fieldvalue, \CriteriaElement $criteria = null, $force = false) |
414 | 414 | { |
415 | - $setClause = $fieldname . ' = '; |
|
415 | + $setClause = $fieldname.' = '; |
|
416 | 416 | if (is_numeric($fieldvalue)) { |
417 | 417 | $setClause .= $fieldvalue; |
418 | 418 | } elseif (is_array($fieldvalue)) { |
@@ -420,9 +420,9 @@ discard block |
||
420 | 420 | } else { |
421 | 421 | $setClause .= $this->db->quoteString($fieldvalue); |
422 | 422 | } |
423 | - $sql = 'UPDATE ' . $this->table . ' SET ' . $setClause; |
|
423 | + $sql = 'UPDATE '.$this->table.' SET '.$setClause; |
|
424 | 424 | if (isset($criteria) && is_subclass_of($criteria, 'CriteriaElement')) { |
425 | - $sql .= ' ' . $criteria->renderWhere(); |
|
425 | + $sql .= ' '.$criteria->renderWhere(); |
|
426 | 426 | } |
427 | 427 | if (false !== $force) { |
428 | 428 | $result = $this->db->queryF($sql); |
@@ -446,9 +446,9 @@ discard block |
||
446 | 446 | */ |
447 | 447 | public function updateFieldValue($fieldname, $fieldvalue, $criteria = null, $force = true) |
448 | 448 | { |
449 | - $sql = 'UPDATE ' . $this->table . ' SET ' . $fieldname . ' = ' . $fieldvalue; |
|
449 | + $sql = 'UPDATE '.$this->table.' SET '.$fieldname.' = '.$fieldvalue; |
|
450 | 450 | if (isset($criteria) && is_subclass_of($criteria, 'CriteriaElement')) { |
451 | - $sql .= ' ' . $criteria->renderWhere(); |
|
451 | + $sql .= ' '.$criteria->renderWhere(); |
|
452 | 452 | } |
453 | 453 | if (false !== $force) { |
454 | 454 | $result = $this->db->queryF($sql); |
@@ -475,8 +475,8 @@ discard block |
||
475 | 475 | public function deleteAll(\CriteriaElement $criteria = null, $force = true, $asObject = false) |
476 | 476 | { |
477 | 477 | if (isset($criteria) && is_subclass_of($criteria, 'CriteriaElement')) { |
478 | - $sql = 'DELETE FROM ' . $this->table; |
|
479 | - $sql .= ' ' . $criteria->renderWhere(); |
|
478 | + $sql = 'DELETE FROM '.$this->table; |
|
479 | + $sql .= ' '.$criteria->renderWhere(); |
|
480 | 480 | if (!$this->db->query($sql)) { |
481 | 481 | return false; |
482 | 482 | } |
@@ -610,8 +610,8 @@ discard block |
||
610 | 610 | */ |
611 | 611 | public function updateCounter($fieldname, $criteria, $op = '+') |
612 | 612 | { |
613 | - $sql = 'UPDATE ' . $this->table . ' SET ' . $fieldname . ' = ' . $fieldname . $op . '1'; |
|
614 | - $sql .= ' ' . $criteria->renderWhere(); |
|
613 | + $sql = 'UPDATE '.$this->table.' SET '.$fieldname.' = '.$fieldname.$op.'1'; |
|
614 | + $sql .= ' '.$criteria->renderWhere(); |
|
615 | 615 | $result = $this->db->queryF($sql); |
616 | 616 | if (!$result) { |
617 | 617 | return false; |
@@ -633,12 +633,12 @@ discard block |
||
633 | 633 | if (isset($criteria) && is_subclass_of($criteria, 'CriteriaElement')) { |
634 | 634 | if ('' != $criteria->groupby) { |
635 | 635 | $groupby = true; |
636 | - $field = $criteria->groupby . ', '; //Not entirely secure unless you KNOW that no criteria's groupby clause is going to be mis-used |
|
636 | + $field = $criteria->groupby.', '; //Not entirely secure unless you KNOW that no criteria's groupby clause is going to be mis-used |
|
637 | 637 | } |
638 | 638 | } |
639 | - $sql = 'SELECT ' . $field . "SUM($sum) FROM " . $this->table; |
|
639 | + $sql = 'SELECT '.$field."SUM($sum) FROM ".$this->table; |
|
640 | 640 | if (isset($criteria) && is_subclass_of($criteria, 'CriteriaElement')) { |
641 | - $sql .= ' ' . $criteria->renderWhere(); |
|
641 | + $sql .= ' '.$criteria->renderWhere(); |
|
642 | 642 | if ('' != $criteria->groupby) { |
643 | 643 | $sql .= $criteria->getGroupby(); |
644 | 644 | } |
@@ -674,12 +674,12 @@ discard block |
||
674 | 674 | if (isset($criteria) && is_subclass_of($criteria, 'CriteriaElement')) { |
675 | 675 | if ('' != $criteria->groupby) { |
676 | 676 | $groupby = true; |
677 | - $field = $criteria->groupby . ', '; //Not entirely secure unless you KNOW that no criteria's groupby clause is going to be mis-used |
|
677 | + $field = $criteria->groupby.', '; //Not entirely secure unless you KNOW that no criteria's groupby clause is going to be mis-used |
|
678 | 678 | } |
679 | 679 | } |
680 | - $sql = 'SELECT ' . $field . "MAX($max) FROM " . $this->table; |
|
680 | + $sql = 'SELECT '.$field."MAX($max) FROM ".$this->table; |
|
681 | 681 | if (isset($criteria) && is_subclass_of($criteria, 'CriteriaElement')) { |
682 | - $sql .= ' ' . $criteria->renderWhere(); |
|
682 | + $sql .= ' '.$criteria->renderWhere(); |
|
683 | 683 | if ('' != $criteria->groupby) { |
684 | 684 | $sql .= $criteria->getGroupby(); |
685 | 685 | } |
@@ -712,9 +712,9 @@ discard block |
||
712 | 712 | { |
713 | 713 | $field = ''; |
714 | 714 | |
715 | - $sql = 'SELECT ' . $field . "AVG($avg) FROM " . $this->table; |
|
715 | + $sql = 'SELECT '.$field."AVG($avg) FROM ".$this->table; |
|
716 | 716 | if (isset($criteria) && is_subclass_of($criteria, 'CriteriaElement')) { |
717 | - $sql .= ' ' . $criteria->renderWhere(); |
|
717 | + $sql .= ' '.$criteria->renderWhere(); |
|
718 | 718 | } |
719 | 719 | $result = $this->db->query($sql); |
720 | 720 | if (!$result) { |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | |
24 | 24 | // defined('XOOPS_ROOT_PATH') || die('Restricted access'); |
25 | 25 | |
26 | -require_once __DIR__ . '/../include/constantes.php'; |
|
26 | +require_once __DIR__.'/../include/constantes.php'; |
|
27 | 27 | |
28 | 28 | /** |
29 | 29 | * Class EventHandler. |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | */ |
132 | 132 | public function getAllEvents($criteria = null, $asObject = false) |
133 | 133 | { |
134 | - $rst =& $this->getObjects($criteria, $asObject); |
|
134 | + $rst = & $this->getObjects($criteria, $asObject); |
|
135 | 135 | if ($asObject) { |
136 | 136 | return $rst; |
137 | 137 | } else { |
@@ -157,7 +157,7 @@ discard block |
||
157 | 157 | if (!$skipPerm) { |
158 | 158 | $this->addCatPermCriteria($criteriaCompo, $user); |
159 | 159 | } |
160 | - $ret =& $this->getObjects($criteriaCompo); |
|
160 | + $ret = & $this->getObjects($criteriaCompo); |
|
161 | 161 | if (isset($ret[0])) { |
162 | 162 | return $ret[0]; |
163 | 163 | } else { |
@@ -182,7 +182,7 @@ discard block |
||
182 | 182 | if (!$skipPerm) { |
183 | 183 | $this->addCatPermCriteria($criteriaCompo, $user); |
184 | 184 | } |
185 | - $ret =& $this->getObjects($criteriaCompo); |
|
185 | + $ret = & $this->getObjects($criteriaCompo); |
|
186 | 186 | if (isset($ret[0])) { |
187 | 187 | return $ret[0]; |
188 | 188 | } else { |
@@ -335,7 +335,7 @@ discard block |
||
335 | 335 | |
336 | 336 | // while (list($k, $v) = each($events)) { |
337 | 337 | foreach ($events as $k => $v) { |
338 | - $ordre[] = (int)$v['event_start']; |
|
338 | + $ordre[] = (int) $v['event_start']; |
|
339 | 339 | $this->formatEventDate($v, Extcal\Helper::getInstance()->getConfig('event_date_week')); |
340 | 340 | //$v['cat']['cat_light_color'] = $v['cat']['cat_color']; |
341 | 341 | $v['cat']['cat_light_color'] = Extcal\Utility::getLighterColor($v['cat']['cat_color'], _EXTCAL_INFOBULLE_RGB_MIN, _EXTCAL_INFOBULLE_RGB_MAX); |
@@ -424,7 +424,7 @@ discard block |
||
424 | 424 | $criteriaCompo->add(new \Criteria('event_isrecur', 0, '=')); |
425 | 425 | $criteriaCompo->setOrder($sens); |
426 | 426 | |
427 | - $result =& $this->getObjects($criteriaCompo); |
|
427 | + $result = & $this->getObjects($criteriaCompo); |
|
428 | 428 | $events = $this->objectToArray($result, $externalKeys); |
429 | 429 | $this->serverTimeToUserTimes($events); |
430 | 430 | |
@@ -497,7 +497,7 @@ discard block |
||
497 | 497 | $criteriaCompo->add(new \Criteria('event_isrecur', 1, '=')); |
498 | 498 | $criteriaCompo->setOrder($sens); |
499 | 499 | |
500 | - $result =& $this->getObjects($criteriaCompo); |
|
500 | + $result = & $this->getObjects($criteriaCompo); |
|
501 | 501 | $events = $this->objectToArray($result, $externalKeys); |
502 | 502 | $this->serverTimeToUserTimes($events); |
503 | 503 | |
@@ -537,7 +537,7 @@ discard block |
||
537 | 537 | |
538 | 538 | reset($period); |
539 | 539 | foreach ($period as $dt) { |
540 | - echo $dt->format("l d-m-Y H:i:s\n") . '<br>'; |
|
540 | + echo $dt->format("l d-m-Y H:i:s\n").'<br>'; |
|
541 | 541 | } |
542 | 542 | } |
543 | 543 | |
@@ -866,10 +866,10 @@ discard block |
||
866 | 866 | $authorizedAccessCats = $this->extcalPerm->getAuthorizedCat($user, 'extcal_cat_view'); |
867 | 867 | $count = count($authorizedAccessCats); |
868 | 868 | if ($count > 0) { |
869 | - $in = '(' . $authorizedAccessCats[0]; |
|
869 | + $in = '('.$authorizedAccessCats[0]; |
|
870 | 870 | array_shift($authorizedAccessCats); |
871 | 871 | foreach ($authorizedAccessCats as $authorizedAccessCat) { |
872 | - $in .= ',' . $authorizedAccessCat; |
|
872 | + $in .= ','.$authorizedAccessCat; |
|
873 | 873 | } |
874 | 874 | $in .= ')'; |
875 | 875 | $criteria->add(new \Criteria('cat_id', $in, 'IN')); |
@@ -889,10 +889,10 @@ discard block |
||
889 | 889 | } |
890 | 890 | if (is_array($cats)) { |
891 | 891 | if (false === array_search(0, $cats)) { |
892 | - $in = '(' . current($cats); |
|
892 | + $in = '('.current($cats); |
|
893 | 893 | array_shift($cats); |
894 | 894 | foreach ($cats as $cat) { |
895 | - $in .= ',' . $cat; |
|
895 | + $in .= ','.$cat; |
|
896 | 896 | } |
897 | 897 | $in .= ')'; |
898 | 898 | $criteria->add(new \Criteria('cat_id', $in, 'IN')); |
@@ -933,7 +933,7 @@ discard block |
||
933 | 933 | if ('clone' === $mode) { |
934 | 934 | $data['event_id'] = 0; |
935 | 935 | $event->setVar('event_id', 0); |
936 | - $newTitle = $event->getVar('event_title') . ' (' . _MD_EXTCAL_CLONE_OF . $data['event_id'] . ')'; |
|
936 | + $newTitle = $event->getVar('event_title').' ('._MD_EXTCAL_CLONE_OF.$data['event_id'].')'; |
|
937 | 937 | $event->setVar('event_title', $newTitle); |
938 | 938 | } |
939 | 939 | |
@@ -1117,7 +1117,7 @@ discard block |
||
1117 | 1117 | $form->addElement($catSelect, true); |
1118 | 1118 | //----------------------------------------------------------- |
1119 | 1119 | |
1120 | - $file_path = __DIR__ . '/../assets/css/images'; |
|
1120 | + $file_path = __DIR__.'/../assets/css/images'; |
|
1121 | 1121 | $tf = \XoopsLists::getImgListAsArray($file_path); |
1122 | 1122 | array_unshift($tf, _MD_EXTCAL_NONE); |
1123 | 1123 | $xfIcones = new \XoopsFormSelect(_MD_EXTCAL_ICONE, 'event_icone', $event_icone, ''); |
@@ -1222,7 +1222,7 @@ discard block |
||
1222 | 1222 | if (count($files) > 0) { |
1223 | 1223 | $eventFiles = new Extcal\Form\FormFileCheckBox('', 'filetokeep'); |
1224 | 1224 | foreach ($files as $file) { |
1225 | - $name = $file['file_nicename'] . ' (<i>' . $file['file_mimetype'] . '</i>) ' . $file['formated_file_size']; |
|
1225 | + $name = $file['file_nicename'].' (<i>'.$file['file_mimetype'].'</i>) '.$file['formated_file_size']; |
|
1226 | 1226 | $eventFiles->addOption($file['file_id'], $name); |
1227 | 1227 | } |
1228 | 1228 | $fileElmtTray->addElement($eventFiles); |
@@ -1238,7 +1238,7 @@ discard block |
||
1238 | 1238 | //Picture1 |
1239 | 1239 | $file_tray = new \XoopsFormElementTray(sprintf(_MD_EXTCAL_FORM_IMG, 1), ''); |
1240 | 1240 | if (!empty($event_picture1)) { |
1241 | - $file_tray->addElement(new \XoopsFormLabel('', "<img src='" . XOOPS_URL . '/uploads/extcal/' . $event_picture1 . "' name='image' id='image' alt=''><br><br>")); |
|
1241 | + $file_tray->addElement(new \XoopsFormLabel('', "<img src='".XOOPS_URL.'/uploads/extcal/'.$event_picture1."' name='image' id='image' alt=''><br><br>")); |
|
1242 | 1242 | $check_del_img = new \XoopsFormCheckBox('', 'delimg_1'); |
1243 | 1243 | $check_del_img->addOption(1, _MD_EXTCAL_DEL_IMG); |
1244 | 1244 | $file_tray->addElement($check_del_img); |
@@ -1249,8 +1249,8 @@ discard block |
||
1249 | 1249 | } |
1250 | 1250 | $file_img->setExtra("size ='40'"); |
1251 | 1251 | $file_tray->addElement($file_img); |
1252 | - $msg = sprintf(_MD_EXTCAL_IMG_CONFIG, (int)(400728 / 1000), 500, 500); |
|
1253 | - $file_label = new \XoopsFormLabel('', '<br>' . $msg); |
|
1252 | + $msg = sprintf(_MD_EXTCAL_IMG_CONFIG, (int) (400728 / 1000), 500, 500); |
|
1253 | + $file_label = new \XoopsFormLabel('', '<br>'.$msg); |
|
1254 | 1254 | $file_tray->addElement($file_label); |
1255 | 1255 | $form->addElement($file_tray); |
1256 | 1256 | $form->addElement(new \XoopsFormHidden('file1', $event_picture1)); |
@@ -1258,7 +1258,7 @@ discard block |
||
1258 | 1258 | //Picture2 |
1259 | 1259 | $file_tray = new \XoopsFormElementTray(sprintf(_MD_EXTCAL_FORM_IMG, 2), ''); |
1260 | 1260 | if (!empty($event_picture2)) { |
1261 | - $file_tray->addElement(new \XoopsFormLabel('', "<img src='" . XOOPS_URL . '/uploads/extcal/' . $event_picture2 . "' name='image' id='image' alt=''><br><br>")); |
|
1261 | + $file_tray->addElement(new \XoopsFormLabel('', "<img src='".XOOPS_URL.'/uploads/extcal/'.$event_picture2."' name='image' id='image' alt=''><br><br>")); |
|
1262 | 1262 | $check_del_img = new \XoopsFormCheckBox('', 'delimg_2'); |
1263 | 1263 | $check_del_img->addOption(1, _MD_EXTCAL_DEL_IMG); |
1264 | 1264 | $file_tray->addElement($check_del_img); |
@@ -1269,8 +1269,8 @@ discard block |
||
1269 | 1269 | } |
1270 | 1270 | $file_img->setExtra("size ='40'"); |
1271 | 1271 | $file_tray->addElement($file_img); |
1272 | - $msg = sprintf(_MD_EXTCAL_IMG_CONFIG, (int)(400728 / 1000), 500, 500); |
|
1273 | - $file_label = new \XoopsFormLabel('', '<br>' . $msg); |
|
1272 | + $msg = sprintf(_MD_EXTCAL_IMG_CONFIG, (int) (400728 / 1000), 500, 500); |
|
1273 | + $file_label = new \XoopsFormLabel('', '<br>'.$msg); |
|
1274 | 1274 | $file_tray->addElement($file_label); |
1275 | 1275 | $form->addElement($file_tray); |
1276 | 1276 | $form->addElement(new \XoopsFormHidden('file2', $event_picture2)); |
@@ -1337,7 +1337,7 @@ discard block |
||
1337 | 1337 | $recurRules = 'weekly|'; |
1338 | 1338 | $recurRules .= $parm['rrule_weekly_interval']; |
1339 | 1339 | foreach ($parm['rrule_weekly_bydays'] as $day) { |
1340 | - $recurRules .= '|' . $day; |
|
1340 | + $recurRules .= '|'.$day; |
|
1341 | 1341 | } |
1342 | 1342 | |
1343 | 1343 | break; |
@@ -1347,11 +1347,11 @@ discard block |
||
1347 | 1347 | $parm['rrule_monthly_interval'] = 0; |
1348 | 1348 | } |
1349 | 1349 | $recurRules = 'monthly|'; |
1350 | - $recurRules .= $parm['rrule_monthly_interval'] . '|'; |
|
1350 | + $recurRules .= $parm['rrule_monthly_interval'].'|'; |
|
1351 | 1351 | if ('' != $parm['rrule_monthly_byday']) { |
1352 | 1352 | $recurRules .= $parm['rrule_monthly_byday']; |
1353 | 1353 | } else { |
1354 | - $recurRules .= 'MD' . $parm['rrule_bymonthday']; |
|
1354 | + $recurRules .= 'MD'.$parm['rrule_bymonthday']; |
|
1355 | 1355 | } |
1356 | 1356 | |
1357 | 1357 | break; |
@@ -1385,9 +1385,9 @@ discard block |
||
1385 | 1385 | |
1386 | 1386 | $recurRules = 'yearly|'; |
1387 | 1387 | $recurRules .= $parm['rrule_yearly_interval']; |
1388 | - $recurRules .= '|' . $parm['rrule_yearly_byday']; |
|
1388 | + $recurRules .= '|'.$parm['rrule_yearly_byday']; |
|
1389 | 1389 | foreach ($parm['rrule_yearly_bymonths'] as $month) { |
1390 | - $recurRules .= '|' . $month; |
|
1390 | + $recurRules .= '|'.$month; |
|
1391 | 1391 | } |
1392 | 1392 | |
1393 | 1393 | break; |
@@ -2313,10 +2313,10 @@ discard block |
||
2313 | 2313 | global $xoopsDB; |
2314 | 2314 | |
2315 | 2315 | //echo "<hr>{$andor}-{$limit}-{$offset}-{$userId}-{$user}<br>{$criteresPlus}"; |
2316 | - $tEvent = $xoopsDB->prefix('extcal_event') . ' AS te'; |
|
2317 | - $tCat = $xoopsDB->prefix('extcal_cat') . ' AS tc'; |
|
2316 | + $tEvent = $xoopsDB->prefix('extcal_event').' AS te'; |
|
2317 | + $tCat = $xoopsDB->prefix('extcal_cat').' AS tc'; |
|
2318 | 2318 | |
2319 | - $sql = 'SELECT te.*, tc.cat_name , tc.cat_color, ' . 'year(FROM_UNIXTIME(event_start)) AS year,' . 'month(FROM_UNIXTIME(event_start)) AS month,' . 'day(FROM_UNIXTIME(event_start)) AS day' . " FROM {$tEvent}, {$tCat}"; |
|
2319 | + $sql = 'SELECT te.*, tc.cat_name , tc.cat_color, '.'year(FROM_UNIXTIME(event_start)) AS year,'.'month(FROM_UNIXTIME(event_start)) AS month,'.'day(FROM_UNIXTIME(event_start)) AS day'." FROM {$tEvent}, {$tCat}"; |
|
2320 | 2320 | //--------------------------------------------------- |
2321 | 2321 | $tw = []; |
2322 | 2322 | $tw[] = 'te.cat_id = tc.cat_id'; |
@@ -2325,7 +2325,7 @@ discard block |
||
2325 | 2325 | $authorizedAccessCats = $this->extcalPerm->getAuthorizedCat($user, 'extcal_cat_view'); |
2326 | 2326 | $inCat = 'te.cat_id IN (0)'; |
2327 | 2327 | if (count($authorizedAccessCats) > 0) { |
2328 | - $inCat = 'te.cat_id IN (' . implode(',', $authorizedAccessCats) . ')'; |
|
2328 | + $inCat = 'te.cat_id IN ('.implode(',', $authorizedAccessCats).')'; |
|
2329 | 2329 | } |
2330 | 2330 | //echo $tw[count($tw)-1]; |
2331 | 2331 | |
@@ -2361,12 +2361,12 @@ discard block |
||
2361 | 2361 | 'te.event_address', |
2362 | 2362 | 'tc.cat_name', |
2363 | 2363 | ]; |
2364 | - $t = []; |
|
2364 | + $t = []; |
|
2365 | 2365 | foreach ($queryarray as $i => $iValue) { |
2366 | 2366 | $t1[] = " %1\$s LIKE '#{$queryarray[$i]}#' "; |
2367 | 2367 | } |
2368 | 2368 | |
2369 | - $flt = '(' . implode(" {$andor} ", $t1) . ')'; |
|
2369 | + $flt = '('.implode(" {$andor} ", $t1).')'; |
|
2370 | 2370 | |
2371 | 2371 | $t = []; |
2372 | 2372 | foreach ($tFields as $h => $hValue) { |
@@ -2375,10 +2375,10 @@ discard block |
||
2375 | 2375 | |
2376 | 2376 | $filtre = implode(' OR ', $t); |
2377 | 2377 | $filtre = str_replace('#', '%', $filtre); |
2378 | - $tw[] = '(' . $filtre . ')'; |
|
2378 | + $tw[] = '('.$filtre.')'; |
|
2379 | 2379 | } |
2380 | 2380 | |
2381 | - $sql .= ' WHERE ' . implode(' AND ', $tw); |
|
2381 | + $sql .= ' WHERE '.implode(' AND ', $tw); |
|
2382 | 2382 | //------------------------------------------------------------ |
2383 | 2383 | if (count($orderBy) > 0) { |
2384 | 2384 | $t = []; |
@@ -2388,7 +2388,7 @@ discard block |
||
2388 | 2388 | } |
2389 | 2389 | } |
2390 | 2390 | if (count($t) > 0) { |
2391 | - $sql .= ' ORDER BY ' . implode(',', $t); |
|
2391 | + $sql .= ' ORDER BY '.implode(',', $t); |
|
2392 | 2392 | } |
2393 | 2393 | } |
2394 | 2394 | |
@@ -2421,7 +2421,7 @@ discard block |
||
2421 | 2421 | $i = 0; |
2422 | 2422 | while (false !== ($myrow = $xoopsDB->fetchArray($result))) { |
2423 | 2423 | $ret[$i]['image'] = 'assets/images/icons/extcal.gif'; |
2424 | - $ret[$i]['link'] = 'event.php?event=' . $myrow['event_id']; |
|
2424 | + $ret[$i]['link'] = 'event.php?event='.$myrow['event_id']; |
|
2425 | 2425 | $ret[$i]['title'] = $myrow['event_title']; |
2426 | 2426 | $ret[$i]['time'] = $myrow['event_submitdate']; |
2427 | 2427 | $ret[$i]['uid'] = $myrow['event_submitter']; |
@@ -2461,23 +2461,23 @@ discard block |
||
2461 | 2461 | // } |
2462 | 2462 | $tEvent = $xoopsDB->prefix('extcal_event'); |
2463 | 2463 | $tCat = $xoopsDB->prefix('extcal_cat'); |
2464 | - $sql = "SELECT {$tEvent}.*, {$tCat}.cat_name AS categorie, {$tCat}.cat_color " . " FROM {$tEvent}, {$tCat}" . " WHERE {$tEvent}.cat_id = {$tCat}.cat_id AND event_approved = '1'"; |
|
2464 | + $sql = "SELECT {$tEvent}.*, {$tCat}.cat_name AS categorie, {$tCat}.cat_color "." FROM {$tEvent}, {$tCat}"." WHERE {$tEvent}.cat_id = {$tCat}.cat_id AND event_approved = '1'"; |
|
2465 | 2465 | |
2466 | 2466 | $authorizedAccessCats = $this->extcalPerm->getAuthorizedCat($user, 'extcal_cat_view'); |
2467 | 2467 | $count = count($authorizedAccessCats); |
2468 | 2468 | if ($count > 0) { |
2469 | - $in = '(' . $authorizedAccessCats[0]; |
|
2469 | + $in = '('.$authorizedAccessCats[0]; |
|
2470 | 2470 | array_shift($authorizedAccessCats); |
2471 | 2471 | foreach ($authorizedAccessCats as $authorizedAccessCat) { |
2472 | - $in .= ',' . $authorizedAccessCat; |
|
2472 | + $in .= ','.$authorizedAccessCat; |
|
2473 | 2473 | } |
2474 | 2474 | $in .= ')'; |
2475 | 2475 | } else { |
2476 | 2476 | $in = '(0)'; |
2477 | 2477 | } |
2478 | - $sql .= " AND {$tEvent}.cat_id IN " . $in . ''; |
|
2478 | + $sql .= " AND {$tEvent}.cat_id IN ".$in.''; |
|
2479 | 2479 | if (0 != $userId) { |
2480 | - $sql .= " AND event_submitter = '" . $userId . "'"; |
|
2480 | + $sql .= " AND event_submitter = '".$userId."'"; |
|
2481 | 2481 | } |
2482 | 2482 | |
2483 | 2483 | //echoArray($queryarray,false); |
@@ -2497,7 +2497,7 @@ discard block |
||
2497 | 2497 | $t1[] = " %1\$s LIKE '#{$queryarray[$i]}#' "; |
2498 | 2498 | } |
2499 | 2499 | |
2500 | - $flt = '(' . implode(" {$andor} ", $t1) . ')'; |
|
2500 | + $flt = '('.implode(" {$andor} ", $t1).')'; |
|
2501 | 2501 | |
2502 | 2502 | $t = []; |
2503 | 2503 | foreach ($tFields as $h => $hValue) { |
@@ -2506,11 +2506,11 @@ discard block |
||
2506 | 2506 | |
2507 | 2507 | $filtre = implode(' OR ', $t); |
2508 | 2508 | $filtre = str_replace('#', '%', $filtre); |
2509 | - $sql .= " AND ($filtre)"; |
|
2509 | + $sql .= " AND ($filtre)"; |
|
2510 | 2510 | } |
2511 | 2511 | |
2512 | 2512 | if ('' != $criteresPlus) { |
2513 | - $sql .= ' AND ' . $criteresPlus; |
|
2513 | + $sql .= ' AND '.$criteresPlus; |
|
2514 | 2514 | } |
2515 | 2515 | $sql .= ' ORDER BY event_id DESC'; |
2516 | 2516 | |
@@ -2520,7 +2520,7 @@ discard block |
||
2520 | 2520 | if ($xoopsSearch) { |
2521 | 2521 | while (false !== ($myrow = $xoopsDB->fetchArray($result))) { |
2522 | 2522 | $ret[$i]['image'] = 'assets/images/icons/extcal.gif'; |
2523 | - $ret[$i]['link'] = 'event.php?event=' . $myrow['event_id']; |
|
2523 | + $ret[$i]['link'] = 'event.php?event='.$myrow['event_id']; |
|
2524 | 2524 | $ret[$i]['title'] = $myrow['event_title']; |
2525 | 2525 | $ret[$i]['time'] = $myrow['event_submitdate']; |
2526 | 2526 | $ret[$i]['uid'] = $myrow['event_submitter']; |
@@ -69,15 +69,15 @@ |
||
69 | 69 | public function getMembers($eventId) |
70 | 70 | { |
71 | 71 | $memberHandler = xoops_getHandler('member'); |
72 | - $eventNotMember =& $this->getObjects(new \Criteria('event_id', $eventId)); |
|
72 | + $eventNotMember = & $this->getObjects(new \Criteria('event_id', $eventId)); |
|
73 | 73 | $count = count($eventNotMember); |
74 | 74 | if ($count > 0) { |
75 | - $in = '(' . $eventNotMember[0]->getVar('uid'); |
|
75 | + $in = '('.$eventNotMember[0]->getVar('uid'); |
|
76 | 76 | array_shift($eventNotMember); |
77 | 77 | foreach ($eventNotMember as $member) { |
78 | - $in .= ',' . $member->getVar('uid'); |
|
78 | + $in .= ','.$member->getVar('uid'); |
|
79 | 79 | } |
80 | - $in .= ')'; |
|
80 | + $in .= ')'; |
|
81 | 81 | $criteria = new \Criteria('uid', $in, 'IN'); |
82 | 82 | } else { |
83 | 83 | $criteria = new \Criteria('uid', '(0)', 'IN'); |
@@ -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 | - if(true === ($gdlib = gd_info())){ |
|
49 | - $html .= '<li>' . constant('CO_' . $moduleDirNameUpper . '_GDLIBVERSION') . '<b>' . $gdlib['GD Version'] . '</b>'; |
|
48 | + if (true === ($gdlib = gd_info())) { |
|
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 |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | * |
21 | 21 | */ |
22 | 22 | |
23 | -require_once __DIR__ . '/../../include/common.php'; |
|
23 | +require_once __DIR__.'/../../include/common.php'; |
|
24 | 24 | |
25 | 25 | /** |
26 | 26 | * Class Configurator |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | $moduleDirName = basename(dirname(__DIR__)); |
46 | 46 | $capsDirName = strtoupper($moduleDirName); |
47 | 47 | |
48 | - include_once __DIR__ . '/../../include/config.php'; |
|
48 | + include_once __DIR__.'/../../include/config.php'; |
|
49 | 49 | $config = getConfig(); |
50 | 50 | |
51 | 51 | $this->name = $config->name; |
@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | // defined('XOOPS_ROOT_PATH') || die('Restricted access'); |
22 | 22 | |
23 | 23 | // // require_once __DIR__ . '/ExtcalPersistableObjectHandler.php'; |
24 | -require_once XOOPS_ROOT_PATH . '/class/uploader.php'; |
|
24 | +require_once XOOPS_ROOT_PATH.'/class/uploader.php'; |
|
25 | 25 | |
26 | 26 | /** |
27 | 27 | * Class FileHandler. |
@@ -46,13 +46,13 @@ discard block |
||
46 | 46 | $userId = $GLOBALS['xoopsUser'] ? $GLOBALS['xoopsUser']->getVar('uid') : 0; |
47 | 47 | |
48 | 48 | $allowedMimeType = []; |
49 | - $mimeType = include XOOPS_ROOT_PATH . '/include/mimetypes.inc.php'; |
|
49 | + $mimeType = include XOOPS_ROOT_PATH.'/include/mimetypes.inc.php'; |
|
50 | 50 | foreach ($GLOBALS['xoopsModuleConfig']['allowed_file_extention'] as $fileExt) { |
51 | 51 | $allowedMimeType[] = $mimeType[$fileExt]; |
52 | 52 | } |
53 | 53 | |
54 | - $uploader = new \XoopsMediaUploader(XOOPS_ROOT_PATH . '/uploads/extcal', $allowedMimeType, 3145728); |
|
55 | - $uploader->setPrefix($userId . '-' . $eventId . '_'); |
|
54 | + $uploader = new \XoopsMediaUploader(XOOPS_ROOT_PATH.'/uploads/extcal', $allowedMimeType, 3145728); |
|
55 | + $uploader->setPrefix($userId.'-'.$eventId.'_'); |
|
56 | 56 | if ($uploader->fetchMedia('event_file')) { |
57 | 57 | if (!$uploader->upload()) { |
58 | 58 | return false; |
@@ -113,19 +113,19 @@ discard block |
||
113 | 113 | if (isset($_POST['filetokeep'])) { |
114 | 114 | if (is_array($_POST['filetokeep'])) { |
115 | 115 | $count = count($_POST['filetokeep']); |
116 | - $in = '(' . $_POST['filetokeep'][0]; |
|
116 | + $in = '('.$_POST['filetokeep'][0]; |
|
117 | 117 | array_shift($_POST['filetokeep']); |
118 | 118 | foreach ($_POST['filetokeep'] as $elmt) { |
119 | - $in .= ',' . $elmt; |
|
119 | + $in .= ','.$elmt; |
|
120 | 120 | } |
121 | 121 | $in .= ')'; |
122 | 122 | } else { |
123 | - $in = '(' . $_POST['filetokeep'] . ')'; |
|
123 | + $in = '('.$_POST['filetokeep'].')'; |
|
124 | 124 | } |
125 | 125 | $criteria->add(new \Criteria('file_id', $in, 'NOT IN')); |
126 | 126 | } |
127 | 127 | |
128 | - $files =& $this->getObjects($criteria); |
|
128 | + $files = & $this->getObjects($criteria); |
|
129 | 129 | foreach ($files as $file) { |
130 | 130 | $this->deleteFile($file); |
131 | 131 | } |
@@ -157,7 +157,7 @@ discard block |
||
157 | 157 | public function formatFileSize(&$file) |
158 | 158 | { |
159 | 159 | if ($file['file_size'] > 1000) { |
160 | - $file['formated_file_size'] = round($file['file_size'] / 1000) . 'kb'; |
|
160 | + $file['formated_file_size'] = round($file['file_size'] / 1000).'kb'; |
|
161 | 161 | } else { |
162 | 162 | $file['formated_file_size'] = '1kb'; |
163 | 163 | } |
@@ -168,8 +168,8 @@ discard block |
||
168 | 168 | */ |
169 | 169 | public function _deleteFile(&$file) |
170 | 170 | { |
171 | - if (file_exists(XOOPS_ROOT_PATH . '/uploads/extcal/' . $file->getVar('file_name'))) { |
|
172 | - unlink(XOOPS_ROOT_PATH . '/uploads/extcal/' . $file->getVar('file_name')); |
|
171 | + if (file_exists(XOOPS_ROOT_PATH.'/uploads/extcal/'.$file->getVar('file_name'))) { |
|
172 | + unlink(XOOPS_ROOT_PATH.'/uploads/extcal/'.$file->getVar('file_name')); |
|
173 | 173 | } |
174 | 174 | } |
175 | 175 | } |
@@ -21,12 +21,12 @@ discard block |
||
21 | 21 | // defined('XOOPS_ROOT_PATH') || die('Restricted access'); |
22 | 22 | |
23 | 23 | // require_once __DIR__ . '/ExtcalPersistableObjectHandler.php'; |
24 | -require_once __DIR__ . '/perm.php'; |
|
25 | -require_once __DIR__ . '/time.php'; |
|
26 | -require_once __DIR__ . '/config.php'; |
|
27 | -require_once __DIR__ . '/ExtDateTime.php'; |
|
28 | -require_once __DIR__ . '/utility.php'; |
|
29 | -require_once __DIR__ . '/../include/constantes.php'; |
|
24 | +require_once __DIR__.'/perm.php'; |
|
25 | +require_once __DIR__.'/time.php'; |
|
26 | +require_once __DIR__.'/config.php'; |
|
27 | +require_once __DIR__.'/ExtDateTime.php'; |
|
28 | +require_once __DIR__.'/utility.php'; |
|
29 | +require_once __DIR__.'/../include/constantes.php'; |
|
30 | 30 | |
31 | 31 | /** |
32 | 32 | * Class Event. |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | $this->initVar('event_etablissement', XOBJ_DTYPE_INT, 5, false); |
68 | 68 | $this->initVar('event_icone', XOBJ_DTYPE_TXTBOX, '', false); |
69 | 69 | |
70 | - $this->externalKey['cat_id'] = [ |
|
70 | + $this->externalKey['cat_id'] = [ |
|
71 | 71 | 'className' => 'Category', |
72 | 72 | 'getMethodeName' => 'getCat', |
73 | 73 | 'keyName' => 'cat', |
@@ -21,7 +21,7 @@ |
||
21 | 21 | // defined('XOOPS_ROOT_PATH') || die('Restricted access'); |
22 | 22 | |
23 | 23 | // require_once __DIR__ . '/ExtcalPersistableObjectHandler.php'; |
24 | -require_once XOOPS_ROOT_PATH . '/class/uploader.php'; |
|
24 | +require_once XOOPS_ROOT_PATH.'/class/uploader.php'; |
|
25 | 25 | |
26 | 26 | /** |
27 | 27 | * Class File. |