Author: dgoette
Date: Fri May 29 21:31:58 2009
New Revision: 426
URL:
http://svn.reactos.org/svn/reactos?rev=426&view=rev
Log:
fix bug when saving draft while a similiar draft was already archived
Modified:
branches/danny-web/www/www.reactos.org/roscms/lib/om/Revision.class.php
Modified:
branches/danny-web/www/www.reactos.org/roscms/lib/om/Revision.class.php
URL:
http://svn.reactos.org/svn/reactos/branches/danny-web/www/www.reactos.org/r…
==============================================================================
---
branches/danny-web/www/www.reactos.org/roscms/lib/om/Revision.class.php [iso-8859-1]
(original)
+++
branches/danny-web/www/www.reactos.org/roscms/lib/om/Revision.class.php [iso-8859-1]
Fri May 29 21:31:58 2009
@@ -402,7 +402,7 @@
$thisuser_id = &ThisUser::getInstance()->id();
// check if revision exists
- $stmt=&DBConnection::getInstance()->prepare("SELECT id FROM
".ROSCMST_REVISIONS." WHERE data_id = :data_id AND version = 0 AND lang_id =
:lang AND user_id = :user_id AND status='draft' ORDER BY datetime DESC LIMIT
1");
+ $stmt=&DBConnection::getInstance()->prepare("SELECT id FROM
".ROSCMST_REVISIONS." WHERE data_id = :data_id AND version = 0 AND lang_id =
:lang AND user_id = :user_id AND status='draft' AND archive IS FALSE ORDER BY
datetime DESC LIMIT 1");
$stmt->bindParam('data_id',$data_id,PDO::PARAM_INT);
$stmt->bindParam('lang',$lang_id,PDO::PARAM_INT);
$stmt->bindParam('user_id',$thisuser_id,PDO::PARAM_INT);