mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-27 14:22:54 +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
|
|
@ -59,6 +59,7 @@ class documentAdminController extends document
|
|||
$oDB = &DB::getInstance();
|
||||
$oDB->begin();
|
||||
|
||||
$triggerObj = new stdClass();
|
||||
$triggerObj->document_srls = implode(',',$document_srl_list);
|
||||
$triggerObj->module_srl = $module_srl;
|
||||
$triggerObj->category_srl = $category_srl;
|
||||
|
|
@ -138,6 +139,7 @@ class documentAdminController extends document
|
|||
}
|
||||
}
|
||||
|
||||
$args = new stdClass();
|
||||
$args->document_srls = implode(',',$document_srl_list);
|
||||
$args->module_srl = $module_srl;
|
||||
// move the comment
|
||||
|
|
@ -212,6 +214,7 @@ class documentAdminController extends document
|
|||
$oDB = &DB::getInstance();
|
||||
$oDB->begin();
|
||||
|
||||
$triggerObj = new stdClass();
|
||||
$triggerObj->document_srls = implode(',',$document_srl_list);
|
||||
$triggerObj->module_srl = $module_srl;
|
||||
$triggerObj->category_srl = $category_srl;
|
||||
|
|
@ -418,6 +421,7 @@ class documentAdminController extends document
|
|||
*/
|
||||
function deleteModuleDocument($module_srl)
|
||||
{
|
||||
$args = new stdClass();
|
||||
$args->module_srl = $module_srl;
|
||||
$oDocumentModel = &getModel('document');
|
||||
$args->module_srl = $module_srl;
|
||||
|
|
@ -537,6 +541,7 @@ class documentAdminController extends document
|
|||
// set the max value if idx is not specified
|
||||
if(!$var_idx)
|
||||
{
|
||||
$obj = new stdClass();
|
||||
$obj->module_srl = $module_srl;
|
||||
$output = executeQuery('document.getDocumentMaxExtraKeyIdx', $obj);
|
||||
$var_idx = $output->data->var_idx+1;
|
||||
|
|
@ -604,6 +609,7 @@ class documentAdminController extends document
|
|||
else $new_idx = $var_idx+1;
|
||||
if($new_idx<1) return new Object(-1,'msg_invalid_request');
|
||||
|
||||
$args = new stdClass();
|
||||
$args->module_srl = $module_srl;
|
||||
$args->var_idx = $new_idx;
|
||||
$output = executeQuery('document.getDocumentExtraKeys', $args);
|
||||
|
|
@ -614,6 +620,7 @@ class documentAdminController extends document
|
|||
// update immediately if there is no idx to change
|
||||
if(!$extra_keys[$new_idx])
|
||||
{
|
||||
$args = new stdClass();
|
||||
$args->module_srl = $module_srl;
|
||||
$args->var_idx = $var_idx;
|
||||
$args->new_idx = $new_idx;
|
||||
|
|
@ -625,6 +632,7 @@ class documentAdminController extends document
|
|||
}
|
||||
else
|
||||
{
|
||||
$args = new stdClass();
|
||||
$args->module_srl = $module_srl;
|
||||
$args->var_idx = $new_idx;
|
||||
$args->new_idx = -10000;
|
||||
|
|
|
|||
|
|
@ -97,6 +97,7 @@ class documentAdminModel extends document
|
|||
*/
|
||||
function getDocumentCountByDate($date = '', $moduleSrlList = array(), $statusList = array())
|
||||
{
|
||||
$args = new stdClass();
|
||||
if($date) $args->regDate = date('Ymd', strtotime($date));
|
||||
if(count($moduleSrlList)>0) $args->moduleSrlList = $moduleSrlList;
|
||||
if(count($statusList)>0) $args->statusList = $statusList;
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@ class documentAdminView extends document
|
|||
function dispDocumentAdminList()
|
||||
{
|
||||
// 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
|
||||
|
|
@ -100,6 +101,7 @@ class documentAdminView extends document
|
|||
function dispDocumentAdminDeclared()
|
||||
{
|
||||
// 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
|
||||
|
|
|
|||
|
|
@ -104,6 +104,7 @@ class documentController extends document
|
|||
*/
|
||||
function deleteDocumentAliasByModule($module_srl)
|
||||
{
|
||||
$args = new stdClass();
|
||||
$args->module_srl = $module_srl;
|
||||
executeQuery("document.deleteAlias", $args);
|
||||
}
|
||||
|
|
@ -115,6 +116,7 @@ class documentController extends document
|
|||
*/
|
||||
function deleteDocumentAliasByDocument($document_srl)
|
||||
{
|
||||
$args =new stdClass();
|
||||
$args->document_srl = $document_srl;
|
||||
executeQuery("document.deleteAlias", $args);
|
||||
}
|
||||
|
|
@ -128,6 +130,7 @@ class documentController extends document
|
|||
*/
|
||||
function deleteDocumentHistory($history_srl, $document_srl, $module_srl)
|
||||
{
|
||||
$args = new stdClass();
|
||||
$args->history_srl = $history_srl;
|
||||
$args->module_srl = $module_srl;
|
||||
$args->document_srl = $document_srl;
|
||||
|
|
@ -199,7 +202,7 @@ class documentController extends document
|
|||
if($obj->allow_trackback!='Y') $obj->allow_trackback = 'N';
|
||||
if($obj->homepage && !preg_match('/^[a-z]+:\/\//i',$obj->homepage)) $obj->homepage = 'http://'.$obj->homepage;
|
||||
if($obj->notify_message != 'Y') $obj->notify_message = 'N';
|
||||
if(!$isRestore) $obj->ipaddress = $_SERVER['REMOTE_ADDR']; //board?<3F>서 form key값으ë¡?ipaddressë¥??¬ìš©?˜ë©´ ?„한 ipê°€ ?±ë¡<C3AB>?? ?„í„°?€???<3F>ê??†ìŠ´
|
||||
if(!$isRestore) $obj->ipaddress = $_SERVER['REMOTE_ADDR']; //board?<3F>서 form key값으<EAB092>?ipaddress<73>??<3F>용?<3F>면 ?<3F>한 ip가 ?<3F>록?? ?<3F>터?<3F>???<3F><>??<3F>슴
|
||||
|
||||
// Serialize the $extra_vars, check the extra_vars type, because duplicate serialized avoid
|
||||
if(!is_string($obj->extra_vars)) $obj->extra_vars = serialize($obj->extra_vars);
|
||||
|
|
@ -353,6 +356,10 @@ class documentController extends document
|
|||
if(!$obj->module_srl) $obj->module_srl = $source_obj->get('module_srl');
|
||||
$module_srl = $obj->module_srl;
|
||||
$document_config = $oModuleModel->getModulePartConfig('document', $module_srl);
|
||||
if(!$document_config)
|
||||
{
|
||||
$document_config = new stdClass();
|
||||
}
|
||||
if(!isset($document_config->use_history)) $document_config->use_history = 'N';
|
||||
$bUseHistory = $document_config->use_history == 'Y' || $document_config->use_history == 'Trace';
|
||||
|
||||
|
|
@ -537,6 +544,7 @@ class documentController extends document
|
|||
function deleteDocument($document_srl, $is_admin = false, $isEmptyTrash = false, $oDocument = null)
|
||||
{
|
||||
// Call a trigger (before)
|
||||
$trigger_obj =new stdClass();
|
||||
$trigger_obj->document_srl = $document_srl;
|
||||
$output = ModuleHandler::triggerCall('document.deleteDocument', 'before', $trigger_obj);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
|
@ -559,6 +567,7 @@ class documentController extends document
|
|||
if(!$oDocument->isGranted()) return new Object(-1, 'msg_not_permitted');
|
||||
|
||||
//if empty trash, document already deleted, therefore document not delete
|
||||
$args = new stdClass();
|
||||
$args->document_srl = $document_srl;
|
||||
if(!$isEmptyTrash)
|
||||
{
|
||||
|
|
@ -656,6 +665,7 @@ class documentController extends document
|
|||
*/
|
||||
function moveDocumentToTrash($obj)
|
||||
{
|
||||
$trash_args = new stdClass();
|
||||
// Get trash_srl if a given trash_srl doesn't exist
|
||||
if(!$obj->trash_srl) $trash_args->trash_srl = getNextSequence();
|
||||
else $trash_args->trash_srl = $obj->trash_srl;
|
||||
|
|
@ -680,6 +690,7 @@ class documentController extends document
|
|||
$trash_args->nick_name = $logged_info->nick_name;
|
||||
}
|
||||
// Date setting for updating documents
|
||||
$doucment_args = new stdClass();
|
||||
$document_args->module_srl = 0;
|
||||
$document_args->document_srl = $obj->document_srl;
|
||||
|
||||
|
|
@ -731,6 +742,7 @@ class documentController extends document
|
|||
// Set the attachment to be invalid state
|
||||
if($oDocument->hasUploadedFiles())
|
||||
{
|
||||
$args = new stdClass();
|
||||
$args->upload_target_srl = $oDocument->document_srl;
|
||||
$args->isvalid = 'N';
|
||||
executeQuery('file.updateFileValid', $args);
|
||||
|
|
@ -824,6 +836,7 @@ class documentController extends document
|
|||
{
|
||||
if(!$module_srl || !$var_idx || !$var_name || !$var_type || !$eid) return new Object(-1,'msg_invalid_request');
|
||||
|
||||
$obj = new stdClass();
|
||||
$obj->module_srl = $module_srl;
|
||||
$obj->var_idx = $var_idx;
|
||||
$obj->var_name = $var_name;
|
||||
|
|
@ -852,6 +865,7 @@ class documentController extends document
|
|||
function deleteDocumentExtraKeys($module_srl, $var_idx = null)
|
||||
{
|
||||
if(!$module_srl) return new Object(-1,'msg_invalid_request');
|
||||
$obj = new stdClass();
|
||||
$obj->module_srl = $module_srl;
|
||||
if(!is_null($var_idx)) $obj->var_idx = $var_idx;
|
||||
|
||||
|
|
@ -933,6 +947,7 @@ class documentController extends document
|
|||
*/
|
||||
function deleteDocumentExtraVars($module_srl, $document_srl = null, $var_idx = null, $lang_code = null, $eid = null)
|
||||
{
|
||||
$obj =new stdClass();
|
||||
$obj->module_srl = $module_srl;
|
||||
if(!is_null($document_srl)) $obj->document_srl = $document_srl;
|
||||
if(!is_null($var_idx)) $obj->var_idx = $var_idx;
|
||||
|
|
@ -1072,6 +1087,7 @@ class documentController extends document
|
|||
}
|
||||
|
||||
// Check if previously reported
|
||||
$args = new stdClass();
|
||||
$args->document_srl = $document_srl;
|
||||
$output = executeQuery('document.getDeclaredDocument', $args);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
|
@ -1166,6 +1182,7 @@ class documentController extends document
|
|||
*/
|
||||
function updateCommentCount($document_srl, $comment_count, $last_updater, $comment_inserted = false)
|
||||
{
|
||||
$args = new stdClass();
|
||||
$args->document_srl = $document_srl;
|
||||
$args->comment_count = $comment_count;
|
||||
|
||||
|
|
@ -1289,6 +1306,7 @@ class documentController extends document
|
|||
*/
|
||||
function deleteCategory($category_srl)
|
||||
{
|
||||
$args = new stdClass();
|
||||
$args->category_srl = $category_srl;
|
||||
$oDocumentModel = &getModel('document');
|
||||
$category_info = $oDocumentModel->getCategory($category_srl);
|
||||
|
|
@ -1302,8 +1320,7 @@ class documentController extends document
|
|||
|
||||
$this->makeCategoryFile($category_info->module_srl);
|
||||
// Update category_srl of the documents in the same category to 0
|
||||
unset($args);
|
||||
|
||||
$args = new stdClass();
|
||||
$args->target_category_srl = 0;
|
||||
$args->source_category_srl = $category_srl;
|
||||
$output = executeQuery('document.updateDocumentCategory', $args);
|
||||
|
|
@ -1318,6 +1335,7 @@ class documentController extends document
|
|||
*/
|
||||
function deleteModuleCategory($module_srl)
|
||||
{
|
||||
$args = new stdClass();
|
||||
$args->module_srl = $module_srl;
|
||||
$output = executeQuery('document.deleteModuleCategory', $args);
|
||||
return $output;
|
||||
|
|
@ -1666,6 +1684,7 @@ class documentController extends document
|
|||
$xml_file = sprintf("./files/cache/document_category/%s.xml.php", $module_srl);
|
||||
$php_file = sprintf("./files/cache/document_category/%s.php", $module_srl);
|
||||
// Get a category list
|
||||
$args = new stdClass();
|
||||
$args->module_srl = $module_srl;
|
||||
$args->sort_index = 'list_order';
|
||||
$output = executeQuery('document.getCategoryList', $args);
|
||||
|
|
@ -1900,6 +1919,7 @@ class documentController extends document
|
|||
$document_popup_menu_list = Context::get('document_popup_menu_list');
|
||||
if(!is_array($document_popup_menu_list)) $document_popup_menu_list = array();
|
||||
|
||||
$obj = new stdClass();
|
||||
$obj->url = $url;
|
||||
$obj->str = $str;
|
||||
$obj->icon = $icon;
|
||||
|
|
@ -2074,6 +2094,7 @@ class documentController extends document
|
|||
}
|
||||
else if($type == 'trash')
|
||||
{
|
||||
$args = new stdClass();
|
||||
$args->description = $message_content;
|
||||
|
||||
$oDB = &DB::getInstance();
|
||||
|
|
|
|||
|
|
@ -84,6 +84,7 @@ class documentItem extends Object
|
|||
}
|
||||
if(!$output)
|
||||
{
|
||||
$args = new stdClass();
|
||||
$args->document_srl = $this->document_srl;
|
||||
$output = executeQuery('document.getDocument', $args, $this->columnList);
|
||||
//insert in cache
|
||||
|
|
@ -171,6 +172,10 @@ class documentItem extends Object
|
|||
// If the trackback module is configured to be disabled, do not allow. Otherwise, check the setting of each module.
|
||||
$oModuleModel = &getModel('module');
|
||||
$trackback_config = $oModuleModel->getModuleConfig('trackback');
|
||||
if(!$trackback_config)
|
||||
{
|
||||
$trackback_config = new stdClass();
|
||||
}
|
||||
if(!isset($trackback_config->enable_trackback)) $trackback_config->enable_trackback = 'Y';
|
||||
if($trackback_config->enable_trackback != 'Y') $allow_trackback_status = false;
|
||||
else
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@ class documentModel extends document
|
|||
return new Object(-1, 'msg_invalid_request');
|
||||
}
|
||||
|
||||
$args = new stdClass();
|
||||
$args->document_srl = $documentSrls;
|
||||
$output = executeQueryArray('document.getDocumentExtraVars', $args);
|
||||
return $output;
|
||||
|
|
@ -163,6 +164,7 @@ class documentModel extends document
|
|||
{
|
||||
$list_count = 1;
|
||||
}
|
||||
$args = new stdClass();
|
||||
$args->document_srls = $document_srls;
|
||||
$args->list_count = $list_count;
|
||||
$args->order_type = 'asc';
|
||||
|
|
@ -333,6 +335,7 @@ class documentModel extends document
|
|||
*/
|
||||
function getNoticeList($obj, $columnList = array())
|
||||
{
|
||||
$args = new stdClass();
|
||||
$args->module_srl = $obj->module_srl;
|
||||
$args->category_srl= $obj->category_srl;
|
||||
$output = executeQueryArray('document.getNoticeList', $args, $columnList);
|
||||
|
|
@ -373,6 +376,7 @@ class documentModel extends document
|
|||
if(is_null($GLOBALS['XE_EXTRA_KEYS'][$module_srl]))
|
||||
{
|
||||
$oExtraVar = &ExtraVar::getInstance($module_srl);
|
||||
$obj = new stdClass();
|
||||
$obj->module_srl = $module_srl;
|
||||
$obj->sort_index = 'var_idx';
|
||||
$obj->order = 'asc';
|
||||
|
|
@ -543,6 +547,7 @@ class documentModel extends document
|
|||
function getDocumentCount($module_srl, $search_obj = NULL)
|
||||
{
|
||||
// Additional search options
|
||||
$args =new stdClass();
|
||||
$args->module_srl = $module_srl;
|
||||
$args->s_title = $search_obj->s_title;
|
||||
$args->s_content = $search_obj->s_content;
|
||||
|
|
@ -646,6 +651,7 @@ class documentModel extends document
|
|||
*/
|
||||
function getCategory($category_srl, $columnList = array())
|
||||
{
|
||||
$args =new stdClass();
|
||||
$args->category_srl = $category_srl;
|
||||
$output = executeQuery('document.getCategory', $args, $columnList);
|
||||
|
||||
|
|
@ -673,6 +679,7 @@ class documentModel extends document
|
|||
*/
|
||||
function getCategoryChlidCount($category_srl)
|
||||
{
|
||||
$args = new stdClass();
|
||||
$args->category_srl = $category_srl;
|
||||
$output = executeQuery('document.getChildCategoryCount',$args);
|
||||
if($output->data->count > 0) return true;
|
||||
|
|
@ -1210,6 +1217,7 @@ class documentModel extends document
|
|||
// get module_srl extra_vars list
|
||||
if ($load_extra_vars)
|
||||
{
|
||||
$extra_args = new stdClass();
|
||||
$extra_args->module_srl = $obj->module_srl;
|
||||
$extra_output = executeQueryArray('document.getGroupsExtraVars', $extra_args);
|
||||
if (!$extra_output->data || !$extra_output->toBool())
|
||||
|
|
@ -1230,6 +1238,7 @@ class documentModel extends document
|
|||
else
|
||||
$sortIndex = 'list_order';
|
||||
}
|
||||
$returnObj = new stdClass();
|
||||
$returnObj->sort_index = $sortIndex;
|
||||
$returnObj->isExtraVars = $isExtraVars;
|
||||
|
||||
|
|
@ -1249,6 +1258,7 @@ class documentModel extends document
|
|||
function _setSearchOption($searchOpt, &$args, &$query_id, &$use_division)
|
||||
{
|
||||
// Variable check
|
||||
$args = new stdClass();
|
||||
$args->category_srl = $searchOpt->category_srl?$searchOpt->category_srl:null;
|
||||
$args->order_type = $searchOpt->order_type;
|
||||
$args->page = $searchOpt->page?$searchOpt->page:1;
|
||||
|
|
@ -1416,6 +1426,7 @@ class documentModel extends document
|
|||
// If you do not value the best division top
|
||||
if(!$division)
|
||||
{
|
||||
$division_args = new stdClass();
|
||||
$division_args->module_srl = $args->module_srl;
|
||||
$division_args->exclude_module_srl = $args->exclude_module_srl;
|
||||
$division_args->list_count = 1;
|
||||
|
|
@ -1438,6 +1449,7 @@ class documentModel extends document
|
|||
// Division after division from the 5000 value of the specified Wanted
|
||||
if(!$last_division)
|
||||
{
|
||||
$last_division_args = new stdClass();
|
||||
$last_division_args->module_srl = $args->module_srl;
|
||||
$last_division_args->exclude_module_srl = $args->exclude_module_srl;
|
||||
$last_division_args->list_count = 1;
|
||||
|
|
|
|||
|
|
@ -132,6 +132,10 @@ class documentView extends document
|
|||
{
|
||||
$document_config = $oModuleModel->getModulePartConfig('document', $current_module_srl);
|
||||
}
|
||||
if(!$document_config)
|
||||
{
|
||||
$document_config = new stdClass();
|
||||
}
|
||||
if(!isset($document_config->use_history)) $document_config->use_history = 'N';
|
||||
Context::set('document_config', $document_config);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue