Mysidia Adoptables Support Forum  

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

Notices

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #8  
Old 01-26-2016, 06:03 PM
Hwona's Avatar
Hwona Hwona is offline
Member
 
Join Date: Mar 2013
Posts: 620
Gender: Female
Credits: 70,691
Hwona is on a distinguished road
Default

Hi! I think I know why this is happening. Are the two codes you posted the entire files, or just a section?
I was a bit confused with this quite some time ago. Did you construct myadopts like this? I suspect that your were missing the "catch" statement in the _construct function.
PHP Code:
<?php

use Resource\Native\Integer;
use 
Resource\Native\String;

class 
MyadoptsController extends AppController{

    const 
PARAM "aid";
    const 
PARAM2 "confirm";
    private 
$adopt;
    private 
$image;

    public function 
__construct(){
        
parent::__construct("member");
        
$mysidia Registry::get("mysidia");
        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");
            }                          
        }
    }
    
    public function 
index(){
        
$mysidia Registry::get("mysidia");
        
$total $mysidia->db->select("owned_adoptables", array("aid"), "owner = '{$mysidia->user->username}'")->rowCount();
        
$pagination = new Pagination($total10"myadopts");
        
$pagination->setPage($mysidia->input->get("page"));    
        
$stmt $mysidia->db->select("owned_adoptables", array("aid"), "owner = '{$mysidia->user->username}' ORDER BY totalclicks LIMIT {$pagination->getLimit()},{$pagination->getRowsperPage()}");        
        
$this->setField("pagination"$pagination);
        
$this->setField("stmt", new DatabaseStatement($stmt));
    }
    
    public function 
add(){
        
$mysidia Registry::get("mysidia");    
    }
    
}
?>
Reply With Quote
 


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 02:17 PM.

Currently Active Users: 2834 (0 members and 2834 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