OSDN Git Service

ブックマークレットの不具合修正
[nucleus-jp/nucleus-jp-ancient.git] / nucleus / libs / globalfunctions.php
index 2b7aa02..37f2114 100755 (executable)
@@ -350,27 +350,27 @@ if (!defined('_ARCHIVETYPE_MONTH') ) {
 // decode path_info\r
 if ($CONF['URLMode'] == 'pathinfo') {\r
        // initialize keywords if this hasn't been done before\r
-       if ($CONF['ItemKey'] == '') {\r
+       if (!isset($CONF['ItemKey']) || $CONF['ItemKey'] == '') {\r
                $CONF['ItemKey'] = 'item';\r
        }\r
 \r
-       if ($CONF['ArchiveKey'] == '') {\r
+       if (!isset($CONF['ArchiveKey']) || $CONF['ArchiveKey'] == '') {\r
                $CONF['ArchiveKey'] = 'archive';\r
        }\r
 \r
-       if ($CONF['ArchivesKey'] == '') {\r
+       if (!isset($CONF['ArchivesKey']) || $CONF['ArchivesKey'] == '') {\r
                $CONF['ArchivesKey'] = 'archives';\r
        }\r
 \r
-       if ($CONF['MemberKey'] == '') {\r
+       if (!isset($CONF['MemberKey']) || $CONF['MemberKey'] == '') {\r
                $CONF['MemberKey'] = 'member';\r
        }\r
 \r
-       if ($CONF['BlogKey'] == '') {\r
+       if (!isset($CONF['BlogKey']) || $CONF['BlogKey'] == '') {\r
                $CONF['BlogKey'] = 'blog';\r
        }\r
 \r
-       if ($CONF['CategoryKey'] == '') {\r
+       if (!isset($CONF['CategoryKey']) || $CONF['CategoryKey'] == '') {\r
                $CONF['CategoryKey'] = 'category';\r
        }\r
 \r
@@ -839,6 +839,8 @@ function selector() {
 \r
                if ($b->isValidCategory($catid) ) {\r
                        $catextra = ' and icat=' . $catid;\r
+               } else {\r
+                       $catextra = '';\r
                }\r
 \r
                // get previous itemid and title\r
@@ -1201,11 +1203,13 @@ function help($id) {
 }\r
 \r
 function helpHtml($id) {\r
-       return helplink($id) . '<img src="documentation/icon-help.gif" width="15" height="15" alt="' . _HELP_TT . '" /></a>';\r
+       global $CONF;\r
+       return helplink($id) . '<img src="' . $CONF['AdminURL'] . 'documentation/icon-help.gif" width="15" height="15" alt="' . _HELP_TT . '" /></a>';\r
 }\r
 \r
 function helplink($id) {\r
-       return '<a href="documentation/help.html#'. $id . '" onclick="if (event &amp;&amp; event.preventDefault) event.preventDefault(); return help(this.href);">';\r
+       global $CONF;\r
+       return '<a href="' . $CONF['AdminURL'] . 'documentation/help.html#'. $id . '" onclick="if (event &amp;&amp; event.preventDefault) event.preventDefault(); return help(this.href);">';\r
 }\r
 \r
 function getMailFooter() {\r
@@ -2055,7 +2059,7 @@ function getBookmarklet($blogid) {
        $document = 'document';\r
        $bookmarkletline = "javascript:Q='';x=".$document.";y=window;if(x.selection){Q=x.selection.createRange().text;}else if(y.getSelection){Q=y.getSelection();}else if(x.getSelection){Q=x.getSelection();}wingm=window.open('";\r
        $bookmarkletline .= $CONF['AdminURL'] . "bookmarklet.php?blogid=$blogid";\r
-       $bookmarkletline .="&logtext='+escape(Q)+'&loglink='+escape(x.location.href)+'&loglinktitle='+escape(x.title),'nucleusbm','scrollbars=yes,width=600,height=550,left=10,top=10,status=yes,resizable=yes');wingm.focus();";\r
+       $bookmarkletline .="&logtext='+escape(Q)+'&loglink='+escape(x.location.href)+'&loglinktitle='+escape(x.title),'nucleusbm','toolbar=no,scrollbars=no,width=600,height=550,left=10,top=10,status=no,resizable=yes');wingm.focus();";\r
 \r
        return $bookmarkletline;\r
 }\r