Index: trunk/extensions/SocialProfile/SystemGifts/UserSystemGiftsClass.php |
— | — | @@ -320,7 +320,8 @@ |
321 | 321 | array( |
322 | 322 | 'sg_id', 'sg_user_id', 'sg_user_name', 'sg_gift_id', 'sg_date', |
323 | 323 | 'sg_status', 'gift_name', 'gift_description', |
324 | | - 'gift_given_count', 'UNIX_TIMESTAMP(sg_date) AS unix_time' |
| 324 | + 'gift_given_count', |
| 325 | + "{$dbr->unixTimestamp( 'sg_date' )} AS unix_time" |
325 | 326 | ), |
326 | 327 | array( "sg_user_id = {$this->user_id}" ), |
327 | 328 | __METHOD__, |
Index: trunk/extensions/SocialProfile/UserBoard/UserBoardClass.php |
— | — | @@ -282,7 +282,7 @@ |
283 | 283 | } |
284 | 284 | |
285 | 285 | $sql = "SELECT ub_id, ub_user_id_from, ub_user_name_from, ub_user_id, ub_user_name, |
286 | | - ub_message,UNIX_TIMESTAMP(ub_date) AS unix_time,ub_type |
| 286 | + ub_message,{$dbr->unixTimestamp( 'ub_date' )} AS unix_time,ub_type |
287 | 287 | FROM {$dbr->tableName( 'user_board' )} |
288 | 288 | WHERE {$user_sql} |
289 | 289 | ORDER BY ub_id DESC |
Index: trunk/extensions/SocialProfile/UserActivity/UserActivityClass.php |
— | — | @@ -75,7 +75,7 @@ |
76 | 76 | $user_sql = " WHERE rc_user = {$this->user_id}"; |
77 | 77 | } |
78 | 78 | |
79 | | - $sql = "SELECT UNIX_TIMESTAMP(rc_timestamp) AS item_date, rc_title, |
| 79 | + $sql = "SELECT {$dbr->unixTimestamp( 'rc_timestamp' )} AS item_date, rc_title, |
80 | 80 | rc_user, rc_user_text, rc_comment, rc_id, rc_minor, rc_new, |
81 | 81 | rc_namespace, rc_cur_id, rc_this_oldid, rc_last_oldid, |
82 | 82 | rc_log_action |
— | — | @@ -140,7 +140,7 @@ |
141 | 141 | $user_sql = " AND vote_user_id = {$this->user_id}"; |
142 | 142 | } |
143 | 143 | |
144 | | - $sql = "SELECT UNIX_TIMESTAMP(vote_date) AS item_date, username, |
| 144 | + $sql = "SELECT {$dbr->unixTimestamp( 'vote_date' )} AS item_date, username, |
145 | 145 | page_title, vote_count, comment_count, vote_ip, |
146 | 146 | vote_user_id |
147 | 147 | FROM {$dbr->tableName( 'Vote' )} v, {$dbr->tableName( 'page' )} p |
— | — | @@ -184,7 +184,7 @@ |
185 | 185 | $user_sql = "AND Comment_user_id = {$this->user_id}"; |
186 | 186 | } |
187 | 187 | |
188 | | - $sql = "SELECT UNIX_TIMESTAMP(comment_date) AS item_date, |
| 188 | + $sql = "SELECT {$dbr->unixTimestamp( 'comment_date' )} AS item_date, |
189 | 189 | Comment_Username, Comment_IP, page_title, Comment_Text, |
190 | 190 | Comment_user_id, page_namespace, CommentID |
191 | 191 | FROM {$dbr->tableName( 'Comments' )} c, {$dbr->tableName( 'page' )} p |
— | — | @@ -252,7 +252,7 @@ |
253 | 253 | |
254 | 254 | $sql = "SELECT ug_id, ug_user_id_from, ug_user_name_from, |
255 | 255 | ug_user_id_to, ug_user_name_to, |
256 | | - UNIX_TIMESTAMP(ug_date) AS item_date, gift_name, gift_id |
| 256 | + {$dbr->unixTimestamp( 'ug_date' )} AS item_date, gift_name, gift_id |
257 | 257 | FROM {$dbr->tableName( 'user_gift' )} |
258 | 258 | INNER JOIN {$dbr->tableName( 'gift' )} ON gift_id = ug_gift_id |
259 | 259 | {$rel_sql} {$user_sql} |
— | — | @@ -289,7 +289,7 @@ |
290 | 290 | |
291 | 291 | $sql = "SELECT ug_id, ug_user_id_from, ug_user_name_from, |
292 | 292 | ug_user_id_to, ug_user_name_to, |
293 | | - UNIX_TIMESTAMP(ug_date) AS item_date, gift_name, gift_id |
| 293 | + {$dbr->unixTimestamp( 'ug_date' )} AS item_date, gift_name, gift_id |
294 | 294 | FROM {$dbr->tableName( 'user_gift' )} |
295 | 295 | INNER JOIN {$dbr->tableName( 'gift' )} ON gift_id = ug_gift_id |
296 | 296 | {$rel_sql} {$user_sql} |
— | — | @@ -349,7 +349,7 @@ |
350 | 350 | } |
351 | 351 | |
352 | 352 | $sql = "SELECT sg_id, sg_user_id, sg_user_name, |
353 | | - UNIX_TIMESTAMP(sg_date) AS item_date, gift_name, gift_id |
| 353 | + {$dbr->unixTimestamp( 'sg_date' )} AS item_date, gift_name, gift_id |
354 | 354 | FROM {$dbr->tableName( 'user_system_gift' )} |
355 | 355 | INNER JOIN {$dbr->tableName( 'system_gift' )} ON gift_id = sg_gift_id |
356 | 356 | {$rel_sql} {$user_sql} |
— | — | @@ -402,7 +402,9 @@ |
403 | 403 | } else { |
404 | 404 | $user_sql = ''; |
405 | 405 | } |
406 | | - $sql = "SELECT r_id, r_user_id, r_user_name, r_user_id_relation, r_user_name_relation, r_type, UNIX_TIMESTAMP(r_date) AS item_date |
| 406 | + $sql = "SELECT r_id, r_user_id, r_user_name, r_user_id_relation, |
| 407 | + r_user_name_relation, r_type, |
| 408 | + {$dbr->unixTimestamp( 'r_date' )} AS item_date |
407 | 409 | FROM {$dbr->tableName( 'user_relationship' )} |
408 | 410 | {$rel_sql} {$user_sql} |
409 | 411 | ORDER BY r_id DESC LIMIT 0,{$this->item_max}"; |
— | — | @@ -465,7 +467,8 @@ |
466 | 468 | } |
467 | 469 | |
468 | 470 | $sql = "SELECT ub_id, ub_user_id, ub_user_name, ub_user_id_from, |
469 | | - ub_user_name_from, UNIX_TIMESTAMP(ub_date) AS item_date, |
| 471 | + ub_user_name_from, |
| 472 | + {$dbr->unixTimestamp( 'ub_date' )} AS item_date, |
470 | 473 | ub_message |
471 | 474 | FROM {$dbr->tableName( 'user_board' )} WHERE |
472 | 475 | {$rel_sql} {$user_sql} ub_type=0 |
— | — | @@ -523,7 +526,8 @@ |
524 | 527 | $user_sql = " WHERE um_user_id = {$this->user_id}"; |
525 | 528 | } |
526 | 529 | |
527 | | - $sql = "SELECT um_id, um_user_id, um_user_name, um_type, um_message, UNIX_TIMESTAMP(um_date) AS item_date |
| 530 | + $sql = "SELECT um_id, um_user_id, um_user_name, um_type, um_message, |
| 531 | + {$dbr->unixTimestamp( 'um_date' )} AS item_date |
528 | 532 | FROM {$dbr->tableName( 'user_system_messages' )} |
529 | 533 | {$rel_sql} {$user_sql} |
530 | 534 | ORDER BY um_id DESC LIMIT 0,{$this->item_max}"; |
Index: trunk/extensions/SocialProfile/UserGifts/UserGiftsClass.php |
— | — | @@ -318,7 +318,8 @@ |
319 | 319 | array( |
320 | 320 | 'ug_id', 'ug_user_id_from', 'ug_user_name_from', 'ug_gift_id', |
321 | 321 | 'ug_date', 'ug_status', 'gift_name', 'gift_description', |
322 | | - 'gift_given_count', 'UNIX_TIMESTAMP(ug_date) AS unix_time' |
| 322 | + 'gift_given_count', |
| 323 | + "{$dbr->unixTimestamp( 'ug_date' )} AS unix_time" |
323 | 324 | ), |
324 | 325 | array( "ug_user_id_to = {$this->user_id}" ), |
325 | 326 | __METHOD__, |
— | — | @@ -363,7 +364,8 @@ |
364 | 365 | array( |
365 | 366 | 'ug_id', 'ug_user_id_from', 'ug_user_name_from', 'ug_gift_id', |
366 | 367 | 'ug_date', 'ug_status', 'gift_name', 'gift_description', |
367 | | - 'gift_given_count', 'UNIX_TIMESTAMP(ug_date) AS unix_time' |
| 368 | + 'gift_given_count', |
| 369 | + "{$dbr->unixTimestamp( 'ug_date' )} AS unix_time" |
368 | 370 | ), |
369 | 371 | array(), |
370 | 372 | __METHOD__, |