- Patch #10111 by Killes: fixed some SQL queries.
							parent
							
								
									3a259e9184
								
							
						
					
					
						commit
						dd7764302f
					
				| 
						 | 
				
			
			@ -178,7 +178,7 @@ function _locale_import_po($file, $lang, $mode) {
 | 
			
		|||
        }
 | 
			
		||||
        else {
 | 
			
		||||
          db_query("INSERT INTO {locales_source} (location, source) VALUES ('%s', '%s')", $comments, $english[$key]);
 | 
			
		||||
          $lid = db_fetch_object(db_query("SELECT lid FROM {locales_source} WHERE location = '%s' AND source = '%s'", $comments, $english[$key]));
 | 
			
		||||
          $lid = db_fetch_object(db_query("SELECT lid FROM {locales_source} WHERE source = '%s'", $english[$key]));
 | 
			
		||||
          $lid = $lid->lid;
 | 
			
		||||
        }
 | 
			
		||||
        if ($key == 0) {
 | 
			
		||||
| 
						 | 
				
			
			@ -207,7 +207,7 @@ function _locale_import_po($file, $lang, $mode) {
 | 
			
		|||
      }
 | 
			
		||||
      else {
 | 
			
		||||
        db_query("INSERT INTO {locales_source} (location, source) VALUES ('%s', '%s')", $comments, $english);
 | 
			
		||||
        $loc = db_fetch_object(db_query("SELECT lid FROM {locales_source} WHERE location = '%s' AND source = '%s'", $comments, $english));
 | 
			
		||||
        $loc = db_fetch_object(db_query("SELECT lid FROM {locales_source} WHERE source = '%s'", $english));
 | 
			
		||||
        $lid = $loc->lid;
 | 
			
		||||
      }
 | 
			
		||||
      if ($loc->translation && $mode == 'overwrite') {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -179,7 +179,7 @@ function locale($string) {
 | 
			
		|||
      else {
 | 
			
		||||
        db_query("INSERT INTO {locales_source} (location, source) VALUES ('%s', '%s')", request_uri(), $string);
 | 
			
		||||
        if ($locale) {
 | 
			
		||||
          $lid = db_fetch_object(db_query("SELECT lid FROM {locales_source} WHERE location = '%s' AND source = '%s'", request_uri(), $string));
 | 
			
		||||
          $lid = db_fetch_object(db_query("SELECT lid FROM {locales_source} WHERE source = '%s'", $string));
 | 
			
		||||
          db_query("INSERT INTO {locales_target} (lid, locale) VALUES (%d, '%s')", $lid->lid, $locale);
 | 
			
		||||
        }
 | 
			
		||||
      }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -179,7 +179,7 @@ function locale($string) {
 | 
			
		|||
      else {
 | 
			
		||||
        db_query("INSERT INTO {locales_source} (location, source) VALUES ('%s', '%s')", request_uri(), $string);
 | 
			
		||||
        if ($locale) {
 | 
			
		||||
          $lid = db_fetch_object(db_query("SELECT lid FROM {locales_source} WHERE location = '%s' AND source = '%s'", request_uri(), $string));
 | 
			
		||||
          $lid = db_fetch_object(db_query("SELECT lid FROM {locales_source} WHERE source = '%s'", $string));
 | 
			
		||||
          db_query("INSERT INTO {locales_target} (lid, locale) VALUES (%d, '%s')", $lid->lid, $locale);
 | 
			
		||||
        }
 | 
			
		||||
      }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue