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/Importer/File/AbstractFile.php +6 -6 2.7.1 → 2.15.0 View file →
@@ -33,9 +33,9 @@
33 33 $this->file_path = $file_path;
34 34 if (file_exists($this->file_path)) {
35 35 $this->file_handle = fopen($this->file_path, 'r');
36 36 } else {
37 - throw new FileException("File Not Found: " . $file_path);
37 + throw new FileException(sprintf(__("File Not Found: %s", 'jc-importer'), $file_path));
38 38 }
39 39 }
40 40
41 41 public function __destruct()
@@ -70,14 +70,14 @@
70 70 {
71 71 return $this->getRecord($this->current_record - 1);
72 72 }
73 73
74 - protected function saveFilePosition()
74 + public function saveFilePosition()
75 75 {
76 76 $this->current_file_position = ftell($this->file_handle);
77 77 }
78 78
79 - protected function loadFilePosition($record = 0)
79 + public function loadFilePosition($record = 0)
80 80 {
81 81
82 82 if ($this->current_file_position >= 0) {
83 83 fseek($this->file_handle, $this->current_file_position);
@@ -87,17 +87,17 @@
87 87 /**
88 88 * @return resource
89 89 * @throws FileException
90 90 */
91 - protected function getFileHandle()
91 + public function getFileHandle()
92 92 {
93 93 if (!in_array(get_resource_type($this->file_handle), array('stream', 'file'), true)) {
94 - throw new FileException("File not found: " . $this->file_path);
94 + throw new FileException(sprintf(__("File not found: %s", 'jc-importer'), $this->file_path));
95 95 }
96 96 return $this->file_handle;
97 97 }
98 98
99 - protected function setCurrentRecord($index)
99 + public function setCurrentRecord($index)
100 100 {
101 101 $this->current_record = $index;
102 102 }
103 103 }