@@ -23,7 +23,7 @@ discard block |
||
| 23 | 23 | |
| 24 | 24 | // defined('XOOPS_ROOT_PATH') || die('Restricted access'); |
| 25 | 25 | |
| 26 | -require_once dirname(__DIR__) . '/include/constantes.php'; |
|
| 26 | +require_once dirname(__DIR__).'/include/constantes.php'; |
|
| 27 | 27 | |
| 28 | 28 | /** |
| 29 | 29 | * Class EventHandler. |
@@ -335,7 +335,7 @@ discard block |
||
| 335 | 335 | |
| 336 | 336 | // while (list($k, $v) = each($events)) { |
| 337 | 337 | foreach ($events as $k => $v) { |
| 338 | - $ordre[] = (int)$v['event_start']; |
|
| 338 | + $ordre[] = (int) $v['event_start']; |
|
| 339 | 339 | $this->formatEventDate($v, Extcal\Helper::getInstance()->getConfig('event_date_week')); |
| 340 | 340 | //$v['cat']['cat_light_color'] = $v['cat']['cat_color']; |
| 341 | 341 | $v['cat']['cat_light_color'] = Extcal\Utility::getLighterColor($v['cat']['cat_color'], _EXTCAL_INFOBULLE_RGB_MIN, _EXTCAL_INFOBULLE_RGB_MAX); |
@@ -361,7 +361,7 @@ discard block |
||
| 361 | 361 | $cat = 0; |
| 362 | 362 | // while (list($k, $v) = each($criteres)) { |
| 363 | 363 | foreach ($criteres as $k => $v) { |
| 364 | - ${$k} =$v; |
|
| 364 | + ${$k} = $v; |
|
| 365 | 365 | } |
| 366 | 366 | if (!isset($nbDays)) { |
| 367 | 367 | $nbDays = 7; |
@@ -442,7 +442,7 @@ discard block |
||
| 442 | 442 | { |
| 443 | 443 | // while (list($k, $v) = each($criteres)) { |
| 444 | 444 | foreach ($criteres as $k => $v) { |
| 445 | - ${$k} =$v; |
|
| 445 | + ${$k} = $v; |
|
| 446 | 446 | } |
| 447 | 447 | if (!isset($nbDays)) { |
| 448 | 448 | $nbDays = 7; |
@@ -537,7 +537,7 @@ discard block |
||
| 537 | 537 | |
| 538 | 538 | reset($period); |
| 539 | 539 | foreach ($period as $dt) { |
| 540 | - echo $dt->format("l d-m-Y H:i:s\n") . '<br>'; |
|
| 540 | + echo $dt->format("l d-m-Y H:i:s\n").'<br>'; |
|
| 541 | 541 | } |
| 542 | 542 | } |
| 543 | 543 | |
@@ -866,10 +866,10 @@ discard block |
||
| 866 | 866 | $authorizedAccessCats = $this->extcalPerm->getAuthorizedCat($user, 'extcal_cat_view'); |
| 867 | 867 | $count = count($authorizedAccessCats); |
| 868 | 868 | if ($count > 0) { |
| 869 | - $in = '(' . $authorizedAccessCats[0]; |
|
| 869 | + $in = '('.$authorizedAccessCats[0]; |
|
| 870 | 870 | array_shift($authorizedAccessCats); |
| 871 | 871 | foreach ($authorizedAccessCats as $authorizedAccessCat) { |
| 872 | - $in .= ',' . $authorizedAccessCat; |
|
| 872 | + $in .= ','.$authorizedAccessCat; |
|
| 873 | 873 | } |
| 874 | 874 | $in .= ')'; |
| 875 | 875 | $criteria->add(new \Criteria('cat_id', $in, 'IN')); |
@@ -889,10 +889,10 @@ discard block |
||
| 889 | 889 | } |
| 890 | 890 | if (is_array($cats)) { |
| 891 | 891 | if (false === array_search(0, $cats)) { |
| 892 | - $in = '(' . current($cats); |
|
| 892 | + $in = '('.current($cats); |
|
| 893 | 893 | array_shift($cats); |
| 894 | 894 | foreach ($cats as $cat) { |
| 895 | - $in .= ',' . $cat; |
|
| 895 | + $in .= ','.$cat; |
|
| 896 | 896 | } |
| 897 | 897 | $in .= ')'; |
| 898 | 898 | $criteria->add(new \Criteria('cat_id', $in, 'IN')); |
@@ -933,7 +933,7 @@ discard block |
||
| 933 | 933 | if ('clone' === $mode) { |
| 934 | 934 | $data['event_id'] = 0; |
| 935 | 935 | $event->setVar('event_id', 0); |
| 936 | - $newTitle = $event->getVar('event_title') . ' (' . _MD_EXTCAL_CLONE_OF . $data['event_id'] . ')'; |
|
| 936 | + $newTitle = $event->getVar('event_title').' ('._MD_EXTCAL_CLONE_OF.$data['event_id'].')'; |
|
| 937 | 937 | $event->setVar('event_title', $newTitle); |
| 938 | 938 | } |
| 939 | 939 | |
@@ -1117,7 +1117,7 @@ discard block |
||
| 1117 | 1117 | $form->addElement($catSelect, true); |
| 1118 | 1118 | //----------------------------------------------------------- |
| 1119 | 1119 | |
| 1120 | - $file_path = dirname(__DIR__) . '/assets/css/images'; |
|
| 1120 | + $file_path = dirname(__DIR__).'/assets/css/images'; |
|
| 1121 | 1121 | $tf = \XoopsLists::getImgListAsArray($file_path); |
| 1122 | 1122 | array_unshift($tf, _MD_EXTCAL_NONE); |
| 1123 | 1123 | $xfIcones = new \XoopsFormSelect(_MD_EXTCAL_ICONE, 'event_icone', $event_icone, ''); |
@@ -1127,7 +1127,7 @@ discard block |
||
| 1127 | 1127 | //location |
| 1128 | 1128 | $locationHandler = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_LOCATION); |
| 1129 | 1129 | $location_select = new \XoopsFormSelect(_MD_EXTCAL_LOCATION, 'event_location', $event_location); |
| 1130 | - $criteria = new \CriteriaCompo(); |
|
| 1130 | + $criteria = new \CriteriaCompo(); |
|
| 1131 | 1131 | $criteria->setSort('nom'); |
| 1132 | 1132 | $criteria->setOrder('ASC'); |
| 1133 | 1133 | |
@@ -1222,7 +1222,7 @@ discard block |
||
| 1222 | 1222 | if (count($files) > 0) { |
| 1223 | 1223 | $eventFiles = new Extcal\Form\FormFileCheckBox('', 'filetokeep'); |
| 1224 | 1224 | foreach ($files as $file) { |
| 1225 | - $name = $file['file_nicename'] . ' (<i>' . $file['file_mimetype'] . '</i>) ' . $file['formated_file_size']; |
|
| 1225 | + $name = $file['file_nicename'].' (<i>'.$file['file_mimetype'].'</i>) '.$file['formated_file_size']; |
|
| 1226 | 1226 | $eventFiles->addOption($file['file_id'], $name); |
| 1227 | 1227 | } |
| 1228 | 1228 | $fileElmtTray->addElement($eventFiles); |
@@ -1238,7 +1238,7 @@ discard block |
||
| 1238 | 1238 | //Picture1 |
| 1239 | 1239 | $file_tray = new \XoopsFormElementTray(sprintf(_MD_EXTCAL_FORM_IMG, 1), ''); |
| 1240 | 1240 | if (!empty($event_picture1)) { |
| 1241 | - $file_tray->addElement(new \XoopsFormLabel('', "<img src='" . XOOPS_URL . '/uploads/extcal/' . $event_picture1 . "' name='image' id='image' alt=''><br><br>")); |
|
| 1241 | + $file_tray->addElement(new \XoopsFormLabel('', "<img src='".XOOPS_URL.'/uploads/extcal/'.$event_picture1."' name='image' id='image' alt=''><br><br>")); |
|
| 1242 | 1242 | $check_del_img = new \XoopsFormCheckBox('', 'delimg_1'); |
| 1243 | 1243 | $check_del_img->addOption(1, _MD_EXTCAL_DEL_IMG); |
| 1244 | 1244 | $file_tray->addElement($check_del_img); |
@@ -1249,8 +1249,8 @@ discard block |
||
| 1249 | 1249 | } |
| 1250 | 1250 | $file_img->setExtra("size ='40'"); |
| 1251 | 1251 | $file_tray->addElement($file_img); |
| 1252 | - $msg = sprintf(_MD_EXTCAL_IMG_CONFIG, (int)(400728 / 1000), 500, 500); |
|
| 1253 | - $file_label = new \XoopsFormLabel('', '<br>' . $msg); |
|
| 1252 | + $msg = sprintf(_MD_EXTCAL_IMG_CONFIG, (int) (400728 / 1000), 500, 500); |
|
| 1253 | + $file_label = new \XoopsFormLabel('', '<br>'.$msg); |
|
| 1254 | 1254 | $file_tray->addElement($file_label); |
| 1255 | 1255 | $form->addElement($file_tray); |
| 1256 | 1256 | $form->addElement(new \XoopsFormHidden('file1', $event_picture1)); |
@@ -1258,7 +1258,7 @@ discard block |
||
| 1258 | 1258 | //Picture2 |
| 1259 | 1259 | $file_tray = new \XoopsFormElementTray(sprintf(_MD_EXTCAL_FORM_IMG, 2), ''); |
| 1260 | 1260 | if (!empty($event_picture2)) { |
| 1261 | - $file_tray->addElement(new \XoopsFormLabel('', "<img src='" . XOOPS_URL . '/uploads/extcal/' . $event_picture2 . "' name='image' id='image' alt=''><br><br>")); |
|
| 1261 | + $file_tray->addElement(new \XoopsFormLabel('', "<img src='".XOOPS_URL.'/uploads/extcal/'.$event_picture2."' name='image' id='image' alt=''><br><br>")); |
|
| 1262 | 1262 | $check_del_img = new \XoopsFormCheckBox('', 'delimg_2'); |
| 1263 | 1263 | $check_del_img->addOption(1, _MD_EXTCAL_DEL_IMG); |
| 1264 | 1264 | $file_tray->addElement($check_del_img); |
@@ -1269,8 +1269,8 @@ discard block |
||
| 1269 | 1269 | } |
| 1270 | 1270 | $file_img->setExtra("size ='40'"); |
| 1271 | 1271 | $file_tray->addElement($file_img); |
| 1272 | - $msg = sprintf(_MD_EXTCAL_IMG_CONFIG, (int)(400728 / 1000), 500, 500); |
|
| 1273 | - $file_label = new \XoopsFormLabel('', '<br>' . $msg); |
|
| 1272 | + $msg = sprintf(_MD_EXTCAL_IMG_CONFIG, (int) (400728 / 1000), 500, 500); |
|
| 1273 | + $file_label = new \XoopsFormLabel('', '<br>'.$msg); |
|
| 1274 | 1274 | $file_tray->addElement($file_label); |
| 1275 | 1275 | $form->addElement($file_tray); |
| 1276 | 1276 | $form->addElement(new \XoopsFormHidden('file2', $event_picture2)); |
@@ -1337,7 +1337,7 @@ discard block |
||
| 1337 | 1337 | $recurRules = 'weekly|'; |
| 1338 | 1338 | $recurRules .= $parm['rrule_weekly_interval']; |
| 1339 | 1339 | foreach ($parm['rrule_weekly_bydays'] as $day) { |
| 1340 | - $recurRules .= '|' . $day; |
|
| 1340 | + $recurRules .= '|'.$day; |
|
| 1341 | 1341 | } |
| 1342 | 1342 | |
| 1343 | 1343 | break; |
@@ -1347,11 +1347,11 @@ discard block |
||
| 1347 | 1347 | $parm['rrule_monthly_interval'] = 0; |
| 1348 | 1348 | } |
| 1349 | 1349 | $recurRules = 'monthly|'; |
| 1350 | - $recurRules .= $parm['rrule_monthly_interval'] . '|'; |
|
| 1350 | + $recurRules .= $parm['rrule_monthly_interval'].'|'; |
|
| 1351 | 1351 | if ('' != $parm['rrule_monthly_byday']) { |
| 1352 | 1352 | $recurRules .= $parm['rrule_monthly_byday']; |
| 1353 | 1353 | } else { |
| 1354 | - $recurRules .= 'MD' . $parm['rrule_bymonthday']; |
|
| 1354 | + $recurRules .= 'MD'.$parm['rrule_bymonthday']; |
|
| 1355 | 1355 | } |
| 1356 | 1356 | |
| 1357 | 1357 | break; |
@@ -1385,9 +1385,9 @@ discard block |
||
| 1385 | 1385 | |
| 1386 | 1386 | $recurRules = 'yearly|'; |
| 1387 | 1387 | $recurRules .= $parm['rrule_yearly_interval']; |
| 1388 | - $recurRules .= '|' . $parm['rrule_yearly_byday']; |
|
| 1388 | + $recurRules .= '|'.$parm['rrule_yearly_byday']; |
|
| 1389 | 1389 | foreach ($parm['rrule_yearly_bymonths'] as $month) { |
| 1390 | - $recurRules .= '|' . $month; |
|
| 1390 | + $recurRules .= '|'.$month; |
|
| 1391 | 1391 | } |
| 1392 | 1392 | |
| 1393 | 1393 | break; |
@@ -2312,10 +2312,10 @@ discard block |
||
| 2312 | 2312 | global $xoopsDB; |
| 2313 | 2313 | |
| 2314 | 2314 | //echo "<hr>{$andor}-{$limit}-{$offset}-{$userId}-{$user}<br>{$criteresPlus}"; |
| 2315 | - $tEvent = $xoopsDB->prefix('extcal_event') . ' AS te'; |
|
| 2316 | - $tCat = $xoopsDB->prefix('extcal_cat') . ' AS tc'; |
|
| 2315 | + $tEvent = $xoopsDB->prefix('extcal_event').' AS te'; |
|
| 2316 | + $tCat = $xoopsDB->prefix('extcal_cat').' AS tc'; |
|
| 2317 | 2317 | |
| 2318 | - $sql = 'SELECT te.*, tc.cat_name , tc.cat_color, ' . 'year(FROM_UNIXTIME(event_start)) AS year,' . 'month(FROM_UNIXTIME(event_start)) AS month,' . 'day(FROM_UNIXTIME(event_start)) AS day' . " FROM {$tEvent}, {$tCat}"; |
|
| 2318 | + $sql = 'SELECT te.*, tc.cat_name , tc.cat_color, '.'year(FROM_UNIXTIME(event_start)) AS year,'.'month(FROM_UNIXTIME(event_start)) AS month,'.'day(FROM_UNIXTIME(event_start)) AS day'." FROM {$tEvent}, {$tCat}"; |
|
| 2319 | 2319 | //--------------------------------------------------- |
| 2320 | 2320 | $tw = []; |
| 2321 | 2321 | $tw[] = 'te.cat_id = tc.cat_id'; |
@@ -2324,7 +2324,7 @@ discard block |
||
| 2324 | 2324 | $authorizedAccessCats = $this->extcalPerm->getAuthorizedCat($user, 'extcal_cat_view'); |
| 2325 | 2325 | $inCat = 'te.cat_id IN (0)'; |
| 2326 | 2326 | if (count($authorizedAccessCats) > 0) { |
| 2327 | - $inCat = 'te.cat_id IN (' . implode(',', $authorizedAccessCats) . ')'; |
|
| 2327 | + $inCat = 'te.cat_id IN ('.implode(',', $authorizedAccessCats).')'; |
|
| 2328 | 2328 | } |
| 2329 | 2329 | //echo $tw[count($tw)-1]; |
| 2330 | 2330 | |
@@ -2360,12 +2360,12 @@ discard block |
||
| 2360 | 2360 | 'te.event_address', |
| 2361 | 2361 | 'tc.cat_name', |
| 2362 | 2362 | ]; |
| 2363 | - $t = []; |
|
| 2363 | + $t = []; |
|
| 2364 | 2364 | foreach ($queryarray as $i => $iValue) { |
| 2365 | 2365 | $t1[] = " %1\$s LIKE '#{$queryarray[$i]}#' "; |
| 2366 | 2366 | } |
| 2367 | 2367 | |
| 2368 | - $flt = '(' . implode(" {$andor} ", $t1) . ')'; |
|
| 2368 | + $flt = '('.implode(" {$andor} ", $t1).')'; |
|
| 2369 | 2369 | |
| 2370 | 2370 | $t = []; |
| 2371 | 2371 | foreach ($tFields as $h => $hValue) { |
@@ -2374,10 +2374,10 @@ discard block |
||
| 2374 | 2374 | |
| 2375 | 2375 | $filtre = implode(' OR ', $t); |
| 2376 | 2376 | $filtre = str_replace('#', '%', $filtre); |
| 2377 | - $tw[] = '(' . $filtre . ')'; |
|
| 2377 | + $tw[] = '('.$filtre.')'; |
|
| 2378 | 2378 | } |
| 2379 | 2379 | |
| 2380 | - $sql .= ' WHERE ' . implode(' AND ', $tw); |
|
| 2380 | + $sql .= ' WHERE '.implode(' AND ', $tw); |
|
| 2381 | 2381 | //------------------------------------------------------------ |
| 2382 | 2382 | if (count($orderBy) > 0) { |
| 2383 | 2383 | $t = []; |
@@ -2387,7 +2387,7 @@ discard block |
||
| 2387 | 2387 | } |
| 2388 | 2388 | } |
| 2389 | 2389 | if (count($t) > 0) { |
| 2390 | - $sql .= ' ORDER BY ' . implode(',', $t); |
|
| 2390 | + $sql .= ' ORDER BY '.implode(',', $t); |
|
| 2391 | 2391 | } |
| 2392 | 2392 | } |
| 2393 | 2393 | |
@@ -2420,7 +2420,7 @@ discard block |
||
| 2420 | 2420 | $i = 0; |
| 2421 | 2421 | while (false !== ($myrow = $xoopsDB->fetchArray($result))) { |
| 2422 | 2422 | $ret[$i]['image'] = 'assets/images/icons/extcal.gif'; |
| 2423 | - $ret[$i]['link'] = 'event.php?event=' . $myrow['event_id']; |
|
| 2423 | + $ret[$i]['link'] = 'event.php?event='.$myrow['event_id']; |
|
| 2424 | 2424 | $ret[$i]['title'] = $myrow['event_title']; |
| 2425 | 2425 | $ret[$i]['time'] = $myrow['event_submitdate']; |
| 2426 | 2426 | $ret[$i]['uid'] = $myrow['event_submitter']; |
@@ -2460,23 +2460,23 @@ discard block |
||
| 2460 | 2460 | // } |
| 2461 | 2461 | $tEvent = $xoopsDB->prefix('extcal_event'); |
| 2462 | 2462 | $tCat = $xoopsDB->prefix('extcal_cat'); |
| 2463 | - $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'"; |
|
| 2463 | + $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'"; |
|
| 2464 | 2464 | |
| 2465 | 2465 | $authorizedAccessCats = $this->extcalPerm->getAuthorizedCat($user, 'extcal_cat_view'); |
| 2466 | 2466 | $count = count($authorizedAccessCats); |
| 2467 | 2467 | if ($count > 0) { |
| 2468 | - $in = '(' . $authorizedAccessCats[0]; |
|
| 2468 | + $in = '('.$authorizedAccessCats[0]; |
|
| 2469 | 2469 | array_shift($authorizedAccessCats); |
| 2470 | 2470 | foreach ($authorizedAccessCats as $authorizedAccessCat) { |
| 2471 | - $in .= ',' . $authorizedAccessCat; |
|
| 2471 | + $in .= ','.$authorizedAccessCat; |
|
| 2472 | 2472 | } |
| 2473 | 2473 | $in .= ')'; |
| 2474 | 2474 | } else { |
| 2475 | 2475 | $in = '(0)'; |
| 2476 | 2476 | } |
| 2477 | - $sql .= " AND {$tEvent}.cat_id IN " . $in . ''; |
|
| 2477 | + $sql .= " AND {$tEvent}.cat_id IN ".$in.''; |
|
| 2478 | 2478 | if (0 != $userId) { |
| 2479 | - $sql .= " AND event_submitter = '" . $userId . "'"; |
|
| 2479 | + $sql .= " AND event_submitter = '".$userId."'"; |
|
| 2480 | 2480 | } |
| 2481 | 2481 | |
| 2482 | 2482 | //echoArray($queryarray,false); |
@@ -2496,7 +2496,7 @@ discard block |
||
| 2496 | 2496 | $t1[] = " %1\$s LIKE '#{$queryarray[$i]}#' "; |
| 2497 | 2497 | } |
| 2498 | 2498 | |
| 2499 | - $flt = '(' . implode(" {$andor} ", $t1) . ')'; |
|
| 2499 | + $flt = '('.implode(" {$andor} ", $t1).')'; |
|
| 2500 | 2500 | |
| 2501 | 2501 | $t = []; |
| 2502 | 2502 | foreach ($tFields as $h => $hValue) { |
@@ -2505,11 +2505,11 @@ discard block |
||
| 2505 | 2505 | |
| 2506 | 2506 | $filtre = implode(' OR ', $t); |
| 2507 | 2507 | $filtre = str_replace('#', '%', $filtre); |
| 2508 | - $sql .= " AND ($filtre)"; |
|
| 2508 | + $sql .= " AND ($filtre)"; |
|
| 2509 | 2509 | } |
| 2510 | 2510 | |
| 2511 | 2511 | if ('' != $criteresPlus) { |
| 2512 | - $sql .= ' AND ' . $criteresPlus; |
|
| 2512 | + $sql .= ' AND '.$criteresPlus; |
|
| 2513 | 2513 | } |
| 2514 | 2514 | $sql .= ' ORDER BY event_id DESC'; |
| 2515 | 2515 | |
@@ -2519,7 +2519,7 @@ discard block |
||
| 2519 | 2519 | if ($xoopsSearch) { |
| 2520 | 2520 | while (false !== ($myrow = $xoopsDB->fetchArray($result))) { |
| 2521 | 2521 | $ret[$i]['image'] = 'assets/images/icons/extcal.gif'; |
| 2522 | - $ret[$i]['link'] = 'event.php?event=' . $myrow['event_id']; |
|
| 2522 | + $ret[$i]['link'] = 'event.php?event='.$myrow['event_id']; |
|
| 2523 | 2523 | $ret[$i]['title'] = $myrow['event_title']; |
| 2524 | 2524 | $ret[$i]['time'] = $myrow['event_submitdate']; |
| 2525 | 2525 | $ret[$i]['uid'] = $myrow['event_submitter']; |
@@ -34,8 +34,8 @@ |
||
| 34 | 34 | public function __construct($debug = false) |
| 35 | 35 | { |
| 36 | 36 | $this->debug = $debug; |
| 37 | - $moduleDirName = basename(dirname(__DIR__)); |
|
| 38 | - parent::__construct($moduleDirName); |
|
| 37 | + $moduleDirName = basename(dirname(__DIR__)); |
|
| 38 | + parent::__construct($moduleDirName); |
|
| 39 | 39 | } |
| 40 | 40 | |
| 41 | 41 | /** |
@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | */ |
| 34 | 34 | public function __construct($debug = false) |
| 35 | 35 | { |
| 36 | - $this->debug = $debug; |
|
| 36 | + $this->debug = $debug; |
|
| 37 | 37 | $moduleDirName = basename(dirname(__DIR__)); |
| 38 | 38 | parent::__construct($moduleDirName); |
| 39 | 39 | } |
@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | { |
| 73 | 73 | $ret = false; |
| 74 | 74 | $db = \XoopsDatabaseFactory::getDatabaseConnection(); |
| 75 | - $class = '\\XoopsModules\\' . ucfirst(strtolower(basename(dirname(__DIR__)))) . '\\' . $name . 'Handler'; |
|
| 75 | + $class = '\\XoopsModules\\'.ucfirst(strtolower(basename(dirname(__DIR__)))).'\\'.$name.'Handler'; |
|
| 76 | 76 | $ret = new $class($db); |
| 77 | 77 | return $ret; |
| 78 | 78 | } |
@@ -21,7 +21,7 @@ |
||
| 21 | 21 | //Kraven 30 |
| 22 | 22 | // defined('XOOPS_ROOT_PATH') || die('Restricted access'); |
| 23 | 23 | |
| 24 | -require_once XOOPS_ROOT_PATH . '/kernel/object.php'; |
|
| 24 | +require_once XOOPS_ROOT_PATH.'/kernel/object.php'; |
|
| 25 | 25 | |
| 26 | 26 | /** |
| 27 | 27 | * Class LocationHandler. |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | //require_once __DIR__ . '/config.php'; |
| 27 | 27 | //require_once __DIR__ . '/ExtDateTime.php'; |
| 28 | 28 | //require_once __DIR__ . '/utility.php'; |
| 29 | -require_once dirname(__DIR__) . '/include/constantes.php'; |
|
| 29 | +require_once dirname(__DIR__).'/include/constantes.php'; |
|
| 30 | 30 | |
| 31 | 31 | /** |
| 32 | 32 | * Class Event. |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | $this->initVar('event_location', XOBJ_DTYPE_INT, 5, false); |
| 68 | 68 | $this->initVar('event_icone', XOBJ_DTYPE_TXTBOX, '', false); |
| 69 | 69 | |
| 70 | - $this->externalKey['cat_id'] = [ |
|
| 70 | + $this->externalKey['cat_id'] = [ |
|
| 71 | 71 | 'className' => 'Category', |
| 72 | 72 | 'getMethodeName' => 'getCat', |
| 73 | 73 | 'keyName' => 'cat', |
@@ -43,9 +43,9 @@ |
||
| 43 | 43 | public function __construct() |
| 44 | 44 | { |
| 45 | 45 | $moduleDirName = basename(dirname(dirname(__DIR__))); |
| 46 | - $moduleDirNameUpper = strtoupper($moduleDirName); |
|
| 46 | + $moduleDirNameUpper = strtoupper($moduleDirName); |
|
| 47 | 47 | |
| 48 | - require_once dirname(dirname(__DIR__)) . '/include/config.php'; |
|
| 48 | + require_once dirname(dirname(__DIR__)).'/include/config.php'; |
|
| 49 | 49 | $config = getConfig(); |
| 50 | 50 | |
| 51 | 51 | $this->name = $config->name; |
@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | throw new \RuntimeException(sprintf('Unable to create the %s directory', $folder)); |
| 34 | 34 | } |
| 35 | 35 | |
| 36 | - file_put_contents($folder . '/index.html', '<script>history.go(-1);</script>'); |
|
| 36 | + file_put_contents($folder.'/index.html', '<script>history.go(-1);</script>'); |
|
| 37 | 37 | } |
| 38 | 38 | } catch (\Exception $e) { |
| 39 | 39 | echo 'Caught exception: ', $e->getMessage(), "\n", '<br>'; |
@@ -59,14 +59,14 @@ discard block |
||
| 59 | 59 | $dir = opendir($src); |
| 60 | 60 | // @mkdir($dst); |
| 61 | 61 | if (!@mkdir($dst) && !is_dir($dst)) { |
| 62 | - throw new \RuntimeException('The directory ' . $dst . ' could not be created.'); |
|
| 62 | + throw new \RuntimeException('The directory '.$dst.' could not be created.'); |
|
| 63 | 63 | } |
| 64 | 64 | while (false !== ($file = readdir($dir))) { |
| 65 | 65 | if (('.' !== $file) && ('..' !== $file)) { |
| 66 | - if (is_dir($src . '/' . $file)) { |
|
| 67 | - self::recurseCopy($src . '/' . $file, $dst . '/' . $file); |
|
| 66 | + if (is_dir($src.'/'.$file)) { |
|
| 67 | + self::recurseCopy($src.'/'.$file, $dst.'/'.$file); |
|
| 68 | 68 | } else { |
| 69 | - copy($src . '/' . $file, $dst . '/' . $file); |
|
| 69 | + copy($src.'/'.$file, $dst.'/'.$file); |
|
| 70 | 70 | } |
| 71 | 71 | } |
| 72 | 72 | } |
@@ -160,7 +160,7 @@ discard block |
||
| 160 | 160 | self::rrmdir($fObj->getPathname()); |
| 161 | 161 | } |
| 162 | 162 | } |
| 163 | - $iterator = null; // clear iterator Obj to close file/directory |
|
| 163 | + $iterator = null; // clear iterator Obj to close file/directory |
|
| 164 | 164 | return rmdir($src); // remove the directory & return results |
| 165 | 165 | } |
| 166 | 166 | |
@@ -193,14 +193,14 @@ discard block |
||
| 193 | 193 | $iterator = new \DirectoryIterator($src); |
| 194 | 194 | foreach ($iterator as $fObj) { |
| 195 | 195 | if ($fObj->isFile()) { |
| 196 | - rename($fObj->getPathname(), "{$dest}/" . $fObj->getFilename()); |
|
| 196 | + rename($fObj->getPathname(), "{$dest}/".$fObj->getFilename()); |
|
| 197 | 197 | } elseif (!$fObj->isDot() && $fObj->isDir()) { |
| 198 | 198 | // Try recursively on directory |
| 199 | - self::rmove($fObj->getPathname(), "{$dest}/" . $fObj->getFilename()); |
|
| 199 | + self::rmove($fObj->getPathname(), "{$dest}/".$fObj->getFilename()); |
|
| 200 | 200 | // rmdir($fObj->getPath()); // now delete the directory |
| 201 | 201 | } |
| 202 | 202 | } |
| 203 | - $iterator = null; // clear iterator Obj to close file/directory |
|
| 203 | + $iterator = null; // clear iterator Obj to close file/directory |
|
| 204 | 204 | return rmdir($src); // remove the directory & return results |
| 205 | 205 | } |
| 206 | 206 | |
@@ -236,9 +236,9 @@ discard block |
||
| 236 | 236 | $iterator = new \DirectoryIterator($src); |
| 237 | 237 | foreach ($iterator as $fObj) { |
| 238 | 238 | if ($fObj->isFile()) { |
| 239 | - copy($fObj->getPathname(), "{$dest}/" . $fObj->getFilename()); |
|
| 239 | + copy($fObj->getPathname(), "{$dest}/".$fObj->getFilename()); |
|
| 240 | 240 | } elseif (!$fObj->isDot() && $fObj->isDir()) { |
| 241 | - self::rcopy($fObj->getPathname(), "{$dest}/" . $fObj->getFilename()); |
|
| 241 | + self::rcopy($fObj->getPathname(), "{$dest}/".$fObj->getFilename()); |
|
| 242 | 242 | } |
| 243 | 243 | } |
| 244 | 244 | return true; |
@@ -1,27 +1,27 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | // |
| 3 | -if (!@require_once __DIR__ . '/Calendar/Calendar.php') { |
|
| 3 | +if (!@require_once __DIR__.'/Calendar/Calendar.php') { |
|
| 4 | 4 | @define('CALENDAR_ROOT', '../'); |
| 5 | 5 | } |
| 6 | -require_once CALENDAR_ROOT . 'Year.php'; |
|
| 7 | -require_once CALENDAR_ROOT . 'Month.php'; |
|
| 8 | -require_once CALENDAR_ROOT . 'Day.php'; |
|
| 9 | -require_once CALENDAR_ROOT . 'Week.php'; |
|
| 10 | -require_once CALENDAR_ROOT . 'Hour.php'; |
|
| 11 | -require_once CALENDAR_ROOT . 'Minute.php'; |
|
| 12 | -require_once CALENDAR_ROOT . 'Second.php'; |
|
| 13 | -require_once CALENDAR_ROOT . 'Month.php'; |
|
| 14 | -require_once CALENDAR_ROOT . 'Decorator.php'; |
|
| 15 | -require_once CALENDAR_ROOT . 'Month/Weekdays.php'; |
|
| 16 | -require_once CALENDAR_ROOT . 'Month/Weeks.php'; |
|
| 17 | -require_once CALENDAR_ROOT . 'Validator.php'; |
|
| 18 | -require_once CALENDAR_ROOT . 'Engine/Interface.php'; |
|
| 19 | -require_once CALENDAR_ROOT . 'Engine/UnixTs.php'; |
|
| 20 | -require_once CALENDAR_ROOT . 'Engine/PearDate.php'; |
|
| 21 | -require_once CALENDAR_ROOT . 'Table/Helper.php'; |
|
| 22 | -require_once CALENDAR_ROOT . 'Decorator/Textual.php'; |
|
| 23 | -require_once CALENDAR_ROOT . 'Decorator/Uri.php'; |
|
| 24 | -require_once CALENDAR_ROOT . 'Decorator/Weekday.php'; |
|
| 25 | -require_once CALENDAR_ROOT . 'Decorator/Wrapper.php'; |
|
| 26 | -require_once CALENDAR_ROOT . 'Util/Uri.php'; |
|
| 27 | -require_once CALENDAR_ROOT . 'Util/Textual.php'; |
|
| 6 | +require_once CALENDAR_ROOT.'Year.php'; |
|
| 7 | +require_once CALENDAR_ROOT.'Month.php'; |
|
| 8 | +require_once CALENDAR_ROOT.'Day.php'; |
|
| 9 | +require_once CALENDAR_ROOT.'Week.php'; |
|
| 10 | +require_once CALENDAR_ROOT.'Hour.php'; |
|
| 11 | +require_once CALENDAR_ROOT.'Minute.php'; |
|
| 12 | +require_once CALENDAR_ROOT.'Second.php'; |
|
| 13 | +require_once CALENDAR_ROOT.'Month.php'; |
|
| 14 | +require_once CALENDAR_ROOT.'Decorator.php'; |
|
| 15 | +require_once CALENDAR_ROOT.'Month/Weekdays.php'; |
|
| 16 | +require_once CALENDAR_ROOT.'Month/Weeks.php'; |
|
| 17 | +require_once CALENDAR_ROOT.'Validator.php'; |
|
| 18 | +require_once CALENDAR_ROOT.'Engine/Interface.php'; |
|
| 19 | +require_once CALENDAR_ROOT.'Engine/UnixTs.php'; |
|
| 20 | +require_once CALENDAR_ROOT.'Engine/PearDate.php'; |
|
| 21 | +require_once CALENDAR_ROOT.'Table/Helper.php'; |
|
| 22 | +require_once CALENDAR_ROOT.'Decorator/Textual.php'; |
|
| 23 | +require_once CALENDAR_ROOT.'Decorator/Uri.php'; |
|
| 24 | +require_once CALENDAR_ROOT.'Decorator/Weekday.php'; |
|
| 25 | +require_once CALENDAR_ROOT.'Decorator/Wrapper.php'; |
|
| 26 | +require_once CALENDAR_ROOT.'Util/Uri.php'; |
|
| 27 | +require_once CALENDAR_ROOT.'Util/Textual.php'; |
|
@@ -97,7 +97,7 @@ discard block |
||
| 97 | 97 | } |
| 98 | 98 | if (!$engine) { |
| 99 | 99 | if (!class_exists($class)) { |
| 100 | - require_once CALENDAR_ROOT . 'Engine' . '/' . CALENDAR_ENGINE . '.php'; |
|
| 100 | + require_once CALENDAR_ROOT.'Engine'.'/'.CALENDAR_ENGINE.'.php'; |
|
| 101 | 101 | } |
| 102 | 102 | $engine = new $class(); |
| 103 | 103 | } |
@@ -209,13 +209,13 @@ discard block |
||
| 209 | 209 | if (!isset($cE)) { |
| 210 | 210 | $cE = Calendar_Engine_Factory::getEngine(); |
| 211 | 211 | } |
| 212 | - $this->cE =& $cE; |
|
| 213 | - $this->year = (int)$y; |
|
| 214 | - $this->month = (int)$m; |
|
| 215 | - $this->day = (int)$d; |
|
| 216 | - $this->hour = (int)$h; |
|
| 217 | - $this->minute = (int)$i; |
|
| 218 | - $this->second = (int)$s; |
|
| 212 | + $this->cE = & $cE; |
|
| 213 | + $this->year = (int) $y; |
|
| 214 | + $this->month = (int) $m; |
|
| 215 | + $this->day = (int) $d; |
|
| 216 | + $this->hour = (int) $h; |
|
| 217 | + $this->minute = (int) $i; |
|
| 218 | + $this->second = (int) $s; |
|
| 219 | 219 | } |
| 220 | 220 | |
| 221 | 221 | /** |
@@ -331,7 +331,7 @@ discard block |
||
| 331 | 331 | return $this->toArray($stamp); |
| 332 | 332 | break; |
| 333 | 333 | case 'object': |
| 334 | - require_once CALENDAR_ROOT . 'Factory.php'; |
|
| 334 | + require_once CALENDAR_ROOT.'Factory.php'; |
|
| 335 | 335 | |
| 336 | 336 | return Calendar_Factory::createByTimestamp($returnType, $stamp); |
| 337 | 337 | break; |
@@ -353,7 +353,7 @@ discard block |
||
| 353 | 353 | */ |
| 354 | 354 | public function build($sDates = []) |
| 355 | 355 | { |
| 356 | - require_once __DIR__ . '/PEAR.php'; |
|
| 356 | + require_once __DIR__.'/PEAR.php'; |
|
| 357 | 357 | PEAR::raiseError('Calendar::build is abstract', null, PEAR_ERROR_TRIGGER, E_USER_NOTICE, 'Calendar::build()'); |
| 358 | 358 | |
| 359 | 359 | return false; |
@@ -369,7 +369,7 @@ discard block |
||
| 369 | 369 | */ |
| 370 | 370 | public function setSelection($sDates) |
| 371 | 371 | { |
| 372 | - require_once __DIR__ . '/PEAR.php'; |
|
| 372 | + require_once __DIR__.'/PEAR.php'; |
|
| 373 | 373 | PEAR::raiseError('Calendar::setSelection is abstract', null, PEAR_ERROR_TRIGGER, E_USER_NOTICE, 'Calendar::setSelection()'); |
| 374 | 374 | |
| 375 | 375 | return false; |
@@ -436,7 +436,7 @@ discard block |
||
| 436 | 436 | public function &getValidator() |
| 437 | 437 | { |
| 438 | 438 | if (!isset($this->validator)) { |
| 439 | - require_once CALENDAR_ROOT . 'Validator.php'; |
|
| 439 | + require_once CALENDAR_ROOT.'Validator.php'; |
|
| 440 | 440 | $this->validator = new Calendar_Validator($this); |
| 441 | 441 | } |
| 442 | 442 | |
@@ -470,7 +470,7 @@ discard block |
||
| 470 | 470 | { |
| 471 | 471 | if (defined('CALENDAR_FIRST_DAY_OF_WEEK')) { |
| 472 | 472 | if ((CALENDAR_FIRST_DAY_OF_WEEK != $firstDay) && null !== $firstDay) { |
| 473 | - $msg = 'CALENDAR_FIRST_DAY_OF_WEEK constant already defined.' . ' The $firstDay parameter will be ignored.'; |
|
| 473 | + $msg = 'CALENDAR_FIRST_DAY_OF_WEEK constant already defined.'.' The $firstDay parameter will be ignored.'; |
|
| 474 | 474 | trigger_error($msg, E_USER_WARNING); |
| 475 | 475 | } |
| 476 | 476 | |
@@ -7,16 +7,16 @@ discard block |
||
| 7 | 7 | { |
| 8 | 8 | list($usec, $sec) = explode(' ', microtime()); |
| 9 | 9 | |
| 10 | - return (float)$usec + (float)$sec; |
|
| 10 | + return (float) $usec + (float) $sec; |
|
| 11 | 11 | } |
| 12 | 12 | |
| 13 | 13 | $start = getmicrotime(); |
| 14 | 14 | |
| 15 | -if (!@require_once __DIR__ . '/Calendar/Calendar.php') { |
|
| 15 | +if (!@require_once __DIR__.'/Calendar/Calendar.php') { |
|
| 16 | 16 | define('CALENDAR_ROOT', '../../'); |
| 17 | 17 | } |
| 18 | -require_once CALENDAR_ROOT . 'Month/Weekdays.php'; |
|
| 19 | -require_once CALENDAR_ROOT . 'Day.php'; |
|
| 18 | +require_once CALENDAR_ROOT.'Month/Weekdays.php'; |
|
| 19 | +require_once CALENDAR_ROOT.'Day.php'; |
|
| 20 | 20 | |
| 21 | 21 | if (!isset($_GET['y'])) { |
| 22 | 22 | $_GET['y'] = date('Y'); |
@@ -33,9 +33,9 @@ discard block |
||
| 33 | 33 | |
| 34 | 34 | // Construct strings for next/previous links |
| 35 | 35 | $PMonth = $Month->prevMonth('object'); // Get previous month as object |
| 36 | -$prev = $_SERVER['PHP_SELF'] . '?y=' . $PMonth->thisYear() . '&m=' . $PMonth->thisMonth() . '&d=' . $PMonth->thisDay(); |
|
| 36 | +$prev = $_SERVER['PHP_SELF'].'?y='.$PMonth->thisYear().'&m='.$PMonth->thisMonth().'&d='.$PMonth->thisDay(); |
|
| 37 | 37 | $NMonth = $Month->nextMonth('object'); |
| 38 | -$next = $_SERVER['PHP_SELF'] . '?y=' . $NMonth->thisYear() . '&m=' . $NMonth->thisMonth() . '&d=' . $NMonth->thisDay(); |
|
| 38 | +$next = $_SERVER['PHP_SELF'].'?y='.$NMonth->thisYear().'&m='.$NMonth->thisMonth().'&d='.$NMonth->thisDay(); |
|
| 39 | 39 | ?> |
| 40 | 40 | <!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN"> |
| 41 | 41 | <html> |
@@ -110,7 +110,7 @@ discard block |
||
| 110 | 110 | while ($Day = $Month->fetch()) { |
| 111 | 111 | |
| 112 | 112 | // Build a link string for each day |
| 113 | - $link = $_SERVER['PHP_SELF'] . '?y=' . $Day->thisYear() . '&m=' . $Day->thisMonth() . '&d=' . $Day->thisDay(); |
|
| 113 | + $link = $_SERVER['PHP_SELF'].'?y='.$Day->thisYear().'&m='.$Day->thisMonth().'&d='.$Day->thisDay(); |
|
| 114 | 114 | |
| 115 | 115 | // isFirst() to find start of week |
| 116 | 116 | if ($Day->isFirst()) { |
@@ -118,11 +118,11 @@ discard block |
||
| 118 | 118 | } |
| 119 | 119 | |
| 120 | 120 | if ($Day->isSelected()) { |
| 121 | - echo '<td class="selected">' . $Day->thisDay() . "</td>\n"; |
|
| 121 | + echo '<td class="selected">'.$Day->thisDay()."</td>\n"; |
|
| 122 | 122 | } elseif ($Day->isEmpty()) { |
| 123 | 123 | echo "<td> </td>\n"; |
| 124 | 124 | } else { |
| 125 | - echo '<td><a href="' . $link . '">' . $Day->thisDay() . "</a></td>\n"; |
|
| 125 | + echo '<td><a href="'.$link.'">'.$Day->thisDay()."</a></td>\n"; |
|
| 126 | 126 | } |
| 127 | 127 | |
| 128 | 128 | // isLast() to find end of week |
@@ -142,7 +142,7 @@ discard block |
||
| 142 | 142 | </tr> |
| 143 | 143 | </table> |
| 144 | 144 | <?php |
| 145 | -echo '<p><b>Took: ' . (getmicrotime() - $start) . ' seconds</b></p>'; |
|
| 145 | +echo '<p><b>Took: '.(getmicrotime() - $start).' seconds</b></p>'; |
|
| 146 | 146 | ?> |
| 147 | 147 | </body> |
| 148 | 148 | </html> |