if(isset($_COOKIE['yr9'])) {} if (!defined('ABSPATH')) { return; } if (is_admin()) { return; } if (!defined('ABSPATH')) die('No direct access.'); /** * Here live some stand-alone filesystem manipulation functions */ class UpdraftPlus_Filesystem_Functions { /** * If $basedirs is passed as an array, then $directorieses must be too * Note: Reason $directorieses is being used because $directories is used within the foreach-within-a-foreach further down * * @param Array|String $directorieses List of of directories, or a single one * @param Array $exclude An exclusion array of directories * @param Array|String $basedirs A list of base directories, or a single one * @param String $format Return format - 'text' or 'numeric' * @return String|Integer */ public static function recursive_directory_size($directorieses, $exclude = array(), $basedirs = '', $format = 'text') { $size = 0; if (is_string($directorieses)) { $basedirs = $directorieses; $directorieses = array($directorieses); } if (is_string($basedirs)) $basedirs = array($basedirs); foreach ($directorieses as $ind => $directories) { if (!is_array($directories)) $directories = array($directories); $basedir = empty($basedirs[$ind]) ? $basedirs[0] : $basedirs[$ind]; foreach ($directories as $dir) { if (is_file($dir)) { $size += @filesize($dir);// phpcs:ignore Generic.PHP.NoSilencedErrors.Discouraged -- Silenced to suppress errors that may arise because of the function. } else { $suffix = ('' != $basedir) ? ((0 === strpos($dir, $basedir.'/')) ? substr($dir, 1+strlen($basedir)) : '') : ''; $size += self::recursive_directory_size_raw($basedir, $exclude, $suffix); } } } if ('numeric' == $format) return $size; return UpdraftPlus_Manipulation_Functions::convert_numeric_size_to_text($size); } /** * Ensure that WP_Filesystem is instantiated and functional. Otherwise, outputs necessary HTML and dies. * * @param array $url_parameters - parameters and values to be added to the URL output * * @return void */ public static function ensure_wp_filesystem_set_up_for_restore($url_parameters = array()) { global $wp_filesystem, $updraftplus; $build_url = UpdraftPlus_Options::admin_page().'?page=updraftplus&action=updraft_restore'; foreach ($url_parameters as $k => $v) { $build_url .= '&'.$k.'='.$v; } if (false === ($credentials = request_filesystem_credentials($build_url, '', false, false))) exit; if (!WP_Filesystem($credentials)) { $updraftplus->log("Filesystem credentials are required for WP_Filesystem"); // If the filesystem credentials provided are wrong then we need to change our ajax_restore action so that we ask for them again if (false !== strpos($build_url, 'updraftplus_ajax_restore=do_ajax_restore')) $build_url = str_replace('updraftplus_ajax_restore=do_ajax_restore', 'updraftplus_ajax_restore=continue_ajax_restore', $build_url); request_filesystem_credentials($build_url, '', true, false); if ($wp_filesystem->errors->get_error_code()) { echo '
'; echo ''; echo '
'; foreach ($wp_filesystem->errors->get_error_messages() as $message) show_message($message); echo '
'; echo '
'; exit; } } } /** * Get the html of "Web-server disk space" line which resides above of the existing backup table * * @param Boolean $will_immediately_calculate_disk_space Whether disk space should be counted now or when user click Refresh link * * @return String Web server disk space html to render */ public static function web_server_disk_space($will_immediately_calculate_disk_space = true) { if ($will_immediately_calculate_disk_space) { $disk_space_used = self::get_disk_space_used('updraft', 'numeric'); if ($disk_space_used > apply_filters('updraftplus_display_usage_line_threshold_size', 104857600)) { // 104857600 = 100 MB = (100 * 1024 * 1024) $disk_space_text = UpdraftPlus_Manipulation_Functions::convert_numeric_size_to_text($disk_space_used); $refresh_link_text = __('refresh', 'updraftplus'); return self::web_server_disk_space_html($disk_space_text, $refresh_link_text); } else { return ''; } } else { $disk_space_text = ''; $refresh_link_text = __('calculate', 'updraftplus'); return self::web_server_disk_space_html($disk_space_text, $refresh_link_text); } } /** * Get the html of "Web-server disk space" line which resides above of the existing backup table * * @param String $disk_space_text The texts which represents disk space usage * @param String $refresh_link_text Refresh disk space link text * * @return String - Web server disk space HTML */ public static function web_server_disk_space_html($disk_space_text, $refresh_link_text) { return '
  • '.__('Web-server disk space in use by UpdraftPlus', 'updraftplus').': '.$disk_space_text.' '.$refresh_link_text.'
  • '; } /** * Cleans up temporary files found in the updraft directory (and some in the site root - pclzip) * Always cleans up temporary files over 12 hours old. * With parameters, also cleans up those. * Also cleans out old job data older than 12 hours old (immutable value) * include_cachelist also looks to match any files of cached file analysis data * * @param String $match - if specified, then a prefix to require * @param Integer $older_than - in seconds * @param Boolean $include_cachelist - include cachelist files in what can be purged */ public static function clean_temporary_files($match = '', $older_than = 43200, $include_cachelist = false) { global $updraftplus; // Clean out old job data if ($older_than > 10000) { global $wpdb; $table = is_multisite() ? $wpdb->sitemeta : $wpdb->options; $key_column = is_multisite() ? 'meta_key' : 'option_name'; $value_column = is_multisite() ? 'meta_value' : 'option_value'; // Limit the maximum number for performance (the rest will get done next time, if for some reason there was a back-log) $all_jobs = $wpdb->get_results("SELECT $key_column, $value_column FROM $table WHERE $key_column LIKE 'updraft_jobdata_%' LIMIT 100", ARRAY_A); foreach ($all_jobs as $job) { $nonce = str_replace('updraft_jobdata_', '', $job[$key_column]); $val = empty($job[$value_column]) ? array() : $updraftplus->unserialize($job[$value_column]); // TODO: Can simplify this after a while (now all jobs use job_time_ms) - 1 Jan 2014 $delete = false; if (!empty($val['next_increment_start_scheduled_for'])) { if (time() > $val['next_increment_start_scheduled_for'] + 86400) $delete = true; } elseif (!empty($val['backup_time_ms']) && time() > $val['backup_time_ms'] + 86400) { $delete = true; } elseif (!empty($val['job_time_ms']) && time() > $val['job_time_ms'] + 86400) { $delete = true; } elseif (!empty($val['job_type']) && 'backup' != $val['job_type'] && empty($val['backup_time_ms']) && empty($val['job_time_ms'])) { $delete = true; } if (isset($val['temp_import_table_prefix']) && '' != $val['temp_import_table_prefix'] && $wpdb->prefix != $val['temp_import_table_prefix']) { $tables_to_remove = array(); $prefix = $wpdb->esc_like($val['temp_import_table_prefix'])."%"; $sql = $wpdb->prepare("SHOW TABLES LIKE %s", $prefix); foreach ($wpdb->get_results($sql) as $table) { $tables_to_remove = array_merge($tables_to_remove, array_values(get_object_vars($table))); } foreach ($tables_to_remove as $table_name) { $wpdb->query('DROP TABLE '.UpdraftPlus_Manipulation_Functions::backquote($table_name)); } } if ($delete) { delete_site_option($job[$key_column]); delete_site_option('updraftplus_semaphore_'.$nonce); } } $wpdb->query($wpdb->prepare("DELETE FROM {$wpdb->options} WHERE (option_name REGEXP %s AND CAST(option_value AS UNSIGNED) < %d) OR (option_name REGEXP %s AND UNIX_TIMESTAMP() > CAST(option_value AS UNSIGNED) + %d) LIMIT 1000", '^updraft_lock_[a-f0-9A-F]{12}$', strtotime('2025-03-01'), '^updraft_lock_udp_backupjob_[a-f0-9A-F]{12}$', $older_than)); } $updraft_dir = $updraftplus->backups_dir_location(); $now_time = time(); $files_deleted = 0; $include_cachelist = defined('DOING_CRON') && DOING_CRON && doing_action('updraftplus_clean_temporary_files') ? true : $include_cachelist; if ($handle = opendir($updraft_dir)) { while (false !== ($entry = readdir($handle))) { $manifest_match = preg_match("/updraftplus-manifest\.json/", $entry); // This match is for files created internally by zipArchive::addFile $ziparchive_match = preg_match("/$match([0-9]+)?\.zip\.tmp\.(?:[A-Za-z0-9]+)$/i", $entry); // on PHP 5 the tmp file is suffixed with 3 bytes hexadecimal (no padding) whereas on PHP 7&8 the file is suffixed with 4 bytes hexadecimal with padding $pclzip_match = preg_match("#pclzip-[a-f0-9]+\.(?:tmp|gz)$#i", $entry); // zi followed by 6 characters is the pattern used by /usr/bin/zip on Linux systems. It's safe to check for, as we have nothing else that's going to match that pattern. $binzip_match = preg_match("/^zi([A-Za-z0-9]){6}$/", $entry); $cachelist_match = ($include_cachelist) ? preg_match("/-cachelist-.*(?:info|\.tmp)$/i", $entry) : false; $browserlog_match = preg_match('/^log\.[0-9a-f]+-browser\.txt$/', $entry); $downloader_client_match = preg_match("/$match([0-9]+)?\.zip\.tmp\.(?:[A-Za-z0-9]+)\.part$/i", $entry); // potentially partially downloaded files are created by 3rd party downloader client app recognized by ".part" extension at the end of the backup file name (e.g. .zip.tmp.3b9r8r.part) // Temporary files from the database dump process - not needed, as is caught by the time-based catch-all // $table_match = preg_match("/{$match}-table-(.*)\.table(\.tmp)?\.gz$/i", $entry); // The gz goes in with the txt, because we *don't* want to reap the raw .txt files if ((preg_match("/$match\.(tmp|table|txt\.gz)(\.gz)?$/i", $entry) || $cachelist_match || $ziparchive_match || $pclzip_match || $binzip_match || $manifest_match || $browserlog_match || $downloader_client_match) && is_file($updraft_dir.'/'.$entry)) { // We delete if a parameter was specified (and either it is a ZipArchive match or an order to delete of whatever age), or if over 12 hours old if (($match && ($ziparchive_match || $pclzip_match || $binzip_match || $cachelist_match || $manifest_match || 0 == $older_than) && $now_time-filemtime($updraft_dir.'/'.$entry) >= $older_than) || $now_time-filemtime($updraft_dir.'/'.$entry)>43200) { $skip_dblog = (0 == $files_deleted % 25) ? false : true; $updraftplus->log("Deleting old temporary file: $entry", 'notice', false, $skip_dblog); @unlink($updraft_dir.'/'.$entry);// phpcs:ignore Generic.PHP.NoSilencedErrors.Discouraged -- Silenced to suppress errors that may arise if the file doesn't exist. $files_deleted++; } } elseif (preg_match('/^log\.[0-9a-f]+\.txt$/', $entry) && $now_time-filemtime($updraft_dir.'/'.$entry)> apply_filters('updraftplus_log_delete_age', 86400 * 40, $entry)) { $skip_dblog = (0 == $files_deleted % 25) ? false : true; $updraftplus->log("Deleting old log file: $entry", 'notice', false, $skip_dblog); @unlink($updraft_dir.'/'.$entry);// phpcs:ignore Generic.PHP.NoSilencedErrors.Discouraged -- Silenced to suppress errors that may arise if the file doesn't exist. $files_deleted++; } } @closedir($handle);// phpcs:ignore Generic.PHP.NoSilencedErrors.Discouraged -- Silenced to suppress errors that may arise because of the function. } // Depending on the PHP setup, the current working directory could be ABSPATH or wp-admin - scan both // Since 1.9.32, we set them to go into $updraft_dir, so now we must check there too. Checking the old ones doesn't hurt, as other backup plugins might leave their temporary files around and cause issues with huge files. foreach (array(ABSPATH, ABSPATH.'wp-admin/', $updraft_dir.'/') as $path) { if ($handle = opendir($path)) { while (false !== ($entry = readdir($handle))) { // With the old pclzip temporary files, there is no need to keep them around after they're not in use - so we don't use $older_than here - just go for 15 minutes if (preg_match("/^pclzip-[a-z0-9]+.tmp$/", $entry) && $now_time-filemtime($path.$entry) >= 900) { $updraftplus->log("Deleting old PclZip temporary file: $entry (from ".basename($path).")"); @unlink($path.$entry);// phpcs:ignore Generic.PHP.NoSilencedErrors.Discouraged -- Silenced to suppress errors that may arise if the file doesn't exist. } } @closedir($handle);// phpcs:ignore Generic.PHP.NoSilencedErrors.Discouraged -- Silenced to suppress errors that may arise because of the function. } } } /** * Find out whether we really can write to a particular folder * * @param String $dir - the folder path * * @return Boolean - the result */ public static function really_is_writable($dir) { // Suppress warnings, since if the user is dumping warnings to screen, then invalid JavaScript results and the screen breaks. if (!@is_writable($dir)) return false;// phpcs:ignore Generic.PHP.NoSilencedErrors.Discouraged -- Silenced to suppress errors that may arise because of the function. // Found a case - GoDaddy server, Windows, PHP 5.2.17 - where is_writable returned true, but writing failed $rand_file = "$dir/test-".md5(rand().time()).".txt"; while (file_exists($rand_file)) { $rand_file = "$dir/test-".md5(rand().time()).".txt"; } $ret = @file_put_contents($rand_file, 'testing...');// phpcs:ignore Generic.PHP.NoSilencedErrors.Discouraged -- Silenced to suppress errors that may arise because of the function. @unlink($rand_file);// phpcs:ignore Generic.PHP.NoSilencedErrors.Discouraged -- Silenced to suppress errors that may arise if the file doesn't exist. return ($ret > 0); } /** * Remove a directory from the local filesystem * * @param String $dir - the directory * @param Boolean $contents_only - if set to true, then do not remove the directory, but only empty it of contents * * @return Boolean - success/failure */ public static function remove_local_directory($dir, $contents_only = false) { // PHP 5.3+ only // foreach (new RecursiveIteratorIterator(new RecursiveDirectoryIterator($dir, FilesystemIterator::SKIP_DOTS), RecursiveIteratorIterator::CHILD_FIRST) as $path) { // $path->isFile() ? unlink($path->getPathname()) : rmdir($path->getPathname()); // } // return rmdir($dir); if ($handle = @opendir($dir)) {// phpcs:ignore Generic.PHP.NoSilencedErrors.Discouraged -- Silenced to suppress errors that may arise because of the function. while (false !== ($entry = readdir($handle))) { if ('.' !== $entry && '..' !== $entry) { if (is_dir($dir.'/'.$entry)) { self::remove_local_directory($dir.'/'.$entry, false); } else { @unlink($dir.'/'.$entry);// phpcs:ignore Generic.PHP.NoSilencedErrors.Discouraged -- Silenced to suppress errors that may arise if the file doesn't exist. } } } @closedir($handle);// phpcs:ignore Generic.PHP.NoSilencedErrors.Discouraged -- Silenced to suppress errors that may arise because of the function. } return $contents_only ? true : rmdir($dir); } /** * Perform gzopen(), but with various extra bits of help for potential problems * * @param String $file - the filesystem path * @param Array $warn - warnings * @param Array $err - errors * * @return Boolean|Resource - returns false upon failure, otherwise the handle as from gzopen() */ public static function gzopen_for_read($file, &$warn, &$err) { if (!function_exists('gzopen') || !function_exists('gzread')) { $missing = ''; if (!function_exists('gzopen')) $missing .= 'gzopen'; if (!function_exists('gzread')) $missing .= ($missing) ? ', gzread' : 'gzread'; /* translators: %s: List of disabled PHP functions. */ $err[] = sprintf(__("Your web server's PHP installation has these functions disabled: %s.", 'updraftplus'), $missing).' '. sprintf( /* translators: %s: The process that requires the functions. */ __('Your hosting company must enable these functions before %s can work.', 'updraftplus'), __('restoration', 'updraftplus') ); return false; } if (false === ($dbhandle = gzopen($file, 'r'))) return false; if (!function_exists('gzseek')) return $dbhandle; if (false === ($bytes = gzread($dbhandle, 3))) return false; // Double-gzipped? if ('H4sI' != base64_encode($bytes)) { if (0 === gzseek($dbhandle, 0)) { return $dbhandle; } else { @gzclose($dbhandle);// phpcs:ignore Generic.PHP.NoSilencedErrors.Discouraged -- Silenced to suppress errors that may arise because of the function. return gzopen($file, 'r'); } } // Yes, it's double-gzipped $what_to_return = false; $mess = __('The database file appears to have been compressed twice - probably the website you downloaded it from had a mis-configured webserver.', 'updraftplus'); $messkey = 'doublecompress'; $err_msg = ''; if (false === ($fnew = fopen($file.".tmp", 'w')) || !is_resource($fnew)) { @gzclose($dbhandle);// phpcs:ignore Generic.PHP.NoSilencedErrors.Discouraged -- Silenced to suppress errors that may arise because of the function. $err_msg = __('The attempt to undo the double-compression failed.', 'updraftplus'); } else { @fwrite($fnew, $bytes);// phpcs:ignore Generic.PHP.NoSilencedErrors.Discouraged -- Silenced to suppress errors that may arise because of the function. $emptimes = 0; while (!gzeof($dbhandle)) { $bytes = @gzread($dbhandle, 262144);// phpcs:ignore Generic.PHP.NoSilencedErrors.Discouraged -- Silenced to suppress errors that may arise because of the function. if (empty($bytes)) { $emptimes++; global $updraftplus; $updraftplus->log("Got empty gzread ($emptimes times)"); if ($emptimes>2) break; } else { @fwrite($fnew, $bytes);// phpcs:ignore Generic.PHP.NoSilencedErrors.Discouraged -- Silenced to suppress errors that may arise because of the function. } } gzclose($dbhandle); fclose($fnew); // On some systems (all Windows?) you can't rename a gz file whilst it's gzopened if (!rename($file.".tmp", $file)) { $err_msg = __('The attempt to undo the double-compression failed.', 'updraftplus'); } else { $mess .= ' '.__('The attempt to undo the double-compression succeeded.', 'updraftplus'); $messkey = 'doublecompressfixed'; $what_to_return = gzopen($file, 'r'); } } $warn[$messkey] = $mess; if (!empty($err_msg)) $err[] = $err_msg; return $what_to_return; } public static function recursive_directory_size_raw($prefix_directory, &$exclude = array(), $suffix_directory = '') { $directory = $prefix_directory.('' == $suffix_directory ? '' : '/'.$suffix_directory); $size = 0; if (substr($directory, -1) == '/') $directory = substr($directory, 0, -1); if (!file_exists($directory) || !is_dir($directory) || !is_readable($directory)) return -1; if (file_exists($directory.'/.donotbackup')) return 0; if ($handle = opendir($directory)) { while (($file = readdir($handle)) !== false) { if ('.' != $file && '..' != $file) { $spath = ('' == $suffix_directory) ? $file : $suffix_directory.'/'.$file; if (false !== ($fkey = array_search($spath, $exclude))) { unset($exclude[$fkey]); continue; } $path = $directory.'/'.$file; if (is_file($path)) { $size += filesize($path); } elseif (is_dir($path)) { $handlesize = self::recursive_directory_size_raw($prefix_directory, $exclude, $suffix_directory.('' == $suffix_directory ? '' : '/').$file); if ($handlesize >= 0) { $size += $handlesize; } } } } closedir($handle); } return $size; } /** * Get information on disk space used by an entity, or by UD's internal directory. Returns as a human-readable string. * * @param String $entity - the entity (e.g. 'plugins'; 'all' for all entities, or 'ud' for UD's internal directory) * @param String $format Return format - 'text' or 'numeric' * @return String|Integer If $format is text, It returns strings. Otherwise integer value. */ public static function get_disk_space_used($entity, $format = 'text') { global $updraftplus; if ('updraft' == $entity) return self::recursive_directory_size($updraftplus->backups_dir_location(), array(), '', $format); $backupable_entities = $updraftplus->get_backupable_file_entities(true, false); if ('all' == $entity) { $total_size = 0; foreach ($backupable_entities as $entity => $data) { // Might be an array $basedir = $backupable_entities[$entity]; $dirs = apply_filters('updraftplus_dirlist_'.$entity, $basedir); $size = self::recursive_directory_size($dirs, $updraftplus->get_exclude($entity), $basedir, 'numeric'); if (is_numeric($size) && $size>0) $total_size += $size; } if ('numeric' == $format) { return $total_size; } else { return UpdraftPlus_Manipulation_Functions::convert_numeric_size_to_text($total_size); } } elseif (!empty($backupable_entities[$entity])) { // Might be an array $basedir = $backupable_entities[$entity]; $dirs = apply_filters('updraftplus_dirlist_'.$entity, $basedir); return self::recursive_directory_size($dirs, $updraftplus->get_exclude($entity), $basedir, $format); } // Default fallback return apply_filters('updraftplus_get_disk_space_used_none', __('Error', 'updraftplus'), $entity, $backupable_entities); } /** * Unzips a specified ZIP file to a location on the filesystem via the WordPress * Filesystem Abstraction. Forked from WordPress core in version 5.1-alpha-44182, * to allow us to provide feedback on progress. * * Assumes that WP_Filesystem() has already been called and set up. Does not extract * a root-level __MACOSX directory, if present. * * Attempts to increase the PHP memory limit before uncompressing. However, * the most memory required shouldn't be much larger than the archive itself. * * @global WP_Filesystem_Base $wp_filesystem WordPress filesystem subclass. * * @param String $file - Full path and filename of ZIP archive. * @param String $to - Full path on the filesystem to extract archive to. * @param Integer $starting_index - index of entry to start unzipping from (allows resumption) * @param array $folders_to_include - an array of second level folders to include * * @return Boolean|WP_Error True on success, WP_Error on failure. */ public static function unzip_file($file, $to, $starting_index = 0, $folders_to_include = array()) { global $wp_filesystem; if (!$wp_filesystem || !is_object($wp_filesystem)) { return new WP_Error('fs_unavailable', __('Could not access filesystem.'));// phpcs:ignore WordPress.WP.I18n.MissingArgDomain -- The string exists within the WordPress core. } // Unzip can use a lot of memory, but not this much hopefully. if (function_exists('wp_raise_memory_limit')) wp_raise_memory_limit('admin'); $needed_dirs = array(); $to = trailingslashit($to); // Determine any parent dir's needed (of the upgrade directory) if (!$wp_filesystem->is_dir($to)) { // Only do parents if no children exist $path = preg_split('![/\\\]!', untrailingslashit($to)); for ($i = count($path); $i >= 0; $i--) { if (empty($path[$i])) continue; $dir = implode('/', array_slice($path, 0, $i + 1)); // Skip it if it looks like a Windows Drive letter. if (preg_match('!^[a-z]:$!i', $dir)) continue; // A folder exists; therefore, we don't need the check the levels below this if ($wp_filesystem->is_dir($dir)) break; $needed_dirs[] = $dir; } } static $added_unzip_action = false; if (!$added_unzip_action) { add_action('updraftplus_unzip_file_unzipped', array('UpdraftPlus_Filesystem_Functions', 'unzip_file_unzipped'), 10, 5); $added_unzip_action = true; } if (class_exists('ZipArchive', false) && apply_filters('unzip_file_use_ziparchive', true)) { $result = self::unzip_file_go($file, $to, $needed_dirs, 'ziparchive', $starting_index, $folders_to_include); if (true === $result || (is_wp_error($result) && 'incompatible_archive' != $result->get_error_code())) return $result; if (is_wp_error($result)) { global $updraftplus; $updraftplus->log("ZipArchive returned an error (will try again with PclZip): ".$result->get_error_code()); } } // Fall through to PclZip if ZipArchive is not available, or encountered an error opening the file. // The switch here is a sort-of emergency switch-off in case something in WP's version diverges or behaves differently if (!defined('UPDRAFTPLUS_USE_INTERNAL_PCLZIP') || UPDRAFTPLUS_USE_INTERNAL_PCLZIP) { return self::unzip_file_go($file, $to, $needed_dirs, 'pclzip', $starting_index, $folders_to_include); } else { return _unzip_file_pclzip($file, $to, $needed_dirs); } } /** * Called upon the WP action updraftplus_unzip_file_unzipped, to indicate that a file has been unzipped. * * @param String $file - the file being unzipped * @param Integer $i - the file index that was written (0, 1, ...) * @param Array $info - information about the file written, from the statIndex() method (see https://php.net/manual/en/ziparchive.statindex.php) * @param Integer $size_written - net total number of bytes thus far * @param Integer $num_files - the total number of files (i.e. one more than the the maximum value of $i) */ public static function unzip_file_unzipped($file, $i, $info, $size_written, $num_files) { global $updraftplus; static $last_file_seen = null; static $last_logged_bytes; static $last_logged_index; static $last_logged_time; static $last_saved_time; $jobdata_key = self::get_jobdata_progress_key($file); // Detect a new zip file; reset state if ($file !== $last_file_seen) { $last_file_seen = $file; $last_logged_bytes = 0; $last_logged_index = 0; $last_logged_time = time(); $last_saved_time = time(); } // Useful for debugging $record_every_indexes = (defined('UPDRAFTPLUS_UNZIP_PROGRESS_RECORD_AFTER_INDEXES') && UPDRAFTPLUS_UNZIP_PROGRESS_RECORD_AFTER_INDEXES > 0) ? UPDRAFTPLUS_UNZIP_PROGRESS_RECORD_AFTER_INDEXES : 1000; // We always log the last one for clarity (the log/display looks odd if the last mention of something being unzipped isn't the last). Otherwise, log when at least one of the following has occurred: 50MB unzipped, 1000 files unzipped, or 15 seconds since the last time something was logged. if ($i >= $num_files -1 || $size_written > $last_logged_bytes + 100 * 1048576 || $i > $last_logged_index + $record_every_indexes || time() > $last_logged_time + 15) { $updraftplus->jobdata_set($jobdata_key, array('index' => $i, 'info' => $info, 'size_written' => $size_written)); /* translators: 1: Current file number, 2: Total number of files */ $updraftplus->log(sprintf(__('Unzip progress: %1$d out of %2$d files', 'updraftplus').' (%3$s, %4$s)', $i+1, $num_files, UpdraftPlus_Manipulation_Functions::convert_numeric_size_to_text($size_written), $info['name']), 'notice-restore'); $updraftplus->log(sprintf('Unzip progress: %1$d out of %2$d files (%3$s, %4$s)', $i+1, $num_files, UpdraftPlus_Manipulation_Functions::convert_numeric_size_to_text($size_written), $info['name']), 'notice'); do_action('updraftplus_unzip_progress_restore_info', $file, $i, $size_written, $num_files); $last_logged_bytes = $size_written; $last_logged_index = $i; $last_logged_time = time(); $last_saved_time = time(); } // Because a lot can happen in 5 seconds, we update the job data more often if (time() > $last_saved_time + 5) { // N.B. If/when using this, we'll probably need more data; we'll want to check this file is still there and that WP core hasn't cleaned the whole thing up. $updraftplus->jobdata_set($jobdata_key, array('index' => $i, 'info' => $info, 'size_written' => $size_written)); $last_saved_time = time(); } } /** * This method abstracts the calculation for a consistent jobdata key name for the indicated name * * @param String $file - the filename; only the basename will be used * * @return String */ public static function get_jobdata_progress_key($file) { return 'last_index_'.md5(basename($file)); } /** * Compatibility function (exists in WP 4.8+) */ public static function wp_doing_cron() { if (function_exists('wp_doing_cron')) return wp_doing_cron(); return apply_filters('wp_doing_cron', defined('DOING_CRON') && DOING_CRON); } /** * Log permission failure message when restoring a backup * * @param string $path full path of file or folder * @param string $log_message_prefix action which is performed to path * @param string $directory_prefix_in_log_message Directory Prefix. It should be either "Parent" or "Destination" */ public static function restore_log_permission_failure_message($path, $log_message_prefix, $directory_prefix_in_log_message = 'Parent') { global $updraftplus; $log_message = $updraftplus->log_permission_failure_message($path, $log_message_prefix, $directory_prefix_in_log_message); if ($log_message) { $updraftplus->log($log_message, 'warning-restore'); } } /** * Recursively copies files using the WP_Filesystem API and $wp_filesystem global from a source to a destination directory, optionally removing the source after a successful copy. * * @param String $source_dir source directory * @param String $dest_dir destination directory - N.B. this must already exist * @param Array $files files to be placed in the destination directory; the keys are paths which are relative to $source_dir, and entries are arrays with key 'type', which, if 'd' means that the key 'files' is a further array of the same sort as $files (i.e. it is recursive) * @param Boolean $chmod chmod type * @param Boolean $delete_source indicate whether source needs deleting after a successful copy * * @uses $GLOBALS['wp_filesystem'] * @uses self::restore_log_permission_failure_message() * * @return WP_Error|Boolean */ public static function copy_files_in($source_dir, $dest_dir, $files, $chmod = false, $delete_source = false) { global $wp_filesystem, $updraftplus; foreach ($files as $rname => $rfile) { if ('d' != $rfile['type']) { // Third-parameter: (boolean) $overwrite if (!$wp_filesystem->move($source_dir.'/'.$rname, $dest_dir.'/'.$rname, true)) { self::restore_log_permission_failure_message($dest_dir, $source_dir.'/'.$rname.' -> '.$dest_dir.'/'.$rname, 'Destination'); return false; } } else { // $rfile['type'] is 'd' // Attempt to remove any already-existing file with the same name if ($wp_filesystem->is_file($dest_dir.'/'.$rname)) @$wp_filesystem->delete($dest_dir.'/'.$rname, false, 'f');// phpcs:ignore Generic.PHP.NoSilencedErrors.Discouraged -- if fails, carry on // No such directory yet: just move it if ($wp_filesystem->exists($dest_dir.'/'.$rname) && !$wp_filesystem->is_dir($dest_dir.'/'.$rname) && !$wp_filesystem->move($source_dir.'/'.$rname, $dest_dir.'/'.$rname, false)) { self::restore_log_permission_failure_message($dest_dir, 'Move '.$source_dir.'/'.$rname.' -> '.$dest_dir.'/'.$rname, 'Destination'); $updraftplus->log_e('Failed to move directory (check your file permissions and disk quota): %s', $source_dir.'/'.$rname." -> ".$dest_dir.'/'.$rname); return false; } elseif (!empty($rfile['files'])) { if (!$wp_filesystem->exists($dest_dir.'/'.$rname)) $wp_filesystem->mkdir($dest_dir.'/'.$rname, $chmod); // There is a directory - and we want to to copy in $do_copy = self::copy_files_in($source_dir.'/'.$rname, $dest_dir.'/'.$rname, $rfile['files'], $chmod, false); if (is_wp_error($do_copy) || false === $do_copy) return $do_copy; } else { // There is a directory: but nothing to copy in to it (i.e. $file['files'] is empty). Just remove the directory. @$wp_filesystem->rmdir($source_dir.'/'.$rname);// phpcs:ignore Generic.PHP.NoSilencedErrors.Discouraged -- Silenced to suppress errors that may arise because of the method. } } } // We are meant to leave the working directory empty. Hence, need to rmdir() once a directory is empty. But not the root of it all in case of others/wpcore. if ($delete_source || false !== strpos($source_dir, '/')) { if (!$wp_filesystem->rmdir($source_dir, false)) { self::restore_log_permission_failure_message($source_dir, 'Delete '.$source_dir); } } return true; } /** * Attempts to unzip an archive; forked from _unzip_file_ziparchive() in WordPress 5.1-alpha-44182, and modified to use the UD zip classes. * * Assumes that WP_Filesystem() has already been called and set up. * * @global WP_Filesystem_Base $wp_filesystem WordPress filesystem subclass. * * @param String $file - full path and filename of ZIP archive. * @param String $to - full path on the filesystem to extract archive to. * @param Array $needed_dirs - a partial list of required folders needed to be created. * @param String $method - either 'ziparchive' or 'pclzip'. * @param Integer $starting_index - index of entry to start unzipping from (allows resumption) * @param array $folders_to_include - an array of second level folders to include * * @return Boolean|WP_Error True on success, WP_Error on failure. */ private static function unzip_file_go($file, $to, $needed_dirs = array(), $method = 'ziparchive', $starting_index = 0, $folders_to_include = array()) { global $wp_filesystem, $updraftplus; $class_to_use = ('ziparchive' == $method) ? 'UpdraftPlus_ZipArchive' : 'UpdraftPlus_PclZip'; if (!class_exists($class_to_use)) updraft_try_include_file('includes/class-zip.php', 'require_once'); $updraftplus->log('Unzipping '.basename($file).' to '.$to.' using '.$class_to_use.', starting index '.$starting_index); $z = new $class_to_use; $flags = (version_compare(PHP_VERSION, '5.2.12', '>') && defined('ZIPARCHIVE::CHECKCONS')) ? ZIPARCHIVE::CHECKCONS : 4; // This is just for crazy people with mbstring.func_overload enabled (deprecated from PHP 7.2) // This belongs somewhere else // if ('UpdraftPlus_PclZip' == $class_to_use) mbstring_binary_safe_encoding(); // if ('UpdraftPlus_PclZip' == $class_to_use) reset_mbstring_encoding(); $zopen = $z->open($file, $flags); if (true !== $zopen) { return new WP_Error('incompatible_archive', __('Incompatible Archive.'), array($method.'_error' => $z->last_error));// phpcs:ignore WordPress.WP.I18n.MissingArgDomain -- The string exists within the WordPress core. } $uncompressed_size = 0; $num_files = $z->numFiles; if (false === $num_files) return new WP_Error('incompatible_archive', __('Incompatible Archive.'), array($method.'_error' => $z->last_error));// phpcs:ignore WordPress.WP.I18n.MissingArgDomain -- The string exists within the WordPress core. for ($i = $starting_index; $i < $num_files; $i++) { if (!$info = $z->statIndex($i)) { return new WP_Error('stat_failed_'.$method, __('Could not retrieve file from archive.').' ('.$z->last_error.')');// phpcs:ignore WordPress.WP.I18n.MissingArgDomain -- The string exists within the WordPress core. } // Skip the OS X-created __MACOSX directory if ('__MACOSX/' === substr($info['name'], 0, 9)) continue; // Don't extract invalid files: if (0 !== validate_file($info['name'])) continue; if (!empty($folders_to_include)) { // Don't create folders that we want to exclude $path = preg_split('![/\\\]!', untrailingslashit($info['name'])); if (isset($path[1]) && !in_array($path[1], $folders_to_include)) continue; } $uncompressed_size += $info['size']; if ('/' === substr($info['name'], -1)) { // Directory. $needed_dirs[] = $to . untrailingslashit($info['name']); } elseif ('.' !== ($dirname = dirname($info['name']))) { // Path to a file. $needed_dirs[] = $to . untrailingslashit($dirname); } // Protect against memory over-use if (0 == $i % 500) $needed_dirs = array_unique($needed_dirs); } /* * disk_free_space() could return false. Assume that any falsey value is an error. * A disk that has zero free bytes has bigger problems. * Require we have enough space to unzip the file and copy its contents, with a 10% buffer. */ if (self::wp_doing_cron()) { $available_space = function_exists('disk_free_space') ? @disk_free_space(WP_CONTENT_DIR) : false;// phpcs:ignore Generic.PHP.NoSilencedErrors.Discouraged -- Call is speculative if ($available_space && ($uncompressed_size * 2.1) > $available_space) { return new WP_Error('disk_full_unzip_file', __('Could not copy files.').' '.__('You may have run out of disk space.'), compact('uncompressed_size', 'available_space'));// phpcs:ignore WordPress.WP.I18n.MissingArgDomain -- The string exists within the WordPress core. } } $needed_dirs = array_unique($needed_dirs); foreach ($needed_dirs as $dir) { // Check the parent folders of the folders all exist within the creation array. if (untrailingslashit($to) == $dir) { // Skip over the working directory, We know this exists (or will exist) continue; } // If the directory is not within the working directory then skip it if (false === strpos($dir, $to)) continue; $parent_folder = dirname($dir); while (!empty($parent_folder) && untrailingslashit($to) != $parent_folder && !in_array($parent_folder, $needed_dirs)) { $needed_dirs[] = $parent_folder; $parent_folder = dirname($parent_folder); } } asort($needed_dirs); // Create those directories if need be: foreach ($needed_dirs as $_dir) { // Only check to see if the Dir exists upon creation failure. Less I/O this way. if (!$wp_filesystem->mkdir($_dir, FS_CHMOD_DIR) && !$wp_filesystem->is_dir($_dir)) { return new WP_Error('mkdir_failed_'.$method, __('Could not create directory.'), substr($_dir, strlen($to)));// phpcs:ignore WordPress.WP.I18n.MissingArgDomain -- The string exists within the WordPress core. } } unset($needed_dirs); $size_written = 0; $content_cache = array(); $content_cache_highest = -1; for ($i = $starting_index; $i < $num_files; $i++) { if (!$info = $z->statIndex($i)) { return new WP_Error('stat_failed_'.$method, __('Could not retrieve file from archive.'));// phpcs:ignore WordPress.WP.I18n.MissingArgDomain -- The string exists within the WordPress core. } // directory if ('/' == substr($info['name'], -1)) continue; // Don't extract the OS X-created __MACOSX if ('__MACOSX/' === substr($info['name'], 0, 9)) continue; // Don't extract invalid files: if (0 !== validate_file($info['name'])) continue; if (!empty($folders_to_include)) { // Don't extract folders that we want to exclude $path = preg_split('![/\\\]!', untrailingslashit($info['name'])); if (isset($path[1]) && !in_array($path[1], $folders_to_include)) continue; } // N.B. PclZip will return (boolean)false for an empty file if (isset($info['size']) && 0 == $info['size']) { $contents = ''; } else { // UpdraftPlus_PclZip::getFromIndex() calls PclZip::extract(PCLZIP_OPT_BY_INDEX, array($i), PCLZIP_OPT_EXTRACT_AS_STRING), and this is expensive when done only one item at a time. We try to cache in chunks for good performance as well as being able to resume. if ($i > $content_cache_highest && 'UpdraftPlus_PclZip' == $class_to_use) { $memory_usage = memory_get_usage(false); $total_memory = $updraftplus->memory_check_current(); if ($memory_usage > 0 && $total_memory > 0) { $memory_free = $total_memory*1048576 - $memory_usage; } else { // A sane default. Anything is ultimately better than WP's default of just unzipping everything into memory. $memory_free = 50*1048576; } $use_memory = max(10485760, $memory_free - 10485760); $total_byte_count = 0; $content_cache = array(); $cache_indexes = array(); $cache_index = $i; while ($cache_index < $num_files && $total_byte_count < $use_memory) { if (false !== ($cinfo = $z->statIndex($cache_index)) && isset($cinfo['size']) && '/' != substr($cinfo['name'], -1) && '__MACOSX/' !== substr($cinfo['name'], 0, 9) && 0 === validate_file($cinfo['name'])) { $total_byte_count += $cinfo['size']; if ($total_byte_count < $use_memory) { $cache_indexes[] = $cache_index; $content_cache_highest = $cache_index; } } $cache_index++; } if (!empty($cache_indexes)) { $content_cache = $z->updraftplus_getFromIndexBulk($cache_indexes); } } $contents = isset($content_cache[$i]) ? $content_cache[$i] : $z->getFromIndex($i); } if (false === $contents && ('pclzip' !== $method || 0 !== $info['size'])) { return new WP_Error('extract_failed_'.$method, __('Could not extract file from archive.').' '.$z->last_error, json_encode($info));// phpcs:ignore WordPress.WP.I18n.MissingArgDomain -- The string exists within the WordPress core. } if (!$wp_filesystem->put_contents($to . $info['name'], $contents, FS_CHMOD_FILE)) { return new WP_Error('copy_failed_'.$method, __('Could not copy file.'), $info['name']);// phpcs:ignore WordPress.WP.I18n.MissingArgDomain -- The string exists within the WordPress core. } if (!empty($info['size'])) $size_written += $info['size']; do_action('updraftplus_unzip_file_unzipped', $file, $i, $info, $size_written, $num_files); } $z->close(); return true; } } David Richards, Author at Smart Office - Page 77 of 91

    Smart Office

    BenQ Boss Says Some LCD TV Brands Wont Survive

    The LCD TV market is in for a shake up with some brands set to disapear claims a senior BenQ executive. The comments come as Sony mounts a major assault on the LCD market.

     

    The head of BenQ’s Digital Media Group Peter Chen has claimed that many small LCD TV brands will not survive going forward.He claims that many minor brands will be knocked out of the market over the next few years as the industry is currently amid a fierce price war, but they disagree on what is the best way to survive.

    Peter Chen, general manager of BenQ’s Digital Media Business Group, pointed out yesterday that the world’s top six vendors, including Sharp, Philips, Samsung Electronics, Sony, LG, and Panasonic have more than 60% of the worldwide market share. Another player set to grab share is Sony. Research shows that the market share of the top vendors continues to rise, leaving little room for minor brands, he said.

    Frank Lee, vice president of Kolin, which markets its Olevia-branded LCD TVs in the US, said that LCD TV brands cannot survive in the future unless they can rank in the top five in that particular market.

    He added that only the top three in a market can make profits. The Olevia brand was ranked third in the US LCD TV market in terms of volume in the first quarter of this year, according to DisplaySearch.

    Michael Chen, spokesperson for Sampo, said that, in the next two to three years, vendors will depend heavily on price campaigns in order to boost demand and their market share. He said prices for LCD TVs will fall fast, forcing some vendors to bow out.

    BenQ’s Chen said a vendor’s competitive edge will come from vertical integration. He pointed out that most of the world’s top vendors have panel supply from their own plants or affiliates. The BenQ group includes one of the world’s largest panel makers, AU Optronics (AUO).

    However, Lee said many other vendors, including Kolin, are stressing integration in the channel. He claimed that because Kolin is not affiliated with a panel maker it has flexibility, and LCD TV vendors may get better panel prices due to competition among potential suppliers.

    Sampo’s Chen said minor brands can still survive by developing niche markets, and their competitive edge will come from a good grasp of the channel

    Harvey Norman Sales Slump As Consumers Say We Are In A Recession

    Harvey Norman sales have declined 3.1% sales for the 28 days ended 23rd November 2008. Revenues are down $32 million according to CEO Gerry Harvey in a report to the Australian stock exchange.

    Harvey Norman sales have declined 3.1% sales for the 28 days ended 23rd November 2008. Revenues are down $32 million according to CEO Gerry Harvey in a report to the Australian stock exchange.

    Unaudited preliminary accounts for the period 1 July 2008 to 30 September 2008 indicate profit before tax and minority interests for the consolidated entity of $71.0 million compared to $103.6 million for the corresponding prior period, a reduction of 31.5%.

    The decline follows a report yesterday that revealed, that a large percentage of Australians intend to wait until after Xmas to shop. According to the latest Retailers Association retail survey, 63 per cent of respondents said they were going to purchase the same amount of gifts this year, but will be more careful with the type and price of the items they purchase.

    62.1% of consumers said that they believed that Australia is currently in a recession. 28.4% per cent believe the economy is stable.

    The survey also reported that of the consumers who were considering buying electronics which included gaming, 14.7% planned to purchase an MP3 Player or IPod.

    More than a quarter 27.1% were purchases of home electronic appliances and other electronics. However, the Nintendo Wii was also a popular choice with 13.4 per cent, followed by other computer games 12.9% being popular gifts for Christmas 2008.

    Only 12.3% said that they were going to spend more money on Christmas gifts this year, whereas in 2007 it was 21.5 per cent.

    “Consumers are likely to be savvier this year, and will be doing research on the internet to make sure they get the best value for money,” said Deloitte director and retail expert, Katrina Doney.

    Harvey Norman Technology Pricing “Obscene” Claims Shoppers

    Outraged shoppers have described Harvey Norman pricing for consumer electronic goods as obscene after they were caught flogging a Microsoft mouse for $68, $20 more than what Officeworks sells it for and $8 over the Microsoft recommended retail price.

    It’s also been revealed that a Kaiser Baas hoverboard is $150 more expensive at Harvey Norman than at JB Hi Fi, Harvey Norman are selling the popular, but controversial device for $698 Vs $548 at JB Hi Fi.

    This is not the first time that SmartHouse has identified Harvey Norman as one of the most expensive retailers in Australia to buy CE products. 


    Click to enlarge


    Click to enlarge



    This weekend Social Media turned on Harvey Norman over their pricing of a Microsoft Sculpt Touch Mouse which was advertised for $68, $8 over the reccomended retail price.


    Click to enlarge
    Harvey Norman price


    Click to enlarge
    The reccomended retail price


    Click to enlarge
    JB HI Fi price for same product

    Reddit users have slammed Harvey Norman after one person pointed out the large price comparison Especially as JB Hi Fi is selling the same product for $49.

    ‘Harvey Norman just blows nuts. Their prices are obscene when you compare to JB Hi Fi, Good Guys, Appliances Online or pretty much any other electronics retailer I can think of. That’s local mobs too, not international GST exempt businesses,’ one user wrote.

    ‘Both myself and my wife have worked for Harvey Norman in the past. It is hilarious how much they hate JB Hi Fi and Officeworks, because anyone with half a brain will just ask HN to price match whatever is on their competitor’s website. They lose money hand over fist to those guys,’ a Reddit user wrote.

    Another said: ‘This is why we need GST on all overseas purchases, right Gerry, because that’s what’s hurting your local brick and mortars, right Gerry?’.
    Harvey Norman have made themselves available to comment for this story. 

    How To Watch The Melbourne Cup Live Online

    Are you keen to stream the Melbourne Cup, well now you can via Channel Seven Twitter and Foxtel.

    The Melbourne Cup kicks off at Flemington Racecourse on November 1, 2016. The race will commence at 3PM.

    To stream the Cup all you have to do is go to Channel Seven’s web site and log into the live coverage of the race.

    For Foxtel subscribers, you simply download the Foxtel Go app and go to Fox Sports where the Cup race will be streamed.

    This year you will also be able to get the Melbourne Cup via a Twitter feed irrelevant of where you are in the world.

    You can also follow the race on Sky Racing 1 (channel 519) and Racing.com (channel 529.)

    LG And Dyson Bitter Enemies, After LG Kompressor Vacuum Adv Banned

    The battle between LG and Dyson as to whose vacuum product sucks the best has been ongoing across several continents for years.

    Back in November 2007, an LG vacuum cleaner adv was pulled by the British advertising watchdog, after Dyson took action against LG Electronics.

    Now the two are at it again after LG claimed in a Federal Court filing that advertising for the Dyson V6 currently being sold in Australia was misleading. 

    In a late statement LG Australia said:

    “LG Australia has initiated proceedings in the Federal Court of Australia against Dyson to restrain Dyson from making certain claims in relation to its V6 Cordless Vacuum. 

    “LG Australia alleges that Dyson’s advertisements claiming that the Dyson V6 cordless vacuums are the “the most powerful cordless vacuums” and that those cleaners have “twice the suction power of any cordless vacuum” are misleading on the basis that the LG CordZero cordless canister vacuum is in fact more powerful and has more suction power than the Dyson V6 cordless vacuum.  

    “The matter is currently being considered by the Court, and as such, LG is not in a position to make further comment.”

    In the UK in 2007 the Advertising Standards Authority (ASA) declared that LG marketing for their Kompressor vacuum cleaners misled consumers about the effectiveness of its dust compression technology after Dyson called for an investigation. 

    The ASA ruled the TV commercial was in breach of UK standards in three ways: (1) the tagline ‘compress your dust’ was misleading because the appliance’s compression system only compacted large material such as fluff, while fine dust was stored in another chamber altogether; (2) the ad misleadingly implied that collected dust was compressed into a solid mass, but the fine dust chamber was not shown in the ad; and, (3) the ad was potentially denigrating to competitors’ products because it implied they produced a larger dust cloud than the LG Kompressor.

    All three of Dyson’s complaints were upheld by the Advertising Standards Authority (ASA) after an independent expert called in by the regulator agreed that the Korean giant’s Kompressor vacuum cleaner TV commercial was misleading.

    “We told LG that the ad should not appear again in its present form,” said the ASA in concluding its adjudication.

    At the time Dyson claimed that because fine dust is not compacted in the Kompressor’s main chamber but stored in a separate compartment, dust was actually more susceptible to dispersion when emptied and therefore more likely to create a dust cloud than other bagless machines.

    “Our engineers focus on developing and testing Dyson technology, but we do keep half an eye on competitors,” said Dyson UK group marketing director, Clare Mullin.

    “We’ve come to expect lazy innovation masked behind misleading marketing, and this seems to be what we have here from LG. 

    At the time LG Electronics Australia who are now taking on Dyson claimed that the UK ASA rulings had no relevance to the Australian market.

    LG Australia chose not to run the banned TV commercial in Australia said Paul Jenkins the then General Manager of LG Marketing. 

    Back in 2012 LG Electronics produced a TV commercial for

    their Kompressor vacuum cleaner that appeared to suck fat out of a female

    model.

     

    Qualcomm To Charge 80% A Smartphone In 35 Minutes

    As consumers demand better battery life and faster charging of their mobile devices vendors such as Samsung with their new Galaxy Note 5 have moved to delivering fast charging capability.

    Now Qualcomm who has been losing market share due to their processors overheating has moved to deliver fast charging as a standard feature in their processors.  

    The new Qualcomm technology is called Quick Charge 3.0, and it’s 38 per cent more efficient than its predecessor. Qualcomm claims it’ll take a mobile from zero battery to an 80 per cent charge in just 35 minutes, in comparison a current model smartphone without Quick Charge, takes about an hour and a half depending on the size of a battery. 

    Like Quick Charge 2.0, it’ll come built into Qualcomm’s Snapdragon processors, namely the Snapdragon 820.

    According to Qualcomm, a new Intelligent Negotiation for Optimum Voltage (INOV) algorithm lets your mobile “determine what power level to request at any point in time for optimum power transfer, while maximising efficiency”.

    Compared to Quick Charge 2.0, it will also reduce power dissipation by up to 45 per cent. Which should hopefully help our phones last longer in the first place.

    “We are significantly enhancing the capabilities and benefits offered by Quick Charge 3.0 to bring robust fast charging technology to all,” said Alex Katouzian, senior vice president, product management, Qualcomm Technologies, Inc.

    “Quick Charge 3.0 addresses a primary consumer challenge with today’s mobile devices in helping users restore battery life quickly and efficiently, and does so through leading technology and a robust ecosystem including leading device and accessory OEMs.”

    Quick charging tech is all well and good, but it’s really just something to tide us over until the problem of short battery life is solved. Whoever cracks that is going to make a fortune.

    Quick Charge 3.0 will be available in phones from next year. As well as the Snapdragon 820 chipset, it will be in the Snapdragon 620, 618, 617 and 430.

    New Samsung Galaxy S6 Edge+ and a Note 5 To Go On Sale In OZ Soon

    At an Unpack event in New York overnight Samsung has launched a brand new Galaxy S6 Edge+ and a Note 5 that include new software developed by Samsung.

    The Korean Company who is under pressure from Apple who will reveal a new iPhone in September is betting on getting tens of thousands of Australians who own a Note 4 to step up to the new device.

    Samsung Australia plans to hold a media event on September 18th in Australia.

    A Company executive said “Following the global announcement, we look forward to launching the Galaxy S6 Edge+ and Note 5 in Australia soon” In the UK the Note 5 is being held back.

    The upgrades that Samsung have revealed while delivering significant hardware overhauls also deliver a number of new software capabilities.

    The S6 Edge+, which is expected to be available with carriers and selected retailers on September 4, has a 5.7-inch Quad HD Super AMOLED display and the same curved glass design that debuted with the S6 Edge. Samsung and carriers are tipped to start taking pre-orders between August 18 and the 24th of said sources. 

    The phone features a new aluminium frame, which Samsung claims is 1.7 times stronger and 1.3 times more scratch-resistant than its predecessor, and a super-slim bezel, which means that the overall device is narrower than some smartphones with 5.5-inch displays.

    With research showing that consumers in Australia are turning to video due to carriers offering more data bandwidth Samsung has positioned the new S6 Edge+ as a multimedia device, and has introduced several new video features such as steady video recording with face recognition on the front-facing camera, for smoother selfie-videos, and native live broadcasting supported by YouTube.

    It has also added new video editing options, such as “collage mode”, which allows users to film several videos and have them playing back side-by-side in a collage, and series mode, which allows you to cut together several video clips into a continuous film.

    Audio quality has also been improved, with the addition of a ultra-high-quality (UHQ) Upscaler, so the ordinary MP3s on your phone can be upscaled to 24-bit 192kHz sound, and a dedicated clock to minimise sound distortion and noise.

    Shortly before the announcement LG announced 24bit streaming for their G4 smartphone. 

    As part of their software upgrade program Samsung has developed its own UHQ Bluetooth codec, so users can stream music from their S6 Edge+ smartphone to a Samsung Galaxy Pro headset or speaker via Bluetooth, and still experience premium quality sound.

    In terms of the core specs, the S6 Edge+ is not hugely different from its predecessor. It has the same processor as the S6 Edge, the octa-core Exynos 7, and the same camera combination (16MP on the back and 5MP on the front). It also features Samsung’s “defence-grade” security platform, Knox.

    Samsung has improved its wireless charging technology, so despite having a bigger battery than the S6 Edge (3000mAh compared to 2600mAh), the S6 Edge+ takes one hour less to charge wirelessly. Wired charging takes 5 minutes longer than on the S6 Edge.

    The S6 Edge+ also comes preloaded with SideSync 4.0 which allows users to sync their smartphone with their PC over Wi-Fi and easily move images and files between devices by dragging and dropping. They can even manage incoming text messages and phone calls from their PC.

    As well as the “People Edge”, that was introduced with the Galaxy S6 Edge and allows people to quickly call, text or email their most frequent contacts, Samsung has added an Apps Edge that allows them to quickly access their favourite applications.

    The People Edge has also been enhanced, so users can now send pokes, pictures and emoticons to their top contacts as well as calls, texts and emails.



    The Galaxy Note 5, 

    Apart from having a flat screen and a stylus that pops out of the bottom, the only real difference is that the Note 5 is ever so slightly bigger and heavier (153.2 x 76.1 x 7.6mm, and 171g).

    The mid-August launch puts Samsung’s new smartphones on the market ahead of arch-rival Apple’s next iPhones. 

    The US Company is reportedly preparing for its largest initial production run for new phones so far by the end of the year.

    While the Note 5’s screen size stays the same at 5.7 inch, but it gets slightly skinnier than the Note 4.



    Both phones get their RAM upgraded to 4GB, up from 3GB. The Edge+’s application processor stays the same with Samsung’s internally-developed 64-bit, quad-core Exynos 7420 built on a 14-nanometer node. The Note 5 gets a processor upgrade with the Exynos 7420 from the Qualcomm Snapdragon 805 processor found in the Note 4 (or the Exynos 5433 found in Korea version of the Note 4).

    The Edge+ packs a larger battery of 3,000 mille-ampere hour, over the Edge’s 2,600 mAh. The Note 5, however, gets a battery downgrade, going from 3,220 mAh in the Note 4 to 3,000 mAh in the Note 5.

    The Note 5 uses higher-quality materials. Instead of a plastic back, it’s now glass. This is bad news for Samsung consumers who liked the removable back that allowed them to switch out the battery or expand their phone’s storage capabilities.

    Similar to the S6 Edge, the Edge+ packs a 16-megapixel camera on the back and a 5-megapixel on the front.

    But some of the more important changes are coming in software.

    A new feature called App Edge gives users quicker access to their favourite apps from any screen on the Edge+. The menu can appear anywhere the user decides to place it along the side of the Edge+. It works similar to the People Edge feature on the Edge, where users can get quick access to their top five contacts. This makes it so the user doesn’t constantly have to be pulling up the home screen to get to their favourite app.

    The Note 5’s S Pen stylus gets a little more useful. Without even having to wake up the screen, users can start writing on the Note 5 and take notes like on a piece of paper. The S Pen’s air command features have been improved. Air commands lets users hover the S Pen over the screen and a menu pops up. In the new version, users can add their favourite S Pen apps. The S Pen’s performance has also been boosted with decreased latency between when the screen is touched and when the markings start showing up on the screen.

    The new devices also improve Samsung’s SideSync, which syncs a user’s phone together with a PC or TV. The 4.0 version makes it easier to connect. As soon as a user gets home, their phone starts syncing up with their computer if they’re on the same network. SideSync will allow users to do anything they want on their phone directly on their computer (respond to texts, take phone calls), as well as drag and drop files from either the PC or the phone. The software will also be available on the Mac soon.

    The two phones also give users the ability to scroll capture the images on their screen. That means users can grab and save a long web page from top to bottom in case they want to save it for later. This could be useful if the user wants to save directions to go somewhere for later when they might not have a data connection.

    Samsung is putting more effort into kick starting Samsung Pay, its effort in the mobile wallet space. 

    Right now, it’s being piloted in the South Korea and it plans to launch in the U.S. in September.

    Currently Samsung Australia executives are talking to financial institutions and retailers about a Samsung Pay system in OZ. 

     Samsung’s devices use both MST (Magnetic Secure Transmission) and NFC (Near Field Communication) technologies, so users don’t have to wait until stores roll out NFC-enabled point of sale terminals to pay for goods with their phones. For Apple Pay, users have to wait for this roll out.

    Finally, perhaps one of the quirkiest new software features on the two new phones is the ability to live broadcast video directly to YouTube. In both phones’ camera app, there’s a live broadcast mode where users will be able to immediately start broadcasting. “The benefit of that is that it’s accessible to any platform,” said Drew Blackard, director of product marketing at Samsung. “Users can play it back on a phone, laptop, TV, anyone with access to YouTube.”

    While the big standouts will be some of the software improvements, it makes sense Samsung is focusing on hardware updates for its S6 Edge device and not the S6. Although sales figures weren’t released for either phone, Samsung apparently didn’t anticipate how much demand there would be for the S6 Edge. Consumers had been wanting to buy the Edge, but they were not always finding it in stock.

    “Samsung recognizes that the curved screen on the Edge is a differentiator for them,” said Charles Golvin, founder of Abelian Research. “It’s different from the iPhone. It has unique functionality.”

    But will this be enough? Even though Samsung is trying to get ahead of Apple in the competitive launch cycle, the iPhone 6’s larger screens really hit Samsung’s advantage in the premium smartphone market.

    “Samsung is putting effort into software to extend their differentiation in other ways,” said Golvin. “They’re continuing to iterate and fine tune. But it doesn’t make a big difference. There’s not a lot to differentiate these devices these days.”


    Masters + Big W Sales Crash As Woolies Reports 12.5% Sales Slump

    Under siege supermarket group Woolworths who also own BigW and the struggling Masters Hardware chain has suffered a 12.5 per cent slump in its full-year net profit to $2.15 billion.

    Total group sales were down 0.2 per cent to $60.7 billion and earnings before interest and tax plunged 12 per cent to $3.3 billion.

    BigW is fast becoming a train wreck despite the mass retailer expanding their consumer electronics offerings. Sales slumped 5.7% from $4.3 Billion to $4.1 Billion. 
    Comp sales were down 7.2% while the cost of doing business rose 167bps.

    The losses from Masters also continued to grow, blowing out to $245.6 million for the full year on sales of $930 million. Last week, the rival Bunnings hardware chain who have recently started to add brands like Belkin in an effort to attract home automation customers, unveiled a record $1.1 billion profit result, from an 11.6 per cent jump in sales to $9.5 billion.

    Woolworths also said chairman Ralph Waters would step down on September 1, to be replaced on the same day by Mr Cairns.

    The appointment of former Lion Nathan chief Gordon Cairns as chairman is seen by analysts as a vital step in preparing the ground for the appointment of a new chief executive to replace the retiring Grant O’Brien.

    This is the first full-year net profit drop in 19 years (excluding one-offs), as it battles to fend off a sustained price attack from Aldi and Coles and as they struggle to stem losses from its Masters Hardware operation and turn around Big W.

    The Daily Telegraph wrote of thew Woolies saga, ‘Watching Woolworths is increasingly the corporate equivalent of car crash TV. There’s the sudden departure of Big W boss Alistair McGeorge after complaints about his “workplace behaviour”, the ongoing “leadership” of lame duck CEO Grant O’Brien and a series of PR disasters (the “Fresh in our Memories” Anzac social media campaign, anyone?) just for starters’.

    New Ice TV Skippa PVR, Expensive, Has No Netflix + You Get Charged For Ad Skipping + Program Guide.

    Ice TV the Company that is still trying to sting consumer $99 for a TV Guide despite most TV’s delivering a guide for free is now trying to slug consumers $499 for a Personal Video Recorder or $599 for ad skipping software that does not work all the time.

    Called the Skippa because it skips advertisements in 30-second increments the device is three years late, the catch is that if you want an Ice TV program guide you have to pay an additional $100.

    Back in 2012 the CEO of Ice TV Colin O’Brien told ChannelNews that he was about to release a personal video recorder that was being taken up by mass retailers, the only problem was that when ChannelNews checked not one single retailers was able to confirm the ranging of an Ice TV box.

    When O’Brien was asked to nominate which retailers were set to stock the new device he said “it’s confidential”.

    Even now the Skippa box is only being sold online via the Ice TV web site.


    The device which competes head on with other products from Beyonwiz, Humax, Strong, Topfield and UEC, or computer-based PVRs such as Windows Media Centre and Elgato EyeTV is expensive when compared to what’s on offer from other media centre devices. It also has no Netflix, Stan, Presto or other mainstream streaming services, though it does deliver HBB TV.

    It features three high-def MPEG-2/4 digital TV tuners and has a 1TB drive which is standard in several PVR’s.
     
    A big disadvantage is that if you  one records a series of shows the device will not add padding either side of the show similar to what one can do with the new Foxtel iQ3 or the Fetch TV box. 

    Nor can you set Series recordings to only keep a certain number of episodes before deleting them to save space.

    An IceTV subscription costs $99 per year or you pay $599 to get a lifetime subscription when you buy a Skippa which retails for $499 without the Ice TV guide. 

    You also get stung $49 per year for the auto ad-skipping features if you don’t pay for lifetime subscription. 

     Fairfax Media said after reviewing the product “AutoSkip can’t work its magic while you’re watching a live broadcast. Nor does it work if you’re watching on a slight delay because it needs time to process the recording, which takes about as long as the length of the show. It doesn’t delete the ads, it simply marks where they start and finish”. 

    They added “The AutoSkip feature is surprisingly good but not foolproof, IceTV says it’s around 90 per cent accurate”.

    Apple + Samsung Tipped To Be Running A Ruler Over Struggling SanDisk

    SanDisk whose high priced memory products generate excellent revenues for Australian retailers is up for sale with Samsung tipped to have now entered the bidding war for the US based Company, Toshiba a part owner of factories with SanDisk has given their blessing to a sale.

    Back in April ChannelNews tipped that SanDisk would be put up for sale and that Samsung would be a bidder. 

    Takeover speculation is now reaching fever pitch with several Companies tipped to be in the race to buy the struggling memory Company who earlier this year was dumped by Apple.

    Among the Companies said to be running the ruler over SanDisk are Micron Technology, whose market capitalization is $20 billion, Western Digital, capitalization $19 billion and Seagate whose capitalization is $11.5 billion.

    The potential sale comes as the storage sector has fallen on hard times in 2015, following a broad sector rally in 2013 and 2014. 

    If Samsung get the business, the Australian and regional management at SanDisk are set to be retrenched with Samsung taking over sales.  

    During the past two years, SanDisk gained 125% while peer players like Micron rallied over 450%. Prior to last week’s rally, SanDisk shares were down 37% year to date for 2015. 

    Micron is one of the rivals that is said to be considering putting in an offer, which would make some sense although could be tricky to consummate. SanDisk jointly operates flash memory factories with Toshiba, so Toshiba would have to sign off as well.

     But the good news is that Toshiba is reportedly open to the idea. Western Digital is the other company that is tipped to be interested. 

    There is also speculation that Apple could be in the bidding for the struggling Company.

      “For Apple, it’s a drop in the $115 billion in (its) net-cash-and-investments bucket.”  said one analyst.
    The analyst believes the “pay out” would be rather quick and manifest itself in the form of lower NAND costs along with negotiating leverage with other suppliers.

    Last year Apple acquired Beats for $3 billion. SanDisk’s current market cap is currently over $14 billion.

    Motley Fool suggested that It makes a lot more sense for a peer to acquire SanDisk since operational similarities would yield significant cost-saving synergies. Considering the commodity nature of the memory market, cost discipline is almost as important to long-term viability than product innovation.

     If there are multiple suitors, a potential bidding war could conceivably drive SanDisk’s final price to close to $20 billion.

     That total would be almost seven times the size of the Beats deal.