OSDN Git Service

tmp
authorshizuki <shizuki@kinezumi.net>
Thu, 26 Apr 2012 02:11:38 +0000 (11:11 +0900)
committershizuki <shizuki@kinezumi.net>
Thu, 26 Apr 2012 02:11:38 +0000 (11:11 +0900)
install/index.php
install/install.sql
nucleus/libs/AdminActions.php

index 82c8dbc..10754db 100644 (file)
@@ -44,7 +44,7 @@ if ( version_compare(PHP_VERSION, '5.3.0', '<') )
 \r
 /* default installed plugins and skins */\r
 $aConfPlugsToInstall = array('NP_SecurityEnforcer', 'NP_SkinFiles', 'NP_Text');\r
-$aConfSkinsToImport = array('atom', 'rss2.0', 'rsd', 'default');\r
+$aConfSkinsToImport = array('atom', 'rss2.0', 'rsd', 'default', 'defaultadmin');\r
 \r
 // Check if some important files\r
 do_check_files();\r
index 8d0b892..c12e5cd 100644 (file)
@@ -115,6 +115,7 @@ INSERT INTO nucleus_config VALUES ('DatabaseVersion', '350');
 INSERT INTO nucleus_config VALUES ('DebugVars', '0');\r
 INSERT INTO nucleus_config VALUES ('DefaultListSize', '10');\r
 INSERT INTO nucleus_config VALUES ('AdminCSS', 'original');\r
+INSERT INTO nucleus_config VALUES ('DefaultAdminSkin', '0');\r
 \r
 CREATE TABLE nucleus_item (\r
   inumber int(11) NOT NULL auto_increment,\r
@@ -157,12 +158,13 @@ CREATE TABLE nucleus_member (
   mcookiekey varchar(40) default NULL,\r
   mlocale varchar(20) NOT NULL default '',\r
   mautosave tinyint(2) NOT NULL default '1',\r
+  adminskin tinyint(2) NOT NULL default '0',\r
   PRIMARY KEY  (mnumber),\r
 --  UNIQUE KEY mnumber (mnumber),\r
   UNIQUE KEY mname (mname)\r
 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;\r
 \r
-INSERT INTO nucleus_member VALUES (1, 'example', 'example', '1a79a4d60de6718e8e5b326e338ae533', 'example@example.org', 'http://localhost:8080/nucleus/', '', 1, 1, 'd767aefc60415859570d64c649257f19', '', 1);\r
+INSERT INTO nucleus_member VALUES (1, 'example', 'example', '1a79a4d60de6718e8e5b326e338ae533', 'example@example.org', 'http://localhost:8080/nucleus/', '', 1, 1, 'd767aefc60415859570d64c649257f19', '', 1, 0);\r
 \r
 CREATE TABLE nucleus_plugin (\r
   pid int(11) NOT NULL auto_increment,\r
index 5d223ce..06862a9 100644 (file)
@@ -1230,8 +1230,8 @@ class AdminActions extends BaseActions
                switch ( $type )
                {
                        case 'skin':
-                               $query = "SELECT * FROM %s;";
-                               $query = sprintf($query, sql_table('adminskin_desc'));
+                               $query = "SELECT * FROM %s WHERE sdincmode = 'admin';";
+                               $query = sprintf($query, sql_table('skin_desc'));
                                $res = sql_query($query);
                                
                                while ( $skinObj = sql_fetch_object($res) )
@@ -1273,8 +1273,8 @@ class AdminActions extends BaseActions
         */
        public function parse_adminskinoverview($templateName = '')
        {
-               $query = "SELECT * FROM %s ORDER BY sdname;";
-               $query = sprintf($query, sql_table('adminskin_desc'));
+               $query = "SELECT * FROM %s WHERE sdincmode = 'admin' ORDER BY sdname;";
+               $query = sprintf($query, sql_table('skin_desc'));
                
                $template['content']    = 'adminskinlist';
                $template['tabindex']   = 10;
@@ -1293,8 +1293,8 @@ class AdminActions extends BaseActions
        public function parse_adminskinselectoptions()
        {
                global $CONF;
-               $query = "SELECT sdname as text, sdnumber as value FROM %s;";
-               $query = sprintf($query, sql_table('adminskin_desc'));
+               $query = "SELECT sdname as text, sdnumber as value FROM %s WHERE sdincmode = 'admin';";
+               $query = sprintf($query, sql_table('skin_desc'));
                
                $template['name']        = 'adminskin';
                $template['selected'] = $CONF['DefaultAdminSkin'];
@@ -1321,7 +1321,7 @@ class AdminActions extends BaseActions
                $skinid = intRequestVar('skinid');
                
                $query = "SELECT stype FROM  %s WHERE stype NOT IN (%s) AND sdesc=%d;";
-               $query = sprintf($query, sql_table('adminskin'), "'" . implode("', '", $nType) . "'", (integer) $skinid);
+               $query = sprintf($query, sql_table('skin'), "'" . implode("', '", $nType) . "'", (integer) $skinid);
                
                $res    = sql_query($query);
                if ( $res && sql_num_rows($res) > 0 )