tutos-commits Mailing List for TUTOS
Projects / CRM / PLM / Calendar / Tasks / SCRUM / Test / Inventory
Brought to you by:
gokohnert
You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(13) |
Aug
(214) |
Sep
(144) |
Oct
(22) |
Nov
(22) |
Dec
(93) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(25) |
Feb
(31) |
Mar
(92) |
Apr
(70) |
May
(103) |
Jun
(130) |
Jul
(265) |
Aug
(325) |
Sep
(233) |
Oct
(244) |
Nov
(261) |
Dec
(157) |
2003 |
Jan
(101) |
Feb
(135) |
Mar
(148) |
Apr
(164) |
May
(53) |
Jun
(116) |
Jul
(149) |
Aug
(126) |
Sep
(45) |
Oct
(109) |
Nov
(36) |
Dec
(61) |
2004 |
Jan
(131) |
Feb
(236) |
Mar
(278) |
Apr
(259) |
May
(92) |
Jun
(110) |
Jul
(150) |
Aug
(64) |
Sep
(141) |
Oct
(141) |
Nov
(146) |
Dec
(65) |
2005 |
Jan
(70) |
Feb
(77) |
Mar
(129) |
Apr
(153) |
May
(161) |
Jun
(63) |
Jul
(42) |
Aug
(16) |
Sep
(30) |
Oct
(3) |
Nov
(8) |
Dec
(40) |
2006 |
Jan
(114) |
Feb
(16) |
Mar
(12) |
Apr
(15) |
May
(4) |
Jun
(9) |
Jul
(69) |
Aug
(27) |
Sep
(12) |
Oct
(80) |
Nov
(62) |
Dec
(41) |
2007 |
Jan
(34) |
Feb
(2) |
Mar
(38) |
Apr
(82) |
May
(61) |
Jun
(37) |
Jul
(16) |
Aug
(64) |
Sep
(7) |
Oct
(52) |
Nov
(18) |
Dec
(28) |
2008 |
Jan
(168) |
Feb
(26) |
Mar
(27) |
Apr
(19) |
May
(10) |
Jun
(58) |
Jul
(58) |
Aug
(91) |
Sep
(14) |
Oct
(23) |
Nov
(56) |
Dec
(38) |
2009 |
Jan
(58) |
Feb
(90) |
Mar
(204) |
Apr
(90) |
May
(27) |
Jun
(177) |
Jul
(116) |
Aug
(53) |
Sep
(42) |
Oct
(120) |
Nov
(51) |
Dec
(58) |
2010 |
Jan
(117) |
Feb
(231) |
Mar
(163) |
Apr
(90) |
May
(40) |
Jun
(139) |
Jul
(49) |
Aug
(118) |
Sep
(25) |
Oct
(80) |
Nov
(102) |
Dec
(99) |
2011 |
Jan
(176) |
Feb
(42) |
Mar
(60) |
Apr
(52) |
May
(30) |
Jun
(29) |
Jul
(27) |
Aug
(16) |
Sep
(51) |
Oct
(70) |
Nov
(63) |
Dec
(58) |
2012 |
Jan
(28) |
Feb
(26) |
Mar
(7) |
Apr
(12) |
May
(41) |
Jun
(61) |
Jul
(59) |
Aug
(38) |
Sep
(30) |
Oct
(28) |
Nov
(14) |
Dec
(31) |
2013 |
Jan
(24) |
Feb
(54) |
Mar
(45) |
Apr
(22) |
May
(35) |
Jun
(8) |
Jul
(18) |
Aug
(38) |
Sep
(11) |
Oct
(8) |
Nov
(19) |
Dec
(20) |
2014 |
Jan
(20) |
Feb
(22) |
Mar
(4) |
Apr
(6) |
May
(13) |
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
(6) |
2015 |
Jan
|
Feb
(1) |
Mar
(4) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
(1) |
2016 |
Jan
(4) |
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
(2) |
Aug
(4) |
Sep
(1) |
Oct
(1) |
Nov
(1) |
Dec
|
2017 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(3) |
Jul
(8) |
Aug
(13) |
Sep
(12) |
Oct
|
Nov
|
Dec
|
2018 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2019 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
2020 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(2) |
2021 |
Jan
|
Feb
(1) |
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
S | M | T | W | T | F | S |
---|---|---|---|---|---|---|
|
|
|
|
|
1
(2) |
2
(1) |
3
(3) |
4
(5) |
5
(3) |
6
(3) |
7
(5) |
8
|
9
(1) |
10
(3) |
11
(2) |
12
(2) |
13
(3) |
14
(6) |
15
(1) |
16
|
17
|
18
(1) |
19
(1) |
20
(2) |
21
(1) |
22
|
23
|
24
|
25
|
26
|
27
|
28
|
29
|
30
|
31
|
|
|
|
|
|
|
From: <gok...@us...> - 2013-03-21 12:33:52
|
Revision: 1028 http://sourceforge.net/p/tutos/code/1028 Author: gokohnert Date: 2013-03-21 12:33:48 +0000 (Thu, 21 Mar 2013) Log Message: ----------- update google api (still beta) Modified Paths: -------------- trunk/php/auth/auth.pinc trunk/php/auth/auth_cmdline.pinc trunk/php/auth/auth_external.pinc trunk/php/auth/auth_google.pinc trunk/php/auth/auth_http.pinc trunk/php/auth/auth_ldap.pinc trunk/php/auth/auth_pam.pinc trunk/php/auth/auth_remoteuser.pinc trunk/php/auth/auth_typo3.pinc trunk/php/auth/auth_x509.pinc trunk/php/google_api/en.p3 trunk/php/google_api/gapi.pinc trunk/php/google_api/gapi_init.php trunk/php/google_api/mconfig.pinc trunk/php/google_api/mtable.pinc trunk/php/permission.p3 Added Paths: ----------- trunk/php/google_api/gapi_config.php Property Changed: ---------------- trunk/php/google_api/en.p3 trunk/php/google_api/gapi.pinc trunk/php/google_api/gapi_init.php trunk/php/google_api/mconfig.pinc trunk/php/google_api/mtable.pinc Modified: trunk/php/auth/auth.pinc =================================================================== --- trunk/php/auth/auth.pinc 2013-03-20 19:35:07 UTC (rev 1027) +++ trunk/php/auth/auth.pinc 2013-03-21 12:33:48 UTC (rev 1028) @@ -18,6 +18,9 @@ */ $tutos['files'][__FILE__] = '$Rev$'; +class AuthException extends Exception { +} + /** * Authentification base class * Modified: trunk/php/auth/auth_cmdline.pinc =================================================================== --- trunk/php/auth/auth_cmdline.pinc 2013-03-20 19:35:07 UTC (rev 1027) +++ trunk/php/auth/auth_cmdline.pinc 2013-03-21 12:33:48 UTC (rev 1028) @@ -34,7 +34,7 @@ for ($i = 0 ; $i < $_SERVER['argc']; $i++ ) { if ($_SERVER['argv'][$i] == "-".$x) { $r = $_SERVER['argv'][$i+1]; -# echo $i ." = ". $_SERVER['argv'][$i] ." = ". $r ."\n"; + # echo $i ." = ". $_SERVER['argv'][$i] ." = ". $r ."\n"; return $r; } } @@ -139,4 +139,4 @@ exit; } } -?> \ No newline at end of file +?> Modified: trunk/php/auth/auth_external.pinc =================================================================== --- trunk/php/auth/auth_external.pinc 2013-03-20 19:35:07 UTC (rev 1027) +++ trunk/php/auth/auth_external.pinc 2013-03-21 12:33:48 UTC (rev 1028) @@ -17,128 +17,129 @@ * @package BASE */ class auth_external extends auth{ - /** - * init - */ - function auth_external() { - global $tutos,$msg; + /** + * init + */ + function auth_external() { + global $tutos,$msg; - # - # Globally diable PWLOST SUPPORT - # - $tutos[pwlostsupport] = 0; + // + // Globally diable PWLOST SUPPORT + // + $tutos[pwlostsupport] = 0; - $_SERVER['PHP_AUTH_PW'] = ""; - $x = "----\n"; - $x .= "DateTime:\t". Date("d.M.Y H:i:s T") ."\n"; - $x .= "Request:\t". $_SERVER["REQUEST_URI"] ."\n"; - foreach ($_SESSION as $i1 => $f1) { - $x .= "\t\t_SESSION[". $i1 ."]\t--> ". $f1 ."\n"; - } - foreach ($_COOKIE as $i1 => $f1) { - $x .= "\t\t_COOKIE[". $i1 ."]\t--> ". $f1 ."\n"; - } - foreach ($_POST as $i1 => $f1) { - $x .= "\t\t_POST[". $i1 ."]\t--> ". $f1 ."\n"; - } - foreach ($_GET as $i1 => $f1) { - $x .= "\t\t_GET[". $i1 ."]\t--> ". $f1 ."\n"; - } - if (isset($tutos['SESSID'])) { - # $x .= "sessid \t--> ". $tutos['SESSID'] ."\n"; - } - if (isset($_SERVER['PHP_AUTH_USER'])) { - $x .= "_SERVER[PHP_AUTH_USER]\t--> ". $_SERVER['PHP_AUTH_USER'] ."\n"; - } - $x .= "----\n"; + $_SERVER['PHP_AUTH_PW'] = ""; + $x = "----\n"; + $x .= "DateTime:\t". Date("d.M.Y H:i:s T") ."\n"; + $x .= "Request:\t". $_SERVER["REQUEST_URI"] ."\n"; + foreach ($_SESSION as $i1 => $f1) { + $x .= "\t\t_SESSION[". $i1 ."]\t--> ". $f1 ."\n"; + } + foreach ($_COOKIE as $i1 => $f1) { + $x .= "\t\t_COOKIE[". $i1 ."]\t--> ". $f1 ."\n"; + } + foreach ($_POST as $i1 => $f1) { + $x .= "\t\t_POST[". $i1 ."]\t--> ". $f1 ."\n"; + } + foreach ($_GET as $i1 => $f1) { + $x .= "\t\t_GET[". $i1 ."]\t--> ". $f1 ."\n"; + } + if (isset($tutos['SESSID'])) { + # $x .= "sessid \t--> ". $tutos['SESSID'] ."\n"; + } + if (isset($_SERVER['PHP_AUTH_USER'])) { + $x .= "_SERVER[PHP_AUTH_USER]\t--> ". $_SERVER['PHP_AUTH_USER'] ."\n"; + } + $x .= "----\n"; -# error_log($x,3,$tutos[errlog]); + # error_log($x,3,$tutos[errlog]); - $this->nouname = false; - if ( ! isset($_SESSION['userid']) ) { - $this->nouname = true; - $_SESSION['userid'] = -1; - error_log("\nNO NAME\n",3,$tutos[errlog]); + $this->nouname = false; + if ( ! isset($_SESSION['userid']) ) { + $this->nouname = true; + $_SESSION['userid'] = -1; + error_log("\nNO NAME\n",3,$tutos[errlog]); + } } - } - /** - * logout - * return the next page for the redirect - */ - Function logout () { - global $tutos,$msg; - unset ($_COOKIE[session_name()]); + /** + * logout + * return the next page for the redirect + */ + Function logout () { + global $tutos,$msg; - $goto = parent::logout(); - unset($_SERVER['PHP_AUTH_USER']); - unset($_SERVER['PHP_AUTH_PW']); - $_SERVER['PHP_AUTH_USER'] = ""; - unset($_SESSION); - session_write_close(); - return $goto; - } - /** - * get the password - */ - function getpw() { - return '---'; - } - /** - * get the username - */ - function getuname() { - if (true == $this->nouname) { - return ""; + unset ($_COOKIE[session_name()]); + + $goto = parent::logout(); + unset($_SERVER['PHP_AUTH_USER']); + unset($_SERVER['PHP_AUTH_PW']); + $_SERVER['PHP_AUTH_USER'] = ""; + unset($_SESSION); + session_write_close(); + return $goto; } - if ( isset($_SERVER['PHP_AUTH_USER']) ) { - return trim($_SERVER['PHP_AUTH_USER']); + /** + * get the password + */ + function getpw() { + return '---'; } - return; - } - /** - * Check for permmision - * using a DB query - */ - function check() { - global $current_user,$lang; + /** + * get the username + */ + function getuname() { + if (true == $this->nouname) { + return ""; + } + if ( isset($_SERVER['PHP_AUTH_USER']) ) { + return trim($_SERVER['PHP_AUTH_USER']); + } + return; + } + /** + * Check for permmision + * using a DB query + */ + function check() { + global $current_user,$lang; - $q = "SELECT a.* ,p.*,p.id as u_id, p.creator as cr_a, p.creation as cr_t FROM ". $this->dbconn->prefix ."addresses a, ". $this->dbconn->prefix ."people p "; - $q .= " WHERE p.login = ". $this->dbconn->String($this->getuname()); - $q .= " AND p.adr_id = a.id"; - $result = $this->dbconn->Exec($q); + $q = "SELECT a.* ,p.*,p.id as u_id, p.creator as cr_a, p.creation as cr_t FROM ". $this->dbconn->prefix ."addresses a, ". $this->dbconn->prefix ."people p "; + $q .= " WHERE p.login = ". $this->dbconn->String($this->getuname()); + $q .= " AND p.adr_id = a.id"; + $result = $this->dbconn->Exec($q); - $r = array(); - if ( ! $result ) { - ReadLang($lang); - $r[0] = "No Result for ". $this->getuname() ." / ". $this->getpw(); - $r[1] = $lang['Err0026']; - return $r; + $r = array(); + if ( ! $result ) { + ReadLang($lang); + $r[0] = "No Result for ". $this->getuname() ." / ". $this->getpw(); + $r[1] = $lang['Err0026']; + return $r; + } + + /* OK there is a user and a Password so lets check */ + if ( 1 != $result->numrows()) { + ReadLang($lang); + $r[0] = 'not unique "'. $result->numrows() .'" Result for "'. $this->getuname() .'"/"'. $this->getpw() .'" ('. $_SERVER['REMOTE_ADDR'] .')'; + $r[1] = $lang['Err0027']; + $result->free(); + return $r; + } + + $current_user= new tutos_user($this->dbconn); + $current_user->read_result($result,0); + $result->free(); } + /** + * login form + */ + Function login_form ($gotourl,$msg) { + global $tutos; - /* OK there is a user and a Password so lets check */ - if ( 1 != $result->numrows()) { - ReadLang($lang); - $r[0] = 'not unique "'. $result->numrows() .'" Result for "'. $this->getuname() .'"/"'. $this->getpw() .'" ('. $_SERVER['REMOTE_ADDR'] .')'; - $r[1] = $lang['Err0027']; - $result->free(); - return $r; + header('WWW-Authenticate: Basic realm="TUTOS"'); + header('HTTP/1.0 401 Unauthorized'); + echo "Login failed"; + exit; } - - $current_user= new tutos_user($this->dbconn); - $current_user->read_result($result,0); - $result->free(); - } - /** - * login form - */ - Function login_form ($gotourl,$msg) { - global $tutos; - - header('WWW-Authenticate: Basic realm="TUTOS"'); - header('HTTP/1.0 401 Unauthorized'); - echo "Login failed"; - exit; - } } -?> \ No newline at end of file +?> Modified: trunk/php/auth/auth_google.pinc =================================================================== --- trunk/php/auth/auth_google.pinc 2013-03-20 19:35:07 UTC (rev 1027) +++ trunk/php/auth/auth_google.pinc 2013-03-21 12:33:48 UTC (rev 1028) @@ -40,6 +40,9 @@ $this->pwchangesupport = false; $this->is_additional = true; // this auth is possible as additional login + if (!isset($tutos['google_client'])) throw new AuthException('no client id defined'); + if (!isset($tutos['google_secret'])) throw new AuthException('no secret defined'); + require_once $tutos['base'].'/libs/google-api-php-client/src/Google_Client.php'; require_once $tutos['base'].'/libs/google-api-php-client/src/contrib/Google_Oauth2Service.php'; @@ -71,7 +74,6 @@ $this->user = null; } } - } /** @@ -187,4 +189,4 @@ } } -?> +?> \ No newline at end of file Modified: trunk/php/auth/auth_http.pinc =================================================================== --- trunk/php/auth/auth_http.pinc 2013-03-20 19:35:07 UTC (rev 1027) +++ trunk/php/auth/auth_http.pinc 2013-03-21 12:33:48 UTC (rev 1028) @@ -146,4 +146,4 @@ exit; } } -?> \ No newline at end of file +?> Modified: trunk/php/auth/auth_ldap.pinc =================================================================== --- trunk/php/auth/auth_ldap.pinc 2013-03-20 19:35:07 UTC (rev 1027) +++ trunk/php/auth/auth_ldap.pinc 2013-03-21 12:33:48 UTC (rev 1028) @@ -37,6 +37,9 @@ $this->pwlostsupport = false; $this->pwchangesupport = false; $tutos[pwlostsupport] = 0; + if ( ! function_exists('ldap_connect')) { + throw new AuthException('ldap module not activ in PHP'); + } } /** Modified: trunk/php/auth/auth_pam.pinc =================================================================== --- trunk/php/auth/auth_pam.pinc 2013-03-20 19:35:07 UTC (rev 1027) +++ trunk/php/auth/auth_pam.pinc 2013-03-21 12:33:48 UTC (rev 1028) @@ -31,6 +31,9 @@ // $this->pwlostsupport = false; $this->pwchangesupport = false; + if ( ! function_exists('pam_auth')) { + throw new AuthException('pam module not activ in PHP'); + } } /** @@ -96,12 +99,6 @@ $r = array(); - if ( ! function_exists('pam_auth')) { - $r[0] = "PAM Auth not availabel"; - $r[1] = $r[0]; - return $r; - } - $query = 'SELECT a.* ,p.*,p.id as u_id ,p.creator as cr_a, p.creation as cr_t FROM '. $this->dbconn->prefix .$table['address'][name].' a, '. $this->dbconn->prefix .$table['people'][name].' p'; $query .= " WHERE p.login = ". $this->dbconn->String($this->getuname()); $query .= " AND p.adr_id = a.id"; Modified: trunk/php/auth/auth_remoteuser.pinc =================================================================== --- trunk/php/auth/auth_remoteuser.pinc 2013-03-20 19:35:07 UTC (rev 1027) +++ trunk/php/auth/auth_remoteuser.pinc 2013-03-21 12:33:48 UTC (rev 1028) @@ -43,8 +43,8 @@ if ( isset($_SERVER['REMOTE_USER']) ) { $remu=$_SERVER['REMOTE_USER']; /* - This is a small Kerberos Hack to strip the following Kerberos Domain. - If you have a multi domain structure, don't do it, if the same user exist in an other domain, he or she can login, too!!! + This is a small Kerberos Hack to strip the following Kerberos Domain. + If you have a multi domain structure, don't do it, if the same user exist in an other domain, he or she can login, too!!! */ $tmp_Kerberos_Split=explode("@",$remu); $remu=$tmp_Kerberos_Split[0]; @@ -98,9 +98,9 @@ } $query = - "SELECT a.*, p.*,p.id as u_id ,p.creator as cr_a, p.creation as cr_t FROM ". $this->dbconn->prefix ."people p, ". $this->dbconn->prefix ."addresses a ". - "WHERE login = ". $this->dbconn->String($this->getuname()). - " AND p.adr_id = a.id"; + "SELECT a.*, p.*,p.id as u_id ,p.creator as cr_a, p.creation as cr_t FROM ". $this->dbconn->prefix ."people p, ". $this->dbconn->prefix ."addresses a ". + "WHERE login = ". $this->dbconn->String($this->getuname()). + " AND p.adr_id = a.id"; $result = $this->dbconn->Exec($query); @@ -126,4 +126,4 @@ return true; } } -?> \ No newline at end of file +?> Modified: trunk/php/auth/auth_typo3.pinc =================================================================== --- trunk/php/auth/auth_typo3.pinc 2013-03-20 19:35:07 UTC (rev 1027) +++ trunk/php/auth/auth_typo3.pinc 2013-03-21 12:33:48 UTC (rev 1028) @@ -9,6 +9,7 @@ * SVN Info $Id$ * $Author$ */ +$tutos['files'][__FILE__] = '$Rev$'; require_once 'auth.pinc'; @@ -25,6 +26,7 @@ */ function auth_typo3() { } + /** * get the password */ @@ -55,9 +57,9 @@ global $current_user,$tutos,$lang; $query = - "SELECT p.*, a.* FROM ". $this->dbconn->prefix ."people p, ". $this->dbconn->prefix ."addresses a ". - "WHERE login = ". $this->dbconn->String($this->getuname()). - " AND p.adr_id = a.id"; + "SELECT p.*, a.* FROM ". $this->dbconn->prefix ."people p, ". $this->dbconn->prefix ."addresses a ". + "WHERE login = ". $this->dbconn->String($this->getuname()). + " AND p.adr_id = a.id"; $result = $this->dbconn->Exec($query); @@ -85,7 +87,7 @@ $db->setUser($tutos['typo3dbuser']); $db->setPass($tutos['typo3dbpasswd']); $db->setType(DB_TYPE_MYSQL); # typo3 always uses mysql - $db->setRepository($this->dbconn->db->repository); + $db->setRepository($this->dbconn->db->repository); $dbc = $db->getConnection(); $db->dbconn = &$dbc; } else { @@ -93,9 +95,9 @@ } $query = - "SELECT * FROM be_users ". - "WHERE username = ". $dbc->String($this->getuname()). - " AND password = ". $dbc->String(md5($this->getpw())); + "SELECT * FROM be_users ". + "WHERE username = ". $dbc->String($this->getuname()). + " AND password = ". $dbc->String(md5($this->getpw())); $res = $dbc->Exec($query); @@ -111,9 +113,9 @@ $res->free(); $query = - "SELECT * FROM be_users ". - "WHERE username = ". $dbc->String($this->getuname()). - " AND password = ". $dbc->String(md5($this->getpw())); + "SELECT * FROM be_users ". + "WHERE username = ". $dbc->String($this->getuname()). + " AND password = ". $dbc->String(md5($this->getpw())); $res = $dbc->Exec($query); @@ -136,4 +138,4 @@ $_SESSION['pwc'] = false; } } -?> \ No newline at end of file +?> Modified: trunk/php/auth/auth_x509.pinc =================================================================== --- trunk/php/auth/auth_x509.pinc 2013-03-20 19:35:07 UTC (rev 1027) +++ trunk/php/auth/auth_x509.pinc 2013-03-21 12:33:48 UTC (rev 1028) @@ -143,9 +143,9 @@ dterror_log('check x509 '.$_SERVER["SSL_CLIENT_S_DN_Email"]."\n", 3, $tutos[errlog]); $query = - "SELECT a.*, p.*,p.id as u_id ,p.creator as cr_a, p.creation as cr_t FROM ". $this->dbconn->prefix ."people p, ". $this->dbconn->prefix ."addresses a ". - "WHERE login = ". $this->dbconn->String($this->getuname()). - " AND p.adr_id = a.id"; + "SELECT a.*, p.*,p.id as u_id ,p.creator as cr_a, p.creation as cr_t FROM ". $this->dbconn->prefix ."people p, ". $this->dbconn->prefix ."addresses a ". + "WHERE login = ". $this->dbconn->String($this->getuname()). + " AND p.adr_id = a.id"; $result = $this->dbconn->Exec($query); @@ -174,4 +174,4 @@ return true; } } -?> \ No newline at end of file +?> Modified: trunk/php/google_api/en.p3 =================================================================== --- trunk/php/google_api/en.p3 2013-03-20 19:35:07 UTC (rev 1027) +++ trunk/php/google_api/en.p3 2013-03-21 12:33:48 UTC (rev 1028) @@ -1,5 +1,5 @@ <?php -// $Id: en.p3 242 2011-07-23 15:00:14Z gokohnert $ +// $Id$ // // ========================= NOTE ======================== // Please put site specific extensions and changes @@ -19,9 +19,16 @@ $lang['GAPIReAuthLinkI'] = 'Re-Authenticate for Calendar synchronization'; $lang['GAPIInit'] = 'Init'; +$lang['GAPIConfig'] = 'Google Sync'; $lang['GAPIInitLink'] = 'Google Auth'; $lang['GAPIInitLinkI'] = 'Authentificate at Google'; +$lang['GAPIHelpGoogleClient'] = 'the client ID from +https://code.google.com/apis/console/ +section API Access (Client ID for web applications)'; +$lang['GAPIHelpGoogleSecret'] = 'the client secret from +https://code.google.com/apis/console/ +section API Access (Client ID for web applications)'; $lang['perm'][USEGAPI] = 'use GAPI'; ?> \ No newline at end of file Property changes on: trunk/php/google_api/en.p3 ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id Author Rev \ No newline at end of property Modified: trunk/php/google_api/gapi.pinc =================================================================== --- trunk/php/google_api/gapi.pinc 2013-03-20 19:35:07 UTC (rev 1027) +++ trunk/php/google_api/gapi.pinc 2013-03-21 12:33:48 UTC (rev 1028) @@ -6,10 +6,10 @@ * under the terms of the GNU General Public License as published by the * Free Software Foundation; version 2 of the License. * - * SVN Info $Id: GAPI.pinc 916 2013-01-29 19:49:27Z gokohnert $ - * $Author: gokohnert $ + * SVN Info $Id$ + * $Author$ */ -$tutos['files'][__FILE__] = '$Rev: 927 $'; +$tutos['files'][__FILE__] = '$Rev$'; /** * define some hooks to handle the sync back to google @@ -47,7 +47,7 @@ /** * revision of file */ - static public $revision = '$Rev: 916 $'; + static public $revision = '$Rev$'; /** * init */ Property changes on: trunk/php/google_api/gapi.pinc ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id Author Rev \ No newline at end of property Added: trunk/php/google_api/gapi_config.php =================================================================== --- trunk/php/google_api/gapi_config.php (rev 0) +++ trunk/php/google_api/gapi_config.php 2013-03-21 12:33:48 UTC (rev 1028) @@ -0,0 +1,113 @@ +<?php +/** + * Copyright 2009 - 2013 by Gero Kohnert + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; version 2 of the License. + * + * SVN Info $Id$ + * $Author$ + * + * @modulegroup GAPI + * @module GAPI_config + * @package GAPI + */ +$tutos['files'][__FILE__] = '$Rev$'; + +$tutos['base'] = "../.."; +ini_set("include_path",".."); + +require_once 'webelements.p3'; +require_once 'permission.p3'; + +check_user(); +loadmodules('GAPI','config'); +loadmodule('GAPI'); +loadlayout(); + +/** + * display a admin page for AAA + */ +class GAPI_config extends layout { + /** + * + */ + function info() { + global $lang,$table,$tutos; + + $r = ''; + $r .= "<form id=\"GAPIconfig\" name=\"GAPIconfig\" action=\"GAPI_config.php\" method=\"post\">\n"; + $r .= $this->DataTableStart(); + + $line = 0; + $r .= $this->OverviewHeadLineStart(); + $r .= '<th colspan="4">'.$this->name.'</th>'; + $r .= $this->OverviewHeadLineEnd(); + + // first Config Variable + $r .= $this->OverviewRowStart($line); + $r .= $this->showfield('google_client'); + $r .= '<td><input name="google_client" size="60" value="'.$tutos['google_client'] .'" /></td>'; + $r .= '<td colspan="2" class="pre">'.$lang['GAPIHelpGoogleClient'].'</td>'; + $r .= $this->OverviewRowEnd($line++); + + $r .= $this->OverviewRowStart($line); + $r .= $this->showfield('google_secret'); + $r .= '<td><input name="google_secret" size="60" value="'.$tutos['google_secret'] .'" /></td>'; + $r .= '<td colspan="2" class="pre">'.$lang['GAPIHelpGoogleSecret'].'</td>'; + $r .= $this->OverviewRowEnd($line++); + + $r .= '<tr>'; + $r .= submit_reset(0,1,1,1,1,0); + $r .= '</tr>'; + + $r .= $this->DataTableEnd(); + $this->addHidden("save", 1); + $r .= hiddenFormElements(); + $r .= $this->getHidden(); + $r .= "</form>\n"; + + return $r; + } + + /** + * + */ + function prepare() { + global $lang,$msg,$tutos; + + $this->name = $lang['GAPIConfig']; + $this->css_class = 'configbox'; + + if (!isset($tutos['google_client'])) $tutos['google_client'] = ''; + if (!isset($tutos['google_secret'])) $tutos['google_secret'] = ''; + + if ( ! $this->user->isAdmin() ) { + $msg .= $this->error("Only admins are allowed to see this"); + $this->stop = true; + return; + } + + + if (isset($_REQUEST['save']) && ($_REQUEST['save'] == 1) ) { + $tutos['google_client'] = $_REQUEST['google_client']; + write_config_value($this->dbconn,'google_client','GAPI'); + + $tutos['google_secret'] = $_REQUEST['google_secret']; + write_config_value($this->dbconn,'google_secret','GAPI'); + + $msg .= ' saving done '; + } + } + +} + +$l = new GAPI_config($current_user); +$l->display(); +$dbconn->close(); +?> +<!-- +SVN Info $Id$ +$Author$ +--> \ No newline at end of file Property changes on: trunk/php/google_api/gapi_config.php ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +text/x-php \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id Author Rev \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Modified: trunk/php/google_api/gapi_init.php =================================================================== --- trunk/php/google_api/gapi_init.php 2013-03-20 19:35:07 UTC (rev 1027) +++ trunk/php/google_api/gapi_init.php 2013-03-21 12:33:48 UTC (rev 1028) @@ -10,7 +10,7 @@ * @module GAPI_overview * @package GAPI */ -$tutos['files'][__FILE__] = '$Rev: 934 $'; +$tutos['files'][__FILE__] = '$Rev$'; $tutos['base'] = "../.."; ini_set("include_path",".."); require_once 'webelements.p3'; @@ -238,6 +238,6 @@ $dbconn->Close(); ?> <!-- -SVN Info $Id: GAPI_overview.php 763 2012-08-19 09:21:41Z gokohnert $ -$Author: gokohnert $ +SVN Info $Id$ +$Author$ --> \ No newline at end of file Property changes on: trunk/php/google_api/gapi_init.php ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id Author Rev \ No newline at end of property Modified: trunk/php/google_api/mconfig.pinc =================================================================== --- trunk/php/google_api/mconfig.pinc 2013-03-20 19:35:07 UTC (rev 1027) +++ trunk/php/google_api/mconfig.pinc 2013-03-21 12:33:48 UTC (rev 1028) @@ -4,10 +4,10 @@ * * Module specific configuration * - * SVN Info $Id: mconfig.pinc 927 2013-02-01 12:54:29Z gokohnert $ - * $Author: gokohnert $ + * SVN Info $Id$ + * $Author$ */ -$tutos['files'][__FILE__] = '$Rev: 927 $'; +$tutos['files'][__FILE__] = '$Rev$'; // // Every module must have an individual ID ( < 0 > -100 ). // this is module 87 Property changes on: trunk/php/google_api/mconfig.pinc ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id Author Rev \ No newline at end of property Modified: trunk/php/google_api/mtable.pinc =================================================================== --- trunk/php/google_api/mtable.pinc 2013-03-20 19:35:07 UTC (rev 1027) +++ trunk/php/google_api/mtable.pinc 2013-03-21 12:33:48 UTC (rev 1028) @@ -8,10 +8,10 @@ * * Information about the tables and indices neccessary for this module * - * SVN Info $Id: mtable.pinc 242 2011-07-23 15:00:14Z gokohnert $ - * $Author: gokohnert $ + * SVN Info $Id$ + * $Author$ */ -$tutos['files'][__FILE__] = '$Rev: 927 $'; +$tutos['files'][__FILE__] = '$Rev$'; $table['people']['gapi_token'] = array('custom' => true, type => 'TX_TYPE', Property changes on: trunk/php/google_api/mtable.pinc ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id Author Rev \ No newline at end of property Modified: trunk/php/permission.p3 =================================================================== --- trunk/php/permission.p3 2013-03-20 19:35:07 UTC (rev 1027) +++ trunk/php/permission.p3 2013-03-21 12:33:48 UTC (rev 1028) @@ -420,9 +420,14 @@ require_once 'auth/auth_'. $a .'.pinc'; $x = "auth_".$a; if ( class_exists ($x) ) { - $auth[$cnt++] = new $x(); + try { + $auth[$cnt++] = new $x(); + } + catch (AuthException $e) { + $msg = addLine($msg,'Auth ('. $a.') :'.$e->getMessage()); + } } else { - die("Missing Authentification: ".$x ."\r\n(see \$tutos[authtype] parameter)\r\n"); + $msg = addLine($msg,'Auth ('. $a.') : auth module not found. See \$tutos[authtype] parameter'); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2013-03-20 19:35:10
|
Revision: 1027 http://sourceforge.net/p/tutos/code/1027 Author: gokohnert Date: 2013-03-20 19:35:07 +0000 (Wed, 20 Mar 2013) Log Message: ----------- initial version of google calendar sync (currently google to tutos only) Modified Paths: -------------- trunk/php/admin/hooks.php trunk/php/google_earth/README Added Paths: ----------- trunk/php/google_api/ trunk/php/google_api/README trunk/php/google_api/en.p3 trunk/php/google_api/gapi.pinc trunk/php/google_api/gapi_init.php trunk/php/google_api/mconfig.pinc trunk/php/google_api/mtable.pinc Modified: trunk/php/admin/hooks.php =================================================================== --- trunk/php/admin/hooks.php 2013-03-20 16:43:30 UTC (rev 1026) +++ trunk/php/admin/hooks.php 2013-03-20 19:35:07 UTC (rev 1027) @@ -6,13 +6,15 @@ * under the terms of the GNU General Public License as published by the * Free Software Foundation; version 2 of the License. * - * Show hook scripts + * Show hook scripts * * - * @modulegroup ADMIN - * @module hooks - * @package BASE + * @modulegroup ADMIN + * @module hooks + * @package BASE */ +$tutos['files'][__FILE__] = '$Rev: 927 $'; + $tutos['base'] = "../.."; ini_set("include_path",".."); include 'webelements.p3'; @@ -23,7 +25,6 @@ loadmodules('admin','hoosks'); loadlayout(); - /** * display info about hooks */ @@ -51,19 +52,25 @@ $r .= '<td>'; $pre = ''; foreach ($h as $fct) { - $refFunc = new ReflectionFunction($fct); - $r .= '<pre>'.$refFunc->getDocComment().'</pre>'; - //$r .= $pre.$refFunc->getNamespaceName().$refFunc->getName().'('; - $r .= $pre.$refFunc->getName().'('; - $ppre = ''; - foreach( $refFunc->getParameters() as $param ){ - //invokes ReflectionParameter::__toString - $r .= $ppre.'$'.$param->getName(); - $ppre = ','; + try { + $refFunc = new ReflectionFunction($fct); + $r .= '<pre>'.$refFunc->getDocComment().'</pre>'; + //$r .= $pre.$refFunc->getNamespaceName().$refFunc->getName().'('; + $r .= $pre.$refFunc->getName().'('; + $ppre = ''; + foreach( $refFunc->getParameters() as $param ){ + //invokes ReflectionParameter::__toString + $r .= $ppre.'$'.$param->getName(); + $ppre = ','; + } + $r .= ')<br />['; + $r .= $refFunc->getFileName(); + $r .= ': line '.$refFunc->getStartLine().'-'.$refFunc->getEndLine() .']'; } - $r .= ')<br />['; - $r .= $refFunc->getFileName(); - $r .= ': line '.$refFunc->getStartLine().'-'.$refFunc->getEndLine() .']'; + catch (Exception $e) { + $r .= $fct; + $r .= '<br /><span class="warn">ERROR: '.$e->getMessage().'</span>'; + } $pre = '<br />'; } $r .= '</td>'; Added: trunk/php/google_api/README =================================================================== --- trunk/php/google_api/README (rev 0) +++ trunk/php/google_api/README 2013-03-20 19:35:07 UTC (rev 1027) @@ -0,0 +1,47 @@ +This is a TUTOS module which will +sync calendar data between TUTOS and an Google calendar. + +In order to make things going you will need some preparation. + ++ go to https://code.google.com/apis/console/ + create a project + ++ in services + enable calendar api service + enable maps api v3 service (this will allow you to see maps in the addressbook) + ++ in api access + create a client id for webservices + add to config + $tutos['google_secret'] = '<your client secret>'; + $tutos['google_client'] = '<your client id>'; + + add redirect urls + <tutos url>/php/ + <tutos url>/php/google_api/gapi_init.php + ++ include the module in your config + add + include('google_api/mconfig.pinc'); + to config.php + ++ update database + call http://<tutos>/php/admin/update.php + +now you will find a new custom config variable in the settings dialog of each user ++ enable the google sync ++ call mytutos page ++ call tool/"Google Auth" menu ++ authentificate at google (this access is saved and reused) + +now TUTOS will sync with your google calendars whenever check.php is called (typically all 5 minutes) + +to stop sysncing go to settings again and disable the sync + + +see also the google auth in tutos/php/auth/auth_google.pinc +see also the google_earth handler in tutos/php/google_earth/ + + + +# $Id: README,v 1.1 2005/09/16 19:30:53 gokohnert Exp $ Added: trunk/php/google_api/en.p3 =================================================================== --- trunk/php/google_api/en.p3 (rev 0) +++ trunk/php/google_api/en.p3 2013-03-20 19:35:07 UTC (rev 1027) @@ -0,0 +1,27 @@ +<?php +// $Id: en.p3 242 2011-07-23 15:00:14Z gokohnert $ +// +// ========================= 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 Google Sync module +// +$lang['GAPI'] = 'GAPI'; +$lang['GAPISyncCal'] = 'Sync with Google Calendar'; +$lang['GAPIAuthLink'] = 'click here to enable Google Cal Sync'; +$lang['GAPIAuthLinkI'] = 'Authenticate for Calendar synchronization'; +$lang['GAPIReAuthLink'] = 'click here to reenable Google Cal Sync'; +$lang['GAPIReAuthLinkI'] = 'Re-Authenticate for Calendar synchronization'; + +$lang['GAPIInit'] = 'Init'; +$lang['GAPIInitLink'] = 'Google Auth'; +$lang['GAPIInitLinkI'] = 'Authentificate at Google'; + +$lang['perm'][USEGAPI] = 'use GAPI'; + +?> \ No newline at end of file Property changes on: trunk/php/google_api/en.p3 ___________________________________________________________________ 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 Added: trunk/php/google_api/gapi.pinc =================================================================== --- trunk/php/google_api/gapi.pinc (rev 0) +++ trunk/php/google_api/gapi.pinc 2013-03-20 19:35:07 UTC (rev 1027) @@ -0,0 +1,413 @@ +<?php +/** + * Copyright 1999 - 2013 by Gero Kohnert + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; version 2 of the License. + * + * SVN Info $Id: GAPI.pinc 916 2013-01-29 19:49:27Z gokohnert $ + * $Author: gokohnert $ + */ +$tutos['files'][__FILE__] = '$Rev: 927 $'; + +/** + * define some hooks to handle the sync back to google + */ + +/** + * handle modification of google synced appointments + */ +function gapi_postsave_hook(Appointment $obj) { + if (!isset($obj->_fld_gapi_id) || ( $obj->_fld_gapi_id == '') ) { + return; + } + // TODO update extern +} +$tutos['postsave-hooks']['appointment'][] = 'gapi_postsave_hook'; + +/** + * handle deletion of google synced appointments + */ +function gapi_postdel_hook(Appointment $obj) { + if (!isset($obj->_fld_gapi_id) || ( $obj->_fld_gapi_id == '') ) { + return; + } + // TODO delete extern +} +$tutos['postdel-hooks']['appointment'][] = 'gapi_postdel_hook'; + + +/** + * base class for module GAPI + * + * @package GAPI + */ +class GAPI extends tutos_module { + /** + * revision of file + */ + static public $revision = '$Rev: 916 $'; + /** + * init + */ + function GAPI(tutos_db $dbconn) { + global $tutos,$table; + + require_once $tutos['base'].'/libs/google-api-php-client/src/Google_Client.php'; + require_once $tutos['base'].'/libs/google-api-php-client/src/contrib/Google_CalendarService.php'; + require_once $tutos['base'].'/libs/google-api-php-client/src/contrib/Google_TasksService.php'; + require_once $tutos['base'].'/libs/google-api-php-client/src/contrib/Google_Oauth2Service.php'; + + $this->init($dbconn); + + $this->name = ''; + $this->link_id = -1; + $this->ref = null; + // $this->tablename = $this->dbconn->prefix .$table['GAPI'][name]; + $this->run_postinit_hook(); + + // Initialize + $this->client = new Google_Client(); + $this->client->setApplicationName("TUTOS ".$tutos[version]); + $this->client->setClientId($tutos['google_client']); + $this->client->setClientSecret($tutos['google_secret']); + // $this->client->setDeveloperKey('AIzaSyDxGJoUQde2-nIIoVIxl6be8iKcl-ZujVA'); + + $this->client->setRedirectUri(getBaseUrl().'gapi_init.php'); + $this->auth = new Google_Oauth2Service($this->client); + $this->cal = new Google_CalendarService($this->client); + $this->task = new Google_TasksService($this->client); + + } + + function getCal() { + return $this->cal; + } + + function getTask() { + return $this->task; + } + + function getAuth() { + return $this->auth; + } + + function setUser(tutos_user $user) { + $this->user = $user; + $this->user->read($this->user->id,$this->user); + } + + function refreshToken() { + if (isset($this->token->refresh_token)) { + $this->client->refreshToken($this->token->refresh_token); + $this->saveToken(); + } + } + + function saveToken() { + global $tutos; + $this->user->_fld_gapi_token = $this->client->getAccessToken(); + $this->token = json_decode($this->user->_fld_gapi_token); + $this->user->history = array(); + $this->user->save(); + dterror_log('save token '.$this->token->created."\n",3,$tutos[errlog]); + } + + function removeToken() { + $this->user->_fld_gapi_token = ''; + $this->saveToken(); + } + + function setAccessToken() { + $this->client->setAccessToken($this->user->_fld_gapi_token); + } + + function doAuth($ly = null) { + global $tutos; + + if ($ly != null && isset($_GET['code'])) { + $this->client->authenticate($_GET['code']); + $this->saveToken(); + $ly->redirect = 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF']; + return; + } + if (isset($this->user->_fld_gapi_token) && strlen($this->user->_fld_gapi_token) > 20 ) { + $this->client->setAccessToken($this->user->_fld_gapi_token); + $this->token = json_decode($this->user->_fld_gapi_token); + dterror_log('set token: '.$this->token->created."\n",3,$tutos[errlog]); + } + if ($ly != null && !$this->client->getAccessToken()) { + dterror_log('need login '."\n",3,$tutos[errlog]); + $authUrl = $this->client->createAuthUrl(); + //echo 'A:'.$authUrl; + $ly->redirect = $authUrl; + return; + } + } + + /** + * get the type of object + */ + static function getType () { + global $tutos; + return $tutos[modules]['GAPI'][name]; + } + + /** + * get the type id of object + */ + static function getTypeId () { + global $tutos; + return $tutos[modules]['GAPI']['perm']; + } + /* --------------------------------------------------------------------------- + * The following methods are abstract factory functions for groups + * which handle the membership list of an object + * --------------------------------------------------------------------------- */ + + function find_appointment($id) { + global $table,$tutos; + + $a = null; + $q = 'select * from '.$this->dbconn->prefix.$table['appointment1'][name]." where gapi_id = '".$id."'"; + $res = $this->dbconn->exec($q); + $n = $res->numrows(); + if ($n > 1) { + // strange + } else if ($n == 1) { + $a = new Appointment($this->dbconn); + $a->read_result($res,0); + } else { + dterror_log('-> app not found '. $id.' n:'.$n.' q:'.$q."\r\n",3,$tutos[errlog]); + } + + $res->free(); + return $a; + } + + function update_appointment(appointment $a,array $data) { + global $table,$tutos; + + $st = new TUTOS_Date_Time(); + $et = new TUTOS_Date_Time(); + + $a->creator = $this->user; + // GAPI Id + $a->_fld_gapi_id = $data['id']; + + // Description + $d = ''; + if (isset($data['summary'])) { + $d .= $data['summary']."\n"; + } + if (isset($data['location'])) { + $d .= $data['location']."\n"; + } + if (isset($data['description'])) { + $d .= $data['description']."\n"; + } + $a->setDescription($d); + + // start + if (isset($data['start']['dateTime'])) { + $st->setDateTime($data['start']['dateTime']); + } + if (isset($data['start']['date'])) { + $st->setDateTime($data['start']['date']); + } + $a->setStartTime($st); + + // end + if (isset($data['end']['dateTime'])) { + $et->setDateTime($data['end']['dateTime']); + } + if (isset($data['end']['date'])) { + //TODO check -1 + $et->setDateTime($data['end']['date']); + } + $a->setEndTime($et); + + // Attendees + if (isset($data['attendees']) && is_array($data['attendees'])) { + foreach($data['attendees'] as $p) { + if (isset($data['self'])) { + $a->addParticipant($this->user); + } else { + //find user + $q = 'select distinct a.adr_id from '.$table['location'][name].' l,'.$table['address1'][name].' a where l.id = a.loc_id'; + $q .= ' and ('.$this->dbconn->Like('email_1',$p['email']); + $q .= ' or '.$this->dbconn->Like('email_2',$p['email']).')'; + $res = $this->dbconn->exec($q); + $n = $res->numrows(); + if ($n == 1) { + $adr = getObject($this->dbconn,$res->get('adr_id',0)); + $a->addParticipant($adr); + } + $res->free(); + } + } + } else if (isset($data['organizer']) && is_array($data['organizer'])) { + if (isset($data['organizer']['self'])) { + $a->addParticipant($this->user); + } + } + } + + /** + * method called from check service + * Sync appointments + */ + static function checkservice (tutos_user $user) { + global $tutos,$lang,$table; + + $msg = ''; + dterror_log("CHECK GAPI\r\n",3,$tutos[errlog]); + // find all accounts with a connected googleaccount + $q = "SELECT a.* ,p.*,p.id as u_id, p.creator as cr_a, p.creation as cr_t FROM "; + $q .= $user->dbconn->prefix.$table['address'][name].' a,'; + $q .= $user->dbconn->prefix.$table['people'][name] .' p '; + $q .= ' WHERE a.id = p.adr_id'; + $q .= ' AND gapi_token is not null'; + $q .= ' AND google_sync_cal = 1'; + $res = $user->dbconn->exec($q); + $n = $res->numrows(); + $x = 0; + while ( $x < $n ) { + $p = new tutos_user($user->dbconn); + $p->read_result($res,$x); + $x++; + + if (isset($p->_fld_gapi_token) && $p->_fld_gapi_token == '') { + unset($p); + continue; + } + + $obj = new GAPI($user->dbconn); + $obj->setuser($p); + dterror_log("-> GAPI ".$p->login.' :'.$p->_fld_google_sync->get_rfc3339()."\r\n",3,$tutos[errlog]); + // connect + try { + $obj->doAuth(null); + } + catch (Exception $e) { + dterror_log("-> auth failed ".$p->login.' :'.$e->getMessage()."\r\n",3,$tutos[errlog]); + $msg = addLine($msg,'A:'.$e->getMessage()); + $obj->removeToken(); + unset($obj); + unset($p); + continue; + } + // sync calendar + try { + $cal = $obj->getCal(); + $obj->setAccessToken(); + $calList = $cal->calendarList->listCalendarList(); + dterror_log("-> calendars ".count($calList['items'])."\r\n",3,$tutos[errlog]); + foreach($calList['items'] as $i) { + if ($i['accessRole'] != 'owner') { + continue; + } + $obj->setAccessToken(); + $param = array(); + $param['showDeleted'] = true; + if (!$obj->user->_fld_google_sync->notime) { + $param['updatedMin'] = $obj->user->_fld_google_sync->get_rfc3339(); + } + $eList = $cal->events->listEvents($i['id'],$param); + if (!isset($eList['items'])) continue; + dterror_log("--> events ".count($eList['items'])."\r\n",3,$tutos[errlog]); + foreach($eList['items'] as $i2) { + // find appointment + $a = $obj->find_appointment($i2['id']); + if ($a == null) { + $a = new Appointment($obj->dbconn); + dterror_log("-> NEW ". $i2['id'] ."\r\n",3,$tutos[errlog]); + } + + if (isset($i2['status']) && $i2['status'] == 'cancelled') { + // still exists in TUTOS but is cancelled/deleted + if ($a->id > 0) { + $a->_fld_gapi_id = ''; // no recursion + $a->delete(); + } + continue; + } + $obj->update_appointment($a,$i2); + + $a->save(); + } + } + } + catch (Exception $e) { + dterror_log("-> sync failed ".$p->login.' :'.$e->getMessage()."\r\n",3,$tutos[errlog]); + $msg = addLine($msg,'B:'.$e->getMessage()); + } + // update last sync + $obj->user->_fld_google_sync = new TUTOS_Date_Time(); + try { + $obj->setAccessToken(); + $obj->refreshToken(); + } + catch (Exception $e) { + dterror_log("-> refresh failed ".$p->login.' :'.$e->getMessage()."\r\n",3,$tutos[errlog]); + $msg = addLine($msg,'C:'.$e->getMessage()); + $p->_fld_gapi_token = ''; + $p->save(); + } + unset($obj); + + unset($p); + } + $res->free(); + return $msg; + } + + /** + * create a link to a select page + * misused for testing + */ + static function getSelectLink (tutos_user $user,$text = "") { + global $lang,$tutos,$info; + + $x = basename($_SERVER['PHP_SELF']); + if (('mytutos.php' != $x) + && ('calendar.php' != $x) + && ('calendar_week.php' != $x) + && ('calendar_day.php' != $x) + ) { + return; + } + $user->read($user->id,$user); + if ( $user->_fld_google_sync_cal != 1) { + return; + } + if ( $user->_fld_google_sync->notime == true ) { + $info = addLine($info,makelink('google_api/gapi_init.php',$lang['GAPIAuthLink'],$lang['GAPIAuthLinkI'])); + } else if ( $user->_fld_gapi_token == '' ) { + $info = addLine($info,makelink('google_api/gapi_init.php',$lang['GAPIReAuthLink'],$lang['GAPIReAuthLinkI'])); + } else { + $info = addLine($info,' last synced '.$user->_fld_google_sync.''); + } + + return array( url => 'google_api/gapi_init.php', + image => $user->layout->theme->getImage(gapi::getHtmlIcon(),'menu'), + text => ($text == "" ? $lang['GAPIInitLink'] : $text), + info => $lang['GAPIInitLinkI'], + category => array('support',GAPI::getType(),USEGAPI) + ); + } + + /** + * get the help index + */ + static function getHelpIndex () { + global $lang; + + $r = ''; + $r .= '<h3>'. makelink('help.php?p=glossary#'.GAPI::getType(),$lang['GAPIs'],$lang['GAPIs']) ."</h3><ul>\n"; + $r .= "</ul>\n"; + return $r; + } +} +?> \ No newline at end of file Property changes on: trunk/php/google_api/gapi.pinc ___________________________________________________________________ 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 Added: trunk/php/google_api/gapi_init.php =================================================================== --- trunk/php/google_api/gapi_init.php (rev 0) +++ trunk/php/google_api/gapi_init.php 2013-03-20 19:35:07 UTC (rev 1027) @@ -0,0 +1,243 @@ +<?php +/** + * Copyright 2009 - 2012 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. + * + * @modulegroup GAPI + * @module GAPI_overview + * @package GAPI + */ +$tutos['files'][__FILE__] = '$Rev: 934 $'; +$tutos['base'] = "../.."; +ini_set("include_path",".."); +require_once 'webelements.p3'; +require_once 'permission.p3'; + +/* Check if user is allowed to use it */ +check_user(); +loadmodules('GAPI','overview'); +loadmodule('GAPI'); +loadlayout(); + +/** + * show a GAPI init + */ +class GAPI_init extends layout { + /** + * info + */ + Function info() { + global $tutos,$lang,$table; + + $this->obj->setAccessToken(); + $r = ''; + $x = $this->obj->token; + $r .= 'T:'.$x->created; + $r .= print_r($this->obj->client,true); + + + try { + $auth = $this->obj->getAuth(); + $user = $auth->userinfo->get(); + $r .= "<h1>User</h1>"; + $r .= '<pre>'.print_r($user,true).'</pre></br>'; + + // These fields are currently filtered through the PHP sanitize filters. + // See http://www.php.net/manual/en/filter.filters.sanitize.php + $email = filter_var($user['email'], FILTER_SANITIZE_EMAIL); + $img = filter_var($user['picture'], FILTER_VALIDATE_URL); + $r .= "$email<div><img src='$img?sz=50'></div>"; + } + catch (Exception $e) { + $r .= '<br>E:'.$e->getMessage(); + } + + + if ($tutos[debug] == 1) { + $cal = $this->obj->getCal(); + $this->obj->setAccessToken(); + $calList = $cal->calendarList->listCalendarList(); + $r .= "<h1>Calendar List</h1>"; + foreach($calList['items'] as $i) { + if ($i['accessRole'] != 'owner') { + continue; + } + $r .= '<h2>'.$i['summary'].'</h2>'; + $r .= '<pre>'.print_r($i,true).'</pre></br>'; + try { + $this->obj->setAccessToken(); + $eList = $cal->events->listEvents($i['id'],array('showDeleted' => true)); + foreach($eList['items'] as $i2) { + // check if it is already there + $q = 'select * from '.$this->dbconn->prefix.$table['appointment1'][name].' where '.$this->dbconn->like('gapi_id',$i2['id']); + $res = $this->dbconn->exec($q); + $n = $res->numrows(); + if ($n > 1) { + // strange + $res->free(); + continue; + } else if ($n == 1) { + $a = new Appointment($this->dbconn); + $a->read_result($res,0); + } else { + $a = new Appointment($this->dbconn); + } + $res->free(); + $st = new TUTOS_Date_Time(); + $et = new TUTOS_Date_Time(); + $d = ''; + if (isset($i2['summary'])) { + $d .= $i2['summary']."\n"; + } + if (isset($i2['location'])) { + $d .= $i2['location']."\n"; + } + if (isset($i2['description'])) { + $d .= $i2['description']."\n"; + } + $a->setDescription($d); + if (isset($i2['start']['dateTime'])) { + $st->setDateTime($i2['start']['dateTime']); + } + if (isset($i2['start']['date'])) { + $st->setDateTime($i2['start']['date']); + } + if (isset($i2['end']['dateTime'])) { + $et->setDateTime($i2['end']['dateTime']); + } + if (isset($i2['end']['date'])) { + $et->setDateTime($i2['end']['date']); + } + $a->setStartTime($st); + $a->setEndTime($et); + // Attendees + if (isset($i2['attendees']) && is_array($i2['attendees'])) { + foreach($i2['attendees'] as $p) { + if (isset($p['self'])) { + $a->addParticipant($this->obj->user); + } else { + //find user + $q = 'select distinct a.adr_id from '.$table['location'][name].' l,'.$table['address1'][name].' a where l.id = a.loc_id'; + $q .= ' and ('.$this->dbconn->Like('email_1',$p['email']); + $q .= ' or '.$this->dbconn->Like('email_2',$p['email']).')'; + $res = $this->dbconn->exec($q); + $n = $res->numrows(); + if ($n == 1) { + $adr = getObject($this->dbconn,$res->get('adr_id',0)); + $a->addParticipant($adr); + } + $res->free(); + } + } + } else if (isset($i2['organizer']) && is_array($i2['organizer'])) { + if (isset($i2['organizer']['self'])) { + $a->addParticipant($this->obj->user); + } + } + + $a->_fld_gapi_id = $i2['id']; + if ($a->id > 0) + $r .= $a->getLink(); + else + $r .= 'NEW'; + // $a->save(); + $r .= '<a href="'.$i2['htmlLink'].'">'.'X</a>'; + + $r.= '<pre>'; + $r .= $a->getAsText($lang); + $r.= '</pre>'; + $r .= '<pre>'.print_r($i2,true).'</pre></br>'; + $r .= '<br>'; + } + } + catch (Exception $e) { + $r .= '<br>C:'.$e->getMessage(); + $r .= '<pre>'.print_r($i, true).'</pre>'; + $r .= '<pre>'.$e.'</pre>'; + } + } + + /** + try { + $this->obj->setAccessToken(); + $task = $this->obj->getTask(); + $taskList = $task->tasklists->listTasklists(); + $r .= "<h1>Task List</h1>"; + foreach($taskList['items'] as $i) { + $r .= '<h2>'.$i['title'].'</h2>'; + $r .= '<br>'; + $tList = $task->tasks->listTasks($i['id']); + foreach($tList['items'] as $i2) { + $r .= '<pre>'.print_r($i2,true).'</pre></br>'; + } + } + } + catch (Exception $e) { + $r .= '<br>D:'.$e->getMessage(); + } + */ + } + return $r; + } + + /** + * prepare + */ + Function prepare() { + global $msg,$lang,$current_user,$table,$tutos; + + $this->name = $lang['GAPIInit']; + + $this->layout_id = USEGAPI; + + if ( ! $this->user->feature_ok(USEGAPI,PERM_SEE) ) { + $msg = addLine($msg,sprintf($lang['Err0022'],"'". $this->name ."'")); + $this->stop = true; + return; + } + + if (isset($_GET['ext'])) { + $this->ext = $_GET['ext']; + } else { + $this->ext = 0; + } + + $this->obj = new GAPI($this->dbconn); + $this->obj->setuser($this->user); + + try { + $this->obj->doAuth($this); + } + catch (Exception $e) { + $msg = addLine($msg,'A:'.$e->getMessage()); + $this->obj->removeToken(); + $this->stop = true; + return; + } + try { + $this->obj->refreshToken(); + } + catch (Exception $e) { + $msg = addLine($msg,'B:'.$e->getMessage()); + $msg = addLine($msg,$this->obj->token->refresh_token); + } + $dt = new TUTOS_Date_Time(); + $dt->setDateTimeTS($this->obj->token->created); + $msg = addLine($msg,'CR:'.$dt); + $x = $this->obj->token; + $msg = addLine($msg,'T:'.$x->created); + + } +} + +$l = new GAPI_init($current_user); +$l->display(); +$dbconn->Close(); +?> +<!-- +SVN Info $Id: GAPI_overview.php 763 2012-08-19 09:21:41Z gokohnert $ +$Author: gokohnert $ +--> \ No newline at end of file Property changes on: trunk/php/google_api/gapi_init.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 Added: trunk/php/google_api/mconfig.pinc =================================================================== --- trunk/php/google_api/mconfig.pinc (rev 0) +++ trunk/php/google_api/mconfig.pinc 2013-03-20 19:35:07 UTC (rev 1027) @@ -0,0 +1,42 @@ +<?php +/** + * Copyright 2009 - 2013 by Gero Kohnert + * + * Module specific configuration + * + * SVN Info $Id: mconfig.pinc 927 2013-02-01 12:54:29Z gokohnert $ + * $Author: gokohnert $ + */ +$tutos['files'][__FILE__] = '$Rev: 927 $'; +// +// Every module must have an individual ID ( < 0 > -100 ). +// this is module 87 +// +define('USEGAPI',-87); +$tutos[modules]['GAPI'] = array( + name => 'GAPI', + Desc => 'access to google api', + file => 'php/google_api/gapi.pinc', + 'overview' => 'google_api/gapi_init.php', + 'configurl' => 'google_api/gapi_config.php', + 'perm' => USEGAPI + ); +// +// globally enable this module +// +$tutos[USEGAPI] = 1; +// +// List of objects/modules where we do something with this module +// and need to include this module +// +$tutos[modulesinc]['GAPI'][] = 'mytutos'; +$tutos[modulesinc]['GAPI'][] = 'appointment'; +$tutos[modulesinc]['GAPI'][] = 'check'; +$tutos[modulesinc]['GAPI'][] = 'admin'; +// +// modules that we use +// +#$tutos[modulesinc]['note'][] = 'GAPI'; +#$tutos[modulesinc]['file'][] = 'GAPI'; +#$tutos[modulesinc]['watchlist'][] = 'GAPI'; +?> \ No newline at end of file Property changes on: trunk/php/google_api/mconfig.pinc ___________________________________________________________________ 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 Added: trunk/php/google_api/mtable.pinc =================================================================== --- trunk/php/google_api/mtable.pinc (rev 0) +++ trunk/php/google_api/mtable.pinc 2013-03-20 19:35:07 UTC (rev 1027) @@ -0,0 +1,51 @@ +<?php +/** + * Copyright 2009 - 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. + * + * Information about the tables and indices neccessary for this module + * + * SVN Info $Id: mtable.pinc 242 2011-07-23 15:00:14Z gokohnert $ + * $Author: gokohnert $ + */ +$tutos['files'][__FILE__] = '$Rev: 927 $'; + +$table['people']['gapi_token'] = array('custom' => true, + type => 'TX_TYPE', + Desc => 'google api token', + constraints => '', + 'lang' => 'GAPI', + 'hidden' => true, + 'required' => false); + +$table['people']['google_sync'] = array('custom' => true, + type => 'TS_TYPE', + Desc => 'last sync date time', + constraints => '', + 'lang' => 'GAPI SYNC', + 'hidden' => true, + 'required' => false); + +$table['people']['google_sync_cal'] = array('custom' => true, + 'ftype' => 'Boolean', + type => "ID_TYPE", + Desc => 'do sync with google calendar', + constraints => '', + 'lang' => 'GAPISyncCal', + 'hidden' => false, + 'required' => false); + +$table['appointment1']['gapi_id'] = array('custom' => true, + type => 'VARCHAR', + size => 128, + Desc => 'google calendarevent id', + constraints => '', + 'lang' => 'GAPI_CAL_EVENT', + 'hidden' => true, + 'required' => false); + + +?> \ No newline at end of file Property changes on: trunk/php/google_api/mtable.pinc ___________________________________________________________________ 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/php/google_earth/README =================================================================== --- trunk/php/google_earth/README 2013-03-20 16:43:30 UTC (rev 1026) +++ trunk/php/google_earth/README 2013-03-20 19:35:07 UTC (rev 1027) @@ -3,6 +3,11 @@ This handler will generate links to Google Maps using a given coordinate. +Enable: +To enable this handler add + +$tutos[handler]['geodata']['google_earth'] = 'google_earth/google_earth.pinc'; + Links look like this http://maps.google.com/maps?ll=49.551387,11.022506&spn=0.004820,0.010254&t=h&hl=en @@ -11,20 +16,14 @@ directly drawing a map inside the page. For this you have to apply for a key for your website here -http://www.google.com/apis/maps/ +https://code.google.com/apis/console/ +add a project enbale maps api v3 service +and add a simple ypi access key +add that key to your config.php +$tutos['googlemapkey'][<your database id>] = '<api key>'; -Enable: -To enable this handler add - -$tutos[handler]['geodata']['google_earth'] = 'google_earth/google_earth.pinc'; -and if you have a key add - -$tutos['googlemapkey'][your database id] = 'your key'; - -to your config.php - # $Id: README,v 1.1 2005/09/16 19:30:53 gokohnert Exp $ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2013-03-20 16:43:34
|
Revision: 1026 http://sourceforge.net/p/tutos/code/1026 Author: gokohnert Date: 2013-03-20 16:43:30 +0000 (Wed, 20 Mar 2013) Log Message: ----------- fix typo Modified Paths: -------------- trunk/php/history_show.php Modified: trunk/php/history_show.php =================================================================== --- trunk/php/history_show.php 2013-03-19 06:53:37 UTC (rev 1025) +++ trunk/php/history_show.php 2013-03-20 16:43:30 UTC (rev 1026) @@ -205,7 +205,7 @@ if (substr($j['new'],0,5) == 'DIFF:') { $cl .= ' pre'; } - $r .= $this->OverviewRowBlock($j['new'],$cl'over_ml'); + $r .= $this->OverviewRowBlock($j['new'],'over_ml'); } } if ( $this->adr_id == -1 ) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2013-03-19 06:53:40
|
Revision: 1025 http://sourceforge.net/p/tutos/code/1025 Author: gokohnert Date: 2013-03-19 06:53:37 +0000 (Tue, 19 Mar 2013) Log Message: ----------- fix Modified Paths: -------------- trunk/php/custom.pinc Modified: trunk/php/custom.pinc =================================================================== --- trunk/php/custom.pinc 2013-03-18 08:25:39 UTC (rev 1024) +++ trunk/php/custom.pinc 2013-03-19 06:53:37 UTC (rev 1025) @@ -1578,6 +1578,8 @@ if (!$tx['custom']) continue; if (!isset($tx['overview'])) $tx['overview'] = false; + if (!isset($tx['handler'])) + $tx['handler'] = ''; if (isset($tx['overview']) && ($tx['overview'] == false) ) continue; if (!isset($tx['ftype'])) $tx['ftype'] = ''; @@ -1624,7 +1626,12 @@ $d = $layout->mark_filter(myentities($obj->$f->getFullName()),$f); $d = $obj->$f->getLink($d); } else { - $d = $layout->mark_filter(myentities($d),$f); + $dd = myentities($d); + if ($tx['handler'] != '') { + $d = handle($tx['handler'],$obj,$dd).' '; + } else { + $d = $layout->mark_filter($dd,$f); + } } } $r .= $layout->OverviewRowBlock(($d != '' ? $d:' '),'over_l',$rows); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2013-03-18 08:25:43
|
Revision: 1024 http://sourceforge.net/p/tutos/code/1024 Author: gokohnert Date: 2013-03-18 08:25:39 +0000 (Mon, 18 Mar 2013) Log Message: ----------- cleanup / remove stored procedures after update Modified Paths: -------------- trunk/php/acl.pinc trunk/php/db/db.pinc trunk/php/db/db_mysqli.pinc trunk/php/db/db_pg.pinc trunk/php/testmanager/testmanager.pinc trunk/php/testmanager/testsuite_new.php Modified: trunk/php/acl.pinc =================================================================== --- trunk/php/acl.pinc 2013-03-15 06:40:54 UTC (rev 1023) +++ trunk/php/acl.pinc 2013-03-18 08:25:39 UTC (rev 1024) @@ -99,7 +99,7 @@ } else { $id = $obj->id; } - if ( $id == "" ) { + if ( $id == '' ) { // Something went wrong everybody may see it $obj->acl[0][EVERYBODY] = $tutos[seeok]; return; @@ -128,7 +128,7 @@ $obj->dbconn->addPStatement($q,'ACL'); $res = $obj->dbconn->execPStatement('ACL',1,$id); } else { - $q = $q .= $id; + $q .= $id; $q .= ' ORDER by '. $obj->dbconn->colname('perm'); $res = $obj->dbconn->Exec($q); } Modified: trunk/php/db/db.pinc =================================================================== --- trunk/php/db/db.pinc 2013-03-15 06:40:54 UTC (rev 1023) +++ trunk/php/db/db.pinc 2013-03-18 08:25:39 UTC (rev 1024) @@ -24,13 +24,13 @@ * initialize db connection */ function init(&$db) { - $this->conn = -1; - $this->lastquery = ""; - $this->db = &$db; - $this->prefix = $db->prefix; - $this->txtlen = -1; - $this->prep = false; // do not allow and user prepared statements - $this->preps = array(); + $this->conn = -1; + $this->lastquery = ''; + $this->db = &$db; + $this->prefix = $db->prefix; + $this->txtlen = -1; + $this->prep = false; // do not allow and user prepared statements + $this->preps = array(); } /** Modified: trunk/php/db/db_mysqli.pinc =================================================================== --- trunk/php/db/db_mysqli.pinc 2013-03-15 06:40:54 UTC (rev 1023) +++ trunk/php/db/db_mysqli.pinc 2013-03-18 08:25:39 UTC (rev 1024) @@ -79,11 +79,11 @@ function db_mysqli(Database $db) { global $tutos; parent::init($db); - # $tutos[use_check_dbacl] = 0; - # $this->col['REPEAT'] = 'R_EPEAT'; - $this->prep = true; // allow and user prepared statements - $this->conn = mysqli_init(); + + $this->prep = true; // allow and user prepared statements + $this->conn = mysqli_init(); $this->engine = 'MyISAM'; + $this->engine = 'InnoDB'; } /** @@ -459,9 +459,9 @@ $pre = ","; } $q .= ')'; - $q .= ' ENGINE='.$this->engine; + // $q .= ' ENGINE='.$this->engine; // Does not work on older mysql (< 4.1) - $q .= " CHARACTER SET utf8"; + $q .= ' CHARACTER SET utf8'; $q .= " COMMENT='". $tbl[Desc] ."'"; return $this->exec($q,0); } @@ -497,7 +497,7 @@ */ function renamecolumn(array $tbl,$colname,$newname) { $col = $tbl[$newname]; - $q = "ALTER TABLE ". $this->prefix . $tbl[name] ." CHANGE ". $this->colname($colname) ." " . $this->colname($newname) ." ". $this->getcoltype($col) ; + $q = 'ALTER TABLE '. $this->prefix . $tbl[name] .' CHANGE '. $this->colname($colname) .' '. $this->colname($newname) .' '. $this->getcoltype($col) ; return $this->exec($q,0); } @@ -507,7 +507,7 @@ * colname = old column name */ function dropcolumn(array $tbl,$colname) { - $q = "ALTER TABLE ". $this->prefix . $tbl[name] ." DROP COLUMN ". $this->colname($colname); + $q = 'ALTER TABLE '. $this->prefix . $tbl[name] .' DROP COLUMN '. $this->colname($colname); return $this->exec($q,0); } @@ -517,7 +517,7 @@ * colname = column name */ function dropnotnull(array $tbl,$colname) { - $q = "ALTER TABLE ". $this->prefix . $tbl[name] ." CHANGE "; + $q = 'ALTER TABLE '. $this->prefix . $tbl[name] .' CHANGE '; $col = $tbl[$colname]; $t = $this->getcoltype($col); $c = $col[constraints]; @@ -533,7 +533,7 @@ * tbl = array with table description */ function dropprimary(array $tbl) { - $q = "ALTER TABLE ". $this->prefix.$tbl[name] ." DROP PRIMARY KEY"; + $q = 'ALTER TABLE '. $this->prefix.$tbl[name] .' DROP PRIMARY KEY'; return $this->exec($q,0); } @@ -567,7 +567,7 @@ * col = array with column description */ function createcolumn($tblname,$colname,&$col) { - $q = "ALTER TABLE ". $this->prefix . $tblname ." ADD ("; + $q = 'ALTER TABLE '. $this->prefix . $tblname .' ADD ('; $t = $this->getcoltype($col); $c = $col[constraints]; @@ -576,11 +576,11 @@ $c = preg_replace("/NN/","not null",$c); $q .= $this->colname($colname) ." ". $t ." ". $c; $q .= " COMMENT '". $col[Desc] ."'"; - $q .= ")"; + $q .= ')'; $x = $this->exec($q,0); // fix sizes if column already exists or some other problem appears if (!is_object($x)) { - $q = "ALTER TABLE ". $this->prefix . $tblname ." CHANGE " . $this->colname($colname).' '. $this->colname($colname)." ". $t ." ". $c . " COMMENT '". $col[Desc]."'"; + $q = 'ALTER TABLE '. $this->prefix . $tblname .' CHANGE ' . $this->colname($colname).' '. $this->colname($colname)." ". $t ." ". $c . " COMMENT '". $col[Desc]."'"; $x = $this->exec($q,0); } return $x; @@ -591,7 +591,7 @@ */ function createsequence(&$seq) { $q = "create table ". $this->prefix . $seq[name] ." (nextval int not null)"; - $q .= ' ENGINE='.$this->engine; + //$q .= ' ENGINE='.$this->engine; // Does not work on older mysql (< 4.1) $q .= ' CHARACTER SET utf8'; $q .= " COMMENT='". $seq[Desc] ."'"; @@ -669,6 +669,7 @@ $msg = $this->db->save(); return $msg; } + /** * function to run before an update */ @@ -678,14 +679,24 @@ $this->Exec($q,0); return $msg; } + /** - * function to run after an update + * method to call after update + * throw away prepared statements */ function after_update_db() { + foreach ($this->preps as $name => $qq) { + $q = 'DEALLOCATE PREPARE '.$name; + $r = $this->Exec($q,0); + $r->free(); + } + $this->preps = array(); + $msg = ''; $msg .= $this->checkservice(); return $msg; } + /** */ function gettype() { Modified: trunk/php/db/db_pg.pinc =================================================================== --- trunk/php/db/db_pg.pinc 2013-03-15 06:40:54 UTC (rev 1023) +++ trunk/php/db/db_pg.pinc 2013-03-18 08:25:39 UTC (rev 1024) @@ -178,7 +178,6 @@ } if ($c == false) { -#Fatal_Error("Failed opening the database ".$this->getFullName() ,$phperrmsg ."\n". $this->error() ); die("Failed opening the database ".$this->getFullName()."\r\n<br />".$phperrmsg ."<br />\r\n". $this->error() ); } @@ -193,7 +192,7 @@ $this->encoding = pg_client_encoding($this->conn); } - // retrieve the alread defined prepared statements from earlier sessions + // retrieve the already defined prepared statements from earlier sessions $q = 'select name from pg_prepared_statements'; $r = $this->exec ($q,0); $n = $r->numrows(); @@ -201,7 +200,7 @@ while ( $a < $n ) { $x = $r->get($a,'name'); if ($tutos['sqldebug']) { - error_log('PRE:::'.$x."\r\n",3,$tutos[errlog].'.sql'); + dterror_log('PRE:::'.$x."\r\n",3,$tutos[errlog].'.sql'); } $this->preps[$x] = true; $a++; @@ -351,11 +350,12 @@ if (isset($this->preps[$name])) return $name; if ($tutos['sqldebug']) { - error_log('PREPARE:'.$name.':'.$q."\r\n",3,$tutos[errlog].'.sql'); + dterror_log('PREPARE:'.$name.':'.$q."\r\n",3,$tutos[errlog].'.sql'); } $r = pg_prepare($this->conn,$name,$q); if ($r !== false) { $this->preps[$name] = $q; + pg_free_result($r); } else { Fatal_Error("PG_Prepare ". $this->conn ."|". $this->error(),$q); } @@ -739,16 +739,30 @@ if ( $diff < 86400 ) return; $q = 'vacuum full'; - $this->Exec($q,0); + $r = $this->Exec($q,0); + $r->free(); $q = 'analyze'; - $this->Exec($q,0); + $r = $this->Exec($q,0); + $r->free(); $this->db->setLastAnalyze($now); $msg = $this->db->save(); return $msg; } /** + * method to call after update + * throw away prepared statements */ + function after_update_db() { + $this->preps = array(); + $q = 'DEALLOCATE all'; + $r = $this->Exec($q,0); + $r->free(); + return; + } + + /** + */ function gettype() { return "Postgres"; } Modified: trunk/php/testmanager/testmanager.pinc =================================================================== --- trunk/php/testmanager/testmanager.pinc 2013-03-15 06:40:54 UTC (rev 1023) +++ trunk/php/testmanager/testmanager.pinc 2013-03-18 08:25:39 UTC (rev 1024) @@ -494,7 +494,6 @@ $r = ''; $r .= '<table class="popupinfo">'; $r .= '<tr><th colspan="'.$width.'">'. $h ." → ". $t ."</th></tr>"; - # $r .= '<tr><th colspan="2">'. $lang[$this->ref->getType()] .' '. $h ."</th></tr>"; $r .= '<tr><th>'. $lang['TestcaseSteps'] .'</th><th>'. $lang['TestcaseExpected'].'</th>'; if ($this->activ == 1) { $r .= '<th>'. $lang['TestcaseResult'] .'</th>'; @@ -806,7 +805,7 @@ $this->read_reference(); $r = ''; $r .= '<tr>'; - $r .= ' <td rowspan="2" class="inputrow tcresult_'.$this->result.'" width="30" valign="top" align="right"><a id="id'.$this->id.'">'.($cnt != null ? $prefix.$cnt:'') .'</a> '; + $r .= ' <td rowspan="2" class="inputrow tcresult_'.$this->result.'" width="30" valign="top" align="right"><a id="id'.$this->id.'">'.($cnt != null ? $prefix.$cnt:'') .'</a> '; if ($this->mod_ok() && ($this->activ != 1) && !isset($this->test) ) { $r .= '<br /><br /><br />'; $r .= 'Pos:<span class="editable" id="P'.$this->id.'t">'.$this->pos.'</span>'; @@ -876,7 +875,6 @@ $r .= ' value="'.$i2.'"'; $r .= ($this->result == $i2 ? ' checked="checked"':''); $r .= ' />'. $this->getResultColor($i2) .'</label>'."\n"; - # $pre = '<br />'; } $r .= '<br /><br />'; if ($this->activ == 1 && (!is_object($tr) || $tr->state != TR_CLOSED) ) { @@ -933,7 +931,6 @@ while (is_object($or) && $or->activ == 1) { $r .= $pre.makelink($or->getUrl(),$or->getResult()); - # $r .= $pre.$or->getLink($or->getResult()); $x = $or->get_testrun(); if (is_object($x)) { $r .= '@'.$x->getLink(); @@ -944,7 +941,7 @@ break; } $or->read_reference(); - # $r .= '('.$or->orig_id.')'; + // $r .= '('.$or->orig_id.')'; $or = $or->orig; $pre = "<br />\n"; @@ -1421,7 +1418,7 @@ return 0; } if ( $this->state == TS_RELEASED ) { - # return 0; + // return 0; } return parent::mod_ok(); } Modified: trunk/php/testmanager/testsuite_new.php =================================================================== --- trunk/php/testmanager/testsuite_new.php 2013-03-15 06:40:54 UTC (rev 1023) +++ trunk/php/testmanager/testsuite_new.php 2013-03-18 08:25:39 UTC (rev 1024) @@ -65,8 +65,8 @@ if ($this->obj->id < 0) { $r .= $this->showdata($lang['TestsuiteStates'][$this->obj->state],3); $this->addhidden("state",$this->obj->state); - # } else if ($this->obj->state != TS_RELEASED) { - } else { + // } else if ($this->obj->state != TS_RELEASED) { + } else { $r .= "<td colspan=\"3\">\n"; $r .= " <select id=\"state\" name=\"state\">\n"; foreach($lang['TestsuiteStates'] as $i => $f) { @@ -268,4 +268,4 @@ <!-- SVN Info $Id$ $Author$ ---> +--> \ 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-03-15 06:40:57
|
Revision: 1023 http://sourceforge.net/p/tutos/code/1023 Author: gokohnert Date: 2013-03-15 06:40:54 +0000 (Fri, 15 Mar 2013) Log Message: ----------- fix referencing popups Modified Paths: -------------- trunk/html/default.css Removed Paths: ------------- trunk/php/bugtracking/default.css Modified: trunk/html/default.css =================================================================== --- trunk/html/default.css 2013-03-14 18:47:36 UTC (rev 1022) +++ trunk/html/default.css 2013-03-15 06:40:54 UTC (rev 1023) @@ -432,4 +432,18 @@ padding-right: 3px; } +.bugcomments { +} + +.bugsection { + border-bottom: 1px solid #606060; +} + +.bugcomment { + font-family: "Courier New", courier, monospace; + white-space: pre; + padding-top: 0.5em; +} + + /* EOF */ Deleted: trunk/php/bugtracking/default.css =================================================================== --- trunk/php/bugtracking/default.css 2013-03-14 18:47:36 UTC (rev 1022) +++ trunk/php/bugtracking/default.css 2013-03-15 06:40:54 UTC (rev 1023) @@ -1,31 +0,0 @@ -/** - * Copyright 1999- 2013 by Gero Kohnert - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; version 2 of the License. - * - * SVN Info $Id: default.css 1016 2013-03-13 11:59:14Z gokohnert $ - * $Author: gokohnert $ - * - * Default Style Settings for all tutos styles/themes and layouts - * - * DO NOT MODIFY THIS FILE ! - * For customization please use/create a file html/custom.css - * - */ - -.bugcomments { -} - -.bugsection { - border-bottom: 1px solid #606060; -} - -.bugcomment { - font-family: "Courier New", courier, monospace; - white-space: pre; - padding-top: 0.5em; -} - -/* EOF */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2013-03-14 18:47:40
|
Revision: 1022 http://sourceforge.net/p/tutos/code/1022 Author: gokohnert Date: 2013-03-14 18:47:36 +0000 (Thu, 14 Mar 2013) Log Message: ----------- nicer bug popup Modified Paths: -------------- trunk/html/nuke.css trunk/php/bugtracking/bug.pinc trunk/php/bugtracking/bug_new.php trunk/php/bugtracking/bug_show.php trunk/php/bugtracking/default.css trunk/php/config_default.pinc trunk/php/layout/new_layout.pinc Modified: trunk/html/nuke.css =================================================================== --- trunk/html/nuke.css 2013-03-14 14:56:34 UTC (rev 1021) +++ trunk/html/nuke.css 2013-03-14 18:47:36 UTC (rev 1022) @@ -440,10 +440,14 @@ } TABLE.popupinfo { + background: #efefef; + color: black; + font-family:verdana,arial,helvetica,geneva,sans-serif; + font-weight: normal; + font-size: 9pt; border-width: 1px; border-color: silver; border-style: solid; - background: #efefef; padding: 3px; } Modified: trunk/php/bugtracking/bug.pinc =================================================================== --- trunk/php/bugtracking/bug.pinc 2013-03-14 14:56:34 UTC (rev 1021) +++ trunk/php/bugtracking/bug.pinc 2013-03-14 18:47:36 UTC (rev 1022) @@ -540,7 +540,7 @@ /** * get the history as a formatted text */ - function getBugHistory($showlinks) { + function getBugHistory($showlinks,$showhtml) { global $lang,$tutos; $url = addSessionKey('bug_overview.php'); @@ -555,7 +555,7 @@ $dosep = false; foreach($this->bughist as $i) { $desc = trim($i->description); - if ($showlinks == true) { + if ($showlinks == true && $showhtml == true) { if ($desc == $olddesc) { $r .= '... '; } else { @@ -572,7 +572,7 @@ $r .= ' <i>'. $lang['HistoryDeleted'] ."</i>\n"; } if ($this->parent->tutos['bug_use_revision'] == 1) { - $r .= '  <span align="right"><b>- '. handle('revision',$this,$i->revision) ." -</b></span>\n"; + $r .= '  <span align="right"><b>- '. handle('revision',$this,$i->revision) ." -</b></span>"; } $r .= '<br />'; if ($desc != $olddesc) { @@ -585,8 +585,38 @@ $d = preg_replace('#</SPAN>#im','</span>',$d); if ($reg != '') $d = preg_replace('#'.$reg.'#m' ,'$1<a href="'.normalize_url($url).'$2">$2</a>$3',$d); - $r .= '<div class="bugcomment">'. $d ."</div>\n"; + $r .= '<div class="bugcomment">'. $d ."</div>"; } + } else if ($showlinks == false && $showhtml == true) { + if ($desc == $olddesc) { + $r .= '... '; + } else { + if ($dosep) { + $r .= '</div>'; + } + $dosep = true; + $r .= '<div class="bugsection">'; + } + $r .= $i->creation->getDateTime(); + if (is_object($i->creator)) { + $r .= ' '. $i->creator->getFullName(); + } else if ($i->cid != -1) { + $r .= ' <i>'. $lang['HistoryDeleted'] ."</i>\n"; + } + if ($this->parent->tutos['bug_use_revision'] == 1) { + $r .= '  <span align="right"><b>- '.$i->revision ." -</b></span>"; + } + $r .= '<br />'; + if ($desc != $olddesc) { + $d = format_txt($this,$desc,false) ; + $d = preg_replace('#&#im' ,'&',$d); + $d = preg_replace('#"#im' ,'"',$d); + $d = preg_replace('#<([BIU])>#im' ,'<$1>',$d); + $d = preg_replace('#</([BIU])>#im' ,'</$1>',$d); + $d = preg_replace('#<SPAN\s([a-z,0-9=_"]*)>#im','<span $1>',$d); + $d = preg_replace('#</SPAN>#im','</span>',$d); + $r .= '<div class="bugcomment">'. $d ."</div>"; + } } else { if ($desc == $olddesc) { $r .= '... '; @@ -601,7 +631,6 @@ if ($desc != $olddesc) { $r .= $desc ."\n"; } - //$sep = '<hr noshade="noshade" size="1" />'; $sep = "--------------------\n"; } $olddesc = $desc; @@ -911,7 +940,7 @@ if (!isset($tutos['bug_long_pop']) || ($tutos['bug_long_pop'] == 0) ) { $n =str_replace("\n","<br />",myentities(wordwrap($this->short,90))); } else { - $n = str_replace("\n","<br />",$this->getBugHistory(false)); + $n = str_replace("\n","<br />",$this->getBugHistory(false,true)); } $n =str_replace("\r","",$n); $n =str_replace("\\","\\\\",$n); @@ -926,9 +955,9 @@ $info .= '<table class="popupinfo">'; $info .= '<tr><th>'. $lang[$this->getType()] .' '. $t .'</th></tr>'; $info .= '<tr><td><span style="background:'.$this->getStateColor().';">  </span> '. $s .'</td></tr>'; - $info .= '<tr><td><pre>'; + $info .= '<tr><td class="bugcomments precol">'; $info .= $n; - $info .= '</pre></td></tr>'; + $info .= '</td></tr>'; $info .= $this->custom_popup_content(); $info .= '</table>'; return $info; @@ -1136,8 +1165,8 @@ $s = preg_replace("/@SHORT@/",$this->short,$s); $s = preg_replace("/@CLASS@/",(isset($lg['BugClasses'][$this->class]) ? $lg['BugClasses'][$this->class]:$this->class),$s); $s = preg_replace("/@SOLVER@/",$this->getSolver(),$s); - $s = preg_replace("/@HISTORY@/",removehtml($this->getBugHistory(false)),$s); - $s = preg_replace("/@HTML_HISTORY@/",$this->getBugHistory(false),$s); + $s = preg_replace("/@HISTORY@/",removehtml($this->getBugHistory(false,false)),$s); + $s = preg_replace("/@HTML_HISTORY@/",$this->getBugHistory(false,true),$s); if (is_object($mail)) { $mail->body = $s; @@ -1193,7 +1222,7 @@ $mb->setContentType('text/plain'); $mb->setContentDisponame($to->lg['BugHistory'].'.txt'); $mb->setContentDispotype('attachment'); - $mb->body = removehtml($this->getBugHistory(false)); + $mb->body = removehtml($this->getBugHistory(false,false)); $mail->addBodyObj($mb); } if ($count2 > 0) { @@ -1201,7 +1230,7 @@ $mb->setContentType('text/html'); $mb->setContentDisponame($to->lg['BugHistory'].'.html'); $mb->setContentDispotype('attachment'); - $mb->body = $mail->HtmlStart(). $this->getBugHistory(false) .$mail->HtmlEnd(); + $mb->body = $mail->HtmlStart(). $this->getBugHistory(false,true) .$mail->HtmlEnd(); $mail->addBodyObj($mb); } } Modified: trunk/php/bugtracking/bug_new.php =================================================================== --- trunk/php/bugtracking/bug_new.php 2013-03-14 14:56:34 UTC (rev 1021) +++ trunk/php/bugtracking/bug_new.php 2013-03-14 18:47:36 UTC (rev 1022) @@ -245,7 +245,7 @@ $r .= $this->EditRowStart(); if ( $this->obj->id > 0 ) { $r .= $this->showfield($lang['BugHistory']); - $r .= $this->showdata($this->obj->getBugHistory(true),$this->width-1,'bugcomments precol'); + $r .= $this->showdata($this->obj->getBugHistory(true,true),$this->width-1,'bugcomments precol'); $r .= $this->EditRowEnd(); $r .= $this->EditRowStart(); Modified: trunk/php/bugtracking/bug_show.php =================================================================== --- trunk/php/bugtracking/bug_show.php 2013-03-14 14:56:34 UTC (rev 1021) +++ trunk/php/bugtracking/bug_show.php 2013-03-14 18:47:36 UTC (rev 1022) @@ -129,7 +129,7 @@ $r .= $this->ContentRowStart(); $r .= $this->showfield($lang['BugHistory']); - $x = imgReplace($this->obj->getBugHistory(true),$this->obj); // wrap only neccessary for old info/ new info is already wrapped + $x = imgReplace($this->obj->getBugHistory(true,true),$this->obj); // wrap only neccessary for old info/ new info is already wrapped $r .= $this->showdata($x,$this->width -1,'bugcomments precol'); $r .= $this->ContentRowEnd(); Modified: trunk/php/bugtracking/default.css =================================================================== --- trunk/php/bugtracking/default.css 2013-03-14 14:56:34 UTC (rev 1021) +++ trunk/php/bugtracking/default.css 2013-03-14 18:47:36 UTC (rev 1022) @@ -19,13 +19,13 @@ } .bugsection { - border-bottom: 1px solid #606060; + border-bottom: 1px solid #606060; } .bugcomment { - font-family: monospace; + font-family: "Courier New", courier, monospace; white-space: pre; - padding-top: 0.5em; + padding-top: 0.5em; } /* EOF */ Modified: trunk/php/config_default.pinc =================================================================== --- trunk/php/config_default.pinc 2013-03-14 14:56:34 UTC (rev 1021) +++ trunk/php/config_default.pinc 2013-03-14 18:47:36 UTC (rev 1022) @@ -772,7 +772,7 @@ // // The TUTOS Version number // -$tutos[version] = '1.9.20130310'; +$tutos[version] = '1.9.20130313'; // ### Local Variables: *** ### mode:iso-accents *** Modified: trunk/php/layout/new_layout.pinc =================================================================== --- trunk/php/layout/new_layout.pinc 2013-03-14 14:56:34 UTC (rev 1021) +++ trunk/php/layout/new_layout.pinc 2013-03-14 18:47:36 UTC (rev 1022) @@ -386,7 +386,7 @@ $r .= ' dir="ltr"'; $r .= '>'."\n"; - $r .= "<!-- Copyright 1999 - 2011 by Gero Kohnert gok...@us... et al -->\n"; + $r .= "<!-- Copyright 1999 - 2013 by Gero Kohnert gok...@us... et al -->\n"; $r .= "<!-- all rights reserved -->\n"; $r .= " <head>\n"; // $r .= ' <base href="'.getBaseUrl().'"'.$c; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2013-03-14 14:56:37
|
Revision: 1021 http://sourceforge.net/p/tutos/code/1021 Author: gokohnert Date: 2013-03-14 14:56:34 +0000 (Thu, 14 Mar 2013) Log Message: ----------- use css seps in bugs Modified Paths: -------------- trunk/php/bugtracking/bug_new.php Modified: trunk/php/bugtracking/bug_new.php =================================================================== --- trunk/php/bugtracking/bug_new.php 2013-03-14 14:03:51 UTC (rev 1020) +++ trunk/php/bugtracking/bug_new.php 2013-03-14 14:56:34 UTC (rev 1021) @@ -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 @@ -245,7 +245,7 @@ $r .= $this->EditRowStart(); if ( $this->obj->id > 0 ) { $r .= $this->showfield($lang['BugHistory']); - $r .= $this->showdata('<div class="pre">'.$this->obj->getBugHistory(true).'</div>',$this->width-1); + $r .= $this->showdata($this->obj->getBugHistory(true),$this->width-1,'bugcomments precol'); $r .= $this->EditRowEnd(); $r .= $this->EditRowStart(); @@ -401,4 +401,4 @@ <!-- SVN Info $Id$ $Author$ ---> +--> \ 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-03-14 14:03:54
|
Revision: 1020 http://sourceforge.net/p/tutos/code/1020 Author: gokohnert Date: 2013-03-14 14:03:51 +0000 (Thu, 14 Mar 2013) Log Message: ----------- print layout fix Modified Paths: -------------- trunk/html/classic_layout.css trunk/html/mobile_layout.css trunk/html/new2_layout.css trunk/html/new_layout.css Modified: trunk/html/classic_layout.css =================================================================== --- trunk/html/classic_layout.css 2013-03-14 13:48:19 UTC (rev 1019) +++ trunk/html/classic_layout.css 2013-03-14 14:03:51 UTC (rev 1020) @@ -5,6 +5,20 @@ * $Author$ * */ +@media print { + .headline,.navigate,.historyline,.updaterow ,.upd_field,.handler,.subsessionnav { + display:none; + } + .dtable TD{ + border:1px solid lightgray; + } + .dtable TH{ + border:2px solid grey; + } + .dtable TH.icons { + display:none; + } +} .debug { font-size: 5pt; Modified: trunk/html/mobile_layout.css =================================================================== --- trunk/html/mobile_layout.css 2013-03-14 13:48:19 UTC (rev 1019) +++ trunk/html/mobile_layout.css 2013-03-14 14:03:51 UTC (rev 1020) @@ -11,6 +11,20 @@ * $Author: gokohnert $ * */ +@media print { + .headline,.navigate,.historyline,.updaterow ,.upd_field,.handler,.subsessionnav { + display:none; + } + .dtable TD{ + border:1px solid lightgray; + } + .dtable TH{ + border:2px solid grey; + } + .dtable TH.icons { + display:none; + } +} #tutosversion, #logo, #motd, .updaterow , .upd_field , .summary { display: none !important; Modified: trunk/html/new2_layout.css =================================================================== --- trunk/html/new2_layout.css 2013-03-14 13:48:19 UTC (rev 1019) +++ trunk/html/new2_layout.css 2013-03-14 14:03:51 UTC (rev 1020) @@ -1,5 +1,5 @@ /** - * Copyright 2003 - 2011 by Gero Kohnert + * Copyright 2003 - 2013 by Gero Kohnert * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -22,6 +22,9 @@ .dtable TH{ border:2px solid grey; } + .dtable TH.icons { + display:none; + } } .debug { Modified: trunk/html/new_layout.css =================================================================== --- trunk/html/new_layout.css 2013-03-14 13:48:19 UTC (rev 1019) +++ trunk/html/new_layout.css 2013-03-14 14:03:51 UTC (rev 1020) @@ -1,5 +1,5 @@ /** - * Copyright 2003 - 2011 by Gero Kohnert + * Copyright 2003 - 2013 by Gero Kohnert * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -21,6 +21,9 @@ .dtable TH{ border:2px solid grey; } + .dtable TH.icons { + display:none; + } } .debug { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2013-03-14 13:48:24
|
Revision: 1019 http://sourceforge.net/p/tutos/code/1019 Author: gokohnert Date: 2013-03-14 13:48:19 +0000 (Thu, 14 Mar 2013) Log Message: ----------- use css seps in bugs Modified Paths: -------------- trunk/php/bugtracking/bug.pinc trunk/php/bugtracking/default.css Modified: trunk/php/bugtracking/bug.pinc =================================================================== --- trunk/php/bugtracking/bug.pinc 2013-03-14 13:37:54 UTC (rev 1018) +++ trunk/php/bugtracking/bug.pinc 2013-03-14 13:48:19 UTC (rev 1019) @@ -557,7 +557,7 @@ $desc = trim($i->description); if ($showlinks == true) { if ($desc == $olddesc) { - $r .= '<br />... '; + $r .= '... '; } else { if ($dosep) { $r .= '</div>'; @@ -574,8 +574,8 @@ if ($this->parent->tutos['bug_use_revision'] == 1) { $r .= '  <span align="right"><b>- '. handle('revision',$this,$i->revision) ." -</b></span>\n"; } + $r .= '<br />'; if ($desc != $olddesc) { - $r .= '<br />'; $d = format_txt($this,$desc,false) ; $d = preg_replace('#&#im' ,'&',$d); $d = preg_replace('#"#im' ,'"',$d); @@ -585,7 +585,7 @@ $d = preg_replace('#</SPAN>#im','</span>',$d); if ($reg != '') $d = preg_replace('#'.$reg.'#m' ,'$1<a href="'.normalize_url($url).'$2">$2</a>$3',$d); - $r .= '<span class="bugcomment">'. $d ."</span>\n"; + $r .= '<div class="bugcomment">'. $d ."</div>\n"; } } else { if ($desc == $olddesc) { Modified: trunk/php/bugtracking/default.css =================================================================== --- trunk/php/bugtracking/default.css 2013-03-14 13:37:54 UTC (rev 1018) +++ trunk/php/bugtracking/default.css 2013-03-14 13:48:19 UTC (rev 1019) @@ -19,13 +19,13 @@ } .bugsection { - border-bottom: 1px solid lightgray; + border-bottom: 1px solid #606060; } .bugcomment { font-family: monospace; white-space: pre; - padding-top: 10px; + padding-top: 0.5em; } /* EOF */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2013-03-14 13:37:58
|
Revision: 1018 http://sourceforge.net/p/tutos/code/1018 Author: gokohnert Date: 2013-03-14 13:37:54 +0000 (Thu, 14 Mar 2013) Log Message: ----------- use css seps in bugs Modified Paths: -------------- trunk/html/blue.css trunk/html/kmz_blue.css trunk/html/kmz_pink.css trunk/html/kmz_purple.css trunk/html/kmz_yellow.css trunk/html/nuke.css trunk/html/red.css trunk/html/sqli.css trunk/html/tutos.css trunk/html/visual.css trunk/html/white.css trunk/php/bugtracking/bug.pinc trunk/php/bugtracking/bug_show.php Added Paths: ----------- trunk/php/bugtracking/default.css Modified: trunk/html/blue.css =================================================================== --- trunk/html/blue.css 2013-03-14 09:41:37 UTC (rev 1017) +++ trunk/html/blue.css 2013-03-14 13:37:54 UTC (rev 1018) @@ -77,7 +77,7 @@ /* preformatted text */ -.pre { +pre, .pre , .precol { background: #A0BcD8; color: black; } Modified: trunk/html/kmz_blue.css =================================================================== --- trunk/html/kmz_blue.css 2013-03-14 09:41:37 UTC (rev 1017) +++ trunk/html/kmz_blue.css 2013-03-14 13:37:54 UTC (rev 1018) @@ -51,7 +51,7 @@ } /* preformatted text */ -.pre { +pre, .pre , .precol { background: white; color: black; } Modified: trunk/html/kmz_pink.css =================================================================== --- trunk/html/kmz_pink.css 2013-03-14 09:41:37 UTC (rev 1017) +++ trunk/html/kmz_pink.css 2013-03-14 13:37:54 UTC (rev 1018) @@ -51,7 +51,7 @@ } /* preformatted text */ -.pre { +pre, .pre , .precol { background: white; color: black; } Modified: trunk/html/kmz_purple.css =================================================================== --- trunk/html/kmz_purple.css 2013-03-14 09:41:37 UTC (rev 1017) +++ trunk/html/kmz_purple.css 2013-03-14 13:37:54 UTC (rev 1018) @@ -51,7 +51,7 @@ } /* preformatted text */ -.pre { +pre, .pre , .precol { background: white; color: black; } Modified: trunk/html/kmz_yellow.css =================================================================== --- trunk/html/kmz_yellow.css 2013-03-14 09:41:37 UTC (rev 1017) +++ trunk/html/kmz_yellow.css 2013-03-14 13:37:54 UTC (rev 1018) @@ -51,7 +51,7 @@ } /* preformatted text */ -.pre { +pre, .pre , .precol { background: white; color: black; } Modified: trunk/html/nuke.css =================================================================== --- trunk/html/nuke.css 2013-03-14 09:41:37 UTC (rev 1017) +++ trunk/html/nuke.css 2013-03-14 13:37:54 UTC (rev 1018) @@ -91,11 +91,13 @@ } /* preformatted text */ -pre, .pre { +pre, .pre , .precol { background: #F5F5F5; color: black; } +} + /* text found by search */ .found { color: #00F000; Modified: trunk/html/red.css =================================================================== --- trunk/html/red.css 2013-03-14 09:41:37 UTC (rev 1017) +++ trunk/html/red.css 2013-03-14 13:37:54 UTC (rev 1018) @@ -68,7 +68,7 @@ } /* preformatted text */ -.pre { +pre, .pre , .precol { background: #D8BcA0; color: black; } Modified: trunk/html/sqli.css =================================================================== --- trunk/html/sqli.css 2013-03-14 09:41:37 UTC (rev 1017) +++ trunk/html/sqli.css 2013-03-14 13:37:54 UTC (rev 1018) @@ -54,7 +54,7 @@ } /* preformatted text */ -.pre { +pre, .pre , .precol { background: white; color: black; } Modified: trunk/html/tutos.css =================================================================== --- trunk/html/tutos.css 2013-03-14 09:41:37 UTC (rev 1017) +++ trunk/html/tutos.css 2013-03-14 13:37:54 UTC (rev 1018) @@ -40,7 +40,7 @@ } /* preformatted text */ -.pre { +pre, .pre , .precol { background: white; color: black; } Modified: trunk/html/visual.css =================================================================== --- trunk/html/visual.css 2013-03-14 09:41:37 UTC (rev 1017) +++ trunk/html/visual.css 2013-03-14 13:37:54 UTC (rev 1018) @@ -68,7 +68,7 @@ } /* preformatted text */ -.pre { +pre, .pre , .precol { background: white; color: black; } Modified: trunk/html/white.css =================================================================== --- trunk/html/white.css 2013-03-14 09:41:37 UTC (rev 1017) +++ trunk/html/white.css 2013-03-14 13:37:54 UTC (rev 1018) @@ -73,7 +73,7 @@ } /* preformatted text */ -.pre { +pre, .pre , .precol { background: #F0F0F0; color: black; } Modified: trunk/php/bugtracking/bug.pinc =================================================================== --- trunk/php/bugtracking/bug.pinc 2013-03-14 09:41:37 UTC (rev 1017) +++ trunk/php/bugtracking/bug.pinc 2013-03-14 13:37:54 UTC (rev 1018) @@ -549,16 +549,21 @@ $reg = Bug::get_bug_regex(); $olddesc = ''; - $r = ''; + $r = ''; $this->read_bugHistory(); - $sep = ''; + $sep = ''; + $dosep = false; foreach($this->bughist as $i) { $desc = trim($i->description); if ($showlinks == true) { if ($desc == $olddesc) { - $r .= '... '; + $r .= '<br />... '; } else { - $r .= $sep; + if ($dosep) { + $r .= '</div>'; + } + $dosep = true; + $r .= '<div class="bugsection">'; } $r .= $i->creation->getDateTime(); if (is_object($i->creator)) { @@ -566,11 +571,11 @@ } else if ($i->cid != -1) { $r .= ' <i>'. $lang['HistoryDeleted'] ."</i>\n"; } - if ($this->parent->tutos['bug_use_revision'] == 1) + if ($this->parent->tutos['bug_use_revision'] == 1) { $r .= '  <span align="right"><b>- '. handle('revision',$this,$i->revision) ." -</b></span>\n"; - - $r .= "<br />\n"; + } if ($desc != $olddesc) { + $r .= '<br />'; $d = format_txt($this,$desc,false) ; $d = preg_replace('#&#im' ,'&',$d); $d = preg_replace('#"#im' ,'"',$d); @@ -580,9 +585,8 @@ $d = preg_replace('#</SPAN>#im','</span>',$d); if ($reg != '') $d = preg_replace('#'.$reg.'#m' ,'$1<a href="'.normalize_url($url).'$2">$2</a>$3',$d); - $r .= '<pre class="pre">'. $d ."</pre>\n"; + $r .= '<span class="bugcomment">'. $d ."</span>\n"; } - $sep = '<hr noshade="noshade" size="1" />'; } else { if ($desc == $olddesc) { $r .= '... '; @@ -602,6 +606,9 @@ } $olddesc = $desc; } + if ($dosep) { + $r .= '</div>'; + } return $r; } Modified: trunk/php/bugtracking/bug_show.php =================================================================== --- trunk/php/bugtracking/bug_show.php 2013-03-14 09:41:37 UTC (rev 1017) +++ trunk/php/bugtracking/bug_show.php 2013-03-14 13:37:54 UTC (rev 1018) @@ -114,30 +114,29 @@ else $xx = $lang[$this->obj->followup->getType()].' '; $xx .= $this->obj->followup->getLink(); - $r .= $this->showdata($xx,3); + $r .= $this->showdata($xx,$this->width -1); $r .= $this->ContentRowEnd(); } - $r .= bug::infolist($this->user,$this->obj,4); + $r .= bug::infolist($this->user,$this->obj,$this->width); $r .= $this->ContentRowStart(); $r .= $this->showfield($lang['BugMedium']); - $r .= $this->showdata($this->obj->getMedium(),3); + $r .= $this->showdata($this->obj->getMedium(),$this->width-1); $r .= $this->ContentRowEnd(); $r .= $this->showfield_data_row($this->obj,$table['bugtracking']['short'],3,1); $r .= $this->ContentRowStart(); $r .= $this->showfield($lang['BugHistory']); - $r .= " <td class=\"pre\" colspan=\"3\">"; - $r .= imgReplace($this->obj->getBugHistory(true),$this->obj); // wrap only neccessary for old info/ new info is already wrapped - $r .= "</td>\n"; + $x = imgReplace($this->obj->getBugHistory(true),$this->obj); // wrap only neccessary for old info/ new info is already wrapped + $r .= $this->showdata($x,$this->width -1,'bugcomments precol'); $r .= $this->ContentRowEnd(); // Show additional custom fields - $r .= show_custom_fields($this,$this->obj->getType(),$this->obj,4); + $r .= show_custom_fields($this,$this->obj->getType(),$this->obj,$this->width); - $r .= show_module_infolists($this->user,$this->obj,4,$this->format); + $r .= show_module_infolists($this->user,$this->obj,$this->width,$this->format); $r .= $this->DataTableEnd(); return $r; Added: trunk/php/bugtracking/default.css =================================================================== --- trunk/php/bugtracking/default.css (rev 0) +++ trunk/php/bugtracking/default.css 2013-03-14 13:37:54 UTC (rev 1018) @@ -0,0 +1,31 @@ +/** + * Copyright 1999- 2013 by Gero Kohnert + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; version 2 of the License. + * + * SVN Info $Id: default.css 1016 2013-03-13 11:59:14Z gokohnert $ + * $Author: gokohnert $ + * + * Default Style Settings for all tutos styles/themes and layouts + * + * DO NOT MODIFY THIS FILE ! + * For customization please use/create a file html/custom.css + * + */ + +.bugcomments { +} + +.bugsection { + border-bottom: 1px solid lightgray; +} + +.bugcomment { + font-family: monospace; + white-space: pre; + padding-top: 10px; +} + +/* EOF */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2013-03-14 09:41:39
|
Revision: 1017 http://sourceforge.net/p/tutos/code/1017 Author: gokohnert Date: 2013-03-14 09:41:37 +0000 (Thu, 14 Mar 2013) Log Message: ----------- fix IE download problems pragma: no-cache Modified Paths: -------------- trunk/php/layout/classic_base.pinc trunk/php/layout/new_base.pinc trunk/php/webelements.p3 Modified: trunk/php/layout/classic_base.pinc =================================================================== --- trunk/php/layout/classic_base.pinc 2013-03-13 11:59:14 UTC (rev 1016) +++ trunk/php/layout/classic_base.pinc 2013-03-14 09:41:37 UTC (rev 1017) @@ -65,7 +65,7 @@ } else { $r .= "<html dir=\"ltr\">\n"; } - $r .= "<!-- Copyright 1999 - 2010 by Gero Kohnert gok...@us... -->\n"; + $r .= "<!-- Copyright 1999 - 2013 by Gero Kohnert gok...@us... -->\n"; $r .= "<!-- all rights reserved -->\n"; $r .= "<head>\n"; // $r .= ' <base href="'.getBaseUrl().'"'.$c; Modified: trunk/php/layout/new_base.pinc =================================================================== --- trunk/php/layout/new_base.pinc 2013-03-13 11:59:14 UTC (rev 1016) +++ trunk/php/layout/new_base.pinc 2013-03-14 09:41:37 UTC (rev 1017) @@ -154,7 +154,7 @@ * end a overview headline */ function OverviewHeadLineEnd() { - return '</tr>'; + return '</tr>'."\n"; } /** Modified: trunk/php/webelements.p3 =================================================================== --- trunk/php/webelements.p3 2013-03-13 11:59:14 UTC (rev 1016) +++ trunk/php/webelements.p3 2013-03-14 09:41:37 UTC (rev 1017) @@ -2968,11 +2968,18 @@ Fatal_Error('Some data has already been output to browser, can\'t send data'); } Header('Expires: -1'); + // Header("Pragma: no-cache"); // won't work with IE7 + // Header("Pragma: public"); + if (strstr($_SERVER["HTTP_USER_AGENT"],"MSIE 5") + || strstr($_SERVER["HTTP_USER_AGENT"],"MSIE 6") + || strstr($_SERVER["HTTP_USER_AGENT"],"MSIE 7") + || strstr($_SERVER["HTTP_USER_AGENT"],"MSIE 8") ) { + Header('Pragma:'); + } else { + Header('Pragma: no-cache'); + } Header('Cache-Control: no-store, no-cache, must-revalidate'); Header('Cache-Control: max_age=0 ,post-check=0, pre-check=0',false); - // Header("Pragma: no-cache"); // won't work with IE7 - // Header("Pragma: public"); - Header('Pragma: no-cache'); Header('Last-Modified: ' . gmdate('D, d M Y H:i:s') .' GMT'); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2013-03-13 11:59:17
|
Revision: 1016 http://sourceforge.net/p/tutos/code/1016 Author: gokohnert Date: 2013-03-13 11:59:14 +0000 (Wed, 13 Mar 2013) Log Message: ----------- fix wron arg call Modified Paths: -------------- trunk/html/default.css trunk/php/admin/main_config.php trunk/php/bugtracking/bug_config.php trunk/php/doctracker/doc_config.php trunk/php/file/file_config.php trunk/php/invoice/invoice_config.php trunk/php/layout/new_base.pinc trunk/php/module_template/AAA_config.php trunk/php/scrum/scrum_config.php trunk/php/stuff/stuff_config.php trunk/php/subversion/svn_config.php trunk/php/testmanager/testmanager_config.php trunk/php/timetrack/timetrack_config.php Modified: trunk/html/default.css =================================================================== --- trunk/html/default.css 2013-03-13 10:19:07 UTC (rev 1015) +++ trunk/html/default.css 2013-03-13 11:59:14 UTC (rev 1016) @@ -342,7 +342,7 @@ vertical-align: top; } -.overviewbox { +.overviewbox, .configbox { padding-left: 5px; padding-top: 5px; padding-right: 5px; Modified: trunk/php/admin/main_config.php =================================================================== --- trunk/php/admin/main_config.php 2013-03-13 10:19:07 UTC (rev 1015) +++ trunk/php/admin/main_config.php 2013-03-13 11:59:14 UTC (rev 1016) @@ -53,9 +53,9 @@ $r .= '<div id="tutos" class="ui-tabs-hide">'; $line = 0; $r .= $this->DataTableStart(); - $r .= $this->OverviewRowStart($line); + $r .= $this->OverviewHeadLineStart($line); $r .= '<th colspan="4">Main</th>'; - $r .= $this->OverviewRowEnd($line++); + $r .= $this->OverviewHeadLineEnd($line++); // time to live $r .= $this->OverviewRowStart($line); $r .= $this->showfield('timetolive'); @@ -77,9 +77,9 @@ $line = 0; $r .= $this->DataTableStart(); // Network - $r .= $this->OverviewRowStart($line); + $r .= $this->OverviewHeadLineStart($line); $r .= '<th colspan="4">Network</th>'; - $r .= $this->OverviewRowEnd($line++); + $r .= $this->OverviewHeadLineEnd($line++); // ProxyHost $r .= $this->OverviewRowStart($line); @@ -112,9 +112,9 @@ $line = 0; $r .= $this->DataTableStart(); // Fiscal - $r .= $this->OverviewRowStart($line); + $r .= $this->OverviewHeadLineStart($line); $r .= '<th colspan="4">Fiscal</th>'; - $r .= $this->OverviewRowEnd($line++); + $r .= $this->OverviewHeadLineEnd($line++); // fiscal year start month $r .= $this->OverviewRowStart($line); @@ -142,9 +142,9 @@ $line = 0; $r .= $this->DataTableStart(); // LAYOUT - $r .= $this->OverviewRowStart($line); + $r .= $this->OverviewHeadLineStart($line); $r .= '<th colspan="4">'.$lang['UserLayout'].'</th>'; - $r .= $this->OverviewRowEnd($line++); + $r .= $this->OverviewHeadLineEnd($line++); // LOGO $r .= $this->OverviewRowStart($line); @@ -180,9 +180,9 @@ $line = 0; $r .= $this->DataTableStart(); // MAIL - $r .= $this->OverviewRowStart($line); + $r .= $this->OverviewHeadLineStart($line); $r .= '<th colspan="4">'.$lang['MailboxEmail'].'</th>'; - $r .= $this->OverviewRowEnd($line++); + $r .= $this->OverviewHeadLineEnd($line++); // Preffered mail format $r .= config_field_input($this,'pref_mail',null,$line++); @@ -253,9 +253,9 @@ $line = 0; $r .= $this->DataTableStart(); // PRODUCT / PROJECT - $r .= $this->OverviewRowStart($line); + $r .= $this->OverviewHeadLineStart($line); $r .= '<th colspan="4">'.$lang['ProductP'].'</th>'; - $r .= $this->OverviewRowEnd($line++); + $r .= $this->OverviewHeadLineEnd($line++); // PRODUCT STATE $r .= $this->OverviewRowStart($line); @@ -321,9 +321,9 @@ $line = 0; $r .= $this->DataTableStart(); // TASK - $r .= $this->OverviewRowStart($line); + $r .= $this->OverviewHeadLineStart($line); $r .= '<th colspan="4">'.$lang['Task'].'</th>'; - $r .= $this->OverviewRowEnd($line++); + $r .= $this->OverviewHeadLineEnd($line++); // Task State $r .= $this->OverviewRowStart($line); $r .= $this->showfield('task_state_stc'); @@ -423,9 +423,9 @@ $line = 0; $r .= $this->DataTableStart(); // PASSWORD - $r .= $this->OverviewRowStart($line); + $r .= $this->OverviewHeadLineStart($line); $r .= '<th colspan="4">'.$lang['Password'].'</th>'; - $r .= $this->OverviewRowEnd($line++); + $r .= $this->OverviewHeadLineEnd($line++); // maximum password age (days) $r .= $this->OverviewRowStart($line); Modified: trunk/php/bugtracking/bug_config.php =================================================================== --- trunk/php/bugtracking/bug_config.php 2013-03-13 10:19:07 UTC (rev 1015) +++ trunk/php/bugtracking/bug_config.php 2013-03-13 11:59:14 UTC (rev 1016) @@ -36,9 +36,9 @@ $r .= "<form id=\"bugconfig\" name=\"bugconfig\" action=\"bug_config.php\" method=\"post\">\n"; $r .= $this->DataTableStart(); $line = 0; - $r .= $this->OverviewRowStart(); + $r .= $this->OverviewHeadLineStart(); $r .= '<th colspan="4">'.$this->name.'</th>'; - $r .= $this->OverviewRowEnd(); + $r .= $this->OverviewHeadLineEnd(); // long detailed popups $r .= $this->OverviewRowStart($line); Modified: trunk/php/doctracker/doc_config.php =================================================================== --- trunk/php/doctracker/doc_config.php 2013-03-13 10:19:07 UTC (rev 1015) +++ trunk/php/doctracker/doc_config.php 2013-03-13 11:59:14 UTC (rev 1016) @@ -33,9 +33,9 @@ $r .= "<form id=\"docconfig\" name=\"docconfig\" action=\"doc_config.php\" method=\"post\">\n"; $r .= $this->DataTableStart(); $line = 0; - $r .= $this->OverviewRowStart(); + $r .= $this->OverviewHeadLineStart(); $r .= '<th colspan="4">'.$this->name.'</th>'; - $r .= $this->OverviewRowEnd(); + $r .= $this->OverviewHeadLineEnd(); $r .= $this->OverviewRowStart($line); $r .= $this->showfield('doctrack_numberformat'); Modified: trunk/php/file/file_config.php =================================================================== --- trunk/php/file/file_config.php 2013-03-13 10:19:07 UTC (rev 1015) +++ trunk/php/file/file_config.php 2013-03-13 11:59:14 UTC (rev 1016) @@ -34,9 +34,9 @@ $r .= $this->DataTableStart(); $line = 0; - $r .= $this->OverviewRowStart(); + $r .= $this->OverviewHeadLineStart(); $r .= '<th colspan="4">'.$this->name.'</th>'; - $r .= $this->OverviewRowEnd(); + $r .= $this->OverviewHeadLineEnd(); $r .= $this->OverviewRowStart($line); $r .= $this->showfield('file_fileperm'); Modified: trunk/php/invoice/invoice_config.php =================================================================== --- trunk/php/invoice/invoice_config.php 2013-03-13 10:19:07 UTC (rev 1015) +++ trunk/php/invoice/invoice_config.php 2013-03-13 11:59:14 UTC (rev 1016) @@ -36,9 +36,9 @@ $r .= $this->DataTableStart(); $line = 0; - $r .= $this->OverviewRowStart(); + $r .= $this->OverviewHeadLineStart(); $r .= '<th colspan="4">'.$this->name.'</th>'; - $r .= $this->OverviewRowEnd(); + $r .= $this->OverviewHeadLineEnd(); $r .= $this->OverviewRowStart($line); $r .= $this->showfield('inv_autoname'); Modified: trunk/php/layout/new_base.pinc =================================================================== --- trunk/php/layout/new_base.pinc 2013-03-13 10:19:07 UTC (rev 1015) +++ trunk/php/layout/new_base.pinc 2013-03-13 11:59:14 UTC (rev 1016) @@ -161,7 +161,7 @@ * start a overview row */ function OverviewRowStart($line,$title = '',$class = '') { - return '<tr title="'. myentities($title) .'" class="line'. ($line % 2 +1) .' '.$class."\">\n"; + return '<tr'.($title != '' ? ' title="'. myentities($title) .'"':'').' class="line'. ($line % 2 +1) .' '.$class."\">\n"; } /** Modified: trunk/php/module_template/AAA_config.php =================================================================== --- trunk/php/module_template/AAA_config.php 2013-03-13 10:19:07 UTC (rev 1015) +++ trunk/php/module_template/AAA_config.php 2013-03-13 11:59:14 UTC (rev 1016) @@ -1,6 +1,6 @@ <?php /** - * Copyright 2009 by Gero Kohnert + * Copyright 2009 - 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 @@ -41,9 +41,9 @@ $r .= $this->DataTableStart(); $line = 0; - $r .= $this->OverviewRowStart(); + $r .= $this->OverviewHeadLineStart(); $r .= '<th colspan="4">'.$this->name.'</th>'; - $r .= $this->OverviewRowEnd(); + $r .= $this->OverviewHeadLineEnd(); // first Config Variable $r .= $this->OverviewRowStart($line); @@ -86,4 +86,8 @@ $l = new AAA_config($current_user); $l->display(); $dbconn->close(); -?> \ No newline at end of file +?> +<!-- +SVN Info $Id$ +$Author$ +--> \ No newline at end of file Modified: trunk/php/scrum/scrum_config.php =================================================================== --- trunk/php/scrum/scrum_config.php 2013-03-13 10:19:07 UTC (rev 1015) +++ trunk/php/scrum/scrum_config.php 2013-03-13 11:59:14 UTC (rev 1016) @@ -9,9 +9,9 @@ * SVN Info $Id$ * $Author$ * - * @modulegroup AAA - * @module AAA_config - * @package AAA + * @modulegroup scrum + * @module scrum_config + * @package scrum */ $tutos['files'][__FILE__] = '$Rev$'; @@ -42,9 +42,9 @@ $r .= "<form id=\"scrumconfig\" name=\"scrumconfig\" action=\"scrum_config.php\" method=\"post\">\n"; $r .= $this->DataTableStart(); $line = 0; - $r .= $this->OverviewRowStart(); + $r .= $this->OverviewHeadLineStart(); $r .= '<th colspan="4">'.$this->name.'</th>'; - $r .= $this->OverviewRowEnd(); + $r .= $this->OverviewHeadLIneEnd(); // first Config Variable $r .= $this->OverviewRowStart($line); Modified: trunk/php/stuff/stuff_config.php =================================================================== --- trunk/php/stuff/stuff_config.php 2013-03-13 10:19:07 UTC (rev 1015) +++ trunk/php/stuff/stuff_config.php 2013-03-13 11:59:14 UTC (rev 1016) @@ -9,6 +9,8 @@ * SVN Info $Id$ * $Author$ */ +$tutos['files'][__FILE__] = '$Rev$'; + $tutos['base'] = "../.."; ini_set("include_path",".."); @@ -30,15 +32,14 @@ function info() { global $lang,$table,$tutos; - $r = ''; $r .= "<form id=\"stuffconfig\" name=\"stuffconfig\" action=\"stuff_config.php\" method=\"post\">\n"; $r .= $this->DataTableStart(); $line = 0; - $r .= $this->OverviewRowStart(); + $r .= $this->OverviewHeadLineStart(); $r .= '<th colspan="4">'.$this->name.'</th>'; - $r .= $this->OverviewRowEnd(); + $r .= $this->OverviewHeadLineEnd(); $r .= $this->OverviewRowStart($line); $r .= $this->showfield('stuff_autoname'); Modified: trunk/php/subversion/svn_config.php =================================================================== --- trunk/php/subversion/svn_config.php 2013-03-13 10:19:07 UTC (rev 1015) +++ trunk/php/subversion/svn_config.php 2013-03-13 11:59:14 UTC (rev 1016) @@ -33,9 +33,9 @@ $r .= "<form id=\"svnconfig\" name=\"svnconfig\" action=\"svn_config.php\" method=\"post\">\n"; $r .= $this->DataTableStart(); $line = 0; - $r .= $this->OverviewRowStart(); + $r .= $this->OverviewHeadLineStart(); $r .= '<th colspan="4">'.$this->name.'</th>'; - $r .= $this->OverviewRowEnd(); + $r .= $this->OverviewHeadLineEnd(); $r .= $this->OverviewRowStart($line); $r .= $this->showfield('svn_url2path'); Modified: trunk/php/testmanager/testmanager_config.php =================================================================== --- trunk/php/testmanager/testmanager_config.php 2013-03-13 10:19:07 UTC (rev 1015) +++ trunk/php/testmanager/testmanager_config.php 2013-03-13 11:59:14 UTC (rev 1016) @@ -37,9 +37,9 @@ $r .= $this->DataTableStart(); $line = 0; - $r .= $this->OverviewRowStart(); + $r .= $this->OverviewHeadLineStart(); $r .= '<th colspan="4">'.$this->name.'</th>'; - $r .= $this->OverviewRowEnd(); + $r .= $this->OverviewHeadLineEnd(); // long detailed popups $r .= $this->OverviewRowStart($line); Modified: trunk/php/timetrack/timetrack_config.php =================================================================== --- trunk/php/timetrack/timetrack_config.php 2013-03-13 10:19:07 UTC (rev 1015) +++ trunk/php/timetrack/timetrack_config.php 2013-03-13 11:59:14 UTC (rev 1016) @@ -40,9 +40,9 @@ $r .= "<form id=\"timetrackconfig\" name=\"timetrackconfig\" action=\"timetrack_config.php\" method=\"post\">\n"; $r .= $this->DataTableStart(); $line = 0; - $r .= $this->OverviewRowStart(); + $r .= $this->OverviewHeadLineStart(); $r .= '<th colspan="4">'.$this->name.'</th>'; - $r .= $this->OverviewRowEnd(); + $r .= $this->OverviewHeadLineEnd(); // TIMETRACK STATE $r .= $this->OverviewRowStart($line); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2013-03-13 10:19:12
|
Revision: 1015 http://sourceforge.net/p/tutos/code/1015 Author: gokohnert Date: 2013-03-13 10:19:07 +0000 (Wed, 13 Mar 2013) Log Message: ----------- fix Modified Paths: -------------- trunk/php/admin/main_config.php Modified: trunk/php/admin/main_config.php =================================================================== --- trunk/php/admin/main_config.php 2013-03-13 09:32:02 UTC (rev 1014) +++ trunk/php/admin/main_config.php 2013-03-13 10:19:07 UTC (rev 1015) @@ -430,7 +430,7 @@ // maximum password age (days) $r .= $this->OverviewRowStart($line); $r .= $this->showfield('password_max_age'); - $r .= '<td><input name="password_max_age" size="3" value="'.$tutos['password_max_age'] .'">'; + $r .= '<td><input name="password_max_age" size="3" value="'.$tutos['password_max_age'] .'" /></td>'; $r .= '<td colspan="2" class="pre">'.urlReplace($lang['ConfigHelpPassMaxAge']).'</td>'; $r .= $this->OverviewRowEnd($line++); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2013-03-13 09:32:08
|
Revision: 1014 http://sourceforge.net/p/tutos/code/1014 Author: gokohnert Date: 2013-03-13 09:32:02 +0000 (Wed, 13 Mar 2013) Log Message: ----------- formatting of pre fields modified Modified Paths: -------------- trunk/html/blue.css trunk/html/default.css trunk/html/nuke.css trunk/html/red.css trunk/html/white.css trunk/php/admin/admin.pinc trunk/php/admin/main_config.php trunk/php/admin_show.php trunk/php/bugtracking/bug_config.php trunk/php/checklist/checkfield_show.php trunk/php/custom.pinc trunk/php/doctracker/doc_config.php trunk/php/doctracker/doc_show.php trunk/php/file/file_config.php trunk/php/history_show.php trunk/php/invoice/invoice_config.php trunk/php/invoice/invoice_new.php trunk/php/invoice/invoice_show.php trunk/php/module_template/AAA_config.php trunk/php/note/note_show.php trunk/php/reminder/reminder_show.php trunk/php/scrum/log_show.php trunk/php/scrum/scrum_config.php trunk/php/stuff/stuff_config.php trunk/php/stuff/stuff_show.php trunk/php/subversion/svn_config.php trunk/php/subversion/svn_show.php trunk/php/testmanager/testcase_show.php trunk/php/testmanager/testmanager_config.php trunk/php/testmanager/testrun_show.php trunk/php/testmanager/testsuite_overview.php trunk/php/testmanager/testsuite_show.php trunk/php/timetrack/timetrack_config.php trunk/php/webelements.p3 Modified: trunk/html/blue.css =================================================================== --- trunk/html/blue.css 2013-03-12 12:56:03 UTC (rev 1013) +++ trunk/html/blue.css 2013-03-13 09:32:02 UTC (rev 1014) @@ -1,5 +1,5 @@ /* - * Copyright 1999 - 2012 by Gero Kohnert + * Copyright 1999 - 2013 by Gero Kohnert * * example theme * Modified: trunk/html/default.css =================================================================== --- trunk/html/default.css 2013-03-12 12:56:03 UTC (rev 1013) +++ trunk/html/default.css 2013-03-13 09:32:02 UTC (rev 1014) @@ -94,6 +94,16 @@ border-style: solid; } +/* preformatted text */ +.pre { + font-family: monospace; + white-space: pre; +} + +.configbox tr td.pre { + border-top: 1px solid lightgrey; +} + .dropable, .dragable { list-style-type: none; padding: 0; Modified: trunk/html/nuke.css =================================================================== --- trunk/html/nuke.css 2013-03-12 12:56:03 UTC (rev 1013) +++ trunk/html/nuke.css 2013-03-13 09:32:02 UTC (rev 1014) @@ -1,5 +1,5 @@ /* - * Copyright 2002 by Antonio Romero + * Copyright 2002 - 2013 by Antonio Romero & Gero Kohnert * ant...@ma... * * Nuke Theme for TUTOS @@ -92,7 +92,6 @@ /* preformatted text */ pre, .pre { - font-family: monospace; background: #F5F5F5; color: black; } Modified: trunk/html/red.css =================================================================== --- trunk/html/red.css 2013-03-12 12:56:03 UTC (rev 1013) +++ trunk/html/red.css 2013-03-13 09:32:02 UTC (rev 1014) @@ -1,5 +1,5 @@ /** - * Copyright 1999 - 2011 by Gero Kohnert + * Copyright 1999 - 2013 by Gero Kohnert * * example theme * Modified: trunk/html/white.css =================================================================== --- trunk/html/white.css 2013-03-12 12:56:03 UTC (rev 1013) +++ trunk/html/white.css 2013-03-13 09:32:02 UTC (rev 1014) @@ -1,5 +1,5 @@ -/* - * Copyright 1999 - 2011 by Gero Kohnert +/** + * Copyright 1999 - 2013 by Gero Kohnert * * black/white theme * Modified: trunk/php/admin/admin.pinc =================================================================== --- trunk/php/admin/admin.pinc 2013-03-12 12:56:03 UTC (rev 1013) +++ trunk/php/admin/admin.pinc 2013-03-13 09:32:02 UTC (rev 1014) @@ -1,10 +1,15 @@ <?php /** - * Copyright 1999 - 2012 by Gero Kohnert + * Copyright 1999 - 2013 by Gero Kohnert * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; version 2 of the License. + * * SVN Info $Id: admin.pinc 735 2012-07-27 13:32:33Z gokohnert $ * $Author: gokohnert $ */ +$tutos['files'][__FILE__] = '$Rev: 984 $'; // type,length,min,max,help Modified: trunk/php/admin/main_config.php =================================================================== --- trunk/php/admin/main_config.php 2013-03-12 12:56:03 UTC (rev 1013) +++ trunk/php/admin/main_config.php 2013-03-13 09:32:02 UTC (rev 1014) @@ -1,6 +1,6 @@ <?php /** - * Copyright 2009 - 2012 by Gero Kohnert + * Copyright 2009 - 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 @@ * SVN Info $Id$ * $Author$ */ +$tutos['files'][__FILE__] = '$Rev$'; + $tutos['base'] = "../.."; ini_set("include_path",".."); require_once 'webelements.p3'; @@ -36,37 +38,43 @@ $r = ''; $r .= "<form id=\"mainconfig\" name=\"mainconfig\" action=\"main_config.php\" method=\"post\">\n"; - $line = 0; $r .= '<div id="mytab" class="ui-tabs">'; $r .= '<ul>'; - $r .= '<li><a href="#tutos">TUTOS</a></li>'; - $r .= '<li><a href="#network">Network</a></li>'; - $r .= '<li><a href="#fiscal">Fiscal</a></li>'; - $r .= '<li><a href="#layout">'.$lang['UserLayout'].'</a></li>'; - $r .= '<li><a href="#mail">'.$lang['MailboxEmail'].'</a></li>'; - $r .= '<li><a href="#product">'.$lang['ProductP'].'</a></li>'; - $r .= '<li><a href="#task">'.$lang['Task'].'</a></li>'; - $r .= '<li><a href="#password">'.$lang['Password'].'</a></li>'; + $r .= ' <li><a href="#tutos">TUTOS</a></li>'; + $r .= ' <li><a href="#network">Network</a></li>'; + $r .= ' <li><a href="#fiscal">Fiscal</a></li>'; + $r .= ' <li><a href="#layout">'.$lang['UserLayout'].'</a></li>'; + $r .= ' <li><a href="#mail">'.$lang['MailboxEmail'].'</a></li>'; + $r .= ' <li><a href="#product">'.$lang['ProductP'].'</a></li>'; + $r .= ' <li><a href="#task">'.$lang['Task'].'</a></li>'; + $r .= ' <li><a href="#password">'.$lang['Password'].'</a></li>'; $r .= '</ul>'; $r .= '<div id="tutos" class="ui-tabs-hide">'; + $line = 0; $r .= $this->DataTableStart(); + $r .= $this->OverviewRowStart($line); + $r .= '<th colspan="4">Main</th>'; + $r .= $this->OverviewRowEnd($line++); // time to live $r .= $this->OverviewRowStart($line); $r .= $this->showfield('timetolive'); $r .= '<td><input name="timetolive" value="'.$tutos['timetolive'] .'" /></td>'; - $r .= '<td colspan="2" class="pre"><pre>'.urlReplace($lang['ConfigHelpTimeToLive']).'</pre></td>'; + $r .= '<td colspan="2" class="pre">'.urlReplace($lang['ConfigHelpTimeToLive']).'</td>'; $r .= $this->OverviewRowEnd($line++); // CSV delimiter $r .= config_field_input($this,'CSV_delimiter',null,$line); + $line++; // CSV enclosure $r .= config_field_input($this,'CSV_enclosure',null,$line); + $line++; $r .= $this->DataTableEnd(); $r .= '</div>'; $r .= '<div id="network" class="ui-tabs-hide">'; + $line = 0; $r .= $this->DataTableStart(); // Network $r .= $this->OverviewRowStart($line); @@ -77,14 +85,14 @@ $r .= $this->OverviewRowStart($line); $r .= $this->showfield('proxy_host'); $r .= '<td><input name="proxy_host" value="'.$tutos['proxy_host'] .'" /></td>'; - $r .= '<td colspan="2" class="pre"><pre>'.urlReplace($lang['ConfigHelpProxyHost']).'</pre></td>'; + $r .= '<td colspan="2" class="pre">'.urlReplace($lang['ConfigHelpProxyHost']).'</td>'; $r .= $this->OverviewRowEnd($line++); // ProxyPort $r .= $this->OverviewRowStart($line); $r .= $this->showfield('proxy_port'); $r .= '<td><input name="proxy_port" value="'.$tutos['proxy_port'] .'" /></td>'; - $r .= '<td colspan="2" class="pre"><pre>'.urlReplace($lang['ConfigHelpProxyPort']).'</pre></td>'; + $r .= '<td colspan="2" class="pre">'.urlReplace($lang['ConfigHelpProxyPort']).'</td>'; $r .= $this->OverviewRowEnd($line++); // resolve hostnames @@ -95,12 +103,13 @@ $r .= ' <option value="1"'.($tutos['resolve_host'] == 1 ? ' selected="selected"':'').'>'.$lang['yes'].' (DNS)</option>'."\n"; $r .= ' <option value="2"'.($tutos['resolve_host'] == 2 ? ' selected="selected"':'').'>'.$lang['yes'].' (GeoIP)</option>'."\n"; $r .= '</select></td>'; - $r .= '<td colspan="2" class="pre"><pre>'.urlReplace($lang['ConfigHelpResolveHost']).'</pre></td>'; + $r .= '<td colspan="2" class="pre">'.urlReplace($lang['ConfigHelpResolveHost']).'</td>'; $r .= $this->OverviewRowEnd($line++); $r .= $this->DataTableEnd(); $r .= '</div>'; $r .= '<div id="fiscal" class="ui-tabs-hide">'; + $line = 0; $r .= $this->DataTableStart(); // Fiscal $r .= $this->OverviewRowStart($line); @@ -115,7 +124,7 @@ $r .= ' <option value="'.$i.'"'.($tutos['fiscal_start_month'] == $i ? ' selected="selected"':'').'>'.$i.'</option>'."\n"; } $r .= '</select></td>'; - $r .= '<td colspan="2" class="pre"><pre>'.urlReplace($lang['ConfigHelpFiscalStartMonth']).'</pre></td>'; + $r .= '<td colspan="2" class="pre">'.urlReplace($lang['ConfigHelpFiscalStartMonth']).'</td>'; $r .= $this->OverviewRowEnd($line++); @@ -123,13 +132,14 @@ $r .= $this->OverviewRowStart($line); $r .= $this->showfield('vat_list'); $r .= '<td><input name="vat_list" value="'.$tutos['vat_list'] .'" /></td>'; - $r .= '<td colspan="2" class="pre"><pre>'.urlReplace($lang['ConfigHelpVatList']).'</pre></td>'; + $r .= '<td colspan="2" class="pre">'.urlReplace($lang['ConfigHelpVatList']).'</td>'; $r .= $this->OverviewRowEnd($line++); $r .= $this->DataTableEnd(); $r .= '</div>'; $r .= '<div id="layout" class="ui-tabs-hide">'; + $line = 0; $r .= $this->DataTableStart(); // LAYOUT $r .= $this->OverviewRowStart($line); @@ -140,14 +150,14 @@ $r .= $this->OverviewRowStart($line); $r .= $this->showfield('logo'); $r .= '<td><input name="logo" value="'.$tutos['logo'] .'" /></td>'; - $r .= '<td colspan="2" class="pre"><pre>'.urlReplace($lang['ConfigHelpLogo']).'</pre></td>'; + $r .= '<td colspan="2" class="pre">'.urlReplace($lang['ConfigHelpLogo']).'</td>'; $r .= $this->OverviewRowEnd($line++); // LogoLink $r .= $this->OverviewRowStart($line); $r .= $this->showfield('logolink'); $r .= '<td><input name="logolink" value="'.$tutos['logolink'] .'" /></td>'; - $r .= '<td colspan="2" class="pre"><pre>'.urlReplace($lang['ConfigHelpLogolink']).'</pre></td>'; + $r .= '<td colspan="2" class="pre">'.urlReplace($lang['ConfigHelpLogolink']).'</td>'; $r .= $this->OverviewRowEnd($line++); // maxshow @@ -157,7 +167,7 @@ $r .= $this->OverviewRowStart($line); $r .= $this->showfield('maxselect'); $r .= '<td><input name="maxselect" value="'.$tutos['maxselect'] .'" /></td>'; - $r .= '<td colspan="2" class="pre"><pre>'.urlReplace($lang['ConfigHelpMaxSelect']).'</pre></td>'; + $r .= '<td colspan="2" class="pre">'.urlReplace($lang['ConfigHelpMaxSelect']).'</td>'; $r .= $this->OverviewRowEnd($line++); // maxshort @@ -167,6 +177,7 @@ $r .= '</div>'; $r .= '<div id="mail" class="ui-tabs-hide">'; + $line = 0; $r .= $this->DataTableStart(); // MAIL $r .= $this->OverviewRowStart($line); @@ -184,61 +195,62 @@ $r .= ' <option value="'.$j.'" '.($tutos['mailmode'] == $j ? 'selected="selected"':'').'>'.$f.'</option>'; } $r .= '</select></td>'; - $r .= '<td colspan="2" class="pre"><pre>'.urlReplace($lang['ConfigHelpMailMode']).'</pre></td>'; + $r .= '<td colspan="2" class="pre">'.urlReplace($lang['ConfigHelpMailMode']).'</td>'; $r .= $this->OverviewRowEnd($line++); $r .= $this->OverviewRowStart($line); $r .= $this->showfield('sendmail'); $r .= '<td><input name="sendmail" value="'.$tutos['sendmail'] .'" /></td>'; - $r .= '<td colspan="2" class="pre"><pre>'.urlReplace($lang['ConfigHelpSendmail']).'</pre></td>'; + $r .= '<td colspan="2" class="pre">'.urlReplace($lang['ConfigHelpSendmail']).'</td>'; $r .= $this->OverviewRowEnd($line++); $r .= $this->OverviewRowStart($line); $r .= $this->showfield('smtphost'); $r .= '<td><input name="smtphost" value="'.$tutos['smtphost'] .'" /></td>'; - $r .= '<td colspan="2" class="pre"><pre>'.urlReplace($lang['ConfigHelpSmtpHost']).'</pre></td>'; + $r .= '<td colspan="2" class="pre">'.urlReplace($lang['ConfigHelpSmtpHost']).'</td>'; $r .= $this->OverviewRowEnd($line++); $r .= $this->OverviewRowStart($line); $r .= $this->showfield('smtpport'); $r .= '<td><input name="smtpport" value="'.$tutos['smtpport'] .'" /></td>'; - $r .= '<td colspan="2" class="pre"><pre>'.urlReplace($lang['ConfigHelpSmtpPort']).'</pre></td>'; + $r .= '<td colspan="2" class="pre">'.urlReplace($lang['ConfigHelpSmtpPort']).'</td>'; $r .= $this->OverviewRowEnd($line++); $r .= $this->OverviewRowStart($line); $r .= $this->showfield('smtp_username'); $r .= '<td><input name="smtp_username" value="'.$tutos['smtp_username'] .'" /></td>'; - $r .= '<td colspan="2" class="pre"><pre>'.urlReplace($lang['ConfigHelpSmtpUser']).'</pre></td>'; + $r .= '<td colspan="2" class="pre">'.urlReplace($lang['ConfigHelpSmtpUser']).'</td>'; $r .= $this->OverviewRowEnd($line++); $r .= $this->OverviewRowStart($line); $r .= $this->showfield('smtp_password'); $r .= '<td><input name="smtp_password" value="'.$tutos['smtp_password'] .'" /></td>'; - $r .= '<td colspan="2" class="pre"><pre>'.urlReplace($lang['ConfigHelpSmtpPass']).'</pre></td>'; + $r .= '<td colspan="2" class="pre">'.urlReplace($lang['ConfigHelpSmtpPass']).'</td>'; $r .= $this->OverviewRowEnd($line++); $r .= $this->OverviewRowStart($line); $r .= $this->showfield('popbeforesmtp'); $r .= '<td><input type="checkbox" name="popbeforesmtp" '.($tutos['popbeforesmtp'] == 1 ? 'checked="checked"':'').' value="1" /></td>'; - $r .= '<td colspan="2" class="pre"><pre>'.urlReplace($lang['ConfigHelpPopBeforeSmtp']).'</pre></td>'; + $r .= '<td colspan="2" class="pre">'.urlReplace($lang['ConfigHelpPopBeforeSmtp']).'</td>'; $r .= $this->OverviewRowEnd($line++); $r .= $this->OverviewRowStart($line); $r .= $this->showfield('popbeforesmtp_user'); $r .= '<td><input name="popbeforesmtp_user" value="'.$tutos['popbeforesmtp_user'] .'" /></td>'; - $r .= '<td colspan="2" class="pre"><pre>'.urlReplace($lang['ConfigHelpPopSmtpUser']).'</pre></td>'; + $r .= '<td colspan="2" class="pre">'.urlReplace($lang['ConfigHelpPopSmtpUser']).'</td>'; $r .= $this->OverviewRowEnd($line++); $r .= $this->OverviewRowStart($line); $r .= $this->showfield('popbeforesmtp_pass'); $r .= '<td><input name="popbeforesmtp_pass" value="'.$tutos['popbeforesmtp_pass'] .'" /></td>'; - $r .= '<td colspan="2" class="pre"><pre>'.urlReplace($lang['ConfigHelpPopSmtpPass']).'</pre></td>'; + $r .= '<td colspan="2" class="pre">'.urlReplace($lang['ConfigHelpPopSmtpPass']).'</td>'; $r .= $this->OverviewRowEnd($line++); $r .= $this->DataTableEnd(); $r .= '</div>'; $r .= '<div id="product" class="ui-tabs-hide">'; + $line = 0; $r .= $this->DataTableStart(); // PRODUCT / PROJECT $r .= $this->OverviewRowStart($line); @@ -257,7 +269,7 @@ $r .= '</select>'; $r .= '<br />'.makelink('stc/stc_new.php?lgarr=ProdStates','Create a new STC'); $r .= '</td>'; - $r .= '<td colspan="2" class="pre"><pre>'.$lang['ConfigHelpProdStateSTC'].'</pre></td>'; + $r .= '<td colspan="2" class="pre">'.$lang['ConfigHelpProdStateSTC'].'</td>'; $r .= $this->OverviewRowEnd($line++); // activ product states @@ -278,7 +290,7 @@ $r .= '>'. myentities($f->getFullName()) ."</option>\n"; } $r .= '</select></td>'; - $r .= '<td colspan="2" class="pre"><pre>'.$lang['ConfigHelpProdActivStates'].'</pre></td>'; + $r .= '<td colspan="2" class="pre">'.$lang['ConfigHelpProdActivStates'].'</td>'; $r .= $this->OverviewRowEnd($line++); // Product automatic state when finished @@ -293,19 +305,20 @@ $r .= '>'. myentities($f->getFullName()) ."</option>\n"; } $r .= '</select></td>'; - $r .= '<td colspan="2" class="pre"><pre>'.urlReplace($lang['ConfigHelpProdFinishState']).'</pre></td>'; + $r .= '<td colspan="2" class="pre">'.urlReplace($lang['ConfigHelpProdFinishState']).'</td>'; $r .= $this->OverviewRowEnd($line++); // classify products $r .= $this->OverviewRowStart($line); $r .= $this->showfield('prod_classify'); $r .= '<td><input type="checkbox" name="prod_classify" '.($tutos['prod_classify'] == 1 ? 'checked="checked"':'').' value="1" /></td>'; - $r .= '<td colspan="2" class="pre"><pre>'.urlReplace($lang['ConfigHelpProdClassify']).'</pre></td>'; + $r .= '<td colspan="2" class="pre">'.urlReplace($lang['ConfigHelpProdClassify']).'</td>'; $r .= $this->OverviewRowEnd($line++); $r .= $this->DataTableEnd(); $r .= '</div>'; $r .= '<div id="task" class="ui-tabs-hide">'; + $line = 0; $r .= $this->DataTableStart(); // TASK $r .= $this->OverviewRowStart($line); @@ -323,7 +336,7 @@ $r .= '</select>'; $r .= '<br />'.makelink('stc/stc_new.php?lgarr=TaskStates','Create a new STC'); $r .= '</td>'; - $r .= '<td colspan="2" class="pre"><pre>'.$lang['ConfigHelpTaskStateSTC'].'</pre></td>'; + $r .= '<td colspan="2" class="pre">'.$lang['ConfigHelpTaskStateSTC'].'</td>'; $r .= $this->OverviewRowEnd($line++); // TASK automatic state when book @@ -343,7 +356,7 @@ $r .= '>'. myentities($f->getFullName()) ."</option>\n"; } $r .= '</select></td>'; - $r .= '<td colspan="2" class="pre"><pre>'.urlReplace($lang['ConfigHelpTaskBookState']).'</pre></td>'; + $r .= '<td colspan="2" class="pre">'.urlReplace($lang['ConfigHelpTaskBookState']).'</td>'; $r .= $this->OverviewRowEnd($line++); // TASK automatic state when finished @@ -358,48 +371,48 @@ $r .= '>'. myentities($f->getFullName()) ."</option>\n"; } $r .= '</select></td>'; - $r .= '<td colspan="2" class="pre"><pre>'.urlReplace($lang['ConfigHelpTaskFinishState']).'</pre></td>'; + $r .= '<td colspan="2" class="pre">'.urlReplace($lang['ConfigHelpTaskFinishState']).'</td>'; $r .= $this->OverviewRowEnd($line++); // TASK AUTONAME $r .= $this->OverviewRowStart($line); $r .= $this->showfield('task_autoname'); $r .= '<td><input name="task_autoname" value="'.$tutos['task_autoname'] .'" /></td>'; - $r .= '<td colspan="2" class="pre"><pre>'.urlReplace($lang['ConfigHelpTaskAutoname']).'</pre></td>'; + $r .= '<td colspan="2" class="pre">'.urlReplace($lang['ConfigHelpTaskAutoname']).'</td>'; $r .= $this->OverviewRowEnd($line++); // tasks in calendar $r .= $this->OverviewRowStart($line); $r .= $this->showfield('tasksincalendar'); $r .= '<td><input type="checkbox" name="tasksincalendar" '.($tutos['tasksincalendar'] == 1 ? 'checked="checked"':'').' value="1" /></td>'; - $r .= '<td colspan="2" class="pre"><pre>'.urlReplace($lang['ConfigHelpTaskCalendar']).'</pre></td>'; + $r .= '<td colspan="2" class="pre">'.urlReplace($lang['ConfigHelpTaskCalendar']).'</td>'; $r .= $this->OverviewRowEnd($line++); // tasks show fileinfo $r .= $this->OverviewRowStart($line); $r .= $this->showfield('task_show_fileinfo'); $r .= '<td><input type="checkbox" name="task_show_fileinfo" '.($tutos['task_show_fileinfo'] == 1 ? 'checked="checked"':'').' value="1" /></td>'; - $r .= '<td colspan="2" class="pre"><pre>'.urlReplace($lang['ConfigHelpTaskFileInfo']).'</pre></td>'; + $r .= '<td colspan="2" class="pre">'.urlReplace($lang['ConfigHelpTaskFileInfo']).'</td>'; $r .= $this->OverviewRowEnd($line++); // tasks show buginfo $r .= $this->OverviewRowStart($line); $r .= $this->showfield('task_show_buginfo'); $r .= '<td><input type="checkbox" name="task_show_buginfo" '.($tutos['task_show_buginfo'] == 1 ? 'checked="checked"':'').' value="1" /></td>'; - $r .= '<td colspan="2" class="pre"><pre>'.urlReplace($lang['ConfigHelpTaskBugInfo']).'</pre></td>'; + $r .= '<td colspan="2" class="pre">'.urlReplace($lang['ConfigHelpTaskBugInfo']).'</td>'; $r .= $this->OverviewRowEnd($line++); // tasks skip finished $r .= $this->OverviewRowStart($line); $r .= $this->showfield('task_skip_finished'); $r .= '<td><input type="checkbox" name="task_skip_finished" '.($tutos['task_skip_finished'] == 1 ? 'checked="checked"':'').' value="1" /></td>'; - $r .= '<td colspan="2" class="pre"><pre>'.urlReplace($lang['ConfigHelpTaskSkipFinished']).'</pre></td>'; + $r .= '<td colspan="2" class="pre">'.urlReplace($lang['ConfigHelpTaskSkipFinished']).'</td>'; $r .= $this->OverviewRowEnd($line++); // tasks exact planned $r .= $this->OverviewRowStart($line); $r .= $this->showfield('task_exact'); $r .= '<td><input type="checkbox" name="task_exact" '.($tutos['task_exact'] == 1 ? 'checked="checked"':'').' value="1" /></td>'; - $r .= '<td colspan="2" class="pre"><pre>'.urlReplace($lang['ConfigHelpTaskExact']).'</pre></td>'; + $r .= '<td colspan="2" class="pre">'.urlReplace($lang['ConfigHelpTaskExact']).'</td>'; $r .= $this->OverviewRowEnd($line++); $r .= $this->DataTableEnd(); @@ -407,13 +420,18 @@ // password rules $r .= '<div id="password" class="ui-tabs-hide">'; + $line = 0; $r .= $this->DataTableStart(); + // PASSWORD + $r .= $this->OverviewRowStart($line); + $r .= '<th colspan="4">'.$lang['Password'].'</th>'; + $r .= $this->OverviewRowEnd($line++); // maximum password age (days) $r .= $this->OverviewRowStart($line); $r .= $this->showfield('password_max_age'); $r .= '<td><input name="password_max_age" size="3" value="'.$tutos['password_max_age'] .'">'; - $r .= '<td colspan="2" class="pre"><pre>'.urlReplace($lang['ConfigHelpPassMaxAge']).'</pre></td>'; + $r .= '<td colspan="2" class="pre">'.urlReplace($lang['ConfigHelpPassMaxAge']).'</td>'; $r .= $this->OverviewRowEnd($line++); // minial password length (characters) @@ -424,7 +442,7 @@ $r .= ' <option value="'.$i.'"'.($tutos['password_min_length'] == $i ? ' selected="selected"':'').'>'.$i.'</option>'."\n"; } $r .= '</select></td>'; - $r .= '<td colspan="2" class="pre"><pre>'.urlReplace($lang['ConfigHelpPassMinLength']).'</pre></td>'; + $r .= '<td colspan="2" class="pre">'.urlReplace($lang['ConfigHelpPassMinLength']).'</td>'; $r .= $this->OverviewRowEnd($line++); // minial required special characters in password @@ -435,7 +453,7 @@ $r .= ' <option value="'.$i.'"'.($tutos['password_need_special'] == $i ? ' selected="selected"':'').'>'.$i.'</option>'."\n"; } $r .= '</select></td>'; - $r .= '<td colspan="2" class="pre"><pre>'.urlReplace($lang['ConfigHelpPassNeedSpecial']).'</pre></td>'; + $r .= '<td colspan="2" class="pre">'.urlReplace($lang['ConfigHelpPassNeedSpecial']).'</td>'; $r .= $this->OverviewRowEnd($line++); $r .= $this->DataTableEnd(); @@ -471,7 +489,8 @@ function prepare() { global $lang,$msg,$info,$tutos; - $this->name = $lang['AdminMainConfig']; + $this->name = $lang['AdminMainConfig']; + $this->css_class = 'configbox'; if ( ! $this->user->isAdmin() ) { $msg = addLine($msg,$this->error("Only admins are allowed to see this")); Modified: trunk/php/admin_show.php =================================================================== --- trunk/php/admin_show.php 2013-03-12 12:56:03 UTC (rev 1013) +++ trunk/php/admin_show.php 2013-03-13 09:32:02 UTC (rev 1014) @@ -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 @@ -425,10 +425,12 @@ $y = array(); $x = $tutos['memcache']->get($this->dbconn->db->systemid.'_sessions'); $d = $tutos['memcache']->get(array_keys($x)); - foreach ($d as $key => $data) { - $r .= $this->Sessions_Line(unserialize_session($data),$key); - unset($x[$key]); - $y[$key] = $data; + 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); Modified: trunk/php/bugtracking/bug_config.php =================================================================== --- trunk/php/bugtracking/bug_config.php 2013-03-12 12:56:03 UTC (rev 1013) +++ trunk/php/bugtracking/bug_config.php 2013-03-13 09:32:02 UTC (rev 1014) @@ -10,6 +10,7 @@ * $Author$ */ $tutos['files'][__FILE__] = '$Rev$'; + $tutos['base'] = "../.."; ini_set("include_path",".."); @@ -34,8 +35,10 @@ $r = ''; $r .= "<form id=\"bugconfig\" name=\"bugconfig\" action=\"bug_config.php\" method=\"post\">\n"; $r .= $this->DataTableStart(); - $line = 0; + $r .= $this->OverviewRowStart(); + $r .= '<th colspan="4">'.$this->name.'</th>'; + $r .= $this->OverviewRowEnd(); // long detailed popups $r .= $this->OverviewRowStart($line); @@ -44,20 +47,20 @@ $r .= ' <option value="1"'.($tutos['bug_long_pop'] == 1 ? ' selected="selected"':'').'>'.$lang['yes'].'</option>'; $r .= ' <option value="0"'.($tutos['bug_long_pop'] == 0 ? ' selected="selected"':'').'>'.$lang['no'].'</option>'; $r .= '</select></td>'; - $r .= '<td colspan="2" class="pre"><pre>'.$lang['BugConfigHelpLongPop'].'</pre></td>'; + $r .= '<td colspan="2" class="pre">'.$lang['BugConfigHelpLongPop'].'</td>'; $r .= $this->OverviewRowEnd($line++); // automated remember $r .= $this->OverviewRowStart($line); $r .= $this->showfield('bug_remember'); $r .= '<td><input name="remember" value="'.myentities($tutos['bug_remember']).'" /></td>'; - $r .= '<td colspan="2" class="pre"><pre>'.myentities($lang['BugConfigHelpRemember']).'</pre></td>'; + $r .= '<td colspan="2" class="pre">'.myentities($lang['BugConfigHelpRemember']).'</td>'; $r .= $this->OverviewRowEnd($line++); $r .= $this->OverviewRowStart($line); $r .= $this->showfield('bug_autoname'); $r .= '<td><input name="autoname" value="'.myentities($tutos['bug_autoname']) .'" /></td>'; - $r .= '<td colspan="2" class="pre"><pre>'.myentities($lang['BugConfigHelpAutoname']).'</pre></td>'; + $r .= '<td colspan="2" class="pre">'.myentities($lang['BugConfigHelpAutoname']).'</td>'; $r .= $this->OverviewRowEnd($line++); // allow deletion of bugs @@ -67,7 +70,7 @@ $r .= ' <option value="1"'.($tutos['bug_delete'] == 1 ? ' selected="selected"':'').'>'.$lang['yes'].'</option>'."\n"; $r .= ' <option value="0"'.($tutos['bug_delete'] == 0 ? ' selected="selected"':'').'>'.$lang['no'].'</option>'."\n"; $r .= '</select></td>'; - $r .= '<td colspan="2" class="pre"><pre>'.myentities($lang['BugConfigHelpDelete']).'</pre></td>'; + $r .= '<td colspan="2" class="pre">'.myentities($lang['BugConfigHelpDelete']).'</td>'; $r .= $this->OverviewRowEnd($line++); // STC @@ -82,14 +85,14 @@ $r .= '</select>'; $r .= '<br />'.makelink('stc/stc_new.php?lgarr=BugStates&mod=bugtracking','Create a new STC'); $r .= '</td>'; - $r .= '<td colspan="2" class="pre"><pre>'.myentities($lang['BugConfigHelpStateSTC']).'</pre></td>'; + $r .= '<td colspan="2" class="pre">'.myentities($lang['BugConfigHelpStateSTC']).'</td>'; $r .= $this->OverviewRowEnd($line++); // free selection of target $r .= $this->OverviewRowStart($line); $r .= $this->showfield('bug_free_target'); $r .= '<td><input type="checkbox" name="bug_free_target"'.($tutos['bug_free_target'] == 1 ? ' checked="checked"':'').' value="1" /></td>'; - $r .= '<td colspan="2" class="pre"><pre>'.urlReplace($lang['BugConfigHelpFreeTarget']).'</pre></td>'; + $r .= '<td colspan="2" class="pre">'.urlReplace($lang['BugConfigHelpFreeTarget']).'</td>'; $r .= $this->OverviewRowEnd($line++); // states that need a target @@ -110,14 +113,14 @@ $r .= '>'. myentities($f->getFullName()) ."</option>\n"; } $r .= '</select></td>'; - $r .= '<td colspan="2" class="pre"><pre>'.urlReplace($lang['BugConfigHelpNeedTarget']).'</pre></td>'; + $r .= '<td colspan="2" class="pre">'.urlReplace($lang['BugConfigHelpNeedTarget']).'</td>'; $r .= $this->OverviewRowEnd($line++); // use & show revision $r .= $this->OverviewRowStart($line); $r .= $this->showfield('bug_use_revision'); $r .= '<td><input type="checkbox" name="bug_use_revision"'.($tutos['bug_use_revision'] == 1 ? ' checked="checked"':'').' value="1" /></td>'; - $r .= '<td colspan="2" class="pre"><pre>'.urlReplace($lang['BugConfigHelpUseRevision']).'</pre></td>'; + $r .= '<td colspan="2" class="pre">'.urlReplace($lang['BugConfigHelpUseRevision']).'</td>'; $r .= $this->OverviewRowEnd($line++); // states that need a revision @@ -138,7 +141,7 @@ $r .= '>'. myentities($f->getFullName()) ."</option>\n"; } $r .= '</select></td>'; - $r .= '<td colspan="2" class="pre"><pre>'.urlReplace($lang['BugConfigHelpNeedRevision']).'</pre></td>'; + $r .= '<td colspan="2" class="pre">'.urlReplace($lang['BugConfigHelpNeedRevision']).'</td>'; $r .= $this->OverviewRowEnd($line++); // states that are like closed @@ -159,7 +162,7 @@ $r .= '>'. myentities($f->getFullName()) ."</option>\n"; } $r .= '</select></td>'; - $r .= '<td colspan="2" class="pre"><pre>'.$lang['BugConfigHelpClosedStates'].'</pre></td>'; + $r .= '<td colspan="2" class="pre">'.$lang['BugConfigHelpClosedStates'].'</td>'; $r .= $this->OverviewRowEnd($line++); // state to set on auto finish @@ -174,7 +177,7 @@ $r .= '>'. myentities($f->getFullName()) ."</option>\n"; } $r .= '</select></td>'; - $r .= '<td colspan="2" class="pre"><pre>'.$lang['BugConfigHelpFinishState'].'</pre></td>'; + $r .= '<td colspan="2" class="pre">'.$lang['BugConfigHelpFinishState'].'</td>'; $r .= $this->OverviewRowEnd($line++); // states that are like open (i.e. you can get warned) @@ -190,7 +193,7 @@ $r .= '>'. myentities($f->getFullName()) ."</option>\n"; } $r .= '</select></td>'; - $r .= '<td colspan="2" class="pre"><pre>'.$lang['BugConfigHelpWarnStates'].'</pre></td>'; + $r .= '<td colspan="2" class="pre">'.$lang['BugConfigHelpWarnStates'].'</td>'; $r .= $this->OverviewRowEnd($line++); @@ -206,7 +209,7 @@ $r .= ' <option value="'.$i.'"'.(in_array($i,$x) ? ' selected="selected"':'').'>'.myentities($j).'</option>'."\n"; } $r .= '</select></td>'; - $r .= '<td colspan="2" class="pre"><pre>'.urlReplace($lang['BugConfigHelpProdNewMail']).'</pre></td>'; + $r .= '<td colspan="2" class="pre">'.urlReplace($lang['BugConfigHelpProdNewMail']).'</td>'; $r .= $this->OverviewRowEnd($line++); // Product Roles that get informed by modified bugs @@ -221,21 +224,21 @@ $r .= ' <option value="'.$i.'"'.(in_array($i,$x) ? ' selected="selected"':'').'>'.myentities($j).'</option>'."\n"; } $r .= '</select></td>'; - $r .= '<td colspan="2" class="pre"><pre>'.urlReplace($lang['BugConfigHelpProdModMail']).'</pre></td>'; + $r .= '<td colspan="2" class="pre">'.urlReplace($lang['BugConfigHelpProdModMail']).'</td>'; $r .= $this->OverviewRowEnd($line++); // No Mail flag $r .= $this->OverviewRowStart($line); $r .= $this->showfield('bug_no_mail'); $r .= '<td><input type="checkbox" name="bug_no_mail"'.($tutos['bug_no_mail'] == 1 ? ' checked="checked"':'').' value="1" /></td>'; - $r .= '<td colspan="2" class="pre"><pre>'.urlReplace($lang['BugConfigHelpNoMail']).'</pre></td>'; + $r .= '<td colspan="2" class="pre">'.urlReplace($lang['BugConfigHelpNoMail']).'</td>'; $r .= $this->OverviewRowEnd($line++); // Show Stateage $r .= $this->OverviewRowStart($line); $r .= $this->showfield('bug_state_age'); $r .= '<td><input type="checkbox" name="bug_state_age"'.($tutos['bug_state_age'] == 1 ? ' checked="checked"':'').' value="1" /></td>'; - $r .= '<td colspan="2" class="pre"><pre>'.urlReplace($lang['BugConfigHelpStateAge']).'</pre></td>'; + $r .= '<td colspan="2" class="pre">'.urlReplace($lang['BugConfigHelpStateAge']).'</td>'; $r .= $this->OverviewRowEnd($line++); $r .= $this->submit_reset_row(0,1,1,1,1,0); @@ -254,7 +257,8 @@ function prepare() { global $lang,$msg,$info,$tutos; - $this->name = $lang['BugConfig']; + $this->name = $lang['BugConfig']; + $this->css_class = 'configbox'; // default if (!isset($tutos['bug_long_pop'])) $tutos['bug_long_pop'] = 0; Modified: trunk/php/checklist/checkfield_show.php =================================================================== --- trunk/php/checklist/checkfield_show.php 2013-03-12 12:56:03 UTC (rev 1013) +++ trunk/php/checklist/checkfield_show.php 2013-03-13 09:32:02 UTC (rev 1014) @@ -11,6 +11,8 @@ * $Author$ * */ +$tutos['files'][__FILE__] = '$Rev$'; + $tutos['base'] = "../.."; ini_set("include_path",".."); require_once 'webelements.p3'; @@ -66,7 +68,7 @@ $r .= "</tr><tr>\n"; $r .= $this->showfield($lang['CheckfieldComment']); - $r .= $this->showdata('<pre>'.urlreplace($this->obj->comment).'</pre>',3); + $r .= $this->showdata(urlreplace($this->obj->comment),3,'pre'); $r .= "</tr>\n"; $r .= checkfield::infolist($this->user,$this->obj,4,$this->format); Modified: trunk/php/custom.pinc =================================================================== --- trunk/php/custom.pinc 2013-03-12 12:56:03 UTC (rev 1013) +++ trunk/php/custom.pinc 2013-03-13 09:32:02 UTC (rev 1014) @@ -139,7 +139,7 @@ */ function get_line() { $r = ''; -# if (true) return 'XXX'; + # if (true) return 'XXX'; if ($this->hidden) return ''; $data = $this->get(); @@ -404,7 +404,7 @@ if (count($this->obj->relations[$rid]) > 0) foreach ($this->obj->relations[$rid] as $i => $o) { if (!isset($xx[$i])) { -# echo $i.' |'.$o->id.'| '.$o.'|<br>'; + # echo $i.' |'.$o->id.'| '.$o.'|<br>'; $o = getObject($this->obj->dbconn,$i); if(is_object($o)) $xx[$i] = $o; @@ -866,7 +866,7 @@ global $lang; if ($this->x['hideempty'] && (trim($this->content) == '') ) return ''; - return '<pre class="pre">'.format_txt($this->obj,$this->content).'</pre>'; + return '<span class="pre">'.format_txt($this->obj,$this->content).'</span>'; } /** @@ -883,7 +883,7 @@ if ( isset($this->x['growonly']) && ($this->x['growonly'] == true) ) { $r .= $this->layout->textarea($this->get_parsename(),0,$size,''); if ($this->content != '') { - $r .= '<pre class="pre">'.format_txt($this->obj,$this->content).'</pre>'; + $r .= '<span class="pre">'.format_txt($this->obj,$this->content).'</span>'; } } else { if (isset($this->x['rows'])) { Modified: trunk/php/doctracker/doc_config.php =================================================================== --- trunk/php/doctracker/doc_config.php 2013-03-12 12:56:03 UTC (rev 1013) +++ trunk/php/doctracker/doc_config.php 2013-03-13 09:32:02 UTC (rev 1014) @@ -1,14 +1,16 @@ <?php /** - * Copyright 2009 by Gero Kohnert + * Copyright 2009 - 2013 by Gero Kohnert * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the * Free Software Foundation; version 2 of the License. * * SVN Info $Id$ * $Author$ */ +$tutos['files'][__FILE__] = '$Rev$'; + $tutos['base'] = "../.."; ini_set("include_path",".."); @@ -26,17 +28,20 @@ class Doc_config extends layout { function info() { global $lang,$table,$tutos; - + $r = ''; $r .= "<form id=\"docconfig\" name=\"docconfig\" action=\"doc_config.php\" method=\"post\">\n"; $r .= $this->DataTableStart(); - $line = 0; + $r .= $this->OverviewRowStart(); + $r .= '<th colspan="4">'.$this->name.'</th>'; + $r .= $this->OverviewRowEnd(); + $r .= $this->OverviewRowStart($line); $r .= $this->showfield('doctrack_numberformat'); $r .= '<td><input name="format" size="30" value="'.$tutos['doctrack_numberformat'].'">'; $r .= '</input></td>'; - $r .= '<td colspan="2" class="pre"><pre>'.$lang['DocTrackConfigHelpFormat'].'</pre></td>'; + $r .= '<td colspan="2" class="pre">'.$lang['DocTrackConfigHelpFormat'].'</td>'; $r .= $this->OverviewRowEnd($line++); $r .= $this->OverviewRowStart($line); @@ -49,14 +54,14 @@ $r .= ' <option value="version"'.($tutos['doctrack_projectid'] == 'version' ?' selected="selected"':'') .'>'.$lang['ProductP'] .':'. $lang['ProdVersion'].'</option>'; $r .= ' <option value="id"'.($tutos['doctrack_projectid'] == 'version' ?' selected="selected"':'') .'>'.$lang['ProductP'] .':ID</option>'; $r .= '</select></td>'; - $r .= '<td colspan="2" class="pre"><pre>'.$lang['DocTrackConfigHelpProjectId'].'</pre></td>'; + $r .= '<td colspan="2" class="pre">'.$lang['DocTrackConfigHelpProjectId'].'</td>'; $r .= $this->OverviewRowEnd($line++); $r .= '<tr>'; $r .= submit_reset(0,1,1,1,1,0); $r .= '</tr>'; - + $r .= $this->DataTableEnd(); $this->addHidden("save", 1); $r .= hiddenFormElements(); @@ -64,17 +69,19 @@ $r .= "</form>\n"; return $r; } + /** * */ function prepare() { global $lang,$msg,$tutos; - - $this->name = $lang['DocTrackConfig']; - - // default + + $this->name = $lang['DocTrackConfig']; + $this->css_class = 'configbox'; + + // default if (!isset($tutos['doctrack_numberformat'])) $tutos['doctrack_numberformat'] = '&ORG-&PNUM-&TYPE-&PCNT-&REV'; - + if (!isset($tutos['doctrack_projectid'])) $tutos['doctrack_projectid'] = 'desc2'; if ( ! $this->user->isAdmin() ) { @@ -99,6 +106,6 @@ $dbconn->close(); ?> <!-- - SVN Info $Id$ - $Author$ +SVN Info $Id$ +$Author$ --> \ No newline at end of file Modified: trunk/php/doctracker/doc_show.php =================================================================== --- trunk/php/doctracker/doc_show.php 2013-03-12 12:56:03 UTC (rev 1013) +++ trunk/php/doctracker/doc_show.php 2013-03-13 09:32:02 UTC (rev 1014) @@ -1,6 +1,6 @@ <?php /** - * Copyright 1999 - 2010 by Gero Kohnert + * Copyright 1999 - 2013 by Gero Kohnert * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -10,6 +10,8 @@ * @module doc_show * @package doctracker */ +$tutos['files'][__FILE__] = '$Rev$'; + $tutos['base'] = "../.."; ini_set("include_path",".."); require_once 'webelements.p3'; @@ -87,7 +89,7 @@ $r .= "<tr>\n"; $r .= $this->showfield($lang['DocTrackDesc']); - $r .= ' <td colspan="4" class="pre"><pre>'. wordwrap(urlReplace($this->obj->description),80) ."</pre></td>"; + $r .= ' <td colspan="4" class="pre">'. wordwrap(urlReplace($this->obj->description),80) .'</td>'; $r .= "</tr>\n"; @@ -104,6 +106,7 @@ $r .= $this->DataTableEnd(); return $r; } + /** * prepare */ @@ -198,5 +201,5 @@ ?> <!-- SVN Info $Id$ - $Author$ - --> \ No newline at end of file +$Author$ +--> \ No newline at end of file Modified: trunk/php/file/file_config.php =================================================================== --- trunk/php/file/file_config.php 2013-03-12 12:56:03 UTC (rev 1013) +++ trunk/php/file/file_config.php 2013-03-13 09:32:02 UTC (rev 1014) @@ -10,6 +10,7 @@ * $Author$ */ $tutos['files'][__FILE__] = '$Rev$'; + $tutos['base'] = "../.."; ini_set("include_path",".."); @@ -33,6 +34,10 @@ $r .= $this->DataTableStart(); $line = 0; + $r .= $this->OverviewRowStart(); + $r .= '<th colspan="4">'.$this->name.'</th>'; + $r .= $this->OverviewRowEnd(); + $r .= $this->OverviewRowStart($line); $r .= $this->showfield('file_fileperm'); $r .= '<td><select name="file_fileperm">'; @@ -41,7 +46,7 @@ $r .= '<option value="'.$p.'" '.($tutos['file_fileperm'] == $p ? 'selected="selected"':'').'>'.$p.'</option>'; } $r .= '</select></td>'; - $r .= '<td colspan="2" class="pre"><pre>'.$lang['FileConfigHelpFilePerm'].'</pre></td>'; + $r .= '<td colspan="2" class="pre">'.$lang['FileConfigHelpFilePerm'].'</td>'; $r .= $this->OverviewRowEnd($line++); $r .= $this->OverviewRowStart($line); @@ -52,19 +57,19 @@ $r .= '<option value="'.$p.'" '.($tutos['file_fileperm'] == $p ? 'selected="selected"':'').'>'.$p.'</option>'; } $r .= '</select></td>'; - $r .= '<td colspan="2" class="pre"><pre>'.$lang['FileConfigHelpDirPerm'].'</pre></td>'; + $r .= '<td colspan="2" class="pre">'.$lang['FileConfigHelpDirPerm'].'</td>'; $r .= $this->OverviewRowEnd($line++); $r .= $this->OverviewRowStart($line); $r .= $this->showfield('file_local_allow'); $r .= '<td><input type="checkbox" name="file_local_allow" '.($tutos['file_local_allow'] == 1 ? 'checked="checked"':'').'value="1" /></td>'; - $r .= '<td colspan="2" class="pre"><pre>'.$lang['FileConfigHelpLocalAllow'].'</pre></td>'; + $r .= '<td colspan="2" class="pre">'.$lang['FileConfigHelpLocalAllow'].'</td>'; $r .= $this->OverviewRowEnd($line++); $r .= $this->OverviewRowStart($line); $r .= $this->showfield('file_local_searchpath'); $r .= '<td><input name="file_local_searchpath" value="'.$tutos['file_local_searchpath'].'" /></td>'; - $r .= '<td colspan="2" class="pre"><pre>'.$lang['FileConfigHelpLocalSearchPath'].'</pre></td>'; + $r .= '<td colspan="2" class="pre">'.$lang['FileConfigHelpLocalSearchPath'].'</td>'; $r .= $this->OverviewRowEnd($line++); $r .= '<tr>'; @@ -78,13 +83,15 @@ $r .= "</form>\n"; return $r; } + /** * */ function prepare() { global $lang,$msg,$tutos; - $this->name = $lang['FileConfig']; + $this->name = $lang['FileConfig']; + $this->css_class = 'configbox'; // default if (!isset($tutos['file_fileperm'])) $tutos['file_fileperm'] = 0600; Modified: trunk/php/history_show.php =================================================================== --- trunk/php/history_show.php 2013-03-12 12:56:03 UTC (rev 1013) +++ trunk/php/history_show.php 2013-03-13 09:32:02 UTC (rev 1014) @@ -193,21 +193,19 @@ if ($j == null) { $r .= $this->OverviewRowBlock('<b>'.(isset( $lang[$f['field']]) ? $lang[$f['field']] : $f['field']).'</b>','over_l'); $r .= $this->OverviewRowBlock(myentities($f['old']),'over_ml'); + $cl = 'overml'; if (substr($f['new'],0,5) == 'DIFF:') { - $x = '<pre>'. myentities($f['new']).'</pre>'; - } else { - $x = myentities($f['new']); + $cl .= ' pre'; } - $r .= $this->OverviewRowBlock($x,'over_ml'); + $r .= $this->OverviewRowBlock(myentities($f['new']),$cl); } else { $r .= $this->OverviewRowBlock('<b>'.myentities($j['field']).'</b>','over_l'); $r .= $this->OverviewRowBlock($j['old'],'over_ml'); + $cl = 'overml'; if (substr($j['new'],0,5) == 'DIFF:') { - $x = '<pre>'. $j['new'].'</pre>'; - } else { - $x = $j['new']; + $cl .= ' pre'; } - $r .= $this->OverviewRowBlock($x,'over_ml'); + $r .= $this->OverviewRowBlock($j['new'],$cl'over_ml'); } } if ( $this->adr_id == -1 ) { Modified: trunk/php/invoice/invoice_config.php =================================================================== --- trunk/php/invoice/invoice_config.php 2013-03-12 12:56:03 UTC (rev 1013) +++ trunk/php/invoice/invoice_config.php 2013-03-13 09:32:02 UTC (rev 1014) @@ -9,6 +9,8 @@ * SVN Info $Id$ * $Author$ */ +$tutos['files'][__FILE__] = '$Rev$'; + $tutos['base'] = "../.."; ini_set("include_path",".."); @@ -34,11 +36,15 @@ $r .= $this->DataTableStart(); $line = 0; + $r .= $this->OverviewRowStart(); + $r .= '<th colspan="4">'.$this->name.'</th>'; + $r .= $this->OverviewRowEnd(); + $r .= $this->OverviewRowStart($line); $r .= $this->showfield('inv_autoname'); $r .= '<td><input name="autoname" value="'.$tutos['inv_autoname'] .'" />'; $r .= '</td>'; - $r .= '<td colspan="2" class="pre"><pre>'.myentities($lang['InvoiceConfigHelpAutoname']).'</pre></td>'; + $r .= '<td colspan="2" class="pre">'.myentities($lang['InvoiceConfigHelpAutoname']).'</td>'; $r .= $this->OverviewRowEnd($line++); $r .= $this->OverviewRowStart($line); @@ -52,7 +58,7 @@ $r .= '</select>'; $r .= '<br />'.makelink('stc/stc_new.php?lgarr=InvoiceStates','Create a new STC'); $r .= '</td>'; - $r .= '<td colspan="2" class="pre"><pre>'.$lang['InvoiceConfigHelpStateSTC'].'</pre></td>'; + $r .= '<td colspan="2" class="pre">'.$lang['InvoiceConfigHelpStateSTC'].'</td>'; $r .= $this->OverviewRowEnd($line++); @@ -74,7 +80,7 @@ $r .= '>'. myentities($f->getFullName()) ."</option>\n"; } $r .= '</select></td>'; - $r .= '<td colspan="2" class="pre"><pre>'.$lang['InvoiceConfigHelpBillableTT'].'</pre></td>'; + $r .= '<td colspan="2" class="pre">'.$lang['InvoiceConfigHelpBillableTT'].'</td>'; $r .= $this->OverviewRowEnd($line++); $r .= '<tr>'; @@ -95,7 +101,8 @@ function prepare() { global $lang,$msg,$tutos; - $this->name = $lang['InvoiceConfig']; + $this->name = $lang['InvoiceConfig']; + $this->css_class = 'configbox'; // default if (!isset($tutos['inv_autoname'])) $tutos['inv_autoname'] = '%Y-%m-&X'; Modified: trunk/php/invoice/invoice_new.php =================================================================== --- trunk/php/invoice/invoice_new.php 2013-03-12 12:56:03 UTC (rev 1013) +++ trunk/php/invoice/invoice_new.php 2013-03-13 09:32:02 UTC (rev 1014) @@ -58,7 +58,7 @@ $r .= TAX_select("T-".$f->id,$f->tax); $r .= ' </td>'; } else { - $r .= ' <td valign="top"><pre>'. $f->description .'</pre></td>'; + $r .= ' <td valign="top" class="pre">'. $f->description .'</td>'; $r .= ' <td align="right" valign="top">'. my_number_format($f->sum_single ,2) ."</td>"; $r .= ' <td align="right" valign="top">'. my_number_format($f->tax ,2) ."</td>"; } @@ -77,10 +77,10 @@ $r .= ' <td valign="top"><label for="add_'. $f->ref_id .'">'. $f->ref->getLink() ."</label></td>"; $r .= ' <td align="right" valign="top">'. my_number_format($f->items,2) ." </td>"; $r .= ' <td align="right" valign="top">'. $f->itype ." </td>"; - $r .= ' <td valign="top"><pre>'. myentities($f->description) ."</pre></td>"; - $r .= ' <td align="right" valign="top">'. my_number_format($f->sum_single,2) ."</td>"; - $r .= ' <td align="right" valign="top">'.($f->tax > 0 ? $f->tax."%":"") ."</td>"; - $r .= ' <td align="right" valign="top">'. my_number_format($f->getTotal(),2) ."</td>"; + $r .= ' <td valign="top" class="pre">'. myentities($f->description) .'</td>'; + $r .= ' <td align="right" valign="top">'. my_number_format($f->sum_single,2) .'</td>'; + $r .= ' <td align="right" valign="top">'.($f->tax > 0 ? $f->tax."%":"") .'</td>'; + $r .= ' <td align="right" valign="top">'. my_number_format($f->getTotal(),2) .'</td>'; $r .= ' <td align="left" valign="top">'. $f->currency ." </td>"; $x = preg_split('#,#',$tutos['invoice_billable_tt']); Modified: trunk/php/invoice/invoice_show.php =================================================================== --- trunk/php/invoice/invoice_show.php 2013-03-12 12:56:03 UTC (rev 1013) +++ trunk/php/invoice/invoice_show.php 2013-03-13 09:32:02 UTC (rev 1014) @@ -49,7 +49,7 @@ } $r .= ' <td align="right" valign="top">'. number_format($f->items,2,$lang['DecPoint'],$lang['ThousandPoint']) ." </td>"; $r .= ' <td align="right" valign="top">'. $f->itype ." </td>"; - $r .= ' <td valign="top"><pre>'. myentities($f->description) ."</pre></td>"; + $r .= ' <td valign="top" class="pre">'. myentities($f->description) .'</td>'; $r .= ' <td align="right" valign="top">'. number_format($f->sum_single ,2,$lang['DecPoint'],$lang['ThousandPoint']) ."</td>"; $r .= ' <td align="right" valign="top">'. number_format($f->tax ,2,$lang['DecPoint'],$lang['ThousandPoint']) ."</td>"; $r .= ' <td align="right" valign="top">'. number_format($f->getTotal(),2,$lang['DecPoint'],$lang['ThousandPoint']) ."</td>"; Modified: trunk/php/module_template/AAA_config.php =================================================================== --- trunk/php/module_template/AAA_config.php 2013-03-12 12:56:03 UTC (rev 1013) +++ trunk/php/module_template/AAA_config.php 2013-03-13 09:32:02 UTC (rev 1014) @@ -13,6 +13,7 @@ * @module AAA_config * @package AAA */ +$tutos['files'][__FILE__] = '$Rev$'; $tutos['base'] = "../.."; ini_set("include_path",".."); @@ -40,6 +41,9 @@ $r .= $this->DataTableStart(); $line = 0; + $r .= $this->OverviewRowStart(); + $r .= '<th colspan="4">'.$this->name.'</th>'; + $r .= $this->OverviewRowEnd(); // first Config Variable $r .= $this->OverviewRowStart($line); @@ -64,7 +68,8 @@ function prepare() { global $lang,$msg,$tutos; - $this->name = $lang['AAAConfig']; + $this->name = $lang['AAAConfig']; + $this->css_class = 'configbox'; if ( ! $this->user->isAdmin() ) { $msg .= $this->error("Only admins are allowed to see this"); Modified: trunk/php/note/note_show.php =================================================================== --- trunk/php/note/note_show.php 2013-03-12 12:56:03 UTC (rev 1013) +++ trunk/php/note/note_show.php 2013-03-13 09:32:02 UTC (rev 1014) @@ -64,7 +64,7 @@ $r .= $this->ContentRowEnd(); } $r .= $this->ContentRowStart(); - $r .= $this->showdata('<pre>'. format_txt($this->obj,$this->obj->note) .'</pre>',$this->width,'pre'); + $r .= $this->showdata(format_txt($this->obj,$this->obj->note),$this->width,'pre'); $r .= $this->ContentRowEnd(); // Show additional custom fields Modified: trunk/php/reminder/reminder_show.php =================================================================== --- trunk/php/reminder/reminder_show.php 2013-03-12 12:56:03 UTC (rev 1013) +++ trunk/php/reminder/reminder_show.php 2013-03-13 09:32:02 UTC (rev 1014) @@ -10,6 +10,8 @@ * @module reminder_show * @package reminder */ +$tutos['files'][__FILE__] = '$Rev$'; + $tutos['base'] = "../.."; ini_set("include_path",".."); require_once 'webelements.p3'; @@ -41,52 +43,52 @@ $r .= $this->ContentRowStart(); $r .= $this->showfield($lang['ReminderReference']); - $r .= $this->showdata($lang[$this->obj->ref->getType()]." ". $this->obj->ref->getLink(),3); + $r .= $this->showdata($lang[$this->obj->ref->getType()]." ". $this->obj->ref->getLink(),$this->width -1); $r .= $this->ContentRowEnd(); $r .= $this->ContentRowStart(); $r .= $this->showfieldc($lang['ReminderTo']); - $r .= $this->showdata( (is_object($this->obj->to) ? $this->obj->to->getLink(): $lang['HistoryDeleted']),3); + $r .= $this->showdata( (is_object($this->obj->to) ? $this->obj->to->getLink(): $lang['HistoryDeleted']),$this->width -1); $r .= $this->ContentRowEnd(); $r .= $this->ContentRowStart(); $r .= $this->showfieldc($lang['ReminderAt']); - $r .= $this->showdata($this->obj->remind_date->getLinkDateTime(),3); + $r .= $this->showdata($this->obj->remind_date->getLinkDateTime(),$this->width -1); $r .= $this->ContentRowEnd(); if ($this->obj->type != REMINDER_SIMPLE) { $r .= $this->ContentRowStart(); $r .= $this->showfieldc($lang['ReminderType']); - $r .= $this->showdata($lang[$this->obj->ref->getType()] ." ". $this->obj->ref->getLink() .": ". $this->obj->getEventName(false),3); + $r .= $this->showdata($lang[$this->obj->ref->getType()] ." ". $this->obj->ref->getLink() .": ". $this->obj->getEventName(false),$this->width -1); $r .= $this->ContentRowEnd(); if ($this->obj->offset != 0) { $r .= $this->ContentRowStart(); $r .= $this->showfieldc($lang['ReminderOffset']); - $r .= $this->showdata(reminder_offset_format($this->obj->offset),3); + $r .= $this->showdata(reminder_offset_format($this->obj->offset),$this->width -1); $r .= $this->ContentRowEnd(); } } $r .= $this->ContentRowStart(); $r .= $this->showfieldc($lang['ReminderRepeat']); - $r .= $this->showdata(reminder_offset_format($this->obj->repeat),3); + $r .= $this->showdata(reminder_offset_format($this->obj->repeat),$this->width -1); $r .= $this->ContentRowEnd(); $r .= $this->ContentRowStart(); $r .= $this->showfieldc($lang['ReminderUseMail']); - $r .= $this->showdata( ($this->obj->usemail > 0 ? $lang['yes'] : $lang['no']),3); + $r .= $this->showdata( ($this->obj->usemail > 0 ? $lang['yes'] : $lang['no']),$this->width -1); $r .= $this->ContentRowEnd(); $r .= $this->ContentRowStart(); $r .= $this->showfield($lang['ReminderDesc']); - $r .= $this->showdata('<pre>'.wordwrap(urlReplace($this->obj->desc),80).'</pre>',3); + $r .= $this->showdata(wordwrap(urlReplace($this->obj->desc),80),$this->width -1,'pre'); $r .= $this->ContentRowEnd(); // Show additional custom fields - $r .= show_custom_fields($this,$this->obj->gettype(),$this->obj,4); + $r .= show_custom_fields($this,$this->obj->gettype(),$this->obj,$this->width); // References to modules - $r .= show_module_infolists($this->user,$this->obj,4); + $r .= show_module_infolists($this->user,$this->obj,$this->width); $r .= $this->getHistoryLink(); $r .= $this->DataTableEnd(); Modified: trunk/php/scrum/log_show.php =================================================================== --- trunk/php/scrum/log_show.php 2013-03-12 12:56:03 UTC (rev 1013) +++ trunk/php/scrum/log_show.php 2013-03-13 09:32:02 UTC (rev 1014) @@ -11,6 +11,7 @@ * @package scrum */ $tutos['files'][__FILE__] = '$Rev$'; + $tutos['base'] = "../.."; ini_set("include_path",".."); require_once 'webelements.p3'; @@ -148,7 +149,7 @@ $r .= $this->ContentRowStart(); $r .= $this->showfield($lang['ScrumLogToDo']); - $r .= $this->showdata('<pre class="pre">'. format_txt($this->obj,$this->obj->todo) .'</pre>',$this->width-1); + $r .= $this->showdata(format_txt($this->obj,$this->obj->todo),$this->width-1,'pre'); $r .= $this->ContentRowEnd(); // Show additional custom fields Modified: trunk/php/scrum/scrum_config.php =================================================================== --- trunk/php/scrum/scrum_config.php 2013-03-12 12:56:03 UTC (rev 1013) +++ trunk/php/scrum/scrum_config.php 2013-03-13 09:32:02 UTC (rev 1014) @@ -41,8 +41,10 @@ $r = ''; $r .= "<form id=\"scrumconfig\" name=\"scrumconfig\" action=\"scrum_config.php\" method=\"post\">\n"; $r .= $this->DataTableStart(); - $line = 0; + $r .= $this->OverviewRowStart(); + $r .= '<th colspan="4">'.$this->name.'</th>'; + $r .= $this->OverviewRowEnd(); // first Config Variable $r .= $this->OverviewRowStart($line); @@ -50,7 +52,7 @@ $r .= '<td><input name="max_hours" value="'.$tutos['scrum_max_hours'] .'" size="2" maxlength="3" />'; $r .= '</td>'; - $r .= '<td colspan="2" class="pre"><pre>'.$lang['ScrumConfigHelpMaxHours'].'</pre></td>'; + $r .= '<td colspan="2" class="pre">'.$lang['ScrumConfigHelpMaxHours'].'</td>'; $r .= $this->OverviewRowEnd($line++); $r .= $this->OverviewRowStart($line); @@ -59,11 +61,9 @@ $r .= ' <option value="1"'.($tutos['scrum_allow_weekend'] == 1 ? ' selected="selected"':'').'>'.$lang['yes'].'</option>'; $r .= ' <option value="0"'.($tutos['scrum_allow_weekend'] == 0 ? ' selected="selected"':'').'>'.$lang['no'].'</option>'; $r .= '</select></td>'; - $r .= '<td colspan="2" class="pre"><pre>'.$... [truncated message content] |
From: <gok...@us...> - 2013-03-12 12:56:06
|
Revision: 1013 http://sourceforge.net/p/tutos/code/1013 Author: gokohnert Date: 2013-03-12 12:56:03 +0000 (Tue, 12 Mar 2013) Log Message: ----------- speedup/caching of testcase count Modified Paths: -------------- trunk/php/testmanager/testmanager.pinc Modified: trunk/php/testmanager/testmanager.pinc =================================================================== --- trunk/php/testmanager/testmanager.pinc 2013-03-12 08:28:16 UTC (rev 1012) +++ trunk/php/testmanager/testmanager.pinc 2013-03-12 12:56:03 UTC (rev 1013) @@ -647,7 +647,7 @@ $q->addFV("creator",$this->creator,"OBJ"); $q->addFV("creation",$this->creation,"DATETIME"); $query = $q->getInsert(); - if (is_object($this->ref)) { + if (is_object($this->ref) && ($this->ref->gettypeid() == usetestsuite)) { $this->ref->invalidateTCCount(); // not longer correct } } else { @@ -668,7 +668,7 @@ function delete() { $msg = ''; $this->read_reference(); - if (is_object($this->ref)) { + if (is_object($this->ref) && ($this->ref->gettypeid() == usetestsuite)) { $this->ref->invalidateTCCount(); // not longer correct } $msg = addLine($msg,parent::delete()); @@ -1504,8 +1504,16 @@ */ function setReference($name) { if ( $this->ref_id != $name ) { + $this->read_reference(); + if (is_object($this->ref) && ($this->ref->gettypeid() == usetestsuite)) { + $this->ref->invalidateTCCount(); + } $this->modified[] = array ( 'field' => 'TestsuiteRef', 'old' => $this->ref_id , 'new' => $name ); $this->ref_id = $name; + $this->read_reference(); + if (is_object($this->ref) && ($this->ref->gettypeid() == usetestsuite)) { + $this->ref->invalidateTCCount(); + } } return; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2013-03-12 08:28:19
|
Revision: 1012 http://sourceforge.net/p/tutos/code/1012 Author: gokohnert Date: 2013-03-12 08:28:16 +0000 (Tue, 12 Mar 2013) Log Message: ----------- speedup/caching of testcase count Modified Paths: -------------- trunk/php/testmanager/mtable.pinc trunk/php/testmanager/testmanager.pinc Modified: trunk/php/testmanager/mtable.pinc =================================================================== --- trunk/php/testmanager/mtable.pinc 2013-03-11 09:15:18 UTC (rev 1011) +++ trunk/php/testmanager/mtable.pinc 2013-03-12 08:28:16 UTC (rev 1012) @@ -1,6 +1,6 @@ <?php /* - * Copyright 2003 - 2012 by Gero Kohnert + * Copyright 2003 - 2013 by Gero Kohnert * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -11,8 +11,8 @@ * SVN Info $Id$ * $Author$ */ +$tutos['files'][__FILE__] = '$Rev$'; - $table['testcase'][name] = 'testcase'; $table['testcase'][Desc] = 'TUTOS testcase'; $table['testcase']['id'] = array(type => 'ID_TYPE', constraints => 'PK', Desc => 'Object ID'); @@ -27,9 +27,9 @@ $table['testcase']['t_result'] = array(type => 'ID_TYPE', constraints => '', Desc => 'result 0=fail 1=ok 2=skipped 3=untested'); $table['testcase']['t_comment'] = array(type => 'TX_TYPE', constraints => '', Desc => 'comment'); -$table['testcase']['t_activ'] = array(type => "ID_TYPE", constraints => '', Desc => "testcase is activ in a run"); -$table['testcase']['creator'] = array(type => "ID_TYPE", constraints => "NN", Desc => "creator ID"); -$table['testcase']['creation'] = array(type => "TS_TYPE", constraints => "NN", Desc => "creation date"); +$table['testcase']['t_activ'] = array(type => 'ID_TYPE', constraints => '', Desc => 'testcase is activ in a run'); +$table['testcase']['creator'] = array(type => 'ID_TYPE', constraints => 'NN', Desc => 'creator ID'); +$table['testcase']['creation'] = array(type => 'TS_TYPE', constraints => 'NN', Desc => 'creation date'); $table['testsuite'][name] = 'testsuite'; @@ -42,10 +42,11 @@ $table['testsuite']['prev_id'] = array(type => 'ID_TYPE', constraints => '', Desc => 'id of previous version'); $table['testsuite']['name'] = array(type => 'VARCHAR', size => 80, constraints => '', Desc => 'testsuite name'); $table['testsuite']['description'] = array(type => 'TX_TYPE', constraints => '', Desc => 'introduction description'); -$table['testsuite']['t_activ'] = array(type => "ID_TYPE", constraints => '', Desc => "testsuite is activ in a run"); +$table['testsuite']['t_activ'] = array(type => 'ID_TYPE', constraints => '', Desc => 'testsuite is activ in a run'); $table['testsuite']['t_state'] = array(type => 'ID_TYPE', constraints => '', Desc => 'state released or not'); -$table['testsuite']['creator'] = array(type => "ID_TYPE", constraints => "NN", Desc => "creator ID"); -$table['testsuite']['creation'] = array(type => "TS_TYPE", constraints => "NN", Desc => "creation date"); +$table['testsuite']['tccount'] = array(type => 'ID_TYPE', constraints => '', Desc => 'number of testcases'); +$table['testsuite']['creator'] = array(type => 'ID_TYPE', constraints => 'NN', Desc => 'creator ID'); +$table['testsuite']['creation'] = array(type => 'TS_TYPE', constraints => 'NN', Desc => 'creation date'); $table['testrun'][name] = 'testrun'; $table['testrun'][Desc] = 'TUTOS testrun'; @@ -58,78 +59,78 @@ $table['testrun']['tr_base_id'] = array(type => 'ID_TYPE', constraints => '', Desc => 'id of a testrun (for retest)'); $table['testrun']['stats'] = array(type => 'TX_TYPE', constraints => '', Desc => 'statistics'); $table['testrun']['t_state'] = array(type => 'ID_TYPE', constraints => 'NN', Desc => 'state'); -$table['testrun']['creator'] = array(type => "ID_TYPE", constraints => "NN", Desc => "creator ID"); -$table['testrun']['creation'] = array(type => "TS_TYPE", constraints => "NN", Desc => "creation date"); +$table['testrun']['creator'] = array(type => 'ID_TYPE', constraints => 'NN', Desc => 'creator ID'); +$table['testrun']['creation'] = array(type => 'TS_TYPE', constraints => 'NN', Desc => 'creation date'); $tableidx['testcase1'] = array( - name => "testcase_idx1", - table => "testcase", - column => array("ref_id"), - Desc => "objects with testcases", + name => 'testcase_idx1', + table => 'testcase', + column => array('ref_id'), + Desc => 'objects with testcases', ); $tableidx['testcase2'] = array( - name => "testcase_idx2", - table => "testcase", - column => array("orig_id"), - Desc => "originals of testcases", + name => 'testcase_idx2', + table => 'testcase', + column => array('orig_id'), + Desc => 'originals of testcases', ); $tableidx['testcase3'] = array( - name => "testcase_idx3", - table => "testcase", - column => array("prev_id"), - Desc => "previous of testcases", + name => 'testcase_idx3', + table => 'testcase', + column => array('prev_id'), + Desc => 'previous of testcases', ); $tableidx['testsuite1'] = array( - name => "testsuite_idx1", - table => "testsuite", - column => array("ref_id"), - Desc => "objects with testsuites", + name => 'testsuite_idx1', + table => 'testsuite', + column => array('ref_id'), + Desc => 'objects with testsuites', ); $tableidx['testsuite2'] = array( - name => "testsuite_idx2", - table => "testsuite", - column => array("prev_id"), - Desc => "objects with testsuites", + name => 'testsuite_idx2', + table => 'testsuite', + column => array('prev_id'), + Desc => 'objects with testsuites', ); $tableidx['testsuite3'] = array( - name => "testsuite_idx3", - table => "testsuite", - column => array("orig_id"), - Desc => "objects with testsuites", + name => 'testsuite_idx3', + table => 'testsuite', + column => array('orig_id'), + Desc => 'objects with testsuites', ); $tableidx['testrun1'] = array( - name => "testrun_idx1", - table => "testrun", - column => array("ref_id"), - Desc => "objects with testruns", + name => 'testrun_idx1', + table => 'testrun', + column => array('ref_id'), + Desc => 'objects with testruns', ); $tableidx['testrun2'] = array( - name => "testrun_idx2", - table => "testrun", - column => array("test_id"), - Desc => "objects with testruns", + name => 'testrun_idx2', + table => 'testrun', + column => array('test_id'), + Desc => 'objects with testruns', ); $tableidx['testrun3'] = array( - name => "testrun_idx3", - table => "testrun", - column => array("tr_base_id"), - Desc => "base of this testrun", + name => 'testrun_idx3', + table => 'testrun', + column => array('tr_base_id'), + Desc => 'base of this testrun', ); $tableidx['testrun4'] = array( - name => "testrun_idx4", - table => "testrun", - column => array("run_id"), - Desc => "run testsuite id of this testrun", + name => 'testrun_idx4', + table => 'testrun', + column => array('run_id'), + Desc => 'run testsuite id of this testrun', ); // we create a additional column in the bugtracker @@ -142,7 +143,7 @@ 'olist' => array(usetestcase,usetestrun), // allow to enter a testrun in bug search constraints => '', Desc => 'id of testcase where we found the bug', - 'lang' => "Testcase", + 'lang' => 'Testcase', 'hideempty' => true, 'searchable' => true, 'overview' => true, Modified: trunk/php/testmanager/testmanager.pinc =================================================================== --- trunk/php/testmanager/testmanager.pinc 2013-03-11 09:15:18 UTC (rev 1011) +++ trunk/php/testmanager/testmanager.pinc 2013-03-12 08:28:16 UTC (rev 1012) @@ -647,6 +647,9 @@ $q->addFV("creator",$this->creator,"OBJ"); $q->addFV("creation",$this->creation,"DATETIME"); $query = $q->getInsert(); + if (is_object($this->ref)) { + $this->ref->invalidateTCCount(); // not longer correct + } } else { $q->addWC("id",$this->id,""); $query = $q->getUpdate(); @@ -659,6 +662,20 @@ } /** + * Delete testcase from DB (simple default case) otherwise to be overwritten + * returns message to be dispplayed + */ + function delete() { + $msg = ''; + $this->read_reference(); + if (is_object($this->ref)) { + $this->ref->invalidateTCCount(); // not longer correct + } + $msg = addLine($msg,parent::delete()); + return $msg; + } + + /** * resolve a history Tag (to be called from history_show) */ function resolveHistoryTag ($f) { @@ -1217,6 +1234,7 @@ $this->activ = 0; $this->state = TS_WORK; $this->statarr = array(); + $this->tccount = null; $this->tablename = $this->dbconn->prefix .$table['testsuite'][name]; $this->run_postinit_hook(); @@ -1238,6 +1256,7 @@ $this->pos = $r->get($pos, 'pos'); $this->activ = $r->get($pos, 't_activ'); $this->state = $r->get($pos, 't_state'); + $this->tccount = $r->get($pos, 'tccount'); if ($this->state == '') { $this->state = TS_UNDEF; @@ -1561,6 +1580,7 @@ $q->addFV('pos',$this->pos,'INT'); $q->addFV('t_activ',$this->activ,'INT'); $q->addFV('t_state',$this->state,'INT'); + $q->addFV('tccount',$this->tccount,'INT'); $this->save_custom_fields($q); if ( $this->id < 0 ) { @@ -1771,18 +1791,50 @@ } /** + * mark a tccount as invalid + * set to null to force recount + */ + function invalidateTCCount() { + $this->tccount = null; + $q = 'update '.$this->tablename .' set tccount = null where id = '.$this->id; + $r = $this->dbconn->Exec($q); + $r->free(); + // go up + $this->read_reference(); + if (is_object($this->ref) && ($this->ref->gettypeid() == usetestsuite)) { + $this->ref->invalidateTCCount(); + } + + } + + /** + * store the counted testcases + * set to null to force recount + */ + function setTCCount($c) { + $this->tccount = $c; + $q = 'update '.$this->tablename .' set tccount = '.$c . ' where id = '.$this->id; + $r = $this->dbconn->Exec($q); + $r->free(); + } + + /** * count testcases * returns INT */ function countTestcases() { - $r = 0; - testcase::obj_read($this); - $r += count($this->list[usetestcase][0]); - testsuite::obj_read($this); - foreach($this->list[usetestsuite][0] as $ts) { - $r += $ts->countTestCases(); + if ($this->tccount < 1) { + $r = 0; + testcase::obj_read($this); + $r += count($this->list[usetestcase][0]); + testsuite::obj_read($this); + foreach($this->list[usetestsuite][0] as $ts) { + $r += $ts->countTestCases(); + } + $this->setTCCount($r); + return $r; } - return $r; + return $this->tccount; } /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2013-03-11 09:15:24
|
Revision: 1011 http://sourceforge.net/p/tutos/code/1011 Author: gokohnert Date: 2013-03-11 09:15:18 +0000 (Mon, 11 Mar 2013) Log Message: ----------- store sessions tutos instance specific Modified Paths: -------------- trunk/php/admin_show.php trunk/php/permission.p3 Modified: trunk/php/admin_show.php =================================================================== --- trunk/php/admin_show.php 2013-03-11 07:13:57 UTC (rev 1010) +++ trunk/php/admin_show.php 2013-03-11 09:15:18 UTC (rev 1011) @@ -423,7 +423,7 @@ } else if (ini_get('session.save_handler') == 'memcache') { $r .= $this->Sessions_Headline(); $y = array(); - $x = $tutos['memcache']->get('sessions'); + $x = $tutos['memcache']->get($this->dbconn->db->systemid.'_sessions'); $d = $tutos['memcache']->get(array_keys($x)); foreach ($d as $key => $data) { $r .= $this->Sessions_Line(unserialize_session($data),$key); @@ -433,7 +433,7 @@ foreach ($x as $key => $data) { $d = $tutos['memcache']->delete($key); } - $tutos['memcache']->set('sessions',$y); + $tutos['memcache']->set($this->dbconn->db->systemid.'_sessions',$y); $r .= $this->SubTableEnd(); $r .= "</td></tr>\n"; } Modified: trunk/php/permission.p3 =================================================================== --- trunk/php/permission.p3 2013-03-11 07:13:57 UTC (rev 1010) +++ trunk/php/permission.p3 2013-03-11 09:15:18 UTC (rev 1011) @@ -453,15 +453,6 @@ //dterror_log('new session '."\n", 3, $tutos[errlog]); $tutos['SESSID'] = session_id(); $userid = -1; - // store session id - if (ini_get('session.save_handler') == 'memcache') { - $x = $tutos['memcache']->get('sessions'); - if ($x === false) { - $x = array(); - } - $x[session_id()] = 1; - $tutos['memcache']->set('sessions',$x); - } $dbnr = $auth[0]->getDatabaseNr(); $dbconn = DB_Open($dbnr); if ($dbconn == null) { @@ -542,6 +533,15 @@ logmessage("check_user: Logged in ". $current_user->id .":". $current_user->login .":". $current_user->getFullname()); $initial_auth = true; + // store session id + if (ini_get('session.save_handler') == 'memcache') { + $x = $tutos['memcache']->get($dbconn->db->systemid.'_sessions'); + if ($x === false) { + $x = array(); + } + $x[session_id()] = 1; + $tutos['memcache']->set($dbconn->db->systemid.'_sessions',$x); + } // cut debug files short_debugfiles(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2013-03-11 07:14:03
|
Revision: 1010 http://sourceforge.net/p/tutos/code/1010 Author: gokohnert Date: 2013-03-11 07:13:57 +0000 (Mon, 11 Mar 2013) Log Message: ----------- change message to info Modified Paths: -------------- trunk/php/testmanager/testsuite_ins.php Modified: trunk/php/testmanager/testsuite_ins.php =================================================================== --- trunk/php/testmanager/testsuite_ins.php 2013-03-10 14:37:42 UTC (rev 1009) +++ trunk/php/testmanager/testsuite_ins.php 2013-03-11 07:13:57 UTC (rev 1010) @@ -48,13 +48,13 @@ * increment == true will increment version numbers */ function copy_tree($fromid,tutos_base $to,$increment) { - global $msg; + global $msg,$info; $from = getObject($to->dbconn,$fromid); if (!is_object($from)||($from->id != $fromid)) die ("no object found: ".$fromid); - $msg = addLine($msg,"Copy from: ".$from->getLink()." to ".$to->getLink()); + $info = addLine($info,"Copy from: ".$from->getLink()." to ".$to->getLink()); testsuite::obj_read($from); foreach($from->list[usetestsuite][0] as $ts) { $newts = new testsuite($to->dbconn); @@ -356,11 +356,11 @@ if ( isset($_POST['state']) ) { $statechange = $obj->setState($_POST['state']); } -# -# Parse additional custom fields -# +// +// Parse additional custom fields +// $msg = addLine($msg,parse_custom_fields($obj->gettype(),$obj)); -# other modules +// other modules $msg = addLine($msg,module_parseforms($current_user,$obj,$gotourl)); $msg = addLine($msg,$obj->run_check_hook()); @@ -382,7 +382,7 @@ if (isset($_REQUEST['ss'])) { $gotourl= addUrlParameter($gotourl,'ss='. $_REQUEST['ss'],true); } -leave_insert($dbconn,'../'.$gotourl,$msg); +leave_insert($dbconn,'../'.$gotourl,$msg,$info); /** * SVN Info $Id$ * $Author$ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2013-03-10 14:37:47
|
Revision: 1009 http://sourceforge.net/p/tutos/code/1009 Author: gokohnert Date: 2013-03-10 14:37:42 +0000 (Sun, 10 Mar 2013) Log Message: ----------- fixed related to automated tests Modified Paths: -------------- trunk/php/config_default.pinc trunk/php/installation/installation_new.php trunk/php/invoice/invoice.pinc trunk/php/mail_new.php trunk/php/product_contacts.php trunk/php/scrum/log_new.php Modified: trunk/php/config_default.pinc =================================================================== --- trunk/php/config_default.pinc 2013-03-10 14:37:05 UTC (rev 1008) +++ trunk/php/config_default.pinc 2013-03-10 14:37:42 UTC (rev 1009) @@ -772,7 +772,7 @@ // // The TUTOS Version number // -$tutos[version] = '1.9.20130306'; +$tutos[version] = '1.9.20130310'; // ### Local Variables: *** ### mode:iso-accents *** Modified: trunk/php/installation/installation_new.php =================================================================== --- trunk/php/installation/installation_new.php 2013-03-10 14:37:05 UTC (rev 1008) +++ trunk/php/installation/installation_new.php 2013-03-10 14:37:42 UTC (rev 1009) @@ -182,6 +182,11 @@ $this->obj->read_relations(); if ( isset($_GET['pid']) ) { $this->obj->product = getObject($this->dbconn,$_GET['pid']); + if (!is_object($this->obj->product)) { + $msg = addLine($msg,sprintf($lang['Err0040'],$lang['Product'])); + $this->stop = true; + return; + } $this->obj->money = $this->obj->product->price; $this->obj->currency = $this->obj->product->currency; } @@ -264,4 +269,4 @@ <!-- SVN Info $Id$ $Author$ ---> +--> \ No newline at end of file Modified: trunk/php/invoice/invoice.pinc =================================================================== --- trunk/php/invoice/invoice.pinc 2013-03-10 14:37:05 UTC (rev 1008) +++ trunk/php/invoice/invoice.pinc 2013-03-10 14:37:42 UTC (rev 1009) @@ -138,17 +138,18 @@ global $tutos,$table; $this->init($dbconn); - $this->tablename = $this->dbconn->prefix .$table['invpos'][name]; + $this->tablename = $this->dbconn->prefix .$table['invpos'][name]; $this->description = "??"; - $this->currency = $tutos[currencies][0]; - $this->items = 0; - $this->itype = "*"; - $this->inv_id = -1; - $this->ref_id = -1; - $this->ref = -1; - $this->tax = 0; - $this->ADD = false; - $this->DELETE = false; + $this->currency = $tutos[currencies][0]; + $this->items = 0; + $this->sum_single = 0.0; + $this->itype = '*'; + $this->inv_id = -1; + $this->ref_id = -1; + $this->ref = -1; + $this->tax = 0; + $this->ADD = false; + $this->DELETE = false; $this->run_postinit_hook(); } @@ -1174,7 +1175,7 @@ * Read a list of all invoices related to an object */ static function obj_read (tutos_base $obj) { - global $table;; + global $table; if (! is_object($obj) ) return; if ( $obj->id == -1 ) return; Modified: trunk/php/mail_new.php =================================================================== --- trunk/php/mail_new.php 2013-03-10 14:37:05 UTC (rev 1008) +++ trunk/php/mail_new.php 2013-03-10 14:37:42 UTC (rev 1009) @@ -285,7 +285,7 @@ if ( isset($_GET['toid']) ) { $this->to = getObject($this->dbconn,$_GET['toid']); if ( !is_object($this->to) ) { - $msg = addLine($msg,"Unknown toid". $this->to->id ." ". $_GET['toid'] ." ". $this->to->getType()); + $msg = addLine($msg,'Unknown toid:'. $_GET['toid']); $this->stop = true; return; } else if ( $this->to->getType() == "team" ) { Modified: trunk/php/product_contacts.php =================================================================== --- trunk/php/product_contacts.php 2013-03-10 14:37:05 UTC (rev 1008) +++ trunk/php/product_contacts.php 2013-03-10 14:37:42 UTC (rev 1009) @@ -1,6 +1,6 @@ <?php /** - * Copyright 2004 - 2011 by Gero Kohnert + * Copyright 2004 - 2013 by Gero Kohnert * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -13,13 +13,16 @@ * @module product_contacts * @package product */ +$tutos['files'][__FILE__] = '$Rev$'; + require_once 'webelements.p3'; require_once 'permission.p3'; +// Check if user is allowed to use it +check_user(); + require_once 'product.pinc'; require_once 'pdf.pinc'; -// Check if user is allowed to use it -check_user(); loadmodules('product','show'); loadlayout(); @@ -366,17 +369,17 @@ $this->obj = $this->obj->read($_GET['id'],$this->obj); } if ( !is_object($this->obj) ) { - $msg .= sprintf($lang['Err0012'],$lang['Address']); + $msg = addLine($msg,sprintf($lang['Err0040'],$lang['Address'])); $this->stop = true; $this->format = "html"; return; } else if (!$this->obj->see_ok() ) { - $msg .= sprintf($lang['Err0022'],$lang[$this->obj->getType()]); + $msg = aaddLine($msg,sprintf($lang['Err0022'],$lang[$this->obj->getType()])); $this->stop = true; $this->format = "html"; return; } else if ( $this->obj->id < 0 ) { - $msg .= sprintf($lang['Err0040'],$lang[$this->obj->getType()]); + $msg = addLine($msg,sprintf($lang['Err0040'],$lang[$this->obj->getType()])); $this->stop = true; $this->format = "html"; return; Modified: trunk/php/scrum/log_new.php =================================================================== --- trunk/php/scrum/log_new.php 2013-03-10 14:37:05 UTC (rev 1008) +++ trunk/php/scrum/log_new.php 2013-03-10 14:37:42 UTC (rev 1009) @@ -881,7 +881,7 @@ * prepare */ Function prepare() { - global $lang,$msg; + global $lang,$msg,$info; $this->mode = ''; $this->sprint = null; @@ -919,12 +919,12 @@ $this->obj = $this->obj->read($_GET['id'],$this->obj); $this->name = $lang['ScrumLogMod']; if ( !is_object($this->obj) ) { - $msg .= sprintf($lang['Err0040'],$lang['ScrumLogItem']); + $msg = addLine($msg,sprintf($lang['Err0040'],$lang['ScrumLogItem'])); $this->stop = true ; return; } if(!$this->obj->mod_ok()) { - $msg .= sprintf($lang['Err0024'],$lang[$this->obj->getType()]); + $msg = addLine($msg,sprintf($lang['Err0024'],$lang[$this->obj->getType()])); $this->stop = true; return; } @@ -937,14 +937,14 @@ loadmodules('product','show'); $this->name = $lang['ScrumLogManageS']; if (!is_object($this->sprint)) { - $msg .= 'no sprint'; + $msg = addLine($msg,sprintf($lang['Err0040'],$lang['Sprint'])); $this->stop = true; return; } $this->name .= ' : '. $this->sprint->getFullName(); $this->sprint->read_reference(); if (!is_object($this->sprint->pref)) { - $msg .= 'no project'; + $msg = addLine($msg,'no project'); $this->stop = true; return; } @@ -955,28 +955,28 @@ loadmodules('product','show'); $this->name = $lang['ScrumLogManageP']; if (!is_object($this->pref)) { - $msg .= 'no product'; + $msg = addLine($msg,'no product'); $this->stop = true; return; } $this->name .= ' : '. $this->pref->getFullName(); ScrumLog::obj_read($this->pref); } else if ($this->mode == 'manage_w') { - $this->nav = null; // do not show nav on top - $this->sprint->read_reference(); - $this->sprint->read_previous(); - loadmodules('product','show'); $this->name = $lang['ScrumLogManageW']; if (!is_object($this->sprint)) { - $msg .= 'no sprint'; + $msg = addLine($msg,sprintf($lang['Err0040'],$lang['Sprint'])); $this->stop = true; return; } + $this->nav = null; // do not show nav on top + $this->sprint->read_reference(); + $this->sprint->read_previous(); + loadmodules('product','show'); $this->name .= ' : '. $this->sprint->getFullName(); ScrumLog::obj_read($this->sprint); if ($this->sprint->start_dt->notime) { - $msg .= $lang['Scrum_Err001']; + $msg = addLine($msg,$lang['Scrum_Err001']); $this->stop = true; return; } @@ -1033,4 +1033,4 @@ <!-- SVN Info $Id$ $Author$ ---> +--> \ 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-03-10 14:37:09
|
Revision: 1008 http://sourceforge.net/p/tutos/code/1008 Author: gokohnert Date: 2013-03-10 14:37:05 +0000 (Sun, 10 Mar 2013) Log Message: ----------- bugfix Modified Paths: -------------- trunk/php/invoice/invoice_new.php Modified: trunk/php/invoice/invoice_new.php =================================================================== --- trunk/php/invoice/invoice_new.php 2013-03-10 13:26:38 UTC (rev 1007) +++ trunk/php/invoice/invoice_new.php 2013-03-10 14:37:05 UTC (rev 1008) @@ -32,7 +32,7 @@ /** * show ONE position */ - Function show_invpos($f) { + Function show_invpos(invpos $f) { global $lang,$tutos; $r = $this->OverviewRowStart($this->line++); @@ -252,7 +252,7 @@ } else foreach ($this->obj->pos as $i => $f) { $f->read_ref(); $showed[$f->ref->id] = 1; - $r .= $this->show_invpos($f,$this->obj); + $r .= $this->show_invpos($f); unset($f); } if ( $this->obj->change_ok() ) { @@ -276,7 +276,7 @@ $p->set($this->obj,$this->obj->ref); $p->read_ref(); if ( ! isset($showed[$p->ref->id]) ) { - $r .= $this->show_invpos($p,$this->obj); + $r .= $this->show_invpos($p); } // Time directly booked on the parent object @@ -289,7 +289,7 @@ $p->set($this->obj,$f); $p->read_ref(); if ( ! isset($showed[$p->ref->id]) ) { - $r .= $this->show_invpos($p,$this->obj); + $r .= $this->show_invpos($p); } unset($p); unset($f); @@ -300,7 +300,7 @@ foreach ($this->obj->ref->fulltasklist as $i => $f) { $p = new invpos($this->dbconn); $p->set($this->obj,$f); - $r .= $this->show_invpos($p,$this->obj); + $r .= $this->show_invpos($p); unset($p); if( $tutos[useexpenses] ) { loadmodule("expense"); @@ -310,10 +310,10 @@ continue; } invoice::obj_read($f2); - if (count($f2->list[useinvoice]) == 0 ) { + if (count($f2->list[useinvoice][2]) == 0 ) { $p = new invpos($this->dbconn); $p->set($this->obj,$f2); - $r .= $this->show_invpos($p,$this->obj); + $r .= $this->show_invpos($p); unset($p); } } @@ -326,10 +326,10 @@ installation::obj_read($this->obj->ref); foreach ($this->obj->ref->list[useinstmanagement] as $f) { invoice::obj_read($f); - if (count($f->list[useinvoice]) == 0 ) { + if (count($f->list[useinvoice][2]) == 0 ) { $p = new invpos($this->dbconn); $p->set($this->obj,$f); - $r .= $this->show_invpos($p,$this->obj); + $r .= $this->show_invpos($p); unset($p); } $f->readtimetrack(); @@ -341,7 +341,7 @@ $p->set($this->obj,$f2); $p->read_ref(); if ( ! isset($showed[$p->ref->id]) ) { - $r .= $this->show_invpos($p,$this->obj); + $r .= $this->show_invpos($p); } unset($p); unset($f2); @@ -354,10 +354,10 @@ bug::obj_read($this->obj->ref); foreach ($this->obj->ref->list[usebugtracking][1] as $f) { invoice::obj_read($f); - if (count($f->list[useinvoice]) == 0 ) { + if (count($f->list[useinvoice][2]) == 0 ) { $p = new invpos($this->dbconn); $p->set($this->obj,$f); - $r .= $this->show_invpos($p,$this->obj); + $r .= $this->show_invpos($p); unset($p); } $f->readtimetrack(); @@ -369,7 +369,7 @@ $p->set($this->obj,$f2); $p->read_ref(); if ( ! isset($showed[$p->ref->id]) ) { - $r .= $this->show_invpos($p,$this->obj); + $r .= $this->show_invpos($p); } unset($p); unset($f2); @@ -381,14 +381,12 @@ loadmodule("expense"); expense::obj_read($this->obj->ref); foreach ($this->obj->ref->list[useexpenses] as $f) { - if ( ($f->invoice == $this->obj->id) && ($this->obj->id != -1) ) { - continue; - } invoice::obj_read($f); - if (count($f->list[useinvoice]) == 0 ) { + // has pos + if (count($f->list[useinvoice][2]) == 0 ) { $p = new invpos($this->dbconn); $p->set($this->obj,$f); - $r .= $this->show_invpos($p,$this->obj); + $r .= $this->show_invpos($p); unset($p); } } @@ -462,6 +460,11 @@ $this->obj->link_id = $_GET['link_id']; if ( $this->obj->id == -1 ) { $this->obj->read_ref(); + if (!is_object($this->obj->ref)) { + $msg = addLine($msg,sprintf($lang['Err0012'],$lang['InvoiceReference'],$_GET['link_id'])); + $this->stop = true; + return; + } if ( $this->obj->ref->getType() == "product" ) { // Preset the custumer if possible $this->obj->ref->readroles(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2013-03-10 13:26:41
|
Revision: 1007 http://sourceforge.net/p/tutos/code/1007 Author: gokohnert Date: 2013-03-10 13:26:38 +0000 (Sun, 10 Mar 2013) Log Message: ----------- centralized headers generation Modified Paths: -------------- trunk/php/address_show.php trunk/php/app_show.php trunk/php/excel.pinc trunk/php/file/file.pinc trunk/php/file/file_show.php trunk/php/graph_bars.php trunk/php/layout/classic_base.pinc trunk/php/layout/mobile_layout.pinc trunk/php/layout/new2_layout.pinc trunk/php/layout/new_layout.pinc trunk/php/mail.pinc trunk/php/mailbox/mail_show.php trunk/php/url/url_show.php trunk/php/webelements.p3 Modified: trunk/php/address_show.php =================================================================== --- trunk/php/address_show.php 2013-03-09 06:17:14 UTC (rev 1006) +++ trunk/php/address_show.php 2013-03-10 13:26:38 UTC (rev 1007) @@ -6,12 +6,12 @@ * under the terms of the GNU General Public License as published by the * Free Software Foundation; version 2 of the License. * - * SVN Info $Id$ - * $Author$ + * SVN Info $Id$ + * $Author$ * - * @modulegroup address - * @module adr_ldap_overview - * @package address + * @modulegroup address + * @module adr_ldap_overview + * @package address */ $tutos['files'][__FILE__] = '$Rev$'; @@ -75,8 +75,7 @@ if ( $this->format == "vcard" ) { $b = $this->obj->getVcard(); - Header("Expires: 0"); - Header("Pragma: no-cache"); + export_headers_base(); // set content to text/calendar if (strstr($_SERVER["HTTP_USER_AGENT"],"MSIE 5") || strstr($_SERVER["HTTP_USER_AGENT"],"MSIE 6") ) { Header("Cache-Control:"); Modified: trunk/php/app_show.php =================================================================== --- trunk/php/app_show.php 2013-03-09 06:17:14 UTC (rev 1006) +++ trunk/php/app_show.php 2013-03-10 13:26:38 UTC (rev 1007) @@ -9,11 +9,11 @@ * SVN Info $Id$ * $Author$ * - * A four week calendar + * A four week calendar * - * @modulegroup appointment - * @module app_show - * @package appointment + * @modulegroup appointment + * @module app_show + * @package appointment */ $tutos['files'][__FILE__] = '$Rev$'; @@ -43,8 +43,7 @@ $r = ''; if ( $this->format == "ical") { - Header("Expires: 0"); - Header("Pragma: no-cache"); + export_headers_base(); // set content to text/calendar if (strstr($_SERVER["HTTP_USER_AGENT"],"MSIE 5") || strstr($_SERVER["HTTP_USER_AGENT"],"MSIE 6") ) { Header("Cache-Control:"); Modified: trunk/php/excel.pinc =================================================================== --- trunk/php/excel.pinc 2013-03-09 06:17:14 UTC (rev 1006) +++ trunk/php/excel.pinc 2013-03-10 13:26:38 UTC (rev 1007) @@ -1,79 +1,77 @@ <?php /** - * Copyright 2004 - 2009 by Gero Kohnert + * Copyright 2004 - 2013 by Gero Kohnert * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the + * 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. * - * base format for TUTOS excel output + * base format for TUTOS excel output * * SVN Info $Id$ * $Author$ */ +$tutos['files'][__FILE__] = '$Rev$'; class Tutos_excel { - function tutos_excel() - { - $this->wb = -1; - $this->ws = array(); - } + function tutos_excel() + { + $this->wb = -1; + $this->ws = array(); + } - function open() - { - global $tutos; + function open() + { + global $tutos; - $this->tmpname = tempnam ($tutos[sessionpath], "excel"); - $this->wb = new Workbook($this->tmpname); - } + $this->tmpname = tempnam ($tutos[sessionpath], "excel"); + $this->wb = new Workbook($this->tmpname); + } - function send($name) - { - $this->wb->close(); - $fh = fopen($this->tmpname, "rb"); - if ($fh == false) { - die("Can't read temporary file."); - } + function send($name) + { + $this->wb->close(); + $fh = fopen($this->tmpname, "rb"); + if ($fh == false) { + die("Can't read temporary file."); + } -#die ($this->tmpname); - header("Content-type: application/vnd.ms-excel"); - header("Content-Disposition: attachment; filename=". $name .".xls"); - header("Expires: 0"); - header("Cache-Control: must-revalidate, post-check=0,pre-check=0"); - header("Pragma: public"); + export_headers_base(); + header("Content-type: application/vnd.ms-excel"); + header("Content-Disposition: attachment; filename=". $name .".xls"); - fpassthru($fh); - fclose($fh); - @unlink($this->tmpname); - return; - } + fpassthru($fh); + fclose($fh); + @unlink($this->tmpname); + return; + } - function add_sheet($name) - { - global $lang; + function add_sheet($name) + { + global $lang; - $id = count($this->ws); - $this->ws[$id] =& $this->wb->add_worksheet($name); - $this->ws[$id]->set_landscape(); - $this->ws[$id]->set_header('TUTOS'); - $this->ws[$id]->set_footer("generated by TUTOS"); + $id = count($this->ws); + $this->ws[$id] =& $this->wb->add_worksheet($name); + $this->ws[$id]->set_landscape(); + $this->ws[$id]->set_header('TUTOS'); + $this->ws[$id]->set_footer("generated by TUTOS"); - return $id; - } + return $id; + } - function add_formats() - { - $this->format_default =& $this->wb->add_format(); - $this->format_default->set_size(10); + function add_formats() + { + $this->format_default =& $this->wb->add_format(); + $this->format_default->set_size(10); - $this->format_header =& $this->wb->add_format(); - $this->format_header->set_bold(1); - $this->format_header->set_align('center'); - $this->format_header->set_fg_color(43); - $this->format_header->set_color(8); - $this->format_header->set_size(12); - $this->format_header->set_pattern(); + $this->format_header =& $this->wb->add_format(); + $this->format_header->set_bold(1); + $this->format_header->set_align('center'); + $this->format_header->set_fg_color(43); + $this->format_header->set_color(8); + $this->format_header->set_size(12); + $this->format_header->set_pattern(); - } - } + } +} ?> \ No newline at end of file Modified: trunk/php/file/file.pinc =================================================================== --- trunk/php/file/file.pinc 2013-03-09 06:17:14 UTC (rev 1006) +++ trunk/php/file/file.pinc 2013-03-10 13:26:38 UTC (rev 1007) @@ -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. * - * Class to maintain files their location ,version and history + * Class to maintain files their location ,version and history * * SVN Info $Id$ * $Author$ @@ -738,10 +738,8 @@ die ('no file: '.$fname); return; } - - Header("Expires: 0"); - Header("Cache-Control:"); - Header("Pragma:"); + export_headers_base(); + Header("Content-Description: ". $this->name ); if ( ($v == '') || ($this->vsys == FILE_NOVERS) ) { $this->myreadfile ($fname); return; @@ -797,17 +795,12 @@ * preview this file (for popups) */ function preview($version,$ly) { - $fname = $this->getFilename(); if ( ! file_exists($fname) ) { return; } - - Header("Expires: 0"); - Header("Cache-control:"); - Header("Pragma:"); + export_headers_base(); Header("Content-Description: ". $this->name ); - $info = ''; $url = dirname(getBaseUrl()) .'/'. addSessionKey($this->getUrl().'&format=show'); @@ -842,9 +835,7 @@ return; } //error_log($fname."\n", 3, $tutos[errlog]); - Header("Expires: 0"); - Header("Cache-control:"); - Header("Pragma:"); + export_headers_base(); Header("Content-Description: ". $this->name ); if ( $this->filetype == 'text/plain' || $this->filetype == 'text/x-log' @@ -870,8 +861,6 @@ return; } else if ( preg_match("#\.zip$#i",$this->filename) ) { if (class_exists("ZipArchive")) { - # Header("Content-type: text/html"); - # Header("Content-Disposition: inline; filename=\"". $this->filename .".html\""); echo $ly->HTML_Start(); echo $ly->layout_start(); echo showzip($fname); Modified: trunk/php/file/file_show.php =================================================================== --- trunk/php/file/file_show.php 2013-03-09 06:17:14 UTC (rev 1006) +++ trunk/php/file/file_show.php 2013-03-10 13:26:38 UTC (rev 1007) @@ -14,6 +14,7 @@ * @package file */ $tutos['files'][__FILE__] = '$Rev$'; + $tutos['base'] = "../.."; ini_set("include_path",".."); require_once 'webelements.p3'; @@ -37,9 +38,7 @@ Function info_thumb() { global $tutos,$lang; - Header("Expires: 0"); - Header("Cache-control:"); - Header("Pragma:"); + export_headers_base(); Header("Content-Description: ". $this->name ); Header("Content-Type: application/octet-stream"); Modified: trunk/php/graph_bars.php =================================================================== --- trunk/php/graph_bars.php 2013-03-09 06:17:14 UTC (rev 1006) +++ trunk/php/graph_bars.php 2013-03-10 13:26:38 UTC (rev 1007) @@ -1,17 +1,17 @@ <?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 * Free Software Foundation; version 2 of the License. * - * SVN Info $Id$ - * $Author$ + * SVN Info $Id$ + * $Author$ * */ +$tutos['files'][__FILE__] = '$Rev$'; - require_once 'webelements.p3'; require_once 'permission.p3'; @@ -24,8 +24,7 @@ function basic (&$f,&$t0,&$t1) { global $msg; - Header("Expires: 0"); - Header("Pragma: no-cache"); + export_headers_base(); Header("content-type: image/png"); $x2 = count($f) * 110; Modified: trunk/php/layout/classic_base.pinc =================================================================== --- trunk/php/layout/classic_base.pinc 2013-03-09 06:17:14 UTC (rev 1006) +++ trunk/php/layout/classic_base.pinc 2013-03-10 13:26:38 UTC (rev 1007) @@ -41,26 +41,15 @@ global $tutos,$lang; $r = ''; - # ob_start("ob_gzhandler"); @ob_start(); if ( !isset($this->name) || empty($this->name) ) { $this->name = "TUTOS"; } - Header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); - Header("Expires: -1"); - Header("Cache-Control: no-store, no-cache, must-revalidate"); - Header("Cache-Control: max_age=0 ,post-check=0, pre-check=0",false); - Header("Pragma: no-cache"); + export_headers_base(); Header('Content-Description: a TUTOS Page -- '.preg_replace('#\n#',' ',trim($this->name))); Header("Content-Type: text/html;charset=". $lang['content_encoding']); - /** - $r .= "<?xml version=\"1.0\"?>"; - $r .= "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\""; - $r .= " \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">"; - */ - if (true) { $r .= "<?xml version=\"1.0\"?>\n"; $r .= "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n"; @@ -443,19 +432,19 @@ ); $this->addMenu($x); - # Logout - $x = array( url => "logout.php", - image => $this->theme->getImage(logout,'menu'), - text => $lang['Logout'], - info => $lang['LogoutInfo'], - category => array("logout","admin","default") - ); + // Logout + $x = array( url => "logout.php", + image => $this->theme->getImage(logout,'menu'), + text => $lang['Logout'], + info => $lang['LogoutInfo'], + category => array("logout","admin","default") + ); $this->addMenu($x); - # Team Stuff - if ( ! class_exists ("url") ) { - loadmodule("url"); - } + // Team Stuff + if ( ! class_exists ("url") ) { + loadmodule("url"); + } if ( class_exists ("url") ) { if ( $this->user->feature_ok(useurl,PERM_SEE) ) { Modified: trunk/php/layout/mobile_layout.pinc =================================================================== --- trunk/php/layout/mobile_layout.pinc 2013-03-09 06:17:14 UTC (rev 1006) +++ trunk/php/layout/mobile_layout.pinc 2013-03-10 13:26:38 UTC (rev 1007) @@ -723,12 +723,7 @@ if ( !isset($this->name) || empty($this->name) ) { $this->name = 'TUTOS'; } - Header('Last-Modified: ' . gmdate('D, d M Y H:i:s') .' GMT'); - // Header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); - Header('Expires: -1'); - Header('Cache-Control: no-store, no-cache, must-revalidate'); - Header('Cache-Control: max_age=0 ,post-check=0, pre-check=0',false); - Header('Pragma: no-cache'); + export_headers_base(); Header('Content-Description: a TUTOS Page -- '.preg_replace('#\n#',' ',trim($this->name))); Header('Content-Type: text/html;charset='. $lang['content_encoding']); Modified: trunk/php/layout/new2_layout.pinc =================================================================== --- trunk/php/layout/new2_layout.pinc 2013-03-09 06:17:14 UTC (rev 1006) +++ trunk/php/layout/new2_layout.pinc 2013-03-10 13:26:38 UTC (rev 1007) @@ -451,12 +451,7 @@ if ( !isset($this->name) || empty($this->name) ) { $this->name = 'TUTOS'; } - Header('Last-Modified: ' . gmdate('D, d M Y H:i:s') .' GMT'); - // Header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); - Header('Expires: -1'); - Header('Cache-Control: no-store, no-cache, must-revalidate'); - Header('Cache-Control: max_age=0 ,post-check=0, pre-check=0',false); - Header('Pragma: no-cache'); + export_headers_base(); Header('Content-Description: a TUTOS Page -- '.preg_replace('#\n#',' ',trim($this->name))); Header('Content-Type: text/html;charset='. $lang['content_encoding']); Modified: trunk/php/layout/new_layout.pinc =================================================================== --- trunk/php/layout/new_layout.pinc 2013-03-09 06:17:14 UTC (rev 1006) +++ trunk/php/layout/new_layout.pinc 2013-03-10 13:26:38 UTC (rev 1007) @@ -363,12 +363,7 @@ if ( !isset($this->name) || empty($this->name) ) { $this->name = 'TUTOS'; } - Header('Last-Modified: ' . gmdate('D, d M Y H:i:s') .' GMT'); - // Header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); - Header('Expires: -1'); - Header('Cache-Control: no-store, no-cache, must-revalidate'); - Header('Cache-Control: max_age=0 ,post-check=0, pre-check=0',false); - Header('Pragma: no-cache'); + export_headers_base(); Header('Content-Description: a TUTOS Page -- '.preg_replace('#\n#',' ',trim($this->name))); Header('Content-Type: text/html;charset='. $lang['content_encoding']); Modified: trunk/php/mail.pinc =================================================================== --- trunk/php/mail.pinc 2013-03-09 06:17:14 UTC (rev 1006) +++ trunk/php/mail.pinc 2013-03-10 13:26:38 UTC (rev 1007) @@ -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. * - * Give a good interface to send mail + * Give a good interface to send mail * * SVN Info $Id$ * $Author$ @@ -323,16 +323,14 @@ if(!$skip && ($mformat == "download") ) { $show_raw = true; $show_text = false; - Header("Expires: 0"); - Header("Pragma: no-cache"); + export_headers_base(); Header("Content-type: " . $this->contenttype.';charset='.$this->charset); Header("Content-Disposition: attachment; filename=\"". $this->contentdisponame ."\""); Header("Content-Description: Upload from TUTOS" ); } elseif (!$skip && ($mformat == "show") ) { $show_raw = true; $show_text = false; - Header("Expires: 0"); - Header("Pragma: no-cache"); + export_headers_base(); Header("Content-type: " . $this->contenttype.';charset='.$this->charset); } elseif (!$skip && $show_headline) { if ($mformat == 'reply') { Modified: trunk/php/mailbox/mail_show.php =================================================================== --- trunk/php/mailbox/mail_show.php 2013-03-09 06:17:14 UTC (rev 1006) +++ trunk/php/mailbox/mail_show.php 2013-03-10 13:26:38 UTC (rev 1007) @@ -17,6 +17,7 @@ * */ $tutos['files'][__FILE__] = '$Rev$'; + $tutos['base'] = "../.."; ini_set("include_path",".."); require_once 'webelements.p3'; @@ -40,8 +41,7 @@ global $lang,$tutos; if (($this->part == 0) && ($this->format == 'download')) { - Header("Expires: 0"); - Header("Pragma: no-cache"); + export_headers_base(); Header("Content-type: message/rfc822"); Header("Content-Disposition: attachment; filename=\"". $this->mno .".eml\""); Header("Content-Description: Upload from TUTOS" ); Modified: trunk/php/url/url_show.php =================================================================== --- trunk/php/url/url_show.php 2013-03-09 06:17:14 UTC (rev 1006) +++ trunk/php/url/url_show.php 2013-03-10 13:26:38 UTC (rev 1007) @@ -1,6 +1,6 @@ <?php /** - * Copyright 2000 - 2012 by Gero Kohnert + * Copyright 2000 - 2013 by Gero Kohnert * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -10,6 +10,8 @@ * @module note_show * @package note */ +$tutos['files'][__FILE__] = '$Rev$'; + $tutos['base'] = "../.."; ini_set("include_path",".."); require_once 'webelements.p3'; @@ -69,13 +71,11 @@ if (preg_match("<@BASEURL@>",$this->obj->url)) { leave_insert($this->obj->dbconn,$this->obj->getTargetUrl(),$msg,$info); } else { + export_headers_base(); Header('Status: 302 Moved Temporarily'); Header("Content-Description: TUTOS Redirect" ); - Header("Expires: -1"); // required by google chrome Header('Location: '. $this->obj->url); } - - # $this->redirect = 'http://www.tutos.de'; } } Modified: trunk/php/webelements.p3 =================================================================== --- trunk/php/webelements.p3 2013-03-09 06:17:14 UTC (rev 1006) +++ trunk/php/webelements.p3 2013-03-10 13:26:38 UTC (rev 1007) @@ -1159,13 +1159,13 @@ } /** - if ( (isset($tutos['SESSID'])) && (!isset($_COOKIE['TUTOS'])) ) { - if ( session_id() != '' ) { - //$href .= $pre . session_name() .'='. session_id(); - $href .= $pre . SID; - $pre = $pre2; - } - } + if ( (isset($tutos['SESSID'])) && (!isset($_COOKIE['TUTOS'])) ) { + if ( session_id() != '' ) { + //$href .= $pre . session_name() .'='. session_id(); + $href .= $pre . SID; + $pre = $pre2; + } + } */ return $href . $add; } @@ -1195,11 +1195,11 @@ $r .= ' <input type="hidden" name="ss" value="'. $_REQUEST['ss'] ."\" />\n"; } /** - if ( (isset($tutos['SESSID'])) && (!isset($_COOKIE['TUTOS'])) ) { - if ( SID != '' ) { - $r .= ' <input type="hidden" name="'. session_name() .'" value="'. session_id() ."\" />\n"; - } - } + if ( (isset($tutos['SESSID'])) && (!isset($_COOKIE['TUTOS'])) ) { + if ( SID != '' ) { + $r .= ' <input type="hidden" name="'. session_name() .'" value="'. session_id() ."\" />\n"; + } + } */ return $r; } @@ -2946,12 +2946,9 @@ $gotourl = addSessionKey($gotourl,true); // go to a better place + export_headers_base(); Header("Content-Description: TUTOS Redirect" ); Header('Content-Type: text/html;charset='. $lang['content_encoding']); - Header("Expires: -1"); // required by google chrome - Header('Cache-Control: no-store, no-cache, must-revalidate'); - Header('Cache-Control: max_age=0 ,post-check=0, pre-check=0',false); - Header('Pragma: no-cache'); Header("Status: 302 Moved Temporarily"); if (preg_match('#^http#',$gotourl)) { Header("Location: ". $gotourl ); @@ -2966,16 +2963,29 @@ * HTTP Header for exporting files * do not allow caching */ +function export_headers_base() { + if(headers_sent()) { + Fatal_Error('Some data has already been output to browser, can\'t send data'); + } + Header('Expires: -1'); + Header('Cache-Control: no-store, no-cache, must-revalidate'); + Header('Cache-Control: max_age=0 ,post-check=0, pre-check=0',false); + // Header("Pragma: no-cache"); // won't work with IE7 + // Header("Pragma: public"); + Header('Pragma: no-cache'); + Header('Last-Modified: ' . gmdate('D, d M Y H:i:s') .' GMT'); +} + +/** + * HTTP Header for exporting files + * do not allow caching + */ function export_headers($filename = '',$type = '',$attach = true) { if(headers_sent()) { Fatal_Error('Some data has already been output to browser, can\'t send "'.$type.'" file'); } - Header("Expires: -1"); - Header("Cache-Control: must-revalidate, post-check=0,pre-check=0"); - // Header("Pragma: no-cache"); // won't work with IE7 - Header("Pragma: public"); - Header("Content-Description: Upload from TUTOS" ); - Header('Last-Modified: ' . gmdate('D, d M Y H:i:s') .' GMT'); + export_headers_base(); + Header('Content-Description: '.$filename ); if ($filename != '') { if ($type == 'csv') { $filename .= '_'.date('YmdHis').'.csv'; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2013-03-09 06:17:17
|
Revision: 1006 http://sourceforge.net/p/tutos/code/1006 Author: gokohnert Date: 2013-03-09 06:17:14 +0000 (Sat, 09 Mar 2013) Log Message: ----------- check size Modified Paths: -------------- trunk/php/user.pinc Modified: trunk/php/user.pinc =================================================================== --- trunk/php/user.pinc 2013-03-07 19:39:00 UTC (rev 1005) +++ trunk/php/user.pinc 2013-03-09 06:17:14 UTC (rev 1006) @@ -169,14 +169,14 @@ $this->birthday = $r->getDateTime($pos, "birthday"); $this->last_seen = $r->getDateTime($pos, "last_seen"); $this->last_host = $r->get($pos, "last_host"); - $this->uid = $r->get($pos,"u_id"); - $this->admin = $r->get($pos,"admin"); - $this->disabled = $r->get($pos,"disabled"); - $this->lang = strtolower($r->get($pos, "lang")); - $this->tz = $r->get($pos, "tz"); - $this->theme = $r->get($pos, "theme"); - $this->ly = $r->get($pos, "layout"); - $this->pw_date = $r->getDateTime($pos, "pw_date"); + $this->uid = $r->get($pos,"u_id"); + $this->admin = $r->get($pos,"admin"); + $this->disabled = $r->get($pos,"disabled"); + $this->lang = strtolower($r->get($pos, "lang")); + $this->tz = $r->get($pos, "tz"); + $this->theme = $r->get($pos, "theme"); + $this->ly = $r->get($pos, "layout"); + $this->pw_date = $r->getDateTime($pos, "pw_date"); if ($this->ly == "") { $this->ly = $tutos[layouts][0]; } @@ -526,7 +526,7 @@ * this project. This will be used from task_new... */ if( is_object($project) && method_exists($project,'readroles') ) { - $project->readroles(); + $project->readroles(); foreach($project->role as $role => $xf) { if( isset($project->role[$role]) && is_array($project->role[$role]) ) { foreach($project->role[$role] as $i => $o) { @@ -761,7 +761,7 @@ * Save entry */ function save() { - global $current_user,$tutos; + global $table,$current_user,$tutos; if ( $tutos[demo] == 1 ) { return "Sorry Demo does not allow change of UserEntry<br />"; @@ -771,7 +771,7 @@ $q = new query($this->dbconn); $q->setTable($this->tablename); - $q->addFV("login",$this->login,"STRING",20); + $q->addFV("login",$this->login,"STRING",$table['people']['login'][size]); if ( $this->updatepw == 1 ) { $x = new TUTOS_Date_Time(); $q->addFV("pw",$this->pw,"PASSWORD"); @@ -780,16 +780,16 @@ $q->addFV("admin",$this->admin,"INT"); $q->addFV("disabled",$this->disabled,"INT"); $q->addFV("lang",$this->lang,"STRING",5); - $q->addFV("tz",$this->tz,"STRING",30); - $q->addFV("theme",$this->theme,"STRING",10); - $q->addFV("layout",$this->ly,"STRING",30); + $q->addFV("tz",$this->tz,"STRING",$table['people']['tz'][size]); + $q->addFV("theme",$this->theme,"STRING",$table['people']['theme'][size]); + $q->addFV("layout",$this->ly,"STRING",$table['people']['layout'][size]); $q->addFV("weekstart",$this->weekstart,"INT"); $h = ''; foreach($this->workday as $i => $f) { $h .= $f .','; } - $q->addFV("workdays",$h,"STRING",60); + $q->addFV("workdays",$h,"STRING",$table['people']['workdays'][size]); $h = ''; foreach ($this->nameday as $i => $f) { @@ -797,7 +797,7 @@ $h .= $i .','; } } - $q->addFV("namedays",$h,"STRING",60); + $q->addFV("namedays",$h,"STRING",$table['people']['namedays'][size]); $h = ''; foreach($this->holiday as $i => $f) { @@ -805,7 +805,7 @@ $h .= $i .','; } } - $q->addFV("holidays",$h,"STRING",60); + $q->addFV("holidays",$h,"STRING",$table['people']['holidays'][size]); $h = ''; foreach($this->rowiconsbefore as $i => $f) { @@ -813,7 +813,7 @@ $h .= $i .','; } } - $q->addFV("rowiconsbefore",$h,"STRING",30); + $q->addFV("rowiconsbefore",$h,"STRING",$table['people']['rowiconsbefore'][size]); $h = ''; foreach($this->rowiconsafter as $i => $f) { @@ -821,7 +821,7 @@ $h .= $i .','; } } - $q->addFV("rowiconsafter",$h,"STRING",30); + $q->addFV("rowiconsafter",$h,"STRING",$table['people']['rowiconsafter'][size]); $this->save_custom_fields($q,"people"); @@ -958,6 +958,7 @@ * per page update */ function update($initial = false) { + global $table; $lh = "not set"; if ( isset($_SERVER['HTTP_X_FORWARDED_FOR']) ) { @@ -972,7 +973,7 @@ $q = new query($this->dbconn); $q->setTable($this->tablename); $q->addFV('last_seen',$this->last_seen,'DATETIME'); - $q->addFV('last_host',$this->last_host,"STRING",20); + $q->addFV('last_host',$this->last_host,"STRING",$table['people']['last_host'][size]); # $q->addFV("creator",$this->creator,"OBJ"); # $q->addFV("creation",$this->creation,"DATETIME"); $q->addWC('login',$this->login,'STRING'); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2013-03-07 19:39:03
|
Revision: 1005 http://sourceforge.net/p/tutos/code/1005 Author: gokohnert Date: 2013-03-07 19:39:00 +0000 (Thu, 07 Mar 2013) Log Message: ----------- more test Modified Paths: -------------- trunk/test.sh Modified: trunk/test.sh =================================================================== --- trunk/test.sh 2013-03-07 19:38:18 UTC (rev 1004) +++ trunk/test.sh 2013-03-07 19:39:00 UTC (rev 1005) @@ -323,9 +323,14 @@ checklist/checkfield_show.php?id=$NOID&lg=$LG counter/counter_overview.php?lg=$LG counter/counter_overview.php?id=$ADR&lg=$LG + counter/counter_overview.php?id=$ADR&format=stat&lg=$LG + counter/counter_overview.php?id=$NOID&lg=$LG + counter/counter_overview.php?id=$NOID&format=stat&lg=$LG counter/counter_show.php?lg=$LG counter/counter_show.php?id=$ADR&lg=$LG counter/counter_show.php?id=$NOID&lg=$LG + counter/counter_show.php?id=$ADR&format=stat&lg=$LG + counter/counter_show.php?id=$NOID&format=stat&lg=$LG doctracker/doc_new.php?lg=$LG doctracker/doc_ins.php?lg=$LG doctracker/doc_show.php?lg=$LG @@ -503,7 +508,10 @@ scrum/sprint_show.php?id=$P_ID&lg=$LG scrum/sprint_select.php?lg=$LG scrum/sprint_overview.php?lg=$LG + scrum/sprint_overview.php?p_id=$NOID&lg=$LG scrum/sprint_overview.php?p_id=$P_ID&lg=$LG + scrum/sprint_overview.php?w_id=$NOID&lg=$LG + scrum/sprint_overview.php?w_id=$ADR&lg=$LG stc/stc_ins.php?lg=$LG stc/stc_new.php?lg=$LG stc/stc_overview.php?lg=$LG This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2013-03-07 19:38:21
|
Revision: 1004 http://sourceforge.net/p/tutos/code/1004 Author: gokohnert Date: 2013-03-07 19:38:18 +0000 (Thu, 07 Mar 2013) Log Message: ----------- fixed layout issue with opera on login Modified Paths: -------------- trunk/php/layout/layout_base.pinc trunk/php/layout/new_base.pinc trunk/php/login.pinc Modified: trunk/php/layout/layout_base.pinc =================================================================== --- trunk/php/layout/layout_base.pinc 2013-03-07 19:37:47 UTC (rev 1003) +++ trunk/php/layout/layout_base.pinc 2013-03-07 19:38:18 UTC (rev 1004) @@ -831,7 +831,7 @@ $r = ''; if ( isset($tarr['hide']) && ($tarr['hide'] == true) ) return $r; - # if ( isset($tarr['hideempty']) && ($tarr['hideempty'] == true) && ($obj->$tarr['field'] == '') ) return $r; +# if ( isset($tarr['hideempty']) && ($tarr['hideempty'] == true) && ($obj->$tarr['field'] == '') ) return $r; $r .= edit_custom_field_single($this,$tarr['field'],$tarr,0,$obj,$colsd+$colsf); @@ -1048,7 +1048,7 @@ global $lang; $r = $this->ContentRowStart(); - $r .= ' <th colspan="'. $this->width ."\">\n"; + $r .= ' <th'.($this->width > 1 ? ' colspan="'. $this->width.'"':'').'>'; if ($text != -1) { $r .= $text; } else if (is_object($this->obj)) { @@ -1056,7 +1056,7 @@ } else { $r .= ' '; } - $r .= " </th>\n"; + $r .= "</th>\n"; $r .= $this->ContentRowEnd(); return $r; } Modified: trunk/php/layout/new_base.pinc =================================================================== --- trunk/php/layout/new_base.pinc 2013-03-07 19:37:47 UTC (rev 1003) +++ trunk/php/layout/new_base.pinc 2013-03-07 19:38:18 UTC (rev 1004) @@ -335,7 +335,7 @@ */ Function showdata($text,$cols = 1,$class = '') { $r = ''; - $r .= '<td colspan="'. $cols .'" class="data'.($class != '' ? ' '.$class:'').'">'; + $r .= ' <td'.($cols > 1 ? ' colspan="'. $cols .'"':'').' class="data'.($class != '' ? ' '.$class:'').'">'; $r .= ( $text == '' ? ' ' : $text); $r .= "</td>\n"; return $r; Modified: trunk/php/login.pinc =================================================================== --- trunk/php/login.pinc 2013-03-07 19:37:47 UTC (rev 1003) +++ trunk/php/login.pinc 2013-03-07 19:38:18 UTC (rev 1004) @@ -196,7 +196,7 @@ $this->width = 1; $r .= $this->SelectTableStart(); $r .= $this->headline($lang['MOTD']); - $r .= $this->ContentRowStart('motd'); + $r .= $this->ContentRowStart(); $xx = ''; if ( function_exists('is_executable') && is_executable(getcwd().'/'.$motd) ) { $p = popen ($motd,'r'); @@ -208,7 +208,7 @@ } else { $xx .= file_get_contents(getcwd().'/'.$motd); } - $r .= $this->showdata($xx); + $r .= $this->showdata($xx,1,'motd'); $r .= $this->ContentRowEnd(); $r .= $this->SelectTableEnd(); $r .= " </div>\n"; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |