Passed
Push — master ( d2520f...3f8ec2 )
by Michael
02:50
created
class/ColorTools.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -170,9 +170,9 @@
 block discarded – undo
170 170
         $tHex = ['', '', '', ''];
171 171
 
172 172
         $tHex[0] = $aColors[0];
173
-        $tHex[1] = substr('00' . dechex($aColors[1]), -2);
174
-        $tHex[2] = substr('00' . dechex($aColors[2]), -2);
175
-        $tHex[3] = substr('00' . dechex($aColors[3]), -2);
173
+        $tHex[1] = substr('00'.dechex($aColors[1]), -2);
174
+        $tHex[2] = substr('00'.dechex($aColors[2]), -2);
175
+        $tHex[3] = substr('00'.dechex($aColors[3]), -2);
176 176
 
177 177
         $colorHexa = implode('', $tHex);
178 178
 
Please login to merge, or discard this patch.
class/TableForm.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -55,13 +55,13 @@  discard block
 block discarded – undo
55 55
      */
56 56
     public function insertBreak($extra = '', $class = '')
57 57
     {
58
-        $class = ('' != $class) ? " class='" . preg_replace('/[^A-Za-z0-9\s\s_-]/i', '', $class) . "'" : '';
58
+        $class = ('' != $class) ? " class='".preg_replace('/[^A-Za-z0-9\s\s_-]/i', '', $class)."'" : '';
59 59
         // Fix for $extra tag not showing
60 60
         if ($extra) {
61
-            $extra = '<tr><td colspan="2" ' . $class . '>' . $extra . '</td></tr>';
61
+            $extra = '<tr><td colspan="2" '.$class.'>'.$extra.'</td></tr>';
62 62
             $this->addElement($extra);
63 63
         } else {
64
-            $extra = '<tr><td colspan="2" ' . $class . '>&nbsp;</td></tr>';
64
+            $extra = '<tr><td colspan="2" '.$class.'>&nbsp;</td></tr>';
65 65
             $this->addElement($extra);
66 66
         }
67 67
     }
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
         }
91 91
 
92 92
         if ('' != $title) {
93
-            $ret .= '<tr><th colspan="2">' . $title . '</th></tr>';
93
+            $ret .= '<tr><th colspan="2">'.$title.'</th></tr>';
94 94
         }
95 95
 
96 96
         $hidden = '';
@@ -102,24 +102,24 @@  discard block
 block discarded – undo
102 102
                 if (!$ele->getNocolspan()) {
103 103
                     $ret .= '<tr valign="top" align="left"><td class="head">';
104 104
                     if ('' != ($caption = $ele->getCaption())) {
105
-                        $ret .= '<div class="xoops-form-element-caption' . ($ele->isRequired() ? '-required' : '') . '">';
106
-                        $ret .= '<span class="caption-text">' . $caption . '</span>';
105
+                        $ret .= '<div class="xoops-form-element-caption'.($ele->isRequired() ? '-required' : '').'">';
106
+                        $ret .= '<span class="caption-text">'.$caption.'</span>';
107 107
                         $ret .= '<span class="caption-marker">*</span>';
108 108
                         $ret .= '</div>';
109 109
                     }
110 110
                     if ('' != ($desc = $ele->getDescription())) {
111
-                        $ret .= '<div class="xoops-form-element-help">' . $desc . '</div>';
111
+                        $ret .= '<div class="xoops-form-element-help">'.$desc.'</div>';
112 112
                     }
113
-                    $ret .= '</td><td class="' . $class . '">' . $ele->render() . '</td></tr>' . NWLINE;
113
+                    $ret .= '</td><td class="'.$class.'">'.$ele->render().'</td></tr>'.NWLINE;
114 114
                 } else {
115 115
                     $ret .= '<tr valign="top" align="left"><td class="head" colspan="2">';
116 116
                     if ('' != ($caption = $ele->getCaption())) {
117
-                        $ret .= '<div class="xoops-form-element-caption' . ($ele->isRequired() ? '-required' : '') . '">';
118
-                        $ret .= '<span class="caption-text">' . $caption . '</span>';
117
+                        $ret .= '<div class="xoops-form-element-caption'.($ele->isRequired() ? '-required' : '').'">';
118
+                        $ret .= '<span class="caption-text">'.$caption.'</span>';
119 119
                         $ret .= '<span class="caption-marker">*</span>';
120 120
                         $ret .= '</div>';
121 121
                     }
122
-                    $ret .= '</td></tr><tr valign="top" align="left"><td class="' . $class . '" colspan="2">' . $ele->render() . '</td></tr>';
122
+                    $ret .= '</td></tr><tr valign="top" align="left"><td class="'.$class.'" colspan="2">'.$ele->render().'</td></tr>';
123 123
                 }
124 124
             } else {
125 125
                 $hidden .= $ele->render();
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
             $ret .= '</table>';
131 131
         }
132 132
 
133
-        $ret .= NWLINE . ' ' . $hidden . NWLINE;
133
+        $ret .= NWLINE.' '.$hidden.NWLINE;
134 134
 
135 135
         return $ret;
136 136
     }
Please login to merge, or discard this patch.
class/Form/FormRecurRules.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -67,45 +67,45 @@  discard block
 block discarded – undo
67 67
         $formObject = new \XoopsFormRadio('', 'rrule_freq', $this->_rrule_freq);
68 68
         $formObject->addOption('none', _MD_EXTCAL_NO_RECCUR_EVENT);
69 69
         $ret .= $formObject->render();
70
-        $ret .= '<br><br><fieldset><legend>' . _MD_EXTCAL_RECCUR_POLICY . '</legend><fieldset><legend>';
70
+        $ret .= '<br><br><fieldset><legend>'._MD_EXTCAL_RECCUR_POLICY.'</legend><fieldset><legend>';
71 71
 
72 72
         $formObject = new \XoopsFormRadio('', 'rrule_freq', $this->_rrule_freq);
73 73
         $formObject->addOption('daily', _MD_EXTCAL_DAILY);
74 74
         $ret .= $formObject->render();
75
-        $ret .= '</legend>' . _MD_EXTCAL_DURING . ' ';
75
+        $ret .= '</legend>'._MD_EXTCAL_DURING.' ';
76 76
 
77 77
         $formObject = new \XoopsFormText('', 'rrule_daily_interval', 3, 2, $this->_rrule_daily_interval);
78 78
         $ret        .= $formObject->render();
79
-        $ret        .= ' ' . _MD_EXTCAL_DAYS . '</fieldset><br><fieldset><legend>';
79
+        $ret        .= ' '._MD_EXTCAL_DAYS.'</fieldset><br><fieldset><legend>';
80 80
 
81 81
         $formObject = new \XoopsFormRadio('', 'rrule_freq', $this->_rrule_freq);
82 82
         $formObject->addOption('weekly', _MD_EXTCAL_WEEKLY);
83 83
         $ret .= $formObject->render();
84
-        $ret .= '</legend>' . _MD_EXTCAL_DURING . ' ';
84
+        $ret .= '</legend>'._MD_EXTCAL_DURING.' ';
85 85
 
86 86
         $formObject = new \XoopsFormText('', 'rrule_weekly_interval', 3, 2, $this->_rrule_weekly_interval);
87 87
         $ret        .= $formObject->render();
88
-        $ret        .= ' ' . _MD_EXTCAL_WEEKS . '<br>';
88
+        $ret        .= ' '._MD_EXTCAL_WEEKS.'<br>';
89 89
 
90 90
         $formObject = new \XoopsFormCheckBox('', 'rrule_weekly_bydays', $this->_rrule_weekly_bydays);
91
-        $formObject->addOption('MO', _MD_EXTCAL_MO2 . '&nbsp;');
92
-        $formObject->addOption('TU', _MD_EXTCAL_TU2 . '&nbsp;');
93
-        $formObject->addOption('WE', _MD_EXTCAL_WE2 . '&nbsp;');
94
-        $formObject->addOption('TH', _MD_EXTCAL_TH2 . '&nbsp;');
95
-        $formObject->addOption('FR', _MD_EXTCAL_FR2 . '&nbsp;');
96
-        $formObject->addOption('SA', _MD_EXTCAL_SA2 . '&nbsp;');
97
-        $formObject->addOption('SU', _MD_EXTCAL_SU2 . '&nbsp;');
91
+        $formObject->addOption('MO', _MD_EXTCAL_MO2.'&nbsp;');
92
+        $formObject->addOption('TU', _MD_EXTCAL_TU2.'&nbsp;');
93
+        $formObject->addOption('WE', _MD_EXTCAL_WE2.'&nbsp;');
94
+        $formObject->addOption('TH', _MD_EXTCAL_TH2.'&nbsp;');
95
+        $formObject->addOption('FR', _MD_EXTCAL_FR2.'&nbsp;');
96
+        $formObject->addOption('SA', _MD_EXTCAL_SA2.'&nbsp;');
97
+        $formObject->addOption('SU', _MD_EXTCAL_SU2.'&nbsp;');
98 98
         $ret .= $formObject->render();
99 99
         $ret .= '</fieldset><br><fieldset><legend>';
100 100
 
101 101
         $formObject = new \XoopsFormRadio('', 'rrule_freq', $this->_rrule_freq);
102 102
         $formObject->addOption('monthly', _MD_EXTCAL_MONTHLY);
103 103
         $ret .= $formObject->render();
104
-        $ret .= '</legend>' . _MD_EXTCAL_DURING . ' ';
104
+        $ret .= '</legend>'._MD_EXTCAL_DURING.' ';
105 105
 
106 106
         $formObject = new \XoopsFormText('', 'rrule_monthly_interval', 3, 2, $this->_rrule_monthly_interval);
107 107
         $ret        .= $formObject->render();
108
-        $ret        .= ' ' . _MD_EXTCAL_MONTH . ', ' . _MD_EXTCAL_ON . ' ';
108
+        $ret        .= ' '._MD_EXTCAL_MONTH.', '._MD_EXTCAL_ON.' ';
109 109
 
110 110
         $formObject = new \XoopsFormSelect('', 'rrule_monthly_byday', $this->_rrule_monthly_byday);
111 111
         $formObject->addOption('', '&nbsp;');
@@ -145,20 +145,20 @@  discard block
 block discarded – undo
145 145
         $formObject->addOption('-1SA', _MD_EXTCAL_LAST_SA);
146 146
         $formObject->addOption('-1SU', _MD_EXTCAL_LAST_SU);
147 147
         $ret .= $formObject->render();
148
-        $ret .= ' ' . _MD_EXTCAL_OR_THE . ' ';
148
+        $ret .= ' '._MD_EXTCAL_OR_THE.' ';
149 149
 
150 150
         $formObject = new \XoopsFormText('', 'rrule_bymonthday', 3, 2, $this->_rrule_bymonthday);
151 151
         $ret        .= $formObject->render();
152
-        $ret        .= ' ' . _MD_EXTCAL_DAY_NUM_MONTH . '</fieldset><br><fieldset><legend>';
152
+        $ret        .= ' '._MD_EXTCAL_DAY_NUM_MONTH.'</fieldset><br><fieldset><legend>';
153 153
 
154 154
         $formObject = new \XoopsFormRadio('', 'rrule_freq', $this->_rrule_freq);
155 155
         $formObject->addOption('yearly', _MD_EXTCAL_YEARLY);
156 156
         $ret .= $formObject->render();
157
-        $ret .= '</legend>' . _MD_EXTCAL_DURING . ' ';
157
+        $ret .= '</legend>'._MD_EXTCAL_DURING.' ';
158 158
 
159 159
         $formObject = new \XoopsFormText('', 'rrule_yearly_interval', 3, 2, $this->_rrule_yearly_interval);
160 160
         $ret        .= $formObject->render();
161
-        $ret        .= ' ' . _MD_EXTCAL_YEARS . '<br>';
161
+        $ret        .= ' '._MD_EXTCAL_YEARS.'<br>';
162 162
 
163 163
         $formObject = new Extcal\Form\FormRRuleCheckBox('', 'rrule_yearly_bymonths', $this->_rrule_yearly_bymonths);
164 164
         $formObject->addOption('1', _MD_EXTCAL_JAN);
Please login to merge, or discard this patch.
class/Form/FormRRuleCheckBox.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -42,18 +42,18 @@
 block discarded – undo
42 42
         $ret = '<table><tr>';
43 43
         $i   = 0;
44 44
         if (count($this->getOptions()) > 1 && '[]' !== substr($this->getName(), -2, 2)) {
45
-            $newname = $this->getName() . '[]';
45
+            $newname = $this->getName().'[]';
46 46
             $this->setName($newname);
47 47
         }
48 48
         foreach ($this->getOptions() as $value => $name) {
49 49
             if (0 == (++$i) % 6) {
50 50
                 $ret .= '</tr><tr>';
51 51
             }
52
-            $ret .= "<td><input type='checkbox' name='" . $this->getName() . "' value='" . $value . "'";
52
+            $ret .= "<td><input type='checkbox' name='".$this->getName()."' value='".$value."'";
53 53
             if (count($this->getValue()) > 0 && in_array($value, $this->getValue())) {
54 54
                 $ret .= ' checked';
55 55
             }
56
-            $ret .= $this->getExtra() . '>' . $name . "</td>\n";
56
+            $ret .= $this->getExtra().'>'.$name."</td>\n";
57 57
         }
58 58
         $ret .= '</tr></table>';
59 59
 
Please login to merge, or discard this patch.
class/Form/FormFileCheckBox.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -43,13 +43,13 @@
 block discarded – undo
43 43
     {
44 44
         $ret = '';
45 45
         if (count($this->getOptions()) > 1 && '[]' !== substr($this->getName(), -2, 2)) {
46
-            $newname = $this->getName() . '[]';
46
+            $newname = $this->getName().'[]';
47 47
             $this->setName($newname);
48 48
         }
49 49
         foreach ($this->getOptions() as $value => $name) {
50
-            $ret .= "<input type='checkbox' name='" . $this->getName() . "' value='" . $value . "'";
50
+            $ret .= "<input type='checkbox' name='".$this->getName()."' value='".$value."'";
51 51
             $ret .= ' checked';
52
-            $ret .= $this->getExtra() . '>' . $name . "<br>\n";
52
+            $ret .= $this->getExtra().'>'.$name."<br>\n";
53 53
         }
54 54
 
55 55
         return $ret;
Please login to merge, or discard this patch.
class/Form/Spin/FormSpin.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -201,7 +201,7 @@  discard block
 block discarded – undo
201 201
      */
202 202
     public function setMin($min)
203 203
     {
204
-        $this->_min = (int)$min;
204
+        $this->_min = (int) $min;
205 205
     }
206 206
     /*-----------------------------------------------------------------*/
207 207
     /**
@@ -219,7 +219,7 @@  discard block
 block discarded – undo
219 219
      */
220 220
     public function setMax($max)
221 221
     {
222
-        $this->_max = (int)$max;
222
+        $this->_max = (int) $max;
223 223
     }
224 224
 
225 225
     /*-----------------------------------------------------------------*/
@@ -241,7 +241,7 @@  discard block
 block discarded – undo
241 241
      */
242 242
     public function setSmallIncrement($smallIncrement)
243 243
     {
244
-        $this->_smallIncrement = (int)$smallIncrement;
244
+        $this->_smallIncrement = (int) $smallIncrement;
245 245
         if (0 == $this->_smallIncrement) {
246 246
             $this->_smallIncrement = 1;
247 247
         }
@@ -263,7 +263,7 @@  discard block
 block discarded – undo
263 263
      */
264 264
     public function setLargeIncrement($largeIncrement)
265 265
     {
266
-        $this->_largeIncrement = (int)$largeIncrement;
266
+        $this->_largeIncrement = (int) $largeIncrement;
267 267
         if (0 == $this->_largeIncrement) {
268 268
             $this->_largeIncrement = 10;
269 269
         }
@@ -404,7 +404,7 @@  discard block
 block discarded – undo
404 404
         $sFolderImg  = "{$sSpinFolder}/images/{$this->getImgFolder()}/";
405 405
 
406 406
         $prefixe  = $this->getName();
407
-        $prefixe2 = 'spin' . $prefixe;
407
+        $prefixe2 = 'spin'.$prefixe;
408 408
 
409 409
         $smallIncrement = $this->getSmallIncrement();
410 410
         $largeIncrement = $this->getLargeIncrement();
@@ -423,7 +423,7 @@  discard block
 block discarded – undo
423 423
         $t = [];
424 424
 
425 425
         if ($this->_loadJS) {
426
-            $js  = $sSpinFolder . '/js/spin.js';
426
+            $js  = $sSpinFolder.'/js/spin.js';
427 427
             $t[] = "<script src='{$js}' type='text/javascript'></script>";
428 428
         }
429 429
 
@@ -468,7 +468,7 @@  discard block
 block discarded – undo
468 468
         //-------------------------------------------------------
469 469
 
470 470
         $t[] = '  </tr>';
471
-        $t[] = '</table>' . "\n";
471
+        $t[] = '</table>'."\n";
472 472
         $t[] = '</div>';
473 473
         //-------------------------------------------
474 474
         $html = implode("\n", $t);
Please login to merge, or discard this patch.
class/Helper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@
 block discarded – undo
70 70
     {
71 71
         $ret   = false;
72 72
         $db    = \XoopsDatabaseFactory::getDatabaseConnection();
73
-        $class = '\\XoopsModules\\' . ucfirst(strtolower(basename(dirname(__DIR__)))) . '\\' . $name . 'Handler';
73
+        $class = '\\XoopsModules\\'.ucfirst(strtolower(basename(dirname(__DIR__)))).'\\'.$name.'Handler';
74 74
         $ret   = new $class($db);
75 75
         return $ret;
76 76
     }
Please login to merge, or discard this patch.
admin/admin_header.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -19,11 +19,11 @@
 block discarded – undo
19 19
 
20 20
 use XoopsModules\Extcal;
21 21
 
22
-require_once __DIR__ . '/../../../include/cp_header.php';
22
+require_once __DIR__.'/../../../include/cp_header.php';
23 23
 require_once $GLOBALS['xoops']->path('www/class/xoopsformloader.php');
24
-require_once __DIR__ . '/../include/constantes.php';
24
+require_once __DIR__.'/../include/constantes.php';
25 25
 
26
-include __DIR__ . '/../preloads/autoloader.php';
26
+include __DIR__.'/../preloads/autoloader.php';
27 27
 
28 28
 $moduleDirName = basename(dirname(__DIR__));
29 29
 
Please login to merge, or discard this patch.
admin/main.php 3 patches
Indentation   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -87,27 +87,27 @@
 block discarded – undo
87 87
                 $fromemail      = !empty($xoopsConfig['adminmail']) ? $xoopsConfig['adminmail'] : $xoopsUser->getVar('email', 'E');
88 88
                 $subjectCaption = _AM_EXTCAL_SUBJECT . "<br><br><span style='font-size:x-small;font-weight:bold;'>" . _AM_EXTCAL_USEFUL_TAGS . "</span><br><span style='font-size:x-small;font-weight:normal;'>" . _AM_EXTCAL_MAILTAGS6 . '<br>' . _AM_EXTCAL_MAILTAGS2 . '</span>&nbsp;&nbsp;&nbsp;';
89 89
                 $bodyCaption    = _AM_EXTCAL_BODY
90
-                                  . "<br><br><span style='font-size:x-small;font-weight:bold;'>"
91
-                                  . _AM_EXTCAL_USEFUL_TAGS
92
-                                  . "</span><br><span style='font-size:x-small;font-weight:normal;'>"
93
-                                  . _AM_EXTCAL_MAILTAGS1
94
-                                  . '<br>'
95
-                                  . _AM_EXTCAL_MAILTAGS2
96
-                                  . '<br>'
97
-                                  . _AM_EXTCAL_MAILTAGS3
98
-                                  . '<br>'
99
-                                  . _AM_EXTCAL_MAILTAGS4
100
-                                  . '<br>'
101
-                                  . _AM_EXTCAL_MAILTAGS5
102
-                                  . '<br>'
103
-                                  . _AM_EXTCAL_MAILTAGS6
104
-                                  . '<br>'
105
-                                  . _AM_EXTCAL_MAILTAGS7
106
-                                  . '<br>'
107
-                                  . _AM_EXTCAL_MAILTAGS8
108
-                                  . '<br>'
109
-                                  . _AM_EXTCAL_MAILTAGS9
110
-                                  . '</span>&nbsp;&nbsp;&nbsp;';
90
+                                    . "<br><br><span style='font-size:x-small;font-weight:bold;'>"
91
+                                    . _AM_EXTCAL_USEFUL_TAGS
92
+                                    . "</span><br><span style='font-size:x-small;font-weight:normal;'>"
93
+                                    . _AM_EXTCAL_MAILTAGS1
94
+                                    . '<br>'
95
+                                    . _AM_EXTCAL_MAILTAGS2
96
+                                    . '<br>'
97
+                                    . _AM_EXTCAL_MAILTAGS3
98
+                                    . '<br>'
99
+                                    . _AM_EXTCAL_MAILTAGS4
100
+                                    . '<br>'
101
+                                    . _AM_EXTCAL_MAILTAGS5
102
+                                    . '<br>'
103
+                                    . _AM_EXTCAL_MAILTAGS6
104
+                                    . '<br>'
105
+                                    . _AM_EXTCAL_MAILTAGS7
106
+                                    . '<br>'
107
+                                    . _AM_EXTCAL_MAILTAGS8
108
+                                    . '<br>'
109
+                                    . _AM_EXTCAL_MAILTAGS9
110
+                                    . '</span>&nbsp;&nbsp;&nbsp;';
111 111
                 $toCheckBbox    = new \XoopsFormCheckBox(_AM_EXTCAL_SEND_TO, 'mail_send_to', 'mail');
112 112
                 $toCheckBox->addOption('mail', _AM_EXTCAL_EMAIL);
113 113
                 $toCheckBox->addOption('pm', _AM_EXTCAL_PM);
Please login to merge, or discard this patch.
Switch Indentation   +70 added lines, -70 removed lines patch added patch discarded remove patch
@@ -35,8 +35,8 @@  discard block
 block discarded – undo
35 35
 }
36 36
 
37 37
 switch ($op) {
38
-    case 'notification':
39
-        switch ($fct) {
38
+        case 'notification':
39
+            switch ($fct) {
40 40
             case 'send':
41 41
                 if (!$GLOBALS['xoopsSecurity']->check()) {
42 42
                     redirect_header('index.php', 3, _NOPERM . '<br>' . implode('<br>', $GLOBALS['xoopsSecurity']->getErrors()));
@@ -132,78 +132,78 @@  discard block
 block discarded – undo
132 132
                 xoops_cp_footer();
133 133
 
134 134
                 break;
135
-        }
135
+            }
136 136
         break;
137 137
 
138
-    default:
139
-    case 'default':
140
-        // @author      Gregory Mage (Aka Mage)
141
-        //***************************************************************************************
142
-        xoops_cp_header();
143
-        //        require_once XOOPS_ROOT_PATH . "/modules/extcal/class/admin.php";
144
-        //        $catHandler = xoops_getModuleHandler(_EXTCAL_CLS_CAT, _EXTCAL_MODULE);
145
-        //        $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE);
146
-        $adminObject = \Xmf\Module\Admin::getInstance();
147
-        $adminObject->addInfoBox(_MI_EXTCAL_DASHBOARD);
148
-        $adminObject->addInfoBoxLine(sprintf('<infolabel>' . _AM_EXTCAL_INDEX_CATEGORIES . '</infolabel>', $catHandler->getCount()), '', 'Green');
149
-        $adminObject->addInfoBoxLine(sprintf('<infolabel>' . _AM_EXTCAL_INDEX_EVENT . '</infolabel>', $eventHandler->getCount(new \Criteria('event_approved', 1))), '', 'Green');
150
-        $adminObject->addInfoBoxLine(sprintf('<infolabel>' . _AM_EXTCAL_INDEX_PENDING . '</infolabel>', $eventHandler->getCount(new \Criteria('event_approved', 0))), '', 'Red');
151
-        $criteriaCompo = new \CriteriaCompo();
152
-        $criteriaCompo->add(new \Criteria('event_approved', 1));
153
-        $criteriaCompo->add(new \Criteria('event_start', time(), '>='));
154
-        $adminObject->addInfoBoxLine(sprintf('<infolabel>' . _AM_EXTCAL_INDEX_APPROVED . '</infolabel><infotext>', $eventHandler->getCount($criteriaCompo) . '</infotext>'), '', 'Green');
155
-
156
-        $adminObject->addConfigBoxLine();
157
-        $adminObject->addConfigBoxLine(_AM_EXTCAL_PEAR_PATH);
158
-        $adminObject->addConfigBoxLine(_EXTCAL_PEAR_ROOT, 'folder');
159
-
160
-        //JJD
161
-        //         $adminObject->addConfigBoxLine(XOOPS_ROOT_PATH,'folder');
162
-
163
-        //        $adminObject->addLineConfigLabel(_AM_EXTCAL_CONFIG_PHP, $xoopsModule->getInfo("min_php"), 'php');
164
-        //        $adminObject->addLineConfigLabel(_AM_EXTCAL_CONFIG_XOOPS, $xoopsModule->getInfo("min_xoops"), 'xoops');
165
-        $adminObject->displayNavigation(basename(__FILE__));
166
-        $adminObject->displayIndex();
167
-        //***************************************************************************************
168
-        $pendingEvent = $eventHandler->objectToArray($eventHandler->getPendingEvent(), ['cat_id']);
169
-        $eventHandler->formatEventsDate($pendingEvent, 'd/m/Y');
170
-
171
-        echo '<fieldset><legend style="font-weight:bold; color:#990000;">' . _AM_EXTCAL_PENDING_EVENT . '</legend>';
172
-        echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">' . _AM_EXTCAL_INFORMATION . '</legend>';
173
-        //        echo '<img src="../assets/images/icons/on.png" >&nbsp;&nbsp;'._AM_EXTCAL_INFO_APPROVE_PENDING_EVENT.'<br>';
174
-        echo '<img src=' . $pathIcon16 . '/edit.png>&nbsp;&nbsp;' . _AM_EXTCAL_INFO_EDIT_PENDING_EVENT . '<br>';
175
-        echo '<img src=' . $pathIcon16 . '/delete.png>&nbsp;&nbsp;' . _AM_EXTCAL_INFO_DELETE_PENDING_EVENT . '<br>';
176
-        echo '</fieldset><br>';
177
-
178
-        echo '<table class="outer" style="width:100%;">';
179
-        echo '<tr style="text-align:center;">';
180
-        echo '<th>' . _AM_EXTCAL_CATEGORY . '</th>';
181
-        echo '<th>' . _AM_EXTCAL_TITLE . '</th>';
182
-        echo '<th>' . _AM_EXTCAL_START_DATE . '</th>';
183
-        echo '<th>' . _AM_EXTCAL_ACTION . '</th>';
184
-        echo '</tr>';
185
-
186
-        if (count($pendingEvent) > 0) {
187
-            $i = 0;
188
-            foreach ($pendingEvent as $event) {
189
-                $class = (0 == ++$i % 2) ? 'even' : 'odd';
190
-                echo '<tr style="text-align:center;" class="' . $class . '">';
191
-                echo '<td>' . $event['Category']['cat_name'] . '</td>';
192
-                echo '<td>' . $event['event_title'] . '</td>';
193
-                echo '<td>' . $event['formated_event_start'] . '</td>';
194
-                echo '<td style="width:10%; text-align:center;">';
195
-                echo '<a href="event.php?op=modify&amp;event_id=' . $event['event_id'] . '"><img src=' . $pathIcon16 . '/edit.png></a>&nbsp;&nbsp;';
196
-                echo '<a href="event.php?op=delete&amp;event_id=' . $event['event_id'] . '"><img src=' . $pathIcon16 . '/delete.png></a>';
197
-                echo '</td>';
198
-                echo '</tr>';
138
+        default:
139
+        case 'default':
140
+            // @author      Gregory Mage (Aka Mage)
141
+            //***************************************************************************************
142
+            xoops_cp_header();
143
+            //        require_once XOOPS_ROOT_PATH . "/modules/extcal/class/admin.php";
144
+            //        $catHandler = xoops_getModuleHandler(_EXTCAL_CLS_CAT, _EXTCAL_MODULE);
145
+            //        $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE);
146
+            $adminObject = \Xmf\Module\Admin::getInstance();
147
+            $adminObject->addInfoBox(_MI_EXTCAL_DASHBOARD);
148
+            $adminObject->addInfoBoxLine(sprintf('<infolabel>' . _AM_EXTCAL_INDEX_CATEGORIES . '</infolabel>', $catHandler->getCount()), '', 'Green');
149
+            $adminObject->addInfoBoxLine(sprintf('<infolabel>' . _AM_EXTCAL_INDEX_EVENT . '</infolabel>', $eventHandler->getCount(new \Criteria('event_approved', 1))), '', 'Green');
150
+            $adminObject->addInfoBoxLine(sprintf('<infolabel>' . _AM_EXTCAL_INDEX_PENDING . '</infolabel>', $eventHandler->getCount(new \Criteria('event_approved', 0))), '', 'Red');
151
+            $criteriaCompo = new \CriteriaCompo();
152
+            $criteriaCompo->add(new \Criteria('event_approved', 1));
153
+            $criteriaCompo->add(new \Criteria('event_start', time(), '>='));
154
+            $adminObject->addInfoBoxLine(sprintf('<infolabel>' . _AM_EXTCAL_INDEX_APPROVED . '</infolabel><infotext>', $eventHandler->getCount($criteriaCompo) . '</infotext>'), '', 'Green');
155
+
156
+            $adminObject->addConfigBoxLine();
157
+            $adminObject->addConfigBoxLine(_AM_EXTCAL_PEAR_PATH);
158
+            $adminObject->addConfigBoxLine(_EXTCAL_PEAR_ROOT, 'folder');
159
+
160
+            //JJD
161
+            //         $adminObject->addConfigBoxLine(XOOPS_ROOT_PATH,'folder');
162
+
163
+            //        $adminObject->addLineConfigLabel(_AM_EXTCAL_CONFIG_PHP, $xoopsModule->getInfo("min_php"), 'php');
164
+            //        $adminObject->addLineConfigLabel(_AM_EXTCAL_CONFIG_XOOPS, $xoopsModule->getInfo("min_xoops"), 'xoops');
165
+            $adminObject->displayNavigation(basename(__FILE__));
166
+            $adminObject->displayIndex();
167
+            //***************************************************************************************
168
+            $pendingEvent = $eventHandler->objectToArray($eventHandler->getPendingEvent(), ['cat_id']);
169
+            $eventHandler->formatEventsDate($pendingEvent, 'd/m/Y');
170
+
171
+            echo '<fieldset><legend style="font-weight:bold; color:#990000;">' . _AM_EXTCAL_PENDING_EVENT . '</legend>';
172
+            echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">' . _AM_EXTCAL_INFORMATION . '</legend>';
173
+            //        echo '<img src="../assets/images/icons/on.png" >&nbsp;&nbsp;'._AM_EXTCAL_INFO_APPROVE_PENDING_EVENT.'<br>';
174
+            echo '<img src=' . $pathIcon16 . '/edit.png>&nbsp;&nbsp;' . _AM_EXTCAL_INFO_EDIT_PENDING_EVENT . '<br>';
175
+            echo '<img src=' . $pathIcon16 . '/delete.png>&nbsp;&nbsp;' . _AM_EXTCAL_INFO_DELETE_PENDING_EVENT . '<br>';
176
+            echo '</fieldset><br>';
177
+
178
+            echo '<table class="outer" style="width:100%;">';
179
+            echo '<tr style="text-align:center;">';
180
+            echo '<th>' . _AM_EXTCAL_CATEGORY . '</th>';
181
+            echo '<th>' . _AM_EXTCAL_TITLE . '</th>';
182
+            echo '<th>' . _AM_EXTCAL_START_DATE . '</th>';
183
+            echo '<th>' . _AM_EXTCAL_ACTION . '</th>';
184
+            echo '</tr>';
185
+
186
+            if (count($pendingEvent) > 0) {
187
+                $i = 0;
188
+                foreach ($pendingEvent as $event) {
189
+                    $class = (0 == ++$i % 2) ? 'even' : 'odd';
190
+                    echo '<tr style="text-align:center;" class="' . $class . '">';
191
+                    echo '<td>' . $event['Category']['cat_name'] . '</td>';
192
+                    echo '<td>' . $event['event_title'] . '</td>';
193
+                    echo '<td>' . $event['formated_event_start'] . '</td>';
194
+                    echo '<td style="width:10%; text-align:center;">';
195
+                    echo '<a href="event.php?op=modify&amp;event_id=' . $event['event_id'] . '"><img src=' . $pathIcon16 . '/edit.png></a>&nbsp;&nbsp;';
196
+                    echo '<a href="event.php?op=delete&amp;event_id=' . $event['event_id'] . '"><img src=' . $pathIcon16 . '/delete.png></a>';
197
+                    echo '</td>';
198
+                    echo '</tr>';
199
+                }
200
+            } else {
201
+                echo '<tr><td colspan="4">' . _AM_EXTCAL_NO_PENDING_EVENT . '</td></tr>';
199 202
             }
200
-        } else {
201
-            echo '<tr><td colspan="4">' . _AM_EXTCAL_NO_PENDING_EVENT . '</td></tr>';
202
-        }
203 203
 
204
-        echo '</table></fieldset><br>';
204
+            echo '</table></fieldset><br>';
205 205
 
206
-        require_once __DIR__ . '/admin_footer.php';
206
+            require_once __DIR__ . '/admin_footer.php';
207 207
 
208
-        break;
208
+            break;
209 209
 }
Please login to merge, or discard this patch.
Spacing   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -2,9 +2,9 @@  discard block
 block discarded – undo
2 2
 
3 3
 use XoopsModules\Extcal;
4 4
 
5
-require_once __DIR__ . '/../../../include/cp_header.php';
6
-include __DIR__ . '/../../../class/xoopsformloader.php';
7
-require_once __DIR__ . '/admin_header.php';
5
+require_once __DIR__.'/../../../include/cp_header.php';
6
+include __DIR__.'/../../../class/xoopsformloader.php';
7
+require_once __DIR__.'/admin_header.php';
8 8
 
9 9
 function extgalleryLastVersion()
10 10
 {
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
         switch ($fct) {
40 40
             case 'send':
41 41
                 if (!$GLOBALS['xoopsSecurity']->check()) {
42
-                    redirect_header('index.php', 3, _NOPERM . '<br>' . implode('<br>', $GLOBALS['xoopsSecurity']->getErrors()));
42
+                    redirect_header('index.php', 3, _NOPERM.'<br>'.implode('<br>', $GLOBALS['xoopsSecurity']->getErrors()));
43 43
                 }
44 44
                 xoops_cp_header();
45 45
                 adminMenu(1);
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
                     'EV_TITLE' => $event->getVar('event_title'),
73 73
                     'EV_START' => $extcalTime->getFormatedDate($xoopsModuleConfig['date_long'], $event->getVar('event_start')),
74 74
                     'EV_END'   => $extcalTime->getFormatedDate($xoopsModuleConfig['date_long'], $event->getVar('event_end')),
75
-                    'EV_LINK'  => XOOPS_URL . '/modules/extcal/event.php?event=' . $event->getVar('event_id'),
75
+                    'EV_LINK'  => XOOPS_URL.'/modules/extcal/event.php?event='.$event->getVar('event_id'),
76 76
                 ];
77 77
                 $xoopsMailer->assign($tag);
78 78
                 $xoopsMailer->send(true);
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
             default:
88 88
                 xoops_cp_header();
89 89
                 $fromemail      = !empty($xoopsConfig['adminmail']) ? $xoopsConfig['adminmail'] : $xoopsUser->getVar('email', 'E');
90
-                $subjectCaption = _AM_EXTCAL_SUBJECT . "<br><br><span style='font-size:x-small;font-weight:bold;'>" . _AM_EXTCAL_USEFUL_TAGS . "</span><br><span style='font-size:x-small;font-weight:normal;'>" . _AM_EXTCAL_MAILTAGS6 . '<br>' . _AM_EXTCAL_MAILTAGS2 . '</span>&nbsp;&nbsp;&nbsp;';
90
+                $subjectCaption = _AM_EXTCAL_SUBJECT."<br><br><span style='font-size:x-small;font-weight:bold;'>"._AM_EXTCAL_USEFUL_TAGS."</span><br><span style='font-size:x-small;font-weight:normal;'>"._AM_EXTCAL_MAILTAGS6.'<br>'._AM_EXTCAL_MAILTAGS2.'</span>&nbsp;&nbsp;&nbsp;';
91 91
                 $bodyCaption    = _AM_EXTCAL_BODY
92 92
                                   . "<br><br><span style='font-size:x-small;font-weight:bold;'>"
93 93
                                   . _AM_EXTCAL_USEFUL_TAGS
@@ -110,12 +110,12 @@  discard block
 block discarded – undo
110 110
                                   . '<br>'
111 111
                                   . _AM_EXTCAL_MAILTAGS9
112 112
                                   . '</span>&nbsp;&nbsp;&nbsp;';
113
-                $toCheckBbox    = new \XoopsFormCheckBox(_AM_EXTCAL_SEND_TO, 'mail_send_to', 'mail');
113
+                $toCheckBbox = new \XoopsFormCheckBox(_AM_EXTCAL_SEND_TO, 'mail_send_to', 'mail');
114 114
                 $toCheckBox->addOption('mail', _AM_EXTCAL_EMAIL);
115 115
                 $toCheckBox->addOption('pm', _AM_EXTCAL_PM);
116 116
 
117
-                echo '<fieldset><legend style="font-weight:bold; color:#990000;">' . _AM_EXTCAL_APPROVED_EVENT . '</legend>';
118
-                echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">' . _AM_EXTCAL_INFORMATION . '</legend>';
117
+                echo '<fieldset><legend style="font-weight:bold; color:#990000;">'._AM_EXTCAL_APPROVED_EVENT.'</legend>';
118
+                echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">'._AM_EXTCAL_INFORMATION.'</legend>';
119 119
                 echo _AM_EXTCAL_INFO_SEND_NOTIF;
120 120
                 echo '</fieldset><br>';
121 121
                 $form = new \XoopsThemeForm(_AM_EXTCAL_SEND_NOTIFICATION, 'mailusers', 'index.php?op=notification&amp;fct=send', 'post', true);
@@ -145,13 +145,13 @@  discard block
 block discarded – undo
145 145
         //        $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE);
146 146
         $adminObject = \Xmf\Module\Admin::getInstance();
147 147
         $adminObject->addInfoBox(_MI_EXTCAL_DASHBOARD);
148
-        $adminObject->addInfoBoxLine(sprintf('<infolabel>' . _AM_EXTCAL_INDEX_CATEGORIES . '</infolabel>', $catHandler->getCount()), '', 'Green');
149
-        $adminObject->addInfoBoxLine(sprintf('<infolabel>' . _AM_EXTCAL_INDEX_EVENT . '</infolabel>', $eventHandler->getCount(new \Criteria('event_approved', 1))), '', 'Green');
150
-        $adminObject->addInfoBoxLine(sprintf('<infolabel>' . _AM_EXTCAL_INDEX_PENDING . '</infolabel>', $eventHandler->getCount(new \Criteria('event_approved', 0))), '', 'Red');
148
+        $adminObject->addInfoBoxLine(sprintf('<infolabel>'._AM_EXTCAL_INDEX_CATEGORIES.'</infolabel>', $catHandler->getCount()), '', 'Green');
149
+        $adminObject->addInfoBoxLine(sprintf('<infolabel>'._AM_EXTCAL_INDEX_EVENT.'</infolabel>', $eventHandler->getCount(new \Criteria('event_approved', 1))), '', 'Green');
150
+        $adminObject->addInfoBoxLine(sprintf('<infolabel>'._AM_EXTCAL_INDEX_PENDING.'</infolabel>', $eventHandler->getCount(new \Criteria('event_approved', 0))), '', 'Red');
151 151
         $criteriaCompo = new \CriteriaCompo();
152 152
         $criteriaCompo->add(new \Criteria('event_approved', 1));
153 153
         $criteriaCompo->add(new \Criteria('event_start', time(), '>='));
154
-        $adminObject->addInfoBoxLine(sprintf('<infolabel>' . _AM_EXTCAL_INDEX_APPROVED . '</infolabel><infotext>', $eventHandler->getCount($criteriaCompo) . '</infotext>'), '', 'Green');
154
+        $adminObject->addInfoBoxLine(sprintf('<infolabel>'._AM_EXTCAL_INDEX_APPROVED.'</infolabel><infotext>', $eventHandler->getCount($criteriaCompo).'</infotext>'), '', 'Green');
155 155
 
156 156
         $adminObject->addConfigBoxLine();
157 157
         $adminObject->addConfigBoxLine(_AM_EXTCAL_PEAR_PATH);
@@ -168,42 +168,42 @@  discard block
 block discarded – undo
168 168
         $pendingEvent = $eventHandler->objectToArray($eventHandler->getPendingEvent(), ['cat_id']);
169 169
         $eventHandler->formatEventsDate($pendingEvent, 'd/m/Y');
170 170
 
171
-        echo '<fieldset><legend style="font-weight:bold; color:#990000;">' . _AM_EXTCAL_PENDING_EVENT . '</legend>';
172
-        echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">' . _AM_EXTCAL_INFORMATION . '</legend>';
171
+        echo '<fieldset><legend style="font-weight:bold; color:#990000;">'._AM_EXTCAL_PENDING_EVENT.'</legend>';
172
+        echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">'._AM_EXTCAL_INFORMATION.'</legend>';
173 173
         //        echo '<img src="../assets/images/icons/on.png" >&nbsp;&nbsp;'._AM_EXTCAL_INFO_APPROVE_PENDING_EVENT.'<br>';
174
-        echo '<img src=' . $pathIcon16 . '/edit.png>&nbsp;&nbsp;' . _AM_EXTCAL_INFO_EDIT_PENDING_EVENT . '<br>';
175
-        echo '<img src=' . $pathIcon16 . '/delete.png>&nbsp;&nbsp;' . _AM_EXTCAL_INFO_DELETE_PENDING_EVENT . '<br>';
174
+        echo '<img src='.$pathIcon16.'/edit.png>&nbsp;&nbsp;'._AM_EXTCAL_INFO_EDIT_PENDING_EVENT.'<br>';
175
+        echo '<img src='.$pathIcon16.'/delete.png>&nbsp;&nbsp;'._AM_EXTCAL_INFO_DELETE_PENDING_EVENT.'<br>';
176 176
         echo '</fieldset><br>';
177 177
 
178 178
         echo '<table class="outer" style="width:100%;">';
179 179
         echo '<tr style="text-align:center;">';
180
-        echo '<th>' . _AM_EXTCAL_CATEGORY . '</th>';
181
-        echo '<th>' . _AM_EXTCAL_TITLE . '</th>';
182
-        echo '<th>' . _AM_EXTCAL_START_DATE . '</th>';
183
-        echo '<th>' . _AM_EXTCAL_ACTION . '</th>';
180
+        echo '<th>'._AM_EXTCAL_CATEGORY.'</th>';
181
+        echo '<th>'._AM_EXTCAL_TITLE.'</th>';
182
+        echo '<th>'._AM_EXTCAL_START_DATE.'</th>';
183
+        echo '<th>'._AM_EXTCAL_ACTION.'</th>';
184 184
         echo '</tr>';
185 185
 
186 186
         if (count($pendingEvent) > 0) {
187 187
             $i = 0;
188 188
             foreach ($pendingEvent as $event) {
189 189
                 $class = (0 == ++$i % 2) ? 'even' : 'odd';
190
-                echo '<tr style="text-align:center;" class="' . $class . '">';
191
-                echo '<td>' . $event['Category']['cat_name'] . '</td>';
192
-                echo '<td>' . $event['event_title'] . '</td>';
193
-                echo '<td>' . $event['formated_event_start'] . '</td>';
190
+                echo '<tr style="text-align:center;" class="'.$class.'">';
191
+                echo '<td>'.$event['Category']['cat_name'].'</td>';
192
+                echo '<td>'.$event['event_title'].'</td>';
193
+                echo '<td>'.$event['formated_event_start'].'</td>';
194 194
                 echo '<td style="width:10%; text-align:center;">';
195
-                echo '<a href="event.php?op=modify&amp;event_id=' . $event['event_id'] . '"><img src=' . $pathIcon16 . '/edit.png></a>&nbsp;&nbsp;';
196
-                echo '<a href="event.php?op=delete&amp;event_id=' . $event['event_id'] . '"><img src=' . $pathIcon16 . '/delete.png></a>';
195
+                echo '<a href="event.php?op=modify&amp;event_id='.$event['event_id'].'"><img src='.$pathIcon16.'/edit.png></a>&nbsp;&nbsp;';
196
+                echo '<a href="event.php?op=delete&amp;event_id='.$event['event_id'].'"><img src='.$pathIcon16.'/delete.png></a>';
197 197
                 echo '</td>';
198 198
                 echo '</tr>';
199 199
             }
200 200
         } else {
201
-            echo '<tr><td colspan="4">' . _AM_EXTCAL_NO_PENDING_EVENT . '</td></tr>';
201
+            echo '<tr><td colspan="4">'._AM_EXTCAL_NO_PENDING_EVENT.'</td></tr>';
202 202
         }
203 203
 
204 204
         echo '</table></fieldset><br>';
205 205
 
206
-        require_once __DIR__ . '/admin_footer.php';
206
+        require_once __DIR__.'/admin_footer.php';
207 207
 
208 208
         break;
209 209
 }
Please login to merge, or discard this patch.