mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-28 23:03:25 +09:00
issue 2119. supporting php 5.4. modules and widgets.
git-svn-id: http://xe-core.googlecode.com/svn/branches/maserati@12706 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
ff75082eee
commit
8a7c28babc
90 changed files with 572 additions and 83 deletions
|
|
@ -321,6 +321,7 @@ class commentAdminController extends comment
|
|||
*/
|
||||
function deleteModuleComments($module_srl)
|
||||
{
|
||||
$args = new stdClass();
|
||||
$args->module_srl = $module_srl;
|
||||
$output = executeQuery('comment.deleteModuleComments', $args);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
|
@ -346,6 +347,7 @@ class commentAdminController extends comment
|
|||
{
|
||||
if(is_array($originObject)) $originObject = (object)$originObject;
|
||||
|
||||
$obj = new stdClass();
|
||||
$obj->document_srl = $originObject->document_srl;
|
||||
$obj->comment_srl = $originObject->comment_srl;
|
||||
$obj->parent_srl = $originObject->parent_srl;
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@ class commentAdminView extends comment
|
|||
function dispCommentAdminList()
|
||||
{
|
||||
// option to get a list
|
||||
$args = new stdClass();
|
||||
$args->page = Context::get('page'); // /< Page
|
||||
$args->list_count = 30; // / the number of postings to appear on a single page
|
||||
$args->page_count = 5; // / the number of pages to appear on the page navigation
|
||||
|
|
@ -74,6 +75,7 @@ class commentAdminView extends comment
|
|||
function dispCommentAdminDeclared()
|
||||
{
|
||||
// option to get a blacklist
|
||||
$args = new stdClass();
|
||||
$args->page = Context::get('page'); // /< Page
|
||||
$args->list_count = 30; // /< the number of comment postings to appear on a single page
|
||||
$args->page_count = 10; // /< the number of pages to appear on the page navigation
|
||||
|
|
|
|||
|
|
@ -238,6 +238,7 @@ class commentController extends comment
|
|||
$oDB = &DB::getInstance();
|
||||
$oDB->begin();
|
||||
// Enter a list of comments first
|
||||
$list_args = new stdClass();
|
||||
$list_args->comment_srl = $obj->comment_srl;
|
||||
$list_args->document_srl = $obj->document_srl;
|
||||
$list_args->module_srl = $obj->module_srl;
|
||||
|
|
@ -252,6 +253,7 @@ class commentController extends comment
|
|||
else
|
||||
{
|
||||
// get information of the parent comment posting
|
||||
$parent_args = new stdClass();
|
||||
$parent_args->comment_srl = $obj->parent_srl;
|
||||
$parent_output = executeQuery('comment.getCommentListItem', $parent_args);
|
||||
// return if no parent comment exists
|
||||
|
|
@ -640,6 +642,7 @@ class commentController extends comment
|
|||
$oDB = &DB::getInstance();
|
||||
$oDB->begin();
|
||||
// Delete
|
||||
$args =new stdClass();
|
||||
$args->comment_srl = $comment_srl;
|
||||
$output = executeQuery('comment.deleteComment', $args);
|
||||
if(!$output->toBool())
|
||||
|
|
@ -727,6 +730,7 @@ class commentController extends comment
|
|||
}
|
||||
if(!$oDocument->isExists() || !$oDocument->isGranted()) return new Object(-1, 'msg_not_permitted');
|
||||
// get a list of comments and then execute a trigger(way to reduce the processing cost for delete all)
|
||||
$args = new stdClass();
|
||||
$args->document_srl = $document_srl;
|
||||
$comments = executeQueryArray('comment.getAllComments',$args);
|
||||
if($comments->data)
|
||||
|
|
@ -903,6 +907,7 @@ class commentController extends comment
|
|||
// Fail if session information already has a reported document
|
||||
if($_SESSION['declared_comment'][$comment_srl]) return new Object(-1, 'failed_declared');
|
||||
// check if already reported
|
||||
$args = new stdClass();
|
||||
$args->comment_srl = $comment_srl;
|
||||
$output = executeQuery('comment.getDeclaredComment', $args);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
|
@ -970,6 +975,7 @@ class commentController extends comment
|
|||
$comment_popup_menu_list = Context::get('comment_popup_menu_list');
|
||||
if(!is_array($comment_popup_menu_list)) $comment_popup_menu_list = array();
|
||||
|
||||
$obj = new stdClass();
|
||||
$obj->url = $url;
|
||||
$obj->str = $str;
|
||||
$obj->icon = $icon;
|
||||
|
|
|
|||
|
|
@ -47,6 +47,7 @@ class commentItem extends Object
|
|||
{
|
||||
if(!$this->comment_srl) return;
|
||||
|
||||
$args =new stdClass();
|
||||
$args->comment_srl = $this->comment_srl;
|
||||
$output = executeQuery('comment.getComment', $args, $this->columnList);
|
||||
|
||||
|
|
|
|||
|
|
@ -123,6 +123,7 @@ class commentModel extends comment
|
|||
*/
|
||||
function getChildComments($comment_srl)
|
||||
{
|
||||
$args = new stdClass();
|
||||
$args->comment_srl = $comment_srl;
|
||||
$output = executeQueryArray('comment.getChildComments', $args);
|
||||
return $output->data;
|
||||
|
|
@ -153,6 +154,7 @@ class commentModel extends comment
|
|||
{
|
||||
if(is_array($comment_srl_list)) $comment_srls = implode(',',$comment_srl_list);
|
||||
// fetch from a database
|
||||
$args = new stdClass();
|
||||
$args->comment_srls = $comment_srls;
|
||||
$output = executeQuery('comment.getComments', $args, $columnList);
|
||||
if(!$output->toBool()) return;
|
||||
|
|
@ -181,6 +183,7 @@ class commentModel extends comment
|
|||
*/
|
||||
function getCommentCount($document_srl)
|
||||
{
|
||||
$args = new stdClass();
|
||||
$args->document_srl = $document_srl;
|
||||
|
||||
// get the number of comments on the document module
|
||||
|
|
@ -229,6 +232,7 @@ class commentModel extends comment
|
|||
*/
|
||||
function getCommentAllCount($module_srl,$published=null)
|
||||
{
|
||||
$args = new stdClass();
|
||||
$args->module_srl = $module_srl;
|
||||
|
||||
if(is_null($published))
|
||||
|
|
@ -288,6 +292,7 @@ class commentModel extends comment
|
|||
*/
|
||||
function getNewestCommentList($obj, $columnList = array())
|
||||
{
|
||||
$args = new stdClass();
|
||||
if($obj->mid)
|
||||
{
|
||||
$oModuleModel = &getModel('module');
|
||||
|
|
@ -390,6 +395,7 @@ class commentModel extends comment
|
|||
// get a very last page if no page exists
|
||||
if(!$page) $page = (int)( ($oDocument->getCommentCount()-1) / $comment_count) + 1;
|
||||
// get a list of comments
|
||||
$args = new stdClass();
|
||||
$args->document_srl = $document_srl;
|
||||
$args->list_count = $comment_count;
|
||||
$args->page = $page;
|
||||
|
|
@ -532,6 +538,7 @@ class commentModel extends comment
|
|||
{
|
||||
$query_id = 'comment.getTotalCommentList';
|
||||
// Variables
|
||||
$args = new stdClass();
|
||||
$args->sort_index = 'list_order';
|
||||
$args->page = $obj->page?$obj->page:1;
|
||||
$args->list_count = $obj->list_count?$obj->list_count:20;
|
||||
|
|
@ -701,6 +708,10 @@ class commentModel extends comment
|
|||
{
|
||||
$oModuleModel = &getModel('module');
|
||||
$comment_config = $oModuleModel->getModulePartConfig('comment', $module_srl);
|
||||
if(!$comment_config)
|
||||
{
|
||||
$comment_config = new stdClass();
|
||||
}
|
||||
if(!isset($comment_config->comment_count)) $comment_config->comment_count = 50;
|
||||
return $comment_config;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue