mirror of
https://github.com/processwire/processwire.git
synced 2025-08-17 12:10:45 +02:00
Attempt fix for issue #58 where saving user with different parent than default could result in unnecessary pages_parents table updates.
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
* @property int|string $minHeight Min height for uploaded images, smaller will be refused (default='')
|
||||
* @property string $itemClass Space separated CSS classes for items rendered by this Inputfield. Generally you should append rather than replace.
|
||||
* @property int|bool $useImageEditor Whether or not the modal image editor is allowed for this field (default=true)
|
||||
* @property int $adminThumbScale for backwards compatibility only
|
||||
*
|
||||
* The following properties default values are pulled from $config->adminThumbOptions and can be overridden
|
||||
* by setting directly to an instance of this Inputfield:
|
||||
@@ -969,6 +970,7 @@ class InputfieldImage extends InputfieldFile implements InputfieldItemList {
|
||||
* Return whether or not admin thumbs should be scaled
|
||||
*
|
||||
* @return bool
|
||||
* @deprecated
|
||||
*
|
||||
*/
|
||||
protected function getAdminThumbScale() {
|
||||
|
@@ -245,6 +245,7 @@ class PageRender extends WireData implements Module, ConfigurableModule {
|
||||
*
|
||||
*/
|
||||
public function ___clearCacheFilePages(PageArray $items, Page $page) {
|
||||
if($page) {}
|
||||
foreach($items as $p) {
|
||||
if(((int) $p->template->cache_time) < 1) continue;
|
||||
$cf = $this->getCacheFile($p);
|
||||
@@ -306,7 +307,6 @@ class PageRender extends WireData implements Module, ConfigurableModule {
|
||||
));
|
||||
}
|
||||
|
||||
$items = array();
|
||||
if(count($pageIDs)) {
|
||||
$items = $this->wire('pages')->getById($pageIDs, array(
|
||||
'cache' => false,
|
||||
@@ -343,7 +343,9 @@ class PageRender extends WireData implements Module, ConfigurableModule {
|
||||
if(!is_string($file)) $file = null;
|
||||
$event->cancelHooks = true;
|
||||
$event->replace = true;
|
||||
$event->return = $event->object->renderField($fieldName, $file);
|
||||
/** @var Page $page */
|
||||
$page = $event->object;
|
||||
$event->return = $page->renderField($fieldName, $file);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -390,6 +392,7 @@ class PageRender extends WireData implements Module, ConfigurableModule {
|
||||
$_page = $this->wire('page'); // just in case one page is rendering another, save the previous
|
||||
$config = $this->wire('config');
|
||||
$compiler = null;
|
||||
$compilerOptions = array();
|
||||
if($config->templateCompile && $template->compile) {
|
||||
$compilerOptions = array(
|
||||
'namespace' => strlen(__NAMESPACE__) > 0,
|
||||
@@ -664,10 +667,14 @@ class PageRender extends WireData implements Module, ConfigurableModule {
|
||||
|
||||
/**
|
||||
* Provide a disk cache clearing capability within the module's configuration screen
|
||||
*
|
||||
* @param array $data
|
||||
* @return InputfieldWrapper
|
||||
*
|
||||
*/
|
||||
public function getModuleConfigInputfields(array $data) {
|
||||
|
||||
if($data) {}
|
||||
$path = $this->wire('config')->paths->cache . self::cacheDirName . '/';
|
||||
$numPages = 0;
|
||||
$numFiles = 0;
|
||||
|
Reference in New Issue
Block a user