Permalink
Browse files

MDL-20876 Fix remaining split() calls.

  • Loading branch information...
1 parent d5b36b4 commit c71f326514a578f485c8007399daf81a3f7630ec @doctorlard doctorlard committed Jul 20, 2010
View
4 admin/langimport.php
@@ -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
2 blocks/search/config_global.html
@@ -163,7 +163,7 @@
</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
2 blog/edit_form.php
@@ -149,7 +149,7 @@ function validation($data, $files) {
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
4 course/lib.php
@@ -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
2 grade/edit/tree/grade_form.php
@@ -66,7 +66,7 @@ function definition() {
$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
2 group/assign.php
@@ -87,7 +87,7 @@
// 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
6 search/documents/chat_document.php
@@ -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');
}
-?>
+?>

0 comments on commit c71f326

Please sign in to comment.