From a911c649fa3047bdf8310168a2234c0eb990310e Mon Sep 17 00:00:00 2001 From: lia Date: Thu, 11 Jan 2007 19:12:58 +0000 Subject: [PATCH] content: enddate disabled caused problems, fixed now (as reported in irc) --- .../content/handlers/content_db_class.php | 23 +++++++++++++------ 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/e107_plugins/content/handlers/content_db_class.php b/e107_plugins/content/handlers/content_db_class.php index 5c65a547d..9f9190510 100644 --- a/e107_plugins/content/handlers/content_db_class.php +++ b/e107_plugins/content/handlers/content_db_class.php @@ -12,9 +12,9 @@ | GNU General Public License (http://gnu.org). | | $Source: /cvs_backup/e107_0.8/e107_plugins/content/handlers/content_db_class.php,v $ -| $Revision: 1.1.1.1 $ -| $Date: 2006-12-02 04:35:00 $ -| $Author: mcfly_e107 $ +| $Revision: 1.2 $ +| $Date: 2007-01-11 19:12:58 $ +| $Author: lisa_ $ +---------------------------------------------------------------+ */ @@ -217,7 +217,9 @@ class contentdb{ if($_POST['update_datestamp']){ $starttime = time(); }else{ - if($_POST['ne_day'] != "none" && $_POST['ne_month'] != "none" && $_POST['ne_year'] != "none" && $_POST['ne_day'] != "0" && $_POST['ne_month'] != "0" && $_POST['ne_year'] != "0"){ + if( isset($_POST['ne_day']) && $_POST['ne_day']!='' && $_POST['ne_day']!='0' && $_POST['ne_day'] != "none" + && isset($_POST['ne_month']) && $_POST['ne_month']!='' && $_POST['ne_month']!='0' && $_POST['ne_month'] != "none" + && isset($_POST['ne_year']) && $_POST['ne_year']!='' && $_POST['ne_year']!='0' && $_POST['ne_year'] != "none" ){ $newstarttime = mktime( 0, 0, 0, intval($_POST['ne_month']), intval($_POST['ne_day']), intval($_POST['ne_year'])); }else{ $newstarttime = time(); @@ -233,7 +235,9 @@ class contentdb{ } } - if($_POST['end_day'] != "none" && $_POST['end_month'] != "none" && $_POST['end_year'] != "none" && $_POST['end_day'] != "0" && $_POST['end_month'] != "0" && $_POST['end_year'] != "0"){ + if( isset($_POST['end_day']) && $_POST['end_day']!='' && $_POST['end_day'] != "none" + && isset($_POST['end_month']) && $_POST['end_month']!='' && $_POST['end_month'] != "none" + && isset($_POST['end_year']) && $_POST['end_year']!='' && $_POST['end_year'] != "none" ){ $endtime = mktime( 0, 0, 0, intval($_POST['end_month']), intval($_POST['end_day']), intval($_POST['end_year'])); }else{ $endtime = "0"; @@ -329,12 +333,17 @@ class contentdb{ $_POST['parent'] = ($_POST['parent'] == "0" || $_POST['parent']==$_POST['cat_id'] ? "0" : "0.".intval($_POST['parent'])); $_POST['cat_class'] = ($_POST['cat_class'] ? intval($_POST['cat_class']) : "0"); - if($_POST['ne_day'] != "none" && $_POST['ne_month'] != "none" && $_POST['ne_year'] != "none"){ + if( isset($_POST['ne_day']) && $_POST['ne_day']!='' && $_POST['ne_day'] != "none" + && isset($_POST['ne_month']) && $_POST['ne_month']!='' && $_POST['ne_month'] != "none" + && isset($_POST['ne_year']) && $_POST['ne_year']!='' && $_POST['ne_year'] != "none" ){ $starttime = mktime( 0, 0, 0, intval($_POST['ne_month']), intval($_POST['ne_day']), intval($_POST['ne_year'])); }else{ $starttime = time(); } - if($_POST['end_day'] != "none" && $_POST['end_month'] != "none" && $_POST['end_year'] != "none"){ + + if( isset($_POST['end_day']) && $_POST['end_day']!='' && $_POST['end_day'] != "none" + && isset($_POST['end_month']) && $_POST['end_month']!='' && $_POST['end_month'] != "none" + && isset($_POST['end_year']) && $_POST['end_year']!='' && $_POST['end_year'] != "none" ){ $endtime = mktime( 0, 0, 0, intval($_POST['end_month']), intval($_POST['end_day']), intval($_POST['end_year'])); }else{ $endtime = "0";