• R/O
  • SSH
  • HTTPS

jinrousiki: Commit


Commit MetaInfo

Revision2308 (tree)
Time2018-12-29 20:37:37
Authorumethyl

Log Message

Query::SetNull()

Change Summary

Incremental Difference

--- trunk/include/database/room_manager_db_class.php (revision 2307)
+++ trunk/include/database/room_manager_db_class.php (revision 2308)
@@ -120,7 +120,7 @@
120120 */
121121 public static function ClearSession() {
122122 $query = Query::Init()->Table('user_entry AS u INNER JOIN room AS r USING (room_no)');
123- $query->Update()->SetData('u.session_id', 'NULL');
123+ $query->Update()->SetNull('u.session_id');
124124 $query->WhereNotNull('u.session_id')->Where(['r.status']);
125125 $query->WhereUpper('r.finish_datetime', 'DATE_SUB(NOW(), INTERVAL ? SECOND)');
126126 $query->WhereNull('r.finish_datetime');
--- trunk/include/database/user_db_class.php (revision 2307)
+++ trunk/include/database/user_db_class.php (revision 2308)
@@ -97,8 +97,7 @@
9797
9898 //キック処理
9999 public static function Kick($id) {
100- $query = self::GetQueryUpdate()->Set(['live'])->SetData('session_id', 'NULL');
101- $query->Where(['user_no']);
100+ $query = self::GetQueryUpdate()->Set(['live'])->SetNull('session_id')->Where(['user_no']);
102101
103102 DB::Prepare($query->Build(), [UserLive::KICK, DB::$ROOM->id, $id]);
104103 return DB::FetchBool();
@@ -106,8 +105,8 @@
106105
107106 //GM ログアウト
108107 public static function LogoutGM() {
109- $query = self::GetQueryUpdate()->Set(['handle_name', 'password']);
110- $query->SetData('session_id', 'NULL')->Where(['user_no']);
108+ $query = self::GetQueryUpdate()->Set(['handle_name', 'password'])->SetNull('session_id');
109+ $query->Where(['user_no']);
111110 $list = [
112111 Message::DUMMY_BOY, Text::Crypt(ServerConfig::PASSWORD), DB::$ROOM->id,
113112 DB::$USER->GetDummyBoyID()
Show on old repository browser