mirror of
https://github.com/processwire/processwire.git
synced 2025-08-09 00:06:55 +02:00
Add support for latest version of jQuery UI (v1.13.2). This is used when $config->debug = 'dev'; in /site/config.php. Expect occasional JS/output issues when using this latest version of jQuery UI. We'll be upgrading the default core version to this over a period of time, which is why it's only used if $config->debug=='dev'; at present.
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
*
|
||||
* Manages array of filenames or file URLs, like for $config->scripts and $config->styles.
|
||||
*
|
||||
* ProcessWire 3.x, Copyright 2016 by Ryan Cramer
|
||||
* ProcessWire 3.x, Copyright 2023 by Ryan Cramer
|
||||
* https://processwire.com
|
||||
*
|
||||
*/
|
||||
@@ -124,6 +124,30 @@ class FilenameArray implements \IteratorAggregate, \Countable {
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Replace one file with another
|
||||
*
|
||||
* @param string $oldFile
|
||||
* @param string $newFile
|
||||
* @return $this
|
||||
* @since 3.0.215
|
||||
*
|
||||
*/
|
||||
public function replace($oldFile, $newFile) {
|
||||
$key = $this->getKey($oldFile);
|
||||
if(isset($this->data[$key])) {
|
||||
$this->data[$key] = $newFile;
|
||||
} else {
|
||||
$key = array_search($oldFile, $this->data);
|
||||
if($key !== false) {
|
||||
$this->data[$key] = $newFile;
|
||||
} else {
|
||||
$this->add($newFile);
|
||||
}
|
||||
}
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* String value containing print_r() dump of all filenames
|
||||
*
|
||||
|
Reference in New Issue
Block a user