@@ -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 | ); |
@@ -85,7 +85,7 @@ |
||
| 85 | 85 | echo "<td></td>\n"; |
| 86 | 86 | } elseif ($Day->isSelected()) { |
| 87 | 87 | echo '<td><anchor><strong><u>' . $Day->thisDay() . "</u></strong>\n<go href=\"" . $_SERVER['PHP_SELF'] . '?viewday=true&y=' . $Day->thisYear() . '&m=' . $Day->thisMonth() . '&d=' . $Day->thisDay() |
| 88 | - . "&mime=wml\" />\n</anchor></td>\n"; |
|
| 88 | + . "&mime=wml\" />\n</anchor></td>\n"; |
|
| 89 | 89 | } else { |
| 90 | 90 | echo '<td><anchor>' . $Day->thisDay() . "\n<go href=\"?viewday=true&y=" . $Day->thisYear() . '&m=' . $Day->thisMonth() . '&d=' . $Day->thisDay() . "&mime=wml\" /></anchor></td>\n"; |
| 91 | 91 | } |
@@ -8,7 +8,7 @@ discard block |
||
| 8 | 8 | { |
| 9 | 9 | list($usec, $sec) = explode(' ', microtime()); |
| 10 | 10 | |
| 11 | - return (float)$usec + (float)$sec; |
|
| 11 | + return (float) $usec + (float) $sec; |
|
| 12 | 12 | } |
| 13 | 13 | |
| 14 | 14 | $start = getmicrotime(); |
@@ -16,8 +16,8 @@ discard block |
||
| 16 | 16 | if (!@include 'Calendar/Calendar.php') { |
| 17 | 17 | define('CALENDAR_ROOT', '../../'); |
| 18 | 18 | } |
| 19 | -require_once CALENDAR_ROOT . 'Month/Weekdays.php'; |
|
| 20 | -require_once CALENDAR_ROOT . 'Day.php'; |
|
| 19 | +require_once CALENDAR_ROOT.'Month/Weekdays.php'; |
|
| 20 | +require_once CALENDAR_ROOT.'Day.php'; |
|
| 21 | 21 | |
| 22 | 22 | if (!isset($_GET['y'])) { |
| 23 | 23 | $_GET['y'] = date('Y'); |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | <anchor> |
| 49 | 49 | Back to Month View |
| 50 | 50 | <go href="<?php |
| 51 | - echo '?y=' . $Day->thisYear() . '&m=' . $Day->thisMonth() . '&d=' . $Day->thisDay() . '&mime=wml'; ?>"/> |
|
| 51 | + echo '?y='.$Day->thisYear().'&m='.$Day->thisMonth().'&d='.$Day->thisDay().'&mime=wml'; ?>"/> |
|
| 52 | 52 | </anchor> |
| 53 | 53 | </p> |
| 54 | 54 | <table> |
@@ -56,7 +56,7 @@ discard block |
||
| 56 | 56 | $Day->build(); |
| 57 | 57 | while ($Hour = $Day->fetch()) { |
| 58 | 58 | echo "<tr>\n"; |
| 59 | - echo '<td>' . date('g a', $Hour->getTimestamp()) . "</td><td>Free time!</td>\n"; |
|
| 59 | + echo '<td>'.date('g a', $Hour->getTimestamp())."</td><td>Free time!</td>\n"; |
|
| 60 | 60 | echo "</tr>\n"; |
| 61 | 61 | } ?> |
| 62 | 62 | </table> |
@@ -84,10 +84,10 @@ discard block |
||
| 84 | 84 | if ($Day->isEmpty()) { |
| 85 | 85 | echo "<td></td>\n"; |
| 86 | 86 | } elseif ($Day->isSelected()) { |
| 87 | - echo '<td><anchor><strong><u>' . $Day->thisDay() . "</u></strong>\n<go href=\"" . $_SERVER['PHP_SELF'] . '?viewday=true&y=' . $Day->thisYear() . '&m=' . $Day->thisMonth() . '&d=' . $Day->thisDay() |
|
| 87 | + echo '<td><anchor><strong><u>'.$Day->thisDay()."</u></strong>\n<go href=\"".$_SERVER['PHP_SELF'].'?viewday=true&y='.$Day->thisYear().'&m='.$Day->thisMonth().'&d='.$Day->thisDay() |
|
| 88 | 88 | . "&mime=wml\" />\n</anchor></td>\n"; |
| 89 | 89 | } else { |
| 90 | - echo '<td><anchor>' . $Day->thisDay() . "\n<go href=\"?viewday=true&y=" . $Day->thisYear() . '&m=' . $Day->thisMonth() . '&d=' . $Day->thisDay() . "&mime=wml\" /></anchor></td>\n"; |
|
| 90 | + echo '<td><anchor>'.$Day->thisDay()."\n<go href=\"?viewday=true&y=".$Day->thisYear().'&m='.$Day->thisMonth().'&d='.$Day->thisDay()."&mime=wml\" /></anchor></td>\n"; |
|
| 91 | 91 | } |
| 92 | 92 | if ($Day->isLast()) { |
| 93 | 93 | echo "</tr>\n"; |
@@ -98,7 +98,7 @@ discard block |
||
| 98 | 98 | <anchor> |
| 99 | 99 | << |
| 100 | 100 | <go href="<?php |
| 101 | - echo '?y=' . $Month->thisYear() . '&m=' . $Month->prevMonth() . '&d=' . $Month->thisDay() . '&mime=wml'; ?>"/> |
|
| 101 | + echo '?y='.$Month->thisYear().'&m='.$Month->prevMonth().'&d='.$Month->thisDay().'&mime=wml'; ?>"/> |
|
| 102 | 102 | </anchor> |
| 103 | 103 | </td> |
| 104 | 104 | <td></td> |
@@ -110,7 +110,7 @@ discard block |
||
| 110 | 110 | <anchor> |
| 111 | 111 | >> |
| 112 | 112 | <go href="<?php |
| 113 | - echo '?y=' . $Month->thisYear() . '&m=' . $Month->nextMonth() . '&d=' . $Month->thisDay() . '&mime=wml'; ?>"/> |
|
| 113 | + echo '?y='.$Month->thisYear().'&m='.$Month->nextMonth().'&d='.$Month->thisDay().'&mime=wml'; ?>"/> |
|
| 114 | 114 | </anchor> |
| 115 | 115 | </td> |
| 116 | 116 | </tr> |
@@ -120,7 +120,7 @@ discard block |
||
| 120 | 120 | |
| 121 | 121 | } ?> |
| 122 | 122 | <p><a href="<?php echo $_SERVER['PHP_SELF']; ?>">Back to HTML</a></p> |
| 123 | - <?php echo '<p>Took: ' . (getmicrotime() - $start) . ' seconds</p>'; ?> |
|
| 123 | + <?php echo '<p>Took: '.(getmicrotime() - $start).' seconds</p>'; ?> |
|
| 124 | 124 | </wml> |
| 125 | 125 | <?php |
| 126 | 126 | #-----------------------------------------------------------------------------# |
@@ -144,14 +144,14 @@ discard block |
||
| 144 | 144 | <p> |
| 145 | 145 | <anchor> |
| 146 | 146 | <a href="<?php |
| 147 | - echo '?y=' . $Day->thisYear() . '&m=' . $Day->thisMonth() . '&d=' . $Day->thisDay(); ?>">Back to Month View</a> |
|
| 147 | + echo '?y='.$Day->thisYear().'&m='.$Day->thisMonth().'&d='.$Day->thisDay(); ?>">Back to Month View</a> |
|
| 148 | 148 | </p> |
| 149 | 149 | <table> |
| 150 | 150 | <?php |
| 151 | 151 | $Day->build(); |
| 152 | 152 | while ($Hour = $Day->fetch()) { |
| 153 | 153 | echo "<tr>\n"; |
| 154 | - echo '<td>' . date('g a', $Hour->getTimestamp()) . "</td><td>Free time!</td>\n"; |
|
| 154 | + echo '<td>'.date('g a', $Hour->getTimestamp())."</td><td>Free time!</td>\n"; |
|
| 155 | 155 | echo "</tr>\n"; |
| 156 | 156 | } ?> |
| 157 | 157 | </table> |
@@ -179,9 +179,9 @@ discard block |
||
| 179 | 179 | if ($Day->isEmpty()) { |
| 180 | 180 | echo "<td></td>\n"; |
| 181 | 181 | } elseif ($Day->isSelected()) { |
| 182 | - echo '<td><a href="' . $_SERVER['PHP_SELF'] . '?viewday=true&y=' . $Day->thisYear() . '&m=' . $Day->thisMonth() . '&d=' . $Day->thisDay() . '&wml"><strong><u>' . $Day->thisDay() . "</u></strong></a></td>\n"; |
|
| 182 | + echo '<td><a href="'.$_SERVER['PHP_SELF'].'?viewday=true&y='.$Day->thisYear().'&m='.$Day->thisMonth().'&d='.$Day->thisDay().'&wml"><strong><u>'.$Day->thisDay()."</u></strong></a></td>\n"; |
|
| 183 | 183 | } else { |
| 184 | - echo '<td><a href="' . $_SERVER['PHP_SELF'] . '?viewday=true&y=' . $Day->thisYear() . '&m=' . $Day->thisMonth() . '&d=' . $Day->thisDay() . '">' . $Day->thisDay() . "</a></td>\n"; |
|
| 184 | + echo '<td><a href="'.$_SERVER['PHP_SELF'].'?viewday=true&y='.$Day->thisYear().'&m='.$Day->thisMonth().'&d='.$Day->thisDay().'">'.$Day->thisDay()."</a></td>\n"; |
|
| 185 | 185 | } |
| 186 | 186 | if ($Day->isLast()) { |
| 187 | 187 | echo "</tr>\n"; |
@@ -190,7 +190,7 @@ discard block |
||
| 190 | 190 | <tr> |
| 191 | 191 | <td> |
| 192 | 192 | <a href="<?php |
| 193 | - echo '?y=' . $Month->thisYear() . '&m=' . $Month->prevMonth() . '&d=' . $Month->thisDay(); ?>"> |
|
| 193 | + echo '?y='.$Month->thisYear().'&m='.$Month->prevMonth().'&d='.$Month->thisDay(); ?>"> |
|
| 194 | 194 | <<</a> |
| 195 | 195 | </td> |
| 196 | 196 | <td></td> |
@@ -200,7 +200,7 @@ discard block |
||
| 200 | 200 | <td></td> |
| 201 | 201 | <td> |
| 202 | 202 | <a href="<?php |
| 203 | - echo '?y=' . $Month->thisYear() . '&m=' . $Month->nextMonth() . '&d=' . $Month->thisDay(); ?>">>></a> |
|
| 203 | + echo '?y='.$Month->thisYear().'&m='.$Month->nextMonth().'&d='.$Month->thisDay(); ?>">>></a> |
|
| 204 | 204 | </td> |
| 205 | 205 | </tr> |
| 206 | 206 | </table> |
@@ -209,7 +209,7 @@ discard block |
||
| 209 | 209 | |
| 210 | 210 | } ?> |
| 211 | 211 | |
| 212 | - <?php echo '<p><b>Took: ' . (getmicrotime() - $start) . ' seconds</b></p>'; ?> |
|
| 212 | + <?php echo '<p><b>Took: '.(getmicrotime() - $start).' seconds</b></p>'; ?> |
|
| 213 | 213 | </body> |
| 214 | 214 | </html> |
| 215 | 215 | <?php |
@@ -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) { |
@@ -170,7 +170,7 @@ discard block |
||
| 170 | 170 | if (!isset($g_pcl_trace_name)) { |
| 171 | 171 | $g_pcl_trace_name = $p_name; |
| 172 | 172 | } else { |
| 173 | - $g_pcl_trace_name .= ',' . $p_name; |
|
| 173 | + $g_pcl_trace_name .= ','.$p_name; |
|
| 174 | 174 | } |
| 175 | 175 | |
| 176 | 176 | // ----- Update the function entry |
@@ -398,7 +398,7 @@ discard block |
||
| 398 | 398 | echo '<tr>'; |
| 399 | 399 | echo '<td><table width=100% border=0 cellspacing=0 cellpadding=0><tr>'; |
| 400 | 400 | $n = ($g_pcl_trace_entries[$i]['index'] + 1) * 10; |
| 401 | - echo '<td width=' . $n . '><table width=100% border=0 cellspacing=0 cellpadding=0><tr>'; |
|
| 401 | + echo '<td width='.$n.'><table width=100% border=0 cellspacing=0 cellpadding=0><tr>'; |
|
| 402 | 402 | |
| 403 | 403 | for ($j = 0; $j <= $g_pcl_trace_entries[$i]['index']; ++$j) { |
| 404 | 404 | if ($j == $g_pcl_trace_entries[$i]['index']) { |
@@ -415,25 +415,25 @@ discard block |
||
| 415 | 415 | echo '<td width=2></td>'; |
| 416 | 416 | switch ($g_pcl_trace_entries[$i]['type']) { |
| 417 | 417 | case 1: |
| 418 | - echo "<td><span style='font-size: x-small; font-family: $v_font; '>" . $g_pcl_trace_entries[$i]['name'] . '(' . $g_pcl_trace_entries[$i]['param'] . ')</span></td>'; |
|
| 418 | + echo "<td><span style='font-size: x-small; font-family: $v_font; '>".$g_pcl_trace_entries[$i]['name'].'('.$g_pcl_trace_entries[$i]['param'].')</span></td>'; |
|
| 419 | 419 | break; |
| 420 | 420 | case 2: |
| 421 | - echo "<td><span style='font-size: x-small; font-family: $v_font; '>" . $g_pcl_trace_entries[$i]['name'] . '()=' . $g_pcl_trace_entries[$i]['param'] . '</span></td>'; |
|
| 421 | + echo "<td><span style='font-size: x-small; font-family: $v_font; '>".$g_pcl_trace_entries[$i]['name'].'()='.$g_pcl_trace_entries[$i]['param'].'</span></td>'; |
|
| 422 | 422 | break; |
| 423 | 423 | case 3: |
| 424 | 424 | case 4: |
| 425 | 425 | echo '<td><table width=100% border=0 cellspacing=0 cellpadding=0><td width=20></td><td>'; |
| 426 | - echo "<span style='font-size: x-small; font-family: $v_font; '>" . $g_pcl_trace_entries[$i]['message'] . '</span>'; |
|
| 426 | + echo "<span style='font-size: x-small; font-family: $v_font; '>".$g_pcl_trace_entries[$i]['message'].'</span>'; |
|
| 427 | 427 | echo '</td></table></td>'; |
| 428 | 428 | break; |
| 429 | 429 | default: |
| 430 | - echo "<td><span style='font-size: x-small; font-family: $v_font; '>" . $g_pcl_trace_entries[$i]['name'] . '(' . $g_pcl_trace_entries[$i]['param'] . ')</span></td>'; |
|
| 430 | + echo "<td><span style='font-size: x-small; font-family: $v_font; '>".$g_pcl_trace_entries[$i]['name'].'('.$g_pcl_trace_entries[$i]['param'].')</span></td>'; |
|
| 431 | 431 | } |
| 432 | 432 | echo '</tr></table></td>'; |
| 433 | 433 | echo '<td width=5></td>'; |
| 434 | - echo '<td><span style="font-size: xx-small; font-family: $v_font; ">' . basename($g_pcl_trace_entries[$i]['file']) . '</span></td>'; |
|
| 434 | + echo '<td><span style="font-size: xx-small; font-family: $v_font; ">'.basename($g_pcl_trace_entries[$i]['file']).'</span></td>'; |
|
| 435 | 435 | echo '<td width=5></td>'; |
| 436 | - echo '<td><span style="font-size: xx-small; font-family: $v_font; ">' . $g_pcl_trace_entries[$i]['line'] . '</span></td>'; |
|
| 436 | + echo '<td><span style="font-size: xx-small; font-family: $v_font; ">'.$g_pcl_trace_entries[$i]['line'].'</span></td>'; |
|
| 437 | 437 | echo '</tr>'; |
| 438 | 438 | } |
| 439 | 439 | |
@@ -477,12 +477,12 @@ discard block |
||
| 477 | 477 | echo '---'; |
| 478 | 478 | } |
| 479 | 479 | if ($p_entry['type'] == 1) { |
| 480 | - echo '<b>' . $p_entry['name'] . '</b>(' . $p_entry['param'] . ') : ' . $p_entry['message'] . ' [' . $p_entry['file'] . ', ' . $p_entry['line'] . ']<br>'; |
|
| 480 | + echo '<b>'.$p_entry['name'].'</b>('.$p_entry['param'].') : '.$p_entry['message'].' ['.$p_entry['file'].', '.$p_entry['line'].']<br>'; |
|
| 481 | 481 | } else { |
| 482 | 482 | if ($p_entry[type] == 2) { |
| 483 | - echo '<b>' . $p_entry['name'] . '</b>()=' . $p_entry['param'] . ' : ' . $p_entry['message'] . ' [' . $p_entry['file'] . ', ' . $p_entry['line'] . ']<br>'; |
|
| 483 | + echo '<b>'.$p_entry['name'].'</b>()='.$p_entry['param'].' : '.$p_entry['message'].' ['.$p_entry['file'].', '.$p_entry['line'].']<br>'; |
|
| 484 | 484 | } else { |
| 485 | - echo $p_entry['message'] . ' [' . $p_entry['file'] . ', ' . $p_entry['line'] . ']<br>'; |
|
| 485 | + echo $p_entry['message'].' ['.$p_entry['file'].', '.$p_entry['line'].']<br>'; |
|
| 486 | 486 | } |
| 487 | 487 | } |
| 488 | 488 | } |
@@ -18,8 +18,8 @@ discard block |
||
| 18 | 18 | define('_EXTCAL_FORMAT_AGENDA_KEYD', 'Y-m-d'); |
| 19 | 19 | define('_EXTCAL_FORMAT_AGENDA_KEYT', 'H:i'); |
| 20 | 20 | |
| 21 | -include_once __DIR__ . '/constantes.php'; |
|
| 22 | -include_once __DIR__ . '/../class/utilities.php'; |
|
| 21 | +include_once __DIR__.'/constantes.php'; |
|
| 22 | +include_once __DIR__.'/../class/utilities.php'; |
|
| 23 | 23 | |
| 24 | 24 | $moduleDirName = basename(dirname(__DIR__)); |
| 25 | 25 | xoops_loadLanguage('main', $moduleDirName); |
@@ -71,7 +71,7 @@ discard block |
||
| 71 | 71 | $tj[$kj]['dayWeek'] = date('w', $tsj); |
| 72 | 72 | $tj[$kj]['jour'] = $jName[$tj[$kj]['dayWeek']]; //date('l', $tsj); |
| 73 | 73 | if ($tj[$kj]['dayWeek'] == 0) { |
| 74 | - $tj[$kj]['bg'] = "background='" . XOOPS_URL . "/modules/extcal/assets/images/trame.png'"; |
|
| 74 | + $tj[$kj]['bg'] = "background='".XOOPS_URL."/modules/extcal/assets/images/trame.png'"; |
|
| 75 | 75 | } else { |
| 76 | 76 | $tj[$kj]['bg'] = ''; |
| 77 | 77 | } |
@@ -151,16 +151,16 @@ discard block |
||
| 151 | 151 | $kd = date(_EXTCAL_FORMAT_AGENDA_KEYD, $ts); |
| 152 | 152 | $hour = date('H', $ts); |
| 153 | 153 | $minute = date('i', $ts); |
| 154 | - $m = (int)($minute / $mPlage) * $mPlage; |
|
| 154 | + $m = (int) ($minute / $mPlage) * $mPlage; |
|
| 155 | 155 | // echo "--->{$minute} / {$mPlage} = {$m}<br>"; |
| 156 | - $sMinute = (($m < 10) ? '0' . $m : $m); |
|
| 156 | + $sMinute = (($m < 10) ? '0'.$m : $m); |
|
| 157 | 157 | //$kt = date(_EXTCAL_FORMAT_AGENDA_KEYT, $ts); |
| 158 | 158 | if ($hour < $hStart) { |
| 159 | 159 | $kt = $tk0; |
| 160 | 160 | } elseif ($hour >= ($hEnd + 1)) { |
| 161 | 161 | $kt = $tk1; |
| 162 | 162 | } else { |
| 163 | - $kt = $hour . ':' . $sMinute; |
|
| 163 | + $kt = $hour.':'.$sMinute; |
|
| 164 | 164 | } |
| 165 | 165 | |
| 166 | 166 | $tAgenda[$kt]['jours'][$kd]['events'][] = $e; |
@@ -309,7 +309,7 @@ discard block |
||
| 309 | 309 | return false; |
| 310 | 310 | } |
| 311 | 311 | |
| 312 | - $file = XOOPS_ROOT_PATH . '/language/' . $xoopsConfig['language'] . '/' . $f; |
|
| 312 | + $file = XOOPS_ROOT_PATH.'/language/'.$xoopsConfig['language'].'/'.$f; |
|
| 313 | 313 | $prefix = (defined($name) ? '_MI' : '_MD'); |
| 314 | 314 | include_once $file; |
| 315 | 315 | } |
@@ -447,7 +447,7 @@ discard block |
||
| 447 | 447 | $ordre = array(); |
| 448 | 448 | while (list($k, $v) = each($tNavBar)) { |
| 449 | 449 | if (isset($tWeight[$k])) { |
| 450 | - $ordre[] = (int)$tWeight[$k]; //ordre defini dans les option du module |
|
| 450 | + $ordre[] = (int) $tWeight[$k]; //ordre defini dans les option du module |
|
| 451 | 451 | } else { |
| 452 | 452 | $ordre[] = $v['weight']; // ordre par defaut ddefini dans le tableau $tNavBar |
| 453 | 453 | } |
@@ -15,22 +15,22 @@ discard block |
||
| 15 | 15 | |
| 16 | 16 | //---------------------------------------------------------- |
| 17 | 17 | // Create eXtCal upload directory |
| 18 | - $indexFile = __DIR__ . '/index.html'; |
|
| 18 | + $indexFile = __DIR__.'/index.html'; |
|
| 19 | 19 | |
| 20 | - $dir = XOOPS_ROOT_PATH . '/uploads/extcal'; |
|
| 20 | + $dir = XOOPS_ROOT_PATH.'/uploads/extcal'; |
|
| 21 | 21 | if (!is_dir($dir)) { |
| 22 | 22 | mkdir($dir, 0777); |
| 23 | - copy($indexFile, $dir . '/index.html'); |
|
| 23 | + copy($indexFile, $dir.'/index.html'); |
|
| 24 | 24 | } |
| 25 | 25 | |
| 26 | - $dir = XOOPS_ROOT_PATH . '/uploads/extcal/etablissement'; |
|
| 26 | + $dir = XOOPS_ROOT_PATH.'/uploads/extcal/etablissement'; |
|
| 27 | 27 | if (!is_dir($dir)) { |
| 28 | 28 | mkdir($dir, 0777); |
| 29 | - copy($indexFile, $dir . '/index.html'); |
|
| 29 | + copy($indexFile, $dir.'/index.html'); |
|
| 30 | 30 | } |
| 31 | 31 | //------------------------------------------------------------ |
| 32 | 32 | |
| 33 | - $fld = XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->getVar('dirname') . '/versions/'; |
|
| 33 | + $fld = XOOPS_ROOT_PATH.'/modules/'.$xoopsModule->getVar('dirname').'/versions/'; |
|
| 34 | 34 | $cls = 'extcal_%1$s'; |
| 35 | 35 | |
| 36 | 36 | $version = array( |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | while (list($key, $val) = each($version)) { |
| 49 | 49 | if ($previousVersion < $val) { |
| 50 | 50 | $name = sprintf($cls, $key); |
| 51 | - $f = $fld . $name . '.php'; |
|
| 51 | + $f = $fld.$name.'.php'; |
|
| 52 | 52 | //ext_echo ("<hr>{$f}<hr>"); |
| 53 | 53 | if (is_readable($f)) { |
| 54 | 54 | echo "mise à jour version : {$key} = {$val}<br>"; |