Completed
Push — master ( b949bb...b4f428 )
by Michael
01:58
created
xoops_trust_path/libs/altsys/oninstall.php 1 patch
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-eval(' function xoops_module_install_' . $mydirname . '( $module ) { return altsys_oninstall_base( $module , "' . $mydirname . '" ) ; } ');
3
+eval(' function xoops_module_install_'.$mydirname.'( $module ) { return altsys_oninstall_base( $module , "'.$mydirname.'" ) ; } ');
4 4
 
5 5
 if (!function_exists('altsys_oninstall_base')) {
6 6
     /**
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
         if (defined('XOOPS_CUBE_LEGACY')) {
21 21
             $root = XCube_Root::getSingleton();
22 22
 
23
-            $root->mDelegateManager->add('Legacy.Admin.Event.ModuleInstall.' . ucfirst($mydirname) . '.Success', 'altsys_message_append_oninstall');
23
+            $root->mDelegateManager->add('Legacy.Admin.Event.ModuleInstall.'.ucfirst($mydirname).'.Success', 'altsys_message_append_oninstall');
24 24
 
25 25
             $ret = [];
26 26
         } else {
@@ -37,25 +37,25 @@  discard block
 block discarded – undo
37 37
 
38 38
         // set weight=0
39 39
 
40
-        $db->queryF('UPDATE ' . $db->prefix('modules') . " SET weight=0 WHERE mid=$mid");
40
+        $db->queryF('UPDATE '.$db->prefix('modules')." SET weight=0 WHERE mid=$mid");
41 41
 
42 42
         /*************** END ALTSYS SPECIFIC PART ******************/
43 43
 
44 44
         // TABLES (loading mysql.sql)
45 45
 
46
-        $sql_file_path = __DIR__ . '/sql/mysql.sql';
46
+        $sql_file_path = __DIR__.'/sql/mysql.sql';
47 47
 
48
-        $prefix_mod = $db->prefix() . '_' . $mydirname;
48
+        $prefix_mod = $db->prefix().'_'.$mydirname;
49 49
 
50 50
         if (file_exists($sql_file_path)) {
51
-            $ret[] = 'SQL file found at <b>' . htmlspecialchars($sql_file_path, ENT_QUOTES | ENT_HTML5) . '</b>.<br /> Creating tables...';
51
+            $ret[] = 'SQL file found at <b>'.htmlspecialchars($sql_file_path, ENT_QUOTES | ENT_HTML5).'</b>.<br /> Creating tables...';
52 52
 
53
-            if (is_file(XOOPS_ROOT_PATH . '/class/database/oldsqlutility.php')) {
54
-                include_once XOOPS_ROOT_PATH . '/class/database/oldsqlutility.php';
53
+            if (is_file(XOOPS_ROOT_PATH.'/class/database/oldsqlutility.php')) {
54
+                include_once XOOPS_ROOT_PATH.'/class/database/oldsqlutility.php';
55 55
 
56 56
                 $sqlutil = new OldSqlUtility();
57 57
             } else {
58
-                include_once XOOPS_ROOT_PATH . '/class/database/sqlutility.php';
58
+                include_once XOOPS_ROOT_PATH.'/class/database/sqlutility.php';
59 59
 
60 60
                 $sqlutil = new SqlUtility();
61 61
             }
@@ -70,13 +70,13 @@  discard block
 block discarded – undo
70 70
                 $prefixed_query = $sqlutil->prefixQuery($piece, $prefix_mod);
71 71
 
72 72
                 if (!$prefixed_query) {
73
-                    $ret[] = 'Invalid SQL <b>' . htmlspecialchars($piece, ENT_QUOTES | ENT_HTML5) . '</b><br />';
73
+                    $ret[] = 'Invalid SQL <b>'.htmlspecialchars($piece, ENT_QUOTES | ENT_HTML5).'</b><br />';
74 74
 
75 75
                     return false;
76 76
                 }
77 77
 
78 78
                 if (!$db->query($prefixed_query[0])) {
79
-                    $ret[] = '<b>' . htmlspecialchars($db->error(), ENT_QUOTES | ENT_HTML5) . '</b><br />';
79
+                    $ret[] = '<b>'.htmlspecialchars($db->error(), ENT_QUOTES | ENT_HTML5).'</b><br />';
80 80
 
81 81
                     //var_dump( $db->error() ) ;
82 82
 
@@ -84,11 +84,11 @@  discard block
 block discarded – undo
84 84
                 }
85 85
 
86 86
                 if (!in_array($prefixed_query[4], $created_tables, true)) {
87
-                    $ret[] = 'Table <b>' . htmlspecialchars($prefix_mod . '_' . $prefixed_query[4], ENT_QUOTES | ENT_HTML5) . '</b> created.<br />';
87
+                    $ret[] = 'Table <b>'.htmlspecialchars($prefix_mod.'_'.$prefixed_query[4], ENT_QUOTES | ENT_HTML5).'</b> created.<br />';
88 88
 
89 89
                     $created_tables[] = $prefixed_query[4];
90 90
                 } else {
91
-                    $ret[] = 'Data inserted to table <b>' . htmlspecialchars($prefix_mod . '_' . $prefixed_query[4], ENT_QUOTES | ENT_HTML5) . '</b>.</br />';
91
+                    $ret[] = 'Data inserted to table <b>'.htmlspecialchars($prefix_mod.'_'.$prefixed_query[4], ENT_QUOTES | ENT_HTML5).'</b>.</br />';
92 92
                 }
93 93
             }
94 94
         }
@@ -97,15 +97,15 @@  discard block
 block discarded – undo
97 97
 
98 98
         $tplfile_handler = xoops_getHandler('tplfile');
99 99
 
100
-        $tpl_path = __DIR__ . '/templates';
100
+        $tpl_path = __DIR__.'/templates';
101 101
 
102
-        if ($handler = @opendir($tpl_path . '/')) {
102
+        if ($handler = @opendir($tpl_path.'/')) {
103 103
             while (false !== ($file = readdir($handler))) {
104 104
                 if ('.' == mb_substr($file, 0, 1)) {
105 105
                     continue;
106 106
                 }
107 107
 
108
-                $file_path = $tpl_path . '/' . $file;
108
+                $file_path = $tpl_path.'/'.$file;
109 109
 
110 110
                 if (is_file($file_path)) {
111 111
                     $mtime = (int)(@filemtime($file_path));
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
 
119 119
                     $tplfile->setVar('tpl_tplset', 'default');
120 120
 
121
-                    $tplfile->setVar('tpl_file', $mydirname . '_' . $file);
121
+                    $tplfile->setVar('tpl_file', $mydirname.'_'.$file);
122 122
 
123 123
                     $tplfile->setVar('tpl_desc', '', true);
124 124
 
@@ -131,13 +131,13 @@  discard block
 block discarded – undo
131 131
                     $tplfile->setVar('tpl_type', 'module');
132 132
 
133 133
                     if (!$tplfile_handler->insert($tplfile)) {
134
-                        $ret[] = '<span style="color:#ff0000;">ERROR: Could not insert template <b>' . htmlspecialchars($mydirname . '_' . $file, ENT_QUOTES | ENT_HTML5) . '</b> to the database.</span><br />';
134
+                        $ret[] = '<span style="color:#ff0000;">ERROR: Could not insert template <b>'.htmlspecialchars($mydirname.'_'.$file, ENT_QUOTES | ENT_HTML5).'</b> to the database.</span><br />';
135 135
                     } else {
136 136
                         $tplid = $tplfile->getVar('tpl_id');
137 137
 
138
-                        $ret[] = 'Template <b>' . htmlspecialchars($mydirname . '_' . $file, ENT_QUOTES | ENT_HTML5) . '</b> added to the database. (ID: <b>' . $tplid . '</b>)<br />';
138
+                        $ret[] = 'Template <b>'.htmlspecialchars($mydirname.'_'.$file, ENT_QUOTES | ENT_HTML5).'</b> added to the database. (ID: <b>'.$tplid.'</b>)<br />';
139 139
 
140
-                        require_once XOOPS_TRUST_PATH . '/libs/altsys/include/altsys_functions.php';
140
+                        require_once XOOPS_TRUST_PATH.'/libs/altsys/include/altsys_functions.php';
141 141
 
142 142
                         altsys_clear_templates_c();
143 143
 
@@ -156,9 +156,9 @@  discard block
 block discarded – undo
156 156
             closedir($handler);
157 157
         }
158 158
 
159
-        include_once XOOPS_ROOT_PATH . '/class/xoopsblock.php';
159
+        include_once XOOPS_ROOT_PATH.'/class/xoopsblock.php';
160 160
 
161
-        include_once XOOPS_ROOT_PATH . '/class/template.php';
161
+        include_once XOOPS_ROOT_PATH.'/class/template.php';
162 162
 
163 163
         xoops_template_clear_module_cache($mid);
164 164
 
Please login to merge, or discard this patch.
xoops_trust_path/libs/altsys/mymenu.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
 // language files (modinfo.php)
21 21
 altsys_include_language_file('modinfo');
22 22
 
23
-include __DIR__ . '/admin_menu.php';
23
+include __DIR__.'/admin_menu.php';
24 24
 
25 25
 $adminmenu = array_merge($adminmenu, $adminmenu4altsys);
26 26
 
@@ -57,12 +57,12 @@  discard block
 block discarded – undo
57 57
 // link conversion from relative to absolute
58 58
 foreach (array_keys($adminmenu) as $i) {
59 59
     if (false === mb_stristr($adminmenu[$i]['link'], XOOPS_URL)) {
60
-        $adminmenu[$i]['link'] = XOOPS_URL . "/modules/$mydirname/" . $adminmenu[$i]['link'];
60
+        $adminmenu[$i]['link'] = XOOPS_URL."/modules/$mydirname/".$adminmenu[$i]['link'];
61 61
     }
62 62
 }
63 63
 
64 64
 // display
65
-require_once XOOPS_TRUST_PATH . '/libs/altsys/class/D3Tpl.class.php';
65
+require_once XOOPS_TRUST_PATH.'/libs/altsys/class/D3Tpl.class.php';
66 66
 $tpl = new D3Tpl();
67 67
 $tpl->assign([
68 68
                  'adminmenu' => $adminmenu,
@@ -71,6 +71,6 @@  discard block
 block discarded – undo
71 71
 
72 72
 // submenu
73 73
 $page = preg_replace('/[^0-9a-zA-Z_-]/', '', @$_GET['page']);
74
-if (file_exists(__DIR__ . '/mymenusub/' . $page . '.php')) {
75
-    include __DIR__ . '/mymenusub/' . $page . '.php';
74
+if (file_exists(__DIR__.'/mymenusub/'.$page.'.php')) {
75
+    include __DIR__.'/mymenusub/'.$page.'.php';
76 76
 }
Please login to merge, or discard this patch.
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -65,8 +65,8 @@
 block discarded – undo
65 65
 require_once XOOPS_TRUST_PATH . '/libs/altsys/class/D3Tpl.class.php';
66 66
 $tpl = new D3Tpl();
67 67
 $tpl->assign([
68
-                 'adminmenu' => $adminmenu,
69
-             ]);
68
+                    'adminmenu' => $adminmenu,
69
+                ]);
70 70
 $tpl->display('db:altsys_inc_mymenu.tpl');
71 71
 
72 72
 // submenu
Please login to merge, or discard this patch.
xoops_trust_path/libs/altsys/mypreferences.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -5,9 +5,9 @@  discard block
 block discarded – undo
5 5
 //                     GIJOE <http://www.peak.ne.jp/>                        //
6 6
 // ------------------------------------------------------------------------- //
7 7
 
8
-require_once __DIR__ . '/class/AltsysBreadcrumbs.class.php';
9
-include_once __DIR__ . '/include/gtickets.php';
10
-include_once __DIR__ . '/include/altsys_functions.php';
8
+require_once __DIR__.'/class/AltsysBreadcrumbs.class.php';
9
+include_once __DIR__.'/include/gtickets.php';
10
+include_once __DIR__.'/include/altsys_functions.php';
11 11
 
12 12
 // check access right (needs module_admin of this module)
13 13
 if (!is_object($xoopsUser) || !is_object($xoopsModule) || !$xoopsUser->isAdmin($xoopsModule->mid())) {
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
         die('no configs');
37 37
     }
38 38
 
39
-    include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
39
+    include_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php';
40 40
 
41 41
     $form = new XoopsThemeForm(_MD_A_MYPREFERENCES_FORMTITLE, 'pref_form', 'index.php?mode=admin&lib=altsys&page=mypreferences&op=save');
42 42
 
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
     // if has comments feature, need comment lang file
70 70
 
71 71
     if (1 == $module->getVar('hascomments') && !defined('_CM_TITLE')) {
72
-        include_once XOOPS_ROOT_PATH . '/language/' . $xoopsConfig['language'] . '/comment.php';
72
+        include_once XOOPS_ROOT_PATH.'/language/'.$xoopsConfig['language'].'/comment.php';
73 73
     }
74 74
 
75 75
     // RMV-NOTIFY
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
     // if has notification feature, need notification lang file
78 78
 
79 79
     if (1 == $module->getVar('hasnotification') && !defined('_NOT_NOTIFICATIONOPTIONS')) {
80
-        include_once XOOPS_ROOT_PATH . '/language/' . $xoopsConfig['language'] . '/notification.php';
80
+        include_once XOOPS_ROOT_PATH.'/language/'.$xoopsConfig['language'].'/notification.php';
81 81
     }
82 82
 
83 83
     $modname = $module->getVar('name');
@@ -91,9 +91,9 @@  discard block
 block discarded – undo
91 91
     // }
92 92
 
93 93
     for ($i = 0; $i < $count; ++$i) {
94
-        $title_icon = ('encrypt' === $config[$i]->getVar('conf_valuetype')) ? '<img src="' . XOOPS_MODULE_URL . '/legacy/admin/theme/icons/textfield_key.png" alt="Encrypted">' : ''; // support XCL 2.2.3 'encrypt' of 'conf_valuetype'
94
+        $title_icon = ('encrypt' === $config[$i]->getVar('conf_valuetype')) ? '<img src="'.XOOPS_MODULE_URL.'/legacy/admin/theme/icons/textfield_key.png" alt="Encrypted">' : ''; // support XCL 2.2.3 'encrypt' of 'conf_valuetype'
95 95
 
96
-        $title4tray = (!defined($config[$i]->getVar('conf_desc')) || '' == constant($config[$i]->getVar('conf_desc'))) ? (constant($config[$i]->getVar('conf_title')) . $title_icon) : (constant($config[$i]->getVar('conf_title'))
96
+        $title4tray = (!defined($config[$i]->getVar('conf_desc')) || '' == constant($config[$i]->getVar('conf_desc'))) ? (constant($config[$i]->getVar('conf_title')).$title_icon) : (constant($config[$i]->getVar('conf_title'))
97 97
                                                                                                                                                                                         . $title_icon
98 98
                                                                                                                                                                                         . '<br /><br /><span style="font-weight:normal;">'
99 99
                                                                                                                                                                                         . constant($config[$i]->getVar('conf_desc'))
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
 
129 129
                     $optkey = defined($options[$j]->getVar('confop_name')) ? constant($options[$j]->getVar('confop_name')) : $options[$j]->getVar('confop_name');
130 130
 
131
-                    $ele->addOption($optval, $optkey . $addBr);
131
+                    $ele->addOption($optval, $optkey.$addBr);
132 132
                 }
133 133
                 break;
134 134
             case 'select_multi':
@@ -149,31 +149,31 @@  discard block
 block discarded – undo
149 149
 
150 150
                     $optkey = defined($options[$j]->getVar('confop_name')) ? constant($options[$j]->getVar('confop_name')) : $options[$j]->getVar('confop_name');
151 151
 
152
-                    $ele->addOption($optval, $optkey . $addBr);
152
+                    $ele->addOption($optval, $optkey.$addBr);
153 153
                 }
154 154
                 break;
155 155
             case 'yesno':
156 156
                 $ele = new XoopsFormRadioYN($title, $config[$i]->getVar('conf_name'), $config[$i]->getConfValueForOutput(), _YES, _NO);
157 157
                 break;
158 158
             case 'group':
159
-                include_once XOOPS_ROOT_PATH . '/class/xoopslists.php';
159
+                include_once XOOPS_ROOT_PATH.'/class/xoopslists.php';
160 160
                 $ele = new XoopsFormSelectGroup($title, $config[$i]->getVar('conf_name'), false, $config[$i]->getConfValueForOutput(), 1, false);
161 161
                 break;
162 162
             case 'group_multi':
163
-                include_once XOOPS_ROOT_PATH . '/class/xoopslists.php';
163
+                include_once XOOPS_ROOT_PATH.'/class/xoopslists.php';
164 164
                 $ele = new XoopsFormSelectGroup($title, $config[$i]->getVar('conf_name'), false, $config[$i]->getConfValueForOutput(), 5, true);
165 165
                 break;
166 166
             case 'group_checkbox':
167
-                include_once __DIR__ . '/include/formcheckboxgroup.php';
167
+                include_once __DIR__.'/include/formcheckboxgroup.php';
168 168
                 $ele = new AltsysFormCheckboxGroup($title, $config[$i]->getVar('conf_name'), false, $config[$i]->getConfValueForOutput());
169 169
                 break;
170 170
             // RMV-NOTIFY: added 'user' and 'user_multi'
171 171
             case 'user':
172
-                include_once XOOPS_ROOT_PATH . '/class/xoopslists.php';
172
+                include_once XOOPS_ROOT_PATH.'/class/xoopslists.php';
173 173
                 $ele = new XoopsFormSelectUser($title, $config[$i]->getVar('conf_name'), false, $config[$i]->getConfValueForOutput(), 1, false);
174 174
                 break;
175 175
             case 'user_multi':
176
-                include_once XOOPS_ROOT_PATH . '/class/xoopslists.php';
176
+                include_once XOOPS_ROOT_PATH.'/class/xoopslists.php';
177 177
                 $ele = new XoopsFormSelectUser($title, $config[$i]->getVar('conf_name'), false, $config[$i]->getConfValueForOutput(), 5, true);
178 178
                 break;
179 179
             case 'password':
@@ -217,10 +217,10 @@  discard block
 block discarded – undo
217 217
     $breadcrumbsObj = AltsysBreadcrumbs::getInstance();
218 218
 
219 219
     if ($breadcrumbsObj->hasPaths()) {
220
-        $breadcrumbsObj->appendPath(XOOPS_URL . '/modules/altsys/admin/index.php?mode=admin&amp;lib=altsys&amp;page=mypreferences', _PREFERENCES);
220
+        $breadcrumbsObj->appendPath(XOOPS_URL.'/modules/altsys/admin/index.php?mode=admin&amp;lib=altsys&amp;page=mypreferences', _PREFERENCES);
221 221
     }
222 222
 
223
-    echo "<h3 style='text-align:" . _GLOBAL_LEFT . ";'>" . $module->getVar('name') . ' &nbsp; ' . _PREFERENCES . "</h3>\n";
223
+    echo "<h3 style='text-align:"._GLOBAL_LEFT.";'>".$module->getVar('name').' &nbsp; '._PREFERENCES."</h3>\n";
224 224
 
225 225
     // GIJ patch end
226 226
 
@@ -239,10 +239,10 @@  discard block
 block discarded – undo
239 239
     //}
240 240
 
241 241
     if (!$xoopsGTicket->check(true, 'mypreferences')) {
242
-        redirect_header(XOOPS_URL . '/', 3, $xoopsGTicket->getErrors());
242
+        redirect_header(XOOPS_URL.'/', 3, $xoopsGTicket->getErrors());
243 243
     }
244 244
 
245
-    require_once XOOPS_ROOT_PATH . '/class/template.php';
245
+    require_once XOOPS_ROOT_PATH.'/class/template.php';
246 246
 
247 247
     $xoopsTpl = new XoopsTpl();
248 248
 
@@ -349,7 +349,7 @@  discard block
 block discarded – undo
349 349
                         $imagefiles = &$image_handler->getObjects(new Criteria('tplset_name', $newtplset), true);
350 350
 
351 351
                         foreach (array_keys($imagefiles) as $i) {
352
-                            if (!$fp = fopen(XOOPS_CACHE_PATH . '/' . $newtplset . '_' . $imagefiles[$i]->getVar('imgsetimg_file'), 'wb')) {
352
+                            if (!$fp = fopen(XOOPS_CACHE_PATH.'/'.$newtplset.'_'.$imagefiles[$i]->getVar('imgsetimg_file'), 'wb')) {
353 353
                             } else {
354 354
                                 fwrite($fp, $imagefiles[$i]->getVar('imgsetimg_body'));
355 355
 
Please login to merge, or discard this patch.
xoops_trust_path/libs/altsys/onupdate.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-eval(' function xoops_module_update_' . $mydirname . '( $module ) { return altsys_onupdate_base( $module , "' . $mydirname . '" ) ; } ');
3
+eval(' function xoops_module_update_'.$mydirname.'( $module ) { return altsys_onupdate_base( $module , "'.$mydirname.'" ) ; } ');
4 4
 
5 5
 if (!function_exists('altsys_onupdate_base')) {
6 6
     /**
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
         if (defined('XOOPS_CUBE_LEGACY')) {
21 21
             $root = XCube_Root::getSingleton();
22 22
 
23
-            $root->mDelegateManager->add('Legacy.Admin.Event.ModuleUpdate.' . ucfirst($mydirname) . '.Success', 'altsys_message_append_onupdate');
23
+            $root->mDelegateManager->add('Legacy.Admin.Event.ModuleUpdate.'.ucfirst($mydirname).'.Success', 'altsys_message_append_onupdate');
24 24
 
25 25
             $msgs = [];
26 26
         } else {
@@ -37,33 +37,33 @@  discard block
 block discarded – undo
37 37
 
38 38
         // configs (Though I know it is not a recommended way...)
39 39
 
40
-        $check_sql = 'SHOW COLUMNS FROM ' . $db->prefix('config') . " LIKE 'conf_title'";
40
+        $check_sql = 'SHOW COLUMNS FROM '.$db->prefix('config')." LIKE 'conf_title'";
41 41
 
42 42
         if (($result = $db->query($check_sql)) && ($myrow = $db->fetchArray($result)) && 'varchar(30)' == @$myrow['Type']) {
43
-            $db->queryF('ALTER TABLE ' . $db->prefix('config') . " MODIFY `conf_title` VARCHAR(255) NOT NULL DEFAULT '', MODIFY `conf_desc` VARCHAR(255) NOT NULL DEFAULT ''");
43
+            $db->queryF('ALTER TABLE '.$db->prefix('config')." MODIFY `conf_title` VARCHAR(255) NOT NULL DEFAULT '', MODIFY `conf_desc` VARCHAR(255) NOT NULL DEFAULT ''");
44 44
         }
45 45
 
46 46
         // 0.4 -> 0.5
47 47
 
48
-        $check_sql = 'SELECT COUNT(*) FROM ' . $db->prefix($mydirname . '_language_constants');
48
+        $check_sql = 'SELECT COUNT(*) FROM '.$db->prefix($mydirname.'_language_constants');
49 49
 
50 50
         if (!$db->query($check_sql)) {
51
-            $db->queryF('CREATE TABLE ' . $db->prefix($mydirname . '_language_constants') . " (mid SMALLINT(5) UNSIGNED NOT NULL DEFAULT 0,language VARCHAR(32) NOT NULL DEFAULT '',name VARCHAR(255) NOT NULL DEFAULT '',value TEXT,PRIMARY KEY (mid,language,name)) ENGINE=MyISAM");
51
+            $db->queryF('CREATE TABLE '.$db->prefix($mydirname.'_language_constants')." (mid SMALLINT(5) UNSIGNED NOT NULL DEFAULT 0,language VARCHAR(32) NOT NULL DEFAULT '',name VARCHAR(255) NOT NULL DEFAULT '',value TEXT,PRIMARY KEY (mid,language,name)) ENGINE=MyISAM");
52 52
         }
53 53
 
54 54
         // TEMPLATES (all templates have been already removed by modulesadmin)
55 55
 
56 56
         $tplfile_handler = xoops_getHandler('tplfile');
57 57
 
58
-        $tpl_path = __DIR__ . '/templates';
58
+        $tpl_path = __DIR__.'/templates';
59 59
 
60
-        if ($handler = @opendir($tpl_path . '/')) {
60
+        if ($handler = @opendir($tpl_path.'/')) {
61 61
             while (false !== ($file = readdir($handler))) {
62 62
                 if ('.' == mb_substr($file, 0, 1)) {
63 63
                     continue;
64 64
                 }
65 65
 
66
-                $file_path = $tpl_path . '/' . $file;
66
+                $file_path = $tpl_path.'/'.$file;
67 67
 
68 68
                 if (is_file($file_path)) {
69 69
                     $mtime = (int)(@filemtime($file_path));
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
 
77 77
                     $tplfile->setVar('tpl_tplset', 'default');
78 78
 
79
-                    $tplfile->setVar('tpl_file', $mydirname . '_' . $file);
79
+                    $tplfile->setVar('tpl_file', $mydirname.'_'.$file);
80 80
 
81 81
                     $tplfile->setVar('tpl_desc', '', true);
82 82
 
@@ -89,15 +89,15 @@  discard block
 block discarded – undo
89 89
                     $tplfile->setVar('tpl_type', 'module');
90 90
 
91 91
                     if (!$tplfile_handler->insert($tplfile)) {
92
-                        $msgs[] = '<span style="color:#ff0000;">ERROR: Could not insert template <b>' . htmlspecialchars($mydirname . '_' . $file, ENT_QUOTES | ENT_HTML5) . '</b> to the database.</span>';
92
+                        $msgs[] = '<span style="color:#ff0000;">ERROR: Could not insert template <b>'.htmlspecialchars($mydirname.'_'.$file, ENT_QUOTES | ENT_HTML5).'</b> to the database.</span>';
93 93
                     } else {
94 94
                         $tplid = $tplfile->getVar('tpl_id');
95 95
 
96
-                        $msgs[] = 'Template <b>' . htmlspecialchars($mydirname . '_' . $file, ENT_QUOTES | ENT_HTML5) . '</b> added to the database. (ID: <b>' . $tplid . '</b>)';
96
+                        $msgs[] = 'Template <b>'.htmlspecialchars($mydirname.'_'.$file, ENT_QUOTES | ENT_HTML5).'</b> added to the database. (ID: <b>'.$tplid.'</b>)';
97 97
 
98 98
                         // generate compiled file
99 99
 
100
-                        require_once XOOPS_TRUST_PATH . '/libs/altsys/include/altsys_functions.php';
100
+                        require_once XOOPS_TRUST_PATH.'/libs/altsys/include/altsys_functions.php';
101 101
 
102 102
                         altsys_clear_templates_c();
103 103
 
@@ -114,9 +114,9 @@  discard block
 block discarded – undo
114 114
             closedir($handler);
115 115
         }
116 116
 
117
-        include_once XOOPS_ROOT_PATH . '/class/xoopsblock.php';
117
+        include_once XOOPS_ROOT_PATH.'/class/xoopsblock.php';
118 118
 
119
-        include_once XOOPS_ROOT_PATH . '/class/template.php';
119
+        include_once XOOPS_ROOT_PATH.'/class/template.php';
120 120
 
121 121
         xoops_template_clear_module_cache($mid);
122 122
 
Please login to merge, or discard this patch.
xoops_trust_path/libs/altsys/get_tplsvarsinfo.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -7,8 +7,8 @@  discard block
 block discarded – undo
7 7
 
8 8
 error_reporting(0);
9 9
 
10
-include_once __DIR__ . '/include/gtickets.php';
11
-include_once __DIR__ . '/include/altsys_functions.php';
10
+include_once __DIR__.'/include/gtickets.php';
11
+include_once __DIR__.'/include/altsys_functions.php';
12 12
 
13 13
 // this page can be called only from altsys
14 14
 if ('altsys' != $xoopsModule->getVar('dirname')) {
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
                     continue;
45 45
                 }
46 46
 
47
-                convert_array2info_recursive($var_name . '.' . $key, $val, $sum_array_name);
47
+                convert_array2info_recursive($var_name.'.'.$key, $val, $sum_array_name);
48 48
             }
49 49
 
50 50
             return;
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
 {
82 82
     global $site_name;
83 83
 
84
-    return '<macromedia-extension name="XOOPS-' . $site_name . ' ' . $mxi_name . '" version="1.0" type="Suite" requires-restart="true">
84
+    return '<macromedia-extension name="XOOPS-'.$site_name.' '.$mxi_name.'" version="1.0" type="Suite" requires-restart="true">
85 85
     <products>
86 86
         <product name="Dreamweaver" version="6" primary="true" />
87 87
     </products>
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
     ]]></license-agreement>
97 97
     <description><![CDATA[
98 98
 
99
-Usable template variables in ' . $mxi_name . '
99
+Usable template variables in ' . $mxi_name.'
100 100
 
101 101
     ]]></description>
102 102
     <ui-access><![CDATA[
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
 
108 108
     ]]></ui-access>
109 109
     <files>
110
-' . $file_entries . '
110
+' . $file_entries.'
111 111
     </files>
112 112
     <configuration-changes>
113 113
     </configuration-changes>
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
 $tplsvarsinfo_mod_tpl = [];
122 122
 $tplsvarsinfo_total = [];
123 123
 
124
-if ($handler = opendir(XOOPS_COMPILE_PATH . '/')) {
124
+if ($handler = opendir(XOOPS_COMPILE_PATH.'/')) {
125 125
     while (false !== ($file = readdir($handler))) {
126 126
         // skip files other than tplsvars_* files
127 127
 
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
             continue;
138 138
         }
139 139
 
140
-        $file_path = XOOPS_COMPILE_PATH . '/' . $file;
140
+        $file_path = XOOPS_COMPILE_PATH.'/'.$file;
141 141
 
142 142
         $file_body = implode('', file($file_path));
143 143
 
@@ -183,13 +183,13 @@  discard block
 block discarded – undo
183 183
 </snippet>';
184 184
 
185 185
 if (!empty($_POST['as_dw_extension_zip'])) {
186
-    require_once XOOPS_ROOT_PATH . '/class/zipdownloader.php';
186
+    require_once XOOPS_ROOT_PATH.'/class/zipdownloader.php';
187 187
 
188 188
     $downloader = new XoopsZipDownloader();
189 189
 
190 190
     $do_download = true;
191 191
 } elseif (!empty($_POST['as_dw_extension_tgz'])) {
192
-    require_once XOOPS_ROOT_PATH . '/class/tardownloader.php';
192
+    require_once XOOPS_ROOT_PATH.'/class/tardownloader.php';
193 193
 
194 194
     $downloader = new XoopsTarDownloader();
195 195
 
@@ -222,9 +222,9 @@  discard block
 block discarded – undo
222 222
 
223 223
         $snippet_body = sprintf($snippet_format, $name, $description);
224 224
 
225
-        $file_name = strtr($key, '.', '_') . '.csn';
225
+        $file_name = strtr($key, '.', '_').'.csn';
226 226
 
227
-        $downloader->addFileData($snippet_body, $dw_snippets_dirname . '/' . $file_name);
227
+        $downloader->addFileData($snippet_body, $dw_snippets_dirname.'/'.$file_name);
228 228
     }
229 229
 
230 230
     // make a mxi file per module
@@ -236,15 +236,15 @@  discard block
 block discarded – undo
236 236
             foreach ($tplsvarsinfo as $key => $val) {
237 237
                 $name = mb_substr($key, 1);
238 238
 
239
-                $file_name = strtr($key, '.', '_') . '.csn';
239
+                $file_name = strtr($key, '.', '_').'.csn';
240 240
 
241
-                $file_entries .= "\t\t" . '<file name="' . $dw_snippets_dirname . '/' . $file_name . '" destination="$Dreamweaver/Configuration/Snippets/XOOPS-' . $site_name . '/' . $tpl_name . '" />' . "\n";
241
+                $file_entries .= "\t\t".'<file name="'.$dw_snippets_dirname.'/'.$file_name.'" destination="$Dreamweaver/Configuration/Snippets/XOOPS-'.$site_name.'/'.$tpl_name.'" />'."\n";
242 242
             }
243 243
         }
244 244
 
245 245
         $mxi_body = get_mxi_body($mod_name, $file_entries);
246 246
 
247
-        $downloader->addFileData($mxi_body, $mod_name . '.mxi');
247
+        $downloader->addFileData($mxi_body, $mod_name.'.mxi');
248 248
     }
249 249
 
250 250
     //bugfix by nao-pon ,echo is not necessary for downloader
Please login to merge, or discard this patch.
xoops_trust_path/libs/altsys/compilehookadmin.php 1 patch
Spacing   +30 added lines, -30 removed lines patch added patch discarded remove patch
@@ -5,9 +5,9 @@  discard block
 block discarded – undo
5 5
 //                       GIJOE <http://www.peak.ne.jp/>                      //
6 6
 // ------------------------------------------------------------------------- //
7 7
 
8
-require_once __DIR__ . '/class/AltsysBreadcrumbs.class.php';
9
-include_once __DIR__ . '/include/gtickets.php';
10
-include_once __DIR__ . '/include/altsys_functions.php';
8
+require_once __DIR__.'/class/AltsysBreadcrumbs.class.php';
9
+include_once __DIR__.'/include/gtickets.php';
10
+include_once __DIR__.'/include/altsys_functions.php';
11 11
 
12 12
 // this page can be called only from altsys
13 13
 // if( $xoopsModule->getVar('dirname') != 'altsys' ) die( 'this page can be called only from altsys' ) ;
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
 
33 33
     'enclosebybordereddiv' => [
34 34
         'pre' => '<div class="altsys_tplsadmin_frame" style="border:1px solid black;word-wrap:break-word;">',
35
-        'post' => '<br /><a href="' . XOOPS_URL . '/modules/altsys/admin/index.php?mode=admin&amp;lib=altsys&amp;page=mytplsform&amp;tpl_file=%1$s" style="color:red;">Edit:<br />%1$s</a></div>',
35
+        'post' => '<br /><a href="'.XOOPS_URL.'/modules/altsys/admin/index.php?mode=admin&amp;lib=altsys&amp;page=mytplsform&amp;tpl_file=%1$s" style="color:red;">Edit:<br />%1$s</a></div>',
36 36
         'success_msg' => _TPLSADMIN_FMT_MSG_ENCLOSEBYBORDEREDDIV,
37 37
         'dt' => _TPLSADMIN_DT_ENCLOSEBYBORDEREDDIV,
38 38
         'dd' => _TPLSADMIN_DD_ENCLOSEBYBORDEREDDIV,
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
     ],
42 42
 
43 43
     'hooksavevars' => [
44
-        'pre' => '<?php include_once "' . XOOPS_TRUST_PATH . '/libs/altsys/include/compilehook.inc.php" ; tplsadmin_save_tplsvars(\'%s\',$this) ; ?>',
44
+        'pre' => '<?php include_once "'.XOOPS_TRUST_PATH.'/libs/altsys/include/compilehook.inc.php" ; tplsadmin_save_tplsvars(\'%s\',$this) ; ?>',
45 45
         'post' => '',
46 46
         'success_msg' => _TPLSADMIN_FMT_MSG_HOOKSAVEVARS,
47 47
         'dt' => _TPLSADMIN_DT_HOOKSAVEVARS,
@@ -70,12 +70,12 @@  discard block
 block discarded – undo
70 70
     // Ticket Check
71 71
 
72 72
     if (!$xoopsGTicket->check()) {
73
-        redirect_header(XOOPS_URL . '/', 3, $xoopsGTicket->getErrors());
73
+        redirect_header(XOOPS_URL.'/', 3, $xoopsGTicket->getErrors());
74 74
     }
75 75
 
76
-    if ($handler = opendir(XOOPS_COMPILE_PATH . '/')) {
76
+    if ($handler = opendir(XOOPS_COMPILE_PATH.'/')) {
77 77
         while (false !== ($file = readdir($handler))) {
78
-            if (! empty($_POST['clearcache'])) {
78
+            if (!empty($_POST['clearcache'])) {
79 79
                 // judging template cache '*.php'
80 80
 
81 81
                 if ('.php' !== mb_substr($file, -4)) {
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
                 }
90 90
             }
91 91
 
92
-            $file_path = XOOPS_COMPILE_PATH . '/' . $file;
92
+            $file_path = XOOPS_COMPILE_PATH.'/'.$file;
93 93
 
94 94
             @unlink($file_path);
95 95
         }
@@ -108,10 +108,10 @@  discard block
 block discarded – undo
108 108
         // Ticket Check
109 109
 
110 110
         if (!$xoopsGTicket->check()) {
111
-            redirect_header(XOOPS_URL . '/', 3, $xoopsGTicket->getErrors());
111
+            redirect_header(XOOPS_URL.'/', 3, $xoopsGTicket->getErrors());
112 112
         }
113 113
 
114
-        if ($handler = opendir(XOOPS_COMPILE_PATH . '/')) {
114
+        if ($handler = opendir(XOOPS_COMPILE_PATH.'/')) {
115 115
             $file_count = 0;
116 116
 
117 117
             while (false !== ($file = readdir($handler))) {
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
                     $skip_mode = false;
136 136
                 }
137 137
 
138
-                $file_path = XOOPS_COMPILE_PATH . '/' . $file;
138
+                $file_path = XOOPS_COMPILE_PATH.'/'.$file;
139 139
 
140 140
                 $file_bodies = file($file_path);
141 141
 
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
                 // insert "pre" command before the compiled cache
165 165
 
166 166
                 if ($compile_hook['pre'] && !$skip_mode) {
167
-                    fwrite($fw, sprintf($compile_hook['pre'], htmlspecialchars($tpl_name, ENT_QUOTES)) . "\r\n");
167
+                    fwrite($fw, sprintf($compile_hook['pre'], htmlspecialchars($tpl_name, ENT_QUOTES))."\r\n");
168 168
                 }
169 169
 
170 170
                 // rest of template cache
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
                 // insert "post" command after the compiled cache
177 177
 
178 178
                 if ($compile_hook['post'] && !$skip_mode) {
179
-                    fwrite($fw, "\r\n" . sprintf($compile_hook['post'], htmlspecialchars($tpl_name, ENT_QUOTES)));
179
+                    fwrite($fw, "\r\n".sprintf($compile_hook['post'], htmlspecialchars($tpl_name, ENT_QUOTES)));
180 180
                 }
181 181
 
182 182
                 fclose($fw);
@@ -206,7 +206,7 @@  discard block
 block discarded – undo
206 206
 // count template vars & compiled caches
207 207
 $compiledcache_num = 0;
208 208
 $tplsvars_num = 0;
209
-if ($handler = opendir(XOOPS_COMPILE_PATH . '/')) {
209
+if ($handler = opendir(XOOPS_COMPILE_PATH.'/')) {
210 210
     while (false !== ($file = readdir($handler))) {
211 211
         if (0 === strncmp($file, 'tplsvars_', 9)) {
212 212
             $tplsvars_num++;
@@ -217,7 +217,7 @@  discard block
 block discarded – undo
217 217
 }
218 218
 
219 219
 // get tplsets
220
-$sql = 'SELECT tplset_name,COUNT(DISTINCT tpl_file) FROM ' . $xoopsDB->prefix('tplset') . ' LEFT JOIN ' . $xoopsDB->prefix('tplfile') . " ON tplset_name=tpl_tplset GROUP BY tpl_tplset ORDER BY tpl_tplset='default' DESC,tpl_tplset";
220
+$sql = 'SELECT tplset_name,COUNT(DISTINCT tpl_file) FROM '.$xoopsDB->prefix('tplset').' LEFT JOIN '.$xoopsDB->prefix('tplfile')." ON tplset_name=tpl_tplset GROUP BY tpl_tplset ORDER BY tpl_tplset='default' DESC,tpl_tplset";
221 221
 $srs = $xoopsDB->query($sql);
222 222
 $tplset_options = "<option value=''>----</option>\n";
223 223
 while (list($tplset, $tpl_count) = $xoopsDB->fetchRow($srs)) {
@@ -237,7 +237,7 @@  discard block
 block discarded – undo
237 237
 
238 238
 // breadcrumbs
239 239
 $breadcrumbsObj = AltsysBreadcrumbs::getInstance();
240
-$breadcrumbsObj->appendPath(XOOPS_URL . '/modules/altsys/admin/index.php?mode=admin&amp;lib=altsys&amp;page=compilehookadmin', _MI_ALTSYS_MENU_COMPILEHOOKADMIN);
240
+$breadcrumbsObj->appendPath(XOOPS_URL.'/modules/altsys/admin/index.php?mode=admin&amp;lib=altsys&amp;page=compilehookadmin', _MI_ALTSYS_MENU_COMPILEHOOKADMIN);
241 241
 
242 242
 echo "
243 243
     <style>
@@ -255,7 +255,7 @@  discard block
 block discarded – undo
255 255
             <dl>
256 256
                 <dt>
257 257
                     {$compile_hook['dt']}
258
-                    <input type='submit' name='$command' id='$command' value='" . _GO . "' onclick='return confirm(\"{$compile_hook['conf_msg']}\");' />
258
+                    <input type='submit' name='$command' id='$command' value='"._GO."' onclick='return confirm(\"{$compile_hook['conf_msg']}\");' />
259 259
                 </dt>
260 260
                 <dd>
261 261
                     {$compile_hook['dd']}
@@ -267,26 +267,26 @@  discard block
 block discarded – undo
267 267
 
268 268
 echo "
269 269
         <p style='margin:10px;'>
270
-            " . _TPLSADMIN_NUMCAP_COMPILEDCACHES . ": <strong>$compiledcache_num</strong>
271
-            <input type='submit' name='clearcache' value='" . _DELETE . "' onclick='return confirm(\"" . _TPLSADMIN_CNF_DELETEOK . "\");' />
270
+            " . _TPLSADMIN_NUMCAP_COMPILEDCACHES.": <strong>$compiledcache_num</strong>
271
+            <input type='submit' name='clearcache' value='"._DELETE."' onclick='return confirm(\""._TPLSADMIN_CNF_DELETEOK."\");' />
272 272
 
273 273
         </p>
274 274
         <p style='margin:10px;'>
275
-            " . _TPLSADMIN_NUMCAP_TPLSVARS . ": <strong>$tplsvars_num</strong>
276
-            <input type='submit' name='cleartplsvars' value='" . _DELETE . "' onclick='return confirm(\"" . _TPLSADMIN_CNF_DELETEOK . "\");' />
275
+            " . _TPLSADMIN_NUMCAP_TPLSVARS.": <strong>$tplsvars_num</strong>
276
+            <input type='submit' name='cleartplsvars' value='"._DELETE."' onclick='return confirm(\""._TPLSADMIN_CNF_DELETEOK."\");' />
277 277
 
278 278
         </p>
279
-        " . $xoopsGTicket->getTicketHtml(__LINE__) . "
279
+        " . $xoopsGTicket->getTicketHtml(__LINE__)."
280 280
     </form>
281 281
 
282 282
     <form action='?mode=admin&amp;lib=altsys&amp;page=get_tplsvarsinfo' method='post' class='odd' style='margin: 40px;' target='_blank'>
283 283
         <p>
284 284
             <dl>
285 285
                 <dt>
286
-                    " . _TPLSADMIN_DT_GETTPLSVARSINFO_DW . '
286
+                    " . _TPLSADMIN_DT_GETTPLSVARSINFO_DW.'
287 287
                 </dt>
288 288
                 <dd>
289
-                    ' . _TPLSADMIN_DD_GETTPLSVARSINFO_DW . "
289
+                    ' . _TPLSADMIN_DD_GETTPLSVARSINFO_DW."
290 290
                     <br />
291 291
                     <input type='submit' name='as_dw_extension_zip' value='zip' />
292 292
                     <input type='submit' name='as_dw_extension_tgz' value='tar.gz' />
@@ -299,10 +299,10 @@  discard block
 block discarded – undo
299 299
         <p>
300 300
             <dl>
301 301
                 <dt>
302
-                    " . _TPLSADMIN_DT_GETTEMPLATES . '
302
+                    " . _TPLSADMIN_DT_GETTEMPLATES.'
303 303
                 </dt>
304 304
                 <dd>
305
-                    ' . _TPLSADMIN_DD_GETTEMPLATES . "
305
+                    ' . _TPLSADMIN_DD_GETTEMPLATES."
306 306
                     <br />
307 307
                     <select name='tplset'>$tplset_options</select>
308 308
                     <input type='submit' name='download_zip' value='zip' />
@@ -316,14 +316,14 @@  discard block
 block discarded – undo
316 316
         <p>
317 317
             <dl>
318 318
                 <dt>
319
-                    " . _TPLSADMIN_DT_PUTTEMPLATES . '
319
+                    "._TPLSADMIN_DT_PUTTEMPLATES.'
320 320
                 </dt>
321 321
                 <dd>
322
-                    ' . _TPLSADMIN_DD_PUTTEMPLATES . "
322
+                    ' . _TPLSADMIN_DD_PUTTEMPLATES."
323 323
                     <br />
324 324
                     <select name='tplset'>$tplset_options</select>
325 325
                     <input type='file' name='tplset_archive' size='60' />
326
-                    <input type='submit' value='" . _SUBMIT . "' />
326
+                    <input type='submit' value='"._SUBMIT."' />
327 327
                 </dd>
328 328
             </dl>
329 329
         </p>
Please login to merge, or discard this patch.
xoops_trust_path/libs/altsys/mymenusub/mytplsadmin.php 2 patches
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
 $db = XoopsDatabaseFactory::getDatabaseConnection();
10 10
 
11 11
 // get custom templates
12
-list($count) = $db->fetchRow($db->query('SELECT COUNT(t.tpl_module) AS tpl_count FROM ' . $db->prefix('tplfile') . " t WHERE t.tpl_type='custom'"));
12
+list($count) = $db->fetchRow($db->query('SELECT COUNT(t.tpl_module) AS tpl_count FROM '.$db->prefix('tplfile')." t WHERE t.tpl_type='custom'"));
13 13
 if ('_custom' == $current_dirname) {
14 14
     //  $GLOBALS['altsysXoopsBreadcrumbs'][] = array( 'name' => _MYTPLSADMIN_CUSTOMTEMPLATE ) ;
15 15
 
@@ -21,35 +21,35 @@  discard block
 block discarded – undo
21 21
 $adminmenu = [
22 22
     [
23 23
         'selected' => $custom_selected,
24
-        'title' => _MYTPLSADMIN_CUSTOMTEMPLATE . " ($count)",
24
+        'title' => _MYTPLSADMIN_CUSTOMTEMPLATE." ($count)",
25 25
         'link' => '?mode=admin&lib=altsys&page=mytplsadmin&dirname=_custom',
26 26
     ],
27 27
 ];
28 28
 
29 29
 // get modules/templates
30
-$mrs = $db->query('SELECT m.name,m.dirname,COUNT(t.tpl_module) AS tpl_count FROM ' . $db->prefix('modules') . ' m LEFT JOIN ' . $db->prefix('tplfile') . ' t ON m.dirname=t.tpl_module WHERE m.isactive GROUP BY m.mid HAVING tpl_count>0 ORDER BY m.weight,m.mid');
30
+$mrs = $db->query('SELECT m.name,m.dirname,COUNT(t.tpl_module) AS tpl_count FROM '.$db->prefix('modules').' m LEFT JOIN '.$db->prefix('tplfile').' t ON m.dirname=t.tpl_module WHERE m.isactive GROUP BY m.mid HAVING tpl_count>0 ORDER BY m.weight,m.mid');
31 31
 
32 32
 // module loop
33 33
 while (list($name, $dirname, $count) = $db->fetchRow($mrs)) {
34 34
     if ($dirname == $current_dirname) {
35 35
         $adminmenu[] = [
36 36
             'selected' => true,
37
-            'title' => $name . " ($count)",
38
-            'link' => '?mode=admin&lib=altsys&page=mytplsadmin&dirname=' . $dirname,
37
+            'title' => $name." ($count)",
38
+            'link' => '?mode=admin&lib=altsys&page=mytplsadmin&dirname='.$dirname,
39 39
         ];
40 40
 
41 41
     //$GLOBALS['altsysXoopsBreadcrumbs'][] = array( 'name' => htmlspecialchars( $name , ENT_QUOTES ) ) ;
42 42
     } else {
43 43
         $adminmenu[] = [
44 44
             'selected' => false,
45
-            'title' => $name . " ($count)",
46
-            'link' => '?mode=admin&lib=altsys&page=mytplsadmin&dirname=' . $dirname,
45
+            'title' => $name." ($count)",
46
+            'link' => '?mode=admin&lib=altsys&page=mytplsadmin&dirname='.$dirname,
47 47
         ];
48 48
     }
49 49
 }
50 50
 
51 51
 // display
52
-require_once XOOPS_TRUST_PATH . '/libs/altsys/class/D3Tpl.class.php';
52
+require_once XOOPS_TRUST_PATH.'/libs/altsys/class/D3Tpl.class.php';
53 53
 $tpl = new D3Tpl();
54 54
 $tpl->assign([
55 55
                  'adminmenu' => $adminmenu,
Please login to merge, or discard this patch.
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@
 block discarded – undo
52 52
 require_once XOOPS_TRUST_PATH . '/libs/altsys/class/D3Tpl.class.php';
53 53
 $tpl = new D3Tpl();
54 54
 $tpl->assign([
55
-                 'adminmenu' => $adminmenu,
56
-                 'mypage' => 'mytplsadmin',
57
-             ]);
55
+                    'adminmenu' => $adminmenu,
56
+                    'mypage' => 'mytplsadmin',
57
+                ]);
58 58
 $tpl->display('db:altsys_inc_mymenusub.tpl');
Please login to merge, or discard this patch.
xoops_trust_path/libs/altsys/mymenusub/myblocksadmin.php 2 patches
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -27,9 +27,9 @@  discard block
 block discarded – undo
27 27
     // get block info
28 28
 
29 29
     if (ALTSYS_CORE_TYPE_X22 != $core_type) {
30
-        list($block_count_all) = $db->fetchRow($db->query('SELECT COUNT(*) FROM ' . $db->prefix('newblocks') . ' WHERE mid=' . $m4menu->getVar('mid')));
30
+        list($block_count_all) = $db->fetchRow($db->query('SELECT COUNT(*) FROM '.$db->prefix('newblocks').' WHERE mid='.$m4menu->getVar('mid')));
31 31
 
32
-        list($block_count_visible) = $db->fetchRow($db->query('SELECT COUNT(*) FROM ' . $db->prefix('newblocks') . ' WHERE mid=' . $m4menu->getVar('mid') . ' AND visible>0'));
32
+        list($block_count_visible) = $db->fetchRow($db->query('SELECT COUNT(*) FROM '.$db->prefix('newblocks').' WHERE mid='.$m4menu->getVar('mid').' AND visible>0'));
33 33
 
34 34
         // $block_desc = " $block_count_all($block_count_visible)" ;
35 35
 
@@ -41,22 +41,22 @@  discard block
 block discarded – undo
41 41
     if ($m4menu->getVar('dirname') == $current_dirname) {
42 42
         $adminmenu[] = [
43 43
             'selected' => true,
44
-            'title' => $m4menu->getVar('name', 'n') . $block_desc,
45
-            'link' => '?mode=admin&lib=altsys&page=myblocksadmin&dirname=' . $m4menu->getVar('dirname', 'n'),
44
+            'title' => $m4menu->getVar('name', 'n').$block_desc,
45
+            'link' => '?mode=admin&lib=altsys&page=myblocksadmin&dirname='.$m4menu->getVar('dirname', 'n'),
46 46
         ];
47 47
 
48 48
     //$GLOBALS['altsysXoopsBreadcrumbs'][] = array( 'name' => $m4menu->getVar('name') ) ;
49 49
     } else {
50 50
         $adminmenu[] = [
51 51
             'selected' => false,
52
-            'title' => $m4menu->getVar('name', 'n') . $block_desc,
53
-            'link' => '?mode=admin&lib=altsys&page=myblocksadmin&dirname=' . $m4menu->getVar('dirname', 'n'),
52
+            'title' => $m4menu->getVar('name', 'n').$block_desc,
53
+            'link' => '?mode=admin&lib=altsys&page=myblocksadmin&dirname='.$m4menu->getVar('dirname', 'n'),
54 54
         ];
55 55
     }
56 56
 }
57 57
 
58 58
 // display
59
-require_once XOOPS_TRUST_PATH . '/libs/altsys/class/D3Tpl.class.php';
59
+require_once XOOPS_TRUST_PATH.'/libs/altsys/class/D3Tpl.class.php';
60 60
 $tpl = new D3Tpl();
61 61
 $tpl->assign([
62 62
                  'adminmenu' => $adminmenu,
Please login to merge, or discard this patch.
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@
 block discarded – undo
59 59
 require_once XOOPS_TRUST_PATH . '/libs/altsys/class/D3Tpl.class.php';
60 60
 $tpl = new D3Tpl();
61 61
 $tpl->assign([
62
-                 'adminmenu' => $adminmenu,
63
-                 'mypage' => 'myblocksadmin',
64
-             ]);
62
+                    'adminmenu' => $adminmenu,
63
+                    'mypage' => 'myblocksadmin',
64
+                ]);
65 65
 $tpl->display('db:altsys_inc_mymenusub.tpl');
Please login to merge, or discard this patch.
xoops_trust_path/libs/altsys/mymenusub/mylangadmin.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -7,29 +7,29 @@
 block discarded – undo
7 7
 $current_dirname = preg_replace('/[^0-9a-zA-Z_-]/', '', @$_GET['dirname']);
8 8
 
9 9
 $db = XoopsDatabaseFactory::getDatabaseConnection();
10
-$mrs = $db->query('SELECT m.name,m.dirname,COUNT(l.mid) FROM ' . $db->prefix('modules') . ' m LEFT JOIN ' . $db->prefix('altsys_language_constants') . ' l ON m.mid=l.mid WHERE m.isactive GROUP BY m.mid ORDER BY m.weight,m.mid');
10
+$mrs = $db->query('SELECT m.name,m.dirname,COUNT(l.mid) FROM '.$db->prefix('modules').' m LEFT JOIN '.$db->prefix('altsys_language_constants').' l ON m.mid=l.mid WHERE m.isactive GROUP BY m.mid ORDER BY m.weight,m.mid');
11 11
 
12 12
 $adminmenu = [];
13 13
 while (list($name, $dirname, $count) = $db->fetchRow($mrs)) {
14 14
     if ($dirname == $current_dirname) {
15 15
         $adminmenu[] = [
16 16
             'selected' => true,
17
-            'title' => $name . " ($count)",
18
-            'link' => '?mode=admin&lib=altsys&page=mylangadmin&dirname=' . $dirname,
17
+            'title' => $name." ($count)",
18
+            'link' => '?mode=admin&lib=altsys&page=mylangadmin&dirname='.$dirname,
19 19
         ];
20 20
 
21 21
     //$GLOBALS['altsysXoopsBreadcrumbs'][] = array( 'name' => htmlspecialchars( $name , ENT_QUOTES ) ) ;
22 22
     } else {
23 23
         $adminmenu[] = [
24 24
             'selected' => false,
25
-            'title' => $name . " ($count)",
26
-            'link' => '?mode=admin&lib=altsys&page=mylangadmin&dirname=' . $dirname,
25
+            'title' => $name." ($count)",
26
+            'link' => '?mode=admin&lib=altsys&page=mylangadmin&dirname='.$dirname,
27 27
         ];
28 28
     }
29 29
 }
30 30
 
31 31
 // display
32
-require_once XOOPS_TRUST_PATH . '/libs/altsys/class/D3Tpl.class.php';
32
+require_once XOOPS_TRUST_PATH.'/libs/altsys/class/D3Tpl.class.php';
33 33
 $tpl = new D3Tpl();
34 34
 $tpl->assign([
35 35
                  'adminmenu' => $adminmenu,
Please login to merge, or discard this patch.
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
 require_once XOOPS_TRUST_PATH . '/libs/altsys/class/D3Tpl.class.php';
33 33
 $tpl = new D3Tpl();
34 34
 $tpl->assign([
35
-                 'adminmenu' => $adminmenu,
36
-                 'mypage' => 'mylangadmin',
37
-             ]);
35
+                    'adminmenu' => $adminmenu,
36
+                    'mypage' => 'mylangadmin',
37
+                ]);
38 38
 $tpl->display('db:altsys_inc_mymenusub.tpl');
Please login to merge, or discard this patch.