Platon Technologies
not logged in Login Registration
EnglishSlovak
open source software development celebrating 10 years of open source development! Thursday, November 12, 2026

Diff for Metafox/functions.inc.php between version 1.78 and 1.79

version 1.78, 2008/07/29 16:13:39 version 1.79, 2008/07/30 13:10:59
Line 17 
Line 17 
  * http://platon.sk/projects/Metafox/   * http://platon.sk/projects/Metafox/
  */   */
   
 /* $Platon: Metafox/functions.inc.php,v 1.77 2008-03-06 11:10:59 nepto Exp $ */  /* $Platon: Metafox/functions.inc.php,v 1.78 2008-07-29 16:13:39 nepto Exp $ */
   
 function ezin_eval($evalcode) /* {{{ */  function ezin_eval($evalcode) /* {{{ */
 {  {
Line 1468  function ezin_cgi_parse() /* {{{ */
Line 1468  function ezin_cgi_parse() /* {{{ */
                                 $ezin_cgi['output']          = 'article';                                  $ezin_cgi['output']          = 'article';
                                 $ezin_cgi['message_id']      = 0;                                  $ezin_cgi['message_id']      = 0;
                                 $ezin_cgi['message_save_ok'] = 1;                                  $ezin_cgi['message_save_ok'] = 1;
   
                                 setcookie('ezin_author_cookie',   $ezin_cgi['message_reply_author'],   $expire_time);                                  setcookie('ezin_author_cookie',   $ezin_cgi['message_reply_author'],   $expire_time);
                                 setcookie('ezin_email_cookie',    $ezin_cgi['message_reply_email'],    $expire_time);                                  setcookie('ezin_email_cookie',    $ezin_cgi['message_reply_email'],    $expire_time);
                                 setcookie('ezin_homepage_cookie', $ezin_cgi['message_reply_homepage'], $expire_time);                                  setcookie('ezin_homepage_cookie', $ezin_cgi['message_reply_homepage'], $expire_time);
   
                                 if ($ezin_cfg['message_save_redirect']) {  
                                         $request_uri = $_SERVER['REQUEST_URI'];  
                                         $location = strpos($request_uri, '?') === false  
                                                 ? ezin_get_link('A', $ezin_cgi['article_id'], 1, @$ezin_cgi['lang'])  
                                                 : 'http://'.$_SERVER['HTTP_HOST'].$request_uri;  
                                         if (strlen(@$_POST['ezin_fragment']) > 0) {  
                                                 $location .= '#'.$_POST['ezin_fragment'];  
                                         }  
                                         Platon::redirect($location, true /* temporary */);  
                                 }  
                         }                          }
                 }                  }
   
Line 1529  function ezin_cgi_parse() /* {{{ */
Line 1517  function ezin_cgi_parse() /* {{{ */
                                 ezin_feedback_send_notify_email($data);                                  ezin_feedback_send_notify_email($data);
                                 if (ezin_save_feedback($ezin_cgi['section_id'], $data)) {                                  if (ezin_save_feedback($ezin_cgi['section_id'], $data)) {
                                         $ezin_cgi['feedback_save_ok'] = 1;                                          $ezin_cgi['feedback_save_ok'] = 1;
                                         if ($ezin_cfg['feedback_save_redirect']) {  
                                                 $request_uri = $_SERVER['REQUEST_URI'];  
                                                 $location = strpos($request_uri, '?') === false  
                                                         ? ezin_get_link('S', $ezin_cgi['section_id'], 1, @$ezin_cgi['lang'])  
                                                         : 'http://'.$_SERVER['HTTP_HOST'].$request_uri;  
                                                 if (strlen(@$_POST['ezin_fragment']) > 0) {  
                                                         $location .= '#'.$_POST['ezin_fragment'];  
                                                 }  
                                                 Platon::redirect($location);  
                                         }  
                                 } else {                                  } else {
                                         $ezin_cgi['feedback_save_error'] = 1;                                          $ezin_cgi['feedback_save_error'] = 1;
                                 }                                  }
Line 1571  function ezin_cgi_parse() /* {{{ */
Line 1549  function ezin_cgi_parse() /* {{{ */
                                                 $data[$matches[1]] = htmlspecialchars(stripslashes($val));                                                  $data[$matches[1]] = htmlspecialchars(stripslashes($val));
                                         }                                          }
                                 }                                  }
                                 if (strlen($ezin_user['username']) > 0) {                                  if (strlen($ezin_user['username']) > 0) { // logged in
                                         $data['username']  = $ezin_user['username'];                                          $data['username']  = $ezin_user['username'];
                                         $data['author_id'] = $ezin_user['author_id'];                                          $data['author_id'] = $ezin_user['author_id'];
                                 }                                  }
                                   $exists = ezin_exists_author($data['username']);
                                 ezin_author_send_notify_email($data);                                  ezin_author_send_notify_email($data);
                                 if (ezin_save_author($data)) {                                  if (ezin_save_author($data)) {
                                         $ezin_cgi['author_save_ok'] = 1;                                          $ezin_cgi['author_save_ok'] = 1;
                                         $request_uri = $_SERVER['REQUEST_URI'];  
                                         $location = strpos($request_uri, '?') === false  
                                                 ? ezin_get_link('S', $ezin_cgi['section_id'], 1, @$ezin_cgi['lang'])  
                                                 : 'http://'.$_SERVER['HTTP_HOST'].$request_uri;  
                                         Platon::redirect($location);  
                                 } else {                                  } else {
                                         $ezin_cgi['author_save_error'] = 1;                                          $ezin_cgi['author_save_error'] = 1;
                                 }                                  }
Line 1633  function ezin_cgi_parse() /* {{{ */
Line 1607  function ezin_cgi_parse() /* {{{ */
         } else {          } else {
                 $ezin_cgi['lang_bind'] = '';                  $ezin_cgi['lang_bind'] = '';
         }          }
   
           /*
            * Redirects are here
            * (all of them should be here)
            */
   
           $do_redirect = false
                   || ($ezin_cgi['message_save_ok']  && $ezin_cfg['message_save_redirect'])
                   || ($ezin_cgi['feedback_save_ok'] && $ezin_cfg['feedback_save_redirect'])
                   || ($ezin_cfg['author_save_ok']);
   
           if ($do_redirect) {
                   $request_uri = $_SERVER['REQUEST_URI'];
                   $location    = 'http://'.$_SERVER['HTTP_HOST'].$request_uri;
                   if (strpos($request_uri, '?') === false) {
                           if (intval($ezin_cgi['article_id']) > 0) {
                                   $location = ezin_get_link('A', $ezin_cgi['article_id'], 1, @$ezin_cgi['lang']);
                           } else {
                                   $location = ezin_get_link('S', $ezin_cgi['section_id'], 1, @$ezin_cgi['lang']);
                           }
                   }
                   if (strlen(@$_POST['ezin_fragment']) > 0) {
                           $location .= '#'.$_POST['ezin_fragment'];
                   }
                   Platon::redirect($location, true /* temporary redirect */);
           }
 } /* }}} */  } /* }}} */
   
 function ezin_check_antispam($flag = '') /* {{{ */  function ezin_check_antispam($flag = '') /* {{{ */

Legend:
Removed from v.1.78  
changed lines
  Added in v.1.79

Platon Group <platon@platon.org> http://platon.org/
Copyright © 2002-2006 Platon Group
Site powered by Metafox CMS
Go to Top