Completed
Pull Request — master (#592)
by
unknown
14:06
created
htdocs/modules/publisher/include/common.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -22,18 +22,18 @@
 block discarded – undo
22 22
 
23 23
 $xoops = \Xoops::getInstance();
24 24
 define("PUBLISHER_DIRNAME", basename(dirname(__DIR__)));
25
-define("PUBLISHER_URL", $xoops->url('modules/' . PUBLISHER_DIRNAME));
26
-define("PUBLISHER_ADMIN_URL", PUBLISHER_URL . '/admin');
27
-define("PUBLISHER_UPLOADS_URL", $xoops->url('uploads/' . PUBLISHER_DIRNAME));
28
-define("PUBLISHER_ROOT_PATH", $xoops->path('modules/' . PUBLISHER_DIRNAME));
29
-define("PUBLISHER_UPLOADS_PATH", $xoops->path('uploads/' . PUBLISHER_DIRNAME));
25
+define("PUBLISHER_URL", $xoops->url('modules/'.PUBLISHER_DIRNAME));
26
+define("PUBLISHER_ADMIN_URL", PUBLISHER_URL.'/admin');
27
+define("PUBLISHER_UPLOADS_URL", $xoops->url('uploads/'.PUBLISHER_DIRNAME));
28
+define("PUBLISHER_ROOT_PATH", $xoops->path('modules/'.PUBLISHER_DIRNAME));
29
+define("PUBLISHER_UPLOADS_PATH", $xoops->path('uploads/'.PUBLISHER_DIRNAME));
30 30
 
31 31
 $path = dirname(__DIR__);
32 32
 XoopsLoad::addMap(array(
33
-    'publishermetagen'   => $path . '/class/metagen.php',
34
-    'publisher'          => $path . '/class/helper.php',
35
-    'publisherutils'     => $path . '/class/utils.php',
36
-    'publisherblockform' => $path . '/class/blockform.php',
33
+    'publishermetagen'   => $path.'/class/metagen.php',
34
+    'publisher'          => $path.'/class/helper.php',
35
+    'publisherutils'     => $path.'/class/utils.php',
36
+    'publisherblockform' => $path.'/class/blockform.php',
37 37
 ));
38 38
 
39 39
 $publisher = Publisher::getInstance();
Please login to merge, or discard this patch.
htdocs/modules/publisher/include/search.inc.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
         $hightlight_key = '';
26 26
     } else {
27 27
         $keywords = implode('+', $queryarray);
28
-        $hightlight_key = "&keywords=" . $keywords;
28
+        $hightlight_key = "&keywords=".$keywords;
29 29
     }
30 30
     $itemsObjs = $publisher->getItemHandler()
31 31
             ->getItemsFromSearch($queryarray, $andor, $limit, $offset, $userid, $categories, $sortby, $searchin, $extra);
@@ -36,9 +36,9 @@  discard block
 block discarded – undo
36 36
     foreach ($itemsObjs as $obj) {
37 37
         $item['image'] = "images/item_icon.gif";
38 38
         $item['link'] = $obj->getItemUrl();
39
-        $item['link'] .= (!empty($hightlight_key) && (strpos($item['link'], '.php?') === false)) ? "?" . ltrim($hightlight_key, '&') : $hightlight_key;
39
+        $item['link'] .= (!empty($hightlight_key) && (strpos($item['link'], '.php?') === false)) ? "?".ltrim($hightlight_key, '&') : $hightlight_key;
40 40
         if ($withCategoryPath) {
41
-            $item['title'] = $obj->getCategoryPath(false) . " > " . $obj->title();
41
+            $item['title'] = $obj->getCategoryPath(false)." > ".$obj->title();
42 42
         } else {
43 43
             $item['title'] = $obj->title();
44 44
         }
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
             $start = max(($pos - 100), 0);
57 57
             $length = strlen($query) + 200; //xoops_local("strlen", $query) + 200;
58 58
             $context = $obj->highlight(XoopsLocale::substr($text, $start, $length, " [...]"), $query);
59
-            $sanitized_text .= "<p>[...] " . $context . "</p>";
59
+            $sanitized_text .= "<p>[...] ".$context."</p>";
60 60
         }
61 61
 
62 62
         //End of highlight
Please login to merge, or discard this patch.
htdocs/modules/publisher/backend.php 2 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -77,11 +77,11 @@
 block discarded – undo
77 77
         /* @var $item PublisherItem */
78 78
         foreach ($sarray as $item) {
79 79
             $tpl->append('items',
80
-                         array('title' => htmlspecialchars($item->title(), ENT_QUOTES),
81
-                               'link' => $item->getItemUrl(),
82
-                               'guid' => $item->getItemUrl(),
83
-                               'pubdate' => XoopsLocale::formatTimestamp($item->getVar('datesub'), 'rss'),
84
-                               'description' => htmlspecialchars($item->getBlockSummary(300, true), ENT_QUOTES)));
80
+                            array('title' => htmlspecialchars($item->title(), ENT_QUOTES),
81
+                                'link' => $item->getItemUrl(),
82
+                                'guid' => $item->getItemUrl(),
83
+                                'pubdate' => XoopsLocale::formatTimestamp($item->getVar('datesub'), 'rss'),
84
+                                'description' => htmlspecialchars($item->getBlockSummary(300, true), ENT_QUOTES)));
85 85
         }
86 86
     }
87 87
 }
Please login to merge, or discard this 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
  * @author          The SmartFactory <www.smartfactory.ca>
22 22
  */
23 23
 
24
-include_once __DIR__ . '/header.php';
24
+include_once __DIR__.'/header.php';
25 25
 $xoops = Xoops::getInstance();
26 26
 $xoops->disableErrorReporting();
27 27
 
@@ -36,10 +36,10 @@  discard block
 block discarded – undo
36 36
     $categoryObj = $publisher->getCategoryHandler()->get($categoryid);
37 37
 }
38 38
 
39
-header('Content-Type:text/xml; charset=' . XoopsLocale::getCharset());
39
+header('Content-Type:text/xml; charset='.XoopsLocale::getCharset());
40 40
 $tpl = new XoopsTpl();
41 41
 $tpl->caching = 2;
42
-$tpl->cache_lifetime= 0;
42
+$tpl->cache_lifetime = 0;
43 43
 
44 44
 $myts = \Xoops\Core\Text\Sanitizer::getInstance();
45 45
 if (!$tpl->isCached('module:publisher/publisher_rss.tpl')) {
@@ -53,14 +53,14 @@  discard block
 block discarded – undo
53 53
     $tpl->assign('channel_editor', $xoops->getConfig('adminmail'));
54 54
 
55 55
     if ($categoryid != -1) {
56
-        $channel_category .= " > " . $categoryObj->getVar('name');
56
+        $channel_category .= " > ".$categoryObj->getVar('name');
57 57
     }
58 58
 
59 59
     $tpl->assign('channel_category', htmlspecialchars($channel_category));
60 60
     $tpl->assign('channel_generator', $publisher->getModule()->getVar('name'));
61 61
     $tpl->assign('channel_language', XoopsLocale::getLangCode());
62
-    $tpl->assign('image_url', \XoopsBaseConfig::get('url') . '/images/logo.gif');
63
-    $dimention = getimagesize(\XoopsBaseConfig::get('root-path') . '/images/logo.gif');
62
+    $tpl->assign('image_url', \XoopsBaseConfig::get('url').'/images/logo.gif');
63
+    $dimention = getimagesize(\XoopsBaseConfig::get('root-path').'/images/logo.gif');
64 64
     if (empty($dimention[0])) {
65 65
         $width = 140;
66 66
         $height = 140;
Please login to merge, or discard this patch.
htdocs/modules/publisher/visit.php 1 patch
Spacing   +3 added lines, -3 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();
@@ -49,10 +49,10 @@  discard block
 block discarded – undo
49 49
 $fileObj->updateCounter();
50 50
 
51 51
 if (!preg_match("/^ed2k*:\/\//i", $fileObj->getFileUrl())) {
52
-    header("Location: " . $fileObj->getFileUrl());
52
+    header("Location: ".$fileObj->getFileUrl());
53 53
 }
54 54
 
55 55
 $myts = \Xoops\Core\Text\Sanitizer::getInstance();
56 56
 echo "<html><head><meta http-equiv=\"Refresh\" content=\"0; URL="
57
-    . $myts->htmlSpecialChars($fileObj->getFileUrl()) . "\"></head><body></body></html>";
57
+    . $myts->htmlSpecialChars($fileObj->getFileUrl())."\"></head><body></body></html>";
58 58
 exit();
Please login to merge, or discard this patch.
htdocs/modules/publisher/makepdf.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
  * @author          Sina Asghari (AKA stranger) <[email protected]>
23 23
  */
24 24
 
25
-include_once __DIR__ . '/header.php';
25
+include_once __DIR__.'/header.php';
26 26
 $xoops = Xoops::getInstance();
27 27
 $xoops->disableErrorReporting();
28 28
 
@@ -70,6 +70,6 @@  discard block
 block discarded – undo
70 70
 $xoops->service('htmltopdf')->setKeywords($itemObj->getVar('meta_keywords'));
71 71
 $xoops->service('htmltopdf')->setSubject($categoryObj->getVar('name'));
72 72
 $xoops->service('htmltopdf')->addHtml($content);
73
-$name = $itemObj->getVar('short_url') . '.pdf';
73
+$name = $itemObj->getVar('short_url').'.pdf';
74 74
 $xoops->service('htmltopdf')->outputPdfInline($name);
75 75
 exit();
Please login to merge, or discard this patch.
htdocs/modules/publisher/blocks/items_columns.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 dirname(__DIR__) . '/include/common.php';
23
+include_once dirname(__DIR__).'/include/common.php';
24 24
 
25 25
 /**
26 26
  * Function To Show Publisher Items From Categories In Their Own Columns
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
     $block['columns'] = $columns;
134 134
     $block['columnwidth'] = (int)(100 / $opt_num_columns);
135 135
 
136
-    $xoTheme->addStylesheet(\XoopsBaseConfig::get('url') . '/modules/' . PUBLISHER_DIRNAME . '/css/publisher.css');
136
+    $xoTheme->addStylesheet(\XoopsBaseConfig::get('url').'/modules/'.PUBLISHER_DIRNAME.'/css/publisher.css');
137 137
 
138 138
     return $block;
139 139
 }
Please login to merge, or discard this patch.
htdocs/modules/publisher/blocks/date_to_date.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 dirname(__DIR__) . '/include/common.php';
23
+include_once dirname(__DIR__).'/include/common.php';
24 24
 
25 25
 function publisher_date_to_date_show($options)
26 26
 {
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
         $block['lang_poster'] = _MB_PUBLISHER_POSTEDBY;
60 60
         $block['lang_date'] = _MB_PUBLISHER_DATE;
61 61
         $modulename = $myts->displayTarea($publisher->getModule()->getVar('name'));
62
-        $block['lang_visitItem'] = _MB_PUBLISHER_VISITITEM . " " . $modulename;
62
+        $block['lang_visitItem'] = _MB_PUBLISHER_VISITITEM." ".$modulename;
63 63
         $block['lang_articles_from_to'] = sprintf(_MB_PUBLISHER_ARTICLES_FROM_TO, $options[0], $options[1]);
64 64
     }
65 65
 
Please login to merge, or discard this patch.
htdocs/modules/publisher/blocks/items_new.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
 
23 23
 defined("XOOPS_ROOT_PATH") or die("XOOPS root path not defined");
24 24
 
25
-include_once dirname(__DIR__) . '/include/common.php';
25
+include_once dirname(__DIR__).'/include/common.php';
26 26
 
27 27
 function publisher_items_new_show($options)
28 28
 {
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
         $criteria = null;
49 49
     } else {
50 50
         $criteria = new CriteriaCompo();
51
-        $criteria->add(new Criteria('categoryid', '(' . $options[0] . ')', 'IN'));
51
+        $criteria->add(new Criteria('categoryid', '('.$options[0].')', 'IN'));
52 52
     }
53 53
     $xoops = \Xoops::getInstance();
54 54
     $thumbService = $xoops->service('thumbnail');
@@ -64,12 +64,12 @@  discard block
 block discarded – undo
64 64
             $item['poster'] = $itemsObj[$i]->posterName(); // for make poster name linked, use linkedPosterName() instead of posterName()
65 65
 
66 66
             if ($image === 'article') {
67
-                $item['image'] = \XoopsBaseConfig::get('url') . '/uploads/blank.gif';
67
+                $item['image'] = \XoopsBaseConfig::get('url').'/uploads/blank.gif';
68 68
                 $item['image_name'] = '';
69 69
                 $images = $itemsObj[$i]->getImages();
70 70
                 if (is_object($images['main'])) {
71 71
                     $item['image'] = $thumbService
72
-                        ->getImgUrl('uploads/' . $images['main']->getVar('image_name'), 50, 0)
72
+                        ->getImgUrl('uploads/'.$images['main']->getVar('image_name'), 50, 0)
73 73
                         ->getValue();
74 74
 
75 75
                     $item['image_name'] = $images['main']->getVar('image_nicename');
@@ -80,11 +80,11 @@  discard block
 block discarded – undo
80 80
             } elseif ($image === 'avatar') {
81 81
                 $auid = $itemsObj[$i]->getVar('uid');
82 82
                 if ($auid == '0') {
83
-                    $item['image'] = \XoopsBaseConfig::get('url') . '/uploads/blank.gif';
83
+                    $item['image'] = \XoopsBaseConfig::get('url').'/uploads/blank.gif';
84 84
                     $images = $itemsObj[$i]->getImages();
85 85
                     if (is_object($images['main'])) {
86 86
                         $item['image'] = $thumbService
87
-                            ->getImgUrl('uploads/' . $images['main']->getVar('image_name'), 50, 0)
87
+                            ->getImgUrl('uploads/'.$images['main']->getVar('image_name'), 50, 0)
88 88
                             ->getValue();
89 89
                     }
90 90
                 } else {
Please login to merge, or discard this patch.
htdocs/modules/publisher/blocks/search.php 2 patches
Spacing   +17 added lines, -17 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 dirname(__DIR__) . '/include/common.php';
23
+include_once dirname(__DIR__).'/include/common.php';
24 24
 
25 25
 function publisher_search_show($options)
26 26
 {
@@ -52,13 +52,13 @@  discard block
 block discarded – undo
52 52
     $type_select = "<select name=\"andor\">";
53 53
     $type_select .= "<option value=\"OR\"";
54 54
     if ("OR" === $andor) $type_select .= " selected=\"selected\"";
55
-    $type_select .= ">" . XoopsLocale::ANY_OR . "</option>";
55
+    $type_select .= ">".XoopsLocale::ANY_OR."</option>";
56 56
     $type_select .= "<option value=\"AND\"";
57 57
     if ("AND" === $andor) $type_select .= " selected=\"selected\"";
58
-    $type_select .= ">" . XoopsLocale::ALL . "</option>";
58
+    $type_select .= ">".XoopsLocale::ALL."</option>";
59 59
     $type_select .= "<option value=\"EXACT\"";
60 60
     if ("exact" === $andor) $type_select .= " selected=\"selected\"";
61
-    $type_select .= ">" . XoopsLocale::EXACT_MATCH . "</option>";
61
+    $type_select .= ">".XoopsLocale::EXACT_MATCH."</option>";
62 62
     $type_select .= "</select>";
63 63
 
64 64
     /* category */
@@ -66,11 +66,11 @@  discard block
 block discarded – undo
66 66
     $select_category = "<select name=\"category[]\" size=\"5\" multiple=\"multiple\" width=\"150\" style=\"width:150px;\">";
67 67
     $select_category .= "<option value=\"all\"";
68 68
     if (empty($category) || count($category) == 0) $select_category .= "selected=\"selected\"";
69
-    $select_category .= ">" . XoopsLocale::ALL . "</option>";
69
+    $select_category .= ">".XoopsLocale::ALL."</option>";
70 70
     foreach ($categories as $id => $cat) {
71
-        $select_category .= "<option value=\"" . $id . "\"";
71
+        $select_category .= "<option value=\"".$id."\"";
72 72
         if (in_array($id, $category)) $select_category .= "selected=\"selected\"";
73
-        $select_category .= ">" . $cat . "</option>";
73
+        $select_category .= ">".$cat."</option>";
74 74
     }
75 75
     $select_category .= "</select>";
76 76
 
@@ -78,37 +78,37 @@  discard block
 block discarded – undo
78 78
     $searchin_select = "";
79 79
     $searchin_select .= "<input type=\"checkbox\" name=\"searchin[]\" value=\"title\"";
80 80
     if (in_array("title", $searchin)) $searchin_select .= " checked";
81
-    $searchin_select .= " />" . _CO_PUBLISHER_TITLE . "&nbsp;&nbsp;";
81
+    $searchin_select .= " />"._CO_PUBLISHER_TITLE."&nbsp;&nbsp;";
82 82
     $searchin_select .= "<input type=\"checkbox\" name=\"searchin[]\" value=\"subtitle\"";
83 83
     if (in_array("subtitle", $searchin)) $searchin_select .= " checked";
84
-    $searchin_select .= " />" . _CO_PUBLISHER_SUBTITLE . "&nbsp;&nbsp;";
84
+    $searchin_select .= " />"._CO_PUBLISHER_SUBTITLE."&nbsp;&nbsp;";
85 85
     $searchin_select .= "<input type=\"checkbox\" name=\"searchin[]\" value=\"summary\"";
86 86
     if (in_array("summary", $searchin)) $searchin_select .= " checked";
87
-    $searchin_select .= " />" . _CO_PUBLISHER_SUMMARY . "&nbsp;&nbsp;";
87
+    $searchin_select .= " />"._CO_PUBLISHER_SUMMARY."&nbsp;&nbsp;";
88 88
     $searchin_select .= "<input type=\"checkbox\" name=\"searchin[]\" value=\"text\"";
89 89
     if (in_array("body", $searchin)) $searchin_select .= " checked";
90
-    $searchin_select .= " />" . _CO_PUBLISHER_BODY . "&nbsp;&nbsp;";
90
+    $searchin_select .= " />"._CO_PUBLISHER_BODY."&nbsp;&nbsp;";
91 91
     $searchin_select .= "<input type=\"checkbox\" name=\"searchin[]\" value=\"keywords\"";
92 92
     if (in_array("meta_keywords", $searchin)) $searchin_select .= " checked";
93
-    $searchin_select .= " />" . _CO_PUBLISHER_ITEM_META_KEYWORDS . "&nbsp;&nbsp;";
93
+    $searchin_select .= " />"._CO_PUBLISHER_ITEM_META_KEYWORDS."&nbsp;&nbsp;";
94 94
     $searchin_select .= "<input type=\"checkbox\" name=\"searchin[]\" value=\"all\"";
95 95
     if (in_array("all", $searchin) || empty($searchin)) $searchin_select .= " checked";
96
-    $searchin_select .= " />" . XoopsLocale::ALL . "&nbsp;&nbsp;";
96
+    $searchin_select .= " />".XoopsLocale::ALL."&nbsp;&nbsp;";
97 97
 
98 98
     /* sortby */
99 99
     $sortby_select = "<select name=\"sortby\">";
100 100
     $sortby_select .= "<option value=\"itemid\"";
101 101
     if ("itemid" === $sortby || empty($sortby)) $sortby_select .= " selected=\"selected\"";
102
-    $sortby_select .= ">" . XoopsLocale::NONE . "</option>";
102
+    $sortby_select .= ">".XoopsLocale::NONE."</option>";
103 103
     $sortby_select .= "<option value=\"datesub\"";
104 104
     if ("datesub" === $sortby) $sortby_select .= " selected=\"selected\"";
105
-    $sortby_select .= ">" . _CO_PUBLISHER_DATESUB . "</option>";
105
+    $sortby_select .= ">"._CO_PUBLISHER_DATESUB."</option>";
106 106
     $sortby_select .= "<option value=\"title\"";
107 107
     if ("title" === $sortby) $sortby_select .= " selected=\"selected\"";
108
-    $sortby_select .= ">" . _CO_PUBLISHER_TITLE . "</option>";
108
+    $sortby_select .= ">"._CO_PUBLISHER_TITLE."</option>";
109 109
     $sortby_select .= "<option value=\"categoryid\"";
110 110
     if ("categoryid" === $sortby) $sortby_select .= " selected=\"selected\"";
111
-    $sortby_select .= ">" . _CO_PUBLISHER_CATEGORY . "</option>";
111
+    $sortby_select .= ">"._CO_PUBLISHER_CATEGORY."</option>";
112 112
     $sortby_select .= "</select>";
113 113
 
114 114
     $block["type_select"] = $type_select;
Please login to merge, or discard this patch.
Braces   +48 added lines, -16 removed lines patch added patch discarded remove patch
@@ -28,7 +28,9 @@  discard block
 block discarded – undo
28 28
     $xoops = Xoops::getInstance();
29 29
     $publisher = Publisher::getInstance();
30 30
     $categories = $publisher->getCategoryHandler()->getCategoriesForSearch();
31
-    if (count($categories) == 0) return $block;
31
+    if (count($categories) == 0) {
32
+        return $block;
33
+    }
32 34
 
33 35
     $andor = isset($_POST["andor"]) ? $_POST["andor"] : (isset($_GET["andor"]) ? $_GET["andor"] : "");
34 36
 
@@ -51,13 +53,19 @@  discard block
 block discarded – undo
51 53
     /* type */
52 54
     $type_select = "<select name=\"andor\">";
53 55
     $type_select .= "<option value=\"OR\"";
54
-    if ("OR" === $andor) $type_select .= " selected=\"selected\"";
56
+    if ("OR" === $andor) {
57
+        $type_select .= " selected=\"selected\"";
58
+    }
55 59
     $type_select .= ">" . XoopsLocale::ANY_OR . "</option>";
56 60
     $type_select .= "<option value=\"AND\"";
57
-    if ("AND" === $andor) $type_select .= " selected=\"selected\"";
61
+    if ("AND" === $andor) {
62
+        $type_select .= " selected=\"selected\"";
63
+    }
58 64
     $type_select .= ">" . XoopsLocale::ALL . "</option>";
59 65
     $type_select .= "<option value=\"EXACT\"";
60
-    if ("exact" === $andor) $type_select .= " selected=\"selected\"";
66
+    if ("exact" === $andor) {
67
+        $type_select .= " selected=\"selected\"";
68
+    }
61 69
     $type_select .= ">" . XoopsLocale::EXACT_MATCH . "</option>";
62 70
     $type_select .= "</select>";
63 71
 
@@ -65,11 +73,15 @@  discard block
 block discarded – undo
65 73
 
66 74
     $select_category = "<select name=\"category[]\" size=\"5\" multiple=\"multiple\" width=\"150\" style=\"width:150px;\">";
67 75
     $select_category .= "<option value=\"all\"";
68
-    if (empty($category) || count($category) == 0) $select_category .= "selected=\"selected\"";
76
+    if (empty($category) || count($category) == 0) {
77
+        $select_category .= "selected=\"selected\"";
78
+    }
69 79
     $select_category .= ">" . XoopsLocale::ALL . "</option>";
70 80
     foreach ($categories as $id => $cat) {
71 81
         $select_category .= "<option value=\"" . $id . "\"";
72
-        if (in_array($id, $category)) $select_category .= "selected=\"selected\"";
82
+        if (in_array($id, $category)) {
83
+            $select_category .= "selected=\"selected\"";
84
+        }
73 85
         $select_category .= ">" . $cat . "</option>";
74 86
     }
75 87
     $select_category .= "</select>";
@@ -77,37 +89,57 @@  discard block
 block discarded – undo
77 89
     /* scope */
78 90
     $searchin_select = "";
79 91
     $searchin_select .= "<input type=\"checkbox\" name=\"searchin[]\" value=\"title\"";
80
-    if (in_array("title", $searchin)) $searchin_select .= " checked";
92
+    if (in_array("title", $searchin)) {
93
+        $searchin_select .= " checked";
94
+    }
81 95
     $searchin_select .= " />" . _CO_PUBLISHER_TITLE . "&nbsp;&nbsp;";
82 96
     $searchin_select .= "<input type=\"checkbox\" name=\"searchin[]\" value=\"subtitle\"";
83
-    if (in_array("subtitle", $searchin)) $searchin_select .= " checked";
97
+    if (in_array("subtitle", $searchin)) {
98
+        $searchin_select .= " checked";
99
+    }
84 100
     $searchin_select .= " />" . _CO_PUBLISHER_SUBTITLE . "&nbsp;&nbsp;";
85 101
     $searchin_select .= "<input type=\"checkbox\" name=\"searchin[]\" value=\"summary\"";
86
-    if (in_array("summary", $searchin)) $searchin_select .= " checked";
102
+    if (in_array("summary", $searchin)) {
103
+        $searchin_select .= " checked";
104
+    }
87 105
     $searchin_select .= " />" . _CO_PUBLISHER_SUMMARY . "&nbsp;&nbsp;";
88 106
     $searchin_select .= "<input type=\"checkbox\" name=\"searchin[]\" value=\"text\"";
89
-    if (in_array("body", $searchin)) $searchin_select .= " checked";
107
+    if (in_array("body", $searchin)) {
108
+        $searchin_select .= " checked";
109
+    }
90 110
     $searchin_select .= " />" . _CO_PUBLISHER_BODY . "&nbsp;&nbsp;";
91 111
     $searchin_select .= "<input type=\"checkbox\" name=\"searchin[]\" value=\"keywords\"";
92
-    if (in_array("meta_keywords", $searchin)) $searchin_select .= " checked";
112
+    if (in_array("meta_keywords", $searchin)) {
113
+        $searchin_select .= " checked";
114
+    }
93 115
     $searchin_select .= " />" . _CO_PUBLISHER_ITEM_META_KEYWORDS . "&nbsp;&nbsp;";
94 116
     $searchin_select .= "<input type=\"checkbox\" name=\"searchin[]\" value=\"all\"";
95
-    if (in_array("all", $searchin) || empty($searchin)) $searchin_select .= " checked";
117
+    if (in_array("all", $searchin) || empty($searchin)) {
118
+        $searchin_select .= " checked";
119
+    }
96 120
     $searchin_select .= " />" . XoopsLocale::ALL . "&nbsp;&nbsp;";
97 121
 
98 122
     /* sortby */
99 123
     $sortby_select = "<select name=\"sortby\">";
100 124
     $sortby_select .= "<option value=\"itemid\"";
101
-    if ("itemid" === $sortby || empty($sortby)) $sortby_select .= " selected=\"selected\"";
125
+    if ("itemid" === $sortby || empty($sortby)) {
126
+        $sortby_select .= " selected=\"selected\"";
127
+    }
102 128
     $sortby_select .= ">" . XoopsLocale::NONE . "</option>";
103 129
     $sortby_select .= "<option value=\"datesub\"";
104
-    if ("datesub" === $sortby) $sortby_select .= " selected=\"selected\"";
130
+    if ("datesub" === $sortby) {
131
+        $sortby_select .= " selected=\"selected\"";
132
+    }
105 133
     $sortby_select .= ">" . _CO_PUBLISHER_DATESUB . "</option>";
106 134
     $sortby_select .= "<option value=\"title\"";
107
-    if ("title" === $sortby) $sortby_select .= " selected=\"selected\"";
135
+    if ("title" === $sortby) {
136
+        $sortby_select .= " selected=\"selected\"";
137
+    }
108 138
     $sortby_select .= ">" . _CO_PUBLISHER_TITLE . "</option>";
109 139
     $sortby_select .= "<option value=\"categoryid\"";
110
-    if ("categoryid" === $sortby) $sortby_select .= " selected=\"selected\"";
140
+    if ("categoryid" === $sortby) {
141
+        $sortby_select .= " selected=\"selected\"";
142
+    }
111 143
     $sortby_select .= ">" . _CO_PUBLISHER_CATEGORY . "</option>";
112 144
     $sortby_select .= "</select>";
113 145
 
Please login to merge, or discard this patch.