From c3559b57290f7171a8fa2ddf8436694b18728f92 Mon Sep 17 00:00:00 2001 From: e107steved Date: Thu, 17 May 2007 20:15:04 +0000 Subject: [PATCH] Notice removal, undefined forum shortcode --- e107_admin/cpage.php | 28 +++++++------ e107_admin/header.php | 8 ++-- e107_handlers/ren_help.php | 44 ++++++++++---------- e107_plugins/forum/forum_post_shortcodes.php | 5 +++ 4 files changed, 47 insertions(+), 38 deletions(-) diff --git a/e107_admin/cpage.php b/e107_admin/cpage.php index 5097635f0..29a73c980 100644 --- a/e107_admin/cpage.php +++ b/e107_admin/cpage.php @@ -11,9 +11,9 @@ | GNU General Public License (http://gnu.org). | | $Source: /cvs_backup/e107_0.8/e107_admin/cpage.php,v $ -| $Revision: 1.3 $ -| $Date: 2007-03-23 20:39:52 $ -| $Author: lisa_ $ +| $Revision: 1.4 $ +| $Date: 2007-05-17 20:14:57 $ +| $Author: e107steved $ +----------------------------------------------------------------------------+ */ @@ -36,7 +36,7 @@ if (e_QUERY) $action = $tmp[0]; $sub_action = $tmp[1]; $id = $tmp[2]; - $from = ($tmp[3] ? $tmp[3] : 0); + $from = varset($tmp[3],0); } if(isset($_POST['submitPage'])) @@ -127,12 +127,12 @@ class page { $text .= " - $pge[page_id] - $pge[page_title] - ".($pge[page_theme] ? "menu" : "page")." + {$pge['page_id']} + {$pge['page_title']} + ".($pge['page_theme'] ? "menu" : "page")." - ".ADMIN_EDIT_ICON." - + ".ADMIN_EDIT_ICON." + "; } @@ -167,7 +167,7 @@ class page global $sql, $tp, $ns, $pref, $sub_action, $id; - if ($sub_action == "edit" && !$_POST['preview'] && !$_POST['submit']) + if ($sub_action == "edit" && !isset($_POST['preview']) && !isset($_POST['submit'])) { if ($sql->db_Select("page", "*", "page_id='$id' ")) { @@ -187,6 +187,10 @@ class page $row = $sql -> db_Fetch(); $page_link = $row['link_name']; } + else + { + $page_link = ''; + } } $text = "
@@ -308,8 +312,8 @@ class page $pauthor = ($_POST['page_display_authordate_flag'] ? USERID : 0); if($mode) - { - $update = $sql -> db_Update("page", "page_title='$page_title', page_text='$page_text', page_author='$pauthor', page_rating_flag='".intval($_POST['page_rating_flag'])."', page_comment_flag='".intval($_POST['page_comment_flag'])."', page_password='".$_POST['page_password']."', page_class='".$_POST['page_class']."', page_ip_restrict='".$_POST['page_ip_restrict']."' WHERE page_id='$mode'"); + { // Don't think $_POST['page_ip_restrict'] is ever set + $update = $sql -> db_Update("page", "page_title='$page_title', page_text='$page_text', page_author='$pauthor', page_rating_flag='".intval($_POST['page_rating_flag'])."', page_comment_flag='".intval($_POST['page_comment_flag'])."', page_password='".$_POST['page_password']."', page_class='".$_POST['page_class']."', page_ip_restrict='".varset($_POST['page_ip_restrict'],'')."' WHERE page_id='$mode'"); $e107cache->clear("page_{$mode}"); $e107cache->clear("page-t_{$mode}"); diff --git a/e107_admin/header.php b/e107_admin/header.php index 6371a3d1b..830b1670c 100644 --- a/e107_admin/header.php +++ b/e107_admin/header.php @@ -12,8 +12,8 @@ | GNU General Public License (http://gnu.org). | | $Source: /cvs_backup/e107_0.8/e107_admin/header.php,v $ -| $Revision: 1.9 $ -| $Date: 2007-02-07 21:22:09 $ +| $Revision: 1.10 $ +| $Date: 2007-05-17 20:14:57 $ | $Author: e107steved $ +---------------------------------------------------------------+ */ @@ -358,7 +358,7 @@ if (!function_exists('show_admin_menu')) { } $replace[0] = str_replace(" ", " ", $e107_vars[$act]['text']); $replace[1] = $e107_vars[$act]['link']; - if ($e107_vars[$act]['include']!='') { + if (!empty($e107_vars[$act]['include'])) { $replace[2] = $e107_vars[$act]['include']; } else { $replace[2] = $js ? "onclick=\"showhideit('".$act."');\"" : "onclick=\"document.location='".$e107_vars[$act]['link']."'; disabled=true;\""; @@ -458,4 +458,4 @@ if (strpos(e_SELF.'?'.e_QUERY, 'menus.php?configure') === FALSE) { } $sql->db_Mark_Time('(End: Parse Admin Header)'); } -?> +?> \ No newline at end of file diff --git a/e107_handlers/ren_help.php b/e107_handlers/ren_help.php index a1948abb7..8b60bf626 100644 --- a/e107_handlers/ren_help.php +++ b/e107_handlers/ren_help.php @@ -11,9 +11,9 @@ | GNU General Public License (http://gnu.org). | | $Source: /cvs_backup/e107_0.8/e107_handlers/ren_help.php,v $ -| $Revision: 1.1.1.1 $ -| $Date: 2006-12-02 04:33:57 $ -| $Author: mcfly_e107 $ +| $Revision: 1.2 $ +| $Date: 2007-05-17 20:14:57 $ +| $Author: e107steved $ +----------------------------------------------------------------------------+ */ @@ -163,7 +163,7 @@ function Color_Select($formid='col_selector') { } } } - document.write(''); + document.write('
'); document.write(td_render(coloursgrey[0]) + tdblk + rows1 + rows2); document.write('<\/tr><\/table>'); //]]> @@ -282,25 +282,25 @@ function PreFile_Select($formid='prefile_selector',$bbcode_filedir) { "; foreach($filelist as $file) { - if(isset($file['class'])) - { - $ucinfo = "^".$file['class']; - $ucname = r_userclass_name($file['class']); - } - else - { - $ucinfo = ""; - $ucname = r_userclass_name(0); - } + if(isset($file['class'])) + { + $ucinfo = "^".$file['class']; + $ucname = r_userclass_name($file['class']); + } + else + { + $ucinfo = ""; + $ucname = r_userclass_name(0); + } - if($file['id']) - { - $text .= "\n"; - } - else - { - $text .= "\n"; - } + if($file['id']) + { + $text .= "\n"; + } + else + { + $text .= "\n"; + } } $text .=""; diff --git a/e107_plugins/forum/forum_post_shortcodes.php b/e107_plugins/forum/forum_post_shortcodes.php index 43fb00e90..ad1dfd1c5 100644 --- a/e107_plugins/forum/forum_post_shortcodes.php +++ b/e107_plugins/forum/forum_post_shortcodes.php @@ -17,6 +17,11 @@ $txt .= $tp->parseTemplate($LATESTPOSTS_END, TRUE, $forum_shortcodes); return $txt; SC_END + +SC_BEGIN LATESTPOSTSCOUNT + return; // Null return as placeholder +SC_END + SC_BEGIN THREADTOPIC global $thread_info, $action, $gen, $tp, $post_info, $forum_shortcodes, $THREADTOPIC_REPLY; $post_info = $thread_info['head'];