#1511 flaw in new announcement sticky feature

closed-fixed
None
5
2005-05-12
2005-04-15
No

Announcement->sticky_id would not get set if the sticky
being created is the very first one.

This fixes it.

--- Announcement.php.orig 2005-04-15
13:35:00.568018152 -1000
+++ Announcement.php 2005-04-15 13:37:48.095550096 -1000
@@ -384,7 +384,9 @@
}

if(isset($_POST["ANN_set_sticky"]) &&
$this->_sticky_id<1) {
- $data["sticky_id"] =
$GLOBALS["core"]->getOne("SELECT MAX(sticky_id)+1 FROM
" . PHPWS_TBL_PREFIX . "mod_announce");
+ if(!($data["sticky_id"] =
$GLOBALS["core"]->getOne("SELECT MAX(sticky_id)+1 FROM
" . PHPWS_TBL_PREFIX . "mod_announce"))) {
+ $data["sticky_id"] = 1;
+ }
} else {
$data["sticky_id"] = '0';
}

Discussion

  • Darren Greene

    Darren Greene - 2005-05-12
    • status: open --> closed
     
  • Darren Greene

    Darren Greene - 2005-05-12
    • assigned_to: nobody --> dg49379
    • status: closed --> closed-fixed
     
  • Darren Greene

    Darren Greene - 2005-05-12

    Logged In: YES
    user_id=783140

    This has been fixed in CVS.

    Thanks,
    Darren

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks