[geeklog-cvs] Geeklog-1.x/public_html/admin database.php, 1.43, 1.44

Oliver ospiess at qs1489.pair.com
Tue Oct 9 21:07:35 EDT 2007


Update of /usr/home/geeklog2/cvsroot/geeklog/Geeklog-1.x/public_html/admin
In directory qs1489.pair.com:/tmp/cvs-serv81488

Modified Files:
	database.php 
Log Message:
use COM_showMessage in db backups
increase failsafe db size to 1kb since wrong commandline options might put error output into logfile

Index: database.php
===================================================================
RCS file: /usr/home/geeklog2/cvsroot/geeklog/Geeklog-1.x/public_html/admin/database.php,v
retrieving revision 1.43
retrieving revision 1.44
diff -C2 -d -r1.43 -r1.44
*** database.php	9 Oct 2007 08:32:28 -0000	1.43
--- database.php	10 Oct 2007 01:07:33 -0000	1.44
***************
*** 182,206 ****
          if ($canExec) {
              exec($command);
!             if (file_exists($backupfile) && filesize($backupfile) > 0) {
                  @chmod($backupfile, 0644);
!                 $timestamp = strftime($_CONF['daytime']);
!                 $icon_url = "{$_CONF['layout_url']}/images/sysmessage.$_IMAGE_TYPE";
!                 $icon_attr = array(
!                     'style' => "padding-right:5px;",
!                     'align'=> 'left'
!                 );
!                 $msg_icon = COM_createImage($icon_url, '', $icon_attr);
!                 $retval .= COM_startBlock($MESSAGE[40] . ' - ' . $timestamp, '',
!                     COM_getBlockTemplate('_msg_block', 'header'))
!                     . '<p style="padding:5px">' . $msg_icon
!                     . $LANG_DB_BACKUP['backup_successful'] . '</p>'
!                     . COM_endBlock(COM_getBlockTemplate('_msg_block', 'footer'));
              } else {
!                 $retval .= COM_startBlock($LANG08[06], '',
!                                 COM_getBlockTemplate('_msg_block', 'header'));
!                 $retval .= $LANG_DB_BACKUP['zero_size'];
!                 $retval .= COM_endBlock(COM_getBlockTemplate('_msg_block',
!                                                              'footer'));
!                 COM_errorLog('Backup Filesize was 0 bytes', 1);
                  COM_errorLog("Command used for mysqldump: $command", 1);
              }
--- 182,191 ----
          if ($canExec) {
              exec($command);
!             if (file_exists($backupfile) && filesize($backupfile) > 1000) {
                  @chmod($backupfile, 0644);
!                 $retval .= COM_showMessage(93);
              } else {
!                 $retval .= COM_showMessage(94);
!                 COM_errorLog('Backup Filesize was less than 1kb', 1);
                  COM_errorLog("Command used for mysqldump: $command", 1);
              }




More information about the geeklog-cvs mailing list