Added comment validation system.

git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@10272 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
dionisrom 2012-02-29 12:08:42 +00:00
parent 9307d94fc8
commit 13402bfc76
22 changed files with 417 additions and 19 deletions

View file

@ -534,6 +534,7 @@
// Create commentItem object from a comment list
// If admin priviledge is granted on parent posts, you can read its child posts.
$accessible = array();
$comment_list = array();
foreach($output->data as $key => $val) {
$oCommentItem = new commentItem();
$oCommentItem->setAttribute($val);
@ -845,5 +846,23 @@
}
return false;
}
public function getTranslationLangCodes()
{
$obj->document_srl = $this->document_srl;
// -2 is an index for content. We are interested if content has other translations.
$obj->var_idx = -2;
$output = executeQueryArray('document.getDocumentTranslationLangCodes', $obj);
if (!$output->data)
{
$output->data = array();
}
// add original page's lang code as well
$origLangCode->lang_code = $this->getLangCode();
$output->data[] = $origLangCode;
return $output->data;
}
}
?>

View file

@ -0,0 +1,12 @@
<query id="getDocumentTranslationLangCodes" action="select">
<tables>
<table name="document_extra_vars" />
</tables>
<columns>
<column name="DISTINCT(lang_code)" />
</columns>
<conditions>
<condition operation="equal" column="document_srl" var="document_srl" notnull="notnull" />
<condition operation="equal" column="var_idx" var="var_idx" default="-2" notnull="notnull" pipe="and" />
</conditions>
</query>