mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 00:12:56 +02:00
mod/wiki: MDL-20876 fix deprecated split() calls.
This commit is contained in:
parent
7785dc2e9f
commit
349565d0c1
@ -107,13 +107,13 @@ class creole_parser extends wiki_markup_parser {
|
||||
|
||||
protected function table_block_rule($match) {
|
||||
|
||||
$rows = split("\n", $match[0]);
|
||||
$rows = explode("\n", $match[0]);
|
||||
$table = array();
|
||||
foreach($rows as $r) {
|
||||
if(empty($r)) {
|
||||
continue;
|
||||
}
|
||||
$rawcells = split("\|", $r);
|
||||
$rawcells = explode("|", $r);
|
||||
$cells = array();
|
||||
|
||||
array_shift($rawcells);
|
||||
|
@ -117,10 +117,10 @@ class nwiki_parser extends wiki_markup_parser {
|
||||
}
|
||||
|
||||
protected function table_block_rule($match) {
|
||||
$rows = split("\n\|-", $match[1]);
|
||||
$rows = explode("\n|-", $match[1]);
|
||||
$table = array();
|
||||
foreach($rows as $r) {
|
||||
$colsendline = split("\n", $r);
|
||||
$colsendline = explode("\n", $r);
|
||||
$cols = array();
|
||||
foreach($colsendline as $ce) {
|
||||
$cols = array_merge($cols, $this->get_table_cells($ce));
|
||||
@ -141,11 +141,11 @@ class nwiki_parser extends wiki_markup_parser {
|
||||
$normalcells = array();
|
||||
}
|
||||
else {
|
||||
$normalcells = split("\|\|", $string);
|
||||
$normalcells = explode("||", $string);
|
||||
}
|
||||
$cells = array();
|
||||
foreach($normalcells as $nc) {
|
||||
$headercells = split("!!", $nc);
|
||||
$headercells = explode("!!", $nc);
|
||||
for($i = 0; $i < count($headercells); $i++) {
|
||||
$cells[] = array($type, $headercells[$i]);
|
||||
$type = 'header';
|
||||
@ -245,7 +245,7 @@ class nwiki_parser extends wiki_markup_parser {
|
||||
}
|
||||
|
||||
protected function attach_tag_rule($match) {
|
||||
$parts = split("\|", $match[1]);
|
||||
$parts = explode("|", $match[1]);
|
||||
|
||||
$url = array_shift($parts);
|
||||
|
||||
|
@ -91,7 +91,7 @@ abstract class wiki_markup_parser extends generic_parser {
|
||||
foreach ($options as $name => $o) {
|
||||
switch ($name) {
|
||||
case 'link_callback':
|
||||
$callback = split(':', $o);
|
||||
$callback = explode(':', $o);
|
||||
|
||||
global $CFG;
|
||||
require_once($CFG->dirroot . $callback[0]);
|
||||
@ -106,7 +106,7 @@ abstract class wiki_markup_parser extends generic_parser {
|
||||
}
|
||||
break;
|
||||
case 'real_path_callback':
|
||||
$callback = split(':', $o);
|
||||
$callback = explode(':', $o);
|
||||
|
||||
global $CFG;
|
||||
require_once($CFG->dirroot . $callback[0]);
|
||||
@ -121,7 +121,7 @@ abstract class wiki_markup_parser extends generic_parser {
|
||||
}
|
||||
break;
|
||||
case 'table_callback':
|
||||
$callback = split(':', $o);
|
||||
$callback = explode(':', $o);
|
||||
|
||||
global $CFG;
|
||||
require_once($CFG->dirroot . $callback[0]);
|
||||
|
Loading…
x
Reference in New Issue
Block a user