@@ -29,7 +29,7 @@ |
||
| 29 | 29 | { |
| 30 | 30 | global $xoopsDB; |
| 31 | 31 | |
| 32 | - $sql = 'ALTER TABLE `' . $xoopsDB->prefix('extcal_event') . "` ADD `event_nbmember` tinyint(4) NOT NULL default '0' AFTER `event_submitdate` ;"; |
|
| 32 | + $sql = 'ALTER TABLE `'.$xoopsDB->prefix('extcal_event')."` ADD `event_nbmember` tinyint(4) NOT NULL default '0' AFTER `event_submitdate` ;"; |
|
| 33 | 33 | $xoopsDB->query($sql); |
| 34 | 34 | } |
| 35 | 35 | |
@@ -56,13 +56,13 @@ discard block |
||
| 56 | 56 | */ |
| 57 | 57 | public function insertBreak($extra = '', $class = '') |
| 58 | 58 | { |
| 59 | - $class = ($class != '') ? " class='" . preg_replace('/[^A-Za-z0-9\s\s_-]/i', '', $class) . "'" : ''; |
|
| 59 | + $class = ($class != '') ? " class='".preg_replace('/[^A-Za-z0-9\s\s_-]/i', '', $class)."'" : ''; |
|
| 60 | 60 | // Fix for $extra tag not showing |
| 61 | 61 | if ($extra) { |
| 62 | - $extra = '<tr><td colspan="2" ' . $class . '>' . $extra . '</td></tr>'; |
|
| 62 | + $extra = '<tr><td colspan="2" '.$class.'>'.$extra.'</td></tr>'; |
|
| 63 | 63 | $this->addElement($extra); |
| 64 | 64 | } else { |
| 65 | - $extra = '<tr><td colspan="2" ' . $class . '> </td></tr>'; |
|
| 65 | + $extra = '<tr><td colspan="2" '.$class.'> </td></tr>'; |
|
| 66 | 66 | $this->addElement($extra); |
| 67 | 67 | } |
| 68 | 68 | } |
@@ -92,7 +92,7 @@ discard block |
||
| 92 | 92 | } |
| 93 | 93 | |
| 94 | 94 | if ($title <> '') { |
| 95 | - $ret .= '<tr><th colspan="2">' . $title . '</th></tr>'; |
|
| 95 | + $ret .= '<tr><th colspan="2">'.$title.'</th></tr>'; |
|
| 96 | 96 | } |
| 97 | 97 | |
| 98 | 98 | $hidden = ''; |
@@ -104,24 +104,24 @@ discard block |
||
| 104 | 104 | if (!$ele->getNocolspan()) { |
| 105 | 105 | $ret .= '<tr valign="top" align="left"><td class="head">'; |
| 106 | 106 | if (($caption = $ele->getCaption()) != '') { |
| 107 | - $ret .= '<div class="xoops-form-element-caption' . ($ele->isRequired() ? '-required' : '') . '">'; |
|
| 108 | - $ret .= '<span class="caption-text">' . $caption . '</span>'; |
|
| 107 | + $ret .= '<div class="xoops-form-element-caption'.($ele->isRequired() ? '-required' : '').'">'; |
|
| 108 | + $ret .= '<span class="caption-text">'.$caption.'</span>'; |
|
| 109 | 109 | $ret .= '<span class="caption-marker">*</span>'; |
| 110 | 110 | $ret .= '</div>'; |
| 111 | 111 | } |
| 112 | 112 | if (($desc = $ele->getDescription()) != '') { |
| 113 | - $ret .= '<div class="xoops-form-element-help">' . $desc . '</div>'; |
|
| 113 | + $ret .= '<div class="xoops-form-element-help">'.$desc.'</div>'; |
|
| 114 | 114 | } |
| 115 | - $ret .= '</td><td class="' . $class . '">' . $ele->render() . '</td></tr>' . NWLINE; |
|
| 115 | + $ret .= '</td><td class="'.$class.'">'.$ele->render().'</td></tr>'.NWLINE; |
|
| 116 | 116 | } else { |
| 117 | 117 | $ret .= '<tr valign="top" align="left"><td class="head" colspan="2">'; |
| 118 | 118 | if (($caption = $ele->getCaption()) != '') { |
| 119 | - $ret .= '<div class="xoops-form-element-caption' . ($ele->isRequired() ? '-required' : '') . '">'; |
|
| 120 | - $ret .= '<span class="caption-text">' . $caption . '</span>'; |
|
| 119 | + $ret .= '<div class="xoops-form-element-caption'.($ele->isRequired() ? '-required' : '').'">'; |
|
| 120 | + $ret .= '<span class="caption-text">'.$caption.'</span>'; |
|
| 121 | 121 | $ret .= '<span class="caption-marker">*</span>'; |
| 122 | 122 | $ret .= '</div>'; |
| 123 | 123 | } |
| 124 | - $ret .= '</td></tr><tr valign="top" align="left"><td class="' . $class . '" colspan="2">' . $ele->render() . '</td></tr>'; |
|
| 124 | + $ret .= '</td></tr><tr valign="top" align="left"><td class="'.$class.'" colspan="2">'.$ele->render().'</td></tr>'; |
|
| 125 | 125 | } |
| 126 | 126 | } else { |
| 127 | 127 | $hidden .= $ele->render(); |
@@ -132,7 +132,7 @@ discard block |
||
| 132 | 132 | $ret .= '</table>'; |
| 133 | 133 | } |
| 134 | 134 | |
| 135 | - $ret .= NWLINE . ' ' . $hidden . NWLINE; |
|
| 135 | + $ret .= NWLINE.' '.$hidden.NWLINE; |
|
| 136 | 136 | |
| 137 | 137 | return $ret; |
| 138 | 138 | } |
@@ -159,9 +159,9 @@ |
||
| 159 | 159 | $tHex = array('', '', '', ''); |
| 160 | 160 | |
| 161 | 161 | $tHex[0] = $aColors[0]; |
| 162 | - $tHex[1] = substr('00' . dechex($aColors[1]), -2); |
|
| 163 | - $tHex[2] = substr('00' . dechex($aColors[2]), -2); |
|
| 164 | - $tHex[3] = substr('00' . dechex($aColors[3]), -2); |
|
| 162 | + $tHex[1] = substr('00'.dechex($aColors[1]), -2); |
|
| 163 | + $tHex[2] = substr('00'.dechex($aColors[2]), -2); |
|
| 164 | + $tHex[3] = substr('00'.dechex($aColors[3]), -2); |
|
| 165 | 165 | |
| 166 | 166 | $colorHexa = implode('', $tHex); |
| 167 | 167 | |
@@ -203,7 +203,7 @@ discard block |
||
| 203 | 203 | */ |
| 204 | 204 | public function setMin($min) |
| 205 | 205 | { |
| 206 | - $this->_min = (int)$min; |
|
| 206 | + $this->_min = (int) $min; |
|
| 207 | 207 | } |
| 208 | 208 | /*-----------------------------------------------------------------*/ |
| 209 | 209 | /** |
@@ -221,7 +221,7 @@ discard block |
||
| 221 | 221 | */ |
| 222 | 222 | public function setMax($max) |
| 223 | 223 | { |
| 224 | - $this->_max = (int)$max; |
|
| 224 | + $this->_max = (int) $max; |
|
| 225 | 225 | } |
| 226 | 226 | |
| 227 | 227 | /*-----------------------------------------------------------------*/ |
@@ -242,7 +242,7 @@ discard block |
||
| 242 | 242 | */ |
| 243 | 243 | public function setSmallIncrement($smallIncrement) |
| 244 | 244 | { |
| 245 | - $this->_smallIncrement = (int)$smallIncrement; |
|
| 245 | + $this->_smallIncrement = (int) $smallIncrement; |
|
| 246 | 246 | if ($this->_smallIncrement == 0) { |
| 247 | 247 | $this->_smallIncrement = 1; |
| 248 | 248 | } |
@@ -264,7 +264,7 @@ discard block |
||
| 264 | 264 | */ |
| 265 | 265 | public function setLargeIncrement($largeIncrement) |
| 266 | 266 | { |
| 267 | - $this->_largeIncrement = (int)$largeIncrement; |
|
| 267 | + $this->_largeIncrement = (int) $largeIncrement; |
|
| 268 | 268 | if ($this->_largeIncrement == 0) { |
| 269 | 269 | $this->_largeIncrement = 10; |
| 270 | 270 | } |
@@ -405,7 +405,7 @@ discard block |
||
| 405 | 405 | $sFolderImg = "{$sSpinFolder}/images/{$this->getImgFolder()}/"; |
| 406 | 406 | |
| 407 | 407 | $prefixe = $this->getName(); |
| 408 | - $prefixe2 = 'spin' . $prefixe; |
|
| 408 | + $prefixe2 = 'spin'.$prefixe; |
|
| 409 | 409 | |
| 410 | 410 | $smallIncrement = $this->getSmallIncrement(); |
| 411 | 411 | $largeIncrement = $this->getLargeIncrement(); |
@@ -424,7 +424,7 @@ discard block |
||
| 424 | 424 | $t = array(); |
| 425 | 425 | |
| 426 | 426 | if ($this->_loadJS) { |
| 427 | - $js = $sSpinFolder . '/js/spin.js'; |
|
| 427 | + $js = $sSpinFolder.'/js/spin.js'; |
|
| 428 | 428 | $t[] = "<script src='{$js}' type='text/javascript'></script>"; |
| 429 | 429 | } |
| 430 | 430 | |
@@ -469,7 +469,7 @@ discard block |
||
| 469 | 469 | //------------------------------------------------------- |
| 470 | 470 | |
| 471 | 471 | $t[] = ' </tr>'; |
| 472 | - $t[] = '</table>' . "\n"; |
|
| 472 | + $t[] = '</table>'."\n"; |
|
| 473 | 473 | $t[] = '</div>'; |
| 474 | 474 | //------------------------------------------- |
| 475 | 475 | $html = implode("\n", $t); |
@@ -15,11 +15,11 @@ discard block |
||
| 15 | 15 | */ |
| 16 | 16 | public function __construct(&$form, $startTS = 0, $endTS = 0) |
| 17 | 17 | { |
| 18 | - $startTS = (int)$startTS; |
|
| 18 | + $startTS = (int) $startTS; |
|
| 19 | 19 | $startTS = ($startTS > 0) ? $startTS : time(); |
| 20 | 20 | $startDatetime = getdate($startTS); |
| 21 | 21 | |
| 22 | - $endTS = (int)$endTS; |
|
| 22 | + $endTS = (int) $endTS; |
|
| 23 | 23 | $endTS = ($endTS > 0) ? $endTS : time(); |
| 24 | 24 | $endDatetime = getdate($endTS); |
| 25 | 25 | |
@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | for ($i = 0; $i < 24; ++$i) { |
| 28 | 28 | for ($j = 0; $j < _EXTCAL_TS_MINUTE; $j += 15) { |
| 29 | 29 | $key = ($i * _EXTCAL_TS_HOUR) + ($j * _EXTCAL_TS_MINUTE); |
| 30 | - $timearray[$key] = ($j != 0) ? $i . ':' . $j : $i . ':0' . $j; |
|
| 30 | + $timearray[$key] = ($j != 0) ? $i.':'.$j : $i.':0'.$j; |
|
| 31 | 31 | } |
| 32 | 32 | } |
| 33 | 33 | ksort($timearray); |
@@ -21,7 +21,7 @@ |
||
| 21 | 21 | $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE); |
| 22 | 22 | $event = $eventHandler->getEvent($itemId, 0, true); |
| 23 | 23 | $item['name'] = $event->getVar('event_title'); |
| 24 | - $item['url'] = XOOPS_URL . '/modules/extcal/event.php?event=' . $event->getVar('event_id'); |
|
| 24 | + $item['url'] = XOOPS_URL.'/modules/extcal/event.php?event='.$event->getVar('event_id'); |
|
| 25 | 25 | |
| 26 | 26 | return $item; |
| 27 | 27 | } |
@@ -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 | ); |
@@ -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() |