'.__('Error', 'updraftplus').': '.__("You do not have UpdraftPlus completely installed - please de-install and install it again. Most likely, WordPress malfunctioned when copying the plugin files.", 'updraftplus').' '.__('Go here for more information.', 'updraftplus').'
';
}
add_action('all_admin_notices', 'updraftplus_incomplete_install_warning');
} else {
include_once(UPDRAFTPLUS_DIR.'/class-updraftplus.php');
$updraftplus = new UpdraftPlus();
$GLOBALS['updraftplus'] = $updraftplus;
$updraftplus->have_addons = $updraftplus_have_addons;
if (!$updraftplus->memory_check(192)) {
// Experience appears to show that the memory limit is only likely to be hit (unless it is very low) by single files that are larger than available memory (when compressed)
// Add sanity checks - found someone who'd set WP_MAX_MEMORY_LIMIT to 256K !
if (!$updraftplus->memory_check($updraftplus->memory_check_current(WP_MAX_MEMORY_LIMIT))) {
$new = absint($updraftplus->memory_check_current(WP_MAX_MEMORY_LIMIT));
if ($new>32 && $new<100000) {
@ini_set('memory_limit', $new.'M');
}
}
}
}
// Ubuntu bug - https://bugs.launchpad.net/ubuntu/+source/php5/+bug/1315888
if (!function_exists('gzopen') && function_exists('gzopen64')) {
function gzopen($filename, $mode, $use_include_path = 0) {
return gzopen64($filename, $mode, $use_include_path);
}
}
/**
* For finding mysqldump. Added to include Windows locations
*/
function updraftplus_build_mysqldump_list() {
if ('win' == strtolower(substr(PHP_OS, 0, 3)) && function_exists('glob')) {
$drives = array('C', 'D', 'E');
if (!empty($_SERVER['DOCUMENT_ROOT'])) {
// Get the drive that this is running on
$current_drive = strtoupper(substr($_SERVER['DOCUMENT_ROOT'], 0, 1));
if (!in_array($current_drive, $drives)) array_unshift($drives, $current_drive);
}
$directories = array();
foreach ($drives as $drive_letter) {
$dir = glob("$drive_letter:\\{Program Files\\MySQL\\{,MySQL*,etc}{,\\bin,\\?},mysqldump}\\mysqldump*", GLOB_BRACE);
if (is_array($dir)) $directories = array_merge($directories, $dir);
}
$drive_string = implode(',', $directories);
return $drive_string;
} else {
return "/usr/bin/mysqldump,/bin/mysqldump,/usr/local/bin/mysqldump,/usr/sfw/bin/mysqldump,/usr/xdg4/bin/mysqldump,/opt/bin/mysqldump";
}
}
// Do this even if the missing files detection above fired, as the "missing files" detection above has a greater chance of showing the user useful info
if (!class_exists('UpdraftPlus_Options')) require_once(UPDRAFTPLUS_DIR.'/options.php');