web/wp-content/plugins/duplicator/define.php
author Anthony Ly <anthonyly.com@gmail.com>
Tue, 12 Mar 2013 18:21:39 +0100
changeset 206 919b4ddb13fa
parent 204 09a1c134465b
permissions -rw-r--r--
modification logo footer cccb
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
195
c7c0fbc09788 ajout du plugin Duplicator
Anthony Ly <anthonyly.com@gmail.com>
parents:
diff changeset
     1
<?php
c7c0fbc09788 ajout du plugin Duplicator
Anthony Ly <anthonyly.com@gmail.com>
parents:
diff changeset
     2
	
c7c0fbc09788 ajout du plugin Duplicator
Anthony Ly <anthonyly.com@gmail.com>
parents:
diff changeset
     3
	//Prevent directly browsing to the file
c7c0fbc09788 ajout du plugin Duplicator
Anthony Ly <anthonyly.com@gmail.com>
parents:
diff changeset
     4
	if (function_exists('plugin_dir_url')) {
204
09a1c134465b man wordpress + plugins order post + slideshow
Anthony Ly <anthonyly.com@gmail.com>
parents: 195
diff changeset
     5
		define('DUPLICATOR_VERSION',   		'0.4.1');
195
c7c0fbc09788 ajout du plugin Duplicator
Anthony Ly <anthonyly.com@gmail.com>
parents:
diff changeset
     6
		define("DUPLICATOR_HOMEPAGE",		"http://lifeinthegrid.com/labs/duplicator");
c7c0fbc09788 ajout du plugin Duplicator
Anthony Ly <anthonyly.com@gmail.com>
parents:
diff changeset
     7
		define("DUPLICATOR_GIVELINK",		"http://lifeinthegrid.com/partner");
c7c0fbc09788 ajout du plugin Duplicator
Anthony Ly <anthonyly.com@gmail.com>
parents:
diff changeset
     8
		define("DUPLICATOR_HELPLINK",  		"http://lifeinthegrid.com/duplicator-docs");
c7c0fbc09788 ajout du plugin Duplicator
Anthony Ly <anthonyly.com@gmail.com>
parents:
diff changeset
     9
		define("DUPLICATOR_CERTIFIED",		"http://lifeinthegrid.com/duplicator-hosts");
c7c0fbc09788 ajout du plugin Duplicator
Anthony Ly <anthonyly.com@gmail.com>
parents:
diff changeset
    10
		
c7c0fbc09788 ajout du plugin Duplicator
Anthony Ly <anthonyly.com@gmail.com>
parents:
diff changeset
    11
		define("DUPLICATOR_DB_ICONV_IN",	"UTF-8"); 
c7c0fbc09788 ajout du plugin Duplicator
Anthony Ly <anthonyly.com@gmail.com>
parents:
diff changeset
    12
		define("DUPLICATOR_DB_ICONV_OUT",	"ISO-8859-1//TRANSLIT"); 
c7c0fbc09788 ajout du plugin Duplicator
Anthony Ly <anthonyly.com@gmail.com>
parents:
diff changeset
    13
		define('DUPLICATOR_PLUGIN_URL',  plugin_dir_url( __FILE__ ));
c7c0fbc09788 ajout du plugin Duplicator
Anthony Ly <anthonyly.com@gmail.com>
parents:
diff changeset
    14
		define('DUPLICATOR_PLUGIN_PATH', str_replace("\\", "/", plugin_dir_path( __FILE__ )));
c7c0fbc09788 ajout du plugin Duplicator
Anthony Ly <anthonyly.com@gmail.com>
parents:
diff changeset
    15
		
c7c0fbc09788 ajout du plugin Duplicator
Anthony Ly <anthonyly.com@gmail.com>
parents:
diff changeset
    16
		/* Paths should ALWAYS read "/"
c7c0fbc09788 ajout du plugin Duplicator
Anthony Ly <anthonyly.com@gmail.com>
parents:
diff changeset
    17
			uni: /home/path/file.txt
c7c0fbc09788 ajout du plugin Duplicator
Anthony Ly <anthonyly.com@gmail.com>
parents:
diff changeset
    18
			win:  D:/home/path/file.txt 
c7c0fbc09788 ajout du plugin Duplicator
Anthony Ly <anthonyly.com@gmail.com>
parents:
diff changeset
    19
			SSDIR = SnapShot Directory */
c7c0fbc09788 ajout du plugin Duplicator
Anthony Ly <anthonyly.com@gmail.com>
parents:
diff changeset
    20
		if ( !defined('ABSPATH') ) {
c7c0fbc09788 ajout du plugin Duplicator
Anthony Ly <anthonyly.com@gmail.com>
parents:
diff changeset
    21
			define('ABSPATH', dirname('__FILE__'));
c7c0fbc09788 ajout du plugin Duplicator
Anthony Ly <anthonyly.com@gmail.com>
parents:
diff changeset
    22
		}
c7c0fbc09788 ajout du plugin Duplicator
Anthony Ly <anthonyly.com@gmail.com>
parents:
diff changeset
    23
		define("DUPLICATOR_SSDIR_NAME",		'wp-snapshots'); 
c7c0fbc09788 ajout du plugin Duplicator
Anthony Ly <anthonyly.com@gmail.com>
parents:
diff changeset
    24
		define('DUPLICATOR_WPROOTPATH',		str_replace("\\", "/", ABSPATH));
c7c0fbc09788 ajout du plugin Duplicator
Anthony Ly <anthonyly.com@gmail.com>
parents:
diff changeset
    25
		define("DUPLICATOR_SSDIR_PATH",		str_replace("\\", "/", DUPLICATOR_WPROOTPATH . DUPLICATOR_SSDIR_NAME));
c7c0fbc09788 ajout du plugin Duplicator
Anthony Ly <anthonyly.com@gmail.com>
parents:
diff changeset
    26
		define("DUPLICATOR_INSTALL_PHP",	'installer.php');
c7c0fbc09788 ajout du plugin Duplicator
Anthony Ly <anthonyly.com@gmail.com>
parents:
diff changeset
    27
		define("DUPLICATOR_INSTALL_BAK",	'installer.rescue.php');
c7c0fbc09788 ajout du plugin Duplicator
Anthony Ly <anthonyly.com@gmail.com>
parents:
diff changeset
    28
		define("DUPLICATOR_INSTALL_SQL",	'installer-data.sql');
c7c0fbc09788 ajout du plugin Duplicator
Anthony Ly <anthonyly.com@gmail.com>
parents:
diff changeset
    29
		define("DUPLICATOR_INSTALL_LOG",	'installer-log.txt');
c7c0fbc09788 ajout du plugin Duplicator
Anthony Ly <anthonyly.com@gmail.com>
parents:
diff changeset
    30
		define("DUPLICATOR_ZIP_FILE_POOL",	5000);
c7c0fbc09788 ajout du plugin Duplicator
Anthony Ly <anthonyly.com@gmail.com>
parents:
diff changeset
    31
	} else {
c7c0fbc09788 ajout du plugin Duplicator
Anthony Ly <anthonyly.com@gmail.com>
parents:
diff changeset
    32
		error_reporting(0); 
c7c0fbc09788 ajout du plugin Duplicator
Anthony Ly <anthonyly.com@gmail.com>
parents:
diff changeset
    33
		$port = (!empty($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] != "off") ? "https://" : "http://"; 
c7c0fbc09788 ajout du plugin Duplicator
Anthony Ly <anthonyly.com@gmail.com>
parents:
diff changeset
    34
		$url  =  $port . $_SERVER["HTTP_HOST"]; 
c7c0fbc09788 ajout du plugin Duplicator
Anthony Ly <anthonyly.com@gmail.com>
parents:
diff changeset
    35
		header("HTML/1.1 404 Not Found", true, 404); 
c7c0fbc09788 ajout du plugin Duplicator
Anthony Ly <anthonyly.com@gmail.com>
parents:
diff changeset
    36
		header("Status: 404 Not Found");
c7c0fbc09788 ajout du plugin Duplicator
Anthony Ly <anthonyly.com@gmail.com>
parents:
diff changeset
    37
		exit();
c7c0fbc09788 ajout du plugin Duplicator
Anthony Ly <anthonyly.com@gmail.com>
parents:
diff changeset
    38
	}
c7c0fbc09788 ajout du plugin Duplicator
Anthony Ly <anthonyly.com@gmail.com>
parents:
diff changeset
    39
	
c7c0fbc09788 ajout du plugin Duplicator
Anthony Ly <anthonyly.com@gmail.com>
parents:
diff changeset
    40
?>