From dfdb5b42f6a7b4c595e425c09b827077dd76024f Mon Sep 17 00:00:00 2001 From: Florian Azizian <florian.azizian@maarch.org> Date: Fri, 10 Jul 2015 14:22:46 +0000 Subject: [PATCH] FEAT #2681 remove protect_string_db --- core/trunk/core/class/StatusControler.php | 14 +++++--------- core/trunk/core/class/usergroups_controler.php | 14 ++------------ 2 files changed, 7 insertions(+), 21 deletions(-) diff --git a/core/trunk/core/class/StatusControler.php b/core/trunk/core/class/StatusControler.php index e9b157a6f34..21d42f360c5 100644 --- a/core/trunk/core/class/StatusControler.php +++ b/core/trunk/core/class/StatusControler.php @@ -227,9 +227,7 @@ class Maarch_Core_Class_StatusControler { $error = ""; $f = new functions(); - $status->id = $f->protect_string_db( - $f->wash($status->id, 'no', _THE_ID . ' ', 'yes', 0, 10) - ); + $status->id = $f->wash($status->id, 'no', _THE_ID . ' ', 'yes', 0, 10); if ($mode == 'add') { if (self::statusExists($status->id)) { @@ -237,12 +235,10 @@ class Maarch_Core_Class_StatusControler } } - $status->label_status = $f->protect_string_db( - $f->wash($status->label_status, 'no', _DESC, 'yes', 0, 50) - ); - $status->is_system = $f->protect_string_db( - $f->wash($status->is_system, 'no', _IS_SYSTEM) - ); + $status->label_status = $f->wash($status->label_status, 'no', _DESC, 'yes', 0, 50); + + $status->is_system = $f->wash($status->is_system, 'no', _IS_SYSTEM); + $status->img_filename = $status->img_filename; $status->maarch_module = 'apps'; diff --git a/core/trunk/core/class/usergroups_controler.php b/core/trunk/core/class/usergroups_controler.php index 1fb9405dd14..dfdf76c9da8 100644 --- a/core/trunk/core/class/usergroups_controler.php +++ b/core/trunk/core/class/usergroups_controler.php @@ -465,22 +465,12 @@ class usergroups_controler extends ObjectControler implements ObjectControlerIF $error = ""; $func = new functions(); - $group->group_id = $func->protect_string_db( - $func->wash($group->group_id, 'no', _THE_GROUP, 'yes', 0, 32) - ); + $group->group_id = $func->wash($group->group_id, 'no', _THE_GROUP, 'yes', 0, 32); if (isset($group->group_desc) && !empty($group->group_desc)) { - $group->group_desc = $func->protect_string_db( - $func->wash($group->group_desc, 'no', _GROUP_DESC, 'yes', 0, 255) - ); + $group->group_desc = $func->wash($group->group_desc, 'no', _GROUP_DESC, 'yes', 0, 255); } - /*if (count($security) < 1 && count($services) < 1) { - $func->add_error( - _THE_GROUP . ' ' . _NO_SECURITY_AND_NO_SERVICES, '' - ); - }*/ - if ($mode == "add" && $this->groupExists($group->group_id)) { $func->add_error( $group->group_id . ' ' . _ALREADY_EXISTS . "<br />" -- GitLab