Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix 20130906 master #463

Merged
merged 2 commits into from
Sep 6, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions modules/gallery/controllers/admin_theme_options.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,17 @@ public function save() {
module::set_var("gallery", "resize_size", $resize_size);
}

module::set_var("gallery", "header_text", $form->edit_theme->header_text->value);
module::set_var("gallery", "footer_text", $form->edit_theme->footer_text->value);
module::set_var("gallery", "show_credits", $form->edit_theme->show_credits->value);
module::set_var("gallery", "favicon_url", $form->edit_theme->favicon_url->value);
module::set_var("gallery", "apple_touch_icon_url", $form->edit_theme->apple_touch_icon_url->value);

// Sanitize values that get placed directly in HTML output by theme.
module::set_var("gallery", "header_text",
html::purify($form->edit_theme->header_text->value));
module::set_var("gallery", "footer_text",
html::purify($form->edit_theme->footer_text->value));
module::set_var("gallery", "favicon_url",
html::purify($form->edit_theme->favicon_url->value));
module::set_var("gallery", "apple_touch_icon_url",
html::purify($form->edit_theme->apple_touch_icon_url->value));

module::event("theme_edit_form_completed", $form);

Expand Down
4 changes: 4 additions & 0 deletions modules/gallery/helpers/module.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,10 @@ static function available() {
$module_name = basename(dirname($file));
$modules->$module_name =
new ArrayObject(parse_ini_file($file), ArrayObject::ARRAY_AS_PROPS);
foreach ($modules->$module_name as &$value) {
$value = html::purify($value);
}

$m =& $modules->$module_name;
$m->installed = module::is_installed($module_name);
$m->active = module::is_active($module_name);
Expand Down