From a1bbd05b4631aae5602c9e74af4b6cd19229fee3 Mon Sep 17 00:00:00 2001 From: Michael Hamann Date: Wed, 27 Apr 2011 20:52:56 +0200 Subject: Remove deprecated call-time pass-by-reference in inc/common.php The value is still passed by reference as the parameter of the called function is declared as reference. --- inc/common.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'inc/common.php') diff --git a/inc/common.php b/inc/common.php index ac7ddd653..bbdda16da 100644 --- a/inc/common.php +++ b/inc/common.php @@ -845,7 +845,7 @@ function pageTemplate($id){ // load the content $data['tpl'] = io_readFile($data['tplfile']); } - if($data['doreplace']) parsePageTemplate(&$data); + if($data['doreplace']) parsePageTemplate($data); } $evt->advise_after(); unset($evt); -- cgit v1.2.3 From 67c15ecea77ff971dcb554de77cf1c25de1140a0 Mon Sep 17 00:00:00 2001 From: Michael Hamann Date: Sun, 8 May 2011 00:51:22 +0200 Subject: Change when metadata is rendered - only when really needed This changes the cache logic for metadata. It introduces a new mode that tries to avoid rendering the page again for simple requests but still updates the metadata when the page has been changed (but not when the cache timeout has been reached or purge is used). It simply compares the time of the last rendering with the last modified time of the page. The old boolean $render parameter has been changed into an int with three possible values. Compatibility for the old parameter is provided using a check with is_numeric using the following mapping: - false is still don't render (0 is the new value for that) - true is using that new render logic which means that many plugins will still work unchanged even if they request a lot of data using $render=true (1 is the new value for that providing full compatibility in the case 1 has been used instead of true) The default value for p_get_first_heading is now that new simple cache logic, the default value for getting metadata is the cache logic which should be used with care but is the only way to request (rendered) metadata that can change because of plugin installations or upgrades. --- inc/common.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'inc/common.php') diff --git a/inc/common.php b/inc/common.php index bbdda16da..7522095ab 100644 --- a/inc/common.php +++ b/inc/common.php @@ -284,7 +284,7 @@ function breadcrumbs(){ $name = noNSorNS($ID); if (useHeading('navigation')) { // get page title - $title = p_get_first_heading($ID,true); + $title = p_get_first_heading($ID,METADATA_RENDER_USING_SIMPLE_CACHE); if ($title) { $name = $title; } -- cgit v1.2.3