Assembla home | Assembla project page
 

Changeset 151

Show
Ignore:
Timestamp:
11/10/08 22:00:57 (1 year ago)
Author:
aprice30
Message:

Added an extra check so the status message is only created if it hasn't already been created before. An extra check had to be added for if it was the first status message of the given type. If so it allows the message to be added without checking if it is a duplicate, Closes #4

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/modules/status/libraries/Status.php

    r123 r151  
    5959                        $data = $this->_fetch(); 
    6060 
    61                         // Append our message to the end 
    62                         $data[$type][] = $message; 
     61                        // Append our message to the end if not already created 
     62                        if( !array_key_exists($type,$data) OR !in_array($message,$data[$type])) 
     63                        { 
     64                                $data[$type][] = $message; 
    6365 
    64                         // Save the data back into the session 
    65                         $this->CI->session->set_userdata($this->flash_var,serialize($data)); 
     66                                // Save the data back into the session 
     67                                $this->CI->session->set_userdata($this->flash_var,serialize($data)); 
     68                        } 
    6669                } 
    6770 
  • trunk/user_guide/general/changelog.html

    r150 r151  
    6868<h3>Bug Fixes</h3> 
    6969<ul> 
     70        <li>Fixed bug where status messages would get repeated if an ajax controller method was called, See <a href="http://trac2.assembla.com/backendpro/ticket/4">Bug #4</a></li> 
    7071        <li>Fixed bug where if no user profile fields are created but the user profiles are turned on, it would error saying "Must you set method" when trying to save a edited user account, See <a href="http://trac2.assembla.com/backendpro/ticket/51">Bug #51</a></li> 
    7172        <li>Fixed bug with <strong>unserialize() Spamming logs with errors</strong>, See <a href="http://trac2.assembla.com/backendpro/ticket/37">Bug #37</a></li>