mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-12 12:41:30 +00:00
allow calling submittranslation only if showmissingtranslation is turned on
This commit is contained in:
parent
99ba945b75
commit
183c772d6a
|
@ -244,6 +244,7 @@ switch($command) {
|
||||||
break; /* }}} */
|
break; /* }}} */
|
||||||
|
|
||||||
case 'submittranslation': /* {{{ */
|
case 'submittranslation': /* {{{ */
|
||||||
|
if($settings->_showMissingTranslations) {
|
||||||
if($user && !empty($_POST['phrase'])) {
|
if($user && !empty($_POST['phrase'])) {
|
||||||
if($fp = fopen('/tmp/newtranslations.txt', 'a+')) {
|
if($fp = fopen('/tmp/newtranslations.txt', 'a+')) {
|
||||||
fputcsv($fp, array(date('Y-m-d H:i:s'), $user->getLogin(), $_POST['key'], $_POST['lang'], $_POST['phrase']));
|
fputcsv($fp, array(date('Y-m-d H:i:s'), $user->getLogin(), $_POST['key'], $_POST['lang'], $_POST['phrase']));
|
||||||
|
@ -255,6 +256,7 @@ switch($command) {
|
||||||
header('Content-Type', 'application/json');
|
header('Content-Type', 'application/json');
|
||||||
echo json_encode(array('success'=>false, 'message'=>'Missing translation', 'data'=>''));
|
echo json_encode(array('success'=>false, 'message'=>'Missing translation', 'data'=>''));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
break; /* }}} */
|
break; /* }}} */
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user