Changeset 143
- Timestamp:
- 03/30/2009 10:30:26 PM (3 years ago)
- File:
-
- 1 edited
-
trunk/WordPress/plugin/transposh/transposh_db.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/WordPress/plugin/transposh/transposh_db.php
r142 r143 112 112 $source = $_POST['source']; 113 113 114 // check params 114 115 logger("Enter " . __FILE__ . " Params: $original , $translation, $lang, $ref", 3); 115 116 if(!isset($original) || !isset($translation) || !isset($lang)) … … 117 118 logger("Enter " . __FILE__ . " missing params: $original , $translation, $lang," . $ref, 0); 118 119 return; 120 } 121 122 //Check permissions, first the lanugage must be on the edit list. Then either the user 123 //is a translator or automatic translation if it is enabled. 124 if(!(is_editable_lang($lang) && 125 (is_translator() || ($source == 1 && get_option(ENABLE_AUTO_TRANSLATE))))) 126 { 127 logger("Unauthorized translation attempt " . $_SERVER['REMOTE_ADDR'] , 1); 128 header("HTTP/1.0 401 Unauthorized translation"); 129 exit; 119 130 } 120 131 … … 141 152 return; 142 153 } 143 }144 145 //Check permissions, first the lanugage must be on the edit list. Then either the user146 //is a translator or automatic translation if it is enabled.147 if(!(is_editable_lang($lang) &&148 (is_translator() || ($source == 1 && get_option(ENABLE_AUTO_TRANSLATE)))))149 {150 logger("Unauthorized translation attempt " . $_SERVER['REMOTE_ADDR'] , 1);151 header("HTTP/1.0 401 Unauthorized translation");152 exit;153 154 } 154 155
Note: See TracChangeset
for help on using the changeset viewer.
