plugins/admin/LangManager.php
changeset 377 bb3e6c3bd4f4
parent 376 66732bd4532c
child 387 92664d2efab8
equal deleted inserted replaced
376:66732bd4532c 377:bb3e6c3bd4f4
   538   }
   538   }
   539   
   539   
   540   echo '</table></div>';
   540   echo '</table></div>';
   541   
   541   
   542   // Reset the result pointer to zero so we can fetch that list of languages again
   542   // Reset the result pointer to zero so we can fetch that list of languages again
   543   $db->sql_data_seek(0, $q);
   543   if ( !$db->sql_data_seek(0, $q) )
       
   544   {
       
   545     $db->_die('LangManager doing seek back to zero for installation blacklist');
       
   546   }
   544   
   547   
   545   // $lang_list is fetched by the posthandler sometimes
   548   // $lang_list is fetched by the posthandler sometimes
   546   if ( !isset($lang_list) )
   549   if ( !isset($lang_list) )
   547   {
   550   {
   548     // Build a list of languages in the languages/ directory, then
   551     // Build a list of languages in the languages/ directory, then
   549     // eliminate the ones that are already installed.
   552     // eliminate the ones that are already installed.
   550     $lang_list = list_available_languages();
   553     $lang_list = list_available_languages();
   551   }
   554   }
   552   
   555   
   553   while ( $row = $db->fetchrow() )
   556   while ( $row = $db->fetchrow($q) )
   554   {
   557   {
   555     $lang_code =& $row['lang_code'];
   558     $lang_code =& $row['lang_code'];
   556     if ( isset($lang_list[$lang_code]) )
   559     if ( isset($lang_list[$lang_code]) )
   557     {
   560     {
   558       unset($lang_list[$lang_code]);
   561       unset($lang_list[$lang_code]);