From: <nuc...@us...> - 2008-06-04 19:23:41
|
Revision: 5325 http://mantisbt.svn.sourceforge.net/mantisbt/?rev=5325&view=rev Author: nuclear_eclipse Date: 2008-06-04 12:23:36 -0700 (Wed, 04 Jun 2008) Log Message: ----------- Added error reporting to the plugin upgrade process. Modified Paths: -------------- trunk/mantisbt/core/constant_inc.php trunk/mantisbt/core/plugin_api.php trunk/mantisbt/lang/strings_english.txt Modified: trunk/mantisbt/core/constant_inc.php =================================================================== --- trunk/mantisbt/core/constant_inc.php 2008-06-04 12:45:13 UTC (rev 5324) +++ trunk/mantisbt/core/constant_inc.php 2008-06-04 19:23:36 UTC (rev 5325) @@ -331,6 +331,7 @@ define( 'ERROR_PLUGIN_NOT_REGISTERED', 2500 ); define( 'ERROR_PLUGIN_ALREADY_INSTALLED', 2501 ); define( 'ERROR_PLUGIN_PAGE_NOT_FOUND', 2502 ); + define( 'ERROR_PLUGIN_UPGRADE_FAILED', 2503 ); # ERROR_COLUMNS_* define ( 'ERROR_COLUMNS_DUPLICATE', 2600 ); Modified: trunk/mantisbt/core/plugin_api.php =================================================================== --- trunk/mantisbt/core/plugin_api.php 2008-06-04 12:45:13 UTC (rev 5324) +++ trunk/mantisbt/core/plugin_api.php 2008-06-04 19:23:36 UTC (rev 5325) @@ -492,6 +492,8 @@ if ( 2 == $t_status ) { plugin_config_set( 'schema', $i ); } else { + error_parameters( $i ); + trigger_error( ERROR_PLUGIN_UPGRADE_FAILED, ERROR ); return null; } Modified: trunk/mantisbt/lang/strings_english.txt =================================================================== --- trunk/mantisbt/lang/strings_english.txt 2008-06-04 12:45:13 UTC (rev 5324) +++ trunk/mantisbt/lang/strings_english.txt 2008-06-04 19:23:36 UTC (rev 5325) @@ -311,6 +311,7 @@ $MANTIS_ERROR[ERROR_PLUGIN_NOT_REGISTERED] = 'Plugin is not registered with Mantis.'; $MANTIS_ERROR[ERROR_PLUGIN_ALREADY_INSTALLED] = 'Plugin is already installed.'; $MANTIS_ERROR[ERROR_PLUGIN_PAGE_NOT_FOUND] = 'Plugin page not found.'; +$MANTIS_ERROR[ERROR_PLUGIN_UPGRADE_FAILED] = 'Upgrading the plugin schema failed in block #%s.'; $MANTIS_ERROR[ERROR_COLUMNS_DUPLICATE] = 'Field \'%s\' contains duplcate column \'%s\'.'; $MANTIS_ERROR[ERROR_COLUMNS_INVALID] = 'Field \'%s\' contains invalid field \'%s\''; $MANTIS_ERROR[ERROR_SESSION_HANDLER_INVALID] = 'Invalid session handler.'; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |