From 7ffb7e9cc76106759f0803039ecb5c74c71248b2 Mon Sep 17 00:00:00 2001 From: toyomoyo Date: Tue, 14 Mar 2006 06:36:51 +0000 Subject: [PATCH] more cleaning --- blog/edit.html | 27 +-------------------------- blog/edit.php | 16 ++++++++++------ blog/lib.php | 4 ++-- blog/preferences.html | 12 ------------ 4 files changed, 13 insertions(+), 46 deletions(-) diff --git a/blog/edit.html b/blog/edit.html index 251d475e79..cc59bc8564 100755 --- a/blog/edit.html +++ b/blog/edit.html @@ -15,7 +15,6 @@ } ?> -
enctype="multipart/form-data"> @@ -54,8 +53,6 @@ - - @@ -128,32 +125,12 @@ useextendedbody) && $post->useextendedbody) { - print_string('entrybodydesc', 'blog'); - } else { - print_string('entrybodyonlydesc', 'blog'); - } + print_string('entrybodyonlydesc', 'blog'); print '
'."\n"; // usage: print_textarea($usehtmleditor, $rows, $cols, $width, $height, $name, $value="", $courseid) print_textarea($usehtmleditor, 6, 60, 600, 500, 'body', $post->body, $post->courseid); ?> -useextendedbody) && $post->useextendedbody) { - print ''."\n"; - print ''."\n"; - print_string('entryextendedbody', 'blog'); - print ':'. "\n"; - print ''."\n"; - print_string('entryextendedbodydesc', 'blog'); - print '
'."\n"; - print_textarea($usehtmleditor, 25, 60, 600, 500, 'extendedbody', $post->extendedbody, $post->courseid); - print ''; - } else { - print ''; - } - -?> : @@ -170,8 +147,6 @@ - - id ) { @@ -56,10 +54,16 @@ if ( !blog_user_has_rights($PAGE->bloginfo) ) { //////////// SECURITY AND SETUP COMPLETE - NOW PAGE LOGIC /////////////////// -if (isset($act) && $act == 'del') +if (isset($act) && $act == 'del' && confirm_sesskey()) { - require_variable($postid); - do_delete($PAGE->bloginfo, $postid); + if (optional_param($confirm,0,PARAM_INT)) { + require_variable($postid); + do_delete($PAGE->bloginfo, $postid); + } else { + /// prints blog entry and what confirmation form + + + } } if ($usehtmleditor = can_use_richtext_editor()) { $defaultformat = FORMAT_HTML; diff --git a/blog/lib.php b/blog/lib.php index a64451cab5..872c24d6ee 100755 --- a/blog/lib.php +++ b/blog/lib.php @@ -847,11 +847,11 @@ function blog_print_entry_content ($template, $entryid, $filtertype='', $filters if (isset($USER->id)) { if (($template['userid'] == $USER->id) or isteacher($course->id)) { - echo ''.$stredit.''; + echo ''.$stredit.''; } if (($template['userid'] == $USER->id) or isteacher($course->id)) { - echo '| '.$strdelete.''; + echo '| '.$strdelete.''; } } diff --git a/blog/preferences.html b/blog/preferences.html index 60ec485a01..6cbee77842 100755 --- a/blog/preferences.html +++ b/blog/preferences.html @@ -11,18 +11,6 @@ -allowblogthemes)) { ?> - - : - - get_blog_theme(), "", "", ""); - ?> - - - " /> -- 2.39.5