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)
-   -   Is this possible? (http://www.mysidiaadoptables.com/forum/showthread.php?t=4949)

Abronsyth 12-23-2015 11:59 AM

Oh! Kyttias you are absolutely brilliant!

ewe 03-29-2017 11:49 PM

I was similarly irritated by reply not grabbing a title and I accidentally stumbled upon this. I felt the need to change one thing, though - a devious and clever user could theoretically go through message IDs and read things not meant for them.

PHP Code:

$message = new PrivateMessage
// CHANGES START HERE

$title "(no subject)"// this way it'll never be blank
if($mysidia->input->get("id")){ // if there's an get value
    
$where trim($mysidia->input->get("id")); // trim the value
     
if (!ctype_digit($where)) { // if its not numeric only
        
$user $where// create a message to this user
    
} else if (ctype_digit($where)){ // if it IS numeric only then it's a reply, so pull data        
        
$oldMessage = new PrivateMessage($where); 
        
//my little paranoid change is here: 
        
if($mysidia->user->username == $oldMessage->fromuser) {     
          
$js "<script>$('.content h2').text('Reply To Message');</script>"// optional
          
$user $oldMessage->fromuser;     
          
$title "RE: ".$oldMessage->messagetitle;    
          
$msg "› {$user} wrote: ".$oldMessage->messagetext;
        }
    }
}

// CHANGES END HERE
$editor $message->getEditor(); 


Ittermat 04-02-2017 11:03 PM

This was noticed before by my other coder ^^

http://mysidiaadoptables.com/forum/p...php?issueid=57

ewe 04-10-2017 02:24 AM

Whoops!
Well at least it's in the same thread in case someone else is thick and didn't notice the other thread in bugs? :sheepish grin:


All times are GMT -5. The time now is 07:27 AM.

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