From 62a0ae1064cfc58b9b677441a81256318e97f8da Mon Sep 17 00:00:00 2001 From: agrabs Date: Wed, 30 Apr 2008 06:40:15 +0000 Subject: [PATCH] used deprecated function modify_database changed to insert_record --- mod/feedback/db/upgrade.php | 29 ++++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/mod/feedback/db/upgrade.php b/mod/feedback/db/upgrade.php index 64e2936fe6..f26def940f 100644 --- a/mod/feedback/db/upgrade.php +++ b/mod/feedback/db/upgrade.php @@ -168,11 +168,30 @@ function xmldb_feedback_upgrade($oldversion=0) { } if ($result && $oldversion < 2008042801) { - $result = $result && modify_database("","INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('feedback', 'startcomplete', 'feedback', 'name');"); - $result = $result && modify_database("","INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('feedback', 'submit', 'feedback', 'name');"); - $result = $result && modify_database("","INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('feedback', 'delete', 'feedback', 'name');"); - $result = $result && modify_database("","INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('feedback', 'view', 'feedback', 'name');"); - $result = $result && modify_database("","INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('feedback', 'view all', 'course', 'shortname');"); + $new_log_display = new object(); + $new_log_display->module = 'feedback'; + $new_log_display->action = 'startcomplete'; + $new_log_display->mtable = 'feedback'; + $new_log_display->field = 'name'; + $result = $result && insert_record('log_display', $new_log_display); + + $new_log_display = clone($new_log_display); + $new_log_display->action = 'submit'; + $result = $result && insert_record('log_display', $new_log_display); + + $new_log_display = clone($new_log_display); + $new_log_display->action = 'delete'; + $result = $result && insert_record('log_display', $new_log_display); + + $new_log_display = clone($new_log_display); + $new_log_display->action = 'view'; + $result = $result && insert_record('log_display', $new_log_display); + + $new_log_display = clone($new_log_display); + $new_log_display->action = 'view all'; + $new_log_display->mtable = 'course'; + $new_log_display->field = 'shortname'; + $result = $result && insert_record('log_display', $new_log_display); } /// And upgrade begins here. For each one, you'll need one -- 2.39.5