- Timestamp:
- 11/03/11 13:53:15 (12 years ago)
- Location:
- trunk/phpgwapi
- Files:
-
- 20 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/phpgwapi/cron/asyncservices.php
r86 r5141 24 24 $_GET['domain'] = isset($_SERVER['argv'][1]) ? $_SERVER['argv'][1] : 'default'; 25 25 $path_to_egroupware = realpath(dirname(__FILE__).'/../..'); // need to be adapted if this script is moved somewhere else 26 26 $_SESSION['isCrun'] = true; 27 27 // remove the comment from one of the following lines to enable loging 28 28 // define('ASYNC_LOG','C:\\async.log'); // Windows -
trunk/phpgwapi/inc/class.accounts.inc.php
r394 r5141 364 364 } 365 365 366 function delete($accountid )366 function delete($accountid = '') 367 367 { 368 368 $this->cache_invalidate($accountid); 369 accounts_::delete($accountid);369 parent::delete($accountid); 370 370 371 371 // delete all acl_entries belonging to that user or group -
trunk/phpgwapi/inc/class.accounts_ldap.inc.php
r3456 r5141 64 64 /* jakjr: using justthese with ldap_search */ 65 65 $justthese = array("uidnumber", "gidnumber", "uid", "cn", "givenname", "sn", "mail", "phpgwaccountstatus", "phpgwaccountexpires", "phpgwaccounttype", "phpgwlastpasswdchange","phpgwagreeterm","telephonenumber","mobile","homephone","datanascimento"); 66 $sri = @ldap_search($this->ds, $this->user_context, ("(&(uidnumber=" . (int)$this->account_id.")( phpgwaccounttype=u))"), $justthese);66 $sri = @ldap_search($this->ds, $this->user_context, ("(&(uidnumber=" . (int)$this->account_id.")(|(phpgwaccounttype=u)(phpgwaccounttype=s)))"), $justthese); 67 67 } 68 68 if(!$sri) … … 427 427 if(!$allValues[0]['dn']) 428 428 { 429 $sri = ldap_search($this->ds, $this->user_context, "(&(uid=" . (string)$account_lid.")( phpgwaccounttype=u))");429 $sri = ldap_search($this->ds, $this->user_context, "(&(uid=" . (string)$account_lid.")(|(phpgwaccounttype=u)(phpgwaccounttype=s)))"); 430 430 if($sri) 431 431 { … … 477 477 if($_type == 'accounts' || $_type == 'both') 478 478 { 479 $filter = "(&(uidnumber=*)( phpgwaccounttype=u)";479 $filter = "(&(uidnumber=*)(|(phpgwaccounttype=u)(phpgwaccounttype=s))"; 480 480 if (!empty($query) && $query != '*') 481 481 { … … 600 600 if (!isset($to_ldap[$which])) return False; 601 601 602 $sri = ldap_search($this->ds, $this->user_context, '(&('.$to_ldap[$which].'=' . (string)$name . ')( phpgwaccounttype=u))', array("uidnumber"));602 $sri = ldap_search($this->ds, $this->user_context, '(&('.$to_ldap[$which].'=' . (string)$name . ')(|(phpgwaccounttype=u)(phpgwaccounttype=s)))', array("uidnumber")); 603 603 $allValues = ldap_get_entries($this->ds, $sri); 604 604 … … 651 651 /* jakjr: using justthese with ldap_search */ 652 652 $justthese = array("uid","mail","surname","cn","phpgwaccounttype"); 653 $sri = @ldap_search($this->ds, $this->user_context, '(&(uidnumber=' . (int)$account_id . ')( phpgwaccounttype=u))', $justthese);653 $sri = @ldap_search($this->ds, $this->user_context, '(&(uidnumber=' . (int)$account_id . ')(|(phpgwaccounttype=u)(phpgwaccounttype=s)))', $justthese); 654 654 if(!$sri) 655 655 return False; … … 667 667 $allValues = array(); 668 668 /* jakjr: using justthese with ldap_search */ 669 $sri = @ldap_search($this->ds, $this->user_context, '(&(uidnumber=' . (int)$account_id . ')( phpgwaccounttype=u))', array("phpgwaccounttype"));669 $sri = @ldap_search($this->ds, $this->user_context, '(&(uidnumber=' . (int)$account_id . ')(|(phpgwaccounttype=u)(phpgwaccounttype=s)))', array("phpgwaccounttype")); 670 670 if(!$sri) 671 671 return False; … … 1115 1115 else 1116 1116 { 1117 $sri = @ldap_search($this->ds, $this->user_context, '(&(uidnumber=' . (int)$account_id . ')( phpgwAccountType=u))', $justthese);1117 $sri = @ldap_search($this->ds, $this->user_context, '(&(uidnumber=' . (int)$account_id . ')(|(phpgwaccounttype=u)(phpgwaccounttype=s)))', $justthese); 1118 1118 } 1119 1119 if(!$sri) … … 1176 1176 { 1177 1177 $allValues = array(); 1178 $sri = @ldap_search($this->ds, $this->user_context, '(&(uidnumber=' . (int)$account_id . ')( phpgwaccounttype=u))');1178 $sri = @ldap_search($this->ds, $this->user_context, '(&(uidnumber=' . (int)$account_id . ')(|(phpgwaccounttype=u)(phpgwaccounttype=s)))'); 1179 1179 if(!$sri) 1180 1180 return False; … … 1190 1190 { 1191 1191 $allValues = array(); 1192 $sri = @ldap_search($this->ds, $this->user_context, '(&(mail=' . $mail . ')( phpgwaccounttype=u))');1192 $sri = @ldap_search($this->ds, $this->user_context, '(&(mail=' . $mail . ')(|(phpgwaccounttype=u)(phpgwaccounttype=s)))'); 1193 1193 if(!$sri) 1194 1194 return False; -
trunk/phpgwapi/inc/class.asyncservice.inc.php
r3395 r5141 701 701 702 702 //$cronline .= $this->php.' -q '.$this->cronline."\n"; 703 $php_version = preg_match("/5./",phpversion()) ? "php 5" : "php4";704 $cronline .= "cd " . PHPGW_SERVER_ROOT . "/phpgwapi/cron/; $php_version -c /etc/ $php_version/apache2/php.ini -q " . PHPGW_SERVER_ROOT . "/phpgwapi/cron/asyncservices.php default\n";703 $php_version = preg_match("/5./",phpversion()) ? "php" : "php4"; 704 $cronline .= "cd " . PHPGW_SERVER_ROOT . "/phpgwapi/cron/; $php_version -c /etc/php.ini -q " . PHPGW_SERVER_ROOT . "/phpgwapi/cron/asyncservices.php default\n"; 705 705 //echo "<p>Installing: '$cronline'</p>\n"; 706 706 fwrite($crontab,$cronline); -
trunk/phpgwapi/inc/class.auth_ldap.inc.php
r4886 r5141 56 56 } 57 57 /* find the dn for this uid, the uid is not always in the dn */ 58 $attributes = array('uid','dn','givenName','sn','mail','uidNumber','gidNumber','usercertificate'); 58 $attributes = array('uid','dn','givenName','sn','mail','uidNumber','gidNumber'); 59 59 60 $filter = $GLOBALS['phpgw_info']['server']['ldap_search_filter'] ? $GLOBALS['phpgw_info']['server']['ldap_search_filter'] : '(uid=%user)'; 60 61 $filter = str_replace(array('%user','%domain'),array($username,$GLOBALS['phpgw_info']['user']['domain']),$filter); … … 73 74 { 74 75 if($allValues[0]['uid'][0] != $username) 75 {76 return false;77 }78 }79 if($_SESSION['login_certificate'])80 {81 # certificate not equal, not authenticate.82 if($allValues[0]['usercertificate'][0] != $_SESSION['login_certificate'])83 76 { 84 77 return false; -
trunk/phpgwapi/inc/class.browser.inc.php
r4304 r5141 70 70 elseif(ereg('Gecko',$HTTP_USER_AGENT,$log_version)) 71 71 { 72 if(isset($log_version[1])) 72 73 $this->BROWSER_VER = $log_version[1]; 73 74 $this->BROWSER_AGENT = 'MOZILLA'; -
trunk/phpgwapi/inc/class.common.inc.php
r4935 r5141 1839 1839 case 46: $s .= lang('Recurrent appointments must have a final date').'.'; 1840 1840 break; 1841 case 47: $s .= lang(' End time can not be less than or equal to starttime').'.';1841 case 47: $s .= lang('The starting time can not be greater than end time').'.'; 1842 1842 break; 1843 1843 case 99: $s .= lang('The attachment is to big').'.'; -
trunk/phpgwapi/inc/class.sessions.inc.php
r4989 r5141 53 53 */ 54 54 var $passwd; 55 /** 56 * @var string current user certificate, if present 57 */ 58 var $certificate; 55 59 56 /** 60 57 * @var int current user db/ldap account id … … 466 463 $this->passwd_type = $passwd_type; 467 464 } 468 if($_SESSION['login_certificate']) 469 { 470 $this->certificate = $_SESSION['login_certificate']; 471 } 472 else 473 { 474 $this->certificate = false; 475 } 465 476 466 $this->clean_sessions(); 477 467 //sessions_::split_login_domain($login,$this->account_lid,$this->account_domain); … … 575 565 576 566 $this->appsession('password','phpgwapi',base64_encode($this->passwd)); 577 $this->appsession('browser_agent','phpgwapi',$GLOBALS['browser']->BROWSER_AGENT);578 if($this->certificate) $this->appsession('certificate','phpgwapi',$this->certificate);579 567 if ($GLOBALS['phpgw']->acl->check('anonymous',1,'phpgwapi')) 580 568 { -
trunk/phpgwapi/inc/class.vfs_shared.inc.php
r5036 r5141 419 419 420 420 /*! 421 * @function get_size_all422 * @abstract Determine size of location423 * @owner_id string uid owner424 */425 426 function get_size_all($owner_id) { return 0; }427 428 /*!429 421 * @function get_size 430 422 * @abstract Determine size of location -
trunk/phpgwapi/inc/class.vfs_sql.inc.php
r5036 r5141 2513 2513 } 2514 2514 2515 function get_size_all($owner_id)2516 {2517 $query = $GLOBALS['phpgw']->db->query ("SELECT Sum(size) FROM phpgw_vfs WHERE owner_id = '".$owner_id."'" .2518 $this->extra_sql(array ('query_text' => VFS_SQL_SELECT)));2519 $GLOBALS['phpgw']->db->next_record ();2520 2521 $size = $GLOBALS['phpgw']->db->Record[0];2522 2523 return $size;2524 }2525 2526 2515 /*return the total number of files in path*/ 2527 2516 function count_files($data){ -
trunk/phpgwapi/inc/csstidy/class.csstidy.php
r3052 r5141 932 932 * @version 1.0 933 933 */ 934 function is_important(&$value)934 static function is_important(&$value) 935 935 { 936 936 return (!strcasecmp(substr(str_replace($GLOBALS['csstidy']['whitespace'],'',$value),-10,10),'!important')); -
trunk/phpgwapi/inc/functions.inc.php
r5036 r5141 345 345 } 346 346 } 347 348 $ifMobile = false;349 $browser = CreateObject('phpgwapi.browser');350 switch ( $browser->get_platform() )351 {352 case browser::PLATFORM_IPHONE:353 case browser::PLATFORM_IPOD:354 case browser::PLATFORM_IPAD:355 case browser::PLATFORM_BLACKBERRY:356 case browser::PLATFORM_NOKIA:357 case browser::PLATFORM_ANDROID:358 $ifMobile = true;359 break;360 }361 362 if( $ifMobile )363 {364 Header('Location: '.$GLOBALS['phpgw_info']['server']['webserver_url'].'/login.php?cd=66');365 exit;366 }367 else368 {369 347 // this removes the sessiondata if its saved in the URL 370 348 $query = preg_replace('/[&]?sessionid(=|%3D)[^&]+&kp3(=|%3D)[^&]+&domain=.*$/','',$_SERVER['QUERY_STRING']); … … 372 350 exit; 373 351 } 374 }375 352 376 353 $GLOBALS['phpgw']->datetime = CreateObject('phpgwapi.date_time'); -
trunk/phpgwapi/setup/setup.inc.php
r4186 r5141 14 14 $setup_info['phpgwapi']['name'] = 'phpgwapi'; 15 15 $setup_info['phpgwapi']['title'] = 'API'; 16 $setup_info['phpgwapi']['version'] = '2. 2.1';17 $setup_info['phpgwapi']['versions']['current_header'] = '2. 2';16 $setup_info['phpgwapi']['version'] = '2.4.0'; 17 $setup_info['phpgwapi']['versions']['current_header'] = '2.4.0'; 18 18 $setup_info['phpgwapi']['enable'] = 3; 19 19 $setup_info['phpgwapi']['app_order'] = 1; -
trunk/phpgwapi/templates/default/css/base.css
r3019 r5141 83 83 } 84 84 85 ul85 #ul 86 86 { 87 87 list-style-image: url( "../images/orange-ball.png" ); -
trunk/phpgwapi/templates/default/js/listUsers.js
r4992 r5141 54 54 function execAction(action){ 55 55 56 if(window.opener){ 57 try{ 58 doc = window.opener.document; 59 select = doc.getElementById('user_list'); 60 } 61 catch(e){ 62 doc = window.document; 63 } 64 } 65 else{ 56 if(!window.opener) 66 57 doc = window.document; 67 } 58 else 59 doc = window.opener.document; 68 60 69 61 select = doc.getElementById('user_list'); -
trunk/phpgwapi/templates/default/login.tpl
r4994 r5141 12 12 <script language="Javascript"> 13 13 <!-- 14 15 16 function isCompat(){17 version = (navigator.userAgent.match( /.+ie\s([\d.]+)/i ) || [])[1];18 if(parseInt(version)==7 && (/trident\/\d/i.test(navigator.userAgent)))19 alert("{compatIE8}");20 }21 14 22 15 function setLogin(){ … … 139 132 </script> 140 133 </HEAD> 141 <body scroll="no" style="overflow:hidden" onLoad="javascript:getLogin() ;isCompat();" bgcolor="#ffffff">134 <body scroll="no" style="overflow:hidden" onLoad="javascript:getLogin()" bgcolor="#ffffff"> 142 135 <form id="loginForm" name="flogin" method="post" action="{login_url}" {autocomplete}> 143 136 <div id="conteudo"> -
trunk/phpgwapi/templates/default/login_default.php
r5042 r5141 12 12 \**************************************************************************/ 13 13 14 14 function check_logoutcode($code) 15 15 { 16 16 switch($code) … … 57 57 } 58 58 } 59 60 $ifMobile = false; 61 $browser = CreateObject('phpgwapi.browser'); 62 switch ( $browser->get_platform() ) 63 { 64 case browser::PLATFORM_IPHONE: 65 case browser::PLATFORM_IPOD: 66 case browser::PLATFORM_IPAD: 67 case browser::PLATFORM_BLACKBERRY: 68 case browser::PLATFORM_NOKIA: 69 case browser::PLATFORM_ANDROID: 70 $ifMobile = true; 71 break; 72 } 73 74 if( $ifMobile && $_GET['dont_redirect_if_moble'] != 1 ) 75 { 76 $GLOBALS['phpgw']->redirect_link('/mobile/login.php'); 77 } 78 else 79 { 59 function troca_espaco_por_mais($pem_data) 60 { 61 $begin = "CERTIFICATE-----"; 62 $end = "-----END"; 63 $aux = substr($pem_data, strpos($pem_data, $begin)+strlen($begin)); 64 $aux = substr($aux, 0, strpos($aux, $end)); 65 $aux = strtr($aux,' ','+'); 66 $aux = '-----BEGIN CERTIFICATE-----'.$aux.'-----END CERTIFICATE-----'; 67 return $aux; 68 } 80 69 /* Program starts here */ 70 81 71 if($GLOBALS['phpgw_info']['server']['auth_type'] == 'http' && isset($_SERVER['PHP_AUTH_USER'])) 82 72 { … … 124 114 unset($sslattributes); 125 115 } 126 116 if(isset($_POST['certificado']) && $_POST['certificado']) 117 { 118 119 $_SESSION['login_certificado'] = troca_espaco_por_mais(str_replace(chr(0x0D).chr(0x0A),chr(0x0A),str_replace(chr(0x0A).chr(0x0A),chr(0x0A),$_POST['certificado']))); 120 } 127 121 if( isset( $_GET[ 'cd' ] ) && ( $_GET['cd']=='1' || $_GET['cd'] == 10 ) ) 128 122 { … … 266 260 */ 267 261 $GLOBALS['phpgw_info']['user']['preferences']['common']['lang'] = $lang; 262 263 if (!isset($GLOBALS['phpgw_info']['user']['preferences']['common']['theme'])) 264 { 265 $prefs2 = CreateObject('phpgwapi.preferences'); 266 $temp_pref = $prefs2->read_repository(); 267 $GLOBALS['phpgw_info']['user']['preferences']['common']['theme'] = $temp_pref['common']['theme']; 268 } 268 269 } 269 270 #print 'LANG:' . $GLOBALS['phpgw_info']['user']['preferences']['common']['lang'] . '<br>'; … … 584 585 585 586 $tmpl->pfp('loginout','login_form'); 586 }587 587 588 588 ?> -
trunk/phpgwapi/templates/default/navbar.inc.php
r4886 r5141 239 239 } 240 240 $now = time(); 241 $var['user_info'] = '<b>'.$GLOBALS['phpgw']->common->display_fullname() . ($GLOBALS['phpgw']->session->appsession('certificate','phpgwapi')?'(' .lang('Identified by Digital Certificate') . ')':'') .'</b>'. ' - '241 $var['user_info'] = '<b>'.$GLOBALS['phpgw']->common->display_fullname() .'</b>'. ' - ' 242 242 . lang($GLOBALS['phpgw']->common->show_date($now,'l')) . ' ' 243 243 . $GLOBALS['phpgw']->common->show_date($now,$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat']);
Note: See TracChangeset
for help on using the changeset viewer.