mirror of
https://github.com/processwire/processwire.git
synced 2025-08-20 21:42:23 +02:00
Update for processwire/processwire-issues#1791
This commit is contained in:
@@ -29,7 +29,7 @@ if($user->hasPermission('page-edit')) {
|
||||
$searchForm = '';
|
||||
}
|
||||
|
||||
$version = $adminTheme->version . 'l';
|
||||
$version = $config->version;
|
||||
|
||||
$config->styles->prepend($config->urls->root . "wire/templates-admin/styles/AdminTheme.css?v=$version");
|
||||
$config->styles->prepend($config->urls->adminTemplates . "styles/" . ($adminTheme->colors ? "main-$adminTheme->colors" : "main-classic") . ".css?v=$version");
|
||||
|
@@ -20,7 +20,7 @@
|
||||
if(!defined("PROCESSWIRE")) die();
|
||||
|
||||
if(!isset($content)) $content = '';
|
||||
$version = $adminTheme->version . 'm';
|
||||
$version = $config->version;
|
||||
$ext = $config->debug ? "js" : "min.js";
|
||||
|
||||
// Search form
|
||||
|
@@ -173,7 +173,7 @@ class AdminThemeUikitCss extends WireData {
|
||||
$file = $this->defaultCssFile;
|
||||
$path = $config->paths($this->adminTheme) . $file;
|
||||
if($getPath) return $path;
|
||||
$v = filemtime($path);
|
||||
$v = $config->debug ? filemtime($path) : $config->version;
|
||||
$url = $config->urls($this->adminTheme) . "$file?v=$v" ;
|
||||
return $url;
|
||||
}
|
||||
@@ -264,4 +264,4 @@ class AdminThemeUikitCss extends WireData {
|
||||
return $defaultFile;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@@ -14,7 +14,7 @@ if(!defined("PROCESSWIRE")) die();
|
||||
/** @var Paths $urls */
|
||||
/** @var string $layout */
|
||||
|
||||
$version = $adminTheme->version . 'h';
|
||||
$version = $config->version;
|
||||
$rootUrl = $config->urls->root;
|
||||
$themeUrl = $adminTheme->url();
|
||||
$styles = $config->styles;
|
||||
|
@@ -220,7 +220,7 @@ class InputfieldAsmSelect extends InputfieldSelectMultiple implements Inputfield
|
||||
// require javascript and css
|
||||
$class = $this->className();
|
||||
$info = self::getModuleInfo();
|
||||
$ver = $info['version'];
|
||||
$ver = $config->version . '-' . $info['version'];
|
||||
$jsfile = $config->debug ? 'jquery.asmselect.js' : 'jquery.asmselect.min.js';
|
||||
$url = $config->urls($class);
|
||||
|
||||
|
@@ -215,7 +215,7 @@ class InputfieldImage extends InputfieldFile implements InputfieldItemList, Inpu
|
||||
$thisURL = $config->urls('InputfieldImage');
|
||||
$jsExt = $config->debug ? "js" : "min.js";
|
||||
$config->scripts->add($thisURL . "piexif.$jsExt");
|
||||
$config->scripts->add($thisURL . "PWImageResizer.$jsExt?v=$moduleInfo[version]");
|
||||
$config->scripts->add($thisURL . "PWImageResizer.$jsExt?v={$config->version}-$moduleInfo[version]");
|
||||
$maxSize = str_replace(',', '.', $this->maxSize);
|
||||
$quality = str_replace(',', '.', (float) ($this->clientQuality / 100));
|
||||
$this->wrapAttr('data-resize', "$this->maxWidth;$this->maxHeight;$maxSize;$quality");
|
||||
|
@@ -142,10 +142,10 @@ class LanguageTabs extends WireData implements Module, ConfigurableModule {
|
||||
}
|
||||
|
||||
if($settings['loadStyles']) {
|
||||
$config->styles->add($config->urls('LanguageTabs') . "LanguageTabs.css?v=$info[version]");
|
||||
$config->styles->add($config->urls('LanguageTabs') . "LanguageTabs.css?v=$config->version-$info[version]");
|
||||
}
|
||||
if($settings['loadScripts']) {
|
||||
$config->scripts->add($config->urls('LanguageTabs') . "LanguageTabs.js?v=$info[version]");
|
||||
$config->scripts->add($config->urls('LanguageTabs') . "LanguageTabs.js?v=$config->version-$info[version]");
|
||||
}
|
||||
|
||||
/** @var JqueryCore $jQueryCore */
|
||||
|
@@ -167,7 +167,7 @@ class PagePathHistory extends WireData implements Module, ConfigurableModule {
|
||||
$database = $this->wire()->database;
|
||||
$modules = $this->wire()->modules;
|
||||
$table = self::dbTableName;
|
||||
$path = $sanitizer->pagePathName('/' . trim($path, '/'), Sanitizer::toAscii);
|
||||
$path = $sanitizer->pagePathName('/' . trim("$path", '/'), Sanitizer::toAscii);
|
||||
|
||||
$selector = "path=$path";
|
||||
if($modules->isInstalled('PagePaths')) $selector .= ", id!=$page->id";
|
||||
|
@@ -767,7 +767,7 @@ class ProcessTemplate extends Process implements ConfigurableModule {
|
||||
}
|
||||
|
||||
$min = $config->debug ? '' : '.min';
|
||||
$config->scripts->add($config->urls('ProcessTemplate') . "ProcessTemplateFieldCreator$min.js?v=1");
|
||||
$config->scripts->add($config->urls('ProcessTemplate') . "ProcessTemplateFieldCreator$min.js?v=$config->version");
|
||||
|
||||
$label = $this->template->getLabel();
|
||||
if(!$label) $label = $this->template->name;
|
||||
@@ -3931,4 +3931,3 @@ class ProcessTemplate extends Process implements ConfigurableModule {
|
||||
public function getModuleConfigInputfields(InputfieldWrapper $inputfields) { }
|
||||
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user