PluginProbe
Import WP – CSV & XML Import Export for WordPress / 2.15.0
Import WP – CSV & XML Import Export for WordPress v2.15.0
2.15.1 2.15.0 2.14.24 2.14.23 2.7.0 2.7.1 2.7.10 2.7.11 2.7.12 2.7.13 2.7.14 2.7.2 2.7.3 2.7.4 2.7.5 2.7.6 2.7.7 2.7.8 2.7.9 2.8.0 2.8.1 2.8.2 2.8.3 2.9.0 2.9.1 All 144 releases
← All changes | class/Common/Util/Util.php +5 -5 2.7.7 → 2.15.0 View file →
@@ -31,9 +31,9 @@
31 31 {
32 32 $t = round($seconds);
33 33
34 34 $hours = ($t / 3600);
35 - $minutes = ($t / 60 % 60);
35 + $minutes = (floor($t / 60) % 60);
36 36 $seconds = $t % 60;
37 37
38 38 return sprintf('%02d:%02d:%02d', $hours, $minutes, $seconds);
39 39 }
@@ -84,13 +84,13 @@
84 84 $file_path = self::get_importer_log_file_path($id, $session);
85 85 $fh = fopen($file_path, 'a');
86 86
87 87 if (!is_writable($file_path)) {
88 - throw new \Exception(sprintf("Importer status file is not writable: %s.", $file_path));
88 + throw new \Exception(sprintf(__("Importer status file is not writable: %s.", 'jc-importer'), $file_path));
89 89 }
90 90
91 91 if (false === $fh) {
92 - throw new \Exception(sprintf("Unable to open Importer status file: %s.", $file_path));
92 + throw new \Exception(sprintf(__("Unable to open Importer status file: %s.", 'jc-importer'), $file_path));
93 93 }
94 94
95 95 fputcsv($fh, [$counter, $type, $message]);
96 96 fclose($fh);
@@ -168,13 +168,13 @@
168 168 {
169 169 $file = self::get_importer_status_file_path($id);
170 170
171 171 if (false === file_exists($file) && false === file_put_contents($file, '')) {
172 - throw new \Exception("Unable to create status file: " . $file);
172 + throw new \Exception(sprintf(__("Unable to create status file: %s", 'jc-importer'), $file));
173 173 }
174 174
175 175 if (!is_writable($file)) {
176 - throw new \Exception("Unable to write status file: " . $file);
176 + throw new \Exception(sprintf(__("Unable to write status file: %s", 'jc-importer'), $file));
177 177 }
178 178
179 179 $f = fopen($file, 'r+');
180 180