@@ -24,15 +24,15 @@ discard block |
||
| 24 | 24 | */ |
| 25 | 25 | function openTable($width = '100%') |
| 26 | 26 | { |
| 27 | - $GLOBALS['xoopsLogger']->addDeprecated("Function '" . __FUNCTION__ . "' in '" . __FILE__ . "' is deprecated, should not be used any more"); |
|
| 28 | - echo '<table width="' . $width . '" cellspacing="0" class="outer"><tr><td class="even">'; |
|
| 27 | + $GLOBALS['xoopsLogger']->addDeprecated("Function '".__FUNCTION__."' in '".__FILE__."' is deprecated, should not be used any more"); |
|
| 28 | + echo '<table width="'.$width.'" cellspacing="0" class="outer"><tr><td class="even">'; |
|
| 29 | 29 | } |
| 30 | 30 | } |
| 31 | 31 | |
| 32 | 32 | if (!function_exists('closetable')) { |
| 33 | 33 | function closeTable() |
| 34 | 34 | { |
| 35 | - $GLOBALS['xoopsLogger']->addDeprecated("Function '" . __FUNCTION__ . "' in '" . __FILE__ . "' is deprecated, should not be used any more"); |
|
| 35 | + $GLOBALS['xoopsLogger']->addDeprecated("Function '".__FUNCTION__."' in '".__FILE__."' is deprecated, should not be used any more"); |
|
| 36 | 36 | echo '</td></tr></table>'; |
| 37 | 37 | } |
| 38 | 38 | } |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | */ |
| 45 | 45 | function themecenterposts($title, $content) |
| 46 | 46 | { |
| 47 | - $GLOBALS['xoopsLogger']->addDeprecated("Function '" . __FUNCTION__ . "' in '" . __FILE__ . "' is deprecated, should not be used any more"); |
|
| 48 | - echo '<table cellpadding="4" cellspacing="1" width="98%" class="outer"><tr><td class="head">' . $title . '</td></tr><tr><td><br>' . $content . '<br></td></tr></table>'; |
|
| 47 | + $GLOBALS['xoopsLogger']->addDeprecated("Function '".__FUNCTION__."' in '".__FILE__."' is deprecated, should not be used any more"); |
|
| 48 | + echo '<table cellpadding="4" cellspacing="1" width="98%" class="outer"><tr><td class="head">'.$title.'</td></tr><tr><td><br>'.$content.'<br></td></tr></table>'; |
|
| 49 | 49 | } |
| 50 | 50 | } |
@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | $module = $module_handler->get($comment->getVar('com_modid')); |
| 35 | 35 | $comment_config = $module->getInfo('comments'); |
| 36 | 36 | $com_modid = $module->getVar('mid'); |
| 37 | - $redirect_page = XOOPS_URL . '/modules/system/admin.php?fct=comments&com_modid=' . $com_modid . '&com_itemid'; |
|
| 37 | + $redirect_page = XOOPS_URL.'/modules/system/admin.php?fct=comments&com_modid='.$com_modid.'&com_itemid'; |
|
| 38 | 38 | $moddir = $module->getVar('dirname'); |
| 39 | 39 | unset($comment); |
| 40 | 40 | } else { |
@@ -44,11 +44,11 @@ discard block |
||
| 44 | 44 | } |
| 45 | 45 | $comment_config = $xoopsModule->getInfo('comments'); |
| 46 | 46 | $com_modid = $xoopsModule->getVar('mid'); |
| 47 | - $redirect_page = $comment_config['pageName'] . '?'; |
|
| 47 | + $redirect_page = $comment_config['pageName'].'?'; |
|
| 48 | 48 | if (isset($comment_config['extraParams']) && is_array($comment_config['extraParams'])) { |
| 49 | 49 | $extra_params = ''; |
| 50 | 50 | foreach ($comment_config['extraParams'] as $extra_param) { |
| 51 | - $extra_params .= isset($_POST[$extra_param]) ? $extra_param . '=' . htmlspecialchars($_POST[$extra_param]) . '&' : $extra_param . '=&'; |
|
| 51 | + $extra_params .= isset($_POST[$extra_param]) ? $extra_param.'='.htmlspecialchars($_POST[$extra_param]).'&' : $extra_param.'=&'; |
|
| 52 | 52 | } |
| 53 | 53 | $redirect_page .= $extra_params; |
| 54 | 54 | } |
@@ -81,7 +81,7 @@ discard block |
||
| 81 | 81 | xoops_load('XoopsCaptcha'); |
| 82 | 82 | $xoopsCaptcha = XoopsCaptcha::getInstance(); |
| 83 | 83 | if (!$xoopsCaptcha->verify()) { |
| 84 | - $error_message .= $xoopsCaptcha->getMessage() . '<br>'; |
|
| 84 | + $error_message .= $xoopsCaptcha->getMessage().'<br>'; |
|
| 85 | 85 | } |
| 86 | 86 | |
| 87 | 87 | // Start add by voltan |
@@ -90,7 +90,7 @@ discard block |
||
| 90 | 90 | $myts = MyTextSanitizer::getInstance(); |
| 91 | 91 | |
| 92 | 92 | // Check user name |
| 93 | - $search_arr = array( |
|
| 93 | + $search_arr = array( |
|
| 94 | 94 | ' ', |
| 95 | 95 | "\t", |
| 96 | 96 | "\r\n", |
@@ -184,16 +184,16 @@ discard block |
||
| 184 | 184 | $com_email = filter_var($com_email, FILTER_VALIDATE_EMAIL); |
| 185 | 185 | // Invalid email address |
| 186 | 186 | if (!checkEmail($com_email)) { |
| 187 | - $error_message .= _US_INVALIDMAIL . '<br>'; |
|
| 187 | + $error_message .= _US_INVALIDMAIL.'<br>'; |
|
| 188 | 188 | } |
| 189 | 189 | if (strrpos($com_email, ' ') > 0) { |
| 190 | - $error_message .= _US_EMAILNOSPACES . '<br>'; |
|
| 190 | + $error_message .= _US_EMAILNOSPACES.'<br>'; |
|
| 191 | 191 | } |
| 192 | 192 | // Check forbidden email address if current operator is not an administrator |
| 193 | 193 | if (!$xoopsUser_isAdmin) { |
| 194 | 194 | foreach ($xoopsConfigUser['bad_emails'] as $be) { |
| 195 | - if (!empty($be) && preg_match('/' . $be . '/i', $com_email)) { |
|
| 196 | - $error_message .= _US_INVALIDMAIL . '<br>'; |
|
| 195 | + if (!empty($be) && preg_match('/'.$be.'/i', $com_email)) { |
|
| 196 | + $error_message .= _US_INVALIDMAIL.'<br>'; |
|
| 197 | 197 | break; |
| 198 | 198 | } |
| 199 | 199 | } |
@@ -243,7 +243,7 @@ discard block |
||
| 243 | 243 | $dohtml = 0; |
| 244 | 244 | } |
| 245 | 245 | } |
| 246 | - $p_comment =& $myts->previewTarea($_POST['com_text'], $dohtml, $dosmiley, $doxcode, $doimage, $dobr); |
|
| 246 | + $p_comment = & $myts->previewTarea($_POST['com_text'], $dohtml, $dosmiley, $doxcode, $doimage, $dobr); |
|
| 247 | 247 | $noname = isset($noname) ? (int)$noname : 0; |
| 248 | 248 | $com_text = $myts->htmlSpecialChars($myts->stripSlashesGPC($_POST['com_text'])); |
| 249 | 249 | if ($xoopsModule->getVar('dirname') !== 'system') { |
@@ -252,16 +252,16 @@ discard block |
||
| 252 | 252 | xoops_error($error_message); |
| 253 | 253 | } |
| 254 | 254 | echo '<table cellpadding="4" cellspacing="1" width="98%" class="outer"> |
| 255 | - <tr><td class="head">' . $com_title . '</td></tr> |
|
| 256 | - <tr><td><br>' . $p_comment . '<br></td></tr> |
|
| 255 | + <tr><td class="head">' . $com_title.'</td></tr> |
|
| 256 | + <tr><td><br>' . $p_comment.'<br></td></tr> |
|
| 257 | 257 | </table>'; |
| 258 | 258 | include_once $GLOBALS['xoops']->path('include/comment_form.php'); |
| 259 | 259 | include_once $GLOBALS['xoops']->path('footer.php'); |
| 260 | 260 | } else { |
| 261 | 261 | xoops_cp_header(); |
| 262 | 262 | echo '<table cellpadding="4" cellspacing="1" width="98%" class="outer"> |
| 263 | - <tr><td class="head">' . $com_title . '</td></tr> |
|
| 264 | - <tr><td><br>' . $p_comment . '<br></td></tr> |
|
| 263 | + <tr><td class="head">' . $com_title.'</td></tr> |
|
| 264 | + <tr><td><br>' . $p_comment.'<br></td></tr> |
|
| 265 | 265 | </table>'; |
| 266 | 266 | include_once $GLOBALS['xoops']->path('include/comment_form.php'); |
| 267 | 267 | xoops_cp_footer(); |
@@ -320,7 +320,7 @@ discard block |
||
| 320 | 320 | $accesserror = true; |
| 321 | 321 | } |
| 322 | 322 | if (false !== $accesserror) { |
| 323 | - redirect_header($redirect_page . '=' . $com_itemid . '&com_id=' . $com_id . '&com_mode=' . $com_mode . '&com_order=' . $com_order, 1, _NOPERM); |
|
| 323 | + redirect_header($redirect_page.'='.$com_itemid.'&com_id='.$com_id.'&com_mode='.$com_mode.'&com_order='.$com_order, 1, _NOPERM); |
|
| 324 | 324 | } |
| 325 | 325 | } else { |
| 326 | 326 | $comment = $comment_handler->create(); |
@@ -368,7 +368,7 @@ discard block |
||
| 368 | 368 | $dohtml = 0; |
| 369 | 369 | $uid = 0; |
| 370 | 370 | if ($xoopsModuleConfig['com_anonpost'] != 1) { |
| 371 | - redirect_header($redirect_page . '=' . $com_itemid . '&com_id=' . $com_id . '&com_mode=' . $com_mode . '&com_order=' . $com_order, 1, _NOPERM); |
|
| 371 | + redirect_header($redirect_page.'='.$com_itemid.'&com_id='.$com_id.'&com_mode='.$com_mode.'&com_order='.$com_order, 1, _NOPERM); |
|
| 372 | 372 | } |
| 373 | 373 | } |
| 374 | 374 | if ($uid == 0) { |
@@ -428,8 +428,8 @@ discard block |
||
| 428 | 428 | if (!function_exists($comment_config['callback']['approve'])) { |
| 429 | 429 | if (isset($comment_config['callbackFile'])) { |
| 430 | 430 | $callbackfile = trim($comment_config['callbackFile']); |
| 431 | - if ($callbackfile != '' && file_exists($GLOBALS['xoops']->path('modules/' . $moddir . '/' . $callbackfile))) { |
|
| 432 | - include_once $GLOBALS['xoops']->path('modules/' . $moddir . '/' . $callbackfile); |
|
| 431 | + if ($callbackfile != '' && file_exists($GLOBALS['xoops']->path('modules/'.$moddir.'/'.$callbackfile))) { |
|
| 432 | + include_once $GLOBALS['xoops']->path('modules/'.$moddir.'/'.$callbackfile); |
|
| 433 | 433 | } |
| 434 | 434 | if (!function_exists($comment_config['callback']['approve'])) { |
| 435 | 435 | $skip = true; |
@@ -449,8 +449,8 @@ discard block |
||
| 449 | 449 | if (!function_exists($comment_config['callback']['update'])) { |
| 450 | 450 | if (isset($comment_config['callbackFile'])) { |
| 451 | 451 | $callbackfile = trim($comment_config['callbackFile']); |
| 452 | - if ($callbackfile != '' && file_exists($GLOBALS['xoops']->path('modules/' . $moddir . '/' . $callbackfile))) { |
|
| 453 | - include_once $GLOBALS['xoops']->path('modules/' . $moddir . '/' . $callbackfile); |
|
| 452 | + if ($callbackfile != '' && file_exists($GLOBALS['xoops']->path('modules/'.$moddir.'/'.$callbackfile))) { |
|
| 453 | + include_once $GLOBALS['xoops']->path('modules/'.$moddir.'/'.$callbackfile); |
|
| 454 | 454 | } |
| 455 | 455 | if (!function_exists($comment_config['callback']['update'])) { |
| 456 | 456 | $skip = true; |
@@ -488,7 +488,7 @@ discard block |
||
| 488 | 488 | if ($notify_event) { |
| 489 | 489 | $not_modid = $com_modid; |
| 490 | 490 | include_once $GLOBALS['xoops']->path('include/notification_functions.php'); |
| 491 | - $not_catinfo =& notificationCommentCategoryInfo($not_modid); |
|
| 491 | + $not_catinfo = & notificationCommentCategoryInfo($not_modid); |
|
| 492 | 492 | $not_category = $not_catinfo['name']; |
| 493 | 493 | $not_itemid = $com_itemid; |
| 494 | 494 | $not_event = $notify_event; |
@@ -501,21 +501,21 @@ discard block |
||
| 501 | 501 | $module_handler = xoops_getHandler('module'); |
| 502 | 502 | $not_module = $module_handler->get($not_modid); |
| 503 | 503 | } else { |
| 504 | - $not_module =& $xoopsModule; |
|
| 504 | + $not_module = & $xoopsModule; |
|
| 505 | 505 | } |
| 506 | 506 | if (!isset($comment_url)) { |
| 507 | - $com_config =& $not_module->getInfo('comments'); |
|
| 508 | - $comment_url = $com_config['pageName'] . '?'; |
|
| 507 | + $com_config = & $not_module->getInfo('comments'); |
|
| 508 | + $comment_url = $com_config['pageName'].'?'; |
|
| 509 | 509 | if (isset($com_config['extraParams']) && is_array($com_config['extraParams'])) { |
| 510 | 510 | $extra_params = ''; |
| 511 | 511 | foreach ($com_config['extraParams'] as $extra_param) { |
| 512 | - $extra_params .= isset($_POST[$extra_param]) ? $extra_param . '=' . htmlspecialchars($_POST[$extra_param]) . '&' : $extra_param . '=&'; |
|
| 512 | + $extra_params .= isset($_POST[$extra_param]) ? $extra_param.'='.htmlspecialchars($_POST[$extra_param]).'&' : $extra_param.'=&'; |
|
| 513 | 513 | } |
| 514 | 514 | $comment_url .= $extra_params; |
| 515 | 515 | } |
| 516 | 516 | $comment_url .= $com_config['itemName']; |
| 517 | 517 | } |
| 518 | - $comment_tags['X_COMMENT_URL'] = XOOPS_URL . '/modules/' . $not_module->getVar('dirname') . '/' . $comment_url . '=' . $com_itemid . '&com_id=' . $newcid . '&com_rootid=' . $com_rootid . '&com_mode=' . $com_mode . '&com_order=' . $com_order . '#comment' . $newcid; |
|
| 518 | + $comment_tags['X_COMMENT_URL'] = XOOPS_URL.'/modules/'.$not_module->getVar('dirname').'/'.$comment_url.'='.$com_itemid.'&com_id='.$newcid.'&com_rootid='.$com_rootid.'&com_mode='.$com_mode.'&com_order='.$com_order.'#comment'.$newcid; |
|
| 519 | 519 | /* @var $notification_handler XoopsNotificationHandler */ |
| 520 | 520 | $notification_handler = xoops_getHandler('notification'); |
| 521 | 521 | $notification_handler->triggerEvent($not_category, $not_itemid, $not_event, $comment_tags, false, $not_modid); |
@@ -523,10 +523,10 @@ discard block |
||
| 523 | 523 | if (!isset($comment_post_results)) { |
| 524 | 524 | // if the comment is active, redirect to posted comment |
| 525 | 525 | if ($comment->getVar('com_status') == XOOPS_COMMENT_ACTIVE) { |
| 526 | - redirect_header($redirect_page . '=' . $com_itemid . '&com_id=' . $newcid . '&com_rootid=' . $com_rootid . '&com_mode=' . $com_mode . '&com_order=' . $com_order . '#comment' . $newcid, 1, _CM_THANKSPOST); |
|
| 526 | + redirect_header($redirect_page.'='.$com_itemid.'&com_id='.$newcid.'&com_rootid='.$com_rootid.'&com_mode='.$com_mode.'&com_order='.$com_order.'#comment'.$newcid, 1, _CM_THANKSPOST); |
|
| 527 | 527 | } else { |
| 528 | 528 | // not active, so redirect to top comment page |
| 529 | - redirect_header($redirect_page . '=' . $com_itemid . '&com_mode=' . $com_mode . '&com_order=' . $com_order . '#comment' . $newcid, 1, _CM_THANKSPOST); |
|
| 529 | + redirect_header($redirect_page.'='.$com_itemid.'&com_mode='.$com_mode.'&com_order='.$com_order.'#comment'.$newcid, 1, _CM_THANKSPOST); |
|
| 530 | 530 | } |
| 531 | 531 | } |
| 532 | 532 | } else { |
@@ -540,6 +540,6 @@ discard block |
||
| 540 | 540 | } |
| 541 | 541 | break; |
| 542 | 542 | default: |
| 543 | - redirect_header(XOOPS_URL . '/', 1, implode('<br>', $GLOBALS['xoopsSecurity']->getErrors())); |
|
| 543 | + redirect_header(XOOPS_URL.'/', 1, implode('<br>', $GLOBALS['xoopsSecurity']->getErrors())); |
|
| 544 | 544 | break; |
| 545 | 545 | } |
@@ -58,13 +58,13 @@ discard block |
||
| 58 | 58 | } |
| 59 | 59 | if ($com_order != XOOPS_COMMENT_OLD1ST) { |
| 60 | 60 | $xoopsTpl->assign(array( |
| 61 | - 'comment_order' => XOOPS_COMMENT_NEW1ST, |
|
| 62 | - 'order_other' => XOOPS_COMMENT_OLD1ST)); |
|
| 61 | + 'comment_order' => XOOPS_COMMENT_NEW1ST, |
|
| 62 | + 'order_other' => XOOPS_COMMENT_OLD1ST)); |
|
| 63 | 63 | $com_dborder = 'DESC'; |
| 64 | 64 | } else { |
| 65 | 65 | $xoopsTpl->assign(array( |
| 66 | - 'comment_order' => XOOPS_COMMENT_OLD1ST, |
|
| 67 | - 'order_other' => XOOPS_COMMENT_NEW1ST)); |
|
| 66 | + 'comment_order' => XOOPS_COMMENT_OLD1ST, |
|
| 67 | + 'order_other' => XOOPS_COMMENT_NEW1ST)); |
|
| 68 | 68 | $com_dborder = 'ASC'; |
| 69 | 69 | } |
| 70 | 70 | // admins can view all comments and IPs, others can only view approved(active) comments |
@@ -289,24 +289,24 @@ discard block |
||
| 289 | 289 | // End add by voltan |
| 290 | 290 | |
| 291 | 291 | $xoopsTpl->assign(array( |
| 292 | - 'commentsnav' => $navbar, |
|
| 293 | - 'editcomment_link' => 'comment_edit.php?com_itemid=' . $com_itemid . '&com_order=' . $com_order . '&com_mode=' . $com_mode . '' . $link_extra, |
|
| 294 | - 'deletecomment_link' => 'comment_delete.php?com_itemid=' . $com_itemid . '&com_order=' . $com_order . '&com_mode=' . $com_mode . '' . $link_extra, |
|
| 295 | - 'replycomment_link' => 'comment_reply.php?com_itemid=' . $com_itemid . '&com_order=' . $com_order . '&com_mode=' . $com_mode . '' . $link_extra)); |
|
| 292 | + 'commentsnav' => $navbar, |
|
| 293 | + 'editcomment_link' => 'comment_edit.php?com_itemid=' . $com_itemid . '&com_order=' . $com_order . '&com_mode=' . $com_mode . '' . $link_extra, |
|
| 294 | + 'deletecomment_link' => 'comment_delete.php?com_itemid=' . $com_itemid . '&com_order=' . $com_order . '&com_mode=' . $com_mode . '' . $link_extra, |
|
| 295 | + 'replycomment_link' => 'comment_reply.php?com_itemid=' . $com_itemid . '&com_order=' . $com_order . '&com_mode=' . $com_mode . '' . $link_extra)); |
|
| 296 | 296 | |
| 297 | 297 | // assign some lang variables |
| 298 | 298 | $xoopsTpl->assign(array( |
| 299 | - 'lang_from' => _CM_FROM, |
|
| 300 | - 'lang_joined' => _CM_JOINED, |
|
| 301 | - 'lang_posts' => _CM_POSTS, |
|
| 302 | - 'lang_poster' => _CM_POSTER, |
|
| 303 | - 'lang_thread' => _CM_THREAD, |
|
| 304 | - 'lang_edit' => _EDIT, |
|
| 305 | - 'lang_delete' => _DELETE, |
|
| 306 | - 'lang_reply' => _REPLY, |
|
| 307 | - 'lang_subject' => _CM_REPLIES, |
|
| 308 | - 'lang_posted' => _CM_POSTED, |
|
| 309 | - 'lang_updated' => _CM_UPDATED, |
|
| 310 | - 'lang_notice' => _CM_NOTICE)); |
|
| 299 | + 'lang_from' => _CM_FROM, |
|
| 300 | + 'lang_joined' => _CM_JOINED, |
|
| 301 | + 'lang_posts' => _CM_POSTS, |
|
| 302 | + 'lang_poster' => _CM_POSTER, |
|
| 303 | + 'lang_thread' => _CM_THREAD, |
|
| 304 | + 'lang_edit' => _EDIT, |
|
| 305 | + 'lang_delete' => _DELETE, |
|
| 306 | + 'lang_reply' => _REPLY, |
|
| 307 | + 'lang_subject' => _CM_REPLIES, |
|
| 308 | + 'lang_posted' => _CM_POSTED, |
|
| 309 | + 'lang_updated' => _CM_UPDATED, |
|
| 310 | + 'lang_notice' => _CM_NOTICE)); |
|
| 311 | 311 | } |
| 312 | 312 | } |
@@ -85,25 +85,25 @@ discard block |
||
| 85 | 85 | $renderer->renderFlatView($admin_view); |
| 86 | 86 | } elseif ($com_mode === 'thread') { |
| 87 | 87 | // RMV-FIX... added extraParam stuff here |
| 88 | - $comment_url = $comment_config['pageName'] . '?'; |
|
| 88 | + $comment_url = $comment_config['pageName'].'?'; |
|
| 89 | 89 | if (isset($comment_config['extraParams']) && is_array($comment_config['extraParams'])) { |
| 90 | 90 | $extra_params = ''; |
| 91 | 91 | foreach ($comment_config['extraParams'] as $extra_param) { |
| 92 | 92 | // This page is included in the module hosting page -- param could be from anywhere |
| 93 | 93 | if (isset(${$extra_param})) { |
| 94 | - $extra_params .= $extra_param . '=' . ${$extra_param} . '&'; |
|
| 94 | + $extra_params .= $extra_param.'='.${$extra_param}.'&'; |
|
| 95 | 95 | } elseif (isset($_POST[$extra_param])) { |
| 96 | - $extra_params .= $extra_param . '=' . $_POST[$extra_param] . '&'; |
|
| 96 | + $extra_params .= $extra_param.'='.$_POST[$extra_param].'&'; |
|
| 97 | 97 | } elseif (isset($_GET[$extra_param])) { |
| 98 | - $extra_params .= $extra_param . '=' . $_GET[$extra_param] . '&'; |
|
| 98 | + $extra_params .= $extra_param.'='.$_GET[$extra_param].'&'; |
|
| 99 | 99 | } else { |
| 100 | - $extra_params .= $extra_param . '=&'; |
|
| 100 | + $extra_params .= $extra_param.'=&'; |
|
| 101 | 101 | } |
| 102 | 102 | //$extra_params .= isset(${$extra_param}) ? $extra_param .'='.${$extra_param}.'&' : $extra_param .'=&'; |
| 103 | 103 | } |
| 104 | 104 | $comment_url .= $extra_params; |
| 105 | 105 | } |
| 106 | - $xoopsTpl->assign('comment_url', $comment_url . $comment_config['itemName'] . '=' . $com_itemid . '&com_mode=thread&com_order=' . $com_order); |
|
| 106 | + $xoopsTpl->assign('comment_url', $comment_url.$comment_config['itemName'].'='.$com_itemid.'&com_mode=thread&com_order='.$com_order); |
|
| 107 | 107 | if (!empty($com_id) && !empty($com_rootid) && ($com_id != $com_rootid)) { |
| 108 | 108 | // Show specific thread tree |
| 109 | 109 | $comments = $comment_handler->getThread($com_rootid, $com_id); |
@@ -168,19 +168,19 @@ discard block |
||
| 168 | 168 | |
| 169 | 169 | unset($postcomment_link); |
| 170 | 170 | if (!empty($xoopsModuleConfig['com_anonpost']) || is_object($xoopsUser)) { |
| 171 | - $postcomment_link = 'comment_new.php?com_itemid=' . $com_itemid . '&com_order=' . $com_order . '&com_mode=' . $com_mode; |
|
| 171 | + $postcomment_link = 'comment_new.php?com_itemid='.$com_itemid.'&com_order='.$com_order.'&com_mode='.$com_mode; |
|
| 172 | 172 | |
| 173 | 173 | $xoopsTpl->assign('anon_canpost', true); // to main template |
| 174 | 174 | } |
| 175 | 175 | |
| 176 | 176 | $commentBarHidden = ''; |
| 177 | - $commentBarHidden .= '<input type="hidden" name="' . $comment_config['itemName'] |
|
| 178 | - . '" value="' . $com_itemid . '" />'; |
|
| 177 | + $commentBarHidden .= '<input type="hidden" name="'.$comment_config['itemName'] |
|
| 178 | + . '" value="'.$com_itemid.'" />'; |
|
| 179 | 179 | $link_extra = ''; |
| 180 | 180 | if (isset($comment_config['extraParams']) && is_array($comment_config['extraParams'])) { |
| 181 | 181 | foreach ($comment_config['extraParams'] as $extra_param) { |
| 182 | 182 | if (isset(${$extra_param})) { |
| 183 | - $link_extra .= '&' . $extra_param . '=' . ${$extra_param}; |
|
| 183 | + $link_extra .= '&'.$extra_param.'='.${$extra_param}; |
|
| 184 | 184 | $hidden_value = htmlspecialchars(${$extra_param}, ENT_QUOTES); |
| 185 | 185 | $extra_param_val = ${$extra_param}; |
| 186 | 186 | } elseif (isset($_POST[$extra_param])) { |
@@ -189,9 +189,9 @@ discard block |
||
| 189 | 189 | $extra_param_val = $_GET[$extra_param]; |
| 190 | 190 | } |
| 191 | 191 | if (isset($extra_param_val)) { |
| 192 | - $link_extra .= '&' . $extra_param . '=' . $extra_param_val; |
|
| 192 | + $link_extra .= '&'.$extra_param.'='.$extra_param_val; |
|
| 193 | 193 | $hidden_value = htmlspecialchars($extra_param_val, ENT_QUOTES); |
| 194 | - $commentBarHidden .= '<input type="hidden" name="' . $extra_param . '" value="' . $hidden_value . '" />'; |
|
| 194 | + $commentBarHidden .= '<input type="hidden" name="'.$extra_param.'" value="'.$hidden_value.'" />'; |
|
| 195 | 195 | } |
| 196 | 196 | } |
| 197 | 197 | } |
@@ -199,7 +199,7 @@ discard block |
||
| 199 | 199 | $commentPostButton = false; |
| 200 | 200 | if (!empty($xoopsModuleConfig['com_anonpost']) || is_object($xoopsUser)) { |
| 201 | 201 | $commentPostButton = new XoopsFormButton('', 'com_post', _CM_POSTCOMMENT, 'button'); |
| 202 | - $commentPostButton->setExtra(' onclick="self.location.href=\'' . $postcomment_link . $link_extra . '\'"'); |
|
| 202 | + $commentPostButton->setExtra(' onclick="self.location.href=\''.$postcomment_link.$link_extra.'\'"'); |
|
| 203 | 203 | } |
| 204 | 204 | $commentTpl->assign('commentPostButton', $commentPostButton); |
| 205 | 205 | $commentTpl->assign('commentPostHidden', $commentBarHidden); |
@@ -207,14 +207,14 @@ discard block |
||
| 207 | 207 | $navbar = $commentTpl->fetch('db:system_comments_controls.tpl'); |
| 208 | 208 | |
| 209 | 209 | if (!empty($xoopsModuleConfig['com_anonpost']) || is_object($xoopsUser)) { |
| 210 | - if (file_exists($GLOBALS['xoops']->path('modules/' . $xoopsModule->getVar('dirname') . '/comment_fast.php'))) { |
|
| 211 | - include_once $GLOBALS['xoops']->path('modules/' . $xoopsModule->getVar('dirname') . '/comment_fast.php'); |
|
| 210 | + if (file_exists($GLOBALS['xoops']->path('modules/'.$xoopsModule->getVar('dirname').'/comment_fast.php'))) { |
|
| 211 | + include_once $GLOBALS['xoops']->path('modules/'.$xoopsModule->getVar('dirname').'/comment_fast.php'); |
|
| 212 | 212 | } |
| 213 | 213 | if (isset($com_replytitle)) { |
| 214 | 214 | $myts = MyTextSanitizer::getInstance(); |
| 215 | 215 | $com_title = $myts->htmlSpecialChars($com_replytitle); |
| 216 | - if (!preg_match('/^' . _RE . '/i', $com_title)) { |
|
| 217 | - $com_title = _RE . ' ' . xoops_substr($com_title, 0, 56); |
|
| 216 | + if (!preg_match('/^'._RE.'/i', $com_title)) { |
|
| 217 | + $com_title = _RE.' '.xoops_substr($com_title, 0, 56); |
|
| 218 | 218 | } |
| 219 | 219 | } else { |
| 220 | 220 | $com_title = ''; |
@@ -290,9 +290,9 @@ discard block |
||
| 290 | 290 | |
| 291 | 291 | $xoopsTpl->assign(array( |
| 292 | 292 | 'commentsnav' => $navbar, |
| 293 | - 'editcomment_link' => 'comment_edit.php?com_itemid=' . $com_itemid . '&com_order=' . $com_order . '&com_mode=' . $com_mode . '' . $link_extra, |
|
| 294 | - 'deletecomment_link' => 'comment_delete.php?com_itemid=' . $com_itemid . '&com_order=' . $com_order . '&com_mode=' . $com_mode . '' . $link_extra, |
|
| 295 | - 'replycomment_link' => 'comment_reply.php?com_itemid=' . $com_itemid . '&com_order=' . $com_order . '&com_mode=' . $com_mode . '' . $link_extra)); |
|
| 293 | + 'editcomment_link' => 'comment_edit.php?com_itemid='.$com_itemid.'&com_order='.$com_order.'&com_mode='.$com_mode.''.$link_extra, |
|
| 294 | + 'deletecomment_link' => 'comment_delete.php?com_itemid='.$com_itemid.'&com_order='.$com_order.'&com_mode='.$com_mode.''.$link_extra, |
|
| 295 | + 'replycomment_link' => 'comment_reply.php?com_itemid='.$com_itemid.'&com_order='.$com_order.'&com_mode='.$com_mode.''.$link_extra)); |
|
| 296 | 296 | |
| 297 | 297 | // assign some lang variables |
| 298 | 298 | $xoopsTpl->assign(array( |
@@ -28,7 +28,7 @@ discard block |
||
| 28 | 28 | // Backward compatibility for 2.2* |
| 29 | 29 | function xoops_load_lang_file($name, $module = '', $default = 'english') |
| 30 | 30 | { |
| 31 | - $GLOBALS['xoopsLogger']->addDeprecated('Function ' . __FUNCTION__ . '() is deprecated, use xoops_loadLanguage() instead'); |
|
| 31 | + $GLOBALS['xoopsLogger']->addDeprecated('Function '.__FUNCTION__.'() is deprecated, use xoops_loadLanguage() instead'); |
|
| 32 | 32 | |
| 33 | 33 | return xoops_loadLanguage($name, $module); |
| 34 | 34 | } |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | */ |
| 41 | 41 | function xoops_refcheck($docheck = 1) |
| 42 | 42 | { |
| 43 | - $GLOBALS['xoopsLogger']->addDeprecated('Function ' . __FUNCTION__ . '() is deprecated, use xoopsSecurity::checkReferer instead'); |
|
| 43 | + $GLOBALS['xoopsLogger']->addDeprecated('Function '.__FUNCTION__.'() is deprecated, use xoopsSecurity::checkReferer instead'); |
|
| 44 | 44 | |
| 45 | 45 | return $GLOBALS['xoopsSecurity']->checkReferer($docheck); |
| 46 | 46 | } |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | */ |
| 53 | 53 | function xoops_getLinkedUnameFromId($userid) |
| 54 | 54 | { |
| 55 | - $GLOBALS['xoopsLogger']->addDeprecated('Function ' . __FUNCTION__ . '() is deprecated, use XoopsUserUtility::getUnameFromId() instead'); |
|
| 55 | + $GLOBALS['xoopsLogger']->addDeprecated('Function '.__FUNCTION__.'() is deprecated, use XoopsUserUtility::getUnameFromId() instead'); |
|
| 56 | 56 | xoops_load('XoopsUserUtility'); |
| 57 | 57 | |
| 58 | 58 | return XoopsUserUtility::getUnameFromId($userid, false, true); |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | */ |
| 64 | 64 | function showbanner() |
| 65 | 65 | { |
| 66 | - $GLOBALS['xoopsLogger']->addDeprecated('Function ' . __FUNCTION__ . '() is deprecated, use xoops_getbanner instead'); |
|
| 66 | + $GLOBALS['xoopsLogger']->addDeprecated('Function '.__FUNCTION__.'() is deprecated, use xoops_getbanner instead'); |
|
| 67 | 67 | echo xoops_getbanner(); |
| 68 | 68 | } |
| 69 | 69 | |
@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | */ |
| 73 | 73 | function getTheme() |
| 74 | 74 | { |
| 75 | - $GLOBALS['xoopsLogger']->addDeprecated('Function ' . __FUNCTION__ . "() is deprecated, use \$xoopsConfig['theme_set'] directly"); |
|
| 75 | + $GLOBALS['xoopsLogger']->addDeprecated('Function '.__FUNCTION__."() is deprecated, use \$xoopsConfig['theme_set'] directly"); |
|
| 76 | 76 | |
| 77 | 77 | return $GLOBALS['xoopsConfig']['theme_set']; |
| 78 | 78 | } |
@@ -88,7 +88,7 @@ discard block |
||
| 88 | 88 | */ |
| 89 | 89 | function getcss($theme = '') |
| 90 | 90 | { |
| 91 | - $GLOBALS['xoopsLogger']->addDeprecated('Function ' . __FUNCTION__ . '() is deprecated, use xoops_getcss instead'); |
|
| 91 | + $GLOBALS['xoopsLogger']->addDeprecated('Function '.__FUNCTION__.'() is deprecated, use xoops_getcss instead'); |
|
| 92 | 92 | |
| 93 | 93 | return xoops_getcss($theme); |
| 94 | 94 | } |
@@ -98,8 +98,8 @@ discard block |
||
| 98 | 98 | */ |
| 99 | 99 | function &getMailer() |
| 100 | 100 | { |
| 101 | - $GLOBALS['xoopsLogger']->addDeprecated('Function ' . __FUNCTION__ . '() is deprecated, use xoops_getMailer instead'); |
|
| 102 | - $mailer =& xoops_getMailer(); |
|
| 101 | + $GLOBALS['xoopsLogger']->addDeprecated('Function '.__FUNCTION__.'() is deprecated, use xoops_getMailer instead'); |
|
| 102 | + $mailer = & xoops_getMailer(); |
|
| 103 | 103 | |
| 104 | 104 | return $mailer; |
| 105 | 105 | } |
@@ -109,11 +109,11 @@ discard block |
||
| 109 | 109 | */ |
| 110 | 110 | function OpenWaitBox() |
| 111 | 111 | { |
| 112 | - $GLOBALS['xoopsLogger']->addDeprecated('Function ' . __FUNCTION__ . '() is deprecated'); |
|
| 112 | + $GLOBALS['xoopsLogger']->addDeprecated('Function '.__FUNCTION__.'() is deprecated'); |
|
| 113 | 113 | echo "<div id='waitDiv' style='position:absolute;left:40%;top:50%;visibility:hidden;text-align: center;'> |
| 114 | 114 | <table cellpadding='6' border='2' class='bg2'> |
| 115 | 115 | <tr> |
| 116 | - <td align='center'><strong><big>" . _FETCHING . "</big></strong><br><img src='" . XOOPS_URL . "/images/await.gif' alt='' /><br>" . _PLEASEWAIT . "</td> |
|
| 116 | + <td align='center'><strong><big>" . _FETCHING."</big></strong><br><img src='".XOOPS_URL."/images/await.gif' alt='' /><br>"._PLEASEWAIT."</td> |
|
| 117 | 117 | </tr> |
| 118 | 118 | </table> |
| 119 | 119 | </div> |
@@ -154,7 +154,7 @@ discard block |
||
| 154 | 154 | |
| 155 | 155 | function CloseWaitBox() |
| 156 | 156 | { |
| 157 | - $GLOBALS['xoopsLogger']->addDeprecated('Function ' . __FUNCTION__ . '() is deprecated'); |
|
| 157 | + $GLOBALS['xoopsLogger']->addDeprecated('Function '.__FUNCTION__.'() is deprecated'); |
|
| 158 | 158 | echo "<script type='text/javascript'> |
| 159 | 159 | <!--// |
| 160 | 160 | ap_showWaitMessage('waitDiv', 0); |
@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | $module = $module_handler->get($comment->getVar('com_modid')); |
| 50 | 50 | $comment_config = $module->getInfo('comments'); |
| 51 | 51 | $com_modid = $module->getVar('mid'); |
| 52 | - $redirect_page = XOOPS_URL . '/modules/system/admin.php?fct=comments&com_modid=' . $com_modid . '&com_itemid'; |
|
| 52 | + $redirect_page = XOOPS_URL.'/modules/system/admin.php?fct=comments&com_modid='.$com_modid.'&com_itemid'; |
|
| 53 | 53 | $moddir = $module->getVar('dirname'); |
| 54 | 54 | unset($comment); |
| 55 | 55 | } else { |
@@ -58,18 +58,18 @@ discard block |
||
| 58 | 58 | } |
| 59 | 59 | $comment_config = $xoopsModule->getInfo('comments'); |
| 60 | 60 | $com_modid = $xoopsModule->getVar('mid'); |
| 61 | - $redirect_page = $comment_config['pageName'] . '?'; |
|
| 61 | + $redirect_page = $comment_config['pageName'].'?'; |
|
| 62 | 62 | $comment_confirm_extra = array(); |
| 63 | 63 | if (isset($comment_config['extraParams']) && is_array($comment_config['extraParams'])) { |
| 64 | 64 | foreach ($comment_config['extraParams'] as $extra_param) { |
| 65 | 65 | if (isset(${$extra_param})) { |
| 66 | - $redirect_page .= $extra_param . '=' . ${$extra_param} . '&'; |
|
| 66 | + $redirect_page .= $extra_param.'='.${$extra_param}.'&'; |
|
| 67 | 67 | |
| 68 | 68 | // for the confirmation page |
| 69 | 69 | $comment_confirm_extra[$extra_param] = ${$extra_param}; |
| 70 | 70 | } elseif (isset($_GET[$extra_param])) { |
| 71 | 71 | // $redirect_page .= $extra_param . '=' . $_GET[$extra_param] . '&'; |
| 72 | - $redirect_page .= $extra_param . '=' . filter_input(INPUT_GET, $extra_param, FILTER_SANITIZE_STRING) . '&'; |
|
| 72 | + $redirect_page .= $extra_param.'='.filter_input(INPUT_GET, $extra_param, FILTER_SANITIZE_STRING).'&'; |
|
| 73 | 73 | |
| 74 | 74 | // for the confirmation page |
| 75 | 75 | // $comment_confirm_extra[$extra_param] = $_GET[$extra_param]; |
@@ -100,7 +100,7 @@ discard block |
||
| 100 | 100 | if ($ref != '') { |
| 101 | 101 | redirect_header($ref, 2, _NOPERM); |
| 102 | 102 | } else { |
| 103 | - redirect_header($redirect_page . '?' . $comment_config['itemName'] . '=' . (int)$com_itemid, 2, _NOPERM); |
|
| 103 | + redirect_header($redirect_page.'?'.$comment_config['itemName'].'='.(int)$com_itemid, 2, _NOPERM); |
|
| 104 | 104 | } |
| 105 | 105 | exit(); |
| 106 | 106 | } |
@@ -113,7 +113,7 @@ discard block |
||
| 113 | 113 | $comment = $comment_handler->get($com_id); |
| 114 | 114 | if (!$comment_handler->delete($comment)) { |
| 115 | 115 | include_once $GLOBALS['xoops']->path('header.php'); |
| 116 | - xoops_error(_CM_COMDELETENG . ' (ID: ' . $comment->getVar('com_id') . ')'); |
|
| 116 | + xoops_error(_CM_COMDELETENG.' (ID: '.$comment->getVar('com_id').')'); |
|
| 117 | 117 | include_once $GLOBALS['xoops']->path('footer'); |
| 118 | 118 | exit(); |
| 119 | 119 | } |
@@ -125,7 +125,7 @@ discard block |
||
| 125 | 125 | if (!function_exists($comment_config['callback']['update'])) { |
| 126 | 126 | if (isset($comment_config['callbackFile'])) { |
| 127 | 127 | $callbackfile = trim($comment_config['callbackFile']); |
| 128 | - if ($callbackfile != '' && file_exists($file = $GLOBALS['xoops']->path('modules/' . $moddir . '/' . $callbackfile))) { |
|
| 128 | + if ($callbackfile != '' && file_exists($file = $GLOBALS['xoops']->path('modules/'.$moddir.'/'.$callbackfile))) { |
|
| 129 | 129 | include_once $file; |
| 130 | 130 | } |
| 131 | 131 | if (!function_exists($comment_config['callback']['update'])) { |
@@ -155,10 +155,10 @@ discard block |
||
| 155 | 155 | } |
| 156 | 156 | |
| 157 | 157 | // get all comments posted later within the same thread |
| 158 | - $thread_comments =& $comment_handler->getThread($comment->getVar('com_rootid'), $com_id); |
|
| 158 | + $thread_comments = & $comment_handler->getThread($comment->getVar('com_rootid'), $com_id); |
|
| 159 | 159 | include_once $GLOBALS['xoops']->path('class/tree.php'); |
| 160 | 160 | $xot = new XoopsObjectTree($thread_comments, 'com_id', 'com_pid', 'com_rootid'); |
| 161 | - $child_comments =& $xot->getFirstChild($com_id); |
|
| 161 | + $child_comments = & $xot->getFirstChild($com_id); |
|
| 162 | 162 | // now set new parent ID for direct child comments |
| 163 | 163 | $new_pid = $comment->getVar('com_pid'); |
| 164 | 164 | $errs = array(); |
@@ -169,7 +169,7 @@ discard block |
||
| 169 | 169 | $new_rootid = $child_comments[$i]->getVar('com_id'); |
| 170 | 170 | $child_comments[$i]->setVar('com_rootid', $child_comments[$i]->getVar('com_id')); |
| 171 | 171 | if (!$comment_handler->insert($child_comments[$i])) { |
| 172 | - $errs[] = 'Could not change comment parent ID from <strong>' . $com_id . '</strong> to <strong>' . $new_pid . '</strong>. (ID: ' . $new_rootid . ')'; |
|
| 172 | + $errs[] = 'Could not change comment parent ID from <strong>'.$com_id.'</strong> to <strong>'.$new_pid.'</strong>. (ID: '.$new_rootid.')'; |
|
| 173 | 173 | } else { |
| 174 | 174 | // need to change root id for all its child comments as well |
| 175 | 175 | $c_child_comments = &$xot->getAllChild($new_rootid); |
@@ -177,13 +177,13 @@ discard block |
||
| 177 | 177 | foreach (array_keys($c_child_comments) as $j) { |
| 178 | 178 | $c_child_comments[$j]->setVar('com_rootid', $new_rootid); |
| 179 | 179 | if (!$comment_handler->insert($c_child_comments[$j])) { |
| 180 | - $errs[] = 'Could not change comment root ID from <strong>' . $com_id . '</strong> to <strong>' . $new_rootid . '</strong>.'; |
|
| 180 | + $errs[] = 'Could not change comment root ID from <strong>'.$com_id.'</strong> to <strong>'.$new_rootid.'</strong>.'; |
|
| 181 | 181 | } |
| 182 | 182 | } |
| 183 | 183 | } |
| 184 | 184 | } else { |
| 185 | 185 | if (!$comment_handler->insert($child_comments[$i])) { |
| 186 | - $errs[] = 'Could not change comment parent ID from <strong>' . $com_id . '</strong> to <strong>' . $new_pid . '</strong>.'; |
|
| 186 | + $errs[] = 'Could not change comment parent ID from <strong>'.$com_id.'</strong> to <strong>'.$new_pid.'</strong>.'; |
|
| 187 | 187 | } |
| 188 | 188 | } |
| 189 | 189 | } |
@@ -193,7 +193,7 @@ discard block |
||
| 193 | 193 | include_once $GLOBALS['xoops']->path('footer.php'); |
| 194 | 194 | exit(); |
| 195 | 195 | } |
| 196 | - redirect_header($redirect_page . '=' . $com_itemid . '&com_order=' . $com_order . '&com_mode=' . $com_mode, 1, _CM_COMDELETED); |
|
| 196 | + redirect_header($redirect_page.'='.$com_itemid.'&com_order='.$com_order.'&com_mode='.$com_mode, 1, _CM_COMDELETED); |
|
| 197 | 197 | break; |
| 198 | 198 | |
| 199 | 199 | case 'delete_all': |
@@ -203,12 +203,12 @@ discard block |
||
| 203 | 203 | $com_rootid = $comment->getVar('com_rootid'); |
| 204 | 204 | |
| 205 | 205 | // get all comments posted later within the same thread |
| 206 | - $thread_comments =& $comment_handler->getThread($com_rootid, $com_id); |
|
| 206 | + $thread_comments = & $comment_handler->getThread($com_rootid, $com_id); |
|
| 207 | 207 | |
| 208 | 208 | // construct a comment tree |
| 209 | 209 | include_once $GLOBALS['xoops']->path('class/tree.php'); |
| 210 | 210 | $xot = new XoopsObjectTree($thread_comments, 'com_id', 'com_pid', 'com_rootid'); |
| 211 | - $child_comments =& $xot->getAllChild($com_id); |
|
| 211 | + $child_comments = & $xot->getAllChild($com_id); |
|
| 212 | 212 | // add itself here |
| 213 | 213 | $child_comments[$com_id] = &$comment; |
| 214 | 214 | $msgs = array(); |
@@ -217,9 +217,9 @@ discard block |
||
| 217 | 217 | $member_handler = xoops_getHandler('member'); |
| 218 | 218 | foreach (array_keys($child_comments) as $i) { |
| 219 | 219 | if (!$comment_handler->delete($child_comments[$i])) { |
| 220 | - $msgs[] = _CM_COMDELETENG . ' (ID: ' . $child_comments[$i]->getVar('com_id') . ')'; |
|
| 220 | + $msgs[] = _CM_COMDELETENG.' (ID: '.$child_comments[$i]->getVar('com_id').')'; |
|
| 221 | 221 | } else { |
| 222 | - $msgs[] = _CM_COMDELETED . ' (ID: ' . $child_comments[$i]->getVar('com_id') . ')'; |
|
| 222 | + $msgs[] = _CM_COMDELETED.' (ID: '.$child_comments[$i]->getVar('com_id').')'; |
|
| 223 | 223 | // store poster ID and deleted post number into array for later use |
| 224 | 224 | $poster_id = $child_comments[$i]->getVar('com_uid'); |
| 225 | 225 | if ($poster_id > 0) { |
@@ -242,7 +242,7 @@ discard block |
||
| 242 | 242 | if (!function_exists($comment_config['callback']['update'])) { |
| 243 | 243 | if (isset($comment_config['callbackFile'])) { |
| 244 | 244 | $callbackfile = trim($comment_config['callbackFile']); |
| 245 | - if ($callbackfile != '' && file_exists($file = $GLOBALS['xoops']->path('modules/' . $moddir . '/' . $callbackfile))) { |
|
| 245 | + if ($callbackfile != '' && file_exists($file = $GLOBALS['xoops']->path('modules/'.$moddir.'/'.$callbackfile))) { |
|
| 246 | 246 | include_once $file; |
| 247 | 247 | } |
| 248 | 248 | if (!function_exists($comment_config['callback']['update'])) { |
@@ -262,7 +262,7 @@ discard block |
||
| 262 | 262 | } |
| 263 | 263 | include_once $GLOBALS['xoops']->path('header.php'); |
| 264 | 264 | xoops_result($msgs); |
| 265 | - echo '<br><a href="' . $redirect_page . '=' . $com_itemid . '&com_order=' . $com_order . '&com_mode=' . $com_mode . '">' . _BACK . '</a>'; |
|
| 265 | + echo '<br><a href="'.$redirect_page.'='.$com_itemid.'&com_order='.$com_order.'&com_mode='.$com_mode.'">'._BACK.'</a>'; |
|
| 266 | 266 | include_once $GLOBALS['xoops']->path('footer.php'); |
| 267 | 267 | break; |
| 268 | 268 | |
@@ -18,7 +18,7 @@ discard block |
||
| 18 | 18 | */ |
| 19 | 19 | defined('XOOPS_ROOT_PATH') || exit('Restricted access'); |
| 20 | 20 | |
| 21 | -trigger_error('Functions in ' . __FILE__ . ' are deprecated, should not be used any more', E_USER_WARNING); |
|
| 21 | +trigger_error('Functions in '.__FILE__.' are deprecated, should not be used any more', E_USER_WARNING); |
|
| 22 | 22 | // #################### Block functions from here ################## |
| 23 | 23 | /* |
| 24 | 24 | * Purpose : Builds the blocks on both sides |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | include_once $GLOBALS['xoops']->path('class/template.php'); |
| 55 | 55 | $xoopsTpl = new XoopsTpl(); |
| 56 | 56 | } else { |
| 57 | - $xoopsTpl =& $GLOBALS['xoopsTpl']; |
|
| 57 | + $xoopsTpl = & $GLOBALS['xoopsTpl']; |
|
| 58 | 58 | } |
| 59 | 59 | $xoopsLogger = XoopsLogger::getInstance(); |
| 60 | 60 | for ($i = 0; $i < $block_count; ++$i) { |
@@ -67,33 +67,33 @@ discard block |
||
| 67 | 67 | } |
| 68 | 68 | $btpl = $block_arr[$i]->getVar('template'); |
| 69 | 69 | if ($btpl != '') { |
| 70 | - if (empty($bcachetime) || !$xoopsTpl->is_cached('db:' . $btpl)) { |
|
| 70 | + if (empty($bcachetime) || !$xoopsTpl->is_cached('db:'.$btpl)) { |
|
| 71 | 71 | $xoopsLogger->addBlock($block_arr[$i]->getVar('name')); |
| 72 | - $bresult =& $block_arr[$i]->buildBlock(); |
|
| 72 | + $bresult = & $block_arr[$i]->buildBlock(); |
|
| 73 | 73 | if (!$bresult) { |
| 74 | 74 | continue; |
| 75 | 75 | } |
| 76 | 76 | $xoopsTpl->assign_by_ref('block', $bresult); |
| 77 | - $bcontent =& $xoopsTpl->fetch('db:' . $btpl); |
|
| 77 | + $bcontent = & $xoopsTpl->fetch('db:'.$btpl); |
|
| 78 | 78 | $xoopsTpl->clear_assign('block'); |
| 79 | 79 | } else { |
| 80 | 80 | $xoopsLogger->addBlock($block_arr[$i]->getVar('name'), true, $bcachetime); |
| 81 | - $bcontent =& $xoopsTpl->fetch('db:' . $btpl); |
|
| 81 | + $bcontent = & $xoopsTpl->fetch('db:'.$btpl); |
|
| 82 | 82 | } |
| 83 | 83 | } else { |
| 84 | 84 | $bid = $block_arr[$i]->getVar('bid'); |
| 85 | - if (empty($bcachetime) || !$xoopsTpl->is_cached('db:system_dummy.tpl', 'blk_' . $bid)) { |
|
| 85 | + if (empty($bcachetime) || !$xoopsTpl->is_cached('db:system_dummy.tpl', 'blk_'.$bid)) { |
|
| 86 | 86 | $xoopsLogger->addBlock($block_arr[$i]->getVar('name')); |
| 87 | 87 | $bresult = &$block_arr[$i]->buildBlock(); |
| 88 | 88 | if (!$bresult) { |
| 89 | 89 | continue; |
| 90 | 90 | } |
| 91 | 91 | $xoopsTpl->assign_by_ref('dummy_content', $bresult['content']); |
| 92 | - $bcontent =& $xoopsTpl->fetch('db:system_dummy.tpl', 'blk_' . $bid); |
|
| 92 | + $bcontent = & $xoopsTpl->fetch('db:system_dummy.tpl', 'blk_'.$bid); |
|
| 93 | 93 | $xoopsTpl->clear_assign('block'); |
| 94 | 94 | } else { |
| 95 | 95 | $xoopsLogger->addBlock($block_arr[$i]->getVar('name'), true, $bcachetime); |
| 96 | - $bcontent =& $xoopsTpl->fetch('db:system_dummy.tpl', 'blk_' . $bid); |
|
| 96 | + $bcontent = & $xoopsTpl->fetch('db:system_dummy.tpl', 'blk_'.$bid); |
|
| 97 | 97 | } |
| 98 | 98 | } |
| 99 | 99 | switch ($block_arr[$i]->getVar('side')) { |
@@ -126,7 +126,7 @@ discard block |
||
| 126 | 126 | include_once $GLOBALS['xoops']->path('class/template.php'); |
| 127 | 127 | $xoopsTpl = new XoopsTpl(); |
| 128 | 128 | } else { |
| 129 | - $xoopsTpl =& $GLOBALS['xoopsTpl']; |
|
| 129 | + $xoopsTpl = & $GLOBALS['xoopsTpl']; |
|
| 130 | 130 | } |
| 131 | 131 | if (is_object($xoopsUser)) { |
| 132 | 132 | $block_arr = $xoopsblock->getAllBlocksByGroup($xoopsUser->getGroups(), true, XOOPS_CENTERBLOCK_ALL, XOOPS_BLOCK_VISIBLE); |
@@ -145,56 +145,56 @@ discard block |
||
| 145 | 145 | } |
| 146 | 146 | $btpl = $block_arr[$i]->getVar('template'); |
| 147 | 147 | if ($btpl != '') { |
| 148 | - if (empty($bcachetime) || !$xoopsTpl->is_cached('db:' . $btpl)) { |
|
| 148 | + if (empty($bcachetime) || !$xoopsTpl->is_cached('db:'.$btpl)) { |
|
| 149 | 149 | $xoopsLogger->addBlock($block_arr[$i]->getVar('name')); |
| 150 | - $bresult =& $block_arr[$i]->buildBlock(); |
|
| 150 | + $bresult = & $block_arr[$i]->buildBlock(); |
|
| 151 | 151 | if (!$bresult) { |
| 152 | 152 | continue; |
| 153 | 153 | } |
| 154 | 154 | $xoopsTpl->assign_by_ref('block', $bresult); |
| 155 | - $bcontent =& $xoopsTpl->fetch('db:' . $btpl); |
|
| 155 | + $bcontent = & $xoopsTpl->fetch('db:'.$btpl); |
|
| 156 | 156 | $xoopsTpl->clear_assign('block'); |
| 157 | 157 | } else { |
| 158 | 158 | $xoopsLogger->addBlock($block_arr[$i]->getVar('name'), true, $bcachetime); |
| 159 | - $bcontent =& $xoopsTpl->fetch('db:' . $btpl); |
|
| 159 | + $bcontent = & $xoopsTpl->fetch('db:'.$btpl); |
|
| 160 | 160 | } |
| 161 | 161 | } else { |
| 162 | 162 | $bid = $block_arr[$i]->getVar('bid'); |
| 163 | - if (empty($bcachetime) || !$xoopsTpl->is_cached('db:system_dummy.tpl', 'blk_' . $bid)) { |
|
| 163 | + if (empty($bcachetime) || !$xoopsTpl->is_cached('db:system_dummy.tpl', 'blk_'.$bid)) { |
|
| 164 | 164 | $xoopsLogger->addBlock($block_arr[$i]->getVar('name')); |
| 165 | - $bresult =& $block_arr[$i]->buildBlock(); |
|
| 165 | + $bresult = & $block_arr[$i]->buildBlock(); |
|
| 166 | 166 | if (!$bresult) { |
| 167 | 167 | continue; |
| 168 | 168 | } |
| 169 | 169 | $xoopsTpl->assign_by_ref('dummy_content', $bresult['content']); |
| 170 | - $bcontent =& $xoopsTpl->fetch('db:system_dummy.tpl', 'blk_' . $bid); |
|
| 170 | + $bcontent = & $xoopsTpl->fetch('db:system_dummy.tpl', 'blk_'.$bid); |
|
| 171 | 171 | $xoopsTpl->clear_assign('block'); |
| 172 | 172 | } else { |
| 173 | 173 | $xoopsLogger->addBlock($block_arr[$i]->getVar('name'), true, $bcachetime); |
| 174 | - $bcontent =& $xoopsTpl->fetch('db:system_dummy.tpl', 'blk_' . $bid); |
|
| 174 | + $bcontent = & $xoopsTpl->fetch('db:system_dummy.tpl', 'blk_'.$bid); |
|
| 175 | 175 | } |
| 176 | 176 | } |
| 177 | 177 | $title = $block_arr[$i]->getVar('title'); |
| 178 | 178 | switch ($block_arr[$i]->getVar('side')) { |
| 179 | 179 | case XOOPS_CENTERBLOCK_CENTER: |
| 180 | 180 | if ($title != '') { |
| 181 | - $cc_block .= '<tr valign="top"><td colspan="2"><strong>' . $title . '</strong><hr />' . $bcontent . '<br><br></td></tr>' . "\n"; |
|
| 181 | + $cc_block .= '<tr valign="top"><td colspan="2"><strong>'.$title.'</strong><hr />'.$bcontent.'<br><br></td></tr>'."\n"; |
|
| 182 | 182 | } else { |
| 183 | - $cc_block .= '<tr><td colspan="2">' . $bcontent . '<br><br></td></tr>' . "\n"; |
|
| 183 | + $cc_block .= '<tr><td colspan="2">'.$bcontent.'<br><br></td></tr>'."\n"; |
|
| 184 | 184 | } |
| 185 | 185 | break; |
| 186 | 186 | case XOOPS_CENTERBLOCK_LEFT: |
| 187 | 187 | if ($title != '') { |
| 188 | - $cl_block .= '<p><strong>' . $title . '</strong><hr />' . $bcontent . '</p>' . "\n"; |
|
| 188 | + $cl_block .= '<p><strong>'.$title.'</strong><hr />'.$bcontent.'</p>'."\n"; |
|
| 189 | 189 | } else { |
| 190 | - $cl_block .= '<p>' . $bcontent . '</p>' . "\n"; |
|
| 190 | + $cl_block .= '<p>'.$bcontent.'</p>'."\n"; |
|
| 191 | 191 | } |
| 192 | 192 | break; |
| 193 | 193 | case XOOPS_CENTERBLOCK_RIGHT: |
| 194 | 194 | if ($title != '') { |
| 195 | - $cr_block .= '<p><strong>' . $title . '</strong><hr />' . $bcontent . '</p>' . "\n"; |
|
| 195 | + $cr_block .= '<p><strong>'.$title.'</strong><hr />'.$bcontent.'</p>'."\n"; |
|
| 196 | 196 | } else { |
| 197 | - $cr_block .= '<p>' . $bcontent . '</p>' . "\n"; |
|
| 197 | + $cr_block .= '<p>'.$bcontent.'</p>'."\n"; |
|
| 198 | 198 | } |
| 199 | 199 | break; |
| 200 | 200 | default: |
@@ -202,7 +202,7 @@ discard block |
||
| 202 | 202 | } |
| 203 | 203 | unset($bcontent, $title); |
| 204 | 204 | } |
| 205 | - echo '<table width="100%">' . $cc_block . '<tr valign="top"><td width="50%">' . $cl_block . '</td><td width="50%">' . $cr_block . '</td></tr></table>' . "\n"; |
|
| 205 | + echo '<table width="100%">'.$cc_block.'<tr valign="top"><td width="50%">'.$cl_block.'</td><td width="50%">'.$cr_block.'</td></tr></table>'."\n"; |
|
| 206 | 206 | } |
| 207 | 207 | } |
| 208 | 208 | |
@@ -213,7 +213,7 @@ discard block |
||
| 213 | 213 | */ |
| 214 | 214 | function openThread($width = '100%') |
| 215 | 215 | { |
| 216 | - echo "<table border='0' cellpadding='0' cellspacing='0' align='center' width='$width'><tr><td class='bg2'><table border='0' cellpadding='4' cellspacing='1' width='100%'><tr class='bg3' align='left'><td class='bg3' width='20%'>" . _CM_POSTER . "</td><td class='bg3'>" . _CM_THREAD . '</td></tr>'; |
|
| 216 | + echo "<table border='0' cellpadding='0' cellspacing='0' align='center' width='$width'><tr><td class='bg2'><table border='0' cellpadding='4' cellspacing='1' width='100%'><tr class='bg3' align='left'><td class='bg3' width='20%'>"._CM_POSTER."</td><td class='bg3'>"._CM_THREAD.'</td></tr>'; |
|
| 217 | 217 | } |
| 218 | 218 | |
| 219 | 219 | /** |
@@ -252,9 +252,9 @@ discard block |
||
| 252 | 252 | $bg = 'bg1'; |
| 253 | 253 | } |
| 254 | 254 | echo "<tr align='left'><td valign='top' class='$bg' nowrap='nowrap'><strong>$username</strong><br>$rank_title<br>$rank_image<br>$avatar_image<br><br>$reg_date<br>$posts<br>$user_from<br><br>$online_image</td>"; |
| 255 | - echo "<td valign='top' class='$bg'><table width='100%' border='0'><tr><td valign='top'>$subject_image <strong>$subject</strong></td><td align='right'>" . $ip_image . '' . $reply_image . '' . $edit_image . '' . $delete_image . '</td></tr>'; |
|
| 255 | + echo "<td valign='top' class='$bg'><table width='100%' border='0'><tr><td valign='top'>$subject_image <strong>$subject</strong></td><td align='right'>".$ip_image.''.$reply_image.''.$edit_image.''.$delete_image.'</td></tr>'; |
|
| 256 | 256 | echo "<tr><td colspan='2'><p>$text</p></td></tr></table></td></tr>"; |
| 257 | - echo "<tr align='left'><td class='$bg' valign='middle'>$post_date</td><td class='$bg' valign='middle'>" . $profile_image . '' . $pm_image . '' . $email_image . '' . $www_image . '' . $icq_image . '' . $aim_image . '' . $yim_image . '' . $msnm_image . '</td></tr>'; |
|
| 257 | + echo "<tr align='left'><td class='$bg' valign='middle'>$post_date</td><td class='$bg' valign='middle'>".$profile_image.''.$pm_image.''.$email_image.''.$www_image.''.$icq_image.''.$aim_image.''.$yim_image.''.$msnm_image.'</td></tr>'; |
|
| 258 | 258 | } |
| 259 | 259 | |
| 260 | 260 | /** |
@@ -43,19 +43,19 @@ |
||
| 43 | 43 | define('XOOPS_MATCH_EQUAL', 2); |
| 44 | 44 | define('XOOPS_MATCH_CONTAIN', 3); |
| 45 | 45 | // YOU SHOULD AVOID USING THE FOLLOWING CONSTANTS, THEY WILL BE REMOVED |
| 46 | -define('XOOPS_THEME_PATH', XOOPS_ROOT_PATH . '/themes'); |
|
| 47 | -define('XOOPS_ADMINTHEME_PATH', XOOPS_ROOT_PATH . '/modules/system/themes'); |
|
| 48 | -define('XOOPS_UPLOAD_PATH', XOOPS_ROOT_PATH . '/uploads'); |
|
| 49 | -define('XOOPS_LIBRARY_PATH', XOOPS_ROOT_PATH . '/libraries'); |
|
| 50 | -define('XOOPS_THEME_URL', XOOPS_URL . '/themes'); |
|
| 51 | -define('XOOPS_ADMINTHEME_URL', XOOPS_URL . '/modules/system/themes'); |
|
| 52 | -define('XOOPS_UPLOAD_URL', XOOPS_URL . '/uploads'); |
|
| 53 | -define('XOOPS_LIBRARY_URL', XOOPS_URL . '/libraries'); |
|
| 46 | +define('XOOPS_THEME_PATH', XOOPS_ROOT_PATH.'/themes'); |
|
| 47 | +define('XOOPS_ADMINTHEME_PATH', XOOPS_ROOT_PATH.'/modules/system/themes'); |
|
| 48 | +define('XOOPS_UPLOAD_PATH', XOOPS_ROOT_PATH.'/uploads'); |
|
| 49 | +define('XOOPS_LIBRARY_PATH', XOOPS_ROOT_PATH.'/libraries'); |
|
| 50 | +define('XOOPS_THEME_URL', XOOPS_URL.'/themes'); |
|
| 51 | +define('XOOPS_ADMINTHEME_URL', XOOPS_URL.'/modules/system/themes'); |
|
| 52 | +define('XOOPS_UPLOAD_URL', XOOPS_URL.'/uploads'); |
|
| 53 | +define('XOOPS_LIBRARY_URL', XOOPS_URL.'/libraries'); |
|
| 54 | 54 | |
| 55 | 55 | // ----- BEGIN: Deprecated, move to template class ----- |
| 56 | 56 | // define('SMARTY_DIR', XOOPS_ROOT_PATH . '/class/smarty/'); |
| 57 | -define('XOOPS_COMPILE_PATH', XOOPS_VAR_PATH . '/caches/smarty_compile'); |
|
| 58 | -define('XOOPS_CACHE_PATH', XOOPS_VAR_PATH . '/caches/xoops_cache'); |
|
| 57 | +define('XOOPS_COMPILE_PATH', XOOPS_VAR_PATH.'/caches/smarty_compile'); |
|
| 58 | +define('XOOPS_CACHE_PATH', XOOPS_VAR_PATH.'/caches/xoops_cache'); |
|
| 59 | 59 | // ----- END: Deprecated, move to template class ----- |
| 60 | 60 | |
| 61 | 61 | if (!defined('XOOPS_XMLRPC')) { |
@@ -25,15 +25,15 @@ |
||
| 25 | 25 | include $GLOBALS['xoops']->path('class/xoopsformloader.php'); |
| 26 | 26 | |
| 27 | 27 | $cform = new XoopsThemeForm(_CM_POSTCOMMENT, 'commentform', 'postcomment.php', 'post', true); |
| 28 | -if (!preg_match('/^' . _RE . '/i', $subject)) { |
|
| 29 | - $subject = _RE . ' ' . xoops_substr($subject, 0, 56); |
|
| 28 | +if (!preg_match('/^'._RE.'/i', $subject)) { |
|
| 29 | + $subject = _RE.' '.xoops_substr($subject, 0, 56); |
|
| 30 | 30 | } |
| 31 | 31 | |
| 32 | 32 | $cform->addElement(new XoopsFormText(_CM_TITLE, 'subject', 50, 255, $subject), true); |
| 33 | 33 | $icons_radio = new XoopsFormRadio(_MESSAGEICON, 'icon', $icon); |
| 34 | 34 | $subject_icons = XoopsLists::getSubjectsList(); |
| 35 | 35 | foreach ($subject_icons as $iconfile) { |
| 36 | - $icons_radio->addOption($iconfile, '<img src="' . XOOPS_URL . '/images/subject/' . $iconfile . '" alt="" />'); |
|
| 36 | + $icons_radio->addOption($iconfile, '<img src="'.XOOPS_URL.'/images/subject/'.$iconfile.'" alt="" />'); |
|
| 37 | 37 | } |
| 38 | 38 | $cform->addElement($icons_radio); |
| 39 | 39 | $cform->addElement(new XoopsFormDhtmlTextArea(_CM_MESSAGE, 'message', $message, 10, 50), true); |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | */ |
| 68 | 68 | function themecenterposts($title, $content) |
| 69 | 69 | { |
| 70 | - echo '<table cellpadding="4" cellspacing="1" width="98%" class="outer"><tr><td class="head">' . $title . '</td></tr><tr><td><br>' . $content . '<br></td></tr></table>'; |
|
| 70 | + echo '<table cellpadding="4" cellspacing="1" width="98%" class="outer"><tr><td class="head">'.$title.'</td></tr><tr><td><br>'.$content.'<br></td></tr></table>'; |
|
| 71 | 71 | } |
| 72 | 72 | |
| 73 | 73 | /** |
@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | */ |
| 80 | 80 | function myTextForm($url, $value) |
| 81 | 81 | { |
| 82 | - return '<form action="' . $url . '" method="post"><input type="submit" value="' . $value . '" /></form>'; |
|
| 82 | + return '<form action="'.$url.'" method="post"><input type="submit" value="'.$value.'" /></form>'; |
|
| 83 | 83 | } |
| 84 | 84 | |
| 85 | 85 | /** |
@@ -108,7 +108,7 @@ discard block |
||
| 108 | 108 | */ |
| 109 | 109 | function xoops_module_get_admin_menu() |
| 110 | 110 | { |
| 111 | - $GLOBALS['xoopsLogger']->addDeprecated(__FUNCTION__ . ' is deprecated, should not be used any longer'); |
|
| 111 | + $GLOBALS['xoopsLogger']->addDeprecated(__FUNCTION__.' is deprecated, should not be used any longer'); |
|
| 112 | 112 | /************************************************************ |
| 113 | 113 | * Based on: |
| 114 | 114 | * - PHP Layers Menu 1.0.7(c)2001,2002 Marco Pratesi <[email protected]> |
@@ -135,22 +135,22 @@ discard block |
||
| 135 | 135 | foreach ($mods as $mod) { |
| 136 | 136 | $mid = $mod->getVar('mid'); |
| 137 | 137 | $module_name = $mod->getVar('name'); |
| 138 | - $module_url = "\".XOOPS_URL.\"/modules/" . $mod->getVar('dirname') . '/' . trim($mod->getInfo('adminindex')); |
|
| 139 | - $module_img = "<img class='admin_layer_img' src='\".XOOPS_URL.\"/modules/" . $mod->getVar('dirname') . '/' . $mod->getInfo('image') . "' alt='' />"; |
|
| 140 | - $module_desc = "<strong>\"._VERSION.\":</strong> " . round($mod->getVar('version') / 100, 2) . "<br><strong>\"._DESCRIPTION.\":</strong> " . $mod->getInfo('description'); |
|
| 138 | + $module_url = "\".XOOPS_URL.\"/modules/".$mod->getVar('dirname').'/'.trim($mod->getInfo('adminindex')); |
|
| 139 | + $module_img = "<img class='admin_layer_img' src='\".XOOPS_URL.\"/modules/".$mod->getVar('dirname').'/'.$mod->getInfo('image')."' alt='' />"; |
|
| 140 | + $module_desc = "<strong>\"._VERSION.\":</strong> ".round($mod->getVar('version') / 100, 2)."<br><strong>\"._DESCRIPTION.\":</strong> ".$mod->getInfo('description'); |
|
| 141 | 141 | |
| 142 | 142 | $top += 15; |
| 143 | - $js .= "\nfunction popUpL" . $mid . "() {\n shutdown();\n popUp('L" . $mid . "',true);}"; |
|
| 144 | - $moveLayers .= "\n setleft('L" . $mid . "'," . $left . ");\n settop('L" . $mid . "'," . $top . ');'; |
|
| 145 | - $shutdown .= "\n popUp('L" . $mid . "',false);"; |
|
| 146 | - $firstleveltable .= "$" . 'xoops_admin_menu_ft[' . $mid . "] = \"<a href='" . $module_url . "' title='" . $module_name . "' onmouseover='moveLayerY(\\\"L" . $mid . "\\\", currentY, event) ; popUpL" . $mid . "(); ' >" . $module_img . "</a><br>\";\n"; |
|
| 147 | - $menu_layers .= "\n<div id='L" . $mid . "' style='position: absolute; visibility: hidden; z-index:1000;' >\n<table class='admin_layer' cellpadding='0' cellspacing='0'>\n<tr><th nowrap='nowrap'>" . $module_name . "</th></tr>\n<tr><td class='even' nowrap='nowrap'>"; |
|
| 143 | + $js .= "\nfunction popUpL".$mid."() {\n shutdown();\n popUp('L".$mid."',true);}"; |
|
| 144 | + $moveLayers .= "\n setleft('L".$mid."',".$left.");\n settop('L".$mid."',".$top.');'; |
|
| 145 | + $shutdown .= "\n popUp('L".$mid."',false);"; |
|
| 146 | + $firstleveltable .= "$".'xoops_admin_menu_ft['.$mid."] = \"<a href='".$module_url."' title='".$module_name."' onmouseover='moveLayerY(\\\"L".$mid."\\\", currentY, event) ; popUpL".$mid."(); ' >".$module_img."</a><br>\";\n"; |
|
| 147 | + $menu_layers .= "\n<div id='L".$mid."' style='position: absolute; visibility: hidden; z-index:1000;' >\n<table class='admin_layer' cellpadding='0' cellspacing='0'>\n<tr><th nowrap='nowrap'>".$module_name."</th></tr>\n<tr><td class='even' nowrap='nowrap'>"; |
|
| 148 | 148 | |
| 149 | 149 | $adminmenu = $mod->getAdminMenu(); |
| 150 | 150 | |
| 151 | 151 | if ($mod->getVar('hasnotification') || ($mod->getInfo('config') && is_array($mod->getInfo('config'))) || ($mod->getInfo('comments') && is_array($mod->getInfo('comments')))) { |
| 152 | 152 | $adminmenu[] = array( |
| 153 | - 'link' => '".XOOPS_URL."/modules/system/admin.php?fct=preferences&op=showmod&mod=' . $mid, |
|
| 153 | + 'link' => '".XOOPS_URL."/modules/system/admin.php?fct=preferences&op=showmod&mod='.$mid, |
|
| 154 | 154 | 'title' => _PREFERENCES, |
| 155 | 155 | 'absolute' => true); |
| 156 | 156 | } |
@@ -159,27 +159,27 @@ discard block |
||
| 159 | 159 | foreach ($adminmenu as $menuitem) { |
| 160 | 160 | $menu_link = trim($menuitem['link']); |
| 161 | 161 | $menu_title = trim($menuitem['title']); |
| 162 | - $menu_target = isset($menuitem['target']) ? " target='" . trim($menuitem['target']) . "'" : ''; |
|
| 162 | + $menu_target = isset($menuitem['target']) ? " target='".trim($menuitem['target'])."'" : ''; |
|
| 163 | 163 | if (isset($menuitem['absolute']) && $menuitem['absolute']) { |
| 164 | 164 | $menu_link = empty($menu_link) ? '#' : $menu_link; |
| 165 | 165 | } else { |
| 166 | - $menu_link = empty($menu_link) ? '#' : "\".XOOPS_URL.\"/modules/" . $mod->getVar('dirname') . '/' . $menu_link; |
|
| 166 | + $menu_link = empty($menu_link) ? '#' : "\".XOOPS_URL.\"/modules/".$mod->getVar('dirname').'/'.$menu_link; |
|
| 167 | 167 | } |
| 168 | 168 | |
| 169 | - $menu_layers .= "\n<img src='\".XOOPS_URL.\"/images/pointer.gif' width='8' height='8' alt='' /> <a href='" . $menu_link . "'" . $menu_target . " onmouseover='popUpL" . $mid . "' >" . $menu_title . "</a><br>\n"; |
|
| 169 | + $menu_layers .= "\n<img src='\".XOOPS_URL.\"/images/pointer.gif' width='8' height='8' alt='' /> <a href='".$menu_link."'".$menu_target." onmouseover='popUpL".$mid."' >".$menu_title."</a><br>\n"; |
|
| 170 | 170 | } |
| 171 | 171 | } |
| 172 | 172 | |
| 173 | - $menu_layers .= "\n<div style='margin-top: 5px; font-size: smaller; text-align: right;'><a href='#' onmouseover='shutdown();'>[" . _CLOSE . "]</a></div></td></tr><tr><th style='font-size: smaller; text-align: left;'>" . $module_img . '<br>' . $module_desc . "</th></tr></table></div>\n"; |
|
| 173 | + $menu_layers .= "\n<div style='margin-top: 5px; font-size: smaller; text-align: right;'><a href='#' onmouseover='shutdown();'>["._CLOSE."]</a></div></td></tr><tr><th style='font-size: smaller; text-align: left;'>".$module_img.'<br>'.$module_desc."</th></tr></table></div>\n"; |
|
| 174 | 174 | } |
| 175 | 175 | $menu_layers .= "\n<script language='JavaScript' type='text/javascript'>\n<!--\nmoveLayers();\nloaded = 1;\n// -->\n</script>\n"; |
| 176 | - $content = '<' . "?php\n"; |
|
| 177 | - $content .= "\$xoops_admin_menu_js = \"" . $js . "\n\";\n\n"; |
|
| 178 | - $content .= "\$xoops_admin_menu_ml = \"" . $moveLayers . "\n\";\n\n"; |
|
| 179 | - $content .= "\$xoops_admin_menu_sd = \"" . $shutdown . "\n\";\n\n"; |
|
| 180 | - $content .= $firstleveltable . "\n"; |
|
| 181 | - $content .= "\$xoops_admin_menu_dv = \"" . $menu_layers . "\";\n"; |
|
| 182 | - $content .= "\n?" . '>'; |
|
| 176 | + $content = '<'."?php\n"; |
|
| 177 | + $content .= "\$xoops_admin_menu_js = \"".$js."\n\";\n\n"; |
|
| 178 | + $content .= "\$xoops_admin_menu_ml = \"".$moveLayers."\n\";\n\n"; |
|
| 179 | + $content .= "\$xoops_admin_menu_sd = \"".$shutdown."\n\";\n\n"; |
|
| 180 | + $content .= $firstleveltable."\n"; |
|
| 181 | + $content .= "\$xoops_admin_menu_dv = \"".$menu_layers."\";\n"; |
|
| 182 | + $content .= "\n?".'>'; |
|
| 183 | 183 | |
| 184 | 184 | return $content; |
| 185 | 185 | } |
@@ -192,11 +192,11 @@ discard block |
||
| 192 | 192 | */ |
| 193 | 193 | function xoops_module_write_admin_menu($content) |
| 194 | 194 | { |
| 195 | - $GLOBALS['xoopsLogger']->addDeprecated(__FUNCTION__ . ' is deprecated, should not be used any longer'); |
|
| 195 | + $GLOBALS['xoopsLogger']->addDeprecated(__FUNCTION__.' is deprecated, should not be used any longer'); |
|
| 196 | 196 | if (!xoopsfwrite()) { |
| 197 | 197 | return false; |
| 198 | 198 | } |
| 199 | - $filename = XOOPS_CACHE_PATH . '/adminmenu.php'; |
|
| 199 | + $filename = XOOPS_CACHE_PATH.'/adminmenu.php'; |
|
| 200 | 200 | if (!$file = fopen($filename, 'w')) { |
| 201 | 201 | echo 'failed open file'; |
| 202 | 202 | |
@@ -232,7 +232,7 @@ discard block |
||
| 232 | 232 | } |
| 233 | 233 | |
| 234 | 234 | $path = substr($path, -1) === '/' ? substr($path, 0, -1) : $path; |
| 235 | - $filename = $path . '/index.html'; |
|
| 235 | + $filename = $path.'/index.html'; |
|
| 236 | 236 | if (file_exists($filename)) { |
| 237 | 237 | return true; |
| 238 | 238 | } |