Ignore:
Timestamp:
Feb 21, 2011, 10:53:33 PM (13 years ago)
Author:
tiico
Message:

Version 1.0.4 :

  • Correct warning when option "active on user cats" is active
  • Add default mail for Guest eCard (in admin)

RU, IT, DE, LV language need to be updated

File:
1 edited

Legend:

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

    r8893 r9342  
    393393                                // Check the category name, user name et img author
    394394                                // Get all name for upper categories and current category
    395                                 $catname[0] = $cat['name'];
    396                                 if ($upper_ids != null)
    397                                 {
    398                                         $nb=1;
    399                                         foreach ($upper_ids as $upper_cat)
    400                                         {
    401                                                 // Get upper cat info and store the name
    402                                                 $cat_info = get_cat_info($upper_cat);
    403                                                 $catname[$nb++] = $cat_info['name'];
    404                                                 if ($this->debug)
    405                                                         echo "Catname[".($nb-1)."]=".$catname[$nb-1]." <br>";
    406                                         }
     395                if (isset($cat) and !empty($cat))
     396                {
     397                    $catname[0] = $cat['name'];
     398                    if (isset($upper_ids) and $upper_ids != null)
     399                    {
     400                        $nb=1;
     401                        foreach ($upper_ids as $upper_cat)
     402                        {
     403                            // Get upper cat info and store the name
     404                            $cat_info = get_cat_info($upper_cat);
     405                            $catname[$nb++] = $cat_info['name'];
     406                            if ($this->debug)
     407                                echo "Catname[".($nb-1)."]=".$catname[$nb-1]." <br>";
     408                        }
     409                    }
    407410                                }
    408411                                // Username or the current user
     
    457460                                        )
    458461                                {
     462
     463               
     464                // Check if user is guest.
     465                // In this case, force mail to default mail (in params)
     466                if (is_a_guest())
     467                {
     468//                    $this->my_config['expmail_change'] = false; // Disable exp mail change
     469                    if (!empty($this->my_config['defaultmail']))
     470                        $user['email'] = $this->my_config['defaultmail'];
     471                }
    459472                               
    460473                               
Note: See TracChangeset for help on using the changeset viewer.