BUG 7955 this issue was fixed.

This commit is contained in:
Alvaro Campos
2011-11-17 09:40:01 -04:00
parent 9471a6cb60
commit 2b8f40f03f
11 changed files with 73 additions and 81 deletions

View File

@@ -149,6 +149,13 @@ class Content extends BaseContent {
*/
function addContent($ConCategory, $ConParent, $ConId, $ConLang, $ConValue) {
try {
if ($ConLang != 'en') {
$baseLangContent = ContentPeer::retrieveByPk($ConCategory, $ConParent, $ConId, 'en');
if ($baseLangContent === null) {
Content::addContent($ConCategory, $ConParent, $ConId, 'en', $ConValue);
}
}
$con = ContentPeer::retrieveByPK ( $ConCategory, $ConParent, $ConId, $ConLang );
if (is_null ( $con )) {
@@ -325,21 +332,5 @@ class Content extends BaseContent {
}
return $aRoles;
}
/**
* Verify the if content on teh current language exists for the base language 'english
* if not copy for it.
*
* @autor Erik Amaru Ortiz <erik@colosa.com>
* @param $category
* @param $id
* @param $value
*/
function copyContentOnBaseLanguageIfNotExists($category, $id, $value)
{
$con = ContentPeer::retrieveByPk($category, '', $id, 'en');
if ($con === null) {
Content::addContent($category, '', $id, 'en', $value);
}
}
} // Content