[geeklog-cvs] geeklog-1.3/public_html/admin story.php,1.111,1.112

dhaun at geeklog.net dhaun at geeklog.net
Fri Jan 23 15:44:47 EST 2004


Update of /usr/cvs/geeklog/geeklog-1.3/public_html/admin
In directory geeklog_prod:/tmp/cvs-serv18450

Modified Files:
	story.php 
Log Message:
Just an attempt to reduce the number of "undefined variable" notices ...


Index: story.php
===================================================================
RCS file: /usr/cvs/geeklog/geeklog-1.3/public_html/admin/story.php,v
retrieving revision 1.111
retrieving revision 1.112
diff -C2 -d -r1.111 -r1.112
*** story.php	18 Jan 2004 14:41:22 -0000	1.111
--- story.php	23 Jan 2004 20:44:44 -0000	1.112
***************
*** 112,116 ****
              return $display;
          }
!     } elseif (!empty($sid) && $mode == "editsubmission") {
          $result = DB_query("SELECT *,UNIX_TIMESTAMP(date) AS unixdate FROM {$_TABLES['storysubmission']} WHERE sid = '$sid'");
          if (DB_numRows ($result) > 0) {
--- 112,116 ----
              return $display;
          }
!     } elseif (!empty($sid) && $mode == 'editsubmission') {
          $result = DB_query("SELECT *,UNIX_TIMESTAMP(date) AS unixdate FROM {$_TABLES['storysubmission']} WHERE sid = '$sid'");
          if (DB_numRows ($result) > 0) {
***************
*** 135,139 ****
              return COM_refresh ($_CONF['site_admin_url'] . '/moderation.php');
          }
!     } elseif ($mode == "edit") {
          $A['sid'] = COM_makesid();
          $A['show_topic_icon'] = 1;
--- 135,139 ----
              return COM_refresh ($_CONF['site_admin_url'] . '/moderation.php');
          }
!     } elseif ($mode == 'edit') {
          $A['sid'] = COM_makesid();
          $A['show_topic_icon'] = 1;
***************
*** 170,181 ****
          // Convert array values to numeric permission values
          list($A['perm_owner'],$A['perm_group'],$A['perm_members'],$A['perm_anon']) = SEC_getPermissionValues($A['perm_owner'],$A['perm_group'],$A['perm_members'],$A['perm_anon']);
!         if ($A["postmode"] == "html") {
!             $A["introtext"] = COM_checkHTML(COM_checkWords($A["introtext"]));
!             $A["bodytext"] = COM_checkHTML(COM_checkWords($A["bodytext"]));
!             $A["title"] = COM_checkHTML(htmlspecialchars(COM_checkWords($A["title"])));
          } else {
!             $A["introtext"] = htmlspecialchars(COM_checkWords($A["introtext"]));
!             $A["bodytext"] = htmlspecialchars(COM_checkWords($A["bodytext"]));
!             $A["title"] = htmlspecialchars(COM_checkWords($A["title"]));
          }
          $A['title'] = strip_tags($A['title']);
--- 170,181 ----
          // Convert array values to numeric permission values
          list($A['perm_owner'],$A['perm_group'],$A['perm_members'],$A['perm_anon']) = SEC_getPermissionValues($A['perm_owner'],$A['perm_group'],$A['perm_members'],$A['perm_anon']);
!         if ($A['postmode'] == 'html') {
!             $A['introtext'] = COM_checkHTML(COM_checkWords($A['introtext']));
!             $A['bodytext'] = COM_checkHTML(COM_checkWords($A['bodytext']));
!             $A['title'] = COM_checkHTML(htmlspecialchars(COM_checkWords($A['title'])));
          } else {
!             $A['introtext'] = htmlspecialchars(COM_checkWords($A['introtext']));
!             $A['bodytext'] = htmlspecialchars(COM_checkWords($A['bodytext']));
!             $A['title'] = htmlspecialchars(COM_checkWords($A['title']));
          }
          $A['title'] = strip_tags($A['title']);
***************
*** 184,188 ****
      // Load HTML templates
      $story_templates = new Template($_CONF['path_layout'] . 'admin/story');
!     if (($_CONF['advanced_editor'] == 1) && file_exists ($_CONF['path_layout'] . 'admin/story/storyeditor_advanced.thtml')) {
          $story_templates->set_file(array('editor'=>'storyeditor_advanced.thtml'));
      } else {
--- 184,188 ----
      // Load HTML templates
      $story_templates = new Template($_CONF['path_layout'] . 'admin/story');
!     if (isset ($_CONF['advanced_editor']) && ($_CONF['advanced_editor'] == 1) && file_exists ($_CONF['path_layout'] . 'admin/story/storyeditor_advanced.thtml')) {
          $story_templates->set_file(array('editor'=>'storyeditor_advanced.thtml'));
      } else {
***************
*** 242,245 ****
--- 242,246 ----
  
      $usergroups = SEC_getUserGroups();
+     $groupdd = '';
      if ($access == 3) {
          $groupdd .= '<select name="group_id">';
***************
*** 450,455 ****
      }
  
!     if ($current_topic == $LANG09['9']) {
          $excludetopics = '';
          $topicsql = "SELECT tid,topic FROM {$_TABLES['topics']}" . COM_getPermSQL ();
          $tresult = DB_query( $topicsql );
--- 451,457 ----
      }
  
!     if ($current_topic == $LANG09[9]) {
          $excludetopics = '';
+         $seltopics = '';
          $topicsql = "SELECT tid,topic FROM {$_TABLES['topics']}" . COM_getPermSQL ();
          $tresult = DB_query( $topicsql );
***************
*** 472,476 ****
              $excludetopics .= ") ";
          } 
- 
      } else {
          $excludetopics = " WHERE tid = '$current_topic' ";
--- 474,477 ----
***************
*** 1049,1052 ****
--- 1050,1060 ----
  
  // MAIN
+ $mode = '';
+ if (isset ($HTTP_POST_VARS['mode'])) {
+     $mode = COM_applyFilter ($HTTP_POST_VARS['mode']);
+ } else if (isset ($HTTP_GET_VARS['mode'])) {
+     $mode = COM_applyFilter ($HTTP_GET_VARS['mode']);
+ }
+ 
  $display = '';
  if (($mode == $LANG24[11]) && !empty ($LANG24[11])) { // delete





More information about the geeklog-cvs mailing list