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

Diff for Metafox/functions.inc.php between version 1.143 and 1.144

version 1.143, 2019/11/03 13:04:42 version 1.144, 2024/11/20 15:48:03
Line 17 
Line 17 
  * http://platon.sk/projects/Metafox/   * http://platon.sk/projects/Metafox/
  */   */
   
 /* $Platon: Metafox/functions.inc.php,v 1.142 2018/04/22 01:05:52 nepto Exp $ */  /* $Platon: Metafox/functions.inc.php,v 1.143 2019/11/03 13:04:42 nepto Exp $ */
   
 function ezin_eval($evalcode) /* {{{ */  function ezin_eval($evalcode) /* {{{ */
 {  {
Line 75  function ezin_process_text_flags(&$str,
Line 75  function ezin_process_text_flags(&$str,
                         return $matches[1].Platon::escape_email($matches[2].'@'.$matches[3], 'hypertext_link');                          return $matches[1].Platon::escape_email($matches[2].'@'.$matches[3], 'hypertext_link');
                 },                  },
                 $str);                  $str);
   
         if ($line_wrap_p) {          if ($line_wrap_p) {
                 if ($special) {                  if ($special) {
                         $str = preg_replace('/[\n\r]{3,}/m', "\n<br><br>", $str);                          $str = preg_replace('/[\n\r]{3,}/m', "\n<br><br>", $str);
Line 183  function ezin_handle_special_tags(&$str,
Line 183  function ezin_handle_special_tags(&$str,
                         }                          }
                         sort($img_ar);                          sort($img_ar);
                         foreach ($img_ar as $file) {                          foreach ($img_ar as $file) {
                                 // if $file isn't this directory or its parent,                                  // if $file isn't this directory or its parent,
                                 // add it to the replacement                                  // add it to the replacement
                                 if ($file{0} != '.'                                  if ($file[0] != '.'
                                                 && is_readable($full_path.$file)                                                  && is_readable($full_path.$file)
                                                 && ! is_dir($full_path.$file))                                                  && ! is_dir($full_path.$file))
                                 {                                  {
Line 287  function ezin_handle_special_tags(&$str,
Line 287  function ezin_handle_special_tags(&$str,
         if (strpos($mask, 'f') !== false) { /* {{{ */          if (strpos($mask, 'f') !== false) { /* {{{ */
                 // URL in http:// form                  // URL in http:// form
                 $opentag = ezin_str_rev_args(strrev('<flash'),'\s+','([^>\s]+//:\w{3,6})','([^<>]*?)','>');                  $opentag = ezin_str_rev_args(strrev('<flash'),'\s+','([^>\s]+//:\w{3,6})','([^<>]*?)','>');
                 $rpttr[] = sprintf('|%s\s*(.*?)\s*%s|si', strrev('</flash>'), $opentag);                  $rpttr[] = sprintf('|%s\s*(.*?)\s*%s|si', strrev('</flash>'), $opentag);
                 $rpttr[] = sprintf('|%s|i', $opentag);                  $rpttr[] = sprintf('|%s|i', $opentag);
                 $rrplc[] = strrev('<object type="application/x-shockwave-flash" data="3\\"2\\>'."\n"                  $rrplc[] = strrev('<object type="application/x-shockwave-flash" data="3\\"2\\>'."\n"
                         .'<param name="movie" value="3\\"><embed src="3\\"2\\>1\\</object>');                          .'<param name="movie" value="3\\"><embed src="3\\"2\\>1\\</object>');
Line 295  function ezin_handle_special_tags(&$str,
Line 295  function ezin_handle_special_tags(&$str,
                         .'<param name="movie" value="2\\"><embed src="2\\"1\\></object>');                          .'<param name="movie" value="2\\"><embed src="2\\"1\\></object>');
                 // URL without http://                  // URL without http://
                 $opentag = ezin_str_rev_args(strrev('<flash'),'\s+','([^<>\s]+)','([^<>]*?)','>');                  $opentag = ezin_str_rev_args(strrev('<flash'),'\s+','([^<>\s]+)','([^<>]*?)','>');
                 $rpttr[] = sprintf('|%s\s*(.*?)\s*%s|si', strrev('</flash>'), $opentag);                  $rpttr[] = sprintf('|%s\s*(.*?)\s*%s|si', strrev('</flash>'), $opentag);
                 $rpttr[] = sprintf('|%s|i', $opentag);                  $rpttr[] = sprintf('|%s|i', $opentag);
                 $rrplc[] = strrev('<object type="application/x-shockwave-flash" data="'.$repository_url.'3\\"2\\>'."\n"                  $rrplc[] = strrev('<object type="application/x-shockwave-flash" data="'.$repository_url.'3\\"2\\>'."\n"
                         .'<param name="movie" value="'.$repository_url.'3\\"><embed src="'.$repository_url.'3\\"2\\>1\\</object>');                          .'<param name="movie" value="'.$repository_url.'3\\"><embed src="'.$repository_url.'3\\"2\\>1\\</object>');
Line 304  function ezin_handle_special_tags(&$str,
Line 304  function ezin_handle_special_tags(&$str,
         } /* }}} */          } /* }}} */
         if (strpos($mask, 'I') !== false) { /* {{{ */          if (strpos($mask, 'I') !== false) { /* {{{ */
                 $opentag = ezin_str_rev_args(strrev('<image-link'),'\s+','([^<>\s]+)','([^<>]*?)','>');                  $opentag = ezin_str_rev_args(strrev('<image-link'),'\s+','([^<>\s]+)','([^<>]*?)','>');
                 $rpttr[] = sprintf('|%s\s*([^<>]*?)\s*%s|si', strrev('</image-link>'), $opentag);                  $rpttr[] = sprintf('|%s\s*([^<>]*?)\s*%s|si', strrev('</image-link>'), $opentag);
                 $rpttr[] = sprintf('|%s|i', $opentag);                  $rpttr[] = sprintf('|%s|i', $opentag);
                 $rrplc[] = strrev('<a target="_blank" href="'.$repository_url.'3\\"><image 3\\2\\>1\\</image></a>');                  $rrplc[] = strrev('<a target="_blank" href="'.$repository_url.'3\\"><image 3\\2\\>1\\</image></a>');
                 $rrplc[] = strrev('<a target="_blank" href="'.$repository_url.'2\\"><image 2\\1\\></a>');                  $rrplc[] = strrev('<a target="_blank" href="'.$repository_url.'2\\"><image 2\\1\\></a>');
Line 312  function ezin_handle_special_tags(&$str,
Line 312  function ezin_handle_special_tags(&$str,
         if (strpos(strtolower($mask), 'i') !== false) { /* {{{ */          if (strpos(strtolower($mask), 'i') !== false) { /* {{{ */
                 // URL in http:// form                  // URL in http:// form
                 $opentag = ezin_str_rev_args(strrev('<image'),'\s+','([^<>\s]+//:\w{3,6})','([^<>]*?)','>');                  $opentag = ezin_str_rev_args(strrev('<image'),'\s+','([^<>\s]+//:\w{3,6})','([^<>]*?)','>');
                 $rpttr[] = sprintf('|%s\s*([^<>]*?)\s*%s|si', strrev('</image>'), $opentag);                  $rpttr[] = sprintf('|%s\s*([^<>]*?)\s*%s|si', strrev('</image>'), $opentag);
                 $rpttr[] = sprintf('|%s|i', $opentag);                  $rpttr[] = sprintf('|%s|i', $opentag);
                 $rrplc[] = ezin_str_rev_args(strrev('<img border="0" alt="1\\" title="1\\" src="'),'\\3','"','\\2','>');                  $rrplc[] = ezin_str_rev_args(strrev('<img border="0" alt="1\\" title="1\\" src="'),'\\3','"','\\2','>');
                 $rrplc[] = ezin_str_rev_args(strrev('<img border="0" src="'),'\\2','"','\\1','>');                  $rrplc[] = ezin_str_rev_args(strrev('<img border="0" src="'),'\\2','"','\\1','>');
                 // URL in /something form                  // URL in /something form
                 $opentag = ezin_str_rev_args(strrev('<image'),'\s+','/','([^<>\s]*)','([^<>]*?)','>');                  $opentag = ezin_str_rev_args(strrev('<image'),'\s+','/','([^<>\s]*)','([^<>]*?)','>');
                 $rpttr[] = sprintf('|%s\s*([^<>]*?)\s*%s|si', strrev('</image>'), $opentag);                  $rpttr[] = sprintf('|%s\s*([^<>]*?)\s*%s|si', strrev('</image>'), $opentag);
                 $rpttr[] = sprintf('|%s|i', $opentag);                  $rpttr[] = sprintf('|%s|i', $opentag);
                 $rrplc[] = ezin_str_rev_args(strrev('<img border="0" alt="1\\" title="1\\" src="'.$ezin_url),'\\3','"','\\2','>');                  $rrplc[] = ezin_str_rev_args(strrev('<img border="0" alt="1\\" title="1\\" src="'.$ezin_url),'\\3','"','\\2','>');
                 $rrplc[] = ezin_str_rev_args(strrev('<img border="0" src="'.$ezin_url),'\\2','"','\\1','>');                  $rrplc[] = ezin_str_rev_args(strrev('<img border="0" src="'.$ezin_url),'\\2','"','\\1','>');
                 // URL without http://                  // URL without http://
                 $opentag = ezin_str_rev_args(strrev('<image'),'\s+','([^<>\s]+)','([^<>]*?)','>');                  $opentag = ezin_str_rev_args(strrev('<image'),'\s+','([^<>\s]+)','([^<>]*?)','>');
                 $rpttr[] = sprintf('|%s\s*([^<>]*?)\s*%s|si', strrev('</image>'), $opentag);                  $rpttr[] = sprintf('|%s\s*([^<>]*?)\s*%s|si', strrev('</image>'), $opentag);
                 $rpttr[] = sprintf('|%s|i', $opentag);                  $rpttr[] = sprintf('|%s|i', $opentag);
                 $rrplc[] = ezin_str_rev_args(strrev('<img border="0" alt="1\\" title="1\\" src="'.$repository_url),'\\3','"','\\2','>');                  $rrplc[] = ezin_str_rev_args(strrev('<img border="0" alt="1\\" title="1\\" src="'.$repository_url),'\\3','"','\\2','>');
                 $rrplc[] = ezin_str_rev_args(strrev('<img border="0" src="'.$repository_url),'\\2','"','\\1','>');                  $rrplc[] = ezin_str_rev_args(strrev('<img border="0" src="'.$repository_url),'\\2','"','\\1','>');
Line 332  function ezin_handle_special_tags(&$str,
Line 332  function ezin_handle_special_tags(&$str,
         if (strpos($mask, 'L') !== false) { /* {{{ */          if (strpos($mask, 'L') !== false) { /* {{{ */
                 // URL in http:// form                  // URL in http:// form
                 $opentag = ezin_str_rev_args(strrev('<link'),'\s+','([^<>\s]+//:\w{3,6})','([^<>]*?)','>');                  $opentag = ezin_str_rev_args(strrev('<link'),'\s+','([^<>\s]+//:\w{3,6})','([^<>]*?)','>');
                 $rpttr[] = sprintf('|%s\s*(.*?)\s*%s|si', strrev('</link>'), $opentag);                  $rpttr[] = sprintf('|%s\s*(.*?)\s*%s|si', strrev('</link>'), $opentag);
                 $rpttr[] = sprintf('|%s|i', $opentag);                  $rpttr[] = sprintf('|%s|i', $opentag);
                 $rrplc[] = ezin_str_rev_args(strrev('<a href="'),'\\3','"','\\2','>','\\1',strrev('</a>'));                  $rrplc[] = ezin_str_rev_args(strrev('<a href="'),'\\3','"','\\2','>','\\1',strrev('</a>'));
                 $rrplc[] = ezin_str_rev_args(strrev('<a href="'),'\\2','"','\\1','>','\\2',strrev('</a>'));                  $rrplc[] = ezin_str_rev_args(strrev('<a href="'),'\\2','"','\\1','>','\\2',strrev('</a>'));
                 // URL in /something form                  // URL in /something form
                 $opentag = ezin_str_rev_args(strrev('<link'),'\s+','/','([^<>\s]*)','([^<>]*?)','>');                  $opentag = ezin_str_rev_args(strrev('<link'),'\s+','/','([^<>\s]*)','([^<>]*?)','>');
                 $rpttr[] = sprintf('|%s\s*(.*?)\s*%s|si', strrev('</link>'), $opentag);                  $rpttr[] = sprintf('|%s\s*(.*?)\s*%s|si', strrev('</link>'), $opentag);
                 $rpttr[] = sprintf('|%s|i', $opentag);                  $rpttr[] = sprintf('|%s|i', $opentag);
                 $rrplc[] = ezin_str_rev_args(strrev('<a href="'.$ezin_url),'\\3','"','\\2','>','\\1',strrev('</a>'));                  $rrplc[] = ezin_str_rev_args(strrev('<a href="'.$ezin_url),'\\3','"','\\2','>','\\1',strrev('</a>'));
                 $rrplc[] = ezin_str_rev_args(strrev('<a href="'.$ezin_url),'\\2','"','\\1','>','\\2',strrev('</a>'));                  $rrplc[] = ezin_str_rev_args(strrev('<a href="'.$ezin_url),'\\2','"','\\1','>','\\2',strrev('</a>'));
                 // URL without http://                  // URL without http://
                 $opentag = ezin_str_rev_args(strrev('<link'),'\s+','([^<>\s]+)','([^<>]*?)','>');                  $opentag = ezin_str_rev_args(strrev('<link'),'\s+','([^<>\s]+)','([^<>]*?)','>');
                 $rpttr[] = sprintf('|%s\s*(.*?)\s*%s|si', strrev('</link>'), $opentag);                  $rpttr[] = sprintf('|%s\s*(.*?)\s*%s|si', strrev('</link>'), $opentag);
                 $rpttr[] = sprintf('|%s|i', $opentag);                  $rpttr[] = sprintf('|%s|i', $opentag);
                 $rrplc[] = ezin_str_rev_args(strrev('<a href="'.$repository_url),'\\3','"','\\2','>','\\1',strrev('</a>'));                  $rrplc[] = ezin_str_rev_args(strrev('<a href="'.$repository_url),'\\3','"','\\2','>','\\1',strrev('</a>'));
                 $rrplc[] = ezin_str_rev_args(strrev('<a href="'.$repository_url),'\\2','"','\\1','>','\\2',strrev('</a>'));                  $rrplc[] = ezin_str_rev_args(strrev('<a href="'.$repository_url),'\\2','"','\\1','>','\\2',strrev('</a>'));
Line 358  function ezin_handle_special_tags(&$str,
Line 358  function ezin_handle_special_tags(&$str,
                 $rrplc[] = ezin_str_rev_args(strrev('<a target="_blank" href="'),'\\2','"','\\1','>','\\2',strrev('</a>'));                  $rrplc[] = ezin_str_rev_args(strrev('<a target="_blank" href="'),'\\2','"','\\1','>','\\2',strrev('</a>'));
                 // URL in /something form -- Bit problematic...                  // URL in /something form -- Bit problematic...
                 $opentag = ezin_str_rev_args(strrev('<extern-link'),'\s+','/','([^<>\s]*)','([^<>]*?)','>');                  $opentag = ezin_str_rev_args(strrev('<extern-link'),'\s+','/','([^<>\s]*)','([^<>]*?)','>');
                 $rpttr[] = sprintf('|%s\s*(.*?)\s*%s|si', strrev('</extern-link>'), $opentag);                  $rpttr[] = sprintf('|%s\s*(.*?)\s*%s|si', strrev('</extern-link>'), $opentag);
                 $rpttr[] = sprintf('|%s|i', $opentag);                  $rpttr[] = sprintf('|%s|i', $opentag);
                 $rrplc[] = ezin_str_rev_args(strrev('<a target="_blank" href="'.$ezin_url),'\\3','"','\\2','>','\\1',strrev('</a>'));                  $rrplc[] = ezin_str_rev_args(strrev('<a target="_blank" href="'.$ezin_url),'\\3','"','\\2','>','\\1',strrev('</a>'));
                 $rrplc[] = ezin_str_rev_args(strrev('<a target="_blank" href="'.$ezin_url),'\\2','"','\\1','>','\\2',strrev('</a>'));                  $rrplc[] = ezin_str_rev_args(strrev('<a target="_blank" href="'.$ezin_url),'\\2','"','\\1','>','\\2',strrev('</a>'));
Line 371  function ezin_handle_special_tags(&$str,
Line 371  function ezin_handle_special_tags(&$str,
         } /* }}} */          } /* }}} */
         if (strpos($mask, 'R') !== false) { /* {{{ */          if (strpos($mask, 'R') !== false) { /* {{{ */
                 $opentag = ezin_str_rev_args(strrev('<repository-link'),'\s+','([^<>\s]+)','([^<>]*?)','>');                  $opentag = ezin_str_rev_args(strrev('<repository-link'),'\s+','([^<>\s]+)','([^<>]*?)','>');
                 $rpttr[] = sprintf('|%s\s*(.*?)\s*%s|si', strrev('</repository-link>'), $opentag);                  $rpttr[] = sprintf('|%s\s*(.*?)\s*%s|si', strrev('</repository-link>'), $opentag);
                 $rpttr[] = sprintf('|%s|i', $opentag);                  $rpttr[] = sprintf('|%s|i', $opentag);
                 $rrplc[] = ezin_str_rev_args(strrev('<a target="_blank" href="'.$repository_url),'\\3','"','\\2','>','\\1',strrev('</a>'));                  $rrplc[] = ezin_str_rev_args(strrev('<a target="_blank" href="'.$repository_url),'\\3','"','\\2','>','\\1',strrev('</a>'));
                 $rrplc[] = ezin_str_rev_args(strrev('<a target="_blank" href="'.$repository_url),'\\2','"','\\1','>','\\2',strrev('</a>'));                  $rrplc[] = ezin_str_rev_args(strrev('<a target="_blank" href="'.$repository_url),'\\2','"','\\1','>','\\2',strrev('</a>'));
Line 398  function ezin_handle_special_tags(&$str,
Line 398  function ezin_handle_special_tags(&$str,
                                 break;                                  break;
                 }                  }
                 $opentag = ezin_str_rev_args(strrev('<section-link'),'\s+','([^<>\s]+)','([^<>]*?)','>');                  $opentag = ezin_str_rev_args(strrev('<section-link'),'\s+','([^<>\s]+)','([^<>]*?)','>');
                 $rpttr[] = sprintf('|%s\s*(.*?)\s*%s|si', strrev('</section-link>'), $opentag);                  $rpttr[] = sprintf('|%s\s*(.*?)\s*%s|si', strrev('</section-link>'), $opentag);
                 $rpttr[] = sprintf('|%s|i', $opentag);                  $rpttr[] = sprintf('|%s|i', $opentag);
                 $rrplc[] = ezin_str_rev_args(strrev('<a href="'.$ezin_url.$sub_url),'\\3','"','\\2','>','\\1',strrev('</a>'));                  $rrplc[] = ezin_str_rev_args(strrev('<a href="'.$ezin_url.$sub_url),'\\3','"','\\2','>','\\1',strrev('</a>'));
                 $rrplc[] = ezin_str_rev_args(strrev('<a href="'.$ezin_url.$sub_url),'\\2','"','\\1','>','\\2',strrev('</a>'));                  $rrplc[] = ezin_str_rev_args(strrev('<a href="'.$ezin_url.$sub_url),'\\2','"','\\1','>','\\2',strrev('</a>'));
Line 416  function ezin_handle_special_tags(&$str,
Line 416  function ezin_handle_special_tags(&$str,
                                 break;                                  break;
                 }                  }
                 $opentag = ezin_str_rev_args(strrev('<article-link'),'\s+','([^<>\s]+)','([^<>]*?)','>');                  $opentag = ezin_str_rev_args(strrev('<article-link'),'\s+','([^<>\s]+)','([^<>]*?)','>');
                 $rpttr[] = sprintf('|%s\s*(.*?)\s*%s|si', strrev('</article-link>'), $opentag);                  $rpttr[] = sprintf('|%s\s*(.*?)\s*%s|si', strrev('</article-link>'), $opentag);
                 $rpttr[] = sprintf('|%s|i', $opentag);                  $rpttr[] = sprintf('|%s|i', $opentag);
                 $rrplc[] = ezin_str_rev_args(strrev('<a href="'.$ezin_url.$sub_url),'\\3','"','\\2','>','\\1',strrev('</a>'));                  $rrplc[] = ezin_str_rev_args(strrev('<a href="'.$ezin_url.$sub_url),'\\3','"','\\2','>','\\1',strrev('</a>'));
                 $rrplc[] = ezin_str_rev_args(strrev('<a href="'.$ezin_url.$sub_url),'\\2','"','\\1','>','\\2',strrev('</a>'));                  $rrplc[] = ezin_str_rev_args(strrev('<a href="'.$ezin_url.$sub_url),'\\2','"','\\1','>','\\2',strrev('</a>'));
                 $opentag = ezin_str_rev_args(strrev('<page-link'),'\s+','([^<>\s]+)','([^<>]*?)','>');                  $opentag = ezin_str_rev_args(strrev('<page-link'),'\s+','([^<>\s]+)','([^<>]*?)','>');
                 $rpttr[] = sprintf('|%s\s*(.*?)\s*%s|si', strrev('</page-link>'), $opentag);                  $rpttr[] = sprintf('|%s\s*(.*?)\s*%s|si', strrev('</page-link>'), $opentag);
                 $rpttr[] = sprintf('|%s|i', $opentag);                  $rpttr[] = sprintf('|%s|i', $opentag);
                 $rrplc[] = ezin_str_rev_args(strrev('<a href="'.$ezin_url.$sub_url),'\\3','"','\\2','>','\\1',strrev('</a>'));                  $rrplc[] = ezin_str_rev_args(strrev('<a href="'.$ezin_url.$sub_url),'\\3','"','\\2','>','\\1',strrev('</a>'));
                 $rrplc[] = ezin_str_rev_args(strrev('<a href="'.$ezin_url.$sub_url),'\\2','"','\\1','>','\\2',strrev('</a>'));                  $rrplc[] = ezin_str_rev_args(strrev('<a href="'.$ezin_url.$sub_url),'\\2','"','\\1','>','\\2',strrev('</a>'));
Line 439  function ezin_handle_special_tags(&$str,
Line 439  function ezin_handle_special_tags(&$str,
                                 break;                                  break;
                 }                  }
                 $opentag = ezin_str_rev_args(strrev('<article-print-link'),'\s+','([^<>\s]+)','([^<>]*?)','>');                  $opentag = ezin_str_rev_args(strrev('<article-print-link'),'\s+','([^<>\s]+)','([^<>]*?)','>');
                 $rpttr[] = sprintf('|%s\s*(.*?)\s*%s|si', strrev('</article-print-link>'), $opentag);                  $rpttr[] = sprintf('|%s\s*(.*?)\s*%s|si', strrev('</article-print-link>'), $opentag);
                 $rpttr[] = sprintf('|%s|i', $opentag);                  $rpttr[] = sprintf('|%s|i', $opentag);
                 $rrplc[] = ezin_str_rev_args(strrev('<a href="'.$ezin_url.$sub_url),'\\3','"','\\2','>','\\1',strrev('</a>'));                  $rrplc[] = ezin_str_rev_args(strrev('<a href="'.$ezin_url.$sub_url),'\\3','"','\\2','>','\\1',strrev('</a>'));
                 $rrplc[] = ezin_str_rev_args(strrev('<a href="'.$ezin_url.$sub_url),'\\2','"','\\1','>','\\2',strrev('</a>'));                  $rrplc[] = ezin_str_rev_args(strrev('<a href="'.$ezin_url.$sub_url),'\\2','"','\\1','>','\\2',strrev('</a>'));
                 $opentag = ezin_str_rev_args(strrev('<print-link'),'\s+','([^<>\s]+)','([^<>]*?)','>');                  $opentag = ezin_str_rev_args(strrev('<print-link'),'\s+','([^<>\s]+)','([^<>]*?)','>');
                 $rpttr[] = sprintf('|%s\s*(.*?)\s*%s|si', strrev('</print-link>'), $opentag);                  $rpttr[] = sprintf('|%s\s*(.*?)\s*%s|si', strrev('</print-link>'), $opentag);
                 $rpttr[] = sprintf('|%s|i', $opentag);                  $rpttr[] = sprintf('|%s|i', $opentag);
                 $rrplc[] = ezin_str_rev_args(strrev('<a href="'.$ezin_url.$sub_url),'\\3','"','\\2','>','\\1',strrev('</a>'));                  $rrplc[] = ezin_str_rev_args(strrev('<a href="'.$ezin_url.$sub_url),'\\3','"','\\2','>','\\1',strrev('</a>'));
                 $rrplc[] = ezin_str_rev_args(strrev('<a href="'.$ezin_url.$sub_url),'\\2','"','\\1','>','\\2',strrev('</a>'));                  $rrplc[] = ezin_str_rev_args(strrev('<a href="'.$ezin_url.$sub_url),'\\2','"','\\1','>','\\2',strrev('</a>'));
Line 462  function ezin_handle_special_tags(&$str,
Line 462  function ezin_handle_special_tags(&$str,
                                 break;                                  break;
                 }                  }
                 $opentag = ezin_str_rev_args(strrev('<author-link'),'\s+','([^<>\s]+)','([^<>]*?)','>');                  $opentag = ezin_str_rev_args(strrev('<author-link'),'\s+','([^<>\s]+)','([^<>]*?)','>');
                 $rpttr[] = sprintf('|%s\s*(.*?)\s*%s|si', strrev('</author-link>'), $opentag);                  $rpttr[] = sprintf('|%s\s*(.*?)\s*%s|si', strrev('</author-link>'), $opentag);
                 $rpttr[] = sprintf('|%s|i', $opentag);                  $rpttr[] = sprintf('|%s|i', $opentag);
                 $rrplc[] = ezin_str_rev_args(strrev('<a href="'.$ezin_url.$sub_url),'\\3','"','\\2','>','\\1',strrev('</a>'));                  $rrplc[] = ezin_str_rev_args(strrev('<a href="'.$ezin_url.$sub_url),'\\3','"','\\2','>','\\1',strrev('</a>'));
                 $rrplc[] = ezin_str_rev_args(strrev('<a href="'.$ezin_url.$sub_url),'\\2','"','\\1','>','\\2',strrev('</a>'));                  $rrplc[] = ezin_str_rev_args(strrev('<a href="'.$ezin_url.$sub_url),'\\2','"','\\1','>','\\2',strrev('</a>'));
Line 507  function ezin_message_html_process(&$tex
Line 507  function ezin_message_html_process(&$tex
                                 if ($close) {                                  if ($close) {
                                         $text .= "</$tag>";                                          $text .= "</$tag>";
                                         continue;                                          continue;
                                 }                                  }
                                 $text .= '<'.$tag;                                  $text .= '<'.$tag;
                                 foreach ($ar2 as $attr) {                                  foreach ($ar2 as $attr) {
                                         @list($attr_name, $attr_value) = explode('=', $attr, 2);                                          @list($attr_name, $attr_value) = explode('=', $attr, 2);
Line 608  function ezin_remove_encoding($string) /
Line 608  function ezin_remove_encoding($string) /
         }          }
   
         // copy/paste from libplaton library          // copy/paste from libplaton library
           // TODO fix chars 'windows-1250' and `iso-8859-2'
         static $charsets = array(          static $charsets = array(
                         'ascii'        => 'aAaAcCdDeEeEiIlLlLnNoOoOoOrRrRsStTuUuUuUyYzZ',                          'ascii'        => 'aAaAcCdDeEeEiIlLlLnNoOoOoOrRrRsStTuUuUuUyYzZ',
                         'windows-1250' => 'áÁäÄèÈïÏéÉëËíÍåž¼òÒóÓôÔöÖàÀøØšŠ��úÚüÜùÙýÝžŽ',  //                      'windows-1250' => '���������������ž������������ؚ����������ݞ�',
                         'iso-8859-2'   => 'áÁäÄèÈïÏéÉìÌíÍåŵ¥òÒóÓôÔöÖàÀøØ¹©»«úÚüÜùÙýݾ®'  //                      'iso-8859-2'   => '���������������ŵ������������ع����������ݾ�'
                           'windows-1250' => 'á�¤Ä¨È¯Ï©É«Ë­Í¥Å¾Â¼ò’³“��8ؚŠÂ�Â�úڼܹٽݞŽ',
                           'iso-8859-2'   => 'á�¤Ä¨È¯Ï©É¬Ì­Í¥ÅµÂ¥ò’³“��8ع©»«úڼܹٽݾ®'
                         );                          );
         if (isset($charsets[$encoding])) {          if (isset($charsets[$encoding])) {
                 $string = strtr($string, $charsets[$encoding], $charsets['ascii']);                  $string = strtr($string, $charsets[$encoding], $charsets['ascii']);
Line 719  function ezin_get_link($type = 'S', $id
Line 722  function ezin_get_link($type = 'S', $id
                                 .Platon::htmlspecialchars($append_params)                                  .Platon::htmlspecialchars($append_params)
                                 .($force_lang && $lang != '' ? Platon::htmlspecialchars('&ezin_lang='.$lang) : '');                                  .($force_lang && $lang != '' ? Platon::htmlspecialchars('&ezin_lang='.$lang) : '');
                 }                  }
   
                 if ($ezin_cfg['link_file_type'] == 2 && $type != 'PA') {                  if ($ezin_cfg['link_file_type'] == 2 && $type != 'PA') {
                         $append_url = '';                          $append_url = '';
                         switch ($type) {                          switch ($type) {
Line 830  function ezin_handle_section_link($secti
Line 833  function ezin_handle_section_link($secti
   
         if (strncmp($request_uri, $relative_link, strlen($relative_link))) {          if (strncmp($request_uri, $relative_link, strlen($relative_link))) {
                 // current URL doesn't compliant section link, make HTTP/1.1 redirect                  // current URL doesn't compliant section link, make HTTP/1.1 redirect
                 $absolute_link = ezin_adjust_link($section_link, 1, 1 /* not needed, just for sure */);                  $absolute_link = ezin_adjust_link($section_link, 1, 1 /* not needed, just for sure */);
                 Platon::redirect($absolute_link);                  Platon::redirect($absolute_link);
         }          }
 } /* }}} */  } /* }}} */
Line 1291  function ezin_load_template($template_ke
Line 1294  function ezin_load_template($template_ke
 function ezin_email_template_parse($message, &$from, &$to, &$subject, &$encoding) /* {{{ */  function ezin_email_template_parse($message, &$from, &$to, &$subject, &$encoding) /* {{{ */
 {  {
         $match = array();          $match = array();
         preg_match("/^(From:(.*?)[\r\n]+?)?(To:(.*?)[\r\n]+?)?(Subject:(.*?)[\r\n]+?)?(Charset:(.*?)[\r\n]+?)?(.*?)$/is", $message, $match);          preg_match("/^(From:(.*?)[\r\n]+?)?(To:(.*?)[\r\n]+?)?(Subject:(.*?)[\r\n]+?)?(Charset:(.*?)[\r\n]+?)?(.*?)$/is", $message, $match);
         $message  = ( isset($match[9]) ) ? trim($match[9]) : '';          $message  = ( isset($match[9]) ) ? trim($match[9]) : '';
         $from     = ( trim($match[2]) != '' ) ? trim($match[2]) : '';          $from     = ( trim($match[2]) != '' ) ? trim($match[2]) : '';
         $to       = ( trim($match[4]) != '' ) ? trim($match[4]) : '';          $to       = ( trim($match[4]) != '' ) ? trim($match[4]) : '';
Line 1359  function ezin_email_send($emails, $from,
Line 1362  function ezin_email_send($emails, $from,
                         //'Content-transfer-encoding: 8bit',                          //'Content-transfer-encoding: 8bit',
                         //'Date' => gmdate('D, d M Y H:i:s', time()).' UT',                          //'Date' => gmdate('D, d M Y H:i:s', time()).' UT',
                         'From'     => $from,                          'From'     => $from,
                         'To'          => join($emails, ', '),                          'To'          => is_array($mails) ? join(', ', $emails) : $emails,
                         'Subject'  => $subject,                          'Subject'  => $subject,
                         'In-Reply-To' => "<$site_key>",                          'In-Reply-To' => "<$site_key>",
                         'References'  => "<$site_key>",                          'References'  => "<$site_key>",
Line 1513  function ezin_substitute_basic_propertie
Line 1516  function ezin_substitute_basic_propertie
                 }                  }
         }          }
   
   
 } /* }}} */  } /* }}} */
   
 /*  /*
Line 1820  function ezin_cgi_parse() /* {{{ */
Line 1823  function ezin_cgi_parse() /* {{{ */
                         if ($result) {                          if ($result) {
                                 $result = ezin_save_message(array(                                  $result = ezin_save_message(array(
                                                         'parent'     => $ezin_cgi['message_id'],                                                          'parent'     => $ezin_cgi['message_id'],
                                                         'article_id' => $ezin_cgi['article_id'],                                                          'article_id' => $ezin_cgi['article_id'],
                                                         'author'     => $ezin_cgi['message_reply_author'],                                                          'author'     => $ezin_cgi['message_reply_author'],
                                                         'email'      => $ezin_cgi['message_reply_email'],                                                          'email'      => $ezin_cgi['message_reply_email'],
                                                         'homepage'   => $ezin_cgi['message_reply_homepage'],                                                          'homepage'   => $ezin_cgi['message_reply_homepage'],
Line 1893  function ezin_cgi_parse() /* {{{ */
Line 1896  function ezin_cgi_parse() /* {{{ */
                                                 $data[$matches[1]] = stripslashes($val);                                                  $data[$matches[1]] = stripslashes($val);
                                         }                                          }
                                 }                                  }
                                 ezin_feedback_send_notify_email($data);                                  $required_items = ezin_feedback_required_items();
                                 if (ezin_save_feedback($ezin_cgi['section_id'], $data)) {                                  $required_items_approved = true;
                                         $ezin_cgi['feedback_save_ok'] = 1;                                  if (count($required_items) > 0) {
                                           foreach ($required_items as $required_item) {
                                                   if ((isset($data[$required_item])
                                                                   && strlen($data[$required_item]) > 0)
                                                           || (isset($data['ezin_'.$required_item])
                                                                   && strlen($data['ezin_'.$required_item]) > 0))
                                                   {
                                                           continue;
                                                   }
                                                   if (substr($required_item, 0, 5) == 'ezin_'
                                                           && isset($data[substr($required_item, 5)])
                                                           && strlen($data[substr($required_item, 5)]) > 0)
                                                   {
                                                           continue;
                                                   }
                                                   $required_items_approved = false;
                                                   break;
                                           }
                                   }
                                   if ($required_items_approved) {
                                           ezin_feedback_send_notify_email($data);
                                           if (ezin_save_feedback($ezin_cgi['section_id'], $data)) {
                                                   $ezin_cgi['feedback_save_ok'] = 1;
                                           } else {
                                                   $ezin_cgi['feedback_save_unknown_error'] = 1;
                                                   $ezin_cgi['feedback_save_error'] = 1;
                                           }
                                 } else {                                  } else {
                                         $ezin_cgi['feedback_save_unknown_error'] = 1;                                          $ezin_cgi['feedback_save_unknown_error'] = 2;
                                         $ezin_cgi['feedback_save_error'] = 1;                                          $ezin_cgi['feedback_save_error'] = 2;
                                 }                                  }
                         }                          }
                 } /* }}} */                  } /* }}} */

Legend:
Removed from v.1.143  
changed lines
  Added in v.1.144

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