From c277a6bdf6a2286eadaba9b8ad5c638b9d50922b Mon Sep 17 00:00:00 2001 From: Tom N Harris Date: Thu, 21 Oct 2010 13:20:08 -0400 Subject: Deprecate html_attbuild in favor of buildAttributes --- inc/html.php | 1 + 1 file changed, 1 insertion(+) (limited to 'inc/html.php') diff --git a/inc/html.php b/inc/html.php index 02afa00e9..a02cc020d 100644 --- a/inc/html.php +++ b/inc/html.php @@ -26,6 +26,7 @@ function html_wikilink($id,$name=null,$search=''){ /** * Helps building long attribute lists * + * @deprecated Use buildAttributes instead * @author Andreas Gohr */ function html_attbuild($attributes){ -- cgit v1.2.3 From 3733161e2de6b5a7092884f4e39ce8c846ae8f8c Mon Sep 17 00:00:00 2001 From: Adrian Lang Date: Wed, 8 Dec 2010 08:51:32 +0100 Subject: Add missing variable declaration --- inc/html.php | 3 +++ 1 file changed, 3 insertions(+) (limited to 'inc/html.php') diff --git a/inc/html.php b/inc/html.php index 9d3c92707..1e02ac9ce 100644 --- a/inc/html.php +++ b/inc/html.php @@ -888,6 +888,9 @@ function html_diff($text='',$intro=true){ $rev2 = (int) $_REQUEST['rev2']; } + $r_minor = ''; + $l_minor = ''; + if($text){ // compare text to the most current revision $l_rev = ''; $l_text = rawWiki($ID,''); -- cgit v1.2.3 From fa7c70ff4d7f9999466436e7d559eb0c81571779 Mon Sep 17 00:00:00 2001 From: Adrian Lang Date: Wed, 8 Dec 2010 17:17:40 +0100 Subject: tmp --- inc/html.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'inc/html.php') diff --git a/inc/html.php b/inc/html.php index 1e02ac9ce..98ee8a496 100644 --- a/inc/html.php +++ b/inc/html.php @@ -876,7 +876,7 @@ function html_diff($text='',$intro=true){ // array in rev2. $rev1 = $REV; - if(is_array($_REQUEST['rev2'])){ + if (is_array($_REQUEST['rev2'])){ $rev1 = (int) $_REQUEST['rev2'][0]; $rev2 = (int) $_REQUEST['rev2'][1]; @@ -948,8 +948,12 @@ function html_diff($text='',$intro=true){ '
'.$l_user.' '.$l_sum; } - if($r_rev){ - $r_info = getRevisionInfo($ID,$r_rev,true); + $_r_rev = $r_rev; + if (!$_r_rev) { + $_r_rev = @filemtime(wikiFN($ID)); + } + if($_r_rev){ + $r_info = getRevisionInfo($ID,$_r_rev,true); if($r_info['user']){ $r_user = editorinfo($r_info['user']); if(auth_ismanager()) $r_user .= ' ('.$r_info['ip'].')'; -- cgit v1.2.3 From ddcde0004fc886990df5b7029e93bb345d7e09b4 Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Sun, 2 Jan 2011 20:45:16 +0000 Subject: added space between license text and link --- inc/html.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'inc/html.php') diff --git a/inc/html.php b/inc/html.php index 9d3c92707..4e3744fd1 100644 --- a/inc/html.php +++ b/inc/html.php @@ -1214,9 +1214,9 @@ function html_edit(){ if($wr && $conf['license']){ $form->addElement(form_makeOpenTag('div', array('class'=>'license'))); $out = $lang['licenseok']; - $out .= ''; + $out .= '>'.$license[$conf['license']]['name'].''; $form->addElement($out); $form->addElement(form_makeCloseTag('div')); } -- cgit v1.2.3 From cc58224cff540373081dcde9c64d00efbf0fbddc Mon Sep 17 00:00:00 2001 From: Michael Hamann Date: Mon, 10 Jan 2011 21:54:58 +0100 Subject: Fix msg() calls when messages have already been printed This commit fixes two bugs that occurred when msg() was called after html_msgarea() had already been called. - the $MSG array is now cleared when it has been printed (otherwise $MSG has been printed again when another msg() call was done) - headers_sent() didn't work for me, it always reported false although html_msgarea() had already been called which might be explainable with output buffering. This makes msg() now depend on the first call of html_msgarea() or headers_sent() in order to not to break msg() in ajax requests etc. --- inc/html.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'inc/html.php') diff --git a/inc/html.php b/inc/html.php index 4e3744fd1..b6c5cc7ba 100644 --- a/inc/html.php +++ b/inc/html.php @@ -1034,7 +1034,10 @@ function html_conflict($text,$summary){ * @author Andreas Gohr */ function html_msgarea(){ - global $MSG; + global $MSG, $MSG_shown; + // store if the global $MSG has already been shown and thus HTML output has been started + $MSG_shown = true; + if(!isset($MSG)) return; $shown = array(); @@ -1046,6 +1049,8 @@ function html_msgarea(){ print ''; $shown[$hash] = 1; } + + unset($GLOBALS['MSG']); } /** -- cgit v1.2.3 From 820923f1328bcfe6002831570eb65238411c5b70 Mon Sep 17 00:00:00 2001 From: Michael Hamann Date: Tue, 18 Jan 2011 00:04:41 +0100 Subject: Revert "tmp" for inc/html.php as it breaks the diff output This reverts commit fa7c70ff4d7f9999466436e7d559eb0c81571779. --- inc/html.php | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'inc/html.php') diff --git a/inc/html.php b/inc/html.php index 67b1c10b7..bd87ee7a1 100644 --- a/inc/html.php +++ b/inc/html.php @@ -876,7 +876,7 @@ function html_diff($text='',$intro=true){ // array in rev2. $rev1 = $REV; - if (is_array($_REQUEST['rev2'])){ + if(is_array($_REQUEST['rev2'])){ $rev1 = (int) $_REQUEST['rev2'][0]; $rev2 = (int) $_REQUEST['rev2'][1]; @@ -948,12 +948,8 @@ function html_diff($text='',$intro=true){ '
'.$l_user.' '.$l_sum; } - $_r_rev = $r_rev; - if (!$_r_rev) { - $_r_rev = @filemtime(wikiFN($ID)); - } - if($_r_rev){ - $r_info = getRevisionInfo($ID,$_r_rev,true); + if($r_rev){ + $r_info = getRevisionInfo($ID,$r_rev,true); if($r_info['user']){ $r_user = editorinfo($r_info['user']); if(auth_ismanager()) $r_user .= ' ('.$r_info['ip'].')'; -- cgit v1.2.3