onokazu
onoka****@users*****
2005年 9月 5日 (月) 05:46:12 JST
Index: xoops2jp/html/modules/system/blocks/system_blocks.php diff -u xoops2jp/html/modules/system/blocks/system_blocks.php:1.5 xoops2jp/html/modules/system/blocks/system_blocks.php:1.6 --- xoops2jp/html/modules/system/blocks/system_blocks.php:1.5 Wed Aug 3 21:40:01 2005 +++ xoops2jp/html/modules/system/blocks/system_blocks.php Mon Sep 5 05:46:12 2005 @@ -1,5 +1,5 @@ <?php -// $Id: system_blocks.php,v 1.5 2005/08/03 12:40:01 onokazu Exp $ +// $Id: system_blocks.php,v 1.6 2005/09/04 20:46:12 onokazu Exp $ // ------------------------------------------------------------------------ // // XOOPS - PHP Content Management System // // Copyright (c) 2000 XOOPS.org // @@ -260,7 +260,11 @@ $block['showgroups'] = false; } $block['logourl'] = XOOPS_URL.'/images/'.$options[2]; - $block['recommendlink'] = "<a href=\"javascript:openWithSelfMain('".XOOPS_URL."/misc.php?action=showpopups&type=friend&op=sendform&t=".time()."','friend',".$options[0].",".$options[1].")\">"._MB_SYSTEM_RECO."</a>"; + if (is_object($xoopsUser)) { + $block['recommendlink'] = "<a href=\"javascript:openWithSelfMain('".XOOPS_URL."/misc.php?action=showpopups&type=friend&op=sendform&t=".time()."','friend',".$options[0].",".$options[1].")\">"._MB_SYSTEM_RECO."</a>"; + } else { + $block['recommendlink'] = ''; + } return $block; } @@ -396,7 +400,7 @@ // Additional form data $block['target_page'] = "notification_update.php"; // FIXME: better or more standardized way to do this? - $script_url = explode('/', $_SERVER['PHP_SELF']); + $script_url = explode('/', xoops_getenv('PHP_SELF')); $script_name = $script_url[count($script_url)-1]; $block['redirect_script'] = $script_name; $block['submit_button'] = _NOT_UPDATENOW;