@@ -536,7 +536,7 @@ |
||
536 | 536 | |
537 | 537 | /** |
538 | 538 | * @param $objects |
539 | - * @param array $externalKeys |
|
539 | + * @param string[] $externalKeys |
|
540 | 540 | * @param string $format |
541 | 541 | * |
542 | 542 | * @return array |
@@ -83,10 +83,10 @@ discard block |
||
83 | 83 | if (is_array($this->keyName)) { |
84 | 84 | $criteria = new CriteriaCompo(); |
85 | 85 | for ($i = 0, $iMax = count($this->keyName); $i < $iMax; ++$i) { |
86 | - $criteria->add(new Criteria($this->keyName[$i], (int)$id[$i])); |
|
86 | + $criteria->add(new Criteria($this->keyName[$i], (int) $id[$i])); |
|
87 | 87 | } |
88 | 88 | } else { |
89 | - $criteria = new Criteria($this->keyName, (int)$id); |
|
89 | + $criteria = new Criteria($this->keyName, (int) $id); |
|
90 | 90 | } |
91 | 91 | $criteria->setLimit(1); |
92 | 92 | $objectArray = &$this->getObjects($criteria, false, true); |
@@ -110,11 +110,11 @@ discard block |
||
110 | 110 | { |
111 | 111 | $ret = array(); |
112 | 112 | $limit = $start = 0; |
113 | - $sql = 'SELECT * FROM ' . $this->table; |
|
113 | + $sql = 'SELECT * FROM '.$this->table; |
|
114 | 114 | if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { |
115 | - $sql .= ' ' . $criteria->renderWhere(); |
|
115 | + $sql .= ' '.$criteria->renderWhere(); |
|
116 | 116 | if ($criteria->getSort() != '') { |
117 | - $sql .= ' ORDER BY ' . $criteria->getSort() . ' ' . $criteria->getOrder(); |
|
117 | + $sql .= ' ORDER BY '.$criteria->getSort().' '.$criteria->getOrder(); |
|
118 | 118 | } |
119 | 119 | $limit = $criteria->getLimit(); |
120 | 120 | $start = $criteria->getStart(); |
@@ -149,7 +149,7 @@ discard block |
||
149 | 149 | $ret[] = $obj; |
150 | 150 | } else { |
151 | 151 | $row = array(); |
152 | - $vars =& $obj->getVars(); |
|
152 | + $vars = & $obj->getVars(); |
|
153 | 153 | foreach (array_keys($vars) as $i) { |
154 | 154 | $row[$i] = $obj->getVar($i); |
155 | 155 | } |
@@ -160,7 +160,7 @@ discard block |
||
160 | 160 | $ret[$myrow[$this->keyName]] = $obj; |
161 | 161 | } else { |
162 | 162 | $row = array(); |
163 | - $vars =& $obj->getVars(); |
|
163 | + $vars = & $obj->getVars(); |
|
164 | 164 | foreach (array_keys($vars) as $i) { |
165 | 165 | $row[$i] = $obj->getVar($i); |
166 | 166 | } |
@@ -193,15 +193,15 @@ discard block |
||
193 | 193 | $criteria->setSort($this->identifierName); |
194 | 194 | } |
195 | 195 | |
196 | - $sql = 'SELECT ' . $this->keyName; |
|
196 | + $sql = 'SELECT '.$this->keyName; |
|
197 | 197 | if (!empty($this->identifierName)) { |
198 | - $sql .= ', ' . $this->identifierName; |
|
198 | + $sql .= ', '.$this->identifierName; |
|
199 | 199 | } |
200 | - $sql .= ' FROM ' . $this->table; |
|
200 | + $sql .= ' FROM '.$this->table; |
|
201 | 201 | if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { |
202 | - $sql .= ' ' . $criteria->renderWhere(); |
|
202 | + $sql .= ' '.$criteria->renderWhere(); |
|
203 | 203 | if ($criteria->getSort() != '') { |
204 | - $sql .= ' ORDER BY ' . $criteria->getSort() . ' ' . $criteria->getOrder(); |
|
204 | + $sql .= ' ORDER BY '.$criteria->getSort().' '.$criteria->getOrder(); |
|
205 | 205 | } |
206 | 206 | $limit = $criteria->getLimit(); |
207 | 207 | $start = $criteria->getStart(); |
@@ -234,12 +234,12 @@ discard block |
||
234 | 234 | if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { |
235 | 235 | if ($criteria->groupby != '') { |
236 | 236 | $groupby = true; |
237 | - $field = $criteria->groupby . ', '; //Not entirely secure unless you KNOW that no criteria's groupby clause is going to be mis-used |
|
237 | + $field = $criteria->groupby.', '; //Not entirely secure unless you KNOW that no criteria's groupby clause is going to be mis-used |
|
238 | 238 | } |
239 | 239 | } |
240 | - $sql = 'SELECT ' . $field . 'COUNT(*) FROM ' . $this->table; |
|
240 | + $sql = 'SELECT '.$field.'COUNT(*) FROM '.$this->table; |
|
241 | 241 | if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { |
242 | - $sql .= ' ' . $criteria->renderWhere(); |
|
242 | + $sql .= ' '.$criteria->renderWhere(); |
|
243 | 243 | if ($criteria->groupby != '') { |
244 | 244 | $sql .= $criteria->getGroupby(); |
245 | 245 | } |
@@ -275,13 +275,13 @@ discard block |
||
275 | 275 | if (is_array($this->keyName)) { |
276 | 276 | $clause = array(); |
277 | 277 | for ($i = 0, $iMax = count($this->keyName); $i < $iMax; ++$i) { |
278 | - $clause[] = $this->keyName[$i] . ' = ' . $id[$i]; |
|
278 | + $clause[] = $this->keyName[$i].' = '.$id[$i]; |
|
279 | 279 | } |
280 | 280 | $whereclause = implode(' AND ', $clause); |
281 | 281 | } else { |
282 | - $whereclause = $this->keyName . ' = ' . $id; |
|
282 | + $whereclause = $this->keyName.' = '.$id; |
|
283 | 283 | } |
284 | - $sql = 'DELETE FROM ' . $this->table . ' WHERE ' . $whereclause; |
|
284 | + $sql = 'DELETE FROM '.$this->table.' WHERE '.$whereclause; |
|
285 | 285 | if (false !== $force) { |
286 | 286 | $result = $this->db->queryF($sql); |
287 | 287 | } else { |
@@ -312,7 +312,7 @@ discard block |
||
312 | 312 | } |
313 | 313 | |
314 | 314 | if (!($obj instanceof $this->className && class_exists($this->className))) { |
315 | - $obj->setErrors(get_class($obj) . ' Differs from ' . $this->className); |
|
315 | + $obj->setErrors(get_class($obj).' Differs from '.$this->className); |
|
316 | 316 | |
317 | 317 | return false; |
318 | 318 | } |
@@ -323,7 +323,7 @@ discard block |
||
323 | 323 | |
324 | 324 | foreach ($obj->cleanVars as $k => $v) { |
325 | 325 | if ($obj->vars[$k]['data_type'] == XOBJ_DTYPE_INT) { |
326 | - $cleanvars[$k] = (int)$v; |
|
326 | + $cleanvars[$k] = (int) $v; |
|
327 | 327 | } elseif (is_array($v)) { |
328 | 328 | $cleanvars[$k] = $this->db->quoteString(implode(',', $v)); |
329 | 329 | } else { |
@@ -333,12 +333,12 @@ discard block |
||
333 | 333 | if ($obj->isNew()) { |
334 | 334 | if (!is_array($this->keyName)) { |
335 | 335 | if ($cleanvars[$this->keyName] < 1) { |
336 | - $cleanvars[$this->keyName] = $this->db->genId($this->table . '_' . $this->keyName . '_seq'); |
|
336 | + $cleanvars[$this->keyName] = $this->db->genId($this->table.'_'.$this->keyName.'_seq'); |
|
337 | 337 | } |
338 | 338 | } |
339 | - $sql = 'INSERT INTO ' . $this->table . ' (' . implode(',', array_keys($cleanvars)) . ') VALUES (' . implode(',', array_values($cleanvars)) . ')'; |
|
339 | + $sql = 'INSERT INTO '.$this->table.' ('.implode(',', array_keys($cleanvars)).') VALUES ('.implode(',', array_values($cleanvars)).')'; |
|
340 | 340 | } else { |
341 | - $sql = 'UPDATE ' . $this->table . ' SET'; |
|
341 | + $sql = 'UPDATE '.$this->table.' SET'; |
|
342 | 342 | foreach ($cleanvars as $key => $value) { |
343 | 343 | if ((!is_array($this->keyName) && $key == $this->keyName) |
344 | 344 | || (is_array($this->keyName) |
@@ -349,7 +349,7 @@ discard block |
||
349 | 349 | if (isset($notfirst)) { |
350 | 350 | $sql .= ','; |
351 | 351 | } |
352 | - $sql .= ' ' . $key . ' = ' . $value; |
|
352 | + $sql .= ' '.$key.' = '.$value; |
|
353 | 353 | $notfirst = true; |
354 | 354 | } |
355 | 355 | if (is_array($this->keyName)) { |
@@ -358,12 +358,12 @@ discard block |
||
358 | 358 | if ($i > 0) { |
359 | 359 | $whereclause .= ' AND '; |
360 | 360 | } |
361 | - $whereclause .= $this->keyName[$i] . ' = ' . $obj->getVar($this->keyName[$i]); |
|
361 | + $whereclause .= $this->keyName[$i].' = '.$obj->getVar($this->keyName[$i]); |
|
362 | 362 | } |
363 | 363 | } else { |
364 | - $whereclause = $this->keyName . ' = ' . $obj->getVar($this->keyName); |
|
364 | + $whereclause = $this->keyName.' = '.$obj->getVar($this->keyName); |
|
365 | 365 | } |
366 | - $sql .= ' WHERE ' . $whereclause; |
|
366 | + $sql .= ' WHERE '.$whereclause; |
|
367 | 367 | } |
368 | 368 | if (false !== $force) { |
369 | 369 | $result = $this->db->queryF($sql); |
@@ -392,7 +392,7 @@ discard block |
||
392 | 392 | */ |
393 | 393 | public function updateAll($fieldname, $fieldvalue, CriteriaElement $criteria = null, $force = false) |
394 | 394 | { |
395 | - $setClause = $fieldname . ' = '; |
|
395 | + $setClause = $fieldname.' = '; |
|
396 | 396 | if (is_numeric($fieldvalue)) { |
397 | 397 | $setClause .= $fieldvalue; |
398 | 398 | } elseif (is_array($fieldvalue)) { |
@@ -400,9 +400,9 @@ discard block |
||
400 | 400 | } else { |
401 | 401 | $setClause .= $this->db->quoteString($fieldvalue); |
402 | 402 | } |
403 | - $sql = 'UPDATE ' . $this->table . ' SET ' . $setClause; |
|
403 | + $sql = 'UPDATE '.$this->table.' SET '.$setClause; |
|
404 | 404 | if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { |
405 | - $sql .= ' ' . $criteria->renderWhere(); |
|
405 | + $sql .= ' '.$criteria->renderWhere(); |
|
406 | 406 | } |
407 | 407 | if (false !== $force) { |
408 | 408 | $result = $this->db->queryF($sql); |
@@ -426,9 +426,9 @@ discard block |
||
426 | 426 | */ |
427 | 427 | public function updateFieldValue($fieldname, $fieldvalue, $criteria = null, $force = true) |
428 | 428 | { |
429 | - $sql = 'UPDATE ' . $this->table . ' SET ' . $fieldname . ' = ' . $fieldvalue; |
|
429 | + $sql = 'UPDATE '.$this->table.' SET '.$fieldname.' = '.$fieldvalue; |
|
430 | 430 | if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { |
431 | - $sql .= ' ' . $criteria->renderWhere(); |
|
431 | + $sql .= ' '.$criteria->renderWhere(); |
|
432 | 432 | } |
433 | 433 | if (false !== $force) { |
434 | 434 | $result = $this->db->queryF($sql); |
@@ -455,8 +455,8 @@ discard block |
||
455 | 455 | public function deleteAll(CriteriaElement $criteria = null, $force = true, $asObject = false) |
456 | 456 | { |
457 | 457 | if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { |
458 | - $sql = 'DELETE FROM ' . $this->table; |
|
459 | - $sql .= ' ' . $criteria->renderWhere(); |
|
458 | + $sql = 'DELETE FROM '.$this->table; |
|
459 | + $sql .= ' '.$criteria->renderWhere(); |
|
460 | 460 | if (!$this->db->query($sql)) { |
461 | 461 | return false; |
462 | 462 | } |
@@ -590,8 +590,8 @@ discard block |
||
590 | 590 | */ |
591 | 591 | public function updateCounter($fieldname, $criteria, $op = '+') |
592 | 592 | { |
593 | - $sql = 'UPDATE ' . $this->table . ' SET ' . $fieldname . ' = ' . $fieldname . $op . '1'; |
|
594 | - $sql .= ' ' . $criteria->renderWhere(); |
|
593 | + $sql = 'UPDATE '.$this->table.' SET '.$fieldname.' = '.$fieldname.$op.'1'; |
|
594 | + $sql .= ' '.$criteria->renderWhere(); |
|
595 | 595 | $result = $this->db->queryF($sql); |
596 | 596 | if (!$result) { |
597 | 597 | return false; |
@@ -613,12 +613,12 @@ discard block |
||
613 | 613 | if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { |
614 | 614 | if ($criteria->groupby != '') { |
615 | 615 | $groupby = true; |
616 | - $field = $criteria->groupby . ', '; //Not entirely secure unless you KNOW that no criteria's groupby clause is going to be mis-used |
|
616 | + $field = $criteria->groupby.', '; //Not entirely secure unless you KNOW that no criteria's groupby clause is going to be mis-used |
|
617 | 617 | } |
618 | 618 | } |
619 | - $sql = 'SELECT ' . $field . "SUM($sum) FROM " . $this->table; |
|
619 | + $sql = 'SELECT '.$field."SUM($sum) FROM ".$this->table; |
|
620 | 620 | if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { |
621 | - $sql .= ' ' . $criteria->renderWhere(); |
|
621 | + $sql .= ' '.$criteria->renderWhere(); |
|
622 | 622 | if ($criteria->groupby != '') { |
623 | 623 | $sql .= $criteria->getGroupby(); |
624 | 624 | } |
@@ -654,12 +654,12 @@ discard block |
||
654 | 654 | if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { |
655 | 655 | if ($criteria->groupby != '') { |
656 | 656 | $groupby = true; |
657 | - $field = $criteria->groupby . ', '; //Not entirely secure unless you KNOW that no criteria's groupby clause is going to be mis-used |
|
657 | + $field = $criteria->groupby.', '; //Not entirely secure unless you KNOW that no criteria's groupby clause is going to be mis-used |
|
658 | 658 | } |
659 | 659 | } |
660 | - $sql = 'SELECT ' . $field . "MAX($max) FROM " . $this->table; |
|
660 | + $sql = 'SELECT '.$field."MAX($max) FROM ".$this->table; |
|
661 | 661 | if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { |
662 | - $sql .= ' ' . $criteria->renderWhere(); |
|
662 | + $sql .= ' '.$criteria->renderWhere(); |
|
663 | 663 | if ($criteria->groupby != '') { |
664 | 664 | $sql .= $criteria->getGroupby(); |
665 | 665 | } |
@@ -692,9 +692,9 @@ discard block |
||
692 | 692 | { |
693 | 693 | $field = ''; |
694 | 694 | |
695 | - $sql = 'SELECT ' . $field . "AVG($avg) FROM " . $this->table; |
|
695 | + $sql = 'SELECT '.$field."AVG($avg) FROM ".$this->table; |
|
696 | 696 | if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { |
697 | - $sql .= ' ' . $criteria->renderWhere(); |
|
697 | + $sql .= ' '.$criteria->renderWhere(); |
|
698 | 698 | } |
699 | 699 | $result = $this->db->query($sql); |
700 | 700 | if (!$result) { |
@@ -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 = array()) |
@@ -346,7 +346,7 @@ |
||
346 | 346 | * |
347 | 347 | * @param int timestamp (depending on implementation) |
348 | 348 | * |
349 | - * @return bool |
|
349 | + * @return boolean|null |
|
350 | 350 | */ |
351 | 351 | public function isToday($stamp) |
352 | 352 | { |
@@ -65,8 +65,8 @@ |
||
65 | 65 | // Flag current day |
66 | 66 | $selectedDays = array( |
67 | 67 | new Calendar_Day(date('Y', xoops_getUserTimestamp(time(), $extcalTimeHandler->_getUserTimeZone($xoopsUser))), |
68 | - date('n', xoops_getUserTimestamp(time(), $extcalTimeHandler->_getUserTimeZone($xoopsUser))), |
|
69 | - date('j', xoops_getUserTimestamp(time(), $extcalTimeHandler->_getUserTimeZone($xoopsUser)))), |
|
68 | + date('n', xoops_getUserTimestamp(time(), $extcalTimeHandler->_getUserTimeZone($xoopsUser))), |
|
69 | + date('j', xoops_getUserTimestamp(time(), $extcalTimeHandler->_getUserTimeZone($xoopsUser)))), |
|
70 | 70 | ); |
71 | 71 | |
72 | 72 | // Build calendar object |
@@ -1,15 +1,15 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -include __DIR__ . '/../../mainfile.php'; |
|
4 | -include_once __DIR__ . '/include/constantes.php'; |
|
3 | +include __DIR__.'/../../mainfile.php'; |
|
4 | +include_once __DIR__.'/include/constantes.php'; |
|
5 | 5 | $params = array('view' => _EXTCAL_NAV_CALMONTH, 'file' => _EXTCAL_FILE_CALMONTH); |
6 | 6 | $GLOBALS['xoopsOption']['template_main'] = "extcal_view_{$params['view']}.tpl"; |
7 | -include_once __DIR__ . '/header.php'; |
|
7 | +include_once __DIR__.'/header.php'; |
|
8 | 8 | |
9 | 9 | /* ========================================================================== */ |
10 | -$year = isset($_GET['year']) ? (int)$_GET['year'] : date('Y'); |
|
11 | -$month = isset($_GET['month']) ? (int)$_GET['month'] : date('n'); |
|
12 | -$cat = isset($_GET['cat']) ? (int)$_GET['cat'] : 0; |
|
10 | +$year = isset($_GET['year']) ? (int) $_GET['year'] : date('Y'); |
|
11 | +$month = isset($_GET['month']) ? (int) $_GET['month'] : date('n'); |
|
12 | +$cat = isset($_GET['cat']) ? (int) $_GET['cat'] : 0; |
|
13 | 13 | /* ========================================================================== */ |
14 | 14 | |
15 | 15 | $form = new XoopsSimpleForm('', 'navigSelectBox', $params['file'], 'get'); |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | 'cat' => $cat, |
32 | 32 | 'externalKeys' => 'cat_id', |
33 | 33 | ); |
34 | -$events = $eventHandler->getEventsOnPeriode($criteres); |
|
34 | +$events = $eventHandler->getEventsOnPeriode($criteres); |
|
35 | 35 | /**********************************************************************/ |
36 | 36 | |
37 | 37 | // Calculating timestamp for the begin and the end of the month |
@@ -128,21 +128,21 @@ discard block |
||
128 | 128 | // Making navig data |
129 | 129 | $navig = array( |
130 | 130 | 'prev' => array( |
131 | - 'uri' => 'year=' . $pMonthCalObj->thisYear() . '&month=' . $pMonthCalObj->thisMonth(), |
|
131 | + 'uri' => 'year='.$pMonthCalObj->thisYear().'&month='.$pMonthCalObj->thisMonth(), |
|
132 | 132 | 'name' => $extcalTimeHandler->getFormatedDate($xoopsModuleConfig['nav_date_month'], $pMonthCalObj->getTimestamp()), |
133 | 133 | ), |
134 | 134 | 'this' => array( |
135 | - 'uri' => 'year=' . $monthCalObj->thisYear() . '&month=' . $monthCalObj->thisMonth(), |
|
135 | + 'uri' => 'year='.$monthCalObj->thisYear().'&month='.$monthCalObj->thisMonth(), |
|
136 | 136 | 'name' => $extcalTimeHandler->getFormatedDate($xoopsModuleConfig['nav_date_month'], $monthCalObj->getTimestamp()), |
137 | 137 | ), |
138 | 138 | 'next' => array( |
139 | - 'uri' => 'year=' . $nMonthCalObj->thisYear() . '&month=' . $nMonthCalObj->thisMonth(), |
|
139 | + 'uri' => 'year='.$nMonthCalObj->thisYear().'&month='.$nMonthCalObj->thisMonth(), |
|
140 | 140 | 'name' => $extcalTimeHandler->getFormatedDate($xoopsModuleConfig['nav_date_month'], $nMonthCalObj->getTimestamp()), |
141 | 141 | ), |
142 | 142 | ); |
143 | 143 | |
144 | 144 | // Title of the page |
145 | -$xoopsTpl->assign('xoops_pagetitle', $xoopsModule->getVar('name') . ' ' . $navig['this']['name']); |
|
145 | +$xoopsTpl->assign('xoops_pagetitle', $xoopsModule->getVar('name').' '.$navig['this']['name']); |
|
146 | 146 | |
147 | 147 | // Assigning navig data to the template |
148 | 148 | $xoopsTpl->assign('navig', $navig); |
@@ -182,4 +182,4 @@ discard block |
||
182 | 182 | $xoopsTpl->assign('lang', $lang); |
183 | 183 | $xoopsTpl->assign('view', 'calmonth'); |
184 | 184 | |
185 | -include XOOPS_ROOT_PATH . '/footer.php'; |
|
185 | +include XOOPS_ROOT_PATH.'/footer.php'; |
@@ -5,14 +5,14 @@ discard block |
||
5 | 5 | $moduleDirName = basename(dirname(__DIR__)); |
6 | 6 | $moduleHandler = xoops_getHandler('module'); |
7 | 7 | $module = $moduleHandler->getByDirname($moduleDirName); |
8 | -$pathIcon32 = '../../' . $module->getInfo('sysicons32'); |
|
9 | -$pathModIcon32 = './' . $module->getInfo('modicons32'); |
|
8 | +$pathIcon32 = '../../'.$module->getInfo('sysicons32'); |
|
9 | +$pathModIcon32 = './'.$module->getInfo('modicons32'); |
|
10 | 10 | xoops_loadLanguage('modinfo', $moduleDirName); |
11 | 11 | |
12 | -$xoopsModuleAdminPath = XOOPS_ROOT_PATH . '/' . $module->getInfo('dirmoduleadmin'); |
|
12 | +$xoopsModuleAdminPath = XOOPS_ROOT_PATH.'/'.$module->getInfo('dirmoduleadmin'); |
|
13 | 13 | |
14 | -if (!file_exists($fileinc = $xoopsModuleAdminPath . '/language/' . $GLOBALS['xoopsConfig']['language'] . '/' . 'main.php')) { |
|
15 | - $fileinc = $xoopsModuleAdminPath . '/language/english/main.php'; |
|
14 | +if (!file_exists($fileinc = $xoopsModuleAdminPath.'/language/'.$GLOBALS['xoopsConfig']['language'].'/'.'main.php')) { |
|
15 | + $fileinc = $xoopsModuleAdminPath.'/language/english/main.php'; |
|
16 | 16 | } |
17 | 17 | |
18 | 18 | include_once $fileinc; |
@@ -20,33 +20,33 @@ discard block |
||
20 | 20 | $adminmenu[] = array( |
21 | 21 | 'title' => _AM_MODULEADMIN_HOME, |
22 | 22 | 'link' => 'admin/index.php', |
23 | - 'icon' => $pathIcon32 . '/home.png' |
|
23 | + 'icon' => $pathIcon32.'/home.png' |
|
24 | 24 | ); |
25 | 25 | |
26 | 26 | $adminmenu[] = array( |
27 | 27 | 'title' => _MI_EXTCAL_CATEGORY, |
28 | 28 | 'link' => 'admin/cat.php', |
29 | - 'icon' => $pathIcon32 . '/category.png' |
|
29 | + 'icon' => $pathIcon32.'/category.png' |
|
30 | 30 | ); |
31 | 31 | |
32 | 32 | $adminmenu[] = array( |
33 | 33 | 'title' => _MI_EXTCAL_EVENT, |
34 | 34 | 'link' => 'admin/event.php', |
35 | - 'icon' => $pathIcon32 . '/event.png' |
|
35 | + 'icon' => $pathIcon32.'/event.png' |
|
36 | 36 | ); |
37 | 37 | $adminmenu[] = array( |
38 | 38 | 'title' => _MI_EXTCAL_ETABLISSEMENTS, |
39 | 39 | 'link' => 'admin/etablissement.php', |
40 | - 'icon' => $pathModIcon32 . '/etablissement.png' |
|
40 | + 'icon' => $pathModIcon32.'/etablissement.png' |
|
41 | 41 | ); |
42 | 42 | $adminmenu[] = array( |
43 | 43 | 'title' => _MI_EXTCAL_PERMISSIONS, |
44 | 44 | 'link' => 'admin/permissions.php', |
45 | - 'icon' => $pathIcon32 . '/permissions.png' |
|
45 | + 'icon' => $pathIcon32.'/permissions.png' |
|
46 | 46 | ); |
47 | 47 | |
48 | 48 | $adminmenu[] = array( |
49 | 49 | 'title' => _AM_MODULEADMIN_ABOUT, |
50 | 50 | 'link' => 'admin/about.php', |
51 | - 'icon' => $pathIcon32 . '/about.png' |
|
51 | + 'icon' => $pathIcon32.'/about.png' |
|
52 | 52 | ); |
@@ -39,32 +39,32 @@ |
||
39 | 39 | } |
40 | 40 | |
41 | 41 | switch (@$_GET['view']) { |
42 | - default: |
|
43 | - $_GET['view'] = 'calendar_year'; |
|
44 | - case 'calendar_year': |
|
45 | - require_once CALENDAR_ROOT.'Year.php'; |
|
46 | - $c = new Calendar_Year($_GET['y']); |
|
47 | - break; |
|
48 | - case 'calendar_month': |
|
49 | - require_once CALENDAR_ROOT.'Month.php'; |
|
50 | - $c = new Calendar_Month($_GET['y'], $_GET['m']); |
|
51 | - break; |
|
52 | - case 'calendar_day': |
|
53 | - require_once CALENDAR_ROOT.'Day.php'; |
|
54 | - $c = new Calendar_Day($_GET['y'], $_GET['m'], $_GET['d']); |
|
55 | - break; |
|
56 | - case 'calendar_hour': |
|
57 | - require_once CALENDAR_ROOT.'Hour.php'; |
|
58 | - $c = new Calendar_Hour($_GET['y'], $_GET['m'], $_GET['d'], $_GET['h']); |
|
59 | - break; |
|
60 | - case 'calendar_minute': |
|
61 | - require_once CALENDAR_ROOT.'Minute.php'; |
|
62 | - $c = new Calendar_Minute($_GET['y'], $_GET['m'], $_GET['d'], $_GET['h'], $_GET['i']); |
|
63 | - break; |
|
64 | - case 'calendar_second': |
|
65 | - require_once CALENDAR_ROOT.'Second.php'; |
|
66 | - $c = new Calendar_Second($_GET['y'], $_GET['m'], $_GET['d'], $_GET['h'], $_GET['i'], $_GET['s']); |
|
67 | - break; |
|
42 | + default: |
|
43 | + $_GET['view'] = 'calendar_year'; |
|
44 | + case 'calendar_year': |
|
45 | + require_once CALENDAR_ROOT.'Year.php'; |
|
46 | + $c = new Calendar_Year($_GET['y']); |
|
47 | + break; |
|
48 | + case 'calendar_month': |
|
49 | + require_once CALENDAR_ROOT.'Month.php'; |
|
50 | + $c = new Calendar_Month($_GET['y'], $_GET['m']); |
|
51 | + break; |
|
52 | + case 'calendar_day': |
|
53 | + require_once CALENDAR_ROOT.'Day.php'; |
|
54 | + $c = new Calendar_Day($_GET['y'], $_GET['m'], $_GET['d']); |
|
55 | + break; |
|
56 | + case 'calendar_hour': |
|
57 | + require_once CALENDAR_ROOT.'Hour.php'; |
|
58 | + $c = new Calendar_Hour($_GET['y'], $_GET['m'], $_GET['d'], $_GET['h']); |
|
59 | + break; |
|
60 | + case 'calendar_minute': |
|
61 | + require_once CALENDAR_ROOT.'Minute.php'; |
|
62 | + $c = new Calendar_Minute($_GET['y'], $_GET['m'], $_GET['d'], $_GET['h'], $_GET['i']); |
|
63 | + break; |
|
64 | + case 'calendar_second': |
|
65 | + require_once CALENDAR_ROOT.'Second.php'; |
|
66 | + $c = new Calendar_Second($_GET['y'], $_GET['m'], $_GET['d'], $_GET['h'], $_GET['i'], $_GET['s']); |
|
67 | + break; |
|
68 | 68 | } |
69 | 69 | |
70 | 70 | // Convert timestamp to human readable date |
@@ -42,13 +42,13 @@ discard block |
||
42 | 42 | public function testPrevMonth_Array() |
43 | 43 | { |
44 | 44 | $this->assertEqual(array( |
45 | - 'year' => 2002, |
|
46 | - 'month' => 12, |
|
47 | - 'day' => 1, |
|
48 | - 'hour' => 0, |
|
49 | - 'minute' => 0, |
|
50 | - 'second' => 0, |
|
51 | - ), $this->cal->prevMonth('array')); |
|
45 | + 'year' => 2002, |
|
46 | + 'month' => 12, |
|
47 | + 'day' => 1, |
|
48 | + 'hour' => 0, |
|
49 | + 'minute' => 0, |
|
50 | + 'second' => 0, |
|
51 | + ), $this->cal->prevMonth('array')); |
|
52 | 52 | } |
53 | 53 | |
54 | 54 | public function testThisMonth() |
@@ -69,13 +69,13 @@ discard block |
||
69 | 69 | public function testPrevDay_Array() |
70 | 70 | { |
71 | 71 | $this->assertEqual(array( |
72 | - 'year' => 2002, |
|
73 | - 'month' => 12, |
|
74 | - 'day' => 31, |
|
75 | - 'hour' => 0, |
|
76 | - 'minute' => 0, |
|
77 | - 'second' => 0, |
|
78 | - ), $this->cal->prevDay('array')); |
|
72 | + 'year' => 2002, |
|
73 | + 'month' => 12, |
|
74 | + 'day' => 31, |
|
75 | + 'hour' => 0, |
|
76 | + 'minute' => 0, |
|
77 | + 'second' => 0, |
|
78 | + ), $this->cal->prevDay('array')); |
|
79 | 79 | } |
80 | 80 | |
81 | 81 | public function testThisDay() |
@@ -71,13 +71,13 @@ |
||
71 | 71 | public function testPrevDay_Array() |
72 | 72 | { |
73 | 73 | $this->assertEqual(array( |
74 | - 'year' => 2003, |
|
75 | - 'month' => 10, |
|
76 | - 'day' => 8, |
|
77 | - 'hour' => 0, |
|
78 | - 'minute' => 0, |
|
79 | - 'second' => 0, |
|
80 | - ), $this->cal->prevDay('array')); |
|
74 | + 'year' => 2003, |
|
75 | + 'month' => 10, |
|
76 | + 'day' => 8, |
|
77 | + 'hour' => 0, |
|
78 | + 'minute' => 0, |
|
79 | + 'second' => 0, |
|
80 | + ), $this->cal->prevDay('array')); |
|
81 | 81 | } |
82 | 82 | |
83 | 83 | public function testThisDay() |
@@ -37,13 +37,13 @@ discard block |
||
37 | 37 | public function testPrevYear_Array() |
38 | 38 | { |
39 | 39 | $this->assertEqual(array( |
40 | - 'year' => 2002, |
|
41 | - 'month' => 1, |
|
42 | - 'day' => 1, |
|
43 | - 'hour' => 0, |
|
44 | - 'minute' => 0, |
|
45 | - 'second' => 0, |
|
46 | - ), $this->cal->prevYear('array')); |
|
40 | + 'year' => 2002, |
|
41 | + 'month' => 1, |
|
42 | + 'day' => 1, |
|
43 | + 'hour' => 0, |
|
44 | + 'minute' => 0, |
|
45 | + 'second' => 0, |
|
46 | + ), $this->cal->prevYear('array')); |
|
47 | 47 | } |
48 | 48 | |
49 | 49 | public function testThisYear() |
@@ -64,13 +64,13 @@ discard block |
||
64 | 64 | public function testPrevMonth_Array() |
65 | 65 | { |
66 | 66 | $this->assertEqual(array( |
67 | - 'year' => 2003, |
|
68 | - 'month' => 9, |
|
69 | - 'day' => 1, |
|
70 | - 'hour' => 0, |
|
71 | - 'minute' => 0, |
|
72 | - 'second' => 0, |
|
73 | - ), $this->cal->prevMonth('array')); |
|
67 | + 'year' => 2003, |
|
68 | + 'month' => 9, |
|
69 | + 'day' => 1, |
|
70 | + 'hour' => 0, |
|
71 | + 'minute' => 0, |
|
72 | + 'second' => 0, |
|
73 | + ), $this->cal->prevMonth('array')); |
|
74 | 74 | } |
75 | 75 | |
76 | 76 | public function testThisMonth() |
@@ -91,13 +91,13 @@ discard block |
||
91 | 91 | public function testPrevDay_Array() |
92 | 92 | { |
93 | 93 | $this->assertEqual(array( |
94 | - 'year' => 2003, |
|
95 | - 'month' => 10, |
|
96 | - 'day' => 24, |
|
97 | - 'hour' => 0, |
|
98 | - 'minute' => 0, |
|
99 | - 'second' => 0, |
|
100 | - ), $this->cal->prevDay('array')); |
|
94 | + 'year' => 2003, |
|
95 | + 'month' => 10, |
|
96 | + 'day' => 24, |
|
97 | + 'hour' => 0, |
|
98 | + 'minute' => 0, |
|
99 | + 'second' => 0, |
|
100 | + ), $this->cal->prevDay('array')); |
|
101 | 101 | } |
102 | 102 | |
103 | 103 | public function testThisDay() |