mirror of
https://github.com/Oreolek/ifhub.club.git
synced 2024-05-19 17:28:23 +03:00
Доработка жалоб
This commit is contained in:
parent
d0e12c0cce
commit
22902e1b08
|
@ -143,6 +143,7 @@ class ActionProfile extends Action {
|
|||
$oComplaint->setText(getRequestStr('text'));
|
||||
$oComplaint->setType(getRequestStr('type'));
|
||||
$oComplaint->setCaptcha(getRequestStr('captcha'));
|
||||
$oComplaint->setState(ModuleUser::COMPLAINT_STATE_NEW);
|
||||
|
||||
if ($oComplaint->_Validate()) {
|
||||
/**
|
||||
|
|
|
@ -30,6 +30,11 @@ class ModuleUser extends Module {
|
|||
const USER_FRIEND_DELETE = 4;
|
||||
const USER_FRIEND_REJECT = 8;
|
||||
const USER_FRIEND_NULL = 16;
|
||||
/**
|
||||
* Статусы жалобы на пользователя
|
||||
*/
|
||||
const COMPLAINT_STATE_NEW = 1;
|
||||
const COMPLAINT_STATE_READ = 2;
|
||||
/**
|
||||
* Объект маппера
|
||||
*
|
||||
|
|
|
@ -1131,7 +1131,7 @@ class ModuleUser_MapperUser extends Mapper {
|
|||
*/
|
||||
public function AddComplaint($oComplaint) {
|
||||
$sql = "INSERT INTO ".Config::Get('db.table.user_complaint')." SET ?a ";
|
||||
if ($iId=$this->oDb->query($sql,$oComplaint->_getData(array('type','target_user_id','user_id','text','date_add')))) {
|
||||
if ($iId=$this->oDb->query($sql,$oComplaint->_getData(array('type','target_user_id','user_id','text','date_add','state')))) {
|
||||
return $iId;
|
||||
}
|
||||
return false;
|
||||
|
|
|
@ -371,3 +371,8 @@ ALTER TABLE `prefix_rbac_role_permission`
|
|||
ALTER TABLE `prefix_rbac_user_role`
|
||||
ADD CONSTRAINT `prefix_rbac_user_role_ibfk_2` FOREIGN KEY (`user_id`) REFERENCES `prefix_user` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
||||
ADD CONSTRAINT `prefix_rbac_user_role_ibfk_1` FOREIGN KEY (`role_id`) REFERENCES `prefix_rbac_role` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
|
||||
|
||||
-- 28.01.2014
|
||||
ALTER TABLE `prefix_user_complaint` ADD `state` TINYINT NOT NULL DEFAULT '1',
|
||||
ADD INDEX ( `state` ) ;
|
Loading…
Reference in a new issue