Passed
Push — master ( dbde9b...3f3727 )
by Goffy
03:56
created
language/german/main.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
  * @author         Goffy - XOOPS Development Team - Email:<[email protected]> - Website:<https://wedega.com>
21 21
  */
22 22
 
23
-include_once __DIR__ . '/admin.php';
23
+include_once __DIR__.'/admin.php';
24 24
 
25 25
 // ---------------- Main ----------------
26 26
 \define('_MA_WGGITHUB_INDEX', 'Übersicht');
Please login to merge, or discard this patch.
language/german/admin.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -20,8 +20,8 @@
 block discarded – undo
20 20
  * @author         Goffy - XOOPS Development Team - Email:<[email protected]> - Website:<https://wedega.com>
21 21
  */
22 22
 
23
-include_once __DIR__ . '/common.php';
24
-include_once __DIR__ . '/main.php';
23
+include_once __DIR__.'/common.php';
24
+include_once __DIR__.'/main.php';
25 25
 
26 26
 // ---------------- Admin Index ----------------
27 27
 \define('_AM_WGGITHUB_STATISTICS', 'Statistiken');
Please login to merge, or discard this patch.
language/english/admin.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -20,8 +20,8 @@
 block discarded – undo
20 20
  * @author         Goffy - XOOPS Development Team - Email:<[email protected]> - Website:<https://wedega.com>
21 21
  */
22 22
 
23
-include_once __DIR__ . '/common.php';
24
-include_once __DIR__ . '/main.php';
23
+include_once __DIR__.'/common.php';
24
+include_once __DIR__.'/main.php';
25 25
 
26 26
 // ---------------- Admin Index ----------------
27 27
 \define('_AM_WGGITHUB_STATISTICS', 'Statistics');
Please login to merge, or discard this patch.
class/Constants.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
     public const DIRECTORY_TYPE_USER = 1;
41 41
     public const DIRECTORY_TYPE_ORG  = 2;
42 42
 
43
-    public const DIRECTORY_CONTENT_ALL  = 0;
43
+    public const DIRECTORY_CONTENT_ALL = 0;
44 44
     public const DIRECTORY_CONTENT_OWN = 1;
45 45
 
46 46
     // Constants for status
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
     public const PERM_README_UPDATE = 3;
58 58
 
59 59
     // Constants for log type
60
-    public const LOG_TYPE_NONE  = 0;
60
+    public const LOG_TYPE_NONE = 0;
61 61
     public const LOG_TYPE_UPDATE_START = 1;
62 62
     public const LOG_TYPE_UPDATE_END   = 2;
63 63
     public const LOG_TYPE_REQUEST      = 3;
Please login to merge, or discard this patch.
class/RepositoriesHandler.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -140,7 +140,7 @@
 block discarded – undo
140 140
         $submitter = isset($GLOBALS['xoopsUser']) && \is_object($GLOBALS['xoopsUser']) ? $GLOBALS['xoopsUser']->getVar('uid') : 0;
141 141
         // add/update all items from table repositories
142 142
         foreach ($repos as $key => $repo) {
143
-            $fork = (bool)$repo['fork'];
143
+            $fork = (bool) $repo['fork'];
144 144
             if (Constants::DIRECTORY_CONTENT_ALL == $dirContent || false === $fork) {
145 145
                 $crRepositories = new \CriteriaCompo();
146 146
                 $crRepositories->add(new \Criteria('repo_nodeid', $repo['node_id']));
Please login to merge, or discard this patch.
include/update.php 1 patch
Spacing   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
     $ret = wggithub_check_db($module);
40 40
 
41 41
     //check upload directory
42
-    include_once __DIR__ . '/install.php';
42
+    include_once __DIR__.'/install.php';
43 43
     $ret = xoops_module_install_wggithub($module);
44 44
 
45 45
     $errors = $module->getErrors();
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
 {
62 62
     global $xoopsDB;
63 63
     $result = $xoopsDB->query(
64
-        'SELECT t1.tpl_id FROM ' . $xoopsDB->prefix('tplfile') . ' t1, ' . $xoopsDB->prefix('tplfile') . ' t2 WHERE t1.tpl_refid = t2.tpl_refid AND t1.tpl_module = t2.tpl_module AND t1.tpl_tplset=t2.tpl_tplset AND t1.tpl_file = t2.tpl_file AND t1.tpl_type = t2.tpl_type AND t1.tpl_id > t2.tpl_id'
64
+        'SELECT t1.tpl_id FROM '.$xoopsDB->prefix('tplfile').' t1, '.$xoopsDB->prefix('tplfile').' t2 WHERE t1.tpl_refid = t2.tpl_refid AND t1.tpl_module = t2.tpl_module AND t1.tpl_tplset=t2.tpl_tplset AND t1.tpl_file = t2.tpl_file AND t1.tpl_type = t2.tpl_type AND t1.tpl_id > t2.tpl_id'
65 65
     );
66 66
     $tplids = [];
67 67
     while (false !== (list($tplid) = $xoopsDB->fetchRow($result))) {
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
     }
70 70
     if (\count($tplids) > 0) {
71 71
         $tplfileHandler  = \xoops_getHandler('tplfile');
72
-        $duplicate_files = $tplfileHandler->getObjects(new \Criteria('tpl_id', '(' . \implode(',', $tplids) . ')', 'IN'));
72
+        $duplicate_files = $tplfileHandler->getObjects(new \Criteria('tpl_id', '('.\implode(',', $tplids).')', 'IN'));
73 73
 
74 74
         if (\count($duplicate_files) > 0) {
75 75
             foreach (\array_keys($duplicate_files) as $i) {
@@ -77,9 +77,9 @@  discard block
 block discarded – undo
77 77
             }
78 78
         }
79 79
     }
80
-    $sql = 'SHOW INDEX FROM ' . $xoopsDB->prefix('tplfile') . " WHERE KEY_NAME = 'tpl_refid_module_set_file_type'";
80
+    $sql = 'SHOW INDEX FROM '.$xoopsDB->prefix('tplfile')." WHERE KEY_NAME = 'tpl_refid_module_set_file_type'";
81 81
     if (!$result = $xoopsDB->queryF($sql)) {
82
-        xoops_error($xoopsDB->error() . '<br>' . $sql);
82
+        xoops_error($xoopsDB->error().'<br>'.$sql);
83 83
 
84 84
         return false;
85 85
     }
@@ -92,9 +92,9 @@  discard block
 block discarded – undo
92 92
 
93 93
         return true;
94 94
     }
95
-    $sql = 'ALTER TABLE ' . $xoopsDB->prefix('tplfile') . ' ADD UNIQUE tpl_refid_module_set_file_type ( tpl_refid, tpl_module, tpl_tplset, tpl_file, tpl_type )';
95
+    $sql = 'ALTER TABLE '.$xoopsDB->prefix('tplfile').' ADD UNIQUE tpl_refid_module_set_file_type ( tpl_refid, tpl_module, tpl_tplset, tpl_file, tpl_type )';
96 96
     if (!$result = $xoopsDB->queryF($sql)) {
97
-        xoops_error($xoopsDB->error() . '<br>' . $sql);
97
+        xoops_error($xoopsDB->error().'<br>'.$sql);
98 98
         $module->setErrors("'tpl_refid_module_set_file_type' unique index is not added to 'tplfile' table. Warning: do not use XOOPS until you add this unique index.");
99 99
 
100 100
         return false;
@@ -118,12 +118,12 @@  discard block
 block discarded – undo
118 118
     // update table (add new field)
119 119
     $table   = $GLOBALS['xoopsDB']->prefix('wggithub_repositories');
120 120
     $field   = 'repo_release';
121
-    $check   = $GLOBALS['xoopsDB']->queryF('SHOW COLUMNS FROM `' . $table . "` LIKE '" . $field . "'");
121
+    $check   = $GLOBALS['xoopsDB']->queryF('SHOW COLUMNS FROM `'.$table."` LIKE '".$field."'");
122 122
     $numRows = $GLOBALS['xoopsDB']->getRowsNum($check);
123 123
     if (!$numRows) {
124 124
         $sql = "ALTER TABLE `$table` ADD `$field` INT(1) NOT NULL DEFAULT '0' AFTER `repo_htmlurl`;";
125 125
         if (!$result = $GLOBALS['xoopsDB']->queryF($sql)) {
126
-            xoops_error($GLOBALS['xoopsDB']->error() . '<br>' . $sql);
126
+            xoops_error($GLOBALS['xoopsDB']->error().'<br>'.$sql);
127 127
             $module->setErrors("Error when adding '$field' to table '$table'.");
128 128
             $ret = false;
129 129
         }
@@ -132,12 +132,12 @@  discard block
 block discarded – undo
132 132
     // update table (add new field)
133 133
     $table   = $GLOBALS['xoopsDB']->prefix('wggithub_repositories');
134 134
     $field   = 'repo_prerelease';
135
-    $check   = $GLOBALS['xoopsDB']->queryF('SHOW COLUMNS FROM `' . $table . "` LIKE '" . $field . "'");
135
+    $check   = $GLOBALS['xoopsDB']->queryF('SHOW COLUMNS FROM `'.$table."` LIKE '".$field."'");
136 136
     $numRows = $GLOBALS['xoopsDB']->getRowsNum($check);
137 137
     if (!$numRows) {
138 138
         $sql = "ALTER TABLE `$table` ADD `$field` INT(1) NOT NULL DEFAULT '0' AFTER `repo_htmlurl`;";
139 139
         if (!$result = $GLOBALS['xoopsDB']->queryF($sql)) {
140
-            xoops_error($GLOBALS['xoopsDB']->error() . '<br>' . $sql);
140
+            xoops_error($GLOBALS['xoopsDB']->error().'<br>'.$sql);
141 141
             $module->setErrors("Error when adding '$field' to table '$table'.");
142 142
             $ret = false;
143 143
         }
@@ -145,12 +145,12 @@  discard block
 block discarded – undo
145 145
     // update table (add new field)
146 146
     $table   = $GLOBALS['xoopsDB']->prefix('wggithub_repositories');
147 147
     $field   = 'repo_readme';
148
-    $check   = $GLOBALS['xoopsDB']->queryF('SHOW COLUMNS FROM `' . $table . "` LIKE '" . $field . "'");
148
+    $check   = $GLOBALS['xoopsDB']->queryF('SHOW COLUMNS FROM `'.$table."` LIKE '".$field."'");
149 149
     $numRows = $GLOBALS['xoopsDB']->getRowsNum($check);
150 150
     if (!$numRows) {
151 151
         $sql = "ALTER TABLE `$table` ADD `$field` INT(1) NOT NULL DEFAULT '0' AFTER `repo_htmlurl`;";
152 152
         if (!$result = $GLOBALS['xoopsDB']->queryF($sql)) {
153
-            xoops_error($GLOBALS['xoopsDB']->error() . '<br>' . $sql);
153
+            xoops_error($GLOBALS['xoopsDB']->error().'<br>'.$sql);
154 154
             $module->setErrors("Error when adding '$field' to table '$table'.");
155 155
             $ret = false;
156 156
         }
@@ -159,12 +159,12 @@  discard block
 block discarded – undo
159 159
     // update table (add new field)
160 160
     $table   = $GLOBALS['xoopsDB']->prefix('wggithub_directories');
161 161
     $field   = 'dir_filterrelease';
162
-    $check   = $GLOBALS['xoopsDB']->queryF('SHOW COLUMNS FROM `' . $table . "` LIKE '" . $field . "'");
162
+    $check   = $GLOBALS['xoopsDB']->queryF('SHOW COLUMNS FROM `'.$table."` LIKE '".$field."'");
163 163
     $numRows = $GLOBALS['xoopsDB']->getRowsNum($check);
164 164
     if (!$numRows) {
165 165
         $sql = "ALTER TABLE `$table` ADD `$field` INT(1) NOT NULL DEFAULT '0' AFTER `dir_online`;";
166 166
         if (!$result = $GLOBALS['xoopsDB']->queryF($sql)) {
167
-            xoops_error($GLOBALS['xoopsDB']->error() . '<br>' . $sql);
167
+            xoops_error($GLOBALS['xoopsDB']->error().'<br>'.$sql);
168 168
             $module->setErrors("Error when adding '$field' to table '$table'.");
169 169
             $ret = false;
170 170
         }
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
               PRIMARY KEY (`log_id`)
187 187
                 ) ENGINE=InnoDB;";
188 188
         if (!$result = $GLOBALS['xoopsDB']->queryF($sql)) {
189
-            xoops_error($GLOBALS['xoopsDB']->error() . '<br>' . $sql);
189
+            xoops_error($GLOBALS['xoopsDB']->error().'<br>'.$sql);
190 190
             $module->setErrors("Error when creating table '$table'.");
191 191
             $ret = false;
192 192
         }
@@ -195,12 +195,12 @@  discard block
 block discarded – undo
195 195
     // update table (add new field)
196 196
     $table   = $GLOBALS['xoopsDB']->prefix('wggithub_directories');
197 197
     $field   = 'dir_content';
198
-    $check   = $GLOBALS['xoopsDB']->queryF('SHOW COLUMNS FROM `' . $table . "` LIKE '" . $field . "'");
198
+    $check   = $GLOBALS['xoopsDB']->queryF('SHOW COLUMNS FROM `'.$table."` LIKE '".$field."'");
199 199
     $numRows = $GLOBALS['xoopsDB']->getRowsNum($check);
200 200
     if (!$numRows) {
201 201
         $sql = "ALTER TABLE `$table` ADD `$field` INT(10) NOT NULL DEFAULT '0' AFTER `dir_type`;";
202 202
         if (!$result = $GLOBALS['xoopsDB']->queryF($sql)) {
203
-            xoops_error($GLOBALS['xoopsDB']->error() . '<br>' . $sql);
203
+            xoops_error($GLOBALS['xoopsDB']->error().'<br>'.$sql);
204 204
             $module->setErrors("Error when adding '$field' to table '$table'.");
205 205
             $ret = false;
206 206
         }
@@ -209,12 +209,12 @@  discard block
 block discarded – undo
209 209
     // update table (add new field)
210 210
     $table   = $GLOBALS['xoopsDB']->prefix('wggithub_directories');
211 211
     $field   = 'dir_descr';
212
-    $check   = $GLOBALS['xoopsDB']->queryF('SHOW COLUMNS FROM `' . $table . "` LIKE '" . $field . "'");
212
+    $check   = $GLOBALS['xoopsDB']->queryF('SHOW COLUMNS FROM `'.$table."` LIKE '".$field."'");
213 213
     $numRows = $GLOBALS['xoopsDB']->getRowsNum($check);
214 214
     if (!$numRows) {
215 215
         $sql = "ALTER TABLE `$table` ADD `$field` TEXT NOT NULL AFTER `dir_type`;";
216 216
         if (!$result = $GLOBALS['xoopsDB']->queryF($sql)) {
217
-            xoops_error($GLOBALS['xoopsDB']->error() . '<br>' . $sql);
217
+            xoops_error($GLOBALS['xoopsDB']->error().'<br>'.$sql);
218 218
             $module->setErrors("Error when adding '$field' to table '$table'.");
219 219
             $ret = false;
220 220
         }
@@ -223,12 +223,12 @@  discard block
 block discarded – undo
223 223
     // update table (add new field)
224 224
     $table   = $GLOBALS['xoopsDB']->prefix('wggithub_readmes');
225 225
     $field   = 'rm_baseurl';
226
-    $check   = $GLOBALS['xoopsDB']->queryF('SHOW COLUMNS FROM `' . $table . "` LIKE '" . $field . "'");
226
+    $check   = $GLOBALS['xoopsDB']->queryF('SHOW COLUMNS FROM `'.$table."` LIKE '".$field."'");
227 227
     $numRows = $GLOBALS['xoopsDB']->getRowsNum($check);
228 228
     if (!$numRows) {
229 229
         $sql = "ALTER TABLE `$table` ADD `$field` VARCHAR(255) NOT NULL DEFAULT '' AFTER `rm_downloadurl`;";
230 230
         if (!$result = $GLOBALS['xoopsDB']->queryF($sql)) {
231
-            xoops_error($GLOBALS['xoopsDB']->error() . '<br>' . $sql);
231
+            xoops_error($GLOBALS['xoopsDB']->error().'<br>'.$sql);
232 232
             $module->setErrors("Error when adding '$field' to table '$table'.");
233 233
             $ret = false;
234 234
         }
@@ -237,12 +237,12 @@  discard block
 block discarded – undo
237 237
     // update table (add new field)
238 238
     $table   = $GLOBALS['xoopsDB']->prefix('wggithub_directories');
239 239
     $field   = 'dir_weight';
240
-    $check   = $GLOBALS['xoopsDB']->queryF('SHOW COLUMNS FROM `' . $table . "` LIKE '" . $field . "'");
240
+    $check   = $GLOBALS['xoopsDB']->queryF('SHOW COLUMNS FROM `'.$table."` LIKE '".$field."'");
241 241
     $numRows = $GLOBALS['xoopsDB']->getRowsNum($check);
242 242
     if (!$numRows) {
243 243
         $sql = "ALTER TABLE `$table` ADD `$field` INT(10) NOT NULL DEFAULT '0' AFTER `dir_filterrelease`;";
244 244
         if (!$result = $GLOBALS['xoopsDB']->queryF($sql)) {
245
-            xoops_error($GLOBALS['xoopsDB']->error() . '<br>' . $sql);
245
+            xoops_error($GLOBALS['xoopsDB']->error().'<br>'.$sql);
246 246
             $module->setErrors("Error when adding '$field' to table '$table'.");
247 247
             $ret = false;
248 248
         }
@@ -251,12 +251,12 @@  discard block
 block discarded – undo
251 251
     // update table (add new field)
252 252
     $table   = $GLOBALS['xoopsDB']->prefix('wggithub_repositories');
253 253
     $field   = 'repo_approved';
254
-    $check   = $GLOBALS['xoopsDB']->queryF('SHOW COLUMNS FROM `' . $table . "` LIKE '" . $field . "'");
254
+    $check   = $GLOBALS['xoopsDB']->queryF('SHOW COLUMNS FROM `'.$table."` LIKE '".$field."'");
255 255
     $numRows = $GLOBALS['xoopsDB']->getRowsNum($check);
256 256
     if (!$numRows) {
257 257
         $sql = "ALTER TABLE `$table` ADD `$field` INT(1) NOT NULL DEFAULT '0' AFTER `repo_release`;";
258 258
         if (!$result = $GLOBALS['xoopsDB']->queryF($sql)) {
259
-            xoops_error($GLOBALS['xoopsDB']->error() . '<br>' . $sql);
259
+            xoops_error($GLOBALS['xoopsDB']->error().'<br>'.$sql);
260 260
             $module->setErrors("Error when adding '$field' to table '$table'.");
261 261
             $ret = false;
262 262
         }
Please login to merge, or discard this patch.
class/Repositories.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -164,7 +164,7 @@
 block discarded – undo
164 164
         $ret['readme']      = $this->getVar('repo_readme');
165 165
         $ret['prerelease']  = $this->getVar('repo_prerelease');
166 166
         $ret['release']     = $this->getVar('repo_release');
167
-        $ret['approved']    = (int)$this->getVar('repo_approved') > 0 ? \_YES : \_NO;
167
+        $ret['approved']    = (int) $this->getVar('repo_approved') > 0 ? \_YES : \_NO;
168 168
         $status             = $this->getVar('repo_status');
169 169
         $ret['status']      = $status;
170 170
         switch ($status) {
Please login to merge, or discard this patch.
class/ReleasesHandler.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
                 if (Constants::STATUS_NEW === $repoStatus || Constants::STATUS_UPDATED === $repoStatus || 0 == $releasesCount) {
150 150
                     $ghReleases = $githubClient->getReleases($repositoriesAll[$i]->getVar('repo_user'), $repositoriesAll[$i]->getVar('repo_name'));
151 151
                     if ($releasesCount > 0) {
152
-                        $sql = 'DELETE FROM `' . $GLOBALS['xoopsDB']->prefix('wggithub_releases') . '` WHERE `rel_repoid` = ' . $repoId;
152
+                        $sql = 'DELETE FROM `'.$GLOBALS['xoopsDB']->prefix('wggithub_releases').'` WHERE `rel_repoid` = '.$repoId;
153 153
                         if (!$result = $GLOBALS['xoopsDB']->queryF($sql)) {
154 154
                             return false;
155 155
                         }
@@ -159,13 +159,13 @@  discard block
 block discarded – undo
159 159
                 $first = true;
160 160
                 $final = false;
161 161
                 foreach ($ghReleases as $ghRelease) {
162
-                    if ($first || (!$final && !(bool)$ghRelease['prerelease'])) {
162
+                    if ($first || (!$final && !(bool) $ghRelease['prerelease'])) {
163 163
                         // save first in any case and save first final version
164 164
                         $releasesObj = $releasesHandler->create();
165 165
                         $releasesObj->setVar('rel_repoid', $repoId);
166 166
                         $releasesObj->setVar('rel_type', $ghRelease['type']);
167 167
                         $releasesObj->setVar('rel_name', $ghRelease['name']);
168
-                        $releasesObj->setVar('rel_prerelease', (true == (bool)$ghRelease['prerelease']));
168
+                        $releasesObj->setVar('rel_prerelease', (true == (bool) $ghRelease['prerelease']));
169 169
                         $releasesObj->setVar('rel_publishedat', \strtotime($ghRelease['published_at']));
170 170
                         $releasesObj->setVar('rel_tarballurl', $ghRelease['tarball_url']);
171 171
                         $releasesObj->setVar('rel_zipballurl', $ghRelease['zipball_url']);
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
                         }
178 178
                     }
179 179
                     $first = false;
180
-                    if (false === (bool)$ghRelease['prerelease']) {
180
+                    if (false === (bool) $ghRelease['prerelease']) {
181 181
                         $final = true;
182 182
                     }
183 183
                 }
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
                 // must return true otherwise releases will not be loaded
216 216
                 return true;
217 217
             }
218
-            $sql = 'DELETE FROM `' . $GLOBALS['xoopsDB']->prefix('wggithub_releases') . '` WHERE `rel_repoid` = ' . $repoId;
218
+            $sql = 'DELETE FROM `'.$GLOBALS['xoopsDB']->prefix('wggithub_releases').'` WHERE `rel_repoid` = '.$repoId;
219 219
             if (!$result = $GLOBALS['xoopsDB']->queryF($sql)) {
220 220
                 return false;
221 221
             }
@@ -224,13 +224,13 @@  discard block
 block discarded – undo
224 224
             $first = true;
225 225
             $final = false;
226 226
             foreach ($ghReleases as $ghRelease) {
227
-                if ($first || (!$final && !(bool)$ghRelease['prerelease'])) {
227
+                if ($first || (!$final && !(bool) $ghRelease['prerelease'])) {
228 228
                     // save first in any case and save first final version
229 229
                     $releasesObj = $releasesHandler->create();
230 230
                     $releasesObj->setVar('rel_repoid', $repoId);
231 231
                     //$releasesObj->setVar('rel_type', $ghRelease['type']);
232 232
                     $releasesObj->setVar('rel_name', $ghRelease['name']);
233
-                    $releasesObj->setVar('rel_prerelease', (true == (bool)$ghRelease['prerelease']));
233
+                    $releasesObj->setVar('rel_prerelease', (true == (bool) $ghRelease['prerelease']));
234 234
                     $releasesObj->setVar('rel_publishedat', \strtotime($ghRelease['published_at']));
235 235
                     $releasesObj->setVar('rel_tarballurl', $ghRelease['tarball_url']);
236 236
                     $releasesObj->setVar('rel_zipballurl', $ghRelease['zipball_url']);
@@ -242,7 +242,7 @@  discard block
 block discarded – undo
242 242
                     }
243 243
                 }
244 244
                 $first = false;
245
-                if (false === (bool)$ghRelease['prerelease']) {
245
+                if (false === (bool) $ghRelease['prerelease']) {
246 246
                     $final = true;
247 247
                 }
248 248
             }
@@ -259,17 +259,17 @@  discard block
 block discarded – undo
259 259
     public function updateRepoReleases()
260 260
     {
261 261
         // update repo_prerelease
262
-        $sql = 'UPDATE ' . $GLOBALS['xoopsDB']->prefix('wggithub_repositories') . ' INNER JOIN ' . $GLOBALS['xoopsDB']->prefix('wggithub_releases');
263
-        $sql .= ' ON ' . $GLOBALS['xoopsDB']->prefix('wggithub_repositories') . '.repo_id = ' . $GLOBALS['xoopsDB']->prefix('wggithub_releases') . '.rel_repoid ';
264
-        $sql .= 'SET ' . $GLOBALS['xoopsDB']->prefix('wggithub_repositories') . '.repo_prerelease = 1 ';
265
-        $sql .= 'WHERE (((' . $GLOBALS['xoopsDB']->prefix('wggithub_releases') . '.rel_prerelease)=1));';
262
+        $sql = 'UPDATE '.$GLOBALS['xoopsDB']->prefix('wggithub_repositories').' INNER JOIN '.$GLOBALS['xoopsDB']->prefix('wggithub_releases');
263
+        $sql .= ' ON '.$GLOBALS['xoopsDB']->prefix('wggithub_repositories').'.repo_id = '.$GLOBALS['xoopsDB']->prefix('wggithub_releases').'.rel_repoid ';
264
+        $sql .= 'SET '.$GLOBALS['xoopsDB']->prefix('wggithub_repositories').'.repo_prerelease = 1 ';
265
+        $sql .= 'WHERE ((('.$GLOBALS['xoopsDB']->prefix('wggithub_releases').'.rel_prerelease)=1));';
266 266
         $GLOBALS['xoopsDB']->queryF($sql);
267 267
 
268 268
         // update repo_release
269
-        $sql = 'UPDATE ' . $GLOBALS['xoopsDB']->prefix('wggithub_repositories') . ' INNER JOIN ' . $GLOBALS['xoopsDB']->prefix('wggithub_releases');
270
-        $sql .= ' ON ' . $GLOBALS['xoopsDB']->prefix('wggithub_repositories') . '.repo_id = ' . $GLOBALS['xoopsDB']->prefix('wggithub_releases') . '.rel_repoid ';
271
-        $sql .= 'SET ' . $GLOBALS['xoopsDB']->prefix('wggithub_repositories') . '.repo_release = 1 ';
272
-        $sql .= 'WHERE (((' . $GLOBALS['xoopsDB']->prefix('wggithub_releases') . '.rel_prerelease)=0));';
269
+        $sql = 'UPDATE '.$GLOBALS['xoopsDB']->prefix('wggithub_repositories').' INNER JOIN '.$GLOBALS['xoopsDB']->prefix('wggithub_releases');
270
+        $sql .= ' ON '.$GLOBALS['xoopsDB']->prefix('wggithub_repositories').'.repo_id = '.$GLOBALS['xoopsDB']->prefix('wggithub_releases').'.rel_repoid ';
271
+        $sql .= 'SET '.$GLOBALS['xoopsDB']->prefix('wggithub_repositories').'.repo_release = 1 ';
272
+        $sql .= 'WHERE ((('.$GLOBALS['xoopsDB']->prefix('wggithub_releases').'.rel_prerelease)=0));';
273 273
         $GLOBALS['xoopsDB']->queryF($sql);
274 274
 
275 275
         return true;
Please login to merge, or discard this patch.
include/xoops_version.inc.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -27,13 +27,13 @@
 block discarded – undo
27 27
     switch (mb_substr($val, -1)) {
28 28
         case 'K':
29 29
         case 'k':
30
-            return (int)$val * 1024;
30
+            return (int) $val * 1024;
31 31
         case 'M':
32 32
         case 'm':
33
-            return (int)$val * 1048576;
33
+            return (int) $val * 1048576;
34 34
         case 'G':
35 35
         case 'g':
36
-            return (int)$val * 1073741824;
36
+            return (int) $val * 1073741824;
37 37
         default:
38 38
             return $val;
39 39
     }
Please login to merge, or discard this patch.