plugins/admin/LangManager.php
changeset 1377 fa2b0825bbc5
parent 1227 bdac73ed481e
equal deleted inserted replaced
1376:60b580d22c7b 1377:fa2b0825bbc5
   546 	$cls = 'row2';
   546 	$cls = 'row2';
   547 	
   547 	
   548 	$btn_edit = $lang->get('acplm_portal_btn_edit');
   548 	$btn_edit = $lang->get('acplm_portal_btn_edit');
   549 	$btn_unin = $lang->get('acplm_portal_btn_unin');
   549 	$btn_unin = $lang->get('acplm_portal_btn_unin');
   550 	
   550 	
       
   551 	$rows = array();
       
   552 	
   551 	while ( $row = $db->fetchrow($q) )
   553 	while ( $row = $db->fetchrow($q) )
   552 	{
   554 	{
       
   555 		$rows[] = $row;
       
   556 		
   553 		$cls = ( $cls == 'row1' ) ? 'row2' : 'row1';
   557 		$cls = ( $cls == 'row1' ) ? 'row2' : 'row1';
   554 		
   558 		
   555 		echo '<tr>';
   559 		echo '<tr>';
   556 		
   560 		
   557 		$lang_code = htmlspecialchars($row['lang_code']);
   561 		$lang_code = htmlspecialchars($row['lang_code']);
   567 		echo '</tr>';
   571 		echo '</tr>';
   568 	}
   572 	}
   569 	
   573 	
   570 	echo '</table></div>';
   574 	echo '</table></div>';
   571 	
   575 	
   572 	// Reset the result pointer to zero so we can fetch that list of languages again
   576 	$db->free_result();
   573 	if ( !$db->sql_data_seek(0, $q) )
       
   574 	{
       
   575 		$db->_die('LangManager doing seek back to zero for installation blacklist');
       
   576 	}
       
   577 	
   577 	
   578 	// $lang_list is fetched by the posthandler sometimes
   578 	// $lang_list is fetched by the posthandler sometimes
   579 	if ( !isset($lang_list) )
   579 	if ( !isset($lang_list) )
   580 	{
   580 	{
   581 		// Build a list of languages in the languages/ directory, then
   581 		// Build a list of languages in the languages/ directory, then
   582 		// eliminate the ones that are already installed.
   582 		// eliminate the ones that are already installed.
   583 		$lang_list = list_available_languages();
   583 		$lang_list = list_available_languages();
   584 	}
   584 	}
   585 	
   585 	
   586 	while ( $row = $db->fetchrow($q) )
   586 	foreach ( $rows as $row )
   587 	{
   587 	{
   588 		$lang_code =& $row['lang_code'];
   588 		$lang_code =& $row['lang_code'];
   589 		if ( isset($lang_list[$lang_code]) )
   589 		if ( isset($lang_list[$lang_code]) )
   590 		{
   590 		{
   591 			unset($lang_list[$lang_code]);
   591 			unset($lang_list[$lang_code]);