Edit File by line
/home/barbar84/www/wp-conte.../plugins/sujqvwi/AnonR/smanonr..../var/softacul.../tastyign...
File: _clone.php
<?php
[0] Fix | Delete
[1] Fix | Delete
//////////////////////////////////////////////////////////////
[2] Fix | Delete
//===========================================================
[3] Fix | Delete
// clone.php
[4] Fix | Delete
//===========================================================
[5] Fix | Delete
// SOFTACULOUS
[6] Fix | Delete
// Version : 4.2.8
[7] Fix | Delete
// Inspired by the DESIRE to be the BEST OF ALL
[8] Fix | Delete
// ----------------------------------------------------------
[9] Fix | Delete
// Started by: Alons
[10] Fix | Delete
// Date: 10th Jan 2009
[11] Fix | Delete
// Time: 21:00 hrs
[12] Fix | Delete
// Site: http://www.softaculous.com/ (SOFTACULOUS)
[13] Fix | Delete
// ----------------------------------------------------------
[14] Fix | Delete
// Please Read the Terms of use at http://www.softaculous.com
[15] Fix | Delete
// ----------------------------------------------------------
[16] Fix | Delete
//===========================================================
[17] Fix | Delete
// (c)Softaculous Inc.
[18] Fix | Delete
//===========================================================
[19] Fix | Delete
//////////////////////////////////////////////////////////////
[20] Fix | Delete
[21] Fix | Delete
if(!defined('SOFTACULOUS')){
[22] Fix | Delete
[23] Fix | Delete
die('Hacking Attempt');
[24] Fix | Delete
[25] Fix | Delete
}
[26] Fix | Delete
[27] Fix | Delete
//The Install process
[28] Fix | Delete
function __clone(){
[29] Fix | Delete
[30] Fix | Delete
global $__settings, $error, $software, $globals, $replace_data, $source_data;
[31] Fix | Delete
[32] Fix | Delete
//Do we meet the Minimum software requirements
[33] Fix | Delete
__requirements();
[34] Fix | Delete
[35] Fix | Delete
if(!empty($error)){
[36] Fix | Delete
return false;
[37] Fix | Delete
}
[38] Fix | Delete
[39] Fix | Delete
$temp = parse_url($source_data['softurl']);
[40] Fix | Delete
$source_data['relativeurl'] = $temp['path'];
[41] Fix | Delete
[42] Fix | Delete
// database.php
[43] Fix | Delete
$file = sfile($__settings['softpath'].'/system/tastyigniter/config/database.php');
[44] Fix | Delete
[45] Fix | Delete
if(empty($file)){
[46] Fix | Delete
$error[] = 'Could not read the config file to get dbprefix.';
[47] Fix | Delete
return false;
[48] Fix | Delete
}
[49] Fix | Delete
[50] Fix | Delete
soft_preg_replace('/\$db\[("|\')default("|\')\]\[("|\')dbprefix("|\')\](\s*?)=(\s*?)("|\')(.*?)("|\');/is', $file, $__settings['dbprefix'], 8);
[51] Fix | Delete
[52] Fix | Delete
sclone_replace($replace_data, $__settings['softpath'].'/system/tastyigniter/config/database.php', true);
[53] Fix | Delete
[54] Fix | Delete
//sql
[55] Fix | Delete
$query = "TRUNCATE TABLE ".$__settings['dbprefix']."customers_online;";
[56] Fix | Delete
sdb_query($query, $__settings['softdbhost'], $__settings['softdbuser'], $__settings['softdbpass'], $__settings['softdb']);
[57] Fix | Delete
[58] Fix | Delete
if(sfile_exists($__settings['softpath'].'/.htaccess')){
[59] Fix | Delete
[60] Fix | Delete
// If the installation is on root domain we need to change the below relative URL
[61] Fix | Delete
if(is_dom_root($source_data['softpath'])){
[62] Fix | Delete
$replace_data['RewriteBase \'/\''] = 'RewriteBase \''.$__settings['relativeurl'].'\'';
[63] Fix | Delete
$replace_data['RewriteBase /'] = 'RewriteBase '.$__settings['relativeurl'];
[64] Fix | Delete
}elseif(is_dom_root($__settings['softpath'])){
[65] Fix | Delete
$replace_data['RewriteBase \''.$source_data['relativeurl'].'\''] = 'RewriteBase \'/\'';
[66] Fix | Delete
$replace_data['RewriteBase '.$source_data['relativeurl']] = 'RewriteBase /';
[67] Fix | Delete
}
[68] Fix | Delete
[69] Fix | Delete
sclone_replace($replace_data, $__settings['softpath'].'/.htaccess', true);
[70] Fix | Delete
}
[71] Fix | Delete
[72] Fix | Delete
//CHMOD
[73] Fix | Delete
@schmod($__settings['softpath'].'/system/tastyigniter/session/', $globals['odc'], 1);
[74] Fix | Delete
@schmod($__settings['softpath'].'/system/tastyigniter/logs/', $globals['odc'], 1);
[75] Fix | Delete
@schmod($__settings['softpath'].'/assets/downloads/', $globals['odc'], 1);
[76] Fix | Delete
@schmod($__settings['softpath'].'/assets/images/', $globals['odc'], 1);
[77] Fix | Delete
@schmod($__settings['softpath'].'/admin/cache/', $globals['odc'], 1);
[78] Fix | Delete
@schmod($__settings['softpath'].'/main/cache/', $globals['odc'], 1);
[79] Fix | Delete
}
[80] Fix | Delete
[81] Fix | Delete
//Check whether the Minimum Software configuration matches
[82] Fix | Delete
function __requirements(){
[83] Fix | Delete
[84] Fix | Delete
global $__settings, $error, $software;
[85] Fix | Delete
[86] Fix | Delete
return true;
[87] Fix | Delete
[88] Fix | Delete
}
[89] Fix | Delete
[90] Fix | Delete
?>
[91] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function