mirror of
https://github.com/retailcrm/opencart-module.git
synced 2024-11-25 06:36:06 +03:00
add download directory check
This commit is contained in:
parent
d2c1948ebc
commit
e937b336ae
@ -390,7 +390,13 @@ class ControllerModuleIntarocrm extends Controller {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function export() {
|
public function export() {
|
||||||
file_put_contents(__DIR__ . '/../../../download/intarocrm.xml', $this->xml());
|
$downloadPath = __DIR__ . '/../../../download/';
|
||||||
|
|
||||||
|
if (!file_exists($downloadPath)) {
|
||||||
|
mkdir($downloadPath, 0755);
|
||||||
|
}
|
||||||
|
|
||||||
|
file_put_contents($downloadPath . 'intarocrm.xml', $this->xml());
|
||||||
}
|
}
|
||||||
|
|
||||||
private function validate() {
|
private function validate() {
|
||||||
|
Loading…
Reference in New Issue
Block a user