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