diff --git a/hwe/js/msg.js b/hwe/js/msg.js index 25cab9cb..53e524b7 100644 --- a/hwe/js/msg.js +++ b/hwe/js/msg.js @@ -31,7 +31,7 @@ var generalList = {}; function responseMessage(msgID, response){ $.ajax({ - url: 'prompt_dummy.php', + url: 'j_decide_opt.php', type: 'post', dataType:'json', contentType: 'application/json', @@ -334,7 +334,7 @@ function activateMessageForm(){ if(text){ deferred = $.ajax({ - url:'add_msg_dummy.php', + url:'j_msg_submit.php', type: 'post', dataType:'json', contentType: 'application/json', diff --git a/hwe/sammo/MessageTarget.php b/hwe/sammo/MessageTarget.php index 5fd03690..98616bb5 100644 --- a/hwe/sammo/MessageTarget.php +++ b/hwe/sammo/MessageTarget.php @@ -32,7 +32,10 @@ class MessageTarget extends Target { $this->icon = $icon; } - public static function buildFromArray(array $arr) : MessageTarget + /** + * @return MessageTarget + */ + public static function buildFromArray($arr) { if(!$arr){ return null; diff --git a/hwe/sammo/Target.php b/hwe/sammo/Target.php index 1709ada0..01cf86db 100644 --- a/hwe/sammo/Target.php +++ b/hwe/sammo/Target.php @@ -13,7 +13,10 @@ class Target { $this->nationID = $nationID; } - public static function buildFromArray(array $arr) : Target + /** + * @return Target + */ + public static function buildFromArray($arr) { return new Target($arr['id'], $arr['nation_id']??0); } diff --git a/src/sammo/AppConf.php b/src/sammo/AppConf.php index dde33178..7cc9b530 100644 --- a/src/sammo/AppConf.php +++ b/src/sammo/AppConf.php @@ -59,11 +59,19 @@ class AppConf return DB::db(); } - public static function getUserIconPathFS() : string{ - return ROOT.'/'.static::$userIconPath; + public static function getUserIconPathFS(string $filepath='') : string{ + $path = ROOT.'/'.static::$userIconPath; + if($filepath){ + $path .= '/'.$filepath; + } + return $path; } - public static function getUserIconPathWeb() : string{ - return ServConfig::$serverWebPath.'/'.static::$userIconPath; + public static function getUserIconPathWeb(string $filepath='') : string{ + $path = ServConfig::$serverWebPath.'/'.static::$userIconPath; + if($filepath){ + $path .= '/'.$filepath; + } + return $path; } }