| Author |
Message |
Gremmie Former Moderator in Good Standing

Joined: Apr 06, 2006 Posts: 2401 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.
I'm really confused...? Any ideas? |
|
|
|
 |
montego Site Admin

Joined: Aug 29, 2004 Posts: 7457 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. |
|
|
|
 |
Gremmie Former Moderator in Good Standing

Joined: Apr 06, 2006 Posts: 2401 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. |
|
|
|
 |
Gremmie Former Moderator in Good Standing

Joined: Apr 06, 2006 Posts: 2401 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. |
|
|
|
 |
montego Site Admin

Joined: Aug 29, 2004 Posts: 7457 Location: Arizona
|
Posted:
Tue Mar 20, 2007 7:18 am |
|
Gremmie, you are correct. It would have been better to tighten that up.
Good catch! Sorry about that. |
|
|
|
 |
montego Site Admin

Joined: Aug 29, 2004 Posts: 7457 Location: Arizona
|
Posted:
Wed Mar 21, 2007 6:42 am |
|
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: 15210 Location: Kansas
|
Posted:
Fri Apr 13, 2007 11:31 pm |
|
Gremmie, I am assigning this to you in Mantis  |
|
|
|
 |
|
|
|
|