Joined: Apr 06, 2006 Posts: 2415 Location: Iowa, USA
Posted:
Sat Mar 17, 2007 10:44 am
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.
Joined: Aug 29, 2004 Posts: 9136 Location: Arizona
Posted:
Sun Mar 18, 2007 9:35 am
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.
Joined: Apr 06, 2006 Posts: 2415 Location: Iowa, USA
Posted:
Sun Mar 18, 2007 11:14 am
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.
Joined: Apr 06, 2006 Posts: 2415 Location: Iowa, USA
Posted:
Mon Mar 19, 2007 5:25 pm
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
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 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