[Tutos-commits] SF.net SVN: tutos:[847] trunk/php
Projects / CRM / PLM / Calendar / Tasks / SCRUM / Test / Inventory
Brought to you by:
gokohnert
From: <gok...@us...> - 2012-11-29 09:21:40
|
Revision: 847 http://tutos.svn.sourceforge.net/tutos/?rev=847&view=rev Author: gokohnert Date: 2012-11-29 09:21:29 +0000 (Thu, 29 Nov 2012) Log Message: ----------- fixes for mobile layout Modified Paths: -------------- trunk/php/handler.pinc trunk/php/ldap/ldap_show.php trunk/php/timetrack/timetrack_select.php trunk/php/webelements.p3 Modified: trunk/php/handler.pinc =================================================================== --- trunk/php/handler.pinc 2012-11-29 09:06:49 UTC (rev 846) +++ trunk/php/handler.pinc 2012-11-29 09:21:29 UTC (rev 847) @@ -13,8 +13,7 @@ /** * run handler for given input and type */ -Function handle($type,&$obj,$arg) -{ +Function handle($type,&$obj,$arg) { global $tutos; $r = ''; @@ -27,7 +26,7 @@ if (file_exists($tutos['base'] .'/php/'. $f)) { include_once $tutos['base'] .'/php/'. $f; if (class_exists($i)) { - $x = new $i($obj->dbconn); + $x = new $i(); if ( ! is_subclass_of($x,'tutos_handler') ) { Fatal_Error('Wrong handler class: '. $i); } Modified: trunk/php/ldap/ldap_show.php =================================================================== --- trunk/php/ldap/ldap_show.php 2012-11-29 09:06:49 UTC (rev 846) +++ trunk/php/ldap/ldap_show.php 2012-11-29 09:21:29 UTC (rev 847) @@ -87,22 +87,35 @@ for ($k = 0;$k < $d['count'];$k++) { if ( preg_match("#certificate#i",$y) ) { // TODO make some cool OPSENSSL Stuff here - $r .= '<pre>skipped ('. strlen($d[$k]) .' Bytes)</pre><br />'."\n"; + //$r .= '<pre>skipped ('. strlen($d[$k]) .' Bytes)</pre><br />'."\n"; //$r .= "<pre>". $d[$k] ."</pre><br />"; $x2 = openssl_x509_read(der2pem($d[$k])); $x3 = openssl_x509_parse($x2); + $r .= '<ul>'."\n"; foreach ($x3 as $xi => $x4) { - $r .= $xi .' = '; + $r .= ' <li>'.$xi .' = '; if (is_array($x4)) { + $r .= ' <ul>'; foreach ($x4 as $xii => $x5) { - $r .= "<br /> ".$x5; + $r .= ' <li>'.$xii .' = '; + if (is_array($x5)) { + $r .= ' <ul>'; + foreach ($x5 as $xiii => $x6) { + $r .= ' <li>'.$x6.'</li>'."\n"; + } + $r .= ' </ul>'; + } else + $r .= $x5; + $r .= "</li>\n"; } + $r .= ' </ul>'."\n"; } else $r .= $x4 ; - $r .= "<br />\n"; + $r .= " </li>\n"; } - while ($xxx = openssl_error_string()) - $r .= $xxx . " 4<br />\n"; + $r .= ' </ul>'; + // while ($xxx = openssl_error_string()) + // $r .= $xxx . " 4<br />\n"; } else if ( $y == "jpegPhoto" ) { $r .= '<br /><pre>skipped ('. strlen($d[$k]) .' Bytes)</pre><br />'."\n"; } else if (preg_match("#facsimile#i",$y)){ Modified: trunk/php/timetrack/timetrack_select.php =================================================================== --- trunk/php/timetrack/timetrack_select.php 2012-11-29 09:06:49 UTC (rev 846) +++ trunk/php/timetrack/timetrack_select.php 2012-11-29 09:21:29 UTC (rev 847) @@ -84,7 +84,7 @@ $r .= $this->ContentRowStart('ext'); $r .= $this->showfieldc($lang['TimetrackRef'],0,'ref'); - $r .= $this->showdata(select_from_array_or_input($this->obj,"ref",null,1,array(useprojects,usebugtracking,usetaskmanagement)),2); + $r .= $this->showdata(select_from_array_or_input($this,"ref",null,1,array(useprojects,usebugtracking,usetaskmanagement)),2); $r .= $this->ContentRowEnd(); // add custom selectors Modified: trunk/php/webelements.p3 =================================================================== --- trunk/php/webelements.p3 2012-11-29 09:06:49 UTC (rev 846) +++ trunk/php/webelements.p3 2012-11-29 09:21:29 UTC (rev 847) @@ -57,6 +57,7 @@ $ly = $current_user->ly; } else $ly = 'classic_layout'; + // use mobile layout if OK here if (isset($tutos['mobileok']) && $tutos['mobileok'] == 1 && $tutos['mobilely'] == 1) { // check Browser ID @@ -73,8 +74,16 @@ $ly = 'mobile_layout'; } } + } + // Fallback if not ready for mobile + if ( preg_match('#^mobile#',$ly) && (!isset($tutos['mobileok']) || $tutos['mobileok'] != 1) ) { + if ( isset($current_user->ly) && !empty($current_user->ly) ) { + $ly = $current_user->ly; + } else + $ly = 'classic_layout'; } + if ( file_exists(getcwd()."/".$tutos['base'].'/php/layout/'. $ly .'.pinc') ) { require_once 'layout/'. $ly .'.pinc'; } else if ( file_exists(getcwd()."/".$tutos['base'].'/php/layout/'. $ly .'_layout.pinc') ) { @@ -821,8 +830,8 @@ /** * format a value for use with csv files from * "http://de2.php.net/manual/en/function.fputcsv.php#87120" -* output is always converted to target_enc encoding -*/ + * output is always converted to target_enc encoding + */ function txt2csv ($val,$delimiter = '',$enclosure = '') { global $tutos; @@ -922,7 +931,7 @@ $text = preg_replace('#</([BIU])>#im' ,'</$1>',$text); // $text = preg_replace('#"#m' ,'"',$text); if ($ureplace) - $text = urlReplace($text,0); + $text = urlReplace($text,0); if ($ireplace) $text = ImgReplace($text,$obj); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |