Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.esproj
11 changes: 8 additions & 3 deletions README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
This extension exports your Symphony website.
It is part of the Symphony core download package.

- Version: 1.11
- Date: 12th Feb 2010
- Requirements: Symphony 2.0.7RC2 or above, ZIP enabled (--enable-zip)
- Version: 1.2
- Date: 2nd January 2011
- Requirements: Symphony 2.2 or above, ZIP enabled (--enable-zip)
- Author: Alistair Kearney, alistair@symphony-cms.com
- Constributors: [A list of contributors can be found in the commit history](http://github.com/pointybeard/export_ensemble/commits/master)
- GitHub Repository: <http://github.com/pointybeard/export_ensemble>
Expand All @@ -24,6 +24,11 @@ Information about [installing and updating extensions](http://symphony-cms.com/l

## Change Log

**Version 1.2**

- Compatibility cahnges for 2.2
- Fix markup bug


**Version 1.11**

Expand Down
4 changes: 2 additions & 2 deletions extension.driver.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

public function about(){
return array('name' => 'Export Ensemble',
'version' => '1.11',
'release-date' => '2010-02-12',
'version' => '1.2',
'release-date' => '2011-01-02',
'author' => array('name' => 'Alistair Kearney',
'website' => 'http://pointybeard.com',
'email' => 'alistair@pointybeard.com')
Expand Down
171 changes: 86 additions & 85 deletions lib/installer.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -16,92 +16,72 @@

if (PHP_VERSION_ID >= 50300){
error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED);
}
}
else{
error_reporting(E_ALL ^ E_NOTICE);
}

set_error_handler('__errorHandler');

define('kVERSION', '<!-- VERSION -->');
define('kINSTALL_ASSET_LOCATION', './symphony/assets/installer');
define('kINSTALL_FILENAME', basename(__FILE__));

## Show PHP Info
// Show PHP Info
if(isset($_REQUEST['info'])){
phpinfo();
phpinfo();
exit();
}

function setLanguage() {
require_once('symphony/lib/toolkit/class.lang.php');
$lang = NULL;

if(!empty($_REQUEST['lang'])){
$l = preg_replace('/[^a-zA-Z\-]/', NULL, $_REQUEST['lang']);
if(file_exists("./symphony/lib/lang/lang.{$l}.php")) $lang = $l;
}
// Defines
define('kVERSION', '2.2.0dev');
define('kINSTALL_ASSET_LOCATION', './symphony/assets/installer');
define('kINSTALL_FILENAME', basename(__FILE__));
define('DOCROOT', rtrim(dirname(__FILE__), '\\/'));

if($lang === NULL){
foreach(Lang::getBrowserLanguages() as $l){
if(file_exists("./symphony/lib/lang/lang.{$l}.php")) $lang = $l;
break;
}
}
// Required system components
require_once(DOCROOT . '/symphony/lib/boot/func.utilities.php');
require_once(DOCROOT . '/symphony/lib/boot/defines.php');
require_once(TOOLKIT . '/class.lang.php');
require_once(TOOLKIT . '/class.general.php');
require_once(CORE . '/class.errorhandler.php');

## none of browser accepted languages is available, get first available
if(is_null($lang)){

## default to English
$lang = 'en';

if(!file_exists('./symphony/lib/lang/lang.en.php')){
$l = Lang::getAvailableLanguages();
if(is_array($l) && count($l) > 0) $lang = $l[0];
}
}
// Initialize system language
function setLanguage() {
$lang = 'en';

if(is_null($lang)){
return NULL;
// Fetch language requests
if(!empty($_REQUEST['lang'])){
$lang = preg_replace('/[^a-zA-Z\-]/', NULL, $_REQUEST['lang']);
}

// Set language
try{
Lang::load('./symphony/lib/lang/lang.%s.php', $lang);
Lang::initialize();
Lang::set($lang, false);
}
catch(Exception $s){
return NULL;
}

define('__LANG__', $lang);
return $lang;
return true;
}


/***********************
TESTS
************************/

// Check for PHP 5.2+

if(version_compare(phpversion(), '5.2', '<=')){
// Check and set language
if(setLanguage() === NULL){

$code = '<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>Outstanding Requirements</title>
<link rel="stylesheet" type="text/css" href="'.kINSTALL_ASSET_LOCATION.'/main.css"/>
<script type="text/javascript" src="'.kINSTALL_ASSET_LOCATION.'/main.js"></script>
<title>' . __('Outstanding Requirements') . '</title>
<link rel="stylesheet" type="text/css" href="' . kINSTALL_ASSET_LOCATION . '/main.css"/>
<script type="text/javascript" src="' . kINSTALL_ASSET_LOCATION . '/main.js"></script>
</head>
<body>
<h1>Install Symphony <em>Version '.kVERSION.'</em></h1>
<h2>Outstanding Requirements</h2>
<p>Symphony needs the following requirements satisfied before installation can proceed.</p>

<dl>
<dt><abbr title="PHP: Hypertext Pre-processor">PHP</abbr> 5.2 or above</dt>
<dd>Symphony needs a recent version of <abbr title="PHP: Hypertext Pre-processor">PHP</abbr>.</dd>
</dl>
<h1>' . __('Install Symphony') . '<em>' . __('Version') . ' ' . kVERSION . '</em></h1>
<h2>' . __('Outstanding Requirements') . '</h2>
<p>' . __('Symphony needs at least one language file to be present before installation can proceed.') . '</p>

</body>

Expand All @@ -111,21 +91,26 @@

}

// Check and set language
if(setLanguage() === NULL){
// Check for PHP 5.2+
if(version_compare(phpversion(), '5.2', '<=')){

$code = '<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>Outstanding Requirements</title>
<link rel="stylesheet" type="text/css" href="'.kINSTALL_ASSET_LOCATION.'/main.css"/>
<script type="text/javascript" src="'.kINSTALL_ASSET_LOCATION.'/main.js"></script>
<title>' . __('Outstanding Requirements') . '</title>
<link rel="stylesheet" type="text/css" href="' . kINSTALL_ASSET_LOCATION . '/main.css"/>
<script type="text/javascript" src="' . kINSTALL_ASSET_LOCATION . '/main.js"></script>
</head>
<body>
<h1>Install Symphony <em>Version '.kVERSION.'</em></h1>
<h2>Outstanding Requirements</h2>
<p>Symphony needs at least one language file to be present before installation can proceed.</p>
<h1>' . __('Install Symphony') . '<em>' . __('Version') . ' ' . kVERSION . '</em></h1>
<h2>' . __('Outstanding Requirements') . '</h2>
<p>' . __('Symphony needs the following requirements satisfied before installation can proceed.') . '</p>

<dl>
<dt>' . __('%s 5.2 or above', array('<abbr title="PHP: Hypertext Pre-processor">PHP</abbr>')) . '</dt>
<dd>' . __('Symphony needs a recent version of %s.', array('<abbr title="PHP: Hypertext Pre-processor">PHP</abbr>')) . '</dd>
</dl>

</body>

Expand All @@ -142,14 +127,14 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>'.__('Missing File').'</title>
<link rel="stylesheet" type="text/css" href="'.kINSTALL_ASSET_LOCATION.'/main.css"/>
<script type="text/javascript" src="'.kINSTALL_ASSET_LOCATION.'/main.js"></script>
<title>' . __('Missing File') . '</title>
<link rel="stylesheet" type="text/css" href="' . kINSTALL_ASSET_LOCATION . '/main.css"/>
<script type="text/javascript" src="' . kINSTALL_ASSET_LOCATION . '/main.js"></script>
</head>
<body>
<h1>'.__('Install Symphony <em>Version %s</em>', array(kVERSION)).'</h1>
<h2>'.__('Missing File').'</h2>
<p>'.__('It appears that <code>install.sql</code> is either missing or not readable. This is required to populate the database and must be uploaded before installation can commence. Ensure that <code>PHP</code> has read permissions.').'</p>
<h1>' . __('Install Symphony') . '<em>' . __('Version') . ' ' . kVERSION . '</em></h1>
<h2>' . __('Missing File') . '</h2>
<p>' . __('It appears that <code>install.sql</code> is either missing or not readable. This is required to populate the database and must be uploaded before installation can commence. Ensure that <code>PHP</code> has read permissions.') . '</p>

</body>

Expand All @@ -166,14 +151,14 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>'.__('Existing Installation').'</title>
<link rel="stylesheet" type="text/css" href="'.kINSTALL_ASSET_LOCATION.'/main.css"/>
<script type="text/javascript" src="'.kINSTALL_ASSET_LOCATION.'/main.js"></script>
<title>' . __('Existing Installation') . '</title>
<link rel="stylesheet" type="text/css" href="' . kINSTALL_ASSET_LOCATION . '/main.css"/>
<script type="text/javascript" src="' . kINSTALL_ASSET_LOCATION . '/main.js"></script>
</head>
<body>
<h1>'.__('Install Symphony <em>Version %s</em>', array(kVERSION)).'</h1>
<h2>'.__('Existing Installation').'</h2>
<p>'.__('It appears that Symphony has already been installed at this location.').'</p>
<h1>' . __('Install Symphony') . '<em>' . __('Version') . ' ' . kVERSION . '</em></h1>
<h2>' . __('Existing Installation') . '</h2>
<p>' . __('It appears that Symphony has already been installed at this location.') . '</p>

</body>

Expand All @@ -182,27 +167,43 @@
die($code);

}

/////////////////////////


function getDynamicConfiguration(){

$conf = array();

<!-- CONFIGURATION -->


$conf['admin']['max_upload_size'] = '5242880';
$conf['symphony']['pagination_maximum_rows'] = '17';
$conf['symphony']['allow_page_subscription'] = '1';
$conf['symphony']['lang'] = Lang::get();
$conf['symphony']['version'] = '2.1.1';
$conf['symphony']['pages_table_nest_children'] = 'yes';
$conf['log']['archive'] = '1';
$conf['log']['maxsize'] = '102400';
$conf['general']['sitename'] = 'Symphony CMS';
$conf['image']['cache'] = '1';
$conf['image']['quality'] = '90';
$conf['database']['driver'] = 'mysql';
$conf['database']['character_set'] = 'utf8';
$conf['database']['character_encoding'] = 'utf8';
$conf['database']['runtime_character_set_alter'] = '1';
$conf['database']['query_caching'] = 'default';
$conf['public']['display_event_xml_in_source'] = 'yes';
$conf['region']['time_format'] = 'H:i';
$conf['region']['date_format'] = 'd F Y';
$conf['region']['datetime_separator'] = ' ';

return $conf;
}

}

function getTableSchema(){
return file_get_contents('install.sql');
}

function getWorkspaceData(){
return file_get_contents('workspace/install.sql');
}

define('INSTALL_REQUIREMENTS_PASSED', true);
include_once('./symphony/lib/toolkit/include.install.php');