Changeset 11370


Ignore:
Timestamp:
06/14/11 15:15:38 (8 years ago)
Author:
mistic100
Message:

change functions names (avoid errors if Captcha is also loaded)

Location:
extensions/CryptograPHP
Files:
5 edited
1 copied

Legend:

Unmodified
Added
Removed
  • extensions/CryptograPHP/include/category.inc.php

    r11316 r11370  
    66include($cryptinstall); 
    77 
    8 add_event_handler('loc_begin_index', 'add_captcha'); 
    9 add_event_handler('user_comment_check', 'check_captcha', EVENT_HANDLER_PRIORITY_NEUTRAL, 2); 
     8add_event_handler('loc_begin_index', 'add_crypto'); 
     9add_event_handler('user_comment_check', 'check_crypto', EVENT_HANDLER_PRIORITY_NEUTRAL, 2); 
    1010 
    11 function add_captcha() 
     11function add_crypto() 
    1212{ 
    1313  global $template, $conf; 
     
    1515  if (!is_a_guest()) return; 
    1616   
    17   $template->set_prefilter('comments_on_albums', 'captcha_prefilter'); 
     17  $template->set_prefilter('comments_on_albums', 'prefilter_crypto'); 
    1818  $template->assign('CAPTCHA', dsp_crypt($conf['cryptographp_theme'][0].'.cfg.php',1)); 
    1919} 
    2020 
    21 function captcha_prefilter($content, $smarty) 
     21function prefilter_crypto($content, $smarty) 
    2222{ 
    2323  load_language('plugin.lang', CRYPTO_PATH); 
     
    3030} 
    3131 
    32 function check_captcha($action, $comment) 
     32function check_crypto($action, $comment) 
    3333{ 
    3434  global $conf, $user; 
  • extensions/CryptograPHP/include/contactform.inc.php

    r11316 r11370  
    66include($cryptinstall); 
    77 
    8 add_event_handler('display_contactform', 'add_captcha'); 
    9 add_event_handler('check_contactform_params', 'check_captcha'); 
     8add_event_handler('display_contactform', 'add_crypto'); 
     9add_event_handler('check_contactform_params', 'check_crypto'); 
    1010 
    11 function add_captcha() 
     11function add_crypto() 
    1212{ 
    1313  global $template, $conf; 
     
    1515  if (!is_a_guest()) return; 
    1616 
    17   $template->set_prefilter('cf_form', 'captcha_prefilter'); 
     17  $template->set_prefilter('cf_form', 'prefilter_crypto'); 
    1818  $template->assign('CAPTCHA', dsp_crypt($conf['cryptographp_theme'][0].'.cfg.php',1)); 
    1919} 
    2020 
    21 function captcha_prefilter($content, $smarty) 
     21function prefilter_crypto($content, $smarty) 
    2222{ 
    2323  $search = ' 
     
    3636} 
    3737 
    38 function check_captcha($infos) 
     38function check_crypto($infos) 
    3939{ 
    4040  if (!is_a_guest()) return $infos; 
  • extensions/CryptograPHP/include/picture.inc.php

    r11316 r11370  
    66include($cryptinstall); 
    77 
    8 add_event_handler('loc_begin_picture', 'add_captcha'); 
    9 add_event_handler('user_comment_check', 'check_captcha', EVENT_HANDLER_PRIORITY_NEUTRAL, 2); 
     8add_event_handler('loc_begin_picture', 'add_crypto'); 
     9add_event_handler('user_comment_check', 'check_crypto', EVENT_HANDLER_PRIORITY_NEUTRAL, 2); 
    1010 
    11 function add_captcha() 
     11function add_crypto() 
    1212{ 
    1313  global $template, $conf; 
     
    1515  if (!is_a_guest()) return; 
    1616   
    17   $template->set_prefilter('picture', 'captcha_prefilter'); 
     17  $template->set_prefilter('picture', 'prefilter_crypto'); 
    1818  $template->assign('CAPTCHA', dsp_crypt($conf['cryptographp_theme'][0].'.cfg.php',1)); 
    1919} 
    2020 
    21 function captcha_prefilter($content, $smarty) 
     21function prefilter_crypto($content, $smarty) 
    2222{ 
    2323  load_language('plugin.lang', CRYPTO_PATH); 
     
    3030} 
    3131 
    32 function check_captcha($action, $comment) 
     32function check_crypto($action, $comment) 
    3333{ 
    3434  global $conf, $user; 
  • extensions/CryptograPHP/include/register.inc.php

    r11316 r11370  
    66include($cryptinstall); 
    77 
    8 add_event_handler('loc_end_page_header', 'add_captcha'); 
    9 add_event_handler('register_user_check', 'check_captcha'); 
     8add_event_handler('loc_end_page_header', 'add_crypto'); 
     9add_event_handler('register_user_check', 'check_crypto'); 
    1010 
    11 function add_captcha() 
     11function add_crypto() 
    1212{ 
    1313  global $template, $conf; 
    1414 
    15   $template->set_prefilter('register', 'captcha_prefilter'); 
     15  $template->set_prefilter('register', 'prefilter_crypto'); 
    1616  $template->assign('CAPTCHA', dsp_crypt($conf['cryptographp_theme'][0].'.cfg.php',1)); 
    1717} 
    1818 
    19 function captcha_prefilter($content, $smarty) 
     19function prefilter_crypto($content, $smarty) 
    2020{ 
    2121  load_language('plugin.lang', CRYPTO_PATH); 
     
    3939} 
    4040 
    41 function check_captcha($errors) 
     41function check_crypto($errors) 
    4242{ 
    4343  if (!chk_crypt($_POST['code'])) 
  • extensions/CryptograPHP/main.inc.php

    r11316 r11370  
    4242if (script_basename() == 'admin') 
    4343{ 
    44   add_event_handler('get_admin_plugin_menu_links', 'crypto_plugin_admin_menu' ); 
    45 } 
     44  add_event_handler('get_admin_plugin_menu_links', 'crypto_plugin_admin_menu'); 
    4645 
    47 function crypto_plugin_admin_menu($menu) 
    48 { 
    49         global $page,$conf; 
     46  function crypto_plugin_admin_menu($menu) 
     47  { 
     48    global $page,$conf; 
    5049 
    51         array_push( 
    52     $menu, 
    53     array( 
    54       'NAME' => 'CryptograPHP', 
    55       'URL' => get_root_url().'admin.php?page=plugin-'.basename(dirname(__FILE__)) 
    56       ) 
    57                 ); 
    58         return $menu; 
     50    array_push( 
     51      $menu, 
     52      array( 
     53        'NAME' => 'CryptograPHP', 
     54        'URL' => get_root_url().'admin.php?page=plugin-'.basename(dirname(__FILE__)) 
     55        ) 
     56      ); 
     57    return $menu; 
     58  } 
    5959} 
    6060 
Note: See TracChangeset for help on using the changeset viewer.