From a3d5dfe86e51c71a7b29776f48e107ccd6fabb31 Mon Sep 17 00:00:00 2001 From: Benjamin Franzke Date: Fri, 25 Jan 2013 09:14:18 +0100 Subject: Replace all deprecated error() calls with print_error --- sqlbox/view.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sqlbox/view.php') diff --git a/sqlbox/view.php b/sqlbox/view.php index f79b8dc..fababb7 100644 --- a/sqlbox/view.php +++ b/sqlbox/view.php @@ -44,7 +44,7 @@ if ($id) { $course = $DB->get_record('course', array('id' => $sqlbox->course), '*', MUST_EXIST); $cm = get_coursemodule_from_instance('sqlbox', $sqlbox->id, $course->id, false, MUST_EXIST); } else { - error('You must specify a course_module ID or an instance ID'); + print_error('invalidcourse'); } require_login($course, true, $cm); @@ -96,7 +96,7 @@ if (isset($data->sqlbox_query)) { $db = pg_connect($con); if (!$db) - error("Failed to connect to sqlbox db"); + print_error('dbconnectionfailed', 'sqlbox'); $table = db_table_from_query($db, $data->sqlbox_query); if (strlen($sqlbox->query) > 0) { -- cgit