@@ -300,8 +300,8 @@ discard block |
||
300 | 300 | if ($this->activated) { |
301 | 301 | $this->log( |
302 | 302 | LogLevel::ERROR, |
303 | - 'Exception: ' . $e->getMessage() . ' - ' . |
|
304 | - $this->sanitizePath($e->getFile()) . ' ' . $e->getLine() |
|
303 | + 'Exception: '.$e->getMessage().' - '. |
|
304 | + $this->sanitizePath($e->getFile()).' '.$e->getLine() |
|
305 | 305 | ); |
306 | 306 | } |
307 | 307 | } |
@@ -362,9 +362,9 @@ discard block |
||
362 | 362 | $pattern = '<!--<xo-logger-output>-->'; |
363 | 363 | $pos = strpos($output, $pattern); |
364 | 364 | if ($pos !== false) { |
365 | - return substr($output, 0, $pos) . $log . substr($output, $pos + strlen($pattern)); |
|
365 | + return substr($output, 0, $pos).$log.substr($output, $pos + strlen($pattern)); |
|
366 | 366 | } else { |
367 | - return $output . $log; |
|
367 | + return $output.$log; |
|
368 | 368 | } |
369 | 369 | } |
370 | 370 | |
@@ -387,15 +387,15 @@ discard block |
||
387 | 387 | $content = ' |
388 | 388 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
389 | 389 | <head> |
390 | - <meta http-equiv="content-language" content="' . XoopsLocale::getLangCode() . '" /> |
|
391 | - <meta http-equiv="content-type" content="text/html; charset=' . XoopsLocale::getCharset() . '" /> |
|
392 | - <title>' . $xoops->getConfig('sitename') . ' - ' . _MD_LOGGER_DEBUG . ' </title> |
|
390 | + <meta http-equiv="content-language" content="' . XoopsLocale::getLangCode().'" /> |
|
391 | + <meta http-equiv="content-type" content="text/html; charset=' . XoopsLocale::getCharset().'" /> |
|
392 | + <title>' . $xoops->getConfig('sitename').' - '._MD_LOGGER_DEBUG.' </title> |
|
393 | 393 | <meta name="generator" content="XOOPS" /> |
394 | - <link rel="stylesheet" type="text/css" media="all" href="' . $xoops->getCss($xoops->getConfig('theme_set')) . '" /> |
|
394 | + <link rel="stylesheet" type="text/css" media="all" href="' . $xoops->getCss($xoops->getConfig('theme_set')).'" /> |
|
395 | 395 | </head> |
396 | -<body>' . $dump . ' |
|
396 | +<body>' . $dump.' |
|
397 | 397 | <div style="text-align:center;"> |
398 | - <input class="formButton" value="' . XoopsLocale::A_CLOSE . '" type="button" onclick="javascript:window.close();" /> |
|
398 | + <input class="formButton" value="' . XoopsLocale::A_CLOSE.'" type="button" onclick="javascript:window.close();" /> |
|
399 | 399 | </div> |
400 | 400 | '; |
401 | 401 | $ret .= ' |
@@ -405,8 +405,8 @@ discard block |
||
405 | 405 | '; |
406 | 406 | $lines = preg_split("/(\r\n|\r|\n)( *)/", $content); |
407 | 407 | foreach ($lines as $line) { |
408 | - $ret .= "\n" . 'debug_window.document.writeln("' |
|
409 | - . str_replace(array('"', '</'), array('\"', '<\/'), $line) . '");'; |
|
408 | + $ret .= "\n".'debug_window.document.writeln("' |
|
409 | + . str_replace(array('"', '</'), array('\"', '<\/'), $line).'");'; |
|
410 | 410 | } |
411 | 411 | $ret .= ' |
412 | 412 | debug_window.focus(); |
@@ -434,11 +434,11 @@ discard block |
||
434 | 434 | $memory = 0; |
435 | 435 | |
436 | 436 | if (function_exists('memory_get_usage')) { |
437 | - $memory = memory_get_usage() . ' bytes'; |
|
437 | + $memory = memory_get_usage().' bytes'; |
|
438 | 438 | } else { |
439 | 439 | if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') { |
440 | 440 | $out = array(); |
441 | - exec('tasklist /FI "PID eq ' . getmypid() . '" /FO LIST', $out); |
|
441 | + exec('tasklist /FI "PID eq '.getmypid().'" /FO LIST', $out); |
|
442 | 442 | if (isset($out[5])) { |
443 | 443 | $memory = sprintf(_MD_LOGGER_MEM_ESTIMATED, substr($out[5], strpos($out[5], ':') + 1)); |
444 | 444 | } |
@@ -451,20 +451,20 @@ discard block |
||
451 | 451 | if (empty($mode)) { |
452 | 452 | $views = array('errors', 'deprecated', 'queries', 'blocks', 'extra'); |
453 | 453 | $ret .= "\n<div id=\"xo-logger-output\">\n<div id='xo-logger-tabs'>\n"; |
454 | - $ret .= "<a href='javascript:xoSetLoggerView(\"none\")'>" . _MD_LOGGER_NONE . "</a>\n"; |
|
455 | - $ret .= "<a href='javascript:xoSetLoggerView(\"\")'>" . _MD_LOGGER_ALL . "</a>\n"; |
|
454 | + $ret .= "<a href='javascript:xoSetLoggerView(\"none\")'>"._MD_LOGGER_NONE."</a>\n"; |
|
455 | + $ret .= "<a href='javascript:xoSetLoggerView(\"\")'>"._MD_LOGGER_ALL."</a>\n"; |
|
456 | 456 | foreach ($views as $view) { |
457 | 457 | $count = count($this->$view); |
458 | - $ret .= "<a href='javascript:xoSetLoggerView(\"$view\")'>" . constant('_MD_LOGGER_' . strtoupper($view)) . " ($count)</a>\n"; |
|
458 | + $ret .= "<a href='javascript:xoSetLoggerView(\"$view\")'>".constant('_MD_LOGGER_'.strtoupper($view))." ($count)</a>\n"; |
|
459 | 459 | } |
460 | 460 | $count = count($this->logstart); |
461 | - $ret .= "<a href='javascript:xoSetLoggerView(\"timers\")'>" . _MD_LOGGER_TIMERS . "($count)</a>\n"; |
|
461 | + $ret .= "<a href='javascript:xoSetLoggerView(\"timers\")'>"._MD_LOGGER_TIMERS."($count)</a>\n"; |
|
462 | 462 | $ret .= "</div>\n"; |
463 | 463 | } |
464 | 464 | |
465 | 465 | if (empty($mode) || $mode === 'errors') { |
466 | 466 | $class = 'even'; |
467 | - $ret .= '<table id="xo-logger-errors" class="outer"><thead><tr><th>' . _MD_LOGGER_ERRORS . '</th></tr></thead><tbody>'; |
|
467 | + $ret .= '<table id="xo-logger-errors" class="outer"><thead><tr><th>'._MD_LOGGER_ERRORS.'</th></tr></thead><tbody>'; |
|
468 | 468 | foreach ($this->errors as $error) { |
469 | 469 | $ret .= "\n<tr><td class='$class'>"; |
470 | 470 | $ret .= $error; |
@@ -476,7 +476,7 @@ discard block |
||
476 | 476 | |
477 | 477 | if (empty($mode) || $mode === 'deprecated') { |
478 | 478 | $class = 'even'; |
479 | - $ret .= '<table id="xo-logger-deprecated" class="outer"><thead><tr><th>' . _MD_LOGGER_DEPRECATED . '</th></tr></thead><tbody>'; |
|
479 | + $ret .= '<table id="xo-logger-deprecated" class="outer"><thead><tr><th>'._MD_LOGGER_DEPRECATED.'</th></tr></thead><tbody>'; |
|
480 | 480 | foreach ($this->deprecated as $message) { |
481 | 481 | $ret .= "\n<tr><td class='$class'>"; |
482 | 482 | $ret .= $message; |
@@ -488,42 +488,42 @@ discard block |
||
488 | 488 | |
489 | 489 | if (empty($mode) || $mode === 'queries') { |
490 | 490 | $class = 'even'; |
491 | - $ret .= '<table id="xo-logger-queries" class="outer"><thead><tr><th>' . _MD_LOGGER_QUERIES . '</th></tr></thead><tbody>'; |
|
492 | - $pattern = '/\b' . preg_quote(\XoopsBaseConfig::get('db-prefix')) . '\_/i'; |
|
491 | + $ret .= '<table id="xo-logger-queries" class="outer"><thead><tr><th>'._MD_LOGGER_QUERIES.'</th></tr></thead><tbody>'; |
|
492 | + $pattern = '/\b'.preg_quote(\XoopsBaseConfig::get('db-prefix')).'\_/i'; |
|
493 | 493 | |
494 | 494 | foreach ($this->queries as $q) { |
495 | 495 | $sql = preg_replace($pattern, '', $q['sql']); |
496 | 496 | $query_time = isset($q['query_time']) ? sprintf('%0.6f - ', $q['query_time']) : ''; |
497 | 497 | |
498 | 498 | if (isset($q['error'])) { |
499 | - $ret .= '<tr class="' . $class . '"><td><span style="color:#ff0000;">' . $query_time . htmlentities($sql) . '<br /><strong>Error number:</strong> ' . $q['errno'] . '<br /><strong>Error message:</strong> ' . $q['error'] . '</span></td></tr>'; |
|
499 | + $ret .= '<tr class="'.$class.'"><td><span style="color:#ff0000;">'.$query_time.htmlentities($sql).'<br /><strong>Error number:</strong> '.$q['errno'].'<br /><strong>Error message:</strong> '.$q['error'].'</span></td></tr>'; |
|
500 | 500 | } else { |
501 | - $ret .= '<tr class="' . $class . '"><td>' . $query_time . htmlentities($sql) . '</td></tr>'; |
|
501 | + $ret .= '<tr class="'.$class.'"><td>'.$query_time.htmlentities($sql).'</td></tr>'; |
|
502 | 502 | } |
503 | 503 | |
504 | 504 | $class = ($class === 'odd') ? 'even' : 'odd'; |
505 | 505 | } |
506 | - $ret .= '</tbody><tfoot><tr class="foot"><td>' . _MD_LOGGER_TOTAL . ': <span style="color:#ff0000;">' . count($this->queries) . '</span></td></tr></tfoot></table>'; |
|
506 | + $ret .= '</tbody><tfoot><tr class="foot"><td>'._MD_LOGGER_TOTAL.': <span style="color:#ff0000;">'.count($this->queries).'</span></td></tr></tfoot></table>'; |
|
507 | 507 | } |
508 | 508 | if (empty($mode) || $mode === 'blocks') { |
509 | 509 | $class = 'even'; |
510 | - $ret .= '<table id="xo-logger-blocks" class="outer"><thead><tr><th>' . _MD_LOGGER_BLOCKS . '</th></tr></thead><tbody>'; |
|
510 | + $ret .= '<table id="xo-logger-blocks" class="outer"><thead><tr><th>'._MD_LOGGER_BLOCKS.'</th></tr></thead><tbody>'; |
|
511 | 511 | foreach ($this->blocks as $b) { |
512 | 512 | if ($b['cached']) { |
513 | - $ret .= '<tr><td class="' . $class . '"><strong>' . $b['name'] . ':</strong> ' . sprintf(_MD_LOGGER_CACHED, (int)($b['cachetime'])) . '</td></tr>'; |
|
513 | + $ret .= '<tr><td class="'.$class.'"><strong>'.$b['name'].':</strong> '.sprintf(_MD_LOGGER_CACHED, (int)($b['cachetime'])).'</td></tr>'; |
|
514 | 514 | } else { |
515 | - $ret .= '<tr><td class="' . $class . '"><strong>' . $b['name'] . ':</strong> ' . _MD_LOGGER_NOT_CACHED . '</td></tr>'; |
|
515 | + $ret .= '<tr><td class="'.$class.'"><strong>'.$b['name'].':</strong> '._MD_LOGGER_NOT_CACHED.'</td></tr>'; |
|
516 | 516 | } |
517 | 517 | $class = ($class === 'odd') ? 'even' : 'odd'; |
518 | 518 | } |
519 | - $ret .= '</tbody><tfoot><tr class="foot"><td>' . _MD_LOGGER_TOTAL . ': <span style="color:#ff0000;">' . count($this->blocks) . '</span></td></tr></tfoot></table>'; |
|
519 | + $ret .= '</tbody><tfoot><tr class="foot"><td>'._MD_LOGGER_TOTAL.': <span style="color:#ff0000;">'.count($this->blocks).'</span></td></tr></tfoot></table>'; |
|
520 | 520 | } |
521 | 521 | if (empty($mode) || $mode === 'extra') { |
522 | 522 | $class = 'even'; |
523 | - $ret .= '<table id="xo-logger-extra" class="outer"><thead><tr><th>' . _MD_LOGGER_EXTRA . '</th></tr></thead><tbody>'; |
|
523 | + $ret .= '<table id="xo-logger-extra" class="outer"><thead><tr><th>'._MD_LOGGER_EXTRA.'</th></tr></thead><tbody>'; |
|
524 | 524 | foreach ($this->extra as $ex) { |
525 | - $ret .= '<tr><td class="' . $class . '"><strong>'; |
|
526 | - $ret .= htmlspecialchars($ex['name']) . ':</strong> ' . htmlspecialchars($ex['msg']); |
|
525 | + $ret .= '<tr><td class="'.$class.'"><strong>'; |
|
526 | + $ret .= htmlspecialchars($ex['name']).':</strong> '.htmlspecialchars($ex['msg']); |
|
527 | 527 | $ret .= '</td></tr>'; |
528 | 528 | $class = ($class === 'odd') ? 'even' : 'odd'; |
529 | 529 | } |
@@ -531,10 +531,10 @@ discard block |
||
531 | 531 | } |
532 | 532 | if (empty($mode) || $mode === 'timers') { |
533 | 533 | $class = 'even'; |
534 | - $ret .= '<table id="xo-logger-timers" class="outer"><thead><tr><th>' . _MD_LOGGER_TIMERS . '</th></tr></thead><tbody>'; |
|
534 | + $ret .= '<table id="xo-logger-timers" class="outer"><thead><tr><th>'._MD_LOGGER_TIMERS.'</th></tr></thead><tbody>'; |
|
535 | 535 | foreach ($this->logstart as $k => $v) { |
536 | - $ret .= '<tr><td class="' . $class . '"><strong>'; |
|
537 | - $ret .= sprintf(_MD_LOGGER_TIMETOLOAD, htmlspecialchars($k) . '</strong>', '<span style="color:#ff0000;">' . sprintf("%.03f", $this->dumpTime($k)) . '</span>'); |
|
536 | + $ret .= '<tr><td class="'.$class.'"><strong>'; |
|
537 | + $ret .= sprintf(_MD_LOGGER_TIMETOLOAD, htmlspecialchars($k).'</strong>', '<span style="color:#ff0000;">'.sprintf("%.03f", $this->dumpTime($k)).'</span>'); |
|
538 | 538 | $ret .= '</td></tr>'; |
539 | 539 | $class = ($class === 'odd') ? 'even' : 'odd'; |
540 | 540 | } |
@@ -23,7 +23,7 @@ |
||
23 | 23 | * @author Jan Pedersen |
24 | 24 | * @author Taiwen Jiang <[email protected]> |
25 | 25 | */ |
26 | -include __DIR__ . '/header.php'; |
|
26 | +include __DIR__.'/header.php'; |
|
27 | 27 | |
28 | 28 | $xoops = Xoops::getInstance(); |
29 | 29 | $xoops->header(); |
@@ -19,6 +19,6 @@ |
||
19 | 19 | * @author Taiwen Jiang <[email protected]> |
20 | 20 | */ |
21 | 21 | |
22 | -require_once dirname(dirname(dirname(__DIR__))) . '/include/cp_header.php'; |
|
22 | +require_once dirname(dirname(dirname(__DIR__))).'/include/cp_header.php'; |
|
23 | 23 | |
24 | 24 | $xoops = Xoops::getInstance(); |
@@ -43,7 +43,7 @@ |
||
43 | 43 | // paypal |
44 | 44 | $modversion['paypal'] = array(); |
45 | 45 | $modversion['paypal']['business'] = '[email protected]'; |
46 | -$modversion['paypal']['item_name'] = 'Donation : ' . _PM_MI_DESC; |
|
46 | +$modversion['paypal']['item_name'] = 'Donation : '._PM_MI_DESC; |
|
47 | 47 | $modversion['paypal']['amount'] = 0; |
48 | 48 | $modversion['paypal']['currency_code'] = 'USD'; |
49 | 49 |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | * @author Taiwen Jiang <[email protected]> |
27 | 27 | */ |
28 | 28 | |
29 | -include_once dirname(dirname(__DIR__)) . '/mainfile.php'; |
|
29 | +include_once dirname(dirname(__DIR__)).'/mainfile.php'; |
|
30 | 30 | |
31 | 31 | $xoops = Xoops::getInstance(); |
32 | 32 | |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | if (is_object($pm) && !$xoops->user->isAdmin() && ($pm->getVar('from_userid') != $xoops->user->getVar('uid')) |
50 | 50 | && ($pm->getVar('to_userid') != $xoops->user->getVar('uid')) |
51 | 51 | ) { |
52 | - $xoops->redirect(XOOPS_URL . '/modules/' . $xoops->module->getVar("dirname", "n") . '/index.php', 2, XoopsLocale::E_NO_ACCESS_PERMISSION); |
|
52 | + $xoops->redirect(XOOPS_URL.'/modules/'.$xoops->module->getVar("dirname", "n").'/index.php', 2, XoopsLocale::E_NO_ACCESS_PERMISSION); |
|
53 | 53 | } |
54 | 54 | |
55 | 55 | if (is_object($pm) && !empty($_POST['action'])) { |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | } |
113 | 113 | } |
114 | 114 | $res_message = isset($res_message) ? $res_message : (($res) ? _PM_ACTION_DONE : _PM_ACTION_ERROR); |
115 | - $xoops->redirect('viewpmsg.php?op=' . htmlspecialchars($_REQUEST['op']), 2, $res_message); |
|
115 | + $xoops->redirect('viewpmsg.php?op='.htmlspecialchars($_REQUEST['op']), 2, $res_message); |
|
116 | 116 | } |
117 | 117 | $start = !empty($_GET['start']) ? (int)($_GET['start']) : 0; |
118 | 118 | $total_messages = !empty($_GET['total_messages']) ? (int)($_GET['total_messages']) : 0; |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | */ |
35 | 35 | public static function eventCorePmliteStart($args) |
36 | 36 | { |
37 | - header("location: ./modules/pm/pmlite.php" . (empty($_SERVER['QUERY_STRING']) ? "" : "?" . $_SERVER['QUERY_STRING'])); |
|
37 | + header("location: ./modules/pm/pmlite.php".(empty($_SERVER['QUERY_STRING']) ? "" : "?".$_SERVER['QUERY_STRING'])); |
|
38 | 38 | exit(); |
39 | 39 | } |
40 | 40 | |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | */ |
48 | 48 | public static function eventCoreReadpmsgStart($args) |
49 | 49 | { |
50 | - header("location: ./modules/pm/readpmsg.php" . (empty($_SERVER['QUERY_STRING']) ? "" : "?" . $_SERVER['QUERY_STRING'])); |
|
50 | + header("location: ./modules/pm/readpmsg.php".(empty($_SERVER['QUERY_STRING']) ? "" : "?".$_SERVER['QUERY_STRING'])); |
|
51 | 51 | exit(); |
52 | 52 | } |
53 | 53 | |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | */ |
61 | 61 | public static function eventCoreViewpmsgStart($args) |
62 | 62 | { |
63 | - header("location: ./modules/pm/viewpmsg.php" . (empty($_SERVER['QUERY_STRING']) ? "" : "?" . $_SERVER['QUERY_STRING'])); |
|
63 | + header("location: ./modules/pm/viewpmsg.php".(empty($_SERVER['QUERY_STRING']) ? "" : "?".$_SERVER['QUERY_STRING'])); |
|
64 | 64 | exit(); |
65 | 65 | } |
66 | 66 | |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | */ |
98 | 98 | public static function eventCoreServiceLocateUserMessage(Provider $provider) |
99 | 99 | { |
100 | - $path = dirname(__DIR__) . '/class/PMProvider.php'; |
|
100 | + $path = dirname(__DIR__).'/class/PMProvider.php'; |
|
101 | 101 | require $path; |
102 | 102 | $object = new PMProvider(); |
103 | 103 | $provider->register($object); |
@@ -6,61 +6,61 @@ discard block |
||
6 | 6 | $xoops = Xoops::getInstance(); |
7 | 7 | |
8 | 8 | //%%%%%% File Name readpmsg.php %%%%% |
9 | -define("_PM_DELETED","Your message(s) has been deleted"); |
|
10 | -define("_PM_PRIVATEMESSAGE","Private Messages"); |
|
11 | -define("_PM_INBOX","Inbox"); |
|
12 | -define("_PM_FROM","From"); |
|
13 | -define("_PM_YOUDONTHAVE","You don't have any private messages"); |
|
14 | -define("_PM_FOLDER_EMPTY","This folder is empty."); |
|
15 | -define("_PM_FROMC","From: "); |
|
16 | -define("_PM_SENTC","Sent: "); // The date of message sent |
|
9 | +define("_PM_DELETED", "Your message(s) has been deleted"); |
|
10 | +define("_PM_PRIVATEMESSAGE", "Private Messages"); |
|
11 | +define("_PM_INBOX", "Inbox"); |
|
12 | +define("_PM_FROM", "From"); |
|
13 | +define("_PM_YOUDONTHAVE", "You don't have any private messages"); |
|
14 | +define("_PM_FOLDER_EMPTY", "This folder is empty."); |
|
15 | +define("_PM_FROMC", "From: "); |
|
16 | +define("_PM_SENTC", "Sent: "); // The date of message sent |
|
17 | 17 | //define("_PM_PROFILE","Profile"); |
18 | 18 | |
19 | 19 | // %s is a username |
20 | -define("_PM_PREVIOUS","Previous Message"); |
|
21 | -define("_PM_NEXT","Next Message"); |
|
20 | +define("_PM_PREVIOUS", "Previous Message"); |
|
21 | +define("_PM_NEXT", "Next Message"); |
|
22 | 22 | |
23 | 23 | //%%%%%% File Name pmlite.php %%%%% |
24 | 24 | //define("_PM_SORRY","Sorry! You are not a registered user."); |
25 | 25 | //define("_PM_REGISTERNOW","Register Now!"); |
26 | -define("_PM_GOBACK","Go Back"); |
|
27 | -define("_PM_USERNOEXIST","The selected user doesn't exist in the database."); |
|
28 | -define("_PM_PLZTRYAGAIN","Please check the name and try again."); |
|
29 | -define("_PM_MESSAGEPOSTED","Your message has been posted"); |
|
30 | -define("_PM_CLICKHERE","You can click here to view your private messages"); |
|
31 | -define("_PM_ORCLOSEWINDOW","Or click here to close this window."); |
|
32 | -define("_PM_USERWROTE","%s wrote:"); |
|
33 | -define("_PM_TO","To: "); |
|
34 | -define("_PM_SUBJECTC","Subject: "); |
|
35 | -define("_PM_MESSAGEC","Message: "); |
|
36 | -define("_PM_CLEAR","Clear"); |
|
37 | -define("_PM_CANCELSEND","Cancel Send"); |
|
26 | +define("_PM_GOBACK", "Go Back"); |
|
27 | +define("_PM_USERNOEXIST", "The selected user doesn't exist in the database."); |
|
28 | +define("_PM_PLZTRYAGAIN", "Please check the name and try again."); |
|
29 | +define("_PM_MESSAGEPOSTED", "Your message has been posted"); |
|
30 | +define("_PM_CLICKHERE", "You can click here to view your private messages"); |
|
31 | +define("_PM_ORCLOSEWINDOW", "Or click here to close this window."); |
|
32 | +define("_PM_USERWROTE", "%s wrote:"); |
|
33 | +define("_PM_TO", "To: "); |
|
34 | +define("_PM_SUBJECTC", "Subject: "); |
|
35 | +define("_PM_MESSAGEC", "Message: "); |
|
36 | +define("_PM_CLEAR", "Clear"); |
|
37 | +define("_PM_CANCELSEND", "Cancel Send"); |
|
38 | 38 | //define("_PM_SUBMIT","Submit"); |
39 | 39 | define("_PM_SAVEINOUTBOX", "Save a copy in your outbox?"); |
40 | 40 | |
41 | 41 | //%%%%%% File Name viewpmsg.php %%%%% |
42 | -define("_PM_SUBJECT","Subject"); |
|
43 | -define("_PM_DATE","Date"); |
|
44 | -define("_PM_NOTREAD","Not Read"); |
|
45 | -define("_PM_SEND","Send new message"); |
|
46 | -define("_PM_DELETE","Delete"); |
|
47 | -define("_PM_TOSAVE","Move to Savebox"); |
|
48 | -define("_PM_UNSAVE","Move out of Savebox"); |
|
49 | -define("_PM_EMPTY","Empty"); |
|
42 | +define("_PM_SUBJECT", "Subject"); |
|
43 | +define("_PM_DATE", "Date"); |
|
44 | +define("_PM_NOTREAD", "Not Read"); |
|
45 | +define("_PM_SEND", "Send new message"); |
|
46 | +define("_PM_DELETE", "Delete"); |
|
47 | +define("_PM_TOSAVE", "Move to Savebox"); |
|
48 | +define("_PM_UNSAVE", "Move out of Savebox"); |
|
49 | +define("_PM_EMPTY", "Empty"); |
|
50 | 50 | define("_PM_REPLY", "Reply"); |
51 | 51 | //define("_PM_PLZREG","Please register first to send private messages!"); |
52 | -define("_PM_SAVED_PART","You are allowed %d in your Savebox and you saved %d messages for this time"); |
|
53 | -define("_PM_SAVED_ALL","Messages have been moved to Savebox"); |
|
54 | -define("_PM_UNSAVED","Messages have been removed from Savebox"); |
|
55 | -define("_PM_EMPTIED","The box has been emptied"); |
|
56 | -define("_PM_RUSUREEMPTY","Are you sure to empty the box?"); |
|
57 | -define("_PM_SURE_TO_DELETE","Are you sure to delete these message(s)?"); |
|
52 | +define("_PM_SAVED_PART", "You are allowed %d in your Savebox and you saved %d messages for this time"); |
|
53 | +define("_PM_SAVED_ALL", "Messages have been moved to Savebox"); |
|
54 | +define("_PM_UNSAVED", "Messages have been removed from Savebox"); |
|
55 | +define("_PM_EMPTIED", "The box has been emptied"); |
|
56 | +define("_PM_RUSUREEMPTY", "Are you sure to empty the box?"); |
|
57 | +define("_PM_SURE_TO_DELETE", "Are you sure to delete these message(s)?"); |
|
58 | 58 | |
59 | 59 | define("_PM_ONLINE", "Online"); |
60 | 60 | |
61 | -define("_PM_OUTBOX","Outbox"); |
|
62 | -define("_PM_SAVEBOX","Savebox"); |
|
63 | -define("_PM_SAVE","SAVE"); |
|
61 | +define("_PM_OUTBOX", "Outbox"); |
|
62 | +define("_PM_SAVEBOX", "Savebox"); |
|
63 | +define("_PM_SAVE", "SAVE"); |
|
64 | 64 | |
65 | 65 | //WANISYS.NET PM HACK1.5 |
66 | 66 | //define("_PM_SORT","SORT"); |
@@ -89,5 +89,5 @@ discard block |
||
89 | 89 | define("_PM_ACTION_ERROR", "Operation failed"); |
90 | 90 | |
91 | 91 | //XOOPS 2.5.2 |
92 | -define("_PM_READ","Already Read"); |
|
93 | -define("_PM_SUBJECT_ICONS","Subject Icons: "); |
|
92 | +define("_PM_READ", "Already Read"); |
|
93 | +define("_PM_SUBJECT_ICONS", "Subject Icons: "); |
@@ -24,9 +24,9 @@ discard block |
||
24 | 24 | */ |
25 | 25 | |
26 | 26 | if (!defined('XOOPS_MAINFILE_INCLUDED')) { |
27 | - include_once dirname(dirname(__DIR__)) . '/mainfile.php'; |
|
27 | + include_once dirname(dirname(__DIR__)).'/mainfile.php'; |
|
28 | 28 | } else { |
29 | - chdir(\XoopsBaseConfig::get('root-path') . '/modules/pm/'); |
|
29 | + chdir(\XoopsBaseConfig::get('root-path').'/modules/pm/'); |
|
30 | 30 | } |
31 | 31 | $xoops = Xoops::getInstance(); |
32 | 32 | $xoops->loadLanguage('main', 'pm'); |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | $msg_id = isset($_GET['msg_id']) ? (int)($_GET['msg_id']) : 0; |
40 | 40 | |
41 | 41 | if (empty($_GET['refresh']) && isset($_POST['op']) && $_POST['op'] !== "submit") { |
42 | - $jump = "pmlite.php?refresh=" . time(); |
|
42 | + $jump = "pmlite.php?refresh=".time(); |
|
43 | 43 | if ($send == 1) { |
44 | 44 | $jump .= "&send={$send}"; |
45 | 45 | } else { |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | } |
53 | 53 | } |
54 | 54 | } |
55 | - header('location: ' . $jump); |
|
55 | + header('location: '.$jump); |
|
56 | 56 | exit(); |
57 | 57 | } |
58 | 58 | |
@@ -69,8 +69,8 @@ discard block |
||
69 | 69 | $tpl = new XoopsTpl(); |
70 | 70 | if ($count != 1) { |
71 | 71 | $error_message = _PM_USERNOEXIST; |
72 | - $error_message .= "<br />" . _PM_PLZTRYAGAIN; |
|
73 | - $error_message .= "<br />[ <a href='javascript:history.go(-1)'>" . _PM_GOBACK . "</a> ]"; |
|
72 | + $error_message .= "<br />"._PM_PLZTRYAGAIN; |
|
73 | + $error_message .= "<br />[ <a href='javascript:history.go(-1)'>"._PM_GOBACK."</a> ]"; |
|
74 | 74 | $tpl->assign('error_message', $error_message); |
75 | 75 | } else { |
76 | 76 | if ($xoops->security()->check()) { |
@@ -90,19 +90,19 @@ discard block |
||
90 | 90 | } |
91 | 91 | if (!$pm_handler->insert($pm)) { |
92 | 92 | $error_message = $pm->getHtmlErrors(); |
93 | - $error_message .= "<br /><a href='javascript:history.go(-1)'>" . _PM_GOBACK . "</a>"; |
|
93 | + $error_message .= "<br /><a href='javascript:history.go(-1)'>"._PM_GOBACK."</a>"; |
|
94 | 94 | $tpl->assign('error_message', $error_message); |
95 | 95 | } else { |
96 | 96 | // @todo: Send notification email if user has selected this in the profile |
97 | 97 | $info_message = _PM_MESSAGEPOSTED; |
98 | 98 | $info_message .= "<br />"; |
99 | - $info_message .= "<br /><a href=\"javascript:window.opener.location='" . \XoopsBaseConfig::get('url') . "/viewpmsg.php';window.close();\">" . _PM_CLICKHERE . "</a>"; |
|
100 | - $info_message .= "<br /><br /><a href=\"javascript:window.close();\">" . _PM_ORCLOSEWINDOW . "</a>"; |
|
99 | + $info_message .= "<br /><a href=\"javascript:window.opener.location='".\XoopsBaseConfig::get('url')."/viewpmsg.php';window.close();\">"._PM_CLICKHERE."</a>"; |
|
100 | + $info_message .= "<br /><br /><a href=\"javascript:window.close();\">"._PM_ORCLOSEWINDOW."</a>"; |
|
101 | 101 | $tpl->assign('info_message', $info_message); |
102 | 102 | } |
103 | 103 | } else { |
104 | 104 | $error_message = implode('<br />', $xoops->security()->getErrors()); |
105 | - $error_message .= "<br /><a href=\"javascript:window.close();\">" . _PM_ORCLOSEWINDOW . "</a>"; |
|
105 | + $error_message .= "<br /><a href=\"javascript:window.close();\">"._PM_ORCLOSEWINDOW."</a>"; |
|
106 | 106 | $tpl->assign('error_message', $error_message); |
107 | 107 | } |
108 | 108 | } |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | $pm_uname = XoopsUser::getUnameFromId($pm->getVar("from_userid")); |
120 | 120 | $message = "[quote]\n"; |
121 | 121 | $message .= sprintf(_PM_USERWROTE, $pm_uname); |
122 | - $message .= "\n" . $pm->getVar("msg_text", "E") . "\n[/quote]"; |
|
122 | + $message .= "\n".$pm->getVar("msg_text", "E")."\n[/quote]"; |
|
123 | 123 | } else { |
124 | 124 | unset($pm); |
125 | 125 | $reply = $send2 = 0; |
@@ -131,8 +131,8 @@ discard block |
||
131 | 131 | |
132 | 132 | if ($reply == 1) { |
133 | 133 | $subject = $pm->getVar('subject', 'E'); |
134 | - if (!preg_match("/^" . XoopsLocale::C_RE . "/i", $subject)) { |
|
135 | - $subject = XoopsLocale::C_RE . ' ' . $subject; |
|
134 | + if (!preg_match("/^".XoopsLocale::C_RE."/i", $subject)) { |
|
135 | + $subject = XoopsLocale::C_RE.' '.$subject; |
|
136 | 136 | } |
137 | 137 | $form->addElement(new Xoops\Form\Label(_PM_TO, $pm_uname)); |
138 | 138 | $form->addElement(new Xoops\Form\Hidden('to_userid', $pm->getVar("from_userid"))); |
@@ -51,8 +51,8 @@ discard block |
||
51 | 51 | } else { |
52 | 52 | if (empty($_REQUEST['ok'])) { |
53 | 53 | echo $xoops->confirm(array( |
54 | - 'ok' => 1, 'delete_messages' => 1, 'op' => $op, |
|
55 | - 'msg_ids' => json_encode(array_map("intval", $_POST['msg_id'])) |
|
54 | + 'ok' => 1, 'delete_messages' => 1, 'op' => $op, |
|
55 | + 'msg_ids' => json_encode(array_map("intval", $_POST['msg_id'])) |
|
56 | 56 | ), $_SERVER['REQUEST_URI'], XoopsLocale::Q_ARE_YOU_SURE_YOU_WANT_TO_DELETE_THIS_MESSAGES); |
57 | 57 | $xoops->footer(); |
58 | 58 | } else { |
@@ -129,7 +129,7 @@ discard block |
||
129 | 129 | } else { |
130 | 130 | if (empty($_REQUEST['ok'])) { |
131 | 131 | echo $xoops->confirm(array( |
132 | - 'ok' => 1, 'empty_messages' => 1, 'op' => $op |
|
132 | + 'ok' => 1, 'empty_messages' => 1, 'op' => $op |
|
133 | 133 | ), $_SERVER['REQUEST_URI'], _PM_RUSUREEMPTY); |
134 | 134 | $xoops->footer(); |
135 | 135 | } else { |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | * @author Taiwen Jiang <[email protected]> |
27 | 27 | */ |
28 | 28 | |
29 | -include_once dirname(dirname(__DIR__)) . '/mainfile.php'; |
|
29 | +include_once dirname(dirname(__DIR__)).'/mainfile.php'; |
|
30 | 30 | |
31 | 31 | $xoops = Xoops::getInstance(); |
32 | 32 | |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | $clean_msg_id = array_map("intval", $clean_msg_id); |
62 | 62 | } |
63 | 63 | $size = count($clean_msg_id); |
64 | - $msg =& $clean_msg_id; |
|
64 | + $msg = & $clean_msg_id; |
|
65 | 65 | for ($i = 0; $i < $size; ++$i) { |
66 | 66 | $pm = $pm_handler->get($msg[$i]); |
67 | 67 | if ($pm->getVar('to_userid') == $xoops->user->getVar('uid')) { |
@@ -218,7 +218,7 @@ discard block |
||
218 | 218 | $xoops->tpl()->assign('op', $op); |
219 | 219 | |
220 | 220 | if ($total_messages > $xoops->getModuleConfig('perpage')) { |
221 | - $nav = new XoopsPageNav($total_messages, $xoops->getModuleConfig('perpage'), $start, "start", 'op=' . $op); |
|
221 | + $nav = new XoopsPageNav($total_messages, $xoops->getModuleConfig('perpage'), $start, "start", 'op='.$op); |
|
222 | 222 | $xoops->tpl()->assign('pagenav', $nav->renderNav(4)); |
223 | 223 | } |
224 | 224 | |
@@ -233,7 +233,7 @@ discard block |
||
233 | 233 | } |
234 | 234 | } |
235 | 235 | $member_handler = $xoops->getHandlerMember(); |
236 | - $senders = $member_handler->getUserList(new Criteria('uid', "(" . implode(", ", array_unique($uids)) . ")", "IN")); |
|
236 | + $senders = $member_handler->getUserList(new Criteria('uid', "(".implode(", ", array_unique($uids)).")", "IN")); |
|
237 | 237 | foreach (array_keys($pm_arr) as $i) { |
238 | 238 | $message = $pm_arr[$i]; |
239 | 239 | //$message['msg_time'] = XoopsLocale::formatTimestamp($message["msg_time"], 'e'); |
@@ -252,7 +252,7 @@ discard block |
||
252 | 252 | $send_button = new Xoops\Form\Button('', 'send', XoopsLocale::A_SEND); |
253 | 253 | $send_button->set( |
254 | 254 | 'onclick', |
255 | - 'openWithSelfMain("' . $xoops->url('modules/pm/pmlite.php?send=1') . '" , "pmlite", 740,640);' |
|
255 | + 'openWithSelfMain("'.$xoops->url('modules/pm/pmlite.php?send=1').'" , "pmlite", 740,640);' |
|
256 | 256 | ); |
257 | 257 | $delete_button = new Xoops\Form\Button('', 'delete_messages', XoopsLocale::A_DELETE, 'submit'); |
258 | 258 | $move_button = new Xoops\Form\Button('', 'move_messages', ($op === 'save') ? _PM_UNSAVE |