fixed a problem deleting a language translations
This commit is contained in:
@@ -285,6 +285,7 @@ class Content extends BaseContent {
|
||||
|
||||
$c->add ( ContentPeer::CON_LANG, $lanId );
|
||||
$result = ContentPeer::doSelectRS ( $c );
|
||||
$result->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$result->next ();
|
||||
$row = $result->getRow ();
|
||||
while ( is_array ( $row ) ) {
|
||||
|
||||
@@ -132,6 +132,7 @@ try {
|
||||
include_once 'classes/model/Translation.php';
|
||||
include_once 'classes/model/Content.php';
|
||||
$locale = $_POST['LOCALE'];
|
||||
$trn = new Translation();
|
||||
|
||||
if( strpos($locale, Translation::$localeSeparator) )
|
||||
list($LAN_ID, $IC_UID) = explode(Translation::$localeSeparator, $locale);
|
||||
@@ -154,7 +155,7 @@ try {
|
||||
if( $aRow[0] == 0 ) { //so we can delete this language
|
||||
try{
|
||||
Content::removeLanguageContent($locale);
|
||||
Translation::removeTranslationEnvironment($locale);
|
||||
$trn->removeTranslationEnvironment($locale);
|
||||
echo G::LoadTranslation('ID_LANGUAGE_DELETED_SUCCESSFULLY');
|
||||
} catch (Exception $e){
|
||||
echo $e->getMessage();
|
||||
@@ -167,4 +168,4 @@ try {
|
||||
} catch ( Exception $oException ) {
|
||||
die($oException->getMessage());
|
||||
}
|
||||
?>
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user