[geeklog-cvs] geeklog: Added a filename mask config option for the names of th...
geeklog-cvs at lists.geeklog.net
geeklog-cvs at lists.geeklog.net
Sat Feb 21 09:53:24 EST 2009
details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/6e9c261610c2
changeset: 6789:6e9c261610c2
user: Dirk Haun <dirk at haun-online.de>
date: Sat Feb 21 15:07:45 2009 +0100
description:
Added a filename mask config option for the names of the database backups
diffstat:
8 files changed, 25 insertions(+), 6 deletions(-)
language/english.php | 1 +
language/english_utf-8.php | 1 +
public_html/admin/database.php | 15 +++++++++------
public_html/admin/install/config-install.php | 1 +
public_html/docs/config.html | 5 +++++
public_html/docs/history | 2 ++
sql/updates/mssql_1.5.2_to_1.6.0.php | 3 +++
sql/updates/mysql_1.5.2_to_1.6.0.php | 3 +++
diffs (130 lines):
diff -r cd37daba7d4b -r 6e9c261610c2 language/english.php
--- a/language/english.php Sat Feb 21 14:36:24 2009 +0100
+++ b/language/english.php Sat Feb 21 15:07:45 2009 +0100
@@ -1642,6 +1642,7 @@
'allow_mysqldump' => "Allow MySQL Dump",
'mysqldump_path' => 'Path of Executable',
'mysqldump_options' => "MySQL Dump Options",
+ 'mysqldump_filename_mask' => 'Backup File Name Mask',
'theme' => "Theme",
'menu_elements' => "Menu Elements",
'path_themes' => "Themes Path",
diff -r cd37daba7d4b -r 6e9c261610c2 language/english_utf-8.php
--- a/language/english_utf-8.php Sat Feb 21 14:36:24 2009 +0100
+++ b/language/english_utf-8.php Sat Feb 21 15:07:45 2009 +0100
@@ -1642,6 +1642,7 @@
'allow_mysqldump' => "Allow MySQL Dump",
'mysqldump_path' => 'Path of Executable',
'mysqldump_options' => "MySQL Dump Options",
+ 'mysqldump_filename_mask' => 'Backup File Name Mask',
'theme' => "Theme",
'menu_elements' => "Menu Elements",
'path_themes' => "Themes Path",
diff -r cd37daba7d4b -r 6e9c261610c2 public_html/admin/database.php
--- a/public_html/admin/database.php Sat Feb 21 14:36:24 2009 +0100
+++ b/public_html/admin/database.php Sat Feb 21 15:07:45 2009 +0100
@@ -2,13 +2,13 @@
/* Reminder: always indent with 4 spaces (no tabs). */
// +---------------------------------------------------------------------------+
-// | Geeklog 1.5 |
+// | Geeklog 1.6 |
// +---------------------------------------------------------------------------+
// | database.php |
// | |
// | Geeklog database backup administration page. |
// +---------------------------------------------------------------------------+
-// | Copyright (C) 2000-2008 by the following authors: |
+// | Copyright (C) 2000-2009 by the following authors: |
// | |
// | Authors: Tony Bibbs - tony AT tonybibbs DOT com |
// | Blaine Lang - langmail AT sympatico DOT ca |
@@ -31,8 +31,6 @@
// | Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
// | |
// +---------------------------------------------------------------------------+
-//
-// $Id: database.php,v 1.51 2008/08/30 06:50:22 mjervis Exp $
require_once '../lib-common.php';
require_once 'auth.inc.php';
@@ -182,8 +180,13 @@
$retval = '';
if (is_dir($_CONF['backup_path'])) {
- $curdatetime = date('Y_m_d_H_i_s');
- $backupfile = "{$_CONF['backup_path']}geeklog_db_backup_{$curdatetime}.sql";
+ if (!empty($_CONF['mysqldump_filename_mask'])) {
+ $filename_mask = strftime($_CONF['mysqldump_filename_mask']);
+ } else {
+ $curdatetime = date('Y_m_d_H_i_s');
+ $filename_mask = "geeklog_db_backup_{$curdatetime}.sql";
+ }
+ $backupfile = $_CONF['backup_path'] . $filename_mask;
$command = $_DB_mysqldump_path . " -h$_DB_host -u$_DB_user";
if (!empty($_DB_pass)) {
$command .= " -p$_DB_pass";
diff -r cd37daba7d4b -r 6e9c261610c2 public_html/admin/install/config-install.php
--- a/public_html/admin/install/config-install.php Sat Feb 21 14:36:24 2009 +0100
+++ b/public_html/admin/install/config-install.php Sat Feb 21 15:07:45 2009 +0100
@@ -81,6 +81,7 @@
$c->add('allow_mysqldump',1,'select',0,5,0,170,TRUE);
$c->add('mysqldump_path','/usr/bin/mysqldump','text',0,5,NULL,175,TRUE);
$c->add('mysqldump_options','-Q','text',0,5,NULL,180,TRUE);
+ $c->add('mysqldump_filename_mask','geeklog_db_backup_%Y_%m_%d_%H_%M_%S.sql','text',0,5,NULL,185,TRUE);
// squeeze search options between 640 (lastlogin) and 680 (loginrequired)
$c->add('fs_search', NULL, 'fieldset', 0, 6, NULL, 0, TRUE);
diff -r cd37daba7d4b -r 6e9c261610c2 public_html/docs/config.html
--- a/public_html/docs/config.html Sat Feb 21 14:36:24 2009 +0100
+++ b/public_html/docs/config.html Sat Feb 21 15:07:45 2009 +0100
@@ -254,6 +254,11 @@
<td valign="top">Here you can include additional options for the <a
href="http://www.mysql.com/doc/en/mysqldump.html">mysqldump</a> call
that Geeklog uses to create a backup from your database.</td></tr>
+<tr><td valign="top"><a name="desc_mysqldump_filename_mask">mysqldump_filename_mask</a></td>
+ <td valign="top">geeklog_db_backup_%Y_%m_%d_%H_%M_%S.sql</td>
+ <td valign="top">Mask to use for the names of the backup files. See <a
+ href="#date_formats">date formats</a> below for details of the date and
+ time in the file name.</td></tr>
</table>
<h3><a name="site_search">Site: Search</a></h3>
diff -r cd37daba7d4b -r 6e9c261610c2 public_html/docs/history
--- a/public_html/docs/history Sat Feb 21 14:36:24 2009 +0100
+++ b/public_html/docs/history Sat Feb 21 15:07:45 2009 +0100
@@ -11,6 +11,8 @@
+ (TBD) Comment moderation and editable comments, by Jared Wenerd
Other changes:
+- Added a filename mask config option for the names of the database backups
+ [Dirk]
- Removed $_CONF['pagetitle'] hack. Use COM_siteHeader('menu', $pagetitle)
instead [Dirk]
- Added canonical link for articles [Dirk]
diff -r cd37daba7d4b -r 6e9c261610c2 sql/updates/mssql_1.5.2_to_1.6.0.php
--- a/sql/updates/mssql_1.5.2_to_1.6.0.php Sat Feb 21 14:36:24 2009 +0100
+++ b/sql/updates/mssql_1.5.2_to_1.6.0.php Sat Feb 21 15:07:45 2009 +0100
@@ -48,6 +48,9 @@
$c->add('search_def_keytype','phrase','select',0,6,20,675,TRUE);
$c->add('search_use_fulltext',FALSE,'hidden',0,6); // 678
+ // filename mask for db backup files
+ $c->add('mysqldump_filename_mask','geeklog_db_backup_%Y_%m_%d_%H_%M_%S.sql','text',0,5,NULL,185,TRUE);
+
return true;
}
diff -r cd37daba7d4b -r 6e9c261610c2 sql/updates/mysql_1.5.2_to_1.6.0.php
--- a/sql/updates/mysql_1.5.2_to_1.6.0.php Sat Feb 21 14:36:24 2009 +0100
+++ b/sql/updates/mysql_1.5.2_to_1.6.0.php Sat Feb 21 15:07:45 2009 +0100
@@ -49,6 +49,9 @@
$c->add('search_def_keytype','phrase','select',0,6,20,675,TRUE);
$c->add('search_use_fulltext',FALSE,'hidden',0,6); // 678
+ // filename mask for db backup files
+ $c->add('mysqldump_filename_mask','geeklog_db_backup_%Y_%m_%d_%H_%M_%S.sql','text',0,5,NULL,185,TRUE);
+
return true;
}
More information about the geeklog-cvs
mailing list