@@ -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 | |
@@ -66,8 +66,8 @@ discard block |
||
| 66 | 66 | global $accessForums; |
| 67 | 67 | global $xoopsLogger; |
| 68 | 68 | |
| 69 | - require_once __DIR__ . '/../include/functions.config.php'; |
|
| 70 | - require_once __DIR__ . '/../include/functions.time.php'; |
|
| 69 | + require_once __DIR__.'/../include/functions.config.php'; |
|
| 70 | + require_once __DIR__.'/../include/functions.time.php'; |
|
| 71 | 71 | |
| 72 | 72 | $myts = \MyTextSanitizer::getInstance(); |
| 73 | 73 | $block = []; |
@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | $extraCriteria = ''; |
| 77 | 77 | if (!empty($options[2])) { |
| 78 | 78 | //require_once __DIR__ . '/../include/functions.time.php'; |
| 79 | - $extraCriteria .= ' AND p.post_time>' . (time() - newbbGetSinceTime($options[2])); |
|
| 79 | + $extraCriteria .= ' AND p.post_time>'.(time() - newbbGetSinceTime($options[2])); |
|
| 80 | 80 | } |
| 81 | 81 | switch ($options[0]) { |
| 82 | 82 | case 'time': |
@@ -102,7 +102,7 @@ discard block |
||
| 102 | 102 | return $block; |
| 103 | 103 | } |
| 104 | 104 | |
| 105 | - $forumCriteria = ' AND t.forum_id IN (' . implode(',', $allowedForums) . ')'; |
|
| 105 | + $forumCriteria = ' AND t.forum_id IN ('.implode(',', $allowedForums).')'; |
|
| 106 | 106 | $approveCriteria = ' AND t.approved = 1'; |
| 107 | 107 | |
| 108 | 108 | $newbbConfig = newbbLoadConfig(); |
@@ -158,13 +158,13 @@ discard block |
||
| 158 | 158 | return $block; |
| 159 | 159 | } |
| 160 | 160 | |
| 161 | - require_once __DIR__ . '/../include/functions.user.php'; |
|
| 161 | + require_once __DIR__.'/../include/functions.user.php'; |
|
| 162 | 162 | $author_name = newbbGetUnameFromIds(array_keys($author), $newbbConfig['show_realname'], true); |
| 163 | 163 | |
| 164 | 164 | if (count($types) > 0) { |
| 165 | 165 | /** @var Newbb\TypeHandler $typeHandler */ |
| 166 | 166 | $typeHandler = Newbb\Helper::getInstance()->getHandler('Type'); |
| 167 | - $type_list = $typeHandler->getList(new \Criteria('type_id', '(' . implode(', ', array_keys($types)) . ')', 'IN')); |
|
| 167 | + $type_list = $typeHandler->getList(new \Criteria('type_id', '('.implode(', ', array_keys($types)).')', 'IN')); |
|
| 168 | 168 | } |
| 169 | 169 | |
| 170 | 170 | foreach ($rows as $arr) { |
@@ -172,7 +172,7 @@ discard block |
||
| 172 | 172 | xoops_loadLanguage('main', 'newbb'); |
| 173 | 173 | $topic = []; |
| 174 | 174 | $topic_page_jump = newbbDisplayImage('lastposticon', _MD_NEWBB_GOTOLASTPOST); |
| 175 | - $topic['topic_subject'] = empty($type_list[$arr['type_id']]) ? '' : '[' . $type_list[$arr['type_id']] . ']'; |
|
| 175 | + $topic['topic_subject'] = empty($type_list[$arr['type_id']]) ? '' : '['.$type_list[$arr['type_id']].']'; |
|
| 176 | 176 | |
| 177 | 177 | $topic['post_id'] = $arr['post_id']; |
| 178 | 178 | $topic['topic_status'] = $arr['topic_status']; |
@@ -184,7 +184,7 @@ discard block |
||
| 184 | 184 | if (!empty($options[5])) { |
| 185 | 185 | $title = xoops_substr($title, 0, $options[5]); |
| 186 | 186 | } |
| 187 | - $topic['title'] = $topic['topic_subject'] . ' ' . $title; |
|
| 187 | + $topic['title'] = $topic['topic_subject'].' '.$title; |
|
| 188 | 188 | $topic['replies'] = $arr['topic_replies']; |
| 189 | 189 | $topic['views'] = $arr['topic_views']; |
| 190 | 190 | $topic['time'] = newbbFormatTimestamp($arr['post_time']); |
@@ -196,9 +196,9 @@ discard block |
||
| 196 | 196 | $topic['topic_poster'] = $topic_poster; |
| 197 | 197 | $topic['topic_page_jump'] = $topic_page_jump; |
| 198 | 198 | // START irmtfan remove hardcoded html in URLs - add $seo_topic_url |
| 199 | - $seo_url = XOOPS_URL . '/' . SEO_MODULE_NAME . '/viewtopic.php?post_id=' . $topic['post_id']; |
|
| 200 | - $seo_topic_url = XOOPS_URL . '/' . SEO_MODULE_NAME . '/viewtopic.php?topic_id=' . $topic['id']; |
|
| 201 | - $seo_forum_url = XOOPS_URL . '/' . SEO_MODULE_NAME . '/viewforum.php?forum=' . $topic['forum_id']; |
|
| 199 | + $seo_url = XOOPS_URL.'/'.SEO_MODULE_NAME.'/viewtopic.php?post_id='.$topic['post_id']; |
|
| 200 | + $seo_topic_url = XOOPS_URL.'/'.SEO_MODULE_NAME.'/viewtopic.php?topic_id='.$topic['id']; |
|
| 201 | + $seo_forum_url = XOOPS_URL.'/'.SEO_MODULE_NAME.'/viewforum.php?forum='.$topic['forum_id']; |
|
| 202 | 202 | if (!empty($newbbConfig['do_rewrite'])) { |
| 203 | 203 | $topic['seo_url'] = seo_urls($seo_url); |
| 204 | 204 | $topic['seo_topic_url'] = seo_urls($seo_topic_url); |
@@ -213,11 +213,11 @@ discard block |
||
| 213 | 213 | unset($topic); |
| 214 | 214 | } |
| 215 | 215 | // START irmtfan remove hardcoded html in URLs |
| 216 | - $seo_top_allforums = XOOPS_URL . '/' . SEO_MODULE_NAME; |
|
| 216 | + $seo_top_allforums = XOOPS_URL.'/'.SEO_MODULE_NAME; |
|
| 217 | 217 | $block['seo_top_allforums'] = !empty($newbbConfig['do_rewrite']) ? seo_urls($seo_top_allforums) : $seo_top_allforums; |
| 218 | - $seo_top_allforums = XOOPS_URL . '/' . SEO_MODULE_NAME . '/list.topic.php'; |
|
| 218 | + $seo_top_allforums = XOOPS_URL.'/'.SEO_MODULE_NAME.'/list.topic.php'; |
|
| 219 | 219 | $block['seo_top_alltopics'] = !empty($newbbConfig['do_rewrite']) ? seo_urls($seo_top_allforums) : $seo_top_allforums; |
| 220 | - $seo_top_allforums = XOOPS_URL . '/' . SEO_MODULE_NAME . '/viewpost.php'; |
|
| 220 | + $seo_top_allforums = XOOPS_URL.'/'.SEO_MODULE_NAME.'/viewpost.php'; |
|
| 221 | 221 | $block['seo_top_allposts'] = !empty($newbbConfig['do_rewrite']) ? seo_urls($seo_top_allforums) : $seo_top_allforums; |
| 222 | 222 | // END irmtfan remove hardcoded html in URLs |
| 223 | 223 | $block['indexNav'] = (int)$options[4]; |
@@ -240,7 +240,7 @@ discard block |
||
| 240 | 240 | function b_newbb_topic_show($options) |
| 241 | 241 | { |
| 242 | 242 | global $accessForums; |
| 243 | - require_once __DIR__ . '/../include/functions.time.php'; |
|
| 243 | + require_once __DIR__.'/../include/functions.time.php'; |
|
| 244 | 244 | $myts = \MyTextSanitizer::getInstance(); |
| 245 | 245 | $block = []; |
| 246 | 246 | $i = 0; |
@@ -249,7 +249,7 @@ discard block |
||
| 249 | 249 | $time_criteria = null; |
| 250 | 250 | if (!empty($options[2])) { |
| 251 | 251 | $time_criteria = time() - newbbGetSinceTime($options[2]); |
| 252 | - $extraCriteria = ' AND t.topic_time>' . $time_criteria; |
|
| 252 | + $extraCriteria = ' AND t.topic_time>'.$time_criteria; |
|
| 253 | 253 | } |
| 254 | 254 | switch ($options[0]) { |
| 255 | 255 | case 'views': |
@@ -262,11 +262,11 @@ discard block |
||
| 262 | 262 | $order = 't.digest_time'; |
| 263 | 263 | $extraCriteria = ' AND t.topic_digest=1'; |
| 264 | 264 | if (null !== $time_criteria) { |
| 265 | - $extraCriteria .= ' AND t.digest_time>' . $time_criteria; |
|
| 265 | + $extraCriteria .= ' AND t.digest_time>'.$time_criteria; |
|
| 266 | 266 | } |
| 267 | 267 | break; |
| 268 | 268 | case 'sticky': |
| 269 | - $order = 't.topic_id'; |
|
| 269 | + $order = 't.topic_id'; |
|
| 270 | 270 | $extraCriteria .= ' AND t.topic_sticky=1'; |
| 271 | 271 | break; |
| 272 | 272 | case 'time': |
@@ -302,7 +302,7 @@ discard block |
||
| 302 | 302 | return false; |
| 303 | 303 | } |
| 304 | 304 | |
| 305 | - $forumCriteria = ' AND t.forum_id IN (' . implode(',', $allowedForums) . ')'; |
|
| 305 | + $forumCriteria = ' AND t.forum_id IN ('.implode(',', $allowedForums).')'; |
|
| 306 | 306 | $approveCriteria = ' AND t.approved = 1'; |
| 307 | 307 | |
| 308 | 308 | $query = 'SELECT' |
@@ -342,19 +342,19 @@ discard block |
||
| 342 | 342 | if (count($rows) < 1) { |
| 343 | 343 | return $block; |
| 344 | 344 | } |
| 345 | - require_once __DIR__ . '/../include/functions.user.php'; |
|
| 345 | + require_once __DIR__.'/../include/functions.user.php'; |
|
| 346 | 346 | $author_name = newbbGetUnameFromIds(array_keys($author), $newbbConfig['show_realname'], true); |
| 347 | 347 | if (count($types) > 0) { |
| 348 | 348 | /** @var Newbb\TypeHandler $typeHandler */ |
| 349 | 349 | $typeHandler = Newbb\Helper::getInstance()->getHandler('Type'); |
| 350 | - $type_list = $typeHandler->getList(new \Criteria('type_id', '(' . implode(', ', array_keys($types)) . ')', 'IN')); |
|
| 350 | + $type_list = $typeHandler->getList(new \Criteria('type_id', '('.implode(', ', array_keys($types)).')', 'IN')); |
|
| 351 | 351 | } |
| 352 | 352 | |
| 353 | 353 | foreach ($rows as $arr) { |
| 354 | 354 | // irmtfan remove $topic_page_jump because there is no last post |
| 355 | 355 | //$topic_page_jump = ''; |
| 356 | 356 | $topic = []; |
| 357 | - $topic['topic_subject'] = empty($type_list[$arr['type_id']]) ? '' : '[' . $type_list[$arr['type_id']] . '] '; |
|
| 357 | + $topic['topic_subject'] = empty($type_list[$arr['type_id']]) ? '' : '['.$type_list[$arr['type_id']].'] '; |
|
| 358 | 358 | $topic['forum_id'] = $arr['forum_id']; |
| 359 | 359 | $topic['forum_name'] = $myts->htmlSpecialChars($arr['forum_name']); |
| 360 | 360 | $topic['id'] = $arr['topic_id']; |
@@ -363,7 +363,7 @@ discard block |
||
| 363 | 363 | if (!empty($options[5])) { |
| 364 | 364 | $title = xoops_substr($title, 0, $options[5]); |
| 365 | 365 | } |
| 366 | - $topic['title'] = $topic['topic_subject'] . $title; |
|
| 366 | + $topic['title'] = $topic['topic_subject'].$title; |
|
| 367 | 367 | $topic['replies'] = $arr['topic_replies']; |
| 368 | 368 | $topic['views'] = $arr['topic_views']; |
| 369 | 369 | $topic['time'] = newbbFormatTimestamp($arr['topic_time']); |
@@ -376,8 +376,8 @@ discard block |
||
| 376 | 376 | // irmtfan remove $topic_page_jump because there is no last post |
| 377 | 377 | //$topic['topic_page_jump'] = $topic_page_jump; |
| 378 | 378 | // START irmtfan remove hardcoded html in URLs - add $seo_topic_url |
| 379 | - $seo_topic_url = XOOPS_URL . '/' . SEO_MODULE_NAME . '/viewtopic.php?topic_id=' . $topic['id']; |
|
| 380 | - $seo_forum_url = XOOPS_URL . '/' . SEO_MODULE_NAME . '/viewforum.php?forum=' . $topic['forum_id']; |
|
| 379 | + $seo_topic_url = XOOPS_URL.'/'.SEO_MODULE_NAME.'/viewtopic.php?topic_id='.$topic['id']; |
|
| 380 | + $seo_forum_url = XOOPS_URL.'/'.SEO_MODULE_NAME.'/viewforum.php?forum='.$topic['forum_id']; |
|
| 381 | 381 | |
| 382 | 382 | if (!empty($newbbConfig['do_rewrite'])) { |
| 383 | 383 | $topic['seo_topic_url'] = seo_urls($seo_topic_url); |
@@ -391,11 +391,11 @@ discard block |
||
| 391 | 391 | unset($topic); |
| 392 | 392 | } |
| 393 | 393 | // START irmtfan remove hardcoded html in URLs |
| 394 | - $seo_top_allforums = XOOPS_URL . '/' . SEO_MODULE_NAME; |
|
| 394 | + $seo_top_allforums = XOOPS_URL.'/'.SEO_MODULE_NAME; |
|
| 395 | 395 | $block['seo_top_allforums'] = !empty($newbbConfig['do_rewrite']) ? seo_urls($seo_top_allforums) : $seo_top_allforums; |
| 396 | - $seo_top_allforums = XOOPS_URL . '/' . SEO_MODULE_NAME . '/list.topic.php'; |
|
| 396 | + $seo_top_allforums = XOOPS_URL.'/'.SEO_MODULE_NAME.'/list.topic.php'; |
|
| 397 | 397 | $block['seo_top_alltopics'] = !empty($newbbConfig['do_rewrite']) ? seo_urls($seo_top_allforums) : $seo_top_allforums; |
| 398 | - $seo_top_allforums = XOOPS_URL . '/' . SEO_MODULE_NAME . '/viewpost.php'; |
|
| 398 | + $seo_top_allforums = XOOPS_URL.'/'.SEO_MODULE_NAME.'/viewpost.php'; |
|
| 399 | 399 | $block['seo_top_allposts'] = !empty($newbbConfig['do_rewrite']) ? seo_urls($seo_top_allforums) : $seo_top_allforums; |
| 400 | 400 | // END irmtfan remove hardcoded html in URLs |
| 401 | 401 | $block['indexNav'] = (int)$options[4]; |
@@ -420,7 +420,7 @@ discard block |
||
| 420 | 420 | global $accessForums; |
| 421 | 421 | global $newbbConfig; |
| 422 | 422 | |
| 423 | - require_once __DIR__ . '/../include/functions.time.php'; |
|
| 423 | + require_once __DIR__.'/../include/functions.time.php'; |
|
| 424 | 424 | $myts = \MyTextSanitizer::getInstance(); |
| 425 | 425 | $block = []; |
| 426 | 426 | $i = 0; |
@@ -429,7 +429,7 @@ discard block |
||
| 429 | 429 | $time_criteria = null; |
| 430 | 430 | if (!empty($options[2])) { |
| 431 | 431 | $time_criteria = time() - newbbGetSinceTime($options[2]); |
| 432 | - $extraCriteria = ' AND p.post_time>' . $time_criteria; |
|
| 432 | + $extraCriteria = ' AND p.post_time>'.$time_criteria; |
|
| 433 | 433 | } |
| 434 | 434 | |
| 435 | 435 | switch ($options[0]) { |
@@ -473,7 +473,7 @@ discard block |
||
| 473 | 473 | return $block; |
| 474 | 474 | } |
| 475 | 475 | |
| 476 | - $forumCriteria = ' AND p.forum_id IN (' . implode(',', $allowedForums) . ')'; |
|
| 476 | + $forumCriteria = ' AND p.forum_id IN ('.implode(',', $allowedForums).')'; |
|
| 477 | 477 | $approveCriteria = ' AND p.approved = 1'; |
| 478 | 478 | |
| 479 | 479 | $query = 'SELECT'; |
@@ -481,11 +481,11 @@ discard block |
||
| 481 | 481 | if ('text' === $options[0]) { |
| 482 | 482 | $query .= ' pt.dohtml, pt.dosmiley, pt.doxcode, pt.dobr, pt.post_text,'; |
| 483 | 483 | } |
| 484 | - $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'; |
|
| 484 | + $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'; |
|
| 485 | 485 | if ('text' === $options[0]) { |
| 486 | - $query .= ' LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('newbb_posts_text') . ' AS pt ON pt.post_id=p.post_id'; |
|
| 486 | + $query .= ' LEFT JOIN '.$GLOBALS['xoopsDB']->prefix('newbb_posts_text').' AS pt ON pt.post_id=p.post_id'; |
|
| 487 | 487 | } |
| 488 | - $query .= ' WHERE 1=1 ' . $forumCriteria . $approveCriteria . $extraCriteria . ' ORDER BY ' . $order . ' DESC'; |
|
| 488 | + $query .= ' WHERE 1=1 '.$forumCriteria.$approveCriteria.$extraCriteria.' ORDER BY '.$order.' DESC'; |
|
| 489 | 489 | |
| 490 | 490 | $result = $GLOBALS['xoopsDB']->query($query, $options[1], 0); |
| 491 | 491 | if (!$result) { |
@@ -502,15 +502,15 @@ discard block |
||
| 502 | 502 | if (count($rows) < 1) { |
| 503 | 503 | return $block; |
| 504 | 504 | } |
| 505 | - require_once __DIR__ . '/../include/functions.user.php'; |
|
| 505 | + require_once __DIR__.'/../include/functions.user.php'; |
|
| 506 | 506 | $author_name = newbbGetUnameFromIds(array_keys($author), $newbbConfig['show_realname'], true); |
| 507 | 507 | |
| 508 | 508 | foreach ($rows as $arr) { |
| 509 | 509 | //if ($arr['icon'] && is_file($GLOBALS['xoops']->path('images/subject/' . $arr['icon']))) { |
| 510 | 510 | if (!empty($arr['icon'])) { |
| 511 | - $last_post_icon = '<img src="' . XOOPS_URL . '/images/subject/' . htmlspecialchars($arr['icon']) . '" alt="" />'; |
|
| 511 | + $last_post_icon = '<img src="'.XOOPS_URL.'/images/subject/'.htmlspecialchars($arr['icon']).'" alt="" />'; |
|
| 512 | 512 | } else { |
| 513 | - $last_post_icon = '<img src="' . XOOPS_URL . '/images/subject/icon1.gif" alt="" />'; |
|
| 513 | + $last_post_icon = '<img src="'.XOOPS_URL.'/images/subject/icon1.gif" alt="" />'; |
|
| 514 | 514 | } |
| 515 | 515 | //$topic['jump_post'] = "<a href='" . XOOPS_URL . "/modules/newbb/viewtopic.php?post_id=" . $arr['post_id'] ."#forumpost" . $arr['post_id'] . "'>" . $last_post_icon . '</a>'; |
| 516 | 516 | $topic = []; |
@@ -540,8 +540,8 @@ discard block |
||
| 540 | 540 | $topic['post_text'] = $post_text; |
| 541 | 541 | } |
| 542 | 542 | // START irmtfan remove hardcoded html in URLs |
| 543 | - $seo_url = XOOPS_URL . '/' . SEO_MODULE_NAME . '/viewtopic.php?post_id=' . $topic['post_id']; |
|
| 544 | - $seo_forum_url = XOOPS_URL . '/' . SEO_MODULE_NAME . '/viewforum.php?forum=' . $topic['forum_id']; |
|
| 543 | + $seo_url = XOOPS_URL.'/'.SEO_MODULE_NAME.'/viewtopic.php?post_id='.$topic['post_id']; |
|
| 544 | + $seo_forum_url = XOOPS_URL.'/'.SEO_MODULE_NAME.'/viewforum.php?forum='.$topic['forum_id']; |
|
| 545 | 545 | // END irmtfan remove hardcoded html in URLs |
| 546 | 546 | if (!empty($newbbConfig['do_rewrite'])) { |
| 547 | 547 | $topic['seo_url'] = seo_urls($seo_url); |
@@ -555,11 +555,11 @@ discard block |
||
| 555 | 555 | unset($topic); |
| 556 | 556 | } |
| 557 | 557 | // START irmtfan remove hardcoded html in URLs |
| 558 | - $seo_top_allforums = XOOPS_URL . '/' . SEO_MODULE_NAME; |
|
| 558 | + $seo_top_allforums = XOOPS_URL.'/'.SEO_MODULE_NAME; |
|
| 559 | 559 | $block['seo_top_allforums'] = !empty($newbbConfig['do_rewrite']) ? seo_urls($seo_top_allforums) : $seo_top_allforums; |
| 560 | - $seo_top_allforums = XOOPS_URL . '/' . SEO_MODULE_NAME . '/list.topic.php'; |
|
| 560 | + $seo_top_allforums = XOOPS_URL.'/'.SEO_MODULE_NAME.'/list.topic.php'; |
|
| 561 | 561 | $block['seo_top_alltopics'] = !empty($newbbConfig['do_rewrite']) ? seo_urls($seo_top_allforums) : $seo_top_allforums; |
| 562 | - $seo_top_allforums = XOOPS_URL . '/' . SEO_MODULE_NAME . '/viewpost.php'; |
|
| 562 | + $seo_top_allforums = XOOPS_URL.'/'.SEO_MODULE_NAME.'/viewpost.php'; |
|
| 563 | 563 | $block['seo_top_allposts'] = !empty($newbbConfig['do_rewrite']) ? seo_urls($seo_top_allforums) : $seo_top_allforums; |
| 564 | 564 | // END irmtfan remove hardcoded html in URLs |
| 565 | 565 | |
@@ -592,9 +592,9 @@ discard block |
||
| 592 | 592 | $extraCriteria = ''; |
| 593 | 593 | $time_criteria = null; |
| 594 | 594 | if (!empty($options[2])) { |
| 595 | - require_once __DIR__ . '/../include/functions.time.php'; |
|
| 595 | + require_once __DIR__.'/../include/functions.time.php'; |
|
| 596 | 596 | $time_criteria = time() - newbbGetSinceTime($options[2]); |
| 597 | - $extraCriteria = ' AND topic_time > ' . $time_criteria; |
|
| 597 | + $extraCriteria = ' AND topic_time > '.$time_criteria; |
|
| 598 | 598 | } |
| 599 | 599 | switch ($options[0]) { |
| 600 | 600 | case 'topic': |
@@ -602,7 +602,7 @@ discard block |
||
| 602 | 602 | case 'digest': |
| 603 | 603 | $extraCriteria = ' AND topic_digest = 1'; |
| 604 | 604 | if (null !== $time_criteria) { |
| 605 | - $extraCriteria .= ' AND digest_time > ' . $time_criteria; |
|
| 605 | + $extraCriteria .= ' AND digest_time > '.$time_criteria; |
|
| 606 | 606 | } |
| 607 | 607 | break; |
| 608 | 608 | case 'sticky': |
@@ -612,7 +612,7 @@ discard block |
||
| 612 | 612 | default: |
| 613 | 613 | $type = 'post'; |
| 614 | 614 | if (null !== $time_criteria) { |
| 615 | - $extraCriteria = ' AND post_time > ' . $time_criteria; |
|
| 615 | + $extraCriteria = ' AND post_time > '.$time_criteria; |
|
| 616 | 616 | } |
| 617 | 617 | break; |
| 618 | 618 | } |
@@ -636,17 +636,17 @@ discard block |
||
| 636 | 636 | } |
| 637 | 637 | |
| 638 | 638 | if ('topic' === $type) { |
| 639 | - $forumCriteria = ' AND forum_id IN (' . implode(',', $allowedForums) . ')'; |
|
| 639 | + $forumCriteria = ' AND forum_id IN ('.implode(',', $allowedForums).')'; |
|
| 640 | 640 | $approveCriteria = ' AND approved = 1'; |
| 641 | 641 | $query = 'SELECT DISTINCT topic_poster AS author, COUNT(*) AS count |
| 642 | - FROM ' . $GLOBALS['xoopsDB']->prefix('newbb_topics') . ' |
|
| 643 | - WHERE topic_poster>0 ' . $forumCriteria . $approveCriteria . $extraCriteria . ' GROUP BY topic_poster ORDER BY ' . $order . ' DESC'; |
|
| 642 | + FROM ' . $GLOBALS['xoopsDB']->prefix('newbb_topics').' |
|
| 643 | + WHERE topic_poster>0 ' . $forumCriteria.$approveCriteria.$extraCriteria.' GROUP BY topic_poster ORDER BY '.$order.' DESC'; |
|
| 644 | 644 | } else { |
| 645 | - $forumCriteria = ' AND forum_id IN (' . implode(',', $allowedForums) . ')'; |
|
| 645 | + $forumCriteria = ' AND forum_id IN ('.implode(',', $allowedForums).')'; |
|
| 646 | 646 | $approveCriteria = ' AND approved = 1'; |
| 647 | 647 | $query = 'SELECT DISTINCT uid AS author, COUNT(*) AS count |
| 648 | - FROM ' . $GLOBALS['xoopsDB']->prefix('newbb_posts') . ' |
|
| 649 | - WHERE uid > 0 ' . $forumCriteria . $approveCriteria . $extraCriteria . ' GROUP BY uid ORDER BY ' . $order . ' DESC'; |
|
| 648 | + FROM ' . $GLOBALS['xoopsDB']->prefix('newbb_posts').' |
|
| 649 | + WHERE uid > 0 ' . $forumCriteria.$approveCriteria.$extraCriteria.' GROUP BY uid ORDER BY '.$order.' DESC'; |
|
| 650 | 650 | } |
| 651 | 651 | |
| 652 | 652 | $result = $GLOBALS['xoopsDB']->query($query, $options[1], 0); |
@@ -661,12 +661,12 @@ discard block |
||
| 661 | 661 | if (count($author) < 1) { |
| 662 | 662 | return $block; |
| 663 | 663 | } |
| 664 | - require_once __DIR__ . '/../include/functions.user.php'; |
|
| 664 | + require_once __DIR__.'/../include/functions.user.php'; |
|
| 665 | 665 | $author_name = newbbGetUnameFromIds(array_keys($author), $newbbConfig['show_realname']); |
| 666 | 666 | foreach (array_keys($author) as $uid) { |
| 667 | 667 | $author[$uid]['name'] = $myts->htmlSpecialChars($author_name[$uid]); |
| 668 | 668 | } |
| 669 | - $block['authors'] =& $author; |
|
| 669 | + $block['authors'] = & $author; |
|
| 670 | 670 | $block['disp_mode'] = $options[3]; // 0 - full view; 1 - lite view; |
| 671 | 671 | $block['indexNav'] = (int)$options[4]; |
| 672 | 672 | |
@@ -679,45 +679,45 @@ discard block |
||
| 679 | 679 | */ |
| 680 | 680 | function b_newbb_edit($options) |
| 681 | 681 | { |
| 682 | - require_once __DIR__ . '/../include/functions.forum.php'; |
|
| 682 | + require_once __DIR__.'/../include/functions.forum.php'; |
|
| 683 | 683 | |
| 684 | - $form = _MB_NEWBB_CRITERIA . "<select name='options[0]'>"; |
|
| 684 | + $form = _MB_NEWBB_CRITERIA."<select name='options[0]'>"; |
|
| 685 | 685 | $form .= "<option value='time'"; |
| 686 | 686 | if ('time' === $options[0]) { |
| 687 | 687 | $form .= " selected='selected' "; |
| 688 | 688 | } |
| 689 | - $form .= '>' . _MB_NEWBB_CRITERIA_TIME . '</option>'; |
|
| 689 | + $form .= '>'._MB_NEWBB_CRITERIA_TIME.'</option>'; |
|
| 690 | 690 | $form .= '</select>'; |
| 691 | - $form .= '<br>' . _MB_NEWBB_DISPLAY . "<input type='text' name='options[1]' value='" . $options[1] . "' />"; |
|
| 692 | - $form .= '<br>' . _MB_NEWBB_TIME . "<input type='text' name='options[2]' value='" . $options[2] . "' />"; |
|
| 693 | - $form .= '<br> <small>' . _MB_NEWBB_TIME_DESC . '</small>'; |
|
| 694 | - $form .= '<br>' . _MB_NEWBB_DISPLAYMODE . "<input type='radio' name='options[3]' value='0'"; |
|
| 691 | + $form .= '<br>'._MB_NEWBB_DISPLAY."<input type='text' name='options[1]' value='".$options[1]."' />"; |
|
| 692 | + $form .= '<br>'._MB_NEWBB_TIME."<input type='text' name='options[2]' value='".$options[2]."' />"; |
|
| 693 | + $form .= '<br> <small>'._MB_NEWBB_TIME_DESC.'</small>'; |
|
| 694 | + $form .= '<br>'._MB_NEWBB_DISPLAYMODE."<input type='radio' name='options[3]' value='0'"; |
|
| 695 | 695 | if (0 == $options[3]) { |
| 696 | 696 | $form .= ' checked'; |
| 697 | 697 | } |
| 698 | - $form .= ' /> ' . _MB_NEWBB_DISPLAYMODE_FULL . "<input type='radio' name='options[3]' value='1'"; |
|
| 698 | + $form .= ' /> '._MB_NEWBB_DISPLAYMODE_FULL."<input type='radio' name='options[3]' value='1'"; |
|
| 699 | 699 | if (1 == $options[3]) { |
| 700 | 700 | $form .= ' checked'; |
| 701 | 701 | } |
| 702 | - $form .= ' /> ' . _MB_NEWBB_DISPLAYMODE_COMPACT . "<input type='radio' name='options[3]' value='2'"; |
|
| 702 | + $form .= ' /> '._MB_NEWBB_DISPLAYMODE_COMPACT."<input type='radio' name='options[3]' value='2'"; |
|
| 703 | 703 | if (2 == $options[3]) { |
| 704 | 704 | $form .= ' checked'; |
| 705 | 705 | } |
| 706 | - $form .= ' /> ' . _MB_NEWBB_DISPLAYMODE_LITE; |
|
| 706 | + $form .= ' /> '._MB_NEWBB_DISPLAYMODE_LITE; |
|
| 707 | 707 | |
| 708 | - $form .= '<br>' . _MB_NEWBB_INDEXNAV . '<input type="radio" name="options[4]" value="1"'; |
|
| 708 | + $form .= '<br>'._MB_NEWBB_INDEXNAV.'<input type="radio" name="options[4]" value="1"'; |
|
| 709 | 709 | if (1 == $options[4]) { |
| 710 | 710 | $form .= ' checked'; |
| 711 | 711 | } |
| 712 | - $form .= ' />' . _YES . '<input type="radio" name="options[4]" value="0"'; |
|
| 712 | + $form .= ' />'._YES.'<input type="radio" name="options[4]" value="0"'; |
|
| 713 | 713 | if (0 == $options[4]) { |
| 714 | 714 | $form .= ' checked'; |
| 715 | 715 | } |
| 716 | - $form .= ' />' . _NO; |
|
| 716 | + $form .= ' />'._NO; |
|
| 717 | 717 | |
| 718 | - $form .= '<br>' . _MB_NEWBB_TITLE_LENGTH . "<input type='text' name='options[5]' value='" . $options[5] . "' />"; |
|
| 718 | + $form .= '<br>'._MB_NEWBB_TITLE_LENGTH."<input type='text' name='options[5]' value='".$options[5]."' />"; |
|
| 719 | 719 | |
| 720 | - $form .= '<br><br>' . _MB_NEWBB_FORUMLIST; |
|
| 720 | + $form .= '<br><br>'._MB_NEWBB_FORUMLIST; |
|
| 721 | 721 | |
| 722 | 722 | $optionsForum = array_filter(array_slice($options, 6), 'b_newbb_array_filter'); // get allowed forums |
| 723 | 723 | $isAll = (0 === count($optionsForum) || empty($optionsForum[0])); |
@@ -726,7 +726,7 @@ discard block |
||
| 726 | 726 | if ($isAll) { |
| 727 | 727 | $form .= ' selected'; |
| 728 | 728 | } |
| 729 | - $form .= '>' . _ALL . '</option>'; |
|
| 729 | + $form .= '>'._ALL.'</option>'; |
|
| 730 | 730 | $form .= newbbForumSelectBox($optionsForum); |
| 731 | 731 | $form .= '</select><br>'; |
| 732 | 732 | |
@@ -739,64 +739,64 @@ discard block |
||
| 739 | 739 | */ |
| 740 | 740 | function b_newbb_topic_edit($options) |
| 741 | 741 | { |
| 742 | - require_once __DIR__ . '/../include/functions.forum.php'; |
|
| 743 | - $form = _MB_NEWBB_CRITERIA . "<select name='options[0]'>"; |
|
| 742 | + require_once __DIR__.'/../include/functions.forum.php'; |
|
| 743 | + $form = _MB_NEWBB_CRITERIA."<select name='options[0]'>"; |
|
| 744 | 744 | $form .= "<option value='time'"; |
| 745 | 745 | if ('time' === $options[0]) { |
| 746 | 746 | $form .= " selected='selected' "; |
| 747 | 747 | } |
| 748 | - $form .= '>' . _MB_NEWBB_CRITERIA_TIME . '</option>'; |
|
| 748 | + $form .= '>'._MB_NEWBB_CRITERIA_TIME.'</option>'; |
|
| 749 | 749 | $form .= "<option value='views'"; |
| 750 | 750 | if ('views' === $options[0]) { |
| 751 | 751 | $form .= " selected='selected' "; |
| 752 | 752 | } |
| 753 | - $form .= '>' . _MB_NEWBB_CRITERIA_VIEWS . '</option>'; |
|
| 753 | + $form .= '>'._MB_NEWBB_CRITERIA_VIEWS.'</option>'; |
|
| 754 | 754 | $form .= "<option value='replies'"; |
| 755 | 755 | if ('replies' === $options[0]) { |
| 756 | 756 | $form .= " selected='selected' "; |
| 757 | 757 | } |
| 758 | - $form .= '>' . _MB_NEWBB_CRITERIA_REPLIES . '</option>'; |
|
| 758 | + $form .= '>'._MB_NEWBB_CRITERIA_REPLIES.'</option>'; |
|
| 759 | 759 | $form .= "<option value='digest'"; |
| 760 | 760 | if ('digest' === $options[0]) { |
| 761 | 761 | $form .= " selected='selected' "; |
| 762 | 762 | } |
| 763 | - $form .= '>' . _MB_NEWBB_CRITERIA_DIGEST . '</option>'; |
|
| 763 | + $form .= '>'._MB_NEWBB_CRITERIA_DIGEST.'</option>'; |
|
| 764 | 764 | $form .= "<option value='sticky'"; |
| 765 | 765 | if ('sticky' === $options[0]) { |
| 766 | 766 | $form .= " selected='selected' "; |
| 767 | 767 | } |
| 768 | - $form .= '>' . _MB_NEWBB_CRITERIA_STICKY . '</option>'; |
|
| 768 | + $form .= '>'._MB_NEWBB_CRITERIA_STICKY.'</option>'; |
|
| 769 | 769 | $form .= '</select>'; |
| 770 | - $form .= '<br>' . _MB_NEWBB_DISPLAY . "<input type='text' name='options[1]' value='" . $options[1] . "' />"; |
|
| 771 | - $form .= '<br>' . _MB_NEWBB_TIME . "<input type='text' name='options[2]' value='" . $options[2] . "' />"; |
|
| 772 | - $form .= '<br> <small>' . _MB_NEWBB_TIME_DESC . '</small>'; |
|
| 773 | - $form .= '<br>' . _MB_NEWBB_DISPLAYMODE . "<input type='radio' name='options[3]' value='0'"; |
|
| 770 | + $form .= '<br>'._MB_NEWBB_DISPLAY."<input type='text' name='options[1]' value='".$options[1]."' />"; |
|
| 771 | + $form .= '<br>'._MB_NEWBB_TIME."<input type='text' name='options[2]' value='".$options[2]."' />"; |
|
| 772 | + $form .= '<br> <small>'._MB_NEWBB_TIME_DESC.'</small>'; |
|
| 773 | + $form .= '<br>'._MB_NEWBB_DISPLAYMODE."<input type='radio' name='options[3]' value='0'"; |
|
| 774 | 774 | if (0 == $options[3]) { |
| 775 | 775 | $form .= ' checked'; |
| 776 | 776 | } |
| 777 | - $form .= ' /> ' . _MB_NEWBB_DISPLAYMODE_FULL . "<input type='radio' name='options[3]' value='1'"; |
|
| 777 | + $form .= ' /> '._MB_NEWBB_DISPLAYMODE_FULL."<input type='radio' name='options[3]' value='1'"; |
|
| 778 | 778 | if (1 == $options[3]) { |
| 779 | 779 | $form .= ' checked'; |
| 780 | 780 | } |
| 781 | - $form .= ' /> ' . _MB_NEWBB_DISPLAYMODE_COMPACT . "<input type='radio' name='options[3]' value='2'"; |
|
| 781 | + $form .= ' /> '._MB_NEWBB_DISPLAYMODE_COMPACT."<input type='radio' name='options[3]' value='2'"; |
|
| 782 | 782 | if (2 == $options[3]) { |
| 783 | 783 | $form .= ' checked'; |
| 784 | 784 | } |
| 785 | - $form .= ' /> ' . _MB_NEWBB_DISPLAYMODE_LITE; |
|
| 785 | + $form .= ' /> '._MB_NEWBB_DISPLAYMODE_LITE; |
|
| 786 | 786 | |
| 787 | - $form .= '<br>' . _MB_NEWBB_INDEXNAV . '<input type="radio" name="options[4]" value="1"'; |
|
| 787 | + $form .= '<br>'._MB_NEWBB_INDEXNAV.'<input type="radio" name="options[4]" value="1"'; |
|
| 788 | 788 | if (1 == $options[4]) { |
| 789 | 789 | $form .= ' checked'; |
| 790 | 790 | } |
| 791 | - $form .= ' />' . _YES . '<input type="radio" name="options[4]" value="0"'; |
|
| 791 | + $form .= ' />'._YES.'<input type="radio" name="options[4]" value="0"'; |
|
| 792 | 792 | if (0 == $options[4]) { |
| 793 | 793 | $form .= ' checked'; |
| 794 | 794 | } |
| 795 | - $form .= ' />' . _NO; |
|
| 795 | + $form .= ' />'._NO; |
|
| 796 | 796 | |
| 797 | - $form .= '<br>' . _MB_NEWBB_TITLE_LENGTH . "<input type='text' name='options[5]' value='" . $options[5] . "' />"; |
|
| 797 | + $form .= '<br>'._MB_NEWBB_TITLE_LENGTH."<input type='text' name='options[5]' value='".$options[5]."' />"; |
|
| 798 | 798 | |
| 799 | - $form .= '<br><br>' . _MB_NEWBB_FORUMLIST; |
|
| 799 | + $form .= '<br><br>'._MB_NEWBB_FORUMLIST; |
|
| 800 | 800 | |
| 801 | 801 | $optionsForum = array_filter(array_slice($options, 6), 'b_newbb_array_filter'); // get allowed forums |
| 802 | 802 | |
@@ -806,7 +806,7 @@ discard block |
||
| 806 | 806 | if ($isAll) { |
| 807 | 807 | $form .= ' selected="selected"'; |
| 808 | 808 | } |
| 809 | - $form .= '>' . _ALL . '</option>'; |
|
| 809 | + $form .= '>'._ALL.'</option>'; |
|
| 810 | 810 | $form .= newbbForumSelectBox($optionsForum); |
| 811 | 811 | $form .= '</select><br>'; |
| 812 | 812 | |
@@ -819,49 +819,49 @@ discard block |
||
| 819 | 819 | */ |
| 820 | 820 | function b_newbb_post_edit($options) |
| 821 | 821 | { |
| 822 | - require_once __DIR__ . '/../include/functions.forum.php'; |
|
| 823 | - $form = _MB_NEWBB_CRITERIA . "<select name='options[0]'>"; |
|
| 822 | + require_once __DIR__.'/../include/functions.forum.php'; |
|
| 823 | + $form = _MB_NEWBB_CRITERIA."<select name='options[0]'>"; |
|
| 824 | 824 | $form .= "<option value='title'"; |
| 825 | 825 | if ('title' === $options[0]) { |
| 826 | 826 | $form .= " selected='selected' "; |
| 827 | 827 | } |
| 828 | - $form .= '>' . _MB_NEWBB_CRITERIA_TITLE . '</option>'; |
|
| 828 | + $form .= '>'._MB_NEWBB_CRITERIA_TITLE.'</option>'; |
|
| 829 | 829 | $form .= "<option value='text'"; |
| 830 | 830 | if ('text' === $options[0]) { |
| 831 | 831 | $form .= " selected='selected' "; |
| 832 | 832 | } |
| 833 | - $form .= '>' . _MB_NEWBB_CRITERIA_TEXT . '</option>'; |
|
| 833 | + $form .= '>'._MB_NEWBB_CRITERIA_TEXT.'</option>'; |
|
| 834 | 834 | $form .= '</select>'; |
| 835 | - $form .= '<br>' . _MB_NEWBB_DISPLAY . "<input type='text' name='options[1]' value='" . $options[1] . "' />"; |
|
| 836 | - $form .= '<br>' . _MB_NEWBB_TIME . "<input type='text' name='options[2]' value='" . $options[2] . "' />"; |
|
| 837 | - $form .= '<br> <small>' . _MB_NEWBB_TIME_DESC . '</small>'; |
|
| 838 | - $form .= '<br>' . _MB_NEWBB_DISPLAYMODE . "<input type='radio' name='options[3]' value='0'"; |
|
| 835 | + $form .= '<br>'._MB_NEWBB_DISPLAY."<input type='text' name='options[1]' value='".$options[1]."' />"; |
|
| 836 | + $form .= '<br>'._MB_NEWBB_TIME."<input type='text' name='options[2]' value='".$options[2]."' />"; |
|
| 837 | + $form .= '<br> <small>'._MB_NEWBB_TIME_DESC.'</small>'; |
|
| 838 | + $form .= '<br>'._MB_NEWBB_DISPLAYMODE."<input type='radio' name='options[3]' value='0'"; |
|
| 839 | 839 | if (0 == $options[3]) { |
| 840 | 840 | $form .= ' checked'; |
| 841 | 841 | } |
| 842 | - $form .= ' /> ' . _MB_NEWBB_DISPLAYMODE_FULL . "<input type='radio' name='options[3]' value='1'"; |
|
| 842 | + $form .= ' /> '._MB_NEWBB_DISPLAYMODE_FULL."<input type='radio' name='options[3]' value='1'"; |
|
| 843 | 843 | if (1 == $options[3]) { |
| 844 | 844 | $form .= ' checked'; |
| 845 | 845 | } |
| 846 | - $form .= ' /> ' . _MB_NEWBB_DISPLAYMODE_COMPACT . "<input type='radio' name='options[3]' value='2'"; |
|
| 846 | + $form .= ' /> '._MB_NEWBB_DISPLAYMODE_COMPACT."<input type='radio' name='options[3]' value='2'"; |
|
| 847 | 847 | if (2 == $options[3]) { |
| 848 | 848 | $form .= ' checked'; |
| 849 | 849 | } |
| 850 | - $form .= ' /> ' . _MB_NEWBB_DISPLAYMODE_LITE; |
|
| 850 | + $form .= ' /> '._MB_NEWBB_DISPLAYMODE_LITE; |
|
| 851 | 851 | |
| 852 | - $form .= '<br>' . _MB_NEWBB_INDEXNAV . '<input type="radio" name="options[4]" value="1"'; |
|
| 852 | + $form .= '<br>'._MB_NEWBB_INDEXNAV.'<input type="radio" name="options[4]" value="1"'; |
|
| 853 | 853 | if (1 == $options[4]) { |
| 854 | 854 | $form .= ' checked'; |
| 855 | 855 | } |
| 856 | - $form .= ' />' . _YES . '<input type="radio" name="options[4]" value="0"'; |
|
| 856 | + $form .= ' />'._YES.'<input type="radio" name="options[4]" value="0"'; |
|
| 857 | 857 | if (0 == $options[4]) { |
| 858 | 858 | $form .= ' checked'; |
| 859 | 859 | } |
| 860 | - $form .= ' />' . _NO; |
|
| 860 | + $form .= ' />'._NO; |
|
| 861 | 861 | |
| 862 | - $form .= '<br>' . _MB_NEWBB_TITLE_LENGTH . "<input type='text' name='options[5]' value='" . $options[5] . "' />"; |
|
| 862 | + $form .= '<br>'._MB_NEWBB_TITLE_LENGTH."<input type='text' name='options[5]' value='".$options[5]."' />"; |
|
| 863 | 863 | |
| 864 | - $form .= '<br><br>' . _MB_NEWBB_FORUMLIST; |
|
| 864 | + $form .= '<br><br>'._MB_NEWBB_FORUMLIST; |
|
| 865 | 865 | |
| 866 | 866 | $optionsForum = array_filter(array_slice($options, 6), 'b_newbb_array_filter'); // get allowed forums |
| 867 | 867 | $isAll = (0 === count($optionsForum) || empty($optionsForum[0])); |
@@ -870,7 +870,7 @@ discard block |
||
| 870 | 870 | if ($isAll) { |
| 871 | 871 | $form .= ' selected="selected"'; |
| 872 | 872 | } |
| 873 | - $form .= '>' . _ALL . '</option>'; |
|
| 873 | + $form .= '>'._ALL.'</option>'; |
|
| 874 | 874 | $form .= newbbForumSelectBox($optionsForum); |
| 875 | 875 | $form .= '</select><br>'; |
| 876 | 876 | |
@@ -883,53 +883,53 @@ discard block |
||
| 883 | 883 | */ |
| 884 | 884 | function b_newbb_author_edit($options) |
| 885 | 885 | { |
| 886 | - require_once __DIR__ . '/../include/functions.forum.php'; |
|
| 887 | - $form = _MB_NEWBB_CRITERIA . "<select name='options[0]'>"; |
|
| 886 | + require_once __DIR__.'/../include/functions.forum.php'; |
|
| 887 | + $form = _MB_NEWBB_CRITERIA."<select name='options[0]'>"; |
|
| 888 | 888 | $form .= "<option value='post'"; |
| 889 | 889 | if ('post' === $options[0]) { |
| 890 | 890 | $form .= " selected='selected' "; |
| 891 | 891 | } |
| 892 | - $form .= '>' . _MB_NEWBB_CRITERIA_POST . '</option>'; |
|
| 892 | + $form .= '>'._MB_NEWBB_CRITERIA_POST.'</option>'; |
|
| 893 | 893 | $form .= "<option value='topic'"; |
| 894 | 894 | if ('topic' === $options[0]) { |
| 895 | 895 | $form .= " selected='selected' "; |
| 896 | 896 | } |
| 897 | - $form .= '>' . _MB_NEWBB_CRITERIA_TOPIC . '</option>'; |
|
| 897 | + $form .= '>'._MB_NEWBB_CRITERIA_TOPIC.'</option>'; |
|
| 898 | 898 | $form .= "<option value='digest'"; |
| 899 | 899 | if ('digest' === $options[0]) { |
| 900 | 900 | $form .= " selected='selected' "; |
| 901 | 901 | } |
| 902 | - $form .= '>' . _MB_NEWBB_CRITERIA_DIGESTS . '</option>'; |
|
| 902 | + $form .= '>'._MB_NEWBB_CRITERIA_DIGESTS.'</option>'; |
|
| 903 | 903 | $form .= "<option value='sticky'"; |
| 904 | 904 | if ('sticky' === $options[0]) { |
| 905 | 905 | $form .= " selected='selected' "; |
| 906 | 906 | } |
| 907 | - $form .= '>' . _MB_NEWBB_CRITERIA_STICKYS . '</option>'; |
|
| 907 | + $form .= '>'._MB_NEWBB_CRITERIA_STICKYS.'</option>'; |
|
| 908 | 908 | $form .= '</select>'; |
| 909 | - $form .= '<br>' . _MB_NEWBB_DISPLAY . "<input type='text' name='options[1]' value='" . $options[1] . "' />"; |
|
| 910 | - $form .= '<br>' . _MB_NEWBB_TIME . "<input type='text' name='options[2]' value='" . $options[2] . "' />"; |
|
| 911 | - $form .= '<br> <small>' . _MB_NEWBB_TIME_DESC . '</small>'; |
|
| 912 | - $form .= '<br>' . _MB_NEWBB_DISPLAYMODE . "<input type='radio' name='options[3]' value='0'"; |
|
| 909 | + $form .= '<br>'._MB_NEWBB_DISPLAY."<input type='text' name='options[1]' value='".$options[1]."' />"; |
|
| 910 | + $form .= '<br>'._MB_NEWBB_TIME."<input type='text' name='options[2]' value='".$options[2]."' />"; |
|
| 911 | + $form .= '<br> <small>'._MB_NEWBB_TIME_DESC.'</small>'; |
|
| 912 | + $form .= '<br>'._MB_NEWBB_DISPLAYMODE."<input type='radio' name='options[3]' value='0'"; |
|
| 913 | 913 | if (0 == $options[3]) { |
| 914 | 914 | $form .= ' checked'; |
| 915 | 915 | } |
| 916 | - $form .= ' /> ' . _MB_NEWBB_DISPLAYMODE_COMPACT . "<input type='radio' name='options[3]' value='1'"; |
|
| 916 | + $form .= ' /> '._MB_NEWBB_DISPLAYMODE_COMPACT."<input type='radio' name='options[3]' value='1'"; |
|
| 917 | 917 | if (1 == $options[3]) { |
| 918 | 918 | $form .= ' checked'; |
| 919 | 919 | } |
| 920 | - $form .= ' /> ' . _MB_NEWBB_DISPLAYMODE_LITE; |
|
| 920 | + $form .= ' /> '._MB_NEWBB_DISPLAYMODE_LITE; |
|
| 921 | 921 | |
| 922 | - $form .= '<br>' . _MB_NEWBB_INDEXNAV . '<input type="radio" name="options[4]" value="1"'; |
|
| 922 | + $form .= '<br>'._MB_NEWBB_INDEXNAV.'<input type="radio" name="options[4]" value="1"'; |
|
| 923 | 923 | if (1 == $options[4]) { |
| 924 | 924 | $form .= ' checked'; |
| 925 | 925 | } |
| 926 | - $form .= ' />' . _YES . '<input type="radio" name="options[4]" value="0"'; |
|
| 926 | + $form .= ' />'._YES.'<input type="radio" name="options[4]" value="0"'; |
|
| 927 | 927 | if (0 == $options[4]) { |
| 928 | 928 | $form .= ' checked'; |
| 929 | 929 | } |
| 930 | - $form .= ' />' . _NO; |
|
| 930 | + $form .= ' />'._NO; |
|
| 931 | 931 | |
| 932 | - $form .= '<br><br>' . _MB_NEWBB_FORUMLIST; |
|
| 932 | + $form .= '<br><br>'._MB_NEWBB_FORUMLIST; |
|
| 933 | 933 | |
| 934 | 934 | $optionsForum = array_filter(array_slice($options, 5), 'b_newbb_array_filter'); // get allowed forums |
| 935 | 935 | $isAll = (0 === count($optionsForum) || empty($optionsForum[0])); |
@@ -938,7 +938,7 @@ discard block |
||
| 938 | 938 | if ($isAll) { |
| 939 | 939 | $form .= ' selected="selected"'; |
| 940 | 940 | } |
| 941 | - $form .= '>' . _ALL . '</option>'; |
|
| 941 | + $form .= '>'._ALL.'</option>'; |
|
| 942 | 942 | $form .= newbbForumSelectBox($optionsForum); |
| 943 | 943 | $form .= '</select><br>'; |
| 944 | 944 | |
@@ -952,8 +952,8 @@ discard block |
||
| 952 | 952 | function b_newbb_custom($options) |
| 953 | 953 | { |
| 954 | 954 | // if no newbb module block set, we have to include the language file |
| 955 | - if (is_readable($GLOBALS['xoops']->path('modules/newbb/language/' . $GLOBALS['xoopsConfig']['language'] . '/blocks.php'))) { |
|
| 956 | - require_once $GLOBALS['xoops']->path('modules/newbb/language/' . $GLOBALS['xoopsConfig']['language'] . '/blocks.php'); |
|
| 955 | + if (is_readable($GLOBALS['xoops']->path('modules/newbb/language/'.$GLOBALS['xoopsConfig']['language'].'/blocks.php'))) { |
|
| 956 | + require_once $GLOBALS['xoops']->path('modules/newbb/language/'.$GLOBALS['xoopsConfig']['language'].'/blocks.php'); |
|
| 957 | 957 | } else { |
| 958 | 958 | require_once $GLOBALS['xoops']->path('modules/newbb/language/english/blocks.php'); |
| 959 | 959 | } |
@@ -977,8 +977,8 @@ discard block |
||
| 977 | 977 | { |
| 978 | 978 | |
| 979 | 979 | // if no newbb module block set, we have to include the language file |
| 980 | - if (is_readable($GLOBALS['xoops']->path('modules/newbb/language/' . $GLOBALS['xoopsConfig']['language'] . '/blocks.php'))) { |
|
| 981 | - require_once $GLOBALS['xoops']->path('modules/newbb/language/' . $GLOBALS['xoopsConfig']['language'] . '/blocks.php'); |
|
| 980 | + if (is_readable($GLOBALS['xoops']->path('modules/newbb/language/'.$GLOBALS['xoopsConfig']['language'].'/blocks.php'))) { |
|
| 981 | + require_once $GLOBALS['xoops']->path('modules/newbb/language/'.$GLOBALS['xoopsConfig']['language'].'/blocks.php'); |
|
| 982 | 982 | } else { |
| 983 | 983 | require_once $GLOBALS['xoops']->path('modules/newbb/language/english/blocks.php'); |
| 984 | 984 | } |
@@ -1002,8 +1002,8 @@ discard block |
||
| 1002 | 1002 | { |
| 1003 | 1003 | |
| 1004 | 1004 | // if no newbb module block set, we have to include the language file |
| 1005 | - if (is_readable($GLOBALS['xoops']->path('modules/newbb/language/' . $GLOBALS['xoopsConfig']['language'] . '/blocks.php'))) { |
|
| 1006 | - require_once $GLOBALS['xoops']->path('modules/newbb/language/' . $GLOBALS['xoopsConfig']['language'] . '/blocks.php'); |
|
| 1005 | + if (is_readable($GLOBALS['xoops']->path('modules/newbb/language/'.$GLOBALS['xoopsConfig']['language'].'/blocks.php'))) { |
|
| 1006 | + require_once $GLOBALS['xoops']->path('modules/newbb/language/'.$GLOBALS['xoopsConfig']['language'].'/blocks.php'); |
|
| 1007 | 1007 | } else { |
| 1008 | 1008 | require_once $GLOBALS['xoops']->path('modules/newbb/language/english/blocks.php'); |
| 1009 | 1009 | } |
@@ -1026,8 +1026,8 @@ discard block |
||
| 1026 | 1026 | function b_newbb_custom_author($options) |
| 1027 | 1027 | { |
| 1028 | 1028 | // if no newbb module block set, we have to include the language file |
| 1029 | - if (is_readable($GLOBALS['xoops']->path('modules/newbb/language/' . $GLOBALS['xoopsConfig']['language'] . '/blocks.php'))) { |
|
| 1030 | - require_once $GLOBALS['xoops']->path('modules/newbb/language/' . $GLOBALS['xoopsConfig']['language'] . '/blocks.php'); |
|
| 1029 | + if (is_readable($GLOBALS['xoops']->path('modules/newbb/language/'.$GLOBALS['xoopsConfig']['language'].'/blocks.php'))) { |
|
| 1030 | + require_once $GLOBALS['xoops']->path('modules/newbb/language/'.$GLOBALS['xoopsConfig']['language'].'/blocks.php'); |
|
| 1031 | 1031 | } else { |
| 1032 | 1032 | require_once $GLOBALS['xoops']->path('modules/newbb/language/english/blocks.php'); |
| 1033 | 1033 | } |
@@ -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))); |
@@ -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))); |
@@ -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) . '">' . _MD_NEWBB_REGTOPOST . '</a>'); |
|
| 240 | + $xoopsTpl->assign('forum_register', '<a href="'.XOOPS_URL.'/user.php?xoops_redirect='.htmlspecialchars($xoopsRequestUri).'">'._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 = []; |
@@ -273,7 +273,7 @@ discard block |
||
| 273 | 273 | |
| 274 | 274 | $viewtopic_users = []; |
| 275 | 275 | if (is_array($userid_array) && count($userid_array) > 0) { |
| 276 | - require $GLOBALS['xoops']->path('modules/' . $xoopsModule->getVar('dirname', 'n') . '/class/user.php'); |
|
| 276 | + require $GLOBALS['xoops']->path('modules/'.$xoopsModule->getVar('dirname', 'n').'/class/user.php'); |
|
| 277 | 277 | $userHandler = new Newbb\UserHandler($GLOBALS['xoopsModuleConfig']['groupbar_enabled'], $GLOBALS['xoopsModuleConfig']['wol_enabled']); |
| 278 | 278 | $userHandler->users = $users; |
| 279 | 279 | $userHandler->online = $online; |
@@ -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) . '" />'; |
|
| 136 | - echo '<input type="hidden" name="order" value="' . htmlspecialchars($order) . '" />'; |
|
| 137 | - echo '<input type="hidden" name="forum" value="' . htmlspecialchars($forum) . '" />'; |
|
| 138 | - echo '<input type="hidden" name="topic_id" value="' . htmlspecialchars($topic_id) . '" />'; |
|
| 135 | + echo '<input type="hidden" name="post_id" value="'.htmlspecialchars($post_id).'" />'; |
|
| 136 | + echo '<input type="hidden" name="order" value="'.htmlspecialchars($order).'" />'; |
|
| 137 | + echo '<input type="hidden" name="forum" value="'.htmlspecialchars($forum).'" />'; |
|
| 138 | + echo '<input type="hidden" name="topic_id" value="'.htmlspecialchars($topic_id).'" />'; |
|
| 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'); |
|