changed db-name to phpgw_infolog, setup-files

This commit is contained in:
Ralf Becker 2001-05-30 22:00:51 +00:00
parent c8a97189d0
commit 950809de72
7 changed files with 67 additions and 11 deletions

View File

@ -144,7 +144,7 @@
$phpgw->common->phpgw_header();
echo parse_navbar();
$phpgw->db->query("select * FROM infolog where info_id='$info_id'");
$phpgw->db->query("select * FROM phpgw_infolog where info_id='$info_id'");
$phpgw->db->next_record();
$pri_selected[$phpgw->infolog->data['info_pri']] = ' selected';

View File

@ -289,7 +289,7 @@
function read($info_id) { // did _not_ ensure ACL, has to be done by the calling code
if ($info_id <= 0 || $info_id != $this->data['info_id'] &&
(!$this->db->query("select * FROM infolog where info_id='$info_id'") || !$this->db->next_record()))
(!$this->db->query("select * FROM phpgw_infolog where info_id='$info_id'") || !$this->db->next_record()))
{
$this->init( );
return False;
@ -316,7 +316,7 @@
function delete($info_id) { // did _not_ ensure ACL, has to be done by the calling code
global $phpgw_info;
$this->db->query("delete FROM infolog where info_id='$info_id' or info_id_parent='"
$this->db->query("delete FROM phpgw_infolog where info_id='$info_id' or info_id_parent='"
. "$info_id' AND ((info_access='public' and info_owner != '"
. $phpgw_info['user']['account_id'] . "') or (info_owner='"
. $phpgw_info['user']['account_id'] . "'))" ,__LINE__,__FILE__);
@ -355,9 +355,9 @@
}
}
if ($values['info_id']) {
$query = 'update infolog set '.$query.' where info_id=\'' . $values['info_id'] .'\'';
$query = 'update phpgw_infolog set '.$query.' where info_id=\'' . $values['info_id'] .'\'';
} else {
$query = 'insert INTO infolog set '.$query;
$query = 'insert INTO phpgw_infolog set '.$query;
/*
* need to set $this->data['info_id'] with assigned autoincrement id
*/

View File

@ -101,7 +101,7 @@
if ($phpgw->infolog->listChilds && $action != 'sp')
$pid = '';
$db->query("SELECT COUNT(*) FROM infolog WHERE $filtermethod $pid $sql_query",__LINE__,__FILE__);
$db->query("SELECT COUNT(*) FROM phpgw_infolog WHERE $filtermethod $pid $sql_query",__LINE__,__FILE__);
$db->next_record();
$total = $db->f(0);
@ -145,13 +145,13 @@
$limit = $db->limit($start);
$db->query($q="SELECT * FROM infolog WHERE $filtermethod $pid $sql_query $ordermethod $limit",__LINE__,__FILE__);
$db->query($q="SELECT * FROM phpgw_infolog WHERE $filtermethod $pid $sql_query $ordermethod $limit",__LINE__,__FILE__);
while ($db->next_record()) {
// ========================================
// check if actual project has subprojects
// ========================================
$db2->query("select count(*) as cnt FROM infolog where info_id_parent=" .$db->f('info_id'),__LINE__,__FILE__);
$db2->query("select count(*) as cnt FROM phpgw_infolog where info_id_parent=" .$db->f('info_id'),__LINE__,__FILE__);
$db2->next_record();
if ($db2->f('cnt') > 0) {
$subproact = 1;

9
infolog/setup/setup.inc.php Executable file
View File

@ -0,0 +1,9 @@
<?php
$setup_info['infolog']['name'] = 'Info Log';
$setup_info['infolog']['version'] = '0.9.11';
$setup_info['infolog']['app_order'] = 1;
$setup_info['infolog']['tables'] = 'phpgw_infolog';
$hooks = Array();
$hooks_string = implode (',', $hooks);
$setup_info['infolog']['hooks'] = $hooks_string;
?>

View File

@ -1,3 +0,0 @@
<?php
$setup_info['infolog'] = array('name' => 'InfoLog', 'app_order' => 1, 'version' => '0.1');
?>

View File

@ -0,0 +1,36 @@
<?php
/**************************************************************************\
* phpGroupWare *
* http://www.phpgroupware.org *
* -------------------------------------------- *
* 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 2 of the License, or (at your *
* option) any later version. *
\**************************************************************************/
/* $Id$ */
$phpgw_baseline = array(
'infolog' => array(
'fd' => array(
'info_id' => array('type' => 'auto', 'nullable' => false),
'info_type' => array('type' => 'enum',
'info_id_parent' => array('type' => 'int', 'precision' => 4, 'nullable' => false),
'info_owner' => array('type' => 'varchar', 'precision' => 25),
'info_access' => array('type' => 'varchar', 'precision' => 10),
'info_cat' => array('type' => 'int', 'precision' => 4),
'info_des' => array('type' => 'text'),
'info_pri' => array('type' => 'int', 'precision' => 4),
'info_status' => array('type' => 'int', 'precision' => 4),
'info_datecreated' => array('type' => 'int', 'precision' => 4),
'info_startdate' => array('type' => 'int', 'precision' => 4),
'info_enddata' => array('type' => 'int', 'precision' => 4)
),
'pk' => array('info_id'),
'fk' => array(),
'ix' => array(),
'uc' => array()
),
);
?>

14
infolog/version.inc.php Normal file
View File

@ -0,0 +1,14 @@
<?php
/**************************************************************************\
* phpGroupWare *
* http://www.phpgroupware.org *
* -------------------------------------------- *
* 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 2 of the License, or (at your *
* option) any later version. *
\**************************************************************************/
/* $Id$ */
$phpgw_info["server"]["versions"]["infolog"] = $phpgw_info["server"]["versions"]["phpgwapi"];