mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-10 04:24:14 +09:00
Do not even load counts of document in widget page
This commit is contained in:
parent
ddac7ecf2f
commit
4f821bca85
2 changed files with 14 additions and 5 deletions
|
|
@ -79,6 +79,12 @@ class documentItem extends Object
|
||||||
$document_item = false;
|
$document_item = false;
|
||||||
$cache_put = false;
|
$cache_put = false;
|
||||||
$columnList = array();
|
$columnList = array();
|
||||||
|
$reload_counts = true;
|
||||||
|
|
||||||
|
if ($this->columnList === false)
|
||||||
|
{
|
||||||
|
$reload_counts = false;
|
||||||
|
}
|
||||||
$this->columnList = array();
|
$this->columnList = array();
|
||||||
|
|
||||||
// cache controll
|
// cache controll
|
||||||
|
|
@ -89,9 +95,12 @@ class documentItem extends Object
|
||||||
$columnList = array('readed_count', 'voted_count', 'blamed_count', 'comment_count', 'trackback_count');
|
$columnList = array('readed_count', 'voted_count', 'blamed_count', 'comment_count', 'trackback_count');
|
||||||
}
|
}
|
||||||
|
|
||||||
$args = new stdClass();
|
if(!$document_item || $reload_counts)
|
||||||
$args->document_srl = $this->document_srl;
|
{
|
||||||
$output = executeQuery('document.getDocument', $args, $columnList);
|
$args = new stdClass();
|
||||||
|
$args->document_srl = $this->document_srl;
|
||||||
|
$output = executeQuery('document.getDocument', $args, $columnList);
|
||||||
|
}
|
||||||
|
|
||||||
if(!$document_item)
|
if(!$document_item)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -479,7 +479,7 @@ class widgetController extends widget
|
||||||
if($args->document_srl)
|
if($args->document_srl)
|
||||||
{
|
{
|
||||||
$oDocumentModel = getModel('document');
|
$oDocumentModel = getModel('document');
|
||||||
$oDocument = $oDocumentModel->getDocument($args->document_srl, false, false);
|
$oDocument = $oDocumentModel->getDocument($args->document_srl, false, false, false);
|
||||||
$body = $oDocument->getContent(false,false,false, false);
|
$body = $oDocument->getContent(false,false,false, false);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
@ -519,7 +519,7 @@ class widgetController extends widget
|
||||||
if($args->document_srl)
|
if($args->document_srl)
|
||||||
{
|
{
|
||||||
$oDocumentModel = getModel('document');
|
$oDocumentModel = getModel('document');
|
||||||
$oDocument = $oDocumentModel->getDocument($args->document_srl, false, false);
|
$oDocument = $oDocumentModel->getDocument($args->document_srl, false, false, false);
|
||||||
$body = $oDocument->getContent(false,false,false);
|
$body = $oDocument->getContent(false,false,false);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue