Mysidia Adoptables Support Forum

Mysidia Adoptables Support Forum (http://www.mysidiaadoptables.com/forum/index.php)
-   Questions and Supports (http://www.mysidiaadoptables.com/forum/forumdisplay.php?f=18)
-   -   Trade status not changing (http://www.mysidiaadoptables.com/forum/showthread.php?t=5294)

Dinocanid 12-13-2016 08:00 PM

Trade status not changing
 
For some reason, changing the trade status of any pet above level 1 or 0 doesn't seem to work. I haven't touched any code related to trades, but here's mine anyway:
PHP Code:

public function trade(){
        
$mysidia Registry::get("mysidia");        
        if(
$mysidia->input->get("confirm") == "confirm"){
            switch(
$this->adopt->getTradeStatus()){
                case 
"fortrade":
                    
$this->adopt->setTradeStatus("notfortrade""update");
                    
$message $mysidia->lang->trade_disallow;
                    break;
                case 
"notfortrade":
                    
$this->adopt->setTradeStatus("fortrade""update");
                    
$message $mysidia->lang->trade_allow;
                    break;
                default:
                    throw new 
InvalidActionException("global_action");
            }
        }
        else{
            
$message "Are you sure you wish to change the trade status of this adoptable?
                        <center><b><a href='
{$this->adopt->getAdoptID()}/confirm'>Yes I'd like to change its trade status</a></b><br /><br />
                        <b><a href='../../myadopts'>Nope I change my mind! Go back to the previous page.</a></b></center><br />"
;
        }
        
$this->setField("aid", new Integer($this->adopt->getAdoptID()));
        
$this->setField("image"$this->image);                
        
$this->setField("message", new String($message));                
    } 

PHP Code:

public function trade(){
        
$mysidia Registry::get("mysidia");
        
$aid $this->getField("aid")->getValue();        
        
$image $this->getField("image");    
        
$message $this->getField("message")->getValue();        
        
$document $this->document;
        
$document->setTitle($this->lang->trade);
        
$document->add($image);
        
$document->addLangvar($message);
    } 



All times are GMT -5. The time now is 03:04 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.