[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] notes index.php help/EN/list.php inc/class.bono...
From: |
Dave Hall |
Subject: |
[Phpgroupware-cvs] notes index.php help/EN/list.php inc/class.bono... |
Date: |
Mon, 20 Aug 2007 12:23:00 +0000 |
CVSROOT: /sources/phpgroupware
Module name: notes
Changes by: Dave Hall <skwashd> 07/08/20 12:23:00
Modified files:
. : index.php
help/EN : list.php
inc : class.bonotes.inc.php class.ipc_notes.inc.php
class.sonotes.inc.php class.uinotes.inc.php
hook_admin.inc.php hook_deleteaccount.inc.php
hook_help.inc.php hook_preferences.inc.php
setup : setup.inc.php tables_current.inc.php
tables_update.inc.php
Log message:
add proper last mod detection and GPLv3 headers
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/notes/index.php?cvsroot=phpgroupware&r1=1.59&r2=1.60
http://cvs.savannah.gnu.org/viewcvs/notes/help/EN/list.php?cvsroot=phpgroupware&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/notes/inc/class.bonotes.inc.php?cvsroot=phpgroupware&r1=1.28&r2=1.29
http://cvs.savannah.gnu.org/viewcvs/notes/inc/class.ipc_notes.inc.php?cvsroot=phpgroupware&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/notes/inc/class.sonotes.inc.php?cvsroot=phpgroupware&r1=1.17&r2=1.18
http://cvs.savannah.gnu.org/viewcvs/notes/inc/class.uinotes.inc.php?cvsroot=phpgroupware&r1=1.41&r2=1.42
http://cvs.savannah.gnu.org/viewcvs/notes/inc/hook_admin.inc.php?cvsroot=phpgroupware&r1=1.10&r2=1.11
http://cvs.savannah.gnu.org/viewcvs/notes/inc/hook_deleteaccount.inc.php?cvsroot=phpgroupware&r1=1.4&r2=1.5
http://cvs.savannah.gnu.org/viewcvs/notes/inc/hook_help.inc.php?cvsroot=phpgroupware&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/notes/inc/hook_preferences.inc.php?cvsroot=phpgroupware&r1=1.26&r2=1.27
http://cvs.savannah.gnu.org/viewcvs/notes/setup/setup.inc.php?cvsroot=phpgroupware&r1=1.18&r2=1.19
http://cvs.savannah.gnu.org/viewcvs/notes/setup/tables_current.inc.php?cvsroot=phpgroupware&r1=1.4&r2=1.5
http://cvs.savannah.gnu.org/viewcvs/notes/setup/tables_update.inc.php?cvsroot=phpgroupware&r1=1.11&r2=1.12
Patches:
Index: index.php
===================================================================
RCS file: /sources/phpgroupware/notes/index.php,v
retrieving revision 1.59
retrieving revision 1.60
diff -u -b -r1.59 -r1.60
--- index.php 3 Oct 2006 14:26:19 -0000 1.59
+++ index.php 20 Aug 2007 12:22:59 -0000 1.60
@@ -5,7 +5,22 @@
* @copyright Copyright (C) 2000-2005 Free Software Foundation, Inc.
http://www.fsf.org/
* @license http://www.gnu.org/licenses/gpl.html GNU General Public
License
* @package notes
- * @version $Id: index.php,v 1.59 2006/10/03 14:26:19 skwashd Exp $
+ * @version $Id: index.php,v 1.60 2007/08/20 12:22:59 skwashd Exp $
+ */
+
+ /*
+ This program is free software; you can redistribute it and/or
modify
+ it under the terms of the GNU General Public License as
published by
+ the Free Software Foundation; either version 3 of the License,
or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public
License
+ along with this program. If not, see
<http://www.gnu.org/licenses/>.
*/
$GLOBALS['phpgw_info']['flags'] = array
Index: help/EN/list.php
===================================================================
RCS file: /sources/phpgroupware/notes/help/EN/list.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- help/EN/list.php 28 Apr 2005 18:33:53 -0000 1.3
+++ help/EN/list.php 20 Aug 2007 12:22:59 -0000 1.4
@@ -6,9 +6,23 @@
* @license http://www.gnu.org/licenses/gpl.html GNU General Public
License
* @package notes
* @subpackage manual
- * @version $Id: list.php,v 1.3 2005/04/28 18:33:53 powerstat Exp $
+ * @version $Id: list.php,v 1.4 2007/08/20 12:22:59 skwashd Exp $
*/
+ /*
+ This program is free software; you can redistribute it and/or
modify
+ it under the terms of the GNU General Public License as
published by
+ the Free Software Foundation; either version 3 of the License,
or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public
License
+ along with this program. If not, see
<http://www.gnu.org/licenses/>.
+ */
$GLOBALS['phpgw_info']['flags'] = Array
(
Index: inc/class.bonotes.inc.php
===================================================================
RCS file: /sources/phpgroupware/notes/inc/class.bonotes.inc.php,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -b -r1.28 -r1.29
--- inc/class.bonotes.inc.php 18 Jul 2007 14:54:35 -0000 1.28
+++ inc/class.bonotes.inc.php 20 Aug 2007 12:22:59 -0000 1.29
@@ -3,12 +3,27 @@
* Notes
* @author Andy Holman
* @author Bettina Gille address@hidden
- * @copyright Copyright (C) 2000-2003,2005 Free Software Foundation,
Inc. http://www.fsf.org/
+ * @author Dave Hall address@hidden
+ * @copyright Copyright (C) 2000-2003,2005,2007 Free Software
Foundation, Inc. http://www.fsf.org/
* @license http://www.gnu.org/licenses/gpl.html GNU General Public
License
* @package notes
- * @version $Id: class.bonotes.inc.php,v 1.28 2007/07/18 14:54:35 johang
Exp $
+ * @version $Id: class.bonotes.inc.php,v 1.29 2007/08/20 12:22:59
skwashd Exp $
*/
+ /*
+ This program is free software; you can redistribute it and/or
modify
+ it under the terms of the GNU General Public License as
published by
+ the Free Software Foundation; either version 3 of the License,
or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public
License
+ along with this program. If not, see
<http://www.gnu.org/licenses/>.
+ */
/**
* Notes business object class
@@ -211,17 +226,20 @@
return (!!($has & $needed) == True);
}
- function read()
+ function read($lastmod = -1)
{
- $notes = $this->sonotes->read(array('start' =>
$this->start,'query' => $this->query,'sort' => $this->sort,'order' =>
$this->order,
-
'filter' => $this->filter,'cat_id' => $this->cat_id,'limit' =>
$this->limit));
+ $notes = $this->sonotes->read(array
+ (
+ 'start' => $this->start,
+ 'query' => $this->query,
+ 'sort' => $this->sort,
+ 'order' => $this->order,
+ 'filter' => $this->filter,
+ 'cat_id' => $this->cat_id,
+ 'limit' => $this->limit,
+ 'lastmod' => $lastmod
+ ));
$this->total_records = $this->sonotes->total_records;
-
- for ($i=0; $i<count($notes); $i++)
- {
- $notes[$i]['date'] =
$GLOBALS['phpgw']->common->show_date($notes[$i]['date']);
- $notes[$i]['owner'] =
$GLOBALS['phpgw']->accounts->id2name($notes[$i]['owner']);
- }
return $notes;
}
Index: inc/class.ipc_notes.inc.php
===================================================================
RCS file: /sources/phpgroupware/notes/inc/class.ipc_notes.inc.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- inc/class.ipc_notes.inc.php 18 Jul 2007 14:54:35 -0000 1.3
+++ inc/class.ipc_notes.inc.php 20 Aug 2007 12:22:59 -0000 1.4
@@ -8,10 +8,23 @@
* @license http://www.fsf.org/licenses/gpl.html GNU General Public License
* @package notes
* @subpackage ipc
- * @version $Id: class.ipc_notes.inc.php,v 1.3 2007/07/18 14:54:35 johang Exp $
+ * @version $Id: class.ipc_notes.inc.php,v 1.4 2007/08/20 12:22:59 skwashd Exp
$
*/
-// require_once(PHPGW_API_INC . 'class.ipc_.inc.php');
+ /*
+ This program is free software; you can redistribute it and/or
modify
+ it under the terms of the GNU General Public License as
published by
+ the Free Software Foundation; either version 3 of the License,
or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public
License
+ along with this program. If not, see
<http://www.gnu.org/licenses/>.
+ */
/**
* Fassade of the notes application.
@@ -107,16 +120,13 @@
*/
function getIdList($time=-1)
{
- $all_notes = $this->bonotes->read();
- $note_count = count($all_notes);
- $all_note_ids = array();
-
- for($i = 0; $i < $note_count; $i++)
+ $notes = $this->bonotes->read($time);
+ if ( !is_array($notes) || !count($notes) )
{
- $all_note_ids[] = intval($all_notes[$i]['note_id']);
+ return array();
}
- return $all_note_ids;
+ return array_keys($notes);
}
/**
Index: inc/class.sonotes.inc.php
===================================================================
RCS file: /sources/phpgroupware/notes/inc/class.sonotes.inc.php,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -b -r1.17 -r1.18
--- inc/class.sonotes.inc.php 18 Jul 2007 14:54:35 -0000 1.17
+++ inc/class.sonotes.inc.php 20 Aug 2007 12:22:59 -0000 1.18
@@ -3,10 +3,26 @@
* Notes
* @author Andy Holman
* @author Bettina Gille address@hidden
- * @copyright Copyright (C) 2000-2003,2005 Free Software Foundation,
Inc. http://www.fsf.org/
+ * @author Dave Hall skwashd at phpgroupware.org
+ * @copyright Copyright (C) 2000-2003,2005,2007 Free Software
Foundation, Inc. http://www.fsf.org/
* @license http://www.gnu.org/licenses/gpl.html GNU General Public
License
* @package notes
- * @version $Id: class.sonotes.inc.php,v 1.17 2007/07/18 14:54:35 johang
Exp $
+ * @version $Id: class.sonotes.inc.php,v 1.18 2007/08/20 12:22:59
skwashd Exp $
+ */
+
+ /*
+ This program is free software; you can redistribute it and/or
modify
+ it under the terms of the GNU General Public License as
published by
+ the Free Software Foundation; either version 3 of the License,
or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public
License
+ along with this program. If not, see
<http://www.gnu.org/licenses/>.
*/
/**
@@ -37,6 +53,7 @@
$sort = isset($data['sort']) ? $data['sort']
: 'DESC';
$order = isset($data['order']) ?
$data['order'] : '';
$cat_id = isset($data['cat_id']) ?
$data['cat_id'] : 0;
+ $lastmod = isset($data['lastmod'])
? $data['lastmod'] : -1;
}
$start = intval($start);
@@ -85,16 +102,20 @@
if($query)
{
- $query = ereg_replace("'",'',$query);
- $query = ereg_replace('"','',$query);
-
- $querymethod = " AND note_content LIKE
'%$query%'";
+ $query = $this->db->db_addslashes($query);
+ $querymethod = " AND note_content LIKE
'%$query%' ";
}
else
{
$querymethod = '';
}
+ if ( $lastmod > 0 )
+ {
+ $lastmod = (int) $lastmod;
+ $filtermethod .= " AND note_lastmod >= $lastmod
";
+ }
+
$sql = "SELECT * FROM phpgw_notes WHERE $filtermethod
$querymethod";
$this->db->query($sql,__LINE__,__FILE__);
@@ -104,19 +125,20 @@
{
$this->db->limit_query($sql .
$ordermethod,$start,__LINE__,__FILE__);
}
+
$notes = array();
while ($this->db->next_record())
{
$ngrants =
$this->grants[$this->db->f('note_owner')];
- $notes[] = array
+ $notes[$this->db->f('note_id')] = array
(
'note_id' =>
$this->db->f('note_id'),
- 'owner' =>
$this->db->f('note_owner'),
'owner_id' =>
$this->db->f('note_owner'),
+ 'owner' =>
$GLOBALS['phpgw']->accounts->id2name($this->db->f('note_owner')),
'access' =>
$this->db->f('note_access'),
- 'date' =>
$this->db->f('note_date'),
+ 'date' =>
$GLOBALS['phpgw']->common->show_date($this->db->f('note_date')),
'cat_id' =>
$this->db->f('note_category'),
- 'content' =>
stripslashes($this->db->f('note_content')),
+ 'content' =>
$this->db->f('note_content', true),
'grants' => $ngrants
);
}
@@ -145,9 +167,9 @@
{
$note['content'] =
$this->db->db_addslashes($note['content']);
- $this->db->query('INSERT INTO phpgw_notes
(note_owner,note_access,note_date,note_content,note_category) '
+ $this->db->query('INSERT INTO phpgw_notes (note_owner,
note_access, note_date, note_content, note_category, note_lastmod) '
. 'VALUES (' . $this->account . ",'" .
$note['access'] . "'," . time() . ",'" . $note['content']
- . "'," . (isset($note['cat_id']) ?
intval($note['cat_id']) : 0) . ')',__LINE__,__FILE__);
+ . "'," . (isset($note['cat_id']) ?
intval($note['cat_id']) : 0) . ', ' . time() . ')',__LINE__,__FILE__);
return
$this->db->get_last_insert_id('phpgw_notes','note_id');
}
@@ -155,8 +177,10 @@
{
$note['content'] =
$this->db->db_addslashes($note['content']);
- $this->db->query("UPDATE phpgw_notes set
note_content='" . $note['content'] . "', note_date=" . time() . ',
note_category='
- .
(isset($note['cat_id']) ? intval($note['cat_id']) : 0) . ", note_access='" .
$note['access'] . "' WHERE note_id=" .
intval($note['note_id']),__LINE__,__FILE__);
+ $this->db->query("UPDATE phpgw_notes set
note_content='" . $note['content'] . "', note_category=" .
(isset($note['cat_id']) ? intval($note['cat_id']) : 0) . ', '
+ . "note_access='" .
$note['access'] . "', "
+ . 'note_lastmod=' .
time()
+ . ' WHERE note_id=' .
(int) $note['note_id'] ,__LINE__,__FILE__);
return $this->db->affected_rows();
}
Index: inc/class.uinotes.inc.php
===================================================================
RCS file: /sources/phpgroupware/notes/inc/class.uinotes.inc.php,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -b -r1.41 -r1.42
--- inc/class.uinotes.inc.php 18 Jul 2007 14:54:35 -0000 1.41
+++ inc/class.uinotes.inc.php 20 Aug 2007 12:22:59 -0000 1.42
@@ -6,7 +6,22 @@
* @copyright Copyright (C) 2000-2003,2005 Free Software Foundation,
Inc. http://www.fsf.org/
* @license http://www.gnu.org/licenses/gpl.html GNU General Public
License
* @package notes
- * @version $Id: class.uinotes.inc.php,v 1.41 2007/07/18 14:54:35 johang
Exp $
+ * @version $Id: class.uinotes.inc.php,v 1.42 2007/08/20 12:22:59
skwashd Exp $
+ */
+
+ /*
+ This program is free software; you can redistribute it and/or
modify
+ it under the terms of the GNU General Public License as
published by
+ the Free Software Foundation; either version 3 of the License,
or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public
License
+ along with this program. If not, see
<http://www.gnu.org/licenses/>.
*/
/**
Index: inc/hook_admin.inc.php
===================================================================
RCS file: /sources/phpgroupware/notes/inc/hook_admin.inc.php,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -b -r1.10 -r1.11
--- inc/hook_admin.inc.php 9 Sep 2006 09:04:50 -0000 1.10
+++ inc/hook_admin.inc.php 20 Aug 2007 12:22:59 -0000 1.11
@@ -5,10 +5,25 @@
* @copyright Copyright (C) 2000-2005 Free Software Foundation, Inc.
http://www.fsf.org/
* @license http://www.gnu.org/licenses/gpl.html GNU General Public
License
* @package notes
- * @version $Id: hook_admin.inc.php,v 1.10 2006/09/09 09:04:50 skwashd
Exp $
+ * @version $Id: hook_admin.inc.php,v 1.11 2007/08/20 12:22:59 skwashd
Exp $
* @internal $Source:
/sources/phpgroupware/notes/inc/hook_admin.inc.php,v $
*/
+ /*
+ This program is free software; you can redistribute it and/or
modify
+ it under the terms of the GNU General Public License as
published by
+ the Free Software Foundation; either version 3 of the License,
or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public
License
+ along with this program. If not, see
<http://www.gnu.org/licenses/>.
+ */
+
{
$file = array
(
Index: inc/hook_deleteaccount.inc.php
===================================================================
RCS file: /sources/phpgroupware/notes/inc/hook_deleteaccount.inc.php,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- inc/hook_deleteaccount.inc.php 5 Sep 2006 10:53:09 -0000 1.4
+++ inc/hook_deleteaccount.inc.php 20 Aug 2007 12:22:59 -0000 1.5
@@ -5,7 +5,22 @@
* @copyright Copyright (C) 2000-2002,2005 Free Software Foundation,
Inc. http://www.fsf.org/
* @license http://www.gnu.org/licenses/gpl.html GNU General Public
License
* @package notes
- * @version $Id: hook_deleteaccount.inc.php,v 1.4 2006/09/05 10:53:09
skwashd Exp $
+ * @version $Id: hook_deleteaccount.inc.php,v 1.5 2007/08/20 12:22:59
skwashd Exp $
+ */
+
+ /*
+ This program is free software; you can redistribute it and/or
modify
+ it under the terms of the GNU General Public License as
published by
+ the Free Software Foundation; either version 3 of the License,
or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public
License
+ along with this program. If not, see
<http://www.gnu.org/licenses/>.
*/
// Delete all records for a user
Index: inc/hook_help.inc.php
===================================================================
RCS file: /sources/phpgroupware/notes/inc/hook_help.inc.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- inc/hook_help.inc.php 7 Mar 2007 10:46:36 -0000 1.3
+++ inc/hook_help.inc.php 20 Aug 2007 12:22:59 -0000 1.4
@@ -5,7 +5,22 @@
* @copyright Copyright (C) 2000-2002,2005 Free Software Foundation,
Inc. http://www.fsf.org/
* @license http://www.gnu.org/licenses/gpl.html GNU General Public
License
* @package notes
- * @version $Id: hook_help.inc.php,v 1.3 2007/03/07 10:46:36 sigurdne
Exp $
+ * @version $Id: hook_help.inc.php,v 1.4 2007/08/20 12:22:59 skwashd Exp
$
+ */
+
+ /*
+ This program is free software; you can redistribute it and/or
modify
+ it under the terms of the GNU General Public License as
published by
+ the Free Software Foundation; either version 3 of the License,
or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public
License
+ along with this program. If not, see
<http://www.gnu.org/licenses/>.
*/
/**
Index: inc/hook_preferences.inc.php
===================================================================
RCS file: /sources/phpgroupware/notes/inc/hook_preferences.inc.php,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -b -r1.26 -r1.27
--- inc/hook_preferences.inc.php 19 Sep 2006 15:25:47 -0000 1.26
+++ inc/hook_preferences.inc.php 20 Aug 2007 12:22:59 -0000 1.27
@@ -5,7 +5,22 @@
* @copyright Copyright (C) 2000-2002,2005 Free Software Foundation,
Inc. http://www.fsf.org/
* @license http://www.gnu.org/licenses/gpl.html GNU General Public
License
* @package notes
- * @version $Id: hook_preferences.inc.php,v 1.26 2006/09/19 15:25:47
sigurdne Exp $
+ * @version $Id: hook_preferences.inc.php,v 1.27 2007/08/20 12:22:59
skwashd Exp $
+ */
+
+ /*
+ This program is free software; you can redistribute it and/or
modify
+ it under the terms of the GNU General Public License as
published by
+ the Free Software Foundation; either version 3 of the License,
or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public
License
+ along with this program. If not, see
<http://www.gnu.org/licenses/>.
*/
{
Index: setup/setup.inc.php
===================================================================
RCS file: /sources/phpgroupware/notes/setup/setup.inc.php,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -b -r1.18 -r1.19
--- setup/setup.inc.php 11 Mar 2006 23:20:48 -0000 1.18
+++ setup/setup.inc.php 20 Aug 2007 12:23:00 -0000 1.19
@@ -6,11 +6,26 @@
* @license http://www.gnu.org/licenses/gpl.html GNU General Public
License
* @package notes
* @subpackage setup
- * @version $Id: setup.inc.php,v 1.18 2006/03/11 23:20:48 skwashd Exp $
+ * @version $Id: setup.inc.php,v 1.19 2007/08/20 12:23:00 skwashd Exp $
+ */
+
+ /*
+ This program is free software; you can redistribute it and/or
modify
+ it under the terms of the GNU General Public License as
published by
+ the Free Software Foundation; either version 3 of the License,
or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public
License
+ along with this program. If not, see
<http://www.gnu.org/licenses/>.
*/
$setup_info['notes']['name'] = 'notes';
- $setup_info['notes']['version'] = '0.9.15.001';
+ $setup_info['notes']['version'] = '0.9.15.002';
$setup_info['notes']['app_order'] = 8;
$setup_info['notes']['tables'] = array('phpgw_notes');
$setup_info['notes']['enable'] = 1;
@@ -60,4 +75,4 @@
'appname' => 'preferences',
'versions' => Array('0.9.17', '0.9.18')
);
-?>
+
Index: setup/tables_current.inc.php
===================================================================
RCS file: /sources/phpgroupware/notes/setup/tables_current.inc.php,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- setup/tables_current.inc.php 28 Apr 2005 18:33:53 -0000 1.4
+++ setup/tables_current.inc.php 20 Aug 2007 12:23:00 -0000 1.5
@@ -6,23 +6,39 @@
* @license http://www.gnu.org/licenses/gpl.html GNU General Public
License
* @package notes
* @subpackage setup
- * @version $Id: tables_current.inc.php,v 1.4 2005/04/28 18:33:53
powerstat Exp $
+ * @version $Id: tables_current.inc.php,v 1.5 2007/08/20 12:23:00
skwashd Exp $
+ */
+
+ /*
+ This program is free software; you can redistribute it and/or
modify
+ it under the terms of the GNU General Public License as
published by
+ the Free Software Foundation; either version 3 of the License,
or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public
License
+ along with this program. If not, see
<http://www.gnu.org/licenses/>.
*/
$phpgw_baseline = array(
'phpgw_notes' => array(
'fd' => array(
- 'note_id' => array('type' => 'auto', 'nullable'
=> false),
- 'note_owner' => array('type' => 'int',
'precision' => 4),
- 'note_access' => array('type' => 'varchar',
'precision' => 7),
- 'note_date' => array('type' => 'int',
'precision' => 4),
- 'note_category' => array('type' => 'int',
'precision' => 4),
- 'note_content' => array('type' => 'text')
+ 'note_id' => array('type' => 'auto','nullable'
=> False),
+ 'note_owner' => array('type' =>
'int','precision' => '4','nullable' => False),
+ 'note_access' => array('type' =>
'varchar','precision' => '7','nullable' => False),
+ 'note_date' => array('type' =>
'int','precision' => '4','nullable' => False),
+ 'note_category' => array('type' =>
'int','precision' => '4','nullable' => False),
+ 'note_content' => array('type' =>
'text','nullable' => False),
+ 'note_lastmod' => array('type' =>
'int','precision' => '8','nullable' => False)
),
'pk' => array('note_id'),
'fk' => array(),
- 'ix' => array(),
+ 'ix' =>
array('note_owner','note_access','note_date','note_category','note_lastmod'),
'uc' => array()
)
);
Index: setup/tables_update.inc.php
===================================================================
RCS file: /sources/phpgroupware/notes/setup/tables_update.inc.php,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -b -r1.11 -r1.12
--- setup/tables_update.inc.php 28 Apr 2005 18:33:52 -0000 1.11
+++ setup/tables_update.inc.php 20 Aug 2007 12:23:00 -0000 1.12
@@ -6,9 +6,23 @@
* @license http://www.gnu.org/licenses/gpl.html GNU General Public
License
* @package notes
* @subpackage setup
- * @version $Id: tables_update.inc.php,v 1.11 2005/04/28 18:33:52
powerstat Exp $
+ * @version $Id: tables_update.inc.php,v 1.12 2007/08/20 12:23:00
skwashd Exp $
*/
+ /*
+ This program is free software; you can redistribute it and/or
modify
+ it under the terms of the GNU General Public License as
published by
+ the Free Software Foundation; either version 3 of the License,
or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public
License
+ along with this program. If not, see
<http://www.gnu.org/licenses/>.
+ */
$test[] = '0.9.1';
@@ -508,4 +522,24 @@
$GLOBALS['setup_info']['notes']['currentver'] = '0.9.15.001';
return $GLOBALS['setup_info']['notes']['currentver'];
}
+
+
+ $test[] = '0.9.15.001';
+ function notes_upgrade0_9_15_001()
+ {
+ $GLOBALS['phpgw_setup']->oProc->m_odb->transaction_begin();
+
$GLOBALS['phpgw_setup']->oProc->AddColumn('phpgw_notes','note_lastmod',array(
+ 'type' => 'int',
+ 'precision' => '8',
+ 'nullable' => False
+ ));
+
+ $GLOBALS['phpgw_setup']->oProc->m_odb->query('UPDATE
phpgw_notes SET note_lastmod = note_date');
+
+ if($GLOBALS['phpgw_setup']->oProc->m_odb->transaction_commit())
+ {
+ $GLOBALS['setup_info']['notes']['currentver'] =
'0.9.15.002';
+ }
+ return $GLOBALS['setup_info']['notes']['currentver'];
+ }
?>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] notes index.php help/EN/list.php inc/class.bono...,
Dave Hall <=