ChangeSet ID: 31132
CVSROOT: /opt/cvs-commit
Module name: appdb
Changes by: wineowner(a)winehq.org 2007/05/23 21:29:44
Modified files:
cron : cleanup.php
Log message:
Chris Morgan <cmorgan(a)alum.wpi.edu>
Add removeScreenshotsWithMissingFiles() to the nightly cron script. This will close a hole where
we could potentially have screenshots in the database that don't have thumbnails or images.
Patch: http://cvs.winehq.org/patch.py?id=31132
Old revision New revision Changes Path
1.32 1.33 +57 -0 appdb/cron/cleanup.php
Index: appdb/cron/cleanup.php
diff -u -p appdb/cron/cleanup.php:1.32 appdb/cron/cleanup.php:1.33
--- appdb/cron/cleanup.php:1.32 24 May 2007 2:29:44 -0000
+++ appdb/cron/cleanup.php 24 May 2007 2:29:44 -0000
@@ -81,6 +81,8 @@ orphanSessionListCheck();
/* report error log entries to admins and flush the error log after doing so */
reportErrorLogEntries();
+/* remove screenshots that are missing their screenshot and thumbnail files */
+removeScreenshotsWithMissingFiles();
/* Users that are unwarned and inactive since $iMonths */
function unwarnedAndInactiveSince($iMonths)
@@ -236,4 +238,59 @@ function reportErrorLogEntries()
error_log::flush();
}
+// returns an array of iScreenshotIds of screenshots that are
+// missing their files
+function getMissingScreenshotArray()
+{
+ $aMissingScreenshotIds = array();
+
+ // retrieve all screenshots, not queued, not rejected
+ $hResult = Screenshot::objectGetEntries(false, false);
+
+ // go through each screenshot
+ while($oRow = mysql_fetch_object($hResult))
+ {
+ $iScreenshotId = $oRow->id;
+ $oScreenshot = new Screenshot($iScreenshotId);
+
+ // load the screenshot and thumbnail
+ $oScreenshot->load_image(true);
+ $oScreenshot->load_image(false);
+
+ // are the screenshot and thumbnail images not loaded? if so
+ // add this screenshot id to the array
+ if(!$oScreenshot->oScreenshotImage->isLoaded() &&
+ !$oScreenshot->oThumbnailImage->isLoaded())
+ {
+ // add the screenshot id to the array
+ $aMissingScreenshotIds[] = $iScreenshotId;
+ }
+ }
+
+ return $aMissingScreenshotIds;
+}
+
+function removeScreenshotsWithMissingFiles()
+{
+ $aMissingScreenshotIds = getMissingScreenshotArray();
+
+ // build the email to admins about what we are doing
+ $sMsg = "Found ".count($aMissingScreenshotIds)." screenshots with missing files.\r\n";
+ //FIXME: uncomment the below line when we uncomment the below lines in the script
+ // $sMsg.= "Deleting these screenshots.\r\n";
+
+ $sSubject = "Screenshots deleted\r\n";
+
+ $sEmail = User::get_notify_email_address_list(null, null); /* get list admins */
+ if($sEmail)
+ mail_appdb($sEmail, $sSubject, $sMsg);
+
+ //FIXME: activate this after we see the results from the nightly cron script email
+ // remove the screenshots with missing files
+ // foreach($aMissingScreenshotIds as $iScreenshotId)
+ // {
+ // $oScreenshot = new Screenshot($iScreenshotId);
+ // $oScreenshot->delete(true); // delete the screenshot silently
+ // }
+}
?>
ChangeSet ID: 31131
CVSROOT: /opt/cvs-commit
Module name: lostwages
Changes by: jnewman(a)winehq.org 2007/05/23 13:24:34
Modified files:
. : winehq_styles.css
templates/en : git.template
Log message:
Alex Waite <awaite2(a)uiuc.edu>
remove some tables and unnecessary markup
Patch: http://cvs.winehq.org/patch.py?id=31131
Old revision New revision Changes Path
1.16 1.17 +2 -1 lostwages/winehq_styles.css
1.3 1.4 +34 -58 lostwages/templates/en/git.template
Index: lostwages/winehq_styles.css
diff -u -p lostwages/winehq_styles.css:1.16 lostwages/winehq_styles.css:1.17
--- lostwages/winehq_styles.css:1.16 23 May 2007 18:24:34 -0000
+++ lostwages/winehq_styles.css 23 May 2007 18:24:34 -0000
@@ -44,7 +44,7 @@ p.indent { padding-left: 1em;
.blueish { background-color: #bed5f7; }
/* text colors */
-.inverse { color: #FFFFFF; }
+.inverse { color: #FFFFFF; background: #000000; }
.disabled { color: #999999; }
.normal { color: #000000; }
.error { color: #ff0000; }
@@ -74,6 +74,7 @@ p.indent { padding-left: 1em;
.small { font-size: 10px; }
.big { font-size: 14px; }
.rowtitle { background-color: black; color: white; font-weight: bold; }
+.commandWidth { width: 500px; }
/* Generic Buttons */
.button { background-color: #A50D0D; color: #ffffff; font-family: Sans-Serif; font-size: 12px; padding: 0; }
Index: lostwages/templates/en/git.template
diff -u -p lostwages/templates/en/git.template:1.3 lostwages/templates/en/git.template:1.4
--- lostwages/templates/en/git.template:1.3 23 May 2007 18:24:34 -0000
+++ lostwages/templates/en/git.template 23 May 2007 18:24:34 -0000
@@ -24,7 +24,7 @@ such as the Linux Kernel source. </p>
<li><a href="#docs">Documentation module available from Sourceforge</a>
</ol>
-<p><img src="{$root}/images/grey_pixel.gif" width="100%" height=1 border=0 alt="-"></p>
+<hr />
<a name="clone" class="hidden"></a>
@@ -32,14 +32,11 @@ such as the Linux Kernel source. </p>
<p>To check out the entire Wine source tree, do:</p>
- <table width="500" border=0 cellpadding=10><tr><td class=black>
- <span class=inverse>
- git clone git://source.winehq.org/git/wine.git wine<br>
- </span>
- </td></tr>
- </table>
+<div class="inverse commandWidth">
+ <p>git clone git://source.winehq.org/git/wine.git wine</p>
+</div>
-<p><img src="{$root}/images/grey_pixel.gif" width="100%" height=1 border=0 alt="-"></p>
+<hr />
<a name="uptodate" class="hidden"></a>
@@ -48,15 +45,12 @@ such as the Linux Kernel source. </p>
<p>A quick way to clean up your tree after you've been modifying
it and want to remove changes you haven't checked in is this: </p>
- <table width="500" border=0 cellpadding=10><tr><td class=black>
- <span class=inverse>
- cd wine<br>
- git diff-index -p HEAD > total-<i>x.x.x</i>.diff<br>
- patch -p1 -R < total-<i>x.x.x</i>.diff<br>
- git reset<br>
- </span>
- </td></tr>
- </table>
+<div class="inverse commandWidth">
+ <p>cd wine<br />
+ git diff-index -p HEAD > total-<i>x.x.x</i>.diff<br />
+ patch -p1 -R < total-<i>x.x.x</i>.diff<br />
+ git reset</p>
+</div>
<p>Using the current x.x.x tags, you can keep a history of changes
that were in your Wine tree.</p>
@@ -64,31 +58,25 @@ that were in your Wine tree.</p>
<p>If you have made commits to the tree, and want to remove them all,
you can use the following more dangerous command:</p>
- <table width="500" border=0 cellpadding=10><tr><td class=black>
- <span class=inverse>
- git reset --hard origin<br>
- </span>
- </td></tr>
- </table>
+<div class="inverse commandWidth">
+ <p>git reset --hard origin</p>
+</div>
<p>This will wipe out any local changes you have made, so use it with caution.</p>
-<p><img src="{$root}/images/grey_pixel.gif" width="100%" height=1 border=0 alt="-"></p>
+<hr />
<h1>Staying Up-To-Date</h1>
<p> First, make sure to clean your tree as described above, then
run the following commands from the top level wine directory:</p>
- <table width="500" border=0 cellpadding=10><tr><td class=black>
- <span class=inverse>
- git fetch<br>
- git rebase origin<br>
- </span>
- </td></tr>
- </table>
+<div class="inverse commandWidth">
+ <p>git fetch<br />
+ git rebase origin</p>
+</div>
-<p><img src="{$root}/images/grey_pixel.gif" width="100%" height=1 border=0 alt="-"></p>
+<hr />
<a name="sourcetree" class=hidden></a>
@@ -107,7 +95,7 @@ This cross-references source is based on
<li><a href="http://source.winehq.org/git">source.winehq.org/git</a>, on the primary Git repository
</ul>
-<p><img src="{$root}/images/grey_pixel.gif" width="100%" height=1 border=0 alt="-"></p>
+<hr />
<a name="modules" class=hidden></a>
@@ -124,48 +112,36 @@ This cross-references source is based on
<p>To login to the CVS server, run in a terminal:</p>
-<table width="500" border=0 cellpadding=10>
- <tr><td class=black>
- <span class=inverse>
- CVSROOT=:pserver:cvs@cvs.winehq.org:/home/wine cvs login
- </span>
- </td></tr>
-</table>
+<div class="inverse commandWidth">
+ <p>CVSROOT=:pserver:cvs@cvs.winehq.org:/home/wine cvs login</p>
+</div>
<p>Use "cvs" as the password (without the quotes).</p>
<p>To get a git repository of one of the modules listed above
create a new directory and in a terminal run in that directory:</p>
-<table width="550" border=0 cellpadding=10>
- <tr><td class=black>
- <span class=inverse>
- git cvsimport -v -k -d :pserver:cvs@cvs.winehq.org:/home/wine MODULE<br/>
- </span>
- </td></tr>
-</table>
+<div class="inverse commandWidth">
+ <p>git cvsimport -v -k -d :pserver:cvs@cvs.winehq.org:/home/wine MODULE</p>
+</div>
<p>Replace MODULE with one of the module names listed above.<br/>
But be aware that this can take quite some time.</p>
-<p><img src="{$root}/images/grey_pixel.gif" width="100%" height=1 border=0 alt="-"></p>
+<hr />
<a name="docs" class=hidden></a>
<h1>Documentation module available from Sourceforge</h1>
-<p>The documentation lives in a separate CVS tree on Sourceforge.<br/>
+<p>The documentation lives in a separate CVS tree on Sourceforge.<br />
To get a git repository of the documentation create a new directory and
in a terminal run in that directory:</p>
-<table width="550" border=0 cellpadding=10>
- <tr><td class=black>
- <span class=inverse>
- git cvsimport -v -k -d :pserver:anonymous@wine.cvs.sourceforge.net:/cvsroot/wine docs<br/>
- </span>
- </td></tr>
-</table>
-<p>But be aware that this can take quite some time.</p>
+<div class="inverse commandWidth">
+ <p>git cvsimport -v -k -d :pserver:anonymous@wine.cvs.sourceforge.net:/cvsroot/wine docs</p>
+</div>
+<p>But be aware that this can take quite some time.</p>
-<p> </p>
+<p> </p>
\ No newline at end of file
Module: wine
Branch: master
Commit: 41b099172fc992fa0c39693c88b63b9d9e7be9b4
URL: http://source.winehq.org/git/wine.git/?a=commit;h=41b099172fc992fa0c39693c8…
Author: Francois Gouget <fgouget(a)free.fr>
Date: Tue May 22 18:12:05 2007 +0200
port.h: Issue an error if port.h is included after the regular Wine headers.
---
include/wine/port.h | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/include/wine/port.h b/include/wine/port.h
index 8861408..6ab0627 100644
--- a/include/wine/port.h
+++ b/include/wine/port.h
@@ -25,6 +25,10 @@
# error You must include config.h to use this header
#endif
+#ifdef __WINE_BASETSD_H
+# error You must include port.h before all other headers
+#endif
+
#define _FILE_OFFSET_BITS 64
#define _GNU_SOURCE /* for pread/pwrite */
#include <fcntl.h>