Merge branch 'master' of github.com:Lastorder-DC/rhymix

This commit is contained in:
Lastorder-DC 2026-04-01 12:04:44 +09:00
commit 85f9c4d031
39 changed files with 396 additions and 220 deletions

View file

@ -37,10 +37,15 @@ class DocumentAdminView extends Document
{
// option to get a list
$args = new stdClass();
$args->page = Context::get('page'); // /< Page
$args->list_count = 30; // /< the number of posts to display on a single page
$args->page_count = 5; // /< the number of pages that appear in the page navigation
$args->list_count = intval(Context::get('list_count')) ?: 30;
$args->page_count = 5;
$args->page = max(1, intval(Context::get('page')));
$args->sort_index = 'list_order';
$args->module_srl = Context::get('module_srl');
$args->statusList = [];
$args->use_division = false;
// search options
$args->search_target = Context::get('search_target'); // /< search (title, contents ...)
$args->search_keyword = Context::get('search_keyword'); // /< keyword to search
if ($args->search_target === 'member_srl')
@ -53,11 +58,6 @@ class DocumentAdminView extends Document
}
}
$args->sort_index = 'list_order'; // /< sorting value
$args->module_srl = Context::get('module_srl');
$args->statusList = [];
$args->use_division = false;
// get a list
$columnList = array('document_srl', 'module_srl', 'category_srl', 'member_srl', 'title', 'nick_name', 'comment_count', 'trackback_count', 'readed_count', 'voted_count', 'blamed_count', 'regdate', 'ipaddress', 'status');
$output = DocumentModel::getDocumentList($args, false, true, $columnList);
@ -160,9 +160,9 @@ class DocumentAdminView extends Document
// option for a list
$args = new stdClass();
$args->page = intval(Context::get('page')) ?: 1; // /< Page
$args->list_count = 20; // /< the number of posts to display on a single page
$args->page_count = 10; // /< the number of pages that appear in the page navigation
$args->list_count = intval(Context::get('list_count')) ?: 20;
$args->page_count = 5;
$args->page = max(1, intval(Context::get('page')));
$args->order_type = strtolower(Context::get('order_type')) === 'asc' ? 'asc' : 'desc';
// select sort method
@ -254,11 +254,10 @@ class DocumentAdminView extends Document
{
// option for a list
$args = new stdClass;
$args->page = Context::get('page'); // /< Page
$args->list_count = 30; // /< the number of posts to display on a single page
$args->page_count = 10; // /< the number of pages that appear in the page navigation
$args->document_srl = intval(Context::get('target_srl'));
$args->list_count = intval(Context::get('list_count')) ?: 20;
$args->page_count = 5;
$args->page = max(1, intval(Context::get('page')));
// get Status name list
$oDocumentModel = getModel('document');
@ -330,12 +329,11 @@ class DocumentAdminView extends Document
{
// options for a list
$args = new stdClass();
$args->page = Context::get('page'); // /< Page
$args->list_count = 30; // /< the number of posts to display on a single page
$args->page_count = 10; // /< the number of pages that appear in the page navigation
$args->sort_index = 'list_order'; // /< sorting values
$args->order_type = 'desc'; // /< sorting values by order
$args->list_count = intval(Context::get('list_count')) ?: 30;
$args->page_count = 5;
$args->page = max(1, intval(Context::get('page')));
$args->sort_index = 'list_order';
$args->order_type = 'desc';
$args->module_srl = Context::get('module_srl');

View file

@ -3585,7 +3585,7 @@ class DocumentController extends Document
{
// Set message
$title = sprintf(lang('default_message_format'), $actions[$obj->type]);
$content = <<<EOT
$common_content = <<<EOT
<div style="padding:10px 0;"><strong>{$title}</strong></div>
<p>{$obj->manager_message}</p>
<hr>
@ -3615,7 +3615,7 @@ class DocumentController extends Document
$oCommunicationController = CommunicationController::getInstance();
foreach ($recipients as $member_srl => $items)
{
$content = sprintf($content, implode('', $items));
$content = sprintf($common_content, implode('', $items));
$oCommunicationController->sendMessage($this->user->member_srl, $member_srl, $title, $content, true, null, false);
}
}

View file

@ -146,22 +146,23 @@ class DocumentModel extends Document
}
/**
* Import Document
* Get a document.
*
* @param int $document_srl
* @param bool $is_admin
* @param bool $load_extra_vars
* @param bool $reload_counts
* @return documentItem
* @return DocumentItem
*/
public static function getDocument($document_srl = 0, $is_admin = false, $load_extra_vars = true, $reload_counts = true)
{
if(!$document_srl)
{
return new documentItem();
return new DocumentItem();
}
if(!isset($GLOBALS['XE_DOCUMENT_LIST'][$document_srl]))
{
$oDocument = new documentItem($document_srl, $load_extra_vars, $reload_counts);
$oDocument = new DocumentItem($document_srl, $load_extra_vars, $reload_counts);
if(!$oDocument->isExists())
{
return $oDocument;
@ -176,13 +177,26 @@ class DocumentModel extends Document
return $GLOBALS['XE_DOCUMENT_LIST'][$document_srl];
}
/**
* Create a blank document.
*
* @param int $module_srl
* @return DocumentItem
*/
public static function getBlankDocument($module_srl = 0): DocumentItem
{
$oDocument = new DocumentItem();
$oDocument->add('module_srl', $module_srl);
return $oDocument;
}
/**
* Bringing multiple documents (or paging)
* @param array|string $document_srls
* @param bool $is_admin
* @param bool $load_extra_vars
* @param array $columnList
* @return array value type is documentItem
* @return array value type is DocumentItem
*/
public static function getDocuments($document_srls, $is_admin = false, $load_extra_vars = true, $columnList = array())
{
@ -207,7 +221,7 @@ class DocumentModel extends Document
{
if(!isset($GLOBALS['XE_DOCUMENT_LIST'][$attribute->document_srl]))
{
$oDocument = new documentItem();
$oDocument = new DocumentItem();
$oDocument->setAttribute($attribute, false);
}
if($is_admin)
@ -233,7 +247,7 @@ class DocumentModel extends Document
* @param bool $except_notice
* @param bool $load_extra_vars
* @param array $columnList
* @return Object
* @return BaseObject
*/
public static function getDocumentList($obj, $except_notice = false, $load_extra_vars = true, $columnList = array())
{
@ -300,7 +314,7 @@ class DocumentModel extends Document
* Module_srl value, bringing the document's gongjisa Port
* @param object $obj
* @param array $columnList
* @return object|void
* @return BaseObject
*/
public static function getNoticeList($obj, $columnList = array())
{
@ -338,7 +352,7 @@ class DocumentModel extends Document
{
if(!isset($GLOBALS['XE_DOCUMENT_LIST'][$attribute->document_srl]))
{
$oDocument = new documentItem();
$oDocument = new DocumentItem();
$oDocument->setAttribute($attribute, false);
}