From d994fe68bc6e0fdcf66ff6f714076d6a7ee9d065 Mon Sep 17 00:00:00 2001 From: nicolasconnault Date: Wed, 16 Jan 2008 08:05:01 +0000 Subject: [PATCH] Reverting MDL-12974 and MDL-12941 (Urs simple wrapper changes) --- lib/weblib.php | 50 -------------------------------------------------- tag/index.php | 21 +++++++-------------- tag/lib.php | 12 ++++++------ 3 files changed, 13 insertions(+), 70 deletions(-) diff --git a/lib/weblib.php b/lib/weblib.php index f059efcac51..4c55f443e9c 100644 --- a/lib/weblib.php +++ b/lib/weblib.php @@ -3900,56 +3900,6 @@ function print_box($message, $classes='generalbox', $ids='', $return=false) { } } -/** - * Starts a box as a simple wrapper div - * Doesn't include the advanced container handling - * Replaces print_simple_box_start (see deprecatedlib.php) - * - * @param string $classes, space-separated class names. - * @param string $idname - * @param boolean $return, return as string or just print it - * @return mixed string or void - */ -function print_simplewrapper_start($classes='generalbox', $idname='', $return=false) { - - if ($idname) { - $id = ' id="'.$idname.'"'; - } else { - $id = ''; - } - - if ($classes) { - $class = ' class="box '.$classes.'"'; - } else { - $class = ' class="box"'; - } - - $output = ''; - - if ($return) { - return $output; - } else { - echo $output; - } -} - -/** - * Simple function to end a wrapper box (see above) - * Replaces print_simple_box_end (see deprecatedlib.php) - * - * @param boolean $return, return as string or just print it - */ -function print_simplewrapper_end($return=false) { - - $output = ''; - - if ($return) { - return $output; - } else { - echo $output; - } -} - /** * Starts a box using divs * Replaces print_simple_box_start (see deprecatedlib.php) diff --git a/tag/index.php b/tag/index.php index c98dded2c14..921caf8e1f8 100644 --- a/tag/index.php +++ b/tag/index.php @@ -36,18 +36,16 @@ if (($edit != -1) and $PAGE->user_allowed_editing()) { $PAGE->print_header(); -echo ''; -echo ''; +echo '
'; +echo ''; //----------------- left column ----------------- $blocks_preferred_width = bounded_number(180, blocks_preferred_width($pageblocks[BLOCK_POS_LEFT]), 210); if (blocks_have_content($pageblocks, BLOCK_POS_LEFT) || $PAGE->user_is_editing()) { - echo ''; } @@ -57,8 +55,6 @@ if (blocks_have_content($pageblocks, BLOCK_POS_LEFT) || $PAGE->user_is_editing() echo ''; @@ -142,10 +137,8 @@ echo ''; $blocks_preferred_width = bounded_number(180, blocks_preferred_width($pageblocks[BLOCK_POS_RIGHT]), 210); if (blocks_have_content($pageblocks, BLOCK_POS_RIGHT) || $PAGE->user_is_editing()) { - echo ''; } diff --git a/tag/lib.php b/tag/lib.php index 2780e84d3c8..4e8113ea721 100644 --- a/tag/lib.php +++ b/tag/lib.php @@ -1158,7 +1158,7 @@ function print_tag_management_box($tag_object, $return=false) { if (!isguestuser()) { - $output .= print_simplewrapper_start('box','tag-management-box', true); + $output .= print_box_start('box','tag-management-box', true); $systemcontext = get_context_instance(CONTEXT_SYSTEM); @@ -1184,7 +1184,7 @@ function print_tag_management_box($tag_object, $return=false) { $output .= implode(' | ', $links); - $output .= print_simplewrapper_end(true); + $output .= print_box_end(true); } @@ -1215,7 +1215,7 @@ function print_tag_description_box($tag_object, $return=false) { $output = ''; if ($content) { - $output .= print_simplewrapper_start('generalbox', 'tag-description',true); + $output .= print_box_start('generalbox', 'tag-description',true); } if (!empty($tag_object->description)) { @@ -1229,7 +1229,7 @@ function print_tag_description_box($tag_object, $return=false) { } if ($content) { - $output .= print_simplewrapper_end(true); + $output .= print_box_end(true); } if ($return) { @@ -1315,7 +1315,7 @@ function print_user_box($user, $return=false) { $output = ''; - $output .= print_simplewrapper_start('user-box', 'user'.$user->id, true); + $output .= print_box_start('user-box', 'user'.$user->id, true); $fullname = fullname($user); $alt = ''; @@ -1342,7 +1342,7 @@ function print_user_box($user, $return=false) { $output .= '' . $fullname . ''; - $output .= print_simplewrapper_end(true); + $output .= print_box_end(true); if ($return) { return $output;
'; - print_container_start(); + echo ''; blocks_print_group($PAGE, $pageblocks, BLOCK_POS_LEFT); - print_container_end(); echo ''; -print_container_start(true, 'middle-column-wrap'); - $tagname = tag_display_name($tag); $systemcontext = get_context_instance(CONTEXT_SYSTEM); @@ -78,7 +74,7 @@ $usercount = count_items_tagged_with($tag->id,'user'); if ($usercount > 0) { //user table box - print_simplewrapper_start('clearfix generalbox', 'tag-user-table'); + print_box_start('generalbox', 'tag-user-table'); $heading = get_string('userstaggedwith', 'tag', $tagname) . ': ' . $usercount; print_heading($heading, '', 3); @@ -89,7 +85,7 @@ if ($usercount > 0) { print_tagged_users_table($tag, $userpage * $perpage, $perpage); - print_simplewrapper_end(); + print_box_end(); } @@ -127,12 +123,11 @@ if ($blogs = blog_fetch_entries('', 10, 0, 'site', '', $tag->id)) { } echo ''; - echo '

'.get_string('seeallblogs', 'tag').'...

'; + echo '

'.get_string('seeallblogs', 'tag').'...

'; print_box_end(); } -print_container_end(); echo '
'; - print_container_start(); + echo ''; blocks_print_group($PAGE, $pageblocks, BLOCK_POS_RIGHT); - print_container_end(); echo '