MDL-20876 Fix remaining split() calls.

This commit is contained in:
Jonathan Harker 2010-07-20 03:27:36 +00:00
parent d5b36b401c
commit c71f326514
7 changed files with 11 additions and 11 deletions

View File

@ -372,10 +372,10 @@ function get_remote_list_of_languages() {
$availablelangs = array();
if ($content = download_file_content($source)) {
$alllines = split("\n", $content);
$alllines = explode("\n", $content);
foreach($alllines as $line) {
if (!empty($line)){
$availablelangs[] = split(',', $line);
$availablelangs[] = explode(',', $line);
}
}
return $availablelangs;

View File

@ -163,7 +163,7 @@ global $DB;
</fieldset>
<?php
$types = split(',', $CFG->block_search_filetypes);
$types = explode(',', $CFG->block_search_filetypes);
if (!empty($types)){
foreach($types as $type) {
$utype = strtoupper($type);

View File

@ -149,7 +149,7 @@ class blog_edit_form extends moodleform {
if ($modcontext) {
// get context of the mod's course
$path = split('/', $modcontext->path);
$path = explode('/', $modcontext->path);
$coursecontext = $DB->get_record('context', array('id' => $path[(count($path) - 2)]));
// ensure only one course is associated

View File

@ -946,7 +946,7 @@ function print_recent_activity($course) {
if (!in_array($log->action, $actions)) {
continue;
}
$info = split(' ', $log->info);
$info = explode(' ', $log->info);
if ($info[0] == 'label') { // Labels are ignored in recent activity
continue;
@ -2239,7 +2239,7 @@ function print_course($course, $highlightterms = '') {
/// first find all roles that are supposed to be displayed
if (!empty($CFG->coursecontact)) {
$managerroles = split(',', $CFG->coursecontact);
$managerroles = explode(',', $CFG->coursecontact);
$namesarray = array();
if (isset($course->managers)) {
if (count($course->managers)) {

View File

@ -66,7 +66,7 @@ class edit_grade_form extends moodleform {
$i = 1;
if ($scale = $DB->get_record('scale', array('id' => $grade_item->scaleid))) {
foreach (split(",", $scale->scale) as $option) {
foreach (explode(",", $scale->scale) as $option) {
$scaleopt[$i] = $option;
$i++;
}

View File

@ -87,7 +87,7 @@ if ($currentmembers) {
// Get course managers so they can be hilited in the list
if ($managerroles = get_config('', 'coursecontact')) {
$coursecontactroles = split(',', $managerroles);
$coursecontactroles = explode(',', $managerroles);
foreach ($coursecontactroles as $roleid) {
$role = $DB->get_record('role', array('id'=>$roleid));
$managers = get_role_users($roleid, $context, true, 'u.id', 'u.id ASC');

View File

@ -211,7 +211,7 @@ function chat_get_content_for_index(&$chat) {
function chat_single_document($id, $itemtype) {
global $DB;
list($chat_id, $sessionstart, $sessionend) = split('-', $id);
list($chat_id, $sessionstart, $sessionend) = explode('-', $id);
$chat = $DB->get_record('chat', array('id' => $chat_id));
$course = $DB->get_record('course', array('id' => $chat->course));
$coursemodule = $DB->get_field('modules', 'id', array('name' => 'chat'));
@ -271,7 +271,7 @@ function chat_check_text_access($path, $itemtype, $this_id, $user, $group_id, $c
include_once("{$CFG->dirroot}/{$path}/lib.php");
list($chat_id, $sessionstart, $sessionend) = split('-', $this_id);
list($chat_id, $sessionstart, $sessionend) = explode('-', $this_id);
// get the chat session and all related stuff
$chat = $DB->get_record('chat', array('id' => $chat_id));
$context = $DB->get_record('context', array('id' => $context_id));
@ -324,4 +324,4 @@ function chat_link_post_processing($title){
}
return mb_convert_encoding($title, 'auto', 'UTF-8');
}
?>
?>