Passed
Pull Request — master (#583)
by Michael
14:01
created
htdocs/modules/publisher/class/form/item.php 1 patch
Spacing   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
 use Xoops\Form\Tab;
16 16
 use Xoops\Form\TabTray;
17 17
 
18
-include_once dirname(dirname(__DIR__)) . '/include/common.php';
18
+include_once dirname(dirname(__DIR__)).'/include/common.php';
19 19
 
20 20
 $publisher = Publisher::getInstance();
21 21
 
@@ -398,36 +398,36 @@  discard block
 block discarded – undo
398 398
                     $table .= "<tr>";
399 399
                     $table .= "<td width='50' class='bg3' align='center'><strong>ID</strong></td>";
400 400
                     $table .= "<td width='150' class='bg3' align='left'><strong>"
401
-                        . _AM_PUBLISHER_FILENAME . "</strong></td>";
401
+                        . _AM_PUBLISHER_FILENAME."</strong></td>";
402 402
                     $table .= "<td class='bg3' align='left'><strong>"
403
-                        . _AM_PUBLISHER_DESCRIPTION . "</strong></td>";
403
+                        . _AM_PUBLISHER_DESCRIPTION."</strong></td>";
404 404
                     $table .= "<td width='60' class='bg3' align='center'><strong>"
405
-                        . _AM_PUBLISHER_HITS . "</strong></td>";
405
+                        . _AM_PUBLISHER_HITS."</strong></td>";
406 406
                     $table .= "<td width='100' class='bg3' align='center'><strong>"
407
-                        . _AM_PUBLISHER_UPLOADED_DATE . "</strong></td>";
407
+                        . _AM_PUBLISHER_UPLOADED_DATE."</strong></td>";
408 408
                     $table .= "<td width='60' class='bg3' align='center'><strong>"
409
-                        . _AM_PUBLISHER_ACTION . "</strong></td>";
409
+                        . _AM_PUBLISHER_ACTION."</strong></td>";
410 410
                     $table .= "</tr>";
411 411
 
412 412
                     /* @var $fileObj PublisherFile */
413 413
                     foreach ($filesObj as $fileObj) {
414
-                        $modify = "<a href='file.php?op=mod&fileid=" . $fileObj->getVar('fileid')
415
-                            . "'><img src='" . PUBLISHER_URL . "/images/links/edit.gif' title='"
416
-                            . _CO_PUBLISHER_EDITFILE . "' alt='" . _CO_PUBLISHER_EDITFILE . "' /></a>";
417
-                        $delete = "<a href='file.php?op=del&fileid=" . $fileObj->getVar('fileid')
418
-                            . "'><img src='" . PUBLISHER_URL . "/images/links/delete.png' title='"
419
-                            . _CO_PUBLISHER_DELETEFILE . "' alt='" . _CO_PUBLISHER_DELETEFILE . "'/></a>";
414
+                        $modify = "<a href='file.php?op=mod&fileid=".$fileObj->getVar('fileid')
415
+                            . "'><img src='".PUBLISHER_URL."/images/links/edit.gif' title='"
416
+                            . _CO_PUBLISHER_EDITFILE."' alt='"._CO_PUBLISHER_EDITFILE."' /></a>";
417
+                        $delete = "<a href='file.php?op=del&fileid=".$fileObj->getVar('fileid')
418
+                            . "'><img src='".PUBLISHER_URL."/images/links/delete.png' title='"
419
+                            . _CO_PUBLISHER_DELETEFILE."' alt='"._CO_PUBLISHER_DELETEFILE."'/></a>";
420 420
                         if ($fileObj->getVar('status') == 0) {
421
-                            $notVisible = "<img src='" . PUBLISHER_URL . "/images/no.gif'/>";
421
+                            $notVisible = "<img src='".PUBLISHER_URL."/images/no.gif'/>";
422 422
                         } else {
423 423
                             $notVisible = '';
424 424
                         }
425 425
                         $table .= "<tr>";
426
-                        $table .= "<td class='head' align='center'>" . $fileObj->getVar('fileid') . "</td>";
427
-                        $table .= "<td class='odd' align='left'>" . $notVisible . $fileObj->getFileLink() . "</td>";
428
-                        $table .= "<td class='even' align='left'>" . $fileObj->getVar('description') . "</td>";
429
-                        $table .= "<td class='even' align='center'>" . $fileObj->getVar('counter') . "";
430
-                        $table .= "<td class='even' align='center'>" . $fileObj->datesub() . "</td>";
426
+                        $table .= "<td class='head' align='center'>".$fileObj->getVar('fileid')."</td>";
427
+                        $table .= "<td class='odd' align='left'>".$notVisible.$fileObj->getFileLink()."</td>";
428
+                        $table .= "<td class='even' align='left'>".$fileObj->getVar('description')."</td>";
429
+                        $table .= "<td class='even' align='center'>".$fileObj->getVar('counter')."";
430
+                        $table .= "<td class='even' align='center'>".$fileObj->datesub()."</td>";
431 431
                         $table .= "<td class='even' align='center'> {$modify} {$delete} </td>";
432 432
                         $table .= "</tr>";
433 433
                     }
@@ -474,7 +474,7 @@  discard block
 block discarded – undo
474 474
 
475 475
             $imageObjs = array();
476 476
             if (!empty($catids)) {
477
-                $criteria = new CriteriaCompo(new Criteria('imgcat_id', '(' . implode(',', $catids) . ')', 'IN'));
477
+                $criteria = new CriteriaCompo(new Criteria('imgcat_id', '('.implode(',', $catids).')', 'IN'));
478 478
                 $criteria->add(new Criteria('image_display', 1));
479 479
                 $criteria->setSort('image_nicename');
480 480
                 $criteria->setOrder('ASC');
@@ -493,7 +493,7 @@  discard block
 block discarded – undo
493 493
             $image_select->set(
494 494
                 'onchange',
495 495
                 'showImgSelected("image_display", "image_notused", "uploads/", "", "'
496
-                . \XoopsBaseConfig::get('url') . '")'
496
+                . \XoopsBaseConfig::get('url').'")'
497 497
             );
498 498
             unset($image_array);
499 499
 
@@ -503,7 +503,7 @@  discard block
 block discarded – undo
503 503
                 'onchange',
504 504
                 'publisher_updateSelectOption("image_item", "image_featured"), '
505 505
                 . 'showImgSelected("image_display", "image_item", "uploads/", "", "'
506
-                . \XoopsBaseConfig::get('url') . '");'
506
+                . \XoopsBaseConfig::get('url').'");'
507 507
             );
508 508
 
509 509
             $buttonadd = new Xoops\Form\Button('', 'buttonadd', _CO_PUBLISHER_ADD);
@@ -525,20 +525,20 @@  discard block
 block discarded – undo
525 525
             $addbreak = new Xoops\Form\Label('', "<br />");
526 526
             $closetable = new Xoops\Form\Label('', "</td></tr></table>");
527 527
 
528
-            $xoops->theme()->addScript(PUBLISHER_URL . '/js/ajaxupload.3.9.js');
528
+            $xoops->theme()->addScript(PUBLISHER_URL.'/js/ajaxupload.3.9.js');
529 529
             //todo, find replacement for error class
530 530
             $js_data = new Xoops\Form\Label('', '
531 531
 <script type= "text/javascript">/*<![CDATA[*/
532 532
 $(document).ready(function(){
533 533
     var button = $("#publisher_upload_button"), interval;
534 534
     new AjaxUpload(button,{
535
-        action: "' . PUBLISHER_URL . '/include/ajax_upload.php", // I disabled uploads in this example for security reasons
535
+        action: "' . PUBLISHER_URL.'/include/ajax_upload.php", // I disabled uploads in this example for security reasons
536 536
         responseType: "text/html",
537 537
         name: "publisher_upload_file",
538 538
         onSubmit : function(file, ext){
539 539
             // change button text, when user selects file
540 540
             $("#publisher_upload_message").html(" ");
541
-            button.html("<img src=\'' . PUBLISHER_URL . '/images/loadingbar.gif\'/>"); this.setData({
541
+            button.html("<img src=\'' . PUBLISHER_URL.'/images/loadingbar.gif\'/>"); this.setData({
542 542
                 "image_nicename": $("#image_nicename").val(),
543 543
                 "imgcat_id" : $("#imgcat_id").val()
544 544
             });
@@ -549,7 +549,7 @@  discard block
 block discarded – undo
549 549
             }, 200);
550 550
         },
551 551
         onComplete: function(file, response){
552
-            button.text("' . _CO_PUBLISHER_IMAGE_UPLOAD_NEW . '");
552
+            button.text("' . _CO_PUBLISHER_IMAGE_UPLOAD_NEW.'");
553 553
             window.clearInterval(interval);
554 554
             // enable upload button
555 555
             this.enable();
@@ -558,7 +558,7 @@  discard block
 block discarded – undo
558 558
             if (result[0] == "success") {
559 559
                  $("#image_item").append("<option value=\'" + result[1] + "\' selected=\'selected\'>" + result[2] + "</option>");
560 560
                  publisher_updateSelectOption(\'image_item\', \'image_featured\');
561
-                 showImgSelected(\'image_display\', \'image_item\', \'uploads/\', \'\', \'' . \XoopsBaseConfig::get('url') . '\')
561
+                 showImgSelected(\'image_display\', \'image_item\', \'uploads/\', \'\', \'' . \XoopsBaseConfig::get('url').'\')
562 562
             } else {
563 563
                  $("#publisher_upload_message").html("<div class=\'errorMsg\'>" + result[1] + "</div>");
564 564
             }
@@ -570,7 +570,7 @@  discard block
 block discarded – undo
570 570
             $messages = new Xoops\Form\Label('', "<div id='publisher_upload_message'></div>");
571 571
             $button = new Xoops\Form\Label(
572 572
                 '',
573
-                "<div id='publisher_upload_button'>" . _CO_PUBLISHER_IMAGE_UPLOAD_NEW . "</div>"
573
+                "<div id='publisher_upload_button'>"._CO_PUBLISHER_IMAGE_UPLOAD_NEW."</div>"
574 574
             );
575 575
             $nicename = new Xoops\Form\Text('', 'image_nicename', 30, 30, _CO_PUBLISHER_IMAGE_NICENAME);
576 576
 
@@ -621,13 +621,13 @@  discard block
 block discarded – undo
621 621
             $image_select3->set(
622 622
                 'onchange',
623 623
                 'showImgSelected("image_display", "image_featured", "uploads/", "", "'
624
-                . \XoopsBaseConfig::get('url') . '");'
624
+                . \XoopsBaseConfig::get('url').'");'
625 625
             );
626 626
             $image_select3->setDescription(_CO_PUBLISHER_IMAGE_ITEM_DSC);
627 627
             $imagesTab->addElement($image_select3);
628 628
 
629 629
             $imgTag = new Xoops\Html\Img([
630
-                'src' => $xoops->url('uploads/' . $imageforpath),
630
+                'src' => $xoops->url('uploads/'.$imageforpath),
631 631
                 'width' => 500,
632 632
                 'name' => 'image_display',
633 633
                 'id' => 'image_display',
Please login to merge, or discard this patch.
htdocs/modules/publisher/class/form/category.php 1 patch
Spacing   +4 added lines, -4 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 dirname(dirname(__DIR__)) . '/include/common.php';
25
+include_once dirname(dirname(__DIR__)).'/include/common.php';
26 26
 
27 27
 class PublisherCategoryForm extends Xoops\Form\ThemeForm
28 28
 {
@@ -107,10 +107,10 @@  discard block
 block discarded – undo
107 107
         // IMAGE
108 108
         $image_select = new Xoops\Form\Select('', 'image', $obj->image());
109 109
         \Xoops\Core\Lists\ImageFile::setOptionsArray($image_select, PublisherUtils::getImageDir('category'));
110
-        $image_select->setExtra("onchange='showImgSelected(\"image3\", \"image\", \"" . 'uploads/' . PUBLISHER_DIRNAME . '/images/category/' . "\", \"\", \"" . \XoopsBaseConfig::get('url') . "\")'");
110
+        $image_select->setExtra("onchange='showImgSelected(\"image3\", \"image\", \"".'uploads/'.PUBLISHER_DIRNAME.'/images/category/'."\", \"\", \"".\XoopsBaseConfig::get('url')."\")'");
111 111
         $image_tray = new Xoops\Form\ElementTray(_AM_PUBLISHER_IMAGE, '&nbsp;');
112 112
         $image_tray->addElement($image_select);
113
-        $image_tray->addElement(new Xoops\Form\Label('', "<br /><br /><img src='" . PublisherUtils::getImageDir('category', false) . $obj->image() . "' name='image3' id='image3' alt='' />"));
113
+        $image_tray->addElement(new Xoops\Form\Label('', "<br /><br /><img src='".PublisherUtils::getImageDir('category', false).$obj->image()."' name='image3' id='image3' alt='' />"));
114 114
         $image_tray->setDescription(_AM_PUBLISHER_IMAGE_DSC);
115 115
         $this->addElement($image_tray);
116 116
 
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
             } else {
178 178
                 $subname = '';
179 179
             }
180
-            $cat_tray->addElement(new Xoops\Form\Text('', 'scname[' . $i . ']', 50, 255, $subname));
180
+            $cat_tray->addElement(new Xoops\Form\Text('', 'scname['.$i.']', 50, 255, $subname));
181 181
         }
182 182
         $t = new Xoops\Form\Text('', 'nb_subcats', 3, 2);
183 183
         $l = new Xoops\Form\Label('', sprintf(_AM_PUBLISHER_ADD_OPT, $t->render()));
Please login to merge, or discard this patch.
htdocs/modules/publisher/class/permission.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
  * @version         $Id$
27 27
  */
28 28
 
29
-include_once dirname(__DIR__) . '/include/common.php';
29
+include_once dirname(__DIR__).'/include/common.php';
30 30
 
31 31
 class PublisherPermissionHandler extends XoopsObjectHandler
32 32
 {
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
         // Save the new permissions
162 162
         if (count($groups) > 0) {
163 163
             foreach ($groups as $group_id) {
164
-                echo $group_id . "-";
164
+                echo $group_id."-";
165 165
                 echo $gperm_handler->addRight($perm_name, $itemid, $group_id, $module_id);
166 166
             }
167 167
         }
Please login to merge, or discard this patch.
htdocs/modules/publisher/class/formdatetime.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
  * @version         $Id$
20 20
  */
21 21
 
22
-include_once dirname(__DIR__) . '/include/common.php';
22
+include_once dirname(__DIR__).'/include/common.php';
23 23
 
24 24
 class PublisherFormDateTime extends Xoops\Form\ElementTray
25 25
 {
@@ -37,16 +37,16 @@  discard block
 block discarded – undo
37 37
         $value = (int)($value);
38 38
         $value = ($value > 0) ? $value : time();
39 39
         $datetime = getdate($value);
40
-        $this->addElement(new Xoops\Form\DateSelect('', $name . '[date]', $value));
40
+        $this->addElement(new Xoops\Form\DateSelect('', $name.'[date]', $value));
41 41
         $timearray = array();
42 42
         for ($i = 0; $i < 24; ++$i) {
43 43
             for ($j = 0; $j < 60; $j = $j + 10) {
44 44
                 $key = ($i * 3600) + ($j * 60);
45
-                $timearray[$key] = ($j != 0) ? $i . ':' . $j : $i . ':0' . $j;
45
+                $timearray[$key] = ($j != 0) ? $i.':'.$j : $i.':0'.$j;
46 46
             }
47 47
         }
48 48
         ksort($timearray);
49
-        $timeselect = new Xoops\Form\Select('', $name . '[time]', $datetime['hours'] * 3600 + 600 * floor($datetime['minutes'] / 10));
49
+        $timeselect = new Xoops\Form\Select('', $name.'[time]', $datetime['hours'] * 3600 + 600 * floor($datetime['minutes'] / 10));
50 50
         $timeselect->addOptionArray($timearray);
51 51
         $this->addElement($timeselect);
52 52
     }
Please login to merge, or discard this patch.
htdocs/modules/publisher/index.php 1 patch
Spacing   +7 added lines, -7 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__ . '/header.php';
25
+include_once __DIR__.'/header.php';
26 26
 
27 27
 $xoops = Xoops::getInstance();
28 28
 $publisher = Publisher::getInstance();
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
     $xoops->redirect(\XoopsBaseConfig::get('url'), 2, _MD_PUBLISHER_NO_TOP_PERMISSIONS);
43 43
 }
44 44
 
45
-$xoops->header('module:publisher/publisher_display' . '_' . $publisher->getConfig('idxcat_items_display_type') . '.tpl');
45
+$xoops->header('module:publisher/publisher_display'.'_'.$publisher->getConfig('idxcat_items_display_type').'.tpl');
46 46
 $xoopsTpl = $xoops->tpl();
47 47
 XoopsLoad::loadFile($publisher->path('footer.php'));
48 48
 
@@ -193,16 +193,16 @@  discard block
 block discarded – undo
193 193
 // Category Navigation Bar
194 194
 $pagenav = new XoopsPageNav($totalCategories, $publisher->getConfig('idxcat_cat_perpage'), $catstart, 'catstart', '');
195 195
 if ($publisher->getConfig('format_image_nav') == 1) {
196
-    $xoopsTpl->assign('catnavbar', '<div style="text-align:right;">' . $pagenav->renderImageNav() . '</div>');
196
+    $xoopsTpl->assign('catnavbar', '<div style="text-align:right;">'.$pagenav->renderImageNav().'</div>');
197 197
 } else {
198
-    $xoopsTpl->assign('catnavbar', '<div style="text-align:right;">' . $pagenav->renderNav() . '</div>');
198
+    $xoopsTpl->assign('catnavbar', '<div style="text-align:right;">'.$pagenav->renderNav().'</div>');
199 199
 }
200 200
 // ITEM Navigation Bar
201 201
 $pagenav = new XoopsPageNav($real_total_items, $publisher->getConfig('idxcat_index_perpage'), $start, 'start', '');
202 202
 if ($publisher->getConfig('format_image_nav') == 1) {
203
-    $xoopsTpl->assign('navbar', '<div style="text-align:right;">' . $pagenav->renderImageNav() . '</div>');
203
+    $xoopsTpl->assign('navbar', '<div style="text-align:right;">'.$pagenav->renderImageNav().'</div>');
204 204
 } else {
205
-    $xoopsTpl->assign('navbar', '<div style="text-align:right;">' . $pagenav->renderNav() . '</div>');
205
+    $xoopsTpl->assign('navbar', '<div style="text-align:right;">'.$pagenav->renderNav().'</div>');
206 206
 }
207 207
 //show subcategories
208 208
 $xoopsTpl->assign('show_subcats', $publisher->getConfig('idxcat_show_subcats'));
@@ -216,7 +216,7 @@  discard block
 block discarded – undo
216 216
 
217 217
 // RSS Link
218 218
 if ($publisher->getConfig('idxcat_show_rss_link') == 1) {
219
-    $link = sprintf("<a href='%s' title='%s'><img src='%s' border=0 alt='%s'></a>", PUBLISHER_URL . "/backend.php", _MD_PUBLISHER_RSSFEED, PUBLISHER_URL . "/images/rss.gif", _MD_PUBLISHER_RSSFEED);
219
+    $link = sprintf("<a href='%s' title='%s'><img src='%s' border=0 alt='%s'></a>", PUBLISHER_URL."/backend.php", _MD_PUBLISHER_RSSFEED, PUBLISHER_URL."/images/rss.gif", _MD_PUBLISHER_RSSFEED);
220 220
     $xoopsTpl->assign('rssfeed_link', $link);
221 221
 }
222 222
 
Please login to merge, or discard this patch.
htdocs/modules/publisher/header.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,8 +19,8 @@
 block discarded – undo
19 19
  * @version         $Id$
20 20
  */
21 21
 
22
-include_once dirname(dirname(__DIR__)) . '/mainfile.php';
23
-include_once __DIR__ . '/include/common.php';
22
+include_once dirname(dirname(__DIR__)).'/mainfile.php';
23
+include_once __DIR__.'/include/common.php';
24 24
 $publisher = Publisher::getInstance();
25 25
 if ($publisher->getConfig('seo_url_rewrite') !== 'none') {
26 26
     XoopsLoad::loadFile($publisher->path('include/seo.inc.php'));
Please login to merge, or discard this patch.
htdocs/modules/waiting/admin/plugins.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
  * @author          trabis <[email protected]>
22 22
  * @version         $Id$
23 23
  */
24
-include __DIR__ . '/header.php';
24
+include __DIR__.'/header.php';
25 25
 
26 26
 // Get main instance
27 27
 $xoops = \Xoops::getInstance();
Please login to merge, or discard this patch.
htdocs/modules/waiting/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 __DIR__ . '/header.php';
23
+include __DIR__.'/header.php';
24 24
 $xoops = Xoops::getInstance();
25 25
 
26 26
 // header
Please login to merge, or discard this patch.
htdocs/modules/waiting/admin/header.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,4 +20,4 @@
 block discarded – undo
20 20
  * @version         $Id$
21 21
  */
22 22
 
23
-require_once dirname(dirname(dirname(__DIR__))) . '/include/cp_header.php';
23
+require_once dirname(dirname(dirname(__DIR__))).'/include/cp_header.php';
Please login to merge, or discard this patch.