HomeHelpTrac

Ignore:
Timestamp:
05/01/09 01:18:36 (3 years ago)
Author:
Andrey Prikaznov
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/lang_file.php

    r9974 r10378  
    433433        { 
    434434            db_res("INSERT INTO `sys_localization_categories` (`Name`) VALUES ('$newCategoryName')"); 
    435             $categoryID = mysql_insert_id(); 
     435            $categoryID = db_last_id(); 
    436436 
    437437            if ( !$categoryID ) 
     
    451451        } else { 
    452452            db_res("INSERT INTO `sys_localization_keys` (`IDCategory`, `Key`) VALUES ({$categoryID}, '{$newKeyName}')", 0); 
    453             $newKeyID = mysql_insert_id(); 
     453            $newKeyID = db_last_id(); 
    454454        } 
    455455 
     
    475475            ); 
    476476 
    477             if( !mysql_affected_rows() ) 
     477            if( !db_affected_rows() ) 
    478478                return '<font color="red">Could not insert a string parameter.</font>'; 
    479479        } 
     
    504504                        VALUES ({$newKeyID}, {$langKey}, '{$langString}') 
    505505                    "); 
    506                     if (mysql_affected_rows() <= 0) return '<font color="red">Error: could not add a language string.</font>'; 
     506                    if (db_affected_rows() <= 0) return '<font color="red">Error: could not add a language string.</font>'; 
    507507                } 
    508508            } 
     
    649649                    `IDLanguage` = $langID"); 
    650650 
    651         if (mysql_affected_rows() <= 0) 
     651        if (db_affected_rows() <= 0) 
    652652        { 
    653653            return '<font color="red">The string has <b>NOT</b> been updated.</font>'; 
     
    946946        db_res( $sQuery ); 
    947947 
    948         if ( mysql_affected_rows() ) 
     948        if ( db_affected_rows() ) 
    949949            return 'Language has been successfully updated.'; 
    950950 
     
    10121012        "); 
    10131013 
    1014         if(mysql_affected_rows() <= 0) return '<font color="red">Error: could not add a new language to the database.</font>'; 
    1015  
    1016         $newLangID = mysql_insert_id(); 
     1014        if(db_affected_rows() <= 0) return '<font color="red">Error: could not add a new language to the database.</font>'; 
     1015 
     1016        $newLangID = db_last_id(); 
    10171017 
    10181018        $resSourceLangStrings = db_res(" 
     
    10311031                ", 0); 
    10321032             
    1033             if( !mysql_affected_rows() ) 
     1033            if( !db_affected_rows() ) 
    10341034                return '<font color="red">Error: could not add a language string to the database.</font>'; 
    10351035        } 
Note: See TracChangeset for help on using the changeset viewer.