@@ -6,9 +6,9 @@ discard block |
||
| 6 | 6 | if (!@include 'Calendar/Calendar.php') { |
| 7 | 7 | define('CALENDAR_ROOT', '../../'); |
| 8 | 8 | } |
| 9 | -require_once CALENDAR_ROOT . 'Day.php'; |
|
| 10 | -require_once CALENDAR_ROOT . 'Month/Weekdays.php'; |
|
| 11 | -require_once CALENDAR_ROOT . 'Util/Textual.php'; |
|
| 9 | +require_once CALENDAR_ROOT.'Day.php'; |
|
| 10 | +require_once CALENDAR_ROOT.'Month/Weekdays.php'; |
|
| 11 | +require_once CALENDAR_ROOT.'Util/Textual.php'; |
|
| 12 | 12 | |
| 13 | 13 | // Could change language like this |
| 14 | 14 | // setlocale (LC_TIME, "de_DE"); // Unix based (probably) |
@@ -25,12 +25,12 @@ discard block |
||
| 25 | 25 | echo "<hr>Creating: new Calendar_Day(date('Y'), date('n'), date('d'));<br>"; |
| 26 | 26 | $Calendar = new Calendar_Day(date('Y'), date('n'), date('d')); |
| 27 | 27 | |
| 28 | -echo '<hr>Previous month is: ' . Calendar_Util_Textual::prevMonthName($Calendar, 'two') . '<br>'; |
|
| 29 | -echo 'This month is: ' . Calendar_Util_Textual::thisMonthName($Calendar, 'short') . '<br>'; |
|
| 30 | -echo 'Next month is: ' . Calendar_Util_Textual::nextMonthName($Calendar) . '<br><hr>'; |
|
| 31 | -echo 'Previous day is: ' . Calendar_Util_Textual::prevDayName($Calendar) . '<br>'; |
|
| 32 | -echo 'This day is: ' . Calendar_Util_Textual::thisDayName($Calendar, 'short') . '<br>'; |
|
| 33 | -echo 'Next day is: ' . Calendar_Util_Textual::nextDayName($Calendar, 'one') . '<br><hr>'; |
|
| 28 | +echo '<hr>Previous month is: '.Calendar_Util_Textual::prevMonthName($Calendar, 'two').'<br>'; |
|
| 29 | +echo 'This month is: '.Calendar_Util_Textual::thisMonthName($Calendar, 'short').'<br>'; |
|
| 30 | +echo 'Next month is: '.Calendar_Util_Textual::nextMonthName($Calendar).'<br><hr>'; |
|
| 31 | +echo 'Previous day is: '.Calendar_Util_Textual::prevDayName($Calendar).'<br>'; |
|
| 32 | +echo 'This day is: '.Calendar_Util_Textual::thisDayName($Calendar, 'short').'<br>'; |
|
| 33 | +echo 'Next day is: '.Calendar_Util_Textual::nextDayName($Calendar, 'one').'<br><hr>'; |
|
| 34 | 34 | |
| 35 | 35 | echo "Creating: new Calendar_Month_Weekdays(date('Y'), date('n'), 6); - Saturday is first day of week<br>"; |
| 36 | 36 | $Calendar = new Calendar_Month_Weekdays(date('Y'), date('n'), 6); |
@@ -38,12 +38,12 @@ discard block |
||
| 38 | 38 | ?> |
| 39 | 39 | <p>Rendering calendar....</p> |
| 40 | 40 | <table> |
| 41 | - <caption><?php echo Calendar_Util_Textual::thisMonthName($Calendar) . ' ' . $Calendar->thisYear(); ?></caption> |
|
| 41 | + <caption><?php echo Calendar_Util_Textual::thisMonthName($Calendar).' '.$Calendar->thisYear(); ?></caption> |
|
| 42 | 42 | <tr> |
| 43 | 43 | <?php |
| 44 | 44 | $dayheaders = Calendar_Util_Textual::orderedWeekdays($Calendar, 'short'); |
| 45 | 45 | foreach ($dayheaders as $dayheader) { |
| 46 | - echo '<th>' . $dayheader . '</th>'; |
|
| 46 | + echo '<th>'.$dayheader.'</th>'; |
|
| 47 | 47 | } |
| 48 | 48 | ?> |
| 49 | 49 | </tr> |
@@ -56,7 +56,7 @@ discard block |
||
| 56 | 56 | if ($Day->isEmpty()) { |
| 57 | 57 | echo '<td> </td>'; |
| 58 | 58 | } else { |
| 59 | - echo '<td>' . $Day->thisDay() . '</td>'; |
|
| 59 | + echo '<td>'.$Day->thisDay().'</td>'; |
|
| 60 | 60 | } |
| 61 | 61 | if ($Day->isLast()) { |
| 62 | 62 | echo "</tr>\n"; |
@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | /** |
| 50 | 50 | * Load Calendar base class. |
| 51 | 51 | */ |
| 52 | -require_once CALENDAR_ROOT . 'Calendar.php'; |
|
| 52 | +require_once CALENDAR_ROOT.'Calendar.php'; |
|
| 53 | 53 | |
| 54 | 54 | /** |
| 55 | 55 | * Represents a Day and builds Hours. |
@@ -113,7 +113,7 @@ discard block |
||
| 113 | 113 | */ |
| 114 | 114 | public function build($sDates = array()) |
| 115 | 115 | { |
| 116 | - require_once CALENDAR_ROOT . 'Hour.php'; |
|
| 116 | + require_once CALENDAR_ROOT.'Hour.php'; |
|
| 117 | 117 | |
| 118 | 118 | $hID = $this->cE->getHoursInDay($this->year, $this->month, $this->day); |
| 119 | 119 | for ($i = 0; $i < $hID; ++$i) { |
@@ -138,7 +138,7 @@ discard block |
||
| 138 | 138 | if ($this->year == $sDate->thisYear() && $this->month == $sDate->thisMonth() |
| 139 | 139 | && $this->day == $sDate->thisDay() |
| 140 | 140 | ) { |
| 141 | - $key = (int)$sDate->thisHour(); |
|
| 141 | + $key = (int) $sDate->thisHour(); |
|
| 142 | 142 | if (isset($this->children[$key])) { |
| 143 | 143 | $sDate->setSelected(); |
| 144 | 144 | $this->children[$key] = $sDate; |
@@ -19,8 +19,8 @@ discard block |
||
| 19 | 19 | |
| 20 | 20 | // defined('XOOPS_ROOT_PATH') || exit('XOOPS root path not defined'); |
| 21 | 21 | |
| 22 | -require_once __DIR__ . '/ExtcalPersistableObjectHandler.php'; |
|
| 23 | -require_once XOOPS_ROOT_PATH . '/class/uploader.php'; |
|
| 22 | +require_once __DIR__.'/ExtcalPersistableObjectHandler.php'; |
|
| 23 | +require_once XOOPS_ROOT_PATH.'/class/uploader.php'; |
|
| 24 | 24 | |
| 25 | 25 | /** |
| 26 | 26 | * Class ExtcalFile. |
@@ -68,13 +68,13 @@ discard block |
||
| 68 | 68 | $userId = $GLOBALS['xoopsUser'] ? $GLOBALS['xoopsUser']->getVar('uid') : 0; |
| 69 | 69 | |
| 70 | 70 | $allowedMimeType = array(); |
| 71 | - $mimeType = include XOOPS_ROOT_PATH . '/include/mimetypes.inc.php'; |
|
| 71 | + $mimeType = include XOOPS_ROOT_PATH.'/include/mimetypes.inc.php'; |
|
| 72 | 72 | foreach ($GLOBALS['xoopsModuleConfig']['allowed_file_extention'] as $fileExt) { |
| 73 | 73 | $allowedMimeType[] = $mimeType[$fileExt]; |
| 74 | 74 | } |
| 75 | 75 | |
| 76 | - $uploader = new XoopsMediaUploader(XOOPS_ROOT_PATH . '/uploads/extcal', $allowedMimeType, 3145728); |
|
| 77 | - $uploader->setPrefix($userId . '-' . $eventId . '_'); |
|
| 76 | + $uploader = new XoopsMediaUploader(XOOPS_ROOT_PATH.'/uploads/extcal', $allowedMimeType, 3145728); |
|
| 77 | + $uploader->setPrefix($userId.'-'.$eventId.'_'); |
|
| 78 | 78 | if ($uploader->fetchMedia('event_file')) { |
| 79 | 79 | if (!$uploader->upload()) { |
| 80 | 80 | return false; |
@@ -135,14 +135,14 @@ discard block |
||
| 135 | 135 | if (isset($_POST['filetokeep'])) { |
| 136 | 136 | if (is_array($_POST['filetokeep'])) { |
| 137 | 137 | $count = count($_POST['filetokeep']); |
| 138 | - $in = '(' . $_POST['filetokeep'][0]; |
|
| 138 | + $in = '('.$_POST['filetokeep'][0]; |
|
| 139 | 139 | array_shift($_POST['filetokeep']); |
| 140 | 140 | foreach ($_POST['filetokeep'] as $elmt) { |
| 141 | - $in .= ',' . $elmt; |
|
| 141 | + $in .= ','.$elmt; |
|
| 142 | 142 | } |
| 143 | 143 | $in .= ')'; |
| 144 | 144 | } else { |
| 145 | - $in = '(' . $_POST['filetokeep'] . ')'; |
|
| 145 | + $in = '('.$_POST['filetokeep'].')'; |
|
| 146 | 146 | } |
| 147 | 147 | $criteria->add(new Criteria('file_id', $in, 'NOT IN')); |
| 148 | 148 | } |
@@ -179,7 +179,7 @@ discard block |
||
| 179 | 179 | public function formatFileSize(&$file) |
| 180 | 180 | { |
| 181 | 181 | if ($file['file_size'] > 1000) { |
| 182 | - $file['formated_file_size'] = round($file['file_size'] / 1000) . 'kb'; |
|
| 182 | + $file['formated_file_size'] = round($file['file_size'] / 1000).'kb'; |
|
| 183 | 183 | } else { |
| 184 | 184 | $file['formated_file_size'] = '1kb'; |
| 185 | 185 | } |
@@ -190,8 +190,8 @@ discard block |
||
| 190 | 190 | */ |
| 191 | 191 | public function _deleteFile(&$file) |
| 192 | 192 | { |
| 193 | - if (file_exists(XOOPS_ROOT_PATH . '/uploads/extcal/' . $file->getVar('file_name'))) { |
|
| 194 | - unlink(XOOPS_ROOT_PATH . '/uploads/extcal/' . $file->getVar('file_name')); |
|
| 193 | + if (file_exists(XOOPS_ROOT_PATH.'/uploads/extcal/'.$file->getVar('file_name'))) { |
|
| 194 | + unlink(XOOPS_ROOT_PATH.'/uploads/extcal/'.$file->getVar('file_name')); |
|
| 195 | 195 | } |
| 196 | 196 | } |
| 197 | 197 | } |
@@ -42,18 +42,18 @@ |
||
| 42 | 42 | $ret = '<table><tr>'; |
| 43 | 43 | $i = 0; |
| 44 | 44 | if (count($this->getOptions()) > 1 && substr($this->getName(), -2, 2) !== '[]') { |
| 45 | - $newname = $this->getName() . '[]'; |
|
| 45 | + $newname = $this->getName().'[]'; |
|
| 46 | 46 | $this->setName($newname); |
| 47 | 47 | } |
| 48 | 48 | foreach ($this->getOptions() as $value => $name) { |
| 49 | 49 | if ((++$i) % 6 == 0) { |
| 50 | 50 | $ret .= '</tr><tr>'; |
| 51 | 51 | } |
| 52 | - $ret .= "<td><input type='checkbox' name='" . $this->getName() . "' value='" . $value . "'"; |
|
| 52 | + $ret .= "<td><input type='checkbox' name='".$this->getName()."' value='".$value."'"; |
|
| 53 | 53 | if (count($this->getValue()) > 0 && in_array($value, $this->getValue())) { |
| 54 | 54 | $ret .= ' checked'; |
| 55 | 55 | } |
| 56 | - $ret .= $this->getExtra() . '>' . $name . "</td>\n"; |
|
| 56 | + $ret .= $this->getExtra().'>'.$name."</td>\n"; |
|
| 57 | 57 | } |
| 58 | 58 | $ret .= '</tr></table>'; |
| 59 | 59 | |
@@ -43,13 +43,13 @@ |
||
| 43 | 43 | { |
| 44 | 44 | $ret = ''; |
| 45 | 45 | if (count($this->getOptions()) > 1 && substr($this->getName(), -2, 2) !== '[]') { |
| 46 | - $newname = $this->getName() . '[]'; |
|
| 46 | + $newname = $this->getName().'[]'; |
|
| 47 | 47 | $this->setName($newname); |
| 48 | 48 | } |
| 49 | 49 | foreach ($this->getOptions() as $value => $name) { |
| 50 | - $ret .= "<input type='checkbox' name='" . $this->getName() . "' value='" . $value . "'"; |
|
| 50 | + $ret .= "<input type='checkbox' name='".$this->getName()."' value='".$value."'"; |
|
| 51 | 51 | $ret .= ' checked'; |
| 52 | - $ret .= $this->getExtra() . '>' . $name . "<br>\n"; |
|
| 52 | + $ret .= $this->getExtra().'>'.$name."<br>\n"; |
|
| 53 | 53 | } |
| 54 | 54 | |
| 55 | 55 | return $ret; |
@@ -20,7 +20,7 @@ discard block |
||
| 20 | 20 | //Kraven 30 |
| 21 | 21 | // defined('XOOPS_ROOT_PATH') || exit('XOOPS root path not defined'); |
| 22 | 22 | |
| 23 | -require_once XOOPS_ROOT_PATH . '/kernel/object.php'; |
|
| 23 | +require_once XOOPS_ROOT_PATH.'/kernel/object.php'; |
|
| 24 | 24 | |
| 25 | 25 | //class ExtcalEvent extends XoopsObject |
| 26 | 26 | //class extcal_etablissement extends XoopsObject |
@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | |
| 71 | 71 | $title = $this->isNew() ? sprintf(_MD_EXTCAL_ETABLISSEMENT_ADD) : sprintf(_MD_EXTCAL_ETABLISSEMENT_EDIT); |
| 72 | 72 | |
| 73 | - require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; |
|
| 73 | + require_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; |
|
| 74 | 74 | |
| 75 | 75 | $form = new XoopsThemeForm($title, 'form', $action, 'post', true); |
| 76 | 76 | $form->setExtra('enctype="multipart/form-data"'); |
@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | $form->addElement(new XoopsFormTextArea(_MD_EXTCAL_ETABLISSEMENT_HORAIRES, 'horaires', $this->getVar('horaires'), 3, 40)); |
| 90 | 90 | $form->addElement(new XoopsFormTextArea(_MD_EXTCAL_ETABLISSEMENT_DIVERS, 'divers', $this->getVar('divers'), 5, 40)); |
| 91 | 91 | //$form->addElement(new XoopsFormTextArea(_MD_EXTCAL_ETABLISSEMENT_TARIFS, 'tarifs', $this->getVar("tarifs"), 5, 40)); |
| 92 | - $form->addElement(new XoopsFormText(_MD_EXTCAL_ETABLISSEMENT_TARIFS . ' ( ' . _MD_EXTCAL_DEVISE2 . ' )', 'tarifs', 20, 20, $this->getVar('tarifs')), false); |
|
| 92 | + $form->addElement(new XoopsFormText(_MD_EXTCAL_ETABLISSEMENT_TARIFS.' ( '._MD_EXTCAL_DEVISE2.' )', 'tarifs', 20, 20, $this->getVar('tarifs')), false); |
|
| 93 | 93 | |
| 94 | 94 | //$form->addElement(new XoopsFormTextArea(_MD_EXTCAL_ETABLISSEMENT_MAP, 'map', $this->getVar("map"), 5, 40)); |
| 95 | 95 | $form->addElement(new XoopsFormText(_MD_EXTCAL_ETABLISSEMENT_MAP, 'map', 150, 255, $this->getVar('map')), false); |
@@ -97,7 +97,7 @@ discard block |
||
| 97 | 97 | //Logo |
| 98 | 98 | $file_tray = new XoopsFormElementTray(sprintf(_MD_EXTCAL_FORM_IMG, 2), ''); |
| 99 | 99 | if ($this->getVar('logo') != '') { |
| 100 | - $file_tray->addElement(new XoopsFormLabel('', "<img src='" . XOOPS_URL . '/uploads/extcal/etablissement/' . $this->getVar('logo') . "' name='image' id='image' alt=''/><br><br>")); |
|
| 100 | + $file_tray->addElement(new XoopsFormLabel('', "<img src='".XOOPS_URL.'/uploads/extcal/etablissement/'.$this->getVar('logo')."' name='image' id='image' alt=''/><br><br>")); |
|
| 101 | 101 | $check_del_img = new XoopsFormCheckBox('', 'delimg'); |
| 102 | 102 | $check_del_img->addOption(1, _MD_EXTCAL_DEL_IMG); |
| 103 | 103 | $file_tray->addElement($check_del_img); |
@@ -108,8 +108,8 @@ discard block |
||
| 108 | 108 | } |
| 109 | 109 | $file_img->setExtra("size ='40'"); |
| 110 | 110 | $file_tray->addElement($file_img); |
| 111 | - $msg = sprintf(_MD_EXTCAL_IMG_CONFIG, (int)(3145728 / 1000), 500, 500); |
|
| 112 | - $file_label = new XoopsFormLabel('', '<br>' . $msg); |
|
| 111 | + $msg = sprintf(_MD_EXTCAL_IMG_CONFIG, (int) (3145728 / 1000), 500, 500); |
|
| 112 | + $file_label = new XoopsFormLabel('', '<br>'.$msg); |
|
| 113 | 113 | $file_tray->addElement($file_label); |
| 114 | 114 | $form->addElement($file_tray); |
| 115 | 115 | $form->addElement(new XoopsFormHidden('file', $this->getVar('logo'))); |
@@ -19,7 +19,7 @@ discard block |
||
| 19 | 19 | |
| 20 | 20 | // defined('XOOPS_ROOT_PATH') || exit('XOOPS root path not defined'); |
| 21 | 21 | |
| 22 | -require_once __DIR__ . '/ExtcalPersistableObjectHandler.php'; |
|
| 22 | +require_once __DIR__.'/ExtcalPersistableObjectHandler.php'; |
|
| 23 | 23 | |
| 24 | 24 | /** |
| 25 | 25 | * Class ExtcalEventmember. |
@@ -85,12 +85,12 @@ discard block |
||
| 85 | 85 | $eventMember = $this->getObjects(new Criteria('event_id', $eventId)); |
| 86 | 86 | $count = count($eventMember); |
| 87 | 87 | if ($count > 0) { |
| 88 | - $in = '(' . $eventMember[0]->getVar('uid'); |
|
| 88 | + $in = '('.$eventMember[0]->getVar('uid'); |
|
| 89 | 89 | array_shift($eventMember); |
| 90 | 90 | foreach ($eventMember as $member) { |
| 91 | - $in .= ',' . $member->getVar('uid'); |
|
| 91 | + $in .= ','.$member->getVar('uid'); |
|
| 92 | 92 | } |
| 93 | - $in .= ')'; |
|
| 93 | + $in .= ')'; |
|
| 94 | 94 | $criteria = new Criteria('uid', $in, 'IN'); |
| 95 | 95 | } else { |
| 96 | 96 | $criteria = new Criteria('uid', '(0)', 'IN'); |
@@ -15,7 +15,7 @@ discard block |
||
| 15 | 15 | * L'utilisation de ce formulaire d'adminitration suppose |
| 16 | 16 | * que la classe correspondante de la table a été générées avec classGenerator |
| 17 | 17 | **/ |
| 18 | -require_once XOOPS_ROOT_PATH . '/class/uploader.php'; |
|
| 18 | +require_once XOOPS_ROOT_PATH.'/class/uploader.php'; |
|
| 19 | 19 | |
| 20 | 20 | /** |
| 21 | 21 | * Class ExtcalUtility. |
@@ -49,12 +49,12 @@ discard block |
||
| 49 | 49 | public static function extcal_loadImg(&$REQUEST, &$event_picture1, &$event_picture2) |
| 50 | 50 | { |
| 51 | 51 | /////////////////////////////////////////////////////////////////////////////// |
| 52 | - $uploaddir_event = XOOPS_ROOT_PATH . '/uploads/extcal/'; |
|
| 53 | - $uploadurl_event = XOOPS_URL . '/uploads/extcal/'; |
|
| 52 | + $uploaddir_event = XOOPS_ROOT_PATH.'/uploads/extcal/'; |
|
| 53 | + $uploadurl_event = XOOPS_URL.'/uploads/extcal/'; |
|
| 54 | 54 | //$picture = ''; |
| 55 | 55 | for ($j = 1; $j < 3; ++$j) { |
| 56 | - $delimg = @$REQUEST['delimg_' . $j . '']; |
|
| 57 | - $delimg = isset($delimg) ? (int)$delimg : 0; |
|
| 56 | + $delimg = @$REQUEST['delimg_'.$j.'']; |
|
| 57 | + $delimg = isset($delimg) ? (int) $delimg : 0; |
|
| 58 | 58 | if (0 == $delimg && !empty($REQUEST['xoops_upload_file'][$j])) { |
| 59 | 59 | $upload = new XoopsMediaUploader($uploaddir_event, array( |
| 60 | 60 | 'image/gif', |
@@ -77,15 +77,15 @@ discard block |
||
| 77 | 77 | $event_picture2 = $upload->getSavedFileName(); |
| 78 | 78 | } |
| 79 | 79 | } |
| 80 | - } elseif (!empty($REQUEST['file' . $j])) { |
|
| 80 | + } elseif (!empty($REQUEST['file'.$j])) { |
|
| 81 | 81 | if ($j == 1) { |
| 82 | - $event_picture1 = $REQUEST['file' . $j]; |
|
| 82 | + $event_picture1 = $REQUEST['file'.$j]; |
|
| 83 | 83 | } elseif ($j == 2) { |
| 84 | - $event_picture2 = $REQUEST['file' . $j]; |
|
| 84 | + $event_picture2 = $REQUEST['file'.$j]; |
|
| 85 | 85 | } |
| 86 | 86 | } |
| 87 | 87 | } else { |
| 88 | - $url_event = XOOPS_ROOT_PATH . '/uploads/extcal/' . $REQUEST['file' . $j]; |
|
| 88 | + $url_event = XOOPS_ROOT_PATH.'/uploads/extcal/'.$REQUEST['file'.$j]; |
|
| 89 | 89 | if ($j == 1) { |
| 90 | 90 | $event_picture1 = ''; |
| 91 | 91 | } elseif ($j == 2) { |
@@ -181,17 +181,17 @@ discard block |
||
| 181 | 181 | $select->addOption('', ''); |
| 182 | 182 | } |
| 183 | 183 | |
| 184 | - $select->addOption('year ASC', _MD_EXTCAL_YEAR . ' ' . _MD_EXTCAL_ORDER_BY_ASC); |
|
| 185 | - $select->addOption('year DESC', _MD_EXTCAL_YEAR . ' ' . _MD_EXTCAL_ORDER_BY_DESC); |
|
| 184 | + $select->addOption('year ASC', _MD_EXTCAL_YEAR.' '._MD_EXTCAL_ORDER_BY_ASC); |
|
| 185 | + $select->addOption('year DESC', _MD_EXTCAL_YEAR.' '._MD_EXTCAL_ORDER_BY_DESC); |
|
| 186 | 186 | |
| 187 | - $select->addOption('month ASC', _MD_EXTCAL_MONTH . ' ' . _MD_EXTCAL_ORDER_BY_ASC); |
|
| 188 | - $select->addOption('month DESC', _MD_EXTCAL_MONTH . ' ' . _MD_EXTCAL_ORDER_BY_DESC); |
|
| 187 | + $select->addOption('month ASC', _MD_EXTCAL_MONTH.' '._MD_EXTCAL_ORDER_BY_ASC); |
|
| 188 | + $select->addOption('month DESC', _MD_EXTCAL_MONTH.' '._MD_EXTCAL_ORDER_BY_DESC); |
|
| 189 | 189 | |
| 190 | - $select->addOption('event_title ASC', _MD_EXTCAL_ALPHA . ' ' . _MD_EXTCAL_ORDER_BY_ASC); |
|
| 191 | - $select->addOption('event_title DESC', _MD_EXTCAL_ALPHA . ' ' . _MD_EXTCAL_ORDER_BY_DESC); |
|
| 190 | + $select->addOption('event_title ASC', _MD_EXTCAL_ALPHA.' '._MD_EXTCAL_ORDER_BY_ASC); |
|
| 191 | + $select->addOption('event_title DESC', _MD_EXTCAL_ALPHA.' '._MD_EXTCAL_ORDER_BY_DESC); |
|
| 192 | 192 | |
| 193 | - $select->addOption('cat_name ASC', _MD_EXTCAL_CATEGORY . ' ' . _MD_EXTCAL_ORDER_BY_ASC); |
|
| 194 | - $select->addOption('cat_name DESC', _MD_EXTCAL_CATEGORY . ' ' . _MD_EXTCAL_ORDER_BY_DESC); |
|
| 193 | + $select->addOption('cat_name ASC', _MD_EXTCAL_CATEGORY.' '._MD_EXTCAL_ORDER_BY_ASC); |
|
| 194 | + $select->addOption('cat_name DESC', _MD_EXTCAL_CATEGORY.' '._MD_EXTCAL_ORDER_BY_DESC); |
|
| 195 | 195 | |
| 196 | 196 | return $select; |
| 197 | 197 | } |
@@ -305,7 +305,7 @@ discard block |
||
| 305 | 305 | public static function echoDateArray($period) |
| 306 | 306 | { |
| 307 | 307 | foreach ($period as $dt) { |
| 308 | - echo $dt->format("l Y-m-d H:i:s\n") . '<br>'; |
|
| 308 | + echo $dt->format("l Y-m-d H:i:s\n").'<br>'; |
|
| 309 | 309 | } |
| 310 | 310 | } |
| 311 | 311 | |
@@ -321,7 +321,7 @@ discard block |
||
| 321 | 321 | } |
| 322 | 322 | |
| 323 | 323 | $txt = print_r($t, true); |
| 324 | - echo '<pre>Number of items: ' . count($t) . "<br>{$txt}</pre>"; |
|
| 324 | + echo '<pre>Number of items: '.count($t)."<br>{$txt}</pre>"; |
|
| 325 | 325 | } |
| 326 | 326 | |
| 327 | 327 | /*****************************************************************/ |
@@ -334,7 +334,7 @@ discard block |
||
| 334 | 334 | if ($msg != '') { |
| 335 | 335 | echo "<hr>{$msg}<hr>"; |
| 336 | 336 | } |
| 337 | - echo $line . '<br>'; |
|
| 337 | + echo $line.'<br>'; |
|
| 338 | 338 | } |
| 339 | 339 | |
| 340 | 340 | /*****************************************************************/ |
@@ -361,7 +361,7 @@ discard block |
||
| 361 | 361 | echo "<hr>{$msg}<hr>"; |
| 362 | 362 | } |
| 363 | 363 | |
| 364 | - echo 'date --->' . $tsName . ' = ' . $ts . ' - ' . date('d-m-Y H:m:s', $ts) . '<br>'; |
|
| 364 | + echo 'date --->'.$tsName.' = '.$ts.' - '.date('d-m-Y H:m:s', $ts).'<br>'; |
|
| 365 | 365 | } |
| 366 | 366 | |
| 367 | 367 | /*****************************************************************/ |
@@ -475,7 +475,7 @@ discard block |
||
| 475 | 475 | */ |
| 476 | 476 | public static function getLighterColor($color, $plancher, $plafond) |
| 477 | 477 | { |
| 478 | - require_once __DIR__ . '/colorTools.php'; |
|
| 478 | + require_once __DIR__.'/colorTools.php'; |
|
| 479 | 479 | |
| 480 | 480 | //$ct = new ColorTools(); |
| 481 | 481 | //return $ct->eclaircir($color,$plancher,$plafond); |
@@ -497,7 +497,7 @@ discard block |
||
| 497 | 497 | if (!mkdir($folder) && !is_dir($folder)) { |
| 498 | 498 | throw new \RuntimeException(sprintf('Unable to create the %s directory', $folder)); |
| 499 | 499 | } else { |
| 500 | - file_put_contents($folder . '/index.html', '<script>history.go(-1);</script>'); |
|
| 500 | + file_put_contents($folder.'/index.html', '<script>history.go(-1);</script>'); |
|
| 501 | 501 | } |
| 502 | 502 | } |
| 503 | 503 | } catch (Exception $e) { |
@@ -535,10 +535,10 @@ discard block |
||
| 535 | 535 | // @mkdir($dst); |
| 536 | 536 | while (false !== ($file = readdir($dir))) { |
| 537 | 537 | if (($file !== '.') && ($file !== '..')) { |
| 538 | - if (is_dir($src . '/' . $file)) { |
|
| 539 | - self::recurseCopy($src . '/' . $file, $dst . '/' . $file); |
|
| 538 | + if (is_dir($src.'/'.$file)) { |
|
| 539 | + self::recurseCopy($src.'/'.$file, $dst.'/'.$file); |
|
| 540 | 540 | } else { |
| 541 | - copy($src . '/' . $file, $dst . '/' . $file); |
|
| 541 | + copy($src.'/'.$file, $dst.'/'.$file); |
|
| 542 | 542 | } |
| 543 | 543 | } |
| 544 | 544 | } |
@@ -558,14 +558,14 @@ discard block |
||
| 558 | 558 | { |
| 559 | 559 | $moduleDirName = basename(dirname(__DIR__)); |
| 560 | 560 | if (null === $module) { |
| 561 | - $module = XoopsModule::getByDirname($moduleDirName); |
|
| 561 | + $module = XoopsModule::getByDirname($moduleDirName); |
|
| 562 | 562 | } |
| 563 | 563 | xoops_loadLanguage('admin', $moduleDirName); |
| 564 | 564 | //check for minimum XOOPS version |
| 565 | 565 | $currentVer = substr(XOOPS_VERSION, 6); // get the numeric part of string |
| 566 | 566 | $currArray = explode('.', $currentVer); |
| 567 | 567 | if (null === $requiredVer) { |
| 568 | - $requiredVer = '' . $module->getInfo('min_xoops'); //making sure it's a string |
|
| 568 | + $requiredVer = ''.$module->getInfo('min_xoops'); //making sure it's a string |
|
| 569 | 569 | } |
| 570 | 570 | $reqArray = explode('.', $requiredVer); |
| 571 | 571 | $success = true; |
@@ -580,7 +580,7 @@ discard block |
||
| 580 | 580 | break; |
| 581 | 581 | } |
| 582 | 582 | } else { |
| 583 | - if ((int)$v > 0) { // handles things like x.x.x.0_RC2 |
|
| 583 | + if ((int) $v > 0) { // handles things like x.x.x.0_RC2 |
|
| 584 | 584 | $success = false; |
| 585 | 585 | break; |
| 586 | 586 | } |
@@ -19,13 +19,13 @@ discard block |
||
| 19 | 19 | |
| 20 | 20 | // defined('XOOPS_ROOT_PATH') || exit('XOOPS root path not defined'); |
| 21 | 21 | |
| 22 | -require_once __DIR__ . '/ExtcalPersistableObjectHandler.php'; |
|
| 23 | -require_once __DIR__ . '/perm.php'; |
|
| 24 | -require_once __DIR__ . '/time.php'; |
|
| 25 | -require_once __DIR__ . '/config.php'; |
|
| 26 | -require_once __DIR__ . '/extDateTime.php'; |
|
| 27 | -require_once __DIR__ . '/utility.php'; |
|
| 28 | -require_once __DIR__ . '/../include/constantes.php'; |
|
| 22 | +require_once __DIR__.'/ExtcalPersistableObjectHandler.php'; |
|
| 23 | +require_once __DIR__.'/perm.php'; |
|
| 24 | +require_once __DIR__.'/time.php'; |
|
| 25 | +require_once __DIR__.'/config.php'; |
|
| 26 | +require_once __DIR__.'/extDateTime.php'; |
|
| 27 | +require_once __DIR__.'/utility.php'; |
|
| 28 | +require_once __DIR__.'/../include/constantes.php'; |
|
| 29 | 29 | |
| 30 | 30 | /** |
| 31 | 31 | * Class ExtcalEvent. |
@@ -66,7 +66,7 @@ discard block |
||
| 66 | 66 | $this->initVar('event_etablissement', XOBJ_DTYPE_INT, 5, false); |
| 67 | 67 | $this->initVar('event_icone', XOBJ_DTYPE_TXTBOX, '', false); |
| 68 | 68 | |
| 69 | - $this->externalKey['cat_id'] = array( |
|
| 69 | + $this->externalKey['cat_id'] = array( |
|
| 70 | 70 | 'className' => 'cat', |
| 71 | 71 | 'getMethodeName' => 'getCat', |
| 72 | 72 | 'keyName' => 'cat', |
@@ -402,7 +402,7 @@ discard block |
||
| 402 | 402 | |
| 403 | 403 | // while (list($k, $v) = each($events)) { |
| 404 | 404 | foreach ($events as $k => $t) { |
| 405 | - $ordre[] = (int)$v['event_start']; |
|
| 405 | + $ordre[] = (int) $v['event_start']; |
|
| 406 | 406 | $this->formatEventDate($v, $extcalConfig['event_date_week']); |
| 407 | 407 | //$v['cat']['cat_light_color'] = $v['cat']['cat_color']; |
| 408 | 408 | $v['cat']['cat_light_color'] = ExtcalUtility::getLighterColor($v['cat']['cat_color'], _EXTCAL_INFOBULLE_RGB_MIN, _EXTCAL_INFOBULLE_RGB_MAX); |
@@ -606,7 +606,7 @@ discard block |
||
| 606 | 606 | |
| 607 | 607 | reset($period); |
| 608 | 608 | foreach ($period as $dt) { |
| 609 | - echo $dt->format("l d-m-Y H:i:s\n") . '<br>'; |
|
| 609 | + echo $dt->format("l d-m-Y H:i:s\n").'<br>'; |
|
| 610 | 610 | } |
| 611 | 611 | } |
| 612 | 612 | |
@@ -939,10 +939,10 @@ discard block |
||
| 939 | 939 | $authorizedAccessCats = $this->_extcalPerm->getAuthorizedCat($user, 'extcal_cat_view'); |
| 940 | 940 | $count = count($authorizedAccessCats); |
| 941 | 941 | if ($count > 0) { |
| 942 | - $in = '(' . $authorizedAccessCats[0]; |
|
| 942 | + $in = '('.$authorizedAccessCats[0]; |
|
| 943 | 943 | array_shift($authorizedAccessCats); |
| 944 | 944 | foreach ($authorizedAccessCats as $authorizedAccessCat) { |
| 945 | - $in .= ',' . $authorizedAccessCat; |
|
| 945 | + $in .= ','.$authorizedAccessCat; |
|
| 946 | 946 | } |
| 947 | 947 | $in .= ')'; |
| 948 | 948 | $criteria->add(new Criteria('cat_id', $in, 'IN')); |
@@ -962,10 +962,10 @@ discard block |
||
| 962 | 962 | } |
| 963 | 963 | if (is_array($cats)) { |
| 964 | 964 | if (array_search(0, $cats) === false) { |
| 965 | - $in = '(' . current($cats); |
|
| 965 | + $in = '('.current($cats); |
|
| 966 | 966 | array_shift($cats); |
| 967 | 967 | foreach ($cats as $cat) { |
| 968 | - $in .= ',' . $cat; |
|
| 968 | + $in .= ','.$cat; |
|
| 969 | 969 | } |
| 970 | 970 | $in .= ')'; |
| 971 | 971 | $criteria->add(new Criteria('cat_id', $in, 'IN')); |
@@ -988,7 +988,7 @@ discard block |
||
| 988 | 988 | $fileHandler = xoops_getModuleHandler(_EXTCAL_CLS_FILE, _EXTCAL_MODULE); |
| 989 | 989 | |
| 990 | 990 | /***************************************************/ |
| 991 | - require_once __DIR__ . '/etablissement.php'; |
|
| 991 | + require_once __DIR__.'/etablissement.php'; |
|
| 992 | 992 | if ($siteSide === 'admin') { |
| 993 | 993 | $action = 'event.php?op=enreg'; |
| 994 | 994 | $cats = $catHandler->getAllCat($GLOBALS['xoopsUser'], 'all'); |
@@ -1006,7 +1006,7 @@ discard block |
||
| 1006 | 1006 | if ($mode === 'clone') { |
| 1007 | 1007 | $data['event_id'] = 0; |
| 1008 | 1008 | $event->setVar('event_id', 0); |
| 1009 | - $newTitle = $event->getVar('event_title') . ' (' . _MD_EXTCAL_CLONE_OF . $data['event_id'] . ')'; |
|
| 1009 | + $newTitle = $event->getVar('event_title').' ('._MD_EXTCAL_CLONE_OF.$data['event_id'].')'; |
|
| 1010 | 1010 | $event->setVar('event_title', $newTitle); |
| 1011 | 1011 | } |
| 1012 | 1012 | |
@@ -1190,7 +1190,7 @@ discard block |
||
| 1190 | 1190 | $form->addElement($catSelect, true); |
| 1191 | 1191 | //----------------------------------------------------------- |
| 1192 | 1192 | |
| 1193 | - $file_path = __DIR__ . '/../assets/css/images'; |
|
| 1193 | + $file_path = __DIR__.'/../assets/css/images'; |
|
| 1194 | 1194 | $tf = XoopsLists::getImgListAsArray($file_path); |
| 1195 | 1195 | array_unshift($tf, _MD_EXTCAL_NONE); |
| 1196 | 1196 | $xfIcones = new XoopsFormSelect(_MD_EXTCAL_ICONE, 'event_icone', $event_icone, ''); |
@@ -1295,7 +1295,7 @@ discard block |
||
| 1295 | 1295 | if (count($files) > 0) { |
| 1296 | 1296 | $eventFiles = new ExtcalFormFileCheckBox('', 'filetokeep'); |
| 1297 | 1297 | foreach ($files as $file) { |
| 1298 | - $name = $file['file_nicename'] . ' (<i>' . $file['file_mimetype'] . '</i>) ' . $file['formated_file_size']; |
|
| 1298 | + $name = $file['file_nicename'].' (<i>'.$file['file_mimetype'].'</i>) '.$file['formated_file_size']; |
|
| 1299 | 1299 | $eventFiles->addOption($file['file_id'], $name); |
| 1300 | 1300 | } |
| 1301 | 1301 | $fileElmtTray->addElement($eventFiles); |
@@ -1311,7 +1311,7 @@ discard block |
||
| 1311 | 1311 | //Picture1 |
| 1312 | 1312 | $file_tray = new XoopsFormElementTray(sprintf(_MD_EXTCAL_FORM_IMG, 1), ''); |
| 1313 | 1313 | if (!empty($event_picture1)) { |
| 1314 | - $file_tray->addElement(new XoopsFormLabel('', "<img src='" . XOOPS_URL . '/uploads/extcal/' . $event_picture1 . "' name='image' id='image' alt=''/><br><br>")); |
|
| 1314 | + $file_tray->addElement(new XoopsFormLabel('', "<img src='".XOOPS_URL.'/uploads/extcal/'.$event_picture1."' name='image' id='image' alt=''/><br><br>")); |
|
| 1315 | 1315 | $check_del_img = new XoopsFormCheckBox('', 'delimg_1'); |
| 1316 | 1316 | $check_del_img->addOption(1, _MD_EXTCAL_DEL_IMG); |
| 1317 | 1317 | $file_tray->addElement($check_del_img); |
@@ -1322,8 +1322,8 @@ discard block |
||
| 1322 | 1322 | } |
| 1323 | 1323 | $file_img->setExtra("size ='40'"); |
| 1324 | 1324 | $file_tray->addElement($file_img); |
| 1325 | - $msg = sprintf(_MD_EXTCAL_IMG_CONFIG, (int)(400728 / 1000), 500, 500); |
|
| 1326 | - $file_label = new XoopsFormLabel('', '<br>' . $msg); |
|
| 1325 | + $msg = sprintf(_MD_EXTCAL_IMG_CONFIG, (int) (400728 / 1000), 500, 500); |
|
| 1326 | + $file_label = new XoopsFormLabel('', '<br>'.$msg); |
|
| 1327 | 1327 | $file_tray->addElement($file_label); |
| 1328 | 1328 | $form->addElement($file_tray); |
| 1329 | 1329 | $form->addElement(new XoopsFormHidden('file1', $event_picture1)); |
@@ -1331,7 +1331,7 @@ discard block |
||
| 1331 | 1331 | //Picture2 |
| 1332 | 1332 | $file_tray = new XoopsFormElementTray(sprintf(_MD_EXTCAL_FORM_IMG, 2), ''); |
| 1333 | 1333 | if (!empty($event_picture2)) { |
| 1334 | - $file_tray->addElement(new XoopsFormLabel('', "<img src='" . XOOPS_URL . '/uploads/extcal/' . $event_picture2 . "' name='image' id='image' alt=''/><br><br>")); |
|
| 1334 | + $file_tray->addElement(new XoopsFormLabel('', "<img src='".XOOPS_URL.'/uploads/extcal/'.$event_picture2."' name='image' id='image' alt=''/><br><br>")); |
|
| 1335 | 1335 | $check_del_img = new XoopsFormCheckBox('', 'delimg_2'); |
| 1336 | 1336 | $check_del_img->addOption(1, _MD_EXTCAL_DEL_IMG); |
| 1337 | 1337 | $file_tray->addElement($check_del_img); |
@@ -1342,8 +1342,8 @@ discard block |
||
| 1342 | 1342 | } |
| 1343 | 1343 | $file_img->setExtra("size ='40'"); |
| 1344 | 1344 | $file_tray->addElement($file_img); |
| 1345 | - $msg = sprintf(_MD_EXTCAL_IMG_CONFIG, (int)(400728 / 1000), 500, 500); |
|
| 1346 | - $file_label = new XoopsFormLabel('', '<br>' . $msg); |
|
| 1345 | + $msg = sprintf(_MD_EXTCAL_IMG_CONFIG, (int) (400728 / 1000), 500, 500); |
|
| 1346 | + $file_label = new XoopsFormLabel('', '<br>'.$msg); |
|
| 1347 | 1347 | $file_tray->addElement($file_label); |
| 1348 | 1348 | $form->addElement($file_tray); |
| 1349 | 1349 | $form->addElement(new XoopsFormHidden('file2', $event_picture2)); |
@@ -1410,7 +1410,7 @@ discard block |
||
| 1410 | 1410 | $recurRules = 'weekly|'; |
| 1411 | 1411 | $recurRules .= $parm['rrule_weekly_interval']; |
| 1412 | 1412 | foreach ($parm['rrule_weekly_bydays'] as $day) { |
| 1413 | - $recurRules .= '|' . $day; |
|
| 1413 | + $recurRules .= '|'.$day; |
|
| 1414 | 1414 | } |
| 1415 | 1415 | |
| 1416 | 1416 | break; |
@@ -1420,11 +1420,11 @@ discard block |
||
| 1420 | 1420 | $parm['rrule_monthly_interval'] = 0; |
| 1421 | 1421 | } |
| 1422 | 1422 | $recurRules = 'monthly|'; |
| 1423 | - $recurRules .= $parm['rrule_monthly_interval'] . '|'; |
|
| 1423 | + $recurRules .= $parm['rrule_monthly_interval'].'|'; |
|
| 1424 | 1424 | if ($parm['rrule_monthly_byday'] != '') { |
| 1425 | 1425 | $recurRules .= $parm['rrule_monthly_byday']; |
| 1426 | 1426 | } else { |
| 1427 | - $recurRules .= 'MD' . $parm['rrule_bymonthday']; |
|
| 1427 | + $recurRules .= 'MD'.$parm['rrule_bymonthday']; |
|
| 1428 | 1428 | } |
| 1429 | 1429 | |
| 1430 | 1430 | break; |
@@ -1458,9 +1458,9 @@ discard block |
||
| 1458 | 1458 | |
| 1459 | 1459 | $recurRules = 'yearly|'; |
| 1460 | 1460 | $recurRules .= $parm['rrule_yearly_interval']; |
| 1461 | - $recurRules .= '|' . $parm['rrule_yearly_byday']; |
|
| 1461 | + $recurRules .= '|'.$parm['rrule_yearly_byday']; |
|
| 1462 | 1462 | foreach ($parm['rrule_yearly_bymonths'] as $month) { |
| 1463 | - $recurRules .= '|' . $month; |
|
| 1463 | + $recurRules .= '|'.$month; |
|
| 1464 | 1464 | } |
| 1465 | 1465 | |
| 1466 | 1466 | break; |
@@ -2394,8 +2394,8 @@ discard block |
||
| 2394 | 2394 | global $xoopsDB; |
| 2395 | 2395 | |
| 2396 | 2396 | //echo "<hr>{$andor}-{$limit}-{$offset}-{$userId}-{$user}<br>{$criteresPlus}"; |
| 2397 | - $tEvent = $xoopsDB->prefix('extcal_event') . ' AS te'; |
|
| 2398 | - $tCat = $xoopsDB->prefix('extcal_cat') . ' AS tc'; |
|
| 2397 | + $tEvent = $xoopsDB->prefix('extcal_event').' AS te'; |
|
| 2398 | + $tCat = $xoopsDB->prefix('extcal_cat').' AS tc'; |
|
| 2399 | 2399 | |
| 2400 | 2400 | $sql = 'SELECT te.*, tc.cat_name , tc.cat_color, ' |
| 2401 | 2401 | . 'year(FROM_UNIXTIME(event_start)) AS year,' |
@@ -2410,7 +2410,7 @@ discard block |
||
| 2410 | 2410 | $authorizedAccessCats = $this->_extcalPerm->getAuthorizedCat($user, 'extcal_cat_view'); |
| 2411 | 2411 | $inCat = 'te.cat_id IN (0)'; |
| 2412 | 2412 | if (count($authorizedAccessCats) > 0) { |
| 2413 | - $inCat = 'te.cat_id IN (' . implode(',', $authorizedAccessCats) . ')'; |
|
| 2413 | + $inCat = 'te.cat_id IN ('.implode(',', $authorizedAccessCats).')'; |
|
| 2414 | 2414 | } |
| 2415 | 2415 | //echo $tw[count($tw)-1]; |
| 2416 | 2416 | |
@@ -2446,12 +2446,12 @@ discard block |
||
| 2446 | 2446 | 'te.event_address', |
| 2447 | 2447 | 'tc.cat_name', |
| 2448 | 2448 | ); |
| 2449 | - $t = array(); |
|
| 2449 | + $t = array(); |
|
| 2450 | 2450 | for ($i = 0, $count = count($queryarray); $i < $count; ++$i) { |
| 2451 | 2451 | $t1[] = " %1\$s LIKE '#{$queryarray[$i]}#' "; |
| 2452 | 2452 | } |
| 2453 | 2453 | |
| 2454 | - $flt = '(' . implode(" {$andor} ", $t1) . ')'; |
|
| 2454 | + $flt = '('.implode(" {$andor} ", $t1).')'; |
|
| 2455 | 2455 | |
| 2456 | 2456 | $t = array(); |
| 2457 | 2457 | for ($h = 0, $count = count($tFields); $h < $count; ++$h) { |
@@ -2460,10 +2460,10 @@ discard block |
||
| 2460 | 2460 | |
| 2461 | 2461 | $filtre = implode(' OR ', $t); |
| 2462 | 2462 | $filtre = str_replace('#', '%', $filtre); |
| 2463 | - $tw[] = '(' . $filtre . ')'; |
|
| 2463 | + $tw[] = '('.$filtre.')'; |
|
| 2464 | 2464 | } |
| 2465 | 2465 | |
| 2466 | - $sql .= ' WHERE ' . implode(' AND ', $tw); |
|
| 2466 | + $sql .= ' WHERE '.implode(' AND ', $tw); |
|
| 2467 | 2467 | //------------------------------------------------------------ |
| 2468 | 2468 | if (count($orderBy) > 0) { |
| 2469 | 2469 | $t = array(); |
@@ -2473,7 +2473,7 @@ discard block |
||
| 2473 | 2473 | } |
| 2474 | 2474 | } |
| 2475 | 2475 | if (count($t) > 0) { |
| 2476 | - $sql .= ' ORDER BY ' . implode(',', $t); |
|
| 2476 | + $sql .= ' ORDER BY '.implode(',', $t); |
|
| 2477 | 2477 | } |
| 2478 | 2478 | } |
| 2479 | 2479 | |
@@ -2506,7 +2506,7 @@ discard block |
||
| 2506 | 2506 | $i = 0; |
| 2507 | 2507 | while ($myrow = $xoopsDB->fetchArray($result)) { |
| 2508 | 2508 | $ret[$i]['image'] = 'assets/images/icons/extcal.gif'; |
| 2509 | - $ret[$i]['link'] = 'event.php?event=' . $myrow['event_id']; |
|
| 2509 | + $ret[$i]['link'] = 'event.php?event='.$myrow['event_id']; |
|
| 2510 | 2510 | $ret[$i]['title'] = $myrow['event_title']; |
| 2511 | 2511 | $ret[$i]['time'] = $myrow['event_submitdate']; |
| 2512 | 2512 | $ret[$i]['uid'] = $myrow['event_submitter']; |
@@ -2546,23 +2546,23 @@ discard block |
||
| 2546 | 2546 | // } |
| 2547 | 2547 | $tEvent = $xoopsDB->prefix('extcal_event'); |
| 2548 | 2548 | $tCat = $xoopsDB->prefix('extcal_cat'); |
| 2549 | - $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'"; |
|
| 2549 | + $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'"; |
|
| 2550 | 2550 | |
| 2551 | 2551 | $authorizedAccessCats = $this->_extcalPerm->getAuthorizedCat($user, 'extcal_cat_view'); |
| 2552 | 2552 | $count = count($authorizedAccessCats); |
| 2553 | 2553 | if ($count > 0) { |
| 2554 | - $in = '(' . $authorizedAccessCats[0]; |
|
| 2554 | + $in = '('.$authorizedAccessCats[0]; |
|
| 2555 | 2555 | array_shift($authorizedAccessCats); |
| 2556 | 2556 | foreach ($authorizedAccessCats as $authorizedAccessCat) { |
| 2557 | - $in .= ',' . $authorizedAccessCat; |
|
| 2557 | + $in .= ','.$authorizedAccessCat; |
|
| 2558 | 2558 | } |
| 2559 | 2559 | $in .= ')'; |
| 2560 | 2560 | } else { |
| 2561 | 2561 | $in = '(0)'; |
| 2562 | 2562 | } |
| 2563 | - $sql .= " AND {$tEvent}.cat_id IN " . $in . ''; |
|
| 2563 | + $sql .= " AND {$tEvent}.cat_id IN ".$in.''; |
|
| 2564 | 2564 | if ($userId != 0) { |
| 2565 | - $sql .= " AND event_submitter = '" . $userId . "'"; |
|
| 2565 | + $sql .= " AND event_submitter = '".$userId."'"; |
|
| 2566 | 2566 | } |
| 2567 | 2567 | |
| 2568 | 2568 | //echoArray($queryarray,false); |
@@ -2582,7 +2582,7 @@ discard block |
||
| 2582 | 2582 | $t1[] = " %1\$s LIKE '#{$queryarray[$i]}#' "; |
| 2583 | 2583 | } |
| 2584 | 2584 | |
| 2585 | - $flt = '(' . implode(" {$andor} ", $t1) . ')'; |
|
| 2585 | + $flt = '('.implode(" {$andor} ", $t1).')'; |
|
| 2586 | 2586 | |
| 2587 | 2587 | $t = array(); |
| 2588 | 2588 | for ($h = 0, $count = count($tFields); $h < $count; ++$h) { |
@@ -2591,11 +2591,11 @@ discard block |
||
| 2591 | 2591 | |
| 2592 | 2592 | $filtre = implode(' OR ', $t); |
| 2593 | 2593 | $filtre = str_replace('#', '%', $filtre); |
| 2594 | - $sql .= " AND ($filtre)"; |
|
| 2594 | + $sql .= " AND ($filtre)"; |
|
| 2595 | 2595 | } |
| 2596 | 2596 | |
| 2597 | 2597 | if ($criteresPlus != '') { |
| 2598 | - $sql .= ' AND ' . $criteresPlus; |
|
| 2598 | + $sql .= ' AND '.$criteresPlus; |
|
| 2599 | 2599 | } |
| 2600 | 2600 | $sql .= ' ORDER BY event_id DESC'; |
| 2601 | 2601 | |
@@ -2605,7 +2605,7 @@ discard block |
||
| 2605 | 2605 | if ($xoopsSearch) { |
| 2606 | 2606 | while ($myrow = $xoopsDB->fetchArray($result)) { |
| 2607 | 2607 | $ret[$i]['image'] = 'assets/images/icons/extcal.gif'; |
| 2608 | - $ret[$i]['link'] = 'event.php?event=' . $myrow['event_id']; |
|
| 2608 | + $ret[$i]['link'] = 'event.php?event='.$myrow['event_id']; |
|
| 2609 | 2609 | $ret[$i]['title'] = $myrow['event_title']; |
| 2610 | 2610 | $ret[$i]['time'] = $myrow['event_submitdate']; |
| 2611 | 2611 | $ret[$i]['uid'] = $myrow['event_submitter']; |