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
(1) |
3
(1) |
4
|
5
|
6
|
7
|
8
(1) |
9
|
10
|
11
|
12
|
13
(2) |
14
(1) |
15
(4) |
16
(1) |
17
|
18
(1) |
19
(3) |
20
|
21
(2) |
22
(1) |
23
(6) |
24
(10) |
25
|
26
|
27
(1) |
28
|
29
|
30
|
31
|
|
From: <gok...@us...> - 2013-05-27 15:15:32
|
Revision: 1085 http://sourceforge.net/p/tutos/code/1085 Author: gokohnert Date: 2013-05-27 15:15:27 +0000 (Mon, 27 May 2013) Log Message: ----------- less debug info Modified Paths: -------------- trunk/php/acl.pinc Modified: trunk/php/acl.pinc =================================================================== --- trunk/php/acl.pinc 2013-05-24 15:27:15 UTC (rev 1084) +++ trunk/php/acl.pinc 2013-05-27 15:15:27 UTC (rev 1085) @@ -184,8 +184,8 @@ if ( $id < 0 ) return; if (!$obj->acl_write) { - dterror_log('no need to save acl data for: '.$obj.' '.print_r($obj->acl,true)."\r\n",3,$tutos[errlog]); if (!isset($obj->acl) || !is_array($obj->acl)) { + dterror_log('no need to save acl data for: '.$obj.' '.print_r($obj->acl,true)."\r\n",3,$tutos[errlog]); dterror_log(TUTOS_backtrace()."\r\n",3,$tutos[errlog]); } return; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2013-05-24 15:27:20
|
Revision: 1084 http://sourceforge.net/p/tutos/code/1084 Author: gokohnert Date: 2013-05-24 15:27:15 +0000 (Fri, 24 May 2013) Log Message: ----------- some fixes found in automated tests Modified Paths: -------------- trunk/php/app_overview.php trunk/php/config_default.pinc trunk/php/db/db.pinc trunk/php/file/file_overview.php trunk/php/product_role_ins.php trunk/php/scrum/log_new.php trunk/php/sms/sms_new.php trunk/php/subversion/svn_check.php trunk/php/timetrack/timetrack_ins.php trunk/test.sh Modified: trunk/php/app_overview.php =================================================================== --- trunk/php/app_overview.php 2013-05-24 09:15:10 UTC (rev 1083) +++ trunk/php/app_overview.php 2013-05-24 15:27:15 UTC (rev 1084) @@ -356,7 +356,6 @@ $this->nav['list'][] = $a->id; unset($a); } - $this->nav['list'] = $np; $res->free(); } else { // subsession found Modified: trunk/php/config_default.pinc =================================================================== --- trunk/php/config_default.pinc 2013-05-24 09:15:10 UTC (rev 1083) +++ trunk/php/config_default.pinc 2013-05-24 15:27:15 UTC (rev 1084) @@ -735,7 +735,7 @@ // // The TUTOS Version number // -$tutos[version] = '1.9.20130517'; +$tutos[version] = '1.9.20130524'; // ### Local Variables: *** ### mode:iso-accents *** Modified: trunk/php/db/db.pinc =================================================================== --- trunk/php/db/db.pinc 2013-05-24 09:15:10 UTC (rev 1083) +++ trunk/php/db/db.pinc 2013-05-24 15:27:15 UTC (rev 1084) @@ -748,7 +748,7 @@ $cnt = $rc->get(0, "c"); $rc->free(); if ($this->range_start == -1) { - $this->range_start = $cnt - $this->range_cnt; + $this->range_start = min(0,$cnt - $this->range_cnt); } } Modified: trunk/php/file/file_overview.php =================================================================== --- trunk/php/file/file_overview.php 2013-05-24 09:15:10 UTC (rev 1083) +++ trunk/php/file/file_overview.php 2013-05-24 15:27:15 UTC (rev 1084) @@ -298,8 +298,9 @@ if ( !isset($this->nav['list']) ) { $this->result = $this->dbconn->Exec($this->q); - $n = $this->result->numrows(); - $np = array(); + $n = $this->result->numrows(); + $np = array(); + $x = 0; while ( $x < $n ) { $f = new tutos_file($this->dbconn); $f->read_result($this->result,$x); Modified: trunk/php/product_role_ins.php =================================================================== --- trunk/php/product_role_ins.php 2013-05-24 09:15:10 UTC (rev 1083) +++ trunk/php/product_role_ins.php 2013-05-24 15:27:15 UTC (rev 1084) @@ -51,9 +51,10 @@ } // Add given People Role - -$nbadd = $_POST['nbadd']; - +$nbadd = 0; +if (isset($_POST['nbadd'])) { + $nbadd = $_POST['nbadd']; +} for($i=1; $i<=$nbadd; $i++) { $rid = 'r'.$i.'id'; $fn = 'r'.$i.'fn'; Modified: trunk/php/scrum/log_new.php =================================================================== --- trunk/php/scrum/log_new.php 2013-05-24 09:15:10 UTC (rev 1083) +++ trunk/php/scrum/log_new.php 2013-05-24 15:27:15 UTC (rev 1084) @@ -203,10 +203,10 @@ if ( $o->is_moveable() && ($o->w_id > 0) && ($o->start_dt->ts >= $this->sprint->start_dt->ts) ) { -# echo $o->start_dt->ts .'-'. $this->sprint->start_dt->ts .'<br>'; + # echo $o->start_dt->ts .'-'. $this->sprint->start_dt->ts .'<br>'; $day = $o->start_dt->ts - $this->sprint->start_dt->ts; $day = round($day / 86400); -# echo $day .'<br>'; + # echo $day .'<br>'; $this->xarr[$o->w_id][$day][$o->id] = &$o; } else { $this->xarr[-2][-1][$o->id] = &$o; @@ -905,6 +905,11 @@ if (isset($_GET['p_id'])) { $this->pref = getObject($this->dbconn,$_GET['p_id']); + if (!is_object($this->pref)) { + $msg = addLine($msg,sprintf($lang['Err0040'],$lang['ScrumLogPref'])); + $this->stop = true; + return; + } $this->obj->p_ref = $this->pref; $this->link1 = addUrlParameter($this->link1,"p_id=".$this->pref->id); } Modified: trunk/php/sms/sms_new.php =================================================================== --- trunk/php/sms/sms_new.php 2013-05-24 09:15:10 UTC (rev 1083) +++ trunk/php/sms/sms_new.php 2013-05-24 15:27:15 UTC (rev 1084) @@ -1,11 +1,13 @@ <?php /** - * Copyright 1999 - 2010 by Gero Kohnert + * Copyright 1999 - 2013 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. */ +$tutos['files'][__FILE__] = '$Rev$'; + $tutos['base'] = "../.."; ini_set("include_path",".."); require_once 'webelements.p3'; @@ -95,5 +97,5 @@ ?> <!-- SVN Info $Id$ - $Author$ - --> \ No newline at end of file +$Author$ +--> \ No newline at end of file Modified: trunk/php/subversion/svn_check.php =================================================================== --- trunk/php/subversion/svn_check.php 2013-05-24 09:15:10 UTC (rev 1083) +++ trunk/php/subversion/svn_check.php 2013-05-24 15:27:15 UTC (rev 1084) @@ -16,6 +16,7 @@ $tutos['base'] = "../.."; ini_set("include_path",".."); +$lang = array(); require_once 'webelements.p3'; require_once 'permission.p3'; require_once 'product.pinc'; Modified: trunk/php/timetrack/timetrack_ins.php =================================================================== --- trunk/php/timetrack/timetrack_ins.php 2013-05-24 09:15:10 UTC (rev 1083) +++ trunk/php/timetrack/timetrack_ins.php 2013-05-24 15:27:15 UTC (rev 1084) @@ -154,6 +154,7 @@ $tt->setVolume($volume); } } + // distance if ( isset($_POST['distance']) && $_POST['distance'] != "" ) { $distance = trim($_POST['distance']); @@ -167,7 +168,6 @@ } } - // volume todo if ( isset($_POST['volume_todo']) && $_POST['volume_todo'] != "" ) { $vt = trim($_POST['volume_todo']); Modified: trunk/test.sh =================================================================== --- trunk/test.sh 2013-05-24 09:15:10 UTC (rev 1083) +++ trunk/test.sh 2013-05-24 15:27:15 UTC (rev 1084) @@ -361,6 +361,7 @@ expense/expense_overview.php?link_id=$P_ID&lg=$LG fax/fax_new.php?a=$ADR&nr=123;&lg=$LG fax/fax_new.php?a=$NOID;&lg=$LG + fax/fax_ins.php?lg=$LG file/file_config.php?lg=$LG file/file_ins.php?lg=$LG file/file_del.php?lg=$LG @@ -524,6 +525,7 @@ scrum/sprint_overview.php?p_id=$P_ID&lg=$LG scrum/sprint_overview.php?w_id=$NOID&lg=$LG scrum/sprint_overview.php?w_id=$ADR&lg=$LG + sms/sms_new.php?v=001555&p=123;&lg=$LG stc/stc_ins.php?lg=$LG stc/stc_new.php?lg=$LG stc/stc_overview.php?lg=$LG This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2013-05-24 09:15:13
|
Revision: 1083 http://sourceforge.net/p/tutos/code/1083 Author: gokohnert Date: 2013-05-24 09:15:10 +0000 (Fri, 24 May 2013) Log Message: ----------- fix Modified Paths: -------------- trunk/php/reminder/reminder.pinc Modified: trunk/php/reminder/reminder.pinc =================================================================== --- trunk/php/reminder/reminder.pinc 2013-05-24 09:13:12 UTC (rev 1082) +++ trunk/php/reminder/reminder.pinc 2013-05-24 09:15:10 UTC (rev 1083) @@ -534,7 +534,7 @@ } else { $this->id = $q->addFV('id',-1,'NEXTID'); // adopt the permissions from the referenced object - $this->copy_acl($this->ref->acl,true); + $this->copy_acl($this->ref,true); $this->acl_default(); // Prepare the history This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2013-05-24 09:13:15
|
Revision: 1082 http://sourceforge.net/p/tutos/code/1082 Author: gokohnert Date: 2013-05-24 09:13:12 +0000 (Fri, 24 May 2013) Log Message: ----------- fix Modified Paths: -------------- trunk/php/acl.pinc Modified: trunk/php/acl.pinc =================================================================== --- trunk/php/acl.pinc 2013-05-24 09:05:29 UTC (rev 1081) +++ trunk/php/acl.pinc 2013-05-24 09:13:12 UTC (rev 1082) @@ -237,7 +237,7 @@ } } - $obj->cache_update('_acl'.$id,$this->acl,$tutos['timetolive']*60); + $obj->cache_update('_acl'.$id,$obj->acl,$tutos['timetolive']*60); } /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2013-05-24 09:05:32
|
Revision: 1081 http://sourceforge.net/p/tutos/code/1081 Author: gokohnert Date: 2013-05-24 09:05:29 +0000 (Fri, 24 May 2013) Log Message: ----------- fix Modified Paths: -------------- trunk/php/webelements.p3 Modified: trunk/php/webelements.p3 =================================================================== --- trunk/php/webelements.p3 2013-05-24 08:37:48 UTC (rev 1080) +++ trunk/php/webelements.p3 2013-05-24 09:05:29 UTC (rev 1081) @@ -1856,7 +1856,7 @@ $g_hash['hits2']++; $type = $r->get(0,'tutostype'); if ($type != noobject) { - $r->cache_store('_TT'.$id,$type); + tutos_base::cache_store_static($memid,$type); } } $r->free(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2013-05-24 08:37:51
|
Revision: 1080 http://sourceforge.net/p/tutos/code/1080 Author: gokohnert Date: 2013-05-24 08:37:48 +0000 (Fri, 24 May 2013) Log Message: ----------- fix Modified Paths: -------------- trunk/php/doctracker/doctracker.pinc trunk/php/expense/expense.pinc trunk/php/installation/installation.pinc trunk/php/mailbox/mailbox.pinc trunk/php/module_template/AAA.pinc trunk/php/subversion/svn.pinc Modified: trunk/php/doctracker/doctracker.pinc =================================================================== --- trunk/php/doctracker/doctracker.pinc 2013-05-24 08:35:32 UTC (rev 1079) +++ trunk/php/doctracker/doctracker.pinc 2013-05-24 08:37:48 UTC (rev 1080) @@ -163,7 +163,7 @@ } else { $this->id = $q->addFV("id",-1,"NEXTID"); // adopt the permissions from the referenced object - $this->acl_copy($this->ref,true); + $this->copy_acl($this->ref,true); $this->acl_default($this->creator); // Prepare the history @@ -681,7 +681,7 @@ } else { $this->id = $q->addFV("id",-1,"NEXTID"); // adopt the permissions from the referenced object - $this->acl_copy($this->ref,true); + $this->copy_acl($this->ref,true); $this->acl_default($this->creator); // Prepare the history @@ -879,4 +879,4 @@ } -?> \ No newline at end of file +?> Modified: trunk/php/expense/expense.pinc =================================================================== --- trunk/php/expense/expense.pinc 2013-05-24 08:35:32 UTC (rev 1079) +++ trunk/php/expense/expense.pinc 2013-05-24 08:37:48 UTC (rev 1080) @@ -709,7 +709,7 @@ } else { $this->id = $q->addFV('id',-1,'NEXTID'); // adopt the permissions from the referenced object - $this->acl_copy($this->ref,true); + $this->copy_acl($this->ref,true); $this->acl_default(); $this->acl_raise($this->getObjectGroupId(2),$tutos[useok]); $this->acl_raise($this->getObjectGroupId(3),$tutos[seeok]); @@ -1070,4 +1070,4 @@ return $r; } } -?> \ No newline at end of file +?> Modified: trunk/php/installation/installation.pinc =================================================================== --- trunk/php/installation/installation.pinc 2013-05-24 08:35:32 UTC (rev 1079) +++ trunk/php/installation/installation.pinc 2013-05-24 08:37:48 UTC (rev 1080) @@ -449,7 +449,7 @@ $this->id = $q->addFV('id',-1,'NEXTID'); // Defaut Access Control $this->acl_default($this,$current_user); - $this->acl_copy($this->product,true); + $this->copy_acl($this->product,true); $this->acl_raise($current_user->id,$tutos[delok]); // seller may mod @@ -827,4 +827,4 @@ return $r; } } -?> \ No newline at end of file +?> Modified: trunk/php/mailbox/mailbox.pinc =================================================================== --- trunk/php/mailbox/mailbox.pinc 2013-05-24 08:35:32 UTC (rev 1079) +++ trunk/php/mailbox/mailbox.pinc 2013-05-24 08:37:48 UTC (rev 1080) @@ -587,7 +587,7 @@ } else { $this->id = $q->addFV('id',-1,'NEXTID'); // Defaut Access Control - $this->acl_copy($this->parent,true); + $this->copy_acl($this->parent,true); $this->acl_default($current_user); $this->acl_raise($current_user->id,$tutos[delok]); @@ -802,4 +802,4 @@ return $r; } } -?> \ No newline at end of file +?> Modified: trunk/php/module_template/AAA.pinc =================================================================== --- trunk/php/module_template/AAA.pinc 2013-05-24 08:35:32 UTC (rev 1079) +++ trunk/php/module_template/AAA.pinc 2013-05-24 08:37:48 UTC (rev 1080) @@ -186,7 +186,7 @@ } else { $this->id = $q->addFV('id',-1,'NEXTID'); // adopt the permissions from the referenced object - # $this->acl_copy($this->ref,true); + # $this->copy_acl($this->ref,true); $this->acl_default(); // Prepare the history @@ -386,4 +386,4 @@ return $r; } } -?> \ No newline at end of file +?> Modified: trunk/php/subversion/svn.pinc =================================================================== --- trunk/php/subversion/svn.pinc 2013-05-24 08:35:32 UTC (rev 1079) +++ trunk/php/subversion/svn.pinc 2013-05-24 08:37:48 UTC (rev 1080) @@ -592,7 +592,7 @@ } else { $this->id = $q->addFV('id',-1,'NEXTID'); // adopt the permissions from the referenced object - $this->acl_copy($this->ref,true); + $this->copy_acl($this->ref,true); $this->acl_default(); // Prepare the history @@ -778,4 +778,4 @@ } } -?> \ No newline at end of file +?> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2013-05-24 08:35:37
|
Revision: 1079 http://sourceforge.net/p/tutos/code/1079 Author: gokohnert Date: 2013-05-24 08:35:32 +0000 (Fri, 24 May 2013) Log Message: ----------- fix Modified Paths: -------------- trunk/php/location.pinc Modified: trunk/php/location.pinc =================================================================== --- trunk/php/location.pinc 2013-05-24 07:13:24 UTC (rev 1078) +++ trunk/php/location.pinc 2013-05-24 08:35:32 UTC (rev 1079) @@ -374,7 +374,7 @@ $this->id = $q1->addFV('id',-1,'NEXTID'); // Defaut Access Control inheritet from parent - $this->acl_copy($this->ref,true); + $this->copy_acl($this->ref,true); $this->acl_default(); $this->acl_raise(EVERYBODY, $tutos[useok]); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2013-05-24 07:13:27
|
Revision: 1078 http://sourceforge.net/p/tutos/code/1078 Author: gokohnert Date: 2013-05-24 07:13:24 +0000 (Fri, 24 May 2013) Log Message: ----------- fix Modified Paths: -------------- trunk/php/base.pinc Modified: trunk/php/base.pinc =================================================================== --- trunk/php/base.pinc 2013-05-24 06:14:45 UTC (rev 1077) +++ trunk/php/base.pinc 2013-05-24 07:13:24 UTC (rev 1078) @@ -1889,7 +1889,7 @@ global $tutos; if($tutos['use_memcache']) { - return @$tutos['memcache']->get($memid,$value,0,$ttl); + return @$tutos['memcache']->get($memid); } else if ($tutos['use_apccache']) { return apc_fetch($memid); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2013-05-24 06:14:49
|
Revision: 1077 http://sourceforge.net/p/tutos/code/1077 Author: gokohnert Date: 2013-05-24 06:14:45 +0000 (Fri, 24 May 2013) Log Message: ----------- add fileinfo Modified Paths: -------------- trunk/php/pdf.pinc Modified: trunk/php/pdf.pinc =================================================================== --- trunk/php/pdf.pinc 2013-05-24 06:13:32 UTC (rev 1076) +++ trunk/php/pdf.pinc 2013-05-24 06:14:45 UTC (rev 1077) @@ -1,6 +1,6 @@ <?php /** - * Copyright 2004 - 2010 by Gero Kohnert + * Copyright 2004 - 2013 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 @@ -11,6 +11,7 @@ * SVN Info $Id$ * $Author$ */ +$tutos['files'][__FILE__] = '$Rev$'; if ($tutos[fpdfpath] != "") { if (!file_exists($tutos['base'] ."/". $tutos[fpdfpath].'/fpdf.php')) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2013-05-24 06:13:34
|
Revision: 1076 http://sourceforge.net/p/tutos/code/1076 Author: gokohnert Date: 2013-05-24 06:13:32 +0000 (Fri, 24 May 2013) Log Message: ----------- info Modified Paths: -------------- trunk/php/testmanager/testrun_ins.php Modified: trunk/php/testmanager/testrun_ins.php =================================================================== --- trunk/php/testmanager/testrun_ins.php 2013-05-24 06:12:56 UTC (rev 1075) +++ trunk/php/testmanager/testrun_ins.php 2013-05-24 06:13:32 UTC (rev 1076) @@ -25,7 +25,8 @@ loadmodules('testrun','ins'); loadmodule('testrun'); -$msg = ''; +$msg = ''; +$info = ''; $gotourl = 'testmanager/testrun_new.php'; if (isset($_REQUEST['ss'])) { $gotourl= addUrlParameter($gotourl,'ss='. $_REQUEST['ss'],true); @@ -52,9 +53,9 @@ $obj->read_reference(); $dbconn->Begin("WORK"); - $msg = addLine($msg,$obj->parse_input($obj->run,$obj)); + $info = addLine($info,$obj->parse_input($obj->run,$obj)); $dbconn->Commit("WORK"); - leave_insert($dbconn,'../'.$gotourl,$msg); + leave_insert($dbconn,'../'.$gotourl,$msg,$info); exit; } @@ -134,7 +135,7 @@ if (isset($_REQUEST['ss'])) { $gotourl= addUrlParameter($gotourl,'ss='. $_REQUEST['ss'],true); } -leave_insert($dbconn,'../'.$gotourl,$msg); +leave_insert($dbconn,'../'.$gotourl,$msg,$info); /** * SVN Info $Id$ * $Author$ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2013-05-24 06:13:01
|
Revision: 1075 http://sourceforge.net/p/tutos/code/1075 Author: gokohnert Date: 2013-05-24 06:12:56 +0000 (Fri, 24 May 2013) Log Message: ----------- encapsulate caching Modified Paths: -------------- trunk/php/acl.pinc trunk/php/base.pinc trunk/php/webelements.p3 Modified: trunk/php/acl.pinc =================================================================== --- trunk/php/acl.pinc 2013-05-23 12:36:57 UTC (rev 1074) +++ trunk/php/acl.pinc 2013-05-24 06:12:56 UTC (rev 1075) @@ -99,20 +99,11 @@ } // Try to get it from memcache - if($tutos['use_memcache']) { - $memid = $obj->dbconn->db->systemid.'_acl'.$id; - $obj->acl = @$tutos['memcache']->get($memid); - if ($obj->acl !== false) { - $g_hash['hits3']++; - return; - } - } else if ($tutos['use_apccache']) { - $memid = $obj->dbconn->db->systemid.'_acl'.$id; - $obj->acl = apc_fetch($memid); - if ($obj->acl !== false) { - $g_hash['hits3']++; - return; - } + $fail = true; + $obj->acl = $obj->cache_get('_acl'.$id); + if ($obj->acl !== false) { + $g_hash['hits3']++; + return; } $q = 'SELECT '. $obj->dbconn->colname('adr_id') .','. $obj->dbconn->colname('perm') .' FROM '. $obj->dbconn->prefix.$table['acl'][name].' WHERE '. $obj->dbconn->colname('obj_id') .' = '; @@ -173,12 +164,8 @@ $res->free(); - if($tutos['use_memcache']) { - $tutos['memcache']->set($memid,$obj->acl,0,$tutos['timetolive']*60); + if($obj->cache_store('_acl'.$id,$obj->acl,$tutos['timetolive']*60)) { $g_hash['fail3']++; - } else if ($tutos['use_apccache']) { - $obj->acl = apc_store($memid,$obj->acl,$tutos['timetolive']*60); - $g_hash['fail3']++; } return; } @@ -198,6 +185,9 @@ if (!$obj->acl_write) { dterror_log('no need to save acl data for: '.$obj.' '.print_r($obj->acl,true)."\r\n",3,$tutos[errlog]); + if (!isset($obj->acl) || !is_array($obj->acl)) { + dterror_log(TUTOS_backtrace()."\r\n",3,$tutos[errlog]); + } return; } else { // dterror_log('save acl data for: '.$obj."\r\n",3,$tutos[errlog]); @@ -246,13 +236,8 @@ } } } - if($tutos['use_memcache']) { - $memid = $obj->dbconn->db->systemid.'_acl'.$id; - $tutos['memcache']->replace($memid,$obj->acl,0,$tutos['timetolive']*60); - } else if ($tutos['use_apccache']) { - $memid = $obj->dbconn->db->systemid.'_acl'.$id; - apc_store($memid,$obj->acl,$tutos['timetolive']*60); - } + + $obj->cache_update('_acl'.$id,$this->acl,$tutos['timetolive']*60); } /** @@ -277,13 +262,7 @@ $res = $obj->dbconn->Exec($q); $res->free(); - if($tutos['use_memcache']) { - $memid = $obj->dbconn->db->systemid.'_acl'.$obj->id; - $tutos['memcache']->delete($memid,0); - } else if ($tutos['use_apccache']) { - $memid = $obj->dbconn->db->systemid.'_acl'.$obj->id; - apc_delete($memid); - } + $obj->cache_del('_acl'.$obj->id); return $msg; } Modified: trunk/php/base.pinc =================================================================== --- trunk/php/base.pinc 2013-05-23 12:36:57 UTC (rev 1074) +++ trunk/php/base.pinc 2013-05-24 06:12:56 UTC (rev 1075) @@ -211,22 +211,11 @@ } $r = false; - if($tutos['use_memcache']) { - $memid = $obj->dbconn->db->systemid.'_'.$this->gettypeid().'_'.$id; - $x = $tutos['memcache']->get($memid); - if ($x !== false && count($x)) { - $r = new result_mem($obj->dbconn); - $r->putall($x); - $g_hash['hits3']++; - } - } else if ($tutos['use_apccache']) { - $memid = $obj->dbconn->db->systemid.'_'.$this->gettypeid().'_'.$id; - $x = apc_fetch($memid); - if ($x !== false && count($x)) { - $r = new result_mem($obj->dbconn); - $r->putall($x); - $g_hash['hits3']++; - } + $x = $obj->cache_get('_'.$this->gettypeid().'_'.$id); + if ($x !== false && count($x)) { + $r = new result_mem($obj->dbconn); + $r->putall($x); + $g_hash['hits3']++; } if ($r == false) { @@ -245,12 +234,8 @@ $r->free(); return -1; } - if($tutos['use_memcache']) { - $tutos['memcache']->set($memid,$r->getall(0),0,$tutos['timetolive']*60); + if($obj->cache_store('_'.$this->gettypeid().'_'.$id,$r->getall(0))) { $g_hash['fail3']++; - } else if ($tutos['use_apccache']) { - apc_store($memid,$r->getall(0),$tutos['timetolive']*60); - $g_hash['fail3']++; } } $obj->read_result($r,0); @@ -313,21 +298,11 @@ // TODO: save description // read relations - $memid1 = $this->dbconn->db->systemid.'_r'.$this->id; - $memid2 = $this->dbconn->db->systemid.'_br'.$this->id; $fail = false; - if($tutos['use_memcache']) { - $this->relations = @$tutos['memcache']->get($memid1); - $this->back_relations = @$tutos['memcache']->get($memid2); - if (!is_array($this->relations) || !is_array($this->back_relations)) { - $fail = true; - } - } else if ($tutos['use_apccache']) { - $this->relations = apc_fetch($memid1); - $this->back_relations = apc_fetch($memid2); - if (!is_array($this->relations) || !is_array($this->back_relations)) { - $fail = true; - } + $this->relations = $this->cache_get('_r'.$this->id); + $this->back_relations = $this->cache_get('_br'.$this->id); + if (!is_array($this->relations) || !is_array($this->back_relations)) { + $fail = true; } if (!$fail) { @@ -356,13 +331,8 @@ $rr->free(); // cache it // update cache - if($tutos['use_memcache']) { - $tutos['memcache']->set($memid1,$this->relations,0,$tutos['timetolive']*360); - $tutos['memcache']->set($memid2,$this->back_relations,0,$tutos['timetolive']*360); - } else if ($tutos['use_apccache']) { - apc_store($memid1,$this->relations,$tutos['timetolive']*360); - apc_store($memid2,$this->back_relations,$tutos['timetolive']*360); - } + $this->cache_store('_r'.$this->id,$this->relations); + $this->cache_store('_br'.$this->id,$this->back_relations); } $g_hash[$this->id] = &$this; @@ -1400,17 +1370,7 @@ $msg = addLine($msg,$this->save_obj_id()); $g_hash[$this->id] = &$this; } - if($tutos['use_memcache']) { - $memid = $this->dbconn->db->systemid.'_'.$this->gettypeid().'_'.$this->id; - $memid1 = $this->dbconn->db->systemid.'_r'.$this->id; - $memid2 = $this->dbconn->db->systemid.'_br'.$this->id; - $tutos['memcache']->delete($memid,0); - } else if ($tutos['use_apccache']) { - $memid = $this->dbconn->db->systemid.'_'.$this->gettypeid().'_'.$this->id; - $memid1 = $this->dbconn->db->systemid.'_r'.$this->id; - $memid2 = $this->dbconn->db->systemid.'_br'.$this->id; - apc_delete($memid); - } + $this->cache_del('_'.$this->gettypeid().'_'.$this->id); foreach ($tutos[activemodules] as $f) { $x = new $tutos[modules][$f][name]($this->dbconn); @@ -1452,14 +1412,8 @@ } } if ($cnt + $cnt2 > 0) { - // update cache - if($tutos['use_memcache']) { - $tutos['memcache']->set($memid1,$this->relations,0,$tutos['timetolive']*360); - $tutos['memcache']->set($memid2,$this->back_relations,0,$tutos['timetolive']*360); - } else if ($tutos['use_apccache']) { - apc_store($memid1,$this->relations,$tutos['timetolive']*360); - apc_store($memid2,$this->back_relations,$tutos['timetolive']*360); - } + $this->cache_store('_r'.$this->id,$this->relations); + $this->cache_store('_br'.$this->id,$this->back_relations); } $msg = addLine($msg,$this->run_postsave_hook()); return $msg; @@ -1488,13 +1442,7 @@ $r->free(); // save for future use - if($tutos['use_memcache']) { - $memid = $this->dbconn->db->systemid.'_TT'.$x; - $tutos['memcache']->set($memid,$this->getTypeId(),0,$tutos['timetolive']*360); - } else if ($tutos['use_apccache']) { - $memid = $this->dbconn->db->systemid.'_TT'.$x; - apc_store($memid,$this->getTypeId(),$tutos['timetolive']*360); - } + $this->cache_store('_TT'.$x,$this->getTypeId()); return $msg; } @@ -1511,13 +1459,7 @@ $q = 'DELETE FROM '. $this->dbconn->prefix.$this->tablename_rel .' where obj_id = '. $this->id.' or rel_id = '.$this->id; $r = $this->dbconn->Exec($q); $r->free(); - if($tutos['use_memcache']) { - $memid = $this->dbconn->db->systemid.'_TT'.$this->id; - $tutos['memcache']->delete($memid,0); - } else if ($tutos['use_apccache']) { - $memid = $this->dbconn->db->systemid.'_TT'.$this->id; - apc_delete($memid); - } + $this->cache_del('_TT'.$this->id); return $msg; } @@ -1554,13 +1496,7 @@ if (isset( $_SESSION['history'][$this->id] ) ) { unset( $_SESSION['history'][$this->id] ); } - if($tutos['use_memcache']) { - $memid = $this->dbconn->db->systemid.'_'.$this->gettypeid().'_'.$this->id; - $tutos['memcache']->delete($memid,0); - } else if ($tutos['use_apccache']) { - $memid = $this->dbconn->db->systemid.'_'.$this->gettypeid().'_'.$this->id; - apc_delete($memid); - } + $this->cache_del('_'.$this->gettypeid().'_'.$this->id); $msg = addLine($msg,$this->run_postdel_hook()); return $msg; } @@ -1945,5 +1881,95 @@ if ($x == $y) return 0; return ($x < $y) ? -1 : 1; } + + /** + * cache get (static) + */ + static function cache_get_static($memid) { + global $tutos; + + if($tutos['use_memcache']) { + return @$tutos['memcache']->get($memid,$value,0,$ttl); + } else if ($tutos['use_apccache']) { + return apc_fetch($memid); + } + return false; + } + + /** + * get from cache + */ + function cache_get($id) { + return $this->cache_get_static($this->dbconn->db->systemid.$id); + } + + /** + * delete from cache + */ + function cache_del($id) { + global $tutos; + + $memid = $this->dbconn->db->systemid.$id; + + if($tutos['use_memcache']) { + return @$tutos['memcache']->delete($memid,0); + } else if ($tutos['use_apccache']) { + return apc_delete($memid); + } + return false; + } + + /** + * update in cache + * ttl == -1 -> default + * return true if cached false id no cache works + */ + function cache_update($id,$value,$ttl = -1) { + global $tutos; + + if ($ttl == -1) { + $ttl = $tutos['timetolive']*360; + } + $memid = $this->dbconn->db->systemid.$id; + + if($tutos['use_memcache']) { + $tutos['memcache']->replace($memid,$value,0,$ttl); + return true; + } else if ($tutos['use_apccache']) { + $obj->acl = apc_store($memid,$value,$ttl); + return true; + } + return false; + } + + /** + * store in cache (static) + * ttl == -1 -> default + * return true if cached false id no cache works + */ + static function cache_store_static($memid,$value,$ttl = -1) { + global $tutos; + + if ($ttl == -1) { + $ttl = $tutos['timetolive']*360; + } + if($tutos['use_memcache']) { + $tutos['memcache']->set($memid,$value,0,$ttl); + return true; + } else if ($tutos['use_apccache']) { + $obj->acl = apc_store($memid,$value,$ttl); + return true; + } + return false; + } + + /** + * store in cache (static) + * ttl == -1 -> default + * return true if cached false id no cache works + */ + function cache_store($id,$value,$ttl = -1) { + return $this->cache_store_static($this->dbconn->db->systemid.$id,$value,$ttl); + } } ?> \ No newline at end of file Modified: trunk/php/webelements.p3 =================================================================== --- trunk/php/webelements.p3 2013-05-23 12:36:57 UTC (rev 1074) +++ trunk/php/webelements.p3 2013-05-24 06:12:56 UTC (rev 1075) @@ -1831,27 +1831,16 @@ $memid = $dbconn->db->systemid.'_TT'.$id; // Second use the type info from objectids table - if($tutos['use_memcache']) { - $x = $tutos['memcache']->get($memid); - if ($x !== false ) { - $found = true; - $found_by_hash = true; - $g_hash['hits4']++; - $type = $x; - } else { - $g_hash['fail4']++; - } - } else if ($tutos['use_apccache']) { - $x = apc_fetch($memid); - if ($x !== false ) { - $found = true; - $found_by_hash = true; - $g_hash['hits4']++; - $type = $x; - } else { - $g_hash['fail4']++; - } + $x = tutos_base::cache_get_static($memid); + if ($x !== false ) { + $found = true; + $found_by_hash = true; + $g_hash['hits4']++; + $type = $x; + } else { + $g_hash['fail4']++; } + if (!$found) { if ($dbconn->prep) { $dbconn->addPStatement('select tutostype from '. $dbconn->prefix . $dbconn->db->tablename_hash .' where id = $1','HASH'); @@ -1866,10 +1855,8 @@ $found_by_hash = true; $g_hash['hits2']++; $type = $r->get(0,'tutostype'); - if($tutos['use_memcache'] && $type != noobject ) { - $tutos['memcache']->set($memid,$type,0,$tutos['timetolive']*360); - } else if ($tutos['use_apccache'] && $type != noobject) { - apc_store($memid,$type,$tutos['timetolive']*360); + if ($type != noobject) { + $r->cache_store('_TT'.$id,$type); } } $r->free(); @@ -1882,11 +1869,7 @@ // save for future use if (!$found_by_hash) { - if($tutos['use_memcache'] && $type != noobject ) { - $tutos['memcache']->set($memid,$type,0,$tutos['timetolive']*360); - } else if ($tutos['use_apccache'] && $type != noobject) { - apc_store($memid,$type,$tutos['timetolive']*360); - } + tutos_base::cache_store_static($memid,$type); } switch ($type) { @@ -1997,11 +1980,7 @@ $g_hash[$id] = -1; $g_hash['fail2']++; // save for future use that this is meanwhile deleted - if($tutos['use_memcache']) { - $tutos['memcache']->set($memid,0,0,$tutos['timetolive']*360); - } else if ($tutos['use_apccache']) { - apc_store($memid,0,$tutos['timetolive']*360); - } + tutos_base::cache_store_static($memid,0); //error_log('getObject failed for '.$id .' '.TUTOS_backtrace()."\n",3,$tutos[errlog]); } if (is_object($current_user) && ($current_user->id != $save_cu)) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2013-05-23 12:37:02
|
Revision: 1074 http://sourceforge.net/p/tutos/code/1074 Author: gokohnert Date: 2013-05-23 12:36:57 +0000 (Thu, 23 May 2013) Log Message: ----------- save roles at once Modified Paths: -------------- trunk/php/product.pinc Modified: trunk/php/product.pinc =================================================================== --- trunk/php/product.pinc 2013-05-23 12:27:47 UTC (rev 1073) +++ trunk/php/product.pinc 2013-05-23 12:36:57 UTC (rev 1074) @@ -569,13 +569,14 @@ $q = 'DELETE FROM '. $this->tablename2 .' WHERE pro_id = '. $this->id; $r = $this->dbconn->Exec($q); $r->free(); + $q = 'INSERT INTO '. $this->tablename2 .' (pro_id,adr_id,role_id,description) VALUES '; + $pre = ''; foreach ($lang['ProdRole'] as $role => $f) { if ( isset ($this->role[$role] ) && is_array ($this->role[$role]) ) { foreach ($this->role[$role] as $i => $o) { if ( is_object($o) ) { - $q = 'INSERT INTO '. $this->tablename2 .' (pro_id,adr_id,role_id,description) VALUES ('. $this->id .','. $i .','. $role .','. $this->dbconn->String($this->roledesc[$role][$o->id]).')'; - $r = $this->dbconn->Exec($q); - $r->free(); + $q .= $pre .'('. $this->id .','.$i.','.$role.','.$this->dbconn->String($this->roledesc[$role][$o->id]).')'; + $pre = ','; if ( ($o->getType() == "address") || ($o->getType() == "team") ) { $this->acl_raise($o->id,$tutos[modok]); } @@ -583,9 +584,12 @@ } } } + if ($pre != '') { + $r = $this->dbconn->Exec($q); + $r->free(); + } } - /** * read the classification of this project */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2013-05-23 12:27:52
|
Revision: 1073 http://sourceforge.net/p/tutos/code/1073 Author: gokohnert Date: 2013-05-23 12:27:47 +0000 (Thu, 23 May 2013) Log Message: ----------- insert history at once Modified Paths: -------------- trunk/php/history.pinc Modified: trunk/php/history.pinc =================================================================== --- trunk/php/history.pinc 2013-05-23 11:45:59 UTC (rev 1072) +++ trunk/php/history.pinc 2013-05-23 12:27:47 UTC (rev 1073) @@ -74,21 +74,20 @@ if ( $start == -2 ) { $end = $n; - } else - if ( $start == -1 ) { - $a = $n - $tutos['maxshow']; - $end = $n; - $start = $a; - } else { - $a = $start; - $end = $start + $tutos['maxshow']; - } + } else if ( $start == -1 ) { + $a = $n - $tutos['maxshow']; + $end = $n; + $start = $a; + } else { + $a = $start; + $end = $start + $tutos['maxshow']; + } while ( ($a < $n) && ($a < $end) ) { $obj->history[$a] = array ( "field" => $r->get($a, "m_field") , "old" => $r->get($a, "val_old") , "new" => $r->get($a, "val_new"), - "adr_id" => $r->get($a, "adr_id"), - "obj_id" => $r->get($a, "obj_id"), + "adr_id" => $r->getInt($a, "adr_id"), + "obj_id" => $r->getInt($a, "obj_id"), "m_time" => $r->get($a, "m_time") ); $a++; @@ -96,6 +95,7 @@ $r->free(); return; } + /** * Save the history */ @@ -107,42 +107,45 @@ return; } - $t = new TUTOS_Date_Time(); + $t = new TUTOS_Date_Time(); + $q = 'INSERT into '. $obj->dbconn->prefix .$table['history'][name].' (obj_id,adr_id,m_field,m_time,val_old,val_new) VALUES '; + $pre = ''; foreach ($obj->modified as $i => $f) { if (!isset($f["field"]) || empty($f["field"]) ) { continue; } - $flds = "(obj_id,adr_id,m_field,m_time,val_old,val_new)"; - $vals = " VALUES "; + $q .= $pre.'('; if ( isset($f["obj_id"]) ) { - $vals .= "(" . $f["obj_id"]; + $q .= $f["obj_id"]; } else { - $vals .= "(" . $obj->id; + $q .= $obj->id; } if ( isset($f["adr_id"]) ) { - $vals .= "," . $f["adr_id"]; + $q .= ',' . $f["adr_id"]; } else { - $vals .= "," . $current_user->id; + $q .= ',' . $current_user->id; } + $q .= ',' . substr($obj->dbconn->String($f["field"]),0,$table['history']['m_field'][size]); + $q .= ',' . $obj->dbconn->DateTime($t); - $vals .= ',' . substr($obj->dbconn->String($f["field"]),0,$table['history']['m_field'][size]); - $vals .= ',' . $obj->dbconn->DateTime($t); // Field cutting patched from Brian Danilko <Brian.Danilko at instech.com.au> $maxlength = $table['history']['val_old'][size]; if ( mb_strlen($f["old"]) > $maxlength) { - $vals .= ',' . $obj->dbconn->String(mb_substr($f["old"],0,$maxlength-5) .'...'. mb_substr($f["old"],-2)); + $q .= ',' . $obj->dbconn->String(mb_substr($f["old"],0,$maxlength-5) .'...'. mb_substr($f["old"],-2)); } else { - $vals .= ',' . $obj->dbconn->String($f["old"]); + $q .= ',' . $obj->dbconn->String($f["old"]); } $maxlength = $table['history']['val_new'][size]; if ( mb_strlen($f["new"]) > $maxlength ) { - $vals .= ',' . $obj->dbconn->String(mb_substr($f["new"],0,$maxlength-5) .'...'. mb_substr($f["new"],-2)); + $q .= ',' . $obj->dbconn->String(mb_substr($f["new"],0,$maxlength-5) .'...'. mb_substr($f["new"],-2)); } else { - $vals .= ',' . $obj->dbconn->String($f["new"]); + $q .= ',' . $obj->dbconn->String($f["new"]); } - $vals .= ")"; - $q = 'INSERT into '. $obj->dbconn->prefix .$table['history'][name].' '. $flds . $vals; + $q .= ')'; + $pre = ','; + } + if ($pre != '') { $r = $obj->dbconn->Exec($q); $r->free(); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2013-05-23 11:46:02
|
Revision: 1072 http://sourceforge.net/p/tutos/code/1072 Author: gokohnert Date: 2013-05-23 11:45:59 +0000 (Thu, 23 May 2013) Log Message: ----------- less role reading Modified Paths: -------------- trunk/php/product.pinc Modified: trunk/php/product.pinc =================================================================== --- trunk/php/product.pinc 2013-05-23 11:28:48 UTC (rev 1071) +++ trunk/php/product.pinc 2013-05-23 11:45:59 UTC (rev 1072) @@ -385,7 +385,7 @@ $this->brole[$i] = array(); $this->broledesc[$i] = array(); } - $this->readroles = false; + $this->readroles = false; // not yet read $this->classes = 2; for ( $cl = 1;$cl <= $this->classes; $cl++) { @@ -507,6 +507,8 @@ * read the different roles in this project */ function readroles () { + if ($this->readroles) return; + $q = 'SELECT * FROM '. $this->tablename2 .' WHERE pro_id = '. $this->id; $r = $this->dbconn->Exec($q); $n = $r->numrows(); @@ -1198,7 +1200,7 @@ $this->role[$role][$obj->id] = $obj; $this->roledesc[$role][$obj->id] = $desc; - $this->readroles = true; + $this->readroles = true; // a explicit read not longer neccessary return; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2013-05-23 11:28:52
|
Revision: 1071 http://sourceforge.net/p/tutos/code/1071 Author: gokohnert Date: 2013-05-23 11:28:48 +0000 (Thu, 23 May 2013) Log Message: ----------- caching for relations Modified Paths: -------------- trunk/php/base.pinc trunk/php/team.pinc trunk/php/team_ins.php trunk/php/webelements.p3 Modified: trunk/php/base.pinc =================================================================== --- trunk/php/base.pinc 2013-05-23 08:03:20 UTC (rev 1070) +++ trunk/php/base.pinc 2013-05-23 11:28:48 UTC (rev 1071) @@ -296,7 +296,7 @@ * read a resultset */ function read_result (result $r, $pos ) { - global $g_hash,$table; + global $tutos,$g_hash,$table; $this->id = $r->getInt($pos, 'id'); $this->creation = $r->getDateTime($pos, 'creation'); @@ -313,28 +313,57 @@ // TODO: save description // read relations - if ($this->dbconn->prep) { - $this->dbconn->addPStatement('SELECT * from '.$this->dbconn->prefix.$this->tablename_rel.' WHERE obj_id = $1 or rel_id = $2','BASEREL'); - $rr = $this->dbconn->execPStatement('BASEREL',1,$this->id,$this->id); - } else { - $q = 'SELECT * from '.$this->dbconn->prefix.$this->tablename_rel.' WHERE obj_id = '.$this->id.' or rel_id = '.$this->id; - $rr = $this->dbconn->Exec($q); + $memid1 = $this->dbconn->db->systemid.'_r'.$this->id; + $memid2 = $this->dbconn->db->systemid.'_br'.$this->id; + $fail = false; + if($tutos['use_memcache']) { + $this->relations = @$tutos['memcache']->get($memid1); + $this->back_relations = @$tutos['memcache']->get($memid2); + if (!is_array($this->relations) || !is_array($this->back_relations)) { + $fail = true; + } + } else if ($tutos['use_apccache']) { + $this->relations = apc_fetch($memid1); + $this->back_relations = apc_fetch($memid2); + if (!is_array($this->relations) || !is_array($this->back_relations)) { + $fail = true; + } } - $n = $rr->numrows(); - $a = 0; - while ($a < $n) { - $o = $rr->getInt($a,'obj_id'); - $b = $rr->getInt($a,'rel_id'); - if ($o == $this->id) { - $this->relations[$rr->getInt($a,'type_id')][$b] = 1; + + if (!$fail) { + $this->relations = apc_fetch($memid1); + $this->back_relations = apc_fetch($memid2); + if ($this->dbconn->prep) { + $this->dbconn->addPStatement('SELECT * from '.$this->dbconn->prefix.$this->tablename_rel.' WHERE obj_id = $1 or rel_id = $2','BASEREL'); + $rr = $this->dbconn->execPStatement('BASEREL',1,$this->id,$this->id); + } else { + $q = 'SELECT * from '.$this->dbconn->prefix.$this->tablename_rel.' WHERE obj_id = '.$this->id.' or rel_id = '.$this->id; + $rr = $this->dbconn->Exec($q); } - if ($b == $this->id) { - $this->back_relations[$rr->getInt($a,'type_id')][$o] = 1; + $n = $rr->numrows(); + $a = 0; + while ($a < $n) { + $o = $rr->getInt($a,'obj_id'); + $b = $rr->getInt($a,'rel_id'); + if ($o == $this->id) { + $this->relations[$rr->getInt($a,'type_id')][$b] = 1; + } + if ($b == $this->id) { + $this->back_relations[$rr->getInt($a,'type_id')][$o] = 1; + } + $a++; } - $a++; + $rr->free(); + // cache it + // update cache + if($tutos['use_memcache']) { + $tutos['memcache']->set($memid1,$this->relations,0,$tutos['timetolive']*360); + $tutos['memcache']->set($memid2,$this->back_relations,0,$tutos['timetolive']*360); + } else if ($tutos['use_apccache']) { + apc_store($memid1,$this->relations,$tutos['timetolive']*360); + apc_store($memid2,$this->back_relations,$tutos['timetolive']*360); + } } - $rr->free(); - $g_hash[$this->id] = &$this; $this->run_after_read_hook(); @@ -1372,10 +1401,14 @@ $g_hash[$this->id] = &$this; } if($tutos['use_memcache']) { - $memid = $this->dbconn->db->systemid.'_'.$this->gettypeid().'_'.$this->id; + $memid = $this->dbconn->db->systemid.'_'.$this->gettypeid().'_'.$this->id; + $memid1 = $this->dbconn->db->systemid.'_r'.$this->id; + $memid2 = $this->dbconn->db->systemid.'_br'.$this->id; $tutos['memcache']->delete($memid,0); } else if ($tutos['use_apccache']) { - $memid = $this->dbconn->db->systemid.'_'.$this->gettypeid().'_'.$this->id; + $memid = $this->dbconn->db->systemid.'_'.$this->gettypeid().'_'.$this->id; + $memid1 = $this->dbconn->db->systemid.'_r'.$this->id; + $memid2 = $this->dbconn->db->systemid.'_br'.$this->id; apc_delete($memid); } @@ -1407,6 +1440,7 @@ $r->free(); } // add new stuff + $cnt2 = 0; foreach ($this->addrel as $t => $rarr) { foreach ($rarr as $r => $x) { $q = 'INSERT into '.$this->dbconn->prefix.$this->tablename_rel.' (obj_id,rel_id,type_id,description) VALUES('; @@ -1414,9 +1448,19 @@ $q .= ')'; $r = $this->dbconn->Exec($q); $r->free(); + $cnt2++; } } - + if ($cnt + $cnt2 > 0) { + // update cache + if($tutos['use_memcache']) { + $tutos['memcache']->set($memid1,$this->relations,0,$tutos['timetolive']*360); + $tutos['memcache']->set($memid2,$this->back_relations,0,$tutos['timetolive']*360); + } else if ($tutos['use_apccache']) { + apc_store($memid1,$this->relations,$tutos['timetolive']*360); + apc_store($memid2,$this->back_relations,$tutos['timetolive']*360); + } + } $msg = addLine($msg,$this->run_postsave_hook()); return $msg; } Modified: trunk/php/team.pinc =================================================================== --- trunk/php/team.pinc 2013-05-23 08:03:20 UTC (rev 1070) +++ trunk/php/team.pinc 2013-05-23 11:28:48 UTC (rev 1071) @@ -646,7 +646,7 @@ /** * read teams via int id */ - function obj_read_int(&$obj,$id,$level = 0) { + function obj_read_int(tutos_base $obj,$id,$level = 0) { global $table; if ($obj->dbconn->prep) { @@ -659,7 +659,7 @@ $n = $r->numrows(); $a = 0; while ( $a < $n ) { - $tid = $r->get($a, 'id'); + $tid = $r->getInt($a, 'id'); if (!isset($obj->teamlist[$tid])) { $obj->teamlist[$tid] = $r->get($a, 'name'); team::obj_read_int($obj,$tid,($level +1)); @@ -688,6 +688,7 @@ $obj->teamlist = array(); $obj->teamlist_hide = array(); team::obj_read_int($obj,$obj->id); + asort($obj->teamlist); } /** Modified: trunk/php/team_ins.php =================================================================== --- trunk/php/team_ins.php 2013-05-23 08:03:20 UTC (rev 1070) +++ trunk/php/team_ins.php 2013-05-23 11:28:48 UTC (rev 1071) @@ -10,6 +10,8 @@ * @module team_ins * @package team */ +$tutos['files'][__FILE__] = '$Rev$'; + require_once 'webelements.p3'; require_once 'permission.p3'; @@ -17,7 +19,7 @@ check_user(); loadmodules('team','ins'); -$msg = ''; +$msg = ''; $gotourl = 'team_new.php'; $t = new team($dbconn); @@ -56,7 +58,7 @@ } if ( ! isset($_POST['owner']) ) { - $msg = addLine($msg,sprintf($lang['Err0009'],$lang['TeamManager'])); + //$msg = addLine($msg,sprintf($lang['Err0009'],$lang['TeamManager'])); } else { $owner = $_POST['owner']; $gotourl= addUrlParameter($gotourl,"owner=".$owner,true); Modified: trunk/php/webelements.p3 =================================================================== --- trunk/php/webelements.p3 2013-05-23 08:03:20 UTC (rev 1070) +++ trunk/php/webelements.p3 2013-05-23 11:28:48 UTC (rev 1071) @@ -1826,12 +1826,12 @@ } } - $found = false; + $found = false; $found_by_hash = false; + $memid = $dbconn->db->systemid.'_TT'.$id; // Second use the type info from objectids table if($tutos['use_memcache']) { - $memid = $dbconn->db->systemid.'_TT'.$id; $x = $tutos['memcache']->get($memid); if ($x !== false ) { $found = true; @@ -1842,7 +1842,6 @@ $g_hash['fail4']++; } } else if ($tutos['use_apccache']) { - $memid = $dbconn->db->systemid.'_TT'.$id; $x = apc_fetch($memid); if ($x !== false ) { $found = true; @@ -1867,6 +1866,11 @@ $found_by_hash = true; $g_hash['hits2']++; $type = $r->get(0,'tutostype'); + if($tutos['use_memcache'] && $type != noobject ) { + $tutos['memcache']->set($memid,$type,0,$tutos['timetolive']*360); + } else if ($tutos['use_apccache'] && $type != noobject) { + apc_store($memid,$type,$tutos['timetolive']*360); + } } $r->free(); } @@ -1879,10 +1883,8 @@ // save for future use if (!$found_by_hash) { if($tutos['use_memcache'] && $type != noobject ) { - $memid = $dbconn->db->systemid.'_TT'.$id; $tutos['memcache']->set($memid,$type,0,$tutos['timetolive']*360); } else if ($tutos['use_apccache'] && $type != noobject) { - $memid = $dbconn->db->systemid.'_TT'.$id; apc_store($memid,$type,$tutos['timetolive']*360); } } @@ -1996,10 +1998,8 @@ $g_hash['fail2']++; // save for future use that this is meanwhile deleted if($tutos['use_memcache']) { - $memid = $dbconn->db->systemid.'_TT'.$id; $tutos['memcache']->set($memid,0,0,$tutos['timetolive']*360); } else if ($tutos['use_apccache']) { - $memid = $dbconn->db->systemid.'_TT'.$id; apc_store($memid,0,$tutos['timetolive']*360); } //error_log('getObject failed for '.$id .' '.TUTOS_backtrace()."\n",3,$tutos[errlog]); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2013-05-23 08:03:23
|
Revision: 1070 http://sourceforge.net/p/tutos/code/1070 Author: gokohnert Date: 2013-05-23 08:03:20 +0000 (Thu, 23 May 2013) Log Message: ----------- sort participant lists of appointments Modified Paths: -------------- trunk/php/appointment.pinc Modified: trunk/php/appointment.pinc =================================================================== --- trunk/php/appointment.pinc 2013-05-23 07:26:14 UTC (rev 1069) +++ trunk/php/appointment.pinc 2013-05-23 08:03:20 UTC (rev 1070) @@ -509,6 +509,7 @@ unset($p); } $result->free(); + uasort($this->participant,array('tutos_base','obj_sort')); $this->participants_is_read = true; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2013-05-23 07:26:21
|
Revision: 1069 http://sourceforge.net/p/tutos/code/1069 Author: gokohnert Date: 2013-05-23 07:26:14 +0000 (Thu, 23 May 2013) Log Message: ----------- look at sortable and overview fglags for xutom fields in product overview Modified Paths: -------------- trunk/php/db/table_custom_example.pinc trunk/php/product_overview.php Modified: trunk/php/db/table_custom_example.pinc =================================================================== --- trunk/php/db/table_custom_example.pinc 2013-05-22 10:59:40 UTC (rev 1068) +++ trunk/php/db/table_custom_example.pinc 2013-05-23 07:26:14 UTC (rev 1069) @@ -106,6 +106,7 @@ type => "TX_TYPE", 'growonly' => true, // only append new text 'stamp' => true, // stamp with user & date + 'overview' => false, # do not show in overview constraints => "", Desc => "description 3", 'lang' => "DESC3"); @@ -125,6 +126,7 @@ type => "TS_TYPE", constraints => "", 'default_today' => false, + 'overview' => true, # show in overview Desc => "end date", 'lang' => "DATE3", 'hlang' => 'help for date3'); @@ -135,8 +137,10 @@ type => "float", constraints => "", Desc => "floater", + 'sortable' => true, # show in overview as sortable 'lang' => "FLOAT3", 'hlang' => "help for FLOAT3", + 'overview' => true, # show in overview 'required' => true); // // A boolean field @@ -148,6 +152,7 @@ Desc => "yes/no", 'lang' => "YES/NO", 'hlang' => 'help for bo', + 'overview' => true, # show in overview 'searchable' => true, 'required' => true); // @@ -158,6 +163,7 @@ type => "ID_TYPE", constraints => "", Desc => "optionlist", + 'overview' => true, # show in overview 'lang' => "OPTIONLIST", 'hlang' => "HOPTIONLIST", 'searchable' => true, Modified: trunk/php/product_overview.php =================================================================== --- trunk/php/product_overview.php 2013-05-22 10:59:40 UTC (rev 1068) +++ trunk/php/product_overview.php 2013-05-23 07:26:14 UTC (rev 1069) @@ -60,7 +60,7 @@ return $r; } - $flds = 0; + $this->flds = 0; $pf = 0; $n = count($this->plist); @@ -79,117 +79,118 @@ $r .= $this->OverviewHeadLineStart(); foreach ($tutos[prodfields] as $c) { - if ( ($c == "name") && $this->pshow[$c] ) { - $r .= $this->orderHeader("name",$lang['ProdName'],$this->link2); - $flds++; + if ( ($c == 'name') && $this->pshow[$c] ) { + $r .= $this->orderHeader('name',$lang['ProdName'],$this->link2); + $this->flds++; } - if ( ($c == "version") && $this->pshow[$c] ) { - $r .= $this->orderHeader("version",$lang['ProdVersion'],$this->link2); - $flds++; + if ( ($c == 'version') && $this->pshow[$c] ) { + $r .= $this->orderHeader('version',$lang['ProdVersion'],$this->link2); + $this->flds++; } if ( preg_match('#role_#',$c) && $this->pshow[$c] ) { foreach ( $lang['ProdRole'] as $ti => $tx) { if ( $c == 'role_'.$ti ) { $r .= $this->orderHeader('',$lang['ProdRole'][$ti],$this->link2); - $flds++; + $this->flds++; } } } - if ( ($c == "desc") && $this->pshow[$c] ) { - $r .= $this->orderHeader("description",$lang['ProdDesc'],$this->link2); - $flds++; + if ( ($c == 'desc') && $this->pshow[$c] ) { + $r .= $this->orderHeader('description',$lang['ProdDesc'],$this->link2); + $this->flds++; } - if ( ($c == "desc1") && $this->pshow[$c] ) { - $r .= $this->orderHeader("desc1",$lang['ProdDesc1'],$this->link2); - $flds++; + if ( ($c == 'desc1') && $this->pshow[$c] ) { + $r .= $this->orderHeader('desc1',$lang['ProdDesc1'],$this->link2); + $this->flds++; } - if ( ($c == "desc2") && $this->pshow[$c] ) { - $r .= $this->orderHeader("desc2",$lang['ProdDesc2'],$this->link2); - $flds++; + if ( ($c == 'desc2') && $this->pshow[$c] ) { + $r .= $this->orderHeader('desc2',$lang['ProdDesc2'],$this->link2); + $this->flds++; } - if ( ($c == "cl1") && $this->pshow[$c] ) { - $r .= $this->orderHeader("",$lang['ProdClass1'],$this->link2); - $flds++; + if ( ($c == 'cl1') && $this->pshow[$c] ) { + $r .= $this->orderHeader('',$lang['ProdClass1'],$this->link2); + $this->flds++; } - if ( ($c == "cl2") && $this->pshow[$c] ) { - $r .= $this->orderHeader("",$lang['ProdClass2'],$this->link2); - $flds++; + if ( ($c == 'cl2') && $this->pshow[$c] ) { + $r .= $this->orderHeader('',$lang['ProdClass2'],$this->link2); + $this->flds++; } - if ( ($c == "state") && $this->pshow[$c] ) { - $r .=$this-> orderHeader("state",$lang['ProdState'],$this->link2); - $flds++; + if ( ($c == 'state') && $this->pshow[$c] ) { + $r .=$this-> orderHeader('state',$lang['ProdState'],$this->link2); + $this->flds++; } - if ( ($c == "probability") && $this->pshow[$c] ) { - $r .= $this->orderHeader("probability",$lang['ProdProb'],$this->link2); - $flds++; + if ( ($c == 'probability') && $this->pshow[$c] ) { + $r .= $this->orderHeader('probability',$lang['ProdProb'],$this->link2); + $this->flds++; } - if ( ($c == "price") && $this->pshow[$c] ) { - $r .= $this->orderHeader("currency,price",$lang['ProdPrice'],$this->link2); - $flds++; - $pf = $flds; + if ( ($c == 'price') && $this->pshow[$c] ) { + $r .= $this->orderHeader('currency,price',$lang['ProdPrice'],$this->link2); + $this->flds++; + $pf = $this->flds; } - if ( ($c == "cost") && $this->pshow[$c] ) { - $r .= $this->orderHeader("currency,cost",$lang['ProdCost'],$this->link2); - $flds++; - $cf = $flds; + if ( ($c == 'cost') && $this->pshow[$c] ) { + $r .= $this->orderHeader('currency,cost',$lang['ProdCost'],$this->link2); + $this->flds++; + $cf = $this->flds; } - if ( ($c == "creator") && $this->pshow[$c] ) { - $r .= $this->orderHeader("",$lang['ProdCreator'],$this->link2); - $flds++; + if ( ($c == 'creator') && $this->pshow[$c] ) { + $r .= $this->orderHeader('',$lang['ProdCreator'],$this->link2); + $this->flds++; } - if ( ($c == "creation") && $this->pshow[$c] ) { - $r .= $this->orderHeader("creation",$lang['ProdCreationS'],$this->link2); - $flds++; + if ( ($c == 'creation') && $this->pshow[$c] ) { + $r .= $this->orderHeader('creation',$lang['ProdCreationS'],$this->link2); + $this->flds++; } if ( ($c == 'p_start') && $this->pshow[$c] ) { $r .= $this->orderHeader('p_start',$lang['ProdStart'],$this->link2); - $flds++; + $this->flds++; } if ( ($c == 'p_end') && $this->pshow[$c] ) { $r .= $this->orderHeader('p_end',$lang['ProdEnd'],$this->link2); - $flds++; + $this->flds++; } if ( $this->user->feature_ok(usebugtracking,PERM_SEE) ) { - if ( ($c == "pbugs") && $this->pshow[$c] ) { - $r .= $this->orderHeader("",$lang['Bugs'],$this->link2); - $flds++; + if ( ($c == 'pbugs') && $this->pshow[$c] ) { + $r .= $this->orderHeader('',$lang['Bugs'],$this->link2); + $this->flds++; } } if ( $this->user->feature_ok(usedocmanagement,PERM_SEE) ) { - if ( ($c == "pfile") && $this->pshow[$c] ) { - $r .= $this->orderHeader("",$lang['Files'],$this->link2); - $flds++; + if ( ($c == 'pfile') && $this->pshow[$c] ) { + $r .= $this->orderHeader('',$lang['Files'],$this->link2); + $this->flds++; } } if ( $this->user->feature_ok(usetaskmanagement,PERM_SEE) ) { - if ( ($c == "ptask") && $this->pshow[$c] ) { - $r .= $this->orderHeader("",$lang['Tasks'],$this->link2); - $flds++; + if ( ($c == 'ptask') && $this->pshow[$c] ) { + $r .= $this->orderHeader('',$lang['Tasks'],$this->link2); + $this->flds++; } } // Custom fields - foreach($table['product'] as $ti => $tx) { - if (!is_array($tx)) continue; - if (!isset($tx['custom'])) continue; - if (!$tx['custom']) continue; - if (!isset($tx['ftype'])) $tx['ftype'] = ''; + foreach(get_custom_overview_fields($this,'product') as $ti => $tx) { if ( ($c == 'p_c_'.$ti) && $this->pshow[$c] ) { - $r .= $this->orderHeader('',myentities(isset($lang[$tx['lang']]) ? $lang[$tx['lang']]:$tx['lang']),$this->link2); - $flds++; + if (isset($tx['sortable']) && ($tx['sortable'] == true) ) { + $sortby = $ti; + } else { + $sortby = ''; + } + $r .= $this->orderHeader($sortby,myentities(isset($lang[$tx['lang']]) ? $lang[$tx['lang']]:$tx['lang']),$this->link2); + $this->flds++; } } if ( ($c == 'checkbox') && $this->pshow[$c] ) { // Column for checkboxes $r .= $this->MassupdateHeader(); - $flds++; + $this->flds++; } } $r .= $this->OverviewHeadLineEnd(); $r .= $this->OverviewHeadEnd(); $r .= $this->OverviewBodyStart(); - if ( $this->format == "paper" ) { + if ( $this->format == 'paper' ) { $a = 0; $end = $n; } else if ( $this->start == -1 ) { @@ -212,7 +213,7 @@ } $p->readroles(); - $r .= $this->OverviewRowStart($line,$lang[$p->getType()] .": ". $p->getFullName()); + $r .= $this->OverviewRowStart($line,$lang[$p->getType()] .': '. $p->getFullName()); foreach ($tutos[prodfields] as $c) { if (! $this->pshow[$c]) { continue; @@ -318,7 +319,7 @@ $r .= $this->OverviewBodyEnd(); $r .= $this->OverviewFootStart(); - $r .= $this->list_navigation(addUrlParameter($this->link1,'ss='.$this->ss),$flds,$this->start,$a,$n); + $r .= $this->list_navigation(addUrlParameter($this->link1,'ss='.$this->ss),$this->flds,$this->start,$a,$n); // Sum of Prices if ( ($this->pshow['price'] == 1) || ($this->pshow['cost'] == 1) ) { @@ -328,13 +329,13 @@ if ( $this->pshow[$c] == 0 ) { continue; } - if ( $c == "price" ) { + if ( $c == 'price' ) { if ( $fill > 0 ) { $r .= ' <td colspan="'. $fill ."\"> </td>\n"; $fill = 0; } $r .= " <td align=\"right\">\n"; - $pre = ""; + $pre = ''; foreach ($sum[1] as $i1 => $f1) { if ( $f1 ) { $r .= $pre . my_number_format($f1,2) .' '. $i1; @@ -342,13 +343,13 @@ } } $r .= " </td>\n"; - } else if ( $c == "cost" ) { + } else if ( $c == 'cost' ) { if ( $fill > 0 ) { $r .= " <td colspan=\"". $fill ."\"> </td>\n"; $fill = 0; } $r .= " <td align=\"right\">\n"; - $pre = ""; + $pre = ''; foreach ($sum[2] as $i1 => $f1) { if ( $f1 ) { $r .= $pre . my_number_format($f1,2) .' '. $i1; @@ -373,7 +374,7 @@ $this->addHidden('name',''); } // Mass Update - $r .= $this->UpdateRowStart($flds-1); + $r .= $this->UpdateRowStart($this->flds -1); $r .= sprintf($lang['withmarked'],$lang['ProductPs']); $r .= " <select name=\"action\">\n"; $r .= " <option value=\"-1\" selected=\"selected\">". $lang['ActionNil'] ."</option>\n"; @@ -757,12 +758,7 @@ $this->flds['p_start'] = 'ProdStart'; $this->flds['p_end'] = 'ProdEnd'; // Custom fields - foreach($table['product'] as $ti => $tx) { - if (!is_array($tx)) continue; - if (!isset($tx['custom'])) continue; - if (!$tx['custom']) continue; - if (!isset($tx['ftype'])) $tx['ftype'] = ''; - + foreach(get_custom_overview_fields($this,'product') as $ti => $tx) { $this->flds['p_c_'.$ti] = $tx['lang']; $tutos[prodfields][] = 'p_c_'.$ti; } @@ -781,8 +777,8 @@ $x = sprintf("cl%d",$cl); $this->flds['cl'.$cl] = 'ProdClass'.$cl; } - $this->flds['checkbox'] = ''; - $tutos[prodfields][] = 'checkbox'; + $this->flds['checkbox'] = ''; + $tutos[prodfields][] = 'checkbox'; foreach($tutos[prodfields] as $c) { $this->pshow[$c] = 0; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2013-05-22 10:59:42
|
Revision: 1068 http://sourceforge.net/p/tutos/code/1068 Author: gokohnert Date: 2013-05-22 10:59:40 +0000 (Wed, 22 May 2013) Log Message: ----------- fix Modified Paths: -------------- trunk/php/pdf2.pinc Modified: trunk/php/pdf2.pinc =================================================================== --- trunk/php/pdf2.pinc 2013-05-21 09:30:33 UTC (rev 1067) +++ trunk/php/pdf2.pinc 2013-05-22 10:59:40 UTC (rev 1068) @@ -45,7 +45,7 @@ $this->setTopMargin(18); $this->setHeaderMargin(0); $this->setFooterMargin(5); - + $this->footer_central = ''; } // overwrite Header function This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2013-05-21 09:30:39
|
Revision: 1067 http://sourceforge.net/p/tutos/code/1067 Author: gokohnert Date: 2013-05-21 09:30:33 +0000 (Tue, 21 May 2013) Log Message: ----------- better check of deprecated config values / handler config moved out of config_default Modified Paths: -------------- trunk/.htaccess trunk/apache.conf.in trunk/php/cia_factbook/cia.pinc trunk/php/config_default.pinc trunk/php/db.p3 trunk/php/email/email.pinc trunk/php/fax/README trunk/php/fax/fax.pinc trunk/php/fax/fax_ins.php trunk/php/fax/fax_new.php trunk/php/handler.pinc trunk/php/isbn/isbn.pinc trunk/php/layout/new2_layout.pinc trunk/php/oanda/oanda.pinc trunk/php/permission.p3 trunk/php/sms/README trunk/php/sms/sms.pinc trunk/php/subversion/revision.pinc trunk/php/webelements.p3 trunk/php/yahoo/yahoo_currency_converter.pinc Modified: trunk/.htaccess =================================================================== --- trunk/.htaccess 2013-05-21 07:28:04 UTC (rev 1066) +++ trunk/.htaccess 2013-05-21 09:30:33 UTC (rev 1067) @@ -62,6 +62,7 @@ #php_value ignore_repeated_errors "1" #php_value magic_quotes_gpc "0" #php_value arg_separator.output "&" +#php_value max_input_vars "2048" # php_value eaccelerator.enable "0" # php_value apc.enabled "0" </IfModule> Modified: trunk/apache.conf.in =================================================================== --- trunk/apache.conf.in 2013-05-21 07:28:04 UTC (rev 1066) +++ trunk/apache.conf.in 2013-05-21 09:30:33 UTC (rev 1067) @@ -35,6 +35,9 @@ php_flag child_terminate off php_flag last_modified off php_flag xbithack off + php_value max_input_vars "4000" + php_value memory_limit "256M" + php_value upload_max_filesize "20M" DirectoryIndex index.html Options MultiViews FollowSymLinks +Includes -Indexes AllowOverride All Modified: trunk/php/cia_factbook/cia.pinc =================================================================== --- trunk/php/cia_factbook/cia.pinc 2013-05-21 07:28:04 UTC (rev 1066) +++ trunk/php/cia_factbook/cia.pinc 2013-05-21 09:30:33 UTC (rev 1067) @@ -1,6 +1,6 @@ <?php /** - * Copyright 2002 - 2011 by Gero Kohnert + * Copyright 2002 - 2013 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 @@ -9,6 +9,7 @@ * SVN Info $Id$ * $Author$ */ +$tutos['files'][__FILE__] = '$Rev$'; /** * link to cia world fact book @@ -17,7 +18,7 @@ /** * run the handler */ - function handle(&$obj,$arg,$cnt) { + function handle($obj,$arg,$cnt) { global $lang,$current_user; if (empty($arg)) { @@ -33,9 +34,9 @@ } $cn = strtolower($cn); -# TODO complete this list -# a translation table from tutos ISO to CIA -# I really like to know why they choose such a strange naming scheme ! + // TODO complete this list + // a translation table from tutos ISO to CIA + // I really like to know why they choose such a strange naming scheme ! $trans['de'] = 'gm'; $trans['ch'] = 'sz'; $trans['cn'] = 'ch'; @@ -63,10 +64,8 @@ $cn = $trans[$cn]; } $baseurl = 'https://www.cia.gov/library/publications/the-world-factbook'; - # $url = $baseurl . '/print/'. $cn .'.html'; $url = $baseurl . '/geos/'. strtolower($cn) .'.html'; - # $link2 = '<img alt="'. $arg .'" border="0" height="12" src="'. $baseurl .'/flags/'. $cn .'-flag.gif" />'; $link2 = '<img alt="'. $arg .'" border="0" height="12" src="'. $baseurl .'/graphics/flags/large/'. $cn .'-lgflag.gif" />'; if ($cnt == 1) { return '<a href="'. $url .'" target="map">'. $arg .' '. $link2 .'</a>'; @@ -77,9 +76,9 @@ /** * check if all is ok */ - function check(&$obj,$arg) { + function check($obj,$arg) { return true; } - } +} ?> \ No newline at end of file Modified: trunk/php/config_default.pinc =================================================================== --- trunk/php/config_default.pinc 2013-05-21 07:28:04 UTC (rev 1066) +++ trunk/php/config_default.pinc 2013-05-21 09:30:33 UTC (rev 1067) @@ -284,43 +284,6 @@ // $tutos[memcache_hosts] = array(); // -// Fax features -// -// you have to install the HDL_fax package to use this -// -// (Disable this with usefax below) -// Mode 1 = via faxspool (from the mgetty package) -// Mode 2 = via mail (see above) -// -$tutos[faxmode] = 1; -// -// Mode 1 -// Where to find faxspool -// Set tutos[usefax] to 0 to disable faxing -// (This is preconfigured to work with the mgetty/sendfax package) -// -$tutos[faxspool] = '/usr/bin/faxspool'; -// -// Mode 2 -// Mailaddress to send the fax to -// A @NR@ String in the mailaddress will be replaced by the faxnumber -// Set tutos[usefax] to 0 to disable faxing -// (This is preconfigured to work with mail2fax from the mgetty package) -// To adapt the fax mechanism look at [tutosdir]/fax_ins.php -// -$tutos[faxmail] = 'fa...@tu...'; -$tutos[faxmail_user] = 'tutos'; -$tutos[faxmail_pass] = 'xxx'; -# $tutos[faxmail] = "[FAX:@NR@]"; -// -// SMS Mail -// if you have a Mail2SMS Gateway enter the mail address below -// @NR@ will be replaced with the phone number -// You have to install the HDL_sms package to use this -// disable this by setting to empty string -# $tutos[smsmail] = ""; -$tutos[smsmail] = 'sms@NR@@tutos.org'; -// // Path to freemind java applet (used to display freemind mindmap files in browser) // See http://freemind.sourceforge.net/ // @@ -778,4 +741,4 @@ ### mode:iso-accents *** ### coding:utf-8 *** ### End: *** -?> +?> \ No newline at end of file Modified: trunk/php/db.p3 =================================================================== --- trunk/php/db.p3 2013-05-21 07:28:04 UTC (rev 1066) +++ trunk/php/db.p3 2013-05-21 09:30:33 UTC (rev 1067) @@ -306,7 +306,7 @@ // require_once 'modules.pinc'; // set again the value from config_default -// some uses simply copy the whole config_default +// some users simply copy the whole config_default // and thus we dont get real version numbers in bug reports $tutos[version] = $x; unset($x); @@ -375,12 +375,12 @@ $tutos[use_check_dbacl] = 0; } // a software called tutos should do this -$tutos[useteams] = 1; -$tutos[useuser] = 1; -$tutos[usedbs] = 1; -$tutos[usecompany] = 1; +$tutos[useteams] = 1; +$tutos[useuser] = 1; +$tutos[usedbs] = 1; +$tutos[usecompany] = 1; $tutos[usedepartment] = 1; -$tutos[uselocation] = 1; +$tutos[uselocation] = 1; $tutos[activemodules] = array(); @@ -432,106 +432,66 @@ if (isset($tutos[invautoname])) { $confmsg .= '<br />check invautoname. Instead of $tutos[invautoname] in your config you should define it only '.makelink('invoice/invoice_config.php','here'); } -if (isset($tutos[taskautoname])) { - $confmsg .= '<br />check taskautoname. Instead of $tutos[taskautoname] in your config you should define it only '.makelink('admin/main_config.php','here'); +// global config check +$check = array( + taskautoname => 'taskautoname', + proxyhost => 'proyhost', + proxyport => 'proxyport', + classify_products => 'classify_products', + maxshow => 'maxshow', + maxshort => 'maxshort', + maxselect => 'maxselect', + timetolive => 'timetolive', + tasksincalendar => 'tasksincalendar', + task_skip_finished => 'task_skip_finished', + task_show_buginfo => 'task_show_buginfo', + task_show_fileinfo => 'task_show_fileinfo', + timetrackdefaultstate => 'timetrackdefaultstate', + fiscalstartmonth => 'fiscalstartmonth', + mailmode => 'mailmode', + sendmail => 'sendmail', + smtphost => 'smtphost', + smtpport => 'smtpport', + smtp_username => 'smtp_username', + smtp_password => 'smtp_password', + popbeforesmtp => 'popbeforesmtp', + popbeforesmtp_user => 'popbeforesmtp_user', + popbeforesmtp_pass => 'popbeforesmtp_pass', + logo => 'logo', + logolink => 'logolink', + ); +foreach($check as $i => $j) { + if (isset($tutos[$i])) { + $confmsg = addLine($confmsg,'check "'.$j.'". Instead of $tutos['.$j.'] in your config you should define it only '.makelink('admin/main_config.php','here')); + if ( $tutos[debug] != 0 ) { + // undefine + } + } } -if (isset($tutos[proxyhost])) { - $confmsg .= '<br />check proxyhost. Instead of $tutos[proxyhost] in your config you should define it only '.makelink('admin/main_config.php','here'); -} -if (isset($tutos[proxyport])) { - $confmsg .= '<br />check proxyport. Instead of $tutos[proxyport] in your config you should define it only '.makelink('admin/main_config.php','here'); -} -if (isset($tutos[classify_products])) { - $confmsg .= '<br />check classify_products. Instead of $tutos[classify_products] in your config you should define it only '.makelink('admin/main_config.php','here'); -} -if (isset($tutos[maxshow])) { - $confmsg .= '<br />check maxshow. Instead of $tutos[maxshow] in your config you should define it only '.makelink('admin/main_config.php','here'); -} -if (isset($tutos[maxshort])) { - $confmsg .= '<br />check maxshort. Instead of $tutos[maxshort] in your config you should define it only '.makelink('admin/main_config.php','here'); -} -if (isset($tutos[maxselect])) { - $confmsg .= '<br />check maxselect. Instead of $tutos[maxselect] in your config you should define it only '.makelink('admin/main_config.php','here'); -} -if (isset($tutos[timetolive])) { - $confmsg .= '<br />check timetolive. Instead of $tutos[timetolive] in your config you should define it only '.makelink('admin/main_config.php','here'); -} -if (isset($tutos[tasksincalendar])) { - $confmsg .= '<br />check tasksincalendar. Instead of $tutos[tasksincalendar] in your config you should define it only '.makelink('admin/main_config.php','here'); -} -if (isset($tutos[task_skip_finished])) { - $confmsg .= '<br />check task_skip_finished. Instead of $tutos[task_skip_finished] in your config you should define it only '.makelink('admin/main_config.php','here'); -} -if (isset($tutos[task_show_buginfo])) { - $confmsg .= '<br />check task_show_buginfo. Instead of $tutos[task_show_buginfo] in your config you should define it only '.makelink('admin/main_config.php','here'); -} -if (isset($tutos[task_show_fileinfo])) { - $confmsg .= '<br />check task_show_fileinfo. Instead of $tutos[task_show_fileinfo] in your config you should define it only '.makelink('admin/main_config.php','here'); -} -if (isset($tutos[fiscalstartmonth])) { - $confmsg .= '<br />check fiscalstartmonth. Instead of $tutos[fiscalstartmonth] in your config you should define it only '.makelink('admin/main_config.php','here'); -} -if (isset($tutos[timetrackdefaultstate])) { - $confmsg .= '<br />check timetrackdefaultstate. Instead of $tutos[timetrackdefaultstate] in your config you should define it only '.makelink('admin/main_config.php','here'); -} - -if (isset($tutos[mailmode])) { - $confmsg .= '<br />check mailmode. Instead of $tutos[mailmode] in your config you should define it only '.makelink('admin/main_config.php','here'); -} -if (isset($tutos[sendmail])) { - $confmsg .= '<br />check sendmail. Instead of $tutos[sendmail] in your config you should define it only '.makelink('admin/main_config.php','here'); -} -if (isset($tutos[smtphost])) { - $confmsg .= '<br />check mailmode. Instead of $tutos[smtphost] in your config you should define it only '.makelink('admin/main_config.php','here'); -} -if (isset($tutos[smtpport])) { - $confmsg .= '<br />check smtpport. Instead of $tutos[smtpport] in your config you should define it only '.makelink('admin/main_config.php','here'); -} -if (isset($tutos[smtp_username])) { - $confmsg .= '<br />check smtp_username. Instead of $tutos[smtp_username] in your config you should define it only '.makelink('admin/main_config.php','here'); -} -if (isset($tutos[smtp_password])) { - $confmsg .= '<br />check smtp_password. Instead of $tutos[smtp_password] in your config you should define it only '.makelink('admin/main_config.php','here'); -} -if (isset($tutos[popbeforesmtp])) { - $confmsg .= '<br />check popbeforesmtp. Instead of $tutos[popbeforesmtp] in your config you should define it only '.makelink('admin/main_config.php','here'); -} -if (isset($tutos[popbeforesmtp_user])) { - $confmsg .= '<br />check popbeforesmtp_user. Instead of $tutos[popbeforesmtp_user] in your config you should define it only '.makelink('admin/main_config.php','here'); -} -if (isset($tutos[popbeforesmtp_pass])) { - $confmsg .= '<br />check popbeforesmtp_pass. Instead of $tutos[popbeforesmtp_pass] in your config you should define it only '.makelink('admin/main_config.php','here'); -} -if (isset($tutos[logo])) { - $confmsg .= '<br />check logo. Rename $tutos[logo] in your config.php to $tutos[\'logo\'] Runtime Logo will be defined '.makelink('admin/main_config.php','here'); -} -if (isset($tutos[logolink])) { - $confmsg .= '<br />check logolink. Rename $tutos[logolink] in your config.php to $tutos[\'logo\'] Runtime Logolink will be defined '.makelink('admin/main_config.php','here'); -} - -$tutos['jqplot'] = 1; -$tutos['prod_state_stc'] = -1; -$tutos['prod_activ_states'] = '0,1,4'; -$tutos['prod_finish_state'] = 2; -$tutos['task_state_stc'] = -1; -$tutos['task_autoname'] = '%Y-%m-X'; -$tutos['proxy_port'] = ''; -$tutos['proxy_host'] = ''; -$tutos['resolve_host'] = 0; -$tutos['prod_classify'] = 0; -$tutos['timetolive'] = 240; +unset($check); +$tutos['jqplot'] = 1; +$tutos['prod_state_stc'] = -1; +$tutos['prod_activ_states'] = '0,1,4'; +$tutos['prod_finish_state'] = 2; +$tutos['task_state_stc'] = -1; +$tutos['task_autoname'] = '%Y-%m-X'; +$tutos['proxy_port'] = ''; +$tutos['proxy_host'] = ''; +$tutos['resolve_host'] = 0; +$tutos['prod_classify'] = 0; +$tutos['timetolive'] = 240; $tutos['fiscal_start_month'] = 1; -$tutos['maxshow'] = 20; -$tutos['maxselect'] = 15; -$tutos['maxshort'] = 3; -$tutos['vat_list'] = '0.0'; -$tutos['tasksincalendar'] = 0; +$tutos['maxshow'] = 20; +$tutos['maxselect'] = 15; +$tutos['maxshort'] = 3; +$tutos['vat_list'] = '0.0'; +$tutos['tasksincalendar'] = 0; $tutos['task_skip_finished'] = 1; -$tutos['task_show_buginfo'] = 1; +$tutos['task_show_buginfo'] = 1; $tutos['task_show_fileinfo'] = 1; -$tutos['task_book_state'] = 1; -$tutos['task_finish_state'] = 2; +$tutos['task_book_state'] = 1; +$tutos['task_finish_state'] = 2; $tutos['task_exact'] = 0; $tutos['pref_mail'] = 'html'; if (!isset($tutos['mailmode'])) Modified: trunk/php/email/email.pinc =================================================================== --- trunk/php/email/email.pinc 2013-05-21 07:28:04 UTC (rev 1066) +++ trunk/php/email/email.pinc 2013-05-21 09:30:33 UTC (rev 1067) @@ -11,6 +11,7 @@ * * handle email addresses */ +$tutos['files'][__FILE__] = '$Rev$'; /** * handle email addresses (formerly AsEmail in webelement.p3) @@ -19,7 +20,7 @@ /** * run the handler */ - function handle(&$obj,$arg,$cnt) { + function handle($obj,$arg,$cnt) { global $tutos,$lang,$current_user; $r = ''; @@ -51,13 +52,14 @@ } return $r; } + /** * check if all is ok */ - function check(&$obj,$arg) { + function check($obj,$arg) { // allways delivers something return true; } - } +} ?> \ No newline at end of file Modified: trunk/php/fax/README =================================================================== --- trunk/php/fax/README 2013-05-21 07:28:04 UTC (rev 1066) +++ trunk/php/fax/README 2013-05-21 09:30:33 UTC (rev 1067) @@ -12,4 +12,45 @@ this package is designed to work with the mail2fax software from the mgetty package (part of some Linux Installations) +for configuration see + $tutos[faxmode] + $tutos[faxspool] + $tutos[faxmail] + $tutos[faxmail_user] + $tutos[faxmail_pass] +in your config.php file + +Copy this to your config.php +----------------------------------------------- +// +// Fax features +// +// you have to install the HDL_fax package to use this +// +// (Disable this with usefax below) +// Mode 1 = via faxspool (from the mgetty package) +// Mode 2 = via mail (see above) +// +$tutos[faxmode] = 1; +// +// Mode 1 +// Where to find faxspool +// Set tutos[usefax] to 0 to disable faxing +// (This is preconfigured to work with the mgetty/sendfax package) +// +$tutos[faxspool] = '/usr/bin/faxspool'; +// +// Mode 2 +// Mailaddress to send the fax to +// A @NR@ String in the mailaddress will be replaced by the faxnumber +// Set tutos[usefax] to 0 to disable faxing +// (This is preconfigured to work with mail2fax from the mgetty package) +// To adapt the fax mechanism look at [tutosdir]/fax_ins.php +// +$tutos[faxmail] = 'fa...@tu...'; +$tutos[faxmail_user] = 'tutos'; +$tutos[faxmail_pass] = 'xxx'; +# $tutos[faxmail] = "[FAX:@NR@]"; +----------------------------------------------- + # $Id: README,v 1.4 2010/03/24 13:37:07 gokohnert Exp $ Modified: trunk/php/fax/fax.pinc =================================================================== --- trunk/php/fax/fax.pinc 2013-05-21 07:28:04 UTC (rev 1066) +++ trunk/php/fax/fax.pinc 2013-05-21 09:30:33 UTC (rev 1067) @@ -1,6 +1,6 @@ <?php /** - * Copyright 1999 - 2011 by Gero Kohnert + * Copyright 1999 - 2013 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 @@ -9,6 +9,7 @@ * SVN Info $Id$ * $Author$ */ +$tutos['files'][__FILE__] = '$Rev$'; /** * link to fax service @@ -17,8 +18,9 @@ /** * run the handler */ - function handle(&$obj,$arg,$cnt) { + function handle($obj,$arg,$cnt) { global $lang,$current_user; + if (empty($arg)) { return; } @@ -39,15 +41,20 @@ return '<span class="handler">['. makelink("fax/fax_new.php?nr=". UrlEncode($obj).$add,"fax",sprintf($lang['FaxSendTo'],$to)) .']</span>'; } } + /** * check if all is ok */ - function check(&$obj,$arg) { - global $current_user; + function check($obj,$arg) { + global $current_user,$tutos; + if ( ! $current_user->feature_ok(usefax,PERM_NEW) ) { return false; } + if ( !isset($tutos[faxmode]) || ($tutos[faxmode] != 1 && $tutos[faxmode] != 2) ) { + return false; + } return true; } - } +} ?> \ No newline at end of file Modified: trunk/php/fax/fax_ins.php =================================================================== --- trunk/php/fax/fax_ins.php 2013-05-21 07:28:04 UTC (rev 1066) +++ trunk/php/fax/fax_ins.php 2013-05-21 09:30:33 UTC (rev 1067) @@ -1,11 +1,13 @@ <?php /** - * Copyright 1999 - 2009 by Gero Kohnert + * Copyright 1999 - 2013 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 + * 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. */ +$tutos['files'][__FILE__] = '$Rev$'; + $tutos['base'] = "../.."; ini_set("include_path",".."); require_once 'webelements.p3'; @@ -16,11 +18,12 @@ loadmodules('fax','new'); $gotourl = 'fax/fax_new.php'; -$msg = ""; +$msg = ''; +$info = ''; $nr = ''; /* Check Input */ if ( !isset($_POST['nr']) || empty($_POST['nr']) ) { - $msg .= $lang['Err0031'] ."<br />\n"; + $msg = addLine($msg,$lang['Err0031']); } else { $nr = UrlDecode($_POST['nr']); $gotourl= addUrlParameter($gotourl,"nr=". UrlEncode($_POST['nr']),true); @@ -45,7 +48,7 @@ } $gotourl= addUrlParameter($gotourl,"fax=". Base64_Encode($_POST['fax']),true); -# Call faxspool +// Call faxspool if ( $msg == "" ) { if ( $tutos[faxmode] == 1 ) { $cmd = $tutos[faxspool]; @@ -58,7 +61,7 @@ $fd = popen($cmd ,"w"); fputs ($fd,$fax); pclose($fd); - $msg .= sprintf($lang['FaxSpooledTo'], $nr) ."<br />\n"; + $info = addLine($info,sprintf($lang['FaxSpooledTo'], $nr)); $gotourl = "fax/fax_new.php"; } else if ( $tutos[faxmode] == 2 ) { $hdr = ""; @@ -79,11 +82,11 @@ $hdr .= "\n"; $f = $hdr . $fax ."\n--\n"; $m->addBody($f); - $msg .= $m->send(); - $msg .= sprintf($lang['FaxSpooledTo'], $faxmail) ."<br />\n"; + $msg = addLine($msg,$m->send()); + $info = addLine($info,sprintf($lang['FaxSpooledTo'], $faxmail)); $gotourl = "fax/fax_new.php"; } else { - $msg .= "Unknown faxmode ". $tutos[faxmode] ." please fix config.php<br />"; + $msg = addLine($msg,"Unknown faxmode ". $tutos[faxmode] ." please fix config.php"); } if ( isset($_POST['savenote']) ) { if ( ! class_exists ("note") ) { @@ -96,13 +99,13 @@ $n->creator = $current_user; $n->link_id = $x->id; $dbconn->Begin("WORK"); - $msg .= $n->save(); + $msg = addLine($msg,$n->save()); $dbconn->Commit("WORK"); - $msg .= "Fax was saved as a note for ". $x->getLink() ."<br />"; + $info = addLine($info,'Fax was saved as a note for '. $x->getLink()); $gotourl = $a->getURL(); } } else { - $msg .= $lang['Err0030'] ."<br />\n"; + $msg = addLine($msg,$lang['Err0030']); } leave_insert($dbconn,'../'.$gotourl,$msg); @@ -110,4 +113,4 @@ * SVN Info $Id$ * $Author$ */ -?> +?> \ No newline at end of file Modified: trunk/php/fax/fax_new.php =================================================================== --- trunk/php/fax/fax_new.php 2013-05-21 07:28:04 UTC (rev 1066) +++ trunk/php/fax/fax_new.php 2013-05-21 09:30:33 UTC (rev 1067) @@ -1,11 +1,13 @@ <?php /** - * Copyright 1999 - 2010 by Gero Kohnert + * Copyright 1999 - 2013 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. */ +$tutos['files'][__FILE__] = '$Rev$'; + $tutos['base'] = "../.."; ini_set("include_path",".."); require_once 'webelements.p3'; @@ -78,6 +80,7 @@ $this->name = $lang['FaxCreate']; $this->obj = new location($this->dbconn); + $this->adr = null; $this->nr = ''; if ( !$this->user->feature_ok(usefax,PERM_NEW) ) { @@ -120,5 +123,5 @@ ?> <!-- SVN Info $Id$ - $Author$ - --> +$Author$ +--> \ No newline at end of file Modified: trunk/php/handler.pinc =================================================================== --- trunk/php/handler.pinc 2013-05-21 07:28:04 UTC (rev 1066) +++ trunk/php/handler.pinc 2013-05-21 09:30:33 UTC (rev 1067) @@ -14,7 +14,7 @@ /** * run handler for given input and type */ -Function handle($type,&$obj,$arg) { +Function handle($type,$obj,$arg) { global $tutos; $r = ''; @@ -78,13 +78,13 @@ /** * run the handler */ - function handle(&$obj,$arg,$cnt) { + function handle($obj,$arg,$cnt) { } /** * check if all is ok */ - function check(&$obj,$arg) { + function check($obj,$arg) { return false; } } Modified: trunk/php/isbn/isbn.pinc =================================================================== --- trunk/php/isbn/isbn.pinc 2013-05-21 07:28:04 UTC (rev 1066) +++ trunk/php/isbn/isbn.pinc 2013-05-21 09:30:33 UTC (rev 1067) @@ -1,47 +1,53 @@ <?php /** - * Copyright 2004 - 2009 by Gero Kohnert + * Copyright 2004 - 2013 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. + * * SVN Info $Id$ * $Author$ */ +$tutos['files'][__FILE__] = '$Rev$'; /** * link to amazon book stock to get more info */ class isbn extends tutos_handler { - /** - * run the handler - */ - function handle(&$obj,$arg,$cnt) { - global $lang,$current_user; + /** + * run the handler + */ + function handle($obj,$arg,$cnt) { + global $lang,$current_user; - if (empty($arg)) { - return; + if (empty($arg)) { + return; + } + $x = trim($arg); + $x = preg_replace("<ISBN >","",$x); + $x = preg_replace("<isbn >","",$x); + $x = preg_replace("<->","",$x); + + // Alternatives + # $url = "http://www.amazon.com/exec/obidos/ASIN/".$x."/tutos-20"; + if (strlen($x) == 10) { + $url = "http://www.amazon.de/exec/obidos/ASIN/".$x."/wwwtutosde-21"; + $url = "http://astore.amazon.de/wwwtutosde-21/detail/".$x; + } else { + $url = "http://www.amazon.de/gp/search?keywords=".$x."&index=books&tag=wwwtutosde-21"; + } + # $url = "http://search.barnesandnoble.com/booksearch/isbninquiry.asp?ISBN=".$x; + $r = "<a href=\"". $url ."\" target=\"map\">". $arg ."</a>"; + return $r; } - $x = trim($arg); - $x = preg_replace("<ISBN >","",$x); - $x = preg_replace("<isbn >","",$x); - $x = preg_replace("<->","",$x); - # Alternatives -# $url = "http://www.amazon.com/exec/obidos/ASIN/".$x."/tutos-20"; - if (strlen($x) == 10) { - $url = "http://www.amazon.de/exec/obidos/ASIN/".$x."/wwwtutosde-21"; - $url = "http://astore.amazon.de/wwwtutosde-21/detail/".$x; - } else { - $url = "http://www.amazon.de/gp/search?keywords=".$x."&index=books&tag=wwwtutosde-21"; - } -# $url = "http://search.barnesandnoble.com/booksearch/isbninquiry.asp?ISBN=".$x; - $r = "<a href=\"". $url ."\" target=\"map\">". $arg ."</a>"; - return $r; - } /** * check if all is ok */ - function check(&$obj,$arg) { + function check($obj,$arg) { return true; } } -?> +?> \ No newline at end of file Modified: trunk/php/layout/new2_layout.pinc =================================================================== --- trunk/php/layout/new2_layout.pinc 2013-05-21 07:28:04 UTC (rev 1066) +++ trunk/php/layout/new2_layout.pinc 2013-05-21 09:30:33 UTC (rev 1067) @@ -516,7 +516,7 @@ $x = htmlentities(delUrlParameter($x,"lg")); // Skip this as some browsers will call all alternatives // foreach($lang['lang'] as $i => $f) { - // echo " <link rel=\"Alternate\" href=\"". addUrlParaMeter($x,"lg=".$i) ."\" title=\"". myentities($lang['UserLanguage'] .": ".$f) ."\"". $c ."\n"; + // $r .= ' <link rel="alternate" hreflang="'.$i.'" href="'. addUrlParaMeter($x,"lg=".$i) .'"'. $c; // } $r .= $this->add_js_links_head(); Modified: trunk/php/oanda/oanda.pinc =================================================================== --- trunk/php/oanda/oanda.pinc 2013-05-21 07:28:04 UTC (rev 1066) +++ trunk/php/oanda/oanda.pinc 2013-05-21 09:30:33 UTC (rev 1067) @@ -1,6 +1,6 @@ <?php /** - * Copyright 2003 - 2011 by Gero Kohnert + * Copyright 2003 - 2013 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 @@ -9,6 +9,7 @@ * SVN Info $Id$ * $Author$ */ +$tutos['files'][__FILE__] = '$Rev$'; /** * link to oanda currency converter service @@ -17,7 +18,7 @@ /** * run the handler */ - function handle(&$obj,$arg,$cnt) { + function handle($obj,$arg,$cnt) { global $tutos,$lang,$current_user; if (empty($arg)) { @@ -53,13 +54,14 @@ return '<span class="handler"> [<a target="map" href="'. $url ."\">oanda</a>]</span>"; } } + /** * check if all is ok */ - function check(&$obj,$arg) { + function check($obj,$arg) { // allways delivers something return true; } - } +} ?> \ No newline at end of file Modified: trunk/php/permission.p3 =================================================================== --- trunk/php/permission.p3 2013-05-21 07:28:04 UTC (rev 1066) +++ trunk/php/permission.p3 2013-05-21 09:30:33 UTC (rev 1067) @@ -1,6 +1,6 @@ <?php /** - * Copyright 1999 - 2012 by Gero Kohnert + * Copyright 1999 - 2013 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 @@ -42,7 +42,7 @@ if ($add == '') return $msg; $msg = trim($msg); if ($msg != '') - return $msg.'<br />'.$add; + return $msg."<br />\n".$add; return $add; } Modified: trunk/php/sms/README =================================================================== --- trunk/php/sms/README 2013-05-21 07:28:04 UTC (rev 1066) +++ trunk/php/sms/README 2013-05-21 09:30:33 UTC (rev 1067) @@ -8,10 +8,18 @@ $tutos[handler]['phone']['sms'] = 'sms/sms.pinc'; -Check the smsmail parameter in config.php if you have a mail 2 sms gateway +Add the smsmail parameter to config.php if you have a mail 2 sms gateway +-------------add this to cponfig.php ----------------------- +// +// SMS Mail +// if you have a Mail2SMS Gateway enter the mail address below +// @NR@ will be replaced with the phone number +// You have to install the HDL_sms package to use this +// disable this by setting to empty string +$tutos[smsmail] = 'sms@NR@@tutos.org'; +------------------------------------------------------------ - If this handler fails to realize your mobile phone numbers please have a look in the sms.pinc file. Modified: trunk/php/sms/sms.pinc =================================================================== --- trunk/php/sms/sms.pinc 2013-05-21 07:28:04 UTC (rev 1066) +++ trunk/php/sms/sms.pinc 2013-05-21 09:30:33 UTC (rev 1067) @@ -1,6 +1,6 @@ <?php /** - * Copyright 1999 - 2011 by Gero Kohnert + * Copyright 1999 - 2013 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 @@ -9,6 +9,7 @@ * SVN Info $Id$ * $Author$ */ +$tutos['files'][__FILE__] = '$Rev$'; /** * link to a sms sending page @@ -17,7 +18,7 @@ /** * run the handler */ - function handle(&$obj,$arg,$cnt) { + function handle($obj,$arg,$cnt) { global $current_user,$lang,$tutos; if (empty($arg)) { @@ -74,7 +75,7 @@ /** * check if all is ok */ - function check(&$obj,$arg) { + function check($obj,$arg) { global $current_user; if ( ! $current_user->feature_ok(usesms,PERM_SEE) ) { @@ -82,5 +83,5 @@ } return true; } - } +} ?> \ No newline at end of file Modified: trunk/php/subversion/revision.pinc =================================================================== --- trunk/php/subversion/revision.pinc 2013-05-21 07:28:04 UTC (rev 1066) +++ trunk/php/subversion/revision.pinc 2013-05-21 09:30:33 UTC (rev 1067) @@ -73,7 +73,7 @@ /** * check if all is ok */ - function check(&$obj,$arg) { + function check($obj,$arg) { if (is_numeric($arg)) return true; return false; } Modified: trunk/php/webelements.p3 =================================================================== --- trunk/php/webelements.p3 2013-05-21 07:28:04 UTC (rev 1066) +++ trunk/php/webelements.p3 2013-05-21 09:30:33 UTC (rev 1067) @@ -579,7 +579,9 @@ if (isset($_SERVER["HTTP_ACCEPT_LANGUAGE"]) ) { $r .= "Language:\t". $_SERVER["HTTP_ACCEPT_LANGUAGE"] ."\n"; } - $r .= "URL:\t\t". $_SERVER["PHP_SELF"] ."\n"; + if (isset($_SERVER["PHP_SELF"])) { + $r .= "URL:\t\t". $_SERVER["PHP_SELF"] ."\n"; + } if (isset($_SERVER["REQUEST_URI"])) { $r .= "Request:\t". $_SERVER["REQUEST_URI"] ."\n"; } Modified: trunk/php/yahoo/yahoo_currency_converter.pinc =================================================================== --- trunk/php/yahoo/yahoo_currency_converter.pinc 2013-05-21 07:28:04 UTC (rev 1066) +++ trunk/php/yahoo/yahoo_currency_converter.pinc 2013-05-21 09:30:33 UTC (rev 1067) @@ -1,6 +1,6 @@ <?php /** - * Copyright 2003 - 2011 by Gero Kohnert + * Copyright 2003 - 2013 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 @@ -9,6 +9,7 @@ * SVN Info $Id$ * $Author$ */ +$tutos['files'][__FILE__] = '$Rev$'; /** * link to oanda currency converter service @@ -17,7 +18,7 @@ /** * run the handler */ - function handle(&$obj,$arg,$cnt) { + function handle($obj,$arg,$cnt) { global $tutos,$lang,$current_user; if (empty($arg)) { @@ -74,10 +75,10 @@ /** * check if all is ok */ - function check(&$obj,$arg) { + function check($obj,$arg) { // allways delivers something return true; } - } +} ?> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2013-05-21 07:28:15
|
Revision: 1066 http://sourceforge.net/p/tutos/code/1066 Author: gokohnert Date: 2013-05-21 07:28:04 +0000 (Tue, 21 May 2013) Log Message: ----------- write acl at once Modified Paths: -------------- trunk/php/acl.pinc trunk/php/acl_ins.php trunk/php/base.pinc trunk/php/scrum/scrum.pinc trunk/php/testmanager/testrun_new.php Modified: trunk/php/acl.pinc =================================================================== --- trunk/php/acl.pinc 2013-05-19 14:12:59 UTC (rev 1065) +++ trunk/php/acl.pinc 2013-05-21 07:28:04 UTC (rev 1066) @@ -20,16 +20,6 @@ define ('ACLSHIFT',14); /** - * remove permissions for a given feature - */ -function feature_unset(array &$acl,$feature) { - foreach ($acl as $i => $f) { - if ($i != $feature) continue; - unset($acl[$i]); - } -} - -/** * set the default rights * adr = current_user or so * obj = the object that will get the default rights @@ -97,9 +87,7 @@ $obj->acl_read = true; $obj->acl_write = false; - if ($obj->noacl) return; - - if ( $obj->gettype() == "user" ) { + if ( $obj->gettypeid() == useuser ) { $id = $obj->uid; } else { $id = $obj->id; @@ -209,7 +197,7 @@ if ( $id < 0 ) return; if (!$obj->acl_write) { - // dterror_log('no need to save acl data for: '.$obj."\r\n",3,$tutos[errlog]); + dterror_log('no need to save acl data for: '.$obj.' '.print_r($obj->acl,true)."\r\n",3,$tutos[errlog]); return; } else { // dterror_log('save acl data for: '.$obj."\r\n",3,$tutos[errlog]); @@ -226,26 +214,36 @@ if ($obj->noacl) return; + $q = 'INSERT INTO '. $obj->dbconn->prefix.$table['acl'][name].' (obj_id,adr_id,perm) VALUES '; + $pre = ''; if ( isset($obj->acl[0]) && (count($obj->acl[0]) > 0) ) { foreach ($obj->acl[0] as $i => $f) { if ( ($i != -1) && (gettype($i) == "integer") && ($f > 0) ) { - $q = 'INSERT INTO '. $obj->dbconn->prefix.$table['acl'][name].' (obj_id,adr_id,perm) VALUES ('. $id .','. $i .','. $f .')'; - $r2 = $obj->dbconn->Exec($q); - $r2->free(); + $q .= $pre.'('. $id .','. $i .','. $f .')'; + $pre = ','; } } } + if ($pre != '') { + $r2 = $obj->dbconn->Exec($q); + $r2->free(); + } if (is_array($obj->acl)) { foreach ($obj->acl as $i1 => $f1) { if ($i1 == 0) continue; + $q = 'INSERT INTO '. $obj->dbconn->prefix.$table['aclf'][name].' (obj_id,adr_id,perm,feature) VALUES '; + $pre = ''; foreach ($obj->acl[$i1] as $i => $f) { if ( (gettype($i) == "integer") && ($f > 0) ) { - $q = 'INSERT INTO '. $obj->dbconn->prefix.$table['aclf'][name].' (obj_id,adr_id,perm,feature) VALUES ('. $id .','. $i .','. $f .','.$i1.')'; - $r2 = $obj->dbconn->Exec($q); - $r2->free(); + $q .= $pre.'('. $id .','. $i .','. $f .','.$i1.')'; + $pre = ','; } } + if ($pre != '') { + $r2 = $obj->dbconn->Exec($q); + $r2->free(); + } } } if($tutos['use_memcache']) { Modified: trunk/php/acl_ins.php =================================================================== --- trunk/php/acl_ins.php 2013-05-19 14:12:59 UTC (rev 1065) +++ trunk/php/acl_ins.php 2013-05-21 07:28:04 UTC (rev 1066) @@ -115,6 +115,9 @@ if ( isset($_POST['feature']) ) { $feature = $_POST['feature']; + if (!is_numeric($feature)) { + $msg = addLine($msg, 'Unknown feature'); + } foreach ($tutos[modules] as $m => $ma) { if (isset($ma['perm']) && $ma['perm'] == $feature ) { $ma['id'] = $m; @@ -129,75 +132,93 @@ $dbconn->Begin("WORK"); foreach (array_reverse($obj) as $val) { if ( ! $keep ) { - feature_unset($val->acl, $feature); + $val->acl_feature_unset($feature); } if ( isset($_POST['N']) ) { // set the read ok feature bit foreach ( $_POST['N'] as $f ) { - acl_raise_bit($val, $f, $feature, PERM_NEW); + $val->acl_raise_bit($f, $feature, PERM_NEW); } } if ( isset($_POST['R']) ) { // set the read ok feature bit foreach ( $_POST['R'] as $f ) { - acl_raise_bit($val, $f, $feature, PERM_SEE); + $val->acl_raise_bit($f, $feature, PERM_SEE); } } if ( isset($_POST['r']) ) { foreach ( $_POST['r'] as $f ) { - acl_raise($val, $f, $tutos[seeok]); + $val->acl_raise($f, $tutos[seeok]); } } if ( isset($_POST['u']) ) { foreach ( $_POST['u'] as $f ) { - acl_raise($val, $f, $tutos[useok]); + $val->acl_raise($f, $tutos[useok]); } } if ( isset($_POST['m']) ) { foreach ( $_POST['m'] as $f ) { - acl_raise($val, $f, $tutos[modok]); + $val->acl_raise($f, $tutos[modok]); } } if ( isset($_POST['d']) ) { foreach ( $_POST['d'] as $f ) { - acl_raise($val, $f, $tutos[delok]); + $val->acl_raise($f, $tutos[delok]); } } // check for named additions (ajax selected) "add_r" "add_u" ... if (isset($_POST['add_rid'])) { - acl_raise($val, $_POST['add_rid'], $tutos[seeok]); + $val->acl_raise($_POST['add_rid'], $tutos[seeok]); } else if (isset($_POST['add_rfn'])) { $m = check_field($_POST['add_rfn'], 'add_rfn', 'add_rl', 'at'); if ( is_object($m) ) { - acl_raise($val, $m->ida, $tutos[seeok]); + $val->acl_raise($m->ida, $tutos[seeok]); } } if (isset($_POST['add_uid'])) { - acl_raise($val, $_POST['add_uid'], $tutos[useok]); + $val->acl_raise($_POST['add_uid'], $tutos[useok]); } else if (isset($_POST['add_ufn'])) { $m = check_field($_POST['add_ufn'], 'add_ufn', 'add_ul', 'at'); if ( is_object($m) ) { - acl_raise($val, $m->ida, $tutos[useok]); + $val->acl_raise($m->ida, $tutos[useok]); } } if (isset($_POST['add_mid'])) { - acl_raise($val, $_POST['add_mid'], $tutos[modok]); + $val->acl_raise($_POST['add_mid'], $tutos[modok]); } else if (isset($_POST['add_mfn'])) { $m = check_field($_POST['add_mfn'], 'add_mfn', 'add_ml', 'at'); if ( is_object($m) ) { - acl_raise($val, $m->ida, $tutos[modok]); + $val->acl_raise($m->ida, $tutos[modok]); } } if (isset($_POST['add_did'])) { - acl_raise($val, $_POST['add_did'], $tutos[delok]); + $val->acl_raise($_POST['add_did'], $tutos[delok]); } else if (isset($_POST['add_dfn'])) { $m = check_field($_POST['add_dfn'], 'add_dfn', 'add_dl', 'at'); if ( is_object($m) ) { - acl_raise($val, $m->ida, $tutos[delok]); + $val->acl_raise($m->ida, $tutos[delok]); } } + // FEATURE + if (isset($_POST['add_Rid'])) { + $val->acl_raise_bit($_POST['add_Rid'], $feature, PERM_SEE); + } else if (isset($_POST['add_Rfn'])) { + $m = check_field($_POST['add_Rfn'], 'add_Rfn', 'add_Rl', 'at'); + if ( is_object($m) ) { + $val->acl_raise_bit($m->ida, $feature, PERM_SEE); + } + } + if (isset($_POST['add_Nid'])) { + $val->acl_raise_bit($_POST['add_Nid'], $feature, PERM_NEW); + } else if (isset($_POST['add_Nfn'])) { + $m = check_field($_POST['add_Nfn'], 'add_Nfn', 'add_Nl', 'at'); + if ( is_object($m) ) { + $val->acl_raise_bit($m->ida, $feature, PERM_NEW); + } + } + // per object config if ($feature != 0) { $x = $feature_info[name]; Modified: trunk/php/base.pinc =================================================================== --- trunk/php/base.pinc 2013-05-19 14:12:59 UTC (rev 1065) +++ trunk/php/base.pinc 2013-05-21 07:28:04 UTC (rev 1066) @@ -579,6 +579,13 @@ } /** + * raise a feature bit + */ + Function acl_raise_bit($adr_id,$feature,$value) { + return acl_raise_bit($this,$adr_id,$feature,$value); + } + + /** * set permissions */ function acl_set($id, $perm) { @@ -610,6 +617,16 @@ } /** + * remove permissions for a given feature + */ + function acl_feature_unset($feature) { + if (isset($this->acl[$feature])) { + unset($this->acl[$feature]); + $this->acl_write = true; + } + } + + /** * check if a given feature is available for * the given user on this object * Modified: trunk/php/scrum/scrum.pinc =================================================================== --- trunk/php/scrum/scrum.pinc 2013-05-19 14:12:59 UTC (rev 1065) +++ trunk/php/scrum/scrum.pinc 2013-05-21 07:28:04 UTC (rev 1066) @@ -242,7 +242,7 @@ $r = $this->setIntField('state',$value,'ScrumLogState'); if ($r) { - feature_unset($this->acl,usetimetrack); + $this->acl_feature_unset(usetimetrack); // handle permissions if (($value == SCRUMLOGSTATE_DONE) || ($value == SCRUMLOGSTATE_MISSED)) acl_raise_bit($this,NOBODY,usetimetrack,PERM_NEW); Modified: trunk/php/testmanager/testrun_new.php =================================================================== --- trunk/php/testmanager/testrun_new.php 2013-05-19 14:12:59 UTC (rev 1065) +++ trunk/php/testmanager/testrun_new.php 2013-05-21 07:28:04 UTC (rev 1066) @@ -225,7 +225,7 @@ if ($this->mode == 'run') { $this->name = $lang['TestrunRun']; if(!$this->obj->use_ok()) { - $msg = addLine($msg,sprintf($lang['Err0001'],$lang[$this->obj->getType()])); + $msg = addLine($msg,sprintf($lang['Err0001'],$lang[$this->obj->getType()],$this->obj->getFullName())); $this->stop = true; return; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2013-05-19 14:13:02
|
Revision: 1065 http://sourceforge.net/p/tutos/code/1065 Author: gokohnert Date: 2013-05-19 14:12:59 +0000 (Sun, 19 May 2013) Log Message: ----------- more check Modified Paths: -------------- trunk/php/graphs.pinc Modified: trunk/php/graphs.pinc =================================================================== --- trunk/php/graphs.pinc 2013-05-19 08:41:13 UTC (rev 1064) +++ trunk/php/graphs.pinc 2013-05-19 14:12:59 UTC (rev 1065) @@ -38,15 +38,17 @@ $colors1 = ''; $colors2 = ''; $pre = ''; - foreach($a['data'] as $e) { - $data.= $pre.'['; - $data .= '"'.addslashes($e['title']).' ('.$e['val'].')'; - $data .= '",'.$e['cnt']; - $data.= ']'; - if (isset($e['color'])) { - $colors1 .= $pre.'"'.$e['color'].'"'; + if (isset($a['data'])) { + foreach($a['data'] as $e) { + $data.= $pre.'['; + $data .= '"'.addslashes($e['title']).' ('.$e['val'].')'; + $data .= '",'.$e['cnt']; + $data.= ']'; + if (isset($e['color'])) { + $colors1 .= $pre.'"'.$e['color'].'"'; + } + $pre = ','; } - $pre = ','; } $data.= ']'; if ($colors1 != "") { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2013-05-19 08:41:15
|
Revision: 1064 http://sourceforge.net/p/tutos/code/1064 Author: gokohnert Date: 2013-05-19 08:41:13 +0000 (Sun, 19 May 2013) Log Message: ----------- smaller graph Modified Paths: -------------- trunk/php/graphs.pinc Modified: trunk/php/graphs.pinc =================================================================== --- trunk/php/graphs.pinc 2013-05-19 08:18:44 UTC (rev 1063) +++ trunk/php/graphs.pinc 2013-05-19 08:41:13 UTC (rev 1064) @@ -291,7 +291,7 @@ $tutos['js_to_load'][] = '/html/js/plugins/jqplot.pointLabels.min.js'; $tutos['js_to_load'][] = '/html/js/plugins/jqplot.categoryAxisRenderer.min.js'; $tutos['css_to_load'][] = '/html/css/jquery.jqplot.min.css'; - $r .= '<div id="line'.$id.'" style="height:'.(GB_HEIGHT*1.5).'px;width:'.(GB_WIDTH*1.5).'px; "></div>'; + $r .= '<div id="line'.$id.'" style="height:'.(GB_HEIGHT*1.5).'px;width:'.(GB_WIDTH*1).'px; "></div>'; $options = " title:'".$a['title']."'"; $data = '['; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2013-05-19 08:18:47
|
Revision: 1063 http://sourceforge.net/p/tutos/code/1063 Author: gokohnert Date: 2013-05-19 08:18:44 +0000 (Sun, 19 May 2013) Log Message: ----------- fix wrong formatting/parsing of negative hh:mm times Modified Paths: -------------- trunk/html/js/tutos.js trunk/php/Date.pinc trunk/php/webelements.p3 Modified: trunk/html/js/tutos.js =================================================================== --- trunk/html/js/tutos.js 2013-05-18 14:36:11 UTC (rev 1062) +++ trunk/html/js/tutos.js 2013-05-19 08:18:44 UTC (rev 1063) @@ -158,7 +158,7 @@ /** * check input while typing */ - var RE_TIMEVOL_1 = /^[0-9]*:[0-9]{1,2}$/; + var RE_TIMEVOL_1 = /^[+-]{0,1}[0-9]*:[0-9]{1,2}$/; var RE_FLOAT_1 = /^[+]{0,1}([0-9]+|[0-9]*,[0-9]*)*$/; var RE_FLOAT_2 = /^[+]{0,1}([0-9]+|[0-9]*.[0-9]*)*$/; var RE_FLOAT_3 = /^[+-]{0,1}([0-9]+|[0-9]*,[0-9]*)*$/; Modified: trunk/php/Date.pinc =================================================================== --- trunk/php/Date.pinc 2013-05-18 14:36:11 UTC (rev 1062) +++ trunk/php/Date.pinc 2013-05-19 08:18:44 UTC (rev 1063) @@ -18,10 +18,12 @@ */ function hour_format($hours) { if ( ! is_numeric($hours) ) return; + $neg = ($hours < 0); + $hours = abs($hours); $hours = round($hours,3); $h = floor($hours); $m = 60.0 * ($hours - $h); - return $h .":".sprintf("%02.0f",$m); + return ($neg ? '-':'').$h .":".sprintf("%02.0f",$m); } /** @@ -152,7 +154,7 @@ $day = Date("d-m",$t); $day2 = Date("d-m-Y",$t); -# We need the easter date for some calculation + // We need the easter date for some calculation $J = Date("Y",$t); $a = $J % 19; $b = $J % 4; @@ -656,9 +658,9 @@ if ( $this->checkDMY() == false) { $this->setNoTime(); } -# settype($this->day,"integer"); -# settype($this->month,"integer"); -# settype($this->year,"integer"); + # settype($this->day,"integer"); + # settype($this->month,"integer"); + # settype($this->year,"integer"); $this->ts_def = $this->ts; if ( ($current_user->offset != 0) && ($notz == 0) ) { @@ -701,7 +703,7 @@ * */ function setDateTime($str,$notz = 0) { - global $current_user , $tutos, $message; + global $current_user , $tutos; if ( ! isset ($str) ) return; if ( empty ($str) ) return; @@ -818,9 +820,8 @@ $this->format = 17; } else { - echo ( "<br />DT: Unknown DateTimeFormat <span class=\"warn\">". $str ."</span> fix it in Date.pinc or register a DB specific format<br />"); + dterror_log ("DT: Unknown DateTimeFormat ". $str ." fix it in Date.pinc or register a DB specific format\n",3,$tutos[errlog]); $this->setNoTime(); -# FATAL_Error('DT:',$str); return; } @@ -1313,8 +1314,7 @@ $diff = $y - $x; return ';VALUE=DATE-TIME:'.strftime("%Y%m%dT%H%M%SZ",$x - $diff); - -# return sprintf ("%04d%02d%02dT%02d%02d%02dZ",$this->year,$this->month,$this->day,$this->hour,$this->min,$this->sec); + // return sprintf ("%04d%02d%02dT%02d%02d%02dZ",$this->year,$this->month,$this->day,$this->hour,$this->min,$this->sec); } function lessthan( &$DateObj ) { Modified: trunk/php/webelements.p3 =================================================================== --- trunk/php/webelements.p3 2013-05-18 14:36:11 UTC (rev 1062) +++ trunk/php/webelements.p3 2013-05-19 08:18:44 UTC (rev 1063) @@ -1352,8 +1352,12 @@ if ($allowempty && empty($value)) { return true; } - if ( preg_match( "#^([0-9]*):([0-5][0-9])$#im", $value, $regs )) { - $value = ($regs[1] * 60 + $regs[2]) / 60; + if ( preg_match( "#^([+-]{0,1}[0-9]*):([0-5][0-9])$#im", $value, $regs )) { + $neg = ($regs[1] < 0); + $value = (abs($regs[1]) * 60 + $regs[2]) / 60; + if ($neg) { + $value = -1 * $value; + } return true; } return false; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2013-05-18 14:36:20
|
Revision: 1062 http://sourceforge.net/p/tutos/code/1062 Author: gokohnert Date: 2013-05-18 14:36:11 +0000 (Sat, 18 May 2013) Log Message: ----------- acl handling in base class / sorting of teammembers / cleanups and typos Modified Paths: -------------- trunk/Makefile trunk/php/acl.pinc trunk/php/acl_new.php trunk/php/address.pinc trunk/php/appointment.pinc trunk/php/base.pinc trunk/php/bugtracking/bug.pinc trunk/php/checklist/checkfield.pinc trunk/php/checklist/checklist.pinc trunk/php/company.pinc trunk/php/config_default.pinc trunk/php/database.pinc trunk/php/db/db.pinc trunk/php/department.pinc trunk/php/doctracker/doctracker.pinc trunk/php/expense/expense.pinc trunk/php/file/file.pinc trunk/php/google_api/gapi_init.php trunk/php/group/group.pinc trunk/php/history_show.php trunk/php/installation/installation.pinc trunk/php/invoice/invoice.pinc trunk/php/layout/theme_blue.pinc trunk/php/layout/theme_white.pinc trunk/php/location.pinc trunk/php/login.pinc trunk/php/mailbox/mailbox.pinc trunk/php/module_template/AAA.pinc trunk/php/module_template/AAA_overview.php trunk/php/note/note.pinc trunk/php/permission.p3 trunk/php/product.pinc trunk/php/rate/rate.pinc trunk/php/reminder/reminder.pinc trunk/php/report-engine/report_show.php trunk/php/resource/resource.pinc trunk/php/rss/rss.pinc trunk/php/rss/rss_ins.php trunk/php/scrum/scrum.pinc trunk/php/scrum/sprint_show.php trunk/php/stc/stc.pinc trunk/php/stuff/stuff.pinc trunk/php/subversion/svn.pinc trunk/php/subversion/svn_new.php trunk/php/team.pinc trunk/php/team_new.php trunk/php/testmanager/testcase_new.php trunk/php/testmanager/testcase_show.php trunk/php/testmanager/testmanager.pinc trunk/php/testmanager/testrun_overview.php trunk/php/timetrack/timetrack.pinc trunk/php/url/url.pinc trunk/php/user.pinc trunk/test.sh trunk/upload.sh Added Paths: ----------- trunk/html/white/ trunk/html/white/delete.gif Modified: trunk/Makefile =================================================================== --- trunk/Makefile 2013-05-16 12:10:30 UTC (rev 1061) +++ trunk/Makefile 2013-05-18 14:36:11 UTC (rev 1062) @@ -44,6 +44,8 @@ $(PHP_RES_HLP) \ $(PHP_TT) \ $(PHP_TT_HLP) \ + $(PHP_EXPENSE) \ + $(PHP_EXPENSE_HLP) \ $(PHP_FILE) \ $(PHP_FILE_HLP) \ $(PHP_WATCH) \ @@ -66,8 +68,6 @@ $(PHP_COUNTER) \ $(PHP_COUNTER_HLP) \ $(PHP_REPORT_ALL) \ - $(PHP_EXPENSE) \ - $(PHP_EXPENSE_HLP) \ $(HDL_EMAIL) \ $(LIBS_BASE) \ $(LIBS_EXCEL) \ @@ -79,6 +79,27 @@ $(LIBS_PHPBARCODE) \ $(LIBS_GOOGLE) +PHP_MODS = \ + $(PHP_CHECKLIST) \ + $(PHP_CHECKLIST_HLP) \ + $(PHP_DOCTRACKER) \ + $(PHP_DOCTRACKER_HLP) \ + $(PHP_LDAP) \ + $(PHP_LDAP_HLP) \ + ${PHP_RSS} \ + ${PHP_RSS_HLP} \ + $(PHP_SCRUM) \ + $(PHP_SCRUM_HLP) \ + $(PHP_STUFF) \ + $(PHP_STUFF_HLP) \ + $(PHP_SUBVERSION) \ + $(PHP_SUBVERSION_HLP) \ + $(PHP_SUBVERSION_TPL) \ + $(PHP_TESTMANAGER) \ + $(PHP_TESTMANAGER_HLP) \ + $(PHP_TICKER) \ + $(PHP_TICKER_HLP) + SUBDIRS = localization admin bugtracking checklist counter doctracker expense file group installation invoice ldap mailbox module_template note palm phpweather rate reminder report-engine resource rss scrum subversion stc stuff timetrack testmanager ticker url watchlist xml PHP_TOP = $(wildcard php/*.php) \ @@ -114,6 +135,15 @@ php/bugtracking/templates/README \ $(wildcard php/bugtracking/templates/*.proto.*) +# Checklist Module (add-on) +PHP_CHECKLIST = $(wildcard php/checklist/*.php) \ + php/checklist/README \ + php/checklist/.htaccess \ + $(wildcard php/checklist/*.p3) \ + $(wildcard php/checklist/*.pinc) +PHP_CHECKLIST_HLP = php/checklist/help/.htaccess \ + $(wildcard php/checklist/help/*.html) + # Counter Module PHP_COUNTER = $(wildcard php/counter/*.php) \ php/counter/.htaccess \ @@ -123,6 +153,36 @@ PHP_COUNTER_HLP = php/counter/help/.htaccess \ $(wildcard php/counter/help/*.html) +# Doctracker Module (add-on) +PHP_DOCTRACKER = $(wildcard php/doctracker/*.php) \ + $(wildcard php/doctracker/*.p3) \ + $(wildcard php/doctracker/*.pinc) \ + $(wildcard php/report-engine/rep_doccheck/*php) \ + $(wildcard php/report-engine/rep_doccheck/*pinc) \ + $(wildcard php/report-engine/rep_doccheck/*p3) \ + php/doctracker/.htaccess \ + php/doctracker/README +PHP_DOCTRACKER_HLP = + +# Drawboard Module (add-on) +PHP_DRAWBOARD = $(wildcard php/drawboard/*.php) \ + $(wildcard php/drawboard/*.p3) \ + $(wildcard php/drawboard/*.pinc) \ + php/drawboard/.htaccess \ + php/drawboard/README \ + libs/drawboard/TUTOS-README \ + libs/drawboard/runserver.sh +PHP_DRAWBOARD_HLP = + +# Expense Module +PHP_EXPENSE = $(wildcard php/expense/*.php) \ + $(wildcard php/expense/*.p3) \ + $(wildcard php/expense/*.pinc) \ + php/expense/.htaccess \ + php/expense/README +PHP_EXPENSE_HLP = \ + php/expense/help/.htaccess + # Docmanagement Module PHP_FILE = $(wildcard php/file/*.php) \ php/file/.htaccess \ @@ -161,6 +221,15 @@ $(wildcard php/layout/*.p3) \ $(wildcard php/layout/*.pinc) +# LDAP Module (add-on) +PHP_LDAP = $(wildcard php/ldap/*.php) \ + php/ldap/README \ + php/ldap/.htaccess \ + $(wildcard php/ldap/*.p3) \ + $(wildcard php/ldap/*.pinc) +PHP_LDAP_HLP = php/ldap/help/.htaccess \ + $(wildcard php/ldap/help/*.html) + # Mailbox Module PHP_MBOX = $(wildcard php/mailbox/*.php) \ php/mailbox/.htaccess \ @@ -207,6 +276,15 @@ PHP_RATE_HLP = $(wildcard php/rate/help/*.html) \ php/rate/help/.htaccess +# RSS Feed Module (add-on) +PHP_RSS = $(wildcard php/rss/*.php) \ + $(wildcard php/rss/*.p3) \ + $(wildcard php/rss/*.pinc) \ + php/rss/.htaccess \ + php/rss/README +PHP_RSS_HLP = php/rss/help/.htaccess \ + $(wildcard php/rss/help/*.html) + # STC State Transition Control Module PHP_STC = $(wildcard php/stc/*.php) \ php/stc/.htaccess \ @@ -215,6 +293,65 @@ PHP_STC_HLP = php/stc/help/.htaccess \ $(wildcard php/stc/help/*.html) +# Scrum Module (add-on) +PHP_SCRUM = $(wildcard php/scrum/*.php) \ + $(wildcard php/scrum/*.p3) \ + $(wildcard php/scrum/*.pinc) \ + $(wildcard php/scrum/*.js) \ + $(wildcard php/scrum/*.css) \ + php/scrum/.htaccess \ + php/scrum/README +PHP_SCRUM_HLP = php/scrum/help/.htaccess \ + $(wildcard php/scrum/help/*.html) + +# Stuff Module (add-on) +PHP_STUFF = $(wildcard php/stuff/*.php) \ + $(wildcard php/stuff/*.p3) \ + $(wildcard php/stuff/*.pinc) \ + php/stuff/.htaccess \ + php/stuff/README +PHP_STUFF_HLP = php/stuff/help/.htaccess \ + $(wildcard php/stuff/help/*.html) + +# Subversion Module (add-on) +PHP_SUBVERSION = $(wildcard php/subversion/*.php) \ + $(wildcard php/subversion/*.p3) \ + $(wildcard php/subversion/*.pinc) \ + $(wildcard php/report-engine/rep_subversion/*.pinc) \ + $(wildcard php/report-engine/rep_subversion/*.p3) \ + php/report-engine/rep_subversion/config_default.php \ + php/subversion/.htaccess \ + php/subversion/README +PHP_SUBVERSION_HLP = php/subversion/help/.htaccess \ + php/report-engine/rep_subversion/README \ + $(wildcard php/subversion/help/*.html) +PHP_SUBVERSION_TPL = php/subversion/templates/.htaccess \ + php/report-engine/rep_subversion/templates/pre-commit \ + php/report-engine/rep_subversion/templates/post-commit \ + php/report-engine/rep_subversion/templates/%PROJECT%.URL \ + php/subversion/templates/*.proto.en \ + php/subversion/templates/*.proto.de + +# Testmanager Module (add-on) +PHP_TESTMANAGER = $(wildcard php/testmanager/*.php) \ + $(wildcard php/testmanager/*.p3) \ + $(wildcard php/testmanager/*.pinc) \ + php/testmanager/testmanager.js \ + php/testmanager/default.css \ + php/testmanager/.htaccess \ + php/testmanager/README +PHP_TESTMANAGER_HLP = php/testmanager/help/.htaccess \ + $(wildcard php/testmanager/help/*.html) + +# Ticker Module (add-on) +PHP_TICKER = $(wildcard php/ticker/*.php) \ + $(wildcard php/ticker/*.p3) \ + $(wildcard php/ticker/*.pinc) \ + php/ticker/.htaccess \ + php/ticker/README +PHP_TICKER_HLP = php/ticker/help/.htaccess \ + $(wildcard php/ticker/help/*.html) + # Timetrack Module PHP_TT = $(wildcard php/timetrack/*.php) \ php/timetrack/.htaccess \ @@ -335,9 +472,6 @@ LIBS_FREEMIND = \ libs/freemind/TUTOS-README -LIBS_DRAWBOARD = \ - libs/drawboard/TUTOS-README \ - libs/drawboard/runserver.sh LIBS_JPGRAPH = \ libs/jpgraph/TUTOS-README @@ -353,6 +487,7 @@ LANGFILES = \ php/localization/cs.p3 \ php/localization/de.p3 \ + php/localization/de-ch.p3 \ php/localization/el.p3 \ php/localization/en.p3 \ php/localization/en-us.p3 \ @@ -360,8 +495,11 @@ php/localization/es.p3 \ php/localization/es-mx.p3 \ php/localization/es-ni.p3 \ + php/localization/es-ve.p3 \ php/localization/fr.p3 \ + php/localization/hu.p3 \ php/localization/it.p3 \ + php/localization/ja.p3 \ php/localization/ko.p3 \ php/localization/nl.p3 \ php/localization/pl.p3 \ @@ -390,11 +528,7 @@ html/new_layout.css \ html/new2_layout.css \ html/classic_layout.css \ - html/nuke.css \ - html/red.css \ - html/blue.css \ - html/tutos.css \ - html/white.css + html/tutos.css TOPFILES = \ apache.conf \ @@ -409,14 +543,6 @@ shellfunc.sh \ createdb.sh - -THEMEBLUE = \ - $(wildcard html/blue/*gif) \ - $(wildcard html/blue/*png) -THEMERED = \ - $(wildcard html/red/*gif) \ - $(wildcard html/red/*png) - OTHERHP = \ homepage/.htaccess \ homepage/install.html \ @@ -468,8 +594,28 @@ html/js/plugins/jqplot.pieRenderer.min.js \ html/js/plugins/jqplot.pointLabels.min.js \ +THEMEBLUE = \ + html/blue.css \ + $(wildcard html/blue/*gif) \ + $(wildcard html/blue/*png) +THEMEWHITE = \ + html/white.css \ + $(wildcard html/white/*gif) \ + $(wildcard html/white/*png) +THEMERED = \ + html/red.css \ + $(wildcard html/red/*gif) \ + $(wildcard html/red/*png) + +THEMENUKE = README.nuke \ + html/nuke.css \ + $(wildcard html/nuke/*gif) \ + $(wildcard html/nuke/*png) + + OTHERH= $(TEMPLATES) \ $(THEMEBLUE) \ + $(THEMEWHITE) \ $(THEMENUKE) \ $(THEMERED) \ $(HTMLPICS) \ @@ -547,37 +693,6 @@ $(OTHERH) \ $(OTHERHP) -# -# Extrafiles (not part of the release but we need to know about) -# -EXTRAFILES = \ - ${THEMESQLI} \ - ${THEMEVISUAL} \ - ${LANG_CA} \ - ${LANG_HU} \ - ${LANG_JA} \ - ${LANG_PT} \ - ${LANG_ES-VE} \ - ${PHP_CHECKLIST} \ - ${PHP_CHECKLIST_HLP} \ - ${PHP_DRAWBOARD} \ - ${PHP_DRAWBOARD_HLP} \ - ${PHP_PALM} \ - ${PHP_PALM_HLP} \ - ${PHP_RSS} \ - ${PHP_RSS_HLP} \ - ${PHP_TICKER} \ - ${PHP_TICKER_HLP} \ - ${PHP_REQ} \ - ${PHP_RISK} \ - ${HDL_CIA} \ - ${HDL_MAP} \ - ${HDL_FAX} \ - ${HDL_SMS} \ - ${HDL_WEATHER} \ - ${HDL_SIPGATE} \ - ${HDL_ISBN} - # Edited for Debian GNU/Linux. DESTDIR = @@ -587,7 +702,6 @@ TARGETDIR = $(DESTDIR)$(REALPATH) UPLOADDIR = $(DESTDIR)$(REPOSITORY) -PERL = $(shell which perl) INSTALL = $(shell which install) SED = $(shell which sed) CHMOD = $(shell which chmod) @@ -602,7 +716,7 @@ HOST = $(shell hostname) INSTALLARGS = -.PHONY: all clean distclean tutos.spec apache.conf +.PHONY: all clean tutos.spec apache.conf .SUFFIXES: .sig .sgml .spec .conf @@ -629,9 +743,6 @@ -@$(RM) -f l.* *.list -@$(FIND) . -type f -name "*~" | $(XARGS) $(RM) -f -distclean: clean - -$(RM) config.log config.status config.cache apache.conf - # # Update the config.pinc with the Release Date # @@ -648,12 +759,6 @@ @$(CHMOD) 777 tutos_private/repository @$(CHMOD) 777 tutos_private/session # -# create a backup file with all neccessary files -# -backup: ${PHP} ${LANGFILES} ${OTHER} ${OTHERJ} ${HOMEP} ${HELP} ${EXTRAFILES} - tar cvjf tutos-all.tar.bz2 ${PHP} ${OTHER} ${OTHERJ} ${HOMEP} ${HELP} ${LANGFILES} ${EXTRAFILES} do-it - -# # PHP Release # # php.list: ${PHP} ${LANGFILES} ${OTHER} ${HELP} updateconfig @@ -664,7 +769,7 @@ @$(foreach d,${PHP} ${LANGFILES} ${OTHER} ${HELP}, \ echo $(d) >> tmp.$@; \ ) - @cat tmp.$@ | grep -v "custom.p3" | grep -v "ja.p3" | grep -v "pt.p3" | grep -v "hu.p3" | grep -v "ca.p3"| grep -v "es-ve.p3" | grep -v "php/config.pinc" | grep -v "php/config.php" | grep -v "table_custom.pinc" | grep -v "php/hooks.php" | grep -v "php/test.*.php" | sort -u > $@ + @cat tmp.$@ | grep -v "custom.p3" | grep -v "php/config.pinc" | grep -v "php/config.php" | grep -v "table_custom.pinc" | grep -v "php/hooks.php" | grep -v "php/test.*.php" | sort -u > $@ download-php: php.list additional @tar -T php.list --no-recursion -cjf TUTOS-php-${FULLVERSION}.tar.bz2 @@ -709,6 +814,19 @@ wget -O ${TESTPATH}/test3.html "http://${HOST}/tutos-test/php/admin/scheme.php?id=0&step=3" # +# install +# +install: updateconfig + @$(RM) -f tmp.$@ + @$(TOUCH) tmp.$@ + @$(foreach d,${PHP} ${LANGFILES} ${OTHER} ${HELP} , \ + echo $(DESTDIR)/usr/share/tutos/$(d) >> tmp.$@; \ + ) + @$(foreach d,${PHP_MODS} ${HDL_CIA} ${HDL_MAP} ${HDL_FAX} ${HDL_SMS} ${HDL_WEATHER} ${HDL_SIPGATE} ${HDL_ISBN}, \ + echo $(DESTDIR)/usr/share/tutos/$(d) >> tmp.$@; \ + ) + +# # RPM Release # rpm-php: tutos.spec download-php @@ -719,7 +837,7 @@ # # Check the CSS files for missing definitions # -cssdiff: ${CSSFILES} +cssdiff: cat html/tutos.css | egrep "{" > css.tutos cat html/blue.css | egrep "{" > css.blue cat html/red.css | egrep "{" > css.red @@ -780,24 +898,19 @@ # # additional: \ - catalan.zip \ - checklist.zip \ - doctracker.zip \ - drawboard.zip \ - hungarian.zip \ - japanese.zip \ - ldap.zip \ mod_template.zip \ - portuguese.zip \ - rssfeed.zip \ - scrum.zip \ - stuff.zip \ sqli.zip \ - subversion.zip \ - testmanager.zip \ - ticker.zip \ - venezuela.zip \ visual.zip \ + checklist \ + doctracker \ + drawboard \ + ldap \ + rss \ + scrum \ + stuff \ + subversion \ + testmanager \ + ticker \ HDL_cia_factbook.zip \ HDL_google_earth.zip \ HDL_fax.zip \ @@ -813,129 +926,15 @@ # palm.zip \ # -THEMENUKE = README.nuke \ - html/nuke.css \ - $(wildcard html/nuke/*gif) \ - $(wildcard html/nuke/*png) - # # -# MODULE Creation +# MODULE Creation (add-on) # # -# Checklist Module (nonstandard , need extra download) -PHP_CHECKLIST = $(wildcard php/checklist/*.php) \ - php/checklist/README \ - php/checklist/.htaccess \ - $(wildcard php/checklist/help/*.html) \ - $(wildcard php/checklist/*.p3) \ - $(wildcard php/checklist/*.pinc) -PHP_CHECKLIST_HLP = php/checklist/help/.htaccess \ - $(wildcard php/checklist/help/*.html) -checklist.zip: $(PHP_CHECKLIST) $(PHP_CHECKLIST_HLP) - @$(ECHO) "# Make Filelist for $@" - @$(RM) -f checklist.list - @$(TOUCH) checklist.list - @$(foreach d,$(PHP_CHECKLIST), \ - echo $(d) >> checklist.list; \ - ) - @$(foreach d,$(PHP_CHECKLIST_HLP), \ - echo $(d) >> checklist.list; \ - ) - cat checklist.list | $(ZIP) $(ZIPARGS) -@ $@ - @$(MV) checklist.zip TUTOS-MODULE-checklist-${FULLVERSION}.zip - -# Doctracker Module (nonstandard , need extra download) -PHP_DOCTRACKER = $(wildcard php/doctracker/*.php) \ - $(wildcard php/doctracker/*.p3) \ - $(wildcard php/doctracker/*.pinc) \ - $(wildcard php/report-engine/rep_doccheck/*php) \ - $(wildcard php/report-engine/rep_doccheck/*pinc) \ - $(wildcard php/report-engine/rep_doccheck/*p3) \ - php/doctracker/.htaccess \ - php/doctracker/README -PHP_DOCTRACKER_HLP = - -doctracker.zip: $(PHP_DOCTRACKER) - @$(ECHO) "# Make Filelist for $@" - @$(RM) -f doctracker.list - @$(TOUCH) doctracker.list - @$(foreach d,$(PHP_DOCTRACKER), \ - echo $(d) >> doctracker.list; \ - ) - cat doctracker.list | $(ZIP) $(ZIPARGS) -@ $@ - @$(ZIP) $@ -z < php/doctracker/README - @$(MV) doctracker.zip TUTOS-MODULE-doctracker-${FULLVERSION}.zip - -# Drawboard Module (nonstandard , need extra download) -PHP_DRAWBOARD = $(wildcard php/drawboard/*.php) \ - $(wildcard php/drawboard/*.p3) \ - $(wildcard php/drawboard/*.pinc) \ - php/drawboard/.htaccess \ - php/drawboard/README \ - $(LIBS_DRAWBOARD) -PHP_DRAWBOARD_HLP = - -drawboard.zip: $(PHP_DRAWBOARD) - @$(ECHO) "# Make Filelist for $@" - @$(RM) -f drawboard.list - @$(TOUCH) drawboard.list - @$(foreach d,$(PHP_DRAWBOARD), \ - echo $(d) >> drawboard.list; \ - ) - cat drawboard.list | $(ZIP) $(ZIPARGS) -@ $@ - @$(ZIP) $@ -z < php/drawboard/README - @$(MV) drawboard.zip TUTOS-MODULE-drawboard-${FULLVERSION}.zip - -# Expense Module (nonstandard , need extra download) -PHP_EXPENSE = $(wildcard php/expense/*.php) \ - $(wildcard php/expense/*.p3) \ - $(wildcard php/expense/*.pinc) \ - php/expense/.htaccess \ - php/expense/README -PHP_EXPENSE_HLP = \ - php/expense/help/.htaccess - -expense.zip: $(PHP_EXPENSE) $(PHP_EXPENSE_HLP) - @$(ECHO) "# Make Filelist for $@" - @$(RM) -f expense.list - @$(TOUCH) expense.list - @$(foreach d,$(PHP_EXPENSE), \ - echo $(d) >> expense.list; \ - ) - @$(foreach d,$(PHP_EXPENSE_HLP), \ - echo $(d) >> ldap.list; \ - ) - cat expense.list | $(ZIP) $(ZIPARGS) -@ $@ - @$(MV) expense.zip TUTOS-MODULE-expense-${FULLVERSION}.zip - -# LDAP Module (nonstandard , need extra download) -PHP_LDAP = $(wildcard php/ldap/*.php) \ - php/ldap/README \ - php/ldap/.htaccess \ - $(wildcard php/ldap/*.p3) \ - $(wildcard php/ldap/*.pinc) -PHP_LDAP_HLP = php/ldap/help/.htaccess \ - $(wildcard php/ldap/help/*.html) - -ldap.zip: $(PHP_LDAP) $(PHP_LDAP_HLP) - @$(ECHO) "# Make Filelist for $@" - @$(RM) -f ldap.list - @$(TOUCH) ldap.list - @$(foreach d,$(PHP_LDAP), \ - echo $(d) >> ldap.list; \ - ) - @$(foreach d,$(PHP_LDAP_HLP), \ - echo $(d) >> ldap.list; \ - ) - cat ldap.list | $(ZIP) $(ZIPARGS) -@ $@ - @$(MV) ldap.zip TUTOS-MODULE-ldap-${FULLVERSION}.zip - - # Palm Module (nonstandard , need extra download, outdated ) PHP_PALM = $(wildcard php/palm/*.php) \ $(wildcard php/palm/*.p3) \ @@ -958,159 +957,106 @@ cat palm.list | $(ZIP) $(ZIPARGS) -@ $@ @$(MV) palm.zip TUTOS-MODULE-palm-${FULLVERSION}.zip -# RSS Feed Module (nonstandard , need extra download) -PHP_RSS = $(wildcard php/rss/*.php) \ - $(wildcard php/rss/*.p3) \ - $(wildcard php/rss/*.pinc) \ - php/rss/.htaccess \ - php/rss/README -PHP_RSS_HLP = php/rss/help/.htaccess \ - $(wildcard php/rss/help/*.html) -rssfeed.zip: $(PHP_RSS) $(PHP_RSS_HLP) +checklist: $(PHP_CHECKLIST) $(PHP_CHECKLIST_HLP) @$(ECHO) "# Make Filelist for $@" - @$(RM) -f rssfeed.list - @$(TOUCH) rssfeed.list - @$(foreach d,$(PHP_RSS), \ - echo $(d) >>rssfeed.list; \ + @$(RM) -f $@.list + @$(TOUCH) $@.list + @$(foreach d,$(PHP_CHECKLIST) $(PHP_CHECKLIST_HLP), \ + echo $(d) >> $@.list; \ ) - @$(foreach d,$(PHP_RSS_HLP), \ - echo $(d) >>rssfeed.list; \ + cat $@.list | $(ZIP) $(ZIPARGS) -@ TUTOS-MODULE-$@-${FULLVERSION}.zip + $(ZIP) -z TUTOS-MODULE-$@-${FULLVERSION}.zip < php/$@/README + +doctracker: $(PHP_DOCTRACKER) $(PHP_DOCTRACKER_HLP) + @$(ECHO) "# Make Filelist for $@" + @$(RM) -f $@.list + @$(TOUCH) $@.list + @$(foreach d,$(PHP_DOCTRACKER) $(PHP_DOCTRACKER_HLP), \ + echo $(d) >> $@.list; \ ) - cat rssfeed.list | $(ZIP) $(ZIPARGS) -@ $@ - @$(MV) rssfeed.zip TUTOS-MODULE-rssfeed-${FULLVERSION}.zip + cat $@.list | $(ZIP) $(ZIPARGS) -@ TUTOS-MODULE-$@-${FULLVERSION}.zip + $(ZIP) -z TUTOS-MODULE-$@-${FULLVERSION}.zip < php/$@/README -# Scrum Module (nonstandard , need extra download) -PHP_SCRUM = $(wildcard php/scrum/*.php) \ - $(wildcard php/scrum/*.p3) \ - $(wildcard php/scrum/*.pinc) \ - $(wildcard php/scrum/*.js) \ - $(wildcard php/scrum/*.css) \ - php/scrum/.htaccess \ - php/scrum/README -PHP_SCRUM_HLP = php/scrum/help/.htaccess \ - $(wildcard php/scrum/help/*.html) +drawboard: $(PHP_DRAWBOARD) $(PHP_DRAWBOARD_HLP) + @$(ECHO) "# Make Filelist for $@" + @$(RM) -f $@.list + @$(TOUCH) $@.list + @$(foreach d,$(PHP_DRAWBOARD) $(PHP_DRAWBOARD_HLP), \ + echo $(d) >> $@.list; \ + ) + cat $@.list | $(ZIP) $(ZIPARGS) -@ TUTOS-MODULE-$@-${FULLVERSION}.zip + $(ZIP) -z TUTOS-MODULE-$@-${FULLVERSION}.zip < php/$@/README -scrum.zip: $(PHP_SCRUM) $(PHP_SCRUM_HLP) +ldap: $(PHP_LDAP) $(PHP_LDAP_HLP) @$(ECHO) "# Make Filelist for $@" - @$(RM) -f scrum.list - @$(TOUCH) scrum.list - @$(foreach d,$(PHP_SCRUM), \ - echo $(d) >> scrum.list; \ + @$(RM) -f $@.list + @$(TOUCH) $@.list + @$(foreach d,$(PHP_LDAP) $(PHP_LDAP_HLP), \ + echo $(d) >> $@.list; \ ) - @$(foreach d,$(PHP_SCRUM_HLP), \ - echo $(d) >> scrum.list; \ + cat $@.list | $(ZIP) $(ZIPARGS) -@ TUTOS-MODULE-$@-${FULLVERSION}.zip + $(ZIP) -z TUTOS-MODULE-$@-${FULLVERSION}.zip < php/$@/README + +rss: $(PHP_RSS) $(PHP_RSS_HLP) + @$(ECHO) "# Make Filelist for $@" + @$(RM) -f $@.list + @$(TOUCH) $@.list + @$(foreach d,$(PHP_RSS) $(PHP_RSS_HLP), \ + echo $(d) >> $@.list; \ ) - cat scrum.list | $(ZIP) $(ZIPARGS) -@ $@ - @$(ZIP) $@ -z < php/scrum/README - @$(MV) scrum.zip TUTOS-MODULE-scrum-${FULLVERSION}.zip + cat $@.list | $(ZIP) $(ZIPARGS) -@ TUTOS-MODULE-$@-${FULLVERSION}.zip + $(ZIP) -z TUTOS-MODULE-$@-${FULLVERSION}.zip < php/$@/README -# Stuff Module (nonstandard , need extra download) -PHP_STUFF = $(wildcard php/stuff/*.php) \ - $(wildcard php/stuff/*.p3) \ - $(wildcard php/stuff/*.pinc) \ - php/stuff/.htaccess \ - php/stuff/README -PHP_STUFF_HLP = php/stuff/help/.htaccess \ - $(wildcard php/stuff/help/*.html) +scrum: $(PHP_SCRUM) $(PHP_SCRUM_HLP) + @$(ECHO) "# Make Filelist for $@" + @$(RM) -f $@.list + @$(TOUCH) $@.list + @$(foreach d,$(PHP_SCRUM) $(PHP_SCRUM_HLP) , \ + echo $(d) >> $@.list; \ + ) + cat $@.list | $(ZIP) $(ZIPARGS) -@ TUTOS-MODULE-$@-${FULLVERSION}.zip + $(ZIP) -z TUTOS-MODULE-$@-${FULLVERSION}.zip < php/$@/README -stuff.zip: $(PHP_STUFF) $(PHP_STUFF_HLP) +stuff: $(PHP_STUFF) $(PHP_STUFF_HLP) @$(ECHO) "# Make Filelist for $@" - @$(RM) -f stuff.list - @$(TOUCH) stuff.list - @$(foreach d,$(PHP_STUFF), \ - echo $(d) >> stuff.list; \ + @$(RM) -f $@.list + @$(TOUCH) $@.list + @$(foreach d,$(PHP_STUFF) $(PHP_STUFF_HLP) , \ + echo $(d) >> $@.list; \ ) - @$(foreach d,$(PHP_STUFF_HLP), \ - echo $(d) >> stuff.list; \ - ) - cat stuff.list | $(ZIP) $(ZIPARGS) -@ $@ - @$(ZIP) $@ -z < php/stuff/README - @$(MV) stuff.zip TUTOS-MODULE-stuff-${FULLVERSION}.zip + cat $@.list | $(ZIP) $(ZIPARGS) -@ TUTOS-MODULE-$@-${FULLVERSION}.zip + $(ZIP) -z TUTOS-MODULE-$@-${FULLVERSION}.zip < php/$@/README - -# Subversion Module (nonstandard , need extra download) -PHP_SUBVERSION = $(wildcard php/subversion/*.php) \ - $(wildcard php/subversion/*.p3) \ - $(wildcard php/subversion/*.pinc) \ - $(wildcard php/report-engine/rep_subversion/*.pinc) \ - $(wildcard php/report-engine/rep_subversion/*.p3) \ - php/report-engine/rep_subversion/config_default.php \ - php/subversion/.htaccess \ - php/subversion/README -PHP_SUBVERSION_HLP = php/subversion/help/.htaccess \ - php/report-engine/rep_subversion/README \ - $(wildcard php/subversion/help/*.html) -PHP_SUBVERSION_TPL = php/subversion/templates/.htaccess \ - php/report-engine/rep_subversion/templates/pre-commit \ - php/report-engine/rep_subversion/templates/post-commit \ - php/report-engine/rep_subversion/templates/%PROJECT%.URL \ - php/subversion/templates/*.proto.en \ - php/subversion/templates/*.proto.de - -subversion.zip: $(PHP_SUBVERSION) $(PHP_SUBVERSION_HLP) $(PHP_SUBVERSION_TPL) +subversion: $(PHP_SUBVERSION) $(PHP_SUBVERSION_HLP) $(PHP_SUBVERSION_TPL) @$(ECHO) "# Make Filelist for $@" - @$(RM) -f subversion.list - @$(TOUCH) subversion.list - @$(foreach d,$(PHP_SUBVERSION), \ - echo $(d) >> subversion.list; \ + @$(RM) -f $@.list + @$(TOUCH) $@.list + @$(foreach d,$(PHP_SUBVERSION) $(PHP_SUBVERSION_HLP) $(PHP_SUBVERSION_TPL), \ + echo $(d) >> $@.list; \ ) - @$(foreach d,$(PHP_SUBVERSION_HLP), \ - echo $(d) >> subversion.list; \ - ) - @$(foreach d,$(PHP_SUBVERSION_TPL), \ - echo $(d) >> subversion.list; \ - ) - cat subversion.list | $(ZIP) $(ZIPARGS) -@ $@ - @$(ZIP) $@ -z < php/subversion/README - @$(MV) subversion.zip TUTOS-MODULE-subversion-${FULLVERSION}.zip + cat $@.list | $(ZIP) $(ZIPARGS) -@ TUTOS-MODULE-$@-${FULLVERSION}.zip + $(ZIP) -z TUTOS-MODULE-$@-${FULLVERSION}.zip < php/$@/README - -# Testmanager Module (nonstandard , need extra download) -PHP_TESTMANAGER = $(wildcard php/testmanager/*.php) \ - $(wildcard php/testmanager/*.p3) \ - $(wildcard php/testmanager/*.pinc) \ - php/testmanager/testmanager.js \ - php/testmanager/default.css \ - php/testmanager/.htaccess \ - php/testmanager/README -PHP_TESTMANAGER_HLP = php/testmanager/help/.htaccess \ - $(wildcard php/testmanager/help/*.html) - -testmanager.zip: $(PHP_TESTMANAGER) $(PHP_TESTMANAGER_HLP) +testmanager: $(PHP_TESTMANAGER) $(PHP_TESTMANAGER_HLP) @$(ECHO) "# Make Filelist for $@" - @$(RM) -f testmanager.list - @$(TOUCH) testmanager.list - @$(foreach d,$(PHP_TESTMANAGER), \ - echo $(d) >> testmanager.list; \ + @$(RM) -f $@.list + @$(TOUCH) $@.list + @$(foreach d,$(PHP_TESTMANAGER) $(PHP_TESTMANAGER_HLP) , \ + echo $(d) >> $@.list; \ ) - @$(foreach d,$(PHP_TESTMANAGER_HLP), \ - echo $(d) >> testmanager.list; \ - ) - cat testmanager.list | $(ZIP) $(ZIPARGS) -@ $@ - @$(MV) testmanager.zip TUTOS-MODULE-testmanager-${FULLVERSION}.zip + cat $@.list | $(ZIP) $(ZIPARGS) -@ TUTOS-MODULE-$@-${FULLVERSION}.zip + $(ZIP) -z TUTOS-MODULE-$@-${FULLVERSION}.zip < php/$@/README -# Ticker Module (nonstandard , need extra download) -PHP_TICKER = $(wildcard php/ticker/*.php) \ - $(wildcard php/ticker/*.p3) \ - $(wildcard php/ticker/*.pinc) \ - php/ticker/.htaccess \ - php/ticker/README -PHP_TICKER_HLP = php/ticker/help/.htaccess \ - $(wildcard php/ticker/help/*.html) - -ticker.zip: $(PHP_TICKER) $(PHP_TICKER_HLP) +ticker: $(PHP_TICKER) $(PHP_TICKER_HLP) @$(ECHO) "# Make Filelist for $@" - @$(RM) -f ticker.list - @$(TOUCH) ticker.list - @$(foreach d,$(PHP_TICKER), \ - echo $(d) >> ticker.list; \ + @$(RM) -f $@.list + @$(TOUCH) $@.list + @$(foreach d,$(PHP_TICKER) $(PHP_TICKER_HLP), \ + echo $(d) >> $@.list; \ ) - @$(foreach d,$(PHP_TICKER_HLP), \ - echo $(d) >> ticker.list; \ - ) - cat ticker.list | $(ZIP) $(ZIPARGS) -@ $@ - @$(MV) ticker.zip TUTOS-MODULE-ticker-${FULLVERSION}.zip + cat $@.list | $(ZIP) $(ZIPARGS) -@ TUTOS-MODULE-$@-${FULLVERSION}.zip + $(ZIP) -z TUTOS-MODULE-$@-${FULLVERSION}.zip < php/$@/README # template Module PHP_MODTEMPLATE = $(wildcard php/module_template/*.php) \ @@ -1417,93 +1363,4 @@ @$(ZIP) $@ -z < README.visual @$(MV) visual.zip TUTOS-THEME-visual-${FULLVERSION}.zip -# -# -# LANGUAGE Creation -# -# - -LANG_CA = README.ca \ - $(wildcard php/*/ca.p3) \ - $(wildcard html/help/*_ca.html) \ - $(wildcard html/*.proto.ca) - -catalan.zip: $(LANG_CA) - @$(ECHO) "# Make Filelist for $@" - @$(RM) -f ca.list - @$(TOUCH) ca.list - @$(foreach d,$(LANG_CA), \ - echo $(d) >> ca.list; \ - ) - cat ca.list | $(ZIP) $(ZIPARGS) -@ $@ - @$(ZIP) $@ -z < README.ca - @$(MV) catalan.zip TUTOS-LANG-catalan-${FULLVERSION}.zip - -LANG_HU = README.hu \ - $(wildcard php/*/hu.p3) \ - $(wildcard html/help/*_hu.html) \ - $(wildcard html/*.proto.hu) - -hungarian.zip: $(LANG_HU) - @$(ECHO) "# Make Filelist for $@" - @$(RM) -f hu.list - @$(TOUCH) hu.list - @$(foreach d,$(LANG_HU), \ - echo $(d) >> hu.list; \ - ) - cat hu.list | $(ZIP) $(ZIPARGS) -@ $@ - @$(ZIP) $@ -z < README.hu - @$(MV) hungarian.zip TUTOS-LANG-hungarian-${FULLVERSION}.zip - -LANG_JA = README.ja \ - $(wildcard php/*/ja.p3) \ - $(wildcard html/help/*_ja.html) \ - $(wildcard html/*.proto.ja) - -japanese.zip: $(LANG_JA) - @$(ECHO) "# Make Filelist for $@" - @$(RM) -f ja.list - @$(TOUCH) ja.list - @$(foreach d,$(LANG_JA), \ - echo $(d) >> ja.list; \ - ) - cat ja.list | $(ZIP) $(ZIPARGS) -@ $@ - @$(ZIP) $@ -z < README.ja - @$(MV) japanese.zip TUTOS-LANG-japanese-${FULLVERSION}.zip - -LANG_PT = README.pt \ - $(wildcard php/*/pt.p3) \ - $(wildcard html/help/*_pt.html) \ - $(wildcard html/*.proto.pt) - -portuguese.zip: $(LANG_PT) - @$(ECHO) "# Make Filelist for $@" - @$(RM) -f pt.list - @$(TOUCH) pt.list - @$(foreach d,$(LANG_PT), \ - echo $(d) >> pt.list; \ - ) - cat pt.list | $(ZIP) $(ZIPARGS) -@ $@ - @$(ZIP) $@ -z < README.pt - @$(MV) portuguese.zip TUTOS-LANG-portuguese-${FULLVERSION}.zip - -LANG_ES-VE = README.es-ve \ - $(wildcard php/*/es-ve.p3) \ - php/localization/holiday_es_ve.pinc \ - $(wildcard html/help/*_es-ve.html) \ - $(wildcard html/*.proto.es-ve) - -venezuela.zip: $(LANG_ES-VE) - @$(ECHO) "# Make Filelist for $@" - @$(RM) -f es-ve.list - @$(TOUCH) es-ve.list - @$(foreach d,$(LANG_ES-VE), \ - echo $(d) >> es-ve.list; \ - ) - cat es-ve.list | $(ZIP) $(ZIPARGS) -@ $@ - @$(ZIP) $@ -z < README.es-ve - @$(MV) venezuela.zip TUTOS-LANG-venezuela-${FULLVERSION}.zip - - - # EOF Added: trunk/html/white/delete.gif =================================================================== (Binary files differ) Index: trunk/html/white/delete.gif =================================================================== --- trunk/html/white/delete.gif 2013-05-16 12:10:30 UTC (rev 1061) +++ trunk/html/white/delete.gif 2013-05-18 14:36:11 UTC (rev 1062) Property changes on: trunk/html/white/delete.gif ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +image/gif \ No newline at end of property Modified: trunk/php/acl.pinc =================================================================== --- trunk/php/acl.pinc 2013-05-16 12:10:30 UTC (rev 1061) +++ trunk/php/acl.pinc 2013-05-18 14:36:11 UTC (rev 1062) @@ -34,9 +34,11 @@ * adr = current_user or so * obj = the object that will get the default rights */ -Function acl_default(&$obj,&$adr) { +Function acl_default(tutos_base $obj,tutos_base $adr) { global $tutos; + $obj->acl_write = true; + $obj->acl[0][EVERYBODY] = 0; acl_raise($obj,$adr->id,$tutos[delok]); @@ -86,12 +88,15 @@ /** * read acl entries for an object */ -Function acl_read(tutos_base &$obj) { +Function acl_read(tutos_base $obj) { global $tutos,$g_hash,$table; + if ($obj->noacl) return; if ($obj->acl_read) return; - $obj->acl_read = true; + $obj->acl_read = true; + $obj->acl_write = false; + if ($obj->noacl) return; if ( $obj->gettype() == "user" ) { @@ -139,9 +144,9 @@ } $a = 0; while ($a < $n) { - $perm = (int)$res->get($a, 'perm'); + $perm = $res->getInt($a, 'perm'); if ( $perm > 0 ) { - $obj->acl[0][(int)$res->get($a, 'adr_id')] = $perm; + $obj->acl[0][$res->getInt($a, 'adr_id')] = $perm; } $a++; } @@ -171,17 +176,15 @@ } $a = 0; while ($a < $n) { - $perm = (int)$res->get($a, 'perm'); - $feature = (int)$res->get($a, 'feature'); - $adr_id = (int)$res->get($a, 'adr_id'); + $perm = $res->getInt($a, 'perm'); + $feature = $res->getInt($a, 'feature'); + $adr_id = $res->getInt($a, 'adr_id'); $obj->acl[$feature][$adr_id] = $perm; $a++; } - $res->free(); - if($tutos['use_memcache']) { $tutos['memcache']->set($memid,$obj->acl,0,$tutos['timetolive']*60); $g_hash['fail3']++; @@ -205,6 +208,14 @@ } if ( $id < 0 ) return; + if (!$obj->acl_write) { + // dterror_log('no need to save acl data for: '.$obj."\r\n",3,$tutos[errlog]); + return; + } else { + // dterror_log('save acl data for: '.$obj."\r\n",3,$tutos[errlog]); + } + $obj->acl_write = false; + $q = 'DELETE FROM '. $obj->dbconn->prefix .$table['acl'][name].' WHERE obj_id = '. $id; $res = $obj->dbconn->Exec($q); $res->free(); @@ -249,7 +260,7 @@ /** * delete acl entries for a object to be deleted */ -Function acl_delete_obj(tutos_base &$obj) { +Function acl_delete_obj(tutos_base $obj) { global $tutos,$table; if ( $obj->id < 0 ) return; @@ -283,7 +294,7 @@ * read defaultacl entries for an object * to be used with $tutos[defaultacl] = 2 */ -Function acl_readdefault(tutos_base &$obj) { +Function acl_readdefault(tutos_base $obj) { global $tutos,$table; if ( $obj->gettype() != "user" ) return; @@ -304,7 +315,7 @@ } $a = 0; while ($a < $n) { - $obj->acldefault[(integer)$res->get($a, 'adr_id')] = $res->get($a, 'perm'); + $obj->acldefault[$res->getInt($a, 'adr_id')] = $res->getInt($a, 'perm'); $a++; } $res->free(); @@ -315,7 +326,7 @@ * save acldefault entries for an object * to be used with $tutos[defaultacl] = 2 */ -Function acl_savedefault(tutos_base &$obj) { +Function acl_savedefault(tutos_base $obj) { global $table; if ( $obj->gettype() != "user" ) return; @@ -340,7 +351,7 @@ * delete acldefault entries for a object to be deleted * to be used with $tutos[defaultacl] = 2 */ -Function acl_deletedefault(tutos_base &$obj) { +Function acl_deletedefault(tutos_base $obj) { global $table; $msg = ''; @@ -354,7 +365,7 @@ /** * check access level ( > $level ) to an object */ -Function acl_ok(tutos_base &$obj,$level) { +Function acl_ok(tutos_base $obj,$level) { global $tutos,$current_user; if ( ($tutos[useacl] != 1) || $current_user->isAdmin()) { @@ -419,35 +430,33 @@ /** * check show access ( > 0 ) to an object */ -Function acl_see_ok(tutos_base &$obj) { +Function acl_see_ok(tutos_base $obj) { global $tutos; // if no permissions are defined the see is ok if (isset($obj->acl[0]) && (count($obj->acl[0]) > 0) ) { return acl_ok($obj,$tutos[seeok] -1); - } else { - return $tutos[seeok]; } + return $tutos[seeok]; } /** * check use access to an object */ -Function acl_use_ok(tutos_base &$obj) { +Function acl_use_ok(tutos_base $obj) { global $tutos; // if no permissions are defined the use is ok if (isset($obj->acl[0]) && (count($obj->acl[0]) > 0) ) { return acl_ok($obj,$tutos[useok] -1); - } else { - return $tutos[useok]; } + return $tutos[useok]; } /** * check modification access ( > 9 ) to an object */ -Function acl_mod_ok(tutos_base &$obj) { +Function acl_mod_ok(tutos_base $obj) { global $tutos; return acl_ok($obj,$tutos[modok] -1); @@ -456,7 +465,7 @@ /** * check deletion access ( > 19 ) to an object */ -Function acl_del_ok(tutos_base &$obj) { +Function acl_del_ok(tutos_base $obj) { global $tutos; return acl_ok($obj,$tutos[delok] -1); @@ -465,46 +474,51 @@ /** * raise a feature bit */ -Function acl_raise_bit(tutos_base &$obj,$adr_id,$feature,$value) { +Function acl_raise_bit(tutos_base $obj,$adr_id,$feature,$value) { if (! isset ($obj->acl[$feature][$adr_id])) { $obj->acl[$feature][$adr_id] = 0; } $obj->acl[$feature][$adr_id] |= $value; + $obj->acl_write = true; } /** * raise the permissions to given level if below */ -Function acl_raise(tutos_base &$obj,$adr_id,$level) { +Function acl_raise(tutos_base $obj,$adr_id,$level) { if (! isset ($obj->acl[0][$adr_id]) || ($obj->acl[0][$adr_id] < $level) ) { $obj->acl[0][$adr_id] = $level; } + $obj->acl_write = true; } /** * lower a feature bit */ -Function acl_lower_bit(tutos_base &$obj,$adr_id,$feature,$value) { +Function acl_lower_bit(tutos_base $obj,$adr_id,$feature,$value) { if (! isset ($obj->acl[$feature][$adr_id])) { $obj->acl[$feature][$adr_id] = 0; } $obj->acl[$feature][$adr_id] ^= $value; + $obj->acl_write = true; } /** * lower the permissions to given level if above */ -Function acl_lower(tutos_base &$obj,$adr_id,$level) { +Function acl_lower(tutos_base $obj,$adr_id,$level) { if (! isset ($obj->acl[0][$adr_id]) || ($obj->acl[0][$adr_id] > $level) ) { $obj->acl[0][$adr_id] = $level; } + $obj->acl_write = true; } /** * set the permissions to given level */ -Function acl_set(tutos_base &$obj,$adr_id,$level) { +Function acl_set(tutos_base $obj,$adr_id,$level) { $obj->acl[0][$adr_id] = $level; + $obj->acl_write = true; } /** @@ -795,18 +809,4 @@ return $url; } -/** - * copy acl of another object - * nofeatures == true is "do not copy feature bits" - */ -function copy_acl(tutos_base $obj,$nofeatures = false) { - $acl = array(); - if (!isset($obj->acl)) return $acl; - - foreach ($obj->acl as $i => $p) { - if (($i == 0) || ($nofeatures = false)) - $acl[$i] = $p; - } - return $acl; -} ?> \ No newline at end of file Modified: trunk/php/acl_new.php =================================================================== --- trunk/php/acl_new.php 2013-05-16 12:10:30 UTC (rev 1061) +++ trunk/php/acl_new.php 2013-05-18 14:36:11 UTC (rev 1062) @@ -20,11 +20,39 @@ loadmodules('acl','new'); loadlayout(); + /** * display and change permissions */ class Acl_new extends layout { /** + * sort selection list + */ + function acl_sort($a,$b) { + $ac = 3; + $bc = 3; + if (isset($this->user->t_parties[$a])) { + $ac = 2; + } + if (isset($this->user->a_parties[$a])) { + $ac = 1; + } + if (isset($this->user->t_parties[$b])) { + $bc = 2; + } + if (isset($this->user->a_parties[$b])) { + $bc = 1; + } + if ($ac != $bc) { + return $ac > $bc; + } + if ($this->user->parties[$a] == $this->user->parties[$b]) { + return 0; + } + return $this->user->parties[$a] > $this->user->parties[$b]; + } + + /** * sort menuentries */ function menusort($a,$b) { @@ -317,6 +345,9 @@ } } + // sort the stuff + uksort ($this->user->parties,array('acl_new','acl_sort')); + $r .= '<form action="'.$l.'" method="GET">'; $r .= $lang['Feature'].':<select name="feature">'; uasort($tutos[activemodules],array('Acl_new','menusort')); @@ -417,4 +448,4 @@ <!-- SVN Info $Id$ $Author$ ---> +--> \ No newline at end of file Modified: trunk/php/address.pinc =================================================================== --- trunk/php/address.pinc 2013-05-16 12:10:30 UTC (rev 1061) +++ trunk/php/address.pinc 2013-05-18 14:36:11 UTC (rev 1062) @@ -36,10 +36,6 @@ $this->init($dbconn,Tutos_address::getType()); - if (!isset($this->f_name)) { - print_r($this); - FATAL_Error('nix'); - } $this->larray = array(); $this->birthday = new TUTOS_Date_Time(0); $this->location = array(); @@ -255,7 +251,7 @@ */ function getFullname() { global $lang; - if ( $this->m_name != "") { + if ( $this->m_name != '') { return sprintf($lang['AdrFormat1'],$this->f_name, $this->m_name ,$this->l_name); } else { return sprintf($lang['AdrFormat2'],$this->f_name, $this->l_name); @@ -326,28 +322,28 @@ * set the title */ function setTitle($new) { - return $this->setStrField("title",$new,"AdrTitle"); + return $this->setStrField('title',$new,'AdrTitle'); } /** * set the first name */ function setFName($value) { - return $this->setStrField("f_name",$value,"AdrFirstName"); + return $this->setStrField('f_name',$value,'AdrFirstName'); } /** * set the last name */ function setLName($value) { - return $this->setStrField("l_name",$value,"AdrLastName"); + return $this->setStrField('l_name',$value,'AdrLastName'); } /** * set the middle name */ function setMName($value) { - return $this->setStrField("m_name",$value,"AdrMiddleName"); + return $this->setStrField('m_name',$value,'AdrMiddleName'); } /** @@ -358,7 +354,7 @@ $b = $name->getYYYYMMDD(); if ( $a != $b ) { - $this->modified[] = array ( "field" => "AdrBirthday", "old" => $a , "new" => $b ); + $this->modified[] = array ( 'field' => 'AdrBirthday', 'old' => $a , 'new' => $b ); $this->birthday = $name; } return; @@ -391,7 +387,7 @@ /* Get an new ID */ $this->id = $q->addFV('id',-1,'NEXTID'); // Defaut Access Control - acl_default($this,$current_user); + $this->acl_default(); acl_raise($this, EVERYBODY, $tutos[useok]); acl_raise($this,$this->id,$tutos[modok]); @@ -440,16 +436,16 @@ if ( ! $this->rl2 ) { $this->read_locs_data(); }; - $e = ""; + $e = ''; if ( isset($this->locall) ) { foreach($this->locall as $i => $f) { - if ( $f->email_1 != "") { + if ( $f->email_1 != '') { $e = $f->email_1; if ( $f->category == 2 ) { return $e; } - } elseif ( $f->email_2 != "" ) { + } elseif ( $f->email_2 != '' ) { $e = $f->email_1; if ( $f->category == 2 ) { return $e; @@ -467,16 +463,16 @@ if ( ! $this->rl2 ) { $this->read_locs_data(); }; - $e = ""; + $e = ''; if ( isset($this->locall) ) { foreach($this->locall as $i => $f) { - if ( $f->phone_1 != "") { + if ( $f->phone_1 != '') { $e = $f->phone_1; if ( $f->category == 2 ) { return $e; } - } elseif ( $f->phone_2 != "" ) { + } elseif ( $f->phone_2 != '' ) { $e = $f->phone_2; if ( $f->category == 2 ) { return $e; @@ -494,9 +490,9 @@ if ( isset($this->location) && count($this->location) > 0 ) { @reset($this->location); list ($j,$l) = @each ($this->location); - $url = "address_new.php?id=". $this->id ."&loc_id=". $l->id; + $url = 'address_new.php?id='. $this->id .'&loc_id='. $l->id; } else { - $url = "address_new.php?id=". $this->id; + $url = 'address_new.php?id='. $this->id; } if (isset($_REQUEST['ss'])) { return addUrlParameter($url,'ss='.$_REQUEST['ss']); @@ -508,7 +504,7 @@ * Return a URL to delete this address */ function getDelURL() { - return "address_del.php?id=". $this->id; + return 'address_del.php?id='. $this->id; } /** Modified: trunk/php/appointment.pinc =================================================================== --- trunk/php/appointment.pinc 2013-05-16 12:10:30 UTC (rev 1061) +++ trunk/php/appointment.pinc 2013-05-18 14:36:11 UTC (rev 1062) @@ -864,21 +864,21 @@ // Manage the permissions $this->acl = array(); if ( $this->mod_allow == CAL_MODPRIV ) { - acl_raise($this,$this->creator->id,$tutos[delok]); - acl_raise($this,$this->getObjectGroupId(2),$tutos[delok]); + $this->acl_raise($this->creator->id,$tutos[delok]); + $this->acl_raise($this->getObjectGroupId(2),$tutos[delok]); } else if ( $this->mod_allow == CAL_MODUSER ) { - acl_default($this,$current_user); - acl_raise($this,$current_user->id,$tutos[delok]); + $this->acl_default(); + $this->acl_raise($current_user->id,$tutos[delok]); } else if ( $this->mod_allow == CAL_MODPART ) { - acl_default($this,$current_user); - acl_raise($this,$this->getObjectGroupId(2),$tutos[delok]); + $this->acl_default(); + $this->acl_raise($this->getObjectGroupId(2),$tutos[delok]); } else if ( $this->mod_allow == CAL_MODALL ) { - acl_default($this,$current_user); - acl_raise($this,$this->getObjectGroupId(2),$tutos[delok]); - acl_raise($this,0,$tutos[delok]); + $this->acl_default(); + $this->acl_raise($this->getObjectGroupId(2),$tutos[delok]); + $this->acl_raise(EVERYBODY,$tutos[delok]); } // Participants can (at least) SEE - acl_raise($this,$this->getObjectGroupId(2),$tutos[seeok]); + $this->acl_raise($this->getObjectGroupId(2),$tutos[seeok]); /* Now we add all references to the participants */ Modified: trunk/php/base.pinc =================================================================== --- trunk/php/base.pinc 2013-05-16 12:10:30 UTC (rev 1061) +++ trunk/php/base.pinc 2013-05-18 14:36:11 UTC (rev 1062) @@ -71,25 +71,23 @@ function init(tutos_db $dbconn = null,$sector = '') { global $current_user,$table,$tutos; - $this->id = -1; - $this->dbconn = $dbconn; - $this->creator = $current_user; - $this->creation = new TUTOS_Date_Time(); - $this->list = array(); - $this->acl[0] = array(); - $this->modified = array(); - $this->history = array(); - $this->neighbours = array(); - $this->relations = array(); + $this->id = -1; + $this->dbconn = $dbconn; + $this->creator = $current_user; + $this->creation = new TUTOS_Date_Time(); + $this->list = array(); + $this->acl[0] = array(); + $this->modified = array(); + $this->history = array(); + $this->neighbours = array(); + $this->relations = array(); $this->back_relations = array(); // just to know - $this->addrel = array(); // managing additons and deletions - $this->delrel = array(); // managing additons and deletions + $this->addrel = array(); // managing additons and deletions + $this->delrel = array(); // managing additons and deletions + $this->tablename = 'UNKNOWN'; + $this->tablename_hash = $table['objectids'][name]; + $this->tablename_rel = $table['objrel'][name]; - $this->tablename = 'UNKNOWN'; - - $this->tablename_hash = $table['objectids'][name]; - $this->tablename_rel = $table['objrel'][name]; - // needed for initializing overloaded classes if ($sector != '') { $this->sector = $sector; @@ -97,12 +95,10 @@ $this->sector = $this->gettype(); } - if (isset($current_user->id)) { - acl_set($this,$current_user->id,$tutos[modok]); - } + $this->acl_read = false; // flag to indicate that acl was read from DB or not + $this->acl_write = false; // flag to indicate that acl needs to be saved (was modified) + $this->noacl = false; // we use (i.e. read and write) acls for this object - $this->acl_read = false; // flag to indicate that acl was read from DB or not - $this->noacl = false; // we use (i.e. read and write) acls for this object // // initialize automatable database fields // @@ -111,6 +107,10 @@ // initialize custom database fields // $this->init_custom($this->sector); + + if (isset($current_user->id)) { + $this->acl_set($current_user->id,$tutos[modok]); + } } /** @@ -149,6 +149,7 @@ } } } + /** * initialize custom database fields */ @@ -297,7 +298,7 @@ function read_result (result $r, $pos ) { global $g_hash,$table; - $this->id = $r->get($pos, 'id'); + $this->id = $r->getInt($pos, 'id'); $this->creation = $r->getDateTime($pos, 'creation'); // @@ -308,8 +309,7 @@ // we have a real object so we reset the acl # $this->acl[0] = array(); - if ($this->noacl == false) - acl_read($this); + acl_read($this); // TODO: save description // read relations @@ -323,13 +323,13 @@ $n = $rr->numrows(); $a = 0; while ($a < $n) { - $o = $rr->get($a,'obj_id'); - $b = $rr->get($a,'rel_id'); + $o = $rr->getInt($a,'obj_id'); + $b = $rr->getInt($a,'rel_id'); if ($o == $this->id) { - $this->relations[$rr->get($a,'type_id')][$b] = 1; + $this->relations[$rr->getInt($a,'type_id')][$b] = 1; } if ($b == $this->id) { - $this->back_relations[$rr->get($a,'type_id')][$o] = 1; + $this->back_relations[$rr->getInt($a,'type_id')][$o] = 1; } $a++; } @@ -565,6 +565,51 @@ } /** + * manage default acl + */ + function acl_default() { + return acl_default($this,$this->creator); + } + + /** + * raise permissions + */ + function acl_raise($id, $perm) { + return acl_raise($this,$id,$perm); + } + + /** + * set permissions + */ + function acl_set($id, $perm) { + return acl_set($this,$id,$perm); + } + + /** + * save permissions + */ + function acl_save() { + return acl_save($this); + } + + /** + * copy acl of another object + * nofeatures == true is "do not copy feature bits" + */ + function copy_acl(tutos_base $from,$nofeatures = false) { + if (!isset($from->acl)) return; + if (!isset($this->acl)) { + $this->acl = array(); + } + foreach ($from->acl as $i => $p) { + if (($i == 0) || ($nofeatures == false)) + $this->acl[$i] = $p; + } + $this->acl_write = true; + return; + } + + /** * check if a given feature is available for * the given user on this object * @@ -1322,8 +1367,9 @@ $msg = addLine($msg,$x->obj_save($current_user,$this)); } - if ($this->noacl == false) - $msg = addLine($msg,acl_save($this)); + if ($this->noacl == false) { + $msg = addLine($msg,$this->acl_save()); + } $msg = addLine($msg,history_save($this)); // save generic relations @@ -1548,7 +1594,7 @@ function __toString() { global $lang; - return 'TUTOS Object:'.$lang[$this->getType()].' '.$this->getFullName().' (ID='.$this->id.')'; + return 'TUTOS Object:'.(isset($lang[$this->getType()]) ? $lang[$this->getType()]:'?? '.$this->getType()).' '.$this->getFullName().' (ID='.$this->id.')'; } /** @@ -1828,5 +1874,15 @@ return array($r,$o); } + + /** + * sort function for TUTOS objects + */ + static function obj_sort(tutos_base $a, tutos_base $b) { + $x = $a->getFullName(); + $y = $b->getFullName(); + if ($x == $y) return 0; + return ($x < $y) ? -1 : 1; + } } ?> \ No newline at end of file Modified: trunk/php/bugtracking/bug.pinc =================================================================== --- trunk/php/bugtracking/bug.pinc 2013-05-16 12:10:30 UTC (rev 1061) +++ trunk/php/bugtracking/bug.pinc 2013-05-18 14:36:11 UTC (rev 1062) @@ -378,18 +378,16 @@ $this->medium = 1; $this->plandate = new TUTOS_Date_Time(0); // planned solve date $this->solvedate = new TUTOS_Date_Time(0); // real solvedate - $this->tablename = $this->dbconn->prefix .$table['bugtracking'][name]; $this->tablename2 = $this->dbconn->prefix .$table['bug2'][name]; $this->tablename3 = $this->dbconn->prefix .$table['bug3'][name]; - acl_raise($this,$current_user->id,$tutos[modok]); - $this->bughist = array(); + $this->bughist = array(); + $this->lastmod = array(); + $this->nomail = false;; // sent no mail about current transaction - $this->lastmod = array(); - $this->nomail = false;; // sent no mail about current transaction - $this->lastrevision = ''; + $this->acl_raise($current_user->id,$tutos[modok]); $this->run_postinit_hook(); } @@ -1337,23 +1335,23 @@ } else { $this->id = $q->addFV("id",-1,"NEXTID"); - acl_default($this,$current_user); + $this->acl_default(); // Defaut Access Control inherit from parent - $this->acl = copy_acl($this->parent,true); + $this->copy_acl($this->parent,true); // solver may mod - acl_raise($this,$this->getObjectGroupId(2),$tutos[modok]); + $this->acl_raise($this->getObjectGroupId(2),$tutos[modok]); // reporter may use - acl_raise($this,$this->getObjectGroupId(3),$tutos[useok]); + $this->acl_raise($this->getObjectGroupId(3),$tutos[useok]); // all roles in a project - acl_raise($this,$this->getObjectGroupId(8),$tutos[useok]); + $this->acl_raise($this->getObjectGroupId(8),$tutos[useok]); if ( $this->parent->getType() == "product" ) { $this->parent->readroles(); // Set the permissions - acl_raise($this,$this->getObjectGroupId(10+PROD_ROLE_MANAGER),$tutos[modok]); - acl_raise($this,$this->getObjectGroupId(10+PROD_ROLE_MANAGER2),$tutos[modok]); - acl_raise($this,$this->getObjectGroupId(10+PROD_ROLE_SALES),$tutos[modok]); + $this->acl_raise($this->getObjectGroupId(10+PROD_ROLE_MANAGER),$tutos[modok]); + $this->acl_raise($this->getObjectGroupId(10+PROD_ROLE_MANAGER2),$tutos[modok]); + $this->acl_raise($this->getObjectGroupId(10+PROD_ROLE_SALES),$tutos[modok]); } @@ -1406,9 +1404,9 @@ if ( $this->parent->getType() == "product" ) { $this->parent->readroles(); // Set the permissions - acl_raise($this,$this->getObjectGroupId(10+PROD_ROLE_MANAGER),$tutos[modok]); - acl_raise($this,$this->getObjectGroupId(10+PROD_ROLE_MANAGER2),$tutos[modok]); - acl_raise($this,$this->getObjectGroupId(10+PROD_ROLE_SALES),$tutos[modok]); + $this->acl_raise($this->getObjectGroupId(10+PROD_ROLE_MANAGER),$tutos[modok]); + $this->acl_raise($this->getObjectGroupId(10+PROD_ROLE_MANAGER2),$tutos[modok]); + $this->acl_raise($this->getObjectGroupId(10+PROD_ROLE_SALES),$tutos[modok]); } // Save the additional desc Modified: trunk/php/checklist/checkfield.pinc =================================================================== --- trunk/php/checklist/checkfield.pinc 2013-05-16 12:10:30 UTC (rev 1061) +++ trunk/php/checklist/checkfield.pinc 2013-05-18 14:36:11 UTC (rev 1062) @@ -13,16 +13,16 @@ */ $tutos['files'][__FILE__] = '$Rev$'; -define("CF_TYPE_UNKNOWN" ,0); -define("CF_TYPE_TEXT" ,1); -define("CF_TYPE_CHECKBOX" ,2); -define("CF_TYPE_BOOL" ,3); -define("CF_TYPE_RANGE" ,4); -define("CF_TYPE_SCORE" ,5); -define("CF_TYPE_TRISTATE" ,6); -define("CF_TYPE_HEADLINE" ,7); +define('CF_TYPE_UNKNOWN' ,0); +define('CF_TYPE_TEXT' ,1); +define('CF_TYPE_CHECKBOX' ,2); +define('CF_TYPE_BOOL' ,3); +define('CF_TYPE_RANGE' ,4); +define('CF_TYPE_SCORE' ,5); +define('CF_TYPE_TRISTATE' ,6); +define('CF_TYPE_HEADLINE' ,7); -define("CF_TRISTATE_NOT_TESTED" ,99); +define('CF_TRISTATE_NOT_TESTED' ,99); /** */ function CheckfieldAskType ($default,$any) { @@ -68,24 +68,24 @@ * constructor */ function checkfield(tutos_db $dbconn) { - global $current_user; + global $current_user,$table; $this->init($dbconn); - $this->link_id = $current_user->id; - $this->tablename = $dbconn->prefix . "checkfields"; - $this->fid_in_class = -1; - $this->type = -1; - $this->value_n = 0; - $this->maxvalue = 4; - $this->comment = ''; + $this->link_id = $current_user->id; + $this->tablename = $dbconn->prefix .$table['checkfield'][name]; + $this->fid_in_class = -1; + $this->type = -1; + $this->value_n = 0; + $this->maxvalue = 4; + $this->comment = ''; $this->commentappendonly = false; /** comments will only be appended if true */ - $this->pos = -1; - $this->ref = null; - $this->value_t = ""; - $this->help_text = ""; - $this->modificator = $current_user; - $this->modification = new TUTOS_Date_Time(); - $this->name = ""; - $this->description = ""; + $this->pos = -1; + $this->ref = null; + $this->value_t = ''; + $this->help_text = ''; + $this->modificator = $current_user; + $this->modification = new TUTOS_Date_Time(); + $this->name = ''; + $this->description = ''; $this->run_postinit_hook(); } @@ -435,44 +435,44 @@ $q = new query($this->dbconn); $q->setTable($this->tablename); - $q->addFV("f_type",$this->type,"INT"); - $q->addFV("f_val_n",$this->value_n,"INT"); - $q->addFV("f_val_max",$this->maxvalue,"INT"); - $q->addFV("f_val_t",$this->value_t,"TEXT"); - $q->addFV("f_comment",$this->comment,"TEXT"); - $q->addFV("name",$this->name,"STRING",$table['checkfield']['name'][size]); - $q->addFV("text",$this->description,"TEXT"); - $q->addFV("help",$this->help_text,"TEXT"); - $q->addFV("cl_id",$this->link_id,"INT"); - $q->addFV("fidinclass",$this->fid_in_class,"INT"); - $q->addFV("modificator",$this->modificator,"OBJ"); - $q->addFV("modification",$this->modification,"DATETIME"); + $q->addFV('f_type',$this->type,'INT'); + $q->addFV('f_val_n',$this->value_n,'INT'); + $q->addFV('f_val_max',$this->maxvalue,'INT'); + $q->addFV('f_val_t',$this->value_t,'TEXT'); + $q->addFV('f_comment',$this->comment,'TEXT'); + $q->addFV('name',$this->name,'STRING',$table['checkfield']['name'][size]); + $q->addFV('text',$this->description,'TEXT'); + $q->addFV('help',$this->help_text,'TEXT'); + $q->addFV('cl_id',$this->link_id,'INT'); + $q->addFV('fidinclass',$this->fid_in_class,'INT'); + $q->addFV('modificator',$this->modificator,'OBJ'); + $q->addFV('modification',$this->modification,'DATETIME'); if ( $this->id < 0 ) { unset ($this->modified); if ( isset($this->newid) ) { $this->id = $this->newid; - $q->addFV("id",$this->id,""); - $q->addFV("f_pos",$this->pos,"INT"); + $q->addFV('id',$this->id,''); + $q->addFV('f_pos',$this->pos,'INT'); } else { - $this->id = $q->addFV("id",-1,"NEXTID"); - $q->addFV("f_pos",$this->id,"INT"); - acl_default($this,$current_user); - acl_raise($this,$this->creator->id,$tutos[delok]); + $this->id = $q->addFV('id',-1,'NEXTID'); + $q->addFV('f_pos',$this->id,'INT'); + $this->acl_default($current_user); + $this->acl_raise($this->creator->id,$tutos[delok]); unset ($this->modified); - $this->modified[] = array ( "field" => "created" , - "old" => $this->getType() , - "new" => $this->id, - "obj_id" => $this->id + $this->modified[] = array ( 'field' => 'created' , + 'old' => $this->getType() , + 'new' => $this->id, + 'obj_id' => $this->id ); } - $q->addFV("creator",$this->creator,"OBJ"); - $q->addFV("creation",$this->creation,"DATETIME"); + $q->addFV('creator',$this->creator,'OBJ'); + $q->addFV('creation',$this->creation,'DATETIME'); $query = $q->getInsert(); } else { - $q->addWC("id",$this->id,""); - $q->addFV("f_pos",$this->pos,"INT"); + $q->addWC('id',$this->id,''); + $q->addFV('f_pos',$this->pos,'INT'); $query = $q->getUpdate(); } @@ -528,7 +528,7 @@ * get the type of object */ static function getType () { - return "checkfield"; + return 'checkfield'; } /** * get the type id of obje... [truncated message content] |
From: <gok...@us...> - 2013-05-16 12:10:33
|
Revision: 1061 http://sourceforge.net/p/tutos/code/1061 Author: gokohnert Date: 2013-05-16 12:10:30 +0000 (Thu, 16 May 2013) Log Message: ----------- fix Modified Paths: -------------- trunk/php/testmanager/testsuite_show.php Modified: trunk/php/testmanager/testsuite_show.php =================================================================== --- trunk/php/testmanager/testsuite_show.php 2013-05-15 12:51:55 UTC (rev 1060) +++ trunk/php/testmanager/testsuite_show.php 2013-05-16 12:10:30 UTC (rev 1061) @@ -47,7 +47,6 @@ // Handle Updates $mod = array(); $mod2 = array(); // what to clear afterwards - FATAL_Error('A'); foreach ($_POST as $p => $q) { if (preg_match("/^NZP([0-9]*)t(.*)$/",$p,$regs)) { if ($q == '') continue; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |