Ignore:
Timestamp:
Jan 10, 2013, 12:59:07 AM (11 years ago)
Author:
julien1311
Message:

[piwecard] lots of fixes

File:
1 moved

Legend:

Unmodified
Added
Removed
  • extensions/Piwecard/admin/admin_authorizations.php

    r20013 r20032  
    77
    88$template->set_filenames(array(
    9         'plugin_admin_content'  => ECARD_ROOT.'/admin/template/admin_manage.tpl',
     9        'plugin_admin_content'  => ECARD_ROOT.'/admin/template/admin_authorizations.tpl',
    1010        'double_select'                 => 'double_select.tpl'
    1111));
     
    1515        foreach ($_POST['cat_true'] as $cat)
    1616                unset($piwecard->my_config['selected_cats'][array_search($cat, $piwecard->my_config['selected_cats'])]);
    17         $piwecard->save_config();
     17        $piwecard->set_config();
    1818}
    1919
     
    2929        usort($piwecard->my_config['selected_cats'], 'global_rank_compare');
    3030
    31         $piwecard->save_config();
     31        $piwecard->set_config();
    3232}
    3333
    3434if (isset($_POST['submit'])) {
    35         $piwecard->my_config['authorizations'] = $_POST['ecard_authorizations'];
    36         $piwecard->save_config();
     35        $piwecard->my_config['authorized_cats'] = $_POST['ecard_authorized_cats'];
     36        $piwecard->set_config();
    3737        array_push($page['infos'], l10n('ecard_admin_saveOK'));
    3838}
     
    7676
    7777$template->assign('ecard', array(
    78                                                                 'all_cats_checked' => (($piwecard->my_config['authorizations'] == 'all_cats') ? 'checked="checked"' : ''),
    79                                                                 'selected_cats_checked' => (($piwecard->my_config['authorizations'] == 'selected_cats') ? 'checked="checked"' : ''),
    80                                                                 'user_cats_checked' => (($piwecard->my_config['authorizations'] == 'user_cats') ? 'checked="checked"' : ''),
     78                                                                'all_cats_checked' => (($piwecard->my_config['authorized_cats'] == 'all') ? 'checked="checked"' : ''),
     79                                                                'selected_cats_checked' => (($piwecard->my_config['authorized_cats'] == 'selected') ? 'checked="checked"' : ''),
     80                                                                'user_cats_checked' => (($piwecard->my_config['authorized_cats'] == 'user') ? 'checked="checked"' : ''),
    8181                                                        )
    8282);
     
    8484$template->assign(array(
    8585                                                'F_ACTION' => '',
    86                                                 'L_CAT_OPTIONS_TRUE' => l10n('selected_cats'),
    87                                                 'L_CAT_OPTIONS_FALSE' => l10n('non_selected_cats'),
     86                                                'L_CAT_OPTIONS_TRUE' => l10n('piwecard_selected_cats'),
     87                                                'L_CAT_OPTIONS_FALSE' => l10n('piwecard_non_selected_cats'),
    8888                                        )
    8989);
Note: See TracChangeset for help on using the changeset viewer.