summaryrefslogtreecommitdiff
path: root/inc
diff options
context:
space:
mode:
authorAdrian Lang <lang@cosmocode.de>2009-11-13 13:34:58 +0100
committerAdrian Lang <lang@cosmocode.de>2009-11-13 13:34:58 +0100
commitc0322273adef5540c5e780c7a82329b5862a0871 (patch)
tree2220fa544fe4deee6e97c411a7b54d8b07818ebe /inc
parent7d044e2a0700980fc1947982c674b56c359b35ae (diff)
downloadrpg-c0322273adef5540c5e780c7a82329b5862a0871.tar.gz
rpg-c0322273adef5540c5e780c7a82329b5862a0871.tar.bz2
Less E_NOTICEs, removed spell checker leftover
darcs-hash:20091113123458-e4919-d4841ea9c627059a4afa8e0032dd889b3cc579cb.gz
Diffstat (limited to 'inc')
-rw-r--r--inc/cache.php33
-rw-r--r--inc/html.php3
-rw-r--r--inc/parser/metadata.php2
3 files changed, 20 insertions, 18 deletions
diff --git a/inc/cache.php b/inc/cache.php
index c01e17c3e..9a9d5e3b0 100644
--- a/inc/cache.php
+++ b/inc/cache.php
@@ -217,24 +217,27 @@ class cache_renderer extends cache_parser {
if (!parent::_useCache()) return false;
- // for wiki pages, check metadata dependencies
- if (isset($this->page)) {
- $metadata = p_get_metadata($this->page);
+ if (!isset($this->page)) {
+ return true;
+ }
- // check currnent link existence is consistent with cache version
- // first check the purgefile
- // - if the cache is more recent that the purgefile we know no links can have been updated
- if ($this->_time < @filemtime($conf['cachedir'].'/purgefile')) {
+ // check current link existence is consistent with cache version
+ // first check the purgefile
+ // - if the cache is more recent than the purgefile we know no links can have been updated
+ if ($this->_time > @filemtime($conf['cachedir'].'/purgefile')) {
+ return true;
+ }
-# $links = p_get_metadata($this->page,"relation references");
- $links = $metadata['relation']['references'];
+ // for wiki pages, check metadata dependencies
+ $metadata = p_get_metadata($this->page);
- if (!empty($links)) {
- foreach ($links as $id => $exists) {
- if ($exists != page_exists($id,'',false)) return false;
- }
- }
- }
+ if (!isset($metadata['relation']['references']) ||
+ !empty($metadata['relation']['references'])) {
+ return true;
+ }
+
+ foreach ($metadata['relation']['references'] as $id => $exists) {
+ if ($exists != page_exists($id,'',false)) return false;
}
return true;
diff --git a/inc/html.php b/inc/html.php
index f01f99cdc..f6f301725 100644
--- a/inc/html.php
+++ b/inc/html.php
@@ -1189,7 +1189,6 @@ function html_edit($text=null,$include='edit'){ //FIXME: include needed?
<?php /* sets changed to true when previewed */?>
textChanged = <?php ($mod) ? print 'true' : print 'false' ?>;
//--><!]]></script>
- <span id="spell__action"></span>
<?php } ?>
</div>
<?php
@@ -1223,7 +1222,7 @@ function html_edit($text=null,$include='edit'){ //FIXME: include needed?
$form->addElement(form_makeOpenTag('div', array('class'=>'license')));
$out = $lang['licenseok'];
$out .= '<a href="'.$license[$conf['license']]['url'].'" rel="license" class="urlextern"';
- if($conf['target']['external']) $out .= ' target="'.$conf['target']['external'].'"';
+ if(isset($conf['target']['external'])) $out .= ' target="'.$conf['target']['external'].'"';
$out .= '> '.$license[$conf['license']]['name'].'</a>';
$form->addElement($out);
$form->addElement(form_makeCloseTag('div'));
diff --git a/inc/parser/metadata.php b/inc/parser/metadata.php
index c2afe8a7f..fc60e5774 100644
--- a/inc/parser/metadata.php
+++ b/inc/parser/metadata.php
@@ -68,7 +68,7 @@ class Doku_Renderer_metadata extends Doku_Renderer {
$this->meta['relation']['firstimage'] = $this->firstimage;
- if(!$this->meta['date']['modified']){
+ if(!isset($this->meta['date']['modified'])){
$this->meta['date']['modified'] = filemtime(wikiFN($ID));
}