Completed
Push — master ( b781ca...7b04d5 )
by Richard
19s
created
htdocs/modules/page/class/page_content.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
 
179 179
         // criteria
180 180
         $criteria = new CriteriaCompo();
181
-        $criteria->add(new Criteria('content_id', '(' . implode(', ', $pages_ids) . ')', 'IN'));
181
+        $criteria->add(new Criteria('content_id', '('.implode(', ', $pages_ids).')', 'IN'));
182 182
         $criteria->add(new Criteria('content_status', 0, '!='));
183 183
         $criteria->add(new Criteria('content_maindisplay', 0, '!='));
184 184
         $criteria->setSort($sort);
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
 
201 201
         // criteria
202 202
         $criteria = new CriteriaCompo();
203
-        $criteria->add(new Criteria('content_id', '(' . implode(', ', $pages_ids) . ')', 'IN'));
203
+        $criteria->add(new Criteria('content_id', '('.implode(', ', $pages_ids).')', 'IN'));
204 204
         $criteria->add(new Criteria('content_status', 0, '!='));
205 205
         $criteria->add(new Criteria('content_maindisplay', 0, '!='));
206 206
         $criteria->setSort($sort);
@@ -245,7 +245,7 @@  discard block
 block discarded – undo
245 245
     {
246 246
         $values = parent::get($content_id)->toArray();
247 247
         $values['content_id'] = 0;
248
-        $values['content_title'] = PageLocale::CONTENT_COPY . $values['content_title'];
248
+        $values['content_title'] = PageLocale::CONTENT_COPY.$values['content_title'];
249 249
         $values['content_weight'] = 0;
250 250
         $values['content_hits'] = 0;
251 251
         $values['content_votes'] = 0;
Please login to merge, or discard this patch.
htdocs/modules/page/class/page_rating.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -100,6 +100,6 @@
 block discarded – undo
100 100
             ++$i;
101 101
             $total += $v->getVar('rating_rating');
102 102
         }
103
-        return array('voters' => $i, 'average' => $total/$i);
103
+        return array('voters' => $i, 'average' => $total / $i);
104 104
     }
105 105
 }
Please login to merge, or discard this patch.
htdocs/modules/page/class/plugin/system.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -66,8 +66,8 @@
 block discarded – undo
66 66
         $contents = $page->getContentHandler()->getPagePublished(0, $limit);
67 67
         foreach ($contents as $k => $content) {
68 68
             $ret[$k]['title']   = $content->getVar('content_title');
69
-            $ret[$k]['link']    = $page->url('viewpage.php') . '?id=' . $content->getVar('content_id');
70
-            $ret[$k]['content'] = $content->getVar('content_shorttext') . '<br />' . $content->getVar('content_text');
69
+            $ret[$k]['link']    = $page->url('viewpage.php').'?id='.$content->getVar('content_id');
70
+            $ret[$k]['content'] = $content->getVar('content_shorttext').'<br />'.$content->getVar('content_text');
71 71
             $ret[$k]['date']    = $content->getVar('content_create');
72 72
         }
73 73
         return $ret;
Please login to merge, or discard this patch.
htdocs/modules/page/class/plugin/notifications.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
     {
32 32
         $xoops = Xoops::getInstance();
33 33
         $item = array();
34
-        $item_id = (int) $item_id;
34
+        $item_id = (int)$item_id;
35 35
 
36 36
         if ($category === 'global') {
37 37
             $item['name'] = '';
@@ -40,11 +40,11 @@  discard block
 block discarded – undo
40 40
         }
41 41
 
42 42
         if ($category == 'item') {
43
-            $sql = 'SELECT content_title FROM ' . $xoopsDB->prefix('page_content') . ' WHERE content_id = ' . $item_id;
43
+            $sql = 'SELECT content_title FROM '.$xoopsDB->prefix('page_content').' WHERE content_id = '.$item_id;
44 44
             $result = $xoopsDB->query($sql); // TODO: error check
45 45
             $result_array = $xoopsDB->fetchArray($result);
46 46
             $item['name'] = $result_array['title'];
47
-            $item['url'] = \XoopsBaseConfig::get('url') . '/modules/page/viewpage.php?id=' . $item_id;
47
+            $item['url'] = \XoopsBaseConfig::get('url').'/modules/page/viewpage.php?id='.$item_id;
48 48
             return $item;
49 49
         }
50 50
 
Please login to merge, or discard this patch.
htdocs/modules/page/class/plugin/search.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
      */
43 43
     public function search($queryArray, $andor, $limit, $offset, $userid)
44 44
     {
45
-        $andor = strtolower($andor)==='and' ? 'and' : 'or';
45
+        $andor = strtolower($andor) === 'and' ? 'and' : 'or';
46 46
 
47 47
         $qb = \Xoops::getInstance()->db()->createXoopsQueryBuilder();
48 48
         $eb = $qb->expr();
@@ -55,8 +55,8 @@  discard block
 block discarded – undo
55 55
         if (is_array($queryArray) && !empty($queryArray)) {
56 56
             $queryParts = array();
57 57
             foreach ($queryArray as $i => $q) {
58
-                $qterm = ':qterm' . $i;
59
-                $qb->setParameter($qterm, '%' . $q . '%', \PDO::PARAM_STR);
58
+                $qterm = ':qterm'.$i;
59
+                $qb->setParameter($qterm, '%'.$q.'%', \PDO::PARAM_STR);
60 60
                 $queryParts[] = $eb -> orX(
61 61
                     $eb->like('content_title', $qterm),
62 62
                     $eb->like('content_text', $qterm),
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
                 $qb->andWhere(call_user_func_array(array($eb, "orX"), $queryParts));
70 70
             }
71 71
         } else {
72
-            $qb->setParameter(':uid', (int) $userid, \PDO::PARAM_INT);
72
+            $qb->setParameter(':uid', (int)$userid, \PDO::PARAM_INT);
73 73
             $qb->andWhere($eb->eq('content_author', ':uid'));
74 74
         }
75 75
 
@@ -77,12 +77,12 @@  discard block
 block discarded – undo
77 77
         $items = array();
78 78
         $result = $qb->execute();
79 79
         while ($myrow = $result->fetch(\PDO::FETCH_ASSOC)) {
80
-            $content = $myrow["content_shorttext"] . "<br /><br />" . $myrow["content_text"];
80
+            $content = $myrow["content_shorttext"]."<br /><br />".$myrow["content_text"];
81 81
             $content = $myts->displayTarea($content);
82 82
             $items[] = array(
83 83
                 'title' => $myrow['content_title'],
84 84
                 'content' => Metagen::getSearchSummary($content, $queryArray),
85
-                'link' => "viewpage.php?id=" . $myrow["content_id"],
85
+                'link' => "viewpage.php?id=".$myrow["content_id"],
86 86
                 'time' => $myrow['content_create'],
87 87
                 'uid' => $myrow['content_author'],
88 88
                 'image' => 'images/logo_small.png',
Please login to merge, or discard this patch.
htdocs/modules/page/class/plugin/comments.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
     public function update($item_id, $total_num)
72 72
     {
73 73
         $db = Xoops::getInstance()->db();
74
-        $sql = 'UPDATE ' . $db->prefix('page_content') . ' SET content_comments = ' . (int)($total_num) . ' WHERE content_id = ' . (int)($item_id);
74
+        $sql = 'UPDATE '.$db->prefix('page_content').' SET content_comments = '.(int)($total_num).' WHERE content_id = '.(int)($item_id);
75 75
         $db->query($sql);
76 76
     }
77 77
 
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
             return $ret;
99 99
         } else {
100 100
             $ret['title'] = $view_content->getVar('content_title');
101
-            $ret['text'] = $view_content->getVar('content_shorttext') . $view_content->getVar('content_text');
101
+            $ret['text'] = $view_content->getVar('content_shorttext').$view_content->getVar('content_text');
102 102
             $ret['uid'] = $view_content->getVar('content_author');
103 103
             $ret['timestamp'] = $view_content->getVar('content_create');
104 104
         }
Please login to merge, or discard this patch.
htdocs/modules/page/class/page_related_link.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
     public function DeleteByIds($links_ids)
107 107
     {
108 108
         $criteria = new CriteriaCompo();
109
-        $criteria->add(new Criteria('link_id', '(' . implode(', ', $links_ids) . ')', 'IN'));
109
+        $criteria->add(new Criteria('link_id', '('.implode(', ', $links_ids).')', 'IN'));
110 110
         return parent::deleteAll($criteria);
111 111
     }
112 112
 
@@ -124,13 +124,13 @@  discard block
 block discarded – undo
124 124
             $keys = array_keys($ret['related_links']);
125 125
             foreach ($keys as $k => $i) {
126 126
                 if ($content_id == $ret['related_links'][$i]['content_id']) {
127
-                    if (($k-1) >= 0) {
128
-                        $ret['prev_id'] = $ret['related_links'][$keys[($k-1)]]['content_id'];
129
-                        $ret['prev_title'] = $ret['related_links'][$keys[($k-1)]]['content_title'];
127
+                    if (($k - 1) >= 0) {
128
+                        $ret['prev_id'] = $ret['related_links'][$keys[($k - 1)]]['content_id'];
129
+                        $ret['prev_title'] = $ret['related_links'][$keys[($k - 1)]]['content_title'];
130 130
                     }
131
-                    if (($k+1) < count($keys)) {
132
-                        $ret['next_id'] = $ret['related_links'][$keys[($k+1)]]['content_id'];
133
-                        $ret['next_title'] = $ret['related_links'][$keys[($k+1)]]['content_title'];
131
+                    if (($k + 1) < count($keys)) {
132
+                        $ret['next_id'] = $ret['related_links'][$keys[($k + 1)]]['content_id'];
133
+                        $ret['next_title'] = $ret['related_links'][$keys[($k + 1)]]['content_title'];
134 134
                     }
135 135
                     break;
136 136
                 }
Please login to merge, or discard this patch.
htdocs/modules/page/class/groupperm.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@
 block discarded – undo
55 55
             $criteria->add(new Criteria('gperm_itemid', $content_id));
56 56
             $criteria->add(new Criteria('gperm_modid', $module_id));
57 57
             $criteria->add(new Criteria('gperm_name', 'page_view_item', '='));
58
-            $criteria->add(new Criteria('gperm_groupid', '(' . implode(', ', $groups_delete) . ')', 'IN'));
58
+            $criteria->add(new Criteria('gperm_groupid', '('.implode(', ', $groups_delete).')', 'IN'));
59 59
             if (parent::deleteAll($criteria)) {
60 60
             }
61 61
         }
Please login to merge, or discard this patch.
htdocs/modules/page/class/page_related.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
     public function getValues($keys = null, $format = null, $maxDepth = null)
41 41
     {
42 42
         $ret = parent::getValues($keys, $format, $maxDepth);
43
-        $ret['navigation'] = \Xoops\Locale::translate('L_RELATED_NAVIGATION_OPTION' . $this->getVar('related_navigation'), 'page');
43
+        $ret['navigation'] = \Xoops\Locale::translate('L_RELATED_NAVIGATION_OPTION'.$this->getVar('related_navigation'), 'page');
44 44
         $ret['related_links'] = Page::getInstance()->getLinkHandler()->getLinks($this->getVar('related_id'));
45 45
         return $ret;
46 46
     }
Please login to merge, or discard this patch.