User:
Pass:
Keep:   
Xoops Cube Project
XOOPS Cube Project Site
Powered by Google


Powered by XOOPS Cube Legacy 2.1.8
PukiWikiMod 1.5.1
WordPress Module 0.6.0 Alpha
_wp_posts の post_modified フィールド 投稿者: Nat 投稿日:2005/03/08(Tue) 01:24 No.1276  
崎村です。

_wp_posts の post_modified フィールドがまったく利用されていないのに気づきました。本来、記事が更新されたときに、そのフィールドに NOW() を入れるのが正しいのではないかと思い、勝手にパッチしてしまいました。

対象は wp-admin/post.php です。

$ !diff
diff post.php.orig post.php
118c118
< (ID, post_author, post_date, post_content, post_title, post_lat, post_lon, post_excerpt, post_status, comment_status, ping_status, post_password, post_name, to_ping)
---
> (ID, post_author, post_date, post_content, post_title, post_lat, post_lon, post_excerpt, post_status, comment_status, ping_status, post_password, post_name, to_ping, post_modified)
120c120
< ('0', '$user_ID', '$now', '$content', '$post_title', $post_latf, $post_lonf,'$excerpt', '$post_status', '$comment_status', '$ping_status', '$post_password', '$post_name', '$trackback')
---
> ('0', '$user_ID', '$now', '$content', '$post_title', $post_latf, $post_lonf,'$excerpt', '$post_status', '$comment_status', '$ping_status', '$post_password', '$post_name', '$trackback', NOW() )
124c124
< (ID, post_author, post_date, post_content, post_title, post_excerpt, post_status, comment_status, ping_status, post_password, post_name, to_ping)
---
> (ID, post_author, post_date, post_content, post_title, post_excerpt, post_status, comment_status, ping_status, post_password, post_name, to_ping, post_modified)
126c126
< ('0', '$user_ID', '$now', '$content', '$post_title', '$excerpt', '$post_status', '$comment_status', '$ping_status', '$post_password', '$post_name', '$trackback')
---
> ('0', '$user_ID', '$now', '$content', '$post_title', '$excerpt', '$post_status', '$comment_status', '$ping_status', '$post_password', '$post_name', '$trackback', NOW())
321a322
> post_modified = NOW(),


とりいそぎ。


Re: _wp_posts の post_modified フィールド 投稿者: のぶのぶ 投稿日:2005/03/09(Wed) 12:42 No.1287  

_wp_posts の post_modified フィールドがまったく利用されていないのに気づきました。本来、記事が更新されたときに、そのフィールドに NOW() を入れるのが正しいのではないかと思い、勝手にパッチしてしまいました。

実は、WordPressのテーブルには使っていないフィールドが幾つか残っています。
確かにpost_modifiedもその中の一つです。
これに関してはお教えいただいたとおり、now()を入れるだけでよいですね。


NO: PASS:

このプログラムは KENT 氏の yybbs を xoops(PHP) に移植したものです
- KENT -