Changeset 8909
- Timestamp:
- Jan 26, 2011, 11:18:11 AM (13 years ago)
- Location:
- extensions/ContactForm
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/ContactForm/admin/cf_config.php
r8482 r8909 90 90 $cf = array( 91 91 'TITLE' => $cf_plugin->get_title(), 92 'VERSION' => $cf_plugin->get_version(),93 92 'F_ACTION' => '', 94 93 ); -
extensions/ContactForm/classes/cf_config.class.php
r6547 r8909 33 33 function set_value($key, $value) { 34 34 $this->config_values[$key] = $value; 35 }36 37 function get_version() {38 if (isset($this->config_values[CF_CFG_VERSION])) {39 return $this->config_values[CF_CFG_VERSION];40 }41 return CF_VERSION;42 35 } 43 36 … … 120 113 } 121 114 $db_comment = sprintf($this->config_values[CF_CFG_COMMENT], 122 $this->db_key, 123 $this->get_version()); 115 $this->db_key); 124 116 $query = ' 125 117 REPLACE INTO '.CONFIG_TABLE.' … … 146 138 $config->load_config(); 147 139 $default_config = CF_Config::$default_config; 148 if (isset($default_config[CF_CFG_VERSION])) {149 // Override version150 $config->set_value(CF_CFG_VERSION, $default_config[CF_CFG_VERSION]);151 }152 140 if (isset($default_config[CF_CFG_COMMENT])) { 153 141 // Override comment -
extensions/ContactForm/classes/cf_plugin.class.php
r8887 r8909 151 151 } 152 152 153 function get_version() {154 return $this->config->get_version();155 }156 157 153 function get_title() { 158 154 // Include language advices -
extensions/ContactForm/config.php
r8908 r8909 64 64 $cf = array( 65 65 'TITLE' => $cf_plugin->get_title(), 66 'VERSION' => $cf_plugin->get_version(),67 66 'F_ACTION' => '', 68 67 ); -
extensions/ContactForm/include/cf_common.inc.php
r8908 r8909 7 7 8 8 // Version 9 define('CF_VERSION', '1.1.9');10 9 define('CF_TITLE', 'cf_plugin_name'); 11 10 … … 44 43 define('CF_CFG_DB_COMMENT', 'Configuration of plugin %s [%s]'); 45 44 define('CF_CFG_COMMENT', 'comment'); 46 define('CF_CFG_VERSION', 'version');47 45 48 46 define('CF_CFG_MENU_LINK', 'cf_menu_link'); -
extensions/ContactForm/main.inc.php
r8905 r8909 2 2 /* 3 3 Plugin Name: Contact Form 4 Version: 1.1.94 Version: auto 5 5 Description: Add a "Contact" item in the Menu block to offer a contact form to users 6 6 Plugin URI: http://piwigo.org/ext/extension_view.php?eid=304 -
extensions/ContactForm/maintain.inc.php
r6547 r8909 14 14 // Include language advices 15 15 load_language('plugin.lang', CF_PATH); 16 if ($version != CF_VERSION) {17 array_push($errors, sprintf(l10n('cf_inconsistent_version'), $plugin_id));18 return;19 }20 16 update_config($plugin_id, CF_CFG_DB_FACTORY); 21 17 } … … 37 33 include_once(CF_PATH . 'include/cf_common.inc.php'); 38 34 $clean = cf_clean_obsolete_files(CF_OBSOLETE); 39 $cf_config_default[CF_CFG_VERSION] = CF_VERSION;40 35 if (null != $db_comment) { 41 36 $cf_config_default[CF_CFG_COMMENT] = $db_comment;
Note: See TracChangeset
for help on using the changeset viewer.