Changeset 5036 for trunk/phpgwapi
- Timestamp:
- 09/05/11 16:51:41 (13 years ago)
- Location:
- trunk/phpgwapi
- Files:
-
- 4 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/phpgwapi/inc/class.vfs_shared.inc.php
r2 r5036 419 419 420 420 /*! 421 * @function get_size_all 422 * @abstract Determine size of location 423 * @owner_id string uid owner 424 */ 425 426 function get_size_all($owner_id) { return 0; } 427 428 /*! 421 429 * @function get_size 422 430 * @abstract Determine size of location -
trunk/phpgwapi/inc/class.vfs_sql.inc.php
r3743 r5036 2512 2512 return $size; 2513 2513 } 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 } 2514 2525 2515 2526 /*return the total number of files in path*/ -
trunk/phpgwapi/inc/functions.inc.php
r3552 r5036 345 345 } 346 346 } 347 // this removes the sessiondata if its saved in the URL 348 $query = preg_replace('/[&]?sessionid(=|%3D)[^&]+&kp3(=|%3D)[^&]+&domain=.*$/','',$_SERVER['QUERY_STRING']); 349 Header('Location: '.$GLOBALS['phpgw_info']['server']['webserver_url'].'/login.php?cd=10&phpgw_forward='.urlencode($relpath.(!empty($query) ? '?'.$query : ''))); 350 exit; 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 else 368 { 369 // this removes the sessiondata if its saved in the URL 370 $query = preg_replace('/[&]?sessionid(=|%3D)[^&]+&kp3(=|%3D)[^&]+&domain=.*$/','',$_SERVER['QUERY_STRING']); 371 Header('Location: '.$GLOBALS['phpgw_info']['server']['webserver_url'].'/login.php?cd=10&phpgw_forward='.urlencode($relpath.(!empty($query) ? '?'.$query : ''))); 372 exit; 373 } 351 374 } 352 375 -
trunk/phpgwapi/templates/default/login_default.php
r4994 r5036 12 12 \**************************************************************************/ 13 13 14 function check_logoutcode($code)14 function check_logoutcode($code) 15 15 { 16 16 switch($code) … … 35 35 36 36 case 99: 37 37 return '<font color="FF0000">' . lang('Blocked, too many attempts(%1)! Retry in %2 minute(s)',$GLOBALS['phpgw_info']['server']['num_unsuccessful_id'],$GLOBALS['phpgw_info']['server']['block_time']) . '</font>'; 38 38 case 200: 39 39 //return '<font color="FF0000">' . lang('Invalid code') . '</font>'; 40 40 return '<font color="FF0000">' . lang('Bad login or password') . '</font>'; 41 41 break; 42 42 case 10: … … 180 180 $login .= '@'.$GLOBALS['phpgw_info']['server']['default_domain']; 181 181 } 182 If(!$_GET['cd']) 183 $GLOBALS['sessionid'] = $GLOBALS['phpgw']->session->create(strtolower($login),$passwd,$passwd_type,'u'); 182 183 If(!$_GET['cd']) 184 $GLOBALS['sessionid'] = $GLOBALS['phpgw']->session->create(strtolower($login),$passwd,$passwd_type,'u'); 184 185 185 186 if(!isset($GLOBALS['sessionid']) || ! $GLOBALS['sessionid']) 186 187 { 187 188 If(!$_GET['cd']) $_GET['cd'] = $GLOBALS['phpgw']->session->cd_reason; 188 If(!$_GET['cd']) $_GET['cd'] = $GLOBALS['phpgw']->session->cd_reason; 189 189 } 190 190 else … … 586 586 587 587 $tmpl->pfp('loginout','login_form'); 588 } 588 589 589 590 ?>
Note: See TracChangeset
for help on using the changeset viewer.