Ignore:
Timestamp:
Jan 9, 2013, 12:32:04 AM (11 years ago)
Author:
julien1311
Message:

[piwecard] new improvements

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/Piwecard/include/piwecard.class.php

    r20010 r20013  
    166166                        if (!empty($page['category'])) {
    167167                                // Gets all upper categories from the image category to test
    168                                 //      - if the parameter for "recursive" is OK
    169168                                //      - if the upper category is activated for this function
    170169                                $query = 'SELECT * FROM '.CATEGORIES_TABLE.' WHERE id = '.pwg_db_real_escape_string($page['category']['id']).';';
     
    213212                        // Only on available cats
    214213                        if (($this->my_config['authorizations'] == 'all_cats')          //Parameter : all_cats
    215                                 OR ($this->my_config['authorizations'] == 'selected_cats' AND !empty($page['category']) AND in_array($page['category']['id'], $this->my_config['selected_cats']))       //Parameter : selected_cats but not recursive
    216                                 OR ($this->my_config['authorizations'] == 'selected_cats' AND $this->my_config['recursive'] AND isset($upper_ids) AND (array_intersect($upper_ids, $this->my_config['selected_cats']) != array())) //Parameter : selected_cats and recursive
    217                                 OR      ($this->my_config['authorizations'] == 'user_cats' AND (in_array($username, $catname) OR $username == $authorname)) //Parameter : selected_cats and recursive
     214                                OR ($this->my_config['authorizations'] == 'selected_cats' AND isset($upper_ids) AND (array_intersect($upper_ids, $this->my_config['selected_cats']) != array())) //Parameter : selected_cats and recursive
     215                                OR      ($this->my_config['authorizations'] == 'user_cats' AND (in_array($username, $catname) OR $username == $authorname)) //Parameter : user_cats
    218216                        ) {
    219217                                // Check if user is guest.
     
    233231                                                'recipient_email'       => l10n('ecard_send_dest_mail'),
    234232                                                'copy'                          => $this->my_config['sender_copy'] ? 'checked="checked"' : '',
    235                                                 'changemail'            => (!isset($user['email']) OR $this->my_config['sender_email_change']) ? '' : 'disabled="disabled"')
    236                                                 ));
     233                                                'changemail'            => (!isset($user['email']) OR $this->my_config['sender_email_change']) ? '' : 'disabled="disabled"'
     234                                                )
     235                                );
    237236
    238237                                // Template add for the active parameter choice by the user
     
    252251                                                                                                                                'id' => $email_format,
    253252                                                                                                                                'name' => l10n('ecard_mail_format_'.$email_format),
    254                                                                                                                                 'selected' => (($this->my_config['email_format_default'] == $email_format) ?  '' : 'checked')
     253                                                                                                                                'selected' => (($this->my_config['email_format_default'] == $email_format) ?  '' : 'checked'),
    255254                                                                                                                        )
    256255                                        );
     
    322321
    323322                                        $email_subject = htmlspecialchars_decode($this->parse( $this->my_config['email_subject'], $_POST));
    324                                         $email_message = htmlspecialchars_decode($this->parse($this->my_config['email_'.$this->my_config['email_format']], $_POST, $image_element));
     323                                        $email_message = htmlspecialchars_decode($this->parse($this->my_config['email_message'][$send_method], $_POST, $image_element));
    325324                                        $email_arg=array(       'from' => $_POST['ecard_sender_email'],
    326325                                                                                'subject'                       => $email_subject,
Note: See TracChangeset for help on using the changeset viewer.