@@ -19,7 +19,7 @@ discard block |
||
| 19 | 19 | |
| 20 | 20 | use XoopsModules\Extcal; |
| 21 | 21 | |
| 22 | -require_once dirname(__DIR__) . '/include/constantes.php'; |
|
| 22 | +require_once dirname(__DIR__).'/include/constantes.php'; |
|
| 23 | 23 | |
| 24 | 24 | /** |
| 25 | 25 | * @param $options |
@@ -66,22 +66,22 @@ discard block |
||
| 66 | 66 | |
| 67 | 67 | $cats = $catHandler->getAllCat($xoopsUser, 'extcal_cat_view'); |
| 68 | 68 | |
| 69 | - $form = _MB_EXTCAL_DISPLAY . " \n"; |
|
| 70 | - $form .= '<input name="options[0]" size="5" maxlength="255" value="' . $options[0] . '" type="text"> ' . _MB_EXTCAL_EVENT . '<br>'; |
|
| 71 | - $form .= _MB_EXTCAL_TITLE_LENGTH . ' : <input name="options[1]" size="5" maxlength="255" value="' . $options[1] . '" type="text"><br>'; |
|
| 69 | + $form = _MB_EXTCAL_DISPLAY." \n"; |
|
| 70 | + $form .= '<input name="options[0]" size="5" maxlength="255" value="'.$options[0].'" type="text"> '._MB_EXTCAL_EVENT.'<br>'; |
|
| 71 | + $form .= _MB_EXTCAL_TITLE_LENGTH.' : <input name="options[1]" size="5" maxlength="255" value="'.$options[1].'" type="text"><br>'; |
|
| 72 | 72 | array_shift($options); |
| 73 | 73 | array_shift($options); |
| 74 | - $form .= _MB_EXTCAL_CAT_TO_USE . '<br><select name="options[]" multiple="multiple" size="5">'; |
|
| 74 | + $form .= _MB_EXTCAL_CAT_TO_USE.'<br><select name="options[]" multiple="multiple" size="5">'; |
|
| 75 | 75 | if (false === array_search(0, $options)) { |
| 76 | - $form .= '<option value="0">' . _MB_EXTCAL_ALL_CAT . '</option>'; |
|
| 76 | + $form .= '<option value="0">'._MB_EXTCAL_ALL_CAT.'</option>'; |
|
| 77 | 77 | } else { |
| 78 | - $form .= '<option value="0" selected="selected">' . _MB_EXTCAL_ALL_CAT . '</option>'; |
|
| 78 | + $form .= '<option value="0" selected="selected">'._MB_EXTCAL_ALL_CAT.'</option>'; |
|
| 79 | 79 | } |
| 80 | 80 | foreach ($cats as $cat) { |
| 81 | 81 | if (false === array_search($cat->getVar('cat_id'), $options)) { |
| 82 | - $form .= '<option value="' . $cat->getVar('cat_id') . '">' . $cat->getVar('cat_name') . '</option>'; |
|
| 82 | + $form .= '<option value="'.$cat->getVar('cat_id').'">'.$cat->getVar('cat_name').'</option>'; |
|
| 83 | 83 | } else { |
| 84 | - $form .= '<option value="' . $cat->getVar('cat_id') . '" selected="selected">' . $cat->getVar('cat_name') . '</option>'; |
|
| 84 | + $form .= '<option value="'.$cat->getVar('cat_id').'" selected="selected">'.$cat->getVar('cat_name').'</option>'; |
|
| 85 | 85 | } |
| 86 | 86 | } |
| 87 | 87 | $form .= '</select>'; |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -require_once dirname(__DIR__) . '/include/constantes.php'; |
|
| 3 | +require_once dirname(__DIR__).'/include/constantes.php'; |
|
| 4 | 4 | |
| 5 | 5 | //--------------------------------------------------------------------- |
| 6 | 6 | |
@@ -19,7 +19,7 @@ discard block |
||
| 19 | 19 | |
| 20 | 20 | use XoopsModules\Extcal; |
| 21 | 21 | |
| 22 | -require_once dirname(__DIR__) . '/include/constantes.php'; |
|
| 22 | +require_once dirname(__DIR__).'/include/constantes.php'; |
|
| 23 | 23 | |
| 24 | 24 | /******************************************************/ |
| 25 | 25 | /* Ajour JJD - Evenements par categries */ |
@@ -92,22 +92,22 @@ discard block |
||
| 92 | 92 | |
| 93 | 93 | $cats = $catHandler->getAllCat($xoopsUser, 'extcal_cat_view'); |
| 94 | 94 | |
| 95 | - $form = _MB_EXTCAL_DISPLAY . " \n"; |
|
| 96 | - $form .= '<input name="options[0]" size="5" maxlength="255" value="' . $options[0] . '" type="text"> ' . _MB_EXTCAL_EVENT . '<br>'; |
|
| 97 | - $form .= _MB_EXTCAL_TITLE_LENGTH . ' : <input name="options[1]" size="5" maxlength="255" value="' . $options[1] . '" type="text"><br>'; |
|
| 95 | + $form = _MB_EXTCAL_DISPLAY." \n"; |
|
| 96 | + $form .= '<input name="options[0]" size="5" maxlength="255" value="'.$options[0].'" type="text"> '._MB_EXTCAL_EVENT.'<br>'; |
|
| 97 | + $form .= _MB_EXTCAL_TITLE_LENGTH.' : <input name="options[1]" size="5" maxlength="255" value="'.$options[1].'" type="text"><br>'; |
|
| 98 | 98 | array_shift($options); |
| 99 | 99 | array_shift($options); |
| 100 | - $form .= _MB_EXTCAL_CAT_TO_USE . '<br><select name="options[]" multiple="multiple" size="5">'; |
|
| 100 | + $form .= _MB_EXTCAL_CAT_TO_USE.'<br><select name="options[]" multiple="multiple" size="5">'; |
|
| 101 | 101 | if (false === array_search(0, $options)) { |
| 102 | - $form .= '<option value="0">' . _MB_EXTCAL_ALL_CAT . '</option>'; |
|
| 102 | + $form .= '<option value="0">'._MB_EXTCAL_ALL_CAT.'</option>'; |
|
| 103 | 103 | } else { |
| 104 | - $form .= '<option value="0" selected="selected">' . _MB_EXTCAL_ALL_CAT . '</option>'; |
|
| 104 | + $form .= '<option value="0" selected="selected">'._MB_EXTCAL_ALL_CAT.'</option>'; |
|
| 105 | 105 | } |
| 106 | 106 | foreach ($cats as $cat) { |
| 107 | 107 | if (false === array_search($cat->getVar('cat_id'), $options)) { |
| 108 | - $form .= '<option value="' . $cat->getVar('cat_id') . '">' . $cat->getVar('cat_name') . '</option>'; |
|
| 108 | + $form .= '<option value="'.$cat->getVar('cat_id').'">'.$cat->getVar('cat_name').'</option>'; |
|
| 109 | 109 | } else { |
| 110 | - $form .= '<option value="' . $cat->getVar('cat_id') . '" selected="selected">' . $cat->getVar('cat_name') . '</option>'; |
|
| 110 | + $form .= '<option value="'.$cat->getVar('cat_id').'" selected="selected">'.$cat->getVar('cat_name').'</option>'; |
|
| 111 | 111 | } |
| 112 | 112 | } |
| 113 | 113 | $form .= '</select>'; |
@@ -19,7 +19,7 @@ discard block |
||
| 19 | 19 | |
| 20 | 20 | use XoopsModules\Extcal; |
| 21 | 21 | |
| 22 | -require_once dirname(__DIR__) . '/include/constantes.php'; |
|
| 22 | +require_once dirname(__DIR__).'/include/constantes.php'; |
|
| 23 | 23 | |
| 24 | 24 | /** |
| 25 | 25 | * @param $options |
@@ -65,22 +65,22 @@ discard block |
||
| 65 | 65 | |
| 66 | 66 | $cats = $catHandler->getAllCat($xoopsUser, 'extcal_cat_view'); |
| 67 | 67 | |
| 68 | - $form = _MB_EXTCAL_DISPLAY . " \n"; |
|
| 69 | - $form .= '<input name="options[0]" size="5" maxlength="255" value="' . $options[0] . '" type="text"> ' . _MB_EXTCAL_EVENT . '<br>'; |
|
| 70 | - $form .= _MB_EXTCAL_TITLE_LENGTH . ' : <input name="options[1]" size="5" maxlength="255" value="' . $options[1] . '" type="text"><br>'; |
|
| 68 | + $form = _MB_EXTCAL_DISPLAY." \n"; |
|
| 69 | + $form .= '<input name="options[0]" size="5" maxlength="255" value="'.$options[0].'" type="text"> '._MB_EXTCAL_EVENT.'<br>'; |
|
| 70 | + $form .= _MB_EXTCAL_TITLE_LENGTH.' : <input name="options[1]" size="5" maxlength="255" value="'.$options[1].'" type="text"><br>'; |
|
| 71 | 71 | array_shift($options); |
| 72 | 72 | array_shift($options); |
| 73 | - $form .= _MB_EXTCAL_CAT_TO_USE . '<br><select name="options[]" multiple="multiple" size="5">'; |
|
| 73 | + $form .= _MB_EXTCAL_CAT_TO_USE.'<br><select name="options[]" multiple="multiple" size="5">'; |
|
| 74 | 74 | if (false === array_search(0, $options)) { |
| 75 | - $form .= '<option value="0">' . _MB_EXTCAL_ALL_CAT . '</option>'; |
|
| 75 | + $form .= '<option value="0">'._MB_EXTCAL_ALL_CAT.'</option>'; |
|
| 76 | 76 | } else { |
| 77 | - $form .= '<option value="0" selected="selected">' . _MB_EXTCAL_ALL_CAT . '</option>'; |
|
| 77 | + $form .= '<option value="0" selected="selected">'._MB_EXTCAL_ALL_CAT.'</option>'; |
|
| 78 | 78 | } |
| 79 | 79 | foreach ($cats as $cat) { |
| 80 | 80 | if (false === array_search($cat->getVar('cat_id'), $options)) { |
| 81 | - $form .= '<option value="' . $cat->getVar('cat_id') . '">' . $cat->getVar('cat_name') . '</option>'; |
|
| 81 | + $form .= '<option value="'.$cat->getVar('cat_id').'">'.$cat->getVar('cat_name').'</option>'; |
|
| 82 | 82 | } else { |
| 83 | - $form .= '<option value="' . $cat->getVar('cat_id') . '" selected="selected">' . $cat->getVar('cat_name') . '</option>'; |
|
| 83 | + $form .= '<option value="'.$cat->getVar('cat_id').'" selected="selected">'.$cat->getVar('cat_name').'</option>'; |
|
| 84 | 84 | } |
| 85 | 85 | } |
| 86 | 86 | $form .= '</select>'; |
@@ -19,7 +19,7 @@ discard block |
||
| 19 | 19 | |
| 20 | 20 | use XoopsModules\Extcal; |
| 21 | 21 | |
| 22 | -require_once dirname(__DIR__) . '/include/constantes.php'; |
|
| 22 | +require_once dirname(__DIR__).'/include/constantes.php'; |
|
| 23 | 23 | |
| 24 | 24 | /** |
| 25 | 25 | * @param $options |
@@ -69,23 +69,23 @@ discard block |
||
| 69 | 69 | |
| 70 | 70 | $cats = $catHandler->getAllCat($xoopsUser, 'extcal_cat_view'); |
| 71 | 71 | |
| 72 | - $form = _MB_EXTCAL_DISPLAY . " \n"; |
|
| 73 | - $form .= '<input name="options[0]" size="5" maxlength="255" value="' . $options[0] . '" type="text"> ' . _MB_EXTCAL_EVENT . '<br>'; |
|
| 74 | - $form .= _MB_EXTCAL_TITLE_LENGTH . ' : <input name="options[1]" size="5" maxlength="255" value="' . $options[1] . '" type="text"><br>'; |
|
| 72 | + $form = _MB_EXTCAL_DISPLAY." \n"; |
|
| 73 | + $form .= '<input name="options[0]" size="5" maxlength="255" value="'.$options[0].'" type="text"> '._MB_EXTCAL_EVENT.'<br>'; |
|
| 74 | + $form .= _MB_EXTCAL_TITLE_LENGTH.' : <input name="options[1]" size="5" maxlength="255" value="'.$options[1].'" type="text"><br>'; |
|
| 75 | 75 | array_shift($options); |
| 76 | 76 | array_shift($options); |
| 77 | - $form .= _MB_EXTCAL_CAT_TO_USE . '<br><select name="options[]" multiple="multiple" size="5">'; |
|
| 77 | + $form .= _MB_EXTCAL_CAT_TO_USE.'<br><select name="options[]" multiple="multiple" size="5">'; |
|
| 78 | 78 | if (false === array_search(0, $options)) { |
| 79 | - $form .= '<option value="0">' . _MB_EXTCAL_ALL_CAT . '</option>'; |
|
| 79 | + $form .= '<option value="0">'._MB_EXTCAL_ALL_CAT.'</option>'; |
|
| 80 | 80 | } else { |
| 81 | - $form .= '<option value="0" selected="selected">' . _MB_EXTCAL_ALL_CAT . '</option>'; |
|
| 81 | + $form .= '<option value="0" selected="selected">'._MB_EXTCAL_ALL_CAT.'</option>'; |
|
| 82 | 82 | } |
| 83 | 83 | /** @var Extcal\Category $cat */ |
| 84 | 84 | foreach ($cats as $cat) { |
| 85 | 85 | if (false === array_search($cat->getVar('cat_id'), $options)) { |
| 86 | - $form .= '<option value="' . $cat->getVar('cat_id') . '">' . $cat->getVar('cat_name') . '</option>'; |
|
| 86 | + $form .= '<option value="'.$cat->getVar('cat_id').'">'.$cat->getVar('cat_name').'</option>'; |
|
| 87 | 87 | } else { |
| 88 | - $form .= '<option value="' . $cat->getVar('cat_id') . '" selected="selected">' . $cat->getVar('cat_name') . '</option>'; |
|
| 88 | + $form .= '<option value="'.$cat->getVar('cat_id').'" selected="selected">'.$cat->getVar('cat_name').'</option>'; |
|
| 89 | 89 | } |
| 90 | 90 | } |
| 91 | 91 | $form .= '</select>'; |
@@ -20,7 +20,7 @@ discard block |
||
| 20 | 20 | use XoopsModules\Extcal; |
| 21 | 21 | |
| 22 | 22 | global $extcalConfig, $xoopsUser; |
| 23 | -require_once dirname(__DIR__) . '/include/constantes.php'; |
|
| 23 | +require_once dirname(__DIR__).'/include/constantes.php'; |
|
| 24 | 24 | // require_once dirname(__DIR__) . '/class/Utility.php'; |
| 25 | 25 | // require_once dirname(__DIR__) . '/class/tableForm.php'; |
| 26 | 26 | //--------------------------------------------------------------------------- |
@@ -37,9 +37,9 @@ discard block |
||
| 37 | 37 | |
| 38 | 38 | // // require_once dirname(__DIR__) . '/class/Config.php'; |
| 39 | 39 | |
| 40 | - require_once _EXTCAL_PEAR_CALENDAR_ROOT . '/Util/Textual.php'; |
|
| 41 | - require_once _EXTCAL_PEAR_CALENDAR_ROOT . '/Month/Weeks.php'; |
|
| 42 | - require_once _EXTCAL_PEAR_CALENDAR_ROOT . '/Day.php'; |
|
| 40 | + require_once _EXTCAL_PEAR_CALENDAR_ROOT.'/Util/Textual.php'; |
|
| 41 | + require_once _EXTCAL_PEAR_CALENDAR_ROOT.'/Month/Weeks.php'; |
|
| 42 | + require_once _EXTCAL_PEAR_CALENDAR_ROOT.'/Day.php'; |
|
| 43 | 43 | // require_once CALENDAR_ROOT . 'Month/Weeks.php'; |
| 44 | 44 | // require_once CALENDAR_ROOT . 'Day.php'; |
| 45 | 45 | |
@@ -128,7 +128,7 @@ discard block |
||
| 128 | 128 | 'category' => $tCatSelected, |
| 129 | 129 | 'externalKeys' => 'cat_id', |
| 130 | 130 | ]; |
| 131 | - $events = $eventHandler->getEventsOnPeriode($criteres); |
|
| 131 | + $events = $eventHandler->getEventsOnPeriode($criteres); |
|
| 132 | 132 | } else { |
| 133 | 133 | $events = []; |
| 134 | 134 | } |
@@ -193,7 +193,7 @@ discard block |
||
| 193 | 193 | 'number' => $dayCalObj->thisDay(), |
| 194 | 194 | 'isSelected' => $dayCalObj->isSelected(), |
| 195 | 195 | ]; |
| 196 | - $day = $dayCalObj->thisDay(); |
|
| 196 | + $day = $dayCalObj->thisDay(); |
|
| 197 | 197 | if (isset($eventsArray[$day]) && !$dayCalObj->isEmpty()) { |
| 198 | 198 | $tableRows[$rowId]['week'][$cellId]['haveEvents'] = true; |
| 199 | 199 | $tableRows[$rowId]['week'][$cellId]['color'] = $eventsArray[$day]['color']; |
@@ -223,15 +223,15 @@ discard block |
||
| 223 | 223 | // Making navig data |
| 224 | 224 | $navig = [ |
| 225 | 225 | 'page' => $extcalConfig['start_page'], |
| 226 | - 'uri' => 'year=' . $monthCalObj->thisYear() . '&month=' . $monthCalObj->thisMonth(), |
|
| 226 | + 'uri' => 'year='.$monthCalObj->thisYear().'&month='.$monthCalObj->thisMonth(), |
|
| 227 | 227 | 'name' => $timeHandler->getFormatedDate($extcalConfig['nav_date_month'], $monthCalObj->getTimestamp()), |
| 228 | 228 | ]; |
| 229 | 229 | |
| 230 | 230 | $horloge = []; |
| 231 | 231 | $horloge['display'] = ('' != trim($options[11])); |
| 232 | - $horloge['fullName'] = XOOPS_URL . _EXTCAL_PATH_HORLOGES . $options[11]; |
|
| 233 | - $horloge['width'] = $options[12] . 'px'; |
|
| 234 | - $horloge['height'] = $options[13] . 'px'; |
|
| 232 | + $horloge['fullName'] = XOOPS_URL._EXTCAL_PATH_HORLOGES.$options[11]; |
|
| 233 | + $horloge['width'] = $options[12].'px'; |
|
| 234 | + $horloge['height'] = $options[13].'px'; |
|
| 235 | 235 | |
| 236 | 236 | $ret = [ |
| 237 | 237 | 'imageParam' => $imageParam, |
@@ -278,7 +278,7 @@ discard block |
||
| 278 | 278 | $imageCatHandler = xoops_getHandler('imagecategory'); |
| 279 | 279 | |
| 280 | 280 | //===================================================================== |
| 281 | - $form->insertBreak('<div style="text-align: center;font-weight: bold;">' . _MB_EXTCAL_OPT_SLIDE_SHOW . '</div>', 'head'); |
|
| 281 | + $form->insertBreak('<div style="text-align: center;font-weight: bold;">'._MB_EXTCAL_OPT_SLIDE_SHOW.'</div>', 'head'); |
|
| 282 | 282 | |
| 283 | 283 | $k = 0; |
| 284 | 284 | $xfValue[$k] = new \XoopsFormRadio(_MB_EXTCAL_DISPLAY_IMG, "options[{$k}]", $options[$k]); |
@@ -319,7 +319,7 @@ discard block |
||
| 319 | 319 | $xfValue[$k] = new Extcal\Form\Spin\FormSpin(_MB_EXTCAL_SS_NB_PHOTOS, "options[{$k}]", $options[$k], 0, 50, 1, 0, 8, _MB_EXTCAL_PX, $imgFolder = ''); |
| 320 | 320 | $form->addElement($xfValue[$k], false); |
| 321 | 321 | //===================================================================== |
| 322 | - $form->insertBreak('<div style="text-align: center;font-weight: bold;">' . _MB_EXTCAL_OPT_SHOW . '</div>', 'head'); |
|
| 322 | + $form->insertBreak('<div style="text-align: center;font-weight: bold;">'._MB_EXTCAL_OPT_SHOW.'</div>', 'head'); |
|
| 323 | 323 | |
| 324 | 324 | $t = [ |
| 325 | 325 | -1 => _MB_EXTCAL_PREVIEW, |
@@ -358,9 +358,9 @@ discard block |
||
| 358 | 358 | $form->addElement($xfValue[$k], false); |
| 359 | 359 | |
| 360 | 360 | //===================================================================== |
| 361 | - $form->insertBreak('<div style="text-align: center;font-weight: bold;">' . _MB_EXTCAL_HORLOGE_OPT . '</div>', 'head'); |
|
| 361 | + $form->insertBreak('<div style="text-align: center;font-weight: bold;">'._MB_EXTCAL_HORLOGE_OPT.'</div>', 'head'); |
|
| 362 | 362 | //--------------------------------------------------------------------- |
| 363 | - $t = \XoopsLists::getFileListAsArray(XOOPS_ROOT_PATH . _EXTCAL_PATH_HORLOGES); |
|
| 363 | + $t = \XoopsLists::getFileListAsArray(XOOPS_ROOT_PATH._EXTCAL_PATH_HORLOGES); |
|
| 364 | 364 | $t = array_merge([' ' => _NONE], $t); |
| 365 | 365 | |
| 366 | 366 | $k = 11; |
@@ -445,12 +445,12 @@ discard block |
||
| 445 | 445 | // $src = $doc->createElement('src'); |
| 446 | 446 | $src = clone $tempSrc; |
| 447 | 447 | $src = $photo->appendChild($src); |
| 448 | - $value = $doc->createTextNode(XOOPS_URL . '/uploads/' . $images->getVar('image_name')); |
|
| 448 | + $value = $doc->createTextNode(XOOPS_URL.'/uploads/'.$images->getVar('image_name')); |
|
| 449 | 449 | $src->appendChild($value); |
| 450 | 450 | } |
| 451 | 451 | |
| 452 | 452 | // get completed xml document |
| 453 | - $xml_string = $doc->save(XOOPS_ROOT_PATH . '/cache/extcalSlideShowParam.xml'); |
|
| 453 | + $xml_string = $doc->save(XOOPS_ROOT_PATH.'/cache/extcalSlideShowParam.xml'); |
|
| 454 | 454 | } |
| 455 | 455 | |
| 456 | 456 | /**************************************************************************/ |
@@ -1,10 +1,10 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -require_once dirname(dirname(__DIR__)) . '/mainfile.php'; |
|
| 4 | -require_once __DIR__ . '/include/constantes.php'; |
|
| 3 | +require_once dirname(dirname(__DIR__)).'/mainfile.php'; |
|
| 4 | +require_once __DIR__.'/include/constantes.php'; |
|
| 5 | 5 | $params = ['view' => _EXTCAL_NAV_NEW_EVENT, 'file' => _EXTCAL_FILE_NEW_EVENT]; |
| 6 | 6 | $GLOBALS['xoopsOption']['template_main'] = "extcal_view_{$params['view']}.tpl"; |
| 7 | -require_once __DIR__ . '/header.php'; |
|
| 7 | +require_once __DIR__.'/header.php'; |
|
| 8 | 8 | |
| 9 | 9 | /* ========================================================================== */ |
| 10 | 10 | //Extcal\Utility::echoArray($_GET); |
@@ -16,7 +16,7 @@ discard block |
||
| 16 | 16 | |
| 17 | 17 | //exit; |
| 18 | 18 | if (count($permHandler->getAuthorizedCat($xoopsUser, 'extcal_cat_submit')) > 0) { |
| 19 | - require_once XOOPS_ROOT_PATH . '/header.php'; |
|
| 19 | + require_once XOOPS_ROOT_PATH.'/header.php'; |
|
| 20 | 20 | |
| 21 | 21 | // Title of the page |
| 22 | 22 | $xoopsTpl->assign('xoops_pagetitle', _MI_EXTCAL_SUBMIT_EVENT); |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | $xoopsTpl->assign('lang', $lang); |
| 59 | 59 | $xoopsTpl->assign('view', 'newevent'); |
| 60 | 60 | |
| 61 | - require_once XOOPS_ROOT_PATH . '/footer.php'; |
|
| 61 | + require_once XOOPS_ROOT_PATH.'/footer.php'; |
|
| 62 | 62 | } else { |
| 63 | 63 | redirect_header('index.php', 3); |
| 64 | 64 | } |
@@ -22,7 +22,7 @@ discard block |
||
| 22 | 22 | |
| 23 | 23 | if ((!defined('XOOPS_ROOT_PATH')) || !($GLOBALS['xoopsUser'] instanceof \XoopsUser) |
| 24 | 24 | || !$GLOBALS['xoopsUser']->IsAdmin()) { |
| 25 | - exit('Restricted access' . PHP_EOL); |
|
| 25 | + exit('Restricted access'.PHP_EOL); |
|
| 26 | 26 | } |
| 27 | 27 | |
| 28 | 28 | /** |
@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | return true; |
| 76 | 76 | } |
| 77 | 77 | |
| 78 | - $fld = XOOPS_ROOT_PATH . '/modules/' . $module->getVar('dirname') . '/versions/'; |
|
| 78 | + $fld = XOOPS_ROOT_PATH.'/modules/'.$module->getVar('dirname').'/versions/'; |
|
| 79 | 79 | $cls = 'Extcal_%1$s'; |
| 80 | 80 | |
| 81 | 81 | $version = [ |
@@ -94,7 +94,7 @@ discard block |
||
| 94 | 94 | foreach ($version as $key => $val) { |
| 95 | 95 | if ($previousVersion < $val) { |
| 96 | 96 | $name = sprintf($cls, $key); |
| 97 | - $f = $fld . $name . '.php'; |
|
| 97 | + $f = $fld.$name.'.php'; |
|
| 98 | 98 | //ext_echo ("<hr>{$f}<hr>"); |
| 99 | 99 | if (is_readable($f)) { |
| 100 | 100 | echo "mise à jour version : {$key} = {$val}<br>"; |
@@ -118,14 +118,14 @@ discard block |
||
| 118 | 118 | //delete old HTML templates |
| 119 | 119 | if (count($configurator['templateFolders']) > 0) { |
| 120 | 120 | foreach ($configurator['templateFolders'] as $folder) { |
| 121 | - $templateFolder = $GLOBALS['xoops']->path('modules/' . $moduleDirName . $folder); |
|
| 121 | + $templateFolder = $GLOBALS['xoops']->path('modules/'.$moduleDirName.$folder); |
|
| 122 | 122 | if (is_dir($templateFolder)) { |
| 123 | 123 | $templateList = array_diff(scandir($templateFolder, SCANDIR_SORT_NONE), ['..', '.']); |
| 124 | 124 | foreach ($templateList as $k => $v) { |
| 125 | - $fileInfo = new \SplFileInfo($templateFolder . $v); |
|
| 125 | + $fileInfo = new \SplFileInfo($templateFolder.$v); |
|
| 126 | 126 | if ('html' === $fileInfo->getExtension() && 'index.html' !== $fileInfo->getFilename()) { |
| 127 | - if (file_exists($templateFolder . $v)) { |
|
| 128 | - unlink($templateFolder . $v); |
|
| 127 | + if (file_exists($templateFolder.$v)) { |
|
| 128 | + unlink($templateFolder.$v); |
|
| 129 | 129 | } |
| 130 | 130 | } |
| 131 | 131 | } |
@@ -135,9 +135,9 @@ discard block |
||
| 135 | 135 | |
| 136 | 136 | // --- COPY blank.png FILES --------------- |
| 137 | 137 | if (count($configurator['copyFiles']) > 0) { |
| 138 | - $file = dirname(__DIR__) . '/assets/images/blank.png'; |
|
| 138 | + $file = dirname(__DIR__).'/assets/images/blank.png'; |
|
| 139 | 139 | foreach (array_keys($configurator['copyFiles']) as $i) { |
| 140 | - $dest = $configurator['copyFiles'][$i] . '/blank.png'; |
|
| 140 | + $dest = $configurator['copyFiles'][$i].'/blank.png'; |
|
| 141 | 141 | $utility::copyFile($file, $dest); |
| 142 | 142 | } |
| 143 | 143 | } |
@@ -146,7 +146,7 @@ discard block |
||
| 146 | 146 | if (count($configurator['oldFiles']) > 0) { |
| 147 | 147 | // foreach (array_keys($GLOBALS['uploadFolders']) as $i) { |
| 148 | 148 | foreach (array_keys($configurator['oldFiles']) as $i) { |
| 149 | - $tempFile = $GLOBALS['xoops']->path('modules/' . $moduleDirName . $configurator['oldFiles'][$i]); |
|
| 149 | + $tempFile = $GLOBALS['xoops']->path('modules/'.$moduleDirName.$configurator['oldFiles'][$i]); |
|
| 150 | 150 | if (is_file($tempFile)) { |
| 151 | 151 | unlink($tempFile); |
| 152 | 152 | } |
@@ -156,14 +156,14 @@ discard block |
||
| 156 | 156 | //--------------------- |
| 157 | 157 | |
| 158 | 158 | //delete .html entries from the tpl table |
| 159 | - $sql = 'DELETE FROM ' . $xoopsDB->prefix('tplfile') . " WHERE `tpl_module` = '" . $module->getVar('dirname', 'n') . "' AND `tpl_file` LIKE '%.html%'"; |
|
| 159 | + $sql = 'DELETE FROM '.$xoopsDB->prefix('tplfile')." WHERE `tpl_module` = '".$module->getVar('dirname', 'n')."' AND `tpl_file` LIKE '%.html%'"; |
|
| 160 | 160 | $xoopsDB->queryF($sql); |
| 161 | 161 | |
| 162 | 162 | // Load class XoopsFile ==================== |
| 163 | 163 | xoops_load('XoopsFile'); |
| 164 | 164 | |
| 165 | 165 | //delete /images directory ============ |
| 166 | - $imagesDirectory = $GLOBALS['xoops']->path('modules/' . $module->getVar('dirname', 'n') . '/images/'); |
|
| 166 | + $imagesDirectory = $GLOBALS['xoops']->path('modules/'.$module->getVar('dirname', 'n').'/images/'); |
|
| 167 | 167 | $folderHandler = \XoopsFile::getHandler('folder', $imagesDirectory); |
| 168 | 168 | $folderHandler->delete($imagesDirectory); |
| 169 | 169 | } |
@@ -21,7 +21,7 @@ discard block |
||
| 21 | 21 | define('_EXTCAL_FORMAT_AGENDA_KEYD', 'Y-m-d'); |
| 22 | 22 | define('_EXTCAL_FORMAT_AGENDA_KEYT', 'H:i'); |
| 23 | 23 | |
| 24 | -require_once __DIR__ . '/constantes.php'; |
|
| 24 | +require_once __DIR__.'/constantes.php'; |
|
| 25 | 25 | // require_once dirname(__DIR__) . '/class/Utility.php'; |
| 26 | 26 | |
| 27 | 27 | $moduleDirName = basename(dirname(__DIR__)); |
@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | $tj[$kj]['dayWeek'] = date('w', $tsj); |
| 76 | 76 | $tj[$kj]['jour'] = $jName[$tj[$kj]['dayWeek']]; //date('l', $tsj); |
| 77 | 77 | if (0 == $tj[$kj]['dayWeek']) { |
| 78 | - $tj[$kj]['bg'] = "background='" . XOOPS_URL . "/modules/extcal/assets/images/trame.png'"; |
|
| 78 | + $tj[$kj]['bg'] = "background='".XOOPS_URL."/modules/extcal/assets/images/trame.png'"; |
|
| 79 | 79 | } else { |
| 80 | 80 | $tj[$kj]['bg'] = ''; |
| 81 | 81 | } |
@@ -155,16 +155,16 @@ discard block |
||
| 155 | 155 | $kd = date(_EXTCAL_FORMAT_AGENDA_KEYD, $ts); |
| 156 | 156 | $hour = date('H', $ts); |
| 157 | 157 | $minute = date('i', $ts); |
| 158 | - $m = (int)($minute / $mPlage) * $mPlage; |
|
| 158 | + $m = (int) ($minute / $mPlage) * $mPlage; |
|
| 159 | 159 | // echo "--->{$minute} / {$mPlage} = {$m}<br>"; |
| 160 | - $sMinute = (($m < 10) ? '0' . $m : $m); |
|
| 160 | + $sMinute = (($m < 10) ? '0'.$m : $m); |
|
| 161 | 161 | //$kt = date(_EXTCAL_FORMAT_AGENDA_KEYT, $ts); |
| 162 | 162 | if ($hour < $hStart) { |
| 163 | 163 | $kt = $tk0; |
| 164 | 164 | } elseif ($hour >= ($hEnd + 1)) { |
| 165 | 165 | $kt = $tk1; |
| 166 | 166 | } else { |
| 167 | - $kt = $hour . ':' . $sMinute; |
|
| 167 | + $kt = $hour.':'.$sMinute; |
|
| 168 | 168 | } |
| 169 | 169 | |
| 170 | 170 | $tAgenda[$kt]['jours'][$kd]['events'][] = $e; |
@@ -313,7 +313,7 @@ discard block |
||
| 313 | 313 | return false; |
| 314 | 314 | } |
| 315 | 315 | |
| 316 | - $file = XOOPS_ROOT_PATH . '/language/' . $xoopsConfig['language'] . '/' . $f; |
|
| 316 | + $file = XOOPS_ROOT_PATH.'/language/'.$xoopsConfig['language'].'/'.$f; |
|
| 317 | 317 | $prefix = (defined($name) ? '_MI' : '_MD'); |
| 318 | 318 | require_once $file; |
| 319 | 319 | } |
@@ -454,7 +454,7 @@ discard block |
||
| 454 | 454 | // while (list($k, $v) = each($tNavBar)) { |
| 455 | 455 | foreach ($tNavBar as $k => $v) { |
| 456 | 456 | if (isset($tWeight[$k])) { |
| 457 | - $ordre[] = (int)$tWeight[$k]; //ordre defini dans les option du module |
|
| 457 | + $ordre[] = (int) $tWeight[$k]; //ordre defini dans les option du module |
|
| 458 | 458 | } else { |
| 459 | 459 | $ordre[] = $v['weight']; // ordre par defaut ddefini dans le tableau $tNavBar |
| 460 | 460 | } |