PHP Web Host - Quality Web Hosting For All PHP Applications Free RavenNuke(tm) Add Ons
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.
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 Back to top

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?
View user's profile Send private message
montego
Site Admin


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

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

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.
View user's profile Send private message Visit poster's website
Gremmie
Former Moderator in Good Standing


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

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

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.
View user's profile Send private message
Gremmie
Former Moderator in Good Standing


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

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

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.
View user's profile Send private message
montego
Site Admin


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

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

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

Good catch! Sorry about that.
View user's profile Send private message Visit poster's website
montego
Site Admin


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

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

Gremmie, I have logged this in our bug tracker so it gets looked at. I just don't know when just yet.
View user's profile Send private message Visit poster's website
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 16987
Location: Kansas

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

Gremmie, I am assigning this to you in Mantis Smile
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
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.

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
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2011 by Raven

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::
:: fisubice Theme Modified by the RavenNuke™ Team ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum