Completed
Push — master ( a9decc...a21b67 )
by Michael
02:51
created
admin/event.php 2 patches
Switch Indentation   +304 added lines, -304 removed lines patch added patch discarded remove patch
@@ -70,177 +70,195 @@  discard block
 block discarded – undo
70 70
 
71 71
 switch ($op) {
72 72
 
73
-    case 'enreg':
74
-
75
-        $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE);
76
-        $fileHandler  = xoops_getModuleHandler(_EXTCAL_CLS_FILE, _EXTCAL_MODULE);
77
-        // $t = print_r($_POST,true);
78
-        // echo "<pre>{$t}</pre><br>";
79
-        // exit;
80
-        // If the date format is wrong
81
-        //        if (
82
-        //            !preg_match(_EXTCAL_MOTIF_DATE, $_POST['event_start']['date'])
83
-        //                || !preg_match(_EXTCAL_MOTIF_DATE, $_POST['event_end']['date'])
84
-        //        ) {
85
-        //            redirect_header(
86
-        //                'event.php', 3, _MD_EXTCAL_WRONG_DATE_FORMAT . "<br>"
87
-        //                . implode('<br>', $GLOBALS['xoopsSecurity']->getErrors())
88
-        //            );
89
-        //            exit;
90
-        //        }
91
-
92
-        //exit;
93
-        ///////////////////////////////////////////////////////////////////////////////
94
-        ExtcalUtility::extcal_loadImg($_REQUEST, $event_picture1, $event_picture2);
95
-        ///////////////////////////////////////////////////////////////////////////////
96
-        $data = array(
97
-            'event_title'         => $_POST['event_title'],
98
-            'cat_id'              => $_POST['cat_id'],
99
-            'event_desc'          => $_POST['event_desc'],
100
-            'event_nbmember'      => $_POST['event_nbmember'],
101
-            'event_organisateur'  => $_POST['event_organisateur'],
102
-            'event_contact'       => $_POST['event_contact'],
103
-            'event_url'           => $_POST['event_url'],
104
-            'event_email'         => $_POST['event_email'],
105
-            'event_address'       => $_POST['event_address'],
106
-            'event_approved'      => 1,
107
-            'event_start'         => $_POST['event_start'],
108
-            'have_end'            => $_POST['have_end'],
109
-            'event_end'           => $_POST['event_end'],
110
-            'event_picture1'      => @$event_picture1,
111
-            'event_picture2'      => @$event_picture2,
112
-            'event_price'         => @$_POST['event_price'],
113
-            'event_etablissement' => $_POST['event_etablissement'],
114
-            'dohtml'              => $extcalConfig['allow_html'],
115
-            'event_icone'         => $_POST['event_icone'],
116
-        );
117
-
118
-        // Event edited
119
-        if (isset($_POST['event_id'])) {
120
-            if (!$eventHandler->modifyEvent($_POST['event_id'], $data)) {
121
-                redirect_header('event.php', 3, _AM_EXTCAL_EVENT_EDIT_FAILED, false);
73
+        case 'enreg':
74
+
75
+            $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE);
76
+            $fileHandler  = xoops_getModuleHandler(_EXTCAL_CLS_FILE, _EXTCAL_MODULE);
77
+            // $t = print_r($_POST,true);
78
+            // echo "<pre>{$t}</pre><br>";
79
+            // exit;
80
+            // If the date format is wrong
81
+            //        if (
82
+            //            !preg_match(_EXTCAL_MOTIF_DATE, $_POST['event_start']['date'])
83
+            //                || !preg_match(_EXTCAL_MOTIF_DATE, $_POST['event_end']['date'])
84
+            //        ) {
85
+            //            redirect_header(
86
+            //                'event.php', 3, _MD_EXTCAL_WRONG_DATE_FORMAT . "<br>"
87
+            //                . implode('<br>', $GLOBALS['xoopsSecurity']->getErrors())
88
+            //            );
89
+            //            exit;
90
+            //        }
91
+
92
+            //exit;
93
+            ///////////////////////////////////////////////////////////////////////////////
94
+            ExtcalUtility::extcal_loadImg($_REQUEST, $event_picture1, $event_picture2);
95
+            ///////////////////////////////////////////////////////////////////////////////
96
+            $data = array(
97
+                'event_title'         => $_POST['event_title'],
98
+                'cat_id'              => $_POST['cat_id'],
99
+                'event_desc'          => $_POST['event_desc'],
100
+                'event_nbmember'      => $_POST['event_nbmember'],
101
+                'event_organisateur'  => $_POST['event_organisateur'],
102
+                'event_contact'       => $_POST['event_contact'],
103
+                'event_url'           => $_POST['event_url'],
104
+                'event_email'         => $_POST['event_email'],
105
+                'event_address'       => $_POST['event_address'],
106
+                'event_approved'      => 1,
107
+                'event_start'         => $_POST['event_start'],
108
+                'have_end'            => $_POST['have_end'],
109
+                'event_end'           => $_POST['event_end'],
110
+                'event_picture1'      => @$event_picture1,
111
+                'event_picture2'      => @$event_picture2,
112
+                'event_price'         => @$_POST['event_price'],
113
+                'event_etablissement' => $_POST['event_etablissement'],
114
+                'dohtml'              => $extcalConfig['allow_html'],
115
+                'event_icone'         => $_POST['event_icone'],
116
+            );
117
+
118
+            // Event edited
119
+            if (isset($_POST['event_id'])) {
120
+                if (!$eventHandler->modifyEvent($_POST['event_id'], $data)) {
121
+                    redirect_header('event.php', 3, _AM_EXTCAL_EVENT_EDIT_FAILED, false);
122
+                } else {
123
+                    $fileHandler->createFile((int)$_POST['event_id']);
124
+                    redirect_header('event.php', 3, _AM_EXTCAL_EVENT_EDITED, false);
125
+                }
126
+
127
+                // New event
122 128
             } else {
123
-                $fileHandler->createFile((int)$_POST['event_id']);
124
-                redirect_header('event.php', 3, _AM_EXTCAL_EVENT_EDITED, false);
129
+                $notificationHandler = xoops_getHandler('notification');
130
+                /** @var ExtcalCatHandler $catHandler */
131
+                $catHandler = xoops_getModuleHandler(_EXTCAL_CLS_CAT, _EXTCAL_MODULE);
132
+
133
+                $data['event_submitter']  = $xoopsUser ? $xoopsUser->getVar('uid') : 0;
134
+                $data['event_submitdate'] = time();
135
+
136
+                if ($eventHandler->createEvent($data, $_POST)) {
137
+                    $fileHandler->createFile($eventHandler->getInsertId());
138
+                    $cat = $catHandler->getCat($_POST['cat_id'], $xoopsUser, 'all');
139
+                    $notificationHandler->triggerEvent('global', 0, 'new_event', array('EVENT_TITLE' => $_POST['event_title']));
140
+                    $notificationHandler->triggerEvent('cat', $_POST['cat_id'], 'new_event_cat', array(
141
+                        'EVENT_TITLE' => $_POST['event_title'],
142
+                        'CAT_NAME'    => $cat->getVar('cat_name'),
143
+                    ));
144
+                    redirect_header('event.php', 3, _AM_EXTCAL_EVENT_CREATED, false);
145
+                } else {
146
+                    redirect_header('event.php', 3, _AM_EXTCAL_EVENT_CREATE_FAILED, false);
147
+                }
125 148
             }
149
+            break;
126 150
 
127
-            // New event
128
-        } else {
129
-            $notificationHandler = xoops_getHandler('notification');
130
-            /** @var ExtcalCatHandler $catHandler */
131
-            $catHandler = xoops_getModuleHandler(_EXTCAL_CLS_CAT, _EXTCAL_MODULE);
132
-
133
-            $data['event_submitter']  = $xoopsUser ? $xoopsUser->getVar('uid') : 0;
134
-            $data['event_submitdate'] = time();
135
-
136
-            if ($eventHandler->createEvent($data, $_POST)) {
137
-                $fileHandler->createFile($eventHandler->getInsertId());
138
-                $cat = $catHandler->getCat($_POST['cat_id'], $xoopsUser, 'all');
139
-                $notificationHandler->triggerEvent('global', 0, 'new_event', array('EVENT_TITLE' => $_POST['event_title']));
140
-                $notificationHandler->triggerEvent('cat', $_POST['cat_id'], 'new_event_cat', array(
141
-                    'EVENT_TITLE' => $_POST['event_title'],
142
-                    'CAT_NAME'    => $cat->getVar('cat_name'),
143
-                ));
144
-                redirect_header('event.php', 3, _AM_EXTCAL_EVENT_CREATED, false);
145
-            } else {
146
-                redirect_header('event.php', 3, _AM_EXTCAL_EVENT_CREATE_FAILED, false);
151
+        case 'clone': /* sur validation du formulaire */
152
+        case 'modify':
153
+            $action = (($op === 'clone') ? 'clone' : 'edit');
154
+            xoops_cp_header();
155
+            //================================================
156
+            // require_once (XOOPS_ROOT_PATH . '/class/xoopsform/tc_calendar/formtccalendar.php');
157
+            //
158
+            //        // Call the calendar constructor - use the desired form and format, according to the instructions/samples provided on triconsole.com
159
+            //        $dateBirthday = new XoopsTcCalendar("datez1", true, false);
160
+            //        //$dateBirthday->setIcon("/images/iconCalendar.gif");
161
+            //        $dateBirthday->setIcon("/class/xoopsform/tc_calendar/images/iconCalendar.gif");
162
+            //        //$dateBirthday->rtl=false;
163
+            //        $dateBirthday->setAutoHide(false);
164
+            //
165
+            //       //$myCalendar->setDate(date('d'), date('m'), date('Y'));
166
+            //       //$dateBirthday->setDate($p['date1_day'], $p['date1_month'], $p['date1_year']);
167
+            //        $dateBirthday->setDate(date('d'), date('m'), date('Y'));
168
+            //
169
+            //        $dateBirthday->setPath(XOOPS_URL . "/class/xoopsform/tc_calendar/");
170
+            //        $dateBirthday->zindex = 150; //default 1
171
+            //        $dateBirthday->setYearInterval(1995, date('Y'));
172
+            //        $dateBirthday->dateAllow('1960-03-01', date('Y-m-d'));
173
+            //        //$dateBirthday->autoSubmit(true, "calendar");
174
+            //        $dateBirthday->disabledDay("sat");
175
+            //        $dateBirthday->disabledDay("sun");
176
+            //        $dateBirthday->setSpecificDate(array("2011-04-14", "2010-12-25"), 0, 'month');
177
+            //        $dateBirthday->setSpecificDate(array("2011-04-01"), 0, 'year');
178
+            //        $dateBirthday->setAlignment('right', 'bottom'); //optional
179
+            // echo "<table><tr><td>zzzzz</td><td></td><td>";
180
+            // echo $dateBirthday->render();
181
+            // echo "</td></tr></table>";
182
+            //echo $dateBirthday->render();
183
+            //================================================
184
+            // @author      Gregory Mage (Aka Mage)
185
+            //***************************************************************************************
186
+            //         require_once XOOPS_ROOT_PATH . "/modules/extcal/class/admin.php";
187
+            $adminObject = \Xmf\Module\Admin::getInstance();
188
+            $adminObject->displayNavigation(basename(__FILE__));
189
+            //***************************************************************************************
190
+
191
+            $eventId      = $_GET['event_id'];
192
+            $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE);
193
+
194
+            echo '<fieldset><legend style="font-weight:bold; color:#990000;">' . _MD_EXTCAL_EDIT_EVENT . '</legend>';
195
+
196
+            if ($form = $eventHandler->getEventForm('admin', $action, array('event_id' => $eventId))) {
197
+                $form->display();
147 198
             }
148
-        }
149
-        break;
150
-
151
-    case 'clone': /* sur validation du formulaire */
152
-    case 'modify':
153
-        $action = (($op === 'clone') ? 'clone' : 'edit');
154
-        xoops_cp_header();
155
-        //================================================
156
-        // require_once (XOOPS_ROOT_PATH . '/class/xoopsform/tc_calendar/formtccalendar.php');
157
-        //
158
-        //        // Call the calendar constructor - use the desired form and format, according to the instructions/samples provided on triconsole.com
159
-        //        $dateBirthday = new XoopsTcCalendar("datez1", true, false);
160
-        //        //$dateBirthday->setIcon("/images/iconCalendar.gif");
161
-        //        $dateBirthday->setIcon("/class/xoopsform/tc_calendar/images/iconCalendar.gif");
162
-        //        //$dateBirthday->rtl=false;
163
-        //        $dateBirthday->setAutoHide(false);
164
-        //
165
-        //       //$myCalendar->setDate(date('d'), date('m'), date('Y'));
166
-        //       //$dateBirthday->setDate($p['date1_day'], $p['date1_month'], $p['date1_year']);
167
-        //        $dateBirthday->setDate(date('d'), date('m'), date('Y'));
168
-        //
169
-        //        $dateBirthday->setPath(XOOPS_URL . "/class/xoopsform/tc_calendar/");
170
-        //        $dateBirthday->zindex = 150; //default 1
171
-        //        $dateBirthday->setYearInterval(1995, date('Y'));
172
-        //        $dateBirthday->dateAllow('1960-03-01', date('Y-m-d'));
173
-        //        //$dateBirthday->autoSubmit(true, "calendar");
174
-        //        $dateBirthday->disabledDay("sat");
175
-        //        $dateBirthday->disabledDay("sun");
176
-        //        $dateBirthday->setSpecificDate(array("2011-04-14", "2010-12-25"), 0, 'month');
177
-        //        $dateBirthday->setSpecificDate(array("2011-04-01"), 0, 'year');
178
-        //        $dateBirthday->setAlignment('right', 'bottom'); //optional
179
-        // echo "<table><tr><td>zzzzz</td><td></td><td>";
180
-        // echo $dateBirthday->render();
181
-        // echo "</td></tr></table>";
182
-        //echo $dateBirthday->render();
183
-        //================================================
184
-        // @author      Gregory Mage (Aka Mage)
185
-        //***************************************************************************************
186
-        //         require_once XOOPS_ROOT_PATH . "/modules/extcal/class/admin.php";
187
-        $adminObject = \Xmf\Module\Admin::getInstance();
188
-        $adminObject->displayNavigation(basename(__FILE__));
189
-        //***************************************************************************************
190
-
191
-        $eventId      = $_GET['event_id'];
192
-        $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE);
193
-
194
-        echo '<fieldset><legend style="font-weight:bold; color:#990000;">' . _MD_EXTCAL_EDIT_EVENT . '</legend>';
195
-
196
-        if ($form = $eventHandler->getEventForm('admin', $action, array('event_id' => $eventId))) {
197
-            $form->display();
198
-        }
199 199
 
200
-        echo '</fieldset><br>';
200
+            echo '</fieldset><br>';
201 201
 
202
-        xoops_cp_footer();
202
+            xoops_cp_footer();
203 203
 
204
-        break;
204
+            break;
205 205
 
206
-    case 'clone2': /* sur clique de l'icone du formulaire*/
206
+        case 'clone2': /* sur clique de l'icone du formulaire*/
207 207
 
208
-        //$newEventId = 1;
209
-        $eventId      = $_GET['event_id'];
210
-        $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE);
211
-        $event        = $eventHandler->getEvent($eventId);
212
-        $t            = $event->getVars();
213
-        $data         = array();
214
-//        while (list($key, $val) = each($t)) {
215
-        foreach ($t as $key => $val) {
216
-            $data[$key] = $val['value'];
217
-        }
208
+            //$newEventId = 1;
209
+            $eventId      = $_GET['event_id'];
210
+            $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE);
211
+            $event        = $eventHandler->getEvent($eventId);
212
+            $t            = $event->getVars();
213
+            $data         = array();
214
+    //        while (list($key, $val) = each($t)) {
215
+            foreach ($t as $key => $val) {
216
+                $data[$key] = $val['value'];
217
+            }
218 218
 
219
-        $data['event_id']    = 0;
220
-        $data['event_title'] .= ' (' . _AM_EXTCAL_CLONE_OF . $eventId . ')';
219
+            $data['event_id']    = 0;
220
+            $data['event_title'] .= ' (' . _AM_EXTCAL_CLONE_OF . $eventId . ')';
221 221
 
222
-        $newEvent = $eventHandler->create();
223
-        $newEvent->setVars($data);
224
-        $t = $eventHandler->insert($newEvent, true);
222
+            $newEvent = $eventHandler->create();
223
+            $newEvent->setVars($data);
224
+            $t = $eventHandler->insert($newEvent, true);
225 225
 
226
-        $newEventId = $newEvent->getVar('event_id');
227
-        $ts         = print_r($newEventId, true);
226
+            $newEventId = $newEvent->getVar('event_id');
227
+            $ts         = print_r($newEventId, true);
228 228
 
229
-        redirect_header("event.php?op=modify&event_id={$newEventId}", 3, _AM_EXTCAL_EVENT_DELETED, false);
230
-        break;
229
+            redirect_header("event.php?op=modify&event_id={$newEventId}", 3, _AM_EXTCAL_EVENT_DELETED, false);
230
+            break;
231 231
 
232
-    case 'delete':
232
+        case 'delete':
233 233
 
234
-        if (isset($_POST['confirm'])) {
235
-            if (!$GLOBALS['xoopsSecurity']->check()) {
236
-                redirect_header('index.php', 3, _NOPERM . '<br>' . implode('<br>', $GLOBALS['xoopsSecurity']->getErrors()));
237
-                exit;
234
+            if (isset($_POST['confirm'])) {
235
+                if (!$GLOBALS['xoopsSecurity']->check()) {
236
+                    redirect_header('index.php', 3, _NOPERM . '<br>' . implode('<br>', $GLOBALS['xoopsSecurity']->getErrors()));
237
+                    exit;
238
+                }
239
+                //             $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE);
240
+                //             $eventHandler->deleteEvent($_POST['event_id']);
241
+                deleteEvents($_POST['event_id']);
242
+                redirect_header('event.php', 3, _AM_EXTCAL_EVENT_DELETED, false);
243
+            } else {
244
+                xoops_cp_header();
245
+                // @author      Gregory Mage (Aka Mage)
246
+                //***************************************************************************************
247
+                //require_once XOOPS_ROOT_PATH . "/modules/extcal/class/admin.php";
248
+                $adminObject = \Xmf\Module\Admin::getInstance();
249
+                $adminObject->displayNavigation(basename(__FILE__));
250
+                //***************************************************************************************
251
+
252
+                $hiddens = array('event_id' => $_GET['event_id'], 'form_delete' => '', 'confirm' => 1);
253
+                xoops_confirm($hiddens, 'event.php?op=delete', _AM_EXTCAL_CONFIRM_DELETE_EVENT, _DELETE, 'event.php');
254
+
255
+                xoops_cp_footer();
238 256
             }
239
-            //             $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE);
240
-            //             $eventHandler->deleteEvent($_POST['event_id']);
241
-            deleteEvents($_POST['event_id']);
242
-            redirect_header('event.php', 3, _AM_EXTCAL_EVENT_DELETED, false);
243
-        } else {
257
+
258
+            break;
259
+
260
+        case 'deleteSelection':
261
+
244 262
             xoops_cp_header();
245 263
             // @author      Gregory Mage (Aka Mage)
246 264
             //***************************************************************************************
@@ -248,186 +266,168 @@  discard block
 block discarded – undo
248 266
             $adminObject = \Xmf\Module\Admin::getInstance();
249 267
             $adminObject->displayNavigation(basename(__FILE__));
250 268
             //***************************************************************************************
269
+            if (isset($_POST['deleteSelection'][0])) {
270
+                $msg = _AM_EXTCAL_CONFIRM_DELETE_ALL;
271
+                $ids = array_keys($_POST['deleteAllEvents']);
272
+            } else {
273
+                $msg = _AM_EXTCAL_CONFIRM_DELETE_SELECTION;
274
+                $ids = array_keys($_POST['deleteEvents']);
275
+            }
251 276
 
252
-            $hiddens = array('event_id' => $_GET['event_id'], 'form_delete' => '', 'confirm' => 1);
253
-            xoops_confirm($hiddens, 'event.php?op=delete', _AM_EXTCAL_CONFIRM_DELETE_EVENT, _DELETE, 'event.php');
277
+            //           $msg = ((isset($_POST['deleteSelection'][0])) ? _AM_EXTCAL_CONFIRM_DELETE_ALL : _AM_EXTCAL_CONFIRM_DELETE_SELECTION);
278
+            //           $ids = array_keys($_POST['deleteEvents']);
279
+            $ids = implode(',', $ids);
280
+            //echo $ids.'<br>';
281
+            $hiddens = array('event_ids' => $ids, 'form_delete' => '', 'confirm' => 1);
282
+            //$hiddens = array('event_ids' => $_POST['deleteEvents'], 'form_delete' => '', 'confirm' => 1);
283
+            xoops_confirm($hiddens, 'event.php?op=deleteSelectionOK', $msg, _DELETE, 'event.php');
254 284
 
255 285
             xoops_cp_footer();
256
-        }
257 286
 
258
-        break;
259
-
260
-    case 'deleteSelection':
261
-
262
-        xoops_cp_header();
263
-        // @author      Gregory Mage (Aka Mage)
264
-        //***************************************************************************************
265
-        //require_once XOOPS_ROOT_PATH . "/modules/extcal/class/admin.php";
266
-        $adminObject = \Xmf\Module\Admin::getInstance();
267
-        $adminObject->displayNavigation(basename(__FILE__));
268
-        //***************************************************************************************
269
-        if (isset($_POST['deleteSelection'][0])) {
270
-            $msg = _AM_EXTCAL_CONFIRM_DELETE_ALL;
271
-            $ids = array_keys($_POST['deleteAllEvents']);
272
-        } else {
273
-            $msg = _AM_EXTCAL_CONFIRM_DELETE_SELECTION;
274
-            $ids = array_keys($_POST['deleteEvents']);
275
-        }
287
+            break;
276 288
 
277
-        //           $msg = ((isset($_POST['deleteSelection'][0])) ? _AM_EXTCAL_CONFIRM_DELETE_ALL : _AM_EXTCAL_CONFIRM_DELETE_SELECTION);
278
-        //           $ids = array_keys($_POST['deleteEvents']);
279
-        $ids = implode(',', $ids);
280
-        //echo $ids.'<br>';
281
-        $hiddens = array('event_ids' => $ids, 'form_delete' => '', 'confirm' => 1);
282
-        //$hiddens = array('event_ids' => $_POST['deleteEvents'], 'form_delete' => '', 'confirm' => 1);
283
-        xoops_confirm($hiddens, 'event.php?op=deleteSelectionOK', $msg, _DELETE, 'event.php');
284
-
285
-        xoops_cp_footer();
286
-
287
-        break;
288
-
289
-    case 'deleteSelectionOK':
290
-        //-----------------------------------------
291
-        // $t = print_r($_GET,true);
292
-        // echo "<hr><pre>{$t}</pre><hr>";
293
-        //
294
-        // $t = print_r($_POST,true);
295
-        // echo "<hr><pre>{$t}</pre><hr>";
296
-        // exit;
297
-        //-----------------------------------------
298
-
299
-        if (isset($_POST['deleteSelection'][0])) {
300
-        } else {
301
-            if (!$GLOBALS['xoopsSecurity']->check()) {
302
-                redirect_header('index.php', 3, _NOPERM . '<br>' . implode('<br>', $GLOBALS['xoopsSecurity']->getErrors()));
303
-                exit;
304
-            }
289
+        case 'deleteSelectionOK':
290
+            //-----------------------------------------
291
+            // $t = print_r($_GET,true);
292
+            // echo "<hr><pre>{$t}</pre><hr>";
293
+            //
294
+            // $t = print_r($_POST,true);
295
+            // echo "<hr><pre>{$t}</pre><hr>";
296
+            // exit;
297
+            //-----------------------------------------
305 298
 
306
-            deleteEvents($_POST['event_ids']);
299
+            if (isset($_POST['deleteSelection'][0])) {
300
+            } else {
301
+                if (!$GLOBALS['xoopsSecurity']->check()) {
302
+                    redirect_header('index.php', 3, _NOPERM . '<br>' . implode('<br>', $GLOBALS['xoopsSecurity']->getErrors()));
303
+                    exit;
304
+                }
307 305
 
308
-            redirect_header('event.php', 3, _AM_EXTCAL_EVENTS_DELETED, false);
309
-        }
306
+                deleteEvents($_POST['event_ids']);
310 307
 
311
-        break;
308
+                redirect_header('event.php', 3, _AM_EXTCAL_EVENTS_DELETED, false);
309
+            }
312 310
 
313
-    case 'default':
314
-    default:
311
+            break;
315 312
 
316
-        //global $extcalConfig;
317
-        $extcalConfig      = ExtcalConfig::getHandler();
318
-        $xoopsModuleConfig = $extcalConfig->getModuleConfig();
313
+        case 'default':
314
+        default:
319 315
 
320
-        $start          = isset($_GET['start']) ? $_GET['start'] : 0;
321
-        $nbEventsByPage = $xoopsModuleConfig['nbEventsByPage'];
316
+            //global $extcalConfig;
317
+            $extcalConfig      = ExtcalConfig::getHandler();
318
+            $xoopsModuleConfig = $extcalConfig->getModuleConfig();
322 319
 
323
-        xoops_cp_header();
324
-        // @author      Gregory Mage (Aka Mage)
325
-        //***************************************************************************************
320
+            $start          = isset($_GET['start']) ? $_GET['start'] : 0;
321
+            $nbEventsByPage = $xoopsModuleConfig['nbEventsByPage'];
326 322
 
327
-        $adminObject = \Xmf\Module\Admin::getInstance();
328
-        $adminObject->displayNavigation(basename(__FILE__));
329
-        //***************************************************************************************
323
+            xoops_cp_header();
324
+            // @author      Gregory Mage (Aka Mage)
325
+            //***************************************************************************************
330 326
 
331
-        $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE);
332
-        $events       = $eventHandler->objectToArray($eventHandler->getNewEvent($start, $nbEventsByPage, 0, true), array('cat_id'));
333
-        $eventHandler->formatEventsDate($events, _SHORTDATESTRING);
327
+            $adminObject = \Xmf\Module\Admin::getInstance();
328
+            $adminObject->displayNavigation(basename(__FILE__));
329
+            //***************************************************************************************
334 330
 
335
-        echo '<fieldset><legend style="font-weight:bold; color:#990000;">' . _AM_EXTCAL_APPROVED_EVENT . '</legend>';
336
-        echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">' . _AM_EXTCAL_INFORMATION . '</legend>';
337
-        //echo'<img src='. XOOPS_URL .'/'. $moduleInfo->getInfo('dirmoduleadmin').'/assets/images/action/edit.png' .' '.'style=vertical-align:middle;/>&nbsp;&nbsp;' . _AM_EXTCAL_INFO_EDIT . '<br>';
338
-        //echo'<img src='. XOOPS_URL .'/'. $moduleInfo->getInfo('dirmoduleadmin').'/assets/images/action/delete.png'. ' '."style=vertical-align:middle;/>&nbsp;&nbsp;". _AM_EXTCAL_INFO_DELETE;
331
+            $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE);
332
+            $events       = $eventHandler->objectToArray($eventHandler->getNewEvent($start, $nbEventsByPage, 0, true), array('cat_id'));
333
+            $eventHandler->formatEventsDate($events, _SHORTDATESTRING);
339 334
 
340
-        echo '<img src=' . $pathIcon16 . '/edit.png' . ' ' . 'style=vertical-align:middle;/>&nbsp;&nbsp;' . _AM_EXTCAL_INFO_EDIT . '<br>';
341
-        echo '<img src=' . $pathIcon16 . '/delete.png' . ' ' . 'style=vertical-align:middle;/>&nbsp;&nbsp;' . _AM_EXTCAL_INFO_DELETE . '<br>';
335
+            echo '<fieldset><legend style="font-weight:bold; color:#990000;">' . _AM_EXTCAL_APPROVED_EVENT . '</legend>';
336
+            echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">' . _AM_EXTCAL_INFORMATION . '</legend>';
337
+            //echo'<img src='. XOOPS_URL .'/'. $moduleInfo->getInfo('dirmoduleadmin').'/assets/images/action/edit.png' .' '.'style=vertical-align:middle;/>&nbsp;&nbsp;' . _AM_EXTCAL_INFO_EDIT . '<br>';
338
+            //echo'<img src='. XOOPS_URL .'/'. $moduleInfo->getInfo('dirmoduleadmin').'/assets/images/action/delete.png'. ' '."style=vertical-align:middle;/>&nbsp;&nbsp;". _AM_EXTCAL_INFO_DELETE;
342 339
 
343
-        echo '</fieldset><br>';
340
+            echo '<img src=' . $pathIcon16 . '/edit.png' . ' ' . 'style=vertical-align:middle;/>&nbsp;&nbsp;' . _AM_EXTCAL_INFO_EDIT . '<br>';
341
+            echo '<img src=' . $pathIcon16 . '/delete.png' . ' ' . 'style=vertical-align:middle;/>&nbsp;&nbsp;' . _AM_EXTCAL_INFO_DELETE . '<br>';
344 342
 
345
-        echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">' . _MD_EXTCAL_SUBMITED_EVENT . '</legend>';
343
+            echo '</fieldset><br>';
346 344
 
347
-        echo '<form method="POST" action="event.php">';
348
-        echo '<input type="hidden" name="op" value="deleteSelection">';
345
+            echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">' . _MD_EXTCAL_SUBMITED_EVENT . '</legend>';
349 346
 
350
-        echo '<table class="outer" style="width:100%;">';
351
-        echo '<tr style="text-align:center;">';
352
-        echo '<th>' . _AM_EXTCAL_DELETE . '</th>';
353
-        echo '<th>#</th>';
354
-        echo '<th>' . _AM_EXTCAL_CATEGORY . '</th>';
355
-        echo '<th>' . _AM_EXTCAL_TITLE . '</th>';
356
-        echo '<th>' . _AM_EXTCAL_START_DATE . '</th>';
357
-        echo '<th>' . _AM_EXTCAL_END_DATE . '</th>';
358
-        echo '<th>' . _AM_EXTCAL_RECURRENT . '</th>';
359
-        echo '<th>' . _AM_EXTCAL_START_RULES . '</th>';
360
-        echo '<th>' . _AM_EXTCAL_ACTION . '</th>';
347
+            echo '<form method="POST" action="event.php">';
348
+            echo '<input type="hidden" name="op" value="deleteSelection">';
361 349
 
362
-        echo '</tr>';
350
+            echo '<table class="outer" style="width:100%;">';
351
+            echo '<tr style="text-align:center;">';
352
+            echo '<th>' . _AM_EXTCAL_DELETE . '</th>';
353
+            echo '<th>#</th>';
354
+            echo '<th>' . _AM_EXTCAL_CATEGORY . '</th>';
355
+            echo '<th>' . _AM_EXTCAL_TITLE . '</th>';
356
+            echo '<th>' . _AM_EXTCAL_START_DATE . '</th>';
357
+            echo '<th>' . _AM_EXTCAL_END_DATE . '</th>';
358
+            echo '<th>' . _AM_EXTCAL_RECURRENT . '</th>';
359
+            echo '<th>' . _AM_EXTCAL_START_RULES . '</th>';
360
+            echo '<th>' . _AM_EXTCAL_ACTION . '</th>';
363 361
 
364
-        if (count($events) > 0) {
365
-            $i = 0;
366
-            foreach ($events as $event) {
367
-                $class = (++$i % 2 == 0) ? 'even' : 'odd';
368
-                echo '<tr style="text-align:left;" class="' . $class . '">';
369
-                echo "<td width='10%' align='center'>";
370
-                echo "<input type='checkbox' name='deleteEvents[{$event['event_id']}]' value='1' >";
371
-                echo "<input type='hidden' name='deleteAllEvents[{$event['event_id']}]' value='1'>";
372
-                echo '</td>';
373
-                echo "<td align = 'center' width='5%'>" . $event['event_id'] . '</td>';
374
-                echo "<td  width='10%'>" . '<a href=cat.php?op=modify&amp;cat_id=' . $event['cat']['cat_id'] . '&form_modify' . '>' . $event['cat']['cat_name'] . '</a>' . '</td>';
375
-
376
-                echo '<td>' . '<a href=event.php?op=modify&amp;event_id=' . $event['event_id'] . '>' . $event['event_title'] . '</a>' . '</td>';
377
-
378
-                //                 if ($event['event_isrecur']) {
379
-                //                     echo '<td>' . $event['formated_reccur_rule'] . '</td>';
380
-                //                 } else {
381
-                //                     echo '<td>' . $event['formated_event_start'] . '</td>';
382
-                //                 }
383
-
384
-                echo "<td align = 'center' width='10%'>" . $event['formated_event_start'] . '</td>';
385
-                echo "<td align = 'center' width='10%'>" . $event['formated_event_end'] . '</td>';
386
-                echo '<td align="center">' . (($event['event_isrecur'] == 1) ? _YES : _NO) . '</td>';
387
-                if (!isset($event['formated_reccur_rule'])) {
388
-                    $event['formated_reccur_rule'] = '';
362
+            echo '</tr>';
363
+
364
+            if (count($events) > 0) {
365
+                $i = 0;
366
+                foreach ($events as $event) {
367
+                    $class = (++$i % 2 == 0) ? 'even' : 'odd';
368
+                    echo '<tr style="text-align:left;" class="' . $class . '">';
369
+                    echo "<td width='10%' align='center'>";
370
+                    echo "<input type='checkbox' name='deleteEvents[{$event['event_id']}]' value='1' >";
371
+                    echo "<input type='hidden' name='deleteAllEvents[{$event['event_id']}]' value='1'>";
372
+                    echo '</td>';
373
+                    echo "<td align = 'center' width='5%'>" . $event['event_id'] . '</td>';
374
+                    echo "<td  width='10%'>" . '<a href=cat.php?op=modify&amp;cat_id=' . $event['cat']['cat_id'] . '&form_modify' . '>' . $event['cat']['cat_name'] . '</a>' . '</td>';
375
+
376
+                    echo '<td>' . '<a href=event.php?op=modify&amp;event_id=' . $event['event_id'] . '>' . $event['event_title'] . '</a>' . '</td>';
377
+
378
+                    //                 if ($event['event_isrecur']) {
379
+                    //                     echo '<td>' . $event['formated_reccur_rule'] . '</td>';
380
+                    //                 } else {
381
+                    //                     echo '<td>' . $event['formated_event_start'] . '</td>';
382
+                    //                 }
383
+
384
+                    echo "<td align = 'center' width='10%'>" . $event['formated_event_start'] . '</td>';
385
+                    echo "<td align = 'center' width='10%'>" . $event['formated_event_end'] . '</td>';
386
+                    echo '<td align="center">' . (($event['event_isrecur'] == 1) ? _YES : _NO) . '</td>';
387
+                    if (!isset($event['formated_reccur_rule'])) {
388
+                        $event['formated_reccur_rule'] = '';
389
+                    }
390
+                    echo '<td>' . $event['formated_reccur_rule'] . '</td>';
391
+
392
+                    echo '<td style="width:10%; text-align:center;">';
393
+                    echo '<a href=event.php?op=modify&amp;event_id=' . $event['event_id'] . "><img src='" . $pathIcon16 . "/edit.png' title='" . _AM_EXTCAL_ICONE_EDIT . "'></a>&nbsp;&nbsp;";
394
+                    echo '<a href=event.php?op=delete&amp;event_id=' . $event['event_id'] . "><img src='" . $pathIcon16 . "/delete.png' title='" . _AM_EXTCAL_ICONE_DELETE . "'></a>&nbsp;&nbsp;";
395
+                    echo '<a href=event.php?op=clone&amp;event_id=' . $event['event_id'] . "><img src='" . $pathIcon16 . "/editcopy.png' title='" . _AM_EXTCAL_ICONE_CLONE . "'></a>";
396
+                    echo '</td>';
397
+
398
+                    echo '</tr>';
389 399
                 }
390
-                echo '<td>' . $event['formated_reccur_rule'] . '</td>';
400
+                //---------------------------------------------------------
401
+                $pageNav = new XoopsPageNav($eventHandler->getCountNewEvent(), $nbEventsByPage, $start);
391 402
 
392
-                echo '<td style="width:10%; text-align:center;">';
393
-                echo '<a href=event.php?op=modify&amp;event_id=' . $event['event_id'] . "><img src='" . $pathIcon16 . "/edit.png' title='" . _AM_EXTCAL_ICONE_EDIT . "'></a>&nbsp;&nbsp;";
394
-                echo '<a href=event.php?op=delete&amp;event_id=' . $event['event_id'] . "><img src='" . $pathIcon16 . "/delete.png' title='" . _AM_EXTCAL_ICONE_DELETE . "'></a>&nbsp;&nbsp;";
395
-                echo '<a href=event.php?op=clone&amp;event_id=' . $event['event_id'] . "><img src='" . $pathIcon16 . "/editcopy.png' title='" . _AM_EXTCAL_ICONE_CLONE . "'></a>";
403
+                echo '<tr><td colspan="2" style="text-align: right;">';
404
+                echo $pageNav->renderNav(2);
396 405
                 echo '</td>';
397 406
 
398
-                echo '</tr>';
399
-            }
400
-            //---------------------------------------------------------
401
-            $pageNav = new XoopsPageNav($eventHandler->getCountNewEvent(), $nbEventsByPage, $start);
407
+                echo '<td colspan="2" style="text-align: right;">';
402 408
 
403
-            echo '<tr><td colspan="2" style="text-align: right;">';
404
-            echo $pageNav->renderNav(2);
405
-            echo '</td>';
409
+                echo '<input type="submit" value="' . _AM_EXTCAL_DELETE_ALL . '" name="deleteSelection[0]">';
410
+                echo '<input type="submit" value="' . _AM_EXTCAL_DELETE_SELECTION . '" name="deleteSelection[1]">';
406 411
 
407
-            echo '<td colspan="2" style="text-align: right;">';
408
-
409
-            echo '<input type="submit" value="' . _AM_EXTCAL_DELETE_ALL . '" name="deleteSelection[0]">';
410
-            echo '<input type="submit" value="' . _AM_EXTCAL_DELETE_SELECTION . '" name="deleteSelection[1]">';
411
-
412
-            echo '</td>';
413
-            echo '</tr>';
414
-        } else {
415
-            echo '<tr><td colspan="5">' . _AM_EXTCAL_NO_PENDING_EVENT . '</td></tr>';
416
-        }
417
-        echo '</table>';
418
-        echo '</form>';
412
+                echo '</td>';
413
+                echo '</tr>';
414
+            } else {
415
+                echo '<tr><td colspan="5">' . _AM_EXTCAL_NO_PENDING_EVENT . '</td></tr>';
416
+            }
417
+            echo '</table>';
418
+            echo '</form>';
419 419
 
420
-        echo '</fieldset>';
421
-        echo '</fieldset><br><br>';
422
-        //Fin de la liste des evennement -------------------------------------
423
-        echo '<fieldset><legend style="font-weight:bold; color:#990000;">' . _MD_EXTCAL_SUBMIT_EVENT . '</legend>';
420
+            echo '</fieldset>';
421
+            echo '</fieldset><br><br>';
422
+            //Fin de la liste des evennement -------------------------------------
423
+            echo '<fieldset><legend style="font-weight:bold; color:#990000;">' . _MD_EXTCAL_SUBMIT_EVENT . '</legend>';
424 424
 
425
-        $form = $eventHandler->getEventForm('admin');
426
-        $form->display();
425
+            $form = $eventHandler->getEventForm('admin');
426
+            $form->display();
427 427
 
428
-        echo '</fieldset>';
428
+            echo '</fieldset>';
429 429
 
430
-        require_once __DIR__ . '/admin_footer.php';
430
+            require_once __DIR__ . '/admin_footer.php';
431 431
 
432
-        break;
432
+            break;
433 433
 }
Please login to merge, or discard this patch.
Spacing   +45 added lines, -45 removed lines patch added patch discarded remove patch
@@ -17,12 +17,12 @@  discard block
 block discarded – undo
17 17
  * @author       XOOPS Development Team,
18 18
  */
19 19
 
20
-require_once __DIR__ . '/../../../include/cp_header.php';
21
-require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
22
-require_once XOOPS_ROOT_PATH . '/class/pagenav.php';
23
-require_once __DIR__ . '/../class/form/extcalform.php';
24
-require_once __DIR__ . '/admin_header.php';
25
-require_once __DIR__ . '/../class/utility.php';
20
+require_once __DIR__.'/../../../include/cp_header.php';
21
+require_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php';
22
+require_once XOOPS_ROOT_PATH.'/class/pagenav.php';
23
+require_once __DIR__.'/../class/form/extcalform.php';
24
+require_once __DIR__.'/admin_header.php';
25
+require_once __DIR__.'/../class/utility.php';
26 26
 
27 27
 $gepeto = array_merge($_GET, $_POST);
28 28
 //while (list($k, $v) = each($gepeto)) {
@@ -50,15 +50,15 @@  discard block
 block discarded – undo
50 50
 //    while (list($k, $t) = each($rst)) {
51 51
         foreach ($rst as $k => $t) {
52 52
             if ($t['event_picture1'] != '') {
53
-                $f = XOOPS_ROOT_PATH . '/uploads/extcal/' . $t['event_picture1'];
53
+                $f = XOOPS_ROOT_PATH.'/uploads/extcal/'.$t['event_picture1'];
54 54
                 unlink($f);
55
-                echo $f . '<br>';
55
+                echo $f.'<br>';
56 56
             }
57 57
 
58 58
             if ($t['event_picture2'] != '') {
59
-                $f = XOOPS_ROOT_PATH . '/uploads/extcal/' . $t['event_picture1'];
59
+                $f = XOOPS_ROOT_PATH.'/uploads/extcal/'.$t['event_picture1'];
60 60
                 unlink($f);
61
-                echo $f . '<br>';
61
+                echo $f.'<br>';
62 62
             }
63 63
         }
64 64
 
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
             if (!$eventHandler->modifyEvent($_POST['event_id'], $data)) {
121 121
                 redirect_header('event.php', 3, _AM_EXTCAL_EVENT_EDIT_FAILED, false);
122 122
             } else {
123
-                $fileHandler->createFile((int)$_POST['event_id']);
123
+                $fileHandler->createFile((int) $_POST['event_id']);
124 124
                 redirect_header('event.php', 3, _AM_EXTCAL_EVENT_EDITED, false);
125 125
             }
126 126
 
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
         $eventId      = $_GET['event_id'];
192 192
         $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE);
193 193
 
194
-        echo '<fieldset><legend style="font-weight:bold; color:#990000;">' . _MD_EXTCAL_EDIT_EVENT . '</legend>';
194
+        echo '<fieldset><legend style="font-weight:bold; color:#990000;">'._MD_EXTCAL_EDIT_EVENT.'</legend>';
195 195
 
196 196
         if ($form = $eventHandler->getEventForm('admin', $action, array('event_id' => $eventId))) {
197 197
             $form->display();
@@ -216,8 +216,8 @@  discard block
 block discarded – undo
216 216
             $data[$key] = $val['value'];
217 217
         }
218 218
 
219
-        $data['event_id']    = 0;
220
-        $data['event_title'] .= ' (' . _AM_EXTCAL_CLONE_OF . $eventId . ')';
219
+        $data['event_id'] = 0;
220
+        $data['event_title'] .= ' ('._AM_EXTCAL_CLONE_OF.$eventId.')';
221 221
 
222 222
         $newEvent = $eventHandler->create();
223 223
         $newEvent->setVars($data);
@@ -233,7 +233,7 @@  discard block
 block discarded – undo
233 233
 
234 234
         if (isset($_POST['confirm'])) {
235 235
             if (!$GLOBALS['xoopsSecurity']->check()) {
236
-                redirect_header('index.php', 3, _NOPERM . '<br>' . implode('<br>', $GLOBALS['xoopsSecurity']->getErrors()));
236
+                redirect_header('index.php', 3, _NOPERM.'<br>'.implode('<br>', $GLOBALS['xoopsSecurity']->getErrors()));
237 237
                 exit;
238 238
             }
239 239
             //             $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE);
@@ -299,7 +299,7 @@  discard block
 block discarded – undo
299 299
         if (isset($_POST['deleteSelection'][0])) {
300 300
         } else {
301 301
             if (!$GLOBALS['xoopsSecurity']->check()) {
302
-                redirect_header('index.php', 3, _NOPERM . '<br>' . implode('<br>', $GLOBALS['xoopsSecurity']->getErrors()));
302
+                redirect_header('index.php', 3, _NOPERM.'<br>'.implode('<br>', $GLOBALS['xoopsSecurity']->getErrors()));
303 303
                 exit;
304 304
             }
305 305
 
@@ -332,32 +332,32 @@  discard block
 block discarded – undo
332 332
         $events       = $eventHandler->objectToArray($eventHandler->getNewEvent($start, $nbEventsByPage, 0, true), array('cat_id'));
333 333
         $eventHandler->formatEventsDate($events, _SHORTDATESTRING);
334 334
 
335
-        echo '<fieldset><legend style="font-weight:bold; color:#990000;">' . _AM_EXTCAL_APPROVED_EVENT . '</legend>';
336
-        echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">' . _AM_EXTCAL_INFORMATION . '</legend>';
335
+        echo '<fieldset><legend style="font-weight:bold; color:#990000;">'._AM_EXTCAL_APPROVED_EVENT.'</legend>';
336
+        echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">'._AM_EXTCAL_INFORMATION.'</legend>';
337 337
         //echo'<img src='. XOOPS_URL .'/'. $moduleInfo->getInfo('dirmoduleadmin').'/assets/images/action/edit.png' .' '.'style=vertical-align:middle;/>&nbsp;&nbsp;' . _AM_EXTCAL_INFO_EDIT . '<br>';
338 338
         //echo'<img src='. XOOPS_URL .'/'. $moduleInfo->getInfo('dirmoduleadmin').'/assets/images/action/delete.png'. ' '."style=vertical-align:middle;/>&nbsp;&nbsp;". _AM_EXTCAL_INFO_DELETE;
339 339
 
340
-        echo '<img src=' . $pathIcon16 . '/edit.png' . ' ' . 'style=vertical-align:middle;/>&nbsp;&nbsp;' . _AM_EXTCAL_INFO_EDIT . '<br>';
341
-        echo '<img src=' . $pathIcon16 . '/delete.png' . ' ' . 'style=vertical-align:middle;/>&nbsp;&nbsp;' . _AM_EXTCAL_INFO_DELETE . '<br>';
340
+        echo '<img src='.$pathIcon16.'/edit.png'.' '.'style=vertical-align:middle;/>&nbsp;&nbsp;'._AM_EXTCAL_INFO_EDIT.'<br>';
341
+        echo '<img src='.$pathIcon16.'/delete.png'.' '.'style=vertical-align:middle;/>&nbsp;&nbsp;'._AM_EXTCAL_INFO_DELETE.'<br>';
342 342
 
343 343
         echo '</fieldset><br>';
344 344
 
345
-        echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">' . _MD_EXTCAL_SUBMITED_EVENT . '</legend>';
345
+        echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">'._MD_EXTCAL_SUBMITED_EVENT.'</legend>';
346 346
 
347 347
         echo '<form method="POST" action="event.php">';
348 348
         echo '<input type="hidden" name="op" value="deleteSelection">';
349 349
 
350 350
         echo '<table class="outer" style="width:100%;">';
351 351
         echo '<tr style="text-align:center;">';
352
-        echo '<th>' . _AM_EXTCAL_DELETE . '</th>';
352
+        echo '<th>'._AM_EXTCAL_DELETE.'</th>';
353 353
         echo '<th>#</th>';
354
-        echo '<th>' . _AM_EXTCAL_CATEGORY . '</th>';
355
-        echo '<th>' . _AM_EXTCAL_TITLE . '</th>';
356
-        echo '<th>' . _AM_EXTCAL_START_DATE . '</th>';
357
-        echo '<th>' . _AM_EXTCAL_END_DATE . '</th>';
358
-        echo '<th>' . _AM_EXTCAL_RECURRENT . '</th>';
359
-        echo '<th>' . _AM_EXTCAL_START_RULES . '</th>';
360
-        echo '<th>' . _AM_EXTCAL_ACTION . '</th>';
354
+        echo '<th>'._AM_EXTCAL_CATEGORY.'</th>';
355
+        echo '<th>'._AM_EXTCAL_TITLE.'</th>';
356
+        echo '<th>'._AM_EXTCAL_START_DATE.'</th>';
357
+        echo '<th>'._AM_EXTCAL_END_DATE.'</th>';
358
+        echo '<th>'._AM_EXTCAL_RECURRENT.'</th>';
359
+        echo '<th>'._AM_EXTCAL_START_RULES.'</th>';
360
+        echo '<th>'._AM_EXTCAL_ACTION.'</th>';
361 361
 
362 362
         echo '</tr>';
363 363
 
@@ -365,15 +365,15 @@  discard block
 block discarded – undo
365 365
             $i = 0;
366 366
             foreach ($events as $event) {
367 367
                 $class = (++$i % 2 == 0) ? 'even' : 'odd';
368
-                echo '<tr style="text-align:left;" class="' . $class . '">';
368
+                echo '<tr style="text-align:left;" class="'.$class.'">';
369 369
                 echo "<td width='10%' align='center'>";
370 370
                 echo "<input type='checkbox' name='deleteEvents[{$event['event_id']}]' value='1' >";
371 371
                 echo "<input type='hidden' name='deleteAllEvents[{$event['event_id']}]' value='1'>";
372 372
                 echo '</td>';
373
-                echo "<td align = 'center' width='5%'>" . $event['event_id'] . '</td>';
374
-                echo "<td  width='10%'>" . '<a href=cat.php?op=modify&amp;cat_id=' . $event['cat']['cat_id'] . '&form_modify' . '>' . $event['cat']['cat_name'] . '</a>' . '</td>';
373
+                echo "<td align = 'center' width='5%'>".$event['event_id'].'</td>';
374
+                echo "<td  width='10%'>".'<a href=cat.php?op=modify&amp;cat_id='.$event['cat']['cat_id'].'&form_modify'.'>'.$event['cat']['cat_name'].'</a>'.'</td>';
375 375
 
376
-                echo '<td>' . '<a href=event.php?op=modify&amp;event_id=' . $event['event_id'] . '>' . $event['event_title'] . '</a>' . '</td>';
376
+                echo '<td>'.'<a href=event.php?op=modify&amp;event_id='.$event['event_id'].'>'.$event['event_title'].'</a>'.'</td>';
377 377
 
378 378
                 //                 if ($event['event_isrecur']) {
379 379
                 //                     echo '<td>' . $event['formated_reccur_rule'] . '</td>';
@@ -381,18 +381,18 @@  discard block
 block discarded – undo
381 381
                 //                     echo '<td>' . $event['formated_event_start'] . '</td>';
382 382
                 //                 }
383 383
 
384
-                echo "<td align = 'center' width='10%'>" . $event['formated_event_start'] . '</td>';
385
-                echo "<td align = 'center' width='10%'>" . $event['formated_event_end'] . '</td>';
386
-                echo '<td align="center">' . (($event['event_isrecur'] == 1) ? _YES : _NO) . '</td>';
384
+                echo "<td align = 'center' width='10%'>".$event['formated_event_start'].'</td>';
385
+                echo "<td align = 'center' width='10%'>".$event['formated_event_end'].'</td>';
386
+                echo '<td align="center">'.(($event['event_isrecur'] == 1) ? _YES : _NO).'</td>';
387 387
                 if (!isset($event['formated_reccur_rule'])) {
388 388
                     $event['formated_reccur_rule'] = '';
389 389
                 }
390
-                echo '<td>' . $event['formated_reccur_rule'] . '</td>';
390
+                echo '<td>'.$event['formated_reccur_rule'].'</td>';
391 391
 
392 392
                 echo '<td style="width:10%; text-align:center;">';
393
-                echo '<a href=event.php?op=modify&amp;event_id=' . $event['event_id'] . "><img src='" . $pathIcon16 . "/edit.png' title='" . _AM_EXTCAL_ICONE_EDIT . "'></a>&nbsp;&nbsp;";
394
-                echo '<a href=event.php?op=delete&amp;event_id=' . $event['event_id'] . "><img src='" . $pathIcon16 . "/delete.png' title='" . _AM_EXTCAL_ICONE_DELETE . "'></a>&nbsp;&nbsp;";
395
-                echo '<a href=event.php?op=clone&amp;event_id=' . $event['event_id'] . "><img src='" . $pathIcon16 . "/editcopy.png' title='" . _AM_EXTCAL_ICONE_CLONE . "'></a>";
393
+                echo '<a href=event.php?op=modify&amp;event_id='.$event['event_id']."><img src='".$pathIcon16."/edit.png' title='"._AM_EXTCAL_ICONE_EDIT."'></a>&nbsp;&nbsp;";
394
+                echo '<a href=event.php?op=delete&amp;event_id='.$event['event_id']."><img src='".$pathIcon16."/delete.png' title='"._AM_EXTCAL_ICONE_DELETE."'></a>&nbsp;&nbsp;";
395
+                echo '<a href=event.php?op=clone&amp;event_id='.$event['event_id']."><img src='".$pathIcon16."/editcopy.png' title='"._AM_EXTCAL_ICONE_CLONE."'></a>";
396 396
                 echo '</td>';
397 397
 
398 398
                 echo '</tr>';
@@ -406,13 +406,13 @@  discard block
 block discarded – undo
406 406
 
407 407
             echo '<td colspan="2" style="text-align: right;">';
408 408
 
409
-            echo '<input type="submit" value="' . _AM_EXTCAL_DELETE_ALL . '" name="deleteSelection[0]">';
410
-            echo '<input type="submit" value="' . _AM_EXTCAL_DELETE_SELECTION . '" name="deleteSelection[1]">';
409
+            echo '<input type="submit" value="'._AM_EXTCAL_DELETE_ALL.'" name="deleteSelection[0]">';
410
+            echo '<input type="submit" value="'._AM_EXTCAL_DELETE_SELECTION.'" name="deleteSelection[1]">';
411 411
 
412 412
             echo '</td>';
413 413
             echo '</tr>';
414 414
         } else {
415
-            echo '<tr><td colspan="5">' . _AM_EXTCAL_NO_PENDING_EVENT . '</td></tr>';
415
+            echo '<tr><td colspan="5">'._AM_EXTCAL_NO_PENDING_EVENT.'</td></tr>';
416 416
         }
417 417
         echo '</table>';
418 418
         echo '</form>';
@@ -420,14 +420,14 @@  discard block
 block discarded – undo
420 420
         echo '</fieldset>';
421 421
         echo '</fieldset><br><br>';
422 422
         //Fin de la liste des evennement -------------------------------------
423
-        echo '<fieldset><legend style="font-weight:bold; color:#990000;">' . _MD_EXTCAL_SUBMIT_EVENT . '</legend>';
423
+        echo '<fieldset><legend style="font-weight:bold; color:#990000;">'._MD_EXTCAL_SUBMIT_EVENT.'</legend>';
424 424
 
425 425
         $form = $eventHandler->getEventForm('admin');
426 426
         $form->display();
427 427
 
428 428
         echo '</fieldset>';
429 429
 
430
-        require_once __DIR__ . '/admin_footer.php';
430
+        require_once __DIR__.'/admin_footer.php';
431 431
 
432 432
         break;
433 433
 }
Please login to merge, or discard this patch.
admin/cat.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -17,11 +17,11 @@  discard block
 block discarded – undo
17 17
  * @author       XOOPS Development Team,
18 18
  */
19 19
 
20
-require_once __DIR__ . '/../../../include/cp_header.php';
21
-include __DIR__ . '/../../../class/xoopsformloader.php';
22
-require_once __DIR__ . '/admin_header.php';
23
-require_once __DIR__ . '/../class/utility.php';
24
-require_once __DIR__ . '/../include/constantes.php';
20
+require_once __DIR__.'/../../../include/cp_header.php';
21
+include __DIR__.'/../../../class/xoopsformloader.php';
22
+require_once __DIR__.'/admin_header.php';
23
+require_once __DIR__.'/../class/utility.php';
24
+require_once __DIR__.'/../include/constantes.php';
25 25
 
26 26
 $gepeto = array_merge($_GET, $_POST);
27 27
 //while (list($key, $value) = each($gepeto)) {
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
         $form->addElement(new XoopsFormText(_AM_EXTCAL_WEIGHT, 'cat_weight', 30, 5, 0), false);
80 80
         $form->addElement(new XoopsFormColorPicker(_AM_EXTCAL_COLOR, 'cat_color', '#FF0000'));
81 81
 
82
-        $file_path = __DIR__ . '/../assets/css/images';
82
+        $file_path = __DIR__.'/../assets/css/images';
83 83
         $tf        = XoopsLists::getImgListAsArray($file_path);
84 84
         array_unshift($tf, _MD_EXTCAL_NONE);
85 85
         //$xfIcones = new XoopsFormSelect(_AM_EXTCAL_ICONE, "cat_icone", $cat->getVar('cat_icone'), '');
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
 
92 92
         $form->display();
93 93
 
94
-        require_once __DIR__ . '/admin_footer.php';
94
+        require_once __DIR__.'/admin_footer.php';
95 95
         break;
96 96
 
97 97
     case 'edit':
@@ -104,15 +104,15 @@  discard block
 block discarded – undo
104 104
             $cat = $catHandler->getCat($cat_id, true);
105 105
         }
106 106
 
107
-        echo '<fieldset><legend style="font-weight:bold; color:#990000;">' . _AM_EXTCAL_EDIT_CATEGORY . '</legend>';
107
+        echo '<fieldset><legend style="font-weight:bold; color:#990000;">'._AM_EXTCAL_EDIT_CATEGORY.'</legend>';
108 108
 
109 109
         $form = new XoopsThemeForm(_AM_EXTCAL_ADD_CATEGORY, 'add_cat', 'cat.php?op=enreg', 'post', true);
110 110
         $form->addElement(new XoopsFormText(_AM_EXTCAL_NAME, 'cat_name', 30, 255, $cat->getVar('cat_name')), true);
111 111
         $form->addElement(new XoopsFormDhtmlTextArea(_AM_EXTCAL_DESCRIPTION, 'cat_desc', $cat->getVar('cat_desc')), false);
112 112
         $form->addElement(new XoopsFormText(_AM_EXTCAL_WEIGHT, 'cat_weight', 30, 5, $cat->getVar('cat_weight')), false);
113
-        $form->addElement(new XoopsFormColorPicker(_AM_EXTCAL_COLOR, 'cat_color', '#' . $cat->getVar('cat_color')));
113
+        $form->addElement(new XoopsFormColorPicker(_AM_EXTCAL_COLOR, 'cat_color', '#'.$cat->getVar('cat_color')));
114 114
 
115
-        $file_path = __DIR__ . '/../assets/css/images';
115
+        $file_path = __DIR__.'/../assets/css/images';
116 116
         $tf        = XoopsLists::getImgListAsArray($file_path);
117 117
         array_unshift($tf, _MD_EXTCAL_NONE);
118 118
         $xfIcones = new XoopsFormSelect(_AM_EXTCAL_ICONE, 'cat_icone', $cat->getVar('cat_icone'), '');
@@ -268,6 +268,6 @@  discard block
 block discarded – undo
268 268
         //$xoopsTpl->assign("module_dirname",    $xoopsModule->getVar("dirname") );
269 269
 
270 270
         $xoopsTpl->display('db:admin/extcal_admin_cat_list.tpl');
271
-        require_once __DIR__ . '/admin_footer.php';
271
+        require_once __DIR__.'/admin_footer.php';
272 272
         break;
273 273
 }
Please login to merge, or discard this patch.
admin/menu.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -35,33 +35,33 @@
 block discarded – undo
35 35
 $adminmenu[] = array(
36 36
     'title' => _AM_MODULEADMIN_HOME,
37 37
     'link'  => 'admin/index.php',
38
-    'icon'  => $pathIcon32 . '/home.png'
38
+    'icon'  => $pathIcon32.'/home.png'
39 39
 );
40 40
 
41 41
 $adminmenu[] = array(
42 42
     'title' => _MI_EXTCAL_CATEGORY,
43 43
     'link'  => 'admin/cat.php',
44
-    'icon'  => $pathIcon32 . '/category.png'
44
+    'icon'  => $pathIcon32.'/category.png'
45 45
 );
46 46
 
47 47
 $adminmenu[] = array(
48 48
     'title' => _MI_EXTCAL_EVENT,
49 49
     'link'  => 'admin/event.php',
50
-    'icon'  => $pathIcon32 . '/event.png'
50
+    'icon'  => $pathIcon32.'/event.png'
51 51
 );
52 52
 $adminmenu[] = array(
53 53
     'title' => _MI_EXTCAL_ETABLISSEMENTS,
54 54
     'link'  => 'admin/etablissement.php',
55
-    'icon'  => $pathModIcon32 . '/etablissement.png'
55
+    'icon'  => $pathModIcon32.'/etablissement.png'
56 56
 );
57 57
 $adminmenu[] = array(
58 58
     'title' => _MI_EXTCAL_PERMISSIONS,
59 59
     'link'  => 'admin/permissions.php',
60
-    'icon'  => $pathIcon32 . '/permissions.png'
60
+    'icon'  => $pathIcon32.'/permissions.png'
61 61
 );
62 62
 
63 63
 $adminmenu[] = array(
64 64
     'title' => _AM_MODULEADMIN_ABOUT,
65 65
     'link'  => 'admin/about.php',
66
-    'icon'  => $pathIcon32 . '/about.png'
66
+    'icon'  => $pathIcon32.'/about.png'
67 67
 );
Please login to merge, or discard this patch.
admin/index.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -17,16 +17,16 @@  discard block
 block discarded – undo
17 17
  * @author       XOOPS Development Team,
18 18
  */
19 19
 
20
-require_once __DIR__ . '/admin_header.php';
20
+require_once __DIR__.'/admin_header.php';
21 21
 // Display Admin header
22 22
 xoops_cp_header();
23 23
 
24
-$classUtility = ucfirst($moduleDirName) . 'Utility';
24
+$classUtility = ucfirst($moduleDirName).'Utility';
25 25
 if (!class_exists($classUtility)) {
26 26
     xoops_load('utility', $moduleDirName);
27 27
 }
28 28
 
29
-$configurator = include __DIR__ . '/../include/config.php';
29
+$configurator = include __DIR__.'/../include/config.php';
30 30
 
31 31
 foreach (array_keys($configurator['uploadFolders']) as $i) {
32 32
     $classUtility::createFolder($configurator['uploadFolders'][$i]);
@@ -37,4 +37,4 @@  discard block
 block discarded – undo
37 37
 $adminObject->displayNavigation(basename(__FILE__));
38 38
 $adminObject->displayIndex();
39 39
 
40
-require_once __DIR__ . '/admin_footer.php';
40
+require_once __DIR__.'/admin_footer.php';
Please login to merge, or discard this patch.
post.php 1 patch
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -17,20 +17,20 @@  discard block
 block discarded – undo
17 17
  * @author       XOOPS Development Team,
18 18
  */
19 19
 
20
-include __DIR__ . '/../../mainfile.php';
20
+include __DIR__.'/../../mainfile.php';
21 21
 $GLOBALS['xoopsOption']['template_main'] = 'extcal_post.tpl';
22 22
 
23
-include XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
24
-include __DIR__ . '/class/form/extcalform.php';
25
-include __DIR__ . '/class/perm.php';
23
+include XOOPS_ROOT_PATH.'/class/xoopsformloader.php';
24
+include __DIR__.'/class/form/extcalform.php';
25
+include __DIR__.'/class/perm.php';
26 26
 
27
-require_once __DIR__ . '/class/utility.php';
28
-require_once __DIR__ . '/include/constantes.php';
27
+require_once __DIR__.'/class/utility.php';
28
+require_once __DIR__.'/include/constantes.php';
29 29
 
30 30
 $permHandler = ExtcalPerm::getHandler();
31 31
 $xoopsUser   = $xoopsUser ?: null;
32 32
 
33
-if (!$permHandler->isAllowed($xoopsUser, 'extcal_cat_submit', (int)$_POST['cat_id'])) {
33
+if (!$permHandler->isAllowed($xoopsUser, 'extcal_cat_submit', (int) $_POST['cat_id'])) {
34 34
     redirect_header('index.php', 3);
35 35
     exit;
36 36
 }
@@ -39,16 +39,16 @@  discard block
 block discarded – undo
39 39
 $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE);
40 40
 
41 41
 if (isset($_POST['form_preview'])) {
42
-    include XOOPS_ROOT_PATH . '/header.php';
42
+    include XOOPS_ROOT_PATH.'/header.php';
43 43
 
44 44
     // Title of the page
45 45
     $xoopsTpl->assign('xoops_pagetitle', _MI_EXTCAL_SUBMIT_EVENT);
46 46
 
47 47
     $data = array(
48 48
         'event_title'        => $_POST['event_title'],
49
-        'cat_id'             => (int)$_POST['cat_id'],
49
+        'cat_id'             => (int) $_POST['cat_id'],
50 50
         'event_desc'         => $_POST['event_desc'],
51
-        'event_nbmember'     => (int)$_POST['event_nbmember'],
51
+        'event_nbmember'     => (int) $_POST['event_nbmember'],
52 52
         'event_contact'      => $_POST['event_contact'],
53 53
         'event_url'          => $_POST['event_url'],
54 54
         'event_email'        => $_POST['event_email'],
@@ -57,14 +57,14 @@  discard block
 block discarded – undo
57 57
         'event_start'        => $_POST['event_start'],
58 58
         'have_end'           => $_POST['have_end'],
59 59
         'event_end'          => $_POST['event_end'],
60
-        'dohtml'             => (int)$xoopsModuleConfig['allow_html'],
60
+        'dohtml'             => (int) $xoopsModuleConfig['allow_html'],
61 61
         'event_price'        => $_POST['event_price'],
62 62
         'event_organisateur' => $_POST['event_organisateur'],
63 63
         'event_icone'        => $_POST['event_icone'],
64 64
     );
65 65
 
66 66
     if (isset($_POST['event_id'])) {
67
-        $data['event_id'] = (int)$_POST['event_id'];
67
+        $data['event_id'] = (int) $_POST['event_id'];
68 68
     }
69 69
 
70 70
     // Creating tempory event object to apply Object data filtering
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
     //     // Assigning language data to the template
84 84
     //     $xoopsTpl->assign('lang', $lang);
85 85
 
86
-    $event['cat_id']   = (int)$_POST['cat_id'];
86
+    $event['cat_id']   = (int) $_POST['cat_id'];
87 87
     $event['have_end'] = $_POST['have_end'];
88 88
 
89 89
     // Display the submit form
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
     $xoopsTpl->assign('preview', true);
93 93
     $xoopsTpl->assign('formBody', $formBody);
94 94
 
95
-    include XOOPS_ROOT_PATH . '/footer.php';
95
+    include XOOPS_ROOT_PATH.'/footer.php';
96 96
 } elseif (isset($_POST['form_submit'])) {
97 97
     if (!isset($_POST['rrule_weekly_interval'])) {
98 98
         $_POST['rrule_weekly_interval'] = 0;
@@ -116,11 +116,11 @@  discard block
 block discarded – undo
116 116
     ExtcalUtility::extcal_loadImg($_REQUEST, $event_picture1, $event_picture2);
117 117
     ///////////////////////////////////////////////////////////////////////////////
118 118
 
119
-    require_once __DIR__ . '/class/perm.php';
119
+    require_once __DIR__.'/class/perm.php';
120 120
 
121 121
     $fileHandler = xoops_getModuleHandler(_EXTCAL_CLS_FILE, _EXTCAL_MODULE);
122 122
     $permHandler = ExtcalPerm::getHandler();
123
-    $approve     = $permHandler->isAllowed($xoopsUser, 'extcal_cat_autoapprove', (int)$_POST['cat_id']);
123
+    $approve     = $permHandler->isAllowed($xoopsUser, 'extcal_cat_autoapprove', (int) $_POST['cat_id']);
124 124
 
125 125
     $data = array(
126 126
         'event_title'         => $_POST['event_title'],
@@ -146,11 +146,11 @@  discard block
 block discarded – undo
146 146
     );
147 147
 
148 148
     if (isset($_POST['event_id'])) {
149
-        $eventHandler->modifyEvent((int)$_POST['event_id'], $data);
150
-        $fileHandler->updateEventFile((int)$_POST['event_id']);
151
-        $fileHandler->createFile((int)$_POST['event_id']);
149
+        $eventHandler->modifyEvent((int) $_POST['event_id'], $data);
150
+        $fileHandler->updateEventFile((int) $_POST['event_id']);
151
+        $fileHandler->createFile((int) $_POST['event_id']);
152 152
 
153
-        redirect_header('event.php?event=' . $_POST['event_id'], 3, _MD_EXTCAL_EVENT_UPDATED, false);
153
+        redirect_header('event.php?event='.$_POST['event_id'], 3, _MD_EXTCAL_EVENT_UPDATED, false);
154 154
     } else {
155 155
         $data['event_submitter']  = $xoopsUser ? $xoopsUser->getVar('uid') : 0;
156 156
         $data['event_submitdate'] = time();
@@ -167,8 +167,8 @@  discard block
 block discarded – undo
167 167
         $notificationHandler->triggerEvent('global', 0, $notifyEvent, array('EVENT_TITLE' => $_POST['event_title']));
168 168
         if ($approve == 1) {
169 169
             $catHandler = xoops_getModuleHandler(_EXTCAL_CLS_CAT, _EXTCAL_MODULE);
170
-            $cat        = $catHandler->getCat((int)$_POST['cat_id'], $xoopsUser, 'all');
171
-            $notificationHandler->triggerEvent('cat', (int)$_POST['cat_id'], 'new_event_cat', array(
170
+            $cat        = $catHandler->getCat((int) $_POST['cat_id'], $xoopsUser, 'all');
171
+            $notificationHandler->triggerEvent('cat', (int) $_POST['cat_id'], 'new_event_cat', array(
172 172
                 'EVENT_TITLE' => $_POST['event_title'],
173 173
                 'CAT_NAME'    => $cat->getVar('cat_name'),
174 174
             ));
Please login to merge, or discard this patch.
xoops_version.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -18,9 +18,9 @@  discard block
 block discarded – undo
18 18
  */
19 19
 
20 20
 // defined('XOOPS_ROOT_PATH') || die('XOOPS Root Path not defined');
21
-require_once __DIR__ . '/include/constantes.php';
22
-require_once __DIR__ . '/include/agenda_fnc.php';
23
-require_once __DIR__ . '/class/config.php';
21
+require_once __DIR__.'/include/constantes.php';
22
+require_once __DIR__.'/include/agenda_fnc.php';
23
+require_once __DIR__.'/class/config.php';
24 24
 //$loc_de = setlocale (LC_ALL, 'french');
25 25
 
26 26
 //echo "local :" .  setlocale(LC_TIME, $xoopsConfig['language'])."</ br>";
@@ -93,12 +93,12 @@  discard block
 block discarded – undo
93 93
 
94 94
 // Tables created by sql file (without prefix!)
95 95
 $modversion['tables'] = array(
96
-    $moduleDirName . '_' . 'cat',
97
-    $moduleDirName . '_' . 'event',
98
-    $moduleDirName . '_' . 'eventmember',
99
-    $moduleDirName . '_' . 'eventnotmember',
100
-    $moduleDirName . '_' . 'file',
101
-    $moduleDirName . '_' . 'etablissement'
96
+    $moduleDirName.'_'.'cat',
97
+    $moduleDirName.'_'.'event',
98
+    $moduleDirName.'_'.'eventmember',
99
+    $moduleDirName.'_'.'eventnotmember',
100
+    $moduleDirName.'_'.'file',
101
+    $moduleDirName.'_'.'etablissement'
102 102
 );
103 103
 
104 104
 // SQL
@@ -510,7 +510,7 @@  discard block
 block discarded – undo
510 510
 $modversion['config'][$i]['default']     = 5;
511 511
 
512 512
 ++$i;
513
-$modversion['config'][$i]['name']        = 'break' . $i;
513
+$modversion['config'][$i]['name']        = 'break'.$i;
514 514
 $modversion['config'][$i]['title']       = '_MI_EXTCAL_SHOW_OTHEROPTIONS';
515 515
 $modversion['config'][$i]['description'] = '';
516 516
 $modversion['config'][$i]['formtype']    = 'line_break';
Please login to merge, or discard this patch.
versions/extcal_2_21.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -44,8 +44,8 @@
 block discarded – undo
44 44
 
45 45
         // Create who's not going table to fix bug. If the table exist, the query will faile
46 46
         $sql = 'CREATE TABLE `'
47
-               . $xoopsDB->prefix('extcal_eventnotmember')
48
-               . "` (`eventnotmember_id` INT(11) NOT NULL AUTO_INCREMENT,`event_id` INT(11) NOT NULL DEFAULT '0',`uid` INT(11) NOT NULL DEFAULT '0',PRIMARY KEY  (`eventnotmember_id`),UNIQUE KEY `eventnotmember` (`event_id`,`uid`)) COMMENT='eXtcal By Zoullou' ;";
47
+                . $xoopsDB->prefix('extcal_eventnotmember')
48
+                . "` (`eventnotmember_id` INT(11) NOT NULL AUTO_INCREMENT,`event_id` INT(11) NOT NULL DEFAULT '0',`uid` INT(11) NOT NULL DEFAULT '0',PRIMARY KEY  (`eventnotmember_id`),UNIQUE KEY `eventnotmember` (`event_id`,`uid`)) COMMENT='eXtcal By Zoullou' ;";
49 49
         $xoopsDB->query($sql);
50 50
     }
51 51
 
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -33,13 +33,13 @@
 block discarded – undo
33 33
         global $xoopsDB;
34 34
 
35 35
         // Create eXtcal upload directory if don't exist
36
-        $dir = XOOPS_ROOT_PATH . '/uploads/extcal';
36
+        $dir = XOOPS_ROOT_PATH.'/uploads/extcal';
37 37
         if (!is_dir($dir)) {
38 38
             mkdir($dir);
39 39
 
40 40
             // Copy index.html files on uploads folders
41
-            $indexFile = __DIR__ . '/index.html';
42
-            copy($indexFile, XOOPS_ROOT_PATH . '/uploads/extcal/index.html');
41
+            $indexFile = __DIR__.'/index.html';
42
+            copy($indexFile, XOOPS_ROOT_PATH.'/uploads/extcal/index.html');
43 43
         }
44 44
 
45 45
         // Create who's not going table to fix bug. If the table exist, the query will faile
Please login to merge, or discard this patch.
versions/extcal_2_15.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -51,13 +51,13 @@
 block discarded – undo
51 51
         $xoopsDB->query($sql);
52 52
 
53 53
         $sql = 'CREATE TABLE `'
54
-               . $xoopsDB->prefix('extcal_event')
55
-               . "` (`eventnotmember_id` INT(11) NOT NULL AUTO_INCREMENT,`event_id` INT(11) NOT NULL DEFAULT '0',`uid` INT(11) NOT NULL DEFAULT '0',PRIMARY KEY  (`eventnotmember_id`),UNIQUE KEY `eventnotmember` (`event_id`,`uid`)) COMMENT='eXtcal By Zoullou' ;";
54
+                . $xoopsDB->prefix('extcal_event')
55
+                . "` (`eventnotmember_id` INT(11) NOT NULL AUTO_INCREMENT,`event_id` INT(11) NOT NULL DEFAULT '0',`uid` INT(11) NOT NULL DEFAULT '0',PRIMARY KEY  (`eventnotmember_id`),UNIQUE KEY `eventnotmember` (`event_id`,`uid`)) COMMENT='eXtcal By Zoullou' ;";
56 56
         $xoopsDB->query($sql);
57 57
 
58 58
         $sql = 'CREATE TABLE `'
59
-               . $xoopsDB->prefix('extcal_file')
60
-               . "` (`file_id` INT(11) NOT NULL AUTO_INCREMENT,`file_name` VARCHAR(255) NOT NULL,`file_nicename` VARCHAR(255) NOT NULL,`file_mimetype` VARCHAR(255) NOT NULL,`file_size` INT(11) NOT NULL,`file_download` INT(11) NOT NULL,`file_date` INT(11) NOT NULL,`file_approved` TINYINT(1) NOT NULL,`event_id` INT(11) NOT NULL,`uid` INT(11) NOT NULL,PRIMARY KEY  (`file_id`)) COMMENT='eXtcal By Zoullou' ;";
59
+                . $xoopsDB->prefix('extcal_file')
60
+                . "` (`file_id` INT(11) NOT NULL AUTO_INCREMENT,`file_name` VARCHAR(255) NOT NULL,`file_nicename` VARCHAR(255) NOT NULL,`file_mimetype` VARCHAR(255) NOT NULL,`file_size` INT(11) NOT NULL,`file_download` INT(11) NOT NULL,`file_date` INT(11) NOT NULL,`file_approved` TINYINT(1) NOT NULL,`event_id` INT(11) NOT NULL,`uid` INT(11) NOT NULL,PRIMARY KEY  (`file_id`)) COMMENT='eXtcal By Zoullou' ;";
61 61
         $xoopsDB->query($sql);
62 62
     }
63 63
 
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -35,19 +35,19 @@
 block discarded – undo
35 35
         //$xoopsDB = XoopsDatabaseFactory::getDatabaseConnection();
36 36
         $xoopsDB = XoopsDatabaseFactory::getDatabaseConnection();
37 37
 
38
-        $sql = 'ALTER TABLE `' . $xoopsDB->prefix('extcal_event') . "` CHANGE `event_approved` `event_approved` TINYINT( 1 ) NOT NULL DEFAULT '0' ;";
38
+        $sql = 'ALTER TABLE `'.$xoopsDB->prefix('extcal_event')."` CHANGE `event_approved` `event_approved` TINYINT( 1 ) NOT NULL DEFAULT '0' ;";
39 39
         $xoopsDB->query($sql);
40 40
 
41
-        $sql = 'ALTER TABLE `' . $xoopsDB->prefix('extcal_event') . '` ADD `event_isrecur` TINYINT( 1 ) NOT NULL AFTER `event_nbmember` ;';
41
+        $sql = 'ALTER TABLE `'.$xoopsDB->prefix('extcal_event').'` ADD `event_isrecur` TINYINT( 1 ) NOT NULL AFTER `event_nbmember` ;';
42 42
         $xoopsDB->query($sql);
43 43
 
44
-        $sql = 'ALTER TABLE `' . $xoopsDB->prefix('extcal_event') . '` ADD `event_recur_rules` VARCHAR( 255 ) NOT NULL AFTER `event_isrecur` ';
44
+        $sql = 'ALTER TABLE `'.$xoopsDB->prefix('extcal_event').'` ADD `event_recur_rules` VARCHAR( 255 ) NOT NULL AFTER `event_isrecur` ';
45 45
         $xoopsDB->query($sql);
46 46
 
47
-        $sql = 'ALTER TABLE `' . $xoopsDB->prefix('extcal_event') . '` ADD `event_recur_start` INT( 11 ) NOT NULL AFTER `event_recur_rules` ;';
47
+        $sql = 'ALTER TABLE `'.$xoopsDB->prefix('extcal_event').'` ADD `event_recur_start` INT( 11 ) NOT NULL AFTER `event_recur_rules` ;';
48 48
         $xoopsDB->query($sql);
49 49
 
50
-        $sql = 'ALTER TABLE `' . $xoopsDB->prefix('extcal_event') . '` ADD `event_recur_end` INT( 11 ) NOT NULL AFTER `event_recur_start` ;';
50
+        $sql = 'ALTER TABLE `'.$xoopsDB->prefix('extcal_event').'` ADD `event_recur_end` INT( 11 ) NOT NULL AFTER `event_recur_start` ;';
51 51
         $xoopsDB->query($sql);
52 52
 
53 53
         $sql = 'CREATE TABLE `'
Please login to merge, or discard this patch.
versions/extcal_2_04.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
     {
33 33
         global $xoopsDB;
34 34
 
35
-        $sql = 'ALTER TABLE `' . $xoopsDB->prefix('extcal_event') . "` ADD `event_nbmember` TINYINT(4) NOT NULL DEFAULT '0' AFTER `event_submitdate` ;";
35
+        $sql = 'ALTER TABLE `'.$xoopsDB->prefix('extcal_event')."` ADD `event_nbmember` TINYINT(4) NOT NULL DEFAULT '0' AFTER `event_submitdate` ;";
36 36
         $xoopsDB->query($sql);
37 37
     }
38 38
 
Please login to merge, or discard this patch.