Merging Nighthawk and Scribus branches (and Scribus is back, yay!)
authorDan
Tue, 29 Jan 2008 16:21:52 -0500
changeset 389 da3bb3e99323
parent 388 9829ca63b53a (diff)
parent 387 92664d2efab8 (current diff)
child 390 9bcc185dc151
Merging Nighthawk and Scribus branches (and Scribus is back, yay!)
includes/template.php
plugins/SpecialUserPrefs.php
--- a/includes/template.php	Tue Jan 29 16:19:51 2008 -0500
+++ b/includes/template.php	Tue Jan 29 16:21:52 2008 -0500
@@ -1111,7 +1111,7 @@
     //
     
     // System messages
-    $text = preg_replace('/<!-- SYSMSG ([A-z0-9\._-]+?) -->/is', '\' . $this->tplWikiFormat($paths->sysMsg(\'\\1\')) . \'', $text);
+    $text = preg_replace('/<!-- SYSMSG ([A-z0-9\._-]+?) -->/is', '\' . $template->tplWikiFormat($paths->sysMsg(\'\\1\')) . \'', $text);
     
     // Template variables
     $text = preg_replace('/\{([A-z0-9_-]+?)\}/is', '\' . $this->tpl_strings[\'\\1\'] . \'', $text);
--- a/install/includes/payload.php	Tue Jan 29 16:19:51 2008 -0500
+++ b/install/includes/payload.php	Tue Jan 29 16:21:52 2008 -0500
@@ -127,7 +127,7 @@
   $wkt = $db->escape($wkt);
   
   $vars = array(
-      'TABLE_PREFIX'         => $_POST['table_prefix'],
+      'TABLE_PREFIX'         => table_prefix,
       'SITE_NAME'            => $db->escape($_POST['site_name']),
       'SITE_DESC'            => $db->escape($_POST['site_desc']),
       'COPYRIGHT'            => $db->escape($_POST['copyright']),
@@ -184,10 +184,10 @@
   {
     case 'standard':
     default:
-      $sp_append = 'index.php?title=';
+      $sp_append = '/index.php?title=';
       break;
     case 'shortened':
-      $sp_append = 'index.php/';
+      $sp_append = '/index.php/';
       break;
     case 'rewrite':
       $sp_append = '/';
@@ -322,6 +322,14 @@
   $lang_local->import( ENANO_ROOT . "/language/{$lang_info['dir']}/tools.json" );
   $lang_local->import( ENANO_ROOT . "/language/{$lang_info['dir']}/admin.json" );
   
+  $q = $db->sql_query('SELECT lang_id FROM ' . table_prefix . 'language ORDER BY lang_id DESC LIMIT 1;');
+  if ( !$q )
+    $db->_die();
+  
+  list($lang_id_int) = $db->fetchrow_num();
+  $db->free_result();
+  setConfig('default_language', $lang_id_int);
+  
   return true;
 }
 
--- a/install/schemas/mysql_stage2.sql	Tue Jan 29 16:19:51 2008 -0500
+++ b/install/schemas/mysql_stage2.sql	Tue Jan 29 16:21:52 2008 -0500
@@ -321,7 +321,7 @@
   ('stpatty', 'St. Patty', 2, 'shamrock.css', 1);
 
 INSERT INTO {{TABLE_PREFIX}}users(user_id, username, password, email, real_name, user_level, theme, style, signature, reg_time, account_active, user_registration_ip) VALUES
-  (1, 'Anonymous', 'invalid-pass-hash', 'anonspam@enanocms.org', 'None', 1, 'oxygen', 'bleu', '', 0, 0),
+  (1, 'Anonymous', 'invalid-pass-hash', 'anonspam@enanocms.org', 'None', 1, 'oxygen', 'bleu', '', 0, 0, '{{IP_ADDRESS}}'),
   (2, '{{ADMIN_USER}}', '{{ADMIN_PASS}}', '{{ADMIN_EMAIL}}', '{{REAL_NAME}}', 9, 'oxygen', 'bleu', '', UNIX_TIMESTAMP(), 1, '{{IP_ADDRESS}}');
   
 INSERT INTO {{TABLE_PREFIX}}users_extra(user_id) VALUES
--- a/language/english/user.json	Tue Jan 29 16:19:51 2008 -0500
+++ b/language/english/user.json	Tue Jan 29 16:21:52 2008 -0500
@@ -201,6 +201,8 @@
       sec_pm_drafts: 'Drafts',
       sec_pm_archive: 'Archive',
       
+      btn_memberlist: 'list of registered members',
+      
       // CP home
       intro_heading_main: '%username%, welcome to your control panel',
       intro_para1: 'Here you can make changes to your profile, view statistics on yourself on this site, and set your preferences.',
--- a/plugins/SpecialUserPrefs.php	Tue Jan 29 16:19:51 2008 -0500
+++ b/plugins/SpecialUserPrefs.php	Tue Jan 29 16:21:52 2008 -0500
@@ -46,6 +46,7 @@
 function userprefs_jbox_setup(&$button, &$tb, &$menubtn)
 {
   global $db, $session, $paths, $template, $plugins; // Common objects
+  global $lang;
   
   if ( $paths->namespace != 'Special' || $paths->page_id != 'Preferences' )
     return false;
@@ -54,7 +55,7 @@
   $template->toolbar_menu = '';
   
   $button->assign_vars(array(
-      'TEXT' => 'list of registered members',
+      'TEXT' => $lang->get('usercp_btn_memberlist'),
       'FLAGS' => '',
       'PARENTFLAGS' => '',
       'HREF' => makeUrlNS('Special', 'Memberlist')