Changeset 788944
- Timestamp:
- 10/16/2013 08:40:27 PM (12 years ago)
- Location:
- polizeipresse/trunk
- Files:
-
- 2 edited
-
Polizeipresse.php (modified) (3 diffs)
-
options.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
polizeipresse/trunk/Polizeipresse.php
r788210 r788944 37 37 38 38 /** 39 * Called on plugin installation40 */41 function polizeipresse_install() {42 polizeipresse_set_default_options();43 }44 register_activation_hook(__FILE__, 'polizeipresse_install');45 46 /**47 39 * Called on plugin deinstallation 48 40 */ … … 73 65 if ($office_id_old) { 74 66 polizeipresse_update_option(POLIZEIPRESSE_OFFICE_ID0, $office_id_old); 75 polizeipresse_delete_options(POLIZEIPRESSE_OFFICE_ID); 67 polizeipresse_delete_option(POLIZEIPRESSE_OFFICE_ID); 68 } 69 70 // Copy office_name to office_name0. 71 $office_name_old = polizeipresse_get_option(POLIZEIPRESSE_OFFICE_NAME); 72 if ($office_name_old) { 73 polizeipresse_update_option(POLIZEIPRESSE_OFFICE_NAME0, $office_name_old); 74 polizeipresse_delete_option(POLIZEIPRESSE_OFFICE_NAME); 76 75 } 77 76 … … 80 79 if ($last_story_id_old) { 81 80 polizeipresse_update_option(POLIZEIPRESSE_CRON_LAST_STORY_ID0, $last_story_id_old); 82 polizeipresse_delete_option s(POLIZEIPRESSE_CRON_LAST_STORY_ID);81 polizeipresse_delete_option(POLIZEIPRESSE_CRON_LAST_STORY_ID); 83 82 } 84 83 -
polizeipresse/trunk/options.php
r788210 r788944 93 93 94 94 /** 95 * Deletes the option with the given name. 96 * 97 * @param name Name of option 98 */ 99 function polizeipresse_delete_option($name) { 100 $options = polizeipresse_get_options(); 101 unset($options[$name]); 102 polizeipresse_update_options($options); 103 } 104 105 /** 95 106 * Deletes all options 96 107 */
Note: See TracChangeset
for help on using the changeset viewer.