Merge branch 'MDL-67115_38' of https://github.com/stronk7/moodle into MOODLE_38_STABLE
This commit is contained in:
+4
-4
@@ -1285,7 +1285,7 @@ class core_admin_renderer extends plugin_renderer_base {
|
||||
if ($unavailable or $unknown) {
|
||||
$out .= $this->output->heading(get_string('misdepsunavail', 'core_plugin'));
|
||||
if ($unknown) {
|
||||
$out .= $this->output->notification(get_string('misdepsunknownlist', 'core_plugin', implode($unknown, ', ')));
|
||||
$out .= $this->output->notification(get_string('misdepsunknownlist', 'core_plugin', implode(', ', $unknown)));
|
||||
}
|
||||
if ($unavailable) {
|
||||
$unavailablelist = array();
|
||||
@@ -1300,7 +1300,7 @@ class core_admin_renderer extends plugin_renderer_base {
|
||||
$unavailablelist[] = $unavailablelistitem;
|
||||
}
|
||||
$out .= $this->output->notification(get_string('misdepsunavaillist', 'core_plugin',
|
||||
implode($unavailablelist, ', ')));
|
||||
implode(', ', $unavailablelist)));
|
||||
}
|
||||
$out .= $this->output->container_start('plugins-check-dependencies-actions');
|
||||
$out .= ' '.html_writer::link(new moodle_url('/admin/tool/installaddon/'),
|
||||
@@ -1420,7 +1420,7 @@ class core_admin_renderer extends plugin_renderer_base {
|
||||
html_writer::div($plugin->name, 'name').' '.html_writer::div($plugin->component, 'component'),
|
||||
$plugin->version->release,
|
||||
$plugin->version->version,
|
||||
implode($supportedmoodles, ' '),
|
||||
implode(' ', $supportedmoodles),
|
||||
$info
|
||||
);
|
||||
}
|
||||
@@ -2011,7 +2011,7 @@ class core_admin_renderer extends plugin_renderer_base {
|
||||
if (empty($CFG->docroot) or $environment_result->plugin) {
|
||||
$report = get_string($stringtouse, 'admin', $rec);
|
||||
} else {
|
||||
$report = $this->doc_link(join($linkparts, '/'), get_string($stringtouse, 'admin', $rec), true);
|
||||
$report = $this->doc_link(join('/', $linkparts), get_string($stringtouse, 'admin', $rec), true);
|
||||
}
|
||||
// Enclose report text in div so feedback text will be displayed underneath it.
|
||||
$report = html_writer::div($report);
|
||||
|
||||
@@ -288,7 +288,7 @@ class completion_criteria_activity extends completion_criteria {
|
||||
}
|
||||
}
|
||||
|
||||
$details['requirement'] = implode($details['requirement'], ', ');
|
||||
$details['requirement'] = implode(', ', $details['requirement']);
|
||||
|
||||
$details['status'] = '';
|
||||
|
||||
|
||||
@@ -160,7 +160,7 @@ class filter_tex extends moodle_text_filter {
|
||||
'\\\\\((.+?)\\\\\)',
|
||||
'\\[tex\\](.+?)\\[\/tex\\]'
|
||||
);
|
||||
$megarule = '/' . implode($rules, '|') . '/is';
|
||||
$megarule = '/' . implode('|', $rules) . '/is';
|
||||
preg_match_all($megarule, $text, $matches);
|
||||
for ($i=0; $i<count($matches[0]); $i++) {
|
||||
$texexp = '';
|
||||
|
||||
@@ -98,7 +98,7 @@ class user_groups_editable extends \core\output\inplace_editable {
|
||||
}
|
||||
|
||||
if (!empty($listofgroups)) {
|
||||
$this->displayvalue = implode($listofgroups, ', ');
|
||||
$this->displayvalue = implode(', ', $listofgroups);
|
||||
} else {
|
||||
$this->displayvalue = get_string('groupsnone');
|
||||
}
|
||||
|
||||
@@ -38,6 +38,8 @@ Here are the files that we have added.
|
||||
|
||||
Local changes (to reapply until upstream upgrades contain them):
|
||||
* MDL-67034 php74 compliance fixes
|
||||
* MDL-67115 php74 implode() compliance fixes. This is fixed in upstream library v2.2.4
|
||||
(verify that https://github.com/googleapis/google-api-php-client/pull/1683 is applied)
|
||||
|
||||
|
||||
Information
|
||||
|
||||
@@ -170,7 +170,7 @@ class Google_Http_REST
|
||||
}
|
||||
|
||||
if (count($queryVars)) {
|
||||
$requestUrl .= '?' . implode($queryVars, '&');
|
||||
$requestUrl .= '?' . implode('&', $queryVars);
|
||||
}
|
||||
|
||||
return $requestUrl;
|
||||
|
||||
@@ -43,8 +43,8 @@ class HTMLPurifier_Printer_HTMLDefinition extends HTMLPurifier_Printer
|
||||
$ret .= $this->element('caption', 'Doctype');
|
||||
$ret .= $this->row('Name', $doctype->name);
|
||||
$ret .= $this->row('XML', $doctype->xml ? 'Yes' : 'No');
|
||||
$ret .= $this->row('Default Modules', implode($doctype->modules, ', '));
|
||||
$ret .= $this->row('Default Tidy Modules', implode($doctype->tidyModules, ', '));
|
||||
$ret .= $this->row('Default Modules', implode(', ', $doctype->modules));
|
||||
$ret .= $this->row('Default Tidy Modules', implode(', ', $doctype->tidyModules));
|
||||
$ret .= $this->end('table');
|
||||
return $ret;
|
||||
}
|
||||
|
||||
@@ -21,3 +21,5 @@ Modifications:
|
||||
Check status of https://github.com/ezyang/htmlpurifier/pull/148
|
||||
* MDL-67030 applied https://github.com/ezyang/htmlpurifier/pull/224 towards
|
||||
php74 compatibility.
|
||||
* MDL-67115 applied https://github.com/ezyang/htmlpurifier/pull/243 towards
|
||||
php74 compatibility.
|
||||
|
||||
+1
-1
@@ -552,7 +552,7 @@ abstract class list_item {
|
||||
} else {
|
||||
$childrenhtml = '';
|
||||
}
|
||||
return $this->item_html($extraargs).' '.(join($this->icons, '')).(($childrenhtml !='')?("\n".$childrenhtml):'');
|
||||
return $this->item_html($extraargs).' '.(join('', $this->icons)).(($childrenhtml !='')?("\n".$childrenhtml):'');
|
||||
}
|
||||
|
||||
public function set_icon_html($first, $last, $lastitem) {
|
||||
|
||||
@@ -525,7 +525,7 @@ class CSS extends Minify
|
||||
);
|
||||
|
||||
return preg_replace_callback(
|
||||
'/(?<=[: ])('.implode(array_keys($colors), '|').')(?=[; }])/i',
|
||||
'/(?<=[: ])('.implode('|', array_keys($colors)).')(?=[; }])/i',
|
||||
function ($match) use ($colors) {
|
||||
return $colors[strtoupper($match[0])];
|
||||
},
|
||||
|
||||
@@ -8,3 +8,9 @@ mv minify-1.3.51/data /path/to/moodle/lib/minify/matthiasmullie-minify/
|
||||
2) Download https://github.com/matthiasmullie/path-converter/archive/1.1.0.zip and unzip
|
||||
|
||||
mv path-converter-1.1.0/src/ /path/to/moodle/lib/minify/matthiasmullie-pathconverter/
|
||||
|
||||
Local changes applied:
|
||||
|
||||
MDL-67115: php 74 compliance - implode() params order. Note this has been fixed upstream
|
||||
by https://github.com/matthiasmullie/minify/pull/300 so, whenever this library is updated
|
||||
check if the fix is included and remove this note.
|
||||
|
||||
+2
-2
@@ -1420,7 +1420,7 @@ function question_category_options($contexts, $top = false, $currentcat = 0,
|
||||
foreach ($contexts as $context) {
|
||||
$pcontexts[] = $context->id;
|
||||
}
|
||||
$contextslist = join($pcontexts, ', ');
|
||||
$contextslist = join(', ', $pcontexts);
|
||||
|
||||
$categories = get_categories_for_contexts($contextslist, 'parent, sortorder, name ASC', $top);
|
||||
|
||||
@@ -2011,7 +2011,7 @@ class question_edit_contexts {
|
||||
*/
|
||||
public function require_one_cap($caps) {
|
||||
if (!$this->have_one_cap($caps)) {
|
||||
$capsstring = join($caps, ', ');
|
||||
$capsstring = join(', ', $caps);
|
||||
print_error('nopermissions', '', '', $capsstring);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -300,7 +300,7 @@ class behat_navigation extends behat_base {
|
||||
// Throw exception if no node found.
|
||||
if (!$nodetoclick) {
|
||||
throw new ExpectationException('Navigation node "' . $nodetext . '" not found under "' .
|
||||
implode($parentnodes, ' > ') . '"', $this->getSession());
|
||||
implode(' > ', $parentnodes) . '"', $this->getSession());
|
||||
}
|
||||
$nodetoclick->click();
|
||||
}
|
||||
|
||||
@@ -104,7 +104,7 @@ if ($getpdf) {
|
||||
}
|
||||
$list[] = $f;
|
||||
}
|
||||
$c .= implode($list, ', ');
|
||||
$c .= implode(', ', $list);
|
||||
$c .= '<p><i><small>Note: * Standard core fonts are not embedded in PDF files, PDF viewers are using local fonts.</small></i></p>';
|
||||
|
||||
$c .= '<h3>Installed languages and their alphabets</h3>';
|
||||
|
||||
@@ -570,13 +570,13 @@ function glossary_print_recent_activity($course, $viewfullnames, $timestart) {
|
||||
|
||||
$joins = array(' FROM {glossary_entries} ge ');
|
||||
$joins[] = 'JOIN {user} u ON u.id = ge.userid ';
|
||||
$fromsql = implode($joins, "\n");
|
||||
$fromsql = implode("\n", $joins);
|
||||
|
||||
$params['timestart'] = $timestart;
|
||||
$clausesql = ' WHERE ge.timemodified > :timestart ';
|
||||
|
||||
if (count($approvals) > 0) {
|
||||
$approvalsql = 'AND ('. implode($approvals, ' OR ') .') ';
|
||||
$approvalsql = 'AND ('. implode(' OR ', $approvals) .') ';
|
||||
} else {
|
||||
$approvalsql = '';
|
||||
}
|
||||
|
||||
@@ -490,7 +490,7 @@ function question_build_edit_resources($edittab, $baseurl, $params) {
|
||||
foreach ($contexts->having_one_edit_tab_cap($edittab) as $context){
|
||||
$contextlistarr[] = "'{$context->id}'";
|
||||
}
|
||||
$contextlist = join($contextlistarr, ' ,');
|
||||
$contextlist = join(' ,', $contextlistarr);
|
||||
if (!empty($pagevars['cat'])){
|
||||
$catparts = explode(',', $pagevars['cat']);
|
||||
if (!$catparts[0] || (false !== array_search($catparts[1], $contextlistarr)) ||
|
||||
|
||||
@@ -164,7 +164,7 @@ class qformat_examview extends qformat_based_on_xml {
|
||||
$questions = array();
|
||||
$currentquestion = array();
|
||||
|
||||
$text = implode($lines, ' ');
|
||||
$text = implode(' ', $lines);
|
||||
$text = $this->cleanunicode($text);
|
||||
|
||||
$xml = xmlize($text, 0);
|
||||
|
||||
@@ -252,7 +252,7 @@ class qformat_examview_test extends question_testcase {
|
||||
$lines = $this->make_test_xml();
|
||||
|
||||
$importer = new qformat_examview();
|
||||
$text = implode($lines, ' ');
|
||||
$text = implode(' ', $lines);
|
||||
|
||||
$xml = xmlize($text, 0);
|
||||
$importer->parse_matching_groups($xml['examview']['#']['matching-group']);
|
||||
|
||||
@@ -128,7 +128,7 @@ class user_roles_editable extends \core\output\inplace_editable {
|
||||
}
|
||||
|
||||
if (!empty($listofroles)) {
|
||||
$this->displayvalue = implode($listofroles, ', ');
|
||||
$this->displayvalue = implode(', ', $listofroles);
|
||||
} else if (!empty($roleids) && empty($viewableroleids)) {
|
||||
$this->displayvalue = get_string('novisibleroles', 'role');
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user