Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> PHP-Nuke Patched Series By Chatserv
Author Message
NoFantasy
Worker
Worker



Joined: Apr 26, 2005
Posts: 114

PostPosted: Wed Nov 15, 2006 7:17 am Reply with quote

Just in the middle of upgrading from 3.1 to 3.3 patched i discovered some really odd stuff happening with the Web_Links module. I'm done patching all core files and the BBtoNuke, so basically the site now runs on patched3.3 and BBtoNuke.21, just some modules still remains to be upgraded.

The problem seems to be this particular code found four places in the WebLinks index-file:
Code:
if ($row2a['radminsuper'] == 1 || $auth_user == 1) {

echo "<a href=\"".$admin_file.".php?op=LinksModLink&amp;lid=$lid\">"._EDIT."</a> | ";
}

If i don't comment out the second line, the edit link will show to all users. What did i miss? Is it a bug or me forgot something during patching?

It looks like the code doesn't work at all...
 
View user's profile Send private message
evaders99
Former Moderator in Good Standing



Joined: Apr 30, 2004
Posts: 3221

PostPosted: Wed Nov 15, 2006 8:04 am Reply with quote

It looks like a typo.. but it isn't.
It's reading from the admin query here
Code:


$row2a = $db->sql_fetchrow($db->sql_query("SELECT name, radminsuper FROM ".$prefix."_authors WHERE aid='$aid'"));


That looks correct

_________________
- Star Wars Rebellion Network -

Need help? Nuke Patched Core, Coding Services, Webmaster Services

Last edited by evaders99 on Wed Nov 15, 2006 8:20 am; edited 1 time in total 
View user's profile Send private message Visit poster's website
NoFantasy







PostPosted: Wed Nov 15, 2006 8:18 am Reply with quote

...seems like using $row2a is the one...
Code:
$admin = base64_decode($admin);

   $admin = addslashes($admin);
   $admin = explode(":", $admin);
    $aid = "$admin[0]";
    $row = $db->sql_fetchrow($db->sql_query("SELECT title, admins FROM ".$prefix."_modules WHERE title='Web_Links'"));
    $row2a = $db->sql_fetchrow($db->sql_query("SELECT name, radminsuper FROM ".$prefix."_authors WHERE aid='$aid'"));
    $admins = explode(",", $row['admins']);
    $auth_user = 0;
    for ($i=0; $i < sizeof($admins); $i++) {
        if ($row2a['name'] == "$admins[$i]" AND !empty($row['admins'])) {
            $auth_user = 1;   
        }

This code is from the function viewlink in the 3.3patched index file
 
evaders99







PostPosted: Wed Nov 15, 2006 8:20 am Reply with quote

Sorry I looked at the code again and edited my post. It seems correct
 
Display posts from previous:       
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> PHP-Nuke Patched Series By Chatserv

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©