Ignore:
Timestamp:
Dec 19, 2013, 3:24:59 PM (10 years ago)
Author:
mistic100
Message:

update for 2.6

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/CryptograPHP/admin.php

    r23209 r26041  
    11<?php
    2 if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
     2defined('CRYPTO_ID') or die('Hacking attempt!');
    33
    44global $pwg_loaded_plugins;
     
    77  'category' => isset($pwg_loaded_plugins['Comments_on_Albums']),
    88  'guestbook' => isset($pwg_loaded_plugins['GuestBook']),
     9  'easycaptcha' => isset($pwg_loaded_plugins['EasyCaptcha']),
    910  );
    1011
    11 
    12 load_language('plugin.lang', CRYPTO_PATH);
    13 
     12if ($loaded['easycaptcha'])
     13{
     14  $page['warnings'][] = l10n('We detected that EasyCaptcha plugin is available on your gallery. Both plugins can be used at the same time, but you should not under any circumstances activate both of them on the same page.');
     15}
    1416
    1517if ( isset($_POST['submit']))
    16 
     18{
     19  if (!isset($_POST['activate_on'])) $_POST['activate_on'] = array();
     20 
    1721  $conf['cryptographp'] = array(
    1822    'activate_on'     => array(
    19           'picture'     => in_array('picture', $_POST['activate_on']),
    20           'category'    => in_array('category', $_POST['activate_on']) || !$loaded['category'],
    21           'register'    => in_array('register', $_POST['activate_on']),
    22           'contactform' => in_array('contactform', $_POST['activate_on']) || !$loaded['contactform'],
    23           'guestbook'   => in_array('guestbook', $_POST['activate_on']) || !$loaded['guestbook'],
    24           ),
     23      'picture'     => in_array('picture', $_POST['activate_on']),
     24      'category'    => in_array('category', $_POST['activate_on']) || !$loaded['category'],
     25      'register'    => in_array('register', $_POST['activate_on']),
     26      'contactform' => in_array('contactform', $_POST['activate_on']) || !$loaded['contactform'],
     27      'guestbook'   => in_array('guestbook', $_POST['activate_on']) || !$loaded['guestbook'],
     28      ),
    2529    'comments_action' => $_POST['comments_action'],
    2630    'theme'           => $_POST['theme'],
     
    4246 
    4347  conf_update_param('cryptographp', serialize($conf['cryptographp']));
    44   array_push($page['infos'], l10n('Information data registered in database'));
     48  $page['infos'][] = l10n('Information data registered in database');
    4549}
    4650
     
    7882$template->set_filename('plugin_admin_content', dirname(__FILE__).'/template/admin.tpl');
    7983$template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content');
    80 
    81 ?>
Note: See TracChangeset for help on using the changeset viewer.