tutos-commits Mailing List for TUTOS
Projects / CRM / PLM / Calendar / Tasks / SCRUM / Test / Inventory
Brought to you by:
gokohnert
You can subscribe to this list here.
| 2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(13) |
Aug
(214) |
Sep
(144) |
Oct
(22) |
Nov
(22) |
Dec
(93) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2002 |
Jan
(25) |
Feb
(31) |
Mar
(92) |
Apr
(70) |
May
(103) |
Jun
(130) |
Jul
(265) |
Aug
(325) |
Sep
(233) |
Oct
(244) |
Nov
(261) |
Dec
(157) |
| 2003 |
Jan
(101) |
Feb
(135) |
Mar
(148) |
Apr
(164) |
May
(53) |
Jun
(116) |
Jul
(149) |
Aug
(126) |
Sep
(45) |
Oct
(109) |
Nov
(36) |
Dec
(61) |
| 2004 |
Jan
(131) |
Feb
(236) |
Mar
(278) |
Apr
(259) |
May
(92) |
Jun
(110) |
Jul
(150) |
Aug
(64) |
Sep
(141) |
Oct
(141) |
Nov
(146) |
Dec
(65) |
| 2005 |
Jan
(70) |
Feb
(77) |
Mar
(129) |
Apr
(153) |
May
(161) |
Jun
(63) |
Jul
(42) |
Aug
(16) |
Sep
(30) |
Oct
(3) |
Nov
(8) |
Dec
(40) |
| 2006 |
Jan
(114) |
Feb
(16) |
Mar
(12) |
Apr
(15) |
May
(4) |
Jun
(9) |
Jul
(69) |
Aug
(27) |
Sep
(12) |
Oct
(80) |
Nov
(62) |
Dec
(41) |
| 2007 |
Jan
(34) |
Feb
(2) |
Mar
(38) |
Apr
(82) |
May
(61) |
Jun
(37) |
Jul
(16) |
Aug
(64) |
Sep
(7) |
Oct
(52) |
Nov
(18) |
Dec
(28) |
| 2008 |
Jan
(168) |
Feb
(26) |
Mar
(27) |
Apr
(19) |
May
(10) |
Jun
(58) |
Jul
(58) |
Aug
(91) |
Sep
(14) |
Oct
(23) |
Nov
(56) |
Dec
(38) |
| 2009 |
Jan
(58) |
Feb
(90) |
Mar
(204) |
Apr
(90) |
May
(27) |
Jun
(177) |
Jul
(116) |
Aug
(53) |
Sep
(42) |
Oct
(120) |
Nov
(51) |
Dec
(58) |
| 2010 |
Jan
(117) |
Feb
(231) |
Mar
(163) |
Apr
(90) |
May
(40) |
Jun
(139) |
Jul
(49) |
Aug
(118) |
Sep
(25) |
Oct
(80) |
Nov
(102) |
Dec
(99) |
| 2011 |
Jan
(176) |
Feb
(42) |
Mar
(60) |
Apr
(52) |
May
(30) |
Jun
(29) |
Jul
(27) |
Aug
(16) |
Sep
(51) |
Oct
(70) |
Nov
(63) |
Dec
(58) |
| 2012 |
Jan
(28) |
Feb
(26) |
Mar
(7) |
Apr
(12) |
May
(41) |
Jun
(61) |
Jul
(59) |
Aug
(38) |
Sep
(30) |
Oct
(28) |
Nov
(14) |
Dec
(31) |
| 2013 |
Jan
(24) |
Feb
(54) |
Mar
(45) |
Apr
(22) |
May
(35) |
Jun
(8) |
Jul
(18) |
Aug
(38) |
Sep
(11) |
Oct
(8) |
Nov
(19) |
Dec
(20) |
| 2014 |
Jan
(20) |
Feb
(22) |
Mar
(4) |
Apr
(6) |
May
(13) |
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
(6) |
| 2015 |
Jan
|
Feb
(1) |
Mar
(4) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
(1) |
| 2016 |
Jan
(4) |
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
(2) |
Aug
(4) |
Sep
(1) |
Oct
(1) |
Nov
(1) |
Dec
|
| 2017 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(3) |
Jul
(8) |
Aug
(13) |
Sep
(12) |
Oct
|
Nov
|
Dec
|
| 2018 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2019 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
| 2020 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(2) |
| 2021 |
Jan
|
Feb
(1) |
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
|
|
|
|
|
|
1
|
|
2
|
3
|
4
|
5
(2) |
6
(13) |
7
(8) |
8
|
|
9
|
10
(4) |
11
|
12
|
13
(5) |
14
(24) |
15
|
|
16
|
17
|
18
|
19
|
20
|
21
|
22
|
|
23
|
24
|
25
|
26
|
27
|
28
|
29
|
|
30
|
|
|
|
|
|
|
|
From: Gero K. <gok...@us...> - 2008-11-14 21:15:03
|
Update of /cvsroot/tutos/tutos/php/ticker In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv10192/php/ticker Modified Files: rsslib.pinc Log Message: various fixes due to more automated tests Index: rsslib.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/ticker/rsslib.pinc,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- rsslib.pinc 21 Sep 2008 16:41:38 -0000 1.15 +++ rsslib.pinc 14 Nov 2008 21:14:52 -0000 1.16 @@ -74,6 +74,7 @@ function makebullet_rss($item) { $link = ereg_replace(".*<link>","",$item); $link = ereg_replace("</link>.*","",$link); + $regs = array(); preg_match('/.*\<title.*\>(.*)\<\/title\>/ims',$item,$regs); $title = $regs[1]; |
|
From: Gero K. <gok...@us...> - 2008-11-14 21:15:02
|
Update of /cvsroot/tutos/tutos In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv10192 Modified Files: ChangeLog test.sh Log Message: various fixes due to more automated tests Index: test.sh =================================================================== RCS file: /cvsroot/tutos/tutos/test.sh,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- test.sh 5 Oct 2008 18:17:55 -0000 1.7 +++ test.sh 14 Nov 2008 21:14:51 -0000 1.8 @@ -31,10 +31,12 @@ ADR=1015 +NOID=99999 +NOID=XXxx USER=superuser PW=tutos -DBNR=6 +DBNR=0 CHECKURI=http://validator.w3.org/check?uri= @@ -107,114 +109,209 @@ acl_overview.php acl_new.php?id=$ADR acl_show.php?id=$ADR + acl_show.php?id=$NOID admin_show.php + app_ins.php app_select.php app_select.php?ext=1 app_new.php + app_new.php?id=$NOID app_new_r.php app_show.php + app_show.php?id=$NOID + address_ins.php address_select.php address_select.php?ext=1 address_overview.php?name= + address_show.php address_show.php?id=$ADR + address_show.php?id=$NOID + address_new.php + address_new.php?id=$NOID address_new.php?id=$ADR address_show.php?format=vcard&id=$ADR calendar.php calendar.php?team[]=$ADR calendar_week.php calendar_day.php + company_ins.php company_new.php + company_new.php?id=$ADR + company_new.php?id=$NOID company_overview.php?name= company_show.php + company_show.php?id=$ADR + company_show.php?id=$NOID + database_ins.php database_show.php?id=0 + database_show.php?id=$NOID database_new.php?id=0 + database_new.php?id=$NOID database_overview.php + department_ins.php department_new.php + department_new.php?id=$NOID department_show.php + department_show.php?id=$NOID help.php?p=glossary history_show.php?id=$ADR + history_show.php?id=$NOID message_overview.php module_overview.php mytutos.php + mytutos.php?id=$NOID mail_new.php?subject=TEST&watch=$ADR + product_ins.php product_select.php product_select.php?ext=1 product_new.php + product_new.php?id=$NOID product_show.php + product_show.php?id=$NOID product_overview.php?name=t product_overview.php?format=stat product_overview.php?rid[]=1000 res_cal.php?id=$ADR + team_ins.php team_select.php team_overview.php?name= team_new.php + team_new.php?id=$NOID + team_show.php + team_show.php?id=$NOID + task_ins.php task_select.php - task_show.php task_new.php + task_new.php?id=$NOID + task_show.php + task_show.php?id=$NOID task_overview.php?id=$ADR + task_overview.php?id=$NOID + timetrack_ins.php + timetrack_new.php + timetrack_new.php?id=$NOID + timetrack_new.php?lid=$NOID + timetrack_new.php?mode=1&lid=$NOID timetrack_select.php timetrack_overview.php?worker=$ADR + timetrack_overview.php?worker=$NOID + user_ins.php user_new.php + user_new.php?id=$NOID user_new.php?id=$ADR user_overview.php admin/phpinfo.php admin/customize_show.php + bugtracking/bug_ins.php bugtracking/bug_select.php bugtracking/bug_select.php?ext=1 bugtracking/bug_new.php + bugtracking/bug_new.php?id=$NOID bugtracking/bug_show.php + bugtracking/bug_show.php?id=$NOID bugtracking/bug_overview.php?name= bugtracking/bug_overview.php?format=stat bugtracking/bug_overview.php?format=excel + bugtracking/bug_overview.php?solverid=$ADR + bugtracking/bug_overview.php?solverid=$NOID + checklist/checklist_ins.php checklist/checklist_overview.php + checklist/checklist_new.php + checklist/checklist_new.php?id=$NOID + checklist/checklist_show.php + checklist/checklist_show.php?id=$NOID + checklist/checkfield_new.php + checklist/checkfield_new.php?id=$NOID + checklist/checkfield_show.php + checklist/checkfield_show.php?id=$NOID counter/counter_overview.php counter/counter_overview.php?id=$ADR + counter/counter_show.php + counter/counter_show.php?id=$NOID + expense/expense_ins.php expense/expense_select.php + expense/expense_new.php + expense/expense_new.php?id=$NOID expense/expense_new.php?link_id=$ADR expense/expense_show.php + expense/expense_show.php?id=$NOID expense/expense_overview.php?name=&reftype=0 + file/file_ins.php file/file_select.php file/file_select.php?ext=1 file/file_show.php + file/file_show.php?id=$NOID + file/file_new.php + file/file_new.php?id=$NOID file/file_new.php?link_id=$ADR file/file_overview.php + group/group_ins.php group/group_select.php group/group_overview.php group/group_show.php + group/group_show.php?id=$ADR + group/group_new.php + group/group_new.php?id=$ADR + installation/installation_ins.php installation/installation_select.php + installation/installation_new.php + installation/installation_new.php?id=$NOID installation/installation_show.php + installation/installation_show.php?id=$NOID installation/installation_overview.php + invoice/invoice_ins.php invoice/invoice_select.php invoice/invoice_select.php?ext=1 invoice/invoice_overview.php invoice/invoice_show.php + invoice/invoice_show.php?id=$NOID + invoice/invoice_new.php + invoice/invoice_new.php?id=$NOID mailbox/mailbox_new.php?parent=$ADR + note/note_ins.php note/note_select.php note/note_overview.php?name=demo&reftype=0 note/note_overview.php?link_id=$ADR note/note_show.php + note/note_show.php?id=$NOID note/note_new.php?link_id=$ADR + note/note_new.php?id=$NOID + rate/rate_ins.php rate/rate_select.php rate/rate_select.php?ext=1 rate/rate_show.php + rate/rate_show.php?id=$NOID + rate/rate_new.php rate/rate_new.php?link_id=$ADR + rate/rate_new.php?id=$NOID rate/rate_overview.php?name=&reftype=0 + reminder/reminder_ins.php reminder/reminder_select.php reminder/reminder_show.php + reminder/reminder_show.php?id=$NOID reminder/reminder_new.php?link_id=$ADR + reminder/reminder_new.php?id=$NOID report-engine/report_select.php report-engine/report_overview.php?class=address&type=show&id=$ADR + resource/resource_ins.php resource/resource_select.php resource/resource_overview.php?name= resource/resource_new.php + resource/resource_new.php?id=$NOID resource/resource_show.php + resource/resource_show.php?id=$NOID + stuff/stuff_ins.php stuff/stuff_select.php stuff/stuff_overview.php stuff/stuff_new.php + stuff/stuff_new.php?id=$NOID stuff/stuff_show.php + stuff/stuff_show.php?id=$NOID ticker/ticker_overview.php + url/url_ins.php url/url_select.php url/url_new.php?link_id=$ADR + url/url_new.php?id=$NOID watchlist/watchlist_overview.php?id=$ADR " URLS2=" Index: ChangeLog =================================================================== RCS file: /cvsroot/tutos/tutos/ChangeLog,v retrieving revision 1.124 retrieving revision 1.125 diff -u -d -r1.124 -r1.125 --- ChangeLog 5 Oct 2008 18:17:55 -0000 1.124 +++ ChangeLog 14 Nov 2008 21:14:51 -0000 1.125 @@ -3,6 +3,7 @@ * custom object type allows to reference objects * new support for sqlite 2.* * modified bugautoname replacement keys (see comment in config_default.pinc) + * creation of a checklist workingcopy now requires MOD permissions on the checklist 20 August 2008 * Release 1.4 * much bugfixes |
|
From: Gero K. <gok...@us...> - 2008-11-14 21:14:59
|
Update of /cvsroot/tutos/tutos/php/installation In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv10192/php/installation Modified Files: installation.pinc installation_new.php installation_show.php Removed Files: installation_del.php Log Message: various fixes due to more automated tests --- installation_del.php DELETED --- Index: installation_new.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/installation/installation_new.php,v retrieving revision 1.28 retrieving revision 1.29 diff -u -d -r1.28 -r1.29 --- installation_new.php 13 Sep 2008 19:29:54 -0000 1.28 +++ installation_new.php 14 Nov 2008 21:14:51 -0000 1.29 @@ -41,10 +41,10 @@ echo "<tr>\n"; echo $this->showfieldc($lang['Product'],1,"pid"); echo " <td colspan=\"3\">"; - if ( $this->obj->product == -1 ) { + if ( count($this->obj->plist) > 0 ) { echo "<select name=\"pid\">\n"; foreach ($this->obj->plist as $i => $f) { - echo '<option value="'. $i .'"'. ($i == $this->obj->product->id ? ' selected="selected">* ':'>') . $lang[$f->getType()] .": ". myentities($f->getFullName()) ."</option>\n"; + echo '<option value="'. $i .'"'. (is_object($this->obj->product) && ($i == $this->obj->product->id) ? ' selected="selected">* ':'>') . $lang[$f->getType()] .": ". myentities($f->getFullName()) ."</option>\n"; } echo "</select>\n"; } else { @@ -150,18 +150,29 @@ $this->obj = new installation($this->dbconn); if ( isset($_GET['id']) ) { + $this->name = $lang['InstModify'] .": "; $this->obj = $this->obj->read($_GET['id'],$this->obj); - $this->name = $lang['InstModify'] .": ". $this->obj->getFullName(); + if ( is_object($this->obj) ) { + $this->name .= $this->obj->getFullName(); + } else { + $msg .= sprintf($lang['Err0012'],$lang['Installation'],''); + $this->stop = true; + return; + } $this->addHidden("id",$this->obj->id); } else { $this->name = $lang['InstCreate']; + if ( !$this->user->feature_ok(useinstmanagement,PERM_NEW) ) { + $msg .= sprintf($lang['Err0054'],$lang[$this->obj->getType()]); + $this->stop = true; + } } + + $this->obj->read_relations(); if ( isset($_GET['pid']) ) { $this->obj->product = getObject($this->dbconn,$_GET['pid']); $this->obj->money = $this->obj->product->price; $this->obj->currency = $this->obj->product->currency; - } else { - $this->obj->read_relations(); } $this->obj->set_float_from_arg('money','money',$lang['Money']); @@ -175,8 +186,8 @@ # Installer preset_from_array_or_input($this->obj,'installer',"i"); - if ( $this->obj->installer->id == -1 ) { - if ( $this->obj->product->id != -1 ) { + if ( !is_object($this->obj->installer) ) { + if ( is_object($this->obj->product) ) { # Defaults to manager $this->obj->installer = $this->obj->product->role[1]; } else { @@ -187,8 +198,8 @@ # Seller preset_from_array_or_input($this->obj,'seller',"s"); - if ( $this->obj->seller->id == -1 ) { - if ( $this->obj->product->id != -1 ) { + if ( !is_object($this->obj->seller) ) { + if ( is_object($this->obj->product) ) { # Defaults to manager $this->obj->seller = $this->obj->product->role[4]; } else { @@ -211,9 +222,9 @@ $x = installation::getSelectLink($this->user,$lang['Search']); $x[category][] = "obj"; $this->addmenu($x); - $m = installation::getOverviewLink($this->user,$lang['Installations']); - $m[category][] = "obj"; - $this->addmenu($m); +# $m = installation::getOverviewLink($this->user,$lang['Installations']); +# $m[category][] = "obj"; +# $this->addmenu($m); if ( $this->user->feature_ok(useinstmanagement,PERM_NEW) ) { $x = array( url => "installation/installation_new.php", confirm => false, Index: installation_show.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/installation/installation_show.php,v retrieving revision 1.29 retrieving revision 1.30 diff -u -d -r1.29 -r1.30 --- installation_show.php 18 Jan 2007 11:51:32 -0000 1.29 +++ installation_show.php 14 Nov 2008 21:14:51 -0000 1.30 @@ -1,6 +1,6 @@ <?php /** - * Copyright 1999 - 2007 by Gero Kohnert + * Copyright 1999 - 2008 by Gero Kohnert * * 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 @@ -184,10 +184,15 @@ $this->obj = new installation($this->dbconn); if (isset($_GET['id'])) { $this->obj = $this->obj->read($_GET['id'],$this->obj); - } - if ($this->obj->id < 1) { + if ( !is_object($this->obj) ) { + $msg .= sprintf($lang['Err0040'],$lang['Installation']); + $this->stop = true; + return; + } + } else { $msg .= sprintf($lang['Err0040'],$lang[$this->obj->getType()]); $this->stop = true; + return; } if ( ! $this->obj->see_ok() ) { $msg .= sprintf($lang['Err0022'],$lang[$this->obj->getType()]); Index: installation.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/installation/installation.pinc,v retrieving revision 1.50 retrieving revision 1.51 diff -u -d -r1.50 -r1.51 --- installation.pinc 14 Nov 2008 14:23:04 -0000 1.50 +++ installation.pinc 14 Nov 2008 21:14:51 -0000 1.51 @@ -11,6 +11,7 @@ * */ +require_once 'timetrack.pinc'; /* --------------------------------------------------------------------------- * List all installation * cols > 0 make sperate rows with cols columns for each installation @@ -159,7 +160,7 @@ function read_relations ( ) { global $lang; $this->plist = array(); - if ( $this->product == -1 ) { + if ( !is_object($this->product) ) { # new or unset => show all possible projects $q = "SELECT * from ". $this->dbconn->prefix ."products where state != ". PROD_STATE_CANCEL ." and state != ". PROD_STATE_QCANCEL ." ORDER by name "; $result = $this->dbconn->Exec($q); @@ -182,7 +183,7 @@ */ function getFullName() { global $lang; - if ( !is_object($this->product) && $this->product == -1 ) { + if ( !is_object($this->product) ) { return $lang['HistoryDeleted'] ." ". $this->salesdate->getDate(); } return sprintf("%s %s", $this->product->getFullname() , $this->salesdate->getDate()); @@ -200,10 +201,22 @@ return "installation/installation_new.php?id=". $this->id; } /** - * Return a URL to delete this installation + * the url where we go after deleting this object */ - function getDelURL() { - return "installation/installation_del.php?id=". $this->id; + function get_after_del_url () { + if (is_object($this->poduct)) { + return $this->product->getUrl(); + } + return "installation/installation_overview.php"; + } + /** + * the url where we when deleting fails + */ + function get_failed_del_Url () { + if ($this->see_ok()) { + return $this->get_after_del_url(); + } + return "installation/installation_overview.php"; } /** * Return a link to this installation |
|
From: Gero K. <gok...@us...> - 2008-11-14 21:14:59
|
Update of /cvsroot/tutos/tutos/php/rate In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv10192/php/rate Modified Files: rate_new.php Log Message: various fixes due to more automated tests Index: rate_new.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/rate/rate_new.php,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- rate_new.php 21 Sep 2008 16:41:37 -0000 1.13 +++ rate_new.php 14 Nov 2008 21:14:52 -0000 1.14 @@ -2,6 +2,10 @@ /** * Copyright 2000 - 2008 by Gero Kohnert and ecosoft * + * 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; version 2 of the License. + * * @modulegroup rate * @module rate_new * @package rate @@ -137,12 +141,18 @@ if ( isset($_GET['id']) ){ $this->obj = $this->obj->read($_GET['id'],$this->obj); $this->name = $lang['RateMod']; - if ( $this->obj->id < 0 ) { - $msg .= sprintf($lang['Err0040'],$lang[$this->obj->getType()]); + if ( !is_object($this->obj) ) { + $msg .= sprintf($lang['Err0040'],$lang['Rate']); $this->stop = true ; + return; } } else { $this->name = $lang['RateCreation']; + if ( !$this->user->feature_ok(userates,PERM_NEW) ) { + $msg .= sprintf($lang['Err0054'],$lang[$this->obj->getType()]); + $this->stop = true; + return; + } } if ( isset($_GET['link_id']) ){ $this->obj->link_id = $_GET['link_id']; @@ -199,4 +209,4 @@ <!-- CVS Info: $Id$ $Author$ ---> +--> \ No newline at end of file |
|
From: Gero K. <gok...@us...> - 2008-11-14 21:14:58
|
Update of /cvsroot/tutos/tutos/php/url In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv10192/php/url Modified Files: url_new.php Log Message: various fixes due to more automated tests Index: url_new.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/url/url_new.php,v retrieving revision 1.21 retrieving revision 1.22 diff -u -d -r1.21 -r1.22 --- url_new.php 21 Sep 2008 16:41:38 -0000 1.21 +++ url_new.php 14 Nov 2008 21:14:52 -0000 1.22 @@ -93,32 +93,40 @@ if ( isset($_GET['id']) ){ $this->obj = $this->obj->read($_GET['id'],$this->obj); $this->name = $lang['URLMod']; + if ( !is_object($this->obj) ) { + $msg .= sprintf($lang['Err0040'],$lang['URL']); + $this->stop = true; + return; + } $this->addHidden("id",$this->obj->id); $this->ref = getObject($this->dbconn,$this->obj->link_id); $this->addHidden("link_id",$this->ref->id); - if ($this->obj->id < 0) { - $msg .= sprintf($lang['Err0040'],$lang[$this->obj->getType()]); - $this->stop = true; - } } else { $this->name = $lang['URLCreate']; + if (!$this->user->feature_ok(useurl,PERM_NEW) ) { + $msg .= sprintf($lang['Err0054'],$lang[$this->obj->getType()]); + $this->stop = true; + return; + } if ( isset($_GET['link_id']) ){ $this->ref = getObject($this->dbconn,$_GET['link_id']); - if(!is_object($this->ref)) { + if(!is_object($this->ref)) { $msg .= sprintf($lang['Err0040'],$lang['Reference']); $this->stop = true; - } + return; + } $this->addHidden("link_id",$this->ref->id); } else { + $msg .= sprintf($lang['Err0040'],$lang['Reference']); $this->stop = true; + return; } } - if (($this->obj->id < 0) && !$this->user->feature_ok(useurl,PERM_NEW) ) { - $msg .= sprintf($lang['Err0054'],$lang[$this->obj->getType()]); - $this->stop = true; - } else if (! $this->obj->mod_ok() ) { + + if (! $this->obj->mod_ok() ) { $msg .= sprintf($lang['Err0024'],$lang[$this->obj->getType()]); $this->stop = true; + return; } # menu |
|
From: Gero K. <gok...@us...> - 2008-11-14 21:14:58
|
Update of /cvsroot/tutos/tutos/php/resource In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv10192/php/resource Modified Files: resource_new.php Log Message: various fixes due to more automated tests Index: resource_new.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/resource/resource_new.php,v retrieving revision 1.29 retrieving revision 1.30 diff -u -d -r1.29 -r1.30 --- resource_new.php 2 Jan 2007 19:59:59 -0000 1.29 +++ resource_new.php 14 Nov 2008 21:14:52 -0000 1.30 @@ -1,6 +1,6 @@ <?php /** - * Copyright 2001 - 2007 by Gero Kohnert + * Copyright 2001 - 2008 by Gero Kohnert * * 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 @@ -89,14 +89,19 @@ if ( isset($_GET['id']) ) { $this->obj = $this->obj->read($_GET['id'],$this->obj); - if ( $this->obj->id < 0 ) { + if ( !is-object($this->obj) ) { $msg .= sprintf($lang['Err0040'],$lang[$this->obj->getType()]); $this->stop = true ; - } else { - $this->name = $lang['ResModify'] .": ". myentities($this->obj->getFullName()); + return; } + $this->name = $lang['ResModify'] .": ". myentities($this->obj->getFullName()); } else { $this->name = $lang['ResCreate']; + if (!$this->user->feature_ok(useresource,PERM_NEW) ) { + $msg .= sprintf($lang['Err0054'],$lang[$this->obj->getType()]); + $this->stop = true; + return; + } } if ( isset($_GET['name']) ) { @@ -105,10 +110,7 @@ if ( isset($_GET['desc']) ) { $this->obj->desc = StripSlashes($_GET['desc']); } - if (($this->obj->id < 0) && !$this->user->feature_ok(useresource,PERM_NEW) ) { - $msg .= sprintf($lang['Err0054'],$lang[$this->obj->getType()]); - $this->stop = true; - } else if (! $this->obj->mod_ok() ) { + if (! $this->obj->mod_ok() ) { $msg .= sprintf($lang['Err0024'],$lang[$this->obj->getType()]); $this->stop = true; } @@ -141,4 +143,4 @@ <!-- CVS Info: $Id$ $Author$ ---> +--> \ No newline at end of file |
|
From: Gero K. <gok...@us...> - 2008-11-14 21:14:58
|
Update of /cvsroot/tutos/tutos/php/file In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv10192/php/file Modified Files: file_new.php Log Message: various fixes due to more automated tests Index: file_new.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/file/file_new.php,v retrieving revision 1.29 retrieving revision 1.30 diff -u -d -r1.29 -r1.30 --- file_new.php 13 Sep 2008 19:29:54 -0000 1.29 +++ file_new.php 14 Nov 2008 21:14:51 -0000 1.30 @@ -210,12 +210,14 @@ if ( isset($_GET['id']) ){ $this->name = $lang['FileMod']; $this->obj = $this->obj->read($_GET['id'],$this->obj); - if ( $this->obj->id < 0 ) { - $msg .= sprintf($lang['Err0040'],$lang[$this->obj->getType()]); + if ( !is_object($this->obj) ) { + $msg .= sprintf($lang['Err0040'],$lang['File']); $this->stop = true ; + return; } else if ( ! $this->obj->mod_ok() ) { $msg .= sprintf($lang['Err0024'],$lang[$this->obj->getType()]); $this->stop = true; + return; } $this->name .= ": ".$this->obj->getFullName(); } else { |
|
From: Gero K. <gok...@us...> - 2008-11-14 21:14:57
|
Update of /cvsroot/tutos/tutos/php/invoice In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv10192/php/invoice Modified Files: invoice_new.php Log Message: various fixes due to more automated tests Index: invoice_new.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/invoice/invoice_new.php,v retrieving revision 1.58 retrieving revision 1.59 diff -u -d -r1.58 -r1.59 --- invoice_new.php 13 Sep 2008 19:29:55 -0000 1.58 +++ invoice_new.php 14 Nov 2008 21:14:51 -0000 1.59 @@ -420,7 +420,7 @@ global $lang, $tutos; echo "<tr><td>"; - if ( $this->obj->id > 0 ) { + if ( is_object($this->obj) && ($this->obj->id > 0) ) { echo menulink("invoice/invoice_show.php?id=". $this->obj->id ,$lang['AppSeeEntry'],$lang['AppSeeEntryI']) . "<br />"; } echo "</td></tr>"; @@ -445,14 +445,21 @@ $this->obj->read_ref(); } else { $this->name = $lang['InvoiceCreate']; + if ( !$this->user->feature_ok(useinvoice,PERM_NEW) ) { + $msg .= sprintf($lang['Err0054'],$lang[$this->obj->getType()]); + $this->stop = true; + return; + } + if ( !isset($_GET['link_id']) ) { + $msg .= $lang['Err0048']; + $this->stop = true; + return; + } } - - if ( ($this->obj->id < 0) && !$this->user->feature_ok(useinvoice,PERM_NEW) ) { - $msg .= sprintf($lang['Err0054'],$lang[$this->obj->getType()]); - $this->stop = true; - } else if ( ! $this->obj->mod_ok() ) { + if ( ! $this->obj->mod_ok() ) { $msg .= sprintf($lang['Err0024'],$lang[$this->obj->getType()]); $this->stop = true; + return; } $this->obj->set_int_from_arg('state','state',$lang['InvoiceState']); @@ -483,7 +490,7 @@ $this->addmenu($m); add_module_newlinks($this,$this->obj); - if ( ($this->obj->id > 0) && $this->obj->del_ok() ) { + if ( $this->obj->del_ok() ) { $x = array( url => $this->obj->getDelUrl(), text => $lang['Delete'], info => sprintf($lang['InvDelInfo'],$this->obj->getFullname()), |
Update of /cvsroot/tutos/tutos/php In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv10192/php Modified Files: company_new.php department_new.php product_new.php task_new.php team.pinc team_new.php timetrack_new.php Log Message: various fixes due to more automated tests Index: team_new.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/team_new.php,v retrieving revision 1.57 retrieving revision 1.58 diff -u -d -r1.57 -r1.58 --- team_new.php 15 Aug 2007 12:03:58 -0000 1.57 +++ team_new.php 14 Nov 2008 21:14:51 -0000 1.58 @@ -1,6 +1,6 @@ <?php /** - * Copyright 1999 - 2007 by Gero Kohnert + * Copyright 1999 - 2008 by Gero Kohnert * * 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 @@ -196,7 +196,7 @@ $this->obj = new team($this->dbconn); if ( isset($_GET['id']) ) { $this->obj = $this->obj->read($_GET['id'],$this->obj); - if ( is_numeric($this->obj) && $this->obj == -1 ) { + if ( !is_object($this->obj) ) { $msg .= sprintf($lang['Err0040'],$lang['Team']); $this->stop = true; return; @@ -209,15 +209,17 @@ $this->obj->name = $lang['PlsChangeName']; $this->name = $lang['TeamCreate']; $this->member[$this->user->id] = $this->user; + if ( ($this->obj->id < 0) && !$this->user->feature_ok(useteams,PERM_NEW) ) { + $msg .= sprintf($lang['Err0054'],$lang[$this->obj->getType()]); + $this->stop = true; + return; + } } $this->obj->set_string_from_arg('name','name',$lang['TeamName']); $this->obj->set_string_from_arg('email','email',$lang['AdrEmail']); - if ( ($this->obj->id < 0) && !$this->user->feature_ok(useteams,PERM_NEW) ) { - $msg .= sprintf($lang['Err0054'],$lang[$this->obj->getType()]); - $this->stop = true; - } else if (! $this->obj->mod_ok() ) { + if (! $this->obj->mod_ok() ) { $msg .= sprintf($lang['Err0024'],$lang[$this->obj->getType()]); $this->stop = true; } Index: task_new.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/task_new.php,v retrieving revision 1.82 retrieving revision 1.83 diff -u -d -r1.82 -r1.83 --- task_new.php 13 Sep 2008 19:29:52 -0000 1.82 +++ task_new.php 14 Nov 2008 21:14:51 -0000 1.83 @@ -239,19 +239,24 @@ if ( isset($_GET['id']) ) { $this->obj = $this->obj->read($_GET['id'],$this->obj); $this->name = sprintf($lang['TaskModify'],$this->obj->getFullName()); - if ( $this->obj->id < 0 ) { - $msg .= sprintf($lang['Err0040'],$lang[$this->obj->getType()]); + if ( !is_object($this->obj) ) { + $msg .= sprintf($lang['Err0040'],$lang['Task']); $this->stop = true ; + return; } } else { $this->name = $lang['TaskCreate']; + if ( !$this->user->feature_ok(usetaskmanagement,PERM_NEW) ) { + $msg .= sprintf($lang['Err0054'],$lang[$this->obj->getType()]); + $this->stop = true; + return; + } } - if ( ($this->obj->id < 0) && !$this->user->feature_ok(usetaskmanagement,PERM_NEW) ) { - $msg .= sprintf($lang['Err0054'],$lang[$this->obj->getType()]); - $this->stop = true; - } else if ( ! $this->obj->mod_ok() ) { + + if ( ! $this->obj->mod_ok() ) { $msg .= sprintf($lang['Err0024'],$lang[$this->obj->getType()]); $this->stop = true ; + return; } $this->obj->set_string_from_arg('name','name',$lang['TaskName']); Index: product_new.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/product_new.php,v retrieving revision 1.106 retrieving revision 1.107 diff -u -d -r1.106 -r1.107 --- product_new.php 13 Nov 2008 19:47:51 -0000 1.106 +++ product_new.php 14 Nov 2008 21:14:51 -0000 1.107 @@ -305,7 +305,7 @@ if ( isset($_GET['id']) ) { $this->obj = $this->obj->read($_GET['id'],$this->obj); - if ( is_numeric($this->obj) && $this->obj == -1 ) { + if ( !is_object($this->obj) ) { $msg .= sprintf($lang['Err0040'],$lang['Product']); $this->stop = true; return; Index: team.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/team.pinc,v retrieving revision 1.101 retrieving revision 1.102 diff -u -d -r1.101 -r1.102 --- team.pinc 6 Nov 2008 15:33:10 -0000 1.101 +++ team.pinc 14 Nov 2008 21:14:51 -0000 1.102 @@ -47,6 +47,8 @@ function read($id,&$obj) { global $g_hash,$lang,$current_user; + if ( ! is_numeric($id) ) return -1; + if ( ! is_object($obj) ) return -1; if ( -1 == $id ) return $obj; Index: timetrack_new.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/timetrack_new.php,v retrieving revision 1.78 retrieving revision 1.79 diff -u -d -r1.78 -r1.79 --- timetrack_new.php 13 Sep 2008 19:29:53 -0000 1.78 +++ timetrack_new.php 14 Nov 2008 21:14:51 -0000 1.79 @@ -180,7 +180,7 @@ echo $this->showfield($lang['TTRefFinished'],0,"finished"); echo '<td><input type="checkbox" name="finished" value="1"></td>'; echo "</tr>\n"; - } + } echo "<tr>\n"; if ( $this->obj->id != -1 ) { @@ -223,12 +223,13 @@ if ( isset($_GET['id']) && ($_GET['id'] > 0) ) { # existing timetrack $this->obj = $this->obj->read($_GET['id'],$this->obj); - if ( ($this->obj->t_start->notime == 0) && ( $this->mode != 2) ) { - $this->mode = 1; - } if ( !is_object($this->obj) || ($this->obj->id < 0) ) { $msg .= sprintf($lang['Err0040'],$lang['timetrack']); $this->stop = true; + return; + } + if ( ($this->obj->t_start->notime == 0) && ( $this->mode != 2) ) { + $this->mode = 1; } } else { # new stuff Index: department_new.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/department_new.php,v retrieving revision 1.65 retrieving revision 1.66 diff -u -d -r1.65 -r1.66 --- department_new.php 13 Sep 2008 19:29:52 -0000 1.65 +++ department_new.php 14 Nov 2008 21:14:51 -0000 1.66 @@ -129,14 +129,20 @@ if ( isset($_GET['id']) && ($_GET['id'] != "-1" )) { $this->obj = $this->obj->read($_GET['id'],$this->obj); - $this->name = $lang['DepartmentModify'] .": ". $this->obj->getFullName(); - if ($this->obj->id < 0) { + if (!is_object($this->obj->id)) { $msg .= sprintf($lang['Err0040'],$lang[$this->obj->getType()]); $this->stop = true; + return; } + $this->name = $lang['DepartmentModify'] .": ". $this->obj->getFullName(); } else { $this->name = $lang['DepartmentCreate']; $this->obj->name = $lang['PlsChangeName']; + if (!$this->user->feature_ok(useaddressbook,PERM_NEW) ) { + $msg .= sprintf($lang['Err0054'],$lang[$this->obj->getType()]); + $this->stop = true; + return; + } } $this->obj->read_locs_data(); @@ -158,12 +164,10 @@ $i++; } - if ( ($this->obj->id < 0) && !$this->user->feature_ok(useaddressbook,PERM_NEW) ) { - $msg .= sprintf($lang['Err0054'],$lang[$this->obj->getType()]); - $this->stop = true; - } else if ( ! $this->obj->mod_ok() ) { + if ( ! $this->obj->mod_ok() ) { $msg .= sprintf($lang['Err0024'],$lang[$this->obj->getType()]); $this->stop = true; + return; } if ( isset($_GET['name']) ) { $this->obj->name = StripSlashes($_GET['name']); Index: company_new.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/company_new.php,v retrieving revision 1.67 retrieving revision 1.68 diff -u -d -r1.67 -r1.68 --- company_new.php 2 Jan 2007 19:59:56 -0000 1.67 +++ company_new.php 14 Nov 2008 21:14:51 -0000 1.68 @@ -1,6 +1,6 @@ <?php /** - * Copyright 1999 - 2007 by Gero Kohnert + * Copyright 1999 - 2008 by Gero Kohnert * * 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 @@ -156,14 +156,20 @@ if ( isset($_GET['id']) && ($_GET['id'] != "-1" )) { $this->obj = $this->obj->read($_GET['id'],$this->obj); - $this->name = $lang['CompanyModify'] .": ".myentities( $this->obj->getFullName()); - if ($this->obj->id < 0) { + if (!is_object($this->obj)) { $msg .= sprintf($lang['Err0040'],$lang[$this->obj->getType()]); $this->stop = true; + return; } + $this->name = $lang['CompanyModify'] .": ".myentities( $this->obj->getFullName()); } else { $this->name = $lang['CompanyCreate']; $this->obj->name = $lang['PlsChangeName']; + if ( !$this->user->feature_ok(useaddressbook,PERM_NEW) ) { + $msg .= sprintf($lang['Err0054'],$lang[$this->obj->getType()]); + $this->stop = true; + return; + } } $this->obj->read_locs_data(); @@ -184,12 +190,10 @@ $i++; } - if ( ($this->obj->id < 0) && !$this->user->feature_ok(useaddressbook,PERM_NEW) ) { - $msg .= sprintf($lang['Err0054'],$lang[$this->obj->getType()]); - $this->stop = true; - } else if ( ! $this->obj->mod_ok() ) { + if ( ! $this->obj->mod_ok() ) { $msg .= sprintf($lang['Err0024'],$lang[$this->obj->getType()]); $this->stop = true; + return; } if ( isset($_GET['name']) ) { |
|
From: Gero K. <gok...@us...> - 2008-11-14 21:14:57
|
Update of /cvsroot/tutos/tutos/php/expense In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv10192/php/expense Modified Files: expense_new.php Log Message: various fixes due to more automated tests Index: expense_new.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/expense/expense_new.php,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- expense_new.php 14 Jun 2008 12:30:07 -0000 1.11 +++ expense_new.php 14 Nov 2008 21:14:51 -0000 1.12 @@ -189,12 +189,18 @@ if ( isset($_GET['id']) ){ $this->obj = $this->obj->read($_GET['id'],$this->obj); $this->name = $lang['ExpenseMod']; - if ( $this->obj->id < 0 ) { + if ( !is_object($this->obj) ) { $msg .= sprintf($lang['Err0040'],$lang[$this->obj->getType()]); $this->stop = true ; + return; } } else { $this->name = $lang['ExpenseCreation']; + if ( !$this->user->feature_ok(useexpense,PERM_NEW) ) { + $msg .= sprintf($lang['Err0054'],$lang[$this->obj->getType()]); + $this->stop = true; + return; + } } if ( isset($_GET['link_id']) ){ $this->obj->link_id = $_GET['link_id']; |
|
From: Gero K. <gok...@us...> - 2008-11-14 21:14:57
|
Update of /cvsroot/tutos/tutos/php/checklist In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv10192/php/checklist Modified Files: checkfield_new.php checkfield_show.php Log Message: various fixes due to more automated tests Index: checkfield_show.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/checklist/checkfield_show.php,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- checkfield_show.php 14 Nov 2008 14:23:03 -0000 1.13 +++ checkfield_show.php 14 Nov 2008 21:14:51 -0000 1.14 @@ -103,14 +103,22 @@ $this->obj = new checkfield($this->dbconn); if ( isset($_GET['id']) ) { $this->obj = $this->obj->read($_GET['id'],$this->obj); + if ( !is_object($this->obj) ) { + $msg .= sprintf($lang['Err0012'],$lang['Checklist'],''); + $this->stop = true; + return; + } $this->obj->read_reference(); - } + } else { + $msg .= sprintf($lang['Err0040'],$lang[$this->obj->getType()]); + $this->stop = true; + return; + } + if ( ! $this->obj->see_ok() ) { $msg .= sprintf($lang['Err0022'],$lang[$this->obj->getType()]); $this->stop = true; - } else if ( $this->obj->id < 0 ) { - $msg .= sprintf($lang['Err0040'],$lang[$this->obj->getType()]); - $this->stop = true; + return; } # menu $m = checklist::getSelectLink($this->user,$lang['Search']); Index: checkfield_new.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/checklist/checkfield_new.php,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- checkfield_new.php 14 Nov 2008 14:23:03 -0000 1.14 +++ checkfield_new.php 14 Nov 2008 21:14:51 -0000 1.15 @@ -122,17 +122,18 @@ if ( isset($_GET['id']) ) { $this->name = $lang['CheckfieldModify'] ." : "; $this->obj = $this->obj->read($_GET['id'],$this->obj); - if ( is_object($this->obj) ) { - $this->name .= $this->obj->getFullName(); - } else { + if ( !is_object($this->obj) ) { $msg .= sprintf($lang['Err0012'],$lang['Checklist'],''); $this->stop = true; + return; } + $this->name .= $this->obj->getFullName(); } else { $this->name = $lang['CheckfieldCreate']; if ( !$this->user->feature_ok(usecheckfields,PERM_NEW) ) { $msg .= sprintf($lang['Err0054'],$lang[$this->obj->getType()]); $this->stop = true; + return; } } |
|
From: Gero K. <gok...@us...> - 2008-11-14 14:31:37
|
Update of /cvsroot/tutos/tutos/php/reminder In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv27409/reminder Modified Files: reminder.pinc Removed Files: reminder_del.php Log Message: introduced a generic deloobject script / better method o resolve history tags Index: reminder.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/reminder/reminder.pinc,v retrieving revision 1.23 retrieving revision 1.24 diff -u -d -r1.23 -r1.24 --- reminder.pinc 14 Nov 2008 14:23:04 -0000 1.23 +++ reminder.pinc 14 Nov 2008 14:31:26 -0000 1.24 @@ -248,10 +248,21 @@ return 'reminder/reminder_new.php?id='.$this->id; } /** - * Return a link to delete this reminder + * the url where we go after deleting this object */ - function getDelURL() { - return 'reminder/reminder_del.php?id='.$this->id; + function get_after_del_url () { + $this->read_reference(); + return $this->ref->getUrl(); + } + /** + * the url where we when deleting fails + */ + function get_failed_del_Url () { + if ($this->see_ok()) { + return $this->getUrl(); + } + $this->read_reference(); + return $this->ref->getUrl(); } /** * Return a link to this reminder --- reminder_del.php DELETED --- |
|
From: Gero K. <gok...@us...> - 2008-11-14 14:31:37
|
Update of /cvsroot/tutos/tutos/php/rate In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv27409/rate Modified Files: rate_show.php Log Message: introduced a generic deloobject script / better method o resolve history tags Index: rate_show.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/rate/rate_show.php,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- rate_show.php 13 Jun 2008 19:54:31 -0000 1.10 +++ rate_show.php 14 Nov 2008 14:31:26 -0000 1.11 @@ -51,7 +51,7 @@ echo "<tr>\n"; echo $this->showfield($lang['RateWorkerReference']); - if ( $this->obj->worker > 0 ) { + if ( is_object($this->obj->worker) ) { echo $this->showdata($this->obj->worker->getLink(),1); } else { #echo $this->showdata($this->obj->getRefLink(),3); |
|
From: Gero K. <gok...@us...> - 2008-11-14 14:23:12
|
Update of /cvsroot/tutos/tutos/php/bugtracking In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv26754/bugtracking Modified Files: bug.pinc Log Message: introduced a generic deloobject script / better method o resolve history tags Index: bug.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/bugtracking/bug.pinc,v retrieving revision 1.61 retrieving revision 1.62 diff -u -d -r1.61 -r1.62 --- bug.pinc 6 Nov 2008 15:33:10 -0000 1.61 +++ bug.pinc 14 Nov 2008 14:23:03 -0000 1.62 @@ -165,6 +165,7 @@ return usebughist; } + function obj_read(&$obj) { if (! is_object($obj) ) return; @@ -959,6 +960,61 @@ function getHtmlIcon () { return 'bugs'; } + /** + * resolve a history Tag (to be called from history_show) + */ + function resolveHistoryTag ($f) { + global $lang; + + $x = null; + switch ($f['field']) { + case 'BugReportedFrom': + case 'BugAssignedTo': + $x = $f; + $x['field'] = isset( $lang[$f['field']]) ? $lang[$f['field']] : $f['field']; + if ( $f['old'] <= 0 ) { + $x['old'] = ''; + } else { + $b = getObject($this->dbconn,$f['old']); + if ( is_object($b) ) { + $x['old'] = $b->getLink(); + } else { + $x['old'] = makelink("history_show.php?id=". $f['old'],$lang['HistoryDeleted']) ; + } + } + if ( $f['new'] <= 0 ) { + $x['new'] = ''; + } else { + $b = getObject($this->dbconn,$f['new']); + if ( is_object($b) ) { + $x['new'] = $b->getLink(); + } else { + $x['new'] = makelink("history_show.php?id=". $f['new'],$lang['HistoryDeleted']) ; + } + } + break; + case 'BugMedium': + $x = $f; + $x['field'] = isset( $lang[$f['field']]) ? $lang[$f['field']] : $f['field']; + $x['old'] = $lang['BugMediums'][$f['old']]; + $x['new'] = $lang['BugMediums'][$f['new']]; + break; + case 'BugState': + $x = $f; + $x['field'] = isset( $lang[$f['field']]) ? $lang[$f['field']] : $f['field']; + $x['old'] = $lang['BugStates'][$f['old']]; + $x['new'] = $lang['BugStates'][$f['new']]; + break; + case 'BugClass': + $x = $f; + $x['field'] = isset( $lang[$f['field']]) ? $lang[$f['field']] : $f['field']; + $x['old'] = $lang['BugClasses'][$f['old']]; + $x['new'] = $lang['BugClasses'][$f['new']]; + break; + + } + return $x; + } /* --------------------------------------------------------------------------- * The following methods are abstract factory functions for groups * which handle the membership list of an object |
|
From: Gero K. <gok...@us...> - 2008-11-14 14:23:12
|
Update of /cvsroot/tutos/tutos/php/checklist In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv26754/checklist Modified Files: checkfield.pinc checkfield_new.php checkfield_show.php checklist_new.php checklist_show.php Log Message: introduced a generic deloobject script / better method o resolve history tags Index: checkfield.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/checklist/checkfield.pinc,v retrieving revision 1.28 retrieving revision 1.29 diff -u -d -r1.28 -r1.29 --- checkfield.pinc 7 Nov 2008 07:38:45 -0000 1.28 +++ checkfield.pinc 14 Nov 2008 14:23:03 -0000 1.29 @@ -261,6 +261,18 @@ return "checklist/checkfield_show.php?id=". $this->id; } /** + * Return a url that displays this resource + */ + function getModURL() { + return "checklist/checkfield_new.php?id=". $this->id; + } + /** + * Return a url that displays this resource + */ + function getDelURL() { + return "checklist/checkfield_del.php?id=". $this->id; + } + /** * Return a fullname */ function getFullname() { Index: checklist_new.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/checklist/checklist_new.php,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- checklist_new.php 2 Jun 2008 06:58:30 -0000 1.16 +++ checklist_new.php 14 Nov 2008 14:23:03 -0000 1.17 @@ -106,7 +106,7 @@ global $tutos,$lang; echo "<tr><td>"; - if ( ($this->obj->id > 0) && $this->obj->del_ok() ) { + if ( is_object($this->obj) && ($this->obj->id > 0) && $this->obj->del_ok() ) { echo confirmlink("checklist/checklist_del.php?id=". $this->obj->id ,$lang['Delete'],sprintf($lang['ChecklistDelete'],$this->obj->getFullname())) ." <br />"; } echo "</td></tr>"; @@ -120,17 +120,25 @@ $this->obj = new checklist($this->dbconn); if ( isset($_GET['id']) ) { + $this->name = $lang['ChecklistModify'] ." : "; $this->obj = $this->obj->read($_GET['id'],$this->obj); - } + if ( is_object($this->obj) ) { + $this->name .= $this->obj->getFullName(); + } else { + $msg .= sprintf($lang['Err0012'],$lang['Checklist'],''); + $this->stop = true; + } + } else { + $this->name = $lang['ChecklistCreate']; + if ( !$this->user->feature_ok(usechecklists,PERM_NEW) ) { + $msg .= sprintf($lang['Err0054'],$lang[$this->obj->getType()]); + $this->stop = true; + } + } $this->Classes = 0; $this->type_inp_protected = false; - if ( $this->obj->id > 0 ) { - $this->name = $lang['ChecklistModify'] ." : ". $this->obj->getFullName(); - } else { - $this->name = $lang['ChecklistCreate']; - } if ( isset($_GET['type']) ) { $this->obj->type = $_GET['type']; Index: checkfield_new.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/checklist/checkfield_new.php,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- checkfield_new.php 2 Oct 2008 15:08:32 -0000 1.13 +++ checkfield_new.php 14 Nov 2008 14:23:03 -0000 1.14 @@ -107,7 +107,7 @@ global $tutos,$lang; echo "<tr><td>"; - if ( ($this->obj->id > 0) && $this->obj->del_ok() ) { + if ( is_object($this->obj) && ($this->obj->id > 0) && $this->obj->del_ok() ) { echo confirmlink("checklist/checkfield_del.php?id=". $this->obj->id ,$lang['Delete'],sprintf($lang['CheckfieldDelete'],$this->obj->getFullname())) ." <br />"; } echo "</td></tr>"; @@ -120,17 +120,22 @@ $this->obj = new checkfield($this->dbconn); if ( isset($_GET['id']) ) { + $this->name = $lang['CheckfieldModify'] ." : "; $this->obj = $this->obj->read($_GET['id'],$this->obj); - } - - if ( $this->obj->id > 0 ) { - $this->name = $lang['CheckfieldModify'] ." : ". $this->obj->getFullName(); - } else if ( $this->obj == -1 ) { - $msg .= sprintf($lang['Err0012'],$lang['Checklist'],''); - $this->stop = true; + if ( is_object($this->obj) ) { + $this->name .= $this->obj->getFullName(); + } else { + $msg .= sprintf($lang['Err0012'],$lang['Checklist'],''); + $this->stop = true; + } } else { $this->name = $lang['CheckfieldCreate']; - } + if ( !$this->user->feature_ok(usecheckfields,PERM_NEW) ) { + $msg .= sprintf($lang['Err0054'],$lang[$this->obj->getType()]); + $this->stop = true; + } + } + if ( ($this->obj->id > 0) && (! $this->obj->mod_ok())) { $msg .= sprintf($lang['Err0024'],$lang[$this->obj->getType()]); Index: checklist_show.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/checklist/checklist_show.php,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- checklist_show.php 13 Nov 2008 19:47:51 -0000 1.18 +++ checklist_show.php 14 Nov 2008 14:23:03 -0000 1.19 @@ -110,7 +110,9 @@ } if ( $this->obj->use_ok() ) { if ( $this->obj->type == CL_TYPE_TEMPL ) { // Class - echo menulink("checklist/checkfield_new.php?link_id=". $this->obj->id ,$lang['CheckfieldCreate'],sprintf($lang['CheckfieldCreate'],$this->obj->getFullName())) ."<br />\n"; + if ( $this->user->feature_ok(usecheckfields,PERM_NEW) ) { + echo menulink("checklist/checkfield_new.php?link_id=". $this->obj->id ,$lang['CheckfieldCreate'],sprintf($lang['CheckfieldCreate'],$this->obj->getFullName())) ."<br />\n"; + } } echo menulink("checklist/checkfield_overview.php?link_id=". $this->obj->id,$lang['CheckfieldOverview'],$lang['CheckfieldOverview']) ."<br />\n"; Index: checkfield_show.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/checklist/checkfield_show.php,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- checkfield_show.php 20 Aug 2008 08:30:04 -0000 1.12 +++ checkfield_show.php 14 Nov 2008 14:23:03 -0000 1.13 @@ -35,7 +35,8 @@ echo $this->DataTableStart(); echo "<tr>\n"; - echo ' <th colspan="4">'. sprintf($lang['Showing'],$lang['Checkfield'] ." ".$this->obj->getFullName()) ."</th>\n"; + echo ' <th colspan="3">'. sprintf($lang['Showing'],$lang['Checkfield'] ." ".$this->obj->getFullName()) ."</th>\n"; + echo $this->showGuiIcons('<th class="icons">','</th>',$this->obj,$this->obj,array('mod','del'),false); echo "</tr>\n"; echo $this->CreatorInfoLine($this->obj,4); |
|
From: Gero K. <gok...@us...> - 2008-11-14 14:23:12
|
Update of /cvsroot/tutos/tutos/php/file In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv26754/file Modified Files: file.pinc file_ins.php Log Message: introduced a generic deloobject script / better method o resolve history tags Index: file_ins.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/file/file_ins.php,v retrieving revision 1.26 retrieving revision 1.27 diff -u -d -r1.26 -r1.27 --- file_ins.php 5 May 2008 12:06:04 -0000 1.26 +++ file_ins.php 14 Nov 2008 14:23:03 -0000 1.27 @@ -29,7 +29,7 @@ /* Check Input */ $msg = ""; $log = ""; - $links = array(); +# $links = array(); if ( empty($_POST['gotourl']) ) { $gotourl = "file/file_new.php"; @@ -40,6 +40,7 @@ if ( isset($_POST['id']) ) { $f = $f->read($_POST['id'],$f); $gotourl = addUrlParameter($gotourl,"id=". $f->id,true); + $f->readLinks(); } if ( $f->id == -1 ) { # Versioning System could only be set at first save @@ -48,6 +49,7 @@ $f->vsys = $_POST['vsys']; } } + if ( isset($_POST['save']) ) { $f->savemode = $_POST['save']; } @@ -58,7 +60,8 @@ foreach($_REQUEST['link_id'] as $i => $j) { $l = getObject($f->dbconn,$j); if (is_object($l)) { - $links[$l->id] = &$l; +# $links[$l->id] = &$l; + $f->addReference($l); } $gotourl = addUrlParameter($gotourl,"link_id[]=". UrlEncode($l->id),true); unset($l); @@ -80,7 +83,8 @@ if ( 1 == count($l)) { # cool we got an exact input foreach ($l as $x) { - $links[$x->id] = &$x; + $f->addReference($x); +# $links[$x->id] = &$x; unset ($x); } } else if ( count($l) > $tutos[maxselect]) { @@ -101,15 +105,16 @@ if ( isset($_POST['del']) && is_array($_POST['del'])) { foreach($_POST['del'] as $i => $j) { unset($links[$j]); + $f->delReference($j); $gotourl = addUrlParameter($gotourl,"del[]=". UrlEncode($j),true); } } # Manage the list of links - unset($f->links); - foreach($links as $l) { - $f->addReference($l); - } +# unset($f->links); +# foreach($links as $l) { +# $f->addReference($l); +# } # check for at least one reference if (count($f->links) == 0) { Index: file.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/file/file.pinc,v retrieving revision 1.78 retrieving revision 1.79 diff -u -d -r1.78 -r1.79 --- file.pinc 13 Nov 2008 19:47:51 -0000 1.78 +++ file.pinc 14 Nov 2008 14:23:03 -0000 1.79 @@ -787,6 +787,16 @@ return; } /** + * del a reference + */ + function delReference($oid) { + if (isset($this->links[$oid])) { + $this->modified[] = array ( "field" => "FileReference", "old" => $oid , "new" => -1 ); + unset ($this->links[$oid]); + } + return; + } + /** * Save file reference to DB * Copy file to repository */ @@ -1054,6 +1064,42 @@ function getHtmlIcon () { return 'paper'; } + /** + * resolve a history Tag (to be called from history_show) + */ + function resolveHistoryTag ($f) { + global $lang; + + $x = null; + switch ($f['field']) { + case 'FileCreate': + case 'FileReference': + $x = $f; + $x['field'] = isset( $lang[$f['field']]) ? $lang[$f['field']] : $f['field']; + if ( $f['old'] <= 0 ) { + $x['old'] = ''; + } else { + $b = getObject($this->dbconn,$f['old']); + if ( is_object($b) ) { + $x['old'] = $b->getLink(); + } else { + $x['old'] = makelink("history_show.php?id=". $f['old'],$lang['HistoryDeleted']) ; + } + } + if ( $f['new'] <= 0 ) { + $x['new'] = ''; + } else { + $b = getObject($this->dbconn,$f['new']); + if ( is_object($b) ) { + $x['new'] = $b->getLink(); + } else { + $x['new'] = makelink("history_show.php?id=". $f['new'],$lang['HistoryDeleted']) ; + } + } + break; + } + return $x; + } /* --------------------------------------------------------------------------- * The following methods are abstract factory functions for groups * which handle the membership list of an object @@ -1308,14 +1354,14 @@ # read the directory if ($dh = opendir($tutos['file_local_searchpath'])) { while (($file = readdir($dh)) !== false) { - $ff = $tutos['file_local_searchpath'].'/'.$file; + $ff = $tutos['file_local_searchpath'].'/'.$file; if (filetype($ff) == 'dir') continue; if (filesize($ff) == 0) continue; if (!is_readable($ff) == 'dir') continue; - if ($filter != '') { + if ($filter != '') { if (!eregi($filter,$file)) continue; - } + } $r .= ' <option value="'.$file.'">'. myentities($file).' ('.(filesize($ff)/1024).' KB)' ."</option>\n"; } closedir($dh); |
|
From: Gero K. <gok...@us...> - 2008-11-14 14:23:11
|
Update of /cvsroot/tutos/tutos/php In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv26754 Modified Files: base.pinc history_show.php Added Files: delobject.php Log Message: introduced a generic deloobject script / better method o resolve history tags --- NEW FILE: delobject.php --- <?php /** * Copyright 1999 - 2008 by Gero Kohnert * * 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; version 2 of the License. * * delte a object from the database * */ $tutos['base'] = ".."; include_once 'webelements.p3'; include_once 'permission.p3'; /* Check if user is allowed to use it */ check_user(); /* Check Input */ $msg = ""; $gotourl = "mytutos.php"; if ( !isset($_REQUEST['id']) ) { $msg .= $lang['Err0048'] ."<br />"; } else { $obj = getObject($dbconn,$_REQUEST['id']); $gotourl = $obj->get_failed_del_Url(); } if ( ! $obj->del_ok() ) { $msg .= sprintf($lang['Err0023'],$lang[$obj->getType()]) ."<br />"; } if ( $msg == "" ) { $gotourl = $obj->get_after_del_Url(); $dbconn->Begin("WORK"); $msg .= $obj->delete(); $dbconn->Commit("WORK"); } $gotourl = addMessage($gotourl,$msg,true); $gotourl = addSessionKey($gotourl,true); Header("Status: 302 Moved Temporarily"); Header("Location:". $gotourl); $dbconn->Close(); // CVS Info: $Id: delobject.php,v 1.1 2008/11/14 14:23:03 gokohnert Exp $ // $Author: gokohnert $ ?> Index: base.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/base.pinc,v retrieving revision 1.106 retrieving revision 1.107 diff -u -d -r1.106 -r1.107 --- base.pinc 7 Nov 2008 15:33:30 -0000 1.106 +++ base.pinc 14 Nov 2008 14:23:03 -0000 1.107 @@ -411,6 +411,21 @@ return acl_del_ok($this); } /** + * the url where we go after deleting this object + */ + function get_after_del_url () { + return 'mytutos.php'; + } + /** + * the url where we when deleting fails + */ + function get_failed_del_Url () { + if ($this->see_ok()) { + return $this->getUrl(); + } + return 'mytutos.php'; + } + /** * Checks if the current user is allowed to modify this object * * @see del_ok(), see_ok() @@ -573,7 +588,7 @@ * get a url to this object */ function getURL () { - return "mytutos.php"; + return "showobject.php?id=".$this->id; } /** * get a url to the modify page of this object @@ -585,7 +600,7 @@ * get a url to the delete script of this object */ function getDelURL () { - return "mytutos.php"; + return "delobject.php?id=".$this->id; } /** * get a link to this object @@ -857,6 +872,12 @@ function getHelpIndex () { return ''; } + /** + * resolve a history Tag (to be called from history_show) + */ + function resolveHistoryTag ($f) { + return null; + } /** * get the id as a unique identifier Index: history_show.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/history_show.php,v retrieving revision 1.81 retrieving revision 1.82 diff -u -d -r1.81 -r1.82 --- history_show.php 7 Jul 2008 18:42:25 -0000 1.81 +++ history_show.php 14 Nov 2008 14:23:03 -0000 1.82 @@ -110,162 +110,57 @@ } unset($x); } - if ( $f['field'] == "TaskState" ) { echo " <td><b> ". (isset( $lang[$f["field"]]) ? $lang[$f["field"]] : $f["field"]) ."</b></td>\n"; echo " <td> ". $lang['TaskStates'][$f["old"]] ."</td>\n"; echo " <td> ". $lang['TaskStates'][$f["new"]] ."</td>\n"; - } else if ( $f['field'] == "BugState" ) { - echo " <td><b> ". (isset( $lang[$f["field"]]) ? $lang[$f["field"]] : $f["field"]) ."</b></td>\n"; - echo " <td> ". $lang['BugStates'][$f["old"]] ."</td>\n"; - echo " <td> ". $lang['BugStates'][$f["new"]] ."</td>\n"; - } else if ( $f['field'] == "BugClass" ) { - echo " <td><b> ". (isset( $lang[$f["field"]]) ? $lang[$f["field"]] : $f["field"]) ."</b></td>\n"; - echo " <td> ". $lang['BugClasses'][$f["old"]] ."</td>\n"; - echo " <td> ". $lang['BugClasses'][$f["new"]] ."</td>\n"; - } else if ( $f['field'] == "BugCreate" ) { - echo " <td><b> ". (isset( $lang[$f["field"]]) ? $lang[$f["field"]] : $f["field"]) ."</b></td>\n"; - echo " <td> </td>\n"; - $b = new bug($this->dbconn); - $b = $b->read($f["new"],$b); - if ( is_object($b) ) { - echo " <td> ". $b->getLink() ."</td>\n"; - } else { - echo " <td><i>". makelink("history_show.php?id=". $f["new"],$lang['HistoryDeleted']) ."</i></td>\n"; - } - } else if ( $f['field'] == "InvoiceState" ) { - loadmodule("invoice"); - echo " <td><b> ". (isset( $lang[$f["field"]]) ? $lang[$f["field"]] : $f["field"]) ."</b></td>\n"; - echo " <td> ". $lang['InvoiceStates'][$f["old"]] ."</td>\n"; - echo " <td> ". $lang['InvoiceStates'][$f["new"]] ."</td>\n"; - } else if ( $f['field'] == "InstCreate" ) { - loadmodule("installation"); - echo " <td><b> ". (isset( $lang[$f["field"]]) ? $lang[$f["field"]] : $f["field"]) ."</b></td>\n"; - echo " <td> </td>\n"; - $b = new installation($this->dbconn); - $b = $b->read($f["new"],$b); - if ( is_object($b) ) { - echo " <td> ". $b->getLink() ."</td>\n"; - } else { - echo " <td><i>". makelink("history_show.php?id=". $f["new"],$lang['HistoryDeleted']) ."</i></td>\n"; - } - } else if ( $f['field'] == "NoteCreate" ) { - loadmodule("note"); - $b = new note($this->dbconn); - $b = $b->read($f["new"],$b); - echo " <td><b> ". (isset( $lang[$f["field"]]) ? $lang[$f["field"]] : $f["field"]) ."</b></td>\n"; - echo " <td> </td>\n"; - if ( is_object($b) ) { - echo " <td> ". $b->getLink() ."</td>\n"; - } else { - echo " <td><i>". makelink("history_show.php?id=". $f["new"],$lang['HistoryDeleted']) ."</i></td>\n"; - } - } else if ( $f['field'] == "FileCreate" ) { - loadmodule("file"); - $b = new tutos_file($this->dbconn); - $b = $b->read($f["new"],$b); + } else if ( ($f['field'] == "FileCreate") + || ($f['field'] == "InstCreate") + || ($f['field'] == "NoteCreate") + || ($f['field'] == "BugCreate") + || ($f['field'] == "TaskCreate") + ) { echo " <td><b> ". (isset( $lang[$f["field"]]) ? $lang[$f["field"]] : $f["field"]) ."</b></td>\n"; + $b = getObject($this->dbconn,$f['new']); echo " <td> </td>\n"; if ( is_object($b) ) { echo " <td> ". $b->getLink() ."</td>\n"; } else { echo " <td><i>". $lang['HistoryDeleted'] ."</i></td>\n"; } - } else if (( $f['field'] == "Participant" ) || ( $f['field'] == "GroupMember" ) || ( $f['field'] == "Group" )) { - echo " <td><b> ". (isset( $lang[$f["field"]]) ? $lang[$f["field"]] : $f["field"]) ."</b></td>\n"; - $b = getObject($this->dbconn,$f["old"]); - echo " <td> "; - if ( is_object($b) ) { - echo $b->getLink(); - } - echo "</td>\n"; - $b = getObject($this->dbconn,$f["new"]); - echo " <td> "; - if ( is_object($b) ) { - echo $b->getLink(); - } - echo "</td>\n"; - } else if ( $f['field'] == "Location2" ) { echo " <td><b> ". (isset( $lang[$f["field"]]) ? $lang[$f["field"]] : $f["field"]) ."</b></td>\n"; echo " <td> ". $lang['AppLoc'][$f["old"]] ."</td>\n"; echo " <td> ". $lang['AppLoc'][$f["new"]] ."</td>\n"; - } else if ( $f['field'] == "Company" ) { - echo " <td><b> ". (isset( $lang[$f["field"]]) ? $lang[$f["field"]] : $f["field"]) ."</b></td>\n"; - $b = new company($this->dbconn); - $b = $b->read($f["old"],$b); - if ( $b->id == $f["old"] ) { - echo " <td> ". $b->getLink() ."</td>\n"; - } else { - echo " <td> ". $f["old"] ."</td>\n"; - } - $b = new company($this->dbconn); - $b = $b->read($f["new"],$b); - if ( $b->id == $f["new"] ) { - echo " <td> ". $b->getLink() ."</td>\n"; - } else { - echo " <td> ". $f["new"] ."</td>\n"; - } - } else if ( $f['field'] == "URLAdd" ) { - $b = new url($this->dbconn); - $b = $b->read($f["new"],$b); - echo " <td><b> ". (isset( $lang[$f["field"]]) ? $lang[$f["field"]] : $f["field"]) ."</b></td>\n"; - echo " <td> </td>\n"; - if ( is_object($b) ) { - echo " <td> ". $b->getLink() ."</td>\n"; - } else { - echo " <td><i>". makelink("history_show.php?id=". $f["new"],$lang['HistoryDeleted']) ."</i></td>\n"; - } - } else if ( $f['field'] == "TaskCreate" ) { - $b = new task($this->dbconn); - $b = $b->read($f["new"],$b); - echo " <td><b> ". (isset( $lang[$f["field"]]) ? $lang[$f["field"]] : $f["field"]) ."</b></td>\n"; - echo " <td> </td>\n"; - if ( is_object($b) ) { - echo " <td> ". $b->getLink() ."</td>\n"; - } else { - echo " <td><i>". makelink("history_show.php?id=". $f["new"],$lang['HistoryDeleted']) ."</i></td>\n"; - } } else if ( $f['field'] == "AppointCommit" ) { echo " <td><b> ". (isset( $lang[$f["field"]]) ? $lang[$f["field"]] : $f["field"]) ."</b></td>\n"; echo " <td> ". $lang['AppState'][$f["old"]] ."</td>\n"; echo " <td> ". $lang['AppState'][$f["new"]] ."</td>\n"; - } else if ( $f['field'] == "ProductP" ) { - echo " <td><b> ". (isset( $lang[$f["field"]]) ? $lang[$f["field"]] : $f["field"]) ."</b></td>\n"; - $b = new product($this->dbconn); - $b = $b->read($f["old"],$b); - echo " <td> ". ($b != -1 ? $b->getLink() : "") ."</td>\n"; - $b = new product($this->dbconn); - $b = $b->read($f["new"],$b); - echo " <td> ". ($b != -1 ? $b->getLink() : "") ."</td>\n"; - } else if ( $f['field'] == "CloneEntry" ) { - echo " <td><b> ". (isset( $lang[$f["field"]]) ? $lang[$f["field"]] : $f["field"]) ."</b></td>\n"; - $b = getObject($this->dbconn,$f["old"]); - echo " <td> ". (is_object($b) ? $b->getLink():'?'.$f["old"]) ."</td>\n"; - unset($b); - $b = getObject($this->dbconn,$f["new"]); - echo " <td> ". (is_object($b) ? $b->getLink():'?') ."</td>\n"; - } else if ( $f['field'] == "TaskSubTask" ) { + } else if ( $f['field'] == "atDateTime" ) { echo " <td><b> ". (isset( $lang[$f["field"]]) ? $lang[$f["field"]] : $f["field"]) ."</b></td>\n"; - $b = getObject($this->dbconn,$f["old"]); - echo " <td> ". $b->getLink() ."</td>\n"; - unset($b); - $b = getObject($this->dbconn,$f["new"]); - echo " <td> ". $b->getLink() ."</td>\n"; + $b = new TUTOS_Date_Time(); + $b->setDateTime($f['old']); + echo " <td> ". $b->getDate() ."</td>\n"; + $b->setDateTime($f['new']); + echo " <td> ". $b->getDate() ."</td>\n"; } else if ( $f['field'] == "ProdState" ) { echo " <td><b> ". (isset( $lang[$f["field"]]) ? $lang[$f["field"]] : $f["field"]) ."</b></td>\n"; echo " <td> ". $lang['ProdStates'][$f["old"]] ."</td>\n"; echo " <td> ". $lang['ProdStates'][$f["new"]] ."</td>\n"; } else if ( ereg("ProdRole?",$f['field']) || ($f['field'] == "Customer") + || ($f['field'] == "Company") + || ($f['field'] == "ProductP") + || ($f['field'] == "CloneEntry") || ($f['field'] == "TaskWorker") - || ($f['field'] == "SoldBy") + || ($f['field'] == "TaskSubTask") || ($f['field'] == "FileAuthor") || ($f['field'] == "TeamDel") || ($f['field'] == "TeamAdd") - || ($f['field'] == "BugAssignedTo") - || ($f['field'] == "InstalledBy") ) { - loadmodule("file"); + || ($f['field'] == "Participant") + || ($f['field'] == "GroupMember") + || ($f['field'] == "Group") + ) { echo " <td><b> ". (isset( $lang[$f["field"]]) ? $lang[$f["field"]] : $f["field"]) ."</b></td>\n"; if ( $f["old"] <= 0 ) { echo " <td> </td>\n"; @@ -288,9 +183,26 @@ } } } else { - echo " <td><b> ". (isset( $lang[$f["field"]]) ? $lang[$f["field"]] : $f["field"]) ."</b></td>\n"; - echo " <td> ". myentities($f["old"]) ."</td>\n"; - echo " <td> ". myentities($f["new"])."</td>\n"; + # Check Modules + $j = null; + foreach($tutos[loadedmodules] as $i) { +# echo $i.' '.$f["field"].' '; +# echo '<br>'; + $x = new $tutos[modules][$i][name]($this->dbconn); + $j = $x->resolveHistoryTag($f); + if ($j != null) { + break; + } + } + if ($j == null) { + echo " <td><b> ". (isset( $lang[$f["field"]]) ? $lang[$f["field"]] : $f["field"]) ."</b></td>\n"; + echo " <td> ". myentities($f["old"]) ."</td>\n"; + echo " <td> ". myentities($f["new"])."</td>\n"; + } else { + echo " <td><b> ". myentities($j['field']) ."</b></td>\n"; + echo " <td> ". $j['old'] ."</td>\n"; + echo " <td> ". $j['new']."</td>\n"; + } } if ( $this->adr_id == -1 ) { $adr = new tutos_address($this->dbconn); |
|
From: Gero K. <gok...@us...> - 2008-11-14 14:23:11
|
Update of /cvsroot/tutos/tutos/php/invoice In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv26754/invoice Modified Files: invoice.pinc Log Message: introduced a generic deloobject script / better method o resolve history tags Index: invoice.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/invoice/invoice.pinc,v retrieving revision 1.66 retrieving revision 1.67 diff -u -d -r1.66 -r1.67 --- invoice.pinc 6 Nov 2008 15:33:11 -0000 1.66 +++ invoice.pinc 14 Nov 2008 14:23:04 -0000 1.67 @@ -964,6 +964,38 @@ function getHtmlIcon () { return 'invoice'; } + /** + * resolve a history Tag (to be called from history_show) + */ + function resolveHistoryTag ($f) { + global $lang; + + $x = null; + switch ($f['field']) { + case 'InvDateSent_0': + case 'InvDateDue_0': + case 'InvDateSent_1': + case 'InvDateDue_1': + case 'InvDateSent_2': + case 'InvDateDue_2': + $x = $f; + $x['field'] = isset( $lang[$f['field']]) ? $lang[$f['field']] : $f['field']; + $mt = new TUTOS_Date_Time(); + $mt->setDateTime($f['old']); + $x['old'] = $mt->getDate(); + $mt->setDateTime($f['new']); + $x['new'] = $mt->getDate(); + break; + case 'InvoiceState': + $x = $f; + $x['field'] = isset( $lang[$f['field']]) ? $lang[$f['field']] : $f['field']; + $x['old'] = $lang['InvoiceStates'][$f['old']]; + $x['new'] = $lang['InvoiceStates'][$f['new']]; + break; + + } + return $x; + } /* --------------------------------------------------------------------------- * The following methods are abstract factory functions for groups * which handle the membership list of an object |
|
From: Gero K. <gok...@us...> - 2008-11-14 14:23:11
|
Update of /cvsroot/tutos/tutos/php/installation In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv26754/installation Modified Files: installation.pinc Log Message: introduced a generic deloobject script / better method o resolve history tags Index: installation.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/installation/installation.pinc,v retrieving revision 1.49 retrieving revision 1.50 diff -u -d -r1.49 -r1.50 --- installation.pinc 6 Nov 2008 15:33:11 -0000 1.49 +++ installation.pinc 14 Nov 2008 14:23:04 -0000 1.50 @@ -494,6 +494,43 @@ function gettypeid () { return useinstmanagement; } + /** + * resolve a history Tag (to be called from history_show) + */ + function resolveHistoryTag ($f) { + global $lang; + + $x = null; + switch ($f['field']) { + case 'InstCreate': + case 'InstalledBy': + case 'SoldBy': + $x = $f; + $x['field'] = isset( $lang[$f['field']]) ? $lang[$f['field']] : $f['field']; + if ( $f['old'] <= 0 ) { + $x['old'] = ''; + } else { + $b = getObject($this->dbconn,$f['old']); + if ( is_object($b) ) { + $x['old'] = $b->getLink(); + } else { + $x['old'] = makelink("history_show.php?id=". $f['old'],$lang['HistoryDeleted']) ; + } + } + if ( $f['new'] <= 0 ) { + $x['new'] = ''; + } else { + $b = getObject($this->dbconn,$f['new']); + if ( is_object($b) ) { + $x['new'] = $b->getLink(); + } else { + $x['new'] = makelink("history_show.php?id=". $f['new'],$lang['HistoryDeleted']) ; + } + } + break; + } + return $x; + } /* --------------------------------------------------------------------------- * The following methods are abstract factory functions for groups * which handle the membership list of an object |
|
From: Gero K. <gok...@us...> - 2008-11-14 14:23:11
|
Update of /cvsroot/tutos/tutos/php/note In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv26754/note Modified Files: note.pinc Removed Files: note_del.php Log Message: introduced a generic deloobject script / better method o resolve history tags --- note_del.php DELETED --- Index: note.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/note/note.pinc,v retrieving revision 1.67 retrieving revision 1.68 diff -u -d -r1.67 -r1.68 --- note.pinc 6 Nov 2008 15:33:11 -0000 1.67 +++ note.pinc 14 Nov 2008 14:23:04 -0000 1.68 @@ -230,11 +230,23 @@ return "note/note_new.php?id=".$this->id; } /** - * Return a link to delete this note + * the url where we go after deleting this object */ - function getDelURL() { - return "note/note_del.php?id=".$this->id; + function get_after_del_url () { + $this->read_reference(); + return $this->ref->getUrl(); + } + /** + * the url where we when deleting fails + */ + function get_failed_del_Url () { + if ($this->see_ok()) { + return $this->getUrl(); + } + $this->read_reference(); + return $this->ref->getUrl(); } + /** * Return a fullname */ @@ -425,6 +437,57 @@ function getHtmlIcon () { return 'note'; } + /** + * resolve a history Tag (to be called from history_show) + */ + function resolveHistoryTag ($f) { + global $lang; + + $x = null; + switch ($f['field']) { + case 'NoteCreate': + $x = $f; + $x['field'] = isset( $lang[$f['field']]) ? $lang[$f['field']] : $f['field']; + if ( $f['old'] <= 0 ) { + $x['old'] = ''; + } else { + $b = getObject($this->dbconn,$f['old']); + if ( is_object($b) ) { + $x['old'] = $b->getLink(); + } else { + $x['old'] = makelink("history_show.php?id=". $f['old'],$lang['HistoryDeleted']) ; + } + } + if ( $f['new'] <= 0 ) { + $x['new'] = ''; + } else { + $b = getObject($this->dbconn,$f['new']); + if ( is_object($b) ) { + $x['new'] = $b->getLink(); + } else { + $x['new'] = makelink("history_show.php?id=". $f['new'],$lang['HistoryDeleted']) ; + } + } + break; + case 'NoteRemember': + $x = $f; + $x['field'] = isset( $lang[$f['field']]) ? $lang[$f['field']] : $f['field']; + $mt = new TUTOS_Date_Time(); + $mt->setDateTime($f['old']); + $x['old'] = $mt->getDate(); + $mt->setDateTime($f['new']); + $x['new'] = $mt->getDate(); + break; + case 'NoteEventType': + $x = $f; + $x['field'] = isset( $lang[$f['field']]) ? $lang[$f['field']] : $f['field']; + $x['old'] = $lang['NoteEventTypes'][$f['old']]; + $x['new'] = $lang['NoteEventTypes'][$f['new']]; + break; + + } + return $x; + } /* --------------------------------------------------------------------------- * The following methods are abstract factory functions for groups * which handle the membership list of an object |
|
From: Gero K. <gok...@us...> - 2008-11-14 14:23:11
|
Update of /cvsroot/tutos/tutos/php/group In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv26754/group Modified Files: group.pinc Removed Files: group_del.php Log Message: introduced a generic deloobject script / better method o resolve history tags --- group_del.php DELETED --- Index: group.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/group/group.pinc,v retrieving revision 1.57 retrieving revision 1.58 diff -u -d -r1.57 -r1.58 --- group.pinc 6 Nov 2008 15:33:11 -0000 1.57 +++ group.pinc 14 Nov 2008 14:23:03 -0000 1.58 @@ -81,10 +81,19 @@ return "group/group_new.php?id=".$this->id; } /** - * Return a link to delete this group + * the url where we go after deleting this object */ - function getDelURL() { - return "group/group_del.php?id=".$this->id; + function get_after_del_url () { + return 'group/group_overview.php'; + } + /** + * the url where we when deleting fails + */ + function get_failed_del_Url () { + if ($this->see_ok()) { + return $this->getUrl(); + } + return 'group/group_overview.php'; } /** * Return a link to this group |
|
From: Gero K. <gok...@us...> - 2008-11-14 14:23:09
|
Update of /cvsroot/tutos/tutos/php/url In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv26754/url Modified Files: url.pinc Log Message: introduced a generic deloobject script / better method o resolve history tags Index: url.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/url/url.pinc,v retrieving revision 1.27 retrieving revision 1.28 diff -u -d -r1.27 -r1.28 --- url.pinc 6 Nov 2008 15:33:11 -0000 1.27 +++ url.pinc 14 Nov 2008 14:23:04 -0000 1.28 @@ -199,6 +199,41 @@ function gettypeid () { return useurl; } + /** + * resolve a history Tag (to be called from history_show) + */ + function resolveHistoryTag ($f) { + global $lang; + + $x = null; + switch ($f['field']) { + case 'URLAdd': + $x = $f; + $x['field'] = isset( $lang[$f['field']]) ? $lang[$f['field']] : $f['field']; + if ( $f['old'] <= 0 ) { + $x['old'] = ''; + } else { + $b = getObject($this->dbconn,$f['old']); + if ( is_object($b) ) { + $x['old'] = $b->getLink(); + } else { + $x['old'] = makelink("history_show.php?id=". $f['old'],$lang['HistoryDeleted']) ; + } + } + if ( $f['new'] <= 0 ) { + $x['new'] = ''; + } else { + $b = getObject($this->dbconn,$f['new']); + if ( is_object($b) ) { + $x['new'] = $b->getLink(); + } else { + $x['new'] = makelink("history_show.php?id=". $f['new'],$lang['HistoryDeleted']) ; + } + } + break; + } + return $x; + } /* --------------------------------------------------------------------------- * The following methods are abstract factory functions for groups * which handle the membership list of an object |
|
From: Gero K. <gok...@us...> - 2008-11-14 14:23:09
|
Update of /cvsroot/tutos/tutos/php/rate In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv26754/rate Modified Files: rate.pinc Removed Files: rate_del.php Log Message: introduced a generic deloobject script / better method o resolve history tags Index: rate.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/rate/rate.pinc,v retrieving revision 1.40 retrieving revision 1.41 diff -u -d -r1.40 -r1.41 --- rate.pinc 6 Nov 2008 15:33:11 -0000 1.40 +++ rate.pinc 14 Nov 2008 14:23:04 -0000 1.41 @@ -218,10 +218,21 @@ return "rate/rate_new.php?id=".$this->id; } /** - * Return a link to delete this rate + * the url where we go after deleting this object */ - function getDelURL() { - return "rate/rate_del.php?id=".$this->id; + function get_after_del_url () { + $this->read_reference(); + return $this->ref->getUrl(); + } + /** + * the url where we when deleting fails + */ + function get_failed_del_Url () { + if ($this->see_ok()) { + return $this->getUrl(); + } + $this->read_reference(); + return $this->ref->getUrl(); } /** * Return a fullname @@ -312,21 +323,21 @@ * set the currency */ function setCurrency($value) { - $this->setStrField("currency",$value,"Rate"); + $this->setStrField("currency",$value,"currency"); return; } /** * set the priority */ function setPriority($value) { - $this->setIntField("priority",$value,"Rate"); + $this->setIntField("priority",$value,"RatePriority"); return; } /** * set the value added tax */ function setVat($value) { - $this->setFloatField("vat",$value,"Rate"); + $this->setFloatField("vat",$value,"RateVat"); return; } /** @@ -461,6 +472,48 @@ return 'rates'; } /** + * resolve a history Tag (to be called from history_show) + */ + function resolveHistoryTag ($f) { + global $lang; + + $x = null; + switch ($f['field']) { + case 'RateWorkerReference': + $x = $f; + $x['field'] = isset( $lang[$f['field']]) ? $lang[$f['field']] : $f['field']; + if ( $f['old'] <= 0 ) { + $x['old'] = ''; + } else { + $b = getObject($this->dbconn,$f['old']); + if ( is_object($b) ) { + $x['old'] = $b->getLink(); + } else { + $x['old'] = makelink("history_show.php?id=". $f['old'],$lang['HistoryDeleted']) ; + } + } + if ( $f['new'] <= 0 ) { + $x['new'] = ''; + } else { + $b = getObject($this->dbconn,$f['new']); + if ( is_object($b) ) { + $x['new'] = $b->getLink(); + } else { + $x['new'] = makelink("history_show.php?id=". $f['new'],$lang['HistoryDeleted']) ; + } + } + break; + case 'RateRole': + $x = $f; + $x['field'] = isset( $lang[$f['field']]) ? $lang[$f['field']] : $f['field']; + $x['old'] = $lang['ProdRole'][$f['old']]; + $x['new'] = $lang['ProdRole'][$f['new']]; + break; + + } + return $x; + } + /** * a obj form is submitted * parse the values */ --- rate_del.php DELETED --- |
|
From: Gero K. <gok...@us...> - 2008-11-14 14:23:08
|
Update of /cvsroot/tutos/tutos/php/reminder In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv26754/reminder Modified Files: reminder.pinc reminder_show.php Log Message: introduced a generic deloobject script / better method o resolve history tags Index: reminder_show.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/reminder/reminder_show.php,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- reminder_show.php 18 Jan 2007 11:51:33 -0000 1.15 +++ reminder_show.php 14 Nov 2008 14:23:04 -0000 1.16 @@ -1,6 +1,6 @@ <?php /** - * Copyright 2004 - 2007 by Gero Kohnert + * Copyright 2004 - 2008 by Gero Kohnert * * 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 Index: reminder.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/reminder/reminder.pinc,v retrieving revision 1.22 retrieving revision 1.23 diff -u -d -r1.22 -r1.23 --- reminder.pinc 18 Jan 2007 11:51:33 -0000 1.22 +++ reminder.pinc 14 Nov 2008 14:23:04 -0000 1.23 @@ -1,6 +1,6 @@ <?php /** - * Copyright 2004 - 2007 by Gero Kohnert + * Copyright 2004 - 2008 by Gero Kohnert * * 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 @@ -570,6 +570,69 @@ function gettypeid () { return usereminder; } + /** + * resolve a history Tag (to be called from history_show) + */ + function resolveHistoryTag ($f) { + global $lang; + + $x = null; + switch ($f['field']) { + case 'ReminderCreate': + case 'ReminderReference': + $x = $f; + $x['field'] = isset( $lang[$f['field']]) ? $lang[$f['field']] : $f['field']; + if ( $f['old'] <= 0 ) { + $x['old'] = ''; + } else { + $b = getObject($this->dbconn,$f['old']); + if ( is_object($b) ) { + $x['old'] = $b->getLink(); + } else { + $x['old'] = makelink("history_show.php?id=". $f['old'],$lang['HistoryDeleted']) ; + } + } + if ( $f['new'] <= 0 ) { + $x['new'] = ''; + } else { + $b = getObject($this->dbconn,$f['new']); + if ( is_object($b) ) { + $x['new'] = $b->getLink(); + } else { + $x['new'] = makelink("history_show.php?id=". $f['new'],$lang['HistoryDeleted']) ; + } + } + break; + case 'ReminderAt': + $x = $f; + $x['field'] = isset( $lang[$f['field']]) ? $lang[$f['field']] : $f['field']; + $mt = new TUTOS_Date_Time(); + $mt->setDateTime($f['old']); + $x['old'] = $mt->getDateTime(); + $mt->setDateTime($f['new']); + $x['new'] = $mt->getDateTime(); + break; + case 'ReminderType': + $x = $f; + $x['field'] = isset( $lang[$f['field']]) ? $lang[$f['field']] : $f['field']; + $x['old'] = ($f['old'] == 1 ? $lang['ReminderDate']:$lang['ReminderEvent']); + $x['new'] = ($f['new'] == 1 ? $lang['ReminderDate']:$lang['ReminderEvent']); + break; + case 'ReminderUseMail': + $x = $f; + $x['field'] = isset( $lang[$f['field']]) ? $lang[$f['field']] : $f['field']; + $x['old'] = ($f['old'] == 0 ? $lang['no']:$lang['yes']); + $x['new'] = ($f['new'] == 0 ? $lang['no']:$lang['yes']); + break; + case 'ReminderRepeat': + $x = $f; + $x['field'] = isset( $lang[$f['field']]) ? $lang[$f['field']] : $f['field']; + $x['old'] = reminder_offset_format($f['old']); + $x['new'] = reminder_offset_format($f['new']); + break; + } + return $x; + } /* --------------------------------------------------------------------------- * The following methods are abstract factory functions for groups * which handle the membership list of an object |
|
From: Gero K. <gok...@us...> - 2008-11-13 19:54:06
|
Update of /cvsroot/tutos/tutos/html In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv3930/html Modified Files: tutos.js Log Message: update Index: tutos.js =================================================================== RCS file: /cvsroot/tutos/tutos/html/tutos.js,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- tutos.js 10 Aug 2008 15:10:07 -0000 1.12 +++ tutos.js 13 Nov 2008 19:53:59 -0000 1.13 @@ -197,7 +197,7 @@ /** * some AJAX stuff */ - function load_TUTOS_dir_list(base,name) { + function load_TUTOS_dir_list(base,name,filter) { // Obtain an XMLHttpRequest instance var req = newXMLHttpRequest(); @@ -216,7 +216,7 @@ // Send form encoded data stating that I want to add the // specified item to the display list. - req.send("action=search&grp=f"); + req.send("action=search&grp=f&filter="+filter); } /** * some AJAX stuff |