phpgroupware-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-cvs] CVS: phpbrain/inc class.bokb.inc.php,1.15,1.16 class.


From: Dave Hall <address@hidden>
Subject: [Phpgroupware-cvs] CVS: phpbrain/inc class.bokb.inc.php,1.15,1.16 class.sokb.inc.php,1.16,1.17 class.uikb.inc.php,1.15,1.16
Date: Fri, 06 Jun 2003 19:13:30 -0400

Update of /cvsroot/phpgroupware/phpbrain/inc
In directory subversions:/tmp/cvs-serv24848

Modified Files:
        class.bokb.inc.php class.sokb.inc.php class.uikb.inc.php 
Log Message:
couple of fixes for saving

Index: class.bokb.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/phpbrain/inc/class.bokb.inc.php,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -r1.15 -r1.16
*** class.bokb.inc.php  28 May 2003 22:32:25 -0000      1.15
--- class.bokb.inc.php  6 Jun 2003 23:13:28 -0000       1.16
***************
*** 222,225 ****
--- 222,235 ----
                                $faq['text'] = strip_tags($faq['text']);
                        }
+                       
+                       if($faq['published'] && !$this->is_admin())
+                       {
+                               $faq['published'] = False;
+                       }
+                       elseif($this->is_admin() && !$faq_id)
+                       {
+                               $faq['published'] = True;
+                       }
+ 
                        $faq['user_id'] = (isset($faq['user_id']) ? 
$faq['user_id'] : $GLOBALS['phpgw_info']['user']['account_id']);
                        $new_faq_id = $this->so->save($faq_id, $faq, 
$this->is_admin());

Index: class.sokb.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/phpbrain/inc/class.sokb.inc.php,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -r1.16 -r1.17
*** class.sokb.inc.php  28 May 2003 22:32:25 -0000      1.16
--- class.sokb.inc.php  6 Jun 2003 23:13:28 -0000       1.17
***************
*** 236,240 ****
                                        $sql .= ' modified = ' . time() .',';
                                        $sql .= ' user_id = ' . 
intval($faq['user_id']) .',';
!                                       $sql .= ' published = ' . ($admin ? 1 : 
0) . ', ';
                                        $sql .= ' is_faq = ' . 
intval($faq['is_faq']) . ', ';
                                        $sql .= " url = '" . 
$this->db->db_addslashes(urldecode($faq['url'])) ."'";
--- 236,240 ----
                                        $sql .= ' modified = ' . time() .',';
                                        $sql .= ' user_id = ' . 
intval($faq['user_id']) .',';
!                                       $sql .= ' published = ' . 
($faq['published'] ? 1 : 0) . ', ';
                                        $sql .= ' is_faq = ' . 
intval($faq['is_faq']) . ', ';
                                        $sql .= " url = '" . 
$this->db->db_addslashes(urldecode($faq['url'])) ."'";
***************
*** 256,260 ****
                                        $sql .= "'" . 
$this->db->db_addslashes($faq['text']) . "', ";
                                        $sql .= intval($faq['cat_id']) . ", ";
!                                       $sql .= ($admin ? 1 : 0) . ', ';//admin 
is auto publish
                                        $sql .= "'" . 
$this->db->db_addslashes($faq['keywords']) . "',";
                                        $sql .= intval($faq['user_id']) . ', ';
--- 256,260 ----
                                        $sql .= "'" . 
$this->db->db_addslashes($faq['text']) . "', ";
                                        $sql .= intval($faq['cat_id']) . ", ";
!                                       $sql .= ($faq['published'] ? 1 : 0) . 
', ';
                                        $sql .= "'" . 
$this->db->db_addslashes($faq['keywords']) . "',";
                                        $sql .= intval($faq['user_id']) . ', ';

Index: class.uikb.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/phpbrain/inc/class.uikb.inc.php,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -r1.15 -r1.16
*** class.uikb.inc.php  28 May 2003 22:32:25 -0000      1.15
--- class.uikb.inc.php  6 Jun 2003 23:13:28 -0000       1.16
***************
*** 524,527 ****
--- 524,528 ----
                        $faq['is_faq']  = (int) (isset($_POST['is_faq']) ? 
trim($_POST['is_faq']) : 0);
                        $faq['url']     = (isset($_POST['url']) ? 
trim($_POST['url']) : '');
+                       $faq['published'] = (isset($_POST['published']) ? True 
: False);
                        $faq_id = $this->bo->save($faq_id, $faq, $question_id);
                        if($faq_id)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]