use set_x_from_post

git-svn-id: file:///home/shish/svn/shimmie2/trunk@24 7f39781d-f577-437e-ae19-be835c7a54ca
This commit is contained in:
shish 2007-04-28 15:49:25 +00:00
parent 5bd3789b74
commit bed0e5260b
9 changed files with 27 additions and 30 deletions

View file

@ -44,11 +44,11 @@ class ImageIO extends Extension {
$event->panel->add_main_block($sb);
}
if(is_a($event, 'ConfigSaveEvent')) {
$event->config->set_string("thumb_engine", $_POST['thumb_engine']);
$event->config->set_int("thumb_width", $_POST['thumb_width']);
$event->config->set_int("thumb_height", $_POST['thumb_height']);
$event->config->set_int("thumb_quality", $_POST['thumb_quality']);
$event->config->set_int("thumb_gd_mem_limit", $_POST['thumb_gd_mem_limit']);
$event->config->set_string_from_post("thumb_engine");
$event->config->set_int_from_post("thumb_width");
$event->config->set_int_from_post("thumb_height");
$event->config->set_int_from_post("thumb_quality");
$event->config->set_int_from_post("thumb_gd_mem_limit");
}
}
// }}}

View file

@ -72,9 +72,9 @@ class Index extends Extension {
$event->panel->add_main_block($sb, 20);
}
if(is_a($event, 'ConfigSaveEvent')) {
$event->config->set_int("index_width", $_POST['index_width']);
$event->config->set_int("index_height", $_POST['index_height']);
$event->config->set_string("image_tip", $_POST['image_tip']);
$event->config->set_int_from_post("index_width");
$event->config->set_int_from_post("index_height");
$event->config->set_string_from_post("image_tip");
}
}
// }}}

View file

@ -138,12 +138,12 @@ class Setup extends Extension {
$event->panel->add_main_block($sb, 0);
}
if(is_a($event, 'ConfigSaveEvent')) {
$event->config->set_string("title", $_POST['title']);
$event->config->set_string("base_href", $_POST['base_href']);
$event->config->set_string("data_href", $_POST['data_href']);
$event->config->set_string("contact_link", $_POST['contact_link']);
$event->config->set_string("theme", $_POST['theme']);
$event->config->set_int("anon_id", $_POST['anon_id']);
$event->config->set_string_from_post("title");
$event->config->set_string_from_post("base_href");
$event->config->set_string_from_post("data_href");
$event->config->set_string_from_post("contact_link");
$event->config->set_string_from_post("theme");
$event->config->set_int_from_post("anon_id");
}
}
// }}}

View file

@ -40,9 +40,9 @@ class Upload extends Extension {
$event->panel->add_main_block($sb, 10);
}
if(is_a($event, 'ConfigSaveEvent')) {
$event->config->set_int("upload_count", $_POST['upload_count']);
$event->config->set_int("upload_size", $_POST['upload_size']);
$event->config->set_bool("upload_anon", $_POST['upload_anon']);
$event->config->set_int_from_post("upload_count");
$event->config->set_int_from_post("upload_size");
$event->config->set_bool_from_post("upload_anon");
}
}
// }}}

View file

@ -66,9 +66,9 @@ class UserPage extends Extension {
$event->panel->add_main_block($sb);
}
if(is_a($event, 'ConfigSaveEvent')) {
$event->config->set_int("login_memory", $_POST['login_memory']);
$event->config->set_bool("login_signup_enabled", $_POST['login_signup_enabled']);
$event->config->set_string("login_tac", $_POST['login_tac']);
$event->config->set_int_from_post("login_memory");
$event->config->set_bool_from_post("login_signup_enabled");
$event->config->set_string_from_post("login_tac");
}
}
// }}}

View file

@ -41,15 +41,12 @@ class ViewImage extends Extension {
$sb->add_text_option("image_slink");
$sb->add_label("<br>Thumbnail link ");
$sb->add_text_option("image_tlink");
//$sb->add_label("<br>Zoom by default");
//$sb->add_bool_option("view_scale");
$event->panel->add_main_block($sb, 30);
}
if(is_a($event, 'ConfigSaveEvent')) {
$event->config->set_string("image_ilink", $_POST['image_ilink']);
$event->config->set_string("image_slink", $_POST['image_slink']);
$event->config->set_string("image_tlink", $_POST['image_tlink']);
//$event->config->set_bool("view_scale", $_POST['view_scale']);
$event->config->set_string_from_post("image_ilink");
$event->config->set_string_from_post("image_slink");
$event->config->set_string_from_post("image_tlink");
}
}
// }}}

View file

@ -14,8 +14,8 @@ class Downtime extends Extension {
$event->panel->add_main_block($sb);
}
if(is_a($event, 'ConfigSaveEvent')) {
$event->config->set_bool("downtime", $_POST['downtime']);
$event->config->set_string("downtime_message", $_POST['downtime_message']);
$event->config->set_bool_from_post("downtime");
$event->config->set_string_from_post("downtime_message");
}
if(is_a($event, 'PageRequestEvent')) {
global $config;

View file

@ -15,7 +15,7 @@ class News extends Extension {
$event->panel->add_main_block($sb);
}
if(is_a($event, 'ConfigSaveEvent')) {
$event->config->set_string("news_text", $_POST['news_text']);
$event->config->set_string_from_post("news_text");
}
}
}

View file

@ -14,7 +14,7 @@ class Zoom extends Extension {
$event->panel->add_main_block($sb);
}
if(is_a($event, 'ConfigSaveEvent')) {
$event->config->set_bool("image_zoom", $_POST['image_zoom']);
$event->config->set_bool_from_post("image_zoom");
}
}