Installer actually works now on dev servers; minor language change in template.php; code cleanliness fix in sessions.php
--- a/includes/sessions.php Fri Jun 22 10:16:14 2007 -0400
+++ b/includes/sessions.php Fri Jun 22 10:31:59 2007 -0400
@@ -1287,7 +1287,8 @@
* @param string $real_name Optional, defaults to ''.
*/
- function create_user($username, $password, $email, $real_name = '') {
+ function create_user($username, $password, $email, $real_name = '')
+ {
global $db, $session, $paths, $template, $plugins; // Common objects
// Initialize AES
--- a/includes/template.php Fri Jun 22 10:16:14 2007 -0400
+++ b/includes/template.php Fri Jun 22 10:31:59 2007 -0400
@@ -522,7 +522,7 @@
{
// label at start
$label = $this->makeParserText($tplvars['toolbar_label']);
- $label->assign_vars(array('TEXT' => 'password:'));
+ $label->assign_vars(array('TEXT' => 'page password:'));
$t0 = $label->run();
$menubtn->assign_vars(array(
--- a/install.php Fri Jun 22 10:16:14 2007 -0400
+++ b/install.php Fri Jun 22 10:31:59 2007 -0400
@@ -51,7 +51,11 @@
define('ENANO_ROOT', dirname($filename));
-function is_page($p) { return true; }
+function is_page($p)
+{
+ return true;
+}
+
require('includes/wikiformat.php');
require('includes/constants.php');
require('includes/rijndael.php');
@@ -59,26 +63,41 @@
//die('Key size: ' . AES_BITS . '<br />Block size: ' . AES_BLOCKSIZE);
-if(!function_exists('wikiFormat')) {
-function wikiFormat($message, $filter_links = true) {
- $wiki = & Text_Wiki::singleton('Mediawiki');
- $wiki->setRenderConf('Xhtml', 'code', 'css_filename', 'codefilename');
- $wiki->setRenderConf('Xhtml', 'wikilink', 'view_url', contentPath);
- $result = $wiki->transform($message, 'Xhtml');
-
- // HTML fixes
- $result = preg_replace('#<tr>([\s]*?)<\/tr>#is', '', $result);
- $result = preg_replace('#<p>([\s]*?)<\/p>#is', '', $result);
- $result = preg_replace('#<br />([\s]*?)<table#is', '<table', $result);
-
- return $result;
-}
+if(!function_exists('wikiFormat'))
+{
+ function wikiFormat($message, $filter_links = true)
+ {
+ $wiki = & Text_Wiki::singleton('Mediawiki');
+ $wiki->setRenderConf('Xhtml', 'code', 'css_filename', 'codefilename');
+ $wiki->setRenderConf('Xhtml', 'wikilink', 'view_url', contentPath);
+ $result = $wiki->transform($message, 'Xhtml');
+
+ // HTML fixes
+ $result = preg_replace('#<tr>([\s]*?)<\/tr>#is', '', $result);
+ $result = preg_replace('#<p>([\s]*?)<\/p>#is', '', $result);
+ $result = preg_replace('#<br />([\s]*?)<table#is', '<table', $result);
+
+ return $result;
+ }
}
global $failed, $warned;
+
$failed = false;
$warned = false;
-function not($var) { if($var) return false; else return true; }
+
+function not($var)
+{
+ if($var)
+ {
+ return false;
+ }
+ else
+ {
+ return true;
+ }
+}
+
function run_test($code, $desc, $extended_desc, $warn = false)
{
global $failed, $warned;
@@ -1042,7 +1061,7 @@
echo 'done!<br />Writing configuration files...';
if($_POST['urlscheme']=='tiny')
{
- $ht = fopen(dirname(__FILE__).'/.htaccess', 'a+');
+ $ht = fopen(ENANO_ROOT.'/.htaccess', 'a+');
if(!$ht) err('Error opening file .htaccess for writing');
fwrite($ht, '
RewriteEngine on
@@ -1070,7 +1089,7 @@
$crypto_key = \''.$privkey.'\';
?>';
- $cf_handle = fopen(dirname(__FILE__).'/config.php', 'w');
+ $cf_handle = fopen(ENANO_ROOT.'/config.php', 'w');
if(!$cf_handle) err('Couldn\'t open file config.php for writing');
fwrite($cf_handle, $config_file);
fclose($cf_handle);