| [ Index ] |
PHP Cross Reference of MantisBT |
[Summary view] [Print] [Text view]
1 <?php 2 # MantisBT - A PHP based bugtracking system 3 4 # MantisBT is free software: you can redistribute it and/or modify 5 # it under the terms of the GNU General Public License as published by 6 # the Free Software Foundation, either version 2 of the License, or 7 # (at your option) any later version. 8 # 9 # MantisBT is distributed in the hope that it will be useful, 10 # but WITHOUT ANY WARRANTY; without even the implied warranty of 11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 # GNU General Public License for more details. 13 # 14 # You should have received a copy of the GNU General Public License 15 # along with MantisBT. If not, see <http://www.gnu.org/licenses/>. 16 17 /** 18 * XML Import / Export Plugin 19 * @package MantisPlugin 20 * @subpackage MantisPlugin 21 * @copyright Copyright (C) 2000 - 2002 Kenzaburo Ito - kenito@300baud.org 22 * @copyright Copyright (C) 2002 - 2011 MantisBT Team - mantisbt-dev@lists.sourceforge.net 23 * @link http://www.mantisbt.org 24 */ 25 26 /** 27 * XmlImportExportPlugin Class 28 */ 29 class XmlImportExportPlugin extends MantisPlugin { 30 31 /** 32 * A method that populates the plugin information and minimum requirements. 33 */ 34 function register( ) { 35 $this->name = plugin_lang_get( 'title' ); 36 $this->description = plugin_lang_get( 'description' ); 37 $this->page = ''; 38 39 $this->version = '1.0'; 40 $this->requires = array( 41 'MantisCore' => '1.2.0', 42 ); 43 44 $this->author = 'MantisBT Team'; 45 $this->contact = 'mantisbt-dev@lists.sourceforge.net'; 46 $this->url = 'http://www.mantisbt.org'; 47 } 48 49 /** 50 * Default plugin configuration. 51 */ 52 function hooks( ) { 53 $hooks = array( 54 'EVENT_MENU_MANAGE' => 'import_issues_menu', 55 'EVENT_MENU_FILTER' => 'export_issues_menu', 56 ); 57 return $hooks; 58 } 59 60 function import_issues_menu( ) { 61 return array( '<a href="' . plugin_page( 'import' ) . '">' . plugin_lang_get( 'import' ) . '</a>', ); 62 } 63 64 function export_issues_menu( ) { 65 return array( '<a href="' . plugin_page( 'export' ) . '">' . plugin_lang_get( 'export' ) . '</a>', ); 66 } 67 68 function install() { 69 $result = extension_loaded("xmlreader") && extension_loaded("xmlwriter"); 70 if ( ! $result ) { 71 #\todo returning false should trigger some error reporting, needs rethinking error_api 72 error_parameters( plugin_lang_get( 'error_no_xml' ) ); 73 trigger_error( ERROR_PLUGIN_INSTALL_FAILED, ERROR ); 74 } 75 return $result; 76 } 77 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Thu Jul 28 15:48:31 2011 | Cross-referenced by PHPXref 0.7 |