Completed
Branch master (55a138)
by Michael
03:21
created
event.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -19,20 +19,20 @@  discard block
 block discarded – undo
19 19
 
20 20
 use XoopsModules\Extcal;
21 21
 
22
-include __DIR__ . '/../../mainfile.php';
23
-require_once __DIR__ . '/include/constantes.php';
22
+include __DIR__.'/../../mainfile.php';
23
+require_once __DIR__.'/include/constantes.php';
24 24
 $params                                  = ['view' => _EXTCAL_NAV_NEW_EVENT, 'file' => _EXTCAL_FILE_NEW_EVENT];
25 25
 $GLOBALS['xoopsOption']['template_main'] = 'extcal_event.tpl';
26
-require_once __DIR__ . '/header.php';
26
+require_once __DIR__.'/header.php';
27 27
 
28 28
 //exit;
29 29
 
30
-include XOOPS_ROOT_PATH . '/include/comment_view.php';
30
+include XOOPS_ROOT_PATH.'/include/comment_view.php';
31 31
 
32 32
 if (!isset($_GET['event'])) {
33 33
     $eventId = 0;
34 34
 } else {
35
-    $eventId = (int)$_GET['event'];
35
+    $eventId = (int) $_GET['event'];
36 36
 }
37 37
 $eventHandler          = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_EVENT);
38 38
 $fileHandler           = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_FILE);
@@ -230,4 +230,4 @@  discard block
 block discarded – undo
230 230
 
231 231
 //function XoopsFormDhtmlTextArea($caption, $name, $value = "", $rows = 5, $cols = 50, $hiddentext = "xoopsHiddenText", $options = array());
232 232
 
233
-include XOOPS_ROOT_PATH . '/footer.php';
233
+include XOOPS_ROOT_PATH.'/footer.php';
Please login to merge, or discard this patch.
view_month.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -2,23 +2,23 @@  discard block
 block discarded – undo
2 2
 
3 3
 use XoopsModules\Extcal;
4 4
 
5
-include __DIR__ . '/../../mainfile.php';
6
-require_once __DIR__ . '/include/constantes.php';
5
+include __DIR__.'/../../mainfile.php';
6
+require_once __DIR__.'/include/constantes.php';
7 7
 $params                                  = ['view' => _EXTCAL_NAV_MONTH, 'file' => _EXTCAL_FILE_MONTH];
8 8
 $GLOBALS['xoopsOption']['template_main'] = "extcal_view_{$params['view']}.tpl";
9
-require_once __DIR__ . '/header.php';
9
+require_once __DIR__.'/header.php';
10 10
 
11 11
 /* ========================================================================== */
12
-$year  = isset($_GET['year']) ? (int)$_GET['year'] : date('Y');
13
-$month = isset($_GET['month']) ? (int)$_GET['month'] : date('n');
14
-$cat   = isset($_GET['cat']) ? (int)$_GET['cat'] : 0;
12
+$year  = isset($_GET['year']) ? (int) $_GET['year'] : date('Y');
13
+$month = isset($_GET['month']) ? (int) $_GET['month'] : date('n');
14
+$cat   = isset($_GET['cat']) ? (int) $_GET['cat'] : 0;
15 15
 /* ========================================================================== */
16 16
 
17 17
 $form = new \XoopsSimpleForm('', 'navigSelectBox', $params['file'], 'get');
18 18
 $form->addElement(getListYears($year, $xoopsModuleConfig['agenda_nb_years_before'], $xoopsModuleConfig['agenda_nb_years_after']));
19 19
 $form->addElement(getListMonths($month));
20 20
 $form->addElement(Extcal\Utility::getListCategories($cat));
21
-$form->addElement( new \XoopsFormButton('', '', _SUBMIT, 'submit'));
21
+$form->addElement(new \XoopsFormButton('', '', _SUBMIT, 'submit'));
22 22
 
23 23
 // Assigning the form to the template
24 24
 $form->assign($xoopsTpl);
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
     'cat'          => $cat,
34 34
     'externalKeys' => 'cat_id',
35 35
 ];
36
-$events   = $eventHandler->getEventsOnPeriode($criteres);
36
+$events = $eventHandler->getEventsOnPeriode($criteres);
37 37
 /**********************************************************************/
38 38
 $eventsArray = $events;
39 39
 
@@ -90,21 +90,21 @@  discard block
 block discarded – undo
90 90
 $nMonthCalObj = $monthCalObj->nextMonth('object');
91 91
 $navig        = [
92 92
     'prev' => [
93
-        'uri'  => 'year=' . $pMonthCalObj->thisYear() . '&month=' . $pMonthCalObj->thisMonth(),
93
+        'uri'  => 'year='.$pMonthCalObj->thisYear().'&month='.$pMonthCalObj->thisMonth(),
94 94
         'name' => $timeHandler->getFormatedDate($xoopsModuleConfig['nav_date_month'], $pMonthCalObj->getTimestamp()),
95 95
     ],
96 96
     'this' => [
97
-        'uri'  => 'year=' . $monthCalObj->thisYear() . '&month=' . $monthCalObj->thisMonth(),
97
+        'uri'  => 'year='.$monthCalObj->thisYear().'&month='.$monthCalObj->thisMonth(),
98 98
         'name' => $timeHandler->getFormatedDate($xoopsModuleConfig['nav_date_month'], $monthCalObj->getTimestamp()),
99 99
     ],
100 100
     'next' => [
101
-        'uri'  => 'year=' . $nMonthCalObj->thisYear() . '&month=' . $nMonthCalObj->thisMonth(),
101
+        'uri'  => 'year='.$nMonthCalObj->thisYear().'&month='.$nMonthCalObj->thisMonth(),
102 102
         'name' => $timeHandler->getFormatedDate($xoopsModuleConfig['nav_date_month'], $nMonthCalObj->getTimestamp()),
103 103
     ],
104 104
 ];
105 105
 
106 106
 // Title of the page
107
-$xoopsTpl->assign('xoops_pagetitle', $xoopsModule->getVar('name') . ' ' . $navig['this']['name']);
107
+$xoopsTpl->assign('xoops_pagetitle', $xoopsModule->getVar('name').' '.$navig['this']['name']);
108 108
 
109 109
 // Assigning navig data to the template
110 110
 $xoopsTpl->assign('navig', $navig);
@@ -161,4 +161,4 @@  discard block
 block discarded – undo
161 161
 $xoopsTpl->assign('lang', $lang);
162 162
 $xoopsTpl->assign('view', 'month');
163 163
 
164
-include XOOPS_ROOT_PATH . '/footer.php';
164
+include XOOPS_ROOT_PATH.'/footer.php';
Please login to merge, or discard this patch.
edit_event.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -19,10 +19,10 @@  discard block
 block discarded – undo
19 19
 
20 20
 use XoopsModules\Extcal;
21 21
 
22
-include __DIR__ . '/../../mainfile.php';
22
+include __DIR__.'/../../mainfile.php';
23 23
 
24
-include XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
25
-require_once __DIR__ . '/include/constantes.php';
24
+include XOOPS_ROOT_PATH.'/class/xoopsformloader.php';
25
+require_once __DIR__.'/include/constantes.php';
26 26
 
27 27
 $permHandler = Extcal\Perm::getHandler();
28 28
 $xoopsUser   = $xoopsUser ?: null;
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
 
35 35
 $params                                  = ['view' => _EXTCAL_NAV_NEW_EVENT, 'file' => _EXTCAL_FILE_NEW_EVENT];
36 36
 $GLOBALS['xoopsOption']['template_main'] = "extcal_view_{$params['view']}.tpl";
37
-include XOOPS_ROOT_PATH . '/header.php';
37
+include XOOPS_ROOT_PATH.'/header.php';
38 38
 /* ========================================================================== */
39 39
 
40 40
 // Tooltips include
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
 if (!isset($_GET['event'])) {
46 46
     $eventId = 0;
47 47
 } else {
48
-    $eventId = (int)$_GET['event'];
48
+    $eventId = (int) $_GET['event'];
49 49
 }
50 50
 if (!isset($_GET['action'])) {
51 51
     $action = 'edit';
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
 // Getting eXtCal object's handler
57 57
 $eventHandler = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_EVENT);
58 58
 
59
-include XOOPS_ROOT_PATH . '/header.php';
59
+include XOOPS_ROOT_PATH.'/header.php';
60 60
 
61 61
 // Title of the page
62 62
 $xoopsTpl->assign('xoops_pagetitle', _MI_EXTCAL_SUBMIT_EVENT);
@@ -65,4 +65,4 @@  discard block
 block discarded – undo
65 65
 $form = $eventHandler->getEventForm('user', $action, ['event_id' => $eventId]);
66 66
 $form->display();
67 67
 
68
-include XOOPS_ROOT_PATH . '/footer.php';
68
+include XOOPS_ROOT_PATH.'/footer.php';
Please login to merge, or discard this patch.
rss.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -2,16 +2,16 @@  discard block
 block discarded – undo
2 2
 
3 3
 use XoopsModules\Extcal;
4 4
 
5
-include __DIR__ . '/../../mainfile.php';
6
-require_once __DIR__ . '/include/constantes.php';
7
-require_once __DIR__ . '/header.php';
5
+include __DIR__.'/../../mainfile.php';
6
+require_once __DIR__.'/include/constantes.php';
7
+require_once __DIR__.'/header.php';
8 8
 
9
-require_once XOOPS_ROOT_PATH . '/class/template.php';
9
+require_once XOOPS_ROOT_PATH.'/class/template.php';
10 10
 $eventHandler = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_EVENT);
11 11
 if (!isset($_GET['cat'])) {
12 12
     $cat = 0;
13 13
 } else {
14
-    $cat = (int)$_GET['cat'];
14
+    $cat = (int) $_GET['cat'];
15 15
 }
16 16
 if (function_exists('mb_http_output')) {
17 17
     mb_http_output('pass');
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
     $events = $eventHandler->getUpcommingEvent($xoopsModuleConfig['rss_nb_event'], $cat);
25 25
     if (is_array($events)) {
26 26
         $tpl->assign('channel_title', xoops_utf8_encode(htmlspecialchars($xoopsConfig['sitename'], ENT_QUOTES)));
27
-        $tpl->assign('channel_link', XOOPS_URL . '/');
27
+        $tpl->assign('channel_link', XOOPS_URL.'/');
28 28
         $tpl->assign('channel_desc', xoops_utf8_encode(htmlspecialchars($xoopsConfig['slogan'], ENT_QUOTES)));
29 29
         $tpl->assign('channel_lastbuild', formatTimestamp(time(), 'rss'));
30 30
         $tpl->assign('channel_webmaster', $xoopsConfig['adminmail']);
@@ -32,14 +32,14 @@  discard block
 block discarded – undo
32 32
         $tpl->assign('channel_category', 'Event');
33 33
         $tpl->assign('channel_generator', 'XOOPS');
34 34
         $tpl->assign('channel_language', _LANGCODE);
35
-        $tpl->assign('image_url', XOOPS_URL . '/modules/extcal/assets/images/extcal_logo.png');
35
+        $tpl->assign('image_url', XOOPS_URL.'/modules/extcal/assets/images/extcal_logo.png');
36 36
         $tpl->assign('image_width', 92);
37 37
         $tpl->assign('image_height', 52);
38 38
         foreach ($events as $event) {
39 39
             $tpl->append('items', [
40 40
                 'title'       => xoops_utf8_encode(htmlspecialchars($event->getVar('event_title'), ENT_QUOTES)),
41
-                'link'        => XOOPS_URL . '/modules/extcal/event.php?event=' . $event->getVar('event_id'),
42
-                'guid'        => XOOPS_URL . '/modules/extcal/event.php?event=' . $event->getVar('event_id'),
41
+                'link'        => XOOPS_URL.'/modules/extcal/event.php?event='.$event->getVar('event_id'),
42
+                'guid'        => XOOPS_URL.'/modules/extcal/event.php?event='.$event->getVar('event_id'),
43 43
                 'pubdate'     => formatTimestamp($event->getVar('event_start'), 'rss'),
44 44
                 'description' => xoops_utf8_encode(htmlspecialchars($event->getVar('event_desc'), ENT_QUOTES)),
45 45
             ]);
Please login to merge, or discard this patch.
class/Etablissement.php 1 patch
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
 //Kraven 30
21 21
 // defined('XOOPS_ROOT_PATH') || exit('Restricted access.');
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 Event extends \XoopsObject
26 26
 //class extcal_etablissement extends \XoopsObject
@@ -70,34 +70,34 @@  discard block
 block discarded – undo
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"');
77 77
 
78
-        $form->addElement( new \XoopsFormText(_MD_EXTCAL_ETABLISSEMENT_NOM, 'nom', 50, 255, $this->getVar('nom')), true);
79
-        $form->addElement( new \XoopsFormDhtmlTextArea(_MD_EXTCAL_ETABLISSEMENT_DESCRIPTION, 'description', $this->getVar('description'), 10), false);
80
-        $form->addElement( new \XoopsFormText(_MD_EXTCAL_ETABLISSEMENT_CATEGORIE, 'categorie', 40, 255, $this->getVar('categorie')), false);
81
-        $form->addElement( new \XoopsFormText(_MD_EXTCAL_ETABLISSEMENT_ADRESSE, 'adresse', 50, 255, $this->getVar('adresse')), false);
82
-        $form->addElement( new \XoopsFormText(_MD_EXTCAL_ETABLISSEMENT_ADRESSE2, 'adresse2', 50, 255, $this->getVar('adresse2')), false);
83
-        $form->addElement( new \XoopsFormText(_MD_EXTCAL_ETABLISSEMENT_CP, 'cp', 10, 10, $this->getVar('cp')), false);
84
-        $form->addElement( new \XoopsFormText(_MD_EXTCAL_ETABLISSEMENT_VILLE, 'ville', 20, 255, $this->getVar('ville')), false);
85
-        $form->addElement( new \XoopsFormText(_MD_EXTCAL_ETABLISSEMENT_TEL_FIXE, 'tel_fixe', 20, 20, $this->getVar('tel_fixe')), false);
86
-        $form->addElement( new \XoopsFormText(_MD_EXTCAL_ETABLISSEMENT_TEL_PORTABLE, 'tel_portable', 20, 20, $this->getVar('tel_portable')), false);
87
-        $form->addElement( new \XoopsFormText(_MD_EXTCAL_ETABLISSEMENT_MAIL, 'mail', 50, 255, $this->getVar('mail')), false);
88
-        $form->addElement( new \XoopsFormText(_MD_EXTCAL_ETABLISSEMENT_SITE, 'site', 50, 255, $this->getVar('site')), false);
89
-        $form->addElement( new \XoopsFormTextArea(_MD_EXTCAL_ETABLISSEMENT_HORAIRES, 'horaires', $this->getVar('horaires'), 3, 40));
90
-        $form->addElement( new \XoopsFormTextArea(_MD_EXTCAL_ETABLISSEMENT_DIVERS, 'divers', $this->getVar('divers'), 5, 40));
78
+        $form->addElement(new \XoopsFormText(_MD_EXTCAL_ETABLISSEMENT_NOM, 'nom', 50, 255, $this->getVar('nom')), true);
79
+        $form->addElement(new \XoopsFormDhtmlTextArea(_MD_EXTCAL_ETABLISSEMENT_DESCRIPTION, 'description', $this->getVar('description'), 10), false);
80
+        $form->addElement(new \XoopsFormText(_MD_EXTCAL_ETABLISSEMENT_CATEGORIE, 'categorie', 40, 255, $this->getVar('categorie')), false);
81
+        $form->addElement(new \XoopsFormText(_MD_EXTCAL_ETABLISSEMENT_ADRESSE, 'adresse', 50, 255, $this->getVar('adresse')), false);
82
+        $form->addElement(new \XoopsFormText(_MD_EXTCAL_ETABLISSEMENT_ADRESSE2, 'adresse2', 50, 255, $this->getVar('adresse2')), false);
83
+        $form->addElement(new \XoopsFormText(_MD_EXTCAL_ETABLISSEMENT_CP, 'cp', 10, 10, $this->getVar('cp')), false);
84
+        $form->addElement(new \XoopsFormText(_MD_EXTCAL_ETABLISSEMENT_VILLE, 'ville', 20, 255, $this->getVar('ville')), false);
85
+        $form->addElement(new \XoopsFormText(_MD_EXTCAL_ETABLISSEMENT_TEL_FIXE, 'tel_fixe', 20, 20, $this->getVar('tel_fixe')), false);
86
+        $form->addElement(new \XoopsFormText(_MD_EXTCAL_ETABLISSEMENT_TEL_PORTABLE, 'tel_portable', 20, 20, $this->getVar('tel_portable')), false);
87
+        $form->addElement(new \XoopsFormText(_MD_EXTCAL_ETABLISSEMENT_MAIL, 'mail', 50, 255, $this->getVar('mail')), false);
88
+        $form->addElement(new \XoopsFormText(_MD_EXTCAL_ETABLISSEMENT_SITE, 'site', 50, 255, $this->getVar('site')), false);
89
+        $form->addElement(new \XoopsFormTextArea(_MD_EXTCAL_ETABLISSEMENT_HORAIRES, 'horaires', $this->getVar('horaires'), 3, 40));
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
-        $form->addElement( new \XoopsFormText(_MD_EXTCAL_ETABLISSEMENT_MAP, 'map', 150, 255, $this->getVar('map')), false);
95
+        $form->addElement(new \XoopsFormText(_MD_EXTCAL_ETABLISSEMENT_MAP, 'map', 150, 255, $this->getVar('map')), false);
96 96
 
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,15 +108,15 @@  discard block
 block discarded – undo
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
-        $form->addElement( new \XoopsFormHidden('file', $this->getVar('logo')));
115
+        $form->addElement(new \XoopsFormHidden('file', $this->getVar('logo')));
116 116
         unset($file_img, $file_tray);
117 117
 
118
-        $form->addElement( new \XoopsFormHidden('op', 'save_etablissement'));
119
-        $form->addElement( new \XoopsFormButton('', 'submit', _SUBMIT, 'submit'));
118
+        $form->addElement(new \XoopsFormHidden('op', 'save_etablissement'));
119
+        $form->addElement(new \XoopsFormButton('', 'submit', _SUBMIT, 'submit'));
120 120
         $form->display();
121 121
 
122 122
         return $form;
Please login to merge, or discard this patch.
class/CategoryHandler.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -61,9 +61,9 @@  discard block
 block discarded – undo
61 61
         $groupPermissionHandler = xoops_getHandler('groupperm');
62 62
         $moduleId               = $GLOBALS['xoopsModule']->getVar('mid');
63 63
 
64
-        $criteria =  new \CriteriaCompo();
65
-        $criteria->add( new \Criteria('gperm_name', 'extcal_perm_mask'));
66
-        $criteria->add( new \Criteria('gperm_modid', $moduleId));
64
+        $criteria = new \CriteriaCompo();
65
+        $criteria->add(new \Criteria('gperm_name', 'extcal_perm_mask'));
66
+        $criteria->add(new \Criteria('gperm_modid', $moduleId));
67 67
         $permMask = $groupPermissionHandler->getObjects($criteria);
68 68
 
69 69
         // Retriving group list
@@ -124,8 +124,8 @@  discard block
 block discarded – undo
124 124
      */
125 125
     public function getCat($catId, $skipPerm = false)
126 126
     {
127
-        $criteriaCompo =  new \CriteriaCompo();
128
-        $criteriaCompo->add( new \Criteria('cat_id', $catId));
127
+        $criteriaCompo = new \CriteriaCompo();
128
+        $criteriaCompo->add(new \Criteria('cat_id', $catId));
129 129
         if (!$skipPerm) {
130 130
             $this->_addCatPermCriteria($criteriaCompo, $GLOBALS['xoopsUser']);
131 131
         }
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
      */
146 146
     public function getAllCat($user, $perm = 'extcal_cat_view')
147 147
     {
148
-        $criteriaCompo =  new \CriteriaCompo();
148
+        $criteriaCompo = new \CriteriaCompo();
149 149
         if ('all' !== $perm) {
150 150
             $this->_addCatPermCriteria($criteriaCompo, $user, $perm);
151 151
         }
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
      */
162 162
     public function getAllCatById($user, $perm = 'all')
163 163
     {
164
-        $criteriaCompo =  new \CriteriaCompo();
164
+        $criteriaCompo = new \CriteriaCompo();
165 165
         if ('all' !== $perm) {
166 166
             $this->_addCatPermCriteria($criteriaCompo, $user, $perm);
167 167
         }
@@ -186,15 +186,15 @@  discard block
 block discarded – undo
186 186
         $authorizedAccessCats = $this->_extcalPerm->getAuthorizedCat($user, 'extcal_cat_view');
187 187
         $count                = count($authorizedAccessCats);
188 188
         if ($count > 0) {
189
-            $in = '(' . $authorizedAccessCats[0];
189
+            $in = '('.$authorizedAccessCats[0];
190 190
             array_shift($authorizedAccessCats);
191 191
             foreach ($authorizedAccessCats as $authorizedAccessCat) {
192
-                $in .= ',' . $authorizedAccessCat;
192
+                $in .= ','.$authorizedAccessCat;
193 193
             }
194 194
             $in .= ')';
195
-            $criteria->add( new \Criteria('cat_id', $in, 'IN'));
195
+            $criteria->add(new \Criteria('cat_id', $in, 'IN'));
196 196
         } else {
197
-            $criteria->add( new \Criteria('cat_id', '(0)', 'IN'));
197
+            $criteria->add(new \Criteria('cat_id', '(0)', 'IN'));
198 198
         }
199 199
     }
200 200
 
Please login to merge, or discard this patch.
class/Event.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
 
20 20
 // defined('XOOPS_ROOT_PATH') || exit('Restricted access.');
21 21
 
22
- // require_once __DIR__ . '/ExtcalPersistableObjectHandler.php';
22
+    // require_once __DIR__ . '/ExtcalPersistableObjectHandler.php';
23 23
 require_once __DIR__ . '/perm.php';
24 24
 require_once __DIR__ . '/time.php';
25 25
 require_once __DIR__ . '/config.php';
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -20,12 +20,12 @@  discard block
 block discarded – undo
20 20
 // defined('XOOPS_ROOT_PATH') || exit('Restricted access.');
21 21
 
22 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';
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 Event.
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
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']          = [
69
+        $this->externalKey['cat_id'] = [
70 70
             'className'      => 'Category',
71 71
             'getMethodeName' => 'getCat',
72 72
             'keyName'        => 'cat',
Please login to merge, or discard this patch.
class/Common/FilesManagement.php 2 patches
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
                     throw new \RuntimeException(sprintf('Unable to create the %s directory', $folder));
33 33
                 }
34 34
 
35
-                file_put_contents($folder . '/index.html', '<script>history.go(-1);</script>');
35
+                file_put_contents($folder.'/index.html', '<script>history.go(-1);</script>');
36 36
             }
37 37
         }
38 38
         catch (Exception $e) {
@@ -61,10 +61,10 @@  discard block
 block discarded – undo
61 61
         if (!mkdir($dst) && !is_dir($dst)) {
62 62
             while (false !== ($file = readdir($dir))) {
63 63
                 if (('.' !== $file) && ('..' !== $file)) {
64
-                    if (is_dir($src . '/' . $file)) {
65
-                        self::recurseCopy($src . '/' . $file, $dst . '/' . $file);
64
+                    if (is_dir($src.'/'.$file)) {
65
+                        self::recurseCopy($src.'/'.$file, $dst.'/'.$file);
66 66
                     } else {
67
-                        copy($src . '/' . $file, $dst . '/' . $file);
67
+                        copy($src.'/'.$file, $dst.'/'.$file);
68 68
                     }
69 69
                 }
70 70
             }
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
                 self::rrmdir($fObj->getPathname());
160 160
             }
161 161
         }
162
-        $iterator = null;   // clear iterator Obj to close file/directory
162
+        $iterator = null; // clear iterator Obj to close file/directory
163 163
         return rmdir($src); // remove the directory & return results
164 164
     }
165 165
 
@@ -192,14 +192,14 @@  discard block
 block discarded – undo
192 192
         $iterator = new DirectoryIterator($src);
193 193
         foreach ($iterator as $fObj) {
194 194
             if ($fObj->isFile()) {
195
-                rename($fObj->getPathname(), "{$dest}/" . $fObj->getFilename());
195
+                rename($fObj->getPathname(), "{$dest}/".$fObj->getFilename());
196 196
             } elseif (!$fObj->isDot() && $fObj->isDir()) {
197 197
                 // Try recursively on directory
198
-                self::rmove($fObj->getPathname(), "{$dest}/" . $fObj->getFilename());
198
+                self::rmove($fObj->getPathname(), "{$dest}/".$fObj->getFilename());
199 199
                 //                rmdir($fObj->getPath()); // now delete the directory
200 200
             }
201 201
         }
202
-        $iterator = null;   // clear iterator Obj to close file/directory
202
+        $iterator = null; // clear iterator Obj to close file/directory
203 203
         return rmdir($src); // remove the directory & return results
204 204
     }
205 205
 
@@ -235,9 +235,9 @@  discard block
 block discarded – undo
235 235
         $iterator = new DirectoryIterator($src);
236 236
         foreach ($iterator as $fObj) {
237 237
             if ($fObj->isFile()) {
238
-                copy($fObj->getPathname(), "{$dest}/" . $fObj->getFilename());
238
+                copy($fObj->getPathname(), "{$dest}/".$fObj->getFilename());
239 239
             } elseif (!$fObj->isDot() && $fObj->isDir()) {
240
-                self::rcopy($fObj->getPathname(), "{$dest}/" . $fObj->getFilename());
240
+                self::rcopy($fObj->getPathname(), "{$dest}/".$fObj->getFilename());
241 241
             }
242 242
         }
243 243
         return true;
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -34,8 +34,7 @@
 block discarded – undo
34 34
 
35 35
                 file_put_contents($folder . '/index.html', '<script>history.go(-1);</script>');
36 36
             }
37
-        }
38
-        catch (Exception $e) {
37
+        } catch (Exception $e) {
39 38
             echo 'Caught exception: ', $e->getMessage(), "\n", '<br>';
40 39
         }
41 40
     }
Please login to merge, or discard this patch.
class/Common/VersionChecks.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -37,13 +37,13 @@  discard block
 block discarded – undo
37 37
         //check for minimum XOOPS version
38 38
         $currentVer = substr(XOOPS_VERSION, 6); // get the numeric part of string
39 39
         if (null === $requiredVer) {
40
-            $requiredVer = '' . $module->getInfo('min_xoops'); //making sure it's a string
40
+            $requiredVer = ''.$module->getInfo('min_xoops'); //making sure it's a string
41 41
         }
42
-        $success     = true;
42
+        $success = true;
43 43
 
44
-        if (version_compare($currentVer, $requiredVer, '<')){
45
-            $success     = false;
46
-            $module->setErrors(sprintf(constant('CO_' . $moduleDirNameUpper . '_ERROR_BAD_XOOPS'), $requiredVer, $currentVer));
44
+        if (version_compare($currentVer, $requiredVer, '<')) {
45
+            $success = false;
46
+            $module->setErrors(sprintf(constant('CO_'.$moduleDirNameUpper.'_ERROR_BAD_XOOPS'), $requiredVer, $currentVer));
47 47
         }
48 48
 
49 49
         return $success;
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
         $reqVer  = $module->getInfo('min_php');
67 67
         if (false !== $reqVer && '' !== $reqVer) {
68 68
             if (version_compare($verNum, $reqVer, '<')) {
69
-                $module->setErrors(sprintf(constant('CO_' . $moduleDirNameUpper . '_ERROR_BAD_PHP'), $reqVer, $verNum));
69
+                $module->setErrors(sprintf(constant('CO_'.$moduleDirNameUpper.'_ERROR_BAD_PHP'), $reqVer, $verNum));
70 70
                 $success = false;
71 71
             }
72 72
         }
Please login to merge, or discard this patch.