mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 01:01:41 +09:00
php7.2호환을 위해 변경한 클래스 Object 를 BaseObject으로 변경
This commit is contained in:
parent
f4c19a3e0f
commit
f3f40f6859
109 changed files with 976 additions and 976 deletions
|
|
@ -134,7 +134,7 @@ class pollAdminController extends poll
|
|||
}
|
||||
$oDB->commit();
|
||||
|
||||
return new Object();
|
||||
return new BaseObject();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -171,7 +171,7 @@ class pollAdminController extends poll
|
|||
|
||||
$oDB->commit();
|
||||
|
||||
return new Object();
|
||||
return new BaseObject();
|
||||
}
|
||||
}
|
||||
/* End of file poll.admin.controller.php */
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ class pollAdminModel extends poll
|
|||
{
|
||||
$this->add('document_srl', $oDocument->get('document_srl'));
|
||||
}
|
||||
else return new Object(-1, 'msg_not_founded');
|
||||
else return new BaseObject(-1, 'msg_not_founded');
|
||||
}
|
||||
}
|
||||
/* End of file poll.admin.model.php */
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ class poll extends ModuleObject
|
|||
$oModuleController->insertTrigger('document.deleteDocument', 'poll', 'controller', 'triggerDeleteDocumentPoll', 'after');
|
||||
$oModuleController->insertTrigger('comment.deleteComment', 'poll', 'controller', 'triggerDeleteCommentPoll', 'after');
|
||||
|
||||
return new Object();
|
||||
return new BaseObject();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -105,7 +105,7 @@ class poll extends ModuleObject
|
|||
$oDB->addColumn('poll_item', 'add_user_srl', 'number', 11, 0);
|
||||
}
|
||||
|
||||
return new Object(0, 'success_updated');
|
||||
return new BaseObject(0, 'success_updated');
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -102,7 +102,7 @@ class pollController extends poll
|
|||
}
|
||||
}
|
||||
|
||||
if(!count($args->poll)) return new Object(-1, 'cmd_null_item');
|
||||
if(!count($args->poll)) return new BaseObject(-1, 'cmd_null_item');
|
||||
|
||||
$args->stop_date = $stop_date;
|
||||
|
||||
|
|
@ -178,12 +178,12 @@ class pollController extends poll
|
|||
$poll_index_srl = (int) Context::get('index_srl');
|
||||
$poll_item_title = Context::get('title');
|
||||
|
||||
if($poll_item_title=='') return new Object(-1,"msg_item_title_cannot_empty");
|
||||
if($poll_item_title=='') return new BaseObject(-1,"msg_item_title_cannot_empty");
|
||||
|
||||
$logged_info = Context::get('logged_info');
|
||||
if(!$logged_info) return new Object(-1,"msg_cannot_add_item");
|
||||
if(!$logged_info) return new BaseObject(-1,"msg_cannot_add_item");
|
||||
|
||||
if(!$poll_srl || !$poll_index_srl) return new Object(-1,"msg_invalid_request");
|
||||
if(!$poll_srl || !$poll_index_srl) return new BaseObject(-1,"msg_invalid_request");
|
||||
|
||||
$args = new stdClass();
|
||||
$args->poll_srl = $poll_srl;
|
||||
|
|
@ -191,10 +191,10 @@ class pollController extends poll
|
|||
// Get the information related to the survey
|
||||
$columnList = array('poll_type');
|
||||
$output = executeQuery('poll.getPoll', $args, $columnList);
|
||||
if(!$output->data) return new Object(-1,"poll_no_poll_or_deleted_poll");
|
||||
if(!$output->data) return new BaseObject(-1,"poll_no_poll_or_deleted_poll");
|
||||
$type = $output->data->poll_type;
|
||||
|
||||
if(!$this->isAbletoAddItem($type)) return new Object(-1,"msg_cannot_add_item");
|
||||
if(!$this->isAbletoAddItem($type)) return new BaseObject(-1,"msg_cannot_add_item");
|
||||
|
||||
if($logged_info->is_admin != 'Y')
|
||||
{
|
||||
|
|
@ -227,9 +227,9 @@ class pollController extends poll
|
|||
$poll_item_srl = Context::get('item_srl');
|
||||
|
||||
$logged_info = Context::get('logged_info');
|
||||
if(!$logged_info) return new Object(-1,"msg_cannot_delete_item");
|
||||
if(!$logged_info) return new BaseObject(-1,"msg_cannot_delete_item");
|
||||
|
||||
if(!$poll_srl || !$poll_index_srl || !$poll_item_srl) return new Object(-1,"msg_invalid_request");
|
||||
if(!$poll_srl || !$poll_index_srl || !$poll_item_srl) return new BaseObject(-1,"msg_invalid_request");
|
||||
|
||||
$args = new stdClass();
|
||||
$args->poll_srl = $poll_srl;
|
||||
|
|
@ -245,11 +245,11 @@ class pollController extends poll
|
|||
// Get the information related to the survey
|
||||
$columnList = array('member_srl');
|
||||
$output = executeQuery('poll.getPoll', $args, $columnList);
|
||||
if(!$output->data) return new Object(-1,"poll_no_poll_or_deleted_poll");
|
||||
if(!$output->data) return new BaseObject(-1,"poll_no_poll_or_deleted_poll");
|
||||
$poll_member_srl = $output->data->member_srl;
|
||||
|
||||
if($add_user_srl!=$logged_info->member_srl && $poll_member_srl!=$logged_info->member_srl) return new Object(-1,"msg_cannot_delete_item");
|
||||
if($poll_count>0) return new Object(-1,"msg_cannot_delete_item_poll_exist");
|
||||
if($add_user_srl!=$logged_info->member_srl && $poll_member_srl!=$logged_info->member_srl) return new BaseObject(-1,"msg_cannot_delete_item");
|
||||
if($poll_count>0) return new BaseObject(-1,"msg_cannot_delete_item_poll_exist");
|
||||
|
||||
$oDB = &DB::getInstance();
|
||||
$oDB->begin();
|
||||
|
|
@ -280,9 +280,9 @@ class pollController extends poll
|
|||
// Get the information related to the survey
|
||||
$columnList = array('poll_count', 'stop_date','poll_type');
|
||||
$output = executeQuery('poll.getPoll', $args, $columnList);
|
||||
if(!$output->data) return new Object(-1,"poll_no_poll_or_deleted_poll");
|
||||
if(!$output->data) return new BaseObject(-1,"poll_no_poll_or_deleted_poll");
|
||||
|
||||
if($output->data->stop_date < date("Ymd")) return new Object(-1,"msg_cannot_vote");
|
||||
if($output->data->stop_date < date("Ymd")) return new BaseObject(-1,"msg_cannot_vote");
|
||||
|
||||
$columnList = array('checkcount');
|
||||
$output = executeQuery('poll.getPollTitle', $args, $columnList);
|
||||
|
|
@ -290,7 +290,7 @@ class pollController extends poll
|
|||
|
||||
$poll_srl_indexes = Context::get('poll_srl_indexes');
|
||||
$tmp_item_srls = explode(',',$poll_srl_indexes);
|
||||
//if(count($tmp_item_srls)-1>(int)$output->data->checkcount) return new Object(-1,"msg_exceed_max_select");
|
||||
//if(count($tmp_item_srls)-1>(int)$output->data->checkcount) return new BaseObject(-1,"msg_exceed_max_select");
|
||||
for($i=0;$i<count($tmp_item_srls);$i++)
|
||||
{
|
||||
$srl = (int)trim($tmp_item_srls[$i]);
|
||||
|
|
@ -299,10 +299,10 @@ class pollController extends poll
|
|||
}
|
||||
|
||||
// If there is no response item, display an error
|
||||
if(!count($item_srls)) return new Object(-1, 'msg_check_poll_item');
|
||||
if(!count($item_srls)) return new BaseObject(-1, 'msg_check_poll_item');
|
||||
// Make sure is the poll has already been taken
|
||||
$oPollModel = getModel('poll');
|
||||
if($oPollModel->isPolled($poll_srl)) return new Object(-1, 'msg_already_poll');
|
||||
if($oPollModel->isPolled($poll_srl)) return new BaseObject(-1, 'msg_already_poll');
|
||||
|
||||
$oDB = &DB::getInstance();
|
||||
$oDB->begin();
|
||||
|
|
@ -382,7 +382,7 @@ class pollController extends poll
|
|||
*/
|
||||
function procPollGetList()
|
||||
{
|
||||
if(!Context::get('is_logged')) return new Object(-1,'msg_not_permitted');
|
||||
if(!Context::get('is_logged')) return new BaseObject(-1,'msg_not_permitted');
|
||||
$pollSrls = Context::get('poll_srls');
|
||||
if($pollSrls) $pollSrlList = explode(',', $pollSrls);
|
||||
|
||||
|
|
@ -419,7 +419,7 @@ class pollController extends poll
|
|||
function triggerInsertDocumentPoll(&$obj)
|
||||
{
|
||||
$this->syncPoll($obj->document_srl, $obj->content);
|
||||
return new Object();
|
||||
return new BaseObject();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -428,7 +428,7 @@ class pollController extends poll
|
|||
function triggerInsertCommentPoll(&$obj)
|
||||
{
|
||||
$this->syncPoll($obj->comment_srl, $obj->content);
|
||||
return new Object();
|
||||
return new BaseObject();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -437,7 +437,7 @@ class pollController extends poll
|
|||
function triggerUpdateDocumentPoll(&$obj)
|
||||
{
|
||||
$this->syncPoll($obj->document_srl, $obj->content);
|
||||
return new Object();
|
||||
return new BaseObject();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -446,7 +446,7 @@ class pollController extends poll
|
|||
function triggerUpdateCommentPoll(&$obj)
|
||||
{
|
||||
$this->syncPoll($obj->comment_srl, $obj->content);
|
||||
return new Object();
|
||||
return new BaseObject();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -455,15 +455,15 @@ class pollController extends poll
|
|||
function triggerDeleteDocumentPoll(&$obj)
|
||||
{
|
||||
$document_srl = $obj->document_srl;
|
||||
if(!$document_srl) return new Object();
|
||||
if(!$document_srl) return new BaseObject();
|
||||
// Get the poll
|
||||
$args = new stdClass();
|
||||
$args->upload_target_srl = $document_srl;
|
||||
$output = executeQuery('poll.getPollByTargetSrl', $args);
|
||||
if(!$output->data) return new Object();
|
||||
if(!$output->data) return new BaseObject();
|
||||
|
||||
$poll_srl = $output->data->poll_srl;
|
||||
if(!$poll_srl) return new Object();
|
||||
if(!$poll_srl) return new BaseObject();
|
||||
|
||||
$args->poll_srl = $poll_srl;
|
||||
|
||||
|
|
@ -479,7 +479,7 @@ class pollController extends poll
|
|||
$output = executeQuery('poll.deletePollLog', $args);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
return new Object();
|
||||
return new BaseObject();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -488,15 +488,15 @@ class pollController extends poll
|
|||
function triggerDeleteCommentPoll(&$obj)
|
||||
{
|
||||
$comment_srl = $obj->comment_srl;
|
||||
if(!$comment_srl) return new Object();
|
||||
if(!$comment_srl) return new BaseObject();
|
||||
// Get the poll
|
||||
$args = new stdClass();
|
||||
$args->upload_target_srl = $comment_srl;
|
||||
$output = executeQuery('poll.getPollByTargetSrl', $args);
|
||||
if(!$output->data) return new Object();
|
||||
if(!$output->data) return new BaseObject();
|
||||
|
||||
$poll_srl = $output->data->poll_srl;
|
||||
if(!$poll_srl) return new Object();
|
||||
if(!$poll_srl) return new BaseObject();
|
||||
|
||||
$args->poll_srl = $poll_srl;
|
||||
|
||||
|
|
@ -512,7 +512,7 @@ class pollController extends poll
|
|||
$output = executeQuery('poll.deletePollLog', $args);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
return new Object();
|
||||
return new BaseObject();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -23,13 +23,13 @@ class pollModel extends poll
|
|||
$args->poll_srl = intval($poll_srl);
|
||||
$logged_info = Context::get('logged_info');
|
||||
|
||||
if(!$args->poll_srl || $args->poll_srl === 0) return new Object(-1,"poll_no_poll_srl");
|
||||
if(!$args->poll_srl || $args->poll_srl === 0) return new BaseObject(-1,"poll_no_poll_srl");
|
||||
|
||||
// Get the information related to the survey
|
||||
$columnList = array('poll_count', 'stop_date','poll_type','member_srl');
|
||||
$output = executeQuery('poll.getPoll', $args, $columnList);
|
||||
$poll_member_srl = $output->data->member_srl;
|
||||
if(!$output->data) return new Object(-1,"poll_no_poll_or_deleted_poll");
|
||||
if(!$output->data) return new BaseObject(-1,"poll_no_poll_or_deleted_poll");
|
||||
|
||||
$poll = new stdClass;
|
||||
|
||||
|
|
@ -96,7 +96,7 @@ class pollModel extends poll
|
|||
$poll_srl = Context::get('poll_srl');
|
||||
$poll_item = Context::get('poll_item');
|
||||
|
||||
if(!$poll_srl || $poll_srl=='') return new Object(-1,"poll_no_poll_srl");
|
||||
if(!$poll_srl || $poll_srl=='') return new BaseObject(-1,"poll_no_poll_srl");
|
||||
|
||||
$args->poll_srl = $poll_srl;
|
||||
$args->poll_item_srl = $poll_item;
|
||||
|
|
@ -104,7 +104,7 @@ class pollModel extends poll
|
|||
// Get the information related to the survey
|
||||
$columnList = array('poll_type');
|
||||
$output = executeQuery('poll.getPoll', $args, $columnList);
|
||||
if(!$output->data) return new Object(-1,"poll_no_poll_or_deleted_poll");
|
||||
if(!$output->data) return new BaseObject(-1,"poll_no_poll_or_deleted_poll");
|
||||
$type = $output->data->poll_type;
|
||||
|
||||
$poll = new stdClass();
|
||||
|
|
@ -176,7 +176,7 @@ class pollModel extends poll
|
|||
public function getPollstatus()
|
||||
{
|
||||
$poll_srl = Context::get('poll_srl');
|
||||
if(!$poll_srl || $poll_srl=='') return new Object(-1,"poll_no_poll_srl");
|
||||
if(!$poll_srl || $poll_srl=='') return new BaseObject(-1,"poll_no_poll_srl");
|
||||
|
||||
if($this->isPolled($poll_srl)) $is_polled = 1;
|
||||
else $is_polled = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue