1

(0 replies, posted in Feature requests)

I'm working integrating PunBB with PhpGedView and have a couple of suggestions.

I want to be able to detect when the source code of PunBB has later version than the once used/stored in the PunBB database. It would be good if global PunBB variables could be defined in as constants in separate file which can be included by any PunBB file. For instance:

includes/constants.php:
<?php
  define('PGV_VERSION', 1.2..17);
?>

For PhpGedView I've added some code to include/common.php to check if the source code version is > the DB version, and if so, redirect the user to the upgrade script:
if ( version_compare( $pun_config['o_cur_version'], $sourcecode_version, "<") ) {
  // redirect to the upgrade script
}

In the above snippet it, would be best to have the source code version defined in once place that can be easily included in any file.

I've then implemented a check in the upgrade script to ensure the logged in user has admin rights in PhpGedView (maybe something similar can be used for PunBB?). If the user has rights, the upgrade proceeds as normal otherwise, a message is supplied to get an admin to do the upgrade before the PunBB forums can be accessed.

Any thoughts/comments?

Nath