function removeTranslatedTextAttributeValue( $valueId ) { $dc = wdGetDataSetContext(); $translatedTextAttribute = getTranslatedTextAttribute( $valueId ); // Dilemma: // Should we also remove the translated texts when removing a // translated content attribute? There are pros and cons. For // now it is easier to not remove them so they can be rolled // back easier. // removeTranslatedTexts($translatedTextAttribute->value_tcid); $dbw = wfGetDB( DB_MASTER ); $dbw->query( "UPDATE {$dc}_translated_content_attribute_values" . " SET remove_transaction_id=" . getUpdateTransactionId() . " WHERE value_id=$valueId" . " AND remove_transaction_id IS NULL" ); }
public function update( $keyPath, $value ) { $valueId = $keyPath->peek( 0 )->translatedTextAttributeId; $translatedTextAttribute = getTranslatedTextAttribute( $valueId ); if ( $value != "" ) { updateTranslatedText( $translatedTextAttribute->value_tcid, $this->filterLanguageId, $value ); } }