Subject: Geeklog upgrade from 1.7.2 to 1.8.0b1 issue

Posted on: 06/04/11 12:35pm
By: ::Ben

I made an update from 1.7.2 to 1.8.0b1. Everything seems to work but access to admin/plugins.php
Give me the nice message >> This file can not be used on its own. Confused:

Ben

Re: Geeklog upgrade from 1.7.2 to 1.8.0b1 issue

Posted on: 07/04/11 10:46am
By: ::Ben

This is this part of the code which creates the issue

PHP Formatted Code

admin/plugins.php Line 487

    $retval .= ADMIN_list('plugins', 'ADMIN_getListField_plugins', $header_arr,
                $text_arr, $query_arr, $defsort_arr, '', $token, '', $form_arr, false);


Ben

Re: Geeklog upgrade from 1.7.2 to 1.8.0b1 issue

Posted on: 07/04/11 12:25pm
By: ::Ben

Ok I get it. :chestslam:

When the admin/plugins.php page try to check depencies, the PLG_getParams function can include config.php file from old plugins. But if config file from the old plugin begin with:

PHP Formatted Code
if (!defined ('GVERSION')) {
    die ('This file can not be used on its own.');
}
 

change to:

PHP Formatted Code
if (strpos(strtolower($_SERVER['PHP_SELF']), 'config.php') !== false) {
    die('This file can not be used on its own!');
}

solve the issue.

Ben

Geeklog - Forum
https://www.geeklog.net/forum/viewtopic.php?showtopic=92506