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 -> RN Conversion Issues From Standard phpNuke
Author Message
Gremmie
Former Moderator in Good Standing



Joined: Apr 06, 2006
Posts: 2415
Location: Iowa, USA

PostPosted: Sat Mar 17, 2007 10:44 am Reply with quote

One of the weird things I saw (and am still seeing) when converting from 7.9 to RN2.10 was this.

Long ago, I had renamed my admin file to, let's say, xxx_admin.php. I had a block (in the database) called Administration that had a list of useful admin type links. There were all like this

Code:


<a href="xxx_admin.php">Admin</a>


Being in the database this block transferred over to the new RN2.10 configuration. However, the links are now getting generated like this under RN2.10:

Code:


<a href="xxx_xxx_admin.php">Admin</a>


Huh? I can look in the database and see that they are xxx_admin.php.

My temporary work around was to go in the block and change the links to admin.php so that they get generated as xxx_admin.php.

I'm really confused...? Any ideas?

_________________
Only registered users can see links on this board! Get registered or login! - An Event Calendar for PHP-Nuke
Only registered users can see links on this board! Get registered or login! - A Google Maps Nuke Module 
View user's profile Send private message
montego
Site Admin



Joined: Aug 29, 2004
Posts: 9457
Location: Arizona

PostPosted: Sun Mar 18, 2007 9:35 am Reply with quote

Is this the standard Administration block that is managed within mainfile.php or is some other HTML block that you had created? I had written some code in 2.10's mainfile.php to fix the issue of $admin_file not being properly handled, but I am thinking now that it may only have worked upon a new, fresh install. But, it was so long ago that I cannot recall the details. Unfortunately, I am not where I can very easily research this. If you cannot find what I am talking about by the time I get back into town, I'll take a look at it.

_________________
Only registered users can see links on this board! Get registered or login!
Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Visit poster's website
Gremmie







PostPosted: Sun Mar 18, 2007 11:14 am Reply with quote

This is a block of type System, and I can only assume it came with 7.9 originally. It is not the "fake" block for waiting content generated in mainfile.php.

It does look like maybe there is some special logic trying to be helpful by searching for 'admin.php' and replacing it with $admin_file.'.php'. I will try to look for it.
 
Gremmie







PostPosted: Mon Mar 19, 2007 5:25 pm Reply with quote

Ah, here it is in mainfile.php

Code:


function adminblock() {
    global $admin, $prefix, $db, $admin_file;
    if (is_admin($admin)) {
        $sql = 'SELECT title, content FROM '.$prefix.'_blocks WHERE bkey=\'admin\'';
        $result = $db->sql_query($sql);
        while (list($title, $content) = $db->sql_fetchrow($result)) {
            $content = str_replace('admin.php',$admin_file.'.php',$content); //RN0000274
            $content = '<span class="content">'.$content.'</span>';
            themesidebox($title, $content);
        }


Good old RN0000274 Wink

Could maybe tighten that up to a pregi and search for admin.php on a word boundary. Or perhaps it really isn't a problem at all now that I know what is going on.
 
montego







PostPosted: Tue Mar 20, 2007 7:18 am Reply with quote

Gremmie, you are correct. It would have been better to tighten that up. Embarassed

Good catch! Sorry about that.
 
montego







PostPosted: Wed Mar 21, 2007 6:42 am Reply with quote

Gremmie, I have logged this in our bug tracker so it gets looked at. I just don't know when just yet.
 
Raven
Site Admin/Owner



Joined: Aug 27, 2002
Posts: 17088

PostPosted: Fri Apr 13, 2007 11:31 pm Reply with quote

Gremmie, I am assigning this to you in Mantis Smile
 
View user's profile Send private message
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 -> RN Conversion Issues From Standard phpNuke

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 ©