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:
parent
5bd3789b74
commit
bed0e5260b
9 changed files with 27 additions and 30 deletions
|
@ -44,11 +44,11 @@ class ImageIO extends Extension {
|
||||||
$event->panel->add_main_block($sb);
|
$event->panel->add_main_block($sb);
|
||||||
}
|
}
|
||||||
if(is_a($event, 'ConfigSaveEvent')) {
|
if(is_a($event, 'ConfigSaveEvent')) {
|
||||||
$event->config->set_string("thumb_engine", $_POST['thumb_engine']);
|
$event->config->set_string_from_post("thumb_engine");
|
||||||
$event->config->set_int("thumb_width", $_POST['thumb_width']);
|
$event->config->set_int_from_post("thumb_width");
|
||||||
$event->config->set_int("thumb_height", $_POST['thumb_height']);
|
$event->config->set_int_from_post("thumb_height");
|
||||||
$event->config->set_int("thumb_quality", $_POST['thumb_quality']);
|
$event->config->set_int_from_post("thumb_quality");
|
||||||
$event->config->set_int("thumb_gd_mem_limit", $_POST['thumb_gd_mem_limit']);
|
$event->config->set_int_from_post("thumb_gd_mem_limit");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// }}}
|
// }}}
|
||||||
|
|
|
@ -72,9 +72,9 @@ class Index extends Extension {
|
||||||
$event->panel->add_main_block($sb, 20);
|
$event->panel->add_main_block($sb, 20);
|
||||||
}
|
}
|
||||||
if(is_a($event, 'ConfigSaveEvent')) {
|
if(is_a($event, 'ConfigSaveEvent')) {
|
||||||
$event->config->set_int("index_width", $_POST['index_width']);
|
$event->config->set_int_from_post("index_width");
|
||||||
$event->config->set_int("index_height", $_POST['index_height']);
|
$event->config->set_int_from_post("index_height");
|
||||||
$event->config->set_string("image_tip", $_POST['image_tip']);
|
$event->config->set_string_from_post("image_tip");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// }}}
|
// }}}
|
||||||
|
|
|
@ -138,12 +138,12 @@ class Setup extends Extension {
|
||||||
$event->panel->add_main_block($sb, 0);
|
$event->panel->add_main_block($sb, 0);
|
||||||
}
|
}
|
||||||
if(is_a($event, 'ConfigSaveEvent')) {
|
if(is_a($event, 'ConfigSaveEvent')) {
|
||||||
$event->config->set_string("title", $_POST['title']);
|
$event->config->set_string_from_post("title");
|
||||||
$event->config->set_string("base_href", $_POST['base_href']);
|
$event->config->set_string_from_post("base_href");
|
||||||
$event->config->set_string("data_href", $_POST['data_href']);
|
$event->config->set_string_from_post("data_href");
|
||||||
$event->config->set_string("contact_link", $_POST['contact_link']);
|
$event->config->set_string_from_post("contact_link");
|
||||||
$event->config->set_string("theme", $_POST['theme']);
|
$event->config->set_string_from_post("theme");
|
||||||
$event->config->set_int("anon_id", $_POST['anon_id']);
|
$event->config->set_int_from_post("anon_id");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// }}}
|
// }}}
|
||||||
|
|
|
@ -40,9 +40,9 @@ class Upload extends Extension {
|
||||||
$event->panel->add_main_block($sb, 10);
|
$event->panel->add_main_block($sb, 10);
|
||||||
}
|
}
|
||||||
if(is_a($event, 'ConfigSaveEvent')) {
|
if(is_a($event, 'ConfigSaveEvent')) {
|
||||||
$event->config->set_int("upload_count", $_POST['upload_count']);
|
$event->config->set_int_from_post("upload_count");
|
||||||
$event->config->set_int("upload_size", $_POST['upload_size']);
|
$event->config->set_int_from_post("upload_size");
|
||||||
$event->config->set_bool("upload_anon", $_POST['upload_anon']);
|
$event->config->set_bool_from_post("upload_anon");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// }}}
|
// }}}
|
||||||
|
|
|
@ -66,9 +66,9 @@ class UserPage extends Extension {
|
||||||
$event->panel->add_main_block($sb);
|
$event->panel->add_main_block($sb);
|
||||||
}
|
}
|
||||||
if(is_a($event, 'ConfigSaveEvent')) {
|
if(is_a($event, 'ConfigSaveEvent')) {
|
||||||
$event->config->set_int("login_memory", $_POST['login_memory']);
|
$event->config->set_int_from_post("login_memory");
|
||||||
$event->config->set_bool("login_signup_enabled", $_POST['login_signup_enabled']);
|
$event->config->set_bool_from_post("login_signup_enabled");
|
||||||
$event->config->set_string("login_tac", $_POST['login_tac']);
|
$event->config->set_string_from_post("login_tac");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// }}}
|
// }}}
|
||||||
|
|
|
@ -41,15 +41,12 @@ class ViewImage extends Extension {
|
||||||
$sb->add_text_option("image_slink");
|
$sb->add_text_option("image_slink");
|
||||||
$sb->add_label("<br>Thumbnail link ");
|
$sb->add_label("<br>Thumbnail link ");
|
||||||
$sb->add_text_option("image_tlink");
|
$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);
|
$event->panel->add_main_block($sb, 30);
|
||||||
}
|
}
|
||||||
if(is_a($event, 'ConfigSaveEvent')) {
|
if(is_a($event, 'ConfigSaveEvent')) {
|
||||||
$event->config->set_string("image_ilink", $_POST['image_ilink']);
|
$event->config->set_string_from_post("image_ilink");
|
||||||
$event->config->set_string("image_slink", $_POST['image_slink']);
|
$event->config->set_string_from_post("image_slink");
|
||||||
$event->config->set_string("image_tlink", $_POST['image_tlink']);
|
$event->config->set_string_from_post("image_tlink");
|
||||||
//$event->config->set_bool("view_scale", $_POST['view_scale']);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// }}}
|
// }}}
|
||||||
|
|
|
@ -14,8 +14,8 @@ class Downtime extends Extension {
|
||||||
$event->panel->add_main_block($sb);
|
$event->panel->add_main_block($sb);
|
||||||
}
|
}
|
||||||
if(is_a($event, 'ConfigSaveEvent')) {
|
if(is_a($event, 'ConfigSaveEvent')) {
|
||||||
$event->config->set_bool("downtime", $_POST['downtime']);
|
$event->config->set_bool_from_post("downtime");
|
||||||
$event->config->set_string("downtime_message", $_POST['downtime_message']);
|
$event->config->set_string_from_post("downtime_message");
|
||||||
}
|
}
|
||||||
if(is_a($event, 'PageRequestEvent')) {
|
if(is_a($event, 'PageRequestEvent')) {
|
||||||
global $config;
|
global $config;
|
||||||
|
|
|
@ -15,7 +15,7 @@ class News extends Extension {
|
||||||
$event->panel->add_main_block($sb);
|
$event->panel->add_main_block($sb);
|
||||||
}
|
}
|
||||||
if(is_a($event, 'ConfigSaveEvent')) {
|
if(is_a($event, 'ConfigSaveEvent')) {
|
||||||
$event->config->set_string("news_text", $_POST['news_text']);
|
$event->config->set_string_from_post("news_text");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,7 +14,7 @@ class Zoom extends Extension {
|
||||||
$event->panel->add_main_block($sb);
|
$event->panel->add_main_block($sb);
|
||||||
}
|
}
|
||||||
if(is_a($event, 'ConfigSaveEvent')) {
|
if(is_a($event, 'ConfigSaveEvent')) {
|
||||||
$event->config->set_bool("image_zoom", $_POST['image_zoom']);
|
$event->config->set_bool_from_post("image_zoom");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Reference in a new issue