[geeklog-cvs] geeklog-1.3/public_html submit.php,1.59,1.60

dhaun at geeklog.net dhaun at geeklog.net
Sat Jan 24 16:52:04 EST 2004


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

Modified Files:
	submit.php 
Log Message:
Introduced {max_url_length} template variable.


Index: submit.php
===================================================================
RCS file: /usr/cvs/geeklog/geeklog-1.3/public_html/submit.php,v
retrieving revision 1.59
retrieving revision 1.60
diff -C2 -d -r1.59 -r1.60
*** submit.php	18 Jan 2004 14:45:24 -0000	1.59
--- submit.php	24 Jan 2004 21:52:01 -0000	1.60
***************
*** 9,13 ****
  // | Let users submit stories, links, and events.                              |
  // +---------------------------------------------------------------------------+
! // | Copyright (C) 2000-2003 by the following authors:                         |
  // |                                                                           |
  // | Authors: Tony Bibbs        - tony at tonybibbs.com                           |
--- 9,13 ----
  // | Let users submit stories, links, and events.                              |
  // +---------------------------------------------------------------------------+
! // | Copyright (C) 2000-2004 by the following authors:                         |
  // |                                                                           |
  // | Authors: Tony Bibbs        - tony at tonybibbs.com                           |
***************
*** 152,155 ****
--- 152,156 ----
      }
      $eventform->set_var('lang_link', $LANG12[11]);
+     $eventform->set_var('max_url_length', 128);
      $eventform->set_var('lang_startdate', $LANG12[12]);
      $eventform->set_var('lang_starttime', $LANG12[42]);
***************
*** 273,277 ****
  function submitlink() 
  {
!     global $_TABLES, $_CONF, $LANG12;
  
      $retval .= COM_startBlock($LANG12[5],'submitlink.html');
--- 274,278 ----
  function submitlink() 
  {
!     global $_CONF, $_TABLES, $LANG12;
  
      $retval .= COM_startBlock($LANG12[5],'submitlink.html');
***************
*** 289,296 ****
      $linkform->set_var('lang_htmlnotallowed', $LANG12[35]);
      $linkform->set_var('lang_submit', $LANG12[8]);
      $linkform->parse('theform', 'linkform');
      $retval .= $linkform->finish($linkform->get_var('theform'));
      $retval .= COM_endBlock();
! 	
      return $retval;
  }
--- 290,298 ----
      $linkform->set_var('lang_htmlnotallowed', $LANG12[35]);
      $linkform->set_var('lang_submit', $LANG12[8]);
+     $linkform->set_var('max_url_length', 96);
      $linkform->parse('theform', 'linkform');
      $retval .= $linkform->finish($linkform->get_var('theform'));
      $retval .= COM_endBlock();
! 
      return $retval;
  }
***************
*** 729,739 ****
  $display .= COM_siteHeader();
  
  if ($mode == $LANG12[8]) { // submit
!     $display .= savesubmission($type,$HTTP_POST_VARS);
  } else {
      switch($type) {
          case 'link':
              if (SEC_hasRights('link.edit')) {
!                 echo COM_refresh($_CONF['site_admin_url'] . '/link.php?mode=edit');
                  exit;
              }
--- 731,755 ----
  $display .= COM_siteHeader();
  
+ $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']);
+ }
+ 
+ $type = '';
+ if (isset ($HTTP_POST_VARS['type'])) {
+     $type = COM_applyFilter ($HTTP_POST_VARS['type']);
+ } else if (isset ($HTTP_GET_VARS['type'])) {
+     $type = COM_applyFilter ($HTTP_GET_VARS['type']);
+ }
+ 
  if ($mode == $LANG12[8]) { // submit
!     $display .= savesubmission ($type, $HTTP_POST_VARS);
  } else {
      switch($type) {
          case 'link':
              if (SEC_hasRights('link.edit')) {
!                 echo COM_refresh ($_CONF['site_admin_url'] . '/link.php?mode=edit');
                  exit;
              }
***************
*** 762,768 ****
  
      $display .= submissionform($type, $mode, $month, $day, $year, $hour, $topic); 
- 
  }
! $display .= COM_siteFooter();		
  echo $display;
  
--- 778,783 ----
  
      $display .= submissionform($type, $mode, $month, $day, $year, $hour, $topic); 
  }
! $display .= COM_siteFooter();
  echo $display;
  





More information about the geeklog-cvs mailing list