From 64f4a1023ffe85d7f90840fa17bce55644b7b0fb Mon Sep 17 00:00:00 2001 From: Yannick Warnier Date: Wed, 17 Oct 2007 20:18:44 +0200 Subject: [PATCH] [svn r13519] Fixed toggle_publish() to unpublish no matter what the visibility status is in tool table --- main/newscorm/learnpath.class.php | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/main/newscorm/learnpath.class.php b/main/newscorm/learnpath.class.php index 741f6cab2a..59a3b7a0b7 100644 --- a/main/newscorm/learnpath.class.php +++ b/main/newscorm/learnpath.class.php @@ -2979,15 +2979,7 @@ class learnpath { //if($this->debug>2){error_log('New LP - '.$sql.' - '.$num,0);} if(($set_visibility == 'i') && ($num>0)) { - //it is visible or hidden but once was published - if(($row2['visibility'])==1) - { - $sql ="DELETE FROM $tbl_tool WHERE (name='$name' and image='scormbuilder.gif' and link LIKE '$link%')"; - } - else - { - $sql ="UPDATE $tbl_tool set visibility=1 WHERE (name='$name' and image='scormbuilder.gif' and link LIKE '$link%')"; - } + $sql ="DELETE FROM $tbl_tool WHERE (name='$name' and image='scormbuilder.gif' and link LIKE '$link%')"; } elseif(($set_visibility == 'v') && ($num==0)) {