Passed
Pull Request — master (#585)
by
unknown
17:41
created
htdocs/modules/publisher/admin/mimetypes.php 3 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -35,10 +35,10 @@
 block discarded – undo
35 35
 }
36 36
 
37 37
 $aSortBy = array('mime_id' => _AM_PUBLISHER_MIME_ID,
38
-                 'mime_name' => _AM_PUBLISHER_MIME_NAME,
39
-                 'mime_ext' => _AM_PUBLISHER_MIME_EXT,
40
-                 'mime_admin' => _AM_PUBLISHER_MIME_ADMIN,
41
-                 'mime_user' => _AM_PUBLISHER_MIME_USER);
38
+                    'mime_name' => _AM_PUBLISHER_MIME_NAME,
39
+                    'mime_ext' => _AM_PUBLISHER_MIME_EXT,
40
+                    'mime_admin' => _AM_PUBLISHER_MIME_ADMIN,
41
+                    'mime_user' => _AM_PUBLISHER_MIME_USER);
42 42
 $aOrderBy = array('ASC' => _AM_PUBLISHER_TEXT_ASCENDING, 'DESC' => _AM_PUBLISHER_TEXT_DESCENDING);
43 43
 $aLimitBy = array('10' => 10, '15' => 15, '20' => 20, '25' => 25, '50' => 50, '100' => 100);
44 44
 $aSearchBy = array('mime_id' => _AM_PUBLISHER_MIME_ID, 'mime_name' => _AM_PUBLISHER_MIME_NAME, 'mime_ext' => _AM_PUBLISHER_MIME_EXT);
Please login to merge, or discard this patch.
Switch Indentation   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -50,38 +50,38 @@
 block discarded – undo
50 50
 
51 51
 switch ($op)
52 52
 {
53
-    case "add":
54
-        add();
55
-        break;
56
-
57
-    case "delete":
58
-        delete();
59
-        break;
60
-
61
-    case "edit":
62
-        edit();
63
-        break;
64
-
65
-    case "search":
66
-        search();
67
-        break;
68
-
69
-    case "updateMimeValue":
70
-        updateMimeValue();
71
-        break;
72
-
73
-    case "clearAddSession":
74
-        clearAddSession();
75
-        break;
76
-
77
-    case "clearEditSession":
78
-        clearEditSession();
79
-        break;
80
-
81
-    case "manage":
82
-    default:
83
-        manage();
84
-        break;
53
+        case "add":
54
+            add();
55
+            break;
56
+
57
+        case "delete":
58
+            delete();
59
+            break;
60
+
61
+        case "edit":
62
+            edit();
63
+            break;
64
+
65
+        case "search":
66
+            search();
67
+            break;
68
+
69
+        case "updateMimeValue":
70
+            updateMimeValue();
71
+            break;
72
+
73
+        case "clearAddSession":
74
+            clearAddSession();
75
+            break;
76
+
77
+        case "clearEditSession":
78
+            clearEditSession();
79
+            break;
80
+
81
+        case "manage":
82
+        default:
83
+            manage();
84
+            break;
85 85
 }
86 86
 
87 87
 function add()
Please login to merge, or discard this patch.
Spacing   +127 added lines, -127 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
  * @version         $Id$
23 23
  */
24 24
 
25
-include_once __DIR__ . '/admin_header.php';
25
+include_once __DIR__.'/admin_header.php';
26 26
 
27 27
 $start = $limit = 0;
28 28
 if (isset($_REQUEST['limit'])) {
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
 
103 103
         //Display any form errors
104 104
         if (!$mime_errors === false) {
105
-            PublisherUtils::renderErrors($mime_errors, PublisherUtils::makeURI(PUBLISHER_ADMIN_URL . 'mimetypes.php', array('op' => 'clearAddSession')));
105
+            PublisherUtils::renderErrors($mime_errors, PublisherUtils::makeURI(PUBLISHER_ADMIN_URL.'mimetypes.php', array('op' => 'clearAddSession')));
106 106
         }
107 107
 
108 108
         if ($mime_type === false) {
@@ -123,38 +123,38 @@  discard block
 block discarded – undo
123 123
         // Display add form
124 124
         echo "<form action='mimetypes.php?op=add' method='post'>";
125 125
         echo "<table width='100%' cellspacing='1' class='outer'>";
126
-        echo "<tr><th colspan='2'>" . _AM_PUBLISHER_MIME_CREATEF . "</th></tr>";
126
+        echo "<tr><th colspan='2'>"._AM_PUBLISHER_MIME_CREATEF."</th></tr>";
127 127
         echo "<tr valign='top'>
128
-        <td class='head'>" . _AM_PUBLISHER_MIME_EXTF . "</td>
128
+        <td class='head'>" . _AM_PUBLISHER_MIME_EXTF."</td>
129 129
         <td class='even'><input type='text' name='mime_ext' id='mime_ext' value='$mime_ext' size='5' /></td>
130 130
         </tr>";
131 131
         echo "<tr valign='top'>
132
-        <td class='head'>" . _AM_PUBLISHER_MIME_NAMEF . "</td>
132
+        <td class='head'>" . _AM_PUBLISHER_MIME_NAMEF."</td>
133 133
         <td class='even'><input type='text' name='mime_name' id='mime_name' value='$mime_name' /></td>
134 134
         </tr>";
135 135
         echo "<tr valign='top'>
136
-        <td class='head'>" . _AM_PUBLISHER_MIME_TYPEF . "</td>
136
+        <td class='head'>" . _AM_PUBLISHER_MIME_TYPEF."</td>
137 137
         <td class='even'><textarea name='mime_types' id='mime_types' cols='60' rows='5'>$mime_types</textarea></td>
138 138
         </tr>";
139 139
         echo "<tr valign='top'>
140
-        <td class='head'>" . _AM_PUBLISHER_MIME_ADMINF . "</td>
140
+        <td class='head'>" . _AM_PUBLISHER_MIME_ADMINF."</td>
141 141
         <td class='even'>";
142
-        echo "<input type='radio' name='mime_admin' value='1' " . ($mime_admin == 1 ? "checked='checked'" : "") . " />" . XoopsLocale::YES;
143
-        echo "<input type='radio' name='mime_admin' value='0' " . ($mime_admin == 0 ? "checked='checked'" : "") . " />" . XoopsLocale::NO . "
142
+        echo "<input type='radio' name='mime_admin' value='1' ".($mime_admin == 1 ? "checked='checked'" : "")." />".XoopsLocale::YES;
143
+        echo "<input type='radio' name='mime_admin' value='0' ".($mime_admin == 0 ? "checked='checked'" : "")." />".XoopsLocale::NO."
144 144
         </td>
145 145
         </tr>";
146 146
         echo "<tr valign='top'>
147
-        <td class='head'>" . _AM_PUBLISHER_MIME_USERF . "</td>
147
+        <td class='head'>" . _AM_PUBLISHER_MIME_USERF."</td>
148 148
         <td class='even'>";
149
-        echo "<input type='radio' name='mime_user' value='1'" . ($mime_user == 1 ? "checked='checked'" : "") . " />" . XoopsLocale::YES;
150
-        echo "<input type='radio' name='mime_user' value='0'" . ($mime_user == 0 ? "checked='checked'" : "") . "/>" . XoopsLocale::NO . "
149
+        echo "<input type='radio' name='mime_user' value='1'".($mime_user == 1 ? "checked='checked'" : "")." />".XoopsLocale::YES;
150
+        echo "<input type='radio' name='mime_user' value='0'".($mime_user == 0 ? "checked='checked'" : "")."/>".XoopsLocale::NO."
151 151
         </td>
152 152
         </tr>";
153 153
         echo "<tr valign='top'>
154 154
         <td class='head'></td>
155 155
         <td class='even'>
156
-        <input type='submit' name='add_mime' id='add_mime' value='" . _AM_PUBLISHER_BUTTON_SUBMIT . "' class='formButton' />
157
-        <input type='button' name='cancel' value='" . _AM_PUBLISHER_BUTTON_CANCEL . "' onclick='history.go(-1)' class='formButton' />
156
+        <input type='submit' name='add_mime' id='add_mime' value='" . _AM_PUBLISHER_BUTTON_SUBMIT."' class='formButton' />
157
+        <input type='button' name='cancel' value='" . _AM_PUBLISHER_BUTTON_CANCEL."' onclick='history.go(-1)' class='formButton' />
158 158
         </td>
159 159
         </tr>";
160 160
         echo "</table></form>";
@@ -163,10 +163,10 @@  discard block
 block discarded – undo
163 163
         // Find new mimetypes table
164 164
         echo "<form action='http://www.filext.com' method='post'>";
165 165
         echo "<table width='100%' cellspacing='1' class='outer'>";
166
-        echo "<tr><th colspan='2'>" . _AM_PUBLISHER_MIME_FINDMIMETYPE . "</th></tr>";
166
+        echo "<tr><th colspan='2'>"._AM_PUBLISHER_MIME_FINDMIMETYPE."</th></tr>";
167 167
 
168 168
         echo "<tr class='foot'>
169
-        <td colspan='2'><input type='submit' name='find_mime' id='find_mime' value='" . _AM_PUBLISHER_MIME_FINDIT . "' class='formButton' /></td>
169
+        <td colspan='2'><input type='submit' name='find_mime' id='find_mime' value='" . _AM_PUBLISHER_MIME_FINDIT."' class='formButton' /></td>
170 170
         </tr>";
171 171
 
172 172
         echo "</table></form>";
@@ -209,7 +209,7 @@  discard block
 block discarded – undo
209 209
             $mime['mime_user'] = $mime_user;
210 210
             $session->set('publisher_addMime', $mime);
211 211
             $session->set('publisher_addMimeErr', $error);
212
-            header('Location: ' . PublisherUtils::makeURI(PUBLISHER_ADMIN_URL . 'mimetypes.php', array('op' => 'add'), false));
212
+            header('Location: '.PublisherUtils::makeURI(PUBLISHER_ADMIN_URL.'mimetypes.php', array('op' => 'add'), false));
213 213
         }
214 214
 
215 215
         $mimetype = $publisher->getMimetypeHandler()->create();
@@ -220,10 +220,10 @@  discard block
 block discarded – undo
220 220
         $mimetype->setVar('mime_user', $mime_user);
221 221
 
222 222
         if (!$publisher->getMimetypeHandler()->insert($mimetype)) {
223
-            $xoops->redirect(PUBLISHER_ADMIN_URL . "/mimetypes.php?op=manage&limit=$limit&start=$start", 3, _AM_PUBLISHER_MESSAGE_ADD_MIME_ERROR);
223
+            $xoops->redirect(PUBLISHER_ADMIN_URL."/mimetypes.php?op=manage&limit=$limit&start=$start", 3, _AM_PUBLISHER_MESSAGE_ADD_MIME_ERROR);
224 224
         } else {
225 225
             _clearAddSessionVars();
226
-            header("Location: " . PUBLISHER_ADMIN_URL . "/mimetypes.php?op=manage&limit=$limit&start=$start");
226
+            header("Location: ".PUBLISHER_ADMIN_URL."/mimetypes.php?op=manage&limit=$limit&start=$start");
227 227
         }
228 228
     }
229 229
 }
@@ -234,15 +234,15 @@  discard block
 block discarded – undo
234 234
     $xoops = Xoops::getInstance();
235 235
     global $start, $limit;
236 236
     if (!isset($_REQUEST['id'])) {
237
-        $xoops->redirect(PUBLISHER_ADMIN_URL . "/mimetypes.php", 3, _AM_PUBLISHER_MESSAGE_NO_ID);
237
+        $xoops->redirect(PUBLISHER_ADMIN_URL."/mimetypes.php", 3, _AM_PUBLISHER_MESSAGE_NO_ID);
238 238
     }
239 239
     $mime_id = (int)($_REQUEST['id']);
240 240
 
241 241
     $mimetype = $publisher->getMimetypeHandler()->get($mime_id); // Retrieve mimetype object
242 242
     if (!$publisher->getMimetypeHandler()->delete($mimetype, true)) {
243
-        $xoops->redirect(PUBLISHER_ADMIN_URL . "/mimetypes.php?op=manage&id=$mime_id&limit=$limit&start=$start", 3, _AM_PUBLISHER_MESSAGE_DELETE_MIME_ERROR);
243
+        $xoops->redirect(PUBLISHER_ADMIN_URL."/mimetypes.php?op=manage&id=$mime_id&limit=$limit&start=$start", 3, _AM_PUBLISHER_MESSAGE_DELETE_MIME_ERROR);
244 244
     } else {
245
-        $xoops->redirect(PUBLISHER_ADMIN_URL . "/mimetypes.php?op=manage&limit=$limit&start=$start", 3, "Deleted");
245
+        $xoops->redirect(PUBLISHER_ADMIN_URL."/mimetypes.php?op=manage&limit=$limit&start=$start", 3, "Deleted");
246 246
     }
247 247
 }
248 248
 
@@ -253,7 +253,7 @@  discard block
 block discarded – undo
253 253
     global $start, $limit, $oAdminButton;
254 254
 
255 255
     if (!isset($_REQUEST['id'])) {
256
-        $xoops->redirect(PUBLISHER_ADMIN_URL . "/mimetypes.php", 3, _AM_PUBLISHER_MESSAGE_NO_ID);
256
+        $xoops->redirect(PUBLISHER_ADMIN_URL."/mimetypes.php", 3, _AM_PUBLISHER_MESSAGE_NO_ID);
257 257
     }
258 258
     $mime_id = (int)($_REQUEST['id']);
259 259
 
@@ -272,7 +272,7 @@  discard block
 block discarded – undo
272 272
 
273 273
         //Display any form errors
274 274
         if (!$mime_errors === false) {
275
-            PublisherUtils::renderErrors($mime_errors, PublisherUtils::makeURI(PUBLISHER_ADMIN_URL . '/mimetypes.php', array('op' => 'clearEditSession', 'id' => $mime_id)));
275
+            PublisherUtils::renderErrors($mime_errors, PublisherUtils::makeURI(PUBLISHER_ADMIN_URL.'/mimetypes.php', array('op' => 'clearEditSession', 'id' => $mime_id)));
276 276
         }
277 277
 
278 278
         if ($mime_type === false) {
@@ -290,42 +290,42 @@  discard block
 block discarded – undo
290 290
         }
291 291
 
292 292
         // Display edit form
293
-        echo "<form action='mimetypes.php?op=edit&amp;id=" . $mime_id . "' method='post'>";
294
-        echo "<input type='hidden' name='limit' value='" . $limit . "' />";
295
-        echo "<input type='hidden' name='start' value='" . $start . "' />";
293
+        echo "<form action='mimetypes.php?op=edit&amp;id=".$mime_id."' method='post'>";
294
+        echo "<input type='hidden' name='limit' value='".$limit."' />";
295
+        echo "<input type='hidden' name='start' value='".$start."' />";
296 296
         echo "<table width='100%' cellspacing='1' class='outer'>";
297
-        echo "<tr><th colspan='2'>" . _AM_PUBLISHER_MIME_MODIFYF . "</th></tr>";
297
+        echo "<tr><th colspan='2'>"._AM_PUBLISHER_MIME_MODIFYF."</th></tr>";
298 298
         echo "<tr valign='top'>
299
-        <td class='head'>" . _AM_PUBLISHER_MIME_EXTF . "</td>
299
+        <td class='head'>" . _AM_PUBLISHER_MIME_EXTF."</td>
300 300
         <td class='even'><input type='text' name='mime_ext' id='mime_ext' value='$mime_ext' size='5' /></td>
301 301
         </tr>";
302 302
         echo "<tr valign='top'>
303
-        <td class='head'>" . _AM_PUBLISHER_MIME_NAMEF . "</td>
303
+        <td class='head'>" . _AM_PUBLISHER_MIME_NAMEF."</td>
304 304
         <td class='even'><input type='text' name='mime_name' id='mime_name' value='$mime_name' /></td>
305 305
         </tr>";
306 306
         echo "<tr valign='top'>
307
-        <td class='head'>" . _AM_PUBLISHER_MIME_TYPEF . "</td>
307
+        <td class='head'>" . _AM_PUBLISHER_MIME_TYPEF."</td>
308 308
         <td class='even'><textarea name='mime_types' id='mime_types' cols='60' rows='5'>$mime_types</textarea></td>
309 309
         </tr>";
310 310
         echo "<tr valign='top'>
311
-        <td class='head'>" . _AM_PUBLISHER_MIME_ADMINF . "</td>
311
+        <td class='head'>" . _AM_PUBLISHER_MIME_ADMINF."</td>
312 312
         <td class='even'>
313
-        <input type='radio' name='mime_admin' value='1' " . ($mime_admin == 1 ? "checked='checked'" : '') . " />" . XoopsLocale::YES . "
314
-        <input type='radio' name='mime_admin' value='0' " . ($mime_admin == 0 ? "checked='checked'" : '') . " />" . XoopsLocale::NO . "
313
+        <input type='radio' name='mime_admin' value='1' " . ($mime_admin == 1 ? "checked='checked'" : '')." />".XoopsLocale::YES."
314
+        <input type='radio' name='mime_admin' value='0' " . ($mime_admin == 0 ? "checked='checked'" : '')." />".XoopsLocale::NO."
315 315
         </td>
316 316
         </tr>";
317 317
         echo "<tr valign='top'>
318
-        <td class='head'>" . _AM_PUBLISHER_MIME_USERF . "</td>
318
+        <td class='head'>" . _AM_PUBLISHER_MIME_USERF."</td>
319 319
         <td class='even'>
320
-        <input type='radio' name='mime_user' value='1' " . ($mime_user == 1 ? "checked='checked'" : '') . " />" . XoopsLocale::YES . "
321
-        <input type='radio' name='mime_user' value='0' " . ($mime_user == 0 ? "checked='checked'" : '') . " />" . XoopsLocale::NO . "
320
+        <input type='radio' name='mime_user' value='1' " . ($mime_user == 1 ? "checked='checked'" : '')." />".XoopsLocale::YES."
321
+        <input type='radio' name='mime_user' value='0' " . ($mime_user == 0 ? "checked='checked'" : '')." />".XoopsLocale::NO."
322 322
         </td>
323 323
         </tr>";
324 324
         echo "<tr valign='top'>
325 325
         <td class='head'></td>
326 326
         <td class='even'>
327
-        <input type='submit' name='edit_mime' id='edit_mime' value='" . _AM_PUBLISHER_BUTTON_UPDATE . "' class='formButton' />
328
-        <input type='button' name='cancel' value='" . _AM_PUBLISHER_BUTTON_CANCEL . "' onclick='history.go(-1)' class='formButton' />
327
+        <input type='submit' name='edit_mime' id='edit_mime' value='" . _AM_PUBLISHER_BUTTON_UPDATE."' class='formButton' />
328
+        <input type='button' name='cancel' value='" . _AM_PUBLISHER_BUTTON_CANCEL."' onclick='history.go(-1)' class='formButton' />
329 329
         </td>
330 330
         </tr>";
331 331
         echo "</table></form>";
@@ -368,9 +368,9 @@  discard block
 block discarded – undo
368 368
             $mime['mime_types'] = $_POST['mime_types'];
369 369
             $mime['mime_admin'] = $mime_admin;
370 370
             $mime['mime_user'] = $mime_user;
371
-            $session->set('publisher_editMime_' . $mime_id, $mime);
372
-            $session->set('publisher_editMimeErr_' . $mime_id, $error);
373
-            header('Location: ' . PublisherUtils::makeURI(PUBLISHER_ADMIN_URL . '/mimetypes.php', array('op' => 'edit', 'id' => $mime_id), false));
371
+            $session->set('publisher_editMime_'.$mime_id, $mime);
372
+            $session->set('publisher_editMimeErr_'.$mime_id, $error);
373
+            header('Location: '.PublisherUtils::makeURI(PUBLISHER_ADMIN_URL.'/mimetypes.php', array('op' => 'edit', 'id' => $mime_id), false));
374 374
         }
375 375
 
376 376
         $mimetype->setVar('mime_ext', $_POST['mime_ext']);
@@ -380,10 +380,10 @@  discard block
 block discarded – undo
380 380
         $mimetype->setVar('mime_user', $mime_user);
381 381
 
382 382
         if (!$publisher->getMimetypeHandler()->insert($mimetype, true)) {
383
-            $xoops->redirect(PUBLISHER_ADMIN_URL . "/mimetypes.php?op=edit&id=$mime_id", 3, _AM_PUBLISHER_MESSAGE_EDIT_MIME_ERROR);
383
+            $xoops->redirect(PUBLISHER_ADMIN_URL."/mimetypes.php?op=edit&id=$mime_id", 3, _AM_PUBLISHER_MESSAGE_EDIT_MIME_ERROR);
384 384
         } else {
385 385
             _clearEditSessionVars($mime_id);
386
-            header("Location: " . PUBLISHER_ADMIN_URL . "/mimetypes.php?op=manage&limit=$limit&start=$start");
386
+            header("Location: ".PUBLISHER_ADMIN_URL."/mimetypes.php?op=manage&limit=$limit&start=$start");
387 387
         }
388 388
     }
389 389
 }
@@ -394,30 +394,30 @@  discard block
 block discarded – undo
394 394
     $publisher = Publisher::getInstance();
395 395
 
396 396
     $imagearray = array(
397
-        'editimg' => "<img src='" . $publisher->url("images/button_edit.png") . "' alt='" . _AM_PUBLISHER_ICO_EDIT . "' align='middle' />",
398
-        'deleteimg' => "<img src='" . $publisher->url("images/button_delete.png") . "' alt='" . _AM_PUBLISHER_ICO_DELETE . "' align='middle' />",
399
-        'online' => "<img src='" . $publisher->url("images/on.png") . "' alt='" . _AM_PUBLISHER_ICO_ONLINE . "' align='middle' />",
400
-        'offline' => "<img src='" . $publisher->url("images/off.png") . "' alt='" . _AM_PUBLISHER_ICO_OFFLINE . "' align='middle' />",
397
+        'editimg' => "<img src='".$publisher->url("images/button_edit.png")."' alt='"._AM_PUBLISHER_ICO_EDIT."' align='middle' />",
398
+        'deleteimg' => "<img src='".$publisher->url("images/button_delete.png")."' alt='"._AM_PUBLISHER_ICO_DELETE."' align='middle' />",
399
+        'online' => "<img src='".$publisher->url("images/on.png")."' alt='"._AM_PUBLISHER_ICO_ONLINE."' align='middle' />",
400
+        'offline' => "<img src='".$publisher->url("images/off.png")."' alt='"._AM_PUBLISHER_ICO_OFFLINE."' align='middle' />",
401 401
     );
402 402
     global $start, $limit, $aSortBy, $aOrderBy, $aLimitBy, $aSearchBy;
403 403
 
404 404
     if (isset($_POST['deleteMimes'])) {
405 405
         $aMimes = $_POST['mimes'];
406 406
 
407
-        $crit = new Criteria('mime_id', "(" . implode($aMimes, ',') . ")", "IN");
407
+        $crit = new Criteria('mime_id', "(".implode($aMimes, ',').")", "IN");
408 408
 
409 409
         if ($publisher->getMimetypeHandler()->deleteAll($crit)) {
410
-            header("Location: " . PUBLISHER_ADMIN_URL . "/mimetypes.php?limit=$limit&start=$start");
410
+            header("Location: ".PUBLISHER_ADMIN_URL."/mimetypes.php?limit=$limit&start=$start");
411 411
         } else {
412
-            $xoops->redirect(PUBLISHER_ADMIN_URL . "/mimetypes.php?limit=$limit&start=$start", 3, _AM_PUBLISHER_MESSAGE_DELETE_MIME_ERROR);
412
+            $xoops->redirect(PUBLISHER_ADMIN_URL."/mimetypes.php?limit=$limit&start=$start", 3, _AM_PUBLISHER_MESSAGE_DELETE_MIME_ERROR);
413 413
         }
414 414
     }
415 415
     if (isset($_POST['add_mime'])) {
416
-        header("Location: " . PUBLISHER_ADMIN_URL . "/mimetypes.php?op=add&start=$start&limit=$limit");
416
+        header("Location: ".PUBLISHER_ADMIN_URL."/mimetypes.php?op=add&start=$start&limit=$limit");
417 417
         exit();
418 418
     }
419 419
     if (isset($_POST['mime_search'])) {
420
-        header("Location: " . PUBLISHER_ADMIN_URL . "/mimetypes.php?op=search");
420
+        header("Location: ".PUBLISHER_ADMIN_URL."/mimetypes.php?op=search");
421 421
         exit();
422 422
     }
423 423
 
@@ -445,25 +445,25 @@  discard block
 block discarded – undo
445 445
 
446 446
     echo "<table width='100%' cellspacing='1' class='outer'>";
447 447
     echo "<tr><td colspan='6' align='right'>";
448
-    echo "<form action='" . PUBLISHER_ADMIN_URL . "/mimetypes.php?op=search' style='margin:0; padding:0;' method='post'>";
448
+    echo "<form action='".PUBLISHER_ADMIN_URL."/mimetypes.php?op=search' style='margin:0; padding:0;' method='post'>";
449 449
     echo "<table>";
450 450
     echo "<tr>";
451
-    echo "<td align='right'>" . _AM_PUBLISHER_TEXT_SEARCH_BY . "</td>";
451
+    echo "<td align='right'>"._AM_PUBLISHER_TEXT_SEARCH_BY."</td>";
452 452
     echo "<td align='left'><select name='search_by'>";
453 453
     foreach ($aSearchBy as $value => $text) {
454 454
         ($sort == $value) ? $selected = "selected='selected'" : $selected = '';
455 455
         echo "<option value='$value' $selected>$text</option>";
456 456
     }
457 457
     echo "</select></td>";
458
-    echo "<td align='right'>" . _AM_PUBLISHER_TEXT_SEARCH_TEXT . "</td>";
458
+    echo "<td align='right'>"._AM_PUBLISHER_TEXT_SEARCH_TEXT."</td>";
459 459
     echo "<td align='left'><input type='text' name='search_text' id='search_text' value='' /></td>";
460
-    echo "<td><input type='submit' name='mime_search' id='mime_search' value='" . _AM_PUBLISHER_BUTTON_SEARCH . "' /></td>";
460
+    echo "<td><input type='submit' name='mime_search' id='mime_search' value='"._AM_PUBLISHER_BUTTON_SEARCH."' /></td>";
461 461
     echo "</tr></table></form></td></tr>";
462 462
 
463 463
     echo "<tr><td colspan='6'>";
464
-    echo "<form action='" . PUBLISHER_ADMIN_URL . "/mimetypes.php?op=manage' style='margin:0; padding:0;' method='post'>";
464
+    echo "<form action='".PUBLISHER_ADMIN_URL."/mimetypes.php?op=manage' style='margin:0; padding:0;' method='post'>";
465 465
     echo "<table width='100%'>";
466
-    echo "<tr><td align='right'>" . _AM_PUBLISHER_TEXT_SORT_BY . "
466
+    echo "<tr><td align='right'>"._AM_PUBLISHER_TEXT_SORT_BY."
467 467
     <select name='sort'>";
468 468
     foreach ($aSortBy as $value => $text) {
469 469
         ($sort == $value) ? $selected = "selected='selected'" : $selected = '';
@@ -471,7 +471,7 @@  discard block
 block discarded – undo
471 471
     }
472 472
     echo "</select>
473 473
     &nbsp;&nbsp;&nbsp;
474
-    " . _AM_PUBLISHER_TEXT_ORDER_BY . "
474
+    " . _AM_PUBLISHER_TEXT_ORDER_BY."
475 475
     <select name='order'>";
476 476
     foreach ($aOrderBy as $value => $text) {
477 477
         ($order == $value) ? $selected = "selected='selected'" : $selected = '';
@@ -479,56 +479,56 @@  discard block
 block discarded – undo
479 479
     }
480 480
     echo "</select>
481 481
     &nbsp;&nbsp;&nbsp;
482
-    " . _AM_PUBLISHER_TEXT_NUMBER_PER_PAGE . "
482
+    " . _AM_PUBLISHER_TEXT_NUMBER_PER_PAGE."
483 483
     <select name='limit'>";
484 484
     foreach ($aLimitBy as $value => $text) {
485 485
         ($limit == $value) ? $selected = "selected='selected'" : $selected = '';
486 486
         echo "<option value='$value' $selected>$text</option>";
487 487
     }
488 488
     echo "</select>
489
-    <input type='submit' name='mime_sort' id='mime_sort' value='" . _AM_PUBLISHER_BUTTON_SUBMIT . "' />
489
+    <input type='submit' name='mime_sort' id='mime_sort' value='" . _AM_PUBLISHER_BUTTON_SUBMIT."' />
490 490
     </td>
491 491
     </tr>";
492 492
     echo "</table>";
493 493
     echo "</td></tr>";
494
-    echo "<tr><th colspan='6'>" . _AM_PUBLISHER_MIME_MANAGE_TITLE . "</th></tr>";
494
+    echo "<tr><th colspan='6'>"._AM_PUBLISHER_MIME_MANAGE_TITLE."</th></tr>";
495 495
     echo "<tr class='head'>
496
-    <td>" . _AM_PUBLISHER_MIME_ID . "</td>
497
-    <td>" . _AM_PUBLISHER_MIME_NAME . "</td>
498
-    <td>" . _AM_PUBLISHER_MIME_EXT . "</td>
499
-    <td>" . _AM_PUBLISHER_MIME_ADMIN . "</td>
500
-    <td>" . _AM_PUBLISHER_MIME_USER . "</td>
501
-    <td>" . _AM_PUBLISHER_MINDEX_ACTION . "</td>
496
+    <td>" . _AM_PUBLISHER_MIME_ID."</td>
497
+    <td>" . _AM_PUBLISHER_MIME_NAME."</td>
498
+    <td>" . _AM_PUBLISHER_MIME_EXT."</td>
499
+    <td>" . _AM_PUBLISHER_MIME_ADMIN."</td>
500
+    <td>" . _AM_PUBLISHER_MIME_USER."</td>
501
+    <td>" . _AM_PUBLISHER_MINDEX_ACTION."</td>
502 502
     </tr>";
503 503
     foreach ($mimetypes as $mime) {
504 504
         echo "<tr class='even'>
505
-        <td><input type='checkbox' name='mimes[]' value='" . $mime->getVar('mime_id') . "' />" . $mime->getVar('mime_id') . "</td>
506
-        <td>" . $mime->getVar('mime_name') . "</td>
507
-        <td>" . $mime->getVar('mime_ext') . "</td>
505
+        <td><input type='checkbox' name='mimes[]' value='" . $mime->getVar('mime_id')."' />".$mime->getVar('mime_id')."</td>
506
+        <td>" . $mime->getVar('mime_name')."</td>
507
+        <td>" . $mime->getVar('mime_ext')."</td>
508 508
         <td>
509
-        <a href='" . PUBLISHER_ADMIN_URL . "/mimetypes.php?op=updateMimeValue&amp;id=" . $mime->getVar('mime_id') . "&amp;mime_admin=" . $mime->getVar('mime_admin') . "&amp;limit=" . $limit . "&amp;start=" . $start . "'>
510
-        " . ($mime->getVar('mime_admin') ? $imagearray['online'] : $imagearray['offline']) . "</a>
509
+        <a href='" . PUBLISHER_ADMIN_URL."/mimetypes.php?op=updateMimeValue&amp;id=".$mime->getVar('mime_id')."&amp;mime_admin=".$mime->getVar('mime_admin')."&amp;limit=".$limit."&amp;start=".$start."'>
510
+        " . ($mime->getVar('mime_admin') ? $imagearray['online'] : $imagearray['offline'])."</a>
511 511
         </td>
512 512
         <td>
513
-        <a href='" . PUBLISHER_ADMIN_URL . "/mimetypes.php?op=updateMimeValue&amp;id=" . $mime->getVar('mime_id') . "&amp;mime_user=" . $mime->getVar('mime_user') . "&amp;limit=" . $limit . "&amp;start=" . $start . "'>
514
-        " . ($mime->getVar('mime_user') ? $imagearray['online'] : $imagearray['offline']) . "</a>
513
+        <a href='" . PUBLISHER_ADMIN_URL."/mimetypes.php?op=updateMimeValue&amp;id=".$mime->getVar('mime_id')."&amp;mime_user=".$mime->getVar('mime_user')."&amp;limit=".$limit."&amp;start=".$start."'>
514
+        " . ($mime->getVar('mime_user') ? $imagearray['online'] : $imagearray['offline'])."</a>
515 515
         </td>
516 516
         <td>
517
-        <a href='" . PUBLISHER_ADMIN_URL . "/mimetypes.php?op=edit&amp;id=" . $mime->getVar('mime_id') . "&amp;limit=" . $limit . "&amp;start=" . $start . "'>" . $imagearray['editimg'] . "</a>
518
-        <a href='" . PUBLISHER_ADMIN_URL . "/mimetypes.php?op=delete&amp;id=" . $mime->getVar('mime_id') . "&amp;limit=" . $limit . "&amp;start=" . $start . "'>" . $imagearray['deleteimg'] . "</a>
517
+        <a href='" . PUBLISHER_ADMIN_URL."/mimetypes.php?op=edit&amp;id=".$mime->getVar('mime_id')."&amp;limit=".$limit."&amp;start=".$start."'>".$imagearray['editimg']."</a>
518
+        <a href='" . PUBLISHER_ADMIN_URL."/mimetypes.php?op=delete&amp;id=".$mime->getVar('mime_id')."&amp;limit=".$limit."&amp;start=".$start."'>".$imagearray['deleteimg']."</a>
519 519
         </td>
520 520
         </tr>";
521 521
     }
522 522
     echo "<tr class='foot'>
523 523
     <td colspan='6' valign='top'>
524
-    <a href='http://www.filext.com' style='float: right' target='_blank'>" . _AM_PUBLISHER_MIME_FINDMIMETYPE . "</a>
524
+    <a href='http://www.filext.com' style='float: right' target='_blank'>" . _AM_PUBLISHER_MIME_FINDMIMETYPE."</a>
525 525
     <input type='checkbox' name='checkAllMimes' value='0' onclick='selectAll(this.form,\"mimes[]\",this.checked);' />
526
-    <input type='submit' name='deleteMimes' id='deleteMimes' value='" . _AM_PUBLISHER_BUTTON_DELETE . "' />
527
-    <input type='submit' name='add_mime' id='add_mime' value='" . _AM_PUBLISHER_MIME_CREATEF . "' class='formButton' />
526
+    <input type='submit' name='deleteMimes' id='deleteMimes' value='" . _AM_PUBLISHER_BUTTON_DELETE."' />
527
+    <input type='submit' name='add_mime' id='add_mime' value='" . _AM_PUBLISHER_MIME_CREATEF."' class='formButton' />
528 528
     </td>
529 529
     </tr>";
530 530
     echo "</table>";
531
-    echo "<div id='staff_nav'>" . $nav->renderNav() . "</div>";
531
+    echo "<div id='staff_nav'>".$nav->renderNav()."</div>";
532 532
 
533 533
     PublisherUtils::closeCollapsableBar('mimemanagetable', 'mimemanageicon');
534 534
 
@@ -545,16 +545,16 @@  discard block
 block discarded – undo
545 545
     if (isset($_POST['deleteMimes'])) {
546 546
         $aMimes = $_POST['mimes'];
547 547
 
548
-        $crit = new Criteria('mime_id', "(" . implode($aMimes, ',') . ")", "IN");
548
+        $crit = new Criteria('mime_id', "(".implode($aMimes, ',').")", "IN");
549 549
 
550 550
         if ($publisher->getMimetypeHandler()->deleteAll($crit)) {
551
-            header("Location: " . PUBLISHER_ADMIN_URL . "/mimetypes.php?limit=$limit&start=$start");
551
+            header("Location: ".PUBLISHER_ADMIN_URL."/mimetypes.php?limit=$limit&start=$start");
552 552
         } else {
553
-            $xoops->redirect(PUBLISHER_ADMIN_URL . "/mimetypes.php?limit=$limit&start=$start", 3, _AM_PUBLISHER_MESSAGE_DELETE_MIME_ERROR);
553
+            $xoops->redirect(PUBLISHER_ADMIN_URL."/mimetypes.php?limit=$limit&start=$start", 3, _AM_PUBLISHER_MESSAGE_DELETE_MIME_ERROR);
554 554
         }
555 555
     }
556 556
     if (isset($_POST['add_mime'])) {
557
-        header("Location: " . PUBLISHER_ADMIN_URL . "/mimetypes.php?op=add&start=$start&limit=$limit");
557
+        header("Location: ".PUBLISHER_ADMIN_URL."/mimetypes.php?op=add&start=$start&limit=$limit");
558 558
         exit();
559 559
     }
560 560
     if (isset($_REQUEST['order'])) {
@@ -577,8 +577,8 @@  discard block
 block discarded – undo
577 577
 
578 578
         echo "<form action='mimetypes.php?op=search' method='post'>";
579 579
         echo "<table width='100%' cellspacing='1' class='outer'>";
580
-        echo "<tr><th colspan='2'>" . _AM_PUBLISHER_TEXT_SEARCH_MIME . "</th></tr>";
581
-        echo "<tr><td class='head' width='20%'>" . _AM_PUBLISHER_TEXT_SEARCH_BY . "</td>
580
+        echo "<tr><th colspan='2'>"._AM_PUBLISHER_TEXT_SEARCH_MIME."</th></tr>";
581
+        echo "<tr><td class='head' width='20%'>"._AM_PUBLISHER_TEXT_SEARCH_BY."</td>
582 582
         <td class='even'>
583 583
         <select name='search_by'>";
584 584
         foreach ($aSortBy as $value => $text) {
@@ -587,14 +587,14 @@  discard block
 block discarded – undo
587 587
         echo "</select>
588 588
         </td>
589 589
         </tr>";
590
-        echo "<tr><td class='head'>" . _AM_PUBLISHER_TEXT_SEARCH_TEXT . "</td>
590
+        echo "<tr><td class='head'>"._AM_PUBLISHER_TEXT_SEARCH_TEXT."</td>
591 591
         <td class='even'>
592 592
         <input type='text' name='search_text' id='search_text' value='' />
593 593
         </td>
594 594
         </tr>";
595 595
         echo "<tr class='foot'>
596 596
         <td colspan='2'>
597
-        <input type='submit' name='mime_search' id='mime_search' value='" . _AM_PUBLISHER_BUTTON_SEARCH . "' />
597
+        <input type='submit' name='mime_search' id='mime_search' value='" . _AM_PUBLISHER_BUTTON_SEARCH."' />
598 598
         </td>
599 599
         </tr>";
600 600
         echo "</table></form>";
@@ -611,29 +611,29 @@  discard block
 block discarded – undo
611 611
         $mimetypes = $publisher->getMimetypeHandler()->getObjects($crit);
612 612
         $nav = new XoopsPageNav($mime_count, $limit, $start, 'start', "op=search&amp;limit=$limit&amp;order=$order&amp;sort=$sort&amp;mime_search=1&amp;search_by=$search_field&amp;search_text=$search_text");
613 613
         // Display results
614
-        echo '<script type="text/javascript" src="' . PUBLISHER_URL . '/include/functions.js"></script>';
614
+        echo '<script type="text/javascript" src="'.PUBLISHER_URL.'/include/functions.js"></script>';
615 615
 
616 616
         echo "<table width='100%' cellspacing='1' class='outer'>";
617 617
         echo "<tr><td colspan='6' align='right'>";
618
-        echo "<form action='" . PUBLISHER_ADMIN_URL . "/mimetypes.php?op=search' style='margin:0; padding:0;' method='post'>";
618
+        echo "<form action='".PUBLISHER_ADMIN_URL."/mimetypes.php?op=search' style='margin:0; padding:0;' method='post'>";
619 619
         echo "<table>";
620 620
         echo "<tr>";
621
-        echo "<td align='right'>" . _AM_PUBLISHER_TEXT_SEARCH_BY . "</td>";
621
+        echo "<td align='right'>"._AM_PUBLISHER_TEXT_SEARCH_BY."</td>";
622 622
         echo "<td align='left'><select name='search_by'>";
623 623
         foreach ($aSearchBy as $value => $text) {
624 624
             ($search_field == $value) ? $selected = "selected='selected'" : $selected = '';
625 625
             echo "<option value='$value' $selected>$text</option>";
626 626
         }
627 627
         echo "</select></td>";
628
-        echo "<td align='right'>" . _AM_PUBLISHER_TEXT_SEARCH_TEXT . "</td>";
628
+        echo "<td align='right'>"._AM_PUBLISHER_TEXT_SEARCH_TEXT."</td>";
629 629
         echo "<td align='left'><input type='text' name='search_text' id='search_text' value='$search_text' /></td>";
630
-        echo "<td><input type='submit' name='mime_search' id='mime_search' value='" . _AM_PUBLISHER_BUTTON_SEARCH . "' /></td>";
630
+        echo "<td><input type='submit' name='mime_search' id='mime_search' value='"._AM_PUBLISHER_BUTTON_SEARCH."' /></td>";
631 631
         echo "</tr></table></form></td></tr>";
632 632
 
633 633
         echo "<tr><td colspan='6'>";
634
-        echo "<form action='" . PUBLISHER_ADMIN_URL . "/mimetypes.php?op=search' style='margin:0; padding:0;' method='post'>";
634
+        echo "<form action='".PUBLISHER_ADMIN_URL."/mimetypes.php?op=search' style='margin:0; padding:0;' method='post'>";
635 635
         echo "<table width='100%'>";
636
-        echo "<tr><td align='right'>" . _AM_PUBLISHER_TEXT_SORT_BY . "
636
+        echo "<tr><td align='right'>"._AM_PUBLISHER_TEXT_SORT_BY."
637 637
         <select name='sort'>";
638 638
         foreach ($aSortBy as $value => $text) {
639 639
             ($sort == $value) ? $selected = "selected='selected'" : $selected = '';
@@ -641,7 +641,7 @@  discard block
 block discarded – undo
641 641
         }
642 642
         echo "</select>
643 643
         &nbsp;&nbsp;&nbsp;
644
-        " . _AM_PUBLISHER_TEXT_ORDER_BY . "
644
+        " . _AM_PUBLISHER_TEXT_ORDER_BY."
645 645
         <select name='order'>";
646 646
         foreach ($aOrderBy as $value => $text) {
647 647
             ($order == $value) ? $selected = "selected='selected'" : $selected = '';
@@ -649,14 +649,14 @@  discard block
 block discarded – undo
649 649
         }
650 650
         echo "</select>
651 651
         &nbsp;&nbsp;&nbsp;
652
-        " . _AM_PUBLISHER_TEXT_NUMBER_PER_PAGE . "
652
+        " . _AM_PUBLISHER_TEXT_NUMBER_PER_PAGE."
653 653
         <select name='limit'>";
654 654
         foreach ($aLimitBy as $value => $text) {
655 655
             ($limit == $value) ? $selected = "selected='selected'" : $selected = '';
656 656
             echo "<option value='$value' $selected>$text</option>";
657 657
         }
658 658
         echo "</select>
659
-        <input type='submit' name='mime_sort' id='mime_sort' value='" . _AM_PUBLISHER_BUTTON_SUBMIT . "' />
659
+        <input type='submit' name='mime_sort' id='mime_sort' value='" . _AM_PUBLISHER_BUTTON_SUBMIT."' />
660 660
         <input type='hidden' name='mime_search' id='mime_search' value='1' />
661 661
         <input type='hidden' name='search_by' id='search_by' value='$search_field' />
662 662
         <input type='hidden' name='search_text' id='search_text' value='$search_text' />
@@ -665,50 +665,50 @@  discard block
 block discarded – undo
665 665
         echo "</table>";
666 666
         echo "</td></tr>";
667 667
         if (count($mimetypes) > 0) {
668
-            echo "<tr><th colspan='6'>" . _AM_PUBLISHER_TEXT_SEARCH_MIME . "</th></tr>";
668
+            echo "<tr><th colspan='6'>"._AM_PUBLISHER_TEXT_SEARCH_MIME."</th></tr>";
669 669
             echo "<tr class='head'>
670
-            <td>" . _AM_PUBLISHER_MIME_ID . "</td>
671
-            <td>" . _AM_PUBLISHER_MIME_NAME . "</td>
672
-            <td>" . _AM_PUBLISHER_MIME_EXT . "</td>
673
-            <td>" . _AM_PUBLISHER_MIME_ADMIN . "</td>
674
-            <td>" . _AM_PUBLISHER_MIME_USER . "</td>
675
-            <td>" . _AM_PUBLISHER_MINDEX_ACTION . "</td>
670
+            <td>" . _AM_PUBLISHER_MIME_ID."</td>
671
+            <td>" . _AM_PUBLISHER_MIME_NAME."</td>
672
+            <td>" . _AM_PUBLISHER_MIME_EXT."</td>
673
+            <td>" . _AM_PUBLISHER_MIME_ADMIN."</td>
674
+            <td>" . _AM_PUBLISHER_MIME_USER."</td>
675
+            <td>" . _AM_PUBLISHER_MINDEX_ACTION."</td>
676 676
             </tr>";
677 677
             foreach ($mimetypes as $mime) {
678 678
                 echo "<tr class='even'>
679
-                <td><input type='checkbox' name='mimes[]' value='" . $mime->getVar('mime_id') . "' />" . $mime->getVar('mime_id') . "</td>
680
-                <td>" . $mime->getVar('mime_name') . "</td>
681
-                <td>" . $mime->getVar('mime_ext') . "</td>
679
+                <td><input type='checkbox' name='mimes[]' value='" . $mime->getVar('mime_id')."' />".$mime->getVar('mime_id')."</td>
680
+                <td>" . $mime->getVar('mime_name')."</td>
681
+                <td>" . $mime->getVar('mime_ext')."</td>
682 682
                 <td>
683
-                <a href='" . PUBLISHER_ADMIN_URL . "/mimetypes.php?op=updateMimeValue&amp;id=" . $mime->getVar('mime_id') . "&amp;mime_admin=" . $mime->getVar('mime_admin') . "&amp;limit=" . $limit . "&amp;start=" . $start . "'>
684
-                " . ($mime->getVar('mime_admin') ? $imagearray['online'] : $imagearray['offline']) . "</a>
683
+                <a href='" . PUBLISHER_ADMIN_URL."/mimetypes.php?op=updateMimeValue&amp;id=".$mime->getVar('mime_id')."&amp;mime_admin=".$mime->getVar('mime_admin')."&amp;limit=".$limit."&amp;start=".$start."'>
684
+                " . ($mime->getVar('mime_admin') ? $imagearray['online'] : $imagearray['offline'])."</a>
685 685
                 </td>
686 686
                 <td>
687
-                <a href='" . PUBLISHER_ADMIN_URL . "/mimetypes.php?op=updateMimeValue&amp;id=" . $mime->getVar('mime_id') . "&amp;mime_user=" . $mime->getVar('mime_user') . "&amp;limit=" . $limit . "&amp;start=" . $start . "'>
688
-                " . ($mime->getVar('mime_user') ? $imagearray['online'] : $imagearray['offline']) . "</a>
687
+                <a href='" . PUBLISHER_ADMIN_URL."/mimetypes.php?op=updateMimeValue&amp;id=".$mime->getVar('mime_id')."&amp;mime_user=".$mime->getVar('mime_user')."&amp;limit=".$limit."&amp;start=".$start."'>
688
+                " . ($mime->getVar('mime_user') ? $imagearray['online'] : $imagearray['offline'])."</a>
689 689
                 </td>
690 690
                 <td>
691
-                <a href='" . PUBLISHER_ADMIN_URL . "/mimetypes.php?op=edit&amp;id=" . $mime->getVar('mime_id') . "&amp;limit=" . $limit . "&amp;start=" . $start . "'>" . $imagearray['editimg'] . "</a>
692
-                <a href='" . PUBLISHER_ADMIN_URL . "/mimetypes.php?op=delete&amp;id=" . $mime->getVar('mime_id') . "&amp;limit=" . $limit . "&amp;start=" . $start . "'>" . $imagearray['deleteimg'] . "</a>
691
+                <a href='" . PUBLISHER_ADMIN_URL."/mimetypes.php?op=edit&amp;id=".$mime->getVar('mime_id')."&amp;limit=".$limit."&amp;start=".$start."'>".$imagearray['editimg']."</a>
692
+                <a href='" . PUBLISHER_ADMIN_URL."/mimetypes.php?op=delete&amp;id=".$mime->getVar('mime_id')."&amp;limit=".$limit."&amp;start=".$start."'>".$imagearray['deleteimg']."</a>
693 693
                 </td>
694 694
                 </tr>";
695 695
             }
696 696
             echo "<tr class='foot'>
697 697
             <td colspan='6' valign='top'>
698
-            <a href='http://www.filext.com' style='float: right' target='_blank'>" . _AM_PUBLISHER_MIME_FINDMIMETYPE . "</a>
698
+            <a href='http://www.filext.com' style='float: right' target='_blank'>" . _AM_PUBLISHER_MIME_FINDMIMETYPE."</a>
699 699
             <input type='checkbox' name='checkAllMimes' value='0' onclick='selectAll(this.form,\"mimes[]\",this.checked);' />
700
-            <input type='submit' name='deleteMimes' id='deleteMimes' value='" . _AM_PUBLISHER_BUTTON_DELETE . "' />
701
-            <input type='submit' name='add_mime' id='add_mime' value='" . _AM_PUBLISHER_MIME_CREATEF . "' class='formButton' />
700
+            <input type='submit' name='deleteMimes' id='deleteMimes' value='" . _AM_PUBLISHER_BUTTON_DELETE."' />
701
+            <input type='submit' name='add_mime' id='add_mime' value='" . _AM_PUBLISHER_MIME_CREATEF."' class='formButton' />
702 702
             </td>
703 703
             </tr>";
704 704
         } else {
705
-            echo "<tr><th>" . _AM_PUBLISHER_TEXT_SEARCH_MIME . "</th></tr>";
705
+            echo "<tr><th>"._AM_PUBLISHER_TEXT_SEARCH_MIME."</th></tr>";
706 706
             echo "<tr class='even'>
707
-            <td>" . _AM_PUBLISHER_TEXT_NO_RECORDS . "</td>
707
+            <td>" . _AM_PUBLISHER_TEXT_NO_RECORDS."</td>
708 708
             </tr>";
709 709
         }
710 710
         echo "</table>";
711
-        echo "<div id='pagenav'>" . $nav->renderNav() . "</div>";
711
+        echo "<div id='pagenav'>".$nav->renderNav()."</div>";
712 712
     }
713 713
     PublisherUtils::closeCollapsableBar('mimesearchtable', 'mimesearchicon');
714 714
     $xoops->footer();
@@ -728,7 +728,7 @@  discard block
 block discarded – undo
728 728
     }
729 729
 
730 730
     if (!isset($_REQUEST['id'])) {
731
-        $xoops->redirect(PUBLISHER_ADMIN_URL . "/mimetypes.php", 3, _AM_PUBLISHER_MESSAGE_NO_ID);
731
+        $xoops->redirect(PUBLISHER_ADMIN_URL."/mimetypes.php", 3, _AM_PUBLISHER_MESSAGE_NO_ID);
732 732
     }
733 733
     $mime_id = (int)($_REQUEST['id']);
734 734
 
@@ -745,9 +745,9 @@  discard block
 block discarded – undo
745 745
         $mimetype->setVar('mime_user', $mime_user);
746 746
     }
747 747
     if ($publisher->getMimetypeHandler()->insert($mimetype, true)) {
748
-        header("Location: " . PUBLISHER_ADMIN_URL . "/mimetypes.php?limit=$limit&start=$start");
748
+        header("Location: ".PUBLISHER_ADMIN_URL."/mimetypes.php?limit=$limit&start=$start");
749 749
     } else {
750
-        $xoops->redirect(PUBLISHER_ADMIN_URL . "/mimetypes.php?limit=$limit&start=$start", 3);
750
+        $xoops->redirect(PUBLISHER_ADMIN_URL."/mimetypes.php?limit=$limit&start=$start", 3);
751 751
     }
752 752
 }
753 753
 
@@ -771,7 +771,7 @@  discard block
 block discarded – undo
771 771
 function clearAddSession()
772 772
 {
773 773
     _clearAddSessionVars();
774
-    header('Location: ' . PublisherUtils::makeURI(PUBLISHER_ADMIN_URL . '/mimetypes.php', array('op' => 'add'), false));
774
+    header('Location: '.PublisherUtils::makeURI(PUBLISHER_ADMIN_URL.'/mimetypes.php', array('op' => 'add'), false));
775 775
 }
776 776
 
777 777
 function _clearEditSessionVars($id)
@@ -786,5 +786,5 @@  discard block
 block discarded – undo
786 786
 {
787 787
     $mimeid = $_REQUEST['id'];
788 788
     _clearEditSessionVars($mimeid);
789
-    header('Location: ' . PublisherUtils::makeURI(PUBLISHER_ADMIN_URL . '/mimetypes.php', array('op' => 'edit', 'id' => $mimeid), false));
789
+    header('Location: '.PublisherUtils::makeURI(PUBLISHER_ADMIN_URL.'/mimetypes.php', array('op' => 'edit', 'id' => $mimeid), false));
790 790
 }
Please login to merge, or discard this patch.
htdocs/modules/publisher/admin/index.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
  * @version      $Id$
21 21
  */
22 22
 
23
-include_once __DIR__ . '/admin_header.php';
23
+include_once __DIR__.'/admin_header.php';
24 24
 
25 25
 $xoops = Xoops::getInstance();
26 26
 $xoops->header();
Please login to merge, or discard this patch.
htdocs/modules/publisher/admin/clone.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
  * @version         $Id$
19 19
  */
20 20
 
21
-include_once __DIR__ . "/admin_header.php";
21
+include_once __DIR__."/admin_header.php";
22 22
 
23 23
 $xoops = Xoops::getInstance();
24 24
 PublisherUtils::cpHeader();
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
     }
41 41
 
42 42
     // Check wether the cloned module exists or not
43
-    if ($clone && is_dir(\XoopsBaseConfig::get('root-path') . '/modules/' . $clone)) {
43
+    if ($clone && is_dir(\XoopsBaseConfig::get('root-path').'/modules/'.$clone)) {
44 44
         $xoops->redirect('clone.php', 3, sprintf(_AM_PUBLISHER_CLONE_EXISTS, $clone));
45 45
     }
46 46
 
@@ -56,8 +56,8 @@  discard block
 block discarded – undo
56 56
     $logocreated = publisher_createLogo(strtolower($clone));
57 57
 
58 58
     $msg = "";
59
-    if (is_dir(\XoopsBaseConfig::get('root-path') . '/modules/' . strtolower($clone))) {
60
-        $msg .= sprintf(_AM_PUBLISHER_CLONE_CONGRAT, "<a href='" . \XoopsBaseConfig::get('url') . "/modules/system/admin.php?fct=modulesadmin'>" . ucfirst(strtolower($clone)) . "</a>") . "<br />\n";
59
+    if (is_dir(\XoopsBaseConfig::get('root-path').'/modules/'.strtolower($clone))) {
60
+        $msg .= sprintf(_AM_PUBLISHER_CLONE_CONGRAT, "<a href='".\XoopsBaseConfig::get('url')."/modules/system/admin.php?fct=modulesadmin'>".ucfirst(strtolower($clone))."</a>")."<br />\n";
61 61
         if (!$logocreated) {
62 62
             $msg .= _AM_PUBLISHER_CLONE_IMAGEFAIL;
63 63
         }
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
         }
140 140
     }
141 141
 
142
-    if (!XoopsLoad::fileExists($imageBase = \XoopsBaseConfig::get('root-path') . "/modules/" . $dirname . "/images/module_logo.png") || !XoopsLoad::fileExists($font = \XoopsBaseConfig::get('root-path') . "/modules/" . $dirname . "/images/VeraBd.ttf")) {
142
+    if (!XoopsLoad::fileExists($imageBase = \XoopsBaseConfig::get('root-path')."/modules/".$dirname."/images/module_logo.png") || !XoopsLoad::fileExists($font = \XoopsBaseConfig::get('root-path')."/modules/".$dirname."/images/VeraBd.ttf")) {
143 143
         return false;
144 144
     }
145 145
 
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
     $white = imagecolorallocatealpha($imageModule, 255, 255, 255, 127);
159 159
     imagefill($imageModule, 0, 0, $white);
160 160
     imagecolortransparent($imageModule, $white);
161
-    imagepng($imageModule, \XoopsBaseConfig::get('root-path') . "/modules/" . $dirname . "/images/module_logo.png");
161
+    imagepng($imageModule, \XoopsBaseConfig::get('root-path')."/modules/".$dirname."/images/module_logo.png");
162 162
     imagedestroy($imageModule);
163 163
     return true;
164 164
 }
Please login to merge, or discard this patch.
htdocs/modules/publisher/file.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
  * @version         $Id$
22 22
  */
23 23
 
24
-include_once __DIR__ . '/header.php';
24
+include_once __DIR__.'/header.php';
25 25
 $xoops = Xoops::getInstance();
26 26
 $publisher = Publisher::getInstance();
27 27
 $publisher->loadLanguage('admin');
@@ -92,9 +92,9 @@  discard block
 block discarded – undo
92 92
         }
93 93
 
94 94
         if (!$publisher->getFileHandler()->insert($fileObj)) {
95
-            $xoops->redirect('item.php?itemid=' . $fileObj->getVar('itemid'), 3, _AM_PUBLISHER_FILE_EDITING_ERROR . PublisherUtils::formatErrors($fileObj->getErrors()));
95
+            $xoops->redirect('item.php?itemid='.$fileObj->getVar('itemid'), 3, _AM_PUBLISHER_FILE_EDITING_ERROR.PublisherUtils::formatErrors($fileObj->getErrors()));
96 96
         }
97
-        $xoops->redirect('item.php?itemid=' . $fileObj->getVar('itemid'), 2, _AM_PUBLISHER_FILE_EDITING_SUCCESS);
97
+        $xoops->redirect('item.php?itemid='.$fileObj->getVar('itemid'), 2, _AM_PUBLISHER_FILE_EDITING_SUCCESS);
98 98
         break;
99 99
 
100 100
     case "del":
@@ -102,16 +102,16 @@  discard block
 block discarded – undo
102 102
 
103 103
         if ($confirm) {
104 104
             if (!$publisher->getFileHandler()->delete($fileObj)) {
105
-                $xoops->redirect('item.php?itemid=' . $fileObj->getVar('itemid'), 2, _AM_PUBLISHER_FILE_DELETE_ERROR);
105
+                $xoops->redirect('item.php?itemid='.$fileObj->getVar('itemid'), 2, _AM_PUBLISHER_FILE_DELETE_ERROR);
106 106
             }
107
-            $xoops->redirect('item.php?itemid=' . $fileObj->getVar('itemid'), 2, sprintf(_AM_PUBLISHER_FILEISDELETED, $fileObj->getVar('name')));
107
+            $xoops->redirect('item.php?itemid='.$fileObj->getVar('itemid'), 2, sprintf(_AM_PUBLISHER_FILEISDELETED, $fileObj->getVar('name')));
108 108
         } else {
109 109
             // no confirm: show deletion condition
110 110
             $xoops->header();
111 111
             echo $xoops->confirm(array(
112 112
                 'op' => 'del', 'fileid' => $fileObj->getVar('fileid'), 'confirm' => 1,
113 113
                 'name' => $fileObj->getVar('name')
114
-            ), 'file.php', _AM_PUBLISHER_DELETETHISFILE . " <br />" . $fileObj->getVar('name') . " <br /> <br />", _AM_PUBLISHER_DELETE);
114
+            ), 'file.php', _AM_PUBLISHER_DELETETHISFILE." <br />".$fileObj->getVar('name')." <br /> <br />", _AM_PUBLISHER_DELETE);
115 115
             $xoops->footer();
116 116
         }
117 117
         break;
Please login to merge, or discard this patch.
htdocs/modules/publisher/author_items.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
  * @version         $Id$
21 21
  */
22 22
 
23
-include_once __DIR__ . '/header.php';
23
+include_once __DIR__.'/header.php';
24 24
 
25 25
 $xoops = Xoops::getInstance();
26 26
 $uid = Request::getInt('uid');
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
 
87 87
 $xoopsTpl->assign('categories', $categories);
88 88
 
89
-$title = _MD_PUBLISHER_ITEMS_SAME_AUTHOR . ' - ' . $author_name;
89
+$title = _MD_PUBLISHER_ITEMS_SAME_AUTHOR.' - '.$author_name;
90 90
 
91 91
 /**
92 92
  * Generating meta information for this page
Please login to merge, or discard this patch.
htdocs/modules/publisher/list.tag.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,5 +19,5 @@
 block discarded – undo
19 19
  */
20 20
 
21 21
 // todo: Check this file
22
-include __DIR__ . '/header.php';
23
-include \XoopsBaseConfig::get('root-path') . '/modules/tag/list.tag.php';
22
+include __DIR__.'/header.php';
23
+include \XoopsBaseConfig::get('root-path').'/modules/tag/list.tag.php';
Please login to merge, or discard this patch.
htdocs/modules/publisher/view.tag.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,5 +19,5 @@
 block discarded – undo
19 19
  */
20 20
 
21 21
 //todo: check this file
22
-include_once __DIR__ . '/header.php';
23
-include_once \XoopsBaseConfig::get('root-path') . '/modules/tag/view.tag.php';
22
+include_once __DIR__.'/header.php';
23
+include_once \XoopsBaseConfig::get('root-path').'/modules/tag/view.tag.php';
Please login to merge, or discard this patch.
htdocs/modules/publisher/xoops_version.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
  */
21 21
 
22 22
 $xoops = Xoops::getInstance();
23
-XoopsLoad::loadFile($xoops->path(__DIR__ . '/include/constants.php'));
23
+XoopsLoad::loadFile($xoops->path(__DIR__.'/include/constants.php'));
24 24
 
25 25
 $modversion['name']        = _MI_PUBLISHER_MD_NAME;
26 26
 $modversion['description'] = _MI_PUBLISHER_MD_DESC;
@@ -34,9 +34,9 @@  discard block
 block discarded – undo
34 34
 $modversion['official']    = 0;
35 35
 $modversion['dirname']     = basename(__DIR__);
36 36
 
37
-$logo_filename = $modversion['dirname'] . '_logo.png';
37
+$logo_filename = $modversion['dirname'].'_logo.png';
38 38
 
39
-if (XoopsLoad::fileExists(__DIR__ . '/images/' . $logo_filename)) {
39
+if (XoopsLoad::fileExists(__DIR__.'/images/'.$logo_filename)) {
40 40
     $modversion['image'] = "images/{$logo_filename}";
41 41
 } else {
42 42
     $modversion['image'] = "images/module_logo.png";
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
     'description' => _MI_PUBLISHER_DATE_TO_DATE_DSC,
160 160
     'show_func'   => "publisher_date_to_date_show",
161 161
     'edit_func'   => "publisher_date_to_date_edit",
162
-    'options'     => XoopsLocale::formatTimestamp(time(), 'm/j/Y') . "|" . XoopsLocale::formatTimestamp(time(), 'm/j/Y'),
162
+    'options'     => XoopsLocale::formatTimestamp(time(), 'm/j/Y')."|".XoopsLocale::formatTimestamp(time(), 'm/j/Y'),
163 163
     'template'    => "publisher_date_to_date.tpl",
164 164
 );
165 165
 
@@ -655,7 +655,7 @@  discard block
 block discarded – undo
655 655
     'description' => '_MI_PUBLISHER_PRINTLOGOURLDSC',
656 656
     'formtype'    => 'textbox',
657 657
     'valuetype'   => 'text',
658
-    'default'     => \XoopsBaseConfig::get('url') . '/images/logo.gif',
658
+    'default'     => \XoopsBaseConfig::get('url').'/images/logo.gif',
659 659
     'category'    => 'print',
660 660
 );
661 661
 
Please login to merge, or discard this patch.
htdocs/modules/publisher/archive.php 2 patches
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -162,17 +162,17 @@
 block discarded – undo
162 162
             $story = array();
163 163
             $htmltitle = '';
164 164
             $story['title'] = "<a href='" . \XoopsBaseConfig::get('url') . '/modules/publisher/category.php?categoryid='
165
-                              . $item->getVar('categoryid') . "'>"
166
-                              . $item->getCategoryName() . "</a>: <a href='"
167
-                              . $item->getItemUrl() . "'" . $htmltitle . ">"
168
-                              . $item->title() . "</a>";
165
+                                . $item->getVar('categoryid') . "'>"
166
+                                . $item->getCategoryName() . "</a>: <a href='"
167
+                                . $item->getItemUrl() . "'" . $htmltitle . ">"
168
+                                . $item->title() . "</a>";
169 169
             $story['counter'] = $item->getVar('counter');
170 170
             $story['date'] = $item->datesub();
171 171
             $story['print_link'] = \XoopsBaseConfig::get('url') . '/modules/publisher/print.php?itemid=' . $item->getVar('itemid');
172 172
             $story['mail_link'] = 'mailto:?subject='
173
-                                  . sprintf(_CO_PUBLISHER_INTITEM, $xoops->getConfig('sitename'))
174
-                                  . '&amp;body=' . sprintf(_CO_PUBLISHER_INTITEMFOUND, $xoops->getConfig('sitename'))
175
-                                  . ':  ' . $item->getItemUrl();
173
+                                    . sprintf(_CO_PUBLISHER_INTITEM, $xoops->getConfig('sitename'))
174
+                                    . '&amp;body=' . sprintf(_CO_PUBLISHER_INTITEMFOUND, $xoops->getConfig('sitename'))
175
+                                    . ':  ' . $item->getItemUrl();
176 176
 
177 177
             $xoopsTpl->append('stories', $story);
178 178
         }
Please login to merge, or discard this patch.
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 // # [11-may-2001] Kenneth Lee - http://www.nexgear.com/
30 30
 // ######################################################################
31 31
 
32
-include_once __DIR__ . '/header.php';
32
+include_once __DIR__.'/header.php';
33 33
 
34 34
 $xoops = Xoops::getInstance();
35 35
 $publisher = Publisher::getInstance();
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
 }
58 58
 
59 59
 $myts = \Xoops\Core\Text\Sanitizer::getInstance();
60
-$xoopsTpl->assign('xoops_pagetitle', $myts->htmlSpecialChars(_MD_PUBLISHER_ARCHIVES) . $pgtitle . ' - ' . $myts->htmlSpecialChars($xoopsModule->getVar('name')));
60
+$xoopsTpl->assign('xoops_pagetitle', $myts->htmlSpecialChars(_MD_PUBLISHER_ARCHIVES).$pgtitle.' - '.$myts->htmlSpecialChars($xoopsModule->getVar('name')));
61 61
 
62 62
 $useroffset = '';
63 63
 if ($xoops->isUser()) {
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
     $itemhandler->field_object = 'categoryid';
143 143
     // Categories for which user has access
144 144
     $categoriesGranted = $publisher->getPermissionHandler()->getGrantedItems('category_read');
145
-    $grantedCategories = new Criteria('l.categoryid', "(" . implode(',', $categoriesGranted) . ")", 'IN');
145
+    $grantedCategories = new Criteria('l.categoryid', "(".implode(',', $categoriesGranted).")", 'IN');
146 146
     $criteria = new CriteriaCompo();
147 147
     $criteria->add($grantedCategories, 'AND');
148 148
     $criteria->add(new Criteria('o.status', 2), 'AND');
@@ -161,25 +161,25 @@  discard block
 block discarded – undo
161 161
         foreach ($storyarray as $item) {
162 162
             $story = array();
163 163
             $htmltitle = '';
164
-            $story['title'] = "<a href='" . \XoopsBaseConfig::get('url') . '/modules/publisher/category.php?categoryid='
165
-                              . $item->getVar('categoryid') . "'>"
166
-                              . $item->getCategoryName() . "</a>: <a href='"
167
-                              . $item->getItemUrl() . "'" . $htmltitle . ">"
168
-                              . $item->title() . "</a>";
164
+            $story['title'] = "<a href='".\XoopsBaseConfig::get('url').'/modules/publisher/category.php?categoryid='
165
+                              . $item->getVar('categoryid')."'>"
166
+                              . $item->getCategoryName()."</a>: <a href='"
167
+                              . $item->getItemUrl()."'".$htmltitle.">"
168
+                              . $item->title()."</a>";
169 169
             $story['counter'] = $item->getVar('counter');
170 170
             $story['date'] = $item->datesub();
171
-            $story['print_link'] = \XoopsBaseConfig::get('url') . '/modules/publisher/print.php?itemid=' . $item->getVar('itemid');
171
+            $story['print_link'] = \XoopsBaseConfig::get('url').'/modules/publisher/print.php?itemid='.$item->getVar('itemid');
172 172
             $story['mail_link'] = 'mailto:?subject='
173 173
                                   . sprintf(_CO_PUBLISHER_INTITEM, $xoops->getConfig('sitename'))
174
-                                  . '&amp;body=' . sprintf(_CO_PUBLISHER_INTITEMFOUND, $xoops->getConfig('sitename'))
175
-                                  . ':  ' . $item->getItemUrl();
174
+                                  . '&amp;body='.sprintf(_CO_PUBLISHER_INTITEMFOUND, $xoops->getConfig('sitename'))
175
+                                  . ':  '.$item->getItemUrl();
176 176
 
177 177
             $xoopsTpl->append('stories', $story);
178 178
         }
179 179
     }
180 180
     $xoopsTpl->assign('lang_printer', _MD_PUBLISHER_PRINTERFRIENDLY);
181 181
     $xoopsTpl->assign('lang_sendstory', _MD_PUBLISHER_SENDSTORY);
182
-    $xoopsTpl->assign('lang_storytotal', _MD_PUBLISHER_TOTAL_ITEMS . ' ' . $count);
182
+    $xoopsTpl->assign('lang_storytotal', _MD_PUBLISHER_TOTAL_ITEMS.' '.$count);
183 183
 } else {
184 184
     $xoopsTpl->assign('show_articles', false);
185 185
 }
Please login to merge, or discard this patch.