* 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.
 */
G::LoadClass('Installer');
$inst = new Installer();
G::LoadClass('processes');
$oProcess = new Processes();
//Get Available autoinstall process
$availableProcess = $inst->getDirectoryFiles(PATH_OUTTRUNK . "autoinstall", "pm");
$path = PATH_OUTTRUNK . "autoinstall" . PATH_SEP;
$message = "";
foreach ($availableProcess as $processfile) {
    $oData = $oProcess->getProcessData($path . $processfile);
    $Fields['PRO_FILENAME'] = $processfile;
    $Fields['IMPORT_OPTION'] = 2;
    $sProUid = $oData->process['PRO_UID'];
    if ($oProcess->processExists($sProUid)) {
        $message .= "{$processfile} - Not imported (process exist)<br>";
    } else {
        $oProcess->createProcessFromData($oData, $path . $processfile);
        $message .= "{$processfile} - OK<br>";
    }
}
echo $message;
Beispiel #2
0
    $data->checkPI = $inst->is_dir_writable(PATH_CORE . "config/");
    $data->checkDL = $inst->is_dir_writable(PATH_CORE . "content/languages/");
    $data->checkDLJ = $inst->is_dir_writable(PATH_CORE . "js/labels/");
    $data->checkPL = $inst->is_dir_writable(PATH_CORE . "plugins/");
    $data->checkXF = $inst->is_dir_writable(PATH_CORE . "xmlform/");
    $data->ao_db_wf = $s['result']['database']['ao']['ao_db_wf'];
    $data->ao_db_rb = $s['result']['database']['ao']['ao_db_rb'];
    $data->ao_db_rp = $s['result']['database']['ao']['ao_db_rp'];
    $data->ao_admin = $s['result']['admin']['username'];
    $data->ao_admin_pass = $p1 !== $p2 ? false : true;
    //*Autoinstall Process and Plugins. By JHL
    // March 11th. 2009
    // To enable the way of aoutoinstall process and/or plugins
    // at same time of initial PM setup
    //Get Available autoinstall process
    $data->availableProcess = $inst->getDirectoryFiles(PATH_OUTTRUNK . "autoinstall", "pm");
    //Get Available autoinstall plugins
    $data->availablePlugins = $inst->getDirectoryFiles(PATH_OUTTRUNK . "autoinstall", "tar");
    //End autoinstall
    $data->microtime = microtime(true);
    echo $oJSON->encode($data);
} else {
    if ($action === "install") {
        /*
        	 * Installation with SIMPLE POST
        	 *
        	 * Data necessary for the POST:
        	 *
        	 *
        	 * 	action=install
        	 * 	data=	{"mysqlE":"Path/to/mysql.exe",
 * 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.
 */
G::LoadClass('Installer');
$inst = new Installer();
G::LoadClass('processes');
$oProcess = new Processes();
//Get Available autoinstall process
$availablePlugins = $inst->getDirectoryFiles(PATH_OUTTRUNK . "autoinstall", "tar");
rsort($availablePlugins);
$path = PATH_OUTTRUNK . "autoinstall" . PATH_SEP;
$message = "";
foreach ($availablePlugins as $filename) {
    G::LoadThirdParty('pear/Archive', 'Tar');
    $tar = new Archive_Tar($path . $filename);
    $sFileName = substr($filename, 0, strrpos($filename, '.'));
    $sClassName = substr($filename, 0, strpos($filename, '-'));
    $aFiles = $tar->listContent();
    $bMainFile = false;
    $bClassFile = false;
    foreach ($aFiles as $key => $val) {
        if ($val['filename'] == $sClassName . '.php') {
            $bMainFile = true;
        }