Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Mysidia Adoptables > Questions and Supports

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 01-28-2016, 07:21 PM
Hwona's Avatar
Hwona Hwona is offline
Member
 
Join Date: Mar 2013
Posts: 620
Gender: Female
Credits: 70,705
Hwona is on a distinguished road
Default

Quote:
Originally Posted by FounderSim View Post
See previous post, what I posted about Wallie.

Code I replaced with mine. I added a $safelist array and checked if in it.
Code:
class MyadoptsController extends AppController{

    const PARAM = "aid";
    const PARAM2 = "confirm";
	private $safelist = array("page1", "page2", "page3");
	private $adopt;
	private $image;

    public function __construct(){
        parent::__construct("member");
		$mysidia = Registry::get("mysidia");

		if(!in_array($this->action, $this->safelist))
		{
			if( $this->action != "index"){
				try{
					$this->adopt = new OwnedAdoptable($mysidia->input->get("aid"));	
					if($this->adopt->getOwner() != $mysidia->user->username) throw new NoPermissionException("permission");		
					$this->image = $this->adopt->getImage("gui");
				}
				catch(AdoptNotfoundException $pne){
					$this->setFlags("nonexist_title", "nonexist");
				}              			
			}
		}
    }
Umm, have you tried just checking the page action in the 'if' condition? So... if($this->action != "index" && $this->action != "Page 1"....)
Other than that, I really have no idea as to what could possibly have gone wrong. I'm assuming everything works fine if you revert the file to its original state? :L
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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

Currently Active Users: 2053 (0 members and 2053 guests)
Threads: 4,081, Posts: 32,032, Members: 2,016
Welcome to our newest members, jolob.
BETA





What's New?

What's Hot?

What's Popular?


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
vBCommerce I v2.0.0 Gold ©2010, PixelFX Studios
vBCredits I v2.0.0 Gold ©2010, PixelFX Studios
Emoticons by darkmoon3636