From be74112322d95feab2a496ecd4ed272f41b0b701 Mon Sep 17 00:00:00 2001 From: Cake Date: Fri, 7 Jan 2011 20:50:38 +0900 Subject: [PATCH] =?utf8?q?public=5Fflag=5Fdefault=E8=A8=AD=E5=AE=9A?= =?utf8?q?=E3=81=AE=E5=89=8A=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- app/config/sql/install/create_table.sql | 1 - app/config/sql/install/upgrade/bto1_0/upgrade.sql | 1 + app/models/character.php | 10 ---------- app/models/profile.php | 20 ++------------------ app/views/profiles/admin_add.ctp | 6 ------ app/views/profiles/admin_edit.ctp | 6 ------ 6 files changed, 3 insertions(+), 41 deletions(-) diff --git a/app/config/sql/install/create_table.sql b/app/config/sql/install/create_table.sql index 41123ac..434af12 100644 --- a/app/config/sql/install/create_table.sql +++ b/app/config/sql/install/create_table.sql @@ -177,7 +177,6 @@ CREATE TABLE `profiles` ( `required` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0', `show_list` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0', `search` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0', - `public_flag_default` ENUM('public', 'private') NULL DEFAULT 'public', `sort_order` INTEGER UNSIGNED NOT NULL DEFAULT '0', PRIMARY KEY(`id`), INDEX `profiles_sort`(`sort_order`), diff --git a/app/config/sql/install/upgrade/bto1_0/upgrade.sql b/app/config/sql/install/upgrade/bto1_0/upgrade.sql index 06e5928..babed67 100644 --- a/app/config/sql/install/upgrade/bto1_0/upgrade.sql +++ b/app/config/sql/install/upgrade/bto1_0/upgrade.sql @@ -22,3 +22,4 @@ CREATE TABLE `default_profiles` ( FOREIGN KEY (`profile_table_static_id`) REFERENCES `profile_table_statics` (`id`) ON DELETE CASCADE ) TYPE=InnoDB DEFAULT CHARSET=utf8; +ALTER TABLE `profiles` DROP column `public_flag_default`; diff --git a/app/models/character.php b/app/models/character.php index 67bf0a1..48d344b 100644 --- a/app/models/character.php +++ b/app/models/character.php @@ -180,16 +180,6 @@ class Character extends AppModel { } } - /* check PublicFlag Setting */ - function publicFlagDefault($data) - { - if (isset($data["public_flag_default"]) && in_array($data["public_flag_default"], $this->public_flag)) { - return true; - } else { - return false; - } - } - /* コールバックメソッド */ function beforeSave($options = array()) { diff --git a/app/models/profile.php b/app/models/profile.php index 61cf857..f389e7a 100644 --- a/app/models/profile.php +++ b/app/models/profile.php @@ -27,8 +27,8 @@ class Profile extends AppModel { ); var $fields = array( - 'add' => array('system_id', 'name', 'key_name', 'profile_type', 'required', 'show_list', 'search', 'public_flag_default', 'sort_order'), - 'edit' => array('name', 'key_name', 'profile_type', 'required', 'show_list', 'search', 'public_flag_default', 'sort_order'), + 'add' => array('system_id', 'name', 'key_name', 'profile_type', 'required', 'show_list', 'search', 'sort_order'), + 'edit' => array('name', 'key_name', 'profile_type', 'required', 'show_list', 'search', 'sort_order'), 'edit_all' => array('required', 'show_list', 'search','sort_order'), 'escape' => array( 'name' => array( @@ -86,12 +86,6 @@ class Profile extends AppModel { 'allowEmpty' => true, ), ), - 'public_flag_default' => array( - 'publicFlag' => array( - 'rule' => 'publicFlagDefault', - 'allowEmpty' => true, - ), - ), 'sort_order' => array( 'numeric' => array( 'rule' => array('numeric'), @@ -204,16 +198,6 @@ class Profile extends AppModel { } } - function publicFlagDefault($data) - { - if (isset($data["public_flag_default"]) && in_array($data["public_flag_default"], $this->public_flag)) { - return true; - } else { - return false; - } - } - - /* コールバックメソッド */ function beforeSave($options = array()) { diff --git a/app/views/profiles/admin_add.ctp b/app/views/profiles/admin_add.ctp index 129ff29..62af60e 100644 --- a/app/views/profiles/admin_add.ctp +++ b/app/views/profiles/admin_add.ctp @@ -74,12 +74,6 @@ 'default' => 0, )); -/* echo $select->create_publicflag_select($public_flags, 'public_flag_default', array( - 'label' => __('Default Public Flag', true), - 'selected' => 'public', - ) - );*/ - echo $token->create(); ?> diff --git a/app/views/profiles/admin_edit.ctp b/app/views/profiles/admin_edit.ctp index 983286a..32f9d04 100644 --- a/app/views/profiles/admin_edit.ctp +++ b/app/views/profiles/admin_edit.ctp @@ -74,12 +74,6 @@ 'label' => __('Target of Search', true) )); -/* echo $select->create_publicflag_select($public_flags, 'public_flag_default', array( - 'label' => __('Default Public Flag', true), - 'selected' => 'public', - ) - );*/ - echo $token->create(); ?> -- 2.11.0