add namespace PmInstaller

This commit is contained in:
Marco A. Nina Mena
2017-08-15 08:06:44 -04:00
parent 6d5a1e6328
commit bc5afd9e9d
6 changed files with 86 additions and 158 deletions

View File

@@ -1,5 +1,6 @@
<?php
use Processmaker\Core\Installer;
use ProcessMaker\Core\System;
use ProcessMaker\Util\FixReferencePath;
use ProcessMaker\Plugins\Adapters\PluginAdapter;
@@ -1696,7 +1697,7 @@ class WorkspaceTools
}
$workspace = new WorkspaceTools($workspaceName);
if (PmInstaller::isset_site($workspaceName)) {
if (Installer::isset_site($workspaceName)) {
if ($overwrite) {
if (!$workspace->workspaceExists()) {
throw new Exception('We can not overwrite this workspace because the workspace ' . $workspaceName . ' does not exist please check the lower case and upper case.');

View File

@@ -1,11 +1,7 @@
<?php
/**
* new Site create v1.1
* Jan 15th, 2011
*
* @author krlos P.C <carlos@colosa.com>
*/
use Processmaker\Core\Installer;
class newSiteProxy extends HttpProxyController
{
@@ -15,7 +11,7 @@ class newSiteProxy extends HttpProxyController
$ao_db_drop = (isset( $_POST['AO_DB_DROP'] )) ? true : false;
$name = trim( $_POST['NW_TITLE'] );
$inst = new PmInstaller();
$inst = new Installer();
if ($inst->isset_site($name)) {
if($ao_db_drop === true){
if(!file_exists(PATH_DATA . "sites/" . $name)){

View File

@@ -1,30 +1,9 @@
<?php
/**
* autoinstallProcess.php
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2008 Colosa Inc.23
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*/
use Processmaker\Core\Installer;
use ProcessMaker\Plugins\PluginRegistry;
$inst = new PmInstaller();
$inst = new Installer();
$oProcess = new Processes();

View File

@@ -1,27 +1,8 @@
<?php
/**
* autoinstallProcess.php
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2008 Colosa Inc.23
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*/
$inst = new PmInstaller();
use Processmaker\Core\Installer;
$inst = new Installer();
$oProcess = new Processes();

View File

@@ -1,12 +1,15 @@
<?php
use Processmaker\Core\Installer;
global $RBAC;
$RBAC->allows(basename(__FILE__), basename(__FILE__));
if (isset( $_POST['form']['NW_TITLE'] )) {
$action = (isset( $_POST['form']['ACTION'] )) ? trim( $_POST['form']['ACTION'] ) : 'test';
$name = trim( $_POST['form']['NW_TITLE'] );
$inst = new PmInstaller();
$inst = new Installer();
$isset = $inst->isset_site( $name );

View File

@@ -1,46 +1,14 @@
<?php
/**
* class.Installer.php
*
* @package workflow.engine.ProcessMaker
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2011 Colosa Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
//
// It works with the table CONFIGURATION in a WF dataBase
//
// Copyright (C) 2007 COLOSA
//
// License: LGPL, see LICENSE
////////////////////////////////////////////////////
namespace Processmaker\Core;
/**
* Processmaker Installer
*
* @package workflow.engine.ProcessMaker
* @author maborak
* @copyright 2008 COLOSA
*/
class PmInstaller
use AppCacheView;
use Archive_Tar;
use Configuration;
use Exception;
use G;
class Installer
{
public $options = Array();