Quote:
Originally posted by NTLDR
How many times do you have: getpermissions in showthread.php? It should be there twice, once in showpost and once in showthread
|
PHP Code:
// Logician Download Thread Hack
if ($action=="download") {
require("./global.php");
if (!$threadid OR $threadid<1) {show_nopermission();}
$thread_db=$DB_site->query_first("SELECT * from thread WHERE threadid=$threadid AND visible=1");
if (!$thread_db[threadid] OR $thread_db[threadid]<0) {show_nopermission();}
$forum=getforuminfo($thread_db['forumid']);
// Check Permissions so that a smartass wouldnt download a thread he doesnt allowed
$getperms=getpermissions($thread_db['forumid'],-1,-1,$forum['parentlist']);
if (!$getperms['canview']) {show_nopermission();}
if (!$getperms['canviewothers'] and ($thread['postuserid']!=$bbuserinfo['userid'] or $bbuserinfo['userid']==0)) {show_nopermission();}
That code is near the top of showthread.php (there is a getpermissions call in there).
It's the download thread hack from logician...