@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | global $myts; |
68 | 68 | |
69 | 69 | $clean = stripslashes($text); |
70 | - $clean =& $myts->displayTarea($clean, 1, 0, 1); |
|
70 | + $clean = & $myts->displayTarea($clean, 1, 0, 1); |
|
71 | 71 | $clean = strip_tags($clean); |
72 | 72 | $clean = htmlspecialchars($clean, ENT_QUOTES); |
73 | 73 | |
@@ -87,16 +87,16 @@ discard block |
||
87 | 87 | $linebreak = $isHtml ? '<br>' : "\n"; |
88 | 88 | for ($i = 0; $i < $digest_count; ++$i) { |
89 | 89 | if ($isHtml) { |
90 | - $content .= ($i + 1) . '. <a href=' . $this->items[$i]['link'] . '>' . $this->items[$i]['title'] . '</a>'; |
|
90 | + $content .= ($i + 1).'. <a href='.$this->items[$i]['link'].'>'.$this->items[$i]['title'].'</a>'; |
|
91 | 91 | } else { |
92 | - $content .= ($i + 1) . '. ' . $this->items[$i]['title'] . $linebreak . $this->items[$i]['link']; |
|
92 | + $content .= ($i + 1).'. '.$this->items[$i]['title'].$linebreak.$this->items[$i]['link']; |
|
93 | 93 | } |
94 | 94 | |
95 | - $content .= $linebreak . $this->items[$i]['author']; |
|
95 | + $content .= $linebreak.$this->items[$i]['author']; |
|
96 | 96 | if ($isSummary) { |
97 | - $content .= $linebreak . $this->items[$i]['summary']; |
|
97 | + $content .= $linebreak.$this->items[$i]['summary']; |
|
98 | 98 | } |
99 | - $content .= $linebreak . $linebreak; |
|
99 | + $content .= $linebreak.$linebreak; |
|
100 | 100 | } |
101 | 101 | } |
102 | 102 | $this->setVar('digest_content', $content); |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | public function addField($field, $table) |
66 | 66 | { |
67 | 67 | global $xoopsDB; |
68 | - $result = $xoopsDB->queryF('ALTER TABLE ' . $table . " ADD $field"); |
|
68 | + $result = $xoopsDB->queryF('ALTER TABLE '.$table." ADD $field"); |
|
69 | 69 | |
70 | 70 | return $result; |
71 | 71 | } |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | if (!@mkdir($folder) && !is_dir($folder)) { |
84 | 84 | throw new \RuntimeException(sprintf('Unable to create the %s directory', $folder)); |
85 | 85 | } else { |
86 | - file_put_contents($folder . '/index.html', '<script>history.go(-1);</script>'); |
|
86 | + file_put_contents($folder.'/index.html', '<script>history.go(-1);</script>'); |
|
87 | 87 | } |
88 | 88 | } catch (\Exception $e) { |
89 | 89 | echo 'Caught exception: ', $e->getMessage(), "\n", '<br>'; |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | return; |
99 | 99 | } |
100 | 100 | // for 2.5 systems, clear everything |
101 | - require_once XOOPS_ROOT_PATH . '/modules/system/class/maintenance.php'; |
|
101 | + require_once XOOPS_ROOT_PATH.'/modules/system/class/maintenance.php'; |
|
102 | 102 | $maintenance = new \SystemMaintenance(); |
103 | 103 | $cacheList = [ |
104 | 104 | 3, // xoops_cache |
@@ -93,7 +93,7 @@ |
||
93 | 93 | } |
94 | 94 | |
95 | 95 | $newPostArray = []; |
96 | - $prefix .= $this->increment; |
|
96 | + $prefix .= $this->increment; |
|
97 | 97 | foreach ($this->postArray as $post) { |
98 | 98 | if ($post->getVar('pid') == $pid) { |
99 | 99 | $postTree_array[] = [ |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | $ret[$key]['forum_name'] = $this->tree[$key]['obj']->getVar('forum_name'); |
69 | 69 | } |
70 | 70 | $ret[$key]['prefix'] = $prefix_curr; |
71 | - $prefix_curr .= $prefix_orig; |
|
71 | + $prefix_curr .= $prefix_orig; |
|
72 | 72 | } |
73 | 73 | if (isset($this->tree[$key]['child']) && !empty($this->tree[$key]['child'])) { |
74 | 74 | foreach ($this->tree[$key]['child'] as $childkey) { |
@@ -126,9 +126,9 @@ discard block |
||
126 | 126 | $trace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 1); |
127 | 127 | trigger_error("makeSelBox() is deprecated since 2.5.9, please use makeSelectElement(), accessed from {$trace[0]['file']} line {$trace[0]['line']},"); |
128 | 128 | |
129 | - $ret = '<select name=' . $name . '>'; |
|
129 | + $ret = '<select name='.$name.'>'; |
|
130 | 130 | if (!empty($addEmptyOption)) { |
131 | - $ret .= '<option value="0">' . (is_string($EmptyOption) ? $EmptyOption : '') . '</option>'; |
|
131 | + $ret .= '<option value="0">'.(is_string($EmptyOption) ? $EmptyOption : '').'</option>'; |
|
132 | 132 | } |
133 | 133 | $this->_makeSelBoxOptions('forum_name', $selected, $key, $ret, $prefix); |
134 | 134 | $ret .= '</select>'; |
@@ -66,7 +66,7 @@ |
||
66 | 66 | case 'viewtopic.php': |
67 | 67 | /** @var Newbb\TopicHandler $topicHandler */ |
68 | 68 | $topicHandler = Newbb\Helper::getInstance()->getHandler('Topic'); |
69 | - $post_id = Request::getInt('post_id', 0);// !empty($_REQUEST["post_id"]) ? (int)($_REQUEST["post_id"]) : 0; |
|
69 | + $post_id = Request::getInt('post_id', 0); // !empty($_REQUEST["post_id"]) ? (int)($_REQUEST["post_id"]) : 0; |
|
70 | 70 | $move = strtolower(Request::getString('move', '', 'GET')); // isset($_GET['move'])? strtolower($_GET['move']) : ''; |
71 | 71 | $topic_id = Request::getInt('topic_id', 0); // !empty($_REQUEST["topic_id"]) ? (int)($_REQUEST["topic_id"]) : 0; |
72 | 72 | if (!empty($post_id)) { |
@@ -70,7 +70,7 @@ |
||
70 | 70 | require_once $GLOBALS['xoops']->path('class/template.php'); |
71 | 71 | $breadcrumbTpl = new \XoopsTpl(); |
72 | 72 | $breadcrumbTpl->assign('breadcrumb', $this->bread); |
73 | - $html = $breadcrumbTpl->fetch('db:' . $this->dirname . '_common_breadcrumb.tpl'); |
|
73 | + $html = $breadcrumbTpl->fetch('db:'.$this->dirname.'_common_breadcrumb.tpl'); |
|
74 | 74 | unset($breadcrumbTpl); |
75 | 75 | |
76 | 76 | return $html; |
@@ -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 | } |
@@ -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'); |
@@ -178,8 +178,8 @@ |
||
178 | 178 | define('_AM_NEWBB_CAN_ATTACH', 'Can use attachment'); |
179 | 179 | define('_AM_NEWBB_CAN_NOAPPROVE', 'Can post directly'); |
180 | 180 | define('_AM_NEWBB_CAN_TYPE', 'Can use topic type'); |
181 | -define('_AM_NEWBB_CAN_HTML', 'Can use and disable/enable HTML in posts');//irmtfan revised |
|
182 | -define('_AM_NEWBB_CAN_SIGNATURE', 'Can use and disable/enable signature. Default is set in profile module.');//irmtfan revised |
|
181 | +define('_AM_NEWBB_CAN_HTML', 'Can use and disable/enable HTML in posts'); //irmtfan revised |
|
182 | +define('_AM_NEWBB_CAN_SIGNATURE', 'Can use and disable/enable signature. Default is set in profile module.'); //irmtfan revised |
|
183 | 183 | define('_AM_NEWBB_ACTION', 'Action'); |
184 | 184 | define('_AM_NEWBB_PERM_TEMPLATE', 'Set default permission template'); |
185 | 185 | define('_AM_NEWBB_PERM_TEMPLATE_DESC', 'Edit the following permission template so that it can be applied to a forum or a couple of forums'); |