summaryrefslogtreecommitdiff
path: root/inc
diff options
context:
space:
mode:
Diffstat (limited to 'inc')
-rw-r--r--inc/cache.php8
-rw-r--r--inc/events.php7
-rw-r--r--inc/media.php6
3 files changed, 14 insertions, 7 deletions
diff --git a/inc/cache.php b/inc/cache.php
index 5f54a34a9..56c5b65f2 100644
--- a/inc/cache.php
+++ b/inc/cache.php
@@ -63,11 +63,13 @@ class cache {
* age - expire cache if older than age (seconds)
* files - expire cache if any file in this array was updated more recently than the cache
*
+ * Note that this function needs to be public as it is used as callback for the event handler
+ *
* can be overridden
*
* @return bool see useCache()
*/
- protected function _useCache() {
+ public function _useCache() {
if (!empty($this->depends['purge'])) return false; // purge requested?
if (!($this->_time = @filemtime($this->cache))) return false; // cache exists?
@@ -194,7 +196,7 @@ class cache_parser extends cache {
*
* @return bool see useCache()
*/
- protected function _useCache() {
+ public function _useCache() {
if (!@file_exists($this->file)) return false; // source exists?
return parent::_useCache();
@@ -229,7 +231,7 @@ class cache_renderer extends cache_parser {
*
* @return bool see useCache()
*/
- protected function _useCache() {
+ public function _useCache() {
global $conf;
if (!parent::_useCache()) return false;
diff --git a/inc/events.php b/inc/events.php
index 7f9824f60..318a7617e 100644
--- a/inc/events.php
+++ b/inc/events.php
@@ -93,7 +93,12 @@ class Doku_Event {
*/
function trigger($action=null, $enablePrevent=true) {
- if (!is_callable($action)) $enablePrevent = false;
+ if (!is_callable($action)) {
+ $enablePrevent = false;
+ if (!is_null($action)) {
+ trigger_error('The default action of '.$this.' is not null but also not callable. Maybe the method is not public?', E_USER_WARNING);
+ }
+ }
if ($this->advise_before($enablePrevent) && is_callable($action)) {
if (is_array($action)) {
diff --git a/inc/media.php b/inc/media.php
index dc76521c6..894333b11 100644
--- a/inc/media.php
+++ b/inc/media.php
@@ -1449,10 +1449,10 @@ function media_printfile($item,$auth,$jump,$display_namespace=false){
function media_printicon($filename){
list($ext) = mimetype(mediaFN($filename),false);
- if (@file_exists(DOKU_INC.'lib/images/fileicons/'.$ext.'.png')) {
- $icon = DOKU_BASE.'lib/images/fileicons/'.$ext.'.png';
+ if (@file_exists(DOKU_INC.'lib/images/fileicons/32x32/'.$ext.'.png')) {
+ $icon = DOKU_BASE.'lib/images/fileicons/32x32/'.$ext.'.png';
} else {
- $icon = DOKU_BASE.'lib/images/fileicons/file.png';
+ $icon = DOKU_BASE.'lib/images/fileicons/32x32/file.png';
}
return '<img src="'.$icon.'" alt="'.$filename.'" class="icon" />';