Установка из папки вместо архива
This commit is contained in:
parent
431c68bb0e
commit
85b957c8af
1 changed files with 15 additions and 4 deletions
|
|
@ -8,8 +8,19 @@
|
||||||
* </code>
|
* </code>
|
||||||
*/
|
*/
|
||||||
namespace ctiso;
|
namespace ctiso;
|
||||||
use ZipArchive,
|
use ctiso\Tools\SQLStatementExtractor;
|
||||||
ctiso\Tools\SQLStatementExtractor;
|
use ctiso\Path;
|
||||||
|
|
||||||
|
class FakeZipArchive {
|
||||||
|
public $base;
|
||||||
|
function open($path) {
|
||||||
|
$this->base = $path;
|
||||||
|
}
|
||||||
|
|
||||||
|
function getFromName($file) {
|
||||||
|
return file_get_contents(Path::join($this->base, $file));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
class Setup
|
class Setup
|
||||||
{
|
{
|
||||||
|
|
@ -32,8 +43,8 @@ class Setup
|
||||||
|
|
||||||
$this->target = '';
|
$this->target = '';
|
||||||
$this->source = '';
|
$this->source = '';
|
||||||
$this->zip = new ZipArchive();
|
$this->zip = new FakeZipArchive();
|
||||||
$this->zip->open(strtr($file, array('.xml' => '.zip')));
|
$this->zip->open(strtr($file, array('.xml' => '')));
|
||||||
|
|
||||||
|
|
||||||
array_push($this->stack, $this->node);
|
array_push($this->stack, $this->node);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue