# HG changeset patch # User Dan # Date 1250812915 14400 # Node ID 745200a9cc2a5d8299ccfd05780aa1044efd779d # Parent 6358f769ecb12b84de7c67dc0edd4a8b6e6cc91f Fixed some upgrade bugs; added support for choosing one's own date/time formats; rebrand as 1.1.7 diff -r 6358f769ecb1 -r 745200a9cc2a ajax.php --- a/ajax.php Wed Aug 19 01:28:47 2009 -0400 +++ b/ajax.php Thu Aug 20 20:01:55 2009 -0400 @@ -2,8 +2,7 @@ /* * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between - * Version 1.1.6 (Caoineag beta 1) - * Copyright (C) 2006-2008 Dan Fuhry + * Copyright (C) 2006-2009 Dan Fuhry * * This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. @@ -96,7 +95,7 @@ $row =& $draft_row; $return['have_draft'] = true; $return['draft_author'] = $row['author']; - $return['draft_time'] = enano_date('d M Y h:i a', intval($row['time_id'])); + $return['draft_time'] = enano_date(ED_DATE | ED_TIME, intval($row['time_id'])); if ( isset($_GET['get_draft']) && @$_GET['get_draft'] === '1' ) { $return['src'] = $row['page_text']; @@ -286,7 +285,7 @@ $return = array( 'mode' => 'obsolete', 'author' => $row['author'], - 'date_string' => enano_date('d M Y h:i a', $row['time_id']), + 'date_string' => enano_date(ED_DATE | ED_TIME, $row['time_id']), 'time' => $row['time_id'] // time() ??? ); echo enano_json_encode($return); diff -r 6358f769ecb1 -r 745200a9cc2a cron.php --- a/cron.php Wed Aug 19 01:28:47 2009 -0400 +++ b/cron.php Thu Aug 20 20:01:55 2009 -0400 @@ -2,8 +2,7 @@ /* * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between - * Version 1.1.6 (Caoineag beta 1) - * Copyright (C) 2006-2008 Dan Fuhry + * Copyright (C) 2006-2009 Dan Fuhry * * This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. diff -r 6358f769ecb1 -r 745200a9cc2a includes/cache.php --- a/includes/cache.php Wed Aug 19 01:28:47 2009 -0400 +++ b/includes/cache.php Thu Aug 20 20:01:55 2009 -0400 @@ -2,8 +2,7 @@ /* * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between - * Version 1.1.6 (Caoineag beta 1) - * Copyright (C) 2006-2008 Dan Fuhry + * Copyright (C) 2006-2009 Dan Fuhry * * This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. diff -r 6358f769ecb1 -r 745200a9cc2a includes/captcha.php --- a/includes/captcha.php Wed Aug 19 01:28:47 2009 -0400 +++ b/includes/captcha.php Thu Aug 20 20:01:55 2009 -0400 @@ -2,8 +2,7 @@ /* * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between - * Version 1.1.6 (Caoineag beta 1) - * Copyright (C) 2006-2008 Dan Fuhry + * Copyright (C) 2006-2009 Dan Fuhry * captcha.php - visual confirmation system used during registration * * This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License diff -r 6358f769ecb1 -r 745200a9cc2a includes/captcha/engine_default.php --- a/includes/captcha/engine_default.php Wed Aug 19 01:28:47 2009 -0400 +++ b/includes/captcha/engine_default.php Thu Aug 20 20:01:55 2009 -0400 @@ -2,8 +2,7 @@ /* * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between - * Version 1.1.6 (Caoineag beta 1) - * Copyright (C) 2006-2008 Dan Fuhry + * Copyright (C) 2006-2009 Dan Fuhry * captcha.php - visual confirmation system used during registration * * This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License diff -r 6358f769ecb1 -r 745200a9cc2a includes/captcha/engine_failsafe.php --- a/includes/captcha/engine_failsafe.php Wed Aug 19 01:28:47 2009 -0400 +++ b/includes/captcha/engine_failsafe.php Thu Aug 20 20:01:55 2009 -0400 @@ -2,8 +2,7 @@ /* * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between - * Version 1.1.6 (Caoineag beta 1) - * Copyright (C) 2006-2008 Dan Fuhry + * Copyright (C) 2006-2009 Dan Fuhry * captcha.php - visual confirmation system used during registration * * This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License diff -r 6358f769ecb1 -r 745200a9cc2a includes/captcha/engine_potpourri.php --- a/includes/captcha/engine_potpourri.php Wed Aug 19 01:28:47 2009 -0400 +++ b/includes/captcha/engine_potpourri.php Thu Aug 20 20:01:55 2009 -0400 @@ -2,8 +2,7 @@ /* * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between - * Version 1.1.6 (Caoineag beta 1) - * Copyright (C) 2006-2008 Dan Fuhry + * Copyright (C) 2006-2009 Dan Fuhry * captcha.php - visual confirmation system used during registration * * This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License diff -r 6358f769ecb1 -r 745200a9cc2a includes/clientside/jscompress.php --- a/includes/clientside/jscompress.php Wed Aug 19 01:28:47 2009 -0400 +++ b/includes/clientside/jscompress.php Thu Aug 20 20:01:55 2009 -0400 @@ -2,8 +2,7 @@ /* * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between - * Version 1.1.6 (Caoineag beta 1) - * Copyright (C) 2006-2008 Dan Fuhry + * Copyright (C) 2006-2009 Dan Fuhry * jsres.php - the Enano client-side runtime, a.k.a. AJAX on steroids * * This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License diff -r 6358f769ecb1 -r 745200a9cc2a includes/clientside/jsres.php --- a/includes/clientside/jsres.php Wed Aug 19 01:28:47 2009 -0400 +++ b/includes/clientside/jsres.php Thu Aug 20 20:01:55 2009 -0400 @@ -2,8 +2,7 @@ /* * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between - * Version 1.1.6 (Caoineag beta 1) - * Copyright (C) 2006-2008 Dan Fuhry + * Copyright (C) 2006-2009 Dan Fuhry * jsres.php - the Enano client-side runtime, a.k.a. AJAX on steroids * * This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License diff -r 6358f769ecb1 -r 745200a9cc2a includes/clientside/tinymce/tiny_mce_gzip.php --- a/includes/clientside/tinymce/tiny_mce_gzip.php Wed Aug 19 01:28:47 2009 -0400 +++ b/includes/clientside/tinymce/tiny_mce_gzip.php Thu Aug 20 20:01:55 2009 -0400 @@ -2,8 +2,7 @@ /* * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between - * Version 1.1.6 (Caoineag beta 1) - * Copyright (C) 2006-2008 Dan Fuhry + * Copyright (C) 2006-2009 Dan Fuhry * tiny_mce_gzip.php - TinyMCE gzip and caching script, stock from MoxieCode with one modification * * This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License diff -r 6358f769ecb1 -r 745200a9cc2a includes/comment.php --- a/includes/comment.php Wed Aug 19 01:28:47 2009 -0400 +++ b/includes/comment.php Thu Aug 20 20:01:55 2009 -0400 @@ -2,8 +2,7 @@ /* * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between - * Version 1.1.6 (Caoineag beta 1) - * Copyright (C) 2006-2008 Dan Fuhry + * Copyright (C) 2006-2009 Dan Fuhry * * This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. @@ -157,7 +156,7 @@ } // Format date - $row['time'] = enano_date('F d, Y h:i a', $row['time']); + $row['time'] = enano_date(ED_DATE | ED_TIME, $row['time']); // Format signature $row['signature'] = ( !empty($row['signature']) ) ? RenderMan::render($row['signature']) : ''; @@ -319,7 +318,7 @@ if ( $appr === COMMENT_APPROVED && $spam_policy === 'moderate' && !$spamcheck ) $appr = COMMENT_SPAM; $time = time(); - $date = enano_date('F d, Y h:i a', $time); + $date = enano_date(ED_DATE | ED_TIME, $time); $ip = $_SERVER['REMOTE_ADDR']; if ( !is_valid_ip($ip) ) die('Hacking attempt'); diff -r 6358f769ecb1 -r 745200a9cc2a includes/common.php --- a/includes/common.php Wed Aug 19 01:28:47 2009 -0400 +++ b/includes/common.php Thu Aug 20 20:01:55 2009 -0400 @@ -2,8 +2,7 @@ /* * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between - * Version 1.1.6 (Caoineag beta 1) - * Copyright (C) 2006-2008 Dan Fuhry + * Copyright (C) 2006-2009 Dan Fuhry * * This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. @@ -44,7 +43,7 @@ // be the expected output of enano_version(), which will always be in the // format of 1.0.2, 1.0.2a1, 1.0.2b1, 1.0.2RC1 // You'll want to change this for custom distributions. -$version = '1.1.6'; +$version = '1.1.7'; /** * Returns a floating-point number with the current UNIX timestamp in microseconds. Defined very early because we gotta call it diff -r 6358f769ecb1 -r 745200a9cc2a includes/common_cli.php --- a/includes/common_cli.php Wed Aug 19 01:28:47 2009 -0400 +++ b/includes/common_cli.php Thu Aug 20 20:01:55 2009 -0400 @@ -2,8 +2,7 @@ /* * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between - * Version 1.1.6 (Caoineag beta 1) - * Copyright (C) 2006-2008 Dan Fuhry + * Copyright (C) 2006-2009 Dan Fuhry * * This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. diff -r 6358f769ecb1 -r 745200a9cc2a includes/constants.php --- a/includes/constants.php Wed Aug 19 01:28:47 2009 -0400 +++ b/includes/constants.php Thu Aug 20 20:01:55 2009 -0400 @@ -2,8 +2,7 @@ /* * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between - * Version 1.1.6 (Caoineag beta 1) - * Copyright (C) 2006-2008 Dan Fuhry + * Copyright (C) 2006-2009 Dan Fuhry * constants.php - important defines used Enano-wide * * This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License @@ -103,6 +102,23 @@ define('THIRD_SUNDAY', 3); define('LAST_SUNDAY', 4); +// Date types +define('DATE_1', 'y/m/d'); +define('DATE_2', 'y/d/m'); +define('DATE_3', 'Y-m-d'); +define('DATE_4', 'F d, Y'); +// 12 hour, no seconds +define('TIME_12_NS', 'g:i A'); +// 12 hour, seconds +define('TIME_12_S', 'g:i:s A'); +// 24 hour, no seconds +define('TIME_24_NS', 'G:i'); +// 24 hour, seconds +define('TIME_24_S', 'G:i:s'); + +define('ED_DATE', 1); +define('ED_TIME', 2); + // Rendering options! /** diff -r 6358f769ecb1 -r 745200a9cc2a includes/dbal.php --- a/includes/dbal.php Wed Aug 19 01:28:47 2009 -0400 +++ b/includes/dbal.php Thu Aug 20 20:01:55 2009 -0400 @@ -2,8 +2,7 @@ /* * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between - * Version 1.1.6 (Caoineag beta 1) - * Copyright (C) 2006-2008 Dan Fuhry + * Copyright (C) 2006-2009 Dan Fuhry * * This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. diff -r 6358f769ecb1 -r 745200a9cc2a includes/diff.php --- a/includes/diff.php Wed Aug 19 01:28:47 2009 -0400 +++ b/includes/diff.php Thu Aug 20 20:01:55 2009 -0400 @@ -2,8 +2,7 @@ /* * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between - * Version 1.1.6 (Caoineag beta 1) - * Copyright (C) 2006-2008 Dan Fuhry + * Copyright (C) 2006-2009 Dan Fuhry * * This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. diff -r 6358f769ecb1 -r 745200a9cc2a includes/diffiehellman.php --- a/includes/diffiehellman.php Wed Aug 19 01:28:47 2009 -0400 +++ b/includes/diffiehellman.php Thu Aug 20 20:01:55 2009 -0400 @@ -2,8 +2,7 @@ /* * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between - * Version 1.1.6 (Caoineag beta 1) - * Copyright (C) 2006-2008 Dan Fuhry + * Copyright (C) 2006-2009 Dan Fuhry * diffiehellman.php - Diffie Hellman key exchange and supporting functions * * This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License diff -r 6358f769ecb1 -r 745200a9cc2a includes/email.php --- a/includes/email.php Wed Aug 19 01:28:47 2009 -0400 +++ b/includes/email.php Thu Aug 20 20:01:55 2009 -0400 @@ -2,8 +2,7 @@ /* * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between - * Version 1.1.6 (Caoineag beta 1) - * Copyright (C) 2006-2008 Dan Fuhry + * Copyright (C) 2006-2009 Dan Fuhry * * This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. @@ -247,7 +246,7 @@ { $this->mimeOut .= "From: ".$szFromAddress."\n"; $this->mimeOut .= "To: ".$this->emailAddress."\n"; - $this->mimeOut .= "Date: ".enano_date("D, d M Y H:i:s") . " UT\n"; + $this->mimeOut .= "Date: ".enano_date('r') . " UT\n"; $this->mimeOut .= "Reply-To:".$szFromAddress."\n"; $this->mimeOut .= "Subject: ".$this->mailSubject."\n"; $this->mimeOut .= "X-Mailer: PHP/".phpversion()."\n"; diff -r 6358f769ecb1 -r 745200a9cc2a includes/functions.php --- a/includes/functions.php Wed Aug 19 01:28:47 2009 -0400 +++ b/includes/functions.php Thu Aug 20 20:01:55 2009 -0400 @@ -2,8 +2,7 @@ /* * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between - * Version 1.1.6 (Caoineag beta 1) - * Copyright (C) 2006-2008 Dan Fuhry + * Copyright (C) 2006-2009 Dan Fuhry * * This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. @@ -258,6 +257,31 @@ if ( !is_int($timestamp) && !is_double($timestamp) && strval(intval($timestamp)) !== $timestamp ) $timestamp = time(); + if ( is_int($string) ) + { + global $session, $lang; + $date_fmt = is_object($session) ? $session->date_format : DATE_4; + $time_fmt = is_object($session) ? $session->time_format : TIME_24_NS; + + // within a week? use a relative date + if ( $timestamp + ( 86400 * 7 ) >= time() && $string & ED_DATE && is_object($lang) && is_object($session) ) + { + $relative_date = get_relative_date($timestamp); + if ( $string === ED_DATE ) + // why do more work if we're done? + return $relative_date; + } + + $flags = $string; + $string = array(); + if ( $flags & ED_DATE && !isset($relative_date) ) + $string[] = $date_fmt; + if ( $flags & ED_TIME ) + $string[] = $time_fmt; + + $string = implode(' ', $string); + } + // perform timestamp offset global $timezone; // it's gonna be in minutes, so multiply by 60 to offset the unix timestamp @@ -272,7 +296,63 @@ } // Let PHP do the work for us =) - return gmdate($string, $timestamp); + $result = gmdate($string, $timestamp); + if ( isset($relative_date) ) + { + $result = "$relative_date, $result"; + } + return $result; +} + +/** + * Get a relative date ("Today"/"Yesterday"/"N days ago") + * @param int Timestamp + * @return string + */ + +function get_relative_date($time) +{ + global $lang, $session; + // Our formatting string to pass to enano_date() + // This should not include minute/second info, only today's date in whatever format suits your fancy + $formatstring = $session->date_format; + // Today's date + $today = enano_date($formatstring); + // Yesterday's date + $yesterday = enano_date($formatstring, (time() - (24*60*60))); + // Date on the input + $then = enano_date($formatstring, $time); + // "X days ago" logic + for ( $i = 2; $i <= 6; $i++ ) + { + // hours_in_day * minutes_in_hour * seconds_in_minute * num_days + $offset = 24 * 60 * 60 * $i; + $days_ago = enano_date($formatstring, (time() - $offset)); + // so does the input timestamp match the date from $i days ago? + if ( $then == $days_ago ) + { + // yes, return $i + return $lang->get('userfuncs_ml_date_daysago', array('days_ago' => $i)); + } + } + // either yesterday, today, or before 6 days ago + switch($then) + { + case $today: + return $lang->get('userfuncs_ml_date_today'); + case $yesterday: + return $lang->get('userfuncs_ml_date_yesterday'); + default: + return $then; + } + // .--. + // |o_o | + // |!_/ | + // // \ \ + // (| | ) + // /'\_ _/`\ + // \___)=(___/ + return 'Linux rocks!'; } /** @@ -1233,7 +1313,8 @@ '1.1.3' => 'Caoineag alpha 3', '1.1.4' => 'Caoineag alpha 4', '1.1.5' => 'Caoineag alpha 5', - '1.1.6' => 'Caoineag beta 1' + '1.1.6' => 'Caoineag beta 1', + '1.1.7' => 'Caoineag beta 2' ); $version = enano_version(); if ( isset($names[$version]) ) diff -r 6358f769ecb1 -r 745200a9cc2a includes/hmac.php --- a/includes/hmac.php Wed Aug 19 01:28:47 2009 -0400 +++ b/includes/hmac.php Thu Aug 20 20:01:55 2009 -0400 @@ -2,8 +2,7 @@ /* * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between - * Version 1.1.6 (Caoineag beta 1) - * Copyright (C) 2006-2008 Dan Fuhry + * Copyright (C) 2006-2009 Dan Fuhry * hmac.php - HMAC cryptographic functions * * This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License diff -r 6358f769ecb1 -r 745200a9cc2a includes/http.php --- a/includes/http.php Wed Aug 19 01:28:47 2009 -0400 +++ b/includes/http.php Thu Aug 20 20:01:55 2009 -0400 @@ -2,8 +2,7 @@ /* * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between - * Version 1.1.6 (Caoineag beta 1) - * Copyright (C) 2006-2008 Dan Fuhry + * Copyright (C) 2006-2009 Dan Fuhry * class_http.php - Pure PHP HTTP client library * * This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License diff -r 6358f769ecb1 -r 745200a9cc2a includes/js-compressor.php --- a/includes/js-compressor.php Wed Aug 19 01:28:47 2009 -0400 +++ b/includes/js-compressor.php Thu Aug 20 20:01:55 2009 -0400 @@ -2,8 +2,7 @@ /* * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between - * Version 1.1.6 (Caoineag beta 1) - * Copyright (C) 2006-2008 Dan Fuhry + * Copyright (C) 2006-2009 Dan Fuhry * Javascript compression library - used to compact the client-side Javascript code (all 72KB of it!) to save some bandwidth * * This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License diff -r 6358f769ecb1 -r 745200a9cc2a includes/lang.php --- a/includes/lang.php Wed Aug 19 01:28:47 2009 -0400 +++ b/includes/lang.php Thu Aug 20 20:01:55 2009 -0400 @@ -2,8 +2,7 @@ /* * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between - * Version 1.1.6 (Caoineag beta 1) - * Copyright (C) 2006-2008 Dan Fuhry + * Copyright (C) 2006-2009 Dan Fuhry * * This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. diff -r 6358f769ecb1 -r 745200a9cc2a includes/log.php --- a/includes/log.php Wed Aug 19 01:28:47 2009 -0400 +++ b/includes/log.php Thu Aug 20 20:01:55 2009 -0400 @@ -2,8 +2,7 @@ /* * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between - * Version 1.1.6 (Caoineag beta 1) - * Copyright (C) 2006-2008 Dan Fuhry + * Copyright (C) 2006-2009 Dan Fuhry * log.php - Logs table parsing and displaying * * This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License diff -r 6358f769ecb1 -r 745200a9cc2a includes/math.php --- a/includes/math.php Wed Aug 19 01:28:47 2009 -0400 +++ b/includes/math.php Thu Aug 20 20:01:55 2009 -0400 @@ -2,8 +2,7 @@ /* * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between - * Version 1.1.6 (Caoineag beta 1) - * Copyright (C) 2006-2008 Dan Fuhry + * Copyright (C) 2006-2009 Dan Fuhry * diffiehellman.php - Diffie Hellman key exchange and supporting functions * * This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License diff -r 6358f769ecb1 -r 745200a9cc2a includes/namespaces/admin.php --- a/includes/namespaces/admin.php Wed Aug 19 01:28:47 2009 -0400 +++ b/includes/namespaces/admin.php Thu Aug 20 20:01:55 2009 -0400 @@ -2,8 +2,7 @@ /* * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between - * Version 1.1.6 (Caoineag beta 1) - * Copyright (C) 2006-2008 Dan Fuhry + * Copyright (C) 2006-2009 Dan Fuhry * * This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. diff -r 6358f769ecb1 -r 745200a9cc2a includes/namespaces/api.php --- a/includes/namespaces/api.php Wed Aug 19 01:28:47 2009 -0400 +++ b/includes/namespaces/api.php Thu Aug 20 20:01:55 2009 -0400 @@ -2,8 +2,7 @@ /* * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between - * Version 1.1.6 (Caoineag beta 1) - * Copyright (C) 2006-2008 Dan Fuhry + * Copyright (C) 2006-2009 Dan Fuhry * * This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. diff -r 6358f769ecb1 -r 745200a9cc2a includes/namespaces/default.php --- a/includes/namespaces/default.php Wed Aug 19 01:28:47 2009 -0400 +++ b/includes/namespaces/default.php Thu Aug 20 20:01:55 2009 -0400 @@ -2,8 +2,7 @@ /* * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between - * Version 1.1.6 (Caoineag beta 1) - * Copyright (C) 2006-2008 Dan Fuhry + * Copyright (C) 2006-2009 Dan Fuhry * * This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. @@ -398,8 +397,8 @@ echo '
' . $lang->get('page_msg_archived_title') . '
' . $lang->get('page_msg_archived_body', array( - 'archive_date' => enano_date('F d, Y', $this->revision_time), - 'archive_time' => enano_date('h:i a', $this->revision_time), + 'archive_date' => enano_date(ED_DATE, $this->revision_time), + 'archive_time' => enano_date(ED_TIME, $this->revision_time), 'current_link' => makeUrlNS($this->namespace, $this->page_id), 'restore_link' => makeUrlNS($this->namespace, $this->page_id, 'do=edit&revid='.$this->revision_id), 'restore_onclick' => 'ajaxEditor(\''.$this->revision_id.'\'); return false;', @@ -580,7 +579,7 @@ { $r = $db->fetchrow(); $standard_404 .= '

' . $lang->get('page_msg_404_was_deleted', array( - 'delete_time' => enano_date('d M Y h:i a', $r['time_id']), + 'delete_time' => enano_date(ED_DATE | ED_TIME, $r['time_id']), 'delete_reason' => htmlspecialchars($r['edit_summary']), 'rollback_flags' => 'href="'.makeUrl($paths->page, 'do=rollback&id='.$r['log_id']).'" onclick="ajaxRollback(\''.$r['log_id'].'\'); return false;"' )) diff -r 6358f769ecb1 -r 745200a9cc2a includes/namespaces/file.php --- a/includes/namespaces/file.php Wed Aug 19 01:28:47 2009 -0400 +++ b/includes/namespaces/file.php Thu Aug 20 20:01:55 2009 -0400 @@ -2,8 +2,7 @@ /* * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between - * Version 1.1.6 (Caoineag beta 1) - * Copyright (C) 2006-2008 Dan Fuhry + * Copyright (C) 2006-2009 Dan Fuhry * * This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. @@ -70,7 +69,7 @@ } $r = $db->fetchrow(); $mimetype = $r['mimetype']; - $datestring = enano_date('F d, Y h:i a', (int)$r['time_id']); + $datestring = enano_date(ED_DATE | ED_TIME, (int)$r['time_id']); $html .= '

' . $lang->get('onpage_filebox_heading') . '

' . $lang->get('onpage_filebox_lbl_type') . ' '.$r['mimetype'].'
'; diff -r 6358f769ecb1 -r 745200a9cc2a includes/namespaces/special.php --- a/includes/namespaces/special.php Wed Aug 19 01:28:47 2009 -0400 +++ b/includes/namespaces/special.php Thu Aug 20 20:01:55 2009 -0400 @@ -2,8 +2,7 @@ /* * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between - * Version 1.1.6 (Caoineag beta 1) - * Copyright (C) 2006-2008 Dan Fuhry + * Copyright (C) 2006-2009 Dan Fuhry * * This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. diff -r 6358f769ecb1 -r 745200a9cc2a includes/namespaces/template.php --- a/includes/namespaces/template.php Wed Aug 19 01:28:47 2009 -0400 +++ b/includes/namespaces/template.php Thu Aug 20 20:01:55 2009 -0400 @@ -2,8 +2,7 @@ /* * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between - * Version 1.1.6 (Caoineag beta 1) - * Copyright (C) 2006-2008 Dan Fuhry + * Copyright (C) 2006-2009 Dan Fuhry * * This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. diff -r 6358f769ecb1 -r 745200a9cc2a includes/namespaces/user.php --- a/includes/namespaces/user.php Wed Aug 19 01:28:47 2009 -0400 +++ b/includes/namespaces/user.php Thu Aug 20 20:01:55 2009 -0400 @@ -2,8 +2,7 @@ /* * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between - * Version 1.1.6 (Caoineag beta 1) - * Copyright (C) 2006-2008 Dan Fuhry + * Copyright (C) 2006-2009 Dan Fuhry * * This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. @@ -201,7 +200,7 @@ ' . $lang->get('userpage_lbl_joined') . ' - ' . enano_date('F d, Y h:i a', $userdata['reg_time']) . ' + ' . enano_date(ED_DATE | ED_TIME, $userdata['reg_time']) . ' '; echo ' ' . $lang->get('userpage_lbl_num_comments') . ' @@ -238,7 +237,7 @@ { do { - $row['time'] = enano_date('F d, Y', $row['time']); + $row['time'] = enano_date(ED_DATE, $row['time']); $comments[] = $row; } while ( $row = $db->fetchrow() ); diff -r 6358f769ecb1 -r 745200a9cc2a includes/output.php --- a/includes/output.php Wed Aug 19 01:28:47 2009 -0400 +++ b/includes/output.php Thu Aug 20 20:01:55 2009 -0400 @@ -2,9 +2,8 @@ /* * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between - * Version 1.1.6 (Caoineag beta 1) * output.php - Controls output format, messages of death, that kind of stuff - * Copyright (C) 2006-2008 Dan Fuhry + * Copyright (C) 2006-2009 Dan Fuhry * * This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. diff -r 6358f769ecb1 -r 745200a9cc2a includes/pageprocess.php --- a/includes/pageprocess.php Wed Aug 19 01:28:47 2009 -0400 +++ b/includes/pageprocess.php Thu Aug 20 20:01:55 2009 -0400 @@ -2,9 +2,8 @@ /* * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between - * Version 1.1.6 (Caoineag beta 1) * pageprocess.php - intelligent retrieval of pages - * Copyright (C) 2006-2008 Dan Fuhry + * Copyright (C) 2006-2009 Dan Fuhry * * This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. @@ -457,7 +456,7 @@ $time = time(); $edit_summary = ( strval($edit_summary) === $edit_summary ) ? $db->escape($edit_summary) : ''; $minor_edit = ( $minor_edit ) ? '1' : '0'; - $date_string = enano_date('d M Y h:i a'); + $date_string = enano_date(ED_DATE | ED_TIME); // Insert log entry $sql = 'INSERT INTO ' . table_prefix . "logs ( time_id, date_string, log_type, action, page_id, namespace, author, page_text, edit_summary, minor_edit, page_format )\n" @@ -590,7 +589,7 @@ // Query 3: Log entry $db->sql_query('INSERT INTO ' . table_prefix."logs(time_id, date_string, log_type, action, author, page_id, namespace)\n" - . " VALUES ( " . time() . ", '" . enano_date('d M Y h:i a') . "', 'page', 'create', \n" + . " VALUES ( " . time() . ", 'DEPRECATED', 'page', 'create', \n" . " '" . $db->escape($session->username) . "', '" . $db->escape($this->page_id) . "', '" . $this->namespace . "');"); if ( !$q ) $db->_die('PageProcessor page creation - logging stage'); @@ -653,7 +652,7 @@ $log_entry = $db->fetchrow(); $db->free_result(); - $dateline = enano_date('d M Y h:i a', $log_entry['time_id']); + $dateline = enano_date(ED_DATE | ED_TIME, $log_entry['time_id']); // Let's see, what do we have here... switch ( $log_entry['action'] ) @@ -1133,7 +1132,7 @@ global $email; // Log it for crying out loud - $q = $db->sql_query('INSERT INTO '.table_prefix.'logs(log_type,action,time_id,date_string,author,edit_summary,page_text) VALUES(\'security\', \'illegal_page\', '.time().', \''.enano_date('d M Y h:i a').'\', \''.$db->escape($session->username).'\', \''.$db->escape($_SERVER['REMOTE_ADDR']).'\', \'' . $db->escape(serialize(array($this->page_id, $this->namespace))) . '\')'); + $q = $db->sql_query('INSERT INTO '.table_prefix.'logs(log_type,action,time_id,date_string,author,edit_summary,page_text) VALUES(\'security\', \'illegal_page\', '.time().', \'DEPRECATED\', \''.$db->escape($session->username).'\', \''.$db->escape($_SERVER['REMOTE_ADDR']).'\', \'' . $db->escape(serialize(array($this->page_id, $this->namespace))) . '\')'); $ob = ''; //$template->tpl_strings['PAGE_NAME'] = 'Access denied'; diff -r 6358f769ecb1 -r 745200a9cc2a includes/pageutils.php --- a/includes/pageutils.php Wed Aug 19 01:28:47 2009 -0400 +++ b/includes/pageutils.php Thu Aug 20 20:01:55 2009 -0400 @@ -2,8 +2,7 @@ /* * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between - * Version 1.1.6 (Caoineag beta 1) - * Copyright (C) 2006-2008 Dan Fuhry + * Copyright (C) 2006-2009 Dan Fuhry * pageutils.php - a class that handles raw page manipulations, used mostly by AJAX requests or their old-fashioned form-based counterparts * * This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License @@ -205,7 +204,7 @@ $qa = $db->sql_query('INSERT INTO ' . table_prefix.'pages(name,urlname,namespace,visible,protected,delvote_ips) VALUES(\'' . $db->escape($name) . '\', \'' . $db->escape($page_id) . '\', \'' . $namespace . '\', '. ( $visible ? '1' : '0' ) .', ' . $prot . ', \'' . $db->escape(serialize($ips)) . '\');'); $qb = $db->sql_query('INSERT INTO ' . table_prefix.'page_text(page_id,namespace) VALUES(\'' . $db->escape($page_id) . '\', \'' . $namespace . '\');'); - $qc = $db->sql_query('INSERT INTO ' . table_prefix.'logs(time_id,date_string,log_type,action,author,page_id,namespace) VALUES('.time().', \''.enano_date('d M Y h:i a').'\', \'page\', \'create\', \'' . $session->username . '\', \'' . $db->escape($page_id) . '\', \'' . $namespace . '\');'); + $qc = $db->sql_query('INSERT INTO ' . table_prefix.'logs(time_id,date_string,log_type,action,author,page_id,namespace) VALUES('.time().', \'DEPRECATED\', \'page\', \'create\', \'' . $session->username . '\', \'' . $db->escape($page_id) . '\', \'' . $namespace . '\');'); if($qa && $qb && $qc) return 'good'; @@ -332,7 +331,7 @@ if($ticker < $numrows) echo ''."\n"; else echo ''; // Date and time - echo '' . enano_date('d M Y h:i a', intval($r['time_id'])) . ''."\n"; + echo '' . enano_date(ED_DATE | ED_TIME, intval($r['time_id'])) . ''."\n"; // User if ( $session->get_permissions('mod_misc') && is_valid_ip($r['author']) ) @@ -408,7 +407,7 @@ echo ''; // Date and time - echo '' . enano_date('d M Y h:i a', intval($r['time_id'])) . ''; + echo '' . enano_date(ED_DATE | ED_TIME, intval($r['time_id'])) . ''; // User echo 'fetchrow(); $db->free_result(); $minor_edit = ( ENANO_DBLAYER == 'MYSQL' ) ? 'false' : '0'; - $q='INSERT INTO ' . table_prefix.'logs(log_type,action,time_id,date_string,page_id,namespace,page_text,char_tag,author,edit_summary,minor_edit) VALUES(\'page\', \'edit\', '.time().', \''.enano_date('d M Y h:i a').'\', \'' . $page_id . '\', \'' . $namespace . '\', \'' . $db->escape($row['page_text']) . '\', \'' . $row['char_tag'] . '\', \'' . $session->username . '\', \''."Automatic backup created when logs were purged".'\', '.$minor_edit.');'; + $q='INSERT INTO ' . table_prefix.'logs(log_type,action,time_id,date_string,page_id,namespace,page_text,char_tag,author,edit_summary,minor_edit) VALUES(\'page\', \'edit\', '.time().', \''.enano_date(ED_DATE | ED_TIME).'\', \'' . $page_id . '\', \'' . $namespace . '\', \'' . $db->escape($row['page_text']) . '\', \'' . $row['char_tag'] . '\', \'' . $session->username . '\', \''."Automatic backup created when logs were purged".'\', '.$minor_edit.');'; if(!$db->sql_query($q)) $db->_die('The history (log) entry could not be inserted into the logs table.'); } return $lang->get('ajax_clearlogs_success'); @@ -1043,7 +1042,7 @@ return $lang->get('etc_access_denied_need_reauth'); } - $e = $db->sql_query('INSERT INTO ' . table_prefix.'logs(time_id,date_string,log_type,action,page_id,namespace,author,edit_summary) VALUES('.time().', \''.enano_date('d M Y h:i a').'\', \'page\', \'delete\', \'' . $page_id . '\', \'' . $namespace . '\', \'' . $session->username . '\', \'' . $db->escape(htmlspecialchars($reason)) . '\')'); + $e = $db->sql_query('INSERT INTO ' . table_prefix.'logs(time_id,date_string,log_type,action,page_id,namespace,author,edit_summary) VALUES('.time().', \''.enano_date(ED_DATE | ED_TIME).'\', \'page\', \'delete\', \'' . $page_id . '\', \'' . $namespace . '\', \'' . $session->username . '\', \'' . $db->escape(htmlspecialchars($reason)) . '\')'); if(!$e) $db->_die('The page log entry could not be inserted.'); $e = $db->sql_query('DELETE FROM ' . table_prefix.'categories WHERE page_id=\'' . $page_id . '\' AND namespace=\'' . $namespace . '\''); if(!$e) $db->_die('The page categorization entries could not be deleted.'); @@ -1600,8 +1599,8 @@ } $text1 = $row1['page_text']; $text2 = $row2['page_text']; - $time1 = enano_date('F d, Y h:i a', $row1['time_id']); - $time2 = enano_date('F d, Y h:i a', $row2['time_id']); + $time1 = enano_date(ED_DATE | ED_TIME, $row1['time_id']); + $time2 = enano_date(ED_DATE | ED_TIME, $row2['time_id']); $_ob = "

" . $lang->get('history_lbl_comparingrevisions') . " {$time1} → {$time2}

"; diff -r 6358f769ecb1 -r 745200a9cc2a includes/paths.php --- a/includes/paths.php Wed Aug 19 01:28:47 2009 -0400 +++ b/includes/paths.php Thu Aug 20 20:01:55 2009 -0400 @@ -2,8 +2,7 @@ /** * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between - * Version 1.1.6 (Caoineag beta 1) - * Copyright (C) 2006-2008 Dan Fuhry + * Copyright (C) 2006-2009 Dan Fuhry * paths.php - The part of Enano that actually manages content. Everything related to page handling and namespaces is in here. * * This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License diff -r 6358f769ecb1 -r 745200a9cc2a includes/plugins.php --- a/includes/plugins.php Wed Aug 19 01:28:47 2009 -0400 +++ b/includes/plugins.php Thu Aug 20 20:01:55 2009 -0400 @@ -2,8 +2,7 @@ /* * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between - * Version 1.1.6 (Caoineag beta 1) - * Copyright (C) 2006-2008 Dan Fuhry + * Copyright (C) 2006-2009 Dan Fuhry * * This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. diff -r 6358f769ecb1 -r 745200a9cc2a includes/render.php --- a/includes/render.php Wed Aug 19 01:28:47 2009 -0400 +++ b/includes/render.php Thu Aug 20 20:01:55 2009 -0400 @@ -2,8 +2,7 @@ /* * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between - * Version 1.1.6 (Caoineag beta 1) - * Copyright (C) 2006-2008 Dan Fuhry + * Copyright (C) 2006-2009 Dan Fuhry * render.php - handles fetching pages and parsing them into HTML * * This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License diff -r 6358f769ecb1 -r 745200a9cc2a includes/search.php --- a/includes/search.php Wed Aug 19 01:28:47 2009 -0400 +++ b/includes/search.php Thu Aug 20 20:01:55 2009 -0400 @@ -2,8 +2,7 @@ /* * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between - * Version 1.1.6 (Caoineag beta 1) - * Copyright (C) 2006-2008 Dan Fuhry + * Copyright (C) 2006-2009 Dan Fuhry * search.php - algorithm used to search pages * * This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License diff -r 6358f769ecb1 -r 745200a9cc2a includes/sessions.php --- a/includes/sessions.php Wed Aug 19 01:28:47 2009 -0400 +++ b/includes/sessions.php Thu Aug 20 20:01:55 2009 -0400 @@ -2,8 +2,7 @@ /* * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between - * Version 1.1.6 (Caoineag beta 1) - * Copyright (C) 2006-2008 Dan Fuhry + * Copyright (C) 2006-2009 Dan Fuhry * sessions.php - everything related to security and user management * * This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License @@ -158,6 +157,20 @@ var $auth_level = 1; /** + * Preference for date formatting + * @var string + */ + + var $date_format = DATE_4; + + /** + * Preference for time formatting + * @var string + */ + + var $time_format = TIME_24_NS; + + /** * State variable to track if a session timed out * @var bool */ @@ -724,11 +737,11 @@ // This wasn't logged in <1.0.2, dunno how it slipped through if ( $level > USER_LEVEL_MEMBER ) $this->sql('INSERT INTO ' . table_prefix . "logs(log_type,action,time_id,date_string,author,edit_summary,page_text) VALUES\n" - . ' (\'security\', \'admin_auth_bad\', '.time().', \''.enano_date('d M Y h:i a').'\', \''.$db->escape($username).'\', ' + . ' (\'security\', \'admin_auth_bad\', '.time().', \''.enano_date(ED_DATE | ED_TIME).'\', \''.$db->escape($username).'\', ' . '\''.$db->escape($_SERVER['REMOTE_ADDR']).'\', ' . intval($level) . ')'); else $this->sql('INSERT INTO ' . table_prefix . "logs(log_type,action,time_id,date_string,author,edit_summary) VALUES\n" - . ' (\'security\', \'auth_bad\', '.time().', \''.enano_date('d M Y h:i a').'\', \''.$db->escape($username).'\', ' + . ' (\'security\', \'auth_bad\', '.time().', \''.enano_date(ED_DATE | ED_TIME).'\', \''.$db->escape($username).'\', ' . '\''.$db->escape($_SERVER['REMOTE_ADDR']).'\')'); // Do we also need to increment the lockout countdown? @@ -826,9 +839,9 @@ if($sess) { if($level > USER_LEVEL_MEMBER) - $this->sql('INSERT INTO '.table_prefix.'logs(log_type,action,time_id,date_string,author,edit_summary,page_text) VALUES(\'security\', \'admin_auth_good\', '.time().', \''.enano_date('d M Y h:i a').'\', \''.$db->escape($username).'\', \''.$db->escape($_SERVER['REMOTE_ADDR']).'\', ' . intval($level) . ')'); + $this->sql('INSERT INTO '.table_prefix.'logs(log_type,action,time_id,date_string,author,edit_summary,page_text) VALUES(\'security\', \'admin_auth_good\', '.time().', \''.enano_date(ED_DATE | ED_TIME).'\', \''.$db->escape($username).'\', \''.$db->escape($_SERVER['REMOTE_ADDR']).'\', ' . intval($level) . ')'); else - $this->sql('INSERT INTO '.table_prefix.'logs(log_type,action,time_id,date_string,author,edit_summary) VALUES(\'security\', \'auth_good\', '.time().', \''.enano_date('d M Y h:i a').'\', \''.$db->escape($username).'\', \''.$db->escape($_SERVER['REMOTE_ADDR']).'\')'); + $this->sql('INSERT INTO '.table_prefix.'logs(log_type,action,time_id,date_string,author,edit_summary) VALUES(\'security\', \'auth_good\', '.time().', \''.enano_date(ED_DATE | ED_TIME).'\', \''.$db->escape($username).'\', \''.$db->escape($_SERVER['REMOTE_ADDR']).'\')'); $code = $plugins->setHook('login_success'); foreach ( $code as $cmd ) @@ -849,9 +862,9 @@ else { if($level > USER_LEVEL_MEMBER) - $this->sql('INSERT INTO '.table_prefix.'logs(log_type,action,time_id,date_string,author,edit_summary,page_text) VALUES(\'security\', \'admin_auth_bad\', '.time().', \''.enano_date('d M Y h:i a').'\', \''.$db->escape($username).'\', \''.$db->escape($_SERVER['REMOTE_ADDR']).'\', ' . intval($level) . ')'); + $this->sql('INSERT INTO '.table_prefix.'logs(log_type,action,time_id,date_string,author,edit_summary,page_text) VALUES(\'security\', \'admin_auth_bad\', '.time().', \''.enano_date(ED_DATE | ED_TIME).'\', \''.$db->escape($username).'\', \''.$db->escape($_SERVER['REMOTE_ADDR']).'\', ' . intval($level) . ')'); else - $this->sql('INSERT INTO '.table_prefix.'logs(log_type,action,time_id,date_string,author,edit_summary) VALUES(\'security\', \'auth_bad\', '.time().', \''.enano_date('d M Y h:i a').'\', \''.$db->escape($username).'\', \''.$db->escape($_SERVER['REMOTE_ADDR']).'\')'); + $this->sql('INSERT INTO '.table_prefix.'logs(log_type,action,time_id,date_string,author,edit_summary) VALUES(\'security\', \'auth_bad\', '.time().', \''.enano_date(ED_DATE | ED_TIME).'\', \''.$db->escape($username).'\', \''.$db->escape($_SERVER['REMOTE_ADDR']).'\')'); // Do we also need to increment the lockout countdown? if ( !defined('IN_ENANO_INSTALL') && $lockout_data['lockout_policy'] != 'disable' ) @@ -967,6 +980,7 @@ // For now, make the cookie last forever, we can change this in 1.1.x setcookie( 'sid', $session_key, time()+15552000, scriptPath.'/', null, $GLOBALS['is_https']); $_COOKIE['sid'] = $session_key; + $this->sid = $session_key; } // $keyhash is stored in the database, this is for compatibility with the older DB structure $keyhash = md5($session_key); @@ -1192,7 +1206,7 @@ . " u.reg_time, u.account_active, u.activation_key, u.user_lang, u.user_timezone, u.user_title, u.user_dst,\n" . " k.salt, k.source_ip, k.time, k.auth_level, k.key_type, x.user_id, x.user_aim, x.user_yahoo, x.user_msn,\n" . " x.user_xmpp, x.user_homepage, x.user_location, x.user_job, x.user_hobbies, x.email_public,\n" - . " x.disable_js_fx"; + . " x.disable_js_fx, x.date_format, x.time_format"; $joins = " LEFT JOIN " . table_prefix . "users AS u\n" . " ON ( u.user_id=k.user_id )\n" @@ -1221,14 +1235,14 @@ if ( !$query && ( defined('IN_ENANO_INSTALL') or defined('IN_ENANO_UPGRADE') ) ) { - $query = $this->sql('SELECT u.user_id AS uid,u.username,u.password,\'\' AS password_salt,u.email,u.real_name,u.user_level,u.theme,u.style,u.signature,u.reg_time,u.account_active,u.activation_key,k.source_ip,k.time,k.auth_level,COUNT(p.message_id) AS num_pms, 1440 AS user_timezone, \'0;0;0;0;60\' AS user_dst, ' . SK_SHORT . ' AS key_type FROM '.table_prefix.'session_keys AS k + $key_md5 = $loose_call ? $key : md5($key); + $query = $this->sql('SELECT u.user_id AS uid,u.username,u.password,\'\' AS password_salt,u.email,u.real_name,u.user_level,u.theme,u.style,u.signature,u.reg_time,u.account_active,u.activation_key,k.source_ip,k.time,k.auth_level,COUNT(p.message_id) AS num_pms, 1440 AS user_timezone, \'0;0;0;0;60\' AS user_dst, ' . SK_SHORT . ' AS key_type, k.salt FROM '.table_prefix.'session_keys AS k LEFT JOIN '.table_prefix.'users AS u ON ( u.user_id=k.user_id ) LEFT JOIN '.table_prefix.'privmsgs AS p ON ( p.message_to=u.username AND p.message_read=0 ) - WHERE k.session_key=\''.$key.'\' - AND k.salt=\''.$salt.'\' - GROUP BY u.user_id,u.username,u.password,u.email,u.real_name,u.user_level,u.theme,u.style,u.signature,u.reg_time,u.account_active,u.activation_key,k.source_ip,k.time,k.auth_level;'); + WHERE k.session_key=\''.$key_md5.'\' + GROUP BY u.user_id,u.username,u.password,u.email,u.real_name,u.user_level,u.theme,u.style,u.signature,u.reg_time,u.account_active,u.activation_key,k.source_ip,k.time,k.auth_level,k.salt;'); } else if ( !$query ) { @@ -1236,7 +1250,7 @@ } if($db->numrows() < 1) { - // echo '(debug) $session->validate_session: Key was not found in database
'; + echo '(debug) $session->validate_session: Key was not found in database: ' . $key_md5 . '
'; return false; } $row = $db->fetchrow(); @@ -1346,6 +1360,11 @@ $user_extra[$column] = ''; } + if ( isset($row['date_format']) ) + $this->date_format = $row['date_format']; + if ( isset($row['time_format']) ) + $this->time_format = $row['time_format']; + $this->user_extra = $user_extra; // Leave the rest to PHP's automatic garbage collector ;-) @@ -2229,7 +2248,7 @@ function admin_activation_request($u) { global $db; - $this->sql('INSERT INTO '.table_prefix.'logs(log_type, action, time_id, date_string, author, edit_summary) VALUES(\'admin\', \'activ_req\', '.time().', \''.enano_date('d M Y h:i a').'\', \''.$this->username.'\', \''.$db->escape($u).'\');'); + $this->sql('INSERT INTO '.table_prefix.'logs(log_type, action, time_id, date_string, author, edit_summary) VALUES(\'admin\', \'activ_req\', '.time().', \''.enano_date(ED_DATE | ED_TIME).'\', \''.$this->username.'\', \''.$db->escape($u).'\');'); } /** @@ -2245,11 +2264,11 @@ $r = mysql_affected_rows(); if ( $r > 0 ) { - $e = $this->sql('INSERT INTO '.table_prefix.'logs(log_type,action,time_id,date_string,author,edit_summary) VALUES(\'security\', \'activ_good\', '.time().', \''.enano_date('d M Y h:i a').'\', \''.$db->escape($user).'\', \''.$_SERVER['REMOTE_ADDR'].'\')'); + $e = $this->sql('INSERT INTO '.table_prefix.'logs(log_type,action,time_id,date_string,author,edit_summary) VALUES(\'security\', \'activ_good\', '.time().', \''.enano_date(ED_DATE | ED_TIME).'\', \''.$db->escape($user).'\', \''.$_SERVER['REMOTE_ADDR'].'\')'); } else { - $e = $this->sql('INSERT INTO '.table_prefix.'logs(log_type,action,time_id,date_string,author,edit_summary) VALUES(\'security\', \'activ_bad\', '.time().', \''.enano_date('d M Y h:i a').'\', \''.$db->escape($user).'\', \''.$_SERVER['REMOTE_ADDR'].'\')'); + $e = $this->sql('INSERT INTO '.table_prefix.'logs(log_type,action,time_id,date_string,author,edit_summary) VALUES(\'security\', \'activ_bad\', '.time().', \''.enano_date(ED_DATE | ED_TIME).'\', \''.$db->escape($user).'\', \''.$_SERVER['REMOTE_ADDR'].'\')'); } return $r; } diff -r 6358f769ecb1 -r 745200a9cc2a includes/sql_parse.php --- a/includes/sql_parse.php Wed Aug 19 01:28:47 2009 -0400 +++ b/includes/sql_parse.php Thu Aug 20 20:01:55 2009 -0400 @@ -2,8 +2,7 @@ /* * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between - * Version 1.1.6 (Caoineag beta 1) - * Copyright (C) 2006-2008 Dan Fuhry + * Copyright (C) 2006-2009 Dan Fuhry * Installation package * sql_parse.php - SQL query splitter and templater * diff -r 6358f769ecb1 -r 745200a9cc2a includes/stats.php --- a/includes/stats.php Wed Aug 19 01:28:47 2009 -0400 +++ b/includes/stats.php Thu Aug 20 20:01:55 2009 -0400 @@ -2,8 +2,7 @@ /* * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between - * Version 1.1.6 (Caoineag beta 1) - * Copyright (C) 2006-2008 Dan Fuhry + * Copyright (C) 2006-2009 Dan Fuhry * stats.php - handles statistics for pages (disablable in the admin CP) * * ***** UNFINISHED ***** diff -r 6358f769ecb1 -r 745200a9cc2a includes/tagcloud.php --- a/includes/tagcloud.php Wed Aug 19 01:28:47 2009 -0400 +++ b/includes/tagcloud.php Thu Aug 20 20:01:55 2009 -0400 @@ -2,8 +2,7 @@ /* * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between - * Version 1.1.6 (Caoineag beta 1) - * Copyright (C) 2006-2008 Dan Fuhry + * Copyright (C) 2006-2009 Dan Fuhry * * This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. diff -r 6358f769ecb1 -r 745200a9cc2a includes/template.php --- a/includes/template.php Wed Aug 19 01:28:47 2009 -0400 +++ b/includes/template.php Thu Aug 20 20:01:55 2009 -0400 @@ -2,8 +2,7 @@ /* * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between - * Version 1.1.6 (Caoineag beta 1) - * Copyright (C) 2006-2008 Dan Fuhry + * Copyright (C) 2006-2009 Dan Fuhry * * This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. @@ -2596,7 +2595,7 @@ $messages = array(); while ( $row = $db->fetchrow() ) { - $messages[] = '
' . $row['subject'] . ''; + $messages[] = '' . $row['subject'] . ''; } $ob .= implode(",\n " , $messages)."\n"; $ob .= '
'."\n"; diff -r 6358f769ecb1 -r 745200a9cc2a includes/wikiengine/Tables.php --- a/includes/wikiengine/Tables.php Wed Aug 19 01:28:47 2009 -0400 +++ b/includes/wikiengine/Tables.php Thu Aug 20 20:01:55 2009 -0400 @@ -2,8 +2,7 @@ /* * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between - * Version 1.1.6 (Caoineag beta 1) - * Copyright (C) 2006-2008 Dan Fuhry + * Copyright (C) 2006-2009 Dan Fuhry * * This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. diff -r 6358f769ecb1 -r 745200a9cc2a includes/wikiengine/TagSanitizer.php --- a/includes/wikiengine/TagSanitizer.php Wed Aug 19 01:28:47 2009 -0400 +++ b/includes/wikiengine/TagSanitizer.php Thu Aug 20 20:01:55 2009 -0400 @@ -2,8 +2,7 @@ /* * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between - * Version 1.1.6 (Caoineag beta 1) - * Copyright (C) 2006-2008 Dan Fuhry + * Copyright (C) 2006-2009 Dan Fuhry * * This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. diff -r 6358f769ecb1 -r 745200a9cc2a includes/wikiengine/parse_mediawiki.php --- a/includes/wikiengine/parse_mediawiki.php Wed Aug 19 01:28:47 2009 -0400 +++ b/includes/wikiengine/parse_mediawiki.php Thu Aug 20 20:01:55 2009 -0400 @@ -2,8 +2,7 @@ /* * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between - * Version 1.1.6 (Caoineag beta 1) - * Copyright (C) 2006-2008 Dan Fuhry + * Copyright (C) 2006-2009 Dan Fuhry * * This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. diff -r 6358f769ecb1 -r 745200a9cc2a includes/wikiengine/render_xhtml.php --- a/includes/wikiengine/render_xhtml.php Wed Aug 19 01:28:47 2009 -0400 +++ b/includes/wikiengine/render_xhtml.php Thu Aug 20 20:01:55 2009 -0400 @@ -2,8 +2,7 @@ /* * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between - * Version 1.1.6 (Caoineag beta 1) - * Copyright (C) 2006-2008 Dan Fuhry + * Copyright (C) 2006-2009 Dan Fuhry * * This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. diff -r 6358f769ecb1 -r 745200a9cc2a includes/wikiformat.php --- a/includes/wikiformat.php Wed Aug 19 01:28:47 2009 -0400 +++ b/includes/wikiformat.php Thu Aug 20 20:01:55 2009 -0400 @@ -2,8 +2,7 @@ /* * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between - * Version 1.1.6 (Caoineag beta 1) - * Copyright (C) 2006-2008 Dan Fuhry + * Copyright (C) 2006-2009 Dan Fuhry * * This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. diff -r 6358f769ecb1 -r 745200a9cc2a index.php --- a/index.php Wed Aug 19 01:28:47 2009 -0400 +++ b/index.php Thu Aug 20 20:01:55 2009 -0400 @@ -2,8 +2,7 @@ /* * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between - * Version 1.1.6 (Caoineag beta 1) - * Copyright (C) 2006-2008 Dan Fuhry + * Copyright (C) 2006-2009 Dan Fuhry * * This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. diff -r 6358f769ecb1 -r 745200a9cc2a install/includes/cli-core.php --- a/install/includes/cli-core.php Wed Aug 19 01:28:47 2009 -0400 +++ b/install/includes/cli-core.php Thu Aug 20 20:01:55 2009 -0400 @@ -2,8 +2,7 @@ /* * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between - * Version 1.1.6 (Caoineag beta 1) - * Copyright (C) 2006-2008 Dan Fuhry + * Copyright (C) 2006-2009 Dan Fuhry * Installation package * cli-core.php - CLI installation wizard/core * diff -r 6358f769ecb1 -r 745200a9cc2a install/includes/common.php --- a/install/includes/common.php Wed Aug 19 01:28:47 2009 -0400 +++ b/install/includes/common.php Thu Aug 20 20:01:55 2009 -0400 @@ -2,8 +2,7 @@ /* * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between - * Version 1.1.6 (Caoineag beta 1) - * Copyright (C) 2006-2008 Dan Fuhry + * Copyright (C) 2006-2009 Dan Fuhry * Installation package * common.php - Installer common functions * @@ -16,7 +15,7 @@ // Our version number. This needs to be changed for any custom releases. $installer_version = array( - 'version' => '1.1.6', + 'version' => '1.1.7', 'type' => 'beta' // If type is set to "rc", "beta", or "alpha", optionally another version number can be issued with the key 'sub': // 'sub' => '3' will produce Enano 1.1.1a3 / Enano 1.1.1 alpha 3 diff -r 6358f769ecb1 -r 745200a9cc2a install/includes/libenanoinstall.php --- a/install/includes/libenanoinstall.php Wed Aug 19 01:28:47 2009 -0400 +++ b/install/includes/libenanoinstall.php Thu Aug 20 20:01:55 2009 -0400 @@ -2,8 +2,7 @@ /* * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between - * Version 1.1.6 (Caoineag beta 1) - * Copyright (C) 2006-2008 Dan Fuhry + * Copyright (C) 2006-2009 Dan Fuhry * Installation package * libenanoinstall.php - Installation payload backend * diff -r 6358f769ecb1 -r 745200a9cc2a install/includes/libenanoinstallcli.php --- a/install/includes/libenanoinstallcli.php Wed Aug 19 01:28:47 2009 -0400 +++ b/install/includes/libenanoinstallcli.php Thu Aug 20 20:01:55 2009 -0400 @@ -2,8 +2,7 @@ /* * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between - * Version 1.1.6 (Caoineag beta 1) - * Copyright (C) 2006-2008 Dan Fuhry + * Copyright (C) 2006-2009 Dan Fuhry * Installation package * libenanoinstallcli.php - Installer frontend logic, CLI version * diff -r 6358f769ecb1 -r 745200a9cc2a install/includes/payload.php --- a/install/includes/payload.php Wed Aug 19 01:28:47 2009 -0400 +++ b/install/includes/payload.php Thu Aug 20 20:01:55 2009 -0400 @@ -2,8 +2,7 @@ /* * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between - * Version 1.1.6 (Caoineag beta 1) - * Copyright (C) 2006-2008 Dan Fuhry + * Copyright (C) 2006-2009 Dan Fuhry * Installation package * payload.php - Installer payload (the installation logic) * @@ -425,7 +424,7 @@ global $db, $session, $paths, $template, $plugins; // Common objects global $installer_version; - $q = $db->sql_query('INSERT INTO ' . table_prefix . 'logs(log_type,action,time_id,date_string,author,page_text,edit_summary) VALUES(\'security\', \'install_enano\', ' . time() . ', \'' . enano_date('d M Y h:i a') . '\', \'' . $db->escape($_POST['username']) . '\', \'' . $db->escape(enano_version()) . '\', \'' . $db->escape($_SERVER['REMOTE_ADDR']) . '\');'); + $q = $db->sql_query('INSERT INTO ' . table_prefix . 'logs(log_type,action,time_id,date_string,author,page_text,edit_summary) VALUES(\'security\', \'install_enano\', ' . time() . ', \'' . enano_date(ED_DATE | ED_TIME) . '\', \'' . $db->escape($_POST['username']) . '\', \'' . $db->escape(enano_version()) . '\', \'' . $db->escape($_SERVER['REMOTE_ADDR']) . '\');'); if ( !$q ) { echo '

MySQL return: ' . $db->sql_error() . '

'; diff -r 6358f769ecb1 -r 745200a9cc2a install/includes/stages/confirm.php --- a/install/includes/stages/confirm.php Wed Aug 19 01:28:47 2009 -0400 +++ b/install/includes/stages/confirm.php Thu Aug 20 20:01:55 2009 -0400 @@ -2,8 +2,7 @@ /* * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between - * Version 1.1.6 (Caoineag beta 1) - * Copyright (C) 2006-2008 Dan Fuhry + * Copyright (C) 2006-2009 Dan Fuhry * Installation package * confirm.php - Installer installation summary/confirmation stage * diff -r 6358f769ecb1 -r 745200a9cc2a install/includes/stages/database.php --- a/install/includes/stages/database.php Wed Aug 19 01:28:47 2009 -0400 +++ b/install/includes/stages/database.php Thu Aug 20 20:01:55 2009 -0400 @@ -2,8 +2,7 @@ /* * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between - * Version 1.1.6 (Caoineag beta 1) - * Copyright (C) 2006-2008 Dan Fuhry + * Copyright (C) 2006-2009 Dan Fuhry * Installation package * database.php - Installer database driver selection stage * diff -r 6358f769ecb1 -r 745200a9cc2a install/includes/stages/database_mysql.php --- a/install/includes/stages/database_mysql.php Wed Aug 19 01:28:47 2009 -0400 +++ b/install/includes/stages/database_mysql.php Thu Aug 20 20:01:55 2009 -0400 @@ -2,8 +2,7 @@ /* * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between - * Version 1.1.6 (Caoineag beta 1) - * Copyright (C) 2006-2008 Dan Fuhry + * Copyright (C) 2006-2009 Dan Fuhry * Installation package * database_mysql.php - Installer database info page, MySQL * diff -r 6358f769ecb1 -r 745200a9cc2a install/includes/stages/database_post.php --- a/install/includes/stages/database_post.php Wed Aug 19 01:28:47 2009 -0400 +++ b/install/includes/stages/database_post.php Thu Aug 20 20:01:55 2009 -0400 @@ -2,8 +2,7 @@ /* * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between - * Version 1.1.6 (Caoineag beta 1) - * Copyright (C) 2006-2008 Dan Fuhry + * Copyright (C) 2006-2009 Dan Fuhry * Installation package * database_post.php - Database installation, stage 1 * diff -r 6358f769ecb1 -r 745200a9cc2a install/includes/stages/database_postgresql.php --- a/install/includes/stages/database_postgresql.php Wed Aug 19 01:28:47 2009 -0400 +++ b/install/includes/stages/database_postgresql.php Thu Aug 20 20:01:55 2009 -0400 @@ -2,8 +2,7 @@ /* * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between - * Version 1.1.6 (Caoineag beta 1) - * Copyright (C) 2006-2008 Dan Fuhry + * Copyright (C) 2006-2009 Dan Fuhry * Installation package * database_postgresql.php - Installer database info page, PostgreSQL * diff -r 6358f769ecb1 -r 745200a9cc2a install/includes/stages/finish.php --- a/install/includes/stages/finish.php Wed Aug 19 01:28:47 2009 -0400 +++ b/install/includes/stages/finish.php Thu Aug 20 20:01:55 2009 -0400 @@ -2,8 +2,7 @@ /* * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between - * Version 1.1.6 (Caoineag beta 1) - * Copyright (C) 2006-2008 Dan Fuhry + * Copyright (C) 2006-2009 Dan Fuhry * Installation package * finish.php - Installer finalization stage * diff -r 6358f769ecb1 -r 745200a9cc2a install/includes/stages/install.php --- a/install/includes/stages/install.php Wed Aug 19 01:28:47 2009 -0400 +++ b/install/includes/stages/install.php Thu Aug 20 20:01:55 2009 -0400 @@ -2,8 +2,7 @@ /* * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between - * Version 1.1.6 (Caoineag beta 1) - * Copyright (C) 2006-2008 Dan Fuhry + * Copyright (C) 2006-2009 Dan Fuhry * Installation package * install.php - Installer payload stage * diff -r 6358f769ecb1 -r 745200a9cc2a install/includes/stages/license.php --- a/install/includes/stages/license.php Wed Aug 19 01:28:47 2009 -0400 +++ b/install/includes/stages/license.php Thu Aug 20 20:01:55 2009 -0400 @@ -2,8 +2,7 @@ /* * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between - * Version 1.1.6 (Caoineag beta 1) - * Copyright (C) 2006-2008 Dan Fuhry + * Copyright (C) 2006-2009 Dan Fuhry * Installation package * license.php - Installer license-agreement stage * diff -r 6358f769ecb1 -r 745200a9cc2a install/includes/stages/login.php --- a/install/includes/stages/login.php Wed Aug 19 01:28:47 2009 -0400 +++ b/install/includes/stages/login.php Thu Aug 20 20:01:55 2009 -0400 @@ -2,8 +2,7 @@ /* * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between - * Version 1.1.6 (Caoineag beta 1) - * Copyright (C) 2006-2008 Dan Fuhry + * Copyright (C) 2006-2009 Dan Fuhry * Installation package * login.php - Installer login information stage * diff -r 6358f769ecb1 -r 745200a9cc2a install/includes/stages/sysreqs.php --- a/install/includes/stages/sysreqs.php Wed Aug 19 01:28:47 2009 -0400 +++ b/install/includes/stages/sysreqs.php Thu Aug 20 20:01:55 2009 -0400 @@ -2,8 +2,7 @@ /* * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between - * Version 1.1.6 (Caoineag beta 1) - * Copyright (C) 2006-2008 Dan Fuhry + * Copyright (C) 2006-2009 Dan Fuhry * Installation package * sysreqs.php - Installer system-requirements page * diff -r 6358f769ecb1 -r 745200a9cc2a install/includes/stages/website.php --- a/install/includes/stages/website.php Wed Aug 19 01:28:47 2009 -0400 +++ b/install/includes/stages/website.php Thu Aug 20 20:01:55 2009 -0400 @@ -2,8 +2,7 @@ /* * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between - * Version 1.1.6 (Caoineag beta 1) - * Copyright (C) 2006-2008 Dan Fuhry + * Copyright (C) 2006-2009 Dan Fuhry * Installation package * website.php - Installer website-settings stage * diff -r 6358f769ecb1 -r 745200a9cc2a install/includes/ui.php --- a/install/includes/ui.php Wed Aug 19 01:28:47 2009 -0400 +++ b/install/includes/ui.php Thu Aug 20 20:01:55 2009 -0400 @@ -2,8 +2,7 @@ /* * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between - * Version 1.1.6 (Caoineag beta 1) - * Copyright (C) 2006-2008 Dan Fuhry + * Copyright (C) 2006-2009 Dan Fuhry * Installation package * ui.php - User interface for installations and upgrades * diff -r 6358f769ecb1 -r 745200a9cc2a install/index.php --- a/install/index.php Wed Aug 19 01:28:47 2009 -0400 +++ b/install/index.php Thu Aug 20 20:01:55 2009 -0400 @@ -2,8 +2,7 @@ /* * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between - * Version 1.1.6 (Caoineag beta 1) - * Copyright (C) 2006-2008 Dan Fuhry + * Copyright (C) 2006-2009 Dan Fuhry * Installation package * welcome.php - Portal to upgrade, readme, and install pages * diff -r 6358f769ecb1 -r 745200a9cc2a install/install-cli.php --- a/install/install-cli.php Wed Aug 19 01:28:47 2009 -0400 +++ b/install/install-cli.php Thu Aug 20 20:01:55 2009 -0400 @@ -3,8 +3,7 @@ /* * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between - * Version 1.1.6 (Caoineag beta 1) - * Copyright (C) 2006-2008 Dan Fuhry + * Copyright (C) 2006-2009 Dan Fuhry * Installation package * install-cli.php - CLI installation frontend stub * diff -r 6358f769ecb1 -r 745200a9cc2a install/install.php --- a/install/install.php Wed Aug 19 01:28:47 2009 -0400 +++ b/install/install.php Thu Aug 20 20:01:55 2009 -0400 @@ -2,8 +2,7 @@ /* * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between - * Version 1.1.6 (Caoineag beta 1) - * Copyright (C) 2006-2008 Dan Fuhry + * Copyright (C) 2006-2009 Dan Fuhry * Installation package * install.php - Main installation interface * diff -r 6358f769ecb1 -r 745200a9cc2a install/readme.php --- a/install/readme.php Wed Aug 19 01:28:47 2009 -0400 +++ b/install/readme.php Thu Aug 20 20:01:55 2009 -0400 @@ -2,8 +2,7 @@ /* * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between - * Version 1.1.6 (Caoineag beta 1) - * Copyright (C) 2006-2008 Dan Fuhry + * Copyright (C) 2006-2009 Dan Fuhry * Installation package * install.php - Main installation interface * diff -r 6358f769ecb1 -r 745200a9cc2a install/schemas/mysql_stage2.sql --- a/install/schemas/mysql_stage2.sql Wed Aug 19 01:28:47 2009 -0400 +++ b/install/schemas/mysql_stage2.sql Thu Aug 20 20:01:55 2009 -0400 @@ -135,6 +135,8 @@ user_hobbies text, email_public tinyint(1) NOT NULL DEFAULT 0, disable_js_fx tinyint(1) NOT NULL DEFAULT 0, + date_format varchar(32) NOT NULL DEFAULT 'F d, Y', + time_format varchar(32) NOT NULL DEFAULT 'G:i', PRIMARY KEY ( user_id ) ) CHARACTER SET `utf8` COLLATE `utf8_bin`; diff -r 6358f769ecb1 -r 745200a9cc2a install/schemas/postgresql_stage2.sql --- a/install/schemas/postgresql_stage2.sql Wed Aug 19 01:28:47 2009 -0400 +++ b/install/schemas/postgresql_stage2.sql Thu Aug 20 20:01:55 2009 -0400 @@ -136,6 +136,8 @@ user_hobbies text, email_public smallint NOT NULL DEFAULT 0, disable_js_fx smallint NOT NULL DEFAULT 0, + date_format varchar(32) NOT NULL DEFAULT 'F d, Y', + time_format varchar(32) NOT NULL DEFAULT 'G:i', PRIMARY KEY ( user_id ) ); diff -r 6358f769ecb1 -r 745200a9cc2a install/schemas/upgrade/1.1.6-1.1.7-mysql.sql --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/install/schemas/upgrade/1.1.6-1.1.7-mysql.sql Thu Aug 20 20:01:55 2009 -0400 @@ -0,0 +1,2 @@ +ALTER TABLE {{TABLE_PREFIX}}users_extra ADD COLUMN date_format varchar(32) NOT NULL DEFAULT 'F d, Y'; +ALTER TABLE {{TABLE_PREFIX}}users_extra ADD COLUMN time_format varchar(32) NOT NULL DEFAULT 'G:i'; diff -r 6358f769ecb1 -r 745200a9cc2a install/schemas/upgrade/1.1.6-1.1.7-postgresql.sql --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/install/schemas/upgrade/1.1.6-1.1.7-postgresql.sql Thu Aug 20 20:01:55 2009 -0400 @@ -0,0 +1,2 @@ +ALTER TABLE {{TABLE_PREFIX}}users_extra ADD COLUMN date_format varchar(32) NOT NULL DEFAULT 'F d, Y'; +ALTER TABLE {{TABLE_PREFIX}}users_extra ADD COLUMN time_format varchar(32) NOT NULL DEFAULT 'G:i'; diff -r 6358f769ecb1 -r 745200a9cc2a install/upgrade.php --- a/install/upgrade.php Wed Aug 19 01:28:47 2009 -0400 +++ b/install/upgrade.php Thu Aug 20 20:01:55 2009 -0400 @@ -2,8 +2,7 @@ /* * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between - * Version 1.1.6 (Caoineag beta 1) - * Copyright (C) 2006-2008 Dan Fuhry + * Copyright (C) 2006-2009 Dan Fuhry * Installation package * upgrade.php - Upgrade interface * @@ -19,7 +18,7 @@ // The list of versions in THIS AND PREVIOUS branches, in chronological order. $enano_versions = array(); $enano_versions['1.0'] = array('1.0', '1.0.1', '1.0.2b1', '1.0.2', '1.0.3', '1.0.4', '1.0.5', '1.0.6'); -$enano_versions['1.1'] = array('1.1.1', '1.1.2', '1.1.3', '1.1.4', '1.1.5', '1.1.6'); +$enano_versions['1.1'] = array('1.1.1', '1.1.2', '1.1.3', '1.1.4', '1.1.5', '1.1.6', '1.1.7'); // If true, this will do a full langimport instead of only adding new strings. // Will probably be left on, but some change probably needs to be made to mark @@ -108,6 +107,9 @@ if ( !$session->user_logged_in || ( $session->user_logged_in && $session->auth_level < USER_LEVEL_ADMIN ) ) { + // if we're not logged in, destroy any existing session keys in the browser + @setcookie('sid', '', time() - 86400); + $ui->set_visible_stage($stg_login); if ( isset($_POST['do_login']) ) { diff -r 6358f769ecb1 -r 745200a9cc2a language/english/user.json --- a/language/english/user.json Wed Aug 19 01:28:47 2009 -0400 +++ b/language/english/user.json Thu Aug 20 20:01:55 2009 -0400 @@ -317,6 +317,8 @@ publicinfo_field_changetheme_title: 'Change theme:', publicinfo_field_changetheme_hint: 'If you don\'t like the look of the site, need a visual break, or are just curious, we might have some different themes for you to try out!', publicinfo_field_changetheme: 'Change my theme...', + publicinfo_field_dateformat: 'Date format:', + publicinfo_field_timeformat: 'Time format:', publicinfo_field_timezone: 'Time zone:', publicinfo_field_timezone_hint: 'Select the time zone you live in and when Daylight Savings Time occurs, if at all.', publicinfo_field_dst: 'Daylight saving time:', diff -r 6358f769ecb1 -r 745200a9cc2a plugins/PrivateMessages.php --- a/plugins/PrivateMessages.php Wed Aug 19 01:28:47 2009 -0400 +++ b/plugins/PrivateMessages.php Thu Aug 20 20:01:55 2009 -0400 @@ -12,8 +12,7 @@ /* * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between - * Version 1.1.6 (Caoineag beta 1) - * Copyright (C) 2006-2008 Dan Fuhry + * Copyright (C) 2006-2009 Dan Fuhry * * This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. @@ -83,7 +82,7 @@
- + '; + echo ''; } $db->free_result(); } diff -r 6358f769ecb1 -r 745200a9cc2a plugins/SpecialAdmin.php --- a/plugins/SpecialAdmin.php Wed Aug 19 01:28:47 2009 -0400 +++ b/plugins/SpecialAdmin.php Thu Aug 20 20:01:55 2009 -0400 @@ -12,8 +12,7 @@ /* * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between - * Version 1.1.6 (Caoineag beta 1) - * Copyright (C) 2006-2008 Dan Fuhry + * Copyright (C) 2006-2009 Dan Fuhry * * This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. @@ -1482,7 +1481,7 @@ $filename = 'enano_backup_' . enano_date('ymd') . '.sql' . $aesext; ob_start(); // Spew some headers - $headdate = enano_date('F d, Y \a\t h:i a'); + $headdate = enano_date(ED_DATE | ED_TIME); echo <<
username} @@ -1494,7 +1493,7 @@ $tables = array_merge($base, $add); // Log it! - $e = $db->sql_query('INSERT INTO '.table_prefix.'logs(log_type,action,time_id,date_string,author,edit_summary,page_text) VALUES(\'security\', \'db_backup\', '.time().', \''.enano_date('d M Y h:i a').'\', \''.$db->escape($session->username).'\', \''.$db->escape($_SERVER['REMOTE_ADDR']).'\', \'' . $db->escape(implode(', ', $tables)) . '\')'); + $e = $db->sql_query('INSERT INTO '.table_prefix.'logs(log_type,action,time_id,date_string,author,edit_summary,page_text) VALUES(\'security\', \'db_backup\', '.time().', \''.enano_date(ED_DATE | ED_TIME).'\', \''.$db->escape($session->username).'\', \''.$db->escape($_SERVER['REMOTE_ADDR']).'\', \'' . $db->escape(implode(', ', $tables)) . '\')'); if ( !$e ) $db->_die(); diff -r 6358f769ecb1 -r 745200a9cc2a plugins/SpecialCSS.php --- a/plugins/SpecialCSS.php Wed Aug 19 01:28:47 2009 -0400 +++ b/plugins/SpecialCSS.php Thu Aug 20 20:01:55 2009 -0400 @@ -12,8 +12,7 @@ /* * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between - * Version 1.1.6 (Caoineag beta 1) - * Copyright (C) 2006-2008 Dan Fuhry + * Copyright (C) 2006-2009 Dan Fuhry * * This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. diff -r 6358f769ecb1 -r 745200a9cc2a plugins/SpecialGroups.php --- a/plugins/SpecialGroups.php Wed Aug 19 01:28:47 2009 -0400 +++ b/plugins/SpecialGroups.php Thu Aug 20 20:01:55 2009 -0400 @@ -12,7 +12,6 @@ /* * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between - * Version 1.1.6 (Caoineag beta 1) * Copyright (C) 2007 Dan Fuhry * * This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License @@ -377,7 +376,7 @@ foreach ( $pending as $member ) { - $date = enano_date('F d, Y', $member['reg_time']); + $date = enano_date(ED_DATE, $member['reg_time']); $cls = ( $cls == 'row2' ) ? 'row1' : 'row2'; $addy = $email->encryptEmail($member['email']); @@ -423,7 +422,7 @@ if ( $member['is_mod'] != 1 ) break; - $date = enano_date('F d, Y', $member['reg_time']); + $date = enano_date(ED_DATE, $member['reg_time']); $cls = ( $cls == 'row2' ) ? 'row1' : 'row2'; $addy = $email->encryptEmail($member['email']); @@ -447,7 +446,7 @@ if ( $member['is_mod'] == 1 ) continue; - $date = enano_date('F d, Y', $member['reg_time']); + $date = enano_date(ED_DATE, $member['reg_time']); $cls = ( $cls == 'row2' ) ? 'row1' : 'row2'; $addy = $email->encryptEmail($member['email']); diff -r 6358f769ecb1 -r 745200a9cc2a plugins/SpecialLog.php --- a/plugins/SpecialLog.php Wed Aug 19 01:28:47 2009 -0400 +++ b/plugins/SpecialLog.php Thu Aug 20 20:01:55 2009 -0400 @@ -12,8 +12,7 @@ /* * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between - * Version 1.1.6 (Caoineag beta 1) - * Copyright (C) 2006-2008 Dan Fuhry + * Copyright (C) 2006-2009 Dan Fuhry * * This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. diff -r 6358f769ecb1 -r 745200a9cc2a plugins/SpecialPageFuncs.php --- a/plugins/SpecialPageFuncs.php Wed Aug 19 01:28:47 2009 -0400 +++ b/plugins/SpecialPageFuncs.php Thu Aug 20 20:01:55 2009 -0400 @@ -12,8 +12,7 @@ /* * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between - * Version 1.1.6 (Caoineag beta 1) - * Copyright (C) 2006-2008 Dan Fuhry + * Copyright (C) 2006-2009 Dan Fuhry * * This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. diff -r 6358f769ecb1 -r 745200a9cc2a plugins/SpecialSearch.php --- a/plugins/SpecialSearch.php Wed Aug 19 01:28:47 2009 -0400 +++ b/plugins/SpecialSearch.php Thu Aug 20 20:01:55 2009 -0400 @@ -12,8 +12,7 @@ /* * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between - * Version 1.1.6 (Caoineag beta 1) - * Copyright (C) 2006-2008 Dan Fuhry + * Copyright (C) 2006-2009 Dan Fuhry * * This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. diff -r 6358f769ecb1 -r 745200a9cc2a plugins/SpecialUpdownload.php --- a/plugins/SpecialUpdownload.php Wed Aug 19 01:28:47 2009 -0400 +++ b/plugins/SpecialUpdownload.php Thu Aug 20 20:01:55 2009 -0400 @@ -12,8 +12,7 @@ /* * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between - * Version 1.1.6 (Caoineag beta 1) - * Copyright (C) 2006-2008 Dan Fuhry + * Copyright (C) 2006-2009 Dan Fuhry * SpecialUpdownload.php - handles uploading and downloading of user-uploaded files - possibly the most rigorously security-enforcing script in all of Enano, although sessions.php comes in a close second * * This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License @@ -128,13 +127,13 @@ if(!$db->sql_query('INSERT INTO '.table_prefix.'files(time_id,page_id,filename,size,mimetype,file_extension,file_key) VALUES('.$utime.', \''.$urln.'\', \''.$filename.'\', '.$flen.', \''.$type.'\', \''.$ext.'\', \''.$key.'\')')) $db->_die('The file data entry could not be inserted.'); if(!isset($_POST['update'])) { - if(!$db->sql_query('INSERT INTO '.table_prefix.'logs(time_id,date_string,log_type,action,author,page_id,namespace) VALUES('.$utime.', \''.enano_date('d M Y h:i a').'\', \'page\', \'create\', \''.$session->username.'\', \''.$filename.'\', \''.'File'.'\');')) $db->_die('The page log could not be updated.'); + if(!$db->sql_query('INSERT INTO '.table_prefix.'logs(time_id,date_string,log_type,action,author,page_id,namespace) VALUES('.$utime.', \''.enano_date(ED_DATE | ED_TIME).'\', \'page\', \'create\', \''.$session->username.'\', \''.$filename.'\', \''.'File'.'\');')) $db->_die('The page log could not be updated.'); if(!$db->sql_query('INSERT INTO '.table_prefix.'pages(name,urlname,namespace,protected,delvotes,delvote_ips) VALUES(\''.$filename.'\', \''.$urln.'\', \'File\', 0, 0, \'\')')) $db->_die('The page listing entry could not be inserted.'); if(!$db->sql_query('INSERT INTO '.table_prefix.'page_text(page_id,namespace,page_text,char_tag) VALUES(\''.$urln.'\', \'File\', \''.$comments.'\', \''.$chartag.'\')')) $db->_die('The page text entry could not be inserted.'); } else { - if(!$db->sql_query('INSERT INTO '.table_prefix.'logs(time_id,date_string,log_type,action,author,page_id,namespace,edit_summary) VALUES('.$utime.', \''.enano_date('d M Y h:i a').'\', \'page\', \'reupload\', \''.$session->username.'\', \''.$filename.'\', \''.'File'.'\', \''.$comments.'\');')) $db->_die('The page log could not be updated.'); + if(!$db->sql_query('INSERT INTO '.table_prefix.'logs(time_id,date_string,log_type,action,author,page_id,namespace,edit_summary) VALUES('.$utime.', \''.enano_date(ED_DATE | ED_TIME).'\', \'page\', \'reupload\', \''.$session->username.'\', \''.$filename.'\', \''.'File'.'\', \''.$comments.'\');')) $db->_die('The page log could not be updated.'); } $cache->purge('page_meta'); die_friendly($lang->get('upload_success_title'), '

' . $lang->get('upload_success_body', array('file_link' => makeUrlNS('File', $filename))) . '

'); diff -r 6358f769ecb1 -r 745200a9cc2a plugins/SpecialUserFuncs.php --- a/plugins/SpecialUserFuncs.php Wed Aug 19 01:28:47 2009 -0400 +++ b/plugins/SpecialUserFuncs.php Thu Aug 20 20:01:55 2009 -0400 @@ -12,8 +12,7 @@ /* * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between - * Version 1.1.6 (Caoineag beta 1) - * Copyright (C) 2006-2008 Dan Fuhry + * Copyright (C) 2006-2009 Dan Fuhry * * This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. @@ -1838,47 +1837,8 @@ public static function format_date($time) { - global $lang; - // Our formattting string to pass to enano_date() - // This should not include minute/second info, only today's date in whatever format suits your fancy - $formatstring = 'F j, Y'; - // Today's date - $today = enano_date($formatstring); - // Yesterday's date - $yesterday = enano_date($formatstring, (time() - (24*60*60))); - // Date on the input - $then = enano_date($formatstring, $time); - // "X days ago" logic - for ( $i = 2; $i <= 6; $i++ ) - { - // hours_in_day * minutes_in_hour * seconds_in_minute * num_days - $offset = 24 * 60 * 60 * $i; - $days_ago = enano_date($formatstring, (time() - $offset)); - // so does the input timestamp match the date from $i days ago? - if ( $then == $days_ago ) - { - // yes, return $i - return $lang->get('userfuncs_ml_date_daysago', array('days_ago' => $i)); - } - } - // either yesterday, today, or before 6 days ago - switch($then) - { - case $today: - return $lang->get('userfuncs_ml_date_today'); - case $yesterday: - return $lang->get('userfuncs_ml_date_yesterday'); - default: - return $then; - } - // .--. - // |o_o | - // |!_/ | - // // \ \ - // (| | ) - // /'\_ _/`\ - // \___)=(___/ - return 'Linux rocks!'; + // merged into enano_date() :) + return enano_date(ED_DATE, $time); } function reg_time($time, $row) { diff -r 6358f769ecb1 -r 745200a9cc2a plugins/SpecialUserPrefs.php --- a/plugins/SpecialUserPrefs.php Wed Aug 19 01:28:47 2009 -0400 +++ b/plugins/SpecialUserPrefs.php Thu Aug 20 20:01:55 2009 -0400 @@ -12,8 +12,7 @@ /* * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between - * Version 1.1.6 (Caoineag beta 1) - * Copyright (C) 2006-2008 Dan Fuhry + * Copyright (C) 2006-2009 Dan Fuhry * * This program is Free Software; you can redistribute it and/or modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. @@ -454,6 +453,9 @@ $hobbies = htmlspecialchars($_POST['hobbies']); $hobbies = $db->escape($hobbies); + $date_format = $db->escape(htmlspecialchars($_POST['date_format'])); + $time_format = $db->escape(htmlspecialchars($_POST['time_format'])); + $email_public = ( isset($_POST['email_public']) ) ? '1' : '0'; $disable_js_fx = ( isset($_POST['disable_js_fx']) ) ? '1' : '0'; @@ -483,6 +485,8 @@ $session->user_extra['user_job'] = $occupation; $session->user_extra['user_hobbies'] = $hobbies; $session->user_extra['email_public'] = intval($email_public); + $session->date_format = $date_format; + $session->time_format = $time_format; // user title $user_title_col = ''; @@ -536,7 +540,8 @@ $q = $db->sql_query('UPDATE '.table_prefix."users_extra SET user_aim='$imaddr_aim',user_yahoo='$imaddr_yahoo',user_msn='$imaddr_msn', user_xmpp='$imaddr_xmpp',user_homepage='$homepage',user_location='$location',user_job='$occupation', - user_hobbies='$hobbies',email_public=$email_public,disable_js_fx=$disable_js_fx + user_hobbies='$hobbies',email_public=$email_public,disable_js_fx=$disable_js_fx,date_format='$date_format', + time_format='$time_format' WHERE user_id=$session->user_id;"); if ( !$q ) @@ -632,6 +637,34 @@
+ + + + + + + + diff -r 6358f769ecb1 -r 745200a9cc2a plugins/admin/CacheManager.php --- a/plugins/admin/CacheManager.php Wed Aug 19 01:28:47 2009 -0400 +++ b/plugins/admin/CacheManager.php Thu Aug 20 20:01:55 2009 -0400 @@ -2,8 +2,7 @@ /* * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between - * Version 1.1.6 (Caoineag beta 1) - * Copyright (C) 2006-2008 Dan Fuhry + * Copyright (C) 2006-2009 Dan Fuhry * * This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. diff -r 6358f769ecb1 -r 745200a9cc2a plugins/admin/GroupManager.php --- a/plugins/admin/GroupManager.php Wed Aug 19 01:28:47 2009 -0400 +++ b/plugins/admin/GroupManager.php Thu Aug 20 20:01:55 2009 -0400 @@ -2,8 +2,7 @@ /* * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between - * Version 1.1.6 (Caoineag beta 1) - * Copyright (C) 2006-2008 Dan Fuhry + * Copyright (C) 2006-2009 Dan Fuhry * * This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. diff -r 6358f769ecb1 -r 745200a9cc2a plugins/admin/Home.php --- a/plugins/admin/Home.php Wed Aug 19 01:28:47 2009 -0400 +++ b/plugins/admin/Home.php Thu Aug 20 20:01:55 2009 -0400 @@ -2,8 +2,7 @@ /* * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between - * Version 1.1.6 (Caoineag beta 1) - * Copyright (C) 2006-2008 Dan Fuhry + * Copyright (C) 2006-2009 Dan Fuhry * * This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. diff -r 6358f769ecb1 -r 745200a9cc2a plugins/admin/LangManager.php --- a/plugins/admin/LangManager.php Wed Aug 19 01:28:47 2009 -0400 +++ b/plugins/admin/LangManager.php Thu Aug 20 20:01:55 2009 -0400 @@ -2,8 +2,7 @@ /* * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between - * Version 1.1.6 (Caoineag beta 1) - * Copyright (C) 2006-2008 Dan Fuhry + * Copyright (C) 2006-2009 Dan Fuhry * * This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. diff -r 6358f769ecb1 -r 745200a9cc2a plugins/admin/PageEditor.php --- a/plugins/admin/PageEditor.php Wed Aug 19 01:28:47 2009 -0400 +++ b/plugins/admin/PageEditor.php Thu Aug 20 20:01:55 2009 -0400 @@ -2,8 +2,7 @@ /* * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between - * Version 1.1.6 (Caoineag beta 1) - * Copyright (C) 2006-2008 Dan Fuhry + * Copyright (C) 2006-2009 Dan Fuhry * * This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. diff -r 6358f769ecb1 -r 745200a9cc2a plugins/admin/PageGroups.php --- a/plugins/admin/PageGroups.php Wed Aug 19 01:28:47 2009 -0400 +++ b/plugins/admin/PageGroups.php Thu Aug 20 20:01:55 2009 -0400 @@ -2,8 +2,7 @@ /* * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between - * Version 1.1.6 (Caoineag beta 1) - * Copyright (C) 2006-2008 Dan Fuhry + * Copyright (C) 2006-2009 Dan Fuhry * * This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. diff -r 6358f769ecb1 -r 745200a9cc2a plugins/admin/PageManager.php --- a/plugins/admin/PageManager.php Wed Aug 19 01:28:47 2009 -0400 +++ b/plugins/admin/PageManager.php Thu Aug 20 20:01:55 2009 -0400 @@ -2,8 +2,7 @@ /* * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between - * Version 1.1.6 (Caoineag beta 1) - * Copyright (C) 2006-2008 Dan Fuhry + * Copyright (C) 2006-2009 Dan Fuhry * * This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. diff -r 6358f769ecb1 -r 745200a9cc2a plugins/admin/PluginManager.php --- a/plugins/admin/PluginManager.php Wed Aug 19 01:28:47 2009 -0400 +++ b/plugins/admin/PluginManager.php Thu Aug 20 20:01:55 2009 -0400 @@ -2,8 +2,7 @@ /* * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between - * Version 1.1.6 (Caoineag beta 1) - * Copyright (C) 2006-2008 Dan Fuhry + * Copyright (C) 2006-2009 Dan Fuhry * * This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. diff -r 6358f769ecb1 -r 745200a9cc2a plugins/admin/SecurityLog.php --- a/plugins/admin/SecurityLog.php Wed Aug 19 01:28:47 2009 -0400 +++ b/plugins/admin/SecurityLog.php Thu Aug 20 20:01:55 2009 -0400 @@ -2,8 +2,7 @@ /* * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between - * Version 1.1.6 (Caoineag beta 1) - * Copyright (C) 2006-2008 Dan Fuhry + * Copyright (C) 2006-2009 Dan Fuhry * * This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. @@ -176,7 +175,7 @@ case "u_to_mod" : $return .= $lang->get('acpsl_entry_u_to_mod' , array('username' => $r['page_text'])); break; case "view_comment_ip" : $return .= $lang->get('acpsl_entry_view_comment_ip' , array('username' => htmlspecialchars($r['page_text']))); break; } - $return .= ''; + $return .= ''; return $return; } diff -r 6358f769ecb1 -r 745200a9cc2a plugins/admin/ThemeManager.php --- a/plugins/admin/ThemeManager.php Wed Aug 19 01:28:47 2009 -0400 +++ b/plugins/admin/ThemeManager.php Thu Aug 20 20:01:55 2009 -0400 @@ -2,8 +2,7 @@ /* * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between - * Version 1.1.6 (Caoineag beta 1) - * Copyright (C) 2006-2008 Dan Fuhry + * Copyright (C) 2006-2009 Dan Fuhry * * This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. diff -r 6358f769ecb1 -r 745200a9cc2a plugins/admin/UserManager.php --- a/plugins/admin/UserManager.php Wed Aug 19 01:28:47 2009 -0400 +++ b/plugins/admin/UserManager.php Thu Aug 20 20:01:55 2009 -0400 @@ -2,8 +2,7 @@ /* * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between - * Version 1.1.6 (Caoineag beta 1) - * Copyright (C) 2006-2008 Dan Fuhry + * Copyright (C) 2006-2009 Dan Fuhry * * This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. @@ -680,7 +679,7 @@ else $cls = 'row2'; $coppa = ( $row['user_coppa'] == '1' ) ? '' . $lang->get('acpum_coppauser_yes') . '' : $lang->get('acpum_coppauser_no'); echo ' - + diff -r 6358f769ecb1 -r 745200a9cc2a plugins/admin/UserRanks.php --- a/plugins/admin/UserRanks.php Wed Aug 19 01:28:47 2009 -0400 +++ b/plugins/admin/UserRanks.php Thu Aug 20 20:01:55 2009 -0400 @@ -2,8 +2,7 @@ /* * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between - * Version 1.1.6 (Caoineag beta 1) - * Copyright (C) 2006-2008 Dan Fuhry + * Copyright (C) 2006-2009 Dan Fuhry * * This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. diff -r 6358f769ecb1 -r 745200a9cc2a themes/enanium/css/babygrand.css --- a/themes/enanium/css/babygrand.css Wed Aug 19 01:28:47 2009 -0400 +++ b/themes/enanium/css/babygrand.css Thu Aug 20 20:01:55 2009 -0400 @@ -137,6 +137,7 @@ ul.useropts li:hover > a { padding: 2px 12px 4px 12px; + color: #b9d0e3; } ul.useropts li.logout:hover > a {
get('privmsgs_lbl_message_from', array('sender' => htmlspecialchars($r['message_from']))); ?>
get('privmsgs_lbl_subject') ?>
get('privmsgs_lbl_date') ?>
get('privmsgs_lbl_date') ?>
get('privmsgs_lbl_message') ?>get('etc_access_denied_short'), '

You are not authorized to view the contents of this message.

'); } $subj = 'Re: ' . $r['subject']; - $text = "\n\n\nOn " . enano_date('M j, Y G:i', $r['date']) . ", " . $r['message_from'] . " wrote:\n> " . str_replace("\n", "\n> ", $r['message_text']); // Way less complicated than using a regex ;-) + $text = "\n\n\nOn " . enano_date(ED_DATE | ED_TIME, $r['date']) . ", " . $r['message_from'] . " wrote:\n> " . str_replace("\n", "\n> ", $r['message_text']); // Way less complicated than using a regex ;-) $tbuf = $text; while( preg_match("/\n([\> ]*?)\> \>/", $text) ) @@ -637,7 +636,7 @@ { echo ''; } - echo '
'.enano_date('M j, Y G:i', $r['date']).'
'.enano_date(ED_DATE | ED_TIME, $r['date']).'
get('usercp_publicinfo_field_changetheme_hint'); ?> get('usercp_publicinfo_field_changetheme'); ?>
get('usercp_publicinfo_field_dateformat'); ?> + +
get('usercp_publicinfo_field_timeformat'); ?> + +
get('usercp_publicinfo_field_timezone'); ?>
get('usercp_publicinfo_field_timezone_hint'); ?>
'.enano_date('d M Y h:i a', $r['time_id']).''.$r['author'].''.$r['edit_summary'].'
'.enano_date(ED_DATE | ED_TIME, $r['time_id']).''.$r['author'].''.$r['edit_summary'].'
'.enano_date('F d, Y h:i a', $row['time_id']).''.enano_date(ED_DATE | ED_TIME, $row['time_id']).' '.$row['author'].' '.$row['edit_summary'].' ' . $coppa . '