From: sakamocchi Date: Thu, 3 May 2012 14:30:19 +0000 (+0900) Subject: FIX: Admin:$actions_xxx()を実行していたバグほか細々としたバグの修正 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=e1da5b20c069e0b90ae1a93fca17a448920b05b2;p=nucleus-jp%2Fnucleus-next.git FIX: Admin:$actions_xxx()を実行していたバグほか細々としたバグの修正 --- diff --git a/nucleus/libs/ADMIN.php b/nucleus/libs/ADMIN.php index 07091be..3426a5a 100644 --- a/nucleus/libs/ADMIN.php +++ b/nucleus/libs/ADMIN.php @@ -329,7 +329,7 @@ class Admin // skip to overview when allowed if ( $member->isLoggedIn() && $member->canLogin() ) { - self::$action_overview(); + self::action_overview(); exit; } @@ -912,7 +912,7 @@ class Admin // delete actions are handled by itemdelete (which has confirmation) if ( $actiontype == 'delete' ) { - self::$action_itemdelete(); + self::action_itemdelete(); return; } @@ -985,7 +985,7 @@ class Admin if ( $catid != intPostVar('catid') ) { - self::$action_categoryedit( + self::action_categoryedit( $catid, $blog->getID(), $CONF['AdminURL'] . 'index.php?action=itemlist&blogid=' . getBlogIDFromItemID($itemid) @@ -997,7 +997,7 @@ class Admin $item = Item::getItem($itemid, 0, 0); $cnt = quickQuery('SELECT COUNT(*) FROM ' . sql_table('item') . ' WHERE unix_timestamp(itime) <= ' . $item['timestamp']); $_REQUEST['start'] = $cnt + 1; - self::$action_itemlist(getBlogIDFromItemID($itemid)); + self::action_itemlist(getBlogIDFromItemID($itemid)); } return; } @@ -1050,7 +1050,7 @@ class Admin // delete item (note: some checks will be performed twice) self::deleteOneItem($itemid); - self::$action_itemlist($blogid); + self::action_itemlist($blogid); return; } @@ -1177,11 +1177,11 @@ class Admin if ( $catid != intRequestVar('catid') ) { - self::$action_categoryedit($catid, $blog->getID()); + self::action_categoryedit($catid, $blog->getID()); } else { - self::$action_itemlist(getBlogIDFromCatID($catid)); + self::action_itemlist(getBlogIDFromCatID($catid)); } return; } @@ -1237,7 +1237,7 @@ class Admin if ( $result['status'] == 'newcategory' ) { $distURI = $manager->addTicketToUrl($CONF['AdminURL'] . 'index.php?action=itemList&blogid=' . intval($blogid)); - self::$action_categoryedit($result['catid'], $blogid, $distURI); + self::action_categoryedit($result['catid'], $blogid, $distURI); } else { @@ -1326,11 +1326,11 @@ class Admin if ( $member->canAlterItem($itemid) ) { - self::$action_itemcommentlist($itemid); + self::action_itemcommentlist($itemid); } else { - self::$action_browseowncomments(); + self::action_browseowncomments(); } return; } @@ -1383,11 +1383,11 @@ class Admin if ( $member->canAlterItem($itemid) ) { - self::$action_itemcommentlist($itemid); + self::action_itemcommentlist($itemid); } else { - self::$action_browseowncomments(); + self::action_browseowncomments(); } return; } @@ -1458,7 +1458,7 @@ class Admin */ static private function action_memberedit() { - self::$action_editmembersettings(intRequestVar('memberid')); + self::action_editmembersettings(intRequestVar('memberid')); return; } @@ -1645,7 +1645,7 @@ class Admin { $member->logout(); } - self::$action_login(_MSG_ACTIVATION_SENT, 0); + self::action_login(_MSG_ACTIVATION_SENT, 0); return; } @@ -1654,11 +1654,11 @@ class Admin { $mem->newCookieKey(); $member->logout(); - self::$action_login(_MSG_LOGINAGAIN, 0); + self::action_login(_MSG_LOGINAGAIN, 0); } else { - self::$action_overview(_MSG_SETTINGSCHANGED); + self::action_overview(_MSG_SETTINGSCHANGED); } return; } @@ -1711,7 +1711,7 @@ class Admin ); $manager->notify('PostRegister', $data); - self::$action_usermanagement(); + self::action_usermanagement(); return; } @@ -1900,7 +1900,7 @@ class Admin self::error(_ERROR_ALREADYONTEAM); } - self::$action_manageteam(); + self::action_manageteam(); return; } @@ -1947,7 +1947,7 @@ class Admin { self::error($error); } - self::$action_manageteam(); + self::action_manageteam(); return; } @@ -2053,11 +2053,11 @@ class Admin // only show manageteam if member did not change its own admin privileges if ( $member->isBlogAdmin($blogid) ) { - self::$action_manageteam(); + self::action_manageteam(); } else { - self::$action_overview(_MSG_ADMINCHANGED); + self::action_overview(_MSG_ADMINCHANGED); } return; } @@ -2119,7 +2119,7 @@ class Admin $blog =& $manager->getBlog($blogid); $newCatID = $blog->createNewCategory($cname, $cdesc); - self::$action_blogsettings(); + self::action_blogsettings(); return; } @@ -2214,7 +2214,7 @@ class Admin } else { - self::$action_blogsettings(); + self::action_blogsettings(); } return; } @@ -2284,7 +2284,7 @@ class Admin self::error($error); } - self::$action_blogsettings(); + self::action_blogsettings(); return; } @@ -2444,7 +2444,7 @@ class Admin ); $manager->notify('PostPluginOptionsUpdate', $data); - self::$action_overview(_MSG_SETTINGSCHANGED); + self::action_overview(_MSG_SETTINGSCHANGED); return; } @@ -2530,7 +2530,7 @@ class Admin $data = array('blogid' => $blogid); $manager->notify('PostDeleteBlog', $data); - self::$action_overview(_DELETED_BLOG); + self::action_overview(_DELETED_BLOG); return; } @@ -2578,11 +2578,11 @@ class Admin if ( $member->isAdmin() ) { - self::$action_usermanagement(); + self::action_usermanagement(); } else { - self::$action_overview(_DELETED_MEMBER); + self::action_overview(_DELETED_MEMBER); } return; } @@ -2779,7 +2779,7 @@ class Admin $blog->setURL(trim($burl)); $blog->writeSettings(); - self::$action_overview(_MSG_NEWBLOG); + self::action_overview(_MSG_NEWBLOG); return; } @@ -3128,7 +3128,7 @@ class Admin } // jump back to template edit - self::$action_templateedit(_TEMPLATE_UPDATED); + self::action_templateedit(_TEMPLATE_UPDATED); return; } @@ -3206,7 +3206,7 @@ class Admin $data = array('templateid' => $templateid); $manager->notify('PostDeleteTemplate', $data); - self::$action_templateoverview(); + self::action_templateoverview(); return; } @@ -3237,7 +3237,7 @@ class Admin $newTemplateId = Template::createNew($name, $desc); - self::$action_templateoverview(); + self::action_templateoverview(); return; } @@ -3286,7 +3286,7 @@ class Admin self::addToTemplate($newid, $o->tpartname, $o->tcontent); } - self::$action_templateoverview(); + self::action_templateoverview(); return; } @@ -3482,7 +3482,7 @@ class Admin } // jump back to template edit - self::$action_admintemplateedit(_TEMPLATE_UPDATED); + self::action_admintemplateedit(_TEMPLATE_UPDATED); return; } @@ -3555,7 +3555,7 @@ class Admin $data = array('templateid' => $templateid); $manager->notify('PostDeleteAdminTemplate', $data); - self::$action_admintemplateoverview(); + self::action_admintemplateoverview(); return; } @@ -3582,7 +3582,7 @@ class Admin } $newTemplateId = Template::createNew($name, $desc); - self::$action_admintemplateoverview(); + self::action_admintemplateoverview(); return; } @@ -3629,7 +3629,7 @@ class Admin self::addToAdminTemplate($newid, $o->tpartname, $o->tcontent); } - self::$action_admintemplateoverview(); + self::action_admintemplateoverview(); return; } @@ -3678,7 +3678,7 @@ class Admin $newId = SKIN::createNew($name, $desc); - self::$action_skinoverview(); + self::action_skinoverview(); return; } @@ -3745,7 +3745,7 @@ class Admin // 2. Update description $skin->updateGeneralInfo($name, $desc, $type, $inc_mode, $inc_prefix); - self::$action_skinedit(); + self::action_skinedit(); return; } @@ -3795,7 +3795,7 @@ class Admin $skin = new SKIN($skinid); $skin->update($type, $content); - self::$action_skinedittype(_SKIN_UPDATED); + self::action_skinedittype(_SKIN_UPDATED); return; } @@ -3881,7 +3881,7 @@ class Admin $data = array('skinid' => $skinid); $manager->notify('PostDeleteSkin', $data); - self::$action_skinoverview(); + self::action_skinoverview(); return; } @@ -3962,7 +3962,7 @@ class Admin ); $manager->notify('PostDeleteSkinPart', $data); - self::$action_skinedit(); + self::action_skinedit(); return; } @@ -4013,7 +4013,7 @@ class Admin self::$skinclonetype($skin, $newid, $row['stype']); } - self::$action_skinoverview(); + self::action_skinoverview(); return; } @@ -4080,7 +4080,7 @@ class Admin } /* TODO: $newId is not reused... */ $newId = Skin::createNew($name, $desc); - self::$action_adminskinoverview(); + self::action_adminskinoverview(); return; } @@ -4142,7 +4142,7 @@ class Admin } // 2. Update description $skin->updateGeneralInfo($name, $desc, $type, $inc_mode, $inc_prefix); - self::$action_adminskinedit(); + self::action_adminskinedit(); return; } @@ -4194,7 +4194,7 @@ class Admin $skin = new Skin($skinid, 'Admin', 'AdminSkin'); $skin->update($type, $content); - self::$action_adminskinedittype(_SKIN_UPDATED); + self::action_adminskinedittype(_SKIN_UPDATED); return; } @@ -4261,7 +4261,7 @@ class Admin $data = array('skinid' => intval($skinid)); $manager->notify('PostDeleteAdminSkin', $data); - self::$action_adminskinoverview(); + self::action_adminskinoverview(); return; } @@ -4328,7 +4328,7 @@ class Admin ); $manager->notify('PostDeleteAdminSkinPart', $data); - self::$action_adminskinedit(); + self::action_adminskinedit(); return; } @@ -4378,7 +4378,7 @@ class Admin { self::$skinclonetype($skin, $newid, $row['stype']); } - self::$action_adminskinoverview(); + self::action_adminskinoverview(); return; } @@ -4577,7 +4577,8 @@ class Admin $info = postVar('info'); - $exporter = new SkinEXPORT(); + include_libs('skinie.php'); + $exporter = new SkinExport(); foreach ( $skinList as $skinId ) { $exporter->addSkin($skinId); @@ -5164,7 +5165,7 @@ class Admin */ static private function action_banlistnewfromitem() { - self::$action_banlistnew(getBlogIDFromItemID(intRequestVar('itemid'))); + self::action_banlistnew(getBlogIDFromItemID(intRequestVar('itemid'))); return; } @@ -5245,7 +5246,7 @@ class Admin self::error(_ERROR_ADDBAN); } } - self::$action_banlist(); + self::action_banlist(); return; } @@ -5263,7 +5264,7 @@ class Admin ActionLog::clear(); - self::$action_manage(_MSG_ACTIONLOGCLEARED); + self::action_manage(_MSG_ACTIONLOGCLEARED); return; } @@ -5492,7 +5493,7 @@ class Admin $manager->notify('PostAddPlugin', $data); // update all events - self::$action_pluginupdate(); + self::action_pluginupdate(); return; } @@ -5703,7 +5704,7 @@ class Admin sql_query('UPDATE ' . sql_table('plugin') . ' SET porder=' . $oldOrder . ' WHERE porder=' . $newOrder); sql_query('UPDATE ' . sql_table('plugin') . ' SET porder=' . $newOrder . ' WHERE pid=' . $plugid); - //self::$action_pluginlist(); + //self::action_pluginlist(); // To avoid showing ticket in the URL, redirect to pluginlist, instead. redirect($CONF['AdminURL'] . '?action=pluginlist'); return; @@ -5743,7 +5744,7 @@ class Admin sql_query('UPDATE ' . sql_table('plugin') . ' SET porder=' . $oldOrder . ' WHERE porder=' . $newOrder); sql_query('UPDATE ' . sql_table('plugin') . ' SET porder=' . $newOrder . ' WHERE pid=' . $plugid); - //self::$action_pluginlist(); + //self::action_pluginlist(); // To avoid showing ticket in the URL, redirect to pluginlist, instead. redirect($CONF['AdminURL'] . '?action=pluginlist'); return; @@ -5815,7 +5816,7 @@ class Admin ); $manager->notify('PostPluginOptionsUpdate', $data); - self::$action_pluginoptions(_PLUGS_OPTIONS_UPDATED); + self::action_pluginoptions(_PLUGS_OPTIONS_UPDATED); return; } diff --git a/nucleus/libs/AdminActions.php b/nucleus/libs/AdminActions.php index 847cfb6..41578ff 100644 --- a/nucleus/libs/AdminActions.php +++ b/nucleus/libs/AdminActions.php @@ -3711,6 +3711,7 @@ class AdminActions extends BaseActions $prevPid = -1; + include_libs('ACTIONS.php'); $handler = new Actions($this->skintype); $parser = new PARSER($handler); @@ -4113,7 +4114,7 @@ class AdminActions extends BaseActions if ( $this->skintype == 'itemmove' ) { $query = "SELECT icat as result FROM %s WHERE inumber=%d;"; - $query = spriintf($query, sql_table('item'), intRequestVar('itemid')); + $query = sprintf($query, sql_table('item'), intRequestVar('itemid')); $catid = quickQuery(sprintf($query, intRequestVar('itemid'))); Admin::selectBlogCategory('catid', $catid, 10, 1); } @@ -4455,7 +4456,7 @@ class AdminActions extends BaseActions { $template['body'] = $templates['PLUGIN_QUICKMENU_BODY']; } - if ( array_key_exists('PLUGIN_QUICKMENU_FOOT', $templates) || !empty($templates['PLUGIN_QUICKMENU_FOOT']) ) + if ( !array_key_exists('PLUGIN_QUICKMENU_FOOT', $templates) || empty($templates['PLUGIN_QUICKMENU_FOOT']) ) { $template['foot'] = "\n"; } @@ -5505,7 +5506,7 @@ class AdminActions extends BaseActions $templates = Template::read($tplName); } - if ( !array_key_exists($templates['ADMIN_CUSTOMHELPLINK_ANCHOR']) || empty($templates['ADMIN_CUSTOMHELPLINK_ANCHOR']) ) + if ( !array_key_exists('ADMIN_CUSTOMHELPLINK_ANCHOR', $templates) || empty($templates['ADMIN_CUSTOMHELPLINK_ANCHOR']) ) { $template = "#<%helptarget%>\" title=\"<%title%>\" <%onclick%>>\n"; } diff --git a/nucleus/libs/showlist.php b/nucleus/libs/showlist.php index 1cc3a02..4a03679 100644 --- a/nucleus/libs/showlist.php +++ b/nucleus/libs/showlist.php @@ -1176,7 +1176,7 @@ function listplug_table_bloglist($vars, $type, $templateName = '') break; case 'BODY': $current = $vars['current']; - if ( !array_key_exists('SHOWLIST_LISTPLUG_TABLE_BLOGLIST_BODY'. $templates) || empty($templates['SHOWLIST_LISTPLUG_TABLE_BLOGLIST_BODY']) ) + if ( !array_key_exists('SHOWLIST_LISTPLUG_TABLE_BLOGLIST_BODY', $templates) || empty($templates['SHOWLIST_LISTPLUG_TABLE_BLOGLIST_BODY']) ) { $template = " shortname:<%shortname%>\">\n" . "\">\"<%iconalt%\" /><%blogname%>\n" @@ -1208,7 +1208,7 @@ function listplug_table_bloglist($vars, $type, $templateName = '') if ( !array_key_exists('SHOWLIST_LISTPLUG_TABLE_BLIST_BD_TADM', $templates) || empty($templates['SHOWLIST_LISTPLUG_TABLE_BLIST_BD_TADM']) ) { $template .= "\" title=\"<%ttsettingtext%>\"><%settingtext%>\n" - . "\" title=\"<%ttbanstext%>\"><%banstext%>\n"; + . "\" title=\"<%ttbanstext%>\"><%banstext%>\n"; } else { @@ -1224,7 +1224,7 @@ function listplug_table_bloglist($vars, $type, $templateName = '') { if ( !array_key_exists('SHOWLIST_LISTPLUG_TABLE_BLIST_BD_TADM', $templates) || empty($templates['SHOWLIST_LISTPLUG_TABLE_BLIST_BD_TADM']) ) { - $template .= "\" title=\"<%ttdeletetext%>\"><%deletetext%>\n"; + $template .= "\" title=\"<%ttdeletetext%>\"><%deletetext%>\n"; } else { @@ -1805,7 +1805,7 @@ function listplug_table_actionlist($vars, $type, $templateName = '') switch( $type ) { case 'HEAD': - if ( !array_key_exists('SHOWLIST_LISTPLUG_TABLE_ACTNLIST_HEAD'. $templates) || empty($templates['SHOWLIST_LISTPLUG_TABLE_ACTNLIST_HEAD']) ) + if ( !array_key_exists('SHOWLIST_LISTPLUG_TABLE_ACTNLIST_HEAD', $templates) || empty($templates['SHOWLIST_LISTPLUG_TABLE_ACTNLIST_HEAD']) ) { $template = "<%coltime%>\n" . "<%colmesg%>\n"; @@ -1928,7 +1928,7 @@ function listplug_table_adminskinlist($vars, $type, $templateName = '') switch( $type ) { case 'HEAD': - if ( !array_key_exists($templates['SHOWLIST_LISTPLUG_TABLE_SKINLIST_HEAD']) || empty($templates['SHOWLIST_LISTPLUG_TABLE_SKINLIST_HEAD']) ) + if ( !array_key_exists('SHOWLIST_LISTPLUG_TABLE_SKINLIST_HEAD', $templates) || empty($templates['SHOWLIST_LISTPLUG_TABLE_SKINLIST_HEAD']) ) { $template = "<%colname%>\n" . "<%coldesc%>\n"