tutos-commits Mailing List for TUTOS (Page 8)
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-10-22 17:32:20
|
Revision: 1167
http://sourceforge.net/p/tutos/code/1167
Author: gokohnert
Date: 2013-10-22 17:32:16 +0000 (Tue, 22 Oct 2013)
Log Message:
-----------
fixed missing data when deleteing in a subsession
Modified Paths:
--------------
trunk/php/admin_show.php
trunk/php/bugtracking/bug_overview.php
trunk/php/calendar.php
trunk/php/check.php
trunk/php/expense/expense_overview.php
trunk/php/file/file_overview.php
trunk/php/invoice/invoice_overview.php
trunk/php/layout/layout_base.pinc
trunk/php/layout/mobile_layout.pinc
trunk/php/layout/new2_layout.pinc
trunk/php/layout/new_layout.pinc
trunk/php/layout/theme_blue.pinc
trunk/php/layout/theme_red.pinc
trunk/php/layout/theme_white.pinc
trunk/php/module_template/AAA_overview.php
trunk/php/note/note_overview.php
trunk/php/product_overview.php
trunk/php/rate/rate_overview.php
trunk/php/reminder/reminder_overview.php
trunk/php/scrum/log_overview.php
trunk/php/scrum/sprint_overview.php
trunk/php/stuff/stuff_overview.php
trunk/php/task_overview.php
trunk/php/testmanager/testcase_overview.php
trunk/php/testmanager/testrun_overview.php
trunk/php/testmanager/testsuite_overview.php
trunk/php/timetrack/timetrack_overview.php
Modified: trunk/php/admin_show.php
===================================================================
--- trunk/php/admin_show.php 2013-10-18 10:53:24 UTC (rev 1166)
+++ trunk/php/admin_show.php 2013-10-22 17:32:16 UTC (rev 1167)
@@ -424,18 +424,20 @@
$r .= $this->Sessions_Headline();
$y = array();
$x = $tutos['memcache']->get($this->dbconn->db->systemid.'_sessions');
- $d = $tutos['memcache']->get(array_keys($x));
- if (is_array($d) && count($d) > 0) {
- foreach ($d as $key => $data) {
- $r .= $this->Sessions_Line(unserialize_session($data),$key);
- unset($x[$key]);
- $y[$key] = $data;
+ if ($x !== false) {
+ $d = $tutos['memcache']->get(array_keys($x));
+ if (is_array($d) && count($d) > 0) {
+ foreach ($d as $key => $data) {
+ $r .= $this->Sessions_Line(unserialize_session($data),$key);
+ unset($x[$key]);
+ $y[$key] = $data;
+ }
}
+ foreach ($x as $key => $data) {
+ $d = $tutos['memcache']->delete($key);
+ }
+ $tutos['memcache']->set($this->dbconn->db->systemid.'_sessions',$y);
}
- foreach ($x as $key => $data) {
- $d = $tutos['memcache']->delete($key);
- }
- $tutos['memcache']->set($this->dbconn->db->systemid.'_sessions',$y);
$r .= $this->SubTableEnd();
$r .= "</td></tr>\n";
}
Modified: trunk/php/bugtracking/bug_overview.php
===================================================================
--- trunk/php/bugtracking/bug_overview.php 2013-10-18 10:53:24 UTC (rev 1166)
+++ trunk/php/bugtracking/bug_overview.php 2013-10-22 17:32:16 UTC (rev 1167)
@@ -813,6 +813,7 @@
if ( $b->del_ok() ) {
$info = addLine($info,sprintf($lang['BugDeleteI'], $b->getFullName()));
$msg = addLine($msg,$b->delete());
+ $this->dropSubSession();
} else {
$msg = addLine($msg,$b->getLink() .': '. sprintf($lang['Err0023'],$lang[$b->getType()]));
}
@@ -827,6 +828,7 @@
}
if ( preg_match("#^([SC])(.*)#",$_GET['action'],$a) ) {
// Setting State or Class
+ $this->dropSubSession();
$this->dbconn->Begin("WORK");
foreach ($_GET['mark'] as $val) {
Modified: trunk/php/calendar.php
===================================================================
--- trunk/php/calendar.php 2013-10-18 10:53:24 UTC (rev 1166)
+++ trunk/php/calendar.php 2013-10-22 17:32:16 UTC (rev 1167)
@@ -75,6 +75,7 @@
try {
$x = new $tutos[modules][$f][name]($this->dbconn);
$x->readCal($this->user,$from,$to);
+ unset($x);
}
catch (Exception $e) {
continue;
Modified: trunk/php/check.php
===================================================================
--- trunk/php/check.php 2013-10-18 10:53:24 UTC (rev 1166)
+++ trunk/php/check.php 2013-10-22 17:32:16 UTC (rev 1167)
@@ -51,10 +51,12 @@
if (!isset($_SERVER['SERVER_NAME'])) {
if (isset($_ENV['HOSTNAME'])) {
$_SERVER['SERVER_NAME'] = $_ENV['HOSTNAME'];
- } else {
+ } else if (isset($tutos[baseurl][$dbnr])) {
// use baseurl
$x = preg_split('#/#',$tutos[baseurl][$dbnr]);
$_SERVER['SERVER_NAME'] = $x[2];
+ } else {
+ die ('please set baseurl in config.php');
}
}
// check if we are called by cmdline
Modified: trunk/php/expense/expense_overview.php
===================================================================
--- trunk/php/expense/expense_overview.php 2013-10-18 10:53:24 UTC (rev 1166)
+++ trunk/php/expense/expense_overview.php 2013-10-22 17:32:16 UTC (rev 1167)
@@ -312,6 +312,7 @@
if ( $b->del_ok() ) {
$info = addLine($info,$lang['Delete'].':'. $b->getFullName());
$msg = addLine($msg,$b->delete());
+ $this->dropSubSession();
} else {
$msg = addLine($msg,$b->getLink() .': '. sprintf($lang['Err0023'],$lang[$b->getType()]));
}
Modified: trunk/php/file/file_overview.php
===================================================================
--- trunk/php/file/file_overview.php 2013-10-18 10:53:24 UTC (rev 1166)
+++ trunk/php/file/file_overview.php 2013-10-22 17:32:16 UTC (rev 1167)
@@ -101,6 +101,11 @@
if (!is_object($f)) {
$id = $f;
$f = new tutos_file($this->dbconn);
+ if (!is_object($f)) {
+ $a++;
+ unset($f);
+ continue;
+ }
$f = $f->read($id,$f);
}
$f->readLinks();
@@ -197,6 +202,7 @@
if ( $b->del_ok() ) {
$info = addLine($info,sprintf($lang['FileDeleteI'], $b->getFullName()));
$msg = addLine($msg,$b->delete());
+ $this->dropSubSession();
} else {
$msg = addLine($msg,$b->getLink() .': '. sprintf($lang['Err0023'],$lang[$b->getType()]));
}
Modified: trunk/php/invoice/invoice_overview.php
===================================================================
--- trunk/php/invoice/invoice_overview.php 2013-10-18 10:53:24 UTC (rev 1166)
+++ trunk/php/invoice/invoice_overview.php 2013-10-22 17:32:16 UTC (rev 1167)
@@ -226,6 +226,7 @@
if ( $b->del_ok() ) {
$info = addLine($info,sprintf($lang['InvDelInfo'], $b->getFullName()));
$msg = addLine($msg,$b->delete());
+ $this->dropSubSession();
} else {
$msg = addLine($msg,$b->getLink() .': '. sprintf($lang['Err0023'],$lang[$b->getType()]));
}
@@ -239,6 +240,7 @@
return;
}
if ( preg_match("#^(S)(.*)#",$_GET['action'],$a) ) {
+ $this->dropSubSession();
$this->dbconn->Begin("WORK");
foreach ($_GET['mark'] as $key => $val) {
$b = new invoice($this->dbconn);
Modified: trunk/php/layout/layout_base.pinc
===================================================================
--- trunk/php/layout/layout_base.pinc 2013-10-18 10:53:24 UTC (rev 1166)
+++ trunk/php/layout/layout_base.pinc 2013-10-22 17:32:16 UTC (rev 1167)
@@ -1177,6 +1177,23 @@
}
/**
+ * drop/invalidate the current subsession
+ */
+ function dropSubSession() {
+ if (!isset($_SESSION['nav'])) {
+ return;
+ }
+ if (isset($_REQUEST['ss'])) {
+ $found = $_REQUEST['ss'];
+ if (!isset($_SESSION['nav'][$found]) || !is_array($_SESSION['nav'][$found])) {
+ return;
+ }
+ $this->createSubSession($found);
+ return;
+ }
+ }
+
+ /**
* create a subsession
*/
function createSubSession($id) {
Modified: trunk/php/layout/mobile_layout.pinc
===================================================================
--- trunk/php/layout/mobile_layout.pinc 2013-10-18 10:53:24 UTC (rev 1166)
+++ trunk/php/layout/mobile_layout.pinc 2013-10-22 17:32:16 UTC (rev 1167)
@@ -986,7 +986,7 @@
function display () {
global $tutos,$msg,$info;
- if ( isset($_REQUEST['mark']) && isset($_REQUEST['action']) && ($_REQUEST['action'] != -1) ) {
+ if ( isset($_REQUEST['mark']) && (count($_REQUEST['mark']) > 0) && isset($_REQUEST['action']) && ($_REQUEST['action'] != -1) ) {
$this->actionresult = $this->action();
}
$this->mainmenu();
Modified: trunk/php/layout/new2_layout.pinc
===================================================================
--- trunk/php/layout/new2_layout.pinc 2013-10-18 10:53:24 UTC (rev 1166)
+++ trunk/php/layout/new2_layout.pinc 2013-10-22 17:32:16 UTC (rev 1167)
@@ -1132,7 +1132,7 @@
function display () {
global $tutos,$msg,$info;
- if ( isset($_REQUEST['mark']) && isset($_REQUEST['action']) && ($_REQUEST['action'] != -1) ) {
+ if ( isset($_REQUEST['mark']) && (count($_REQUEST['mark']) > 0) && isset($_REQUEST['action']) && ($_REQUEST['action'] != -1) ) {
$this->actionresult = $this->action();
}
$this->mainmenu();
@@ -1345,4 +1345,4 @@
return 'new2_layout';
}
}
-?>
+?>
\ No newline at end of file
Modified: trunk/php/layout/new_layout.pinc
===================================================================
--- trunk/php/layout/new_layout.pinc 2013-10-18 10:53:24 UTC (rev 1166)
+++ trunk/php/layout/new_layout.pinc 2013-10-22 17:32:16 UTC (rev 1167)
@@ -714,7 +714,7 @@
function display () {
global $msg,$info;
- if ( isset($_REQUEST['mark']) && isset($_REQUEST['action']) && ($_REQUEST['action'] != -1) ) {
+ if ( isset($_REQUEST['mark']) && (count($_REQUEST['mark']) > 0) && isset($_REQUEST['action']) && ($_REQUEST['action'] != -1) ) {
$this->actionresult = $this->action();
}
$this->mainmenu();
Modified: trunk/php/layout/theme_blue.pinc
===================================================================
--- trunk/php/layout/theme_blue.pinc 2013-10-18 10:53:24 UTC (rev 1166)
+++ trunk/php/layout/theme_blue.pinc 2013-10-22 17:32:16 UTC (rev 1167)
@@ -32,7 +32,7 @@
}
} else if ($purpose == 'list') {
if (!in_array($type,array(left,right,up,down,modify,delete,perm,edit))) {
- return;
+ return '';
}
}
return parent::getImage($type,$purpose);
Modified: trunk/php/layout/theme_red.pinc
===================================================================
--- trunk/php/layout/theme_red.pinc 2013-10-18 10:53:24 UTC (rev 1166)
+++ trunk/php/layout/theme_red.pinc 2013-10-22 17:32:16 UTC (rev 1167)
@@ -1,10 +1,11 @@
<?php
/**
- * Copyright 2003-2004 by Gero Kohnert
+ * Copyright 2003-2013 by Gero Kohnert
*
* SVN Info $Id$
* $Author$
*/
+$tutos['files'][__FILE__] = '$Rev$';
require_once 'theme_base.pinc';
@@ -15,22 +16,22 @@
*/
class theme_red extends theme_base {
- /**
- * get a image
- */
- function getImage($type,$purpose) {
- global $tutos,$lang;
+ /**
+ * get a image
+ */
+ function getImage($type,$purpose) {
+ global $tutos,$lang;
- if ($purpose == 'menu') {
- if (($type != logout) && ($type != help)) {
- $type = 'menu';
- }
- } else if ($purpose == 'list') {
- if (!in_array($type,array(left,right,up,down,modify,delete))) {
- return;
- }
+ if ($purpose == 'menu') {
+ if (($type != logout) && ($type != help)) {
+ $type = 'menu';
+ }
+ } else if ($purpose == 'list') {
+ if (!in_array($type,array(left,right,up,down,modify,delete))) {
+ return '';
+ }
+ }
+ return parent::getImage($type,$purpose);
}
- return parent::getImage($type,$purpose);
- }
}
?>
\ No newline at end of file
Modified: trunk/php/layout/theme_white.pinc
===================================================================
--- trunk/php/layout/theme_white.pinc 2013-10-18 10:53:24 UTC (rev 1166)
+++ trunk/php/layout/theme_white.pinc 2013-10-22 17:32:16 UTC (rev 1167)
@@ -32,7 +32,7 @@
}
} else if ($purpose == 'list') {
if (!in_array($type,array(left,right,up,down,modify,delete,perm,edit))) {
- return $type;
+ return '';
}
}
return parent::getImage($type,$purpose);
Modified: trunk/php/module_template/AAA_overview.php
===================================================================
--- trunk/php/module_template/AAA_overview.php 2013-10-18 10:53:24 UTC (rev 1166)
+++ trunk/php/module_template/AAA_overview.php 2013-10-22 17:32:16 UTC (rev 1167)
@@ -155,6 +155,7 @@
if ( $obj->del_ok() ) {
$info = addLine($info,sprintf($lang['AAADeleteI'], $obj->getFullName()));
$msg = addLine($msg,$obj->delete());
+ $this->dropSubSession();
} else {
$msg = addLine($msg,$obj->getLink() .": ". sprintf($lang['Err0023'],$lang[$obj->getType()]));
}
Modified: trunk/php/note/note_overview.php
===================================================================
--- trunk/php/note/note_overview.php 2013-10-18 10:53:24 UTC (rev 1166)
+++ trunk/php/note/note_overview.php 2013-10-22 17:32:16 UTC (rev 1167)
@@ -158,6 +158,7 @@
if ( $b->del_ok() ) {
$info = addLine($info,$lang['Delete'].':'. $b->getFullName());
$msg = addLine($msg,$b->delete());
+ $this->dropSubSession();
} else {
$msg = addLine($msg,$b->getLink() .': '. sprintf($lang['Err0023'],$lang[$b->getType()]));
}
Modified: trunk/php/product_overview.php
===================================================================
--- trunk/php/product_overview.php 2013-10-18 10:53:24 UTC (rev 1166)
+++ trunk/php/product_overview.php 2013-10-22 17:32:16 UTC (rev 1167)
@@ -665,6 +665,7 @@
if ( $p->del_ok() ) {
$info = addLine($info,sprintf($lang['ProdDelInfo'], $p->getFullName()));
$msg = addLine($msg,$p->delete());
+ $this->dropSubSession();
} else {
$msg = addLine($msg,$p->getLink() .": ". sprintf($lang['Err0023'],$lang[$p->getType()]));
}
@@ -674,6 +675,7 @@
return;
}
if ( preg_match("#^(S)(.*)#",$_GET['action'],$a) ) {
+ $this->dropSubSession();
$this->dbconn->Begin("WORK");
foreach ($_GET['mark'] as $key => $val) {
$p = new product($this->dbconn);
Modified: trunk/php/rate/rate_overview.php
===================================================================
--- trunk/php/rate/rate_overview.php 2013-10-18 10:53:24 UTC (rev 1166)
+++ trunk/php/rate/rate_overview.php 2013-10-22 17:32:16 UTC (rev 1167)
@@ -181,6 +181,7 @@
if ( $b->del_ok() ) {
$info = addLine($info,$lang['Delete'].': '. $b->getFullName());
$msg = addLine($msg,$b->delete());
+ $this->dropSubSession();
} else {
$msg = addLine($msg,$b->getLink() .': '. sprintf($lang['Err0023'],$lang[$b->getType()]));
}
Modified: trunk/php/reminder/reminder_overview.php
===================================================================
--- trunk/php/reminder/reminder_overview.php 2013-10-18 10:53:24 UTC (rev 1166)
+++ trunk/php/reminder/reminder_overview.php 2013-10-22 17:32:16 UTC (rev 1167)
@@ -168,6 +168,7 @@
if ( $b->del_ok() ) {
$info = addLine($info,$lang['Delete'].':'. $b->getFullName());
$msg = addLine($msg,$b->delete());
+ $this->dropSubSession();
} else {
$msg = addLine($msg,$b->getLink() .': '. sprintf($lang['Err0023'],$lang[$b->getType()]));
}
Modified: trunk/php/scrum/log_overview.php
===================================================================
--- trunk/php/scrum/log_overview.php 2013-10-18 10:53:24 UTC (rev 1166)
+++ trunk/php/scrum/log_overview.php 2013-10-22 17:32:16 UTC (rev 1167)
@@ -468,6 +468,7 @@
if ( $obj->del_ok() ) {
$info = addLine($info,sprintf($lang['ScrumLogDelI'], $obj->getFullName()));
$msg = addLine($msg,$obj->delete());
+ $this->dropSubSession();
} else {
$msg = addLine($msg,$obj->getLink() .': '. sprintf($lang['Err0023'],$lang[$obj->getType()]));
}
Modified: trunk/php/scrum/sprint_overview.php
===================================================================
--- trunk/php/scrum/sprint_overview.php 2013-10-18 10:53:24 UTC (rev 1166)
+++ trunk/php/scrum/sprint_overview.php 2013-10-22 17:32:16 UTC (rev 1167)
@@ -157,6 +157,7 @@
if ( $obj->del_ok() ) {
$info = addLine($info,sprintf($lang['SprintDelI'], $obj->getFullName()));
$msg = addLine($msg,$obj->delete());
+ $this->dropSubSession();
} else {
$msg = addLine($msg,$obj->getLink() .': '. sprintf($lang['Err0023'],$lang[$obj->getType()]));
}
Modified: trunk/php/stuff/stuff_overview.php
===================================================================
--- trunk/php/stuff/stuff_overview.php 2013-10-18 10:53:24 UTC (rev 1166)
+++ trunk/php/stuff/stuff_overview.php 2013-10-22 17:32:16 UTC (rev 1167)
@@ -408,6 +408,7 @@
if ( $obj->del_ok() ) {
$info = addLine($info,$lang['Delete'] ." ". $obj->getFullName());
$msg = addLine($msg,$obj->delete());
+ $this->dropSubSession();
} else {
$msg = addLine($msg,$obj->getLink() .': '. sprintf($lang['Err0023'],$lang[$obj->getType()]));
}
Modified: trunk/php/task_overview.php
===================================================================
--- trunk/php/task_overview.php 2013-10-18 10:53:24 UTC (rev 1166)
+++ trunk/php/task_overview.php 2013-10-22 17:32:16 UTC (rev 1167)
@@ -486,6 +486,7 @@
if ( $p->del_ok() ) {
$info = addLine($info,sprintf($lang['TaskDelete'], $p->getFullName()));
$msg = addLine($msg,$p->delete());
+ $this->dropSubSession();
} else {
$msg = addLine($msg,$p->getLink() .": ". sprintf($lang['Err0023'],$lang[$p->getType()]));
}
@@ -494,6 +495,7 @@
$this->dbconn->Commit("WORK");
break;
case "timeslice":
+ $this->dropSubSession();
$arg = $_POST['arg'];
// control the given value
if( !is_numeric($arg) ) {
@@ -523,6 +525,7 @@
$this->dbconn->Commit("WORK");
break;
case "timeslice_s":
+ $this->dropSubSession();
$arg = $_POST['arg'];
// control the given value
if( !is_numeric($arg) ) {
@@ -554,6 +557,7 @@
$this->dbconn->Commit("WORK");
break;
case "timeslice_e":
+ $this->dropSubSession();
$arg = $_POST['arg'];
// control the given value
if( !is_numeric($arg) ) {
@@ -585,6 +589,7 @@
$this->dbconn->Commit("WORK");
break;
case "setfull":
+ $this->dropSubSession();
$arg = trim($_POST['arg']);
// control the given value
if ( !checkHHMM($arg,false) && !checkfloat($arg,false) ) {
Modified: trunk/php/testmanager/testcase_overview.php
===================================================================
--- trunk/php/testmanager/testcase_overview.php 2013-10-18 10:53:24 UTC (rev 1166)
+++ trunk/php/testmanager/testcase_overview.php 2013-10-22 17:32:16 UTC (rev 1167)
@@ -152,7 +152,7 @@
* action via massupdate
*/
Function action() {
- global $lang,$msg;
+ global $lang,$msg,$info;
if ( $_GET['action'] == -2 ) {
$this->dbconn->Begin("WORK");
@@ -163,10 +163,11 @@
continue;
}
if ( $b->del_ok() ) {
- $msg .= sprintf($lang['TestcaseDeleteI'], $b->getFullName()) ."<br />";
- $msg .= $b->delete();
+ $info = addLine($info,sprintf($lang['TestcaseDeleteI'], $b->getFullName()));
+ $msg = addLine($msg,$b->delete());
+ $this->dropSubSession();
} else {
- $msg .= $b->getLink() .": ". sprintf($lang['Err0023'],$lang[$b->getType()]) ."<br />\n";
+ $msg = addLine($msg,$b->getLink() .": ". sprintf($lang['Err0023'],$lang[$b->getType()]));
}
unset($b);
}
Modified: trunk/php/testmanager/testrun_overview.php
===================================================================
--- trunk/php/testmanager/testrun_overview.php 2013-10-18 10:53:24 UTC (rev 1166)
+++ trunk/php/testmanager/testrun_overview.php 2013-10-22 17:32:16 UTC (rev 1167)
@@ -256,6 +256,7 @@
if ( $b->del_ok() ) {
$info = addLine($info,sprintf($lang['TestrunDeleteI'], $b->getFullName()));
$msg = addLine($msg,$b->delete());
+ $this->dropSubSession();
} else {
$msg = addLine($msg,$b->getLink() .': '. sprintf($lang['Err0023'],$lang[$b->getType()]));
}
@@ -266,6 +267,7 @@
}
if ( preg_match("#^([S])(.*)#",$_GET['action'],$a) ) {
+ $this->dropSubSession();
$this->dbconn->Begin("WORK");
foreach ($_GET['mark'] as $val) {
$b = new testrun($this->dbconn);
Modified: trunk/php/testmanager/testsuite_overview.php
===================================================================
--- trunk/php/testmanager/testsuite_overview.php 2013-10-18 10:53:24 UTC (rev 1166)
+++ trunk/php/testmanager/testsuite_overview.php 2013-10-22 17:32:16 UTC (rev 1167)
@@ -182,6 +182,7 @@
if ( $b->del_ok() ) {
$info = addLine($info,sprintf($lang['TestsuiteDeleteI'], $b->getFullName()));
$msg = addLine($msg,$b->delete());
+ $this->dropSubSession();
} else {
$msg = addLine($msg,$b->getLink() .": ". sprintf($lang['Err0023'],$lang[$b->getType()]));
}
Modified: trunk/php/timetrack/timetrack_overview.php
===================================================================
--- trunk/php/timetrack/timetrack_overview.php 2013-10-18 10:53:24 UTC (rev 1166)
+++ trunk/php/timetrack/timetrack_overview.php 2013-10-22 17:32:16 UTC (rev 1167)
@@ -562,6 +562,7 @@
if ( $p->del_ok() ) {
$info = addLine($info,sprintf($lang['Delete']) .":". $p->getFullName());
$msg = addLine($msg,$p->delete());
+ $this->dropSubSession();
} else {
$msg = addLine($msg,$p->getLink() .': '. sprintf($lang['Err0023'],$lang[$p->getType()]));
}
@@ -569,6 +570,7 @@
}
$this->dbconn->Commit("WORK");
} else if ( preg_match("#^([S])(.*)#",$_GET['action'],$a) ) {
+ $this->dropSubSession();
$this->dbconn->Begin("WORK");
foreach($_GET['mark'] as $val) {
$p = new timetrack($this->dbconn);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gok...@us...> - 2013-10-18 10:53:28
|
Revision: 1166
http://sourceforge.net/p/tutos/code/1166
Author: gokohnert
Date: 2013-10-18 10:53:24 +0000 (Fri, 18 Oct 2013)
Log Message:
-----------
fix
Modified Paths:
--------------
trunk/php/calendar_day.php
trunk/php/calendar_week.php
Modified: trunk/php/calendar_day.php
===================================================================
--- trunk/php/calendar_day.php 2013-10-18 09:53:53 UTC (rev 1165)
+++ trunk/php/calendar_day.php 2013-10-18 10:53:24 UTC (rev 1166)
@@ -61,8 +61,9 @@
foreach($tutos[activemodules] as $i => $f) {
try {
- $x = &new $tutos[modules][$f][name]($this->dbconn);
+ $x = new $tutos[modules][$f][name]($this->dbconn);
$x->readCal($this->user,$from,$next_day);
+ unset($x);
}
catch (Exception $e) {
continue;
Modified: trunk/php/calendar_week.php
===================================================================
--- trunk/php/calendar_week.php 2013-10-18 09:53:53 UTC (rev 1165)
+++ trunk/php/calendar_week.php 2013-10-18 10:53:24 UTC (rev 1166)
@@ -89,8 +89,9 @@
foreach($tutos[activemodules] as $i => $f) {
try {
- $x = &new $tutos[modules][$f][name]($this->dbconn);
+ $x = new $tutos[modules][$f][name]($this->dbconn);
$x->readCal($this->user,$from,$to);
+ unset($x);
}
catch (Exception $e) {
continue;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gok...@us...> - 2013-10-18 09:53:57
|
Revision: 1165
http://sourceforge.net/p/tutos/code/1165
Author: gokohnert
Date: 2013-10-18 09:53:53 +0000 (Fri, 18 Oct 2013)
Log Message:
-----------
fix
Modified Paths:
--------------
trunk/php/bugtracking/bug_overview.php
Modified: trunk/php/bugtracking/bug_overview.php
===================================================================
--- trunk/php/bugtracking/bug_overview.php 2013-10-17 12:45:51 UTC (rev 1164)
+++ trunk/php/bugtracking/bug_overview.php 2013-10-18 09:53:53 UTC (rev 1165)
@@ -307,6 +307,11 @@
$id = $b;
$b = new bug($this->dbconn);
$b = $b->read($id,$b);
+ if (!is_object($b)) {
+ $a++;
+ unset($b);
+ continue;
+ }
}
$r .= $this->OverviewRowStart($line,$lang[$b->getType()] .": ". $b->getFullName());
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gok...@us...> - 2013-10-17 12:46:00
|
Revision: 1164
http://sourceforge.net/p/tutos/code/1164
Author: gokohnert
Date: 2013-10-17 12:45:51 +0000 (Thu, 17 Oct 2013)
Log Message:
-----------
multiline format fix / action feedback fix
Modified Paths:
--------------
trunk/html/default.css
trunk/php/reminder/reminder_overview.php
Modified: trunk/html/default.css
===================================================================
--- trunk/html/default.css 2013-10-13 14:43:27 UTC (rev 1163)
+++ trunk/html/default.css 2013-10-17 12:45:51 UTC (rev 1164)
@@ -268,7 +268,7 @@
TD .over_ml {
text-align: left;
vertical-align: top;
- white-space: normal;
+ white-space: pre;
padding-left: 0.5em;
padding-right: 0.2em;
padding-bottom: 0.2em;
Modified: trunk/php/reminder/reminder_overview.php
===================================================================
--- trunk/php/reminder/reminder_overview.php 2013-10-13 14:43:27 UTC (rev 1163)
+++ trunk/php/reminder/reminder_overview.php 2013-10-17 12:45:51 UTC (rev 1164)
@@ -155,7 +155,7 @@
* action via massupdate
*/
Function action() {
- global $lang,$msg;
+ global $lang,$msg,$info;
if ( $_GET['action'] == -2 ) {
$this->dbconn->Begin("WORK");
@@ -166,10 +166,10 @@
continue;
}
if ( $b->del_ok() ) {
- $msg .= $lang['Delete'].":". $b->getFullName() ."<br />";
- $msg .= $b->delete();
+ $info = addLine($info,$lang['Delete'].':'. $b->getFullName());
+ $msg = addLine($msg,$b->delete());
} else {
- $msg .= $b->getLink() .": ". sprintf($lang['Err0023'],$lang[$b->getType()]) ."<br />\n";
+ $msg = addLine($msg,$b->getLink() .': '. sprintf($lang['Err0023'],$lang[$b->getType()]));
}
unset($b);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gok...@us...> - 2013-10-13 14:43:29
|
Revision: 1163
http://sourceforge.net/p/tutos/code/1163
Author: gokohnert
Date: 2013-10-13 14:43:27 +0000 (Sun, 13 Oct 2013)
Log Message:
-----------
fix
Modified Paths:
--------------
trunk/php/database.pinc
Modified: trunk/php/database.pinc
===================================================================
--- trunk/php/database.pinc 2013-10-01 18:24:34 UTC (rev 1162)
+++ trunk/php/database.pinc 2013-10-13 14:43:27 UTC (rev 1163)
@@ -1,6 +1,6 @@
<?php
/**
- * Copyright 2001 - 2012 by Gero Kohnert
+ * Copyright 2001 - 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
@@ -226,7 +226,12 @@
if ( isset($tutos[cryptpw][$id]) ) {
$obj->crypt = $tutos[cryptpw][$id];
}
- $obj->repository = $tutos[repository][$id];
+ if (!isset($tutos[repository][$id])) {
+ // default
+ $obj->repository = 'tutos_private/repository'.$id;
+ } else {
+ $obj->repository = $tutos[repository][$id];
+ }
if ( isset($tutos[dbprefix][$id]) ) {
$obj->prefix = $tutos[dbprefix][$id];
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gok...@us...> - 2013-10-01 18:24:38
|
Revision: 1162
http://sourceforge.net/p/tutos/code/1162
Author: gokohnert
Date: 2013-10-01 18:24:34 +0000 (Tue, 01 Oct 2013)
Log Message:
-----------
fix
Modified Paths:
--------------
trunk/php/admin/backup.php
Modified: trunk/php/admin/backup.php
===================================================================
--- trunk/php/admin/backup.php 2013-10-01 18:22:08 UTC (rev 1161)
+++ trunk/php/admin/backup.php 2013-10-01 18:24:34 UTC (rev 1162)
@@ -49,11 +49,11 @@
$lang = array();
ReadLang($lang);
-$backup_rep = true;
-$backup_db = true;
+$backup_repo = true;
+$backup_db = true;
if (isset($_GET['norep'])) {
- $backup_rep = false;
+ $backup_repo = false;
}
if (isset($_GET['nodb'])) {
$backup_db = false;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gok...@us...> - 2013-10-01 18:22:11
|
Revision: 1161
http://sourceforge.net/p/tutos/code/1161
Author: gokohnert
Date: 2013-10-01 18:22:08 +0000 (Tue, 01 Oct 2013)
Log Message:
-----------
fix
Modified Paths:
--------------
trunk/php/admin/backup.php
Modified: trunk/php/admin/backup.php
===================================================================
--- trunk/php/admin/backup.php 2013-09-30 14:50:48 UTC (rev 1160)
+++ trunk/php/admin/backup.php 2013-10-01 18:22:08 UTC (rev 1161)
@@ -49,6 +49,15 @@
$lang = array();
ReadLang($lang);
+$backup_rep = true;
+$backup_db = true;
+
+if (isset($_GET['norep'])) {
+ $backup_rep = false;
+}
+if (isset($_GET['nodb'])) {
+ $backup_db = false;
+}
/**
* add a dir
*/
@@ -90,12 +99,14 @@
echo $dbconn->moreinfo();
-$dbconn->backup2file($dbbackup,0);
-
-if (!file_exists($dbbackup)) {
- die ('DB Backup failed. '. $dbbackup.' is missing');
+if ($backup_db) {
+ $dbconn->backup2file($dbbackup,0);
+ if (!file_exists($dbbackup)) {
+ die ('DB Backup failed. '. $dbbackup.' is missing');
+ }
}
+
if (class_exists("ZipArchive")) {
$zip = new ZipArchive();
@@ -104,13 +115,16 @@
}
echo "<br />\n";
- echo 'adding '. $dbbackup ."<br />\n";
- $zip->addFile($dbbackup,basename($dbbackup));
- echo "numfiles: " . $zip->numFiles . "<br />\r\n";
-
- echo 'adding '. $repo .'/' ."<br />\n";
- zipdir($repo,basename($tutos[repository][$dbnr]),$zip);
- echo "numfiles: " . $zip->numFiles . "<br />\r\n";
+ if ($backup_db) {
+ echo 'adding '. $dbbackup ."<br />\n";
+ $zip->addFile($dbbackup,basename($dbbackup));
+ echo "numfiles: " . $zip->numFiles . "<br />\r\n";
+ }
+ if ($backup_repo) {
+ echo 'adding '. $repo .'/' ."<br />\n";
+ zipdir($repo,basename($tutos[repository][$dbnr]),$zip);
+ echo "numfiles: " . $zip->numFiles . "<br />\r\n";
+ }
echo "<br />\n";
echo "status:" . $zip->status . "\n";
echo "<br />\n";
@@ -120,24 +134,26 @@
echo showzip($zipname);
} else {
chdir(dirname($repo));
- $cmd = "zip -9 -r ". $zipname .' '. basename($repo);
- $tfile = $tutos[sessionpath]."/xx";
- $output = array();
- $out = exec($cmd . " 2> ".$tfile ,$output,$rt);
- foreach($output as $i) {
- echo htmlentities($i)."<br />";
+ if ($backup_repo) {
+ $cmd = "zip -9 -r ". $zipname .' '. basename($repo);
+ $tfile = $tutos[sessionpath]."/xx";
+ $output = array();
+ $out = exec($cmd . " 2> ".$tfile ,$output,$rt);
+ foreach($output as $i) {
+ echo htmlentities($i)."<br />";
+ }
}
-
chdir($tutos[sessionpath]);
- $cmd = "zip -9 -r ". $zipname ." ". basename($dbbackup);
- $tfile = $tutos[sessionpath]."/xx";
- $output = array();
- $out = exec($cmd . " 2> ".$tfile ,$output,$rt);
+ if ($backup_db) {
+ $cmd = "zip -9 -r ". $zipname ." ". basename($dbbackup);
+ $tfile = $tutos[sessionpath]."/xx";
+ $output = array();
+ $out = exec($cmd . " 2> ".$tfile ,$output,$rt);
- foreach($output as $i) {
- echo htmlentities($i)."<br />";
- }
- echo "<pre>";
+ foreach($output as $i) {
+ echo htmlentities($i)."<br />";
+ }
+ } echo "<pre>";
passthru("cat ".$tfile."; rm ".$tfile,$xx);
echo "<br />";
passthru("zipinfo ".$zipname,$xx);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gok...@us...> - 2013-09-30 14:50:51
|
Revision: 1160
http://sourceforge.net/p/tutos/code/1160
Author: gokohnert
Date: 2013-09-30 14:50:48 +0000 (Mon, 30 Sep 2013)
Log Message:
-----------
updated hhistory search
Modified Paths:
--------------
trunk/php/admin_show.php
trunk/php/base.pinc
trunk/php/config_default.pinc
trunk/php/db/db.pinc
trunk/php/history.pinc
trunk/php/history_select.php
trunk/php/history_show.php
trunk/php/permission.p3
trunk/php/user.pinc
trunk/php/user_new.php
Modified: trunk/php/admin_show.php
===================================================================
--- trunk/php/admin_show.php 2013-09-29 09:03:43 UTC (rev 1159)
+++ trunk/php/admin_show.php 2013-09-30 14:50:48 UTC (rev 1160)
@@ -871,6 +871,15 @@
$x = tutos_user::getSelectLink($this->user);
$this->addMenu($x);
+ if ( $this->user->feature_ok(usehistory,PERM_SEL) ) {
+ $x = array( url => 'history_select.php',
+ text => $lang['ObjHistory'],
+ info => $lang['ObjHistory'],
+ category => array('search','history',usehistory)
+ );
+ $this->addMenu($x);
+ }
+
if ($tutos[useacl] == 1) {
$x = array( URL => 'acl_overview.php',
TEXT => $lang['ACLOverview'],
Modified: trunk/php/base.pinc
===================================================================
--- trunk/php/base.pinc 2013-09-29 09:03:43 UTC (rev 1159)
+++ trunk/php/base.pinc 2013-09-30 14:50:48 UTC (rev 1160)
@@ -343,6 +343,9 @@
/**
* Return Info about history of this object
+ * adr_id = user id or array of userids
+ * sort = sort filed
+ * dir = sort direction
*/
function readHistory($adr_id,$sort,$dir,$start,$from = null, $to = null, $oldfilter = '', $newfilter = '', $fieldfilter = '') {
if ( count($this->history) > 0 ) {
Modified: trunk/php/config_default.pinc
===================================================================
--- trunk/php/config_default.pinc 2013-09-29 09:03:43 UTC (rev 1159)
+++ trunk/php/config_default.pinc 2013-09-30 14:50:48 UTC (rev 1160)
@@ -159,6 +159,10 @@
//
// AUTHENTIFICATION
// ================
+//
+// Do not allow login (e.g. for db mainentance or similar)
+// true = no login allowed
+$tutos['nologin'] = false;
// The authentification type we use the $tutos[authtype] variable
//
// possible is db,ldap,x509,http,pam,pwauth_db,remote_user,google
Modified: trunk/php/db/db.pinc
===================================================================
--- trunk/php/db/db.pinc 2013-09-29 09:03:43 UTC (rev 1159)
+++ trunk/php/db/db.pinc 2013-09-30 14:50:48 UTC (rev 1160)
@@ -599,6 +599,7 @@
*/
function addWC($fld,$val,$type,$cmp = " = ") {
$wc = '';
+ $cmp = strtoupper($cmp);
$fld = $this->dbconn->colname($fld);
if ( $type == 'STRING' ) {
if ($cmp == 'LIKE') {
@@ -624,7 +625,7 @@
} else if ( $type == 'DATE' ) {
$wc = $cmp. $this->dbconn->date($val);
} else if ( $type == 'OBJ' ) {
- if ($cmp == 'in') {
+ if ($cmp == 'IN') {
$wc = ' '.$cmp.'(';
$pre = '';
foreach ($val as $i) {
@@ -635,7 +636,19 @@
} else
$wc = $cmp. sprintf("%d",$val->id);
} else if ( $type == 'INT' ) {
- $wc = $cmp. sprintf("%d",$val);
+ if ($cmp == 'IN') {
+ if (!is_array($val)) return;
+ if (count($val) == 0) return;
+ $wc = ' in (';
+ $pre = '';
+ foreach ($val as $v) {
+ $wc .= $pre.$v;
+ $pre = ',';
+ }
+ $wc .= ')';
+ } else {
+ $wc = $cmp. sprintf("%d",$val);
+ }
} else if ( $type == 'FLOAT' ) {
$wc = $cmp. sprintf("%F",$val);
} else {
Modified: trunk/php/history.pinc
===================================================================
--- trunk/php/history.pinc 2013-09-29 09:03:43 UTC (rev 1159)
+++ trunk/php/history.pinc 2013-09-30 14:50:48 UTC (rev 1160)
@@ -18,9 +18,11 @@
* Read the history of the given object
*
* @param Object $obj a object
- * @param $adr_id userid who chnaged
- * @param $from start time
- * @param $to end time
+ * @param $adr_id userid who chnaged
+ * @param $sort sort field
+ * @param $dir sort direction
+ * @param $from start time
+ * @param $to end time
*/
function readHistory (tutos_base $obj,$adr_id,$sort = "m_time" ,$dir,$start,$from = null,$to = null, $oldfilter = '', $newfilter = '', $fieldfilter = array()) {
global $tutos,$table;
@@ -46,9 +48,12 @@
} else
$query->addWC('obj_id',$obj,'OBJ');
}
- if ( $adr_id != -1 ) {
+ if ( is_int($adr_id) && ($adr_id != -1) ) {
$query->addWC('adr_id',$adr_id,'INT');
}
+ if ( is_array($adr_id) && count(($adr_id)) ) {
+ $query->addWC('adr_id',$adr_id,'INT','in');
+ }
// filter by time
if (is_object($from) && !$from->notime) {
Modified: trunk/php/history_select.php
===================================================================
--- trunk/php/history_select.php 2013-09-29 09:03:43 UTC (rev 1159)
+++ trunk/php/history_select.php 2013-09-30 14:50:48 UTC (rev 1160)
@@ -92,9 +92,15 @@
$this->center = true;
$this->css_class = 'selectbox';
+ if ( ! $this->user->feature_ok(usehistory,PERM_SEL) ) {
+ $msg .= sprintf($lang['Err0022'],$this->name);
+ $this->stop = true;
+ return;
+ }
if ( ! $this->user->feature_ok(usehistory,PERM_SEE) ) {
$msg .= sprintf($lang['Err0022'],$this->name);
$this->stop = true;
+ return;
}
// Defaults for search
$this->hsfd = new TUTOS_Date_Time(0);
Modified: trunk/php/history_show.php
===================================================================
--- trunk/php/history_show.php 2013-09-29 09:03:43 UTC (rev 1159)
+++ trunk/php/history_show.php 2013-09-30 14:50:48 UTC (rev 1160)
@@ -43,12 +43,12 @@
$r = '';
$adr = null;
if ( $this->id == -1 ) {
- $cols = 7;
+ $cols = 6;
} else {
- $cols = 5;
+ $cols = 4;
}
- if ( $this->adr_id != -1 ) {
- $cols--;
+ if ( ($this->adr_id == -1) || is_array($this->adr_id) ) {
+ $cols++;
}
$r .= $this->header;
$r .= $this->OverviewTableStart();
@@ -81,7 +81,7 @@
$r .= $this->orderheader("",$lang['HistoryFld'],$this->link2);
$r .= $this->orderheader("",$lang['HistoryOldV'],$this->link2);
$r .= $this->orderheader("",$lang['HistoryNewV'],$this->link2);
- if ( $this->adr_id == -1 ) {
+ if ( ($this->adr_id == -1) || is_array($this->adr_id) ) {
$r .= $this->orderheader("",$lang['User'],$this->link2);
}
$r .= $this->orderheader("m_time",$lang['atDateTime'],$this->link2);
@@ -206,7 +206,7 @@
$r .= $this->OverviewRowBlock($j['new'],$cl);
}
}
- if ( $this->adr_id == -1 ) {
+ if ( ($this->adr_id == -1) || is_array($this->adr_id) ) {
$adr = new tutos_address($this->dbconn);
$adr = $adr->read($f["adr_id"],$adr);
$r .= $this->OverviewRowBlock((is_object($adr) ? $adr->getLink() : ' ') ,'over_l');
@@ -298,7 +298,22 @@
$this->header .= $this->hpre.$lang['User'] .' = '. $this->adr->getFullName();
$this->hpre = '<br />';
}
+ if ( isset($_GET['adr_fn']) && ($_GET['adr_fn'] != '') ) {
+ $this->adr_id = array();
+ $this->link1 = addUrlParameter($this->link1,"adr_fn=".$_GET['adr_fn']);
+ $adr = search_by_name($_GET['adr_fn'],'a',1);
+ $this->header .= $this->hpre.$lang['User'] .' = ';
+ $pre = '';
+ foreach ( $adr as $x) {
+ $this->header .= $pre.$x->getLink();
+ $pre = ',';
+ $this->adr_id[] = $x->id;
+ }
+ $this->hpre = '<br />';
+
+ }
+
if ($arg == 0) {
$this->id = -1;
if ( ! $this->user->isadmin() && ($tutos[demo] != 1) ) {
Modified: trunk/php/permission.p3
===================================================================
--- trunk/php/permission.p3 2013-09-29 09:03:43 UTC (rev 1159)
+++ trunk/php/permission.p3 2013-09-30 14:50:48 UTC (rev 1160)
@@ -441,6 +441,13 @@
}
}
+ if ($tutos['nologin']) {
+ $msg = addLine($msg,'Login diabled by config.');
+ ReadLang($lang);
+ $auth[0]->login_form($_SERVER['SCRIPT_NAME'],$auth,$msg);
+ }
+
+
if ( isset($_POST['login']) ) {
$action = $_POST['login'];
} elseif ( isset($_GET['login']) ) {
Modified: trunk/php/user.pinc
===================================================================
--- trunk/php/user.pinc 2013-09-29 09:03:43 UTC (rev 1159)
+++ trunk/php/user.pinc 2013-09-30 14:50:48 UTC (rev 1160)
@@ -848,7 +848,7 @@
$q->addFV("weekstart",$this->weekstart,"INT");
$h = '';
- foreach($this->workday as $i => $f) {
+ foreach($this->workday as $f) {
$h .= $f .',';
}
$q->addFV("workdays",$h,"STRING",$table['people']['workdays'][size]);
Modified: trunk/php/user_new.php
===================================================================
--- trunk/php/user_new.php 2013-09-29 09:03:43 UTC (rev 1159)
+++ trunk/php/user_new.php 2013-09-30 14:50:48 UTC (rev 1160)
@@ -298,10 +298,10 @@
$r .= '<tbody class="tg2">';
$r .= '<tr>'."\n";
$r .= $this->showfieldc($lang['UserDefaultGrp'],0);
- $r .= " <th width=\"30%\" colspan=\"2\">". $lang['ACLread'] ."</th>\n";
- $r .= " <th width=\"30%\" colspan=\"2\">". $lang['ACLread'] ."<br />". $lang['ACLuse'] ."</th>\n";
- $r .= " <th width=\"30%\" colspan=\"2\">". $lang['ACLread'] ."<br />". $lang['ACLuse'] ."<br />". $lang['ACLmodify'] ."</th>\n";
- $r .= " <th width=\"30%\" colspan=\"2\">". $lang['ACLread'] ."<br />". $lang['ACLuse'] ."<br />". $lang['ACLmodify'] ."<br />". $lang['ACLdelete'] ."</th>\n";
+ $r .= " <th width=\"20%\" colspan=\"2\">". $lang['ACLread'] ."</th>\n";
+ $r .= " <th width=\"20%\" colspan=\"2\">". $lang['ACLread'] ."<br />". $lang['ACLuse'] ."</th>\n";
+ $r .= " <th width=\"20%\" colspan=\"2\">". $lang['ACLread'] ."<br />". $lang['ACLuse'] ."<br />". $lang['ACLmodify'] ."</th>\n";
+ $r .= " <th width=\"20%\" colspan=\"2\">". $lang['ACLread'] ."<br />". $lang['ACLuse'] ."<br />". $lang['ACLmodify'] ."<br />". $lang['ACLdelete'] ."</th>\n";
$r .= " <td></td>\n";
$r .= "</tr>\n";
$r .= '<tr>'."\n";
@@ -547,6 +547,12 @@
}
$this->obj->read_permissions();
+ // preset the acldefault set
+ if ( ($tutos[defaultacl] == 2) && ($this->obj->id == -1) ) {
+ $this->obj->acldefault[EVERYBODY] = $tutos[useok];
+ $this->obj->acldefault[MYTEAMS] = $tutos[delok];
+ }
+
read_config_values_by_obj($this->dbconn,array('main','task'),$this->obj);
$this->addHidden('uid',$this->obj->uid);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gok...@us...> - 2013-09-29 09:03:46
|
Revision: 1159
http://sourceforge.net/p/tutos/code/1159
Author: gokohnert
Date: 2013-09-29 09:03:43 +0000 (Sun, 29 Sep 2013)
Log Message:
-----------
fix
Modified Paths:
--------------
trunk/php/bugtracking/bug.pinc
Modified: trunk/php/bugtracking/bug.pinc
===================================================================
--- trunk/php/bugtracking/bug.pinc 2013-09-27 16:21:50 UTC (rev 1158)
+++ trunk/php/bugtracking/bug.pinc 2013-09-29 09:03:43 UTC (rev 1159)
@@ -1059,13 +1059,16 @@
*/
function setSolver(&$solver) {
global $lang;
+
if (!is_object($solver) && ($solver == 'auto') ) {
// set default
if ( is_object($this->parent) && $this->parent->getType() == "product" ) {
$this->parent->readroles();
if ( count($this->parent->role[PROD_ROLE_MANAGER]) > 0 ) {
+ reset($this->parent->role[PROD_ROLE_MANAGER]);
$solver = current($this->parent->role[PROD_ROLE_MANAGER]);
- }else if ( count($this->parent->role[PROD_ROLE_MANAGER2]) > 0 ) {
+ } else if ( count($this->parent->role[PROD_ROLE_MANAGER2]) > 0 ) {
+ reset($this->parent->role[PROD_ROLE_MANAGER2]);
$solver = current($this->parent->role[PROD_ROLE_MANAGER2]);
} else {
$solver = $this->creator;
@@ -2329,4 +2332,4 @@
return $r;
}
}
-?>
\ No newline at end of file
+?>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gok...@us...> - 2013-09-27 16:21:53
|
Revision: 1158
http://sourceforge.net/p/tutos/code/1158
Author: gokohnert
Date: 2013-09-27 16:21:50 +0000 (Fri, 27 Sep 2013)
Log Message:
-----------
fix
Modified Paths:
--------------
trunk/php/layout/new2_layout.pinc
Modified: trunk/php/layout/new2_layout.pinc
===================================================================
--- trunk/php/layout/new2_layout.pinc 2013-09-27 16:02:11 UTC (rev 1157)
+++ trunk/php/layout/new2_layout.pinc 2013-09-27 16:21:50 UTC (rev 1158)
@@ -1079,7 +1079,12 @@
$r .= ' <a class="nodeco" href="'. $tutos['base'] .'/html/copyright.html" title="TUTOS '. $tutos[version] ;
if ( ($tutos[debug] == 1) && function_exists('memory_get_usage') ) {
- $r .= sprintf(' using %s of memory',format_size(memory_get_usage()).'/'.format_size(memory_get_peak_usage(true)));
+
+ if ( function_exists('memory_get_peak_usage') ) {
+ $r .= sprintf(' using %s of memory',format_size(memory_get_usage()).'/'.format_size(memory_get_peak_usage(true)));
+ } else {
+ $r .= sprintf(' using %s of memory',format_size(memory_get_usage()));
+ }
}
if ($tutos[debug] == 1) {
if ($tutos[usepopup] == 2) {
@@ -1340,4 +1345,4 @@
return 'new2_layout';
}
}
-?>
\ No newline at end of file
+?>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gok...@us...> - 2013-09-27 16:02:13
|
Revision: 1157
http://sourceforge.net/p/tutos/code/1157
Author: gokohnert
Date: 2013-09-27 16:02:11 +0000 (Fri, 27 Sep 2013)
Log Message:
-----------
fix
Modified Paths:
--------------
trunk/php/mytutos.php
Modified: trunk/php/mytutos.php
===================================================================
--- trunk/php/mytutos.php 2013-09-27 15:59:07 UTC (rev 1156)
+++ trunk/php/mytutos.php 2013-09-27 16:02:11 UTC (rev 1157)
@@ -52,163 +52,163 @@
return ' </table>'."\n";
}
+
/**
- * Display calendar for one week
+ * display an overview of everything that's interessting for an user
*/
-Function calendar_info(&$adr, $t)
+class Mytutos extends layout
{
- global $lang, $tutos, $current_user;
+ /**
+ * Display calendar for one week
+ */
+ Function calendar_info() {
+ global $lang, $tutos, $current_user;
- $r = '';
- $ts = adodb_mktime(12, 0, 0,
- substr($t, 4, 2),
- substr($t, 6, 2),
- substr($t, 0, 4));
+ $r = '';
+ $ts = adodb_mktime(12, 0, 0,
+ substr($this->t, 4, 2),
+ substr($this->t, 6, 2),
+ substr($this->t, 0, 4));
- /* Back to last Monday or Sunday before ts */
- while ( Date("w", $ts) != $adr->weekstart ) {
- $ts -= 86400;
- }
+ /* Back to last Monday or Sunday before ts */
+ while ( Date("w", $ts) != $this->adr->weekstart ) {
+ $ts -= 86400;
+ }
- $w0 = ((1 + Date("w", adodb_mktime(12, 0, 0, 1, 1, Date("Y", $ts)))) % 7) > 3;
- $wn = sprintf("%02d", Round((Date("z", $ts)+7) / 7));
- $yy = Date("y", $ts);
+ $w0 = ((1 + Date("w", adodb_mktime(12, 0, 0, 1, 1, Date("Y", $ts)))) % 7) > 3;
+ $wn = sprintf("%02d", Round((Date("z", $ts)+7) / 7));
+ $yy = Date("y", $ts);
- $day = 0;
- $dd = new TUTOS_Date_Time();
+ $day = 0;
+ $dd = new TUTOS_Date_Time();
- $from = new TUTOS_Date_Time();
- $to = new TUTOS_Date_Time();
+ $from = new TUTOS_Date_Time();
+ $to = new TUTOS_Date_Time();
- $from->setDateTimeTS($ts - 12 * 3600);
- $to->setDateTimeTS($ts - 12 * 3600);
- $to->addDays(7);
+ $from->setDateTimeTS($ts - 12 * 3600);
+ $to->setDateTimeTS($ts - 12 * 3600);
+ $to->addDays(7);
- $adr->callist = array();
- appointment::readCal($adr, $from, $to);
- if ( $tutos['tasksincalendar'] == 1 ) {
- task::readCal($adr, $from, $to);
- }
- foreach ($tutos[activemodules] as $i => $f) {
- try {
- $x = new $tutos[modules][$f][name]($adr->dbconn);
- $x->readCal($adr, $from, $to);
+ $this->adr->callist = array();
+ appointment::readCal($this->adr, $from, $to);
+ if ( $tutos['tasksincalendar'] == 1 ) {
+ task::readCal($this->adr, $from, $to);
}
- catch (Exception $e) {
- continue;
+ foreach ($tutos[activemodules] as $i => $f) {
+ try {
+ $x = new $tutos[modules][$f][name]($this->adr->dbconn);
+ $x->readCal($this->adr, $from, $to);
+ }
+ catch (Exception $e) {
+ continue;
+ }
}
- }
- $r .= info_table_start();
- $r .= " <tr>\n";
- $r .= ' <th width="5%">'. $lang['week'] ."</th>\n";
- $wd = $ts;
+ $r .= info_table_start();
+ $r .= " <tr>\n";
+ $r .= ' <th width="5%">'. $lang['week'] ."</th>\n";
+ $wd = $ts;
- for ( $i = $adr->weekstart;$i<=6;$i++ ) {
- if ($adr->isWorkDay($i)) {
- $tref = Date("Ymd", $wd);
- $r .= ' <th width="10%">';
- $r .= menulink('calendar_day.php?t='. $tref, $lang['Day'.$i]);
- $r .= "</th>\n";
+ for ( $i = $this->adr->weekstart;$i<=6;$i++ ) {
+ if ($this->adr->isWorkDay($i)) {
+ $tref = Date("Ymd", $wd);
+ $r .= ' <th width="10%">';
+ $r .= menulink('calendar_day.php?t='. $tref, $lang['Day'.$i]);
+ $r .= "</th>\n";
+ }
+ $wd = NextDay($wd);
}
- $wd = NextDay($wd);
- }
- for ( $i = 0;$i<$adr->weekstart;$i++ ) {
- if ($adr->isWorkDay($i)) {
- $tref = Date("Ymd", $wd);
- $r .= ' <th width="10%">';
- $r .= menulink('calendar_day.php?t='. $tref, $lang['Day'.$i]);
- $r .= "</th>\n";
+ for ( $i = 0;$i < $this->adr->weekstart;$i++ ) {
+ if ($this->adr->isWorkDay($i)) {
+ $tref = Date("Ymd", $wd);
+ $r .= ' <th width="10%">';
+ $r .= menulink('calendar_day.php?t='. $tref, $lang['Day'.$i]);
+ $r .= "</th>\n";
+ }
+ $wd = NextDay($wd);
}
- $wd = NextDay($wd);
- }
- $r .= " </tr>\n";
+ $r .= " </tr>\n";
- $r .= " <tr>\n";
- $r .= ' <td class="week">'. menulink('calendar_week.php?t='.Date("Ymd", $ts), $wn ."/". $yy, $lang['week'] .' '. $wn .'/'. $yy) ."</td>\n";
+ $r .= " <tr>\n";
+ $r .= ' <td class="week">'. menulink('calendar_week.php?t='.Date("Ymd", $ts), $wn ."/". $yy, $lang['week'] .' '. $wn .'/'. $yy) ."</td>\n";
- while ($day < 7) {
- // $d = strftime($lang['DateFormatStr'],$ts);
- $dd->setDateTimeTS($ts);
- $d = $dd->getDate();
- $tref = Date("Ymd", $ts);
- $dinfo = GetDaysInfo($ts);
- /* Select appointments for this day */
- $next = NextDay($ts);
- if ( ! $dd->isWorkDay($adr) ) {
- $ts = $next;
- $day++;
- continue;
- }
- $r .= '<td class="'. $dinfo[color] ."\">\n";
- $r .= '<ul class="dropable">'."\n";
- $r .= ' <li>'."\n";
+ while ($day < 7) {
+ // $d = strftime($lang['DateFormatStr'],$ts);
+ $dd->setDateTimeTS($ts);
+ $d = $dd->getDate();
+ $tref = Date("Ymd", $ts);
+ $dinfo = GetDaysInfo($ts);
+ /* Select appointments for this day */
+ $next = NextDay($ts);
+ if ( ! $dd->isWorkDay($this->adr) ) {
+ $ts = $next;
+ $day++;
+ continue;
+ }
+ $r .= '<td class="'. $dinfo[color] ."\">\n";
+ $r .= '<ul class="dropable">'."\n";
+ $r .= ' <li>'."\n";
- if ( isset($dinfo[Desc]) ) {
- if ($current_user->feature_ok(usecalendar, PERM_NEW) ) {
- $r .= makelink('app_new.php?t='. $tref,
- $d,
- $lang['NewAppointInfo'],
- $dinfo[popinfo]);
+ if ( isset($dinfo[Desc]) ) {
+ if ($current_user->feature_ok(usecalendar, PERM_NEW) ) {
+ $r .= makelink('app_new.php?t='. $tref,
+ $d,
+ $lang['NewAppointInfo'],
+ $dinfo[popinfo]);
+ } else {
+ $r .= $d;
+ }
+ $r .= "\n";
+ $r .= '<br /><span class="dinfo">'. $dinfo[Desc] ."</span>\n";
} else {
- $r .= $d;
+ if ($current_user->feature_ok(usecalendar, PERM_NEW) ) {
+ $r .= makelink('app_new.php?t='. $tref, $d, $lang['NewAppointInfo']);
+ } else {
+ $r .= $d;
+ }
+ $r .= "\n";
}
- $r .= "\n";
- $r .= '<br /><span class="dinfo">'. $dinfo[Desc] ."</span>\n";
- } else {
- if ($current_user->feature_ok(usecalendar, PERM_NEW) ) {
- $r .= makelink('app_new.php?t='. $tref, $d, $lang['NewAppointInfo']);
- } else {
- $r .= $d;
- }
- $r .= "\n";
- }
- $r .= ' </li>'."\n";
+ $r .= ' </li>'."\n";
- foreach ($adr->callist as $idx => $x) {
- /* the correct day */
- if ( ! $adr->callist[$idx]->inside($dd) ) {
- continue;
- }
- /* Check if appointment is displayed */
- if ($adr->callist[$idx]->gettype() == "appointment") {
- $found = 0;
- @reset($adr->callist[$idx]->participant);
- while ( ($found == 0) && (list ($i,$f) = @each ($adr->callist[$idx]->participant)) ) {
- if ( $f->id == $adr->id ) {
- $found = 1;
- } else if ( array_key_exists($f->id,$adr->teamlist) ) {
- $found = 1;
+ foreach ($this->adr->callist as $idx => $x) {
+ /* the correct day */
+ if ( ! $this->adr->callist[$idx]->inside($dd) ) {
+ continue;
+ }
+ /* Check if appointment is displayed */
+ if ($this->adr->callist[$idx]->gettype() == "appointment") {
+ $found = 0;
+ @reset($this->adr->callist[$idx]->participant);
+ while ( ($found == 0) && (list ($i,$f) = @each ($this->adr->callist[$idx]->participant)) ) {
+ if ( $f->id == $this->adr->id ) {
+ $found = 1;
+ } else if ( array_key_exists($f->id,$this->adr->teamlist) ) {
+ $found = 1;
+ }
}
+ if ( $found == 0 ) {
+ continue;
+ }
}
- if ( $found == 0 ) {
+ // Do not show finished tasks
+ if ( ($this->adr->callist[$idx]->gettype() == "task") && ($this->adr->callist[$idx]->state == 2) ) {
continue;
}
+ // Show appointments or task
+ $r .= $this->adr->callist[$idx]->formatted($this);
}
- // Do not show finished tasks
- if ( ($adr->callist[$idx]->gettype() == "task") && ($adr->callist[$idx]->state == 2) ) {
- continue;
- }
- // Show appointments or task
- $r .= $adr->callist[$idx]->formatted();
+
+ $r .= " </ul>\n";
+ $r .= "</td>\n";
+ $day++;
+ $ts = $next;
}
-
- $r .= " </ul>\n";
- $r .= "</td>\n";
- $day++;
- $ts = $next;
+ $r .= " </tr>\n";
+ $r .= info_table_end();
+ return $r;
}
- $r .= " </tr>\n";
- $r .= info_table_end();
- return $r;
-}
-/**
- * display an overview of everything that's interessting for an user
- */
-class Mytutos extends layout
-{
/**
* the data display part
*/
@@ -241,7 +241,7 @@
$r .= "</tr>\n";
$r .= "<tr>\n";
$r .= " <td colspan=\"4\" valign=\"top\">\n";
- $r .= calendar_info($this->adr, $this->t);
+ $r .= $this->calendar_info();
$r .= " </td>\n";
$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-09-27 15:59:09
|
Revision: 1156
http://sourceforge.net/p/tutos/code/1156
Author: gokohnert
Date: 2013-09-27 15:59:07 +0000 (Fri, 27 Sep 2013)
Log Message:
-----------
fix
Modified Paths:
--------------
trunk/php/bugtracking/bug_overview.php
Modified: trunk/php/bugtracking/bug_overview.php
===================================================================
--- trunk/php/bugtracking/bug_overview.php 2013-09-23 09:35:32 UTC (rev 1155)
+++ trunk/php/bugtracking/bug_overview.php 2013-09-27 15:59:07 UTC (rev 1156)
@@ -55,152 +55,6 @@
}
/**
- * display a burndown chart
- */
- Function info_burndown() {
- global $lang,$tutos,$table;
-
- $closed = preg_split('#,#',$tutos['bug_closed_states']);
-
- if (!load_jpgraph( array('jpgraph_line.php','jpgraph_date.php'),'../' )) {
- return;
- }
-
- $min = new TUTOS_Date_Time();
- $max = new TUTOS_Date_Time(0);
- foreach ($this->blist as $i => $b) {
- $b->read_last_mod();
- $min = TUTOS_Date_Time::min($min,$b->creation);
- $max = TUTOS_Date_Time::max($max,$b->creation);
- if (isset($b->lastmod[0])) {
- $max = TUTOS_Date_Time::max($max,$b->lastmod[0]['date']);
- }
- $max = TUTOS_Date_Time::max($max,$min);
- if (!isset($b->lastmod[0])) {
- // create a lastmod that represents the creation
- $l['date'] = $b->creation;
- $l['old'] = -1;
- $l['new'] = $b->state;
- } else {
- $l['date'] = $b->creation;
- $l['old'] = -1;
- $l['new'] = $b->lastmod[count($b->lastmod)-1]['old'];
- }
- $l = array($l);
- $b->lastmod = array_merge($b->lastmod,$l);
- }
- $max->addDays(1);
-
- $from = $min->getTimeStamp();
- $to = $max->getTimeStamp();
- $ticks = GB_WIDTH-100;
-
- $data = array();
- $datax = array();
- $dplot = array();
- $step = round(($to - $from) / $ticks);
- if ($step == 0) {
- $step = 1;
- }
- //$step = 10800;
- //$step = 3600;
- $ticks = ($to - $from) / $step;
-
- // Points
- $cntx = 0;
- for ($i = $from; $i<$to; $i+= $step) {
- $datax[$cntx] = $i;
- foreach ($this->stc->states as $f) {
- $data[$f->stc_state][$cntx] = 0;
- }
- $cntx++;
- }
- $maxcnt = $cntx-1;
- $maxto = $i;
-
- foreach ($this->blist as $i => $b) {
- // set the bug history
-
- // walk back
- $modidx = 0;
- $cntx = $maxcnt;
- $l = $b->lastmod[$modidx];
- for ($i = $maxto; $i > $from; $i-= $step) {
- if ($l != null) {
- if ($i >= $l['date']->getTimeStamp()) {
- if (isset($data[$l['new']][$cntx]))
- $data[$l['new']][$cntx]++;
- } else {
- $modidx++;
- if (isset($b->lastmod[$modidx])) {
- $l = $b->lastmod[$modidx];
- $data[$l['new']][$cntx]++;
- } else {
- $l = null;
- }
- }
- }
- $cntx--;
- }
-
- }
-
- // remove the closed states
- foreach($closed as $c) {
- unset ($data[$c]);
- }
-
- // echo '<br>from:'.$from;
- // echo '<br>to:'.$to;
- // echo '<br>datax:'.count($datax);
- // echo '<br>data:'.count($data);
- // die();
- $graph = new Graph(GB_WIDTH,GB_HEIGHT*2,'auto');
- $font = jpgraph_init($graph);
- $graph->title->Set($lang['BugBurndown']);
- $graph->SetScale("datlin");
- $graph->img->SetMargin(50,180,20,120);
-
- foreach ($this->stc->states as $f) {
- if (!isset($data[$f->stc_state])) continue;
- if (array_sum($data[$f->stc_state]) == 0) continue;
- $x = new LinePlot($data[$f->stc_state],$datax);
- $x->SetFillColor($f->color.'@0.2');
- $x->SetColor($f->color.'@0.2');
- $x->SetStepStyle();
- $x->SetLegend($f->getFullName());
- $dplot[] = $x;
- unset($x);
- }
- // Create the accumulated graph
- $accplot = new AccLinePlot($dplot);
-
- // Add the plot to the graph
- $graph->Add($accplot);
-
- $graph->xaxis->title->Set($lang['Date']);
- $graph->xaxis->title->SetFont($font,FS_BOLD,9);
- $graph->xaxis->SetLabelAngle(60);
- $graph->xaxis->SetTextTickInterval(2);
- $graph->xaxis->SetLabelMargin(1);
- $graph->xaxis->SetTitleMargin(75);
- $graph->xaxis->SetFont($font,FS_NORMAL,9);
-
- $graph->yaxis->title->Set($lang['Bugs']);
- $graph->yaxis->title->SetFont($font,FS_BOLD,9);
- $graph->yaxis->scale->ticks->SupressFirst(true);
- $graph->yaxis->SetTextTickInterval(2);
- $graph->yaxis->SetLabelMargin(1);
- $graph->yaxis->SetTitleMargin(30);
- $graph->yaxis->SetFont($font,FS_NORMAL,9);
-
- jpgraph_footer($graph,GB_HEIGHT*2);
-
- $graph->Stroke();
-
- }
-
- /**
* display the info as excel output
*/
Function info_excel() {
@@ -379,8 +233,6 @@
return $this->info_excel();
} else if ( $this->format == "stat") {
return $this->statinfo();
- } else if ( $this->format == 'burndown') {
- return $this->info_burndown();
}
@@ -865,7 +717,6 @@
}
$l = array($l);
$b->lastmod = array_merge($b->lastmod,$l);
-
// walk back
$modidx = 0;
$x = $maxx;
@@ -883,7 +734,7 @@
if (isset($b->lastmod[$modidx])) {
$l = $b->lastmod[$modidx];
if (isset($datax[$i]['cnt'][$l['new']]))
- $datax[$i]['cnt'][$l['new']]++;
+ $datax[$i]['cnt'][$l['new']]++;
} else {
$l = null;
}
@@ -901,7 +752,7 @@
$sburn['data'] .= $pre.'[';
$pre2 = '';
foreach ($datax as $i2) {
- if (!isset($i2['cnt'][$i])) continue;
+ if (!isset($i2['cnt'][$f->stc_state])) continue;
if (!isset($i2['title'])) continue;
$sburn['data'] .= $pre2.'[\''.$i2['title'].'\','.$i2['cnt'][$f->stc_state].']';
@@ -1431,4 +1282,4 @@
$l = new Bug_overview($current_user);
$l->display();
$dbconn->Close();
-?>
+?>
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gok...@us...> - 2013-09-23 09:35:37
|
Revision: 1155
http://sourceforge.net/p/tutos/code/1155
Author: gokohnert
Date: 2013-09-23 09:35:32 +0000 (Mon, 23 Sep 2013)
Log Message:
-----------
allow flushing of apc cache
Modified Paths:
--------------
trunk/php/admin/apc.php
Modified: trunk/php/admin/apc.php
===================================================================
--- trunk/php/admin/apc.php 2013-09-19 08:22:18 UTC (rev 1154)
+++ trunk/php/admin/apc.php 2013-09-23 09:35:32 UTC (rev 1155)
@@ -168,7 +168,46 @@
return;
}
+ $url = 'apc.php';
+ if (isset($_GET['action']) && $_GET['action'] == 'clearu') {
+ $x = apc_clear_cache('user');
+ if ($x === false)
+ $msg = addLine($msg,'Flushing failed !');
+ else
+ $info = addLine($info,'flushed user cache');
+ $this->redirect = $url;
+ $this->stop = true;
+ return;
+ }
+ if (isset($_GET['action']) && $_GET['action'] == 'clears') {
+ $x = apc_clear_cache();
+ if ($x === false)
+ $msg = addLine($msg,'Flushing failed !');
+ else
+ $info = addLine($info,'flushed system (file) cache');
+ $this->redirect = $url;
+ $this->stop = true;
+ return;
+ }
+ $url = 'admin/apc.php';
+ $url = addUrlParameter($url, "action=clearu");
+ $x = array( URL => $url,
+ TEXT => 'Flush User Cache',
+ INFO => 'Flush the user cache',
+ 'target' => 'admin',
+ CATEGORY => array('admin')
+ );
+ $this->addMenu($x);
+ $url = 'admin/apc.php';
+ $url = addUrlParameter($url, "action=clears");
+ $x = array( URL => $url,
+ TEXT => 'Flush System Cache',
+ INFO => 'Flush the system (file) cache',
+ 'target' => 'admin',
+ CATEGORY => array('admin')
+ );
+ $this->addMenu($x);
}
}
$l = new APC_show($current_user);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gok...@us...> - 2013-09-19 08:22:22
|
Revision: 1154
http://sourceforge.net/p/tutos/code/1154
Author: gokohnert
Date: 2013-09-19 08:22:18 +0000 (Thu, 19 Sep 2013)
Log Message:
-----------
search by name for users / used in watchlist
Modified Paths:
--------------
trunk/php/user.pinc
trunk/php/watchlist/watchlist_ins.php
trunk/php/watchlist/watchlist_new.php
trunk/php/watchlist/watchlist_overview.php
trunk/php/webelements.p3
Modified: trunk/php/user.pinc
===================================================================
--- trunk/php/user.pinc 2013-09-18 17:31:02 UTC (rev 1153)
+++ trunk/php/user.pinc 2013-09-19 08:22:18 UTC (rev 1154)
@@ -264,6 +264,67 @@
}
/**
+ * search for a address
+ * return a array of possible addresses
+ * mode 1 fill objects
+ * mode 0 do not fill objects
+ */
+ static function search_by_name(array &$arr,tutos_user $user,$name,$mode = 1) {
+ global $table;
+
+ if ( trim($name) == '' ) return 0;
+ if (substr($name,0,1) == '!') {
+ $name = substr($name,1);
+ $negate = true;
+ } else {
+ $negate = false;
+ }
+
+ // search for a given object ID
+ $qx = '';
+ if (preg_match('/#([0-9]*)/',trim($name),$regs) && is_numeric($regs[1])) {
+ $qx = ' id = '.$regs[1];
+ } else {
+ $qx .= $user->dbconn->Like ('a.f_name',$name,'a.m_name','a.l_name');
+ $qx .= ' OR '. $user->dbconn->Like ('a.l_name',$name,'a.f_name','a.m_name');
+ $qx .= ' OR '. $user->dbconn->Like ('p.login',$name);
+ }
+
+
+ $q = 'SELECT '.($mode == 1 ? 'a.*':'a.id').' from '. $user->dbconn->prefix .$table['address'][name].' a , ';
+ $q .= $user->dbconn->prefix .$table['people'][name].' p WHERE ';
+ $q .= 'a.id = p.adr_id AND (';
+ $q .= $qx;
+ $q .= ') order by a.l_name ';
+ check_dbacl($user->dbconn, $q, $user->id);
+ $r = $user->dbconn->Exec($q);
+ $n = $r->numrows();
+ $a = 0;
+
+ while ( $a < $n ) {
+ if ($mode == 1) {
+ $x = new Tutos_address($user->dbconn);
+ $x->read_result($r,$a);
+ if ($negate)
+ $arr[-$x->id] = &$x;
+ else
+ $arr[$x->id] = &$x;
+ unset($x);
+ } else {
+ $id = $r->get($a,'id');
+ if ($negate)
+ $arr[-$id] = $id;
+ else
+ $arr[$id] = $id;
+ }
+ $a++;
+ }
+ $r->free();
+
+ return $n;
+ }
+
+ /**
* Read and set the permissions this user has
* feature permissions have an ID < 0
*/
Modified: trunk/php/watchlist/watchlist_ins.php
===================================================================
--- trunk/php/watchlist/watchlist_ins.php 2013-09-18 17:31:02 UTC (rev 1153)
+++ trunk/php/watchlist/watchlist_ins.php 2013-09-19 08:22:18 UTC (rev 1154)
@@ -1,6 +1,6 @@
<?php
/**
- * Copyright 1999 - 2012 by Gero Kohnert
+ * Copyright 1999 - 2013 by Gero Kohnert
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
@@ -9,6 +9,8 @@
* @modulegroup watchlist
* @package watchlist
*/
+$tutos['files'][__FILE__] = '$Rev$';
+
$tutos['base'] = "../..";
ini_set("include_path","..");
require_once 'webelements.p3';
@@ -26,7 +28,7 @@
Fatal_Error("Missing gotourl");
}
if ( isset($_REQUEST['adrfn']) ) {
- $a = check_field($_REQUEST['adrfn'],"adrfn","adrl",'a');
+ $a = check_field($_REQUEST['adrfn'],'adrfn','adrl','u');
} else if (isset($_REQUEST['adrid'])) {
$a = new Tutos_address($dbconn);
$a = $a->read($_REQUEST['adrid'],$a);
Modified: trunk/php/watchlist/watchlist_new.php
===================================================================
--- trunk/php/watchlist/watchlist_new.php 2013-09-18 17:31:02 UTC (rev 1153)
+++ trunk/php/watchlist/watchlist_new.php 2013-09-19 08:22:18 UTC (rev 1154)
@@ -57,7 +57,7 @@
$r .= $this->EditRowStart();
$r .= $this->showfieldc($lang['Watcher'],0,'adr');
- $r .= $this->showdata(select_from_array_or_input($this,"adr",$this->adr,0,'a'),$this->width -1);
+ $r .= $this->showdata(select_from_array_or_input($this,"adr",$this->adr,0,'u'),$this->width -1);
$r .= $this->EditRowEnd();
$r .= $this->submit_reset_row(0,1,1,1,1);
@@ -130,4 +130,4 @@
<!--
SVN Info $Id$
$Author$
--->
+-->
\ No newline at end of file
Modified: trunk/php/watchlist/watchlist_overview.php
===================================================================
--- trunk/php/watchlist/watchlist_overview.php 2013-09-18 17:31:02 UTC (rev 1153)
+++ trunk/php/watchlist/watchlist_overview.php 2013-09-19 08:22:18 UTC (rev 1154)
@@ -172,16 +172,18 @@
# $r .= " ". $val ." ". $a[0] ." ". $a[1] ."<br />";
$b = getObject($this->dbconn,$a[0]);
if ( ! is_subclass_of($b,'tutos_base') ) {
- $msg = addLine($msg,"Unknown object: ". $a[0]);
+ $msg = addLine($msg,sprintf($lang['Err0012'],'object',$a[0]));
continue;
}
if ( $b->id != $a[0] ) {
- $msg = addLine($msg,"Unknown object: ". $a[0]);
+ $msg = addLine($msg,sprintf($lang['Err0012'],'object',$a[0]));
continue;
}
- if ( ($this->user->id != $a[1]) && (! $b->mod_ok()) ) {
- $msg = addLine($msg,sprintf($lang['Err0024'],$lang[$b->getType()]) ." (". $b->getFullName() .')');
- continue;
+ if ( ! $this->user->isAdmin() ) {
+ if ( ($this->user->id != $a[1]) && (! $b->mod_ok()) ) {
+ $msg = addLine($msg,sprintf($lang['Err0024'],$lang[$b->getType()]) .' ('. $b->getFullName() .')');
+ continue;
+ }
}
$msg = addLine($msg,$w->remove($a[0],$a[1]));
unset($b);
Modified: trunk/php/webelements.p3
===================================================================
--- trunk/php/webelements.p3 2013-09-18 17:31:02 UTC (rev 1153)
+++ trunk/php/webelements.p3 2013-09-19 08:22:18 UTC (rev 1154)
@@ -1539,6 +1539,9 @@
// mode sould be a array of object types
$ma = array(); // mode array
if (!is_array($mode)) {
+ if ( strstr($mode,'u') != FALSE ) {
+ $ma[] = useuser;
+ }
if ( strstr($mode,"a") != FALSE ) {
$ma[] = useaddressbook;
}
@@ -2047,6 +2050,9 @@
if ($grp == 'all') {
$ma = array(useaddressbook,useteams,useprojects,usecompany,usedepartment,'D',useinstmanagement,usetaskmanagement,usecalendar);
} else if (!is_array($grp)) {
+ if ( strstr($grp,"u") != FALSE ) { // u = user
+ $ma[] = useuser;
+ }
if ( strstr($grp,"a") != FALSE ) {
$ma[] = useaddressbook;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gok...@us...> - 2013-09-18 17:31:05
|
Revision: 1153
http://sourceforge.net/p/tutos/code/1153
Author: gokohnert
Date: 2013-09-18 17:31:02 +0000 (Wed, 18 Sep 2013)
Log Message:
-----------
fix
Modified Paths:
--------------
trunk/php/product_overview.php
Modified: trunk/php/product_overview.php
===================================================================
--- trunk/php/product_overview.php 2013-09-12 13:32:12 UTC (rev 1152)
+++ trunk/php/product_overview.php 2013-09-18 17:31:02 UTC (rev 1153)
@@ -649,7 +649,7 @@
$this->stc = getObject($this->user->dbconn,$tutos['prod_state_stc']);
if (!is_object($this->stc)) {
$this->stc = new stc(null);
- $x = new Product($current_user->dbconn);
+ $x = new Product($this->user->dbconn);
$this->stc->initByArray('ProdStates',$x->c_state);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gok...@us...> - 2013-09-12 13:32:15
|
Revision: 1152
http://sourceforge.net/p/tutos/code/1152
Author: gokohnert
Date: 2013-09-12 13:32:12 +0000 (Thu, 12 Sep 2013)
Log Message:
-----------
fix
Modified Paths:
--------------
trunk/php/bugtracking/bug_overview.php
Modified: trunk/php/bugtracking/bug_overview.php
===================================================================
--- trunk/php/bugtracking/bug_overview.php 2013-09-11 15:16:41 UTC (rev 1151)
+++ trunk/php/bugtracking/bug_overview.php 2013-09-12 13:32:12 UTC (rev 1152)
@@ -231,7 +231,7 @@
$format2 =& $workbook->add_format();
$format2->set_size(8);
- $x = 1;
+ $x = 0;
$c = 0;
$worksheet1->set_column($c,$c,30,$format1);
$worksheet1->write_string($x,$c++, myiconv($lang['BugID']),$format1);
@@ -277,7 +277,7 @@
$worksheet1->write_string($x,$c++, myiconv($tx['lang']),$format1);
}
- $x = 2;
+ $x = 1;
$baseUrl = getBaseUrl(true);
foreach ($this->blist as $b) {
if (!is_object($b)) {
@@ -831,11 +831,11 @@
foreach ($this->stc->states as $f) {
if (in_array($f->stc_state,$closed)) continue;
- $sburn['labels'][] = $f->getFullName().' '.$f->stc_state;
+ $sburn['labels'][] = $f->getFullName();
$sburn['color'][] = $f->getColor();
}
- foreach ($this->stc->states as $i => $f) {
- $emptya[$i] = 0;
+ foreach ($this->stc->states as $f) {
+ $emptya[$f->stc_state] = 0;
}
$mmax += 86400;
@@ -875,13 +875,15 @@
if ($l != null) {
if ($x >= $l['date']->getTimeStamp()) {
// in range
- $datax[$i]['cnt'][$l['new']]++;
+ if (isset($datax[$i]['cnt'][$l['new']]))
+ $datax[$i]['cnt'][$l['new']]++;
} else {
// new section
$modidx++;
if (isset($b->lastmod[$modidx])) {
$l = $b->lastmod[$modidx];
- $datax[$i]['cnt'][$l['new']]++;
+ if (isset($datax[$i]['cnt'][$l['new']]))
+ $datax[$i]['cnt'][$l['new']]++;
} else {
$l = null;
}
@@ -1429,4 +1431,4 @@
$l = new Bug_overview($current_user);
$l->display();
$dbconn->Close();
-?>
\ No newline at end of file
+?>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gok...@us...> - 2013-09-11 15:16:44
|
Revision: 1151
http://sourceforge.net/p/tutos/code/1151
Author: gokohnert
Date: 2013-09-11 15:16:41 +0000 (Wed, 11 Sep 2013)
Log Message:
-----------
fix
Modified Paths:
--------------
trunk/php/bugtracking/bug_overview.php
Modified: trunk/php/bugtracking/bug_overview.php
===================================================================
--- trunk/php/bugtracking/bug_overview.php 2013-09-11 15:04:07 UTC (rev 1150)
+++ trunk/php/bugtracking/bug_overview.php 2013-09-11 15:16:41 UTC (rev 1151)
@@ -894,7 +894,6 @@
$sburn['data'] = '';
$pre = '';
// data for each condition
- $r .= print_r($closed,true);
foreach ($this->stc->states as $f) {
if (in_array($f->stc_state,$closed)) continue;
$sburn['data'] .= $pre.'[';
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gok...@us...> - 2013-09-11 15:04:10
|
Revision: 1150
http://sourceforge.net/p/tutos/code/1150
Author: gokohnert
Date: 2013-09-11 15:04:07 +0000 (Wed, 11 Sep 2013)
Log Message:
-----------
new burndown graph
Modified Paths:
--------------
trunk/php/bugtracking/bug_overview.php
trunk/php/bugtracking/en.p3
trunk/php/graphs.pinc
Modified: trunk/php/bugtracking/bug_overview.php
===================================================================
--- trunk/php/bugtracking/bug_overview.php 2013-08-26 12:57:27 UTC (rev 1149)
+++ trunk/php/bugtracking/bug_overview.php 2013-09-11 15:04:07 UTC (rev 1150)
@@ -579,7 +579,8 @@
Function statinfo() {
global $lang,$tutos;
- $x = preg_split('#,#',$tutos['bug_closed_states']);
+ $closed = preg_split('#,#',$tutos['bug_closed_states']);
+
$r = '';
$n = count($this->blist);
$a = 0;
@@ -664,7 +665,7 @@
$l = array($l);
$b->lastmod = array_merge($b->lastmod,$l);
- if ( in_array($b->state,$x) && ($b->solvedate->notime != 1) ) {
+ if ( in_array($b->state,$closed) && ($b->solvedate->notime != 1) ) {
$t2 = $b->solvedate->getTimestamp();
$tts += ( $t2 - $t1 );
$ns++;
@@ -816,73 +817,118 @@
$r .= ' </td>'."\n";
$r .= '</tr>'."\n";
- if (!false) {
- // Burndown New
- $spie = array();
- $data = array();;
- $labels = array();
- $colors = array();
- foreach ($this->stc->states as $f) {
- $spie['labels'][] = $f->getFullName();
- $spie['color'][] = $f->getColor();
+ // Burndown New
+ $sburn = array();
+ $data = array();;
+ $datax = array();;
+ $labels = array();
+ $colors = array();
+ $emptya = array();
+
+ $sburn['title'] = $lang['BugBurndown'];
+ $sburn['xtitle'] = $lang['Date'];
+ $sburn['ytitle'] = $lang['Bug'];
+
+ foreach ($this->stc->states as $f) {
+ if (in_array($f->stc_state,$closed)) continue;
+ $sburn['labels'][] = $f->getFullName().' '.$f->stc_state;
+ $sburn['color'][] = $f->getColor();
+ }
+ foreach ($this->stc->states as $i => $f) {
+ $emptya[$i] = 0;
+ }
+
+ $mmax += 86400;
+ $ticks = 100;
+ $step = round(($mmax - $cmin) / $ticks);
+
+ $x = $cmin;
+ $cnt = 0;
+ while ($x < $mmax) {
+ $datax[$cnt++] = array('cnt' => $emptya,'title' => strftime('%Y-%m-%d %T',$x));
+ $x += $step;
+ }
+ $maxcnt = $cnt--;
+ $maxx = $x - $step;
+
+ foreach($bl as $b) {
+ $b->read_last_mod();
+ if (!isset($b->lastmod[0])) {
+ // create a lastmod that represents the creation
+ $l['date'] = $b->creation;
+ $l['old'] = -1;
+ $l['new'] = $b->state;
+ } else {
+ $l['date'] = $b->creation;
+ $l['old'] = -1;
+ $l['new'] = $b->lastmod[count($b->lastmod)-1]['old'];
}
+ $l = array($l);
+ $b->lastmod = array_merge($b->lastmod,$l);
- $from = $cmin;
- $to = $mmax;
- $ticks = 100;
- $step = round(($to - $from) / $ticks);
- $cntx = 0;
- $pre = '';
- $spie['ticks'] = '';
- // create empty data
- for ($i = $from; $i<$to; $i+= $step) {
- $datax[$cntx] = strftime('%Y-%m-%d %T',$i);
- foreach ($this->stc->states as $f) {
- $data[$f->stc_state][$cntx] = 0;
+ // walk back
+ $modidx = 0;
+ $x = $maxx;
+ $l = $b->lastmod[$modidx];
+ for ($i = $maxcnt; $i >= 0; $i--) {
+ // we go back
+ if ($l != null) {
+ if ($x >= $l['date']->getTimeStamp()) {
+ // in range
+ $datax[$i]['cnt'][$l['new']]++;
+ } else {
+ // new section
+ $modidx++;
+ if (isset($b->lastmod[$modidx])) {
+ $l = $b->lastmod[$modidx];
+ $datax[$i]['cnt'][$l['new']]++;
+ } else {
+ $l = null;
+ }
+ }
}
- $spie['ticks'] .= $pre."".$i."";
- $pre = ',';
- $cntx++;
+ $x -= $step;
}
- $maxcnt = $cntx-1;
- $spie['data'] = '';
- $pre = '';
- foreach ($this->stc->states as $i1 => $f1) {
- $spie['data'] .= $pre.'[';
- $pre2 = '';
- foreach ($data[$f1->stc_state] as $i2 => $f2) {
- $f2 += rand(0,$i2);
- if ($pre != 'x')
- $spie['data'] .= $pre2.'[\''.$datax[$i2].'\','.$f2.']';
- else
- $spie['data'] .= $pre2.$f2;
- $pre2 = ',';
- }
- $spie['data'] .= ']';
- $pre = ',';
- }
+ }
- $r .= "<tr>\n";
- $r .= $this->showfield($lang['BugBurndown']);
- $r .= ' <td colspan="5" valign="top">';
- $spie['title'] = $lang['BugBurndown'];
- $spie['xtitle'] = $lang['Date'];
- $spie['ytitle'] = $lang['Bug'];
- $r .= burndown($spie);
- $r .= ' </td>'."\n";
- $r .= '</tr>'."\n";
- } else {
- // Burndown
- if ( function_exists('ImageCreate') ) {
- $link = $tutos['base'].'/php/'.$this->link1;
- $link = addUrlParameter($link,"format=burndown");
- $link = addSessionKey($link);
- $r .= "<tr>\n";
- $r .= $this->showfield($lang['BugBurndown']);
- $r .= ' <td colspan="5" valign="top"><img src="'. $link .'" alt="'. $lang['Bug'] .'" /></td>';
- $r .= "</tr>\n";
+ $sburn['data'] = '';
+ $pre = '';
+ // data for each condition
+ $r .= print_r($closed,true);
+ foreach ($this->stc->states as $f) {
+ if (in_array($f->stc_state,$closed)) continue;
+ $sburn['data'] .= $pre.'[';
+ $pre2 = '';
+ foreach ($datax as $i2) {
+ if (!isset($i2['cnt'][$i])) continue;
+ if (!isset($i2['title'])) continue;
+
+ $sburn['data'] .= $pre2.'[\''.$i2['title'].'\','.$i2['cnt'][$f->stc_state].']';
+ $pre2 = ',';
}
+ $sburn['data'] .= ']';
+ $pre = ',';
}
+
+ $r .= "<tr>\n";
+ $r .= $this->showfield($lang['BugBurndown']);
+ $r .= ' <td colspan="5" valign="top">';
+ $r .= burndown($sburn);
+ $r .= ' </td>'."\n";
+ $r .= '</tr>'."\n";
+
+ /**
+ // Burndown
+ if ( function_exists('ImageCreate') ) {
+ $link = $tutos['base'].'/php/'.$this->link1;
+ $link = addUrlParameter($link,"format=burndown");
+ $link = addSessionKey($link);
+ $r .= "<tr>\n";
+ $r .= $this->showfield($lang['BugBurndown']);
+ $r .= ' <td colspan="5" valign="top"><img src="'. $link .'" alt="'. $lang['Bug'] .'" /></td>';
+ $r .= "</tr>\n";
+ }
+ */
$r .= $this->DataTableEnd();
return $r;
}
Modified: trunk/php/bugtracking/en.p3
===================================================================
--- trunk/php/bugtracking/en.p3 2013-08-26 12:57:27 UTC (rev 1149)
+++ trunk/php/bugtracking/en.p3 2013-09-11 15:04:07 UTC (rev 1150)
@@ -1,100 +1,100 @@
<?php
-# $Id$
-#
-# ========================= NOTE ========================
-# Please put site specific extensions and changes
-# to TUTOS language files in a file called "en_custom.p3"
-# or "lang_custom.p3" (for all languages)
-# using the same format like here
-# =======================================================
-#
-#
-# English Texts for this module
-#
-# Bugs
-$lang['Bug'] = "Bug";
-$lang['Bugs'] = "Bugs";
-$lang['BugsSearch'] = "Bugtracking Search";
-$lang['BugsOverview'] = "Bugtracking Overview";
-$lang['BugsDetail'] = "Bugtracking Detail";
-$lang['BugState'] = "State";
-$lang['BugClass'] = "Class";
-$lang['BugShort'] = "Short Description";
-$lang['BugLong'] = "long Bug Description";
-$lang['BugCreator'] = "created by";
-$lang['BugCreation'] = "created by %s on %s";
-$lang['BugProduct'] = "Product/Project";
-$lang['BugReference'] = "Reference";
-$lang['BugTarget'] = "to be solved in";
-$lang['BugSolvedBy'] = "solved by";
-$lang['BugClosedBy'] = "closed by";
-$lang['BugAssignedTo'] = "Assigned to";
-$lang['BugModify'] = "Bug Modify";
-$lang['BugModifyI'] = "Modify Bug %s";
-$lang['BugCreate'] = "Bug Create";
-$lang['BugCreateInfo'] = "create a bug for %s";
-$lang['BugDeleteI'] = "delete this bug %s";
+// $Id$
+//
+// ========================= NOTE ========================
+// Please put site specific extensions and changes
+// to TUTOS language files in a file called "en_custom.p3"
+// or "lang_custom.p3" (for all languages)
+// using the same format like here
+// =======================================================
+//
+//
+// English Texts for this module
+//
+// Bugs
+$lang['Bug'] = 'Bug';
+$lang['Bugs'] = 'Bugs';
+$lang['BugsSearch'] = 'Bugtracking Search';
+$lang['BugsOverview'] = 'Bugtracking Overview';
+$lang['BugsDetail'] = 'Bugtracking Detail';
+$lang['BugState'] = 'State';
+$lang['BugClass'] = 'Class';
+$lang['BugShort'] = 'Short Description';
+$lang['BugLong'] = 'long Bug Description';
+$lang['BugCreator'] = 'created by';
+$lang['BugCreation'] = 'created by %s on %s';
+$lang['BugProduct'] = 'Product/Project';
+$lang['BugReference'] = 'Reference';
+$lang['BugTarget'] = 'to be solved in';
+$lang['BugSolvedBy'] = 'solved by';
+$lang['BugClosedBy'] = 'closed by';
+$lang['BugAssignedTo'] = 'Assigned to';
+$lang['BugModify'] = 'Bug Modify';
+$lang['BugModifyI'] = 'Modify Bug %s';
+$lang['BugCreate'] = 'Bug Create';
+$lang['BugCreateInfo'] = 'create a bug for %s';
+$lang['BugDeleteI'] = 'delete this bug %s';
$lang['BugStates'] = array();
$lang['BugClasses'] = array();
$lang['BugMediums'] = array();
-$lang['BugStates'][1] = "OPEN";
-$lang['BugStates'][2] = "IN PROGRESS";
-$lang['BugStates'][3] = "SOLVED";
-$lang['BugStates'][4] = "CLOSED";
-$lang['BugClasses'][1] = "light";
-$lang['BugClasses'][2] = "heavy";
-$lang['BugClasses'][3] = "dangerous";
-$lang['BugClasses'][4] = "suggestion";
-$lang['BugMediums'][1] = "Desktop";
-$lang['BugMediums'][2] = "eMail";
-$lang['BugMediums'][3] = "Fax";
-$lang['BugMediums'][4] = "Forum";
-$lang['BugMediums'][5] = "Miscellaneous";
-$lang['BugMediums'][6] = "Phone";
-$lang['BugMediums'][7] = "Test";
-$lang['SearchForBug'] = "Search for a bug";
-$lang['SearchForBugExt'] = "extended Search for a bug";
-$lang['CreateNewBug'] = "Enter a new bug";
-$lang['BugShow'] = "Show Bug %s";
-$lang['BugAdditional'] = "Additional Info";
-$lang['BugHistory'] = "History";
-$lang['BugSelInfo'] = "(leave empty to see all bugs)";
-$lang['BugAnyButSolved'] = "any not solved";
-$lang['BugAnyButClosed'] = "any not closed";
-$lang['BugAnyButSolvedOrClosed'] = "any not solved and not closed";
-$lang['BugBetween'] = "created between";
-$lang['BugStats'] = "Statistics";
-$lang['BugStatsInfo'] = "statistical Info on selected bugs";
-$lang['BugStatsTitle'] = "Bug Statistics";
-$lang['BugAverage'] = "Performance";
-$lang['BugAvgEnd'] = "Avg. %.2f hours to end";
-$lang['BugAvgSolve'] = "Avg. %.2f hours to solve %d bug(s)";
-$lang['BugAvgClose'] = "Avg. %.2f hours to close %d bug(s)";
-$lang['BugBurndown'] = "Burndown Statistics";
-$lang['BugID'] = "Bug ID";
-$lang['BugAutoID'] = "Automatically created";
-$lang['BugAutoState'] = "Initial state";
-$lang['BugAutoSolver'] = "Initial";
-$lang['UserBugSearch'] = "assigned to %s";
-$lang['BugReportedFrom'] = "Reported from";
-$lang['BugReportedAll'] = "Reported Bugs Overview";
-$lang['BugMedium'] = "How detected/reported";
+$lang['BugStates'][1] = 'OPEN';
+$lang['BugStates'][2] = 'IN PROGRESS';
+$lang['BugStates'][3] = 'SOLVED';
+$lang['BugStates'][4] = 'CLOSED';
+$lang['BugClasses'][1] = 'light';
+$lang['BugClasses'][2] = 'heavy';
+$lang['BugClasses'][3] = 'dangerous';
+$lang['BugClasses'][4] = 'suggestion';
+$lang['BugMediums'][1] = 'Desktop';
+$lang['BugMediums'][2] = 'eMail';
+$lang['BugMediums'][3] = 'Fax';
+$lang['BugMediums'][4] = 'Forum';
+$lang['BugMediums'][5] = 'Miscellaneous';
+$lang['BugMediums'][6] = 'Phone';
+$lang['BugMediums'][7] = 'Test';
+$lang['SearchForBug'] = 'Search for a bug';
+$lang['SearchForBugExt'] = 'extended Search for a bug';
+$lang['CreateNewBug'] = 'Enter a new bug';
+$lang['BugShow'] = 'Show Bug %s';
+$lang['BugAdditional'] = 'Additional Info';
+$lang['BugHistory'] = 'History';
+$lang['BugSelInfo'] = '(leave empty to see all bugs)';
+$lang['BugAnyButSolved'] = 'any not solved';
+$lang['BugAnyButClosed'] = 'any not closed';
+$lang['BugAnyButSolvedOrClosed'] = 'any not solved and not closed';
+$lang['BugBetween'] = 'created between';
+$lang['BugStats'] = 'Statistics';
+$lang['BugStatsInfo'] = 'statistical Info on selected bugs';
+$lang['BugStatsTitle'] = 'Bug Statistics';
+$lang['BugAverage'] = 'Performance';
+$lang['BugAvgEnd'] = 'Avg. %.2f hours to end';
+$lang['BugAvgSolve'] = 'Avg. %.2f hours to solve %d bug(s)';
+$lang['BugAvgClose'] = 'Avg. %.2f hours to close %d bug(s)';
+$lang['BugBurndown'] = 'Burndown Statistics';
+$lang['BugID'] = 'Bug ID';
+$lang['BugAutoID'] = 'Automatically created';
+$lang['BugAutoState'] = 'Initial state';
+$lang['BugAutoSolver'] = 'Initial';
+$lang['UserBugSearch'] = 'assigned to %s';
+$lang['BugReportedFrom'] = 'Reported from';
+$lang['BugReportedAll'] = 'Reported Bugs Overview';
+$lang['BugMedium'] = 'How detected/reported';
$lang['BugFollowup'] = 'followup to';
$lang['BugFollowBy'] = 'followed by';
$lang['BugNoMail'] = 'prevent emails';
$lang['BugNoMailI'] = 'prevent sending emails to %s !';
$lang['BugRevision'] = 'Revision';
-$lang['BugTrack'] = "Bug Tracking";
-$lang['BugTrackInfo'] = "Bug Tracking Database";
+$lang['BugTrack'] = 'Bug Tracking';
+$lang['BugTrackInfo'] = 'Bug Tracking Database';
-$lang['EmailNewBug'] = "@REFTYPE@ @REF@ -- New bug @NAME@ / @SHORT@";
-$lang['EmailChangesBug'] = "@REFTYPE@ @REF@ -- bug @NAME@ changed";
-$lang['EmailStillOpen'] = "@REFTYPE@ @REF@ -- Bug @NAME@ still @STATE@";
+$lang['EmailNewBug'] = '@REFTYPE@ @REF@ -- New bug @NAME@ / @SHORT@';
+$lang['EmailChangesBug'] = '@REFTYPE@ @REF@ -- bug @NAME@ changed';
+$lang['EmailStillOpen'] = '@REFTYPE@ @REF@ -- Bug @NAME@ still @STATE@';
-$lang['BugConfig'] = "configure bugtracking";
-$lang['BugConfigHelpLongPop'] = "Show long popups with the whole history";
-$lang['BugConfigHelpAutoname'] = "
+$lang['BugConfig'] = 'configure bugtracking';
+$lang['BugConfigHelpLongPop'] = 'Show long popups with the whole history';
+$lang['BugConfigHelpAutoname'] = '
a rule how to build the displayed bug id
&X is substituted by the next value of the bugname sequencer of the database
all other values are handeld like the strftime function of PHP
@@ -102,16 +102,16 @@
%Y year with four digits
%m month 01-12
&Y will be replaced by a parent object id
- &Z will be replaced by a parent fullname";
-$lang['BugConfigHelpRemember'] = "
+ &Z will be replaced by a parent fullname';
+$lang['BugConfigHelpRemember'] = '
How long a bug may be open before a remember mail will be sent
0 = disabled (default)
- Other values = Minutes before mail is sent (via check.php and crontab)";
-$lang['BugConfigHelpDelete'] = "Allow deletion of bugs";
-$lang['BugConfigHelpStateSTC'] = "Active State Transition Control model";
+ Other values = Minutes before mail is sent (via check.php and crontab)';
+$lang['BugConfigHelpDelete'] = 'Allow deletion of bugs';
+$lang['BugConfigHelpStateSTC'] = 'Active State Transition Control model';
$lang['BugConfigHelpClosedStates'] = 'Bug States that are equal or similar to closed';
$lang['BugConfigHelpWarnStates'] = 'States that trigger a warning when activ for a longer period of time.
-See also the "EmailStillOpen" option above.';
+See also the \'EmailStillOpen\' option above.';
$lang['BugConfigHelpFreeTarget'] = 'Allow free selection of target task or project';
$lang['BugConfigHelpNoMail'] = 'Allow to prevent the sending of emails for changes/creation.
A notice about prevented emails will be added to the each changelog entry.';
@@ -123,6 +123,6 @@
$lang['BugConfigHelpProdNewMail'] = 'Project Roles that get informed on new bugs.';
$lang['BugConfigHelpProdModMail'] = 'Project Roles that get informed on modified bugs.';
-$lang['perm'][usebugtracking] = "use bugtracking";
+$lang['perm'][usebugtracking] = 'use bugtracking';
$lang['bugtracking'] = &$lang['Bug'];
?>
\ No newline at end of file
Modified: trunk/php/graphs.pinc
===================================================================
--- trunk/php/graphs.pinc 2013-08-26 12:57:27 UTC (rev 1149)
+++ trunk/php/graphs.pinc 2013-09-11 15:04:07 UTC (rev 1150)
@@ -551,7 +551,7 @@
$tutos['js_to_load'][] = '/html/js/plugins/jqplot.canvasAxisTickRenderer.min.js';
$tutos['js_to_load'][] = '/html/js/plugins/jqplot.enhancedLegendRenderer.min.js';
$tutos['css_to_load'][] = '/html/css/jquery.jqplot.min.css';
- $r .= '<div id="burn'.$id.'" style="height:'.(GB_HEIGHT*1.5).'px;width:'.GB_WIDTH.'px; "></div>';
+ $r .= '<div id="burn'.$id.'" style="height:'.(GB_HEIGHT*1.5).'px;width:'.(GB_WIDTH*1.5).'px; "></div>';
$data = '[[';
$options = " title:'".$a['title']."',\n";
$pre = '';
@@ -570,15 +570,14 @@
$.jqplot('burn".$id."',".$data.",{
".$options."
stackSeries: true,
- //defaultAxisStart: 1267344902,
seriesDefaults: {
showMarker: false,
fill: true,
fillAndStroke: true,
rendererOptions: {
- highlightMouseDown: true,
- smooth: true,
- },
+ highlightMouseDown: true,
+ smooth: true
+ },
varyBarColor: false,
pointLabels: { show: true, formatString: '%d' }
},
@@ -589,23 +588,23 @@
},
axesDefaults: {
labelRenderer: $.jqplot.CanvasAxisLabelRenderer,
- tickRenderer: $.jqplot.CanvasAxisTickRenderer ,
- tickOptions: {
- angle: -50,
- fontSize: '8pt'
- }
+ tickRenderer: $.jqplot.CanvasAxisTickRenderer
},
axes: {
xaxis: {
renderer: $.jqplot.DateAxisRenderer,
- tickOptions:{formatString:'%b %#d %Y, %R'},
label: '".$a['xtitle']."',
- numberTicks: 15,
+ numberTicks: 18,
+ tickOptions: {
+ angle: -70,
+ fontSize: '8pt',
+ formatString:'%b %#d %Y, %R'
+ }
},
yaxis: {
numberTicks: 10,
label: '".$a['ytitle']."',
- min: 0,
+ min: 0
}
},
legend: {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gok...@us...> - 2013-08-26 12:57:30
|
Revision: 1149
http://sourceforge.net/p/tutos/code/1149
Author: gokohnert
Date: 2013-08-26 12:57:27 +0000 (Mon, 26 Aug 2013)
Log Message:
-----------
updates
Modified Paths:
--------------
trunk/php/bugtracking/bug_overview.php
trunk/php/history.pinc
trunk/php/layout/new2_layout.pinc
trunk/php/permission.p3
trunk/php/user_overview.php
Modified: trunk/php/bugtracking/bug_overview.php
===================================================================
--- trunk/php/bugtracking/bug_overview.php 2013-08-23 15:25:36 UTC (rev 1148)
+++ trunk/php/bugtracking/bug_overview.php 2013-08-26 12:57:27 UTC (rev 1149)
@@ -816,7 +816,7 @@
$r .= ' </td>'."\n";
$r .= '</tr>'."\n";
- if (false) {
+ if (!false) {
// Burndown New
$spie = array();
$data = array();;
@@ -829,7 +829,7 @@
$from = $cmin;
$to = $mmax;
- $ticks = 200;
+ $ticks = 100;
$step = round(($to - $from) / $ticks);
$cntx = 0;
$pre = '';
@@ -840,8 +840,6 @@
foreach ($this->stc->states as $f) {
$data[$f->stc_state][$cntx] = 0;
}
- // if ( $cntx % 8 == 0)
- // $spie['ticks'] .= $pre."'".strftime('%Y-%m-%d %r',$i)."'";
$spie['ticks'] .= $pre."".$i."";
$pre = ',';
$cntx++;
Modified: trunk/php/history.pinc
===================================================================
--- trunk/php/history.pinc 2013-08-23 15:25:36 UTC (rev 1148)
+++ trunk/php/history.pinc 2013-08-26 12:57:27 UTC (rev 1149)
@@ -23,14 +23,14 @@
* @param $to end time
*/
function readHistory (tutos_base $obj,$adr_id,$sort = "m_time" ,$dir,$start,$from = null,$to = null, $oldfilter = '', $newfilter = '', $fieldfilter = array()) {
- global $tutos;
+ global $tutos,$table;
if ( ! isset($obj->id) ) {
return;
}
$query = new query($obj->dbconn);
- $query->setTable($obj->dbconn->prefix ."history");
+ $query->setTable($obj->dbconn->prefix .$table['history'][name]);
$query->addFld("*");
if ( $obj->id != -1 ) {
@@ -64,7 +64,7 @@
$query->addWC('val_old',$oldfilter,'STRING','LIKE');
}
- // filter by old value
+ // filter by new value
if ($newfilter != '') {
$query->addWC('val_new',$newfilter,'STRING','LIKE');
}
Modified: trunk/php/layout/new2_layout.pinc
===================================================================
--- trunk/php/layout/new2_layout.pinc 2013-08-23 15:25:36 UTC (rev 1148)
+++ trunk/php/layout/new2_layout.pinc 2013-08-26 12:57:27 UTC (rev 1149)
@@ -654,8 +654,8 @@
$t .= $m[code];
foreach($m[category] as $c) {
if (is_numeric($c)) {
- $t = $c;
if (isset($tutos['classes'][$c])) {
+ $t = $c;
if (isset($m['text2']) && isset($lang[$m['text2']])) {
// force a text
$t = $lang[$m['text2']];
Modified: trunk/php/permission.p3
===================================================================
--- trunk/php/permission.p3 2013-08-23 15:25:36 UTC (rev 1148)
+++ trunk/php/permission.p3 2013-08-26 12:57:27 UTC (rev 1149)
@@ -543,7 +543,7 @@
$_SESSION['dbnr'] = $dbnr;
ReadLang($lang);
$info = addLine($info,sprintf($lang['Welcome_1'],$current_user->getFullname()));
- $info = addline($info,sprintf($lang['Welcome_2'],$current_user->last_seen->getDateTime(),$current_user->last_host).' ('.$a->loginMethod().')');
+ $info = addline($info,sprintf($lang['Welcome_2'],$current_user->last_seen->getDateTime(),$current_user->last_host));
logmessage("check_user: Logged in ". $current_user->id .":". $current_user->login .":". $current_user->getFullname().' ('.$a->loginMethod().')');
$initial_auth = true;
Modified: trunk/php/user_overview.php
===================================================================
--- trunk/php/user_overview.php 2013-08-23 15:25:36 UTC (rev 1148)
+++ trunk/php/user_overview.php 2013-08-26 12:57:27 UTC (rev 1149)
@@ -224,9 +224,10 @@
unset($b);
continue;
}
- $info = addLine($info,$b->login.': '.$lang['UserDisabled'] .' = '.$lang['no']);
- $b->setDisabled(0);
- $msg = addLine($msg,$b->save());
+ if ($b->setDisabled(0)) {
+ $msg = addLine($msg,$b->save());
+ $info = addLine($info,$b->login.': '.$lang['UserDisabled'] .' = '.$lang['no']);
+ }
unset($b);
}
$this->dbconn->Commit("WORK");
@@ -244,9 +245,10 @@
unset($b);
continue;
}
- $info = addLine($info,$b->login.': '.$lang['UserDisabled'] .' = '.$lang['yes']);
- $b->setDisabled(1);
- $msg = addLine($msg,$b->save());
+ if ($b->setDisabled(1)) {
+ $info = addLine($info,$b->login.': '.$lang['UserDisabled'] .' = '.$lang['yes']);
+ $msg = addLine($msg,$b->save());
+ }
unset($b);
}
$this->dbconn->Commit("WORK");
@@ -269,9 +271,10 @@
unset($b);
continue;
}
- $b->setTheme($a[1]);
- $msg = addLine($msg,$b->save());
- $info = addLine($info,$b->login.': '.$lang['UserTheme'] .' = '.$a[1]);
+ if ($b->setTheme($a[1])) {
+ $msg = addLine($msg,$b->save());
+ $info = addLine($info,$b->login.': '.$lang['UserTheme'] .' = '.$a[1]);
+ }
unset($b);
}
$this->dbconn->Commit("WORK");
@@ -294,9 +297,10 @@
unset($b);
continue;
}
- $b->setLayout($a[1]);
- $msg = addLine($msg,$b->save());
- $info = addLine($info,$b->login .': '.$lang['UserLayout'] .' = '.$a[1]);
+ if ($b->setLayout($a[1])) {
+ $msg = addLine($msg,$b->save());
+ $info = addLine($info,$b->login .': '.$lang['UserLayout'] .' = '.$a[1]);
+ }
unset($b);
}
$this->dbconn->Commit("WORK");
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gok...@us...> - 2013-08-23 15:25:40
|
Revision: 1148
http://sourceforge.net/p/tutos/code/1148
Author: gokohnert
Date: 2013-08-23 15:25:36 +0000 (Fri, 23 Aug 2013)
Log Message:
-----------
more search on users
Modified Paths:
--------------
trunk/Makefile
trunk/php/user_overview.php
trunk/php/user_select.php
trunk/php/webelements.p3
Added Paths:
-----------
trunk/php/google_api/.htaccess
Modified: trunk/Makefile
===================================================================
--- trunk/Makefile 2013-08-23 14:41:07 UTC (rev 1147)
+++ trunk/Makefile 2013-08-23 15:25:36 UTC (rev 1148)
@@ -156,6 +156,7 @@
# Google API Module (add-on)
PHP_GOOGLE = $(wildcard php/google_api/*.php) \
+ php/google_api/.htaccess \
$(wildcard php/google_api/*.p3) \
$(wildcard php/google_api/*.pinc) \
php/google_api/.htaccess \
Added: trunk/php/google_api/.htaccess
===================================================================
--- trunk/php/google_api/.htaccess (rev 0)
+++ trunk/php/google_api/.htaccess 2013-08-23 15:25:36 UTC (rev 1148)
@@ -0,0 +1,10 @@
+#
+# This file is part of TUTOS
+#
+#
+# $Id: .htaccess,v 1.3 2008/08/18 11:36:40 gokohnert Exp $
+#
+# Change DirectoryIndex to whatever you want to be
+# the default page
+#
+DirectoryIndex index.htm
\ No newline at end of file
Modified: trunk/php/user_overview.php
===================================================================
--- trunk/php/user_overview.php 2013-08-23 14:41:07 UTC (rev 1147)
+++ trunk/php/user_overview.php 2013-08-23 15:25:36 UTC (rev 1148)
@@ -354,6 +354,7 @@
overview_arg($this,'tz' ,OVERVIEW_ARG_STRING,'people',array('tz'),'UserTimezone');
overview_arg($this,'theme' ,OVERVIEW_ARG_STRING,'people',array('theme'),'UserTheme');
overview_arg($this,'layout' ,OVERVIEW_ARG_STRING,'people',array('layout'),'UserLayout');
+ overview_arg($this,'disabled',OVERVIEW_ARG_BOOL,'people',array('disabled'),'UserDisabled');
// Start Date for search
if ($this->ext != 0) {
Modified: trunk/php/user_select.php
===================================================================
--- trunk/php/user_select.php 2013-08-23 14:41:07 UTC (rev 1147)
+++ trunk/php/user_select.php 2013-08-23 15:25:36 UTC (rev 1148)
@@ -62,25 +62,33 @@
$r .= $this->ContentRowEnd();
$r .= $this->ContentRowStart('ext');
- $r .= $this->showfieldc($lang['UserLanguage'],0,"");
- $r .= $this->showdata('<input name="lang">',$this->width-1);
+ $r .= $this->showfieldc($lang['UserDisabled'],0,'disabled');
+ $x = '<input id="disabled_yes" type="radio" name="disabled" value="1" /><label for="disabled_yes">'.$lang['yes'].'</label>';
+ $x .= '<input id="disabled_no" type="radio" name="disabled" value="0" /><label for="disabled_no">'.$lang['no'].'</label>';
+ $x .= '<input id="disabled_any" type="radio" name="disabled" value="-1" /><label for="disabled_any">'.$lang['any'].'</label>';
+ $r .= $this->showdata($x,2);
$r .= $this->ContentRowEnd();
$r .= $this->ContentRowStart('ext');
- $r .= $this->showfieldc($lang['UserTimezone'],0,"");
- $r .= $this->showdata('<input name="tz">',$this->width-1);
+ $r .= $this->showfieldc($lang['UserLanguage'],0,'lang');
+ $r .= $this->showdata('<input id="lang" name="lang">',$this->width-1);
$r .= $this->ContentRowEnd();
$r .= $this->ContentRowStart('ext');
- $r .= $this->showfieldc($lang['UserTheme'],0,"");
- $r .= $this->showdata('<input name="theme">',$this->width-1);
+ $r .= $this->showfieldc($lang['UserTimezone'],0,'tz');
+ $r .= $this->showdata('<input id="tz" name="tz">',$this->width-1);
$r .= $this->ContentRowEnd();
$r .= $this->ContentRowStart('ext');
- $r .= $this->showfieldc($lang['UserLayout'],0,"");
- $r .= $this->showdata('<input name="layout">',$this->width-1);
+ $r .= $this->showfieldc($lang['UserTheme'],0,'theme');
+ $r .= $this->showdata('<input id="theme" name="theme">',$this->width-1);
$r .= $this->ContentRowEnd();
+ $r .= $this->ContentRowStart('ext');
+ $r .= $this->showfieldc($lang['UserLayout'],0,'layout');
+ $r .= $this->showdata('<input id="layout" name="layout">',$this->width-1);
+ $r .= $this->ContentRowEnd();
+
// add custom selectors
foreach ($x as $s) {
$r .= $this->ContentRowStart('ext');
Modified: trunk/php/webelements.p3
===================================================================
--- trunk/php/webelements.p3 2013-08-23 14:41:07 UTC (rev 1147)
+++ trunk/php/webelements.p3 2013-08-23 15:25:36 UTC (rev 1148)
@@ -3065,6 +3065,7 @@
define ('OVERVIEW_ARG_D_TO',3); // search before
define ('OVERVIEW_ARG_INT',4); // search for an int
define ('OVERVIEW_ARG_FN',5); // use a subquery with name search
+define ('OVERVIEW_ARG_BOOL',6); // use a subquery with name search
function overview_arg($obj,$arg,$type,$tbl,$cnames,$lgid,$prefix = '',$mode = null, $resolver = null) {
global $lang,$tutos,$table;
@@ -3585,8 +3586,26 @@
$obj->head[$cnames[0]] = true;
return true;
}
+ // check a bool value
+ if ($type == OVERVIEW_ARG_BOOL) {
+ if (!isset($_REQUEST[$arg])) return false;
+ $myarg = trim($_REQUEST[$arg]);
+ if ($myarg == '*') return false;
+ if ($myarg == '') return false;
+ if ($myarg == -1) return false;
+
+ $obj->addHidden($arg,$myarg);
+
+ $obj->q .= $obj->qpre .'('.$prefix.$cnames[0].'='.$myarg.')';
+
+ $obj->head[$cnames[0]] = false;
+ $obj->header .= $obj->hpre .$lang[$lgid].' = '.($myarg == 1 ? $lang['yes']:$lang['no']);
+
+ $obj->hpre = '<br />';
+ $obj->qpre = " AND ";
+ return true;
+ }
die ('overview_arg: unknown type:'.$type.' arg:'.$arg.' '. $obj->q);
-
}
/**
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gok...@us...> - 2013-08-23 14:41:13
|
Revision: 1147
http://sourceforge.net/p/tutos/code/1147
Author: gokohnert
Date: 2013-08-23 14:41:07 +0000 (Fri, 23 Aug 2013)
Log Message:
-----------
new user_select / more user massupdate
Modified Paths:
--------------
trunk/php/localization/ca.p3
trunk/php/localization/cs.p3
trunk/php/localization/el.p3
trunk/php/localization/es-mx.p3
trunk/php/localization/es-ni.p3
trunk/php/localization/es-ve.p3
trunk/php/localization/es.p3
trunk/php/localization/fr.p3
trunk/php/localization/hu.p3
trunk/php/localization/it.p3
trunk/php/localization/ja.p3
trunk/php/localization/ko.p3
trunk/php/localization/nl.p3
trunk/php/localization/pl.p3
trunk/php/localization/pt-br.p3
trunk/php/localization/pt.p3
trunk/php/localization/ru.p3
trunk/php/localization/sv.p3
trunk/php/localization/tw.p3
trunk/php/localization/vi.p3
trunk/php/localization/zh.p3
Modified: trunk/php/localization/ca.p3
===================================================================
--- trunk/php/localization/ca.p3 2013-08-23 14:37:14 UTC (rev 1146)
+++ trunk/php/localization/ca.p3 2013-08-23 14:41:07 UTC (rev 1147)
@@ -268,6 +268,8 @@
$lang['User'] = "Usuari";
$lang['Users'] = "Users";
$lang['UserOverview'] = "User Oveureview";
+$lang['UserSearch'] = 'User Search';
+$lang['SearchForUser'] = 'Search for Users';
$lang['UserCreate'] = "Crear usuari";
$lang['UserModify'] = "Modificar usuari";
$lang['UserDel'] = "Eliminar usuari";
Modified: trunk/php/localization/cs.p3
===================================================================
--- trunk/php/localization/cs.p3 2013-08-23 14:37:14 UTC (rev 1146)
+++ trunk/php/localization/cs.p3 2013-08-23 14:41:07 UTC (rev 1147)
@@ -265,6 +265,8 @@
$lang['User'] = "Uživatel";
$lang['Users'] = "Uživatelé";
$lang['UserOverview'] = "Přehled o uživateli";
+$lang['UserSearch'] = 'User Search';
+$lang['SearchForUser'] = 'Search for Users';
$lang['UserCreate'] = "Vytvořit uživatele";
$lang['UserModify'] = "Změna v uživateli";
$lang['UserDel'] = "Odstranit uživatele";
Modified: trunk/php/localization/el.p3
===================================================================
--- trunk/php/localization/el.p3 2013-08-23 14:37:14 UTC (rev 1146)
+++ trunk/php/localization/el.p3 2013-08-23 14:41:07 UTC (rev 1147)
@@ -264,6 +264,8 @@
$lang['User'] = "Χρήστης";
$lang['Users'] = "Users";
$lang['UserOverview'] = "User Overview";
+$lang['UserSearch'] = 'User Search';
+$lang['SearchForUser'] = 'Search for Users';
$lang['UserCreate'] = "Δημιουργία Χρήστη";
$lang['UserModify'] = "Μετατροπή Xρήστη";
$lang['UserDel'] = "Διαγραφή Χρήστη";
Modified: trunk/php/localization/es-mx.p3
===================================================================
--- trunk/php/localization/es-mx.p3 2013-08-23 14:37:14 UTC (rev 1146)
+++ trunk/php/localization/es-mx.p3 2013-08-23 14:41:07 UTC (rev 1147)
@@ -262,6 +262,8 @@
$lang['User'] = "Usuario";
$lang['Users'] = "Users";
$lang['UserOverview'] = "User Overview";
+$lang['UserSearch'] = 'User Search';
+$lang['SearchForUser'] = 'Search for Users';
$lang['UserCreate'] = "Crear usuario";
$lang['UserModify'] = "Modificar usuario";
$lang['UserDel'] = "Eliminar usuario";
Modified: trunk/php/localization/es-ni.p3
===================================================================
--- trunk/php/localization/es-ni.p3 2013-08-23 14:37:14 UTC (rev 1146)
+++ trunk/php/localization/es-ni.p3 2013-08-23 14:41:07 UTC (rev 1147)
@@ -263,6 +263,8 @@
$lang['User'] = "Usuario";
$lang['Users'] = "Usuarios";
$lang['UserOverview'] = "Vista general de usuarios";
+$lang['UserSearch'] = 'User Search';
+$lang['SearchForUser'] = 'Search for Users';
$lang['UserCreate'] = "Crear usuario";
$lang['UserModify'] = "Modificar usuario";
$lang['UserDel'] = "Eliminar usuario";
Modified: trunk/php/localization/es-ve.p3
===================================================================
--- trunk/php/localization/es-ve.p3 2013-08-23 14:37:14 UTC (rev 1146)
+++ trunk/php/localization/es-ve.p3 2013-08-23 14:41:07 UTC (rev 1147)
@@ -262,6 +262,8 @@
$lang['User'] = "Usuario";
$lang['Users'] = "Usuarios";
$lang['UserOverview'] = "Resumen de Usuario";
+$lang['UserSearch'] = 'User Search';
+$lang['SearchForUser'] = 'Search for Users';
$lang['UserCreate'] = "Crear usuario";
$lang['UserModify'] = "Modificar usuario";
$lang['UserDel'] = "Eliminar usuario";
Modified: trunk/php/localization/es.p3
===================================================================
--- trunk/php/localization/es.p3 2013-08-23 14:37:14 UTC (rev 1146)
+++ trunk/php/localization/es.p3 2013-08-23 14:41:07 UTC (rev 1147)
@@ -262,6 +262,8 @@
$lang['User'] = "Usuario";
$lang['Users'] = "Usuarios";
$lang['UserOverview'] = "Opciones del usuario";
+$lang['UserSearch'] = 'User Search';
+$lang['SearchForUser'] = 'Search for Users';
$lang['UserCreate'] = "Crear usuario";
$lang['UserModify'] = "Modificar usuario";
$lang['UserDel'] = "Eliminar usuario";
Modified: trunk/php/localization/fr.p3
===================================================================
--- trunk/php/localization/fr.p3 2013-08-23 14:37:14 UTC (rev 1146)
+++ trunk/php/localization/fr.p3 2013-08-23 14:41:07 UTC (rev 1147)
@@ -262,6 +262,8 @@
$lang['User'] = 'Utilisateur';
$lang['Users'] = 'Utilisateurs';
$lang['UserOverview'] = 'Aperçu des utilisateurs';
+$lang['UserSearch'] = 'User Search';
+$lang['SearchForUser'] = 'Search for Users';
$lang['UserCreate'] = 'Créer Utilisateur ';
$lang['UserModify'] = 'Modifier Utilisateur';
$lang['UserDel'] = 'Supprimer Utilisateur';
Modified: trunk/php/localization/hu.p3
===================================================================
--- trunk/php/localization/hu.p3 2013-08-23 14:37:14 UTC (rev 1146)
+++ trunk/php/localization/hu.p3 2013-08-23 14:41:07 UTC (rev 1147)
@@ -267,6 +267,8 @@
$lang['User'] = "Felhasználó";
$lang['Users'] = "Felhasználók";
$lang['UserOverview'] = "Felhasználó áttekintése";
+$lang['UserSearch'] = 'User Search';
+$lang['SearchForUser'] = 'Search for Users';
$lang['UserCreate'] = "Felhasználó létrehozása";
$lang['UserModify'] = "Felhasználó módosítása";
$lang['UserDel'] = "Felhasználó törlése";
Modified: trunk/php/localization/it.p3
===================================================================
--- trunk/php/localization/it.p3 2013-08-23 14:37:14 UTC (rev 1146)
+++ trunk/php/localization/it.p3 2013-08-23 14:41:07 UTC (rev 1147)
@@ -260,6 +260,8 @@
$lang['User'] = "Utente";
$lang['Users'] = "Utenti";
$lang['UserOverview'] = "Overview degli utenti";
+$lang['UserSearch'] = 'User Search';
+$lang['SearchForUser'] = 'Search for Users';
$lang['UserCreate'] = "Crea Utente";
$lang['UserModify'] = "Modifica Utente";
$lang['UserDel'] = "Elimina Utente";
Modified: trunk/php/localization/ja.p3
===================================================================
--- trunk/php/localization/ja.p3 2013-08-23 14:37:14 UTC (rev 1146)
+++ trunk/php/localization/ja.p3 2013-08-23 14:41:07 UTC (rev 1147)
@@ -265,6 +265,8 @@
$lang['User'] = "ユーザ";
$lang['Users'] = "ユーザ";
$lang['UserOverview'] = "ユーザ概略";
+$lang['UserSearch'] = 'User Search';
+$lang['SearchForUser'] = 'Search for Users';
$lang['UserCreate'] = "ユーザ作成";
$lang['UserModify'] = "ユーザ変更";
$lang['UserDel'] = "ユーザ削除";
Modified: trunk/php/localization/ko.p3
===================================================================
--- trunk/php/localization/ko.p3 2013-08-23 14:37:14 UTC (rev 1146)
+++ trunk/php/localization/ko.p3 2013-08-23 14:41:07 UTC (rev 1147)
@@ -268,6 +268,8 @@
$lang['User'] = "사용자";
$lang['Users'] = "Users";
$lang['UserOverview'] = "User Overview";
+$lang['UserSearch'] = 'User Search';
+$lang['SearchForUser'] = 'Search for Users';
$lang['UserCreate'] = "사용자 생성";
$lang['UserModify'] = "사용자 수정";
$lang['UserDel'] = "사용자 삭제";
Modified: trunk/php/localization/nl.p3
===================================================================
--- trunk/php/localization/nl.p3 2013-08-23 14:37:14 UTC (rev 1146)
+++ trunk/php/localization/nl.p3 2013-08-23 14:41:07 UTC (rev 1147)
@@ -274,6 +274,8 @@
$lang['User'] = "Gebruiker";
$lang['Users'] = "Gebruikers";
$lang['UserOverview'] = "Overzicht gebruikers";
+$lang['UserSearch'] = 'User Search';
+$lang['SearchForUser'] = 'Search for Users';
$lang['UserCreate'] = "Maak gebruiker";
$lang['UserModify'] = "Wijzig gebruiker";
$lang['UserDel'] = "Wis gebruiker";
Modified: trunk/php/localization/pl.p3
===================================================================
--- trunk/php/localization/pl.p3 2013-08-23 14:37:14 UTC (rev 1146)
+++ trunk/php/localization/pl.p3 2013-08-23 14:41:07 UTC (rev 1147)
@@ -268,6 +268,8 @@
$lang['User'] = "Użytkownik";
$lang['Users'] = "Użytkownicy";
$lang['UserOverview'] = "Przegląd użytkowników";
+$lang['UserSearch'] = 'User Search';
+$lang['SearchForUser'] = 'Search for Users';
$lang['UserCreate'] = "Utwórz użytkownika";
$lang['UserModify'] = "Zmień dane użytkownika";
$lang['UserDel'] = "Usuń użytkownika";
Modified: trunk/php/localization/pt-br.p3
===================================================================
--- trunk/php/localization/pt-br.p3 2013-08-23 14:37:14 UTC (rev 1146)
+++ trunk/php/localization/pt-br.p3 2013-08-23 14:41:07 UTC (rev 1147)
@@ -266,6 +266,8 @@
$lang['User'] = "Usuário";
$lang['Users'] = "Users";
$lang['UserOverview'] = "User Overview";
+$lang['UserSearch'] = 'User Search';
+$lang['SearchForUser'] = 'Search for Users';
$lang['UserCreate'] = "Criar usuário";
$lang['UserModify'] = "Modificar usuário";
$lang['UserDel'] = "Apagar usuário";
Modified: trunk/php/localization/pt.p3
===================================================================
--- trunk/php/localization/pt.p3 2013-08-23 14:37:14 UTC (rev 1146)
+++ trunk/php/localization/pt.p3 2013-08-23 14:41:07 UTC (rev 1147)
@@ -267,6 +267,8 @@
$lang['User'] = "Utilizador";
$lang['Users'] = "UTILIZADORES";
$lang['UserOverview'] = "UTILIZADORES: Visão Geral";
+$lang['UserSearch'] = 'User Search';
+$lang['SearchForUser'] = 'Search for Users';
$lang['UserCreate'] = "Criar utilizador";
$lang['UserModify'] = "Modificar utilizador";
$lang['UserDel'] = "Eliminar utilizador";
Modified: trunk/php/localization/ru.p3
===================================================================
--- trunk/php/localization/ru.p3 2013-08-23 14:37:14 UTC (rev 1146)
+++ trunk/php/localization/ru.p3 2013-08-23 14:41:07 UTC (rev 1147)
@@ -262,6 +262,8 @@
$lang['User'] = "пользователь";
$lang['Users'] = "Пользователи";
$lang['UserOverview'] = "Обзор пользователя";
+$lang['UserSearch'] = 'User Search';
+$lang['SearchForUser'] = 'Search for Users';
$lang['UserCreate'] = "Создать пользователя";
$lang['UserModify'] = "Редактировать пользователя";
$lang['UserDel'] = "Удалить пользователя";
Modified: trunk/php/localization/sv.p3
===================================================================
--- trunk/php/localization/sv.p3 2013-08-23 14:37:14 UTC (rev 1146)
+++ trunk/php/localization/sv.p3 2013-08-23 14:41:07 UTC (rev 1147)
@@ -259,6 +259,8 @@
$lang['User'] = "Användare";
$lang['Users'] = "Användare";
$lang['UserOverview'] = "Överblick användare";
+$lang['UserSearch'] = 'User Search';
+$lang['SearchForUser'] = 'Search for Users';
$lang['UserCreate'] = "Skapa användare";
$lang['UserModify'] = "Ändra användare";
$lang['UserDel'] = "Ta bort användare";
Modified: trunk/php/localization/tw.p3
===================================================================
--- trunk/php/localization/tw.p3 2013-08-23 14:37:14 UTC (rev 1146)
+++ trunk/php/localization/tw.p3 2013-08-23 14:41:07 UTC (rev 1147)
@@ -265,6 +265,8 @@
$lang['User'] = "使用者";
$lang['Users'] = "使用者";
$lang['UserOverview'] = "使用者概況";
+$lang['UserSearch'] = 'User Search';
+$lang['SearchForUser'] = 'Search for Users';
$lang['UserCreate'] = "建立使用者";
$lang['UserModify'] = "修改使用者";
$lang['UserDel'] = "刪除使用者";
Modified: trunk/php/localization/vi.p3
===================================================================
--- trunk/php/localization/vi.p3 2013-08-23 14:37:14 UTC (rev 1146)
+++ trunk/php/localization/vi.p3 2013-08-23 14:41:07 UTC (rev 1147)
@@ -266,6 +266,8 @@
$lang['User'] = "Tên đăng nhập";
$lang['Users'] = "Users";
$lang['UserOverview'] = "Tổng Quan về Nhân Viên";
+$lang['UserSearch'] = 'User Search';
+$lang['SearchForUser'] = 'Search for Users';
$lang['UserCreate'] = "Tạo tên đăng nhập";
$lang['UserModify'] = "Hiệu chỉnh nhân viên";
$lang['UserDel'] = "Xoá nhân viên";
Modified: trunk/php/localization/zh.p3
===================================================================
--- trunk/php/localization/zh.p3 2013-08-23 14:37:14 UTC (rev 1146)
+++ trunk/php/localization/zh.p3 2013-08-23 14:41:07 UTC (rev 1147)
@@ -265,6 +265,8 @@
$lang['User'] = "使用者";
$lang['Users'] = "使用者";
$lang['UserOverview'] = "使用者概况";
+$lang['UserSearch'] = 'User Search';
+$lang['SearchForUser'] = 'Search for Users';
$lang['UserCreate'] = "建立使用者";
$lang['UserModify'] = "更改使用者";
$lang['UserDel'] = "删除使用者";
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gok...@us...> - 2013-08-23 14:37:18
|
Revision: 1146
http://sourceforge.net/p/tutos/code/1146
Author: gokohnert
Date: 2013-08-23 14:37:14 +0000 (Fri, 23 Aug 2013)
Log Message:
-----------
new user_select / more user massupdate
Modified Paths:
--------------
trunk/php/admin_show.php
trunk/php/localization/de.p3
trunk/php/localization/en.p3
trunk/php/team_select.php
trunk/php/user.pinc
trunk/php/user_overview.php
trunk/test.sh
Added Paths:
-----------
trunk/php/user_select.php
Modified: trunk/php/admin_show.php
===================================================================
--- trunk/php/admin_show.php 2013-08-23 11:26:32 UTC (rev 1145)
+++ trunk/php/admin_show.php 2013-08-23 14:37:14 UTC (rev 1146)
@@ -867,6 +867,10 @@
CATEGORY => array('user','new','module',useuser)
);
$this->addMenu($x);
+
+ $x = tutos_user::getSelectLink($this->user);
+ $this->addMenu($x);
+
if ($tutos[useacl] == 1) {
$x = array( URL => 'acl_overview.php',
TEXT => $lang['ACLOverview'],
@@ -920,8 +924,6 @@
$this->addMenu($x);
}
-
-
$x = array( URL => 'module_overview.php',
TEXT => $lang['AdminModules'],
INFO => $lang['AdminModulesI'],
Modified: trunk/php/localization/de.p3
===================================================================
--- trunk/php/localization/de.p3 2013-08-23 11:26:32 UTC (rev 1145)
+++ trunk/php/localization/de.p3 2013-08-23 14:37:14 UTC (rev 1146)
@@ -265,6 +265,8 @@
$lang['User'] = 'Benutzer';
$lang['Users'] = 'Benutzer';
$lang['UserOverview'] = 'Benutzerübersicht';
+$lang['UserSearch'] = 'Benutzer Suche';
+$lang['SearchForUser'] = 'nach Benutzern suchen';
$lang['UserCreate'] = 'Benutzer anlegen';
$lang['UserModify'] = 'Benutzer ändern';
$lang['UserDel'] = 'Benutzer löschen';
Modified: trunk/php/localization/en.p3
===================================================================
--- trunk/php/localization/en.p3 2013-08-23 11:26:32 UTC (rev 1145)
+++ trunk/php/localization/en.p3 2013-08-23 14:37:14 UTC (rev 1146)
@@ -265,6 +265,8 @@
$lang['User'] = 'User';
$lang['Users'] = 'Users';
$lang['UserOverview'] = 'User Overview';
+$lang['UserSearch'] = 'User Search';
+$lang['SearchForUser'] = 'Search for Users';
$lang['UserCreate'] = 'User Create';
$lang['UserModify'] = 'User Modify';
$lang['UserDel'] = 'Delete User';
Modified: trunk/php/team_select.php
===================================================================
--- trunk/php/team_select.php 2013-08-23 11:26:32 UTC (rev 1145)
+++ trunk/php/team_select.php 2013-08-23 14:37:14 UTC (rev 1146)
@@ -6,7 +6,7 @@
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; version 2 of the License.
*
- * create a new product or modify an existing one
+ * search for teams
*
* @modulegroup team
* @module team_select
@@ -74,6 +74,7 @@
$r .= $this->setfocus('name');
return $r;
}
+
/**
* prepare
*/
Modified: trunk/php/user.pinc
===================================================================
--- trunk/php/user.pinc 2013-08-23 11:26:32 UTC (rev 1145)
+++ trunk/php/user.pinc 2013-08-23 14:37:14 UTC (rev 1146)
@@ -127,7 +127,7 @@
} else if ( $mode == 1 ) {
$query = 'SELECT a.* ,p.*,p.id as u_id, p.creator as cr_a, p.creation as cr_t FROM '. $obj->dbconn->prefix.$table['address'][name].' a,'. $obj->tablename .' p WHERE p.id = '. $id .' AND a.id = p.adr_id';
} else if ( $mode == 2 ) {
- $query = 'SELECT p.*,a.f_name,a.m_name,a.l_name,a.birthday, p.id as u_id FROM '. $obj->dbconn->prefix.$table['address'][name].' a,'. $obj->tablename .' p WHERE p.id = '. $id .' AND a.id = p.adr_id';
+ $query = 'SELECT p.*,a.f_name,a.m_name,a.l_name,a.birthday, p.id as u_id,p.creator as cr_a,p.creation as cr_t FROM '. $obj->dbconn->prefix.$table['address'][name].' a,'. $obj->tablename .' p WHERE p.id = '. $id .' AND a.id = p.adr_id';
}
$result = $obj->dbconn->Exec($query);
if ( 0 != $result->numrows() ) {
@@ -1027,6 +1027,23 @@
}
/**
+ * create a link to a select page
+ */
+ static function getSelectLink (tutos_user $user,$text = "") {
+ global $lang,$tutos;
+
+ if ( ! $user->feature_ok(useuser,PERM_SEL) ) {
+ return;
+ }
+ return array( url => 'user_select.php',
+ image => $user->layout->theme->getImage(tutos_user::getHtmlIcon(),'menu'),
+ text => ($text == '' ? $lang['User'] : $text),
+ info => $lang['SearchForUser'],
+ category => array('search','user',useuser)
+ );
+ }
+
+ /**
* get the help index
*/
static function getHelpIndex () {
Modified: trunk/php/user_overview.php
===================================================================
--- trunk/php/user_overview.php 2013-08-23 11:26:32 UTC (rev 1145)
+++ trunk/php/user_overview.php 2013-08-23 14:37:14 UTC (rev 1146)
@@ -42,24 +42,47 @@
return $this->error($lang['Err0048']);
}
+ $r .= $this->header;
+ $this->flds = 2;
$r .= $this->actionformStart('user_overview.php');
$r .= $this->OverviewTableStart();
- $r .= "<thead>\n";
- $r .= "<tr>\n";
+ $r .= $this->OverviewHeadStart();
+ $r .= $this->OverviewHeadLineStart();
$r .= $this->orderHeader("", $lang['AdrName'],$this->link2);
$r .= $this->orderHeader("login", $lang['User'],$this->link2);
- $r .= $this->orderHeader("last_seen", $lang['UserLastSeen'],$this->link2);
- $r .= $this->orderHeader("last_host", $lang['UserLastHost'],$this->link2);
- $r .= $this->orderHeader("disabled", $lang['UserDisabled'],$this->link2);
- $r .= $this->orderHeader("lang", $lang['UserLanguage'],$this->link2);
- $r .= $this->orderHeader("tz", $lang['UserTimezone'],$this->link2);
- $r .= $this->orderHeader("theme", $lang['UserTheme'],$this->link2);
- $r .= $this->orderHeader("layout", $lang['UserLayout'],$this->link2);
- $this->flds = 9;
+ if ($this->head['lastseen']) {
+ $r .= $this->orderHeader("last_seen", $lang['UserLastSeen'],$this->link2);
+ $this->flds++;
+ }
+ if ($this->head['lasthost']) {
+ $r .= $this->orderHeader("last_host", $lang['UserLastHost'],$this->link2);
+ $this->flds++;
+ }
+ if ($this->head['disabled']) {
+ $r .= $this->orderHeader("disabled", $lang['UserDisabled'],$this->link2);
+ $this->flds++;
+ }
+ if ($this->head['lang']) {
+ $r .= $this->orderHeader("lang", $lang['UserLanguage'],$this->link2);
+ $this->flds++;
+ }
+ if ($this->head['tz']) {
+ $r .= $this->orderHeader("tz", $lang['UserTimezone'],$this->link2);
+ $this->flds++;
+ }
+ if ($this->head['theme']) {
+ $r .= $this->orderHeader("theme", $lang['UserTheme'],$this->link2);
+ $this->flds++;
+ }
+ if ($this->head['layout']) {
+ $r .= $this->orderHeader("layout", $lang['UserLayout'],$this->link2);
+ $this->flds++;
+ }
$r .= show_custom_overview_headers($this,'people',$this->link2);
$r .= $this->MassUpdateHeader();
- $r .= "</tr>\n";
- $r .= "</thead>\n";
+ $r .= $this->OverviewHeadLineEnd();
+ $r .= $this->OverviewHeadEnd();
+ $r .= $this->OverviewBodyStart();
if ( $this->start == -1 ) {
$a = $n - $tutos['maxshow'];
@@ -81,26 +104,51 @@
}
$r .= $this->OverviewRowStart($line,$f->login);
$r .= ' <td class="over_l" colspan="1">'. $f->getLink() ."</td>\n";
- $r .= ' <td class="over_l">'. makelink('user_new.php?uid='.$f->uid ,$f->login) ."</td>\n";
- $r .= ' <td class="over_l">'. $f->last_seen->getDateTime() ." </td>\n";
- $x1 = $f->last_host;
- if (($tutos['resolve_host'] == 1) && strstr($x1,".") && !strstr($x1," ")) {
- $x2 = @gethostbyaddr($x1);
- } else {
- $x2=$x1;
+
+ $x = $this->mark_filter(myentities($f->login),'login');
+ $r .= $this->OverviewRowBlock(makelink('user_new.php?uid='.$f->uid ,$x),'over_l');
+
+ if ($this->head['lastseen']) {
+ $r .= $this->OverviewRowBlock($f->last_seen->getDateTime(),'over_l');
}
- $r .= ' <td class="over_ml">'. $x1 .($x2 != $x1 ? "<br />(".$x2.")":"") .'</td>';
- $r .= ' <td align="center">'. ($f->disabled == 1 ? $lang['yes']:$lang['no']) .'</td>';
- $r .= ' <td class="over_l">'. $f->lang ." </td>\n";
- $r .= ' <td class="over_l">'. $f->tz ." </td>\n";
- $r .= ' <td class="over_l">'. $f->theme ." </td>\n";
- $r .= ' <td class="over_l">'. $f->ly ." </td>\n";
+ if ($this->head['lasthost']) {
+ $x1 = $f->last_host;
+ if (($tutos['resolve_host'] == 1) && strstr($x1,".") && !strstr($x1," ")) {
+ $x2 = @gethostbyaddr($x1);
+ } else {
+ $x2=$x1;
+ }
+ $x = $this->mark_filter($x1,'last_host');
+ $r .= $this->OverviewRowBlock($x .($x2 != $x1 ? "<br />(".$x2.")":""),'over_ml');
+ }
+ if ($this->head['disabled']) {
+ $r .= $this->OverviewRowBlock(($f->disabled == 1 ? $lang['yes']:$lang['no']),'over_l');
+ }
+ if ($this->head['lang']) {
+ $x = $this->mark_filter($f->lang,'lang');
+ $r .= $this->OverviewRowBlock($x,'over_l');
+ }
+ if ($this->head['tz']) {
+ $x = $this->mark_filter($f->tz,'tz');
+ $r .= $this->OverviewRowBlock($x,'over_l');
+ }
+ if ($this->head['theme']) {
+ $x = $this->mark_filter($f->theme,'theme');
+ $r .= $this->OverviewRowBlock($x,'over_l');
+ }
+ if ($this->head['layout']) {
+ $x = $this->mark_filter($f->ly,'layout');
+ $r .= $this->OverviewRowBlock($x,'over_l');
+ }
$r .= show_custom_overview_data($this,'people',$f);
$r .= $this->MassUpdateField($f);
$r .= $this->OverviewRowEnd($line++);
unset ($f);
}
+ $r .= $this->OverviewBodyEnd();
+ $r .= $this->OverviewFootStart();
+
$r .= $this->list_navigation($this->link1,$this->flds + $tutos[massupdate],$this->start,$a,$n);
if ( $tutos[massupdate] == 1 ) {
@@ -109,13 +157,25 @@
$r .= " <select name=\"action\">\n";
$r .= ' <option value="-1" selected="selected">'. $lang['ActionNil'] ."</option>\n";
$r .= ' <option value="-2">'. $lang['Delete'] ."</option>\n";
- $r .= ' <option value="enable">'. sprintf($lang['SetTo'],$lang['UserDisabled'],$lang['no']) ."</option>\n";
- $r .= ' <option value="disable">'. sprintf($lang['SetTo'],$lang['UserDisabled'],$lang['yes']) ."</option>\n";
+ if ($this->head['disabled']) {
+ $r .= ' <option value="enable">'. sprintf($lang['SetTo'],$lang['UserDisabled'],$lang['no']) ."</option>\n";
+ $r .= ' <option value="disable">'. sprintf($lang['SetTo'],$lang['UserDisabled'],$lang['yes']) ."</option>\n";
+ }
+ if ($this->head['theme']) {
+ foreach($tutos[themes] as $f) {
+ $r .= ' <option value="theme_'. $f .'" >'.sprintf($lang['SetTo'],$lang['UserTheme'],$f) ."</option>\n";
+ }
+ }
+ if ($this->head['layout']) {
+ foreach($tutos[layouts] as $f) {
+ $r .= ' <option value="ly_'. $f .'" >'.sprintf($lang['SetTo'],$lang['UserLayout'],$f) ."</option>\n";
+ }
+ }
$r .= ' <option value="-4">'. $lang['AclModify'] ."</option>\n";
$r .= "</select>\n";
$r .= $this->UpdateRowEnd(2);
}
-
+ $r .= $this->OverviewFootEnd();
$r .= $this->OverviewTableEnd();
$r .= $this->actionformEnd("user_overview.php");
$result->free();
@@ -132,10 +192,9 @@
return;
}
- @reset($_GET['mark']);
if ( $_GET['action'] == -2 ) {
$this->dbconn->Begin("WORK");
- while (list ($key,$val) = @each ($_GET['mark'])) {
+ foreach ($_GET['mark'] as $val) {
$b = new tutos_user($this->dbconn);
$b = $b->read($val,$b,2);
if ( $b->uid != $val ) {
@@ -153,42 +212,94 @@
$this->dbconn->Commit("WORK");
} else if ( $_GET['action'] == 'enable' ) {
$this->dbconn->Begin("WORK");
- while (list ($key,$val) = @each ($_GET['mark'])) {
+ foreach ($_GET['mark'] as $val) {
$b = new tutos_user($this->dbconn);
$b = $b->read($val,$b,2);
if ( $b->uid != $val ) {
$msg = addLine($msg,$b->uid ." != ". $val);
continue;
}
- if ( $b->mod_ok() ) {
- $info = addLine($info,$lang['UserDisabled'] .' = '.$lang['no'].' '.$b->login);
- $b->setDisabled(0);
- $msg = addLine($msg,$b->save());
- } else {
+ if ( !$b->mod_ok() ) {
$msg = addLine($msg,$b->getLink() .": ". sprintf($lang['Err0024'],$lang[$b->getType()]));
+ unset($b);
+ continue;
}
+ $info = addLine($info,$b->login.': '.$lang['UserDisabled'] .' = '.$lang['no']);
+ $b->setDisabled(0);
+ $msg = addLine($msg,$b->save());
unset($b);
}
$this->dbconn->Commit("WORK");
} else if ( $_GET['action'] == 'disable' ) {
$this->dbconn->Begin("WORK");
- while (list ($key,$val) = @each ($_GET['mark'])) {
+ foreach ($_GET['mark'] as $val) {
$b = new tutos_user($this->dbconn);
$b = $b->read($val,$b,2);
if ( $b->uid != $val ) {
$msg = addLine($msg,$b->uid ." != ". $val);
continue;
}
- if ( $b->mod_ok() ) {
- $info = addLine($info,$lang['UserDisabled'] .' = '.$lang['yes'].' '.$b->login);
- $b->setDisabled(1);
- $msg = addLine($msg,$b->save());
- } else {
+ if ( !$b->mod_ok() ) {
$msg = addLine($msg,$b->getLink() .": ". sprintf($lang['Err0024'],$lang[$b->getType()]));
+ unset($b);
+ continue;
}
+ $info = addLine($info,$b->login.': '.$lang['UserDisabled'] .' = '.$lang['yes']);
+ $b->setDisabled(1);
+ $msg = addLine($msg,$b->save());
unset($b);
}
$this->dbconn->Commit("WORK");
+ } else if ( preg_match('#^theme_(.*)$#',$_GET['action'],$a) ) {
+ $this->dbconn->Begin("WORK");
+ foreach ($_GET['mark'] as $val) {
+ $b = new tutos_user($this->dbconn);
+ $b = $b->read($val,$b,2);
+ if ( $b->uid != $val ) {
+ $msg = addLine($msg,$b->uid ." != ". $val);
+ continue;
+ }
+ if ( !$b->mod_ok() ) {
+ $msg = addLine($msg,$b->getLink() .': '. sprintf($lang['Err0024'],$lang[$b->getType()]));
+ unset($b);
+ continue;
+ }
+ if ( !in_array($a[1],$tutos[themes]) ) {
+ $msg = addLine($msg,$b->getLink() .': '. sprintf($lang['Err0024'],$lang[$b->getType()]));
+ unset($b);
+ continue;
+ }
+ $b->setTheme($a[1]);
+ $msg = addLine($msg,$b->save());
+ $info = addLine($info,$b->login.': '.$lang['UserTheme'] .' = '.$a[1]);
+ unset($b);
+ }
+ $this->dbconn->Commit("WORK");
+ } else if ( preg_match('#^ly_(.*)$#',$_GET['action'],$a) ) {
+ $this->dbconn->Begin("WORK");
+ foreach ($_GET['mark'] as $val) {
+ $b = new tutos_user($this->dbconn);
+ $b = $b->read($val,$b,2);
+ if ( $b->uid != $val ) {
+ $msg = addLine($msg,$b->uid ." != ". $val);
+ continue;
+ }
+ if ( !$b->mod_ok() ) {
+ $msg = addLine($msg,$b->getLink() .': '. sprintf($lang['Err0024'],$lang[$b->getType()]));
+ unset($b);
+ continue;
+ }
+ if ( !in_array($a[1],$tutos[layouts]) ) {
+ $msg = addLine($msg,$b->getLink() .': '. sprintf($lang['Err0024'],$lang[$b->getType()]));
+ unset($b);
+ continue;
+ }
+ $b->setLayout($a[1]);
+ $msg = addLine($msg,$b->save());
+ $info = addLine($info,$b->login .': '.$lang['UserLayout'] .' = '.$a[1]);
+ unset($b);
+ }
+ $this->dbconn->Commit("WORK");
} else if ( $_GET['action'] == -4 ) {
$this->redirect = acl_action();
}
@@ -200,9 +311,20 @@
Function prepare() {
global $msg,$tutos,$lang,$table;
- $this->name = $lang['UserOverview'];
+ $this->layout_id = useteams;
+ $this->name = $lang['UserOverview'];
$this->css_class = 'overviewbox';
+ $this->header = '';
+ $this->hpre = '';
+ $this->head['lang'] = true;
+ $this->head['tz'] = true;
+ $this->head['theme'] = true;
+ $this->head['layout'] = true;
+ $this->head['disabled'] = true;
+ $this->head['lastseen'] = true;
+ $this->head['lasthost'] = true;
+
if ( $this->user->admin == 0 ) {
$msg = addLine($msg,"<span class=\"warn\">Only admins are allowed to see this</span>");
if ( $tutos[demo] == 1 ) {
@@ -214,18 +336,70 @@
$this->link1 = 'user_overview.php';
$this->link2 = 'user_overview.php';
+
+ if (isset($_GET['ext'])) {
+ $this->ext = $_GET['ext'];
+ $this->link1 = addUrlParameter($this->link1,"ext=".$this->ext);
+ } else {
+ $this->ext = 2; // call from somewhere else
+ }
+
$this->q = "SELECT ". $this->dbconn->prefix.$table['people'][name] .".*,id as u_id from ". $this->dbconn->prefix.$table['people'][name];
+ $this->qpre = ' WHERE ';
+ overview_arg($this,'name',OVERVIEW_ARG_STRING,'people',array('login'),'User');
+
+ overview_arg($this,'lasthost',OVERVIEW_ARG_STRING,'people',array('last_host'),'UserLastHost');
+ overview_arg($this,'lang' ,OVERVIEW_ARG_STRING,'people',array('lang'),'UserLanguage');
+ overview_arg($this,'tz' ,OVERVIEW_ARG_STRING,'people',array('tz'),'UserTimezone');
+ overview_arg($this,'theme' ,OVERVIEW_ARG_STRING,'people',array('theme'),'UserTheme');
+ overview_arg($this,'layout' ,OVERVIEW_ARG_STRING,'people',array('layout'),'UserLayout');
+
+ // Start Date for search
+ if ($this->ext != 0) {
+ overview_arg($this,'f',OVERVIEW_ARG_D_FROM,'people',array('last_seen'),'UserLastSeen');
+ }
+ // End Date for search
+ if ($this->ext != 0) {
+ overview_arg($this,'t',OVERVIEW_ARG_D_TO,'people',array('last_seen'),'UserLastSeen');
+ }
+
+ // custom selectors
+ // get customized non textual search fields
+ if ($this->ext != 0) {
+ $custom = get_custom_sql_select($this,'people','',$this->link1);
+ foreach ($custom[0] as $s) {
+ $this->q .= $this->qpre;
+ $this->q .= $s[0];
+ $this->qpre = " AND ";
+ $this->header .= $this->hpre.$s[1];
+ $this->hpre = '<br />';
+ }
+ foreach ($custom[1] as $s) {
+ $this->q = preg_replace('# where#i',','.$s.' WHERE',$this->q);
+ }
+ }
+
+ $this->link2 = $this->link1;
// sorting
$xxx = "";
order_parse($this->q,$this->link1,$xxx,$this,array('login'));
+
+ $x = tutos_user::getSelectLink($this->user,$lang['Search']);
+ $x[category][] = 'obj';
+ $this->addMenu($x);
+
$x = array( url => 'user_new.php',
text => $lang['NewEntry'],
info => $lang['UserCreate'],
category => array("user","new","obj")
);
$this->addMenu($x);
+
+ if (class_exists('url')) {
+ $this->addMenu(url::getAddLinkPreset($this->user,$this));
+ }
}
}
Added: trunk/php/user_select.php
===================================================================
--- trunk/php/user_select.php (rev 0)
+++ trunk/php/user_select.php 2013-08-23 14:37:14 UTC (rev 1146)
@@ -0,0 +1,157 @@
+<?php
+/**
+ * Copyright 2003 - 2013 by Gero Kohnert
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; version 2 of the License.
+ *
+ * search for users
+ *
+ * @modulegroup user
+ * @module user_select
+ * @package user
+ */
+$tutos['files'][__FILE__] = '$Rev: 1107 $';
+
+require_once 'webelements.p3';
+require_once 'permission.p3';
+
+// Check if user is allowed to use it
+check_user();
+$tutos['mobileok'] = 1;
+loadmodules('team','select');
+loadlayout();
+
+/**
+ * search for a user
+ */
+class User_select extends layout {
+ /**
+ * display the info
+ */
+ Function info() {
+ global $lang,$tutos;
+
+ $x = get_custom_selectors('people');
+
+ $this->width = 3;
+ $r = '';
+ $r .= "<form id=\"usersearch\" name=\"usersearch\" method=\"get\" action=\"user_overview.php\">\n";
+ $r .= $this->SelectTableStart();
+ $r .= $this->headline($lang['SearchForUser']);
+
+ $r .= $this->ContentRowStart();
+ $r .= $this->showfieldc($lang['Username']);
+ $r .= $this->showdata('<input id="name" type="text" value="" name="name" />',1);
+ $r .= $this->showdata('<input type="submit" value="'. $lang['Search'] .'" title="'.$lang['SearchForUser'].'" />',1);
+ $r .= $this->ContentRowEnd();
+
+ $r .= $this->ContentRowStart();
+ $r .= $this->extend_select();
+ $r .= $this->ContentRowEnd();
+
+ $r .= $this->ContentRowStart('ext');
+ $r .= $this->showfieldc($lang['UserLastSeen'],0,"");
+ $r .= $this->showdata($this->from->EnterDate("f",1).' - '.$this->to->EnterDate("t",1),$this->width-1);
+ $r .= $this->ContentRowEnd();
+
+ $r .= $this->ContentRowStart('ext');
+ $r .= $this->showfieldc($lang['UserLastHost'],0,"");
+ $r .= $this->showdata('<input name="lasthost">',$this->width-1);
+ $r .= $this->ContentRowEnd();
+
+ $r .= $this->ContentRowStart('ext');
+ $r .= $this->showfieldc($lang['UserLanguage'],0,"");
+ $r .= $this->showdata('<input name="lang">',$this->width-1);
+ $r .= $this->ContentRowEnd();
+
+ $r .= $this->ContentRowStart('ext');
+ $r .= $this->showfieldc($lang['UserTimezone'],0,"");
+ $r .= $this->showdata('<input name="tz">',$this->width-1);
+ $r .= $this->ContentRowEnd();
+
+ $r .= $this->ContentRowStart('ext');
+ $r .= $this->showfieldc($lang['UserTheme'],0,"");
+ $r .= $this->showdata('<input name="theme">',$this->width-1);
+ $r .= $this->ContentRowEnd();
+
+ $r .= $this->ContentRowStart('ext');
+ $r .= $this->showfieldc($lang['UserLayout'],0,"");
+ $r .= $this->showdata('<input name="layout">',$this->width-1);
+ $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();
+ }
+
+ $r .= $this->SelectTableEnd();
+ $r .= hiddenFormElements();
+ $r .= $this->getHidden();
+ $r .= "</form>\n";
+
+ // shortcuts with urls
+ if (class_exists('url')) {
+ $r .= url::getFastSelect($this);
+ }
+
+ $r .= $this->setfocus('name');
+ return $r;
+ }
+
+ /**
+ * prepare
+ */
+ Function prepare() {
+ global $msg,$lang;
+
+ $this->layout_id = useuser;
+ $this->name = $lang['UserSearch'];
+ $this->center = true;
+ $this->css_class = 'selectbox';
+
+ if ( ! isset($_GET['ext']) ) {
+ $this->ext = 0;
+ } else {
+ $this->ext = $_GET['ext'];
+ }
+
+ // Defaults for search
+ $this->from = new TUTOS_Date_Time(0);
+ $this->to = new TUTOS_Date_Time(0);
+
+ if ( isset($_SESSION[useuser.'__f']) ) {
+ $this->from->setDateTime($_SESSION[useuser.'__f']);
+ }
+ if ( isset($_SESSION[useuser.'__t']) ) {
+ $this->to->setDateTime($_SESSION[useuser.'__t']);
+ }
+
+ if ( ! $this->user->feature_ok(useuser,PERM_SEL) ) {
+ $msg = addLine($msg,sprintf($lang['Err0022'],"'". $this->name ."'"));
+ $this->stop = true;
+ }
+
+ if ( $this->user->feature_ok(useuser,PERM_NEW) ) {
+ $x = array( url => 'user_new.php',
+ text => $lang['NewEntry'],
+ info => $lang['UserCreateI'],
+ category => array('user','new','obj',useuser)
+ );
+ $this->addMenu($x);
+ }
+ }
+}
+
+$l = new User_select($current_user);
+$l->display();
+$dbconn->Close();
+?>
+<!--
+SVN Info $Id: team_select.php 1107 2013-07-24 12:19:08Z gokohnert $
+$Author: gokohnert $
+-->
\ No newline at end of file
Property changes on: trunk/php/user_select.php
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+text/x-php
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/test.sh
===================================================================
--- trunk/test.sh 2013-08-23 11:26:32 UTC (rev 1145)
+++ trunk/test.sh 2013-08-23 14:37:14 UTC (rev 1146)
@@ -296,7 +296,12 @@
user_new.php?id=$ADR&lg=$LG
user_new.php?uid=$NOID&lg=$LG
user_new.php?uid=$ADR&lg=$LG
+ user_select.php?lg=$LG
+ user_select.php?ext=1&lg=$LG
user_overview.php?lg=$LG
+ user_overview.php?name=a&lg=$LG
+ user_overview.php?theme=n&lg=$LG
+ user_overview.php?layout=l&lg=$LG
admin/backup.php?dbnr=$NOID&lg=$LG
admin/backup.php?dbnr=$DBNR&lg=$LG
admin/create_config.php?lg=$LG
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gok...@us...> - 2013-08-23 11:26:37
|
Revision: 1145
http://sourceforge.net/p/tutos/code/1145
Author: gokohnert
Date: 2013-08-23 11:26:32 +0000 (Fri, 23 Aug 2013)
Log Message:
-----------
no debug
Modified Paths:
--------------
trunk/php/auth/auth_pwauth_db.pinc
Modified: trunk/php/auth/auth_pwauth_db.pinc
===================================================================
--- trunk/php/auth/auth_pwauth_db.pinc 2013-08-23 11:26:07 UTC (rev 1144)
+++ trunk/php/auth/auth_pwauth_db.pinc 2013-08-23 11:26:32 UTC (rev 1145)
@@ -55,8 +55,7 @@
function ready() {
global $tutos;
- dterror_log('ready db '."\n", 3, $tutos[errlog]);
-
+ //dterror_log('ready pwauth_db '."\n", 3, $tutos[errlog]);
if ( $this->getuname() != "" && $this->getpw() != "" ) {
return true;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gok...@us...> - 2013-08-23 11:26:10
|
Revision: 1144
http://sourceforge.net/p/tutos/code/1144
Author: gokohnert
Date: 2013-08-23 11:26:07 +0000 (Fri, 23 Aug 2013)
Log Message:
-----------
ignore
Property Changed:
----------------
trunk/tutos_private/session/
Index: trunk/tutos_private/session
===================================================================
--- trunk/tutos_private/session 2013-08-19 05:52:12 UTC (rev 1143)
+++ trunk/tutos_private/session 2013-08-23 11:26:07 UTC (rev 1144)
Property changes on: trunk/tutos_private/session
___________________________________________________________________
Modified: svn:ignore
## -3,3 +3,4 ##
backup.zip
dbbackup
backup2file
+cron*
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gok...@us...> - 2013-08-19 05:52:15
|
Revision: 1143
http://sourceforge.net/p/tutos/code/1143
Author: gokohnert
Date: 2013-08-19 05:52:12 +0000 (Mon, 19 Aug 2013)
Log Message:
-----------
refactored formatted function
Modified Paths:
--------------
trunk/php/acl_new.php
trunk/php/appointment.pinc
trunk/php/cal_ajax.php
trunk/php/calendar.php
trunk/php/calendar_day.php
trunk/php/calendar_week.php
trunk/php/counter/counter_show.php
trunk/php/layout/layout_base.pinc
trunk/php/note/note.pinc
trunk/php/permission.p3
trunk/php/rate/rate.pinc
trunk/php/reminder/reminder.pinc
trunk/php/scrum/default.css
trunk/php/scrum/scrum.pinc
trunk/php/task.pinc
Modified: trunk/php/acl_new.php
===================================================================
--- trunk/php/acl_new.php 2013-08-19 05:51:11 UTC (rev 1142)
+++ trunk/php/acl_new.php 2013-08-19 05:52:12 UTC (rev 1143)
@@ -399,15 +399,15 @@
$this->feature = 0;
$this->feature_info = null;
- if ( ! isset($_GET['id']) ) {
+ if ( ! isset($_REQUEST['id']) ) {
$msg = addLine($msg,"Missing ID");
$this->stop = true;
return;
}
// the feature (defaults to 0)
- if ( isset($_GET['feature']) ) {
- $this->feature = $_GET['feature'];
+ if ( isset($_REQUEST['feature']) ) {
+ $this->feature = $_REQUEST['feature'];
foreach ($tutos[modules] as $m => $ma) {
if (isset($ma['perm']) && $ma['perm'] == $this->feature ) {
$ma['id'] = $m;
@@ -418,10 +418,10 @@
$this->obj = array();
- if (! is_Array($_GET['id'])) {
- $id[0] = $_GET['id'];
+ if (! is_Array($_REQUEST['id'])) {
+ $id[0] = $_REQUEST['id'];
} else {
- $id = $_GET['id'];
+ $id = $_REQUEST['id'];
}
foreach($id as $val) {
$x = getObject($this->dbconn,$val);
Modified: trunk/php/appointment.pinc
===================================================================
--- trunk/php/appointment.pinc 2013-08-19 05:51:11 UTC (rev 1142)
+++ trunk/php/appointment.pinc 2013-08-19 05:52:12 UTC (rev 1143)
@@ -1441,7 +1441,7 @@
/**
* put aout the formatted appointment
*/
- function formatted () {
+ function formatted (layout $ly) {
global $lang,$tutos,$current_user;
Modified: trunk/php/cal_ajax.php
===================================================================
--- trunk/php/cal_ajax.php 2013-08-19 05:51:11 UTC (rev 1142)
+++ trunk/php/cal_ajax.php 2013-08-19 05:52:12 UTC (rev 1143)
@@ -1,6 +1,6 @@
<?php
/**
- * Copyright 1999 - 2011 by Gero Kohnert
+ * Copyright 1999 - 2013 by Gero Kohnert
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
@@ -9,6 +9,7 @@
* SVN Info $Id$
* $Author$
*/
+$tutos['files'][__FILE__] = '$Rev$';
include_once 'webelements.p3';
include_once 'permission.p3';
@@ -125,4 +126,4 @@
echo ' C:'.$j.' '.$i;
}
-?>
+?>
\ No newline at end of file
Modified: trunk/php/calendar.php
===================================================================
--- trunk/php/calendar.php 2013-08-19 05:51:11 UTC (rev 1142)
+++ trunk/php/calendar.php 2013-08-19 05:52:12 UTC (rev 1143)
@@ -127,7 +127,7 @@
if (!cal_check_against_list($this->user->callist[$idx],$this->uids)) {
continue;
}
- $r .= $this->user->callist[$idx]->formatted();
+ $r .= $this->user->callist[$idx]->formatted($this);
$a++;
}
// while ( $a < 2 ) {
Modified: trunk/php/calendar_day.php
===================================================================
--- trunk/php/calendar_day.php 2013-08-19 05:51:11 UTC (rev 1142)
+++ trunk/php/calendar_day.php 2013-08-19 05:52:12 UTC (rev 1143)
@@ -1,6 +1,6 @@
<?php
/**
- * Copyright 2002 - 2012 by Gero Kohnert
+ * Copyright 2002 - 2013 by Gero Kohnert
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
@@ -82,6 +82,11 @@
if (!cal_check_against_list($this->user->callist[$idx],$this->uids)) {
continue;
}
+ if ( $this->user->callist[$idx]->gettype() == 'scrumlog' ) {
+ $table[-1][] = &$this->user->callist[$idx];
+ $rowspan[-1][] = 1;
+ continue;
+ }
if ( $this->user->callist[$idx]->gettype() == 'reminder' ) {
$table[-1][] = &$this->user->callist[$idx];
$rowspan[-1][] = 1;
@@ -209,7 +214,7 @@
$r .= " <td class=\"line". (1+($i % 2)) ."\" valign=\"top\" rowspan=\"". $rowspan[$i][$c]."\">";
$r .= "<img height=\"1\" width=\"100%\" src=\"". $tutos['base'] ."/html/black.png\" alt=\"--------\" /><br />";
$r .= " <center><table class=\"line". (1+($i % 2)) ."\" width=\"90%\" border=\"0\" cellpadding=\"1\" cellspacing=\"0\">\n";
- $r .= $table[$i][$c]->formatted();
+ $r .= $table[$i][$c]->formatted($this);
$r .= " </table></center></td>\n";
} else if ( $table[$i][$c] = -1 ) {
// SKIP occupied by rowspan
Modified: trunk/php/calendar_week.php
===================================================================
--- trunk/php/calendar_week.php 2013-08-19 05:51:11 UTC (rev 1142)
+++ trunk/php/calendar_week.php 2013-08-19 05:52:12 UTC (rev 1143)
@@ -143,7 +143,7 @@
continue;
}
// Show appointments or task or whatever
- $r .= $this->user->callist[$idx]->formatted();
+ $r .= $this->user->callist[$idx]->formatted($this);
}
$r .= "</ul></td>\n";
Modified: trunk/php/counter/counter_show.php
===================================================================
--- trunk/php/counter/counter_show.php 2013-08-19 05:51:11 UTC (rev 1142)
+++ trunk/php/counter/counter_show.php 2013-08-19 05:52:12 UTC (rev 1143)
@@ -180,7 +180,7 @@
$to = $res->getDateTime(0,'a2');
$res->free();
- $ticks = 30;
+ $ticks = 40;
$step = round(($to->ts - $from->ts) / $ticks);
if ($step == 0) {
$step = 1;
Modified: trunk/php/layout/layout_base.pinc
===================================================================
--- trunk/php/layout/layout_base.pinc 2013-08-19 05:51:11 UTC (rev 1142)
+++ trunk/php/layout/layout_base.pinc 2013-08-19 05:52:12 UTC (rev 1143)
@@ -295,6 +295,13 @@
return $r;
}
+
+ function add_css($path) {
+ global $tutos;
+ $tutos['css_to_load'][] = $path;
+ $tutos['css_to_load'] = array_unique($tutos['css_to_load']);
+ }
+
/**
* add links to the css files
*/
Modified: trunk/php/note/note.pinc
===================================================================
--- trunk/php/note/note.pinc 2013-08-19 05:51:11 UTC (rev 1142)
+++ trunk/php/note/note.pinc 2013-08-19 05:52:12 UTC (rev 1143)
@@ -176,7 +176,7 @@
/**
* added by J. Baten
*/
- function formatted () {
+ function formatted (layout $ly) {
global $lang;
$r = '';
$r .= '<li class="dragable"><div class="formatted note">';
Modified: trunk/php/permission.p3
===================================================================
--- trunk/php/permission.p3 2013-08-19 05:51:11 UTC (rev 1142)
+++ trunk/php/permission.p3 2013-08-19 05:52:12 UTC (rev 1143)
@@ -382,7 +382,7 @@
// handeld with HtmlEntities
$msg = '';
if ( isset($_REQUEST['msg']) ) {
- $msg = HtmlEntities(UrlDecode($_REQUEST['msg']));
+ $msg = myentities(UrlDecode($_REQUEST['msg']));
} elseif ( isset($_REQUEST['msgid']) ) {
if (isset($_SESSION[$_REQUEST['msgid']])) {
$msg = UrlDecode($_SESSION[$_REQUEST['msgid']]);
Modified: trunk/php/rate/rate.pinc
===================================================================
--- trunk/php/rate/rate.pinc 2013-08-19 05:51:11 UTC (rev 1142)
+++ trunk/php/rate/rate.pinc 2013-08-19 05:52:12 UTC (rev 1143)
@@ -154,7 +154,7 @@
/**
* added by J. Baten
*/
- function formatted () {
+ function formatted (layout $ly) {
return '<tr><td colspan="3" class="rate">'. $this->getLink() ."</td></tr>\n";
}
Modified: trunk/php/reminder/reminder.pinc
===================================================================
--- trunk/php/reminder/reminder.pinc 2013-08-19 05:51:11 UTC (rev 1142)
+++ trunk/php/reminder/reminder.pinc 2013-08-19 05:52:12 UTC (rev 1143)
@@ -334,7 +334,7 @@
/**
* output the formatted reminder for a calendar
*/
- function formatted () {
+ function formatted (layout $ly) {
global $lang,$tutos,$current_user;
$this->read_reference();
Modified: trunk/php/scrum/default.css
===================================================================
--- trunk/php/scrum/default.css 2013-08-19 05:51:11 UTC (rev 1142)
+++ trunk/php/scrum/default.css 2013-08-19 05:52:12 UTC (rev 1143)
@@ -1,5 +1,5 @@
/**
- * Copyright 2007 - 2011 by Gero Kohnert
+ * Copyright 2007 - 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
@@ -110,42 +110,50 @@
font-size: 10px;
}
+.logformatted {
+ background: #efefef;
+ color: black;
+ font-size: 10px;
+}
-
-ul.boxy .itemstate0 {
+ul.boxy .itemstate0, .logstate0 {
border: 2px solid red;
}
/* created */
-ul.boxy .itemstate1 {
+ul.boxy .itemstate1, .logstate1 {
border: 2px solid red;
}
/* sprint assigned */
-ul.boxy .itemstate2 {
+ul.boxy .itemstate2, .logstate2 {
border: 2px dashed red ;
}
/* worker assigned */
-ul.boxy .itemstate3 {
+ul.boxy .itemstate3, .logstate3 {
border: 2px dotted yellow;
}
/* time assigned */
-ul.boxy .itemstate4 {
+ul.boxy .itemstate4, .logstate4 {
border: 2px dashed yellow;
}
/* in progress */
-ul.boxy .itemstate5 {
+ul.boxy .itemstate5, .logstate5 {
border: 2px dotted green;
}
/* done */
-ul.boxy .itemstate6 {
+ul.boxy .itemstate6, .logstate6 {
border: 2px solid green;
}
+ul.boxy .itemstate0 {
+ border: 2px solid red;
+}
+
ul.boxy li {
cursor:move;
font-size: 12px;
Modified: trunk/php/scrum/scrum.pinc
===================================================================
--- trunk/php/scrum/scrum.pinc 2013-08-19 05:51:11 UTC (rev 1142)
+++ trunk/php/scrum/scrum.pinc 2013-08-19 05:52:12 UTC (rev 1143)
@@ -192,22 +192,24 @@
}
/**
- * output the formatted reminder for a calendar
+ * output the formatted activity for a calendar
*/
- function formatted () {
+ function formatted (layout $ly) {
global $lang,$tutos,$current_user;
+ $ly->add_css('/php/scrum/default.css');
$r = '';
if ($this->mod_ok()) {
$class2 = 'dragable';
} else {
$class2 = 'undragable';
}
- $r .= '<span class="left">LOG '.$this->getLink('#').' </span>';
+ $r .= '<span class="left">'.$ly->theme->getImage(ScrumLog::getHtmlIcon(),'list').$this->getLink($this->getFullName()).' </span>';
$r .= '<span class="right"> '.(is_object($this->p_ref) ? $this->p_ref->getLink():'??').'</span>';
$class = 'note';
- $r = '<li class="'.$class2.'"><div class="formatted '.$class.'" xid="'.$this->id.'">'.$r.'</div></li>';
+ $class = 'logstate'.$this->state;
+ $r = '<li class="'.$class2.'"><div class="logformatted formatted '.$class.'" xid="'.$this->id.'">'.$r.'</div></li>';
return $r;
}
@@ -612,6 +614,13 @@
}
/**
+ * get name of icons
+ */
+ static function getHtmlIcon () {
+ return 'brick';
+ }
+
+ /**
* return a list of possible date fields (for reminder)
*/
function get_date_fields() {
@@ -1703,7 +1712,7 @@
/**
* show the mytutos info about sprints
*/
- static function mytutos (&$user) {
+ static function mytutos (tutos_user $user) {
global $tutos,$lang,$current_user,$table;
$r = '';
Modified: trunk/php/task.pinc
===================================================================
--- trunk/php/task.pinc 2013-08-19 05:51:11 UTC (rev 1142)
+++ trunk/php/task.pinc 2013-08-19 05:52:12 UTC (rev 1143)
@@ -1854,7 +1854,7 @@
/**
* output the formatted task in one table row
*/
- function formatted () {
+ function formatted (layout $ly) {
global $lang,$tutos,$current_user;
$r = '';
@@ -2376,7 +2376,7 @@
/**
* show the mytutos info about timetracks
*/
- static function mytutos (&$user) {
+ static function mytutos (tutos_user $user) {
global $tutos,$lang,$current_user,$table;
$r = '';
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|