Ejemplo n.º 1
0
function __upgrade($version_from)
{
    global $__settings, $error, $software, $globals;
    //CHMOD some files
    @schmod($__settings['softpath'] . '/app/installlib.php', $globals['ofc']);
    @schmod($__settings['softpath'] . '/install.php', $globals['ofc']);
    @schmod($__settings['softpath'] . '/autoinstall.php', $globals['ofc']);
    @schmod($__settings['softpath'] . '/noah.ini.php', $globals['ofc']);
    @schmod($__settings['softpath'] . '/update.php', $globals['ofc']);
    @schmod($__settings['softpath'] . '/updateinfo-2.1.0.php', $globals['ofc']);
    @schmod($__settings['softpath'] . '/updateinfo-2.1.1.php', $globals['ofc']);
    @schmod($__settings['softpath'] . '/updateinfo-2.1.2.php', $globals['ofc']);
    @schmod($__settings['softpath'] . '/updateinfo-2.2.0.php', $globals['ofc']);
    @schmod($__settings['softpath'] . '/updateinfo-2.3.0.php', $globals['ofc']);
    @schmod($__settings['softpath'] . '/updateinfo-2.4.0.php', $globals['ofc']);
    @schmod($__settings['softpath'] . '/updateinfo-2.4.1.php', $globals['ofc']);
    @schmod($__settings['softpath'] . '/updateinfo-3.0.0.php', $globals['ofc']);
    @schmod($__settings['softpath'] . '/updateinfo-3.0.2.php', $globals['ofc']);
    @schmod($__settings['softpath'] . '/updateinfo-3.1.0.php', $globals['ofc']);
    @schmod($__settings['softpath'] . '/updateinfo-3.1.1.php', $globals['ofc']);
    @schmod($__settings['softpath'] . '/updateinfo-3.1.3.php', $globals['ofc']);
    @schmod($__settings['softpath'] . '/updateinfo-4.0.0.php', $globals['ofc']);
    @schmod($__settings['softpath'] . '/updateinfo-4.0.1.php', $globals['ofc']);
    @schmod($__settings['softpath'] . '/updateinfo-4.0.2.php', $globals['ofc']);
    @schmod($__settings['softpath'] . '/updateinfo-4.1.0.php', $globals['ofc']);
    @schmod($__settings['softpath'] . '/updateinfo-4.1.5.php', $globals['ofc']);
    @schmod($__settings['softpath'] . '/app/', $globals['odc']);
    @schmod($__settings['softpath'] . '/upload/', $globals['odc']);
    @schmod($__settings['softpath'] . '/upload/users/', $globals['odc']);
    @schmod($__settings['softpath'] . '/pictures/users/', $globals['odc']);
    @schmod($__settings['softpath'] . '/logs/', $globals['odc']);
}
Ejemplo n.º 2
0
function __upgrade($version_from)
{
    global $__settings, $error, $software, $softpanel, $globals, $setupcontinue;
    // Change the permissions
    @schmod($__settings['softpath'] . '/packages/', $globals['odc']);
    @schmod($__settings['softpath'] . '/updates/', $globals['odc']);
    // Create the folders if missing
    /*	if(!sis_dir($__settings['softpath'].'/files/avatars/')){		
    		@smkdir($__settings['softpath'].'/files/avatars/', $globals['odc']);
    		@smkdir($__settings['softpath'].'/files/cache/', $globals['odc']);
    		@smkdir($__settings['softpath'].'/files/incoming/', $globals['odc']);
    		@smkdir($__settings['softpath'].'/files/thumbnails/', $globals['odc']);
    		@smkdir($__settings['softpath'].'/files/trash/', $globals['odc']);
    		
    		//CHMOD
    		@schmod($__settings['softpath'].'/files/', $globals['odc'], 1);
    		
    	}*/
    /*	$auto_upgrading = sis_autoupgrading();
    	
    	if(!optGET('noauto')){
    		// To upgrade without the UPGRADE URL
    		$get = swget($__settings['softurl'].'/index.php/tools/required/upgrade?force=1');
    	}
    	
    	// If it was sucessful dont give the Setuplocation
    	if(preg_match('/Upgrade(\s*?)to(\s*?)<b>'.$software['ver'].'<\/b>(\s*?)complete!/is', $get)){
    		$setupcontinue = '';
    	}elseif(!empty($auto_upgrading)){
    		$error[] = '{{err_auto_upgrade}}';
    	}*/
}
Ejemplo n.º 3
0
function __upgrade($version_from)
{
    global $__settings, $globals, $setupcontinue, $software, $error;
    $include = array();
    $exclude = array();
    $exclude[] = 'scripts/GLOBALS.php';
    $exclude[] = 'include/GLOBALS.php';
    $package = $software['path'] . '/data.zip';
    //Ok lets UNZIP the SOFTWARE Package
    if (!sunzip($package, $__settings['softdatadir'], 1, $include, $exclude)) {
        $error[] = 'There was some error in unzipping the FUDforum data directory';
        return false;
    }
    schmod($__settings['softpath'] . '/GLOBALS.php', $globals['odc']);
    schmod($__settings['softpath'] . '/theme/', $globals['odc'], 1);
    schmod($__settings['softpath'] . '/feed.php', $globals['ofc']);
    schmod($__settings['softpath'] . '/pdf.php', $globals['ofc']);
    schmod($__settings['softpath'] . '/index.php', $globals['ofc']);
}
Ejemplo n.º 4
0
function __pre_unzip()
{
    global $__settings, $error, $software, $globals;
    schmod($__settings['softpath'] . '/cache/', $globals['odc'], 1);
    srm($__settings['softpath'] . '/cache');
}
Ejemplo n.º 5
0
//[[[functions]]]
//500 seconds should be more than enough
set_time_limit(500);
// Set a Minimum Memory limit of 32 MB
soft_memory_limit(32);
// The Clock is ticking
$start_time = microtime_float();
// Which OS are you ?
$globals['os'] = strtoupper(substr(PHP_OS, 0, 3) == 'WIN') ? 'windows' : 'linux';
// First Delete yourself !
@unlink(__FILE__);
// More has to be done here !
// The settings
$settings = unserialize(base64_decode('[[[settings]]]'));
// CHMOD
$chmod = unserialize(base64_decode('[[[chmod]]]'));
$can_write = 0;
// Assume you cant write
// Can we Create files ?
if (!$can_write) {
    $ftp = ampps_ftp('127.0.0.1', $settings['port'], $settings['ftp_user'], $settings['ftp_pass'], $settings['ftp_softpath'], base64_decode($settings['_public_key']), base64_decode($settings['_private_key']), $settings['passphrase']);
    if ($ftp <= 0) {
        softdie('f' . $ftp);
        // - Error unzipping
    }
}
// CHMOD
foreach ($chmod as $k => $v) {
    schmod($v['path'], $v['mode'], $v['rec'], $v['dmode']);
}
softdie('DONE');