@@ -27,15 +27,15 @@ discard block |
||
27 | 27 | $content = ' |
28 | 28 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
29 | 29 | <head> |
30 | - <meta http-equiv="content-language" content="' . _LANGCODE . '" /> |
|
31 | - <meta http-equiv="content-type" content="text/html; charset=' . _CHARSET . '" /> |
|
32 | - <title>' . $xoopsConfig['sitename'] . ' - ' . _LOGGER_DEBUG . ' </title> |
|
30 | + <meta http-equiv="content-language" content="' . _LANGCODE.'" /> |
|
31 | + <meta http-equiv="content-type" content="text/html; charset=' . _CHARSET.'" /> |
|
32 | + <title>' . $xoopsConfig['sitename'].' - '._LOGGER_DEBUG.' </title> |
|
33 | 33 | <meta name="generator" content="XOOPS" /> |
34 | - <link rel="stylesheet" type="text/css" media="all" href="' . xoops_getcss($xoopsConfig['theme_set']) . '" /> |
|
34 | + <link rel="stylesheet" type="text/css" media="all" href="' . xoops_getcss($xoopsConfig['theme_set']).'" /> |
|
35 | 35 | </head> |
36 | -<body>' . $dump . ' |
|
36 | +<body>' . $dump.' |
|
37 | 37 | <div style="text-align:center;"> |
38 | - <input class="formButton" value="' . _CLOSE . '" type="button" onclick="window.close();" /> |
|
38 | + <input class="formButton" value="' . _CLOSE.'" type="button" onclick="window.close();" /> |
|
39 | 39 | </div> |
40 | 40 | '; |
41 | 41 | $ret .= ' |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | '; |
46 | 46 | $lines = preg_split("/(\r\n|\r|\n)( *)/", $content); |
47 | 47 | foreach ($lines as $line) { |
48 | - $ret .= "\n" . 'debug_window.document.writeln("' . str_replace(array('"', '</'), array('\"', '<\/'), $line) . '");'; |
|
48 | + $ret .= "\n".'debug_window.document.writeln("'.str_replace(array('"', '</'), array('\"', '<\/'), $line).'");'; |
|
49 | 49 | } |
50 | 50 | $ret .= ' |
51 | 51 | debug_window.focus(); |
@@ -58,11 +58,11 @@ discard block |
||
58 | 58 | $memory = 0; |
59 | 59 | |
60 | 60 | if (function_exists('memory_get_usage')) { |
61 | - $memory = memory_get_usage() . ' bytes'; |
|
61 | + $memory = memory_get_usage().' bytes'; |
|
62 | 62 | } else { |
63 | 63 | if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') { |
64 | 64 | $out = array(); |
65 | - exec('tasklist /FI "PID eq ' . getmypid() . '" /FO LIST', $out); |
|
65 | + exec('tasklist /FI "PID eq '.getmypid().'" /FO LIST', $out); |
|
66 | 66 | if (isset($out[5])) { |
67 | 67 | $memory = sprintf(_LOGGER_MEM_ESTIMATED, substr($out[5], strpos($out[5], ':') + 1)); |
68 | 68 | } |
@@ -75,14 +75,14 @@ discard block |
||
75 | 75 | if (empty($mode)) { |
76 | 76 | $views = array('errors', 'deprecated', 'queries', 'blocks', 'extra'); |
77 | 77 | $ret .= "\n<div id=\"xo-logger-output\">\n<div id='xo-logger-tabs'>\n"; |
78 | - $ret .= "<a href='javascript:xoSetLoggerView(\"none\")'>" . _LOGGER_NONE . "</a>\n"; |
|
79 | - $ret .= "<a href='javascript:xoSetLoggerView(\"\")'>" . _LOGGER_ALL . "</a>\n"; |
|
78 | + $ret .= "<a href='javascript:xoSetLoggerView(\"none\")'>"._LOGGER_NONE."</a>\n"; |
|
79 | + $ret .= "<a href='javascript:xoSetLoggerView(\"\")'>"._LOGGER_ALL."</a>\n"; |
|
80 | 80 | foreach ($views as $view) { |
81 | 81 | $count = count($this->$view); |
82 | - $ret .= "<a href='javascript:xoSetLoggerView(\"$view\")'>" . constant('_LOGGER_' . strtoupper($view)) . " ($count)</a>\n"; |
|
82 | + $ret .= "<a href='javascript:xoSetLoggerView(\"$view\")'>".constant('_LOGGER_'.strtoupper($view))." ($count)</a>\n"; |
|
83 | 83 | } |
84 | 84 | $count = count($this->logstart); |
85 | - $ret .= "<a href='javascript:xoSetLoggerView(\"timers\")'>" . _LOGGER_TIMERS . "($count)</a>\n"; |
|
85 | + $ret .= "<a href='javascript:xoSetLoggerView(\"timers\")'>"._LOGGER_TIMERS."($count)</a>\n"; |
|
86 | 86 | $ret .= "</div>\n"; |
87 | 87 | } |
88 | 88 | |
@@ -92,9 +92,9 @@ discard block |
||
92 | 92 | E_USER_WARNING => _LOGGER_E_USER_WARNING, |
93 | 93 | E_USER_ERROR => _LOGGER_E_USER_ERROR, |
94 | 94 | E_NOTICE => _LOGGER_E_NOTICE, |
95 | - E_WARNING => _LOGGER_E_WARNING,/*E_STRICT => _LOGGER_E_STRICT*/); |
|
95 | + E_WARNING => _LOGGER_E_WARNING, /*E_STRICT => _LOGGER_E_STRICT*/); |
|
96 | 96 | $class = 'even'; |
97 | - $ret .= '<table id="xo-logger-errors" class="outer"><tr><th>' . _LOGGER_ERRORS . '</th></tr>'; |
|
97 | + $ret .= '<table id="xo-logger-errors" class="outer"><tr><th>'._LOGGER_ERRORS.'</th></tr>'; |
|
98 | 98 | foreach ($this->errors as $error) { |
99 | 99 | $ret .= "\n<tr><td class='$class'>"; |
100 | 100 | $ret .= isset($types[$error['errno']]) ? $types[$error['errno']] : _LOGGER_UNKNOWN; |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | |
109 | 109 | if (empty($mode) || $mode === 'deprecated') { |
110 | 110 | $class = 'even'; |
111 | - $ret .= '<table id="xo-logger-deprecated" class="outer"><tr><th>' . _LOGGER_DEPRECATED . '</th></tr>'; |
|
111 | + $ret .= '<table id="xo-logger-deprecated" class="outer"><tr><th>'._LOGGER_DEPRECATED.'</th></tr>'; |
|
112 | 112 | foreach ($this->deprecated as $message) { |
113 | 113 | $ret .= "\n<tr><td class='$class'>"; |
114 | 114 | $ret .= $message; |
@@ -120,43 +120,43 @@ discard block |
||
120 | 120 | |
121 | 121 | if (empty($mode) || $mode === 'queries') { |
122 | 122 | $class = 'even'; |
123 | - $ret .= '<table id="xo-logger-queries" class="outer"><tr><th>' . _LOGGER_QUERIES . '</th></tr>'; |
|
123 | + $ret .= '<table id="xo-logger-queries" class="outer"><tr><th>'._LOGGER_QUERIES.'</th></tr>'; |
|
124 | 124 | $xoopsDB = XoopsDatabaseFactory::getDatabaseConnection(); |
125 | - $pattern = '/\b' . preg_quote($xoopsDB->prefix()) . '\_/i'; |
|
125 | + $pattern = '/\b'.preg_quote($xoopsDB->prefix()).'\_/i'; |
|
126 | 126 | |
127 | 127 | foreach ($this->queries as $q) { |
128 | 128 | $sql = preg_replace($pattern, '', $q['sql']); |
129 | 129 | $query_time = isset($q['query_time']) ? sprintf('%0.6f - ', $q['query_time']) : ''; |
130 | 130 | |
131 | 131 | if (isset($q['error'])) { |
132 | - $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>'; |
|
132 | + $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>'; |
|
133 | 133 | } else { |
134 | - $ret .= '<tr class="' . $class . '"><td>' . $query_time . htmlentities($sql) . '</td></tr>'; |
|
134 | + $ret .= '<tr class="'.$class.'"><td>'.$query_time.htmlentities($sql).'</td></tr>'; |
|
135 | 135 | } |
136 | 136 | |
137 | 137 | $class = ($class === 'odd') ? 'even' : 'odd'; |
138 | 138 | } |
139 | - $ret .= '<tr class="foot"><td>' . _LOGGER_TOTAL . ': <span style="color:#ff0000;">' . count($this->queries) . '</span></td></tr></table>'; |
|
139 | + $ret .= '<tr class="foot"><td>'._LOGGER_TOTAL.': <span style="color:#ff0000;">'.count($this->queries).'</span></td></tr></table>'; |
|
140 | 140 | } |
141 | 141 | if (empty($mode) || $mode === 'blocks') { |
142 | 142 | $class = 'even'; |
143 | - $ret .= '<table id="xo-logger-blocks" class="outer"><tr><th colspan="2">' . _LOGGER_BLOCKS . '</th></tr>'; |
|
143 | + $ret .= '<table id="xo-logger-blocks" class="outer"><tr><th colspan="2">'._LOGGER_BLOCKS.'</th></tr>'; |
|
144 | 144 | foreach ($this->blocks as $b) { |
145 | 145 | if ($b['cached']) { |
146 | - $ret .= '<tr><td class="' . $class . '"><strong>' . $b['name'] . ':</strong> ' . sprintf(_LOGGER_CACHED, (int)$b['cachetime']) . '</td></tr>'; |
|
146 | + $ret .= '<tr><td class="'.$class.'"><strong>'.$b['name'].':</strong> '.sprintf(_LOGGER_CACHED, (int)$b['cachetime']).'</td></tr>'; |
|
147 | 147 | } else { |
148 | - $ret .= '<tr><td class="' . $class . '"><strong>' . $b['name'] . ':</strong> ' . _LOGGER_NOT_CACHED . '</td></tr>'; |
|
148 | + $ret .= '<tr><td class="'.$class.'"><strong>'.$b['name'].':</strong> '._LOGGER_NOT_CACHED.'</td></tr>'; |
|
149 | 149 | } |
150 | 150 | $class = ($class === 'odd') ? 'even' : 'odd'; |
151 | 151 | } |
152 | - $ret .= '<tr class="foot"><td>' . _LOGGER_TOTAL . ': <span style="color:#ff0000;">' . count($this->blocks) . '</span></td></tr></table>'; |
|
152 | + $ret .= '<tr class="foot"><td>'._LOGGER_TOTAL.': <span style="color:#ff0000;">'.count($this->blocks).'</span></td></tr></table>'; |
|
153 | 153 | } |
154 | 154 | if (empty($mode) || $mode === 'extra') { |
155 | 155 | $class = 'even'; |
156 | - $ret .= '<table id="xo-logger-extra" class="outer"><tr><th colspan="2">' . _LOGGER_EXTRA . '</th></tr>'; |
|
156 | + $ret .= '<table id="xo-logger-extra" class="outer"><tr><th colspan="2">'._LOGGER_EXTRA.'</th></tr>'; |
|
157 | 157 | foreach ($this->extra as $ex) { |
158 | - $ret .= '<tr><td class="' . $class . '"><strong>'; |
|
159 | - $ret .= htmlspecialchars($ex['name']) . ':</strong> ' . htmlspecialchars($ex['msg']); |
|
158 | + $ret .= '<tr><td class="'.$class.'"><strong>'; |
|
159 | + $ret .= htmlspecialchars($ex['name']).':</strong> '.htmlspecialchars($ex['msg']); |
|
160 | 160 | $ret .= '</td></tr>'; |
161 | 161 | $class = ($class === 'odd') ? 'even' : 'odd'; |
162 | 162 | } |
@@ -164,10 +164,10 @@ discard block |
||
164 | 164 | } |
165 | 165 | if (empty($mode) || $mode === 'timers') { |
166 | 166 | $class = 'even'; |
167 | - $ret .= '<table id="xo-logger-timers" class="outer"><tr><th colspan="2">' . _LOGGER_TIMERS . '</th></tr>'; |
|
167 | + $ret .= '<table id="xo-logger-timers" class="outer"><tr><th colspan="2">'._LOGGER_TIMERS.'</th></tr>'; |
|
168 | 168 | foreach ($this->logstart as $k => $v) { |
169 | - $ret .= '<tr><td class="' . $class . '"><strong>'; |
|
170 | - $ret .= sprintf(_LOGGER_TIMETOLOAD, htmlspecialchars($k) . '</strong>', '<span style="color:#ff0000;">' . sprintf('%.03f', $this->dumpTime($k)) . '</span>'); |
|
169 | + $ret .= '<tr><td class="'.$class.'"><strong>'; |
|
170 | + $ret .= sprintf(_LOGGER_TIMETOLOAD, htmlspecialchars($k).'</strong>', '<span style="color:#ff0000;">'.sprintf('%.03f', $this->dumpTime($k)).'</span>'); |
|
171 | 171 | $ret .= '</td></tr>'; |
172 | 172 | $class = ($class === 'odd') ? 'even' : 'odd'; |
173 | 173 | } |
@@ -96,14 +96,14 @@ |
||
96 | 96 | if (!in_array($e_code, $errorno)) { |
97 | 97 | $e_code = '9999'; |
98 | 98 | } |
99 | - include_once XOOPS_ROOT_PATH . '/header.php'; |
|
100 | - echo '<div><strong>' . $xoopsConfig['sitename'] . ' Error</strong><br><br>'; |
|
99 | + include_once XOOPS_ROOT_PATH.'/header.php'; |
|
100 | + echo '<div><strong>'.$xoopsConfig['sitename'].' Error</strong><br><br>'; |
|
101 | 101 | |
102 | 102 | echo "Error Code: $e_code<br><br><br>"; |
103 | 103 | echo "<strong>ERROR:</strong> $errmsg[$e_code]<br><br><br>"; |
104 | - echo '[ <a href=\'javascript:history.go(-' . $pages . ')\'>Go Back</a> ]</div>'; |
|
104 | + echo '[ <a href=\'javascript:history.go(-'.$pages.')\'>Go Back</a> ]</div>'; |
|
105 | 105 | |
106 | - include_once XOOPS_ROOT_PATH . '/footer.php'; |
|
106 | + include_once XOOPS_ROOT_PATH.'/footer.php'; |
|
107 | 107 | exit(); |
108 | 108 | } |
109 | 109 | } |
@@ -168,18 +168,18 @@ discard block |
||
168 | 168 | public function getTemplatePath() |
169 | 169 | { |
170 | 170 | if (!$path = $this->templatedir) { |
171 | - $path = XOOPS_ROOT_PATH . '/language/'; |
|
171 | + $path = XOOPS_ROOT_PATH.'/language/'; |
|
172 | 172 | } elseif (false === strpos($path, '/')) { |
173 | - $path = XOOPS_ROOT_PATH . '/modules/' . $path . '/language/'; |
|
173 | + $path = XOOPS_ROOT_PATH.'/modules/'.$path.'/language/'; |
|
174 | 174 | } elseif (substr($path, -1, 1) !== '/') { |
175 | 175 | $path .= '/'; |
176 | 176 | } |
177 | - if (file_exists($path . $GLOBALS['xoopsConfig']['language'] . '/mail_template/' . $this->template)) { |
|
178 | - return $path . $GLOBALS['xoopsConfig']['language'] . '/mail_template/' . $this->template; |
|
179 | - } elseif (file_exists($path . 'english/mail_template/' . $this->template)) { |
|
180 | - return $path . 'english/mail_template/' . $this->template; |
|
181 | - } elseif (file_exists($path . $this->template)) { |
|
182 | - return $path . $this->template; |
|
177 | + if (file_exists($path.$GLOBALS['xoopsConfig']['language'].'/mail_template/'.$this->template)) { |
|
178 | + return $path.$GLOBALS['xoopsConfig']['language'].'/mail_template/'.$this->template; |
|
179 | + } elseif (file_exists($path.'english/mail_template/'.$this->template)) { |
|
180 | + return $path.'english/mail_template/'.$this->template; |
|
181 | + } elseif (file_exists($path.$this->template)) { |
|
182 | + return $path.$this->template; |
|
183 | 183 | } else { |
184 | 184 | return false; |
185 | 185 | } |
@@ -292,7 +292,7 @@ discard block |
||
292 | 292 | // for sending mail only |
293 | 293 | if ($this->isMail || !empty($this->toEmails)) { |
294 | 294 | if (!empty($this->priority)) { |
295 | - $this->headers[] = 'X-Priority: ' . $this->priority; |
|
295 | + $this->headers[] = 'X-Priority: '.$this->priority; |
|
296 | 296 | } |
297 | 297 | // $this->headers[] = "X-Mailer: PHP/".phpversion(); |
298 | 298 | // $this->headers[] = "Return-Path: ".$this->fromEmail; |
@@ -307,14 +307,14 @@ discard block |
||
307 | 307 | |
308 | 308 | $this->assign('X_ADMINMAIL', $xoopsConfig['adminmail']); |
309 | 309 | $this->assign('X_SITENAME', $xoopsConfig['sitename']); |
310 | - $this->assign('X_SITEURL', XOOPS_URL . '/'); |
|
310 | + $this->assign('X_SITEURL', XOOPS_URL.'/'); |
|
311 | 311 | // TODO: also X_ADMINNAME?? |
312 | 312 | // TODO: X_SIGNATURE, X_DISCLAIMER ?? - these are probably best |
313 | 313 | // done as includes if mail templates ever get this sophisticated |
314 | 314 | // replace tags with actual values |
315 | 315 | foreach ($this->assignedTags as $k => $v) { |
316 | - $this->body = str_replace('{' . $k . '}', $v, $this->body); |
|
317 | - $this->subject = str_replace('{' . $k . '}', $v, $this->subject); |
|
316 | + $this->body = str_replace('{'.$k.'}', $v, $this->body); |
|
317 | + $this->subject = str_replace('{'.$k.'}', $v, $this->subject); |
|
318 | 318 | } |
319 | 319 | $this->body = str_replace("\r\n", "\n", $this->body); |
320 | 320 | $this->body = str_replace("\r", "\n", $this->body); |
@@ -341,7 +341,7 @@ discard block |
||
341 | 341 | $text = str_replace('{X_UID}', $user->getVar('uid'), $this->body); |
342 | 342 | $text = str_replace('{X_UEMAIL}', $user->getVar('email'), $text); |
343 | 343 | $text = str_replace('{X_UNAME}', $user->getVar('uname'), $text); |
344 | - $text = str_replace('{X_UACTLINK}', XOOPS_URL . '/register.php?op=actv&id=' . $user->getVar('uid') . '&actkey=' . $user->getVar('actkey'), $text); |
|
344 | + $text = str_replace('{X_UACTLINK}', XOOPS_URL.'/register.php?op=actv&id='.$user->getVar('uid').'&actkey='.$user->getVar('actkey'), $text); |
|
345 | 345 | // send mail |
346 | 346 | if ($this->isMail) { |
347 | 347 | if (!$this->sendMail($user->getVar('email'), $subject, $text, $headers)) { |
@@ -450,9 +450,9 @@ discard block |
||
450 | 450 | return $this->errors; |
451 | 451 | } else { |
452 | 452 | if (!empty($this->errors)) { |
453 | - $ret = '<h4>' . _ERRORS . '</h4>'; |
|
453 | + $ret = '<h4>'._ERRORS.'</h4>'; |
|
454 | 454 | foreach ($this->errors as $error) { |
455 | - $ret .= $error . '<br>'; |
|
455 | + $ret .= $error.'<br>'; |
|
456 | 456 | } |
457 | 457 | } else { |
458 | 458 | $ret = ''; |
@@ -476,7 +476,7 @@ discard block |
||
476 | 476 | $ret = ''; |
477 | 477 | if (!empty($this->success)) { |
478 | 478 | foreach ($this->success as $suc) { |
479 | - $ret .= $suc . '<br>'; |
|
479 | + $ret .= $suc.'<br>'; |
|
480 | 480 | } |
481 | 481 | } |
482 | 482 | |
@@ -513,7 +513,7 @@ discard block |
||
513 | 513 | */ |
514 | 514 | public function addHeaders($value) |
515 | 515 | { |
516 | - $this->headers[] = trim($value) . $this->LE; |
|
516 | + $this->headers[] = trim($value).$this->LE; |
|
517 | 517 | } |
518 | 518 | |
519 | 519 | // public |
@@ -19,6 +19,6 @@ |
||
19 | 19 | defined('XOOPS_ROOT_PATH') || exit('Restricted access'); |
20 | 20 | |
21 | 21 | return $config = array( |
22 | - 'link' => XOOPS_URL . '/modules/mediawiki/?title=%s',// The link to wiki module |
|
23 | - 'charset' => 'UTF-8');// Charset of wiki module |
|
22 | + 'link' => XOOPS_URL.'/modules/mediawiki/?title=%s', // The link to wiki module |
|
23 | + 'charset' => 'UTF-8'); // Charset of wiki module |
|
24 | 24 |
@@ -33,10 +33,10 @@ discard block |
||
33 | 33 | */ |
34 | 34 | public function encode($textarea_id) |
35 | 35 | { |
36 | - $config = parent::loadConfig(__DIR__); |
|
36 | + $config = parent::loadConfig(__DIR__); |
|
37 | 37 | $code = "<button type='button' class='btn btn-default btn-sm' onclick='xoopsCodeWiki(\"{$textarea_id}\",\"" |
38 | 38 | . htmlspecialchars(_XOOPS_FORM_ENTERWIKITERM, ENT_QUOTES) |
39 | - . "\");' onmouseover='style.cursor=\"hand\"' title='" . _XOOPS_FORM_ALTWIKI |
|
39 | + . "\");' onmouseover='style.cursor=\"hand\"' title='"._XOOPS_FORM_ALTWIKI |
|
40 | 40 | . "'><span class='fa fa-fw fa-globe' aria-hidden='true'></span></button>"; |
41 | 41 | |
42 | 42 | $javascript = <<<EOH |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | */ |
73 | 73 | public static function myCallback($match) |
74 | 74 | { |
75 | - return self::decode($match[1],0 ,0); |
|
75 | + return self::decode($match[1], 0, 0); |
|
76 | 76 | } |
77 | 77 | |
78 | 78 | /** |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | // $ts->replacements[] = __CLASS__ . "::decode( '\\1' )"; |
85 | 85 | //mb------------------------------ |
86 | 86 | $ts->callbackPatterns[] = "/\[\[([^\]]*)\]\]/sU"; |
87 | - $ts->callbacks[] = __CLASS__ . '::myCallback'; |
|
87 | + $ts->callbacks[] = __CLASS__.'::myCallback'; |
|
88 | 88 | //mb------------------------------ |
89 | 89 | } |
90 | 90 | |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | } |
102 | 102 | $charset = !empty($config['charset']) ? $config['charset'] : 'UTF-8'; |
103 | 103 | xoops_load('XoopsLocal'); |
104 | - $ret = "<a href='" . sprintf($config['link'], urlencode(XoopsLocal::convert_encoding($text, $charset))) . "' rel='external' title=''>{$text}</a>"; |
|
104 | + $ret = "<a href='".sprintf($config['link'], urlencode(XoopsLocal::convert_encoding($text, $charset)))."' rel='external' title=''>{$text}</a>"; |
|
105 | 105 | |
106 | 106 | return $ret; |
107 | 107 | } |
@@ -16,7 +16,7 @@ discard block |
||
16 | 16 | |
17 | 17 | $code = "<button type='button' class='btn btn-default btn-sm' onclick='xoopsCodeSoundCloud(\"{$textarea_id}\",\"" |
18 | 18 | . htmlspecialchars(_XOOPS_FORM_ENTER_SOUNDCLOUD_URL, ENT_QUOTES) |
19 | - . "\");' onmouseover='style.cursor=\"hand\"' title='" . _XOOPS_FORM_ALT_SOUNDCLOUD |
|
19 | + . "\");' onmouseover='style.cursor=\"hand\"' title='"._XOOPS_FORM_ALT_SOUNDCLOUD |
|
20 | 20 | . "'><span class='fa fa-fw fa-soundcloud' aria-hidden='true'></span></button>"; |
21 | 21 | $javascript = <<<EOH |
22 | 22 | function xoopsCodeSoundCloud(id, enterSoundCloud) |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | public function load($ts) |
46 | 46 | { |
47 | 47 | $ts->callbackPatterns[] = "/\[soundcloud\](http[s]?:\/\/[^\"'<>]*)(.*)\[\/soundcloud\]/sU"; |
48 | - $ts->callbacks[] = __CLASS__ . '::myCallback'; |
|
48 | + $ts->callbacks[] = __CLASS__.'::myCallback'; |
|
49 | 49 | } |
50 | 50 | |
51 | 51 | /** |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | */ |
56 | 56 | public static function myCallback($match) |
57 | 57 | { |
58 | - $url = $match[1] . $match[2]; |
|
58 | + $url = $match[1].$match[2]; |
|
59 | 59 | $config = parent::loadConfig(__DIR__); |
60 | 60 | if (!preg_match("/^http[s]?:\/\/(www\.)?soundcloud\.com\/(.*)/i", $url, $matches)) { |
61 | 61 | trigger_error("Not matched: {$url}", E_USER_WARNING); |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | return ''; |
64 | 64 | } |
65 | 65 | |
66 | - $code = '<object height="81" width="100%"><param name="movie" ' . 'value="http://player.soundcloud.com/player.swf?url=' . $url . '&g=bb">' . '</param><param name="allowscriptaccess" value="always"></param>' . '<embed allowscriptaccess="always" height="81" ' . 'src="http://player.soundcloud.com/player.swf?url=' . $url . '&g=bb" type="application/x-shockwave-flash" width="100%"></embed></object>' . '<a href="' . $url . '">' . $url . '</a>'; |
|
66 | + $code = '<object height="81" width="100%"><param name="movie" '.'value="http://player.soundcloud.com/player.swf?url='.$url.'&g=bb">'.'</param><param name="allowscriptaccess" value="always"></param>'.'<embed allowscriptaccess="always" height="81" '.'src="http://player.soundcloud.com/player.swf?url='.$url.'&g=bb" type="application/x-shockwave-flash" width="100%"></embed></object>'.'<a href="'.$url.'">'.$url.'</a>'; |
|
67 | 67 | |
68 | 68 | return $code; |
69 | 69 | } |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | { |
33 | 33 | $code = "<button type='button' class='btn btn-default' onclick='xoopsCodeMp3(\"{$textarea_id}\",\"" |
34 | 34 | . htmlspecialchars(_XOOPS_FORM_ENTERMP3URL, ENT_QUOTES) |
35 | - . "\");' onmouseover='style.cursor=\"hand\"' title='" . _XOOPS_FORM_ALTMP3 |
|
35 | + . "\");' onmouseover='style.cursor=\"hand\"' title='"._XOOPS_FORM_ALTMP3 |
|
36 | 36 | . "'><span class='fa fa-fw fa-music' aria-hidden='true'></span></button>"; |
37 | 37 | |
38 | 38 | $javascript = <<<EOF |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | // $ts->replacements[] = __CLASS__ . "::decode( '\\1' )"; |
80 | 80 | //mb------------------------------ |
81 | 81 | $ts->callbackPatterns[] = "/\[mp3\](.*?)\[\/mp3\]/s"; |
82 | - $ts->callbacks[] = __CLASS__ . '::myCallback'; |
|
82 | + $ts->callbacks[] = __CLASS__.'::myCallback'; |
|
83 | 83 | |
84 | 84 | //mb------------------------------ |
85 | 85 | return true; |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | */ |
93 | 93 | public static function decode($url, $width, $height) |
94 | 94 | { |
95 | - $rp = "<embed flashvars=\"playerID=1&bg=0xf8f8f8&leftbg=0x3786b3&lefticon=0x78bee3&rightbg=0x3786b3&rightbghover=0x78bee3&righticon=0x78bee3&righticonhover=0x3786b3&text=0x666666&slider=0x3786b3&track=0xcccccc&border=0x666666&loader=0x78bee3&loop=no&soundFile={$url}\" quality='high' menu='false' wmode='transparent' pluginspage='http://www.macromedia.com/go/getflashplayer' src='" . XOOPS_URL . "/images/form/player.swf' width=290 height=24 type='application/x-shockwave-flash'></embed>"; |
|
95 | + $rp = "<embed flashvars=\"playerID=1&bg=0xf8f8f8&leftbg=0x3786b3&lefticon=0x78bee3&rightbg=0x3786b3&rightbghover=0x78bee3&righticon=0x78bee3&righticonhover=0x3786b3&text=0x666666&slider=0x3786b3&track=0xcccccc&border=0x666666&loader=0x78bee3&loop=no&soundFile={$url}\" quality='high' menu='false' wmode='transparent' pluginspage='http://www.macromedia.com/go/getflashplayer' src='".XOOPS_URL."/images/form/player.swf' width=290 height=24 type='application/x-shockwave-flash'></embed>"; |
|
96 | 96 | |
97 | 97 | return $rp; |
98 | 98 | } |
@@ -28,10 +28,10 @@ discard block |
||
28 | 28 | { |
29 | 29 | $config = parent::loadConfig(__DIR__); |
30 | 30 | $code = "<button type='button' class='btn btn-default btn-sm' onclick='xoopsCodeYoutube(\"{$textarea_id}\",\"" |
31 | - . htmlspecialchars(_XOOPS_FORM_ENTERYOUTUBEURL, ENT_QUOTES) . "\",\"" |
|
32 | - . htmlspecialchars(_XOOPS_FORM_ALT_ENTERHEIGHT, ENT_QUOTES) . "\",\"" |
|
31 | + . htmlspecialchars(_XOOPS_FORM_ENTERYOUTUBEURL, ENT_QUOTES)."\",\"" |
|
32 | + . htmlspecialchars(_XOOPS_FORM_ALT_ENTERHEIGHT, ENT_QUOTES)."\",\"" |
|
33 | 33 | . htmlspecialchars(_XOOPS_FORM_ALT_ENTERWIDTH, ENT_QUOTES) |
34 | - . "\");' onmouseover='style.cursor=\"hand\"' title='" . _XOOPS_FORM_ALTYOUTUBE |
|
34 | + . "\");' onmouseover='style.cursor=\"hand\"' title='"._XOOPS_FORM_ALTYOUTUBE |
|
35 | 35 | . "'><span class='fa fa-fw fa-youtube' aria-hidden='true'></span></button>"; |
36 | 36 | $javascript = <<<EOH |
37 | 37 | function xoopsCodeYoutube(id, enterFlashPhrase, enterFlashHeightPhrase, enterFlashWidthPhrase) |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | |
77 | 77 | //mb------------------------------ |
78 | 78 | $ts->callbackPatterns[] = "/\[youtube=(['\"]?)([^\"']*),([^\"']*)\\1]([^\"]*)\[\/youtube\]/sU"; |
79 | - $ts->callbacks[] = __CLASS__ . '::myCallback'; |
|
79 | + $ts->callbacks[] = __CLASS__.'::myCallback'; |
|
80 | 80 | //mb------------------------------ |
81 | 81 | } |
82 | 82 | |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | return ''; |
107 | 107 | } |
108 | 108 | |
109 | - $width = empty($width) ? 426 : (int) $width; |
|
109 | + $width = empty($width) ? 426 : (int)$width; |
|
110 | 110 | switch ($width) { |
111 | 111 | case 4: |
112 | 112 | $height = 3; |
@@ -115,14 +115,14 @@ discard block |
||
115 | 115 | $height = 9; |
116 | 116 | break; |
117 | 117 | default: |
118 | - $height = empty($height) ? 240 : (int) $height; |
|
118 | + $height = empty($height) ? 240 : (int)$height; |
|
119 | 119 | break; |
120 | 120 | } |
121 | 121 | |
122 | - $aspectRatio = $width/$height; // 16x9 = 1.777777778, 4x3 = 1.333333333 |
|
122 | + $aspectRatio = $width / $height; // 16x9 = 1.777777778, 4x3 = 1.333333333 |
|
123 | 123 | $responsiveAspect = ($aspectRatio < 1.4) ? 'embed-responsive-4by3' : 'embed-responsive-16by9'; |
124 | 124 | if ($width < 17 && $height < 10) { |
125 | - $scale = (int) 450 / $width; |
|
125 | + $scale = (int)450 / $width; |
|
126 | 126 | $width = $width * $scale; |
127 | 127 | $height = $height * $scale; |
128 | 128 | } |
@@ -20,5 +20,5 @@ |
||
20 | 20 | |
21 | 21 | return $config = array( |
22 | 22 | 'detect_dimension' => 1, |
23 | - 'enable_flash_entry' => false, // false to disable entry button in editor, existing content will still play |
|
23 | + 'enable_flash_entry' => false, // false to disable entry button in editor, existing content will still play |
|
24 | 24 | ); |