Function Reference: geodir_diagnose_reload_db_countries

Summary

Truncate the countries table and clear version numbers so it will be installed on refresh.

Description

.

Global Values

$wpdb
(object) (required) WordPress Database object.

Default: None
$plugin_prefix
(string) (required) Geodirectory plugin table prefix.

Default: None

Package

GeoDirectory

Change Log

Since: 1.6.16

Source File

geodir_diagnose_reload_db_countries() is located in geodirectory-admin/admin_hooks_actions.php [Line: 2519]

Source Code

function geodir_diagnose_reload_db_countries()
{
    global $wpdb, $plugin_prefix;

    $is_error_during_diagnose = false;
    $output_str = '';

    $delete = $wpdb->query("TRUNCATE TABLE ".GEODIR_COUNTRIES_TABLE);


    if ($delete) {
            $output_str .= "
  • " . __('Table dropped, refresh page to reinstall.', 'geodirectory') . "
  • "; ob_start(); geodir_diagnose_version_clear(); ob_end_clean(); }else{ $output_str .= "
  • " . __('Something went wrong.', 'geodirectory') . "
  • "; } if ($is_error_during_diagnose) { $info_div_class = "geodir_problem_info"; $fix_button_txt = ""; } else { $info_div_class = "geodir_noproblem_info"; $fix_button_txt = ''; } echo "
      "; echo $output_str; echo $fix_button_txt; echo "
    "; }