• R/O
  • HTTP
  • SSH
  • HTTPS

nucleus-jp-ancient: Commit

Nucleus CMS日本語版SVNをgit-svnしたもの。リポジトリの変換作業用


Commit MetaInfo

Revision15c500d9ae9741ff99c669036f3c3472c4ac00fe (tree)
Time2009-04-22 23:53:37
Authorshizuki <shizuki@1ca2...>
Commitershizuki

Log Message

Change Summary

Incremental Difference

--- a/nucleus/libs/ADMIN.php
+++ b/nucleus/libs/ADMIN.php
@@ -1199,41 +1199,6 @@ class ADMIN {
11991199 $wasdraft: set to 1 when the item used to be a draft item
12001200 $publish: set to 1 when the edited item is not a draft
12011201 */
1202-/*<del by shizuki>
1203- switch ($actiontype) {
1204- case 'adddraft':
1205- $publish = 0;
1206- $wasdraft = 1;
1207- $timestamp = 0;
1208- break;
1209- case 'addfuture':
1210- $wasdraft = 1;
1211- $publish = 1;
1212- $timestamp = mktime(intPostVar('hour'), intPostVar('minutes'), 0, intPostVar('month'), intPostVar('day'), intPostVar('year'));
1213- break;
1214- case 'addnow':
1215- $wasdraft = 1;
1216- $publish = 1;
1217- $timestamp = 0;
1218- break;
1219- case 'changedate':
1220- $timestamp = mktime(intPostVar('hour'), intPostVar('minutes'), 0, intPostVar('month'), intPostVar('day'), intPostVar('year'));
1221- $publish = 1;
1222- $wasdraft = 0;
1223- break;
1224- case 'backtodrafts':
1225- $wasdraft = 0;
1226- $publish = 0;
1227- $timestamp = 0;
1228- break;
1229- case 'edit':
1230- default:
1231- $publish = 1;
1232- $wasdraft = 0;
1233- $timestamp = 0;
1234- }
1235-</del by shizuki>*/
1236-// <add by shizuki>
12371202 $blogid = getBlogIDFromItemID($itemid);
12381203 $blog =& $manager->getBlog($blogid);
12391204
@@ -1246,21 +1211,10 @@ class ADMIN {
12461211 $timestamp =0;
12471212 }
12481213 $doping = ($publish && $timestamp < $blog->getCorrectTime() && postVar('dosendping')) ? 1 : 0;
1249-// </add by shizuki>
12501214
12511215 // edit the item for real
12521216 ITEM::update($itemid, $catid, $title, $body, $more, $closed, $wasdraft, $publish, $timestamp);
12531217
1254-/* <del by shizuki>
1255- $blogid = getBlogIDFromItemID($itemid);
1256- $blog =& $manager->getBlog($blogid);
1257-
1258- $isFuture = 0;
1259- if ($timestamp > $blog->getCorrectTime(time())) {
1260- $isFuture = 1;
1261- }
1262-
1263-</del by shizuki>*/
12641218 $this->updateFuturePosted($blogid);
12651219
12661220 if ($draftid > 0) {
@@ -1494,23 +1448,7 @@ class ADMIN {
14941448
14951449 $blogid = getBlogIDFromItemID($result['itemid']);
14961450 $blog =& $manager->getBlog($blogid);
1497-/* <del by shizuki>
1498- $pingUrl = $manager->addTicketToUrl($CONF['AdminURL'] . 'index.php?action=sendping&blogid=' . intval($blogid));
1499-
1500- if ($result['status'] == 'newcategory')
1501- $this->action_categoryedit(
1502- $result['catid'],
1503- $blogid,
1504- $blog->sendPing() && numberOfEventSubscriber('SendPing') > 0 ? $pingUrl : ''
1505- );
1506- elseif ((postVar('actiontype') == 'addnow') && $blog->sendPing() && numberOfEventSubscriber('SendPing') > 0)
1507- $this->action_sendping($blogid);
1508- else
1509- $this->action_itemlist($blogid);
1510-</del by shizuki>*/
1511-// <add by shizuki>
15121451 $btimestamp = $blog->getCorrectTime();
1513- $bPingInfo = ($blog->sendPing() && numberOfEventSubscriber('SendPing') > 0);
15141452 $item = $manager->getItem(intval($result['itemid']), 1, 1);
15151453 $iPingInfo = (!$item['draft'] && postVar('dosendping') && $item['timestamp'] <= $btimestamp);
15161454 if ($iPingInfo && $bPingInfo) {
@@ -1519,16 +1457,12 @@ class ADMIN {
15191457 $nextAction = 'itemlist';
15201458 }
15211459 if ($result['status'] == 'newcategory') {
1522-// $distURI = ($nextAction == 'sendping') ? $manager->addTicketToUrl($CONF['AdminURL'] . 'index.php?action='
1523-// . $nextAction . '&blogid=' . intval($blogid)) :
1524-// '';
15251460 $distURI = $manager->addTicketToUrl($CONF['AdminURL'] . 'index.php?action=' . $nextAction . '&blogid=' . intval($blogid));
15261461 $this->action_categoryedit($result['catid'], $blogid, $distURI);
15271462 } else {
15281463 $methodName = 'action_' . $nextAction;
15291464 call_user_func(array(&$this, $methodName), $blogid);
15301465 }
1531-//</add by shizuki>
15321466 }
15331467
15341468 /**
--- a/nucleus/plugins/NP_Ping.php
+++ b/nucleus/plugins/NP_Ping.php
@@ -9,6 +9,7 @@
99 v1.3 - pinged variable support
1010 v1.4 - language file support
1111 v1.5 - remove arg1 in exec() call
12+ v1.6 - move send update ping override option to plugin
1213 */
1314
1415 class NP_Ping extends NucleusPlugin {
@@ -17,7 +18,7 @@ class NP_Ping extends NucleusPlugin {
1718
1819 function getAuthor() { return 'admun (Edmond Hui)'; }
1920 function getURL() { return 'http://edmondhui.homeip.net/nudn'; }
20- function getVersion() { return '1.5'; }
21+ function getVersion() { return '1.6'; }
2122
2223 function getMinNucleusVersion() { return '330'; }
2324
@@ -56,7 +57,11 @@ class NP_Ping extends NucleusPlugin {
5657 }
5758
5859 function getEventList() {
59- return array('SendPing', 'JustPosted');
60+ return array(
61+ 'SendPing',
62+ 'JustPosted'
63+ 'AddItemFormExtras',
64+ 'EditItemFormExtras');
6065 }
6166
6267 function event_JustPosted($data) {
@@ -83,6 +88,26 @@ class NP_Ping extends NucleusPlugin {
8388 $this->sendPings($data);
8489 }
8590
91+ function DisplayFormOptions($sendping) {
92+ if ($sendping) {
93+ $check = 'checked="checked"';
94+ } else {
95+ $check = '';
96+ }
97+ $output = '<h3>' . _PING_EXTRA_PLUGIN_OPTION . '</h3>
98+ <p><input id="dosendping" name="dosendping" value="1" type="checkbox" ' . $check . '><label for="dosendping">' . _UPDATEDPING_GOSENDPING . '</label> </p>';
99+ echo $output;
100+ }
101+
102+ function event_AddItemFormExtras($data){
103+ $this->DisplayFormOptions($data['blog']->sendPing());
104+ }
105+
106+ function event_EditItemFormExtras($data){
107+ // we are not sending ping by default after edit an item
108+ $this->DisplayFormOptions(0);
109+ }
110+
86111 function sendPings($data) {
87112 if (!class_exists('xmlrpcmsg')) {
88113 global $DIR_LIBS;
--- a/nucleus/plugins/ping/english.php
+++ b/nucleus/plugins/ping/english.php
@@ -13,4 +13,6 @@
1313 define('_PING_PHP_ERROR', 'PHP Error: ');
1414 define('_PING_PHP_PING_ERROR', 'Error while trying to send ping. Sorry about that.');
1515 define('_PING_SUCCESS', 'Success');
16+ define('_UPDATEDPING_GOSENDPING', 'Send Update ping');
17+ define('_PING_EXTRA_PLUGIN_OPTION', 'Blog Tracking Ping Service');
1618 ?>
--- a/nucleus/plugins/ping/japanese-euc.php
+++ b/nucleus/plugins/ping/japanese-euc.php
@@ -13,4 +13,6 @@
1313 define('_PING_PHP_ERROR', 'PHP エラー: ');
1414 define('_PING_PHP_PING_ERROR', '申し訳ありません。ping を送信中にエラーが発生しました。');
1515 define('_PING_SUCCESS', '成功');
16+ define('_UPDATEDPING_GOSENDPING', 'pingを送信する');
17+ define('_PING_EXTRA_PLUGIN_OPTION', '更新ping');
1618 ?>
--- a/nucleus/plugins/ping/japanese-utf8.php
+++ b/nucleus/plugins/ping/japanese-utf8.php
@@ -13,4 +13,6 @@
1313 define('_PING_PHP_ERROR', 'PHP エラー: ');
1414 define('_PING_PHP_PING_ERROR', '申し訳ありません。ping を送信中にエラーが発生しました。');
1515 define('_PING_SUCCESS', '成功');
16+ define('_UPDATEDPING_GOSENDPING', 'pingを送信する');
17+ define('_PING_EXTRA_PLUGIN_OPTION', '更新ping');
1618 ?>
Show on old repository browser