codes****@googl*****
codes****@googl*****
2008年 10月 19日 (日) 23:28:37 JST
Author: dengenxp Date: Sun Oct 19 07:21:38 2008 New Revision: 957 Modified: trunk/geeklog-1-jp-extended/plugins/calendarjp/functions.inc trunk/geeklog-1-jp-extended/plugins/calendarjp/language/japanese_utf-8.php trunk/geeklog-1-jp-extended/plugins/calendarjp/readme_jp.html trunk/geeklog-1-jp-extended/plugins/calendarjp/sql/mssql_install.php trunk/geeklog-1-jp-extended/plugins/calendarjp/sql/mysql_install.php trunk/geeklog-1-jp-extended/public_html/admin/plugins/calendarjp/install.php Log: calendarjpプラグイン:r955の修正をtrunk/geeklog-1-jp-extendedへ反映させま す。 Modified: trunk/geeklog-1-jp-extended/plugins/calendarjp/functions.inc ============================================================================== --- trunk/geeklog-1-jp-extended/plugins/calendarjp/functions.inc (original) +++ trunk/geeklog-1-jp-extended/plugins/calendarjp/functions.inc Sun Oct 19 07:21:38 2008 @@ -58,7 +58,7 @@ $_CAJP_CONF = $ca_config->get_config('calendarjp'); } -$_CAJP_CONF['version'] = '1.0.4'; +$_CAJP_CONF['version'] = '1.0.5'; $_TABLES['eventsjp'] = $_DB_table_prefix . 'eventsjp'; $_TABLES['eventsubmissionjp'] = $_DB_table_prefix . 'eventsubmissionjp'; Modified: trunk/geeklog-1-jp-extended/plugins/calendarjp/language/japanese_utf-8.php ============================================================================== --- trunk/geeklog-1-jp-extended/plugins/calendarjp/language/japanese_utf-8.php (original) +++ trunk/geeklog-1-jp-extended/plugins/calendarjp/language/japanese_utf-8.php Sun Oct 19 07:21:38 2008 @@ -30,7 +30,7 @@ ############################################################################### # Last Update 2008/06/02 by Geeklog.jp group - info AT geeklog DOT jp -global $LANG32; +global $LANG32, $LANG_postmodes; ############################################################################### # Array Format: Modified: trunk/geeklog-1-jp-extended/plugins/calendarjp/readme_jp.html ============================================================================== --- trunk/geeklog-1-jp-extended/plugins/calendarjp/readme_jp.html (original) +++ trunk/geeklog-1-jp-extended/plugins/calendarjp/readme_jp.html Sun Oct 19 07:21:38 2008 @@ -116,9 +116,9 @@ </head> <body> <h1><a name="_top">Calendarjp プラグイン</a></h1> - <h2>バージョン: 1.0.4</h2> + <h2>バージョン: 1.0.5</h2> <h2>作成者: Yoshinori Tahara - dengen</h2> - <h2>公開日: 2008.10.8</h2> + <h2>公開日: 2008.10.19</h2> <h2>ライセンス: GPL</h2> <h2>概要:</h2> <ul> @@ -207,6 +207,11 @@ <th>説明</th> </tr> + <tr> + <td class="center">1.0.5</td> + <td class="center">2008.10.19</td> + <td><span class="fix">修正</span> まれにcalendarプラグインから データを正常に引き継げない場合があることに対応しました。</tr> + </tr> <tr> <td class="center">1.0.4</td> <td class="center">2008.10.8</td> Modified: trunk/geeklog-1-jp-extended/plugins/calendarjp/sql/mssql_install.php ============================================================================== --- trunk/geeklog-1-jp-extended/plugins/calendarjp/sql/mssql_install.php (original) +++ trunk/geeklog-1-jp-extended/plugins/calendarjp/sql/mssql_install.php Sun Oct 19 07:21:38 2008 @@ -134,7 +134,7 @@ ) ON [PRIMARY] "; -$_SQL[] = "INSERT INTO {$_TABLES['eventsubmissionjp']} (eid, title, description, location, datestart, dateend, url, allday, zipcode, state, city, address2, address1, event_type, timestart, timeend) VALUES ('2008050110130162','Installed the Calendarjp plugin','Today, you successfully installed the Calendarjp plugin.','Your webserver',getdate(),getdate(),'http://www.geeklog.net/',1,NULL,NULL,NULL,NULL,NULL,'',NULL,NULL)"; +//$_SQL[] = "INSERT INTO {$_TABLES['eventsubmissionjp']} (eid, title, description, location, datestart, dateend, url, allday, zipcode, state, city, address2, address1, event_type, timestart, timeend) VALUES ('2008050110130162','Installed the Calendarjp plugin','Today, you successfully installed the Calendarjp plugin.','Your webserver',getdate(),getdate(),'http://www.geeklog.net/',1,NULL,NULL,NULL,NULL,NULL,'',NULL,NULL)"; $_SQL[] = "INSERT INTO {$_TABLES['blocks']} (is_enabled, name, type, title, tid, blockorder, content, onleft, phpblockfn, owner_id, group_id, perm_owner, perm_group) VALUES (1,'eventsjp_block','phpblock','Events','all',4,'',1,'phpblock_calendarjp',{$_USER['uid']},#group#,3,3)"; Modified: trunk/geeklog-1-jp-extended/plugins/calendarjp/sql/mysql_install.php ============================================================================== --- trunk/geeklog-1-jp-extended/plugins/calendarjp/sql/mysql_install.php (original) +++ trunk/geeklog-1-jp-extended/plugins/calendarjp/sql/mysql_install.php Sun Oct 19 07:21:38 2008 @@ -117,7 +117,7 @@ ) TYPE=MyISAM "; -$_SQL[] = "INSERT INTO {$_TABLES['eventsubmissionjp']} (eid, title, description, location, datestart, dateend, url, allday, zipcode, state, city, address2, address1, event_type, timestart, timeend) VALUES ('2008050110130162','Installed the Calendarjp plugin','Today, you successfully installed the Calendarjp plugin.','Your webserver',CURDATE(),CURDATE(),'http://www.geeklog.net/',1,NULL,NULL,NULL,NULL,NULL,'',NULL,NULL)"; +//$_SQL[] = "INSERT INTO {$_TABLES['eventsubmissionjp']} (eid, title, description, location, datestart, dateend, url, allday, zipcode, state, city, address2, address1, event_type, timestart, timeend) VALUES ('2008050110130162','Installed the Calendarjp plugin','Today, you successfully installed the Calendarjp plugin.','Your webserver',CURDATE(),CURDATE(),'http://www.geeklog.net/',1,NULL,NULL,NULL,NULL,NULL,'',NULL,NULL)"; $_SQL[] = "INSERT INTO {$_TABLES['blocks']} (is_enabled, name, type, title, tid, blockorder, content, onleft, phpblockfn, owner_id, group_id, perm_owner, perm_group) VALUES (1,'eventsjp_block','phpblock','Events','all',4,'',1,'phpblock_calendarjp',{$_USER['uid']},#group#,3,3)"; Modified: trunk/geeklog-1-jp-extended/public_html/admin/plugins/calendarjp/install.php ============================================================================== --- trunk/geeklog-1-jp-extended/public_html/admin/plugins/calendarjp/install.php (original) +++ trunk/geeklog-1-jp-extended/public_html/admin/plugins/calendarjp/install.php Sun Oct 19 07:21:38 2008 @@ -43,7 +43,7 @@ // $pi_display_name = 'Calendarjp'; $pi_name = 'calendarjp'; -$pi_version = '1.0.4'; +$pi_version = '1.0.5'; $gl_version = '1.5.0'; $pi_url = 'http://www.geeklog.jp/'; @@ -124,7 +124,7 @@ */ function plugin_postinstall () { - global $_CONF, $_TABLES, $LANG_CALJP_1; + global $_CONF, $_TABLES, $_PLUGINS, $LANG_CALJP_1; // fix Upcoming Events block group ownership $blockAdminGroup = DB_getItem ($_TABLES['groups'], 'grp_id', @@ -144,6 +144,57 @@ DB_query ("UPDATE {$_TABLES['blocks']} SET group_id = $blockAdminGroup, title = '$title', blockorder = $order, perm_owner = {$A['perm_owner']}, perm_group = {$A['perm_group']}, perm_members = {$A['perm_members']}, perm_anon = {$A['perm_anon']} WHERE (type = 'phpblock') AND (phpblockfn = 'phpblock_calendarjp')"); + if (in_array('calendar',$_PLUGINS)) { +// DB_query ("INSERT INTO {$_TABLES['eventsjp']} SELECT * FROM {$_TABLES['events']}"); // これでうまくいかない場合がある。 + $result = DB_query ("SELECT * FROM {$_TABLES['events']}"); + while ($A = DB_fetchArray($result)) { + DB_query ("INSERT INTO {$_TABLES['eventsjp']} " + . "(eid, title, description, postmode, datestart, dateend, url, hits, owner_id, " + . "group_id, perm_owner, perm_group, perm_members, perm_anon, address1, address2, " + . "city, state, zipcode, allday, event_type, location, timestart, timeend) " + . "VALUES (" + . "'".$A['eid']."', '".$A['title']."', '".$A['description']."', '".$A['postmode']."', '".$A['datestart']."', " + . "'".$A['dateend']."', '".$A['url']."', '".$A['hits']."', '".$A['owner_id']."', '".$A['group_id']."', " + . "'".$A['perm_owner']."', '".$A['perm_group']."', '".$A['perm_members']."', '".$A['perm_anon']."', " + . "'".$A['address1']."', '".$A['address2']."', '".$A['city']."', '".$A['state']."', '".$A['zipcode']."', " + . "'".$A['allday']."', '".$A['event_type']."', '".$A['location']."', '".$A['timestart']."', '".$A['timeend']."' " + . ")"); + } + +// DB_query ("INSERT INTO {$_TABLES['eventsubmissionjp']} SELECT * FROM {$_TABLES['eventsubmission']}"); + $result = DB_query ("SELECT * FROM {$_TABLES['eventsubmission']}"); + while ($A = DB_fetchArray($result)) { + DB_query ("INSERT INTO {$_TABLES['eventsubmissionjp']} " + . "(eid, title, description, location, datestart, dateend, url, allday, " + . "zipcode, state, city, address2, address1, event_type, timestart, timeend) " + . "VALUES (" + . "'".$A['eid']."', '".$A['title']."', '".$A['description']."', '".$A['location']."', '".$A['datestart']."', " + . "'".$A['dateend']."', '".$A['url']."', '".$A['allday']."', '".$A['zipcode']."', '".$A['state']."', " + . "'".$A['city']."', '".$A['address2']."', '".$A['address1']."', '".$A['event_type']."', " + . "'".$A['timestart']."', '".$A['timeend']."' " + . ")"); + } + +// DB_query ("INSERT INTO {$_TABLES['personal_eventsjp']} SELECT * FROM {$_TABLES['personal_events']}"); + $result = DB_query ("SELECT * FROM {$_TABLES['personal_events']}"); + while ($A = DB_fetchArray($result)) { + DB_query ("INSERT INTO {$_TABLES['personal_eventsjp']} " + . "(eid, title, event_type, datestart, dateend, address1, address2, " + . "city, state, zipcode, allday, url, description, postmode, owner_id, " + . "group_id, perm_owner, perm_group, perm_members, perm_anon, uid, location, timestart, timeend) " + . "VALUES (" + . "'".$A['eid']."', '".$A['title']."', '".$A['event_type']."', '".$A['datestart']."', '".$A['dateend']."', " + . "'".$A['address1']."', '".$A['address2']."', '".$A['city']."', '".$A['state']."', '".$A['zipcode']."', " + . "'".$A['allday']."', '".$A['url']."', '".$A['description']."', '".$A['postmode']."', " + . "'".$A['owner_id']."', '".$A['group_id']."', '".$A['perm_owner']."', '".$A['perm_group']."', '".$A['perm_members']."', " + . "'".$A['perm_anon']."', '".$A['uid']."', '".$A['location']."', '".$A['timestart']."', '".$A['timeend']."' " + . ")"); + } + + } else { + DB_query ("INSERT INTO {$_TABLES['eventsubmissionjp']} (eid, title, description, location, datestart, dateend, url, allday, zipcode, state, city, address2, address1, event_type, timestart, timeend) VALUES ('2008050110130162','Installed the Calendarjp plugin','Today, you successfully installed the Calendarjp plugin.','Your webserver',getdate(),getdate(),'http://www.geeklog.jp/',1,NULL,NULL,NULL,NULL,NULL,'',NULL,NULL)"); + } + return true; } @@ -330,12 +381,6 @@ return false; } - } - - if (in_array('calendar',$_PLUGINS)) { - $result = DB_query ("REPLACE INTO {$_TABLES['eventsjp']} SELECT * FROM {$_TABLES['events']}"); - $result = DB_query ("REPLACE INTO {$_TABLES['eventsubmissionjp']} SELECT * FROM {$_TABLES['eventsubmission']}"); - $result = DB_query ("REPLACE INTO {$_TABLES['personal_eventsjp']} SELECT * FROM {$_TABLES['personal_events']}"); } COM_errorLog("Successfully installed the $pi_display_name plugin!", 1);