mirror of
https://github.com/retailcrm/opencart-module.git
synced 2024-11-22 05:06:07 +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() {
|
||||
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() {
|
||||
|
Loading…
Reference in New Issue
Block a user