From: <ru...@us...> - 2009-06-04 11:35:15
|
Revision: 6870 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=6870&view=rev Author: rurban Date: 2009-06-04 11:35:04 +0000 (Thu, 04 Jun 2009) Log Message: ----------- support :DontStoreLink Modified Paths: -------------- trunk/lib/CachedMarkup.php Modified: trunk/lib/CachedMarkup.php =================================================================== --- trunk/lib/CachedMarkup.php 2009-06-04 11:33:24 UTC (rev 6869) +++ trunk/lib/CachedMarkup.php 2009-06-04 11:35:04 UTC (rev 6870) @@ -243,7 +243,8 @@ { // give the content the chance to know about itself or even // to change itself $val = $item->expand($basepage, $this); - $val->printXML(); + if ($val) $val->printXML(); + else trigger_error("empty item $item"); } else { $item->printXML(); @@ -691,7 +692,13 @@ } function getWikiPageLinks($basepage) { - return false; // do not store external links + if ($basepage == '') return false; + /* ":DontStoreLink" */ + if (substr($this->_link,0,1) == ':') return false; + /* store only links to valid pagenames */ + if ($link = $this->getPagename($basepage)) + return array(array('linkto' => $link, 'relation' => 0)); + else return false; // dont store external links } function _getName($basepage) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |