/** * Standard modular uninstall function. */ function uninstall() { $GLOBALS['SITE_DB']->drop_if_exists('download_categories'); $GLOBALS['SITE_DB']->drop_if_exists('download_downloads'); $GLOBALS['SITE_DB']->drop_if_exists('download_logging'); $GLOBALS['SITE_DB']->drop_if_exists('download_licences'); delete_config_option('maximum_download'); delete_config_option('is_on_downloads'); delete_config_option('show_dload_trees'); delete_config_option('points_ADD_DOWNLOAD'); delete_config_option('downloads_show_stats_count_total'); delete_config_option('downloads_show_stats_count_archive'); delete_config_option('downloads_show_stats_count_downloads'); delete_config_option('downloads_show_stats_count_bandwidth'); delete_config_option('immediate_downloads'); delete_config_option('download_gallery_root'); $GLOBALS['SITE_DB']->query_delete('group_category_access', array('module_the_name' => 'downloads')); $GLOBALS['SITE_DB']->query_delete('trackbacks', array('trackback_for_type' => 'downloads')); delete_value('download_bandwidth'); delete_value('archive_size'); delete_value('num_archive_downloads'); delete_value('num_downloads_downloaded'); deldir_contents(get_custom_file_base() . '/uploads/downloads', true); delete_menu_item_simple('_SEARCH:downloads:type=misc'); }
/** * Standard modular uninstall function. */ function uninstall() { $GLOBALS['SITE_DB']->drop_if_exists('addons'); $GLOBALS['SITE_DB']->drop_if_exists('addons_files'); $GLOBALS['SITE_DB']->drop_if_exists('addons_dependencies'); deldir_contents(get_custom_file_base() . '/exports/mods', true); }
/** * Delete all the contents of a directory, and any subdirectories of that specified directory (recursively). * * @param PATH The pathname to the directory to delete * @param boolean Whether to preserve files there by default * @param boolean Whether to just delete files */ function _deldir_contents($dir, $default_preserve = false, $just_files = false) { $current_dir = @opendir($dir); if ($current_dir !== false) { while (false !== ($entryname = readdir($current_dir))) { if ($default_preserve) { if ($entryname == 'index.html') { continue; } if ($entryname[0] == '.') { continue; } if (in_array(str_replace(get_file_base() . '/', '', $dir) . '/' . $entryname, array('uploads/banners/advertise_here.png', 'uploads/banners/donate.png', 'themes/map.ini', 'themes/default'))) { continue; } } if (is_dir($dir . '/' . $entryname) && $entryname != '.' && $entryname != '..') { deldir_contents($dir . '/' . $entryname, $default_preserve, $just_files); if (!$just_files) { $test = @rmdir($dir . '/' . $entryname); if ($test === false && !$just_files) { warn_exit(do_lang_tempcode('WRITE_ERROR', escape_html($dir . '/' . $entryname))); } } } elseif ($entryname != '.' && $entryname != '..') { $test = @unlink($dir . '/' . $entryname); if ($test === false) { intelligent_write_error($dir . '/' . $entryname); } } sync_file($dir . '/' . $entryname); } closedir($current_dir); } }
/** * Standard modular uninstall function. */ function uninstall() { $GLOBALS['SITE_DB']->drop_if_exists('catalogues'); $GLOBALS['SITE_DB']->drop_if_exists('catalogue_fields'); $GLOBALS['SITE_DB']->drop_if_exists('catalogue_categories'); $GLOBALS['SITE_DB']->drop_if_exists('catalogue_entries'); $GLOBALS['SITE_DB']->drop_if_exists('catalogue_efv_long_trans'); $GLOBALS['SITE_DB']->drop_if_exists('catalogue_efv_short_trans'); $GLOBALS['SITE_DB']->drop_if_exists('catalogue_efv_long'); $GLOBALS['SITE_DB']->drop_if_exists('catalogue_efv_short'); $GLOBALS['SITE_DB']->drop_if_exists('catalogue_efv_float'); $GLOBALS['SITE_DB']->drop_if_exists('catalogue_efv_integer'); $GLOBALS['SITE_DB']->drop_if_exists('catalogue_entry_linkage'); $GLOBALS['SITE_DB']->drop_if_exists('catalogue_cat_treecache'); $GLOBALS['SITE_DB']->drop_if_exists('catalogue_childcountcache'); $GLOBALS['SITE_DB']->query_delete('group_category_access', array('module_the_name' => 'catalogues_category')); $GLOBALS['SITE_DB']->query_delete('group_category_access', array('module_the_name' => 'catalogues_catalogue')); $GLOBALS['SITE_DB']->query_delete('trackbacks', array('trackback_for_type' => 'catalogues')); deldir_contents(get_custom_file_base() . '/uploads/catalogues', true); delete_specific_permission('high_catalogue_entry_timeout'); delete_menu_item_simple('_SEARCH:catalogues:type=misc'); $cf = $GLOBALS['SITE_DB']->query_value_null_ok('menu_items', 'id', array('i_menu' => 'collab_features', 'i_url' => '')); if (!is_null($cf)) { delete_menu_item($cf); } delete_menu_item_simple('_SEARCH:catalogues:id=projects:type=index'); delete_menu_item_simple('_SEARCH:cms_catalogues:catalogue_name=projects:type=add_entry'); }
/** * Standard modular uninstall function. */ function uninstall() { $langs = find_all_langs(true); foreach (array_keys($langs) as $lang) { deldir_contents(get_custom_file_base() . '/lang_cached/' . $lang, true); // lang_custom purposely left } }
/** * Standard modular uninstall function. */ function uninstall() { $GLOBALS['SITE_DB']->drop_if_exists('iotd'); delete_specific_permission('choose_iotd'); $GLOBALS['SITE_DB']->query_delete('trackbacks', array('trackback_for_type' => 'iotds')); deldir_contents(get_custom_file_base() . '/uploads/iotds', true); delete_config_option('points_ADD_IOTD'); delete_config_option('points_CHOOSE_IOTD'); delete_config_option('iotd_update_time'); }
/** * Standard modular uninstall function. */ function uninstall() { $GLOBALS['SITE_DB']->drop_if_exists('theme_images'); delete_config_option('templates_store_revisions'); delete_config_option('templates_number_revisions_show'); $langs = find_all_langs(true); foreach (array_keys($langs) as $lang) { deldir_contents(get_custom_file_base() . '/themes/default/templates_cached/' . $lang, true); } //deldir_contents(get_custom_file_base().'/themes/default/images_custom',true); //deldir_contents(get_file_base().'/themes',true); // templates_custom, css_custom purposely left }
/** * Standard modular directory removal function for OcCLE FS hooks. * * @param array The current meta-directory path * @param string The root node of the current meta-directory * @param string The directory name * @param array A reference to the OcCLE filesystem object * @return boolean Success? */ function remove_directory($meta_dir, $meta_root_node, $dir_name, &$occle_fs) { $dir_name = filter_naughty($dir_name); $path = $this->_customise_directory($meta_dir); if (is_dir($path) && file_exists($path . $dir_name) && is_writable_wrap($path . $dir_name)) { require_code('files2'); deldir_contents($path . $dir_name); $ret = @rmdir($path . $dir_name) or warn_exit(do_lang_tempcode('WRITE_ERROR', escape_html($path . $dir_name))); sync_file($path . '/' . $dir_name); return true; } else { return false; } //Directory doesn't exist }
/** * Standard modular uninstall function. */ function uninstall() { $GLOBALS['SITE_DB']->drop_if_exists('banners'); $GLOBALS['SITE_DB']->drop_if_exists('banner_types'); $GLOBALS['SITE_DB']->drop_if_exists('banner_clicks'); $GLOBALS['SITE_DB']->query_delete('group_category_access', array('module_the_name' => 'banners')); delete_config_option('is_on_banners'); delete_config_option('money_ad_code'); delete_config_option('use_banner_permissions'); delete_config_option('advert_chance'); delete_config_option('points_ADD_BANNER'); delete_config_option('admin_banners'); delete_config_option('banner_autosize'); delete_specific_permission('full_banner_setup'); delete_specific_permission('view_anyones_banner_stats'); delete_specific_permission('banner_free'); deldir_contents(get_custom_file_base() . '/uploads/banners', true); //delete_menu_item_simple('_SEARCH:donate'); }
/** * Standard modular uninstall function. */ function uninstall() { $GLOBALS['SITE_DB']->drop_if_exists('galleries'); $GLOBALS['SITE_DB']->drop_if_exists('images'); $GLOBALS['SITE_DB']->drop_if_exists('videos'); $GLOBALS['SITE_DB']->drop_if_exists('video_transcoding'); delete_config_option('default_video_width'); delete_config_option('default_video_height'); delete_config_option('maximum_image_size'); delete_config_option('max_personal_gallery_images_low'); delete_config_option('max_personal_gallery_images_high'); delete_config_option('max_personal_gallery_videos_low'); delete_config_option('max_personal_gallery_videos_high'); delete_config_option('points_ADD_IMAGE'); delete_config_option('points_ADD_VIDEO'); delete_config_option('galleries_show_stats_count_galleries'); delete_config_option('galleries_show_stats_count_images'); delete_config_option('galleries_show_stats_count_videos'); delete_config_option('show_empty_galleries'); delete_config_option('gallery_name_order'); delete_config_option('gallery_selectors'); delete_config_option('reverse_thumb_order'); delete_config_option('show_gallery_counts'); delete_config_option('video_bitrate'); delete_config_option('audio_bitrate'); delete_config_option('ffmpeg_path'); delete_config_option('transcoding_server'); delete_config_option('transcoding_zencoder_api_key'); delete_config_option('transcoding_zencoder_ftp_path'); delete_config_option('video_width_setting'); delete_config_option('video_height_setting'); delete_specific_permission('may_download_gallery'); delete_specific_permission('high_personal_gallery_limit'); delete_specific_permission('no_personal_gallery_limit'); $GLOBALS['SITE_DB']->query_delete('group_category_access', array('module_the_name' => 'galleries')); $GLOBALS['SITE_DB']->query_delete('trackbacks', array('trackback_for_type' => 'galleries')); deldir_contents(get_custom_file_base() . '/uploads/galleries', true, true); deldir_contents(get_custom_file_base() . '/uploads/galleries_thumbs', true); delete_menu_item_simple('_SEARCH:galleries:type=misc'); }
/** * Standard modular uninstall function. */ function uninstall() { $GLOBALS['SITE_DB']->drop_if_exists('w_attempts'); $GLOBALS['SITE_DB']->drop_if_exists('w_inventory'); $GLOBALS['SITE_DB']->drop_if_exists('w_itemdef'); $GLOBALS['SITE_DB']->drop_if_exists('w_items'); $GLOBALS['SITE_DB']->drop_if_exists('w_members'); $GLOBALS['SITE_DB']->drop_if_exists('w_messages'); $GLOBALS['SITE_DB']->drop_if_exists('w_portals'); $GLOBALS['SITE_DB']->drop_if_exists('w_realms'); $GLOBALS['SITE_DB']->drop_if_exists('w_rooms'); $GLOBALS['SITE_DB']->drop_if_exists('w_travelhistory'); deldir_contents(get_custom_file_base() . '/uploads/ocworld', true); require_code('ocworld'); if (addon_installed('pointstore')) { $prices = get_ocworld_prices_default(); foreach (array_keys($prices) as $name) { $GLOBALS['SITE_DB']->query_delete('prices', array('name' => $name), '', 1); } } delete_specific_permission('administer_ocworld'); }
/** * Fifth installation step: uninstallation of old install. * * @return tempcode Progress report / UI */ function step_5_uninstall() { $log = new ocp_tempcode(); require_code('database_action'); require_code('config'); if (post_param('forum_type') != 'none') { $tmp = new database_driver(get_db_forums(), get_db_forums_host(), get_db_forums_user(), get_db_forums_password(), ''); unset($tmp); } $log->attach(do_template('INSTALLER_DONE_SOMETHING', array('_GUID' => 'dae0677246aa2f1394b90c3739490ff7', 'SOMETHING' => do_lang_tempcode('DATABASE_VALID', 'ocPortal')))); // UNINSTALL STUFF // Delete directories require_code('files2'); deldir_contents('uploads/attachments', true); deldir_contents('uploads/attachments_thumbs', true); return $log; }
/** * Standard modular directory removal function for OcCLE FS hooks. * * @param array The current meta-directory path * @param string The root node of the current meta-directory * @param string The directory name * @param array A reference to the OcCLE filesystem object * @return boolean Success? */ function remove_directory($meta_dir, $meta_root_node, $dir_name, &$occle_fs) { $dir_name = filter_naughty($dir_name); $path = get_custom_file_base() . '/data/modules/admin_occle'; foreach ($meta_dir as $meta_dir_section) { $path .= '/' . filter_naughty($meta_dir_section); } if (is_dir($path) && file_exists($path . '/' . $dir_name)) { require_code('files2'); deldir_contents($path . '/' . $dir_name); $ret = @rmdir($path . '/' . $dir_name) or warn_exit(do_lang_tempcode('WRITE_ERROR', escape_html($path . '/' . $dir_name))); sync_file($path . '/' . $dir_name); return true; } else { return false; } //Directory doesn't exist }
/** * Uninstall OCF (1). */ function uninstall_ocf_everytime() { delete_specific_permission('enquire_on_new_ips'); // Used to exist delete_specific_permission('allow_deletive_moderation'); // Used to exist global $OCF_TRUE_PERMISSIONS, $OCF_FALSE_PERMISSIONS; foreach ($OCF_TRUE_PERMISSIONS as $permission) { delete_specific_permission($permission); } foreach ($OCF_FALSE_PERMISSIONS as $permission) { delete_specific_permission($permission); } $GLOBALS['FORUM_DB']->query_delete('group_category_access', array('module_the_name' => 'forums')); delete_config_option('signup_fullname'); delete_config_option('allow_email_from_staff_disable'); delete_config_option('forum_posts_per_page'); delete_config_option('forum_topics_per_page'); delete_config_option('prevent_shouting'); delete_config_option('restricted_usernames'); delete_config_option('require_new_member_validation'); delete_config_option('reported_posts_forum'); delete_config_option('one_per_email_address'); delete_config_option('hot_topic_definition'); delete_config_option('httpauth_is_enabled'); delete_config_option('send_staff_message_post_validation'); delete_config_option('post_history_days'); delete_config_option('is_on_invites'); delete_config_option('invites_per_day'); delete_config_option('is_on_coppa'); delete_config_option('privacy_fax'); delete_config_option('privacy_postal_address'); delete_config_option('minimum_password_length'); delete_config_option('maximum_password_length'); delete_config_option('minimum_username_length'); delete_config_option('maximum_username_length'); delete_config_option('prohibit_password_whitespace'); delete_config_option('prohibit_password_dictionary'); delete_config_option('prohibit_username_whitespace'); delete_config_option('random_avatars'); delete_config_option('club_forum_parent_forum'); delete_config_option('club_forum_parent_category'); delete_config_option('delete_trashed_pts'); delete_config_option('allow_member_integration'); delete_config_option('probation_usergroup'); delete_config_option('threaded_comments'); //delete_config_option('threaded_topics_default'); delete_config_option('show_first_join_page'); delete_config_option('skip_email_confirm_join'); delete_config_option('no_dob_ask'); delete_config_option('allow_international'); delete_config_option('is_on_post_titles'); delete_config_option('is_on_anonymous_posts'); delete_config_option('is_on_timezone_detection'); delete_config_option('is_on_topic_descriptions'); delete_config_option('is_on_topic_emoticons'); delete_config_option('default_preview_guests'); delete_config_option('forced_preview_option'); delete_config_option('overt_whisper_suggestion'); delete_config_option('is_on_invisibility'); delete_config_option('allow_alpha_search'); delete_config_option('allow_email_disable'); delete_config_option('max_member_title_length'); delete_config_option('encryption_key'); delete_config_option('decryption_key'); delete_config_option('intro_forum_id'); delete_value('ocf_newest_member_id'); delete_value('ocf_newest_member_username'); delete_value('ocf_member_count'); delete_value('ocf_topic_count'); delete_value('ocf_post_count'); deldir_contents(get_custom_file_base() . '/uploads/ocf_avatars', true); deldir_contents(get_custom_file_base() . '/uploads/ocf_photos', true); deldir_contents(get_custom_file_base() . '/uploads/ocf_photos_thumbs', true); deldir_contents(get_custom_file_base() . '/uploads/avatars', true); deldir_contents(get_custom_file_base() . '/uploads/photos', true); deldir_contents(get_custom_file_base() . '/uploads/photos_thumbs', true); delete_attachments('ocf_post'); delete_attachments('ocf_signature'); }