From 2aac0ee3650971663b442b85d6749675bb2b81ea Mon Sep 17 00:00:00 2001 From: Andrew Smith Date: Thu, 2 Sep 2010 17:24:34 +0000 Subject: [PATCH] Fixes for #6224 , #631 and #638 --- gtd_constants.inc.php | 2 +- gtdfuncs.inc.php | 17 ++++++++++++----- gtdfuncs.js | 6 ++++++ listItems.inc.php | 2 +- processItems.php | 2 +- 5 files changed, 21 insertions(+), 8 deletions(-) diff --git a/gtd_constants.inc.php b/gtd_constants.inc.php index 6782cfe..d16ff59 100644 --- a/gtd_constants.inc.php +++ b/gtd_constants.inc.php @@ -1,5 +1,5 @@ =' ) ) { + // htmlentities doubleEncode (4th param) needs PHP 5.2.3 or higher + $cleaned=htmlentities( $textIn, ENT_QUOTES, + $_SESSION['config']['charset'], FALSE ); + } else { $cleaned=htmlentities( - ($stripSlashes) ? stripslashes($textIn) : $textIn, - ENT_QUOTES, - $_SESSION['config']['charset'], - FALSE ); - } + html_entity_decode($textIn, ENT_QUOTES,$_SESSION['config']['charset']), + ENT_QUOTES, + $_SESSION['config']['charset'] ); + } + } + return $cleaned; } //------------------------------------------------- diff --git a/gtdfuncs.js b/gtdfuncs.js index 2fac16c..fa27e54 100644 --- a/gtdfuncs.js +++ b/gtdfuncs.js @@ -908,6 +908,12 @@ GTD.ParentSelector.prototype.gotparent=function gtd_ps_gp(id,title,type,typename attr( { href: "itemReport.php?itemId="+id, title: "view parent" } ) ) ). append( $( "" ).text( typename ).append( input ) ). appendTo( $("#parentlist") ); + + $("#parenttable"). + after( $("

"). + addClass( "warning" ). + text( "changes are not yet saved" ) ). + next(".warning").next(".warning").remove(); }; // ------------------------------------------------------------------------- GTD.ParentSelector.prototype.makeline=function gtd_ps_ml(id,title,type,typename,i,useTypes,onetype) { diff --git a/listItems.inc.php b/listItems.inc.php index d2dbd53..21b7605 100644 --- a/listItems.inc.php +++ b/listItems.inc.php @@ -110,7 +110,7 @@ */ // default list of fields $dispArray=array( - 'parent'=>'parents' + 'parent'=>'Parents' ,'type'=>'type' ,'flags'=>'!' ,'NA'=>'NA' diff --git a/processItems.php b/processItems.php index a8e8539..0567a25 100644 --- a/processItems.php +++ b/processItems.php @@ -569,7 +569,7 @@ function nextPage() { // set up the forwarding to the next page break; default : - $nextURL=$tst; + $nextURL = (is_array($tst)) ? $tst[0] : $tst; break; } log_value('referrer',$updateGlobals['referrer']);