@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | */ |
35 | 35 | protected function __construct($debug = false) |
36 | 36 | { |
37 | - $this->debug = $debug; |
|
37 | + $this->debug = $debug; |
|
38 | 38 | parent::__construct(basename(dirname(__DIR__))); |
39 | 39 | } |
40 | 40 | |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | $this->initConfig(); |
66 | 66 | } |
67 | 67 | $this->configs[$name] = $value; |
68 | - $this->addLog("Setting config '{$name}' : " . $this->configs[$name]); |
|
68 | + $this->addLog("Setting config '{$name}' : ".$this->configs[$name]); |
|
69 | 69 | |
70 | 70 | return $this->configs[$name]; |
71 | 71 | } |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | public function getHandler($name) |
89 | 89 | { |
90 | 90 | $db = \XoopsDatabaseFactory::getDatabaseConnection(); |
91 | - $class = '\\XoopsModules\\' . ucfirst(strtolower(basename(dirname(__DIR__)))) . '\\' . $name . 'Handler'; |
|
91 | + $class = '\\XoopsModules\\'.ucfirst(strtolower(basename(dirname(__DIR__)))).'\\'.$name.'Handler'; |
|
92 | 92 | $ret = new $class($db); |
93 | 93 | |
94 | 94 | return $ret; |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | |
32 | 32 | use Xmf\Request; |
33 | 33 | |
34 | -require_once __DIR__ . '/admin_header.php'; |
|
34 | +require_once __DIR__.'/admin_header.php'; |
|
35 | 35 | require_once $GLOBALS['xoops']->path('class/pagenav.php'); |
36 | 36 | |
37 | 37 | $op = Request::getCmd('op', 'default'); |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | // $report_ids = Request::getInt('report_id', 0, 'POST'); //$_POST['report_id']; |
53 | 53 | // irmtfan add error redirect header |
54 | 54 | if (0 === count($report_ids)) { |
55 | - redirect_header("admin_report.php?item={$item}" . (empty($start) ? '' : "&start={$start}"), 1, _AM_NEWBB_REPORTNOTSELECT); |
|
55 | + redirect_header("admin_report.php?item={$item}".(empty($start) ? '' : "&start={$start}"), 1, _AM_NEWBB_REPORTNOTSELECT); |
|
56 | 56 | } |
57 | 57 | $report_memos = Request::getArray('report_memo', [], 'POST'); // isset($_POST['report_memo']) ? $_POST['report_memo'] : array(); |
58 | 58 | foreach ($report_ids as $rid => $value) { |
@@ -65,14 +65,14 @@ discard block |
||
65 | 65 | $reportHandler->insert($reportObject); |
66 | 66 | } |
67 | 67 | // irmtfan add message |
68 | - redirect_header("admin_report.php?item={$item}" . (empty($start) ? '' : "&start={$start}"), 1, _AM_NEWBB_REPORTSAVE); |
|
68 | + redirect_header("admin_report.php?item={$item}".(empty($start) ? '' : "&start={$start}"), 1, _AM_NEWBB_REPORTSAVE); |
|
69 | 69 | break; |
70 | 70 | |
71 | 71 | case 'delete': |
72 | - $report_ids = Request::getArray('report_id', [], 'POST');// $_POST['report_id']; |
|
72 | + $report_ids = Request::getArray('report_id', [], 'POST'); // $_POST['report_id']; |
|
73 | 73 | // irmtfan add error redirect header |
74 | 74 | if (0 === count($report_ids)) { |
75 | - redirect_header("admin_report.php?item={$item}" . (empty($start) ? '' : "&start={$start}"), 1, _AM_NEWBB_REPORTNOTSELECT); |
|
75 | + redirect_header("admin_report.php?item={$item}".(empty($start) ? '' : "&start={$start}"), 1, _AM_NEWBB_REPORTNOTSELECT); |
|
76 | 76 | } |
77 | 77 | foreach ($report_ids as $rid => $value) { |
78 | 78 | if (!$value) { |
@@ -83,13 +83,13 @@ discard block |
||
83 | 83 | } |
84 | 84 | } |
85 | 85 | // irmtfan add message |
86 | - redirect_header("admin_report.php?item={$item}" . (empty($start) ? '' : "&start={$start}"), 1, _AM_NEWBB_REPORTDELETE); |
|
86 | + redirect_header("admin_report.php?item={$item}".(empty($start) ? '' : "&start={$start}"), 1, _AM_NEWBB_REPORTDELETE); |
|
87 | 87 | break; |
88 | 88 | |
89 | 89 | case 'default': |
90 | 90 | default: |
91 | 91 | require_once $GLOBALS['xoops']->path('class/xoopsformloader.php'); |
92 | - require_once __DIR__ . '/../include/functions.user.php'; |
|
92 | + require_once __DIR__.'/../include/functions.user.php'; |
|
93 | 93 | |
94 | 94 | if ('processed' !== $item) { |
95 | 95 | $process_result = 0; |
@@ -112,12 +112,12 @@ discard block |
||
112 | 112 | $adminObject->addItemButton($title_other, $item_other, $icon = 'add'); |
113 | 113 | $adminObject->displayButton('left'); |
114 | 114 | echo _AM_NEWBB_REPORTADMIN_HELP; |
115 | - echo "<table width='100%' border='0' cellspacing='1' class='outer'>" . "<tr><td class='odd'>"; |
|
116 | - echo '<form action="' . xoops_getenv('PHP_SELF') . '" method="post">'; |
|
115 | + echo "<table width='100%' border='0' cellspacing='1' class='outer'>"."<tr><td class='odd'>"; |
|
116 | + echo '<form action="'.xoops_getenv('PHP_SELF').'" method="post">'; |
|
117 | 117 | echo "<table border='0' cellpadding='4' cellspacing='1' width='100%' class='outer'>"; |
118 | 118 | echo "<tr align='center'>"; |
119 | - echo "<th class='bg3' width='80%'>" . _AM_NEWBB_REPORTTITLE . '</th>'; |
|
120 | - echo "<th class='bg3' width='10%'>" . $extra . '</th>'; |
|
119 | + echo "<th class='bg3' width='80%'>"._AM_NEWBB_REPORTTITLE.'</th>'; |
|
120 | + echo "<th class='bg3' width='10%'>".$extra.'</th>'; |
|
121 | 121 | echo '</tr>'; |
122 | 122 | |
123 | 123 | $reports = $reportHandler->getAllReports('report_id', 'ASC', $limit, $start, $process_result); |
@@ -135,43 +135,43 @@ discard block |
||
135 | 135 | . '&viewmode=thread" target="checkreport">' |
136 | 136 | . $myts->htmlSpecialChars($report['subject']) |
137 | 137 | . '</a>'; |
138 | - $checkbox = '<input type="checkbox" name="report_id[' . $report['report_id'] . ']" value="1" checked />'; |
|
138 | + $checkbox = '<input type="checkbox" name="report_id['.$report['report_id'].']" value="1" checked />'; |
|
139 | 139 | if ('processed' !== $item) { |
140 | - $memo = '<input type="text" name="report_memo[' . $report['report_id'] . ']" maxlength="255" size="80" />'; |
|
140 | + $memo = '<input type="text" name="report_memo['.$report['report_id'].']" maxlength="255" size="80" />'; |
|
141 | 141 | } else { |
142 | 142 | $memo = $myts->htmlSpecialChars($report['report_memo']); |
143 | 143 | } |
144 | 144 | echo "<tr class='odd' align='left'>"; |
145 | - echo '<td>' . _AM_NEWBB_REPORTPOST . ': ' . $post_link . '</td>'; |
|
146 | - echo "<td align='center'>" . $report['report_id'] . '</td>'; |
|
145 | + echo '<td>'._AM_NEWBB_REPORTPOST.': '.$post_link.'</td>'; |
|
146 | + echo "<td align='center'>".$report['report_id'].'</td>'; |
|
147 | 147 | echo '</tr>'; |
148 | 148 | echo "<tr class='odd' align='left'>"; |
149 | - echo '<td>' . _AM_NEWBB_REPORTTEXT . ': ' . $myts->htmlSpecialChars($report['report_text']) . '</td>'; |
|
149 | + echo '<td>'._AM_NEWBB_REPORTTEXT.': '.$myts->htmlSpecialChars($report['report_text']).'</td>'; |
|
150 | 150 | $uid = (int)$report['reporter_uid']; |
151 | 151 | $reporter_name = newbbGetUnameFromId($uid, $GLOBALS['xoopsModuleConfig']['show_realname']); |
152 | - $reporter = !empty($uid) ? "<a href='" . XOOPS_URL . '/userinfo.php?uid=' . $uid . "'>" . $reporter_name . '</a><br>' : ''; |
|
153 | - echo "<td align='center'>" . $reporter . $report['reporter_ip'] . '</td>'; |
|
152 | + $reporter = !empty($uid) ? "<a href='".XOOPS_URL.'/userinfo.php?uid='.$uid."'>".$reporter_name.'</a><br>' : ''; |
|
153 | + echo "<td align='center'>".$reporter.$report['reporter_ip'].'</td>'; |
|
154 | 154 | echo '</tr>'; |
155 | 155 | echo "<tr class='odd' align='left'>"; |
156 | - echo '<td>' . _AM_NEWBB_REPORTMEMO . ': ' . $memo . '</td>'; |
|
157 | - echo "<td align='center' >" . $checkbox . '</td>'; |
|
156 | + echo '<td>'._AM_NEWBB_REPORTMEMO.': '.$memo.'</td>'; |
|
157 | + echo "<td align='center' >".$checkbox.'</td>'; |
|
158 | 158 | echo '</tr>'; |
159 | 159 | echo "<tr colspan='2'><td height='2'></td></tr>"; |
160 | 160 | } |
161 | 161 | $buttons = ''; |
162 | 162 | if ('processed' !== $item) { |
163 | - $submit = new \XoopsFormButton('', 'submit', _SUBMIT, 'submit'); |
|
164 | - $buttons .= $submit->render() . ' '; |
|
163 | + $submit = new \XoopsFormButton('', 'submit', _SUBMIT, 'submit'); |
|
164 | + $buttons .= $submit->render().' '; |
|
165 | 165 | } |
166 | 166 | $delete = new \XoopsFormButton('', 'delete', _DELETE, 'submit'); |
167 | - $buttons .= $delete->render() . ' '; |
|
167 | + $buttons .= $delete->render().' '; |
|
168 | 168 | $cancel = new \XoopsFormButton('', 'cancel', _CANCEL, 'reset'); |
169 | 169 | $buttons .= $cancel->render(); |
170 | 170 | echo "<tr colspan='2'><td align='center'>{$buttons}</td></tr>"; |
171 | 171 | $hidden = new \XoopsFormHidden('start', $start); |
172 | 172 | echo $hidden->render(); |
173 | 173 | $hidden = new \XoopsFormHidden('item', $item); |
174 | - echo $hidden->render() . '</form>'; |
|
174 | + echo $hidden->render().'</form>'; |
|
175 | 175 | |
176 | 176 | echo '</table>'; |
177 | 177 | echo '</td></tr></table>'; |
@@ -180,13 +180,13 @@ discard block |
||
180 | 180 | $limit, |
181 | 181 | $start, |
182 | 182 | 'start', |
183 | - 'item=' . $item |
|
183 | + 'item='.$item |
|
184 | 184 | ); |
185 | 185 | echo $nav->renderNav(4); |
186 | 186 | echo '<fieldset>'; |
187 | - echo '<legend> ' . _MI_NEWBB_ADMENU_REPORT . ' </legend>'; |
|
187 | + echo '<legend> '._MI_NEWBB_ADMENU_REPORT.' </legend>'; |
|
188 | 188 | echo _AM_NEWBB_HELP_REPORT_TAB; |
189 | 189 | echo '</fieldset>'; |
190 | 190 | break; |
191 | 191 | } |
192 | -require_once __DIR__ . '/admin_footer.php'; |
|
192 | +require_once __DIR__.'/admin_footer.php'; |