]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-15310: removing unused variable, old commented code and adding a small adjustment...
authorscyrma <scyrma>
Thu, 19 Jun 2008 09:21:45 +0000 (09:21 +0000)
committerscyrma <scyrma>
Thu, 19 Jun 2008 09:21:45 +0000 (09:21 +0000)
blog/edit.php
blog/edit_form.php

index a0f9d0a4ef948149880e27bf664dfcc2f135b3e3..21b863d8539740c7836e7c1afc372a1e4c4ab391 100755 (executable)
@@ -156,7 +156,6 @@ function do_delete($post) {
     global $returnurl, $DB;
 
     $status = $DB->delete_records('post', array('id'=>$post->id));
-    //$status = $DB->delete_records('blog_tag_instance', array('entryid'=>$post->id)) and $status;
     tag_set('post', $post->id, array());
     
     blog_delete_old_attachments($post);
index 499f22ea888ef4930d010647ef8ba09d6e4432ad..4d47139b9f99b1f26e60d4921105cc3e05ae45f8 100644 (file)
@@ -37,15 +37,6 @@ class blog_edit_form extends moodleform {
             $mform->addElement('header', 'tagshdr', get_string('tags', 'tag'));
             $mform->createElement('select', 'otags', get_string('otags','tag'));
 
-            $js_escape = array(
-                "\r"    => '\r',
-                "\n"    => '\n',
-                "\t"    => '\t',
-                "'"     => "\\'",
-                '"'     => '\"',
-                '\\'    => '\\\\'
-            );
-
             $otagsselEl =& $mform->addElement('select', 'otags', get_string('otags', 'tag'), array(), 'size="5"');
             $otagsselEl->setMultiple(true);
             $this->otags_select_setup();
@@ -75,16 +66,17 @@ class blog_edit_form extends moodleform {
      *
      */
     function otags_select_setup(){
-        global $CFG, $DB;
+        global $DB;
 
         $mform =& $this->_form;
         if ($otagsselect =& $mform->getElement('otags')) {
             $otagsselect->removeOptions();
         }
         $namefield = empty($CFG->keeptagnamecase) ? 'name' : 'rawname';
-        if ($otags = $DB->get_records_sql_menu("SELECT id, $namefield FROM {tag} WHERE tagtype='official' ORDER by name ASC")){
+        if ($otags = $DB->get_records_sql_menu("SELECT id, $namefield FROM {tag} WHERE tagtype='official' ORDER by $namefield ASC")) {
             $otagsselect->loadArray($otags);
         }
+
     }
 
 }