@@ -102,7 +102,7 @@ |
||
102 | 102 | $this->synchronizeTable($tableName); |
103 | 103 | $updateTable = $GLOBALS['xoopsDB']->prefix($tableName); |
104 | 104 | $joinTable = $GLOBALS['xoopsDB']->prefix($srcTableName); |
105 | - $sql = "UPDATE `$updateTable` t1 INNER JOIN `$joinTable` t2 ON t1.post_id = t2.post_id \n" . "SET t1.dohtml = t2.dohtml, t1.dosmiley = t2.dosmiley, t1.doxcode = t2.doxcode\n" . ' , t1.doimage = t2.doimage, t1.dobr = t2.dobr'; |
|
105 | + $sql = "UPDATE `$updateTable` t1 INNER JOIN `$joinTable` t2 ON t1.post_id = t2.post_id \n"."SET t1.dohtml = t2.dohtml, t1.dosmiley = t2.dosmiley, t1.doxcode = t2.doxcode\n".' , t1.doimage = t2.doimage, t1.dobr = t2.dobr'; |
|
106 | 106 | $this->tableHandler->addToQueue($sql); |
107 | 107 | } |
108 | 108 | } |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | { |
59 | 59 | $id = (int)$id; |
60 | 60 | $post = null; |
61 | - $sql = 'SELECT p.*, t.* FROM ' . $this->db->prefix('newbb_posts') . ' p LEFT JOIN ' . $this->db->prefix('newbb_posts_text') . ' t ON p.post_id=t.post_id WHERE p.post_id=' . $id; |
|
61 | + $sql = 'SELECT p.*, t.* FROM '.$this->db->prefix('newbb_posts').' p LEFT JOIN '.$this->db->prefix('newbb_posts_text').' t ON p.post_id=t.post_id WHERE p.post_id='.$id; |
|
62 | 62 | if ($array = $this->db->fetchArray($this->db->query($sql))) { |
63 | 63 | $post = $this->create(false); |
64 | 64 | $post->assignVars($array); |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | $topic_id = 0, |
88 | 88 | $approved = 1 |
89 | 89 | ) { |
90 | - $sql = 'SELECT p.*, t.*, tp.topic_status FROM ' |
|
90 | + $sql = 'SELECT p.*, t.*, tp.topic_status FROM ' |
|
91 | 91 | . $this->db->prefix('newbb_posts') |
92 | 92 | . ' p LEFT JOIN ' |
93 | 93 | . $this->db->prefix('newbb_posts_text') |
@@ -380,14 +380,14 @@ discard block |
||
380 | 380 | |
381 | 381 | /* Set active post as deleted */ |
382 | 382 | if ($post->getVar('approved') > 0 && empty($force)) { |
383 | - $sql = 'UPDATE ' . $this->db->prefix('newbb_posts') . ' SET approved = -1 WHERE post_id = ' . $post->getVar('post_id'); |
|
383 | + $sql = 'UPDATE '.$this->db->prefix('newbb_posts').' SET approved = -1 WHERE post_id = '.$post->getVar('post_id'); |
|
384 | 384 | if (!$result = $this->db->queryF($sql)) { |
385 | 385 | } |
386 | 386 | /* delete pending post directly */ |
387 | 387 | } else { |
388 | 388 | $sql = sprintf('DELETE FROM `%s` WHERE post_id = %u', $this->db->prefix('newbb_posts'), $post->getVar('post_id')); |
389 | 389 | if (!$result = $this->db->queryF($sql)) { |
390 | - $post->setErrors('delete post error: ' . $sql); |
|
390 | + $post->setErrors('delete post error: '.$sql); |
|
391 | 391 | |
392 | 392 | return false; |
393 | 393 | } |
@@ -395,7 +395,7 @@ discard block |
||
395 | 395 | |
396 | 396 | $sql = sprintf('DELETE FROM %s WHERE post_id = %u', $this->db->prefix('newbb_posts_text'), $post->getVar('post_id')); |
397 | 397 | if (!$result = $this->db->queryF($sql)) { |
398 | - $post->setErrors('Could not remove post text: ' . $sql); |
|
398 | + $post->setErrors('Could not remove post text: '.$sql); |
|
399 | 399 | |
400 | 400 | return false; |
401 | 401 | } |
@@ -432,11 +432,11 @@ discard block |
||
432 | 432 | } |
433 | 433 | } |
434 | 434 | } else { |
435 | - $sql = 'UPDATE ' . $this->db->prefix('newbb_topics') . ' t |
|
436 | - LEFT JOIN ' . $this->db->prefix('newbb_posts') . ' p ON p.topic_id = t.topic_id |
|
435 | + $sql = 'UPDATE '.$this->db->prefix('newbb_topics').' t |
|
436 | + LEFT JOIN ' . $this->db->prefix('newbb_posts').' p ON p.topic_id = t.topic_id |
|
437 | 437 | SET t.topic_last_post_id = p.post_id |
438 | - WHERE t.topic_last_post_id = ' . $post->getVar('post_id') . ' |
|
439 | - AND p.post_id = (SELECT MAX(post_id) FROM ' . $this->db->prefix('newbb_posts') . ' WHERE topic_id=t.topic_id)'; |
|
438 | + WHERE t.topic_last_post_id = ' . $post->getVar('post_id').' |
|
439 | + AND p.post_id = (SELECT MAX(post_id) FROM ' . $this->db->prefix('newbb_posts').' WHERE topic_id=t.topic_id)'; |
|
440 | 440 | if (!$result = $this->db->queryF($sql)) { |
441 | 441 | } |
442 | 442 | } |
@@ -458,7 +458,7 @@ discard block |
||
458 | 458 | } |
459 | 459 | // irmtfan - just update the pid for approved posts when the post is not topic (pid=0) |
460 | 460 | if (!$post->isTopic()) { |
461 | - $sql = 'UPDATE ' . $this->db->prefix('newbb_posts') . ' SET pid = ' . $post->getVar('pid') . ' WHERE approved=1 AND pid=' . $post->getVar('post_id'); |
|
461 | + $sql = 'UPDATE '.$this->db->prefix('newbb_posts').' SET pid = '.$post->getVar('pid').' WHERE approved=1 AND pid='.$post->getVar('post_id'); |
|
462 | 462 | if (!$result = $this->db->queryF($sql)) { |
463 | 463 | //xoops_error($this->db->error()); |
464 | 464 | } |
@@ -482,12 +482,12 @@ discard block |
||
482 | 482 | return parent::getCount($criteria); |
483 | 483 | } |
484 | 484 | |
485 | - $sql = 'SELECT COUNT(*) as count' . ' FROM ' . $this->db->prefix('newbb_posts') . ' AS p' . ' LEFT JOIN ' . $this->db->prefix('newbb_posts_text') . ' AS t ON t.post_id = p.post_id'; |
|
485 | + $sql = 'SELECT COUNT(*) as count'.' FROM '.$this->db->prefix('newbb_posts').' AS p'.' LEFT JOIN '.$this->db->prefix('newbb_posts_text').' AS t ON t.post_id = p.post_id'; |
|
486 | 486 | // LEFT JOIN |
487 | 487 | $sql .= $join; |
488 | 488 | // WHERE |
489 | 489 | if (isset($criteria) && is_subclass_of($criteria, 'CriteriaElement')) { |
490 | - $sql .= ' ' . $criteria->renderWhere(); |
|
490 | + $sql .= ' '.$criteria->renderWhere(); |
|
491 | 491 | } |
492 | 492 | if (!$result = $this->db->query($sql)) { |
493 | 493 | //xoops_error($this->db->error().'<br>'.$sql); |
@@ -512,14 +512,14 @@ discard block |
||
512 | 512 | public function getPostsByLimit($criteria = null, $limit = 1, $start = 0, $join = null) |
513 | 513 | { |
514 | 514 | $ret = []; |
515 | - $sql = 'SELECT p.*, t.* ' . ' FROM ' . $this->db->prefix('newbb_posts') . ' AS p' . ' LEFT JOIN ' . $this->db->prefix('newbb_posts_text') . ' AS t ON t.post_id = p.post_id'; |
|
515 | + $sql = 'SELECT p.*, t.* '.' FROM '.$this->db->prefix('newbb_posts').' AS p'.' LEFT JOIN '.$this->db->prefix('newbb_posts_text').' AS t ON t.post_id = p.post_id'; |
|
516 | 516 | if (!empty($join)) { |
517 | 517 | $sql .= $join; |
518 | 518 | } |
519 | 519 | if (isset($criteria) && is_subclass_of($criteria, 'CriteriaElement')) { |
520 | - $sql .= ' ' . $criteria->renderWhere(); |
|
520 | + $sql .= ' '.$criteria->renderWhere(); |
|
521 | 521 | if ('' !== $criteria->getSort()) { |
522 | - $sql .= ' ORDER BY ' . $criteria->getSort() . ' ' . $criteria->getOrder(); |
|
522 | + $sql .= ' ORDER BY '.$criteria->getSort().' '.$criteria->getOrder(); |
|
523 | 523 | } |
524 | 524 | } |
525 | 525 | $result = $this->db->query($sql, (int)$limit, (int)$start); |
@@ -560,7 +560,7 @@ discard block |
||
560 | 560 | parent::cleanOrphan($this->db->prefix('newbb_topics'), 'topic_id'); |
561 | 561 | parent::cleanOrphan($this->db->prefix('newbb_posts_text'), 'post_id'); |
562 | 562 | |
563 | - $sql = 'DELETE FROM ' . $this->db->prefix('newbb_posts_text') . ' WHERE (post_id NOT IN ( SELECT DISTINCT post_id FROM ' . $this->table . ') )'; |
|
563 | + $sql = 'DELETE FROM '.$this->db->prefix('newbb_posts_text').' WHERE (post_id NOT IN ( SELECT DISTINCT post_id FROM '.$this->table.') )'; |
|
564 | 564 | if (!$result = $this->db->queryF($sql)) { |
565 | 565 | //xoops_error($this->db->error()); |
566 | 566 | return false; |
@@ -88,16 +88,16 @@ |
||
88 | 88 | $approved = 1 |
89 | 89 | ) { |
90 | 90 | $sql = 'SELECT p.*, t.*, tp.topic_status FROM ' |
91 | - . $this->db->prefix('newbb_posts') |
|
92 | - . ' p LEFT JOIN ' |
|
93 | - . $this->db->prefix('newbb_posts_text') |
|
94 | - . ' t ON p.post_id=t.post_id LEFT JOIN ' |
|
95 | - . $this->db->prefix('newbb_topics') |
|
96 | - . ' tp ON tp.topic_id=p.topic_id WHERE p.topic_id=' |
|
97 | - . $topic_id |
|
98 | - . ' AND p.approved =' |
|
99 | - . $approved |
|
100 | - . ' ORDER BY p.post_time DESC'; |
|
91 | + . $this->db->prefix('newbb_posts') |
|
92 | + . ' p LEFT JOIN ' |
|
93 | + . $this->db->prefix('newbb_posts_text') |
|
94 | + . ' t ON p.post_id=t.post_id LEFT JOIN ' |
|
95 | + . $this->db->prefix('newbb_topics') |
|
96 | + . ' tp ON tp.topic_id=p.topic_id WHERE p.topic_id=' |
|
97 | + . $topic_id |
|
98 | + . ' AND p.approved =' |
|
99 | + . $approved |
|
100 | + . ' ORDER BY p.post_time DESC'; |
|
101 | 101 | $result = $this->db->query($sql, $limit, 0); |
102 | 102 | $ret = []; |
103 | 103 | while (false !== ($myrow = $this->db->fetchArray($result))) { |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | // $start = 0; |
87 | 87 | // } |
88 | 88 | |
89 | - $sql = 'SELECT * FROM ' . $this->db->prefix('newbb_digest') . ' ORDER BY digest_id DESC'; |
|
89 | + $sql = 'SELECT * FROM '.$this->db->prefix('newbb_digest').' ORDER BY digest_id DESC'; |
|
90 | 90 | $result = $this->db->query($sql, $perpage, $start); |
91 | 91 | $ret = []; |
92 | 92 | // $reportHandler = Newbb\Helper::getInstance()->getHandler('Report'); |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | */ |
103 | 103 | public function getDigestCount() |
104 | 104 | { |
105 | - $sql = 'SELECT COUNT(*) AS count FROM ' . $this->db->prefix('newbb_digest'); |
|
105 | + $sql = 'SELECT COUNT(*) AS count FROM '.$this->db->prefix('newbb_digest'); |
|
106 | 106 | $result = $this->db->query($sql); |
107 | 107 | if (!$result) { |
108 | 108 | return 0; |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | |
116 | 116 | public function getLastDigest() |
117 | 117 | { |
118 | - $sql = 'SELECT MAX(digest_time) AS last_digest FROM ' . $this->db->prefix('newbb_digest'); |
|
118 | + $sql = 'SELECT MAX(digest_time) AS last_digest FROM '.$this->db->prefix('newbb_digest'); |
|
119 | 119 | $result = $this->db->query($sql); |
120 | 120 | if (!$result) { |
121 | 121 | $this->last_digest = 0; |
@@ -206,9 +206,9 @@ discard block |
||
206 | 206 | $GLOBALS['xoopsUser'] = $thisUser; |
207 | 207 | |
208 | 208 | $accessForums = $forumHandler->getIdsByPermission(); // get all accessible forums |
209 | - $forumCriteria = ' AND t.forum_id IN (' . implode(',', $accessForums) . ')'; |
|
209 | + $forumCriteria = ' AND t.forum_id IN ('.implode(',', $accessForums).')'; |
|
210 | 210 | $approveCriteria = ' AND t.approved = 1 AND p.approved = 1'; |
211 | - $time_criteria = ' AND t.digest_time > ' . $this->last_digest; |
|
211 | + $time_criteria = ' AND t.digest_time > '.$this->last_digest; |
|
212 | 212 | |
213 | 213 | $karma_criteria = $GLOBALS['xoopsModuleConfig']['enable_karma'] ? ' AND p.post_karma=0' : ''; |
214 | 214 | $reply_criteria = $GLOBALS['xoopsModuleConfig']['allow_require_reply'] ? ' AND p.require_reply=0' : ''; |
@@ -243,7 +243,7 @@ discard block |
||
243 | 243 | if (count($uids) > 0) { |
244 | 244 | /** @var \XoopsMemberHandler $memberHandler */ |
245 | 245 | $memberHandler = xoops_getHandler('member'); |
246 | - $user_criteria = new \Criteria('uid', '(' . implode(',', $uids) . ')', 'IN'); |
|
246 | + $user_criteria = new \Criteria('uid', '('.implode(',', $uids).')', 'IN'); |
|
247 | 247 | $users = $memberHandler->getUsers($user_criteria, true); |
248 | 248 | } else { |
249 | 249 | $users = []; |
@@ -261,8 +261,8 @@ discard block |
||
261 | 261 | $topic['uname'] = $topic['poster_name'] ?: $GLOBALS['xoopsConfig']['anonymous']; |
262 | 262 | } |
263 | 263 | $summary = \Xmf\Metagen::generateDescription($topic['post_text'], SUMMARY_LENGTH); |
264 | - $author = $topic['uname'] . ' (' . formatTimestamp($topic['topic_time']) . ')'; |
|
265 | - $link = XOOPS_URL . '/modules/' . $xoopsModule->dirname() . '/viewtopic.php?topic_id=' . $topic['topic_id'] . '&forum=' . $topic['forum_id']; |
|
264 | + $author = $topic['uname'].' ('.formatTimestamp($topic['topic_time']).')'; |
|
265 | + $link = XOOPS_URL.'/modules/'.$xoopsModule->dirname().'/viewtopic.php?topic_id='.$topic['topic_id'].'&forum='.$topic['forum_id']; |
|
266 | 266 | $title = $topic['topic_title']; |
267 | 267 | $digest->addItem($title, $link, $author, $summary); |
268 | 268 | } |
@@ -214,18 +214,18 @@ |
||
214 | 214 | $reply_criteria = $GLOBALS['xoopsModuleConfig']['allow_require_reply'] ? ' AND p.require_reply=0' : ''; |
215 | 215 | |
216 | 216 | $query = 'SELECT t.topic_id, t.forum_id, t.topic_title, t.topic_time, t.digest_time, p.uid, p.poster_name, pt.post_text FROM ' |
217 | - . $this->db->prefix('newbb_topics') |
|
218 | - . ' t, ' |
|
219 | - . $this->db->prefix('newbb_posts_text') |
|
220 | - . ' pt, ' |
|
221 | - . $this->db->prefix('newbb_posts') |
|
222 | - . ' p WHERE t.topic_digest = 1 AND p.topic_id=t.topic_id AND p.pid=0 ' |
|
223 | - . $forumCriteria |
|
224 | - . $approveCriteria |
|
225 | - . $time_criteria |
|
226 | - . $karma_criteria |
|
227 | - . $reply_criteria |
|
228 | - . ' AND pt.post_id=p.post_id ORDER BY t.digest_time DESC'; |
|
217 | + . $this->db->prefix('newbb_topics') |
|
218 | + . ' t, ' |
|
219 | + . $this->db->prefix('newbb_posts_text') |
|
220 | + . ' pt, ' |
|
221 | + . $this->db->prefix('newbb_posts') |
|
222 | + . ' p WHERE t.topic_digest = 1 AND p.topic_id=t.topic_id AND p.pid=0 ' |
|
223 | + . $forumCriteria |
|
224 | + . $approveCriteria |
|
225 | + . $time_criteria |
|
226 | + . $karma_criteria |
|
227 | + . $reply_criteria |
|
228 | + . ' AND pt.post_id=p.post_id ORDER BY t.digest_time DESC'; |
|
229 | 229 | if (!$result = $this->db->query($query)) { |
230 | 230 | //echo "<br>No result:<br>$query"; |
231 | 231 | return false; |
@@ -124,27 +124,27 @@ |
||
124 | 124 | $approveCriteria = ' AND t.approved = 1 AND p.approved = 1'; |
125 | 125 | |
126 | 126 | $query = 'SELECT' |
127 | - . ' f.forum_id, f.forum_name,' |
|
128 | - . ' t.topic_id, t.topic_title, t.type_id,' |
|
129 | - . ' p.post_id, p.post_time, p.subject, p.uid, p.poster_name, p.post_karma, p.require_reply, ' |
|
130 | - . ' pt.dohtml, pt.dosmiley, pt.doxcode, pt.dobr,' |
|
131 | - . ' pt.post_text' |
|
132 | - . ' FROM ' |
|
133 | - . $GLOBALS['xoopsDB']->prefix('newbb_posts') |
|
134 | - . ' AS p' |
|
135 | - . ' LEFT JOIN ' |
|
136 | - . $GLOBALS['xoopsDB']->prefix('newbb_topics') |
|
137 | - . ' AS t ON t.topic_last_post_id=p.post_id' |
|
138 | - . ' LEFT JOIN ' |
|
139 | - . $GLOBALS['xoopsDB']->prefix('newbb_posts_text') |
|
140 | - . ' AS pt ON pt.post_id=p.post_id' |
|
141 | - . ' LEFT JOIN ' |
|
142 | - . $GLOBALS['xoopsDB']->prefix('newbb_forums') |
|
143 | - . ' AS f ON f.forum_id=p.forum_id' |
|
144 | - . ' WHERE 1=1 ' |
|
145 | - . $forumCriteria |
|
146 | - . $approveCriteria |
|
147 | - . ' ORDER BY p.post_id DESC'; |
|
127 | + . ' f.forum_id, f.forum_name,' |
|
128 | + . ' t.topic_id, t.topic_title, t.type_id,' |
|
129 | + . ' p.post_id, p.post_time, p.subject, p.uid, p.poster_name, p.post_karma, p.require_reply, ' |
|
130 | + . ' pt.dohtml, pt.dosmiley, pt.doxcode, pt.dobr,' |
|
131 | + . ' pt.post_text' |
|
132 | + . ' FROM ' |
|
133 | + . $GLOBALS['xoopsDB']->prefix('newbb_posts') |
|
134 | + . ' AS p' |
|
135 | + . ' LEFT JOIN ' |
|
136 | + . $GLOBALS['xoopsDB']->prefix('newbb_topics') |
|
137 | + . ' AS t ON t.topic_last_post_id=p.post_id' |
|
138 | + . ' LEFT JOIN ' |
|
139 | + . $GLOBALS['xoopsDB']->prefix('newbb_posts_text') |
|
140 | + . ' AS pt ON pt.post_id=p.post_id' |
|
141 | + . ' LEFT JOIN ' |
|
142 | + . $GLOBALS['xoopsDB']->prefix('newbb_forums') |
|
143 | + . ' AS f ON f.forum_id=p.forum_id' |
|
144 | + . ' WHERE 1=1 ' |
|
145 | + . $forumCriteria |
|
146 | + . $approveCriteria |
|
147 | + . ' ORDER BY p.post_id DESC'; |
|
148 | 148 | $limit = (int)($GLOBALS['xoopsModuleConfig']['rss_maxitems'] * 1.5); |
149 | 149 | if (!$result = $GLOBALS['xoopsDB']->query($query, $limit)) { |
150 | 150 | newbbTrackbackResponse(1, _MD_NEWBB_ERROR); |
@@ -31,12 +31,12 @@ discard block |
||
31 | 31 | |
32 | 32 | use Xmf\Request; |
33 | 33 | |
34 | -require_once __DIR__ . '/header.php'; |
|
34 | +require_once __DIR__.'/header.php'; |
|
35 | 35 | require_once $GLOBALS['xoops']->path('class/template.php'); |
36 | 36 | require_once $GLOBALS['xoops']->path('modules/newbb/include/functions.rpc.php'); |
37 | 37 | |
38 | 38 | if (!empty($GLOBALS['xoopsModuleConfig']['do_rewrite'])) { |
39 | - require_once __DIR__ . '/seo_url.php'; |
|
39 | + require_once __DIR__.'/seo_url.php'; |
|
40 | 40 | } |
41 | 41 | /* for seo */ |
42 | 42 | |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | $validForums = array_intersect($forums, $validForums); |
60 | 60 | } elseif ($category > 0) { |
61 | 61 | $crit_top = new \CriteriaCompo(new \Criteria('cat_id', $category)); |
62 | - $crit_top->add(new \Criteria('forum_id', '(' . implode(', ', $validForums) . ')', 'IN')); |
|
62 | + $crit_top->add(new \Criteria('forum_id', '('.implode(', ', $validForums).')', 'IN')); |
|
63 | 63 | $forums_top = $forumHandler->getIds($crit_top); |
64 | 64 | $validForums = array_intersect($forums_top, $validForums); |
65 | 65 | } |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | $forumSet = implode(',', $validForums); |
72 | 72 | |
73 | 73 | $charset = 'UTF-8'; |
74 | -header('Content-Type:text/xml; charset=' . $charset); |
|
74 | +header('Content-Type:text/xml; charset='.$charset); |
|
75 | 75 | |
76 | 76 | $tpl = new \XoopsTpl(); |
77 | 77 | $tpl->caching = 2; |
@@ -84,25 +84,25 @@ discard block |
||
84 | 84 | $xoopsCachedTemplateId = "newbbb_rss_$forumSet"; |
85 | 85 | $compile_id = null; |
86 | 86 | if (!$tpl->is_cached('db:newbb_rss.tpl', $xoopsCachedTemplateId, $compile_id)) { |
87 | - require_once __DIR__ . '/include/functions.time.php'; |
|
87 | + require_once __DIR__.'/include/functions.time.php'; |
|
88 | 88 | |
89 | 89 | // /** @var Newbb\XmlrssHandler $xmlrssHandler */ |
90 | 90 | // $xmlrssHandler = Newbb\Helper::getInstance()->getHandler('Xmlrss'); |
91 | 91 | $rss = $xmlrssHandler->create(); |
92 | 92 | |
93 | - $rss->setVarRss('channel_title', $GLOBALS['xoopsConfig']['sitename'] . ' :: ' . _MD_NEWBB_FORUM); |
|
94 | - $rss->channel_link = XOOPS_URL . '/'; |
|
95 | - $rss->setVarRss('channel_desc', $GLOBALS['xoopsConfig']['slogan'] . ' :: ' . $xoopsModule->getInfo('description')); |
|
93 | + $rss->setVarRss('channel_title', $GLOBALS['xoopsConfig']['sitename'].' :: '._MD_NEWBB_FORUM); |
|
94 | + $rss->channel_link = XOOPS_URL.'/'; |
|
95 | + $rss->setVarRss('channel_desc', $GLOBALS['xoopsConfig']['slogan'].' :: '.$xoopsModule->getInfo('description')); |
|
96 | 96 | $rss->setVarRss('channel_lastbuild', formatTimestamp(time(), 'rss')); |
97 | 97 | $rss->channel_webmaster = $GLOBALS['xoopsConfig']['adminmail']; |
98 | 98 | $rss->channel_editor = $GLOBALS['xoopsConfig']['adminmail']; |
99 | 99 | $rss->setVarRss('channel_category', $xoopsModule->getVar('name')); |
100 | - $rss->channel_generator = 'NewBB ' . $xoopsModule->getInfo('version'); |
|
100 | + $rss->channel_generator = 'NewBB '.$xoopsModule->getInfo('version'); |
|
101 | 101 | $rss->channel_language = _LANGCODE; |
102 | 102 | $rss->xml_encoding = $charset; |
103 | - $rss->image_url = XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/' . $xoopsModule->getInfo('image'); |
|
103 | + $rss->image_url = XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/'.$xoopsModule->getInfo('image'); |
|
104 | 104 | |
105 | - $dimension = @getimagesize($GLOBALS['xoops']->path('modules/' . $xoopsModule->getVar('dirname') . '/' . $xoopsModule->getInfo('image'))); |
|
105 | + $dimension = @getimagesize($GLOBALS['xoops']->path('modules/'.$xoopsModule->getVar('dirname').'/'.$xoopsModule->getInfo('image'))); |
|
106 | 106 | if (empty($dimension[0])) { |
107 | 107 | $width = 88; |
108 | 108 | } else { |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | $rss->max_items = $GLOBALS['xoopsModuleConfig']['rss_maxitems']; |
120 | 120 | $rss->max_item_description = $GLOBALS['xoopsModuleConfig']['rss_maxdescription']; |
121 | 121 | |
122 | - $forumCriteria = ' AND t.forum_id IN (' . implode(',', $validForums) . ')'; |
|
122 | + $forumCriteria = ' AND t.forum_id IN ('.implode(',', $validForums).')'; |
|
123 | 123 | unset($validForums); |
124 | 124 | $approveCriteria = ' AND t.approved = 1 AND p.approved = 1'; |
125 | 125 | |
@@ -169,7 +169,7 @@ discard block |
||
169 | 169 | if (count($types) > 0) { |
170 | 170 | // /** @var Newbb\TypeHandler $typeHandler */ |
171 | 171 | // $typeHandler = Newbb\Helper::getInstance()->getHandler('Type'); |
172 | - $type_list = $typeHandler->getList(new \Criteria('type_id', '(' . implode(', ', array_keys($types)) . ')', 'IN')); |
|
172 | + $type_list = $typeHandler->getList(new \Criteria('type_id', '('.implode(', ', array_keys($types)).')', 'IN')); |
|
173 | 173 | } |
174 | 174 | |
175 | 175 | foreach ($rows as $topic) { |
@@ -184,16 +184,16 @@ discard block |
||
184 | 184 | } else { |
185 | 185 | $topic['uname'] = $topic['poster_name'] ? $myts->htmlSpecialChars($topic['poster_name']) : $myts->htmlSpecialChars($GLOBALS['xoopsConfig']['anonymous']); |
186 | 186 | } |
187 | - $description = $topic['forum_name'] . '::'; |
|
188 | - $topic['topic_subject'] = empty($type_list[$topic['type_id']]) ? '' : '[' . $type_list[$topic['type_id']] . '] '; |
|
189 | - $description .= $topic['topic_subject'] . $topic['topic_title'] . "<br>\n"; |
|
187 | + $description = $topic['forum_name'].'::'; |
|
188 | + $topic['topic_subject'] = empty($type_list[$topic['type_id']]) ? '' : '['.$type_list[$topic['type_id']].'] '; |
|
189 | + $description .= $topic['topic_subject'].$topic['topic_title']."<br>\n"; |
|
190 | 190 | $description .= $myts->displayTarea($topic['post_text'], $topic['dohtml'], $topic['dosmiley'], $topic['doxcode'], $topic['dobr']); |
191 | - $label = _MD_NEWBB_BY . ' ' . $topic['uname']; |
|
191 | + $label = _MD_NEWBB_BY.' '.$topic['uname']; |
|
192 | 192 | $time = formatTimestamp($topic['post_time'], 'rss'); |
193 | - $link = XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/viewtopic.php?post_id=' . $topic['post_id'] . ''; |
|
193 | + $link = XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/viewtopic.php?post_id='.$topic['post_id'].''; |
|
194 | 194 | if (!empty($GLOBALS['xoopsModuleConfig']['do_rewrite'])) { |
195 | - $link = XOOPS_URL . '/' . REAL_MODULE_NAME . '/viewtopic.php?post_id=' . $topic['post_id'] . ''; |
|
196 | - $oldurl = '<a href=\'' . $link . '\'>'; |
|
195 | + $link = XOOPS_URL.'/'.REAL_MODULE_NAME.'/viewtopic.php?post_id='.$topic['post_id'].''; |
|
196 | + $oldurl = '<a href=\''.$link.'\'>'; |
|
197 | 197 | $newurl = seo_urls($oldurl); |
198 | 198 | $newurl = str_replace('<a href=\'', '', $newurl); |
199 | 199 | $newurl = str_replace('\'>', '', $newurl); |
@@ -115,25 +115,25 @@ discard block |
||
115 | 115 | } |
116 | 116 | |
117 | 117 | $query = 'SELECT' |
118 | - . ' t.topic_id, t.topic_replies, t.forum_id, t.topic_title, t.topic_views, t.type_id,' |
|
119 | - . ' f.forum_name,t.topic_status,' |
|
120 | - . ' p.post_id, p.post_time, p.icon, p.uid, p.poster_name' |
|
121 | - . ' FROM ' |
|
122 | - . $GLOBALS['xoopsDB']->prefix('newbb_topics') |
|
123 | - . ' AS t ' |
|
124 | - . ' LEFT JOIN ' |
|
125 | - . $GLOBALS['xoopsDB']->prefix('newbb_posts') |
|
126 | - . ' AS p ON t.topic_last_post_id=p.post_id' |
|
127 | - . ' LEFT JOIN ' |
|
128 | - . $GLOBALS['xoopsDB']->prefix('newbb_forums') |
|
129 | - . ' AS f ON f.forum_id=t.forum_id' |
|
130 | - . ' WHERE 1=1 ' |
|
131 | - . $forumCriteria |
|
132 | - . $approveCriteria |
|
133 | - . $extraCriteria |
|
134 | - . ' ORDER BY ' |
|
135 | - . $order |
|
136 | - . ' DESC'; |
|
118 | + . ' t.topic_id, t.topic_replies, t.forum_id, t.topic_title, t.topic_views, t.type_id,' |
|
119 | + . ' f.forum_name,t.topic_status,' |
|
120 | + . ' p.post_id, p.post_time, p.icon, p.uid, p.poster_name' |
|
121 | + . ' FROM ' |
|
122 | + . $GLOBALS['xoopsDB']->prefix('newbb_topics') |
|
123 | + . ' AS t ' |
|
124 | + . ' LEFT JOIN ' |
|
125 | + . $GLOBALS['xoopsDB']->prefix('newbb_posts') |
|
126 | + . ' AS p ON t.topic_last_post_id=p.post_id' |
|
127 | + . ' LEFT JOIN ' |
|
128 | + . $GLOBALS['xoopsDB']->prefix('newbb_forums') |
|
129 | + . ' AS f ON f.forum_id=t.forum_id' |
|
130 | + . ' WHERE 1=1 ' |
|
131 | + . $forumCriteria |
|
132 | + . $approveCriteria |
|
133 | + . $extraCriteria |
|
134 | + . ' ORDER BY ' |
|
135 | + . $order |
|
136 | + . ' DESC'; |
|
137 | 137 | |
138 | 138 | $result = $GLOBALS['xoopsDB']->query($query, $options[1], 0); |
139 | 139 | |
@@ -306,21 +306,21 @@ discard block |
||
306 | 306 | $approveCriteria = ' AND t.approved = 1'; |
307 | 307 | |
308 | 308 | $query = 'SELECT' |
309 | - . ' t.topic_id, t.topic_replies, t.forum_id, t.topic_title, t.topic_views, t.type_id, t.topic_time, t.topic_poster, t.poster_name,' |
|
310 | - . ' f.forum_name' |
|
311 | - . ' FROM ' |
|
312 | - . $GLOBALS['xoopsDB']->prefix('newbb_topics') |
|
313 | - . ' AS t ' |
|
314 | - . ' LEFT JOIN ' |
|
315 | - . $GLOBALS['xoopsDB']->prefix('newbb_forums') |
|
316 | - . ' AS f ON f.forum_id=t.forum_id' |
|
317 | - . ' WHERE 1=1 ' |
|
318 | - . $forumCriteria |
|
319 | - . $approveCriteria |
|
320 | - . $extraCriteria |
|
321 | - . ' ORDER BY ' |
|
322 | - . $order |
|
323 | - . ' DESC'; |
|
309 | + . ' t.topic_id, t.topic_replies, t.forum_id, t.topic_title, t.topic_views, t.type_id, t.topic_time, t.topic_poster, t.poster_name,' |
|
310 | + . ' f.forum_name' |
|
311 | + . ' FROM ' |
|
312 | + . $GLOBALS['xoopsDB']->prefix('newbb_topics') |
|
313 | + . ' AS t ' |
|
314 | + . ' LEFT JOIN ' |
|
315 | + . $GLOBALS['xoopsDB']->prefix('newbb_forums') |
|
316 | + . ' AS f ON f.forum_id=t.forum_id' |
|
317 | + . ' WHERE 1=1 ' |
|
318 | + . $forumCriteria |
|
319 | + . $approveCriteria |
|
320 | + . $extraCriteria |
|
321 | + . ' ORDER BY ' |
|
322 | + . $order |
|
323 | + . ' DESC'; |
|
324 | 324 | |
325 | 325 | $result = $GLOBALS['xoopsDB']->query($query, $options[1], 0); |
326 | 326 |
@@ -56,8 +56,8 @@ discard block |
||
56 | 56 | global $accessForums; |
57 | 57 | global $xoopsLogger; |
58 | 58 | |
59 | - require_once __DIR__ . '/../include/functions.config.php'; |
|
60 | - require_once __DIR__ . '/../include/functions.time.php'; |
|
59 | + require_once __DIR__.'/../include/functions.config.php'; |
|
60 | + require_once __DIR__.'/../include/functions.time.php'; |
|
61 | 61 | |
62 | 62 | $myts = \MyTextSanitizer::getInstance(); |
63 | 63 | $block = []; |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | $extraCriteria = ''; |
67 | 67 | if (!empty($options[2])) { |
68 | 68 | //require_once __DIR__ . '/../include/functions.time.php'; |
69 | - $extraCriteria .= ' AND p.post_time>' . (time() - newbbGetSinceTime($options[2])); |
|
69 | + $extraCriteria .= ' AND p.post_time>'.(time() - newbbGetSinceTime($options[2])); |
|
70 | 70 | } |
71 | 71 | switch ($options[0]) { |
72 | 72 | case 'time': |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | return $block; |
93 | 93 | } |
94 | 94 | |
95 | - $forumCriteria = ' AND t.forum_id IN (' . implode(',', $allowedForums) . ')'; |
|
95 | + $forumCriteria = ' AND t.forum_id IN ('.implode(',', $allowedForums).')'; |
|
96 | 96 | $approveCriteria = ' AND t.approved = 1'; |
97 | 97 | |
98 | 98 | $newbbConfig = newbbLoadConfig(); |
@@ -148,13 +148,13 @@ discard block |
||
148 | 148 | return $block; |
149 | 149 | } |
150 | 150 | |
151 | - require_once __DIR__ . '/../include/functions.user.php'; |
|
151 | + require_once __DIR__.'/../include/functions.user.php'; |
|
152 | 152 | $author_name = newbbGetUnameFromIds(array_keys($author), $newbbConfig['show_realname'], true); |
153 | 153 | |
154 | 154 | if (count($types) > 0) { |
155 | 155 | /** @var Newbb\TypeHandler $typeHandler */ |
156 | 156 | $typeHandler = Newbb\Helper::getInstance()->getHandler('Type'); |
157 | - $type_list = $typeHandler->getList(new \Criteria('type_id', '(' . implode(', ', array_keys($types)) . ')', 'IN')); |
|
157 | + $type_list = $typeHandler->getList(new \Criteria('type_id', '('.implode(', ', array_keys($types)).')', 'IN')); |
|
158 | 158 | } |
159 | 159 | |
160 | 160 | foreach ($rows as $arr) { |
@@ -162,7 +162,7 @@ discard block |
||
162 | 162 | xoops_loadLanguage('main', 'newbb'); |
163 | 163 | $topic = []; |
164 | 164 | $topic_page_jump = newbbDisplayImage('lastposticon', _MD_NEWBB_GOTOLASTPOST); |
165 | - $topic['topic_subject'] = empty($type_list[$arr['type_id']]) ? '' : '[' . $type_list[$arr['type_id']] . ']'; |
|
165 | + $topic['topic_subject'] = empty($type_list[$arr['type_id']]) ? '' : '['.$type_list[$arr['type_id']].']'; |
|
166 | 166 | |
167 | 167 | $topic['post_id'] = $arr['post_id']; |
168 | 168 | $topic['topic_status'] = $arr['topic_status']; |
@@ -174,7 +174,7 @@ discard block |
||
174 | 174 | if (!empty($options[5])) { |
175 | 175 | $title = xoops_substr($title, 0, $options[5]); |
176 | 176 | } |
177 | - $topic['title'] = $topic['topic_subject'] . ' ' . $title; |
|
177 | + $topic['title'] = $topic['topic_subject'].' '.$title; |
|
178 | 178 | $topic['replies'] = $arr['topic_replies']; |
179 | 179 | $topic['views'] = $arr['topic_views']; |
180 | 180 | $topic['time'] = newbbFormatTimestamp($arr['post_time']); |
@@ -186,9 +186,9 @@ discard block |
||
186 | 186 | $topic['topic_poster'] = $topic_poster; |
187 | 187 | $topic['topic_page_jump'] = $topic_page_jump; |
188 | 188 | // START irmtfan remove hardcoded html in URLs - add $seo_topic_url |
189 | - $seo_url = XOOPS_URL . '/' . SEO_MODULE_NAME . '/viewtopic.php?post_id=' . $topic['post_id']; |
|
190 | - $seo_topic_url = XOOPS_URL . '/' . SEO_MODULE_NAME . '/viewtopic.php?topic_id=' . $topic['id']; |
|
191 | - $seo_forum_url = XOOPS_URL . '/' . SEO_MODULE_NAME . '/viewforum.php?forum=' . $topic['forum_id']; |
|
189 | + $seo_url = XOOPS_URL.'/'.SEO_MODULE_NAME.'/viewtopic.php?post_id='.$topic['post_id']; |
|
190 | + $seo_topic_url = XOOPS_URL.'/'.SEO_MODULE_NAME.'/viewtopic.php?topic_id='.$topic['id']; |
|
191 | + $seo_forum_url = XOOPS_URL.'/'.SEO_MODULE_NAME.'/viewforum.php?forum='.$topic['forum_id']; |
|
192 | 192 | if (!empty($newbbConfig['do_rewrite'])) { |
193 | 193 | $topic['seo_url'] = seo_urls($seo_url); |
194 | 194 | $topic['seo_topic_url'] = seo_urls($seo_topic_url); |
@@ -203,11 +203,11 @@ discard block |
||
203 | 203 | unset($topic); |
204 | 204 | } |
205 | 205 | // START irmtfan remove hardcoded html in URLs |
206 | - $seo_top_allforums = XOOPS_URL . '/' . SEO_MODULE_NAME; |
|
206 | + $seo_top_allforums = XOOPS_URL.'/'.SEO_MODULE_NAME; |
|
207 | 207 | $block['seo_top_allforums'] = !empty($newbbConfig['do_rewrite']) ? seo_urls($seo_top_allforums) : $seo_top_allforums; |
208 | - $seo_top_allforums = XOOPS_URL . '/' . SEO_MODULE_NAME . '/list.topic.php'; |
|
208 | + $seo_top_allforums = XOOPS_URL.'/'.SEO_MODULE_NAME.'/list.topic.php'; |
|
209 | 209 | $block['seo_top_alltopics'] = !empty($newbbConfig['do_rewrite']) ? seo_urls($seo_top_allforums) : $seo_top_allforums; |
210 | - $seo_top_allforums = XOOPS_URL . '/' . SEO_MODULE_NAME . '/viewpost.php'; |
|
210 | + $seo_top_allforums = XOOPS_URL.'/'.SEO_MODULE_NAME.'/viewpost.php'; |
|
211 | 211 | $block['seo_top_allposts'] = !empty($newbbConfig['do_rewrite']) ? seo_urls($seo_top_allforums) : $seo_top_allforums; |
212 | 212 | // END irmtfan remove hardcoded html in URLs |
213 | 213 | $block['indexNav'] = (int)$options[4]; |
@@ -230,7 +230,7 @@ discard block |
||
230 | 230 | function b_newbb_topic_show($options) |
231 | 231 | { |
232 | 232 | global $accessForums; |
233 | - require_once __DIR__ . '/../include/functions.time.php'; |
|
233 | + require_once __DIR__.'/../include/functions.time.php'; |
|
234 | 234 | $myts = \MyTextSanitizer::getInstance(); |
235 | 235 | $block = []; |
236 | 236 | $i = 0; |
@@ -239,7 +239,7 @@ discard block |
||
239 | 239 | $time_criteria = null; |
240 | 240 | if (!empty($options[2])) { |
241 | 241 | $time_criteria = time() - newbbGetSinceTime($options[2]); |
242 | - $extraCriteria = ' AND t.topic_time>' . $time_criteria; |
|
242 | + $extraCriteria = ' AND t.topic_time>'.$time_criteria; |
|
243 | 243 | } |
244 | 244 | switch ($options[0]) { |
245 | 245 | case 'views': |
@@ -252,11 +252,11 @@ discard block |
||
252 | 252 | $order = 't.digest_time'; |
253 | 253 | $extraCriteria = ' AND t.topic_digest=1'; |
254 | 254 | if (null !== $time_criteria) { |
255 | - $extraCriteria .= ' AND t.digest_time>' . $time_criteria; |
|
255 | + $extraCriteria .= ' AND t.digest_time>'.$time_criteria; |
|
256 | 256 | } |
257 | 257 | break; |
258 | 258 | case 'sticky': |
259 | - $order = 't.topic_id'; |
|
259 | + $order = 't.topic_id'; |
|
260 | 260 | $extraCriteria .= ' AND t.topic_sticky=1'; |
261 | 261 | break; |
262 | 262 | case 'time': |
@@ -292,7 +292,7 @@ discard block |
||
292 | 292 | return false; |
293 | 293 | } |
294 | 294 | |
295 | - $forumCriteria = ' AND t.forum_id IN (' . implode(',', $allowedForums) . ')'; |
|
295 | + $forumCriteria = ' AND t.forum_id IN ('.implode(',', $allowedForums).')'; |
|
296 | 296 | $approveCriteria = ' AND t.approved = 1'; |
297 | 297 | |
298 | 298 | $query = 'SELECT' |
@@ -332,19 +332,19 @@ discard block |
||
332 | 332 | if (count($rows) < 1) { |
333 | 333 | return $block; |
334 | 334 | } |
335 | - require_once __DIR__ . '/../include/functions.user.php'; |
|
335 | + require_once __DIR__.'/../include/functions.user.php'; |
|
336 | 336 | $author_name = newbbGetUnameFromIds(array_keys($author), $newbbConfig['show_realname'], true); |
337 | 337 | if (count($types) > 0) { |
338 | 338 | /** @var Newbb\TypeHandler $typeHandler */ |
339 | 339 | $typeHandler = Newbb\Helper::getInstance()->getHandler('Type'); |
340 | - $type_list = $typeHandler->getList(new \Criteria('type_id', '(' . implode(', ', array_keys($types)) . ')', 'IN')); |
|
340 | + $type_list = $typeHandler->getList(new \Criteria('type_id', '('.implode(', ', array_keys($types)).')', 'IN')); |
|
341 | 341 | } |
342 | 342 | |
343 | 343 | foreach ($rows as $arr) { |
344 | 344 | // irmtfan remove $topic_page_jump because there is no last post |
345 | 345 | //$topic_page_jump = ''; |
346 | 346 | $topic = []; |
347 | - $topic['topic_subject'] = empty($type_list[$arr['type_id']]) ? '' : '[' . $type_list[$arr['type_id']] . '] '; |
|
347 | + $topic['topic_subject'] = empty($type_list[$arr['type_id']]) ? '' : '['.$type_list[$arr['type_id']].'] '; |
|
348 | 348 | $topic['forum_id'] = $arr['forum_id']; |
349 | 349 | $topic['forum_name'] = $myts->htmlSpecialChars($arr['forum_name']); |
350 | 350 | $topic['id'] = $arr['topic_id']; |
@@ -353,7 +353,7 @@ discard block |
||
353 | 353 | if (!empty($options[5])) { |
354 | 354 | $title = xoops_substr($title, 0, $options[5]); |
355 | 355 | } |
356 | - $topic['title'] = $topic['topic_subject'] . $title; |
|
356 | + $topic['title'] = $topic['topic_subject'].$title; |
|
357 | 357 | $topic['replies'] = $arr['topic_replies']; |
358 | 358 | $topic['views'] = $arr['topic_views']; |
359 | 359 | $topic['time'] = newbbFormatTimestamp($arr['topic_time']); |
@@ -366,8 +366,8 @@ discard block |
||
366 | 366 | // irmtfan remove $topic_page_jump because there is no last post |
367 | 367 | //$topic['topic_page_jump'] = $topic_page_jump; |
368 | 368 | // START irmtfan remove hardcoded html in URLs - add $seo_topic_url |
369 | - $seo_topic_url = XOOPS_URL . '/' . SEO_MODULE_NAME . '/viewtopic.php?topic_id=' . $topic['id']; |
|
370 | - $seo_forum_url = XOOPS_URL . '/' . SEO_MODULE_NAME . '/viewforum.php?forum=' . $topic['forum_id']; |
|
369 | + $seo_topic_url = XOOPS_URL.'/'.SEO_MODULE_NAME.'/viewtopic.php?topic_id='.$topic['id']; |
|
370 | + $seo_forum_url = XOOPS_URL.'/'.SEO_MODULE_NAME.'/viewforum.php?forum='.$topic['forum_id']; |
|
371 | 371 | |
372 | 372 | if (!empty($newbbConfig['do_rewrite'])) { |
373 | 373 | $topic['seo_topic_url'] = seo_urls($seo_topic_url); |
@@ -381,11 +381,11 @@ discard block |
||
381 | 381 | unset($topic); |
382 | 382 | } |
383 | 383 | // START irmtfan remove hardcoded html in URLs |
384 | - $seo_top_allforums = XOOPS_URL . '/' . SEO_MODULE_NAME; |
|
384 | + $seo_top_allforums = XOOPS_URL.'/'.SEO_MODULE_NAME; |
|
385 | 385 | $block['seo_top_allforums'] = !empty($newbbConfig['do_rewrite']) ? seo_urls($seo_top_allforums) : $seo_top_allforums; |
386 | - $seo_top_allforums = XOOPS_URL . '/' . SEO_MODULE_NAME . '/list.topic.php'; |
|
386 | + $seo_top_allforums = XOOPS_URL.'/'.SEO_MODULE_NAME.'/list.topic.php'; |
|
387 | 387 | $block['seo_top_alltopics'] = !empty($newbbConfig['do_rewrite']) ? seo_urls($seo_top_allforums) : $seo_top_allforums; |
388 | - $seo_top_allforums = XOOPS_URL . '/' . SEO_MODULE_NAME . '/viewpost.php'; |
|
388 | + $seo_top_allforums = XOOPS_URL.'/'.SEO_MODULE_NAME.'/viewpost.php'; |
|
389 | 389 | $block['seo_top_allposts'] = !empty($newbbConfig['do_rewrite']) ? seo_urls($seo_top_allforums) : $seo_top_allforums; |
390 | 390 | // END irmtfan remove hardcoded html in URLs |
391 | 391 | $block['indexNav'] = (int)$options[4]; |
@@ -410,7 +410,7 @@ discard block |
||
410 | 410 | global $accessForums; |
411 | 411 | global $newbbConfig; |
412 | 412 | |
413 | - require_once __DIR__ . '/../include/functions.time.php'; |
|
413 | + require_once __DIR__.'/../include/functions.time.php'; |
|
414 | 414 | $myts = \MyTextSanitizer::getInstance(); |
415 | 415 | $block = []; |
416 | 416 | $i = 0; |
@@ -419,7 +419,7 @@ discard block |
||
419 | 419 | $time_criteria = null; |
420 | 420 | if (!empty($options[2])) { |
421 | 421 | $time_criteria = time() - newbbGetSinceTime($options[2]); |
422 | - $extraCriteria = ' AND p.post_time>' . $time_criteria; |
|
422 | + $extraCriteria = ' AND p.post_time>'.$time_criteria; |
|
423 | 423 | } |
424 | 424 | |
425 | 425 | switch ($options[0]) { |
@@ -463,7 +463,7 @@ discard block |
||
463 | 463 | return $block; |
464 | 464 | } |
465 | 465 | |
466 | - $forumCriteria = ' AND p.forum_id IN (' . implode(',', $allowedForums) . ')'; |
|
466 | + $forumCriteria = ' AND p.forum_id IN ('.implode(',', $allowedForums).')'; |
|
467 | 467 | $approveCriteria = ' AND p.approved = 1'; |
468 | 468 | |
469 | 469 | $query = 'SELECT'; |
@@ -471,11 +471,11 @@ discard block |
||
471 | 471 | if ('text' === $options[0]) { |
472 | 472 | $query .= ' pt.dohtml, pt.dosmiley, pt.doxcode, pt.dobr, pt.post_text,'; |
473 | 473 | } |
474 | - $query .= ' f.forum_id, f.forum_name' . ' FROM ' . $GLOBALS['xoopsDB']->prefix('newbb_posts') . ' AS p ' . ' LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('newbb_forums') . ' AS f ON f.forum_id=p.forum_id'; |
|
474 | + $query .= ' f.forum_id, f.forum_name'.' FROM '.$GLOBALS['xoopsDB']->prefix('newbb_posts').' AS p '.' LEFT JOIN '.$GLOBALS['xoopsDB']->prefix('newbb_forums').' AS f ON f.forum_id=p.forum_id'; |
|
475 | 475 | if ('text' === $options[0]) { |
476 | - $query .= ' LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('newbb_posts_text') . ' AS pt ON pt.post_id=p.post_id'; |
|
476 | + $query .= ' LEFT JOIN '.$GLOBALS['xoopsDB']->prefix('newbb_posts_text').' AS pt ON pt.post_id=p.post_id'; |
|
477 | 477 | } |
478 | - $query .= ' WHERE 1=1 ' . $forumCriteria . $approveCriteria . $extraCriteria . ' ORDER BY ' . $order . ' DESC'; |
|
478 | + $query .= ' WHERE 1=1 '.$forumCriteria.$approveCriteria.$extraCriteria.' ORDER BY '.$order.' DESC'; |
|
479 | 479 | |
480 | 480 | $result = $GLOBALS['xoopsDB']->query($query, $options[1], 0); |
481 | 481 | if (!$result) { |
@@ -492,15 +492,15 @@ discard block |
||
492 | 492 | if (count($rows) < 1) { |
493 | 493 | return $block; |
494 | 494 | } |
495 | - require_once __DIR__ . '/../include/functions.user.php'; |
|
495 | + require_once __DIR__.'/../include/functions.user.php'; |
|
496 | 496 | $author_name = newbbGetUnameFromIds(array_keys($author), $newbbConfig['show_realname'], true); |
497 | 497 | |
498 | 498 | foreach ($rows as $arr) { |
499 | 499 | //if ($arr['icon'] && is_file($GLOBALS['xoops']->path('images/subject/' . $arr['icon']))) { |
500 | 500 | if (!empty($arr['icon'])) { |
501 | - $last_post_icon = '<img src="' . XOOPS_URL . '/images/subject/' . htmlspecialchars($arr['icon'], ENT_QUOTES | ENT_HTML5) . '" alt="" />'; |
|
501 | + $last_post_icon = '<img src="'.XOOPS_URL.'/images/subject/'.htmlspecialchars($arr['icon'], ENT_QUOTES | ENT_HTML5).'" alt="" />'; |
|
502 | 502 | } else { |
503 | - $last_post_icon = '<img src="' . XOOPS_URL . '/images/subject/icon1.gif" alt="" />'; |
|
503 | + $last_post_icon = '<img src="'.XOOPS_URL.'/images/subject/icon1.gif" alt="" />'; |
|
504 | 504 | } |
505 | 505 | //$topic['jump_post'] = "<a href='" . XOOPS_URL . "/modules/newbb/viewtopic.php?post_id=" . $arr['post_id'] ."#forumpost" . $arr['post_id'] . "'>" . $last_post_icon . '</a>'; |
506 | 506 | $topic = []; |
@@ -530,8 +530,8 @@ discard block |
||
530 | 530 | $topic['post_text'] = $post_text; |
531 | 531 | } |
532 | 532 | // START irmtfan remove hardcoded html in URLs |
533 | - $seo_url = XOOPS_URL . '/' . SEO_MODULE_NAME . '/viewtopic.php?post_id=' . $topic['post_id']; |
|
534 | - $seo_forum_url = XOOPS_URL . '/' . SEO_MODULE_NAME . '/viewforum.php?forum=' . $topic['forum_id']; |
|
533 | + $seo_url = XOOPS_URL.'/'.SEO_MODULE_NAME.'/viewtopic.php?post_id='.$topic['post_id']; |
|
534 | + $seo_forum_url = XOOPS_URL.'/'.SEO_MODULE_NAME.'/viewforum.php?forum='.$topic['forum_id']; |
|
535 | 535 | // END irmtfan remove hardcoded html in URLs |
536 | 536 | if (!empty($newbbConfig['do_rewrite'])) { |
537 | 537 | $topic['seo_url'] = seo_urls($seo_url); |
@@ -545,11 +545,11 @@ discard block |
||
545 | 545 | unset($topic); |
546 | 546 | } |
547 | 547 | // START irmtfan remove hardcoded html in URLs |
548 | - $seo_top_allforums = XOOPS_URL . '/' . SEO_MODULE_NAME; |
|
548 | + $seo_top_allforums = XOOPS_URL.'/'.SEO_MODULE_NAME; |
|
549 | 549 | $block['seo_top_allforums'] = !empty($newbbConfig['do_rewrite']) ? seo_urls($seo_top_allforums) : $seo_top_allforums; |
550 | - $seo_top_allforums = XOOPS_URL . '/' . SEO_MODULE_NAME . '/list.topic.php'; |
|
550 | + $seo_top_allforums = XOOPS_URL.'/'.SEO_MODULE_NAME.'/list.topic.php'; |
|
551 | 551 | $block['seo_top_alltopics'] = !empty($newbbConfig['do_rewrite']) ? seo_urls($seo_top_allforums) : $seo_top_allforums; |
552 | - $seo_top_allforums = XOOPS_URL . '/' . SEO_MODULE_NAME . '/viewpost.php'; |
|
552 | + $seo_top_allforums = XOOPS_URL.'/'.SEO_MODULE_NAME.'/viewpost.php'; |
|
553 | 553 | $block['seo_top_allposts'] = !empty($newbbConfig['do_rewrite']) ? seo_urls($seo_top_allforums) : $seo_top_allforums; |
554 | 554 | // END irmtfan remove hardcoded html in URLs |
555 | 555 | |
@@ -582,9 +582,9 @@ discard block |
||
582 | 582 | $extraCriteria = ''; |
583 | 583 | $time_criteria = null; |
584 | 584 | if (!empty($options[2])) { |
585 | - require_once __DIR__ . '/../include/functions.time.php'; |
|
585 | + require_once __DIR__.'/../include/functions.time.php'; |
|
586 | 586 | $time_criteria = time() - newbbGetSinceTime($options[2]); |
587 | - $extraCriteria = ' AND topic_time > ' . $time_criteria; |
|
587 | + $extraCriteria = ' AND topic_time > '.$time_criteria; |
|
588 | 588 | } |
589 | 589 | switch ($options[0]) { |
590 | 590 | case 'topic': |
@@ -592,7 +592,7 @@ discard block |
||
592 | 592 | case 'digest': |
593 | 593 | $extraCriteria = ' AND topic_digest = 1'; |
594 | 594 | if (null !== $time_criteria) { |
595 | - $extraCriteria .= ' AND digest_time > ' . $time_criteria; |
|
595 | + $extraCriteria .= ' AND digest_time > '.$time_criteria; |
|
596 | 596 | } |
597 | 597 | break; |
598 | 598 | case 'sticky': |
@@ -602,7 +602,7 @@ discard block |
||
602 | 602 | default: |
603 | 603 | $type = 'post'; |
604 | 604 | if (null !== $time_criteria) { |
605 | - $extraCriteria = ' AND post_time > ' . $time_criteria; |
|
605 | + $extraCriteria = ' AND post_time > '.$time_criteria; |
|
606 | 606 | } |
607 | 607 | break; |
608 | 608 | } |
@@ -626,17 +626,17 @@ discard block |
||
626 | 626 | } |
627 | 627 | |
628 | 628 | if ('topic' === $type) { |
629 | - $forumCriteria = ' AND forum_id IN (' . implode(',', $allowedForums) . ')'; |
|
629 | + $forumCriteria = ' AND forum_id IN ('.implode(',', $allowedForums).')'; |
|
630 | 630 | $approveCriteria = ' AND approved = 1'; |
631 | 631 | $query = 'SELECT DISTINCT topic_poster AS author, COUNT(*) AS count |
632 | - FROM ' . $GLOBALS['xoopsDB']->prefix('newbb_topics') . ' |
|
633 | - WHERE topic_poster>0 ' . $forumCriteria . $approveCriteria . $extraCriteria . ' GROUP BY topic_poster ORDER BY ' . $order . ' DESC'; |
|
632 | + FROM ' . $GLOBALS['xoopsDB']->prefix('newbb_topics').' |
|
633 | + WHERE topic_poster>0 ' . $forumCriteria.$approveCriteria.$extraCriteria.' GROUP BY topic_poster ORDER BY '.$order.' DESC'; |
|
634 | 634 | } else { |
635 | - $forumCriteria = ' AND forum_id IN (' . implode(',', $allowedForums) . ')'; |
|
635 | + $forumCriteria = ' AND forum_id IN ('.implode(',', $allowedForums).')'; |
|
636 | 636 | $approveCriteria = ' AND approved = 1'; |
637 | 637 | $query = 'SELECT DISTINCT uid AS author, COUNT(*) AS count |
638 | - FROM ' . $GLOBALS['xoopsDB']->prefix('newbb_posts') . ' |
|
639 | - WHERE uid > 0 ' . $forumCriteria . $approveCriteria . $extraCriteria . ' GROUP BY uid ORDER BY ' . $order . ' DESC'; |
|
638 | + FROM ' . $GLOBALS['xoopsDB']->prefix('newbb_posts').' |
|
639 | + WHERE uid > 0 ' . $forumCriteria.$approveCriteria.$extraCriteria.' GROUP BY uid ORDER BY '.$order.' DESC'; |
|
640 | 640 | } |
641 | 641 | |
642 | 642 | $result = $GLOBALS['xoopsDB']->query($query, $options[1], 0); |
@@ -651,12 +651,12 @@ discard block |
||
651 | 651 | if (count($author) < 1) { |
652 | 652 | return $block; |
653 | 653 | } |
654 | - require_once __DIR__ . '/../include/functions.user.php'; |
|
654 | + require_once __DIR__.'/../include/functions.user.php'; |
|
655 | 655 | $author_name = newbbGetUnameFromIds(array_keys($author), $newbbConfig['show_realname']); |
656 | 656 | foreach (array_keys($author) as $uid) { |
657 | 657 | $author[$uid]['name'] = $myts->htmlSpecialChars($author_name[$uid]); |
658 | 658 | } |
659 | - $block['authors'] =& $author; |
|
659 | + $block['authors'] = & $author; |
|
660 | 660 | $block['disp_mode'] = $options[3]; // 0 - full view; 1 - lite view; |
661 | 661 | $block['indexNav'] = (int)$options[4]; |
662 | 662 | |
@@ -669,45 +669,45 @@ discard block |
||
669 | 669 | */ |
670 | 670 | function b_newbb_edit($options) |
671 | 671 | { |
672 | - require_once __DIR__ . '/../include/functions.forum.php'; |
|
672 | + require_once __DIR__.'/../include/functions.forum.php'; |
|
673 | 673 | |
674 | - $form = _MB_NEWBB_CRITERIA . "<select name='options[0]'>"; |
|
674 | + $form = _MB_NEWBB_CRITERIA."<select name='options[0]'>"; |
|
675 | 675 | $form .= "<option value='time'"; |
676 | 676 | if ('time' === $options[0]) { |
677 | 677 | $form .= " selected='selected' "; |
678 | 678 | } |
679 | - $form .= '>' . _MB_NEWBB_CRITERIA_TIME . '</option>'; |
|
679 | + $form .= '>'._MB_NEWBB_CRITERIA_TIME.'</option>'; |
|
680 | 680 | $form .= '</select>'; |
681 | - $form .= '<br>' . _MB_NEWBB_DISPLAY . "<input type='text' name='options[1]' value='" . $options[1] . "' />"; |
|
682 | - $form .= '<br>' . _MB_NEWBB_TIME . "<input type='text' name='options[2]' value='" . $options[2] . "' />"; |
|
683 | - $form .= '<br> <small>' . _MB_NEWBB_TIME_DESC . '</small>'; |
|
684 | - $form .= '<br>' . _MB_NEWBB_DISPLAYMODE . "<input type='radio' name='options[3]' value='0'"; |
|
681 | + $form .= '<br>'._MB_NEWBB_DISPLAY."<input type='text' name='options[1]' value='".$options[1]."' />"; |
|
682 | + $form .= '<br>'._MB_NEWBB_TIME."<input type='text' name='options[2]' value='".$options[2]."' />"; |
|
683 | + $form .= '<br> <small>'._MB_NEWBB_TIME_DESC.'</small>'; |
|
684 | + $form .= '<br>'._MB_NEWBB_DISPLAYMODE."<input type='radio' name='options[3]' value='0'"; |
|
685 | 685 | if (0 == $options[3]) { |
686 | 686 | $form .= ' checked'; |
687 | 687 | } |
688 | - $form .= ' /> ' . _MB_NEWBB_DISPLAYMODE_FULL . "<input type='radio' name='options[3]' value='1'"; |
|
688 | + $form .= ' /> '._MB_NEWBB_DISPLAYMODE_FULL."<input type='radio' name='options[3]' value='1'"; |
|
689 | 689 | if (1 == $options[3]) { |
690 | 690 | $form .= ' checked'; |
691 | 691 | } |
692 | - $form .= ' /> ' . _MB_NEWBB_DISPLAYMODE_COMPACT . "<input type='radio' name='options[3]' value='2'"; |
|
692 | + $form .= ' /> '._MB_NEWBB_DISPLAYMODE_COMPACT."<input type='radio' name='options[3]' value='2'"; |
|
693 | 693 | if (2 == $options[3]) { |
694 | 694 | $form .= ' checked'; |
695 | 695 | } |
696 | - $form .= ' /> ' . _MB_NEWBB_DISPLAYMODE_LITE; |
|
696 | + $form .= ' /> '._MB_NEWBB_DISPLAYMODE_LITE; |
|
697 | 697 | |
698 | - $form .= '<br>' . _MB_NEWBB_INDEXNAV . '<input type="radio" name="options[4]" value="1"'; |
|
698 | + $form .= '<br>'._MB_NEWBB_INDEXNAV.'<input type="radio" name="options[4]" value="1"'; |
|
699 | 699 | if (1 == $options[4]) { |
700 | 700 | $form .= ' checked'; |
701 | 701 | } |
702 | - $form .= ' />' . _YES . '<input type="radio" name="options[4]" value="0"'; |
|
702 | + $form .= ' />'._YES.'<input type="radio" name="options[4]" value="0"'; |
|
703 | 703 | if (0 == $options[4]) { |
704 | 704 | $form .= ' checked'; |
705 | 705 | } |
706 | - $form .= ' />' . _NO; |
|
706 | + $form .= ' />'._NO; |
|
707 | 707 | |
708 | - $form .= '<br>' . _MB_NEWBB_TITLE_LENGTH . "<input type='text' name='options[5]' value='" . $options[5] . "' />"; |
|
708 | + $form .= '<br>'._MB_NEWBB_TITLE_LENGTH."<input type='text' name='options[5]' value='".$options[5]."' />"; |
|
709 | 709 | |
710 | - $form .= '<br><br>' . _MB_NEWBB_FORUMLIST; |
|
710 | + $form .= '<br><br>'._MB_NEWBB_FORUMLIST; |
|
711 | 711 | |
712 | 712 | $optionsForum = array_filter(array_slice($options, 6), 'b_newbb_array_filter'); // get allowed forums |
713 | 713 | $isAll = (0 === count($optionsForum) || empty($optionsForum[0])); |
@@ -716,7 +716,7 @@ discard block |
||
716 | 716 | if ($isAll) { |
717 | 717 | $form .= ' selected'; |
718 | 718 | } |
719 | - $form .= '>' . _ALL . '</option>'; |
|
719 | + $form .= '>'._ALL.'</option>'; |
|
720 | 720 | $form .= newbbForumSelectBox($optionsForum); |
721 | 721 | $form .= '</select><br>'; |
722 | 722 | |
@@ -729,64 +729,64 @@ discard block |
||
729 | 729 | */ |
730 | 730 | function b_newbb_topic_edit($options) |
731 | 731 | { |
732 | - require_once __DIR__ . '/../include/functions.forum.php'; |
|
733 | - $form = _MB_NEWBB_CRITERIA . "<select name='options[0]'>"; |
|
732 | + require_once __DIR__.'/../include/functions.forum.php'; |
|
733 | + $form = _MB_NEWBB_CRITERIA."<select name='options[0]'>"; |
|
734 | 734 | $form .= "<option value='time'"; |
735 | 735 | if ('time' === $options[0]) { |
736 | 736 | $form .= " selected='selected' "; |
737 | 737 | } |
738 | - $form .= '>' . _MB_NEWBB_CRITERIA_TIME . '</option>'; |
|
738 | + $form .= '>'._MB_NEWBB_CRITERIA_TIME.'</option>'; |
|
739 | 739 | $form .= "<option value='views'"; |
740 | 740 | if ('views' === $options[0]) { |
741 | 741 | $form .= " selected='selected' "; |
742 | 742 | } |
743 | - $form .= '>' . _MB_NEWBB_CRITERIA_VIEWS . '</option>'; |
|
743 | + $form .= '>'._MB_NEWBB_CRITERIA_VIEWS.'</option>'; |
|
744 | 744 | $form .= "<option value='replies'"; |
745 | 745 | if ('replies' === $options[0]) { |
746 | 746 | $form .= " selected='selected' "; |
747 | 747 | } |
748 | - $form .= '>' . _MB_NEWBB_CRITERIA_REPLIES . '</option>'; |
|
748 | + $form .= '>'._MB_NEWBB_CRITERIA_REPLIES.'</option>'; |
|
749 | 749 | $form .= "<option value='digest'"; |
750 | 750 | if ('digest' === $options[0]) { |
751 | 751 | $form .= " selected='selected' "; |
752 | 752 | } |
753 | - $form .= '>' . _MB_NEWBB_CRITERIA_DIGEST . '</option>'; |
|
753 | + $form .= '>'._MB_NEWBB_CRITERIA_DIGEST.'</option>'; |
|
754 | 754 | $form .= "<option value='sticky'"; |
755 | 755 | if ('sticky' === $options[0]) { |
756 | 756 | $form .= " selected='selected' "; |
757 | 757 | } |
758 | - $form .= '>' . _MB_NEWBB_CRITERIA_STICKY . '</option>'; |
|
758 | + $form .= '>'._MB_NEWBB_CRITERIA_STICKY.'</option>'; |
|
759 | 759 | $form .= '</select>'; |
760 | - $form .= '<br>' . _MB_NEWBB_DISPLAY . "<input type='text' name='options[1]' value='" . $options[1] . "' />"; |
|
761 | - $form .= '<br>' . _MB_NEWBB_TIME . "<input type='text' name='options[2]' value='" . $options[2] . "' />"; |
|
762 | - $form .= '<br> <small>' . _MB_NEWBB_TIME_DESC . '</small>'; |
|
763 | - $form .= '<br>' . _MB_NEWBB_DISPLAYMODE . "<input type='radio' name='options[3]' value='0'"; |
|
760 | + $form .= '<br>'._MB_NEWBB_DISPLAY."<input type='text' name='options[1]' value='".$options[1]."' />"; |
|
761 | + $form .= '<br>'._MB_NEWBB_TIME."<input type='text' name='options[2]' value='".$options[2]."' />"; |
|
762 | + $form .= '<br> <small>'._MB_NEWBB_TIME_DESC.'</small>'; |
|
763 | + $form .= '<br>'._MB_NEWBB_DISPLAYMODE."<input type='radio' name='options[3]' value='0'"; |
|
764 | 764 | if (0 == $options[3]) { |
765 | 765 | $form .= ' checked'; |
766 | 766 | } |
767 | - $form .= ' /> ' . _MB_NEWBB_DISPLAYMODE_FULL . "<input type='radio' name='options[3]' value='1'"; |
|
767 | + $form .= ' /> '._MB_NEWBB_DISPLAYMODE_FULL."<input type='radio' name='options[3]' value='1'"; |
|
768 | 768 | if (1 == $options[3]) { |
769 | 769 | $form .= ' checked'; |
770 | 770 | } |
771 | - $form .= ' /> ' . _MB_NEWBB_DISPLAYMODE_COMPACT . "<input type='radio' name='options[3]' value='2'"; |
|
771 | + $form .= ' /> '._MB_NEWBB_DISPLAYMODE_COMPACT."<input type='radio' name='options[3]' value='2'"; |
|
772 | 772 | if (2 == $options[3]) { |
773 | 773 | $form .= ' checked'; |
774 | 774 | } |
775 | - $form .= ' /> ' . _MB_NEWBB_DISPLAYMODE_LITE; |
|
775 | + $form .= ' /> '._MB_NEWBB_DISPLAYMODE_LITE; |
|
776 | 776 | |
777 | - $form .= '<br>' . _MB_NEWBB_INDEXNAV . '<input type="radio" name="options[4]" value="1"'; |
|
777 | + $form .= '<br>'._MB_NEWBB_INDEXNAV.'<input type="radio" name="options[4]" value="1"'; |
|
778 | 778 | if (1 == $options[4]) { |
779 | 779 | $form .= ' checked'; |
780 | 780 | } |
781 | - $form .= ' />' . _YES . '<input type="radio" name="options[4]" value="0"'; |
|
781 | + $form .= ' />'._YES.'<input type="radio" name="options[4]" value="0"'; |
|
782 | 782 | if (0 == $options[4]) { |
783 | 783 | $form .= ' checked'; |
784 | 784 | } |
785 | - $form .= ' />' . _NO; |
|
785 | + $form .= ' />'._NO; |
|
786 | 786 | |
787 | - $form .= '<br>' . _MB_NEWBB_TITLE_LENGTH . "<input type='text' name='options[5]' value='" . $options[5] . "' />"; |
|
787 | + $form .= '<br>'._MB_NEWBB_TITLE_LENGTH."<input type='text' name='options[5]' value='".$options[5]."' />"; |
|
788 | 788 | |
789 | - $form .= '<br><br>' . _MB_NEWBB_FORUMLIST; |
|
789 | + $form .= '<br><br>'._MB_NEWBB_FORUMLIST; |
|
790 | 790 | |
791 | 791 | $optionsForum = array_filter(array_slice($options, 6), 'b_newbb_array_filter'); // get allowed forums |
792 | 792 | |
@@ -796,7 +796,7 @@ discard block |
||
796 | 796 | if ($isAll) { |
797 | 797 | $form .= ' selected="selected"'; |
798 | 798 | } |
799 | - $form .= '>' . _ALL . '</option>'; |
|
799 | + $form .= '>'._ALL.'</option>'; |
|
800 | 800 | $form .= newbbForumSelectBox($optionsForum); |
801 | 801 | $form .= '</select><br>'; |
802 | 802 | |
@@ -809,49 +809,49 @@ discard block |
||
809 | 809 | */ |
810 | 810 | function b_newbb_post_edit($options) |
811 | 811 | { |
812 | - require_once __DIR__ . '/../include/functions.forum.php'; |
|
813 | - $form = _MB_NEWBB_CRITERIA . "<select name='options[0]'>"; |
|
812 | + require_once __DIR__.'/../include/functions.forum.php'; |
|
813 | + $form = _MB_NEWBB_CRITERIA."<select name='options[0]'>"; |
|
814 | 814 | $form .= "<option value='title'"; |
815 | 815 | if ('title' === $options[0]) { |
816 | 816 | $form .= " selected='selected' "; |
817 | 817 | } |
818 | - $form .= '>' . _MB_NEWBB_CRITERIA_TITLE . '</option>'; |
|
818 | + $form .= '>'._MB_NEWBB_CRITERIA_TITLE.'</option>'; |
|
819 | 819 | $form .= "<option value='text'"; |
820 | 820 | if ('text' === $options[0]) { |
821 | 821 | $form .= " selected='selected' "; |
822 | 822 | } |
823 | - $form .= '>' . _MB_NEWBB_CRITERIA_TEXT . '</option>'; |
|
823 | + $form .= '>'._MB_NEWBB_CRITERIA_TEXT.'</option>'; |
|
824 | 824 | $form .= '</select>'; |
825 | - $form .= '<br>' . _MB_NEWBB_DISPLAY . "<input type='text' name='options[1]' value='" . $options[1] . "' />"; |
|
826 | - $form .= '<br>' . _MB_NEWBB_TIME . "<input type='text' name='options[2]' value='" . $options[2] . "' />"; |
|
827 | - $form .= '<br> <small>' . _MB_NEWBB_TIME_DESC . '</small>'; |
|
828 | - $form .= '<br>' . _MB_NEWBB_DISPLAYMODE . "<input type='radio' name='options[3]' value='0'"; |
|
825 | + $form .= '<br>'._MB_NEWBB_DISPLAY."<input type='text' name='options[1]' value='".$options[1]."' />"; |
|
826 | + $form .= '<br>'._MB_NEWBB_TIME."<input type='text' name='options[2]' value='".$options[2]."' />"; |
|
827 | + $form .= '<br> <small>'._MB_NEWBB_TIME_DESC.'</small>'; |
|
828 | + $form .= '<br>'._MB_NEWBB_DISPLAYMODE."<input type='radio' name='options[3]' value='0'"; |
|
829 | 829 | if (0 == $options[3]) { |
830 | 830 | $form .= ' checked'; |
831 | 831 | } |
832 | - $form .= ' /> ' . _MB_NEWBB_DISPLAYMODE_FULL . "<input type='radio' name='options[3]' value='1'"; |
|
832 | + $form .= ' /> '._MB_NEWBB_DISPLAYMODE_FULL."<input type='radio' name='options[3]' value='1'"; |
|
833 | 833 | if (1 == $options[3]) { |
834 | 834 | $form .= ' checked'; |
835 | 835 | } |
836 | - $form .= ' /> ' . _MB_NEWBB_DISPLAYMODE_COMPACT . "<input type='radio' name='options[3]' value='2'"; |
|
836 | + $form .= ' /> '._MB_NEWBB_DISPLAYMODE_COMPACT."<input type='radio' name='options[3]' value='2'"; |
|
837 | 837 | if (2 == $options[3]) { |
838 | 838 | $form .= ' checked'; |
839 | 839 | } |
840 | - $form .= ' /> ' . _MB_NEWBB_DISPLAYMODE_LITE; |
|
840 | + $form .= ' /> '._MB_NEWBB_DISPLAYMODE_LITE; |
|
841 | 841 | |
842 | - $form .= '<br>' . _MB_NEWBB_INDEXNAV . '<input type="radio" name="options[4]" value="1"'; |
|
842 | + $form .= '<br>'._MB_NEWBB_INDEXNAV.'<input type="radio" name="options[4]" value="1"'; |
|
843 | 843 | if (1 == $options[4]) { |
844 | 844 | $form .= ' checked'; |
845 | 845 | } |
846 | - $form .= ' />' . _YES . '<input type="radio" name="options[4]" value="0"'; |
|
846 | + $form .= ' />'._YES.'<input type="radio" name="options[4]" value="0"'; |
|
847 | 847 | if (0 == $options[4]) { |
848 | 848 | $form .= ' checked'; |
849 | 849 | } |
850 | - $form .= ' />' . _NO; |
|
850 | + $form .= ' />'._NO; |
|
851 | 851 | |
852 | - $form .= '<br>' . _MB_NEWBB_TITLE_LENGTH . "<input type='text' name='options[5]' value='" . $options[5] . "' />"; |
|
852 | + $form .= '<br>'._MB_NEWBB_TITLE_LENGTH."<input type='text' name='options[5]' value='".$options[5]."' />"; |
|
853 | 853 | |
854 | - $form .= '<br><br>' . _MB_NEWBB_FORUMLIST; |
|
854 | + $form .= '<br><br>'._MB_NEWBB_FORUMLIST; |
|
855 | 855 | |
856 | 856 | $optionsForum = array_filter(array_slice($options, 6), 'b_newbb_array_filter'); // get allowed forums |
857 | 857 | $isAll = (0 === count($optionsForum) || empty($optionsForum[0])); |
@@ -860,7 +860,7 @@ discard block |
||
860 | 860 | if ($isAll) { |
861 | 861 | $form .= ' selected="selected"'; |
862 | 862 | } |
863 | - $form .= '>' . _ALL . '</option>'; |
|
863 | + $form .= '>'._ALL.'</option>'; |
|
864 | 864 | $form .= newbbForumSelectBox($optionsForum); |
865 | 865 | $form .= '</select><br>'; |
866 | 866 | |
@@ -873,53 +873,53 @@ discard block |
||
873 | 873 | */ |
874 | 874 | function b_newbb_author_edit($options) |
875 | 875 | { |
876 | - require_once __DIR__ . '/../include/functions.forum.php'; |
|
877 | - $form = _MB_NEWBB_CRITERIA . "<select name='options[0]'>"; |
|
876 | + require_once __DIR__.'/../include/functions.forum.php'; |
|
877 | + $form = _MB_NEWBB_CRITERIA."<select name='options[0]'>"; |
|
878 | 878 | $form .= "<option value='post'"; |
879 | 879 | if ('post' === $options[0]) { |
880 | 880 | $form .= " selected='selected' "; |
881 | 881 | } |
882 | - $form .= '>' . _MB_NEWBB_CRITERIA_POST . '</option>'; |
|
882 | + $form .= '>'._MB_NEWBB_CRITERIA_POST.'</option>'; |
|
883 | 883 | $form .= "<option value='topic'"; |
884 | 884 | if ('topic' === $options[0]) { |
885 | 885 | $form .= " selected='selected' "; |
886 | 886 | } |
887 | - $form .= '>' . _MB_NEWBB_CRITERIA_TOPIC . '</option>'; |
|
887 | + $form .= '>'._MB_NEWBB_CRITERIA_TOPIC.'</option>'; |
|
888 | 888 | $form .= "<option value='digest'"; |
889 | 889 | if ('digest' === $options[0]) { |
890 | 890 | $form .= " selected='selected' "; |
891 | 891 | } |
892 | - $form .= '>' . _MB_NEWBB_CRITERIA_DIGESTS . '</option>'; |
|
892 | + $form .= '>'._MB_NEWBB_CRITERIA_DIGESTS.'</option>'; |
|
893 | 893 | $form .= "<option value='sticky'"; |
894 | 894 | if ('sticky' === $options[0]) { |
895 | 895 | $form .= " selected='selected' "; |
896 | 896 | } |
897 | - $form .= '>' . _MB_NEWBB_CRITERIA_STICKYS . '</option>'; |
|
897 | + $form .= '>'._MB_NEWBB_CRITERIA_STICKYS.'</option>'; |
|
898 | 898 | $form .= '</select>'; |
899 | - $form .= '<br>' . _MB_NEWBB_DISPLAY . "<input type='text' name='options[1]' value='" . $options[1] . "' />"; |
|
900 | - $form .= '<br>' . _MB_NEWBB_TIME . "<input type='text' name='options[2]' value='" . $options[2] . "' />"; |
|
901 | - $form .= '<br> <small>' . _MB_NEWBB_TIME_DESC . '</small>'; |
|
902 | - $form .= '<br>' . _MB_NEWBB_DISPLAYMODE . "<input type='radio' name='options[3]' value='0'"; |
|
899 | + $form .= '<br>'._MB_NEWBB_DISPLAY."<input type='text' name='options[1]' value='".$options[1]."' />"; |
|
900 | + $form .= '<br>'._MB_NEWBB_TIME."<input type='text' name='options[2]' value='".$options[2]."' />"; |
|
901 | + $form .= '<br> <small>'._MB_NEWBB_TIME_DESC.'</small>'; |
|
902 | + $form .= '<br>'._MB_NEWBB_DISPLAYMODE."<input type='radio' name='options[3]' value='0'"; |
|
903 | 903 | if (0 == $options[3]) { |
904 | 904 | $form .= ' checked'; |
905 | 905 | } |
906 | - $form .= ' /> ' . _MB_NEWBB_DISPLAYMODE_COMPACT . "<input type='radio' name='options[3]' value='1'"; |
|
906 | + $form .= ' /> '._MB_NEWBB_DISPLAYMODE_COMPACT."<input type='radio' name='options[3]' value='1'"; |
|
907 | 907 | if (1 == $options[3]) { |
908 | 908 | $form .= ' checked'; |
909 | 909 | } |
910 | - $form .= ' /> ' . _MB_NEWBB_DISPLAYMODE_LITE; |
|
910 | + $form .= ' /> '._MB_NEWBB_DISPLAYMODE_LITE; |
|
911 | 911 | |
912 | - $form .= '<br>' . _MB_NEWBB_INDEXNAV . '<input type="radio" name="options[4]" value="1"'; |
|
912 | + $form .= '<br>'._MB_NEWBB_INDEXNAV.'<input type="radio" name="options[4]" value="1"'; |
|
913 | 913 | if (1 == $options[4]) { |
914 | 914 | $form .= ' checked'; |
915 | 915 | } |
916 | - $form .= ' />' . _YES . '<input type="radio" name="options[4]" value="0"'; |
|
916 | + $form .= ' />'._YES.'<input type="radio" name="options[4]" value="0"'; |
|
917 | 917 | if (0 == $options[4]) { |
918 | 918 | $form .= ' checked'; |
919 | 919 | } |
920 | - $form .= ' />' . _NO; |
|
920 | + $form .= ' />'._NO; |
|
921 | 921 | |
922 | - $form .= '<br><br>' . _MB_NEWBB_FORUMLIST; |
|
922 | + $form .= '<br><br>'._MB_NEWBB_FORUMLIST; |
|
923 | 923 | |
924 | 924 | $optionsForum = array_filter(array_slice($options, 5), 'b_newbb_array_filter'); // get allowed forums |
925 | 925 | $isAll = (0 === count($optionsForum) || empty($optionsForum[0])); |
@@ -928,7 +928,7 @@ discard block |
||
928 | 928 | if ($isAll) { |
929 | 929 | $form .= ' selected="selected"'; |
930 | 930 | } |
931 | - $form .= '>' . _ALL . '</option>'; |
|
931 | + $form .= '>'._ALL.'</option>'; |
|
932 | 932 | $form .= newbbForumSelectBox($optionsForum); |
933 | 933 | $form .= '</select><br>'; |
934 | 934 | |
@@ -942,8 +942,8 @@ discard block |
||
942 | 942 | function b_newbb_custom($options) |
943 | 943 | { |
944 | 944 | // if no newbb module block set, we have to include the language file |
945 | - if (is_readable($GLOBALS['xoops']->path('modules/newbb/language/' . $GLOBALS['xoopsConfig']['language'] . '/blocks.php'))) { |
|
946 | - require_once $GLOBALS['xoops']->path('modules/newbb/language/' . $GLOBALS['xoopsConfig']['language'] . '/blocks.php'); |
|
945 | + if (is_readable($GLOBALS['xoops']->path('modules/newbb/language/'.$GLOBALS['xoopsConfig']['language'].'/blocks.php'))) { |
|
946 | + require_once $GLOBALS['xoops']->path('modules/newbb/language/'.$GLOBALS['xoopsConfig']['language'].'/blocks.php'); |
|
947 | 947 | } else { |
948 | 948 | require_once $GLOBALS['xoops']->path('modules/newbb/language/english/blocks.php'); |
949 | 949 | } |
@@ -967,8 +967,8 @@ discard block |
||
967 | 967 | { |
968 | 968 | |
969 | 969 | // if no newbb module block set, we have to include the language file |
970 | - if (is_readable($GLOBALS['xoops']->path('modules/newbb/language/' . $GLOBALS['xoopsConfig']['language'] . '/blocks.php'))) { |
|
971 | - require_once $GLOBALS['xoops']->path('modules/newbb/language/' . $GLOBALS['xoopsConfig']['language'] . '/blocks.php'); |
|
970 | + if (is_readable($GLOBALS['xoops']->path('modules/newbb/language/'.$GLOBALS['xoopsConfig']['language'].'/blocks.php'))) { |
|
971 | + require_once $GLOBALS['xoops']->path('modules/newbb/language/'.$GLOBALS['xoopsConfig']['language'].'/blocks.php'); |
|
972 | 972 | } else { |
973 | 973 | require_once $GLOBALS['xoops']->path('modules/newbb/language/english/blocks.php'); |
974 | 974 | } |
@@ -992,8 +992,8 @@ discard block |
||
992 | 992 | { |
993 | 993 | |
994 | 994 | // if no newbb module block set, we have to include the language file |
995 | - if (is_readable($GLOBALS['xoops']->path('modules/newbb/language/' . $GLOBALS['xoopsConfig']['language'] . '/blocks.php'))) { |
|
996 | - require_once $GLOBALS['xoops']->path('modules/newbb/language/' . $GLOBALS['xoopsConfig']['language'] . '/blocks.php'); |
|
995 | + if (is_readable($GLOBALS['xoops']->path('modules/newbb/language/'.$GLOBALS['xoopsConfig']['language'].'/blocks.php'))) { |
|
996 | + require_once $GLOBALS['xoops']->path('modules/newbb/language/'.$GLOBALS['xoopsConfig']['language'].'/blocks.php'); |
|
997 | 997 | } else { |
998 | 998 | require_once $GLOBALS['xoops']->path('modules/newbb/language/english/blocks.php'); |
999 | 999 | } |
@@ -1016,8 +1016,8 @@ discard block |
||
1016 | 1016 | function b_newbb_custom_author($options) |
1017 | 1017 | { |
1018 | 1018 | // if no newbb module block set, we have to include the language file |
1019 | - if (is_readable($GLOBALS['xoops']->path('modules/newbb/language/' . $GLOBALS['xoopsConfig']['language'] . '/blocks.php'))) { |
|
1020 | - require_once $GLOBALS['xoops']->path('modules/newbb/language/' . $GLOBALS['xoopsConfig']['language'] . '/blocks.php'); |
|
1019 | + if (is_readable($GLOBALS['xoops']->path('modules/newbb/language/'.$GLOBALS['xoopsConfig']['language'].'/blocks.php'))) { |
|
1020 | + require_once $GLOBALS['xoops']->path('modules/newbb/language/'.$GLOBALS['xoopsConfig']['language'].'/blocks.php'); |
|
1021 | 1021 | } else { |
1022 | 1022 | require_once $GLOBALS['xoops']->path('modules/newbb/language/english/blocks.php'); |
1023 | 1023 | } |
@@ -119,9 +119,9 @@ |
||
119 | 119 | $xoopsTpl->assign('parentforum', $forumHandler->getParents($forumObject)); |
120 | 120 | |
121 | 121 | $xoopsTpl->assign([ |
122 | - 'forum_id' => $forumObject->getVar('forum_id'), |
|
123 | - 'forum_name' => $forumObject->getVar('forum_name') |
|
124 | - ]); |
|
122 | + 'forum_id' => $forumObject->getVar('forum_id'), |
|
123 | + 'forum_name' => $forumObject->getVar('forum_name') |
|
124 | + ]); |
|
125 | 125 | |
126 | 126 | if ($postParentObject->getVar('uid')) { |
127 | 127 | $r_name = newbbGetUnameFromId($postParentObject->getVar('uid'), $GLOBALS['xoopsModuleConfig']['show_realname']); |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | use Xmf\Request; |
33 | 33 | use XoopsModules\Newbb; |
34 | 34 | |
35 | -require_once __DIR__ . '/header.php'; |
|
35 | +require_once __DIR__.'/header.php'; |
|
36 | 36 | |
37 | 37 | $forum = Request::getInt('forum', 0, 'GET'); |
38 | 38 | $topic_id = Request::getInt('topic_id', 0, 'GET'); |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | |
66 | 66 | $forumObject = $forumHandler->get($forum); |
67 | 67 | if (!$forumHandler->getPermission($forumObject)) { |
68 | - redirect_header(XOOPS_URL . '/index.php', 2, _MD_NEWBB_NORIGHTTOACCESS); |
|
68 | + redirect_header(XOOPS_URL.'/index.php', 2, _MD_NEWBB_NORIGHTTOACCESS); |
|
69 | 69 | } |
70 | 70 | |
71 | 71 | $topicObject = $topicHandler->get($topic_id); |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | $query_array = []; |
79 | 79 | foreach ($query_vars as $var) { |
80 | 80 | if (Request::getString($var, '', 'GET')) { |
81 | - $query_array[$var] = "{$var}=" . Request::getString($var, '', 'GET'); |
|
81 | + $query_array[$var] = "{$var}=".Request::getString($var, '', 'GET'); |
|
82 | 82 | } |
83 | 83 | } |
84 | 84 | $page_query = htmlspecialchars(implode('&', array_values($query_array)), ENT_QUOTES | ENT_HTML5); |
@@ -133,8 +133,8 @@ discard block |
||
133 | 133 | $r_subject = $postParentObject->getVar('subject', 'E'); |
134 | 134 | |
135 | 135 | $subject = $r_subject; |
136 | -if (!preg_match('/^(Re|' . _MD_NEWBB_RE . '):/i', $r_subject)) { |
|
137 | - $subject = _MD_NEWBB_RE . ': ' . $r_subject; |
|
136 | +if (!preg_match('/^(Re|'._MD_NEWBB_RE.'):/i', $r_subject)) { |
|
137 | + $subject = _MD_NEWBB_RE.': '.$r_subject; |
|
138 | 138 | } |
139 | 139 | |
140 | 140 | $q_message = $postParentObject->getVar('post_text', 'e'); |
@@ -143,12 +143,12 @@ discard block |
||
143 | 143 | if (1 === Request::getInt('quotedac', 0, 'GET')) { |
144 | 144 | $message = "[quote]\n"; |
145 | 145 | $message .= sprintf(_MD_NEWBB_USERWROTE, $r_name); |
146 | - $message .= "\n" . $q_message . '[/quote]'; |
|
146 | + $message .= "\n".$q_message.'[/quote]'; |
|
147 | 147 | $hidden = ''; |
148 | 148 | } else { |
149 | 149 | $hidden = "[quote]\n"; |
150 | 150 | $hidden .= sprintf(_MD_NEWBB_USERWROTE, $r_name); |
151 | - $hidden .= "\n" . $q_message . '[/quote]'; |
|
151 | + $hidden .= "\n".$q_message.'[/quote]'; |
|
152 | 152 | $message = ''; |
153 | 153 | } |
154 | 154 | } else { |
@@ -167,7 +167,7 @@ discard block |
||
167 | 167 | $post_karma = 0; |
168 | 168 | $require_reply = 0; |
169 | 169 | |
170 | -include __DIR__ . '/include/form.post.php'; |
|
170 | +include __DIR__.'/include/form.post.php'; |
|
171 | 171 | |
172 | 172 | ///** @var Newbb\KarmaHandler $karmaHandler */ |
173 | 173 | //$karmaHandler = Newbb\Helper::getInstance()->getHandler('Karma'); |
@@ -180,7 +180,7 @@ discard block |
||
180 | 180 | foreach ($posts_contextObject as $post_contextObject) { |
181 | 181 | // Sorry, in order to save queries, we have to hide the non-open post_text even if you have replied or have adequate karma, even an admin. |
182 | 182 | if ($GLOBALS['xoopsModuleConfig']['enable_karma'] && $post_contextObject->getVar('post_karma') > 0) { |
183 | - $p_message = sprintf(_MD_NEWBB_KARMA_REQUIREMENT, '***', $post_contextObject->getVar('post_karma')) . '</div>'; |
|
183 | + $p_message = sprintf(_MD_NEWBB_KARMA_REQUIREMENT, '***', $post_contextObject->getVar('post_karma')).'</div>'; |
|
184 | 184 | } elseif ($GLOBALS['xoopsModuleConfig']['allow_require_reply'] && $post_contextObject->getVar('require_reply')) { |
185 | 185 | $p_message = _MD_NEWBB_REPLY_REQUIREMENT; |
186 | 186 | } else { |
@@ -198,11 +198,11 @@ discard block |
||
198 | 198 | |
199 | 199 | $posts_context[] = [ |
200 | 200 | 'subject' => $p_subject, |
201 | - 'meta' => _MD_NEWBB_BY . ' ' . $p_name . ' ' . _MD_NEWBB_ON . ' ' . $p_date, |
|
201 | + 'meta' => _MD_NEWBB_BY.' '.$p_name.' '._MD_NEWBB_ON.' '.$p_date, |
|
202 | 202 | 'content' => $p_message |
203 | 203 | ]; |
204 | 204 | } |
205 | 205 | $xoopsTpl->assign_by_ref('posts_context', $posts_context); |
206 | 206 | // irmtfan move to footer.php |
207 | -require_once __DIR__ . '/footer.php'; |
|
207 | +require_once __DIR__.'/footer.php'; |
|
208 | 208 | include $GLOBALS['xoops']->path('footer.php'); |
@@ -209,12 +209,12 @@ discard block |
||
209 | 209 | // END irmtfan improve infobox |
210 | 210 | |
211 | 211 | $xoopsTpl->assign([ |
212 | - 'topic_title' => '<a href="' . XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname', 'n') . '/viewtopic.php?topic_id=' . $topic_id . '">' . $topicObject->getFullTitle() . '</a>', |
|
213 | - 'forum_name' => $forumObject->getVar('forum_name'), |
|
214 | - 'lang_nexttopic' => _MD_NEWBB_NEXTTOPIC, |
|
215 | - 'lang_prevtopic' => _MD_NEWBB_PREVTOPIC, |
|
216 | - 'topic_status' => $topicObject->getVar('topic_status') |
|
217 | - ]); |
|
212 | + 'topic_title' => '<a href="' . XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname', 'n') . '/viewtopic.php?topic_id=' . $topic_id . '">' . $topicObject->getFullTitle() . '</a>', |
|
213 | + 'forum_name' => $forumObject->getVar('forum_name'), |
|
214 | + 'lang_nexttopic' => _MD_NEWBB_NEXTTOPIC, |
|
215 | + 'lang_prevtopic' => _MD_NEWBB_PREVTOPIC, |
|
216 | + 'topic_status' => $topicObject->getVar('topic_status') |
|
217 | + ]); |
|
218 | 218 | |
219 | 219 | //$categoryHandler = Newbb\Helper::getInstance()->getHandler('Category'); |
220 | 220 | $categoryObject = $categoryHandler->get($forumObject->getVar('cat_id'), ['cat_title']); |
@@ -528,13 +528,13 @@ discard block |
||
528 | 528 | $xp_config = $configHandler->getConfigsByCat(0, $pollModuleHandler->getVar('mid')); |
529 | 529 | |
530 | 530 | $GLOBALS['xoopsTpl']->assign([ |
531 | - 'is_visible' => $isVisible, |
|
532 | - 'visible_message' => $visibleMsg, |
|
533 | - 'disp_votes' => $xp_config['disp_vote_nums'], |
|
534 | - 'lang_vote' => constant('_MD_' . strtoupper($GLOBALS['xoopsModuleConfig']['poll_module']) . '_VOTE'), |
|
535 | - 'lang_results' => constant('_MD_' . strtoupper($GLOBALS['xoopsModuleConfig']['poll_module']) . '_RESULTS'), |
|
536 | - 'back_link' => '' |
|
537 | - ]); |
|
531 | + 'is_visible' => $isVisible, |
|
532 | + 'visible_message' => $visibleMsg, |
|
533 | + 'disp_votes' => $xp_config['disp_vote_nums'], |
|
534 | + 'lang_vote' => constant('_MD_' . strtoupper($GLOBALS['xoopsModuleConfig']['poll_module']) . '_VOTE'), |
|
535 | + 'lang_results' => constant('_MD_' . strtoupper($GLOBALS['xoopsModuleConfig']['poll_module']) . '_RESULTS'), |
|
536 | + 'back_link' => '' |
|
537 | + ]); |
|
538 | 538 | $classRenderer = ucfirst($GLOBALS['xoopsModuleConfig']['poll_module']) . 'Renderer'; |
539 | 539 | /** @var Xoopspoll\Renderer $renderer */ |
540 | 540 | $renderer = new $classRenderer($pollObject); |
@@ -687,18 +687,18 @@ discard block |
||
687 | 687 | } |
688 | 688 | |
689 | 689 | $xoopsTpl->assign([ |
690 | - 'lang_forum_index' => sprintf(_MD_NEWBB_FORUMINDEX, htmlspecialchars($GLOBALS['xoopsConfig']['sitename'], ENT_QUOTES)), |
|
691 | - 'lang_from' => _MD_NEWBB_FROM, |
|
692 | - 'lang_joined' => _MD_NEWBB_JOINED, |
|
693 | - 'lang_posts' => _MD_NEWBB_POSTS, |
|
694 | - 'lang_poster' => _MD_NEWBB_POSTER, |
|
695 | - 'lang_thread' => _MD_NEWBB_THREAD, |
|
696 | - 'lang_edit' => _EDIT, |
|
697 | - 'lang_delete' => _DELETE, |
|
698 | - 'lang_reply' => _REPLY, |
|
699 | - 'lang_postedon' => _MD_NEWBB_POSTEDON, |
|
700 | - 'lang_groups' => _MD_NEWBB_GROUPS |
|
701 | - ]); |
|
690 | + 'lang_forum_index' => sprintf(_MD_NEWBB_FORUMINDEX, htmlspecialchars($GLOBALS['xoopsConfig']['sitename'], ENT_QUOTES)), |
|
691 | + 'lang_from' => _MD_NEWBB_FROM, |
|
692 | + 'lang_joined' => _MD_NEWBB_JOINED, |
|
693 | + 'lang_posts' => _MD_NEWBB_POSTS, |
|
694 | + 'lang_poster' => _MD_NEWBB_POSTER, |
|
695 | + 'lang_thread' => _MD_NEWBB_THREAD, |
|
696 | + 'lang_edit' => _EDIT, |
|
697 | + 'lang_delete' => _DELETE, |
|
698 | + 'lang_reply' => _REPLY, |
|
699 | + 'lang_postedon' => _MD_NEWBB_POSTEDON, |
|
700 | + 'lang_groups' => _MD_NEWBB_GROUPS |
|
701 | + ]); |
|
702 | 702 | |
703 | 703 | $viewmode_options = []; |
704 | 704 | if ('DESC' === $order) { |
@@ -714,18 +714,18 @@ |
||
714 | 714 | } |
715 | 715 | |
716 | 716 | switch ($status) { |
717 | - case 'active': |
|
718 | - $current_status = '[' . _MD_NEWBB_TYPE_ADMIN . ']'; |
|
719 | - break; |
|
720 | - case 'pending': |
|
721 | - $current_status = '[' . _MD_NEWBB_TYPE_PENDING . ']'; |
|
722 | - break; |
|
723 | - case 'deleted': |
|
724 | - $current_status = '[' . _MD_NEWBB_TYPE_DELETED . ']'; |
|
725 | - break; |
|
726 | - default: |
|
727 | - $current_status = ''; |
|
728 | - break; |
|
717 | + case 'active': |
|
718 | + $current_status = '[' . _MD_NEWBB_TYPE_ADMIN . ']'; |
|
719 | + break; |
|
720 | + case 'pending': |
|
721 | + $current_status = '[' . _MD_NEWBB_TYPE_PENDING . ']'; |
|
722 | + break; |
|
723 | + case 'deleted': |
|
724 | + $current_status = '[' . _MD_NEWBB_TYPE_DELETED . ']'; |
|
725 | + break; |
|
726 | + default: |
|
727 | + $current_status = ''; |
|
728 | + break; |
|
729 | 729 | } |
730 | 730 | $xoopsTpl->assign('topicstatus', $current_status); |
731 | 731 |
@@ -34,10 +34,10 @@ discard block |
||
34 | 34 | use XoopsModules\Newbb; |
35 | 35 | use XoopsModules\Xoopspoll; |
36 | 36 | |
37 | -require_once __DIR__ . '/header.php'; |
|
37 | +require_once __DIR__.'/header.php'; |
|
38 | 38 | $xoopsLogger->startTime('newBB_viewtopic'); |
39 | -require_once __DIR__ . '/include/functions.read.php'; |
|
40 | -require_once __DIR__ . '/include/functions.render.php'; |
|
39 | +require_once __DIR__.'/include/functions.read.php'; |
|
40 | +require_once __DIR__.'/include/functions.render.php'; |
|
41 | 41 | xoops_loadLanguage('user'); |
42 | 42 | |
43 | 43 | /*Build the page query*/ |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | $query_array = []; |
46 | 46 | foreach ($query_vars as $var) { |
47 | 47 | if (Request::getString($var, '', 'GET')) { |
48 | - $query_array[$var] = "{$var}=" . Request::getString($var, '', 'GET'); |
|
48 | + $query_array[$var] = "{$var}=".Request::getString($var, '', 'GET'); |
|
49 | 49 | } |
50 | 50 | } |
51 | 51 | $page_query = htmlspecialchars(implode('&', array_values($query_array)), ENT_QUOTES | ENT_HTML5); |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | } |
74 | 74 | |
75 | 75 | if (!$topic_id && !$post_id) { |
76 | - $redirect = empty($forum_id) ? XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/index.php' : XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . "/viewforum.php?forum={$forum_id}"; |
|
76 | + $redirect = empty($forum_id) ? XOOPS_URL . '/modules/'.$xoopsModule->getVar('dirname').'/index.php' : XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname')."/viewforum.php?forum={$forum_id}"; |
|
77 | 77 | redirect_header($redirect, 2, _MD_NEWBB_ERRORTOPIC); |
78 | 78 | } |
79 | 79 | |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | } |
91 | 91 | |
92 | 92 | if (!is_object($topicObject) || !$topic_id = $topicObject->getVar('topic_id')) { |
93 | - $redirect = empty($forum_id) ? XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/index.php' : XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . "/viewforum.php?forum={$forum_id}"; |
|
93 | + $redirect = empty($forum_id) ? XOOPS_URL . '/modules/'.$xoopsModule->getVar('dirname').'/index.php' : XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname')."/viewforum.php?forum={$forum_id}"; |
|
94 | 94 | redirect_header($redirect, 2, _MD_NEWBB_ERRORTOPIC); |
95 | 95 | } |
96 | 96 | $forum_id = $topicObject->getVar('forum_id'); |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | |
103 | 103 | if ((!$isAdmin && $topicObject->getVar('approved') < 0) || (!$forumHandler->getPermission($forumObject)) |
104 | 104 | || (!$topicHandler->getPermission($forumObject, $topicObject->getVar('topic_status'), 'view'))) { |
105 | - redirect_header(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/viewforum.php?forum=' . $forum_id, 2, _MD_NEWBB_NORIGHTTOVIEW); |
|
105 | + redirect_header(XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/viewforum.php?forum='.$forum_id, 2, _MD_NEWBB_NORIGHTTOVIEW); |
|
106 | 106 | } |
107 | 107 | |
108 | 108 | // START irmtfan - find if topic is read or unread - for all users (member and anon) |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | // hack jump to last post read if post_id is empty - is there any better way? |
129 | 129 | if (empty($post_id) && $topic_is_unread |
130 | 130 | && !empty($GLOBALS['xoopsModuleConfig']['jump_to_topic_last_post_read_enabled'])) { |
131 | - header('Location: ' . Request::getString('REQUEST_URI', '', 'SERVER') . '&post_id=' . $topic_last_post_time_or_id_read); |
|
131 | + header('Location: '.Request::getString('REQUEST_URI', '', 'SERVER').'&post_id='.$topic_last_post_time_or_id_read); |
|
132 | 132 | } |
133 | 133 | } |
134 | 134 | } |
@@ -167,7 +167,7 @@ discard block |
||
167 | 167 | // irmtfan new method |
168 | 168 | if (!empty($GLOBALS['xoopsModuleConfig']['rss_enable'])) { |
169 | 169 | $xoopsTpl->assign('xoops_module_header', ' |
170 | - <link rel="alternate" type="application/rss+xml" title="' . $xoopsModule->getVar('name') . '-' . $forumObject->getVar('forum_name') . '" href="' . XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/rss.php?f=' . $forumObject->getVar('forum_id') . '" /> |
|
170 | + <link rel="alternate" type="application/rss+xml" title="' . $xoopsModule->getVar('name').'-'.$forumObject->getVar('forum_name').'" href="'.XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/rss.php?f='.$forumObject->getVar('forum_id').'" /> |
|
171 | 171 | ' . @$xoopsTpl->get_template_vars('xoops_module_header')); |
172 | 172 | } |
173 | 173 | |
@@ -195,11 +195,11 @@ discard block |
||
195 | 195 | 'collapse' => $iconHandler->getImageSource('more') |
196 | 196 | ]; |
197 | 197 | if (1 == $infobox['show']) { |
198 | - $infobox['style'] = 'none'; //irmtfan move semicolon |
|
198 | + $infobox['style'] = 'none'; //irmtfan move semicolon |
|
199 | 199 | $infobox['alt'] = _MD_NEWBB_SEEUSERDATA; |
200 | 200 | $infobox['src'] = 'more'; |
201 | 201 | } else { |
202 | - $infobox['style'] = 'block'; //irmtfan move semicolon |
|
202 | + $infobox['style'] = 'block'; //irmtfan move semicolon |
|
203 | 203 | $infobox['alt'] = _MD_NEWBB_HIDEUSERDATA; |
204 | 204 | $infobox['src'] = 'less'; |
205 | 205 | } |
@@ -209,7 +209,7 @@ discard block |
||
209 | 209 | // END irmtfan improve infobox |
210 | 210 | |
211 | 211 | $xoopsTpl->assign([ |
212 | - 'topic_title' => '<a href="' . XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname', 'n') . '/viewtopic.php?topic_id=' . $topic_id . '">' . $topicObject->getFullTitle() . '</a>', |
|
212 | + 'topic_title' => '<a href="'.XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname', 'n').'/viewtopic.php?topic_id='.$topic_id.'">'.$topicObject->getFullTitle().'</a>', |
|
213 | 213 | 'forum_name' => $forumObject->getVar('forum_name'), |
214 | 214 | 'lang_nexttopic' => _MD_NEWBB_NEXTTOPIC, |
215 | 215 | 'lang_prevtopic' => _MD_NEWBB_PREVTOPIC, |
@@ -231,20 +231,20 @@ discard block |
||
231 | 231 | $t_reply = newbbDisplayImage('t_reply', _MD_NEWBB_REPLY); |
232 | 232 | // irmtfan show topic status if show reg is 0 and revise forum_post_or_register |
233 | 233 | if ($topicHandler->getPermission($forumObject, $topicObject->getVar('topic_status'), 'post')) { |
234 | - $xoopsTpl->assign('forum_post', '<a href="' . XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname', 'n') . '/newtopic.php?forum=' . $forum_id . '"> ' . $t_new . '</a>'); |
|
234 | + $xoopsTpl->assign('forum_post', '<a href="'.XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname', 'n').'/newtopic.php?forum='.$forum_id.'"> '.$t_new.'</a>'); |
|
235 | 235 | } else { |
236 | 236 | if ($topicObject->getVar('topic_status')) { |
237 | 237 | $xoopsTpl->assign('topic_lock', _MD_NEWBB_TOPICLOCKED); |
238 | 238 | } |
239 | 239 | if (!is_object($GLOBALS['xoopsUser']) && !empty($GLOBALS['xoopsModuleConfig']['show_reg'])) { |
240 | - $xoopsTpl->assign('forum_register', '<a href="' . XOOPS_URL . '/user.php?xoops_redirect=' . htmlspecialchars($xoopsRequestUri, ENT_QUOTES | ENT_HTML5) . '">' . _MD_NEWBB_REGTOPOST . '</a>'); |
|
240 | + $xoopsTpl->assign('forum_register', '<a href="'.XOOPS_URL.'/user.php?xoops_redirect='.htmlspecialchars($xoopsRequestUri, ENT_QUOTES | ENT_HTML5).'">'._MD_NEWBB_REGTOPOST.'</a>'); |
|
241 | 241 | } |
242 | 242 | } |
243 | 243 | // irmtfan for backward compatibility assign forum_post_or_register smarty again. |
244 | -$xoopsTpl->assign('forum_post_or_register', @$xoopsTpl->get_template_vars('forum_post') . @$xoopsTpl->get_template_vars('forum_register') . @$xoopsTpl->get_template_vars('topic_lock')); |
|
244 | +$xoopsTpl->assign('forum_post_or_register', @$xoopsTpl->get_template_vars('forum_post').@$xoopsTpl->get_template_vars('forum_register').@$xoopsTpl->get_template_vars('topic_lock')); |
|
245 | 245 | |
246 | 246 | if ($topicHandler->getPermission($forumObject, $topicObject->getVar('topic_status'), 'reply')) { |
247 | - $xoopsTpl->assign('forum_reply', '<a href="' . XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname', 'n') . '/reply.php?topic_id=' . $topic_id . '"> ' . $t_reply . '</a>'); |
|
247 | + $xoopsTpl->assign('forum_reply', '<a href="'.XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname', 'n').'/reply.php?topic_id='.$topic_id.'"> '.$t_reply.'</a>'); |
|
248 | 248 | } |
249 | 249 | |
250 | 250 | $poster_array = []; |
@@ -265,7 +265,7 @@ discard block |
||
265 | 265 | /** @var \XoopsMemberHandler $memberHandler */ |
266 | 266 | $memberHandler = xoops_getHandler('member'); |
267 | 267 | $userid_array = array_keys($poster_array); |
268 | - $user_criteria = '(' . implode(',', $userid_array) . ')'; |
|
268 | + $user_criteria = '('.implode(',', $userid_array).')'; |
|
269 | 269 | $users = $memberHandler->getUsers(new \Criteria('uid', $user_criteria, 'IN'), true); |
270 | 270 | } else { |
271 | 271 | $users = []; |
@@ -283,10 +283,10 @@ discard block |
||
283 | 283 | |
284 | 284 | if ($GLOBALS['xoopsModuleConfig']['allow_require_reply'] && $require_reply) { |
285 | 285 | if (!empty($GLOBALS['xoopsModuleConfig']['cache_enabled'])) { |
286 | - $viewtopic_posters = newbbGetSession('t' . $topic_id, true); |
|
286 | + $viewtopic_posters = newbbGetSession('t'.$topic_id, true); |
|
287 | 287 | if (!is_array($viewtopic_posters) || 0 === count($viewtopic_posters)) { |
288 | 288 | $viewtopic_posters = $topicHandler->getAllPosters($topicObject); |
289 | - newbbSetSession('t' . $topic_id, $viewtopic_posters); |
|
289 | + newbbSetSession('t'.$topic_id, $viewtopic_posters); |
|
290 | 290 | } |
291 | 291 | } else { |
292 | 292 | $viewtopic_posters = $topicHandler->getAllPosters($topicObject); |
@@ -302,7 +302,7 @@ discard block |
||
302 | 302 | 'post_date' => 0, |
303 | 303 | 'post_image' => '', |
304 | 304 | 'post_title' => '', |
305 | - 'post_text' => '<div style="text-align: center;vertical-align: middle;"><br>' . xoops_getbanner() . '</div>', |
|
305 | + 'post_text' => '<div style="text-align: center;vertical-align: middle;"><br>'.xoops_getbanner().'</div>', |
|
306 | 306 | 'post_attachment' => '', |
307 | 307 | 'post_edit' => 0, |
308 | 308 | 'post_no' => 0, |
@@ -339,7 +339,7 @@ discard block |
||
339 | 339 | if ($total_posts > $GLOBALS['xoopsModuleConfig']['posts_per_page']) { |
340 | 340 | include $GLOBALS['xoops']->path('class/pagenav.php'); |
341 | 341 | |
342 | - $nav = new \XoopsPageNav($total_posts, $GLOBALS['xoopsModuleConfig']['posts_per_page'], $start, 'start', 'topic_id=' . $topic_id . '&order=' . $order . '&status=' . $status . '&mode=' . $mode); |
|
342 | + $nav = new \XoopsPageNav($total_posts, $GLOBALS['xoopsModuleConfig']['posts_per_page'], $start, 'start', 'topic_id='.$topic_id.'&order='.$order.'&status='.$status.'&mode='.$mode); |
|
343 | 343 | //if (isset($GLOBALS['xoopsModuleConfig']['do_rewrite']) && $GLOBALS['xoopsModuleConfig']['do_rewrite'] === 1) $nav->url = XOOPS_URL . $nav->url; |
344 | 344 | if ('select' === $GLOBALS['xoopsModuleConfig']['pagenav_display']) { |
345 | 345 | $navi = $nav->renderSelect(); |
@@ -359,7 +359,7 @@ discard block |
||
359 | 359 | } |
360 | 360 | |
361 | 361 | if (!empty($postsArray[$post_id])) { |
362 | - $xoops_pagetitle = $postsArray[$post_id]->getVar('subject') . ' [' . $forumObject->getVar('forum_name') . ']'; |
|
362 | + $xoops_pagetitle = $postsArray[$post_id]->getVar('subject').' ['.$forumObject->getVar('forum_name').']'; |
|
363 | 363 | $xoopsTpl->assign('xoops_pagetitle', $xoops_pagetitle); |
364 | 364 | $xoopsOption['xoops_pagetitle'] = $xoops_pagetitle; |
365 | 365 | $kw = array_unique(explode(' ', strip_tags($postsArray[$post_id]->getVar('post_text')), 150)); |
@@ -368,7 +368,7 @@ discard block |
||
368 | 368 | $z = 0; |
369 | 369 | foreach ($kw as $k) { |
370 | 370 | if ($z < 30 && strlen(trim($k)) > 5) { |
371 | - $kwort .= trim($k) . ' '; |
|
371 | + $kwort .= trim($k).' '; |
|
372 | 372 | ++$z; |
373 | 373 | } |
374 | 374 | } |
@@ -395,56 +395,56 @@ discard block |
||
395 | 395 | // START irmtfan add restore to viewtopic |
396 | 396 | // if the topic is active |
397 | 397 | if ($topicObject->getVar('approved') > 0) { |
398 | - $admin_actions['merge'] = [ |
|
399 | - 'link' => XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname', 'n') . '/topicmanager.php?mode=merge&topic_id=' . $topic_id, |
|
398 | + $admin_actions['merge'] = [ |
|
399 | + 'link' => XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname', 'n').'/topicmanager.php?mode=merge&topic_id='.$topic_id, |
|
400 | 400 | 'name' => _MD_NEWBB_MERGETOPIC, |
401 | 401 | 'image' => $ad_merge |
402 | 402 | ]; |
403 | - $admin_actions['move'] = [ |
|
404 | - 'link' => XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname', 'n') . '/topicmanager.php?mode=move&topic_id=' . $topic_id, |
|
403 | + $admin_actions['move'] = [ |
|
404 | + 'link' => XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname', 'n').'/topicmanager.php?mode=move&topic_id='.$topic_id, |
|
405 | 405 | 'name' => _MD_NEWBB_MOVETOPIC, |
406 | 406 | 'image' => $ad_move |
407 | 407 | ]; |
408 | 408 | $admin_actions['delete'] = [ |
409 | - 'link' => XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname', 'n') . '/topicmanager.php?mode=delete&topic_id=' . $topic_id, |
|
409 | + 'link' => XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname', 'n').'/topicmanager.php?mode=delete&topic_id='.$topic_id, |
|
410 | 410 | 'name' => _MD_NEWBB_DELETETOPIC, |
411 | 411 | 'image' => $ad_delete |
412 | 412 | ]; |
413 | 413 | if (!$topicObject->getVar('topic_status')) { |
414 | 414 | $admin_actions['lock'] = [ |
415 | - 'link' => XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname', 'n') . '/topicmanager.php?mode=lock&topic_id=' . $topic_id, |
|
415 | + 'link' => XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname', 'n').'/topicmanager.php?mode=lock&topic_id='.$topic_id, |
|
416 | 416 | 'image' => $ad_lock, |
417 | 417 | 'name' => _MD_NEWBB_LOCKTOPIC |
418 | 418 | ]; |
419 | 419 | } else { |
420 | 420 | $admin_actions['unlock'] = [ |
421 | - 'link' => XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname', 'n') . '/topicmanager.php?mode=unlock&topic_id=' . $topic_id, |
|
421 | + 'link' => XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname', 'n').'/topicmanager.php?mode=unlock&topic_id='.$topic_id, |
|
422 | 422 | 'image' => $ad_unlock, |
423 | 423 | 'name' => _MD_NEWBB_UNLOCKTOPIC |
424 | 424 | ]; |
425 | 425 | } |
426 | 426 | if (!$topicObject->getVar('topic_sticky')) { |
427 | 427 | $admin_actions['sticky'] = [ |
428 | - 'link' => XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname', 'n') . '/topicmanager.php?mode=sticky&topic_id=' . $topic_id, |
|
428 | + 'link' => XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname', 'n').'/topicmanager.php?mode=sticky&topic_id='.$topic_id, |
|
429 | 429 | 'image' => $ad_sticky, |
430 | 430 | 'name' => _MD_NEWBB_STICKYTOPIC |
431 | 431 | ]; |
432 | 432 | } else { |
433 | 433 | $admin_actions['unsticky'] = [ |
434 | - 'link' => XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname', 'n') . '/topicmanager.php?mode=unsticky&topic_id=' . $topic_id, |
|
434 | + 'link' => XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname', 'n').'/topicmanager.php?mode=unsticky&topic_id='.$topic_id, |
|
435 | 435 | 'image' => $ad_unsticky, |
436 | 436 | 'name' => _MD_NEWBB_UNSTICKYTOPIC |
437 | 437 | ]; |
438 | 438 | } |
439 | 439 | if (!$topicObject->getVar('topic_digest')) { |
440 | 440 | $admin_actions['digest'] = [ |
441 | - 'link' => XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname', 'n') . '/topicmanager.php?mode=digest&topic_id=' . $topic_id, |
|
441 | + 'link' => XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname', 'n').'/topicmanager.php?mode=digest&topic_id='.$topic_id, |
|
442 | 442 | 'image' => $ad_digest, |
443 | 443 | 'name' => _MD_NEWBB_DIGESTTOPIC |
444 | 444 | ]; |
445 | 445 | } else { |
446 | 446 | $admin_actions['undigest'] = [ |
447 | - 'link' => XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname', 'n') . '/topicmanager.php?mode=undigest&topic_id=' . $topic_id, |
|
447 | + 'link' => XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname', 'n').'/topicmanager.php?mode=undigest&topic_id='.$topic_id, |
|
448 | 448 | 'image' => $ad_undigest, |
449 | 449 | 'name' => _MD_NEWBB_UNDIGESTTOPIC |
450 | 450 | ]; |
@@ -452,7 +452,7 @@ discard block |
||
452 | 452 | // if the topic is pending/deleted then restore/approve |
453 | 453 | } else { |
454 | 454 | $admin_actions['restore'] = [ |
455 | - 'link' => XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname', 'n') . '/topicmanager.php?mode=restore&topic_id=' . $topic_id, |
|
455 | + 'link' => XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname', 'n').'/topicmanager.php?mode=restore&topic_id='.$topic_id, |
|
456 | 456 | 'name' => _MD_NEWBB_RESTORETOPIC, |
457 | 457 | 'image' => $ad_restore |
458 | 458 | ]; |
@@ -531,11 +531,11 @@ discard block |
||
531 | 531 | 'is_visible' => $isVisible, |
532 | 532 | 'visible_message' => $visibleMsg, |
533 | 533 | 'disp_votes' => $xp_config['disp_vote_nums'], |
534 | - 'lang_vote' => constant('_MD_' . strtoupper($GLOBALS['xoopsModuleConfig']['poll_module']) . '_VOTE'), |
|
535 | - 'lang_results' => constant('_MD_' . strtoupper($GLOBALS['xoopsModuleConfig']['poll_module']) . '_RESULTS'), |
|
534 | + 'lang_vote' => constant('_MD_'.strtoupper($GLOBALS['xoopsModuleConfig']['poll_module']).'_VOTE'), |
|
535 | + 'lang_results' => constant('_MD_'.strtoupper($GLOBALS['xoopsModuleConfig']['poll_module']).'_RESULTS'), |
|
536 | 536 | 'back_link' => '' |
537 | 537 | ]); |
538 | - $classRenderer = ucfirst($GLOBALS['xoopsModuleConfig']['poll_module']) . 'Renderer'; |
|
538 | + $classRenderer = ucfirst($GLOBALS['xoopsModuleConfig']['poll_module']).'Renderer'; |
|
539 | 539 | /** @var Xoopspoll\Renderer $renderer */ |
540 | 540 | $renderer = new $classRenderer($pollObject); |
541 | 541 | // check to see if user has voted, show form if not, otherwise get results for form |
@@ -547,7 +547,7 @@ discard block |
||
547 | 547 | $myTpl = new \XoopsTpl(); |
548 | 548 | $renderer->assignForm($myTpl); |
549 | 549 | $myTpl->assign('action', $GLOBALS['xoops']->url("modules/newbb/votepolls.php?topic_id={$topic_id}&poll_id={$poll_id}")); |
550 | - $topic_pollform = $myTpl->fetch($GLOBALS['xoops']->path('modules/' . $GLOBALS['xoopsModuleConfig']['poll_module'] . '/templates/' . $GLOBALS['xoopsModuleConfig']['poll_module'] . '_view.tpl')); |
|
550 | + $topic_pollform = $myTpl->fetch($GLOBALS['xoops']->path('modules/'.$GLOBALS['xoopsModuleConfig']['poll_module'].'/templates/'.$GLOBALS['xoopsModuleConfig']['poll_module'].'_view.tpl')); |
|
551 | 551 | $GLOBALS['xoopsTpl']->assign('topic_pollform', $topic_pollform); |
552 | 552 | } else { |
553 | 553 | $GLOBALS['xoopsTpl']->assign('can_vote', false); |
@@ -558,7 +558,7 @@ discard block |
||
558 | 558 | // old xoopspoll or umfrage or any clone from them |
559 | 559 | } else { |
560 | 560 | $pollObject = new $classPoll($poll_id); |
561 | - $classRenderer = $classPoll . 'Renderer'; |
|
561 | + $classRenderer = $classPoll.'Renderer'; |
|
562 | 562 | $renderer = new $classRenderer($pollObject); |
563 | 563 | $xoopsTpl->assign('lang_alreadyvoted2', _PL_ALREADYVOTED2); |
564 | 564 | $xoopsTpl->assign('has_ended', $pollObject->getVar('end_time') < time() ? 1 : 0); |
@@ -579,7 +579,7 @@ discard block |
||
579 | 579 | |
580 | 580 | } |
581 | 581 | } |
582 | - $classLog = $classPoll . 'Log'; |
|
582 | + $classLog = $classPoll.'Log'; |
|
583 | 583 | $hasvoted = 0; |
584 | 584 | if ($GLOBALS['xoopsUser']) { |
585 | 585 | if ($classLog::hasVoted($poll_id, Request::getString('REMOTE_ADDR', '', 'SERVER'), $uid)) { |
@@ -595,12 +595,12 @@ discard block |
||
595 | 595 | if ($hasvoted || $pollObject->hasExpired()) { |
596 | 596 | $renderer->assignResults($xoopsTpl); |
597 | 597 | $xoopsTpl->assign('topic_pollresult', 1); |
598 | - setcookie('newbb_polls[' . $poll_id . ']', 1); |
|
598 | + setcookie('newbb_polls['.$poll_id.']', 1); |
|
599 | 599 | } else { |
600 | 600 | $renderer->assignForm($xoopsTpl); |
601 | 601 | $xoopsTpl->assign('lang_vote', _PL_VOTE); |
602 | 602 | $xoopsTpl->assign('lang_results', _PL_RESULTS); |
603 | - setcookie('newbb_polls[' . $poll_id . ']', 1); |
|
603 | + setcookie('newbb_polls['.$poll_id.']', 1); |
|
604 | 604 | } |
605 | 605 | } |
606 | 606 | } |
@@ -611,7 +611,7 @@ discard block |
||
611 | 611 | if (is_object($GLOBALS['xoopsUser']) |
612 | 612 | && $GLOBALS['xoopsUser']->getVar('uid') == $topicObject->getVar('topic_poster')) { |
613 | 613 | $t_poll = newbbDisplayImage('t_poll', _MD_NEWBB_ADDPOLL); |
614 | - $xoopsTpl->assign('forum_addpoll', '<a href=\'' . XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname', 'n') . '/polls.php?op=add&topic_id=' . $topic_id . '\'>' . $t_poll . '</a>'); |
|
614 | + $xoopsTpl->assign('forum_addpoll', '<a href=\''.XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname', 'n').'/polls.php?op=add&topic_id='.$topic_id.'\'>'.$t_poll.'</a>'); |
|
615 | 615 | } |
616 | 616 | } elseif ($isAdmin |
617 | 617 | || (is_object($pollObject) && is_object($GLOBALS['xoopsUser']) |
@@ -623,22 +623,22 @@ discard block |
||
623 | 623 | |
624 | 624 | $adminpoll_actions = []; |
625 | 625 | $adminpoll_actions['editpoll'] = [ |
626 | - 'link' => XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname', 'n') . '/polls.php?op=edit&poll_id=' . $topicObject->getVar('poll_id') . '&topic_id=' . $topic_id, |
|
626 | + 'link' => XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname', 'n').'/polls.php?op=edit&poll_id='.$topicObject->getVar('poll_id').'&topic_id='.$topic_id, |
|
627 | 627 | 'image' => $poll_edit, |
628 | 628 | 'name' => _MD_NEWBB_EDITPOLL |
629 | 629 | ]; |
630 | - $adminpoll_actions['deletepoll'] = [ |
|
631 | - 'link' => XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname', 'n') . '/polls.php?op=delete&poll_id=' . $topicObject->getVar('poll_id') . '&topic_id=' . $topic_id, |
|
630 | + $adminpoll_actions['deletepoll'] = [ |
|
631 | + 'link' => XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname', 'n').'/polls.php?op=delete&poll_id='.$topicObject->getVar('poll_id').'&topic_id='.$topic_id, |
|
632 | 632 | 'image' => $poll_delete, |
633 | 633 | 'name' => _MD_NEWBB_DELETEPOLL |
634 | 634 | ]; |
635 | 635 | $adminpoll_actions['restartpoll'] = [ |
636 | - 'link' => XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname', 'n') . '/polls.php?op=restart&poll_id=' . $topicObject->getVar('poll_id') . '&topic_id=' . $topic_id . '&forum=' . $forum_id, |
|
636 | + 'link' => XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname', 'n').'/polls.php?op=restart&poll_id='.$topicObject->getVar('poll_id').'&topic_id='.$topic_id.'&forum='.$forum_id, |
|
637 | 637 | 'image' => $poll_restart, |
638 | 638 | 'name' => _MD_NEWBB_RESTARTPOLL |
639 | 639 | ]; |
640 | - $adminpoll_actions['logpoll'] = [ |
|
641 | - 'link' => XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname', 'n') . '/polls.php?op=log&poll_id=' . $topicObject->getVar('poll_id') . '&topic_id=' . $topic_id . '&forum=' . $forum_id, |
|
640 | + $adminpoll_actions['logpoll'] = [ |
|
641 | + 'link' => XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname', 'n').'/polls.php?op=log&poll_id='.$topicObject->getVar('poll_id').'&topic_id='.$topic_id.'&forum='.$forum_id, |
|
642 | 642 | 'image' => $poll_log, |
643 | 643 | 'name' => _MD_NEWBB_POLL_VIEWLOG |
644 | 644 | ]; |
@@ -670,7 +670,7 @@ discard block |
||
670 | 670 | $rating_img = newbbDisplayImage('blank'); |
671 | 671 | } else { |
672 | 672 | // irmtfan - add alt key for rating |
673 | - $rating_img = newbbDisplayImage('rate' . $rating, constant('_MD_NEWBB_RATE' . $rating)); |
|
673 | + $rating_img = newbbDisplayImage('rate'.$rating, constant('_MD_NEWBB_RATE'.$rating)); |
|
674 | 674 | } |
675 | 675 | $xoopsTpl->assign('rating_img', $rating_img); |
676 | 676 | $xoopsTpl->assign('rate1', newbbDisplayImage('rate1', _MD_NEWBB_RATE1)); |
@@ -682,7 +682,7 @@ discard block |
||
682 | 682 | |
683 | 683 | // create jump box |
684 | 684 | if (!empty($GLOBALS['xoopsModuleConfig']['show_jump'])) { |
685 | - require_once __DIR__ . '/include/functions.forum.php'; |
|
685 | + require_once __DIR__.'/include/functions.forum.php'; |
|
686 | 686 | $xoopsTpl->assign('forum_jumpbox', newbbMakeJumpbox($forum_id)); |
687 | 687 | } |
688 | 688 | |
@@ -703,25 +703,25 @@ discard block |
||
703 | 703 | $viewmode_options = []; |
704 | 704 | if ('DESC' === $order) { |
705 | 705 | $viewmode_options[] = [ |
706 | - 'link' => XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname', 'n') . '/viewtopic.php?order=ASC&status=$status&topic_id=' . $topic_id, |
|
706 | + 'link' => XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname', 'n').'/viewtopic.php?order=ASC&status=$status&topic_id='.$topic_id, |
|
707 | 707 | 'title' => _OLDESTFIRST |
708 | 708 | ]; |
709 | 709 | } else { |
710 | 710 | $viewmode_options[] = [ |
711 | - 'link' => XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname', 'n') . '/viewtopic.php?order=DESC&status=$status&topic_id=' . $topic_id, |
|
711 | + 'link' => XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname', 'n').'/viewtopic.php?order=DESC&status=$status&topic_id='.$topic_id, |
|
712 | 712 | 'title' => _NEWESTFIRST |
713 | 713 | ]; |
714 | 714 | } |
715 | 715 | |
716 | 716 | switch ($status) { |
717 | 717 | case 'active': |
718 | - $current_status = '[' . _MD_NEWBB_TYPE_ADMIN . ']'; |
|
718 | + $current_status = '['._MD_NEWBB_TYPE_ADMIN.']'; |
|
719 | 719 | break; |
720 | 720 | case 'pending': |
721 | - $current_status = '[' . _MD_NEWBB_TYPE_PENDING . ']'; |
|
721 | + $current_status = '['._MD_NEWBB_TYPE_PENDING.']'; |
|
722 | 722 | break; |
723 | 723 | case 'deleted': |
724 | - $current_status = '[' . _MD_NEWBB_TYPE_DELETED . ']'; |
|
724 | + $current_status = '['._MD_NEWBB_TYPE_DELETED.']'; |
|
725 | 725 | break; |
726 | 726 | default: |
727 | 727 | $current_status = ''; |
@@ -744,7 +744,7 @@ discard block |
||
744 | 744 | && $topicHandler->getPermission($forumObject, $topicObject->getVar('topic_status'), 'reply') |
745 | 745 | && $moderateHandler->verifyUser(-1, '', $forumObject->getVar('forum_id'))) { |
746 | 746 | // END irmtfan add verifyUser to quick reply |
747 | - $forum_form = new \XoopsThemeForm(_MD_NEWBB_POSTREPLY, 'quick_reply', XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname', 'n') . '/post.php', 'post', true); |
|
747 | + $forum_form = new \XoopsThemeForm(_MD_NEWBB_POSTREPLY, 'quick_reply', XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname', 'n').'/post.php', 'post', true); |
|
748 | 748 | if (!is_object($GLOBALS['xoopsUser'])) { |
749 | 749 | //$configHandler = xoops_getHandler('config'); |
750 | 750 | $user_tray = new \XoopsFormElementTray(_MD_NEWBB_ACCOUNT); |
@@ -779,7 +779,7 @@ discard block |
||
779 | 779 | |
780 | 780 | $forum_form->addElement(new \XoopsFormHidden('isreply', 1)); |
781 | 781 | |
782 | - $forum_form->addElement(new \XoopsFormHidden('subject', _MD_NEWBB_RE . ': ' . $topicObject->getVar('topic_title', 'e'))); |
|
782 | + $forum_form->addElement(new \XoopsFormHidden('subject', _MD_NEWBB_RE.': '.$topicObject->getVar('topic_title', 'e'))); |
|
783 | 783 | $forum_form->addElement(new \XoopsFormHidden('pid', empty($post_id) ? $topicHandler->getTopPostId($topic_id) : $post_id)); |
784 | 784 | $forum_form->addElement(new \XoopsFormHidden('topic_id', $topic_id)); |
785 | 785 | $forum_form->addElement(new \XoopsFormHidden('forum', $forum_id)); |
@@ -791,7 +791,7 @@ discard block |
||
791 | 791 | $forum_form->addElement(new \XoopsFormHidden('contents_submit', 1)); |
792 | 792 | |
793 | 793 | $submit_button = new \XoopsFormButton('', 'quick_submit', _SUBMIT, 'submit'); |
794 | - $submit_button->setExtra('onclick="if (document.forms.quick_reply.message.value === \'RE\' || document.forms.quick_reply.message.value === \'\') { alert(\'' . _MD_NEWBB_QUICKREPLY_EMPTY . '\'); return false;} else { return true;}"'); |
|
794 | + $submit_button->setExtra('onclick="if (document.forms.quick_reply.message.value === \'RE\' || document.forms.quick_reply.message.value === \'\') { alert(\''._MD_NEWBB_QUICKREPLY_EMPTY.'\'); return false;} else { return true;}"'); |
|
795 | 795 | $forum_form->addElement($submit_button); |
796 | 796 | |
797 | 797 | $toggles = newbbGetCookie('G', true); |
@@ -806,13 +806,13 @@ discard block |
||
806 | 806 | $quickreply['show'] = 1; // = !empty($GLOBALS['xoopsModuleConfig']['quickreply_enabled'] |
807 | 807 | $quickreply['expand'] = (count($toggles) > 0) ? (in_array('qr', $toggles, true) ? false : true) : true; |
808 | 808 | if ($quickreply['expand']) { |
809 | - $quickreply['style'] = 'block'; //irmtfan move semicolon |
|
809 | + $quickreply['style'] = 'block'; //irmtfan move semicolon |
|
810 | 810 | $quickreply_icon_display = $qr_expand; |
811 | - $quickreply_alt = _MD_NEWBB_HIDE . ' ' . _MD_NEWBB_QUICKREPLY; |
|
811 | + $quickreply_alt = _MD_NEWBB_HIDE.' '._MD_NEWBB_QUICKREPLY; |
|
812 | 812 | } else { |
813 | - $quickreply['style'] = 'none'; //irmtfan move semicolon |
|
813 | + $quickreply['style'] = 'none'; //irmtfan move semicolon |
|
814 | 814 | $quickreply_icon_display = $qr_collapse; |
815 | - $quickreply_alt = _MD_NEWBB_SEE . ' ' . _MD_NEWBB_QUICKREPLY; |
|
815 | + $quickreply_alt = _MD_NEWBB_SEE.' '._MD_NEWBB_QUICKREPLY; |
|
816 | 816 | } |
817 | 817 | $quickreply['displayImage'] = newbbDisplayImage($quickreply_icon_display, $quickreply_alt); |
818 | 818 | $quickreply['form'] = $forum_form->render(); |
@@ -828,6 +828,6 @@ discard block |
||
828 | 828 | $xoopsTpl->assign('tagbar', tagBar($topicObject->getVar('topic_tags', 'n'))); |
829 | 829 | } |
830 | 830 | // irmtfan move to footer.php |
831 | -require_once __DIR__ . '/footer.php'; |
|
831 | +require_once __DIR__.'/footer.php'; |
|
832 | 832 | include $GLOBALS['xoops']->path('footer.php'); |
833 | 833 | $xoopsLogger->stopTime('newBB_viewtopic'); |
@@ -144,13 +144,13 @@ |
||
144 | 144 | </div>'; |
145 | 145 | if ($isAdmin) { |
146 | 146 | xoops_confirm([ |
147 | - 'post_id' => $post_id, |
|
148 | - 'viewmode' => $viewmode, |
|
149 | - 'order' => $order, |
|
150 | - 'forum' => $forum, |
|
151 | - 'topic_id' => $topic_id, |
|
152 | - 'ok' => 99 |
|
153 | - ], 'delete.php', _MD_NEWBB_DEL_RELATED); |
|
147 | + 'post_id' => $post_id, |
|
148 | + 'viewmode' => $viewmode, |
|
149 | + 'order' => $order, |
|
150 | + 'forum' => $forum, |
|
151 | + 'topic_id' => $topic_id, |
|
152 | + 'ok' => 99 |
|
153 | + ], 'delete.php', _MD_NEWBB_DEL_RELATED); |
|
154 | 154 | } |
155 | 155 | include $GLOBALS['xoops']->path('footer.php'); |
156 | 156 | } |
@@ -11,7 +11,7 @@ discard block |
||
11 | 11 | |
12 | 12 | use Xmf\Request; |
13 | 13 | |
14 | -require_once __DIR__ . '/header.php'; |
|
14 | +require_once __DIR__.'/header.php'; |
|
15 | 15 | |
16 | 16 | $ok = Request::getInt('ok', 0, 'POST'); |
17 | 17 | |
@@ -43,15 +43,15 @@ discard block |
||
43 | 43 | } |
44 | 44 | $topic_id = $topic->getVar('topic_id'); |
45 | 45 | if (!$topic_id) { |
46 | - $redirect = empty($forum) ? 'index.php' : 'viewforum.php?forum=' . $forum; |
|
47 | - $redirect = XOOPS_URL . '/modules/newbb/' . $redirect; |
|
46 | + $redirect = empty($forum) ? 'index.php' : 'viewforum.php?forum='.$forum; |
|
47 | + $redirect = XOOPS_URL.'/modules/newbb/'.$redirect; |
|
48 | 48 | redirect_header($redirect, 2, _MD_NEWBB_ERRORTOPIC); |
49 | 49 | } |
50 | 50 | |
51 | 51 | $forum = $topic->getVar('forum_id'); |
52 | 52 | $forumObject = $forumHandler->get($forum); |
53 | 53 | if (!$forumHandler->getPermission($forumObject)) { |
54 | - redirect_header(XOOPS_URL . '/index.php', 2, _MD_NEWBB_NORIGHTTOACCESS); |
|
54 | + redirect_header(XOOPS_URL.'/index.php', 2, _MD_NEWBB_NORIGHTTOACCESS); |
|
55 | 55 | } |
56 | 56 | |
57 | 57 | $isAdmin = newbbIsAdmin($forumObject); |
@@ -62,11 +62,11 @@ discard block |
||
62 | 62 | $topic_status = $topic->getVar('topic_status'); |
63 | 63 | if (($postObject->checkIdentity() || $isAdmin) && $topicHandler->getPermission($topic->getVar('forum_id'), $topic_status, 'delete')) { |
64 | 64 | } else { |
65 | - redirect_header(XOOPS_URL . "/modules/newbb/viewtopic.php?topic_id=$topic_id&pid=$pid&forum=$forum", 2, _MD_NEWBB_DELNOTALLOWED); |
|
65 | + redirect_header(XOOPS_URL."/modules/newbb/viewtopic.php?topic_id=$topic_id&pid=$pid&forum=$forum", 2, _MD_NEWBB_DELNOTALLOWED); |
|
66 | 66 | } |
67 | 67 | |
68 | 68 | if (!$isAdmin && !$postObject->checkTimelimit('delete_timelimit')) { |
69 | - redirect_header(XOOPS_URL . "/modules/newbb/viewtopic.php?forum=$forum&topic_id=$topic_id&post_id=$post_id&pid=$pid", 2, _MD_NEWBB_TIMEISUPDEL); |
|
69 | + redirect_header(XOOPS_URL."/modules/newbb/viewtopic.php?forum=$forum&topic_id=$topic_id&post_id=$post_id&pid=$pid", 2, _MD_NEWBB_TIMEISUPDEL); |
|
70 | 70 | } |
71 | 71 | |
72 | 72 | if ($GLOBALS['xoopsModuleConfig']['wol_enabled']) { |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | } |
83 | 83 | if ($isDeleteOne && $postObject->isTopic() && $topic->getVar('topic_replies') > 0) { |
84 | 84 | //$postHandler->emptyTopic($postObject); |
85 | - redirect_header(XOOPS_URL . "/modules/newbb/viewtopic.php?topic_id=$topic_id&pid=$pid&forum=$forum", 2, _MD_NEWBB_POSTFIRSTWITHREPLYNODELETED); |
|
85 | + redirect_header(XOOPS_URL."/modules/newbb/viewtopic.php?topic_id=$topic_id&pid=$pid&forum=$forum", 2, _MD_NEWBB_POSTFIRSTWITHREPLYNODELETED); |
|
86 | 86 | } else { |
87 | 87 | if (Request::getString('post_text', '', 'POST')) { |
88 | 88 | //send a message |
@@ -101,11 +101,11 @@ discard block |
||
101 | 101 | $xoopsMailer->setToUsers($senduser); |
102 | 102 | $xoopsMailer->setFromName($GLOBALS['xoopsUser']->getVar('uname')); |
103 | 103 | $xoopsMailer->setSubject(_MD_NEWBB_DELEDEDMSG_SUBJECT); |
104 | - $forenurl = '<a href="' . XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/viewtopic.php?topic_id=' . $postObject->getVar('topic_id') . '">' . $postObject->getVar('subject') . '</a>'; |
|
104 | + $forenurl = '<a href="'.XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/viewtopic.php?topic_id='.$postObject->getVar('topic_id').'">'.$postObject->getVar('subject').'</a>'; |
|
105 | 105 | if (!empty($GLOBALS['xoopsModuleConfig']['do_rewrite'])) { |
106 | 106 | $forenurl = seo_urls($forenurl); |
107 | 107 | } |
108 | - $body = sprintf(_MD_NEWBB_DELEDEDMSG_BODY, $senduser->getVar('uname'), $forenurl, Request::getString('post_text', '', 'POST'), $GLOBALS['xoopsUser']->getVar('uname'), $GLOBALS['xoopsConfig']['sitename'], XOOPS_URL . '/'); |
|
108 | + $body = sprintf(_MD_NEWBB_DELEDEDMSG_BODY, $senduser->getVar('uname'), $forenurl, Request::getString('post_text', '', 'POST'), $GLOBALS['xoopsUser']->getVar('uname'), $GLOBALS['xoopsConfig']['sitename'], XOOPS_URL.'/'); |
|
109 | 109 | $body = $myts->nl2Br($body); |
110 | 110 | $xoopsMailer->setBody($body); |
111 | 111 | $xoopsMailer->send(); |
@@ -121,25 +121,25 @@ discard block |
||
121 | 121 | |
122 | 122 | //$postObject->loadFilters('delete'); |
123 | 123 | if ($isDeleteOne) { |
124 | - redirect_header(XOOPS_URL . "/modules/newbb/viewtopic.php?topic_id=$topic_id&order=$order&viewmode=$viewmode&pid=$pid&forum=$forum", 2, _MD_NEWBB_POSTDELETED); |
|
124 | + redirect_header(XOOPS_URL."/modules/newbb/viewtopic.php?topic_id=$topic_id&order=$order&viewmode=$viewmode&pid=$pid&forum=$forum", 2, _MD_NEWBB_POSTDELETED); |
|
125 | 125 | } else { |
126 | - redirect_header(XOOPS_URL . "/modules/newbb/viewforum.php?forum=$forum", 2, _MD_NEWBB_POSTSDELETED); |
|
126 | + redirect_header(XOOPS_URL."/modules/newbb/viewforum.php?forum=$forum", 2, _MD_NEWBB_POSTSDELETED); |
|
127 | 127 | } |
128 | 128 | } else { |
129 | 129 | include $GLOBALS['xoops']->path('header.php'); |
130 | 130 | //xoops_confirm(array('post_id' => $post_id, 'viewmode' => $viewmode, 'order' => $order, 'forum' => $forum, 'topic_id' => $topic_id, 'ok' => 1), 'delete.php', _MD_NEWBB_DEL_ONE); |
131 | - echo '<div class="confirmMsg">' . _MD_NEWBB_DEL_ONE . '<br> |
|
132 | - <form method="post" action="' . XOOPS_URL . '/modules/newbb/delete.php">'; |
|
133 | - echo _MD_NEWBB_DELEDEDMSG . '<br>'; |
|
131 | + echo '<div class="confirmMsg">'._MD_NEWBB_DEL_ONE.'<br> |
|
132 | + <form method="post" action="' . XOOPS_URL.'/modules/newbb/delete.php">'; |
|
133 | + echo _MD_NEWBB_DELEDEDMSG.'<br>'; |
|
134 | 134 | echo '<textarea name="post_text" cols="50" rows="5"></textarea><br>'; |
135 | - echo '<input type="hidden" name="post_id" value="' . htmlspecialchars($post_id, ENT_QUOTES | ENT_HTML5) . '" />'; |
|
136 | - echo '<input type="hidden" name="order" value="' . htmlspecialchars($order, ENT_QUOTES | ENT_HTML5) . '" />'; |
|
137 | - echo '<input type="hidden" name="forum" value="' . htmlspecialchars($forum, ENT_QUOTES | ENT_HTML5) . '" />'; |
|
138 | - echo '<input type="hidden" name="topic_id" value="' . htmlspecialchars($topic_id, ENT_QUOTES | ENT_HTML5) . '" />'; |
|
135 | + echo '<input type="hidden" name="post_id" value="'.htmlspecialchars($post_id, ENT_QUOTES | ENT_HTML5).'" />'; |
|
136 | + echo '<input type="hidden" name="order" value="'.htmlspecialchars($order, ENT_QUOTES | ENT_HTML5).'" />'; |
|
137 | + echo '<input type="hidden" name="forum" value="'.htmlspecialchars($forum, ENT_QUOTES | ENT_HTML5).'" />'; |
|
138 | + echo '<input type="hidden" name="topic_id" value="'.htmlspecialchars($topic_id, ENT_QUOTES | ENT_HTML5).'" />'; |
|
139 | 139 | echo '<input type="hidden" name="ok" value="1" />'; |
140 | 140 | echo $GLOBALS['xoopsSecurity']->getTokenHTML(); |
141 | - echo '<input type="submit" name="confirm_submit" value="' . _SUBMIT . '" title="' . _SUBMIT . '"/> |
|
142 | - <input type="button" name="confirm_back" value="' . _CANCEL . '" onclick="history.go(-1);" title="' . _CANCEL . '" /> |
|
141 | + echo '<input type="submit" name="confirm_submit" value="'._SUBMIT.'" title="'._SUBMIT.'"/> |
|
142 | + <input type="button" name="confirm_back" value="' . _CANCEL.'" onclick="history.go(-1);" title="'._CANCEL.'" /> |
|
143 | 143 | </form> |
144 | 144 | </div>'; |
145 | 145 | if ($isAdmin) { |
@@ -21,49 +21,49 @@ |
||
21 | 21 | $moduleDirName = basename(dirname(dirname(__DIR__))); |
22 | 22 | $moduleDirNameUpper = strtoupper($moduleDirName); |
23 | 23 | |
24 | -define('CO_' . $moduleDirNameUpper . '_GDLIBSTATUS', 'GD library support: '); |
|
25 | -define('CO_' . $moduleDirNameUpper . '_GDLIBVERSION', 'GD Library version: '); |
|
26 | -define('CO_' . $moduleDirNameUpper . '_GDOFF', "<span style='font-weight: bold;'>Disabled</span> (No thumbnails available)"); |
|
27 | -define('CO_' . $moduleDirNameUpper . '_GDON', "<span style='font-weight: bold;'>Enabled</span> (Thumbsnails available)"); |
|
28 | -define('CO_' . $moduleDirNameUpper . '_IMAGEINFO', 'Server status'); |
|
29 | -define('CO_' . $moduleDirNameUpper . '_MAXPOSTSIZE', 'Max post size permitted (post_max_size directive in php.ini): '); |
|
30 | -define('CO_' . $moduleDirNameUpper . '_MAXUPLOADSIZE', 'Max upload size permitted (upload_max_filesize directive in php.ini): '); |
|
31 | -define('CO_' . $moduleDirNameUpper . '_MEMORYLIMIT', 'Memory limit (memory_limit directive in php.ini): '); |
|
32 | -define('CO_' . $moduleDirNameUpper . '_METAVERSION', "<span style='font-weight: bold;'>Downloads meta version:</span> "); |
|
33 | -define('CO_' . $moduleDirNameUpper . '_OFF', "<span style='font-weight: bold;'>OFF</span>"); |
|
34 | -define('CO_' . $moduleDirNameUpper . '_ON', "<span style='font-weight: bold;'>ON</span>"); |
|
35 | -define('CO_' . $moduleDirNameUpper . '_SERVERPATH', 'Server path to XOOPS root: '); |
|
36 | -define('CO_' . $moduleDirNameUpper . '_SERVERUPLOADSTATUS', 'Server uploads status: '); |
|
37 | -define('CO_' . $moduleDirNameUpper . '_SPHPINI', "<span style='font-weight: bold;'>Information taken from PHP ini file:</span>"); |
|
38 | -define('CO_' . $moduleDirNameUpper . '_UPLOADPATHDSC', 'Note. Upload path *MUST* contain the full server path of your upload folder.'); |
|
24 | +define('CO_'.$moduleDirNameUpper.'_GDLIBSTATUS', 'GD library support: '); |
|
25 | +define('CO_'.$moduleDirNameUpper.'_GDLIBVERSION', 'GD Library version: '); |
|
26 | +define('CO_'.$moduleDirNameUpper.'_GDOFF', "<span style='font-weight: bold;'>Disabled</span> (No thumbnails available)"); |
|
27 | +define('CO_'.$moduleDirNameUpper.'_GDON', "<span style='font-weight: bold;'>Enabled</span> (Thumbsnails available)"); |
|
28 | +define('CO_'.$moduleDirNameUpper.'_IMAGEINFO', 'Server status'); |
|
29 | +define('CO_'.$moduleDirNameUpper.'_MAXPOSTSIZE', 'Max post size permitted (post_max_size directive in php.ini): '); |
|
30 | +define('CO_'.$moduleDirNameUpper.'_MAXUPLOADSIZE', 'Max upload size permitted (upload_max_filesize directive in php.ini): '); |
|
31 | +define('CO_'.$moduleDirNameUpper.'_MEMORYLIMIT', 'Memory limit (memory_limit directive in php.ini): '); |
|
32 | +define('CO_'.$moduleDirNameUpper.'_METAVERSION', "<span style='font-weight: bold;'>Downloads meta version:</span> "); |
|
33 | +define('CO_'.$moduleDirNameUpper.'_OFF', "<span style='font-weight: bold;'>OFF</span>"); |
|
34 | +define('CO_'.$moduleDirNameUpper.'_ON', "<span style='font-weight: bold;'>ON</span>"); |
|
35 | +define('CO_'.$moduleDirNameUpper.'_SERVERPATH', 'Server path to XOOPS root: '); |
|
36 | +define('CO_'.$moduleDirNameUpper.'_SERVERUPLOADSTATUS', 'Server uploads status: '); |
|
37 | +define('CO_'.$moduleDirNameUpper.'_SPHPINI', "<span style='font-weight: bold;'>Information taken from PHP ini file:</span>"); |
|
38 | +define('CO_'.$moduleDirNameUpper.'_UPLOADPATHDSC', 'Note. Upload path *MUST* contain the full server path of your upload folder.'); |
|
39 | 39 | |
40 | -define('CO_' . $moduleDirNameUpper . '_PRINT', "<span style='font-weight: bold;'>Print</span>"); |
|
41 | -define('CO_' . $moduleDirNameUpper . '_PDF', "<span style='font-weight: bold;'>Create PDF</span>"); |
|
40 | +define('CO_'.$moduleDirNameUpper.'_PRINT', "<span style='font-weight: bold;'>Print</span>"); |
|
41 | +define('CO_'.$moduleDirNameUpper.'_PDF', "<span style='font-weight: bold;'>Create PDF</span>"); |
|
42 | 42 | |
43 | -define('CO_' . $moduleDirNameUpper . '_UPGRADEFAILED0', "Update failed - couldn't rename field '%s'"); |
|
44 | -define('CO_' . $moduleDirNameUpper . '_UPGRADEFAILED1', "Update failed - couldn't add new fields"); |
|
45 | -define('CO_' . $moduleDirNameUpper . '_UPGRADEFAILED2', "Update failed - couldn't rename table '%s'"); |
|
46 | -define('CO_' . $moduleDirNameUpper . '_ERROR_COLUMN', 'Could not create column in database : %s'); |
|
47 | -define('CO_' . $moduleDirNameUpper . '_ERROR_BAD_XOOPS', 'This module requires XOOPS %s+ (%s installed)'); |
|
48 | -define('CO_' . $moduleDirNameUpper . '_ERROR_BAD_PHP', 'This module requires PHP version %s+ (%s installed)'); |
|
49 | -define('CO_' . $moduleDirNameUpper . '_ERROR_TAG_REMOVAL', 'Could not remove tags from Tag Module'); |
|
43 | +define('CO_'.$moduleDirNameUpper.'_UPGRADEFAILED0', "Update failed - couldn't rename field '%s'"); |
|
44 | +define('CO_'.$moduleDirNameUpper.'_UPGRADEFAILED1', "Update failed - couldn't add new fields"); |
|
45 | +define('CO_'.$moduleDirNameUpper.'_UPGRADEFAILED2', "Update failed - couldn't rename table '%s'"); |
|
46 | +define('CO_'.$moduleDirNameUpper.'_ERROR_COLUMN', 'Could not create column in database : %s'); |
|
47 | +define('CO_'.$moduleDirNameUpper.'_ERROR_BAD_XOOPS', 'This module requires XOOPS %s+ (%s installed)'); |
|
48 | +define('CO_'.$moduleDirNameUpper.'_ERROR_BAD_PHP', 'This module requires PHP version %s+ (%s installed)'); |
|
49 | +define('CO_'.$moduleDirNameUpper.'_ERROR_TAG_REMOVAL', 'Could not remove tags from Tag Module'); |
|
50 | 50 | |
51 | -define('CO_' . $moduleDirNameUpper . '_FOLDERS_DELETED_OK', 'Upload Folders have been deleted'); |
|
51 | +define('CO_'.$moduleDirNameUpper.'_FOLDERS_DELETED_OK', 'Upload Folders have been deleted'); |
|
52 | 52 | |
53 | 53 | // Error Msgs |
54 | -define('CO_' . $moduleDirNameUpper . '_ERROR_BAD_DEL_PATH', 'Could not delete %s directory'); |
|
55 | -define('CO_' . $moduleDirNameUpper . '_ERROR_BAD_REMOVE', 'Could not delete %s'); |
|
56 | -define('CO_' . $moduleDirNameUpper . '_ERROR_NO_PLUGIN', 'Could not load plugin'); |
|
54 | +define('CO_'.$moduleDirNameUpper.'_ERROR_BAD_DEL_PATH', 'Could not delete %s directory'); |
|
55 | +define('CO_'.$moduleDirNameUpper.'_ERROR_BAD_REMOVE', 'Could not delete %s'); |
|
56 | +define('CO_'.$moduleDirNameUpper.'_ERROR_NO_PLUGIN', 'Could not load plugin'); |
|
57 | 57 | |
58 | 58 | //Help |
59 | -define('CO_' . $moduleDirNameUpper . '_DIRNAME', basename(dirname(dirname(__DIR__)))); |
|
60 | -define('CO_' . $moduleDirNameUpper . '_HELP_HEADER', __DIR__ . '/help/helpheader.tpl'); |
|
61 | -define('CO_' . $moduleDirNameUpper . '_BACK_2_ADMIN', 'Back to Administration of '); |
|
62 | -define('CO_' . $moduleDirNameUpper . '_OVERVIEW', 'Overview'); |
|
59 | +define('CO_'.$moduleDirNameUpper.'_DIRNAME', basename(dirname(dirname(__DIR__)))); |
|
60 | +define('CO_'.$moduleDirNameUpper.'_HELP_HEADER', __DIR__.'/help/helpheader.tpl'); |
|
61 | +define('CO_'.$moduleDirNameUpper.'_BACK_2_ADMIN', 'Back to Administration of '); |
|
62 | +define('CO_'.$moduleDirNameUpper.'_OVERVIEW', 'Overview'); |
|
63 | 63 | |
64 | 64 | //define('CO_' . $moduleDirNameUpper . '_HELP_DIR', __DIR__); |
65 | 65 | |
66 | 66 | //help multi-page |
67 | -define('CO_' . $moduleDirNameUpper . '_DISCLAIMER', 'Disclaimer'); |
|
68 | -define('CO_' . $moduleDirNameUpper . '_LICENSE', 'License'); |
|
69 | -define('CO_' . $moduleDirNameUpper . '_SUPPORT', 'Support'); |
|
67 | +define('CO_'.$moduleDirNameUpper.'_DISCLAIMER', 'Disclaimer'); |
|
68 | +define('CO_'.$moduleDirNameUpper.'_LICENSE', 'License'); |
|
69 | +define('CO_'.$moduleDirNameUpper.'_SUPPORT', 'Support'); |