From 7eda7f6cbd9fcac324281bb0e0084841e92f0059 Mon Sep 17 00:00:00 2001 From: defacer Date: Tue, 31 Aug 2004 06:56:44 +0000 Subject: [PATCH] Another one bites the dust, this one wasn't needed and noone had any objections about the array-based notation. RIP. --- lib/blocklib.php | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/lib/blocklib.php b/lib/blocklib.php index f0fc6180b7d..b9252c8c809 100644 --- a/lib/blocklib.php +++ b/lib/blocklib.php @@ -14,24 +14,6 @@ define('BLOCKS_DEFAULT_SOCIAL', 'participants,search_forums,calendar_month,calen define('BLOCKS_DEFAULT_TOPICS', 'participants,activity_modules,search_forums,admin,course_list:news_items,calendar_upcoming,recent_activity'); define('BLOCKS_DEFAULT_WEEKS', 'participants,activity_modules,search_forums,admin,course_list:news_items,calendar_upcoming,recent_activity'); -function block_formats_to_array($formatstring) { - $retval = array(); - - $formats = preg_split('/[+\-]/', $formatstring, -1, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_OFFSET_CAPTURE); - if(!empty($formats)) { - foreach($formats as $format) { - if($format[1] > 0 && substr ($str, $format[1] - 1, 1) === '-') { - $retval[$format[0]] = false; - } - else { - $retval[$format[0]] = true; - } - } - } - - return $retval; -} - function block_remove_inappropriate_from_course(&$course) { $blocks = $course->blockinfo;