diff -r 53ba55d33abb -r 8acd77a6c19d install.php --- a/install.php Wed Nov 21 20:45:50 2007 -0500 +++ b/install.php Wed Nov 21 21:03:48 2007 -0500 @@ -14,7 +14,7 @@ */ @include('config.php'); -if( ( defined('ENANO_INSTALLED') || defined('MIDGET_INSTALLED') ) && ((isset($_GET['mode']) && ($_GET['mode']!='finish' && $_GET['mode']!='css')) || !isset($_GET['mode']))) +if( ( defined('ENANO_INSTALLED') || defined('MIDGET_INSTALLED') ) && ((isset($_GET['mode']) && ($_GET['mode']!='finish' && $_GET['mode']!='css') && $_GET['mode']!='showlicense') || !isset($_GET['mode']))) { $_GET['title'] = 'Enano:Installation_locked'; require('includes/common.php'); @@ -319,7 +319,7 @@ if ( !$conn ) return false; // Our list of tables included in Enano - $tables = Array( 'categories', 'comments', 'config', 'logs', 'page_text', 'session_keys', 'pages', 'users', 'users_extra', 'themes', 'buddies', 'banlist', 'files', 'privmsgs', 'sidebar', 'hits', 'search_index', 'groups', 'group_members', 'acl', 'search_cache', 'tags', 'page_groups', 'page_group_members' ); + $tables = Array( 'categories', 'comments', 'config', 'logs', 'page_text', 'session_keys', 'pages', 'users', 'users_extra', 'themes', 'buddies', 'banlist', 'files', 'privmsgs', 'sidebar', 'hits', 'search_index', 'groups', 'group_members', 'acl', 'tags', 'page_groups', 'page_group_members' ); // Drop each table individually; if it fails, it probably means we're trying to drop a // table that didn't exist in the Enano version we're deleting the database for. @@ -572,6 +572,14 @@ return true; } +function stg_build_index() +{ + global $db, $session, $paths, $template, $plugins; // Common objects; + if ( $paths->rebuild_search_index() ) + return true; + return false; +} + function stg_rename_config() { if ( !@rename('./config.new.php', './config.php') ) @@ -692,26 +700,50 @@ $failed = true; } } -function is_apache() +function is_apache() { $r = strstr($_SERVER['SERVER_SOFTWARE'], 'Apache') ? true : false; return $r; } + +function show_license($fb = false) { - return strstr($_SERVER['SERVER_SOFTWARE'], 'Apache') ? true : false; + ?> +
+ +

get('license_info_unstable_title'); ?>

+

get('license_info_unstable_body'); ?>

+ +

get('license_section_gpl_heading'); ?>

+ lang_code != 'eng' ): ?> +

get('license_gpl_blurb_inenglish'); ?>

+ + + Because I could never find the Create a Page button in PHP-Nuke.

'; + echo '

' . str_replace('http://enanocms.org/', 'http://www.2robots.com/2003/10/15/web-portals-suck/', $template->fading_button) . '

'; + echo '

It\'s not a portal, my friends.

'; + } + ?> +
+ load_file('./language/english/install.json'); - -if ( !isset($_GET['mode']) ) +if(!isset($_GET['mode'])) +{ $_GET['mode'] = 'welcome'; - +} switch($_GET['mode']) { case 'mysql_test': @@ -862,11 +894,14 @@ 'confirm' => $lang->get('confirm_modetitle'), 'install' => $lang->get('install_modetitle'), 'finish' => $lang->get('finish_modetitle') + '_hiddenstages' => '...', // all stages below this line are hidden + 'showlicense' => $lang->get('license_modetitle') ); $sideinfo = ''; $vars = $template->extract_vars('elements.tpl'); $p = $template->makeParserText($vars['sidebar_button']); +$hidden = false; foreach ( $modestrings as $id => $str ) { if ( $_GET['mode'] == $id ) @@ -878,12 +913,17 @@ { $flags = ''; } - $p->assign_vars(Array( - 'HREF' => '#', - 'FLAGS' => $flags . ' onclick="return false;"', - 'TEXT' => $str - )); - $sideinfo .= $p->run(); + if ( $id == '_hiddenstages' ) + $hidden = true; + if ( !$hidden ) + { + $p->assign_vars(Array( + 'HREF' => '#', + 'FLAGS' => $flags . ' onclick="return false;"', + 'TEXT' => $str + )); + $sideinfo .= $p->run(); + } } $template->init_vars(); @@ -915,8 +955,6 @@ } } -$template->header(); -if(!isset($_GET['mode'])) $_GET['mode'] = 'license'; switch($_GET['mode']) { default: @@ -954,27 +992,7 @@

get('license_heading'); ?>

get('license_blurb_thankyou'); ?>

get('license_blurb_pleaseread'); ?>

-
- -

get('license_info_unstable_title'); ?>

-

get('license_info_unstable_body'); ?>

- -

get('license_section_gpl_heading'); ?>

- lang_code != 'eng' ): ?> -

get('license_gpl_blurb_inenglish'); ?>

- - -
+