Skip to content

Commit

Permalink
MDL-20876 Fix remaining split() calls.
Browse files Browse the repository at this point in the history
  • Loading branch information
doctorlard committed Jul 20, 2010
1 parent d5b36b4 commit c71f326
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions admin/langimport.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion blocks/search/config_global.html
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion blog/edit_form.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions course/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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)) {
Expand Down
2 changes: 1 addition & 1 deletion grade/edit/tree/grade_form.php
Original file line number Diff line number Diff line change
Expand Up @@ -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++;
}
Expand Down
2 changes: 1 addition & 1 deletion group/assign.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
6 changes: 3 additions & 3 deletions search/documents/chat_document.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'));
Expand Down Expand Up @@ -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));
Expand Down Expand Up @@ -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.