Skip to content

Commit

Permalink
admin MDL-19787 Upgrade deprecated function calls
Browse files Browse the repository at this point in the history
  • Loading branch information
samhemelryk committed Sep 30, 2009
1 parent ceebb2e commit 9e492db
Show file tree
Hide file tree
Showing 7 changed files with 40 additions and 15 deletions.
7 changes: 5 additions & 2 deletions admin/roles/assign.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php // $Id$
<?php

///////////////////////////////////////////////////////////////////////////
// //
Expand Down Expand Up @@ -296,7 +296,10 @@
}

/// Print heading.
print_heading_with_help($title, 'assignroles');
$helpicon = new moodle_help_icon();
$helpicon->text = $title;
$helpicon->page = 'assignroles';
echo $OUTPUT->heading_with_help($helpicon);

if ($roleid) {
/// Show UI for assigning a particular role to users.
Expand Down
7 changes: 5 additions & 2 deletions admin/roles/check.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php // $Id$
<?php

///////////////////////////////////////////////////////////////////////////
// //
Expand Down Expand Up @@ -138,7 +138,10 @@
}

/// Print heading.
print_heading_with_help($title, 'checkpermissions');
$helpicon = new moodle_help_icon();
$helpicon->text = $title;
$helpicon->page = 'checkpermissions';
echo $OUTPUT->heading_with_help($helpicon);

/// If a user has been chosen, show all the permissions for this user.
$reportuser = $userselector->get_selected_user();
Expand Down
7 changes: 5 additions & 2 deletions admin/roles/define.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php // $Id$
<?php

///////////////////////////////////////////////////////////////////////////
// //
Expand Down Expand Up @@ -120,7 +120,10 @@
} else if ($action == 'edit') {
$title = get_string('editingrolex', 'role', $rolenames[$roleid]->localname);
}
print_heading_with_help($title, 'roles');
$helpicon = new moodle_help_icon();
$helpicon->text = $title;
$helpicon->page = 'roles';
echo $OUTPUT->heading_with_help($helpicon);

/// Work out some button labels.
if ($action == 'add' || $action == 'duplicate') {
Expand Down
7 changes: 5 additions & 2 deletions admin/roles/override.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php // $Id$
<?php

///////////////////////////////////////////////////////////////////////////
// //
Expand Down Expand Up @@ -175,7 +175,10 @@
include_once('tabs.php');
}

print_heading_with_help($title, 'overrides');
$helpicon = new moodle_help_icon();
$helpicon->text = $title;
$helpicon->page = 'overrides';
echo $OUTPUT->heading_with_help($helpicon);

if ($roleid) {
/// Show UI for overriding roles.
Expand Down
8 changes: 6 additions & 2 deletions admin/uploadpicture.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php // $Id$
<?php

///////////////////////////////////////////////////////////////////////////
// //
Expand Down Expand Up @@ -59,7 +59,11 @@

/// Print the header
admin_externalpage_print_header();
print_heading_with_help($struploadpictures, 'uploadpictures');

$helpicon = new moodle_help_icon();
$helpicon->text = $struploadpictures;
$helpicon->page = 'uploadpictures';
echo $OUTPUT->heading_with_help($helpicon);

$mform = new admin_uploadpicture_form(null, $userfields);
if ($formdata = $mform->get_data()) {
Expand Down
15 changes: 12 additions & 3 deletions admin/uploaduser.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php // $Id$
<?php

/// Bulk user registration script from a comma separated file
/// Returns list of users with their user ids
Expand Down Expand Up @@ -106,7 +106,12 @@

} else {
admin_externalpage_print_header();
print_heading_with_help(get_string('uploadusers'), 'uploadusers3');

$helpicon = new moodle_help_icon();
$helpicon->text = get_string('uploadusers');
$helpicon->page = 'uploadusers3';
echo $OUTPUT->heading_with_help($helpicon);

$mform->display();
echo $OUTPUT->footer();
die;
Expand Down Expand Up @@ -741,7 +746,11 @@
admin_externalpage_print_header();

/// Print the form
print_heading_with_help(get_string('uploaduserspreview', 'admin'), 'uploadusers2');

$helpicon = new moodle_help_icon();
$helpicon->text = get_string('uploaduserspreview', 'admin');
$helpicon->page = 'uploadusers2';
echo $OUTPUT->heading_with_help($helpicon);

$ci = 0;
$ri = 0;
Expand Down
4 changes: 2 additions & 2 deletions admin/user/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
function add_selection_all($ufiltering) {
global $SESSION, $DB;

$guest = get_guest();
$guest = get_complete_user_data('username', 'guest');
list($sqlwhere, $params) = $ufiltering->get_sql_filter("id<>:exguest AND deleted <> 1", array('exguest'=>$guest->id));

if ($rs = $DB->get_recordset_select('user', $sqlwhere, $params, 'fullname', 'id,'.$DB->sql_fullname().' AS fullname')) {
Expand All @@ -26,7 +26,7 @@ function get_selection_data($ufiltering) {
global $SESSION, $DB;

// get the SQL filter
$guest = get_guest();
$guest = get_complete_user_data('username', 'guest');
list($sqlwhere, $params) = $ufiltering->get_sql_filter("id<>:exguest AND deleted <> 1", array('exguest'=>$guest->id));

$total = $DB->count_records_select('user', "id<>:exguest AND deleted <> 1", array('exguest'=>$guest->id));
Expand Down

0 comments on commit 9e492db

Please sign in to comment.