tutos-commits Mailing List for TUTOS (Page 7)
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
|
From: <gok...@us...> - 2013-12-04 07:25:02
|
Revision: 1192 http://sourceforge.net/p/tutos/code/1192 Author: gokohnert Date: 2013-12-04 07:24:57 +0000 (Wed, 04 Dec 2013) Log Message: ----------- fix Modified Paths: -------------- trunk/php/product_contacts.php Modified: trunk/php/product_contacts.php =================================================================== --- trunk/php/product_contacts.php 2013-12-04 05:11:01 UTC (rev 1191) +++ trunk/php/product_contacts.php 2013-12-04 07:24:57 UTC (rev 1192) @@ -374,7 +374,7 @@ $this->format = "html"; return; } else if (!$this->obj->see_ok() ) { - $msg = aaddLine($msg,sprintf($lang['Err0022'],$lang[$this->obj->getType()])); + $msg = addLine($msg,sprintf($lang['Err0022'],$lang[$this->obj->getType()])); $this->stop = true; $this->format = "html"; return; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2013-12-04 05:11:05
|
Revision: 1191 http://sourceforge.net/p/tutos/code/1191 Author: gokohnert Date: 2013-12-04 05:11:01 +0000 (Wed, 04 Dec 2013) Log Message: ----------- fix Modified Paths: -------------- trunk/php/address_tools.p3 Modified: trunk/php/address_tools.p3 =================================================================== --- trunk/php/address_tools.p3 2013-12-03 14:11:45 UTC (rev 1190) +++ trunk/php/address_tools.p3 2013-12-04 05:11:01 UTC (rev 1191) @@ -167,7 +167,7 @@ * */ Function address_overview (layout $layout,$res,$target = "") { - global $lang, $tutos, $current_user; + global $lang, $tutos, $current_user,$msg,$info; $r = ''; $adr = array(); @@ -203,7 +203,7 @@ $n = count($adr); if ( 0 == $n) { - $r .= $this->error($lang['Err0048']); + $r .= $lang['Err0048']; return $r; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2013-12-03 14:11:48
|
Revision: 1190 http://sourceforge.net/p/tutos/code/1190 Author: gokohnert Date: 2013-12-03 14:11:45 +0000 (Tue, 03 Dec 2013) Log Message: ----------- visibility of custom fields for user teams Modified Paths: -------------- trunk/php/custom.pinc trunk/php/team.pinc Modified: trunk/php/custom.pinc =================================================================== --- trunk/php/custom.pinc 2013-12-02 20:50:30 UTC (rev 1189) +++ trunk/php/custom.pinc 2013-12-03 14:11:45 UTC (rev 1190) @@ -1612,12 +1612,17 @@ } /** - * check if a user is allowed to see a custom field + * check if a user or member of a team is allowed to see a custom field */ function custom_see_ok(array $tx,tutos_user $user) { if (!isset($tx['perm_see'])) return true; // default allows if (!is_array($tx['perm_see'])) return true; // default allows if (in_array($user->id,$tx['perm_see'])) return true; + // check teams + team::obj_read($user); + foreach ($user->teamlist as $i => $t) { + if (in_array($i,$tx['perm_see'])) return true; + } return false; } Modified: trunk/php/team.pinc =================================================================== --- trunk/php/team.pinc 2013-12-02 20:50:30 UTC (rev 1189) +++ trunk/php/team.pinc 2013-12-03 14:11:45 UTC (rev 1190) @@ -646,7 +646,7 @@ /** * read teams via int id */ - function obj_read_int(tutos_base $obj,$id,$level = 0) { + static function obj_read_int(tutos_base $obj,$id,$level = 0) { global $table; if ($obj->dbconn->prep) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2013-12-02 20:50:33
|
Revision: 1189 http://sourceforge.net/p/tutos/code/1189 Author: gokohnert Date: 2013-12-02 20:50:30 +0000 (Mon, 02 Dec 2013) Log Message: ----------- fix Modified Paths: -------------- trunk/php/layout/new_base.pinc Modified: trunk/php/layout/new_base.pinc =================================================================== --- trunk/php/layout/new_base.pinc 2013-12-02 19:39:11 UTC (rev 1188) +++ trunk/php/layout/new_base.pinc 2013-12-02 20:50:30 UTC (rev 1189) @@ -317,7 +317,7 @@ Function show_info_field($text,tutos_base $obj,$class) { global $tutos; - $c = new $class(); + $c = new $class($this->dbconn); $a = $c->getAddLink($this->user,$obj,'+'); $b = $c->getOverviewLinkObj($this->user,$obj,'='); unset($c); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2013-12-02 19:39:15
|
Revision: 1188 http://sourceforge.net/p/tutos/code/1188 Author: gokohnert Date: 2013-12-02 19:39:11 +0000 (Mon, 02 Dec 2013) Log Message: ----------- downgrade to work with 5.1.6 Modified Paths: -------------- trunk/php/bugtracking/bug.pinc trunk/php/config_default.pinc trunk/php/custom.pinc trunk/php/db/table_custom_example.pinc trunk/php/expense/expense.pinc trunk/php/file/file.pinc trunk/php/installation/installation.pinc trunk/php/invoice/invoice.pinc trunk/php/layout/new_base.pinc trunk/php/module_base.pinc trunk/php/module_template/AAA.pinc trunk/php/note/note.pinc trunk/php/reminder/reminder.pinc trunk/php/scrum/scrum.pinc trunk/php/task_import_csv.php trunk/php/testmanager/testmanager.pinc trunk/php/ticker/rsslib.pinc trunk/php/url/url.pinc Modified: trunk/php/bugtracking/bug.pinc =================================================================== --- trunk/php/bugtracking/bug.pinc 2013-11-25 05:25:45 UTC (rev 1187) +++ trunk/php/bugtracking/bug.pinc 2013-12-02 19:39:11 UTC (rev 1188) @@ -2228,7 +2228,7 @@ /** * create a link for an overview filtered by $obj */ - static function getOverviewLinkObj (tutos_user $user,tutos_base $obj,$text = "") { + function getOverviewLinkObj (tutos_user $user,tutos_base $obj,$text = "") { global $lang; if (! is_object($obj) ) return ''; Modified: trunk/php/config_default.pinc =================================================================== --- trunk/php/config_default.pinc 2013-11-25 05:25:45 UTC (rev 1187) +++ trunk/php/config_default.pinc 2013-12-02 19:39:11 UTC (rev 1188) @@ -732,7 +732,7 @@ // // The TUTOS Version number // -$tutos[version] = '1.9.20131120'; +$tutos[version] = '1.9.20131123'; // ### Local Variables: *** ### mode:iso-accents *** Modified: trunk/php/custom.pinc =================================================================== --- trunk/php/custom.pinc 2013-11-25 05:25:45 UTC (rev 1187) +++ trunk/php/custom.pinc 2013-12-02 19:39:11 UTC (rev 1188) @@ -913,7 +913,7 @@ $r = ''; if ( isset($this->x['growonly']) && ($this->x['growonly'] == true) ) { - if ($this->rows == 1) { + if ($this->txrows == 1) { // classical one line input $r .= ' <input id="'.$this->get_parsename().'" name="'.$this->get_parsename().'" value="" size="'.$this->txcols.'" />'."\n"; } else { @@ -923,7 +923,7 @@ $r .= '<br />'.$this->get(); } } else { - if ($this->rows == 1) { + if ($this->txrows == 1) { // classical one line input $r .= ' <input id="'.$this->get_parsename().'" name="'.$this->get_parsename().'" value="'. myentities($this->content) .'" size="'.$this->txcols.'" />'."\n"; } else { @@ -1612,6 +1612,16 @@ } /** + * check if a user is allowed to see a custom field + */ +function custom_see_ok(array $tx,tutos_user $user) { + if (!isset($tx['perm_see'])) return true; // default allows + if (!is_array($tx['perm_see'])) return true; // default allows + if (in_array($user->id,$tx['perm_see'])) return true; + return false; +} + +/** * get header fields for overview */ function get_custom_overview_fields(layout_base $layout,$section) { @@ -1627,7 +1637,10 @@ $tx['overview'] = false; if (!isset($tx['handler'])) $tx['handler'] = ''; - + // check permission to see + if (!custom_see_ok($tx,$layout->user)) { + continue; + } if (isset($tx['overview']) && ($tx['overview'] == false) ) continue; if (!isset($tx['ftype'])) $tx['ftype'] = ''; $tx[name] = $ti; @@ -1694,7 +1707,7 @@ * obj = the TUTOS object where the data is stored * cols = number of columns */ -function show_custom_fields(layout_base $layout,$section,&$obj,$cols) { +function show_custom_fields(layout_base $layout,$section,tutos_base $obj,$cols) { global $table,$lang; $r = ''; @@ -1705,6 +1718,10 @@ if (!isset($x['custom'])) continue; if (!$x['custom']) continue; + if (!custom_see_ok($x,$layout->user)) { + continue; + } + $f = get_fld_obj($obj,$x,$section,$i); if (is_object($f)) { @@ -1758,6 +1775,11 @@ if (!isset($x['ftype'])) $x['ftype'] = ""; if (!isset($x[size])) $x[size] = 4; + // check permission to see + if (!custom_see_ok($x,$layout->user)) { + continue; + } + $r .= edit_custom_field_single($layout,$section,$x,$i,$obj,$cols); } return $r; Modified: trunk/php/db/table_custom_example.pinc =================================================================== --- trunk/php/db/table_custom_example.pinc 2013-11-25 05:25:45 UTC (rev 1187) +++ trunk/php/db/table_custom_example.pinc 2013-12-02 19:39:11 UTC (rev 1188) @@ -130,7 +130,7 @@ type => "TS_TYPE", constraints => "", 'default_today' => false, - 'overview' => true, # show in overview + 'overview' => true, // show in overview Desc => "end date", 'lang' => "DATE3", 'hlang' => 'help for date3'); @@ -141,10 +141,11 @@ type => "float", constraints => "", Desc => "floater", - 'sortable' => true, # show in overview as sortable + 'sortable' => true, // show in overview as sortable 'lang' => "FLOAT3", 'hlang' => "help for FLOAT3", - 'overview' => true, # show in overview + 'overview' => true, // show in overview + 'perm_see' => array(10010), // list of team/user ids 'required' => true); // // A boolean field Modified: trunk/php/expense/expense.pinc =================================================================== --- trunk/php/expense/expense.pinc 2013-11-25 05:25:45 UTC (rev 1187) +++ trunk/php/expense/expense.pinc 2013-12-02 19:39:11 UTC (rev 1188) @@ -1060,7 +1060,7 @@ /** * create a link for an overview filtered by $obj */ - static function getOverviewLinkObj (tutos_user $user,tutos_base $obj,$text = "") { + function getOverviewLinkObj (tutos_user $user,tutos_base $obj,$text = "") { global $lang; if (! is_object($obj) ) return ''; Modified: trunk/php/file/file.pinc =================================================================== --- trunk/php/file/file.pinc 2013-11-25 05:25:45 UTC (rev 1187) +++ trunk/php/file/file.pinc 2013-12-02 19:39:11 UTC (rev 1188) @@ -1778,7 +1778,7 @@ /** * create a link for an overview filtered by $obj */ - static function getOverviewLinkObj (tutos_user $user,tutos_base $obj,$text = "") { + function getOverviewLinkObj (tutos_user $user,tutos_base $obj,$text = "") { global $lang; if (! is_object($obj) ) return ''; Modified: trunk/php/installation/installation.pinc =================================================================== --- trunk/php/installation/installation.pinc 2013-11-25 05:25:45 UTC (rev 1187) +++ trunk/php/installation/installation.pinc 2013-12-02 19:39:11 UTC (rev 1188) @@ -821,7 +821,7 @@ /** * create a link for an overview filtered by $obj */ - static function getOverviewLinkObj (tutos_user $user,tutos_base $obj,$text = "") { + function getOverviewLinkObj (tutos_user $user,tutos_base $obj,$text = "") { global $lang; if (! is_object($obj) ) return ''; Modified: trunk/php/invoice/invoice.pinc =================================================================== --- trunk/php/invoice/invoice.pinc 2013-11-25 05:25:45 UTC (rev 1187) +++ trunk/php/invoice/invoice.pinc 2013-12-02 19:39:11 UTC (rev 1188) @@ -1361,7 +1361,7 @@ /** * create a link for an overview filtered by $obj */ - static function getOverviewLinkObj (tutos_user $user,tutos_base $obj,$text = "") { + function getOverviewLinkObj (tutos_user $user,tutos_base $obj,$text = "") { global $lang; if (! is_object($obj) ) return ''; Modified: trunk/php/layout/new_base.pinc =================================================================== --- trunk/php/layout/new_base.pinc 2013-11-25 05:25:45 UTC (rev 1187) +++ trunk/php/layout/new_base.pinc 2013-12-02 19:39:11 UTC (rev 1188) @@ -317,21 +317,22 @@ Function show_info_field($text,tutos_base $obj,$class) { global $tutos; - $a = $class::getAddLink($this->user,$obj,'+'); - $b = $class::getOverviewLinkObj($this->user,$obj,'='); - + $c = new $class(); + $a = $c->getAddLink($this->user,$obj,'+'); + $b = $c->getOverviewLinkObj($this->user,$obj,'='); + unset($c); $id = 'cl_'.$class.'_'.uniqid(); $r = '<td class="desc" valign="top" id="'.$id.'">'.$text; $r .= '<span style="position:absolute;" id="X'.$id.'">'; if ( ($a != '') && isset($a[url])) { - $r .= '<a id="P'.$id.'" href="'.$a[url].'">'.$a[info].'</a>'; + $r .= '<a id="P'.$id.'" href="'.$tutos['base'] .'/php/'.$a[url].'">'.$a[info].'</a>'; } else if ( ($a != '') && isset($a[0][url])) { - $r .= '<a id="P'.$id.'" href="'.$a[0][url].'">+</a>'; + $r .= '<a id="P'.$id.'" href="'.$tutos['base'] .'/php/'.$a[0][url].'">+</a>'; } if ( ($b != '') && isset($b[url])) { - $r .= '<a id="O'.$id.'" href="'.$b[url].'">'.$b[info].'</a>'; + $r .= '<a id="O'.$id.'" href="'.$tutos['base'] .'/php/'.$b[url].'">'.$b[info].'</a>'; } else if ( ($b != '') && isset($b[0][url])) { - $r .= '<a id="O'.$id.'" href="'.$b[0][url].'">=</a>'; + $r .= '<a id="O'.$id.'" href="'.$tutos['base'] .'/php/'.$b[0][url].'">=</a>'; } $r .= '</span>'; $r .='</span>'; Modified: trunk/php/module_base.pinc =================================================================== --- trunk/php/module_base.pinc 2013-11-25 05:25:45 UTC (rev 1187) +++ trunk/php/module_base.pinc 2013-12-02 19:39:11 UTC (rev 1188) @@ -517,8 +517,8 @@ /** * create a link to a overview page filtered by $obj */ - static function getOverviewLinkObj (tutos_user $user, tutos_base $obj = null, $text = "") { - return static::getOverviewLink($user,$text); + function getOverviewLinkObj (tutos_user $user, tutos_base $obj = null, $text = "") { + return $this->getOverviewLink($user,$text); } /** Modified: trunk/php/module_template/AAA.pinc =================================================================== --- trunk/php/module_template/AAA.pinc 2013-11-25 05:25:45 UTC (rev 1187) +++ trunk/php/module_template/AAA.pinc 2013-12-02 19:39:11 UTC (rev 1188) @@ -359,7 +359,7 @@ /** * create a link for an overview filtered by $obj */ - static function getOverviewLinkObj (tutos_user $user,tutos_base $obj,$text = "") { + function getOverviewLinkObj (tutos_user $user,tutos_base $obj,$text = "") { global $lang; if (! is_object($obj) ) return ''; Modified: trunk/php/note/note.pinc =================================================================== --- trunk/php/note/note.pinc 2013-11-25 05:25:45 UTC (rev 1187) +++ trunk/php/note/note.pinc 2013-12-02 19:39:11 UTC (rev 1188) @@ -700,7 +700,7 @@ /** * create a link for an overview filtered by $obj */ - static function getOverviewLinkObj (tutos_user $user,tutos_base $obj,$text = "") { + function getOverviewLinkObj (tutos_user $user,tutos_base $obj,$text = "") { global $lang; if (! is_object($obj) ) return ''; Modified: trunk/php/reminder/reminder.pinc =================================================================== --- trunk/php/reminder/reminder.pinc 2013-11-25 05:25:45 UTC (rev 1187) +++ trunk/php/reminder/reminder.pinc 2013-12-02 19:39:11 UTC (rev 1188) @@ -716,7 +716,7 @@ /** * create a link for an overview filtered by $obj */ - static function getOverviewLinkObj (tutos_user $user,tutos_base $obj,$text = "") { + function getOverviewLinkObj (tutos_user $user,tutos_base $obj,$text = "") { global $lang; if (! is_object($obj) ) return ''; Modified: trunk/php/scrum/scrum.pinc =================================================================== --- trunk/php/scrum/scrum.pinc 2013-11-25 05:25:45 UTC (rev 1187) +++ trunk/php/scrum/scrum.pinc 2013-12-02 19:39:11 UTC (rev 1188) @@ -710,7 +710,7 @@ /** * create a link for an overview filtered by $obj */ - static function getOverviewLinkObj (tutos_user $user,tutos_base $obj,$text = "") { + function getOverviewLinkObj (tutos_user $user,tutos_base $obj,$text = "") { global $lang; if (! is_object($obj) ) return ''; @@ -1546,7 +1546,7 @@ /** * create a link for an overview filtered by $obj */ - static function getOverviewLinkObj (tutos_user $user,tutos_base $obj,$text = "") { + function getOverviewLinkObj (tutos_user $user,tutos_base $obj,$text = "") { global $lang; if (! is_object($obj) ) return ''; Modified: trunk/php/task_import_csv.php =================================================================== --- trunk/php/task_import_csv.php 2013-11-25 05:25:45 UTC (rev 1187) +++ trunk/php/task_import_csv.php 2013-12-02 19:39:11 UTC (rev 1188) @@ -143,36 +143,36 @@ switch( $t_fields[$fnames[$j]] ) { case "name": { $name = $fields[$j]; - $t->setName($name); - $val = $t->name; - break; + $t->setName($name); + $val = $t->name; + break; } case "s_start": { $s_start = new TUTOS_Date_Time($this->reformat_date($fields[$j])); - $t->setSStart($s_start); - $val = $t->s_start->getYYYYMMDD(); - break; + $t->setSStart($s_start); + $val = $t->s_start->getYYYYMMDD(); + break; } case "s_end": { $s_end = new TUTOS_Date_Time($this->reformat_date($fields[$j])); - $t->setSEnd($s_end); - $val = $t->s_end->getYYYYMMDD(); - break; + $t->setSEnd($s_end); + $val = $t->s_end->getYYYYMMDD(); + break; } case "volume": { $vol = trim($fields[$j]); - if( preg_match("#([0-9]+).*(jour|day)#", $vol, $regs) ) { - // FIXME: use a localized number of worked hours (8) - $t->setVolume(8*(int)$regs[1]); - } elseif( preg_match("#([0-9]+).*(heure|hour)#", $vol, $regs) ) { - $t->setVolume((int)$regs[1]); - } elseif( is_numeric($vol) ) { - $t->setVolume($vol); - } else { - $t->setVolume(0); - } - $val = $t->volume." h"; - break; + if( preg_match("#([0-9]+).*(jour|day)#", $vol, $regs) ) { + // FIXME: use a localized number of worked hours (8) + $t->setVolume(8*(int)$regs[1]); + } elseif( preg_match("#([0-9]+).*(heure|hour)#", $vol, $regs) ) { + $t->setVolume((int)$regs[1]); + } elseif( is_numeric($vol) ) { + $t->setVolume($vol); + } else { + $t->setVolume(0); + } + $val = $t->volume." h"; + break; } /* Here it's a special case : * MS Project exports dependency field as WBS Index @@ -184,29 +184,29 @@ */ case "index": { $index = trim($fields[$j]); - $indexes[$index] = $t; + $indexes[$index] = $t; - /* find the parent task with the index */ - if( preg_match("#^([0-9.]*)\.[0-9]*$#", $index, $regs) ) { - $p_task = $indexes[$regs[1]]; + /* find the parent task with the index */ + if( preg_match("#^([0-9.]*)\.[0-9]*$#", $index, $regs) ) { + $p_task = $indexes[$regs[1]]; - $t->p_id = $p_task->id; - $t->parent = getObject($this->dbconn, $p_task->id); + $t->p_id = $p_task->id; + $t->parent = getObject($this->dbconn, $p_task->id); - if( $p_task->id == -1 ) { - $val = "$index : id(".$regs[1].")"; - } else { - $val = "$index : <tt>".$p_task->id."</tt>"; - } + if( $p_task->id == -1 ) { + $val = "$index : id(".$regs[1].")"; } else { - $t->parent = getObject($this->dbconn, $t->p_id); - $val = "$index"; + $val = "$index : <tt>".$p_task->id."</tt>"; } - break; + } else { + $t->parent = getObject($this->dbconn, $t->p_id); + $val = "$index"; + } + break; } default:{ $val = "<i>Not Used</i> [".$t_fields[$fnames[$j]]."] [".$fnames[$j].".]"; - break; + break; } } // And we print it @@ -231,8 +231,8 @@ $msg .= $t->save(); $this->dbconn->Commit("WORK"); // We need to get the task id -#FIXME: should work with $t - $t = $this->getTask(&$t, $name, $t->p_id); + //FIXME: should work with $t + $t = $this->getTask($t, $name, $t->p_id); // Let the $indexes table up-to-date $indexes[$index] = $t; @@ -313,17 +313,17 @@ echo " </tr>\n"; /* - echo " <tr>\n"; - echo " <td class=\"desc\">".$lang['TaskState']."</td>\n"; - echo " <td><input name=\"state\"></td>\n"; - echo " </tr>\n"; + echo " <tr>\n"; + echo " <td class=\"desc\">".$lang['TaskState']."</td>\n"; + echo " <td><input name=\"state\"></td>\n"; + echo " </tr>\n"; */ /* - echo " <tr>\n"; - echo " <td class=\"desc\">".$lang['TaskDesc']."</td>\n"; - echo " <td><input name=\"desc\"></td>\n"; - echo " </tr>\n"; + echo " <tr>\n"; + echo " <td class=\"desc\">".$lang['TaskDesc']."</td>\n"; + echo " <td><input name=\"desc\"></td>\n"; + echo " </tr>\n"; */ echo " <tr>\n"; @@ -332,10 +332,10 @@ echo " <tr>\n"; /* - echo " <tr>\n"; - echo " <td class=\"desc\">".$lang['TaskVolumeDone']."</td>\n"; - echo " <td><input name=\"volume_done\"></td>\n"; - echo " <tr>\n"; + echo " <tr>\n"; + echo " <td class=\"desc\">".$lang['TaskVolumeDone']."</td>\n"; + echo " <td><input name=\"volume_done\"></td>\n"; + echo " <tr>\n"; */ echo " <tr>\n"; Modified: trunk/php/testmanager/testmanager.pinc =================================================================== --- trunk/php/testmanager/testmanager.pinc 2013-11-25 05:25:45 UTC (rev 1187) +++ trunk/php/testmanager/testmanager.pinc 2013-12-02 19:39:11 UTC (rev 1188) @@ -1069,6 +1069,26 @@ } /** + * create a link for an overview filtered by $obj + */ + function getOverviewLinkObj (tutos_user $user,tutos_base $obj,$text = "") { + global $lang; + + if (! is_object($obj) ) return ''; + if ( $obj->id == -1 ) return ''; + if (! $user->feature_ok(usetestcase,PERM_SEE) ) return ''; + if (! $obj->obj_feature_ok($user,usetestcase,PERM_SEE) ) return ''; + if (! $obj->see_ok() ) return ''; + + return array( url => 'testmanager/testcase_overview.php?refid='.$obj->id, + confirm => false, + text => ($text == '' ? $lang['TestcaseOverview']:$text), + info => $lang['TestcaseOverview'], + category => array('overview','module',usetestcase) + ); + } + + /** * create a link where a testcase for the given object could be added */ static function getaddlink (tutos_user $user,tutos_base $obj,$text = "") { @@ -2087,7 +2107,7 @@ /** * create a link for an overview filtered by $obj */ - static function getOverviewLinkObj (tutos_user $user,tutos_base $obj,$text = "") { + function getOverviewLinkObj (tutos_user $user,tutos_base $obj,$text = "") { global $lang; if (! is_object($obj) ) return ''; @@ -3276,7 +3296,7 @@ /** * create a link for an overview filtered by $obj */ - static function getOverviewLinkObj (tutos_user $user,tutos_base $obj,$text = "") { + function getOverviewLinkObj (tutos_user $user,tutos_base $obj,$text = "") { global $lang; if (! is_object($obj) ) return ''; Modified: trunk/php/ticker/rsslib.pinc =================================================================== --- trunk/php/ticker/rsslib.pinc 2013-11-25 05:25:45 UTC (rev 1187) +++ trunk/php/ticker/rsslib.pinc 2013-12-02 19:39:11 UTC (rev 1188) @@ -22,42 +22,50 @@ $errstr = ""; $agelimit *= 60; - if (file_exists($cachefile)) { + if (file_exists($cachefile) && filesize($cachefile) != 0) { $timestamp = @filectime($cachefile); $age = time() - $timestamp; } else { $age = $agelimit+5; } - if($age > $agelimit) { - $url = parse_url($rdf); - if (!isset($tutos['proxy_host']) || empty($tutos['proxy_host']) ) { - $fp = fsockopen($url['host'], "80", $errno, $errstr, $timeout); - } else { - $fp = fsockopen($tutos['proxy_host'], $tutos['proxy_port'], $errno, $errstr, $timeout); - } - if (!$fp) return $errno." ".$errstr; //just quit on error + if($age < $agelimit) { + return $r; + } + $local = fopen($cachefile, "w"); + if (!$local) return $errno." ".$errstr; //just quit on error + stream_set_timeout($local, $timeout); - $local = @fopen($cachefile, "w"); - if (!$local) return $errno." ".$errstr; //just quit on error - if (!isset($tutos['proxy_host']) || empty($tutos['proxy_host']) ) { - fputs($fp, "GET " . $url['path'] . " HTTP/1.1\r\nHost: " . $url['host'] . "\r\n\r\n"); - } else { - fputs($fp, "GET " . $rdf . " HTTP/1.1\r\n". - "User-Agent: TUTOS\r\n". - "Connection: close\r\n". - "Proxy-Connection: close\r\n". - "Accept-Encoding: deflate\r\n". - "Cache-Control: no-cache\r\n". - "Pragma: no-cache\r\n". - "Host: " . $url['host'] . "\r\n". - "\r\n"); - } - while(!feof($fp)) - fwrite($local, fgets($fp, 128)); + $url = parse_url($rdf); + if (!isset($tutos['proxy_host']) || empty($tutos['proxy_host']) ) { + $fp = fsockopen($url['host'], "80", $errno, $errstr, $timeout); + } else { + $fp = fsockopen($tutos['proxy_host'], $tutos['proxy_port'], $errno, $errstr, $timeout); + } + if (!$fp) return $errno." ".$errstr; //just quit on error + stream_set_timeout($fp, $timeout); + + if (!isset($tutos['proxy_host']) || empty($tutos['proxy_host']) ) { + fputs($fp, "GET " . $url['path'] . " HTTP/1.1\r\nHost: " . $url['host'] . "\r\n\r\n"); + } else { + fputs($fp, "GET " . $rdf . " HTTP/1.1\r\n". + "User-Agent: TUTOS\r\n". + "Connection: close\r\n". + "Proxy-Connection: close\r\n". + "Accept-Encoding: deflate\r\n". + "Cache-Control: no-cache\r\n". + "Pragma: no-cache\r\n". + "Host: " . $url['host'] . "\r\n". + "\r\n"); + } + + $r .= "TET"; + # while(!feof($fp)) { + fwrite($local, fgets($fp,1024)); + # } + fclose($fp); fclose($local); return $r; - } } /** Modified: trunk/php/url/url.pinc =================================================================== --- trunk/php/url/url.pinc 2013-11-25 05:25:45 UTC (rev 1187) +++ trunk/php/url/url.pinc 2013-12-02 19:39:11 UTC (rev 1188) @@ -673,7 +673,7 @@ /** * create a link for an overview filtered by $obj */ - static function getOverviewLinkObj (tutos_user $user,tutos_base $obj,$text = "") { + function getOverviewLinkObj (tutos_user $user,tutos_base $obj,$text = "") { global $lang; if (! is_object($obj) ) return ''; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2013-11-25 05:25:49
|
Revision: 1187 http://sourceforge.net/p/tutos/code/1187 Author: gokohnert Date: 2013-11-25 05:25:45 +0000 (Mon, 25 Nov 2013) Log Message: ----------- fix Modified Paths: -------------- trunk/php/file/file.pinc Modified: trunk/php/file/file.pinc =================================================================== --- trunk/php/file/file.pinc 2013-11-24 09:03:27 UTC (rev 1186) +++ trunk/php/file/file.pinc 2013-11-25 05:25:45 UTC (rev 1187) @@ -1791,7 +1791,7 @@ confirm => false, text => ($text == '' ? $lang['FileOverview']:$text), info => $lang['FileOverview'], - category => array(AAA::getType(),'overview','module',usedocmanagement) + category => array(tutos_file::getType(),'overview','module',usedocmanagement) ); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2013-11-24 09:03:29
|
Revision: 1186 http://sourceforge.net/p/tutos/code/1186 Author: gokohnert Date: 2013-11-24 09:03:27 +0000 (Sun, 24 Nov 2013) Log Message: ----------- custom massupdate support Modified Paths: -------------- trunk/php/custom.pinc Modified: trunk/php/custom.pinc =================================================================== --- trunk/php/custom.pinc 2013-11-24 09:02:21 UTC (rev 1185) +++ trunk/php/custom.pinc 2013-11-24 09:03:27 UTC (rev 1186) @@ -1540,10 +1540,15 @@ /** * set a object according to massupdate inputs */ -function set_custom_massupdate_object(layout_base $layout,$section,&$obj,$action) { - global $table,$lang; +function set_custom_massupdate_object(layout_base $layout,$section,tutos_base $obj,$action) { + global $table,$lang,$msg,$info; - $msg = ''; + $changed = false; + + if (!$obj->mod_ok() ) { + return $changed; + } + foreach($table[$section] as $ti => $tx) { if (!is_array($tx)) continue; if (!isset($tx['custom'])) continue; @@ -1557,15 +1562,19 @@ $val = substr($action,strlen($ti)+1); if (($tx[type] == 'ID_TYPE') && ($tx['ftype'] == 'SelectOne')) { - $obj->setIntField('_fld_'.$ti,$val,$tx['lang']); - $msg = addLine($msg,$obj->getLink() .' '. $lang[$tx['lang']] .' = '. $lang[$tx['lang'].'_'][$val]); + if ($obj->setIntField('_fld_'.$ti,$val,$tx['lang'])) { + $info = addLine($info,$obj->getLink() .' '.(isset($lang[$tx['lang']]) ? $lang[$tx['lang']]:$tx['lang']).' = '. $lang[$tx['lang'].'_'][$val]); + $changed = true; + } } if (($tx[type] == 'ID_TYPE') && ($tx['ftype'] == 'Boolean')) { - $obj->setIntField('_fld_'.$ti,$val,$tx['lang']); - $msg = addLine($msg,$obj->getLink() .' '. $lang[$tx['lang']] .' = '. ($val > 0 ? $lang['yes']:$lang['no'])); + if ($obj->setIntField('_fld_'.$ti,$val,$tx['lang'])) { + $info = addLine($info,$obj->getLink() .' '.(isset($lang[$tx['lang']]) ? $lang[$tx['lang']]:$tx['lang']).' = '. ($val > 0 ? $lang['yes']:$lang['no'])); + $changed = true; + } } } - return $msg; + return $changed; } /** @@ -1586,16 +1595,16 @@ foreach ($lang[$tx['lang'].'_'] as $i => $l) { if (trim($l) == '') continue; $r .= ' <option value="'.$ti .'-'. $i .'">'; - $r .= sprintf($lang['SetTo'],$lang[$tx['lang']],$l); + $r .= sprintf($lang['SetTo'],(isset($lang[$tx['lang']]) ? $lang[$tx['lang']]:$tx['lang']),$l); $r .= '</option>'."\n"; } } if (($tx[type] == 'ID_TYPE') && ($tx['ftype'] == 'Boolean')) { $r .= ' <option value="'.$ti .'-1">'; - $r .= sprintf($lang['SetTo'],$lang[$tx['lang']],$lang['yes']); + $r .= sprintf($lang['SetTo'],(isset($lang[$tx['lang']]) ? $lang[$tx['lang']]:$tx['lang']),$lang['yes']); $r .= '</option>'."\n"; $r .= ' <option value="'.$ti .'-0">'; - $r .= sprintf($lang['SetTo'],$lang[$tx['lang']],$lang['no']); + $r .= sprintf($lang['SetTo'],(isset($lang[$tx['lang']]) ? $lang[$tx['lang']]:$tx['lang']),$lang['no']); $r .= '</option>'."\n"; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2013-11-24 09:02:24
|
Revision: 1185 http://sourceforge.net/p/tutos/code/1185 Author: gokohnert Date: 2013-11-24 09:02:21 +0000 (Sun, 24 Nov 2013) Log Message: ----------- user specific urls for sidebar support Modified Paths: -------------- trunk/php/layout/new2_layout.pinc trunk/php/layout/new_layout.pinc trunk/php/url/url.pinc Modified: trunk/php/layout/new2_layout.pinc =================================================================== --- trunk/php/layout/new2_layout.pinc 2013-11-24 09:01:08 UTC (rev 1184) +++ trunk/php/layout/new2_layout.pinc 2013-11-24 09:02:21 UTC (rev 1185) @@ -945,40 +945,50 @@ // Team Stuff (read the shared URLs) - $urls = ''; + $urls = ''; + $ulist[0] = array(); + $ulist[1] = array(); if ( ! class_exists ('url') ) { loadmodule('url'); } if ( class_exists ('url') ) { - if ( $this->user->feature_ok(useurl,PERM_SEE) ) { - $ulist = array(); - foreach ( $this->user->teams as $idx => $val ) { - url::obj_read($this->user->teams[$idx]); - $ulist = array_merge($ulist,$this->user->teams[$idx]->list[useurl]); + $ulist = url::getLayoutUrlLists($this->user); + } + if ( count($ulist[0]) > 0 ) { + $urls .= '<tr><th class="menuth">'.$lang['Team'].'/'.$lang['URL']."</th></tr>\n"; + foreach ( $ulist[0] as $val ) { + if (mb_strlen($val->name) > 40) { + $t = mb_substr($val->name,0,35) .'...'. mb_substr($val->name,-2); + } else { + $t = $val->name; } - if ( count($ulist) > 0 ) { - $urls .= '<tr><th class="menuth">'.$lang['Team'].'/'.$lang['URL']."</th></tr>\n"; - foreach ( $ulist as $idx => $val ) { - - if (mb_strlen($ulist[$idx]->name) > 40) { - $t = mb_substr($ulist[$idx]->name,0,35) .'...'. mb_substr($ulist[$idx]->name,-2); - } else { - $t = $ulist[$idx]->name; - } - $urls .= '<tr class="nl_menu_row" >'; - - $urls .= '<td class="nl_menu_item">>'; - $urls .= menulink($ulist[$idx]->getUrl(), - myentities($t), - $ulist[$idx]->getUrl(), - $ulist[$idx]->getPopInfo()); - $urls .= '</td></tr>'."\n"; - } + $urls .= '<tr class="nl_menu_row" >'; + $urls .= '<td class="nl_menu_item">>'; + $urls .= menulink($val->getUrl(), + myentities($t), + $val->getUrl(), + $val->getPopInfo()); + $urls .= '</td></tr>'."\n"; + } + } + if ( count($ulist[1]) > 0 ) { + $urls .= '<tr><th class="menuth">'.$lang['User'].'/'.$lang['URL']."</th></tr>\n"; + foreach ( $ulist[1] as $val ) { + if (mb_strlen($val->name) > 40) { + $t = mb_substr($val->name,0,35) .'...'. mb_substr($val->name,-2); + } else { + $t = $val->name; } + $urls .= '<tr class="nl_menu_row" >'; + $urls .= '<td class="nl_menu_item">>'; + $urls .= menulink($val->getUrl(), + myentities($t), + $val->getUrl(), + $val->getPopInfo()); + $urls .= '</td></tr>'."\n"; } } - // remaining stuff $rem = ''; foreach ($this->menu as $i => $m) { Modified: trunk/php/layout/new_layout.pinc =================================================================== --- trunk/php/layout/new_layout.pinc 2013-11-24 09:01:08 UTC (rev 1184) +++ trunk/php/layout/new_layout.pinc 2013-11-24 09:02:21 UTC (rev 1185) @@ -315,29 +315,41 @@ loadmodule('url'); } + $ulist[0] = array(); + $ulist[1] = array(); if ( class_exists ('url') ) { - if ( $this->user->feature_ok(useurl,PERM_SEE) ) { - $ulist = array(); - foreach ( $this->user->teams as $idx => $val ) { - url::obj_read($this->user->teams[$idx]); - $ulist = array_merge($ulist,$this->user->teams[$idx]->list[useurl]); + $ulist = url::getLayoutUrlLists($this->user); + } + if ( count($ulist[0]) > 0 ) { + foreach ( $ulist[0] as $val ) { + $x = array( url => $val->getUrl() , + target => 'url', + 'popup' => $val->getPopInfo(), + info => $val->getTargetUrl() , + category => array('extern','url0','url') + ); + if (strlen($val->name) > 40) { + $x[text] = substr($val->name,0,35) ."...". substr($val->name,-2); + } else { + $x[text] = $val->name; } - if ( count($ulist) > 0 ) { - foreach ( $ulist as $idx => $val ) { - $x = array( url => $ulist[$idx]->getUrl() , - target => 'url', - 'popup' => $ulist[$idx]->getPopInfo(), - info => $ulist[$idx]->getTargetUrl() , - category => array('extern','url') - ); - if (strlen($ulist[$idx]->name) > 40) { - $x[text] = substr($ulist[$idx]->name,0,35) ."...". substr($ulist[$idx]->name,-2); - } else { - $x[text] = $ulist[$idx]->name; - } - $this->addMenu($x); - } + $this->addMenu($x); + } + } + if ( count($ulist[1]) > 0 ) { + foreach ( $ulist[1] as $val ) { + $x = array( url => $val->getUrl() , + target => 'url1', + 'popup' => $val->getPopInfo(), + info => $val->getTargetUrl() , + category => array('extern','url1','url') + ); + if (strlen($val->name) > 40) { + $x[text] = substr($val->name,0,35) ."...". substr($val->name,-2); + } else { + $x[text] = $val->name; } + $this->addMenu($x); } } } @@ -603,7 +615,8 @@ $r .= $admin; } - $urls = $this->menuprint('url','',false,$before,$after,$before2,$after2); + $urls0 = $this->menuprint('url0','',false,$before,$after,'',''); + $urls1 = $this->menuprint('url1','',false,$before,$after,'',''); // remaining stuff foreach ($this->menu as $i => $m) { @@ -618,10 +631,14 @@ } - if ( $urls != '' ) { + if ( $urls0 != '' ) { $r .= '<tr><th>'. $lang['Team'].'/'. $lang['URL'] ."</th></tr>\n"; - $r .= $urls; + $r .= $urls0; } + if ( $urls1 != '' ) { + $r .= '<tr><th>'. $lang['User'].'/'. $lang['URL'] ."</th></tr>\n"; + $r .= $urls1; + } if ( 'help.php' != basename($_SERVER['SCRIPT_NAME']) ) { if (isset($_SESSION['history'])) { $r .= "<tr><th>".$lang['ObjHistory']."</th></tr>\n"; Modified: trunk/php/url/url.pinc =================================================================== --- trunk/php/url/url.pinc 2013-11-24 09:01:08 UTC (rev 1184) +++ trunk/php/url/url.pinc 2013-11-24 09:02:21 UTC (rev 1185) @@ -13,6 +13,7 @@ $tutos['files'][__FILE__] = '$Rev$'; define ('MYTUTOS_CAT',-2); +define ('SIDEBAR_CAT',-3); /** * a url category * @@ -289,9 +290,14 @@ if ($this->cat_id == -1) { return ''; } + // place on mytutos page if ($this->cat_id == MYTUTOS_CAT) { return $lang['PersonalPage']; } + // place in layout + if ($this->cat_id == SIDEBAR_CAT) { + return $lang['UserLayout']; + } $this->cat = $this->cat->read($this->cat_id,$this->cat); if (is_object($this->cat)) { return $this->cat->getLink(); @@ -393,6 +399,7 @@ $r .= '<select id="urlcat" name="urlcat">'."\n"; $r .= ' <option value="-1"'.($this->cat_id == -1 ? ' selected="selected"':'').'>-</option>'."\n"; $r .= ' <option value="'.MYTUTOS_CAT.'"'.($this->cat_id == MYTUTOS_CAT ? ' selected="selected"':'').'>'.$lang['PersonalPage'].'</option>'."\n"; + $r .= ' <option value="'.SIDEBAR_CAT.'"'.($this->cat_id == SIDEBAR_CAT ? ' selected="selected"':'').'>'.$lang['UserLayout'].'</option>'."\n"; foreach($obj->list[useurlcat] as $f) { // show only the current value and other usable selections if (!$f->use_ok() && ($f->id != $this->cat_id)) continue; @@ -685,7 +692,7 @@ /** * Read all urls related to given id - * !! here $obj could also be a lyaout !! + * !! here $obj could also be a layout !! */ static function obj_read($obj) { global $table; @@ -872,6 +879,32 @@ } /** + * get a list of urls to display in layout + * return an array of two lists ( + * [0] urls for teams + * [1] a user specific url list ( with SIDEBAR category ) + */ + static function getLayoutUrlLists(tutos_user $user) { + $ulist[0] = array(); + $ulist[1] = array(); + if ( ($user->id == -1) || ! $user->feature_ok(useurl,PERM_SEE) ) { + return $ulist; + } + foreach ( $user->teams as $idx => $val ) { + url::obj_read($user->teams[$idx]); + $ulist[0] = array_merge($ulist[0],$user->teams[$idx]->list[useurl]); + } + + url::obj_read($user); + foreach ($user->list[useurl] as $u) { + if ($u->cat_id == SIDEBAR_CAT) + $ulist[1][] = $u; + } + + return $ulist; + } + + /** * get the help index */ static function getHelpIndex () { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2013-11-24 09:01:11
|
Revision: 1184 http://sourceforge.net/p/tutos/code/1184 Author: gokohnert Date: 2013-11-24 09:01:08 +0000 (Sun, 24 Nov 2013) Log Message: ----------- custom massupdate support Modified Paths: -------------- trunk/php/bugtracking/bug_overview.php trunk/php/db/table_custom_example.pinc trunk/php/file/file_overview.php trunk/php/module_template/AAA_overview.php trunk/php/note/note_overview.php trunk/php/product_overview.php trunk/php/task_overview.php Modified: trunk/php/bugtracking/bug_overview.php =================================================================== --- trunk/php/bugtracking/bug_overview.php 2013-11-22 12:09:54 UTC (rev 1183) +++ trunk/php/bugtracking/bug_overview.php 2013-11-24 09:01:08 UTC (rev 1184) @@ -425,6 +425,7 @@ if ($f->stc_state == STC_NOT_EXISTANT) continue; $r .= " <option value=\"S". $f->stc_state .'" style="background:'.$f->color.';">'. sprintf($lang['SetTo'],$lang['BugState'],$f->getFullName()) ."</option>\n"; } + $r .= get_custom_massupdate_options($this,'bugtracking'); $r .= " <option value=\"-4\">". $lang['AclModify'] ."</option>\n"; if (class_exists('watchlist')) { $r .= watchlist::action_options(); @@ -879,6 +880,17 @@ $this->dbconn->Commit("WORK"); return; } + + foreach ($_GET['mark'] as $key => $val) { + $obj = new bug($this->dbconn); + $obj = $obj->read($val,$obj); + if ( $obj->id != $val ) { + continue; + } + if (set_custom_massupdate_object($this,'bugtracking',$obj,$_REQUEST['action'])) { + $msg = addLine($msg,$obj->save()); + } + } if (class_exists('watchlist')) { watchlist::parse_action($this->user); } Modified: trunk/php/db/table_custom_example.pinc =================================================================== --- trunk/php/db/table_custom_example.pinc 2013-11-22 12:09:54 UTC (rev 1183) +++ trunk/php/db/table_custom_example.pinc 2013-11-24 09:01:08 UTC (rev 1184) @@ -157,6 +157,7 @@ 'lang' => "YES/NO", 'hlang' => 'help for bo', 'overview' => true, # show in overview + 'massupdate' => true, 'searchable' => true, 'required' => true); // @@ -272,7 +273,8 @@ Desc => "yes/no", 'lang' => "Closed ?", 'overview' => false, # show in overview - 'required' => true + 'required' => true, + 'massupdate' => true, ); // Modified: trunk/php/file/file_overview.php =================================================================== --- trunk/php/file/file_overview.php 2013-11-22 12:09:54 UTC (rev 1183) +++ trunk/php/file/file_overview.php 2013-11-24 09:01:08 UTC (rev 1184) @@ -171,6 +171,7 @@ $r .= sprintf($lang['withmarked'],$lang['Files']); $r .= " <select name=\"action\">\n"; $r .= ' <option value="-1" selected="selected">'. $lang['ActionNil'] ."</option>\n"; + $r .= get_custom_massupdate_options($this,'file'); $r .= ' <option value="-2">'. $lang['Delete'] ."</option>\n"; $r .= ' <option value="-4">'. $lang['AclModify'] ."</option>\n"; if (class_exists('watchlist')) { @@ -215,6 +216,16 @@ $this->redirect = "../" . acl_action(); return; } + foreach ($_GET['mark'] as $key => $val) { + $obj = new tutos_file($this->dbconn); + $obj = $obj->read($val,$obj); + if ( $obj->id != $val ) { + continue; + } + if (set_custom_massupdate_object($this,'file',$obj,$_REQUEST['action'])) { + $msg = addLine($msg,$obj->save()); + } + } if (class_exists('watchlist')) { watchlist::parse_action($this->user); } Modified: trunk/php/module_template/AAA_overview.php =================================================================== --- trunk/php/module_template/AAA_overview.php 2013-11-22 12:09:54 UTC (rev 1183) +++ trunk/php/module_template/AAA_overview.php 2013-11-24 09:01:08 UTC (rev 1184) @@ -123,6 +123,7 @@ $r .= sprintf($lang['withmarked'],$lang['AAAs']); $r .= " <select name=\"action\">\n"; $r .= ' <option value="-1" selected="selected">'. $lang['ActionNil'] ."</option>\n"; + $r .= get_custom_massupdate_options($this,'AAA'); $r .= ' <option value="-2">'. $lang['Delete'] ."</option>\n"; $r .= ' <option value="-4">'. $lang['AclModify'] ."</option>\n"; if (class_exists('watchlist')) { @@ -169,6 +170,18 @@ $this->redirect = "../" . acl_action(); return; } + + foreach ($_GET['mark'] as $key => $val) { + $obj = new AAA($this->dbconn); + $obj = $obj->read($val,$obj); + if ( $obj->id != $val ) { + continue; + } + if (set_custom_massupdate_object($this,'AAA',$obj,$_REQUEST['action'])) { + $msg = addLine($msg,$obj->save()); + } + } + if (class_exists('watchlist')) { watchlist::parse_action($this->user); } Modified: trunk/php/note/note_overview.php =================================================================== --- trunk/php/note/note_overview.php 2013-11-22 12:09:54 UTC (rev 1183) +++ trunk/php/note/note_overview.php 2013-11-24 09:01:08 UTC (rev 1184) @@ -136,6 +136,7 @@ $r .= sprintf($lang['withmarked'],$lang['Notes']); $r .= " <select name=\"action\">\n"; $r .= ' <option value="-1" selected="selected">'. $lang['ActionNil'] ."</option>\n"; + $r .= get_custom_massupdate_options($this,'note'); $r .= ' <option value="-2">'. $lang['Delete'] ."</option>\n"; $r .= ' <option value="-4">'. $lang['AclModify'] ."</option>\n"; if (class_exists('watchlist')) { @@ -180,6 +181,16 @@ $this->redirect = "../". acl_action(); return; } + foreach ($_GET['mark'] as $key => $val) { + $obj = new note($this->dbconn); + $obj = $obj->read($val,$obj); + if ( $obj->id != $val ) { + continue; + } + if (set_custom_massupdate_object($this,'note',$obj,$_REQUEST['action'])) { + $msg = addLine($msg,$obj->save()); + } + } if (class_exists('watchlist')) { watchlist::parse_action($this->user); } Modified: trunk/php/product_overview.php =================================================================== --- trunk/php/product_overview.php 2013-11-22 12:09:54 UTC (rev 1183) +++ trunk/php/product_overview.php 2013-11-24 09:01:08 UTC (rev 1184) @@ -412,6 +412,7 @@ if ($f->stc_state == -2) continue; $r .= ' <option value="S'. $f->stc_state .'">'. sprintf($lang['SetTo'],$lang['ProdState'],$f->getFullName()) ."</option>\n"; } + $r .= get_custom_massupdate_options($this,'product'); $r .= " <option value=\"-4\">". $lang['AclModify'] ."</option>\n"; if (class_exists('watchlist')) { $r .= watchlist::action_options(); @@ -740,10 +741,24 @@ foreach ($_GET['mark'] as $key => $val) { $url = addUrlParameter($url,'id[]='.$val,true); } + // clean msg and info + $msg = ''; + $info = ''; $this->redirect = $url; return; } + foreach ($_GET['mark'] as $key => $val) { + $p = new product($this->dbconn); + $p = $p->read($val,$p); + if ( $p->id != $val ) { + continue; + } + if (set_custom_massupdate_object($this,'product',$p,$_REQUEST['action'])) { + $msg = addLine($msg,$p->save()); + } + } + if (class_exists('watchlist')) { watchlist::parse_action($this->user); } Modified: trunk/php/task_overview.php =================================================================== --- trunk/php/task_overview.php 2013-11-22 12:09:54 UTC (rev 1183) +++ trunk/php/task_overview.php 2013-11-24 09:01:08 UTC (rev 1184) @@ -389,10 +389,10 @@ } } } - foreach ($p->tasklist as $i => $f) { + foreach ($p->tasklist as $f) { if (!$f->see_ok()) continue; # $r .= 'XXX '.$this->start->getDateTime().' '.$this->end->getDateTime().'<br>'; - $x = $p->tasklist[$i]->printRow($this,0,$this->small,$p,$this->fld, $this->start, $this->end); + $x = $f->printRow($this,0,$this->small,$p,$this->fld, $this->start, $this->end); if (is_array($f->worker)) { foreach($f->worker as $i2 => $f2) { $worker[$i2] = &$f2; @@ -402,6 +402,7 @@ $skipped += $x[0]; $r .= $x[1]; $a++; + unset($f); } } unset($p); @@ -646,7 +647,9 @@ $info = addLine($info,$p->getLink() .' '. $lang['TaskWorker'] .' = '. $w->getLink()); } } else { - $msg = addLine($msg,set_custom_massupdate_object($this,'task',$p,$_REQUEST['action'])); + if (set_custom_massupdate_object($this,'task',$p,$_REQUEST['action'])) { + // + } } $msg = addLine($msg,$p->save()); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2013-11-22 12:09:58
|
Revision: 1183 http://sourceforge.net/p/tutos/code/1183 Author: gokohnert Date: 2013-11-22 12:09:54 +0000 (Fri, 22 Nov 2013) Log Message: ----------- fixes (mail dispolay / autoimport / mailbox) Modified Paths: -------------- trunk/php/handler.pinc trunk/php/mail.pinc trunk/php/mailbox/mailbox.pinc trunk/php/mailbox/mailbox_show.php trunk/php/permission.p3 trunk/php/phpweather/pw.pinc trunk/php/reminder/reminder.pinc trunk/php/user.pinc trunk/php/webelements.p3 trunk/test.sh Modified: trunk/php/handler.pinc =================================================================== --- trunk/php/handler.pinc 2013-11-20 20:49:06 UTC (rev 1182) +++ trunk/php/handler.pinc 2013-11-22 12:09:54 UTC (rev 1183) @@ -15,7 +15,7 @@ * run handler for given input and type */ Function handle($type,$obj,$arg) { - global $tutos; + global $tutos,$msg,$info; $r = ''; $cnt = 0; Modified: trunk/php/mail.pinc =================================================================== --- trunk/php/mail.pinc 2013-11-20 20:49:06 UTC (rev 1182) +++ trunk/php/mail.pinc 2013-11-22 12:09:54 UTC (rev 1183) @@ -39,6 +39,7 @@ $this->url = "http://\r\n"; $this->part = 1; $this->bodies = array(); + $this->body = ''; } /** @@ -532,7 +533,7 @@ $this->hdr[] = $line; } else if (preg_match("#^From:(.*)#i",$line,$reg)) { $this->parse_in = ""; - $this->setFromTxt(trim($reg[1])); + $this->from_adr = trim($reg[1]); $this->hdr[] = $line; } else if (preg_match("#^From(.*)#i",$line,$reg)) { $this->parse_in = ""; @@ -856,7 +857,7 @@ /** * parse a mail from an tutos_document */ - function init_by_file_obj(&$obj,$short) { + function init_by_file_obj($obj,$short) { $this->init_by_file($obj->base ."/". $obj->fileloc,$short); $this->replyurl= addUrlParameter($this->replyurl,"fid=".$obj->id); } @@ -1009,10 +1010,12 @@ $r .= $lang['MailboxEmail'] ."\n"; $r .= sprintf('%-10s: ',$lang['MailFrom']); if ($this->from_adr != "") { - $r .= $this->adr_format($this->from_adr) ."\n"; + $r .= $this->adr_format($this->from_adr); } else if (isset($this->from) && is_object($this->from)) { - $r .= $this->from->getLink() ."\n"; + $r .= $this->from->getLink(); + } else { } + $r .= "\n"; $r .= sprintf('%-10s: ',$lang['MailDate']). $this->date ."\n"; $r .= sprintf('%-10s: ',$lang['MailTo']); $to = ""; Modified: trunk/php/mailbox/mailbox.pinc =================================================================== --- trunk/php/mailbox/mailbox.pinc 2013-11-20 20:49:06 UTC (rev 1182) +++ trunk/php/mailbox/mailbox.pinc 2013-11-22 12:09:54 UTC (rev 1183) @@ -51,7 +51,7 @@ $this->type = 'imap'; $this->port = 143; $this->check = ''; - $this->mbox = ''; + $this->mbox = false; $this->orgpath = $this->path ; $this->addpath = '' ; $this->tablename = $this->dbconn->prefix .$table['mailbox'][name]; @@ -143,7 +143,7 @@ } /** - * Return a link to this mailbox (for an overview) + * */ function check() { if ( ! function_exists('imap_open') ) { @@ -153,10 +153,10 @@ // Already checked return; } - if ( $this->mbox == '' ) { + if ( $this->mbox == false ) { $this->open(); } - if ( $this->mbox != '' ) { + if ( $this->mbox != false ) { $this->check = imap_mailboxmsginfo($this->mbox); } } @@ -165,7 +165,7 @@ * method to call from check service */ static function checkservice (tutos_user $user) { - global $table,$current_user,$lang; + global $table,$current_user,$lang,$msg,$info; loadmodule('file'); @@ -174,6 +174,7 @@ $r = $user->dbconn->Exec($q); $n = $r->numrows(); $a = 0; + while ($a < $n) { $m = new Mailbox($user->dbconn); $m->read_result($r,$a); @@ -182,12 +183,14 @@ unset($m); continue; } - $msg = addLine($msg,$m->open()); - if ($m->mbox == '') { + $m->open(); + if ($m->mbox == false) { + $msg = addLine($msg, 'CHECK MAIL could not open for autoimport ->'.$m); $a++; unset($m); continue; } + $headers = imap_sort($m->mbox,SORTFROM,0,SE_UID); foreach ($headers as $hkey => $hval) { @@ -198,19 +201,20 @@ $b = imap_fetchheader($m->mbox,imap_msgno($m->mbox,$hval)); $b .= imap_body($m->mbox,imap_msgno($m->mbox,$hval)); $email_adr = array(); - if (isset($hdr->from) && is_array($hdr->from)) + if (isset($hdr->from) && is_array($hdr->from) && count($hdr->from)) foreach ($hdr->from as $id => $o) { array_push($email_adr, strtolower($o->mailbox . "@" . $o->host)); } - if (isset($hdr->to) && is_array($hdr->to)) + if (isset($hdr->to) && is_array($hdr->to) && count($hdr->to)) foreach ($hdr->to as $id => $o) { - array_push($email_adr, strtolower($o->mailbox . "@" . $o->host)); + if (isset($o->host)) + array_push($email_adr, strtolower($o->mailbox . "@" . $o->host)); } - if (isset($hdr->cc) && is_array($hdr->cc)) + if (isset($hdr->cc) && is_array($hdr->cc) && count($hdr->cc)) foreach ($hdr->cc as $id => $o) { array_push($email_adr, strtolower($o->mailbox . "@" . $o->host)); } - if (isset($hdr->bcc)) + if (isset($hdr->bcc) && is_array($hdr->bcc) && count($hdr->bcc)) foreach ($hdr->bcc as $id => $o) { array_push($email_adr, strtolower($o->mailbox . "@" . $o->host)); } @@ -240,6 +244,7 @@ unset($f); continue; } + // check if file already exists (check md5) $arr = array(); $found = false; @@ -251,7 +256,10 @@ break; } } - if ($found) continue; + if ($found) { + unset($f); + continue; + } } $pre = " and ("; @@ -269,8 +277,9 @@ $adr = new Tutos_address($user->dbconn); $nn = $r1->get($i1,'adr_id'); $adr = $adr->read($nn,$adr); - if (is_object($adr)) + if (is_object($adr)) { $f->addReference($adr); + } $i1++; } $r1->free(); @@ -469,6 +478,7 @@ $this->mbox = @imap_open($c, $this->user, $this->pw); # echo $c ." U:". $this->user ." P:". $this->pw ."<br />"; $this->errors("open"); + return $this->mbox; } /** @@ -481,7 +491,7 @@ if ( $this->mbox != "" ) { @imap_close($this->mbox,CL_EXPUNGE); } - $this->mbox = ""; + $this->mbox = false; $this->errors("close"); } @@ -501,14 +511,16 @@ */ function errors ($where = "") { global $msg; + if ( ! function_exists('imap_open') ) { + $msg = addLine($msg,"IMAP not installed"); return false; } $r = true; $e = imap_errors(); if ( $e ) { foreach ($e as $key => $val) { - $msg = addLine($msg,"ERROR : ". $where ." ". $this->mbox ." - ". $val . " ". $this->getConnString()); + $msg = addLine($msg,"IMAP ERROR : ". $where ." ". $this->mbox ." - ". $val . " ". $this->getConnString()); $r = false; } } @@ -802,4 +814,4 @@ return $r; } } -?> +?> \ No newline at end of file Modified: trunk/php/mailbox/mailbox_show.php =================================================================== --- trunk/php/mailbox/mailbox_show.php 2013-11-20 20:49:06 UTC (rev 1182) +++ trunk/php/mailbox/mailbox_show.php 2013-11-22 12:09:54 UTC (rev 1183) @@ -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 @@ -10,6 +10,8 @@ * @module mailbox_show * @package mailbox */ +$tutos['files'][__FILE__] = '$Rev$'; + $tutos['base'] = "../.."; ini_set("include_path",".."); require_once 'webelements.p3'; @@ -84,8 +86,8 @@ } $this->addHidden("search",$this->search); $r .= $this->OverviewTableStart(); - $r .= "<thead>\n"; - $r .= "<tr>\n"; + $r .= $this->OverviewHeadStart(); + $r .= $this->OverviewHeadLineStart(); $r .= ' <th colspan="7" class="nodeco">'. $this->obj->getFullname().' → '; $r .= menulink($this->obj->parent->getUrl(),$lang[$this->obj->parent->gettype()].' '.$this->obj->parent->getFullname()); if ( $this->obj->email != "" ) { @@ -99,15 +101,16 @@ $r .= "</tr>\n"; } $r .= "<tr>\n"; - $r .= " <th>ID</th>\n"; + $r .= $this->orderHeader('','ID',$this->link1); $r .= $this->orderHeader(1+SORTDATE,$lang['MailboxSDate'],$this->link1); $r .= $this->orderHeader(1+SORTSUBJECT,$lang['MailboxSubject'],$this->link1); $r .= $this->orderHeader('',$lang['MailboxSender'],$this->link1); $r .= $this->orderHeader('',$lang['MailboxFlags'],$this->link1); $r .= $this->orderHeader(1+SORTSIZE,$lang['MailSize'],$this->link1); $r .= $this->MassUpdateHeader(); - $r .= "</tr>\n"; - $r .= "</thead>\n"; + $r .= $this->OverviewHeadLineEnd(); + $r .= $this->OverviewHeadEnd(); + $r .= $this->OverviewBodyStart(); $n = 0; if ( $this->start == -1 ) { @@ -139,48 +142,55 @@ # $r .= $hval ." ". $hkey ." ". $u ."<br />"; $d->setDateTimeTS($hdr->udate); + $r .= $this->OverviewRowStart($n); - $r .= ' <td class="over1">'. makelink("mailbox/mail_show.php?mno=". $u ."&id=". $this->obj->id ."&path=". base64_encode($this->obj->addpath) ,$this->theme->getImage(mail,'list') . sprintf("%'_6d",$id) ,"") ."</td>\n"; - $r .= " <td>"; + + $x = makelink("mailbox/mail_show.php?mno=". $u ."&id=". $this->obj->id ."&path=". base64_encode($this->obj->addpath) ,$this->theme->getImage(mail,'list') . sprintf("%'_6d",$id) ,""); + $r .= $this->OverviewRowBlock($x,'over_l'); + if ( $hdr->date ) { - $r .= $hdr->date; + $x = $hdr->date; } else { - $r .= $d->getDateTime(); + $x = $d->getDateTime(); } - $r .= " </td>\n"; - $r .= ' <td>'; + $r .= $this->OverviewRowBlock($x,'over_l'); + + if ( isset($hdr->subject) ) { $s = iconv_mime_decode($hdr->subject,ICONV_MIME_DECODE_CONTINUE_ON_ERROR,$lang['content_encoding']); if ( $this->search ) { $s = preg_replace("#(". $this->search .")#i","<span class=\"found\">\\1</span>",$s); } - $r .= " ". $s; + $x = $s; } else { - $r .= "<i><font size=\"-2\">". $lang['MailNoSubject'] ."</font></i>"; + $x = "<i><font size=\"-2\">". $lang['MailNoSubject'] ."</font></i>"; } - $r .= " </td>\n"; - $r .= " <td>\n"; + $r .= $this->OverviewRowBlock($x,'over_l'); + + $pre = ''; + $x = ''; if ( isset($hdr->from) ) { - @reset($hdr->from); - while (list ($key,$val) = @each ($hdr->from)) { - $r .= $pre; + foreach ($hdr->from as $key => $val) { + $x .= $pre; $adr = $this->obj->make_mailto($val); $from = ''; if ( isset($val->personal) ) { # $from = decodeheader($val->personal); $from = iconv_mime_decode($val->personal,ICONV_MIME_DECODE_CONTINUE_ON_ERROR,$lang['content_encoding']); - $r .= AsEmail($from,$adr,$from,"Re:". $s); + $x .= AsEmail($from,$adr,$from,"Re:". $s); } else { - $r .= AsEmail($adr,$adr,"","Re:". $s); + $x .= AsEmail($adr,$adr,"","Re:". $s); } $pre = "<br />\n"; } } - $r .= " </td>\n"; - $r .= " <td> ". $hdr->Recent . $hdr->Unseen . $hdr->Answered . $hdr->Deleted . $hdr->Draft . $hdr->Flagged ."</td>\n"; + $r .= $this->OverviewRowBlock($x,'over_l'); + + $r .= $this->OverviewRowBlock($hdr->Recent . $hdr->Unseen . $hdr->Answered . $hdr->Deleted . $hdr->Draft . $hdr->Flagged,'over_l'); + // pretty format size - $r .= " <td align=\"right\">". format_size($hdr->size) ."</td>\n"; + $r .= $this->OverviewRowBlock(format_size($hdr->Size),'over_r'); $r .= " <td><center>\n"; $r .= ' <input class="m_field" name="mark[]" type="checkbox" value="'. $u ."\" />\n"; @@ -190,6 +200,8 @@ unset ($hdr); } + $r .= $this->OverviewBodyEnd(); + $r .= $this->OverviewFootStart(); $l = $this->obj->getUrl(); $l = addUrlParameter($l,"path=".base64_Encode($this->obj->addpath)); @@ -239,6 +251,7 @@ } + $r .= $this->OverviewFootEnd(); $r .= $this->OverviewTableEnd(); $this->addHidden("id",$this->obj->id); hiddenFormElements(); @@ -251,7 +264,7 @@ * prepare */ Function prepare() { - global $msg,$lang; + global $msg,$info,$lang; $this->obj = new mailbox($this->dbconn); $this->name = $lang['MailboxOverview']; @@ -271,17 +284,17 @@ $this->link1 = addUrlParameter($this->link1,"id=".UrlEncode($_GET['id'])); } else { $this->stop = true; - $msg .= sprintf($lang['Err0040'],$lang[$this->obj->getType()]); + $msg = addLine($msg,sprintf($lang['Err0040'],$lang[$this->obj->getType()])); return; } if ( ! is_object($this->obj) ) { - $msg .= sprintf($lang['Err0040'],$lang['Mailbox']); + $msg = addLine($msg,sprintf($lang['Err0040'],$lang['Mailbox'])); $this->stop = true; } else if ( $this->obj->id < 1 ) { - $msg .= sprintf($lang['Err0040'],$lang[$this->obj->getType()]); + $msg = addLine($msg,sprintf($lang['Err0040'],$lang[$this->obj->getType()])); $this->stop = true; } else if ( ! $this->obj->see_ok() ) { - $msg .= sprintf($lang['Err0022'],$lang[$this->obj->getType()]); + $msg = addLine($msg,sprintf($lang['Err0022'],$lang[$this->obj->getType()])); $this->stop = true; } @@ -344,8 +357,9 @@ $this->doask = true; } else { $this->stop = true; + $msg = addLine($msg,'NIX'); + return; } - return; } } @@ -354,20 +368,20 @@ // Delete a mail if ( isset($_GET['del']) ) { $this->obj->delete_mail($_GET['del']); - $msg .= $lang['MailDeleted']; + $msg = addLine($msg,$lang['MailDeleted']); } // Delete a folder if ( isset($_GET['delfolder']) ) { if ( $_GET['delfolder'] != "" ){ - $msg .= $this->obj->deletefolder(base64_Decode($_GET['delfolder'])); - $msg .= sprintf($lang['MailFolderDeleted'], base64_Decode($_GET['delfolder'])); + $msg = addLine($msg,$this->obj->deletefolder(base64_Decode($_GET['delfolder']))); + $msg = addLine($msg,sprintf($lang['MailFolderDeleted'], base64_Decode($_GET['delfolder']))); } } // Create new folder if ( isset($_GET['new']) ) { if ( $_GET['new'] != "" ){ - $msg .= $this->obj->createfolder($_GET['new']); - $msg .= sprintf($lang['MailFolderCreated'], $_GET['new']); + $msg = addLine($msg,$this->obj->createfolder($_GET['new'])); + $msg = addLine($msg,sprintf($lang['MailFolderCreated'], $_GET['new'])); } } // Some action Modified: trunk/php/permission.p3 =================================================================== --- trunk/php/permission.p3 2013-11-20 20:49:06 UTC (rev 1182) +++ trunk/php/permission.p3 2013-11-22 12:09:54 UTC (rev 1183) @@ -209,6 +209,18 @@ if (!$xxxx) dterror_log("session_start failed\n", 3, $tutos[errlog]); } +// see same checks in login.pinc +if ( defined('useldap') && ! function_exists('ldap_connect')) { + $tutos[useldap] = 0; +} +if ( ! function_exists('imap_open')) { + $tutos[usemailboxes] = 0; +} +if ( ($tutos[usedocmanagement] != 0) && (('Off' == ini_get('file_uploads')) || ('1' != ini_get('file_uploads'))) ) { + $tutos[usedocmanagement] = 0; +} + + // TODO: check ! // set_magic_quotes_runtime(0); Modified: trunk/php/phpweather/pw.pinc =================================================================== --- trunk/php/phpweather/pw.pinc 2013-11-20 20:49:06 UTC (rev 1182) +++ trunk/php/phpweather/pw.pinc 2013-11-22 12:09:54 UTC (rev 1183) @@ -13,7 +13,7 @@ require_once 'phpweather/hconfig.pinc'; if ( ! file_exists($tutos['pw_path'].'phpweather.php') ) { - echo "Please install http://phpweather.sourceforge.net or disable the phpweather handler in config.php<br />\n"; + die('Please install http://phpweather.sourceforge.net or disable the phpweather handler in config.php'); return; } require_once $tutos['pw_path'] . 'phpweather.php'; Modified: trunk/php/reminder/reminder.pinc =================================================================== --- trunk/php/reminder/reminder.pinc 2013-11-20 20:49:06 UTC (rev 1182) +++ trunk/php/reminder/reminder.pinc 2013-11-22 12:09:54 UTC (rev 1183) @@ -832,7 +832,7 @@ * Check for reminders that are due to remind */ static function checkservice (tutos_user $user) { - global $tutos,$lang,$table; + global $tutos,$lang,$table,$msg,$info; $msg = ''; Modified: trunk/php/user.pinc =================================================================== --- trunk/php/user.pinc 2013-11-20 20:49:06 UTC (rev 1182) +++ trunk/php/user.pinc 2013-11-22 12:09:54 UTC (rev 1183) @@ -47,17 +47,6 @@ $this->updatepw = 0; $this->acldefault= array(); - // see same checks in login.pinc - if ( defined('useldap') && ! function_exists('ldap_connect')) { - $tutos[useldap] = 0; - } - if ( ! function_exists('imap_open')) { - $tutos[usemailboxes] = 0; - } - if ( ($tutos[usedocmanagement] != 0) && (('Off' == ini_get('file_uploads')) || ('1' != ini_get('file_uploads'))) ) { - $tutos[usedocmanagement] = 0; - } - // Allowed Features are defaulted by config.php $this->p = array(); for ( $i = -1 ; $i > -100 ; $i-- ) { Modified: trunk/php/webelements.p3 =================================================================== --- trunk/php/webelements.p3 2013-11-20 20:49:06 UTC (rev 1182) +++ trunk/php/webelements.p3 2013-11-22 12:09:54 UTC (rev 1183) @@ -2423,7 +2423,7 @@ return $ly->theme->getImage(page_zip,'list'); } else if (preg_match('#.(ini|h|c|cpp)$#i',$fn)) { return $ly->theme->getImage(page_txt,'list'); - } else if (preg_match('#.(jpg|jpeg|png|bmp|gif)#i',$fn)) { + } else if (preg_match('#.(jpg|jpeg|png|bmp|gif)$#i',$fn)) { return $ly->theme->getImage(page_img,'list'); } else if (preg_match('#.(eml|msg)$#i',$fn)) { return $ly->theme->getImage(mail,'list'); Modified: trunk/test.sh =================================================================== --- trunk/test.sh 2013-11-20 20:49:06 UTC (rev 1182) +++ trunk/test.sh 2013-11-22 12:09:54 UTC (rev 1183) @@ -140,7 +140,7 @@ rm -f $OUT2 SID=`cat $COOKIES | tail -1 | cut -f 7` -SNAP="cutycapt --min-width=1024 --header=COOKIE:TUTOS=$SID" +SNAP="CutyCapt --min-width=1024 --header=COOKIE:TUTOS=$SID" # Create product wget --load-cookies=$COOKIES --save-cookies=$COOKIES -a $OUT -O $OUT2 \ @@ -673,7 +673,7 @@ wget --save-cookies $COOKIES -a $OUT -O $OUT2 "$URL/mytutos.php?uname=$USER&pw=$PW&dbnr=$DBNR" check_output mytutos.php $OUT2 SID=`cat $COOKIES | tail -1 | cut -f 7` -SNAP="cutycapt --min-width=1024 --header=COOKIE:TUTOS=$SID" +SNAP="CutyCapt --min-width=1024 --header=COOKIE:TUTOS=$SID --max-wait=5000 " # Create and delete note This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2013-11-20 20:49:09
|
Revision: 1182 http://sourceforge.net/p/tutos/code/1182 Author: gokohnert Date: 2013-11-20 20:49:06 +0000 (Wed, 20 Nov 2013) Log Message: ----------- fix Modified Paths: -------------- trunk/Makefile trunk/apache.conf.in trunk/config.php.in trunk/php/config_default.pinc trunk/php/user_select.php Modified: trunk/Makefile =================================================================== --- trunk/Makefile 2013-11-20 13:39:51 UTC (rev 1181) +++ trunk/Makefile 2013-11-20 20:49:06 UTC (rev 1182) @@ -812,6 +812,8 @@ @$(CHMOD) 777 ${TESTPATH}/repo mkdir -p ${TESTPATH}/tmp @$(CHMOD) 777 ${TESTPATH}/tmp + mkdir -p ${TESTPATH}/php + @$(foreach d,$(wildcard TUTOS-*.zip), \ unzip -n -d ${TESTPATH} $(d); \ ) @@ -825,7 +827,7 @@ -e 's;%PREFIX%;${TESTPATH};g' \ -e 's;%FULLVERSION;${FULLVERSION};g' < config.php.in > ${TESTPATH}/php/config.php @${CHMOD} 644 ${TESTPATH}/php/config.php - mysql -h ${HOST} -p -u root -e "drop database if exists tutostest;create database tutostest;GRANT ALL PRIVILEGES ON tutostest.* TO wwwrun IDENTIFIED BY 'tutos-test'" + mysql -h ${HOST} -p -u root -e "drop database if exists tutostest;create database tutostest;GRANT ALL PRIVILEGES ON tutostest.* TO wwwrun@localhost IDENTIFIED BY 'tutos-test'" wget -O ${TESTPATH}/test0.html "http://${HOST}/tutos-test/php/admin/scheme.php?id=0&step=0" wget -O ${TESTPATH}/test1.html "http://${HOST}/tutos-test/php/admin/scheme.php?id=0&step=1" wget -O ${TESTPATH}/test2.html "http://${HOST}/tutos-test/php/admin/scheme.php?id=0&step=2" Modified: trunk/apache.conf.in =================================================================== --- trunk/apache.conf.in 2013-11-20 13:39:51 UTC (rev 1181) +++ trunk/apache.conf.in 2013-11-20 20:49:06 UTC (rev 1182) @@ -24,6 +24,7 @@ Alias /tutos "%PREFIX%" <Directory "%PREFIX%"> + Require all granted # Remove next line when already defined in httpd.conf # .pinc files must be interpreted by PHP to avoid password stealing ! AddType application/x-httpd-php .pinc @@ -39,7 +40,7 @@ php_value memory_limit "256M" php_value upload_max_filesize "20M" DirectoryIndex index.html - Options MultiViews FollowSymLinks +Includes -Indexes + Options +MultiViews +FollowSymLinks +Includes -Indexes AllowOverride All # if you receive your TUTOS via svn the following line makes sense <IfModule mod_rewrite.c> Modified: trunk/config.php.in =================================================================== --- trunk/config.php.in 2013-11-20 13:39:51 UTC (rev 1181) +++ trunk/config.php.in 2013-11-20 20:49:06 UTC (rev 1182) @@ -12,7 +12,6 @@ $tutos[dbtype][0] = 14; $tutos[dbalias][0] = "MYSQL TEST database"; $tutos[cryptpw][0] = 1; -$tutos[repository][0] = "%PREFIX%/repo/"; $tutos[dbprefix][0] = "test"; $tutos[baseurl][0] = "http://%HOST%/tutos-test"; @@ -22,9 +21,6 @@ // do generate simple passwords for test $tutos['pw'] = 1; -$tutos[sessionpath] = '%PREFIX%/tmp'; -$tutos[errlog] = $tutos[sessionpath] .'/debug.out'; - @include_once('checklist/mconfig.pinc'); @include_once('scrum/mconfig.pinc'); @include_once('stuff/mconfig.pinc'); Modified: trunk/php/config_default.pinc =================================================================== --- trunk/php/config_default.pinc 2013-11-20 13:39:51 UTC (rev 1181) +++ trunk/php/config_default.pinc 2013-11-20 20:49:06 UTC (rev 1182) @@ -732,7 +732,7 @@ // // The TUTOS Version number // -$tutos[version] = '1.9.20130804'; +$tutos[version] = '1.9.20131120'; // ### Local Variables: *** ### mode:iso-accents *** Modified: trunk/php/user_select.php =================================================================== --- trunk/php/user_select.php 2013-11-20 13:39:51 UTC (rev 1181) +++ trunk/php/user_select.php 2013-11-20 20:49:06 UTC (rev 1182) @@ -90,13 +90,14 @@ $r .= $this->ContentRowEnd(); // add custom selectors - foreach ($x as $s) { - $r .= $this->ContentRowStart('ext'); - $r .= $this->showfieldc($s[0]); - $r .= $this->showdata($s[1],2); - $r .= $this->ContentRowEnd(); + if (count($x)) { + foreach ($x as $s) { + $r .= $this->ContentRowStart('ext'); + $r .= $this->showfieldc($s[0]); + $r .= $this->showdata($s[1],2); + $r .= $this->ContentRowEnd(); + } } - $r .= $this->SelectTableEnd(); $r .= hiddenFormElements(); $r .= $this->getHidden(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2013-11-20 13:39:54
|
Revision: 1181 http://sourceforge.net/p/tutos/code/1181 Author: gokohnert Date: 2013-11-20 13:39:51 +0000 (Wed, 20 Nov 2013) Log Message: ----------- buttons Modified Paths: -------------- trunk/php/file/file.pinc Modified: trunk/php/file/file.pinc =================================================================== --- trunk/php/file/file.pinc 2013-11-20 08:28:48 UTC (rev 1180) +++ trunk/php/file/file.pinc 2013-11-20 13:39:51 UTC (rev 1181) @@ -1708,7 +1708,7 @@ return $r; } $r .= $user->layout->ContentRowStart(); - $r .= $user->layout->showfield($lang['Files']); + $r .= $user->layout->show_info_field($lang['Files'],$obj,get_class()); if ( $format == "paper" ) { $d = show_Files($user,$obj,-1); } else { @@ -1776,6 +1776,26 @@ } /** + * create a link for an overview filtered by $obj + */ + static function getOverviewLinkObj (tutos_user $user,tutos_base $obj,$text = "") { + global $lang; + + if (! is_object($obj) ) return ''; + if ( $obj->id == -1 ) return ''; + if (! $user->feature_ok(usedocmanagement,PERM_SEE) ) return ''; + if (! $obj->obj_feature_ok($user,usedocmanagement,PERM_SEE) ) return ''; + if (! $obj->see_ok() ) return ''; + + return array( url => 'file/file_overview.php?link_id='.$obj->id, + confirm => false, + text => ($text == '' ? $lang['FileOverview']:$text), + info => $lang['FileOverview'], + category => array(AAA::getType(),'overview','module',usedocmanagement) + ); + } + + /** * show the mytutos info about files */ static function mytutos (tutos_user $user) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2013-11-20 08:28:51
|
Revision: 1180 http://sourceforge.net/p/tutos/code/1180 Author: gokohnert Date: 2013-11-20 08:28:48 +0000 (Wed, 20 Nov 2013) Log Message: ----------- fix deselect of others in acl Modified Paths: -------------- trunk/php/acl_new.php trunk/php/user_new.php Modified: trunk/php/acl_new.php =================================================================== --- trunk/php/acl_new.php 2013-11-19 19:19:15 UTC (rev 1179) +++ trunk/php/acl_new.php 2013-11-20 08:28:48 UTC (rev 1180) @@ -69,12 +69,8 @@ global $lang,$tutos; $r = ''; - $nr["r"] = 0; - $nr["u"] = 1; - $nr["m"] = 2; - $nr["d"] = 3; if ($this->feature == 0) { - $js = " "; + $js = " "; } else { $js = ''; } @@ -190,37 +186,25 @@ $r .= '<script language="JavaScript" type="text/javascript">'."\n"; $r .= "//<![CDATA[\n"; $r .= " function deselect (obj,nr) { \n"; - $r .= " var w = obj.elements[0]; \n"; - $r .= " var x = obj.elements[1]; \n"; - $r .= " var y = obj.elements[2]; \n"; - $r .= " var z = obj.elements[3]; \n"; - $r .= " \n"; - $r .= " for (var i = 0; i < w.options.length; i++) {\n"; - $r .= " if ( (nr == 0) && (w.options[i].selected) ) {\n"; - $r .= " x.options[i].selected = false;\n"; - $r .= " y.options[i].selected = false;\n"; - $r .= " z.options[i].selected = false;\n"; - $r .= " }\n"; - $r .= " if ( (nr == 1) && (x.options[i].selected) ) {\n"; - $r .= " w.options[i].selected = false;\n"; - $r .= " y.options[i].selected = false;\n"; - $r .= " z.options[i].selected = false;\n"; - $r .= " }\n"; - $r .= " if ( (nr == 2) && (y.options[i].selected) ) {\n"; - $r .= " w.options[i].selected = false;\n"; - $r .= " x.options[i].selected = false;\n"; - $r .= " z.options[i].selected = false;\n"; - $r .= " }\n"; - $r .= " if ( (nr == 3) && (z.options[i].selected) ) {\n"; - $r .= " w.options[i].selected = false;\n"; - $r .= " x.options[i].selected = false;\n"; - $r .= " y.options[i].selected = false;\n"; - $r .= " }\n"; - $r .= " }\n"; + $r .= " $('#aclnew_'+nr+' option:selected').each(function() {; \n"; + $r .= " v = $(this).val(); \n"; + $r .= " if (nr != 'r') { \n"; + $r .= " $('#aclnew_r option[value='+v+']').attr('selected',false); \n"; + $r .= " } \n"; + $r .= " if (nr != 'u') { \n"; + $r .= " $('#aclnew_u option[value='+v+']').attr('selected',false); \n"; + $r .= " } \n"; + $r .= " if (nr != 'm') { \n"; + $r .= " $('#aclnew_m option[value='+v+']').attr('selected',false); \n"; + $r .= " } \n"; + $r .= " if (nr != 'd') { \n"; + $r .= " $('#aclnew_d option[value='+v+']').attr('selected',false); \n"; + $r .= " } \n"; + $r .= " })\n"; $r .= " }\n"; $r .= "//]]>\n"; $r .= "</script>\n"; - $r .= "<form name=\"aclnew\" action=\"acl_ins.php\" method=\"post\">\n"; + $r .= "<form id=\"aclnew\" name=\"aclnew\" action=\"acl_ins.php\" method=\"post\">\n"; $r .= $this->DataTableStart(); Modified: trunk/php/user_new.php =================================================================== --- trunk/php/user_new.php 2013-11-19 19:19:15 UTC (rev 1179) +++ trunk/php/user_new.php 2013-11-20 08:28:48 UTC (rev 1180) @@ -54,12 +54,8 @@ global $lang,$tutos; $r = ''; - $nr["r"] = 0; - $nr["u"] = 1; - $nr["m"] = 2; - $nr["d"] = 3; - $js = ""; - $r .= ' <select multiple="multiple" size="'. min(2+count($this->obj->teamlist),$tutos['maxshow']) ."\" name=\"". $name ."[]\" ". $js .">\n"; + $js = ""; + $r .= ' <select id="dacl_'.$name.'" multiple="multiple" size="'. min(2+count($this->obj->teamlist),$tutos['maxshow']) ."\" name=\"". $name ."[]\" ". $js .">\n"; if ( isset($this->obj->acldefault[EVERYBODY]) ) { $l = $this->obj->acldefault[EVERYBODY]; @@ -109,39 +105,22 @@ $r .= '<script language="JavaScript" type="text/javascript">'; $r .= "//<![CDATA[\n"; $r .= " function deselect (obj,nr) { \n"; - $r .= " for(var j = 0; j <= obj.length ; j++) {\n"; - $r .= " if ( obj.elements[j].name == \"r[]\" ) {\n"; - $r .= " var w = obj.elements[j]; \n"; - $r .= " var x = obj.elements[j+1]; \n"; - $r .= " var y = obj.elements[j+2]; \n"; - $r .= " var z = obj.elements[j+3]; \n"; - $r .= " break; \n"; - $r .= " }\n"; + $r .= " $('#dacl_'+nr+' option:selected').each(function() {; \n"; + $r .= " v = $(this).val(); \n"; + $r .= " if (nr != 'r') { \n"; + $r .= " $('#dacl_r option[value='+v+']').attr('selected',false); \n"; + $r .= " } \n"; + $r .= " if (nr != 'u') { \n"; + $r .= " $('#dacl_u option[value='+v+']').attr('selected',false); \n"; + $r .= " } \n"; + $r .= " if (nr != 'm') { \n"; + $r .= " $('#dacl_m option[value='+v+']').attr('selected',false); \n"; + $r .= " } \n"; + $r .= " if (nr != 'd') { \n"; + $r .= " $('#dacl_d option[value='+v+']').attr('selected',false); \n"; + $r .= " } \n"; + $r .= " })\n"; $r .= " }\n"; - $r .= " \n"; - $r .= " for (var i = 0; i < w.options.length; i++) {\n"; - $r .= " if ( (nr == 0) && (w.options[i].selected) ) {\n"; - $r .= " x.options[i].selected = false;\n"; - $r .= " y.options[i].selected = false;\n"; - $r .= " z.options[i].selected = false;\n"; - $r .= " }\n"; - $r .= " if ( (nr == 1) && (x.options[i].selected) ) {\n"; - $r .= " w.options[i].selected = false;\n"; - $r .= " y.options[i].selected = false;\n"; - $r .= " z.options[i].selected = false;\n"; - $r .= " }\n"; - $r .= " if ( (nr == 2) && (y.options[i].selected) ) {\n"; - $r .= " w.options[i].selected = false;\n"; - $r .= " x.options[i].selected = false;\n"; - $r .= " z.options[i].selected = false;\n"; - $r .= " }\n"; - $r .= " if ( (nr == 3) && (z.options[i].selected) ) {\n"; - $r .= " w.options[i].selected = false;\n"; - $r .= " x.options[i].selected = false;\n"; - $r .= " y.options[i].selected = false;\n"; - $r .= " }\n"; - $r .= " }\n"; - $r .= " }\n"; $r .= "//]]>\n"; $r .= "</script>"; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2013-11-19 19:19:19
|
Revision: 1179 http://sourceforge.net/p/tutos/code/1179 Author: gokohnert Date: 2013-11-19 19:19:15 +0000 (Tue, 19 Nov 2013) Log Message: ----------- new button for add/overview in show pages Modified Paths: -------------- trunk/html/new2_layout.css trunk/php/bugtracking/bug.pinc trunk/php/expense/expense.pinc trunk/php/installation/installation.pinc trunk/php/invoice/invoice.pinc trunk/php/layout/new2_layout.pinc trunk/php/layout/new_base.pinc trunk/php/note/note.pinc trunk/php/reminder/reminder.pinc trunk/php/scrum/scrum.pinc trunk/php/testmanager/testmanager.pinc trunk/php/url/url.pinc Modified: trunk/html/new2_layout.css =================================================================== --- trunk/html/new2_layout.css 2013-11-19 15:22:30 UTC (rev 1178) +++ trunk/html/new2_layout.css 2013-11-19 19:19:15 UTC (rev 1179) @@ -146,3 +146,25 @@ top: 7px; left: 27px; } + +.oh { + overflow: visible; +} + +.oh_left { + float: left; + text-align: left; + vertical-align: top; +} + +.oh_center { + float: left; + text-align: center +} + +.oh_right { + float: right; + text-align: right; + vertical-align: top; +} + Modified: trunk/php/bugtracking/bug.pinc =================================================================== --- trunk/php/bugtracking/bug.pinc 2013-11-19 15:22:30 UTC (rev 1178) +++ trunk/php/bugtracking/bug.pinc 2013-11-19 19:19:15 UTC (rev 1179) @@ -1972,7 +1972,7 @@ if($obj->getTypeId() == usebugtracking) { $r .= $user->layout->showfield($lang['BugFollowBy']); } else { - $r .= $user->layout->showfield($lang['Bugs']); + $r .= $user->layout->show_info_field($lang['Bugs'],$obj,get_class()); } $d = ''; $pre = ''; @@ -2226,6 +2226,27 @@ } /** + * create a link for an overview filtered by $obj + */ + static function getOverviewLinkObj (tutos_user $user,tutos_base $obj,$text = "") { + global $lang; + + if (! is_object($obj) ) return ''; + if ( $obj->id == -1 ) return ''; + if (! $user->feature_ok(usebugtracking,PERM_SEE) ) return ''; + if (! $obj->obj_feature_ok($user,usebugtracking,PERM_SEE) ) return ''; + if (! $obj->see_ok() ) return ''; + + return array( url => 'bugtracking/bug_overview.php?pid='.$obj->id, + confirm => false, + text => ($text == '' ? $lang['BugsOverview']:$text), + info => $lang['BugsOverview'], + category => array('overview','module',usebugtracking) + ); + } + + + /** * show the mytutos info about bugs */ static function mytutos (tutos_user $user) { @@ -2332,4 +2353,4 @@ return $r; } } -?> +?> \ No newline at end of file Modified: trunk/php/expense/expense.pinc =================================================================== --- trunk/php/expense/expense.pinc 2013-11-19 15:22:30 UTC (rev 1178) +++ trunk/php/expense/expense.pinc 2013-11-19 19:19:15 UTC (rev 1179) @@ -942,7 +942,7 @@ return $r; } $r .= $user->layout->ContentRowStart(); - $r .= $user->layout->showfield($lang['Expenses']); + $r .= $user->layout->show_info_field($lang['Expenses'],$obj,get_class()); if ( $format == 'paper' ) { $d = showExpenses($user,$obj,-1); } else { @@ -1058,6 +1058,26 @@ } /** + * create a link for an overview filtered by $obj + */ + static function getOverviewLinkObj (tutos_user $user,tutos_base $obj,$text = "") { + global $lang; + + if (! is_object($obj) ) return ''; + if ( $obj->id == -1 ) return ''; + if (! $user->feature_ok(useexpenses,PERM_SEE) ) return ''; + if (! $obj->obj_feature_ok($user,useexpenses,PERM_SEE) ) return ''; + if (! $obj->see_ok() ) return ''; + + return array( url => 'expense/expense_overview.php?link_id='.$obj->id, + confirm => false, + text => ($text == '' ? $lang['ExpenseOverview']:$text), + info => $lang['ExpenseOverview'], + category => array('overview','module',useexpenses) + ); + } + + /** * get the help index */ static function getHelpIndex () { @@ -1070,4 +1090,4 @@ return $r; } } -?> +?> \ No newline at end of file Modified: trunk/php/installation/installation.pinc =================================================================== --- trunk/php/installation/installation.pinc 2013-11-19 15:22:30 UTC (rev 1178) +++ trunk/php/installation/installation.pinc 2013-11-19 19:19:15 UTC (rev 1179) @@ -833,7 +833,8 @@ return array( url => 'installation/installation_overview.php?link_id='.$obj->id, confirm => false, text => ($text == '' ? $lang['InstOverview']:$text), - category => array(AAA::getType(),'overview','module',useinstmanagement) + info => $lang['InstOverview'], + category => array('overview','module',useinstmanagement) ); } Modified: trunk/php/invoice/invoice.pinc =================================================================== --- trunk/php/invoice/invoice.pinc 2013-11-19 15:22:30 UTC (rev 1178) +++ trunk/php/invoice/invoice.pinc 2013-11-19 19:19:15 UTC (rev 1179) @@ -1242,7 +1242,7 @@ return $r; } $r .= $user->layout->ContentRowStart(); - $r .= $user->layout->showfield($lang['Invoices']); + $r .= $user->layout->show_info_field($lang['Invoices'],$obj,get_class()); if ( $format == "paper" ) { $d = showInvoice($user,$obj,-1); } else { @@ -1359,6 +1359,26 @@ } /** + * create a link for an overview filtered by $obj + */ + static function getOverviewLinkObj (tutos_user $user,tutos_base $obj,$text = "") { + global $lang; + + if (! is_object($obj) ) return ''; + if ( $obj->id == -1 ) return ''; + if (! $user->feature_ok(useinvoice,PERM_SEE) ) return ''; + if (! $obj->obj_feature_ok($user,useinvoice,PERM_SEE) ) return ''; + if (! $obj->see_ok() ) return ''; + + return array( url => 'invoice/invoice_overview.php?link_id='.$obj->id, + confirm => false, + text => ($text == '' ? $lang['InvOverview']:$text), + info => $lang['InvOverview'], + category => array('overview','module',useinvoice) + ); + } + + /** * create a link to a select page */ static function getSelectLink (tutos_user $user,$text = "") { Modified: trunk/php/layout/new2_layout.pinc =================================================================== --- trunk/php/layout/new2_layout.pinc 2013-11-19 15:22:30 UTC (rev 1178) +++ trunk/php/layout/new2_layout.pinc 2013-11-19 19:19:15 UTC (rev 1179) @@ -129,7 +129,7 @@ global $tutos, $lang; $base = addUrlParameter($base,"xf=".$oname,false); - $r = '<th nowrap="nowrap" colspan="'. $cols ."\">\n"; + $r = '<th class="oh" nowrap="nowrap" colspan="'. $cols ."\">\n"; if ( $ "" ) { $r .= $link; } else { @@ -138,7 +138,7 @@ $txt = preg_replace('#<[/]*[a-z0-9 "=-]*[/]*>#i','',$link); // LEFT $l = addUrlParameter($base,"xo=1",false); - $r .= '<span style="overflow:visible;float:left;text-align:left;vertical-align:top;">'; + $r .= '<span class="oh_left">'; if ( ($this->order_dir == 1) && ($this->order_fld == $oname) ) { $r .= "(". makelink($l ,$this->theme->getImage(up,'list'),sprintf($lang['OrderBy'], $txt)) .")"; } else { @@ -146,7 +146,7 @@ } $r .= ' </span>'; // CENTER - $r .= '<span style="overflow:visible;float:left;text-align:center">'; + $r .= '<span class="oh_center">'; if ( $this->order_fld == $oname ) { $r .= '<b>'. $link .'</b>'; } else { @@ -155,7 +155,7 @@ $r .= '</span>'; // RIGHT $l = addUrlParameter($base,"xo=2",false); - $r .= '<span style="overflow:visible;float:right;text-align:right;vertical-align:top;"> '; + $r .= '<span class="oh_right"> '; if ( ($this->order_dir == 2) && ($this->order_fld == $oname) ) { $r .= '('. makelink($l ,$this->theme->getImage(down,'list'),sprintf($lang['RevOrderBy'],$txt)) .')'; } else { Modified: trunk/php/layout/new_base.pinc =================================================================== --- trunk/php/layout/new_base.pinc 2013-11-19 15:22:30 UTC (rev 1178) +++ trunk/php/layout/new_base.pinc 2013-11-19 19:19:15 UTC (rev 1179) @@ -322,12 +322,16 @@ $id = 'cl_'.$class.'_'.uniqid(); $r = '<td class="desc" valign="top" id="'.$id.'">'.$text; - $r .= '<span style="position:absolute;z-index:999;" id="X'.$id.'">'; - if ($a != '') { - $r .= '<a id="P'.$id.'" href="'.$a[url].'">+</a>'; + $r .= '<span style="position:absolute;" id="X'.$id.'">'; + if ( ($a != '') && isset($a[url])) { + $r .= '<a id="P'.$id.'" href="'.$a[url].'">'.$a[info].'</a>'; + } else if ( ($a != '') && isset($a[0][url])) { + $r .= '<a id="P'.$id.'" href="'.$a[0][url].'">+</a>'; } - if ($b != '') { - $r .= '<a id="O'.$id.'" href="'.$b[url].'">=</a>'; + if ( ($b != '') && isset($b[url])) { + $r .= '<a id="O'.$id.'" href="'.$b[url].'">'.$b[info].'</a>'; + } else if ( ($b != '') && isset($b[0][url])) { + $r .= '<a id="O'.$id.'" href="'.$b[0][url].'">=</a>'; } $r .= '</span>'; $r .='</span>'; Modified: trunk/php/note/note.pinc =================================================================== --- trunk/php/note/note.pinc 2013-11-19 15:22:30 UTC (rev 1178) +++ trunk/php/note/note.pinc 2013-11-19 19:19:15 UTC (rev 1179) @@ -712,7 +712,8 @@ return array( url => 'note/note_overview.php?link_id='.$obj->id, confirm => false, text => ($text == '' ? $lang['NoteOverview']:$text), - category => array(AAA::getType(),'overview','module',usenotes) + info => $lang['NoteOverview'], + category => array('overview','module',usenotes) ); } Modified: trunk/php/reminder/reminder.pinc =================================================================== --- trunk/php/reminder/reminder.pinc 2013-11-19 15:22:30 UTC (rev 1178) +++ trunk/php/reminder/reminder.pinc 2013-11-19 19:19:15 UTC (rev 1179) @@ -728,7 +728,8 @@ return array( url => 'reminder/reminder_overview.php?refid='.$obj->id, confirm => false, text => ($text == '' ? $lang['ReminderOverview']:$text), - category => array(AAA::getType(),'overview','module',usereminder) + info => $lang['ReminderOverview'], + category => array('overview','module',usereminder) ); } Modified: trunk/php/scrum/scrum.pinc =================================================================== --- trunk/php/scrum/scrum.pinc 2013-11-19 15:22:30 UTC (rev 1178) +++ trunk/php/scrum/scrum.pinc 2013-11-19 19:19:15 UTC (rev 1179) @@ -708,9 +708,29 @@ } /** + * create a link for an overview filtered by $obj + */ + static function getOverviewLinkObj (tutos_user $user,tutos_base $obj,$text = "") { + global $lang; + + if (! is_object($obj) ) return ''; + if ( $obj->id == -1 ) return ''; + if (! $user->feature_ok(USESCRUMLOG,PERM_SEE) ) return ''; + if (! $obj->obj_feature_ok($user,USESCRUMLOG,PERM_SEE) ) return ''; + if (! $obj->see_ok() ) return ''; + + return array( url => 'scrum/log_overview.php?p_id='.$obj->id, + confirm => false, + text => ($text == '' ? $lang['ScrumLogOverview']:$text), + info => $lang['ScrumLogOverview'], + category => array('overview','module',USESCRUMLOG) + ); + } + + /** * create a link where a backlog item for the given object could be added */ - static function getaddlink (tutos_user $user,tutos_base $obj,$text = "") { + static function getAddLink (tutos_user $user,tutos_base $obj,$text = "") { global $lang; if (! is_object($obj) ) return ''; @@ -840,7 +860,7 @@ } $r .= $user->layout->ContentRowStart(); if ($obj->getTypeId() == useprojects) { - $r .= $user->layout->showfield($lang['ScrumLogP']); + $r .= $user->layout->show_info_field($lang['ScrumLogP'],$obj,get_class()); } else { $r .= $user->layout->showfield($lang['ScrumLog']); } @@ -1524,6 +1544,26 @@ } /** + * create a link for an overview filtered by $obj + */ + static function getOverviewLinkObj (tutos_user $user,tutos_base $obj,$text = "") { + global $lang; + + if (! is_object($obj) ) return ''; + if ( $obj->id == -1 ) return ''; + if (! $user->feature_ok(USESCRUMSPRINT,PERM_SEE) ) return ''; + if (! $obj->obj_feature_ok($user,USESCRUMSPRINT,PERM_SEE) ) return ''; + if (! $obj->see_ok() ) return ''; + + return array( url => 'scrum/sprint_overview.php?p_id='.$obj->id, + confirm => false, + text => ($text == '' ? $lang['SprintOverview']:$text), + info => $lang['SprintOverview'], + category => array('overview','module',USESCRUMSPRINT) + ); + } + + /** * add alist of all related stuff for a given ref object */ function add_ids(&$ref,&$q,&$sep) { @@ -1639,7 +1679,7 @@ return $r; } $r .= $user->layout->ContentRowStart(); - $r .= $user->layout->showfield($lang['Sprints']); + $r .= $user->layout->show_info_field($lang['Sprints'],$obj,get_class()); $d = ''; $pre = ''; @@ -1687,7 +1727,7 @@ /** * create a link where a sprint for the given object could be added */ - static function getaddlink (tutos_user $user,tutos_base $obj,$text = "") { + static function getAddLink (tutos_user $user,tutos_base $obj,$text = "") { global $lang,$tutos; if (! is_object($obj) ) return ''; Modified: trunk/php/testmanager/testmanager.pinc =================================================================== --- trunk/php/testmanager/testmanager.pinc 2013-11-19 15:22:30 UTC (rev 1178) +++ trunk/php/testmanager/testmanager.pinc 2013-11-19 19:19:15 UTC (rev 1179) @@ -1039,7 +1039,7 @@ if ($obj->getTypeId() == usetestcase) { $r .= $user->layout->showfield($lang['TestcaseUsed']); } else { - $r .= $user->layout->showfield($lang['Testcases']); + $r .= $user->layout->show_info_field($lang['Testcases'],$obj,get_class()); } if ( $format == "paper" ) { $d = showTestcases($user,$obj,-1); @@ -2056,7 +2056,7 @@ return $r; } $r .= $user->layout->ContentRowStart(); - $r .= $user->layout->showfield($lang['Testsuites']); + $r .= $user->layout->show_info_field($lang['Testsuites'],$obj,get_class()); if ( $format == "paper" ) { $d = showTestsuites($user,$obj,-1); } else { @@ -2085,9 +2085,29 @@ } /** + * create a link for an overview filtered by $obj + */ + static function getOverviewLinkObj (tutos_user $user,tutos_base $obj,$text = "") { + global $lang; + + if (! is_object($obj) ) return ''; + if ( $obj->id == -1 ) return ''; + if (! $user->feature_ok(usetestsuite,PERM_SEE) ) return ''; + if (! $obj->obj_feature_ok($user,usetestsuite,PERM_SEE) ) return ''; + if (! $obj->see_ok() ) return ''; + + return array( url => 'testmanager/testsuite_overview.php?refid='.$obj->id, + confirm => false, + text => ($text == '' ? $lang['TestsuiteOverview']:$text), + info => $lang['TestsuiteOverview'], + category => array('overview','module',usetestsuite) + ); + } + + /** * create a link where a testsuite to for the given object could be added */ - static function getaddlink (tutos_user $user,tutos_base $obj,$text = "") { + static function getAddLink (tutos_user $user,tutos_base $obj,$text = "") { global $lang; if (! is_object($obj) ) return ''; @@ -3224,7 +3244,7 @@ } else if ($obj->getTypeId() == usetestsuite) { $r .= $user->layout->showfield($lang['Testruns'].': '.$lang['Testsuite']); } else { - $r .= $user->layout->showfield($lang['Testruns']); + $r .= $user->layout->show_info_field($lang['Testruns'],$obj,get_class()); } if ( $format == "paper" ) { $d = showTestruns($user,$obj,-1); @@ -3254,9 +3274,29 @@ } /** + * create a link for an overview filtered by $obj + */ + static function getOverviewLinkObj (tutos_user $user,tutos_base $obj,$text = "") { + global $lang; + + if (! is_object($obj) ) return ''; + if ( $obj->id == -1 ) return ''; + if (! $user->feature_ok(usetestrun,PERM_SEE) ) return ''; + if (! $obj->obj_feature_ok($user,usetestrun,PERM_SEE) ) return ''; + if (! $obj->see_ok() ) return ''; + + return array( url => 'testmanager/testrun_overview.php?refid='.$obj->id, + confirm => false, + text => ($text == '' ? $lang['TestrunOverview']:$text), + info => $lang['TestrunOverview'], + category => array('overview','module',usetestrun) + ); + } + + /** * create a link where a testrun for the given object could be added */ - static function getaddlink (tutos_user $user,tutos_base $obj,$text = "") { + static function getAddLink (tutos_user $user,tutos_base $obj,$text = "") { global $lang; if (! is_object($obj) ) return ''; Modified: trunk/php/url/url.pinc =================================================================== --- trunk/php/url/url.pinc 2013-11-19 15:22:30 UTC (rev 1178) +++ trunk/php/url/url.pinc 2013-11-19 19:19:15 UTC (rev 1179) @@ -664,6 +664,26 @@ } /** + * create a link for an overview filtered by $obj + */ + static function getOverviewLinkObj (tutos_user $user,tutos_base $obj,$text = "") { + global $lang; + + if (! is_object($obj) ) return ''; + if ( $obj->id == -1 ) return ''; + if (! $user->feature_ok(useurl,PERM_SEE) ) return ''; + if (! $obj->obj_feature_ok($user,useurl,PERM_SEE) ) return ''; + if (! $obj->see_ok() ) return ''; + + return array( url => 'url/url_overview.php?link_id='.$obj->id, + confirm => false, + text => ($text == '' ? $lang['URLOverview']:$text), + info => $lang['URLOverview'], + category => array('overview','module',useurl) + ); + } + + /** * Read all urls related to given id * !! here $obj could also be a lyaout !! */ @@ -725,7 +745,7 @@ url::obj_read($obj); if ( count($obj->list[useurl]) > 0 ) { $r .= $user->layout->ContentRowStart(); - $r .= $user->layout->showfield($lang['ProdLinks']); + $r .= $user->layout->show_info_field($lang['ProdLinks'],$obj,get_class()); $d = ''; $pre = ''; foreach($obj->list[useurl] as $f) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2013-11-19 15:22:34
|
Revision: 1178 http://sourceforge.net/p/tutos/code/1178 Author: gokohnert Date: 2013-11-19 15:22:30 +0000 (Tue, 19 Nov 2013) Log Message: ----------- two buttons for adding and listing things when mouse over headline Modified Paths: -------------- trunk/php/installation/installation.pinc trunk/php/layout/layout_base.pinc trunk/php/layout/new_base.pinc trunk/php/module_base.pinc trunk/php/module_template/AAA.pinc trunk/php/module_template/AAA_overview.php trunk/php/note/note.pinc trunk/php/note/note_overview.php trunk/php/reminder/reminder.pinc trunk/test.sh Modified: trunk/php/installation/installation.pinc =================================================================== --- trunk/php/installation/installation.pinc 2013-11-18 12:58:28 UTC (rev 1177) +++ trunk/php/installation/installation.pinc 2013-11-19 15:22:30 UTC (rev 1178) @@ -764,7 +764,7 @@ return $r; } $r .= $user->layout->ContentRowStart(); - $r .= $user->layout->showfield($lang['Installations']); + $r .= $user->layout->show_info_field($lang['Installations'],$obj,get_class()); if ( $format == 'paper' ) { $d = showInstallations($user,$obj,-1); @@ -819,6 +819,25 @@ } /** + * create a link for an overview filtered by $obj + */ + static function getOverviewLinkObj (tutos_user $user,tutos_base $obj,$text = "") { + global $lang; + + if (! is_object($obj) ) return ''; + if ( $obj->id == -1 ) return ''; + if (! $user->feature_ok(useinstmanagement,PERM_SEE) ) return ''; + if (! $obj->obj_feature_ok($user,useinstmanagement,PERM_SEE) ) return ''; + if (! $obj->see_ok() ) return ''; + + return array( url => 'installation/installation_overview.php?link_id='.$obj->id, + confirm => false, + text => ($text == '' ? $lang['InstOverview']:$text), + category => array(AAA::getType(),'overview','module',useinstmanagement) + ); + } + + /** * create a link to a search page */ static function getSelectLink (tutos_user $user,$text = "") { Modified: trunk/php/layout/layout_base.pinc =================================================================== --- trunk/php/layout/layout_base.pinc 2013-11-18 12:58:28 UTC (rev 1177) +++ trunk/php/layout/layout_base.pinc 2013-11-19 15:22:30 UTC (rev 1178) @@ -702,6 +702,13 @@ } /** + * shows a info field with some extension (used in show pages) + */ + Function show_info_field($text,tutos_base $obj,$class) { + return $this->showfield($text); + } + + /** * shows a simple field descriptor (center) */ Function showfieldc($text,$req = 0,$label = "") { Modified: trunk/php/layout/new_base.pinc =================================================================== --- trunk/php/layout/new_base.pinc 2013-11-18 12:58:28 UTC (rev 1177) +++ trunk/php/layout/new_base.pinc 2013-11-19 15:22:30 UTC (rev 1178) @@ -310,7 +310,42 @@ $r .= "</td>\n"; return $r; } + /** + * shows a info field with some extension (used in show pages) + */ + Function show_info_field($text,tutos_base $obj,$class) { + global $tutos; + + $a = $class::getAddLink($this->user,$obj,'+'); + $b = $class::getOverviewLinkObj($this->user,$obj,'='); + + $id = 'cl_'.$class.'_'.uniqid(); + $r = '<td class="desc" valign="top" id="'.$id.'">'.$text; + $r .= '<span style="position:absolute;z-index:999;" id="X'.$id.'">'; + if ($a != '') { + $r .= '<a id="P'.$id.'" href="'.$a[url].'">+</a>'; + } + if ($b != '') { + $r .= '<a id="O'.$id.'" href="'.$b[url].'">=</a>'; + } + $r .= '</span>'; + $r .='</span>'; + $r .='</td>'; + + $tutos['pagescript'] .= "$('#".$id."').mouseover(function() { +$('#X".$id."').show(); +}).mouseout(function() { +$('#X".$id."').hide(); +});\n"; + $tutos['pagescript'] .= "$('#X".$id."').buttonset().hide();\n"; + $tutos['pagescript'] .= "$('#P".$id."').button({icons: {primary: 'ui-icon-circle-plus'},text: false});\n"; + $tutos['pagescript'] .= "$('#O".$id."').button({icons: {primary: 'ui-icon-grip-solid-horizontal'},text: false});\n"; + + return $r; + } + + /** * shows a simple field descriptor (center) */ Function showfieldc($text,$req = 0,$label = "") { Modified: trunk/php/module_base.pinc =================================================================== --- trunk/php/module_base.pinc 2013-11-18 12:58:28 UTC (rev 1177) +++ trunk/php/module_base.pinc 2013-11-19 15:22:30 UTC (rev 1178) @@ -515,6 +515,13 @@ } /** + * create a link to a overview page filtered by $obj + */ + static function getOverviewLinkObj (tutos_user $user, tutos_base $obj = null, $text = "") { + return static::getOverviewLink($user,$text); + } + + /** * create a link to a page where a new object with * reference to the given object or id could be created * typically this is used on ..._show.php pages to link Modified: trunk/php/module_template/AAA.pinc =================================================================== --- trunk/php/module_template/AAA.pinc 2013-11-18 12:58:28 UTC (rev 1177) +++ trunk/php/module_template/AAA.pinc 2013-11-19 15:22:30 UTC (rev 1178) @@ -309,7 +309,7 @@ return $r; } $r .= $user->layout->ContentRowStart(); - $r .= $user->layout->showfield($lang['AAAs']); + $r .= $user->layout->show_info_field($lang['AAAs'],$obj,get_class()); $d = ''; $pre = ''; if ( $format == 'paper' ) { @@ -325,7 +325,7 @@ $cnt++; if ( $cnt >= $tutos['maxshort'] ) { $d .= $pre.$user->layout->theme->getImage(folder,'list'); - $d .= ' '. makelink('module_template/AAA_overview.php?link_id='. $obj->id,sprintf($lang['AllEntries'], count($obj->list[AAA::geTtypeId()]))); + $d .= ' '. makelink('module_template/AAA_overview.php?refid='. $obj->id,sprintf($lang['AllEntries'], count($obj->list[AAA::geTtypeId()]))); break; } } @@ -357,6 +357,26 @@ } /** + * create a link for an overview filtered by $obj + */ + static function getOverviewLinkObj (tutos_user $user,tutos_base $obj,$text = "") { + global $lang; + + if (! is_object($obj) ) return ''; + if ( $obj->id == -1 ) return ''; + if (! $user->feature_ok(AAA::gettypeid(),PERM_SEE) ) return ''; + if (! $obj->obj_feature_ok($user,AAA::gettypeid(),PERM_SEE) ) return ''; + if (! $obj->see_ok() ) return ''; + + $x = array( url => 'module_template/AAA_overview.php?refid='. $obj->id, + confirm => false, + text => ($text == '' ? $lang['AAAOverview']:$text), + category => array(AAA::getType(),'overview','module',USEAAA) + ); + return $x; + } + + /** * create a link to a overview page */ static function getSelectLink (tutos_user $user,$text = "") { @@ -386,4 +406,4 @@ return $r; } } -?> +?> \ No newline at end of file Modified: trunk/php/module_template/AAA_overview.php =================================================================== --- trunk/php/module_template/AAA_overview.php 2013-11-18 12:58:28 UTC (rev 1177) +++ trunk/php/module_template/AAA_overview.php 2013-11-19 15:22:30 UTC (rev 1178) @@ -100,7 +100,7 @@ $x = ''; if (is_object($obj->ref)) { $x = $this->mark_filter(myentities($obj->ref->getFullName()),'link_id'); - $x .= $obj->ref->getLink($x); + $x = $obj->ref->getLink($x); } $r .= $this->OverviewRowBlock($x,'over_l'); } Modified: trunk/php/note/note.pinc =================================================================== --- trunk/php/note/note.pinc 2013-11-18 12:58:28 UTC (rev 1177) +++ trunk/php/note/note.pinc 2013-11-19 15:22:30 UTC (rev 1178) @@ -516,7 +516,7 @@ return $r; } $r .= $user->layout->ContentRowStart(); - $r .= $user->layout->showfield($lang['Notes']); + $r .= $user->layout->show_info_field($lang['Notes'],$obj,get_class()); if ( $format == "paper" ) { $d = showNotes($user,$obj,-1); } else { @@ -698,6 +698,25 @@ } /** + * create a link for an overview filtered by $obj + */ + static function getOverviewLinkObj (tutos_user $user,tutos_base $obj,$text = "") { + global $lang; + + if (! is_object($obj) ) return ''; + if ( $obj->id == -1 ) return ''; + if (! $user->feature_ok(usenotes,PERM_SEE) ) return ''; + if (! $obj->obj_feature_ok($user,usenotes,PERM_SEE) ) return ''; + if (! $obj->see_ok() ) return ''; + + return array( url => 'note/note_overview.php?link_id='.$obj->id, + confirm => false, + text => ($text == '' ? $lang['NoteOverview']:$text), + category => array(AAA::getType(),'overview','module',usenotes) + ); + } + + /** * show the mytutos info about notes */ static function mytutos (tutos_user $user) { Modified: trunk/php/note/note_overview.php =================================================================== --- trunk/php/note/note_overview.php 2013-11-18 12:58:28 UTC (rev 1177) +++ trunk/php/note/note_overview.php 2013-11-19 15:22:30 UTC (rev 1178) @@ -71,16 +71,22 @@ $ss = $this->putSubSession($nav); $r .= $this->header; - $this->flds = 5; + $this->flds = 3; $r .= $this->actionformStart("note_overview.php"); $r .= $this->OverviewTableStart(); $r .= $this->OverviewHeadStart(); $r .= $this->OverviewHeadLineStart(); $r .= $this->orderHeader('creation',$lang['created'],$this->link2); $r .= $this->orderHeader('',$lang['NoteName'],$this->link2); - $r .= $this->orderHeader('link_id',$lang['NoteReference'],$this->link2); + if ($this->head['link_id']) { + $r .= $this->orderHeader('link_id',$lang['NoteReference'],$this->link2); + $this->flds++; + } $r .= $this->orderHeader('remember',$lang['NoteRemember'],$this->link2); - $r .= $this->orderHeader('',$lang['NoteCreator'],$this->link2); + if ($this->head['creator']) { + $r .= $this->orderHeader('',$lang['NoteCreator'],$this->link2); + $this->flds++; + } $r .= show_custom_overview_headers($this,'note',$this->link2); $r .= $this->MassUpdateHeader(); $r .= $this->OverviewHeadLineEnd(); @@ -108,11 +114,14 @@ $x = $this->mark_filter(myentities($b->getFullName()),'name'); $r .= $this->OverviewRowBlock(makelink($b->getUrl('ss='.$ss),$x),'title over_l'); - $x = $this->mark_filter(myentities($b->ref->getFullName()),'link_id'); - $r .= $this->OverviewRowBlock($b->ref->getLink($x),'over_l'); - + if ($this->head['link_id']) { + $x = $this->mark_filter(myentities($b->ref->getFullName()),'link_id'); + $r .= $this->OverviewRowBlock($b->ref->getLink($x),'over_l'); + } $r .= $this->OverviewRowBlock($b->remember->getDateTime(),'over_l'); - $r .= $this->OverviewRowBlock(((!(is_numeric($b->creator) && $b->creator == -1)) ? $b->creator->getLink($b->creator->getShortname()):$lang['HistoryDeleted']),'over_l'); + if ($this->head['creator']) { + $r .= $this->OverviewRowBlock(((!(is_numeric($b->creator) && $b->creator == -1)) ? $b->creator->getLink($b->creator->getShortname()):$lang['HistoryDeleted']),'over_l'); + } $r .= show_custom_overview_data($this,'note',$b); $r .= $this->MassUpdateField($b); $r .= $this->OverviewRowEnd($line++); @@ -205,6 +214,9 @@ $this->header = ''; $this->hpre = ''; + $this->head['link_id'] = true; + $this->head['creator'] = true; + $reftype = ''; $name = ''; $nsrn = ''; @@ -369,6 +381,8 @@ // Creator overview_arg($this,'ncfn',OVERVIEW_ARG_FN,'note',array('creator'),'NoteCreator','n.','a'); + // Creator + overview_arg($this,'ncid',OVERVIEW_ARG_OBJID,'note',array('creator'),'NoteCreator','n.'); // reference overview_arg($this,'link_id',OVERVIEW_ARG_OBJID,'note',array('link_id'),'NoteReference','n.'); // Start Date for search Modified: trunk/php/reminder/reminder.pinc =================================================================== --- trunk/php/reminder/reminder.pinc 2013-11-18 12:58:28 UTC (rev 1177) +++ trunk/php/reminder/reminder.pinc 2013-11-19 15:22:30 UTC (rev 1178) @@ -659,7 +659,7 @@ return $r; } $r .= $user->layout->ContentRowStart(); - $r .= $user->layout->showfield($lang['Reminders']); + $r .= $user->layout->show_info_field($lang['Reminders'],$obj,get_class()); $d = ''; if ( $format == "paper" ) { $d = showReminders($user,$obj,-1); @@ -714,6 +714,25 @@ } /** + * create a link for an overview filtered by $obj + */ + static function getOverviewLinkObj (tutos_user $user,tutos_base $obj,$text = "") { + global $lang; + + if (! is_object($obj) ) return ''; + if ( $obj->id == -1 ) return ''; + if (! $user->feature_ok(usereminder,PERM_SEE) ) return ''; + if (! $obj->obj_feature_ok($user,usereminder,PERM_SEE) ) return ''; + if (! $obj->see_ok() ) return ''; + + return array( url => 'reminder/reminder_overview.php?refid='.$obj->id, + confirm => false, + text => ($text == '' ? $lang['ReminderOverview']:$text), + category => array(AAA::getType(),'overview','module',usereminder) + ); + } + + /** * Return Info about connected reminders to a object */ static function obj_read(tutos_base $obj) { Modified: trunk/test.sh =================================================================== --- trunk/test.sh 2013-11-18 12:58:28 UTC (rev 1177) +++ trunk/test.sh 2013-11-19 15:22:30 UTC (rev 1178) @@ -140,7 +140,7 @@ rm -f $OUT2 SID=`cat $COOKIES | tail -1 | cut -f 7` -SNAP="CutyCapt --min-width=1024 --header=COOKIE:TUTOS=$SID" +SNAP="cutycapt --min-width=1024 --header=COOKIE:TUTOS=$SID" # Create product wget --load-cookies=$COOKIES --save-cookies=$COOKIES -a $OUT -O $OUT2 \ @@ -673,7 +673,7 @@ wget --save-cookies $COOKIES -a $OUT -O $OUT2 "$URL/mytutos.php?uname=$USER&pw=$PW&dbnr=$DBNR" check_output mytutos.php $OUT2 SID=`cat $COOKIES | tail -1 | cut -f 7` -SNAP="CutyCapt --min-width=1024 --header=COOKIE:TUTOS=$SID" +SNAP="cutycapt --min-width=1024 --header=COOKIE:TUTOS=$SID" # Create and delete note This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2013-11-18 12:58:30
|
Revision: 1177 http://sourceforge.net/p/tutos/code/1177 Author: gokohnert Date: 2013-11-18 12:58:28 +0000 (Mon, 18 Nov 2013) Log Message: ----------- fix Modified Paths: -------------- trunk/php/file/file_overview.php Modified: trunk/php/file/file_overview.php =================================================================== --- trunk/php/file/file_overview.php 2013-11-17 21:15:49 UTC (rev 1176) +++ trunk/php/file/file_overview.php 2013-11-18 12:58:28 UTC (rev 1177) @@ -331,7 +331,6 @@ //print_r( $this->user->acl); if ( 0 == count($this->flist)) { $this->redirect = "file_select.php?msg=". UrlEncode($lang['Err0048']); - $this->result->free(); } // menu This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2013-11-17 21:15:53
|
Revision: 1176 http://sourceforge.net/p/tutos/code/1176 Author: gokohnert Date: 2013-11-17 21:15:49 +0000 (Sun, 17 Nov 2013) Log Message: ----------- fix Modified Paths: -------------- trunk/php/file/file.pinc trunk/php/url/url.pinc Modified: trunk/php/file/file.pinc =================================================================== --- trunk/php/file/file.pinc 2013-11-17 17:15:42 UTC (rev 1175) +++ trunk/php/file/file.pinc 2013-11-17 21:15:49 UTC (rev 1176) @@ -1819,8 +1819,8 @@ if ( $f->see_ok() ) { $r .= " <tr>\n"; $icon = get_icon($current_user->layout,$f->filename); - $r .= ' <td>'. $icon.' '.$f->getLink($f->name) ."</td>\n"; - $r .= ' <td>' . $f->version ."</td>\n"; + $r .= ' <td>'. $icon.' '.$f->getLink(myentities($f->name)) ."</td>\n"; + $r .= ' <td>' . myentities($f->version) ."</td>\n"; $r .= ' <td align="right">'. $f->creation->getDateTime() ."</td>\n"; $r .= " </tr>\n"; } Modified: trunk/php/url/url.pinc =================================================================== --- trunk/php/url/url.pinc 2013-11-17 17:15:42 UTC (rev 1175) +++ trunk/php/url/url.pinc 2013-11-17 21:15:49 UTC (rev 1176) @@ -839,7 +839,7 @@ $r .= '<td colspan="2" width="50%"> </td>'; $cnt++; } - if ($cnt % 2 == 0) { + if ($cnt % 2 == 1) { $r .= "</tr>\n"; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2013-11-17 17:15:45
|
Revision: 1175 http://sourceforge.net/p/tutos/code/1175 Author: gokohnert Date: 2013-11-17 17:15:42 +0000 (Sun, 17 Nov 2013) Log Message: ----------- fix Modified Paths: -------------- trunk/php/custom.pinc Modified: trunk/php/custom.pinc =================================================================== --- trunk/php/custom.pinc 2013-11-17 08:51:14 UTC (rev 1174) +++ trunk/php/custom.pinc 2013-11-17 17:15:42 UTC (rev 1175) @@ -848,7 +848,7 @@ $r .= myentities(isset($lang[$this->x['lang'].'_'][$this->content]) ? $lang[$this->x['lang'].'_'][$this->content]: ($this->required ? $this->content .'??' : '')); $r .= '</span>'; } else { - $r .= (isset($lang[$this->x['lang'].'_'][$this->content]) ? $lang[$this->x['lang'].'_'][$this->content]: ($this->required ? $this->content .'??' : '')); + $r = (isset($lang[$this->x['lang'].'_'][$this->content]) ? $lang[$this->x['lang'].'_'][$this->content]: ($this->required ? $this->content .'??' : '')); } return $r; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2013-11-17 08:51:17
|
Revision: 1174 http://sourceforge.net/p/tutos/code/1174 Author: gokohnert Date: 2013-11-17 08:51:14 +0000 (Sun, 17 Nov 2013) Log Message: ----------- fix Modified Paths: -------------- trunk/php/product.pinc Modified: trunk/php/product.pinc =================================================================== --- trunk/php/product.pinc 2013-11-17 08:38:13 UTC (rev 1173) +++ trunk/php/product.pinc 2013-11-17 08:51:14 UTC (rev 1174) @@ -514,7 +514,7 @@ $c = preg_replace('#^p_c_#','',$c); $x = $table['product'][$c]; $f = '_fld_'.$c; - $r .= txt2csv(get_custom_field($x,$this->$f,$p,null,'product',$c)); + $r .= txt2csv(get_custom_field($x,$this->$f,$this,null,'product',$c)); } else { $r .= txt2csv('??? '.$c); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2013-11-17 08:38:15
|
Revision: 1173 http://sourceforge.net/p/tutos/code/1173 Author: gokohnert Date: 2013-11-17 08:38:13 +0000 (Sun, 17 Nov 2013) Log Message: ----------- update Modified Paths: -------------- trunk/php/product_overview.php Modified: trunk/php/product_overview.php =================================================================== --- trunk/php/product_overview.php 2013-11-13 13:17:04 UTC (rev 1172) +++ trunk/php/product_overview.php 2013-11-17 08:38:13 UTC (rev 1173) @@ -44,9 +44,14 @@ $a = 0; $r .= product::exportCSV_Header($this->pshow); - foreach($this->plist as $x) { - $r .= $x->exportCSV($this->pshow); - unset($x); + foreach($this->plist as $p) { + if (!is_object($p)) { + $id = $p; + $p = new product($this->dbconn); + $p = $p->read($id,$p); + } + $r .= $p->exportCSV($this->pshow); + unset($p); } return $r; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2013-11-13 13:17:07
|
Revision: 1172 http://sourceforge.net/p/tutos/code/1172 Author: gokohnert Date: 2013-11-13 13:17:04 +0000 (Wed, 13 Nov 2013) Log Message: ----------- product overview export Modified Paths: -------------- trunk/php/custom.pinc trunk/php/product.pinc trunk/php/product_overview.php Modified: trunk/php/custom.pinc =================================================================== --- trunk/php/custom.pinc 2013-11-11 14:44:19 UTC (rev 1171) +++ trunk/php/custom.pinc 2013-11-13 13:17:04 UTC (rev 1172) @@ -843,9 +843,13 @@ function get() { global $lang; - $r = '<span class="CL_'.$this->get_parsename().' CL_'.$this->get_parsename().'_'.$this->content.'">'; - $r .= myentities(isset($lang[$this->x['lang'].'_'][$this->content]) ? $lang[$this->x['lang'].'_'][$this->content]: ($this->required ? $this->content .'??' : '')); - $r .= '</span>'; + if ($this->layout != null) { + $r = '<span class="CL_'.$this->get_parsename().' CL_'.$this->get_parsename().'_'.$this->content.'">'; + $r .= myentities(isset($lang[$this->x['lang'].'_'][$this->content]) ? $lang[$this->x['lang'].'_'][$this->content]: ($this->required ? $this->content .'??' : '')); + $r .= '</span>'; + } else { + $r .= (isset($lang[$this->x['lang'].'_'][$this->content]) ? $lang[$this->x['lang'].'_'][$this->content]: ($this->required ? $this->content .'??' : '')); + } return $r; } @@ -891,7 +895,10 @@ global $lang; if ($this->x['hideempty'] && (trim($this->content) == '') ) return ''; - return '<span class="pre CL_'.$this->get_parsename().'">'.format_txt($this->obj,$this->content,true,true,$this->txcols).'</span>'; + if ($this->layout != null) { + return '<span class="pre CL_'.$this->get_parsename().'">'.format_txt($this->obj,$this->content,true,true,$this->txcols).'</span>'; + } + return format_txt($this->obj,$this->content,true,true,$this->txcols); } /** Modified: trunk/php/product.pinc =================================================================== --- trunk/php/product.pinc 2013-11-11 14:44:19 UTC (rev 1171) +++ trunk/php/product.pinc 2013-11-13 13:17:04 UTC (rev 1172) @@ -407,6 +407,125 @@ } /** + * a headline for CSV Export + */ + static function exportCSV_Header(array $pshow) { + global $tutos; + + $r = ''; + $r .= txt2csv('ID'); + foreach ($tutos[prodfields] as $c) { + if ($c == 'ptask') { + continue; + } + if ($c == 'pbugs') { + continue; + } + if ($c == 'pfile') { + continue; + } + if ($c == 'checkbox') { + continue; + } + if ($pshow[$c]) { + $r .= txt2csv($c); + } + } + $r .= "\r\n"; + return $r; + } + + /** + * Return a data as comma seperated values string + */ + function exportCSV(array $pshow) { + global $lang, $table, $tutos; + + $r = ''; + $r .= txt2csv($this->id); + foreach ($tutos[prodfields] as $c) { + if (!$pshow[$c]) { + continue; + } + if ($c == 'name') { + $r .= txt2csv($this->name); + } else if ($c == 'version') { + $r .= txt2csv($this->version); + } else if ( preg_match('#role_#',$c) ) { + $this->readroles(); + $xx = ''; + foreach ( $lang['ProdRole'] as $ti => $tx) { + if ( ($c == 'role_'.$ti) && isset($this->role[$ti]) && (count($this->role[$ti]) > 0) ) { + $x = 0; + foreach ($this->role[$ti] as $i => $rx ) { + if ( $x > 0 ) { + $xx .= "\r\n"; + } + $xx .= $rx->getFullname(); + $x++; + } + } + } + $r .= txt2csv($xx); + } else if ($c == 'desc') { + $r .= txt2csv($this->description); + } else if ($c == 'desc1') { + $r .= txt2csv($this->desc1); + } else if ($c == 'desc2') { + $r .= txt2csv($this->desc2); + } else if ($c == 'state') { + $r .= txt2csv($this->getState()); + } else if ($c == 'probability') { + $r .= txt2csv($this->probability.' %'); + } else if ($c == 'price') { + $r .= txt2csv($this->price); + } else if ($c == 'cost') { + $r .= txt2csv($this->cost); + } else if ($c == 'creator') { + $r .= txt2csv($this->creator->getFullName()); + } else if ($c == 'creation') { + $r .= txt2csv($this->creation->getDate()); + } else if ($c == 'p_start') { + $r .= txt2csv($this->p_start->getDate()); + } else if ($c == 'p_end') { + $r .= txt2csv($this->p_end->getDate()); + } else if ($c == 'ptask') { + } else if ($c == 'pbugs') { + } else if ($c == 'pfile') { + } else if ($c == 'checkbox') { + } else if( preg_match('#cl#',$c) ) { + $xx = ''; + for ( $cl = 1;$cl <= $this->classes; $cl++) { + if ( $c != 'cl'.$cl ) { + continue; + } + $sep = ''; + foreach($this->cl[$cl] as $i => $f ) { + if ( isset ($lang['ProdClasses'.$cl][$f]) ) { + $xx .= $sep . $lang['ProdClasses'.$cl][$f] ; + } else { + $xx .= $sep . $f ; + } + $sep = "\r\n"; + } + } + $r .= txt2csv($xx); + } else if( preg_match('#p_c_#',$c) ) { + $c = preg_replace('#^p_c_#','',$c); + $x = $table['product'][$c]; + $f = '_fld_'.$c; + $r .= txt2csv(get_custom_field($x,$this->$f,$p,null,'product',$c)); + } else { + $r .= txt2csv('??? '.$c); + } + + } + $r .= "\r\n"; + + return $r; + } + + /** * Data of XML export */ function exportXML_body ($only_ids = false) { Modified: trunk/php/product_overview.php =================================================================== --- trunk/php/product_overview.php 2013-11-11 14:44:19 UTC (rev 1171) +++ trunk/php/product_overview.php 2013-11-13 13:17:04 UTC (rev 1172) @@ -34,6 +34,24 @@ */ class Product_overview extends layout { /** + * CSV Export Info + */ + Function exportinfo() { + global $lang,$tutos; + + $r = ''; + export_headers('TUTOS_product_export','csv'); + $a = 0; + + $r .= product::exportCSV_Header($this->pshow); + foreach($this->plist as $x) { + $r .= $x->exportCSV($this->pshow); + unset($x); + } + return $r; + } + + /** * display the info */ Function info() { @@ -59,6 +77,10 @@ $r = $this->statinfo(); return $r; } + if ($this->format == "csv" ) { + $r = $this->exportinfo(); + return $r; + } $this->flds = 0; $pf = 0; @@ -948,6 +970,17 @@ $this->addMenu($x); } + if ( $this->format != "paper" ) { + $ll = addUrlParameter($this->link1,'format=csv'); + $ll = addUrlParameter($ll,'ss='.$this->ss); + $x = array( url => $ll, + text => $lang['Export'].' (CSV)', + info => $lang['ExportInfo'], + category => array('csv','product','view',useprojects) + ); + $this->addMenu($x); + } + $x = array( url => $this->link3, text => $lang['SalesForecastRep'], info => $lang['SalesForecastRep'], This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2013-11-11 14:44:21
|
Revision: 1171 http://sourceforge.net/p/tutos/code/1171 Author: gokohnert Date: 2013-11-11 14:44:19 +0000 (Mon, 11 Nov 2013) Log Message: ----------- fix Modified Paths: -------------- trunk/php/res_cal.php Modified: trunk/php/res_cal.php =================================================================== --- trunk/php/res_cal.php 2013-11-06 10:40:43 UTC (rev 1170) +++ trunk/php/res_cal.php 2013-11-11 14:44:19 UTC (rev 1171) @@ -1,12 +1,14 @@ <?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 * Free Software Foundation; version 2 of the License. * */ +$tutos['files'][__FILE__] = '$Rev$'; + require_once 'webelements.p3'; require_once 'permission.p3'; @@ -124,16 +126,16 @@ // // SEARCH FOR APPOINTMENTS // - $this->callist = array(); + $this->user->callist = array(); if ($this->do[usecalendar]) { - appointment::readCal($this,$this->start,$this->end); + appointment::readCal($this->user,$this->start,$this->end); } - foreach($this->callist as $x => $i) { + foreach($this->user->callist as $x => $i) { if (is_array($this->do2[usecalendar]) && !in_array($i->outside,$this->do2[usecalendar])) { - unset($this->callist[$x]); + unset($this->user->callist[$x]); } } - $n3 = count($this->callist); + $n3 = count($this->user->callist); $line = 0; @@ -147,8 +149,8 @@ // SEARCH FOR TASKS // $q1 = 'SELECT t.* from '. - $this->dbconn->prefix .$table['task'][name].' t,'. - $this->dbconn->prefix .$table['taskworker'][name].' w'; + $this->dbconn->prefix .$table['task'][name].' t,'. + $this->dbconn->prefix .$table['taskworker'][name].' w'; $q1 .= ' WHERE ( t.id = w.t_id) and (w.w_id = '. $f->id .' or w.w_id = '. $this->base->id .')'; $q1 .= ' AND ('; $q1 .= ' (t.s_start <= '.$this->dbconn->Date($this->end) .' AND t.s_start >= '.$this->dbconn->Date($this->start) .') '; @@ -247,7 +249,7 @@ // Project Entries $a = 0; foreach ($prolist as $prod) { -# if ( ! $prod->see_ok() ) { continue; } + # if ( ! $prod->see_ok() ) { continue; } if ( $prod->p_start->notime == 1 ) { continue; } if ( $prod->p_end->notime == 1 ) { continue; } if ( $prod->p_end->ts < $this->start->ts ) { continue; } @@ -287,7 +289,7 @@ // Calendar Entries - foreach($this->callist as $i => $app) { + foreach($this->user->callist as $i => $app) { $found = 0; foreach($app->participant as $i2 => $f2) { if ( $i2 == $f->id ) { @@ -324,7 +326,7 @@ // non repeating for ($d = $d1; $d <= $d2; $d++) { $rx = find_a_row($app,$xarr,$d1,$d2); - $obj[$app->id] = &$this->callist[$i]; + $obj[$app->id] = &$this->user->callist[$i]; $xarr[$d][$rx] = $app->id; $maxr = Max($maxr,$rx); } @@ -336,7 +338,7 @@ $day->setDateTimeTS($t); if($app->inside($day)) { $rx = find_a_row($app,$xarr,$d,$d); - $obj[$app->id] = &$this->callist[$i]; + $obj[$app->id] = &$this->user->callist[$i]; $xarr[$d][$rx] = $app->id; $maxr = Max($maxr,$rx); } @@ -569,12 +571,13 @@ $_SESSION[$this->layout_id.'__t'] = $_REQUEST['t']; $this->header .= $lang['Tasks'].' '.$lang['TaskState'].': '; $pre = ''; + $tobj = new task($this->dbconn); foreach($_GET['t'] as $x) { $this->link = addUrlParameter($this->link,"t[]=".$x); $this->link3= addUrlParameter($this->link3,"t[]=".$x,true); $this->addHidden("t[]",$x); $this->do2[usetaskmanagement][] = $x; - $this->header .= $pre.' '.task::getState($x); + $this->header .= $pre.' '.$tobj->getState($x); $pre = ','; } if (isset($_GET['tm']) && $_GET['tm'] == 1) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2013-11-06 10:40:46
|
Revision: 1170 http://sourceforge.net/p/tutos/code/1170 Author: gokohnert Date: 2013-11-06 10:40:43 +0000 (Wed, 06 Nov 2013) Log Message: ----------- custom tx_type rows and cols. Added css class Modified Paths: -------------- trunk/php/custom.pinc trunk/php/db/table_custom_example.pinc trunk/php/product_overview.php Modified: trunk/php/custom.pinc =================================================================== --- trunk/php/custom.pinc 2013-11-06 10:39:31 UTC (rev 1169) +++ trunk/php/custom.pinc 2013-11-06 10:40:43 UTC (rev 1170) @@ -54,6 +54,16 @@ $this->size = $this->x[size]; $this->hidden = $this->x['hidden']; + if (isset($this->x['txrows'])) { + $this->txrows = $this->x['txrows']; + } else { + $this->txrows = 10; + } + if (isset($this->x['txcols'])) { + $this->txcols = $this->x['txcols']; + } else { + $this->txcols = 70; + } } /** @@ -833,7 +843,10 @@ function get() { global $lang; - return myentities(isset($lang[$this->x['lang'].'_'][$this->content]) ? $lang[$this->x['lang'].'_'][$this->content]: ($this->required ? $this->content .'??' : '') ); + $r = '<span class="CL_'.$this->get_parsename().' CL_'.$this->get_parsename().'_'.$this->content.'">'; + $r .= myentities(isset($lang[$this->x['lang'].'_'][$this->content]) ? $lang[$this->x['lang'].'_'][$this->content]: ($this->required ? $this->content .'??' : '')); + $r .= '</span>'; + return $r; } /** @@ -878,7 +891,7 @@ global $lang; if ($this->x['hideempty'] && (trim($this->content) == '') ) return ''; - return '<span class="pre">'.format_txt($this->obj,$this->content).'</span>'; + return '<span class="pre CL_'.$this->get_parsename().'">'.format_txt($this->obj,$this->content,true,true,$this->txcols).'</span>'; } /** @@ -893,19 +906,22 @@ $r = ''; if ( isset($this->x['growonly']) && ($this->x['growonly'] == true) ) { - $r .= $this->layout->textarea($this->get_parsename(),0,$size,''); + if ($this->rows == 1) { + // classical one line input + $r .= ' <input id="'.$this->get_parsename().'" name="'.$this->get_parsename().'" value="" size="'.$this->txcols.'" />'."\n"; + } else { + $r .= $this->layout->textarea($this->get_parsename(),0,$size,'',$this->txrows,$this->txcols); + } if ($this->content != '') { - $r .= '<span class="pre">'.format_txt($this->obj,$this->content).'</span>'; + $r .= '<br />'.$this->get(); } } else { - if (isset($this->x['rows'])) { - if ($this->x['rows'] == 1) { - // classical one line input - $r .= ' <input id="'.$this->get_parsename().'" name="'.$this->get_parsename().'" value="'. myentities($this->content) .'" size="70" />'."\n"; - } else - $r .= $this->layout->textarea($this->get_parsename(),0,$size,$this->content,$this->x['rows']); - } else - $r .= $this->layout->textarea($this->get_parsename(),0,$size,$this->content); + if ($this->rows == 1) { + // classical one line input + $r .= ' <input id="'.$this->get_parsename().'" name="'.$this->get_parsename().'" value="'. myentities($this->content) .'" size="'.$this->txcols.'" />'."\n"; + } else { + $r .= $this->layout->textarea($this->get_parsename(),0,$size,$this->content,$this->txrows,$this->txcols); + } } return $r; } @@ -1108,10 +1124,10 @@ * obj = something as described in $x * base = a related object owning the field */ -function get_custom_field(array $x,$obj,tutos_base $base,$ly = null) { +function get_custom_field(array $x,$obj,tutos_base $base,$ly = null,$section = null, $entry = null) { global $lang; - $f = get_fld_obj($base,$x); + $f = get_fld_obj($base,$x,$section,$entry); if (is_object($f)) { $f->set_content($obj); @@ -1636,7 +1652,7 @@ $r =''; foreach(get_custom_overview_fields($layout,$section) as $ti => $tx) { $f = '_fld_'.$ti; - $d = get_custom_field($tx,$obj->$f,$obj,$layout); + $d = get_custom_field($tx,$obj->$f,$obj,$layout,$section,$ti); if ( isset($layout->filter[$f]) && $layout->filter[$f] != "" ) { if (is_object($obj->$f) && method_exists($obj->$f,'getFullName')) { $d = $layout->mark_filter(myentities($obj->$f->getFullName()),$f); @@ -1909,4 +1925,4 @@ return $r; } -?> +?> \ No newline at end of file Modified: trunk/php/db/table_custom_example.pinc =================================================================== --- trunk/php/db/table_custom_example.pinc 2013-11-06 10:39:31 UTC (rev 1169) +++ trunk/php/db/table_custom_example.pinc 2013-11-06 10:40:43 UTC (rev 1170) @@ -56,6 +56,8 @@ # 'massupdate' => true a massupdate in overview is shown if possible/supported (default no) # 'popup' => true show info in popup (if supported by object) # 'export' => false should be part of exports (csv,excel etc) + # 'txcols' => 70 number of columns in TX_TYPE fields + # 'txrows' => 10 number of rows in TX_TYPE input fields # # ObjectRel will store a relation between two objects in a own table. # example: A task may show a list o related neighbours of its parent project @@ -104,9 +106,11 @@ // $table['product']['desc3'] = array('custom' => true, type => "TX_TYPE", + 'txrows' => 2, + 'txcols' => 40, 'growonly' => true, // only append new text 'stamp' => true, // stamp with user & date - 'overview' => false, # do not show in overview + 'overview' => true, # do not show in overview constraints => "", Desc => "description 3", 'lang' => "DESC3"); Modified: trunk/php/product_overview.php =================================================================== --- trunk/php/product_overview.php 2013-11-06 10:39:31 UTC (rev 1169) +++ trunk/php/product_overview.php 2013-11-06 10:40:43 UTC (rev 1170) @@ -304,7 +304,7 @@ $c = preg_replace('#^p_c_#','',$c); $x = $table['product'][$c]; $f = '_fld_'.$c; - $xx .= get_custom_field($x,$p->$f,$p); + $xx .= get_custom_field($x,$p->$f,$p,$this,'product',$c); } else { $xx .= '??????'; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2013-11-06 10:39:37
|
Revision: 1169 http://sourceforge.net/p/tutos/code/1169 Author: gokohnert Date: 2013-11-06 10:39:31 +0000 (Wed, 06 Nov 2013) Log Message: ----------- fix relation handling Modified Paths: -------------- trunk/php/base.pinc Modified: trunk/php/base.pinc =================================================================== --- trunk/php/base.pinc 2013-10-22 17:47:24 UTC (rev 1168) +++ trunk/php/base.pinc 2013-11-06 10:39:31 UTC (rev 1169) @@ -311,29 +311,29 @@ 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); - } - $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++; - } - $rr->free(); - // cache it - // update cache - $this->cache_store('_r'.$this->id,$this->relations); - $this->cache_store('_br'.$this->id,$this->back_relations); + } 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); } + $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++; + } + $rr->free(); + // cache it + // update cache + $this->cache_store('_r'.$this->id,$this->relations); + $this->cache_store('_br'.$this->id,$this->back_relations); + } $g_hash[$this->id] = &$this; $this->run_after_read_hook(); @@ -1467,6 +1467,8 @@ $r = $this->dbconn->Exec($q); $r->free(); $this->cache_del('_TT'.$this->id); + $this->cache_del('_r'.$this->id); + $this->cache_del('_br'.$this->id); return $msg; } @@ -1504,6 +1506,8 @@ unset( $_SESSION['history'][$this->id] ); } $this->cache_del('_'.$this->gettypeid().'_'.$this->id); + $this->cache_del('_r'.$this->id); + $this->cache_del('_br'.$this->id); $msg = addLine($msg,$this->run_postdel_hook()); return $msg; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2013-10-22 17:47:28
|
Revision: 1168 http://sourceforge.net/p/tutos/code/1168 Author: gokohnert Date: 2013-10-22 17:47:24 +0000 (Tue, 22 Oct 2013) Log Message: ----------- add reported by to excel Modified Paths: -------------- trunk/php/bugtracking/bug_overview.php Modified: trunk/php/bugtracking/bug_overview.php =================================================================== --- trunk/php/bugtracking/bug_overview.php 2013-10-22 17:32:16 UTC (rev 1167) +++ trunk/php/bugtracking/bug_overview.php 2013-10-22 17:47:24 UTC (rev 1168) @@ -116,6 +116,9 @@ $worksheet1->set_column($c,$c,60); // long $worksheet1->write_string($x,$c++, myiconv($lang['BugLong']),$format1); + $worksheet1->set_column($c,$c,20,$format2); // Reporter + $worksheet1->write_string($x,$c++, myiconv($lang['BugReportedFrom']),$format1); + $worksheet1->set_column($c,$c,20); // Solver $worksheet1->write_string($x,$c++, myiconv($lang['BugAssignedTo']),$format1); @@ -172,6 +175,11 @@ } else { $c++; } + if (is_object($b->reporter) && $b->reporter->id > 0) { + $worksheet1->write_string($x,$c++,myiconv($b->reporter->getFullName()),$format2); + } else { + $worksheet1->write_string($x,$c++,myiconv($lang['HistoryDeleted']),$format2); + } if (is_object($b->solver) || is_numeric($b->solver)) { $worksheet1->write_string($x,$c++,myiconv($b->getSolver()),$format2); } else { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |