]> git.mjollnir.org Git - s9y.git/commitdiff
Backport unbundling XMLRPC
authorgarvinhicking <garvinhicking>
Mon, 15 Aug 2005 10:03:20 +0000 (10:03 +0000)
committergarvinhicking <garvinhicking>
Mon, 15 Aug 2005 10:03:20 +0000 (10:03 +0000)
27 files changed:
lang/addlang.sh [new file with mode: 0644]
lang/addlang.txt [new file with mode: 0644]
lang/append.sh [new file with mode: 0644]
lang/serendipity_lang_bg.inc.php
lang/serendipity_lang_cn.inc.php
lang/serendipity_lang_cs.inc.php
lang/serendipity_lang_cz.inc.php
lang/serendipity_lang_da.inc.php
lang/serendipity_lang_de.inc.php
lang/serendipity_lang_en.inc.php
lang/serendipity_lang_es.inc.php
lang/serendipity_lang_fa.inc.php
lang/serendipity_lang_fi.inc.php
lang/serendipity_lang_fr.inc.php
lang/serendipity_lang_is.inc.php
lang/serendipity_lang_it.inc.php
lang/serendipity_lang_ja.inc.php
lang/serendipity_lang_ko.inc.php
lang/serendipity_lang_nl.inc.php
lang/serendipity_lang_no.inc.php
lang/serendipity_lang_pt.inc.php
lang/serendipity_lang_ro.inc.php
lang/serendipity_lang_ru.inc.php
lang/serendipity_lang_tn.inc.php
lang/serendipity_lang_tw.inc.php
lang/serendipity_lang_zh.inc.php
serendipity_xmlrpc.php

diff --git a/lang/addlang.sh b/lang/addlang.sh
new file mode 100644 (file)
index 0000000..9357e09
--- /dev/null
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+if [ "x$1" = "x" ] 
+ then
+   echo "USAGE: addlang.sh INPUT-FILE"
+   echo "----------------------------"
+   echo "This script will append the contents of INPUT-FILE to every "
+   echo "available language file."
+   exit 1
+ else
+   find -name \*.php -maxdepth 1 -exec ./append.sh $1 {} \;
+fi
diff --git a/lang/addlang.txt b/lang/addlang.txt
new file mode 100644 (file)
index 0000000..9e0c4b4
--- /dev/null
@@ -0,0 +1 @@
+@define('XMLRPC_NO_LONGER_BUNDLED', 'The XML-RPC API Interface to Serendipity is no longer bundled because of ongoing security issues with this API and not many people using it. Thus you need to install the XML-RPC Plugin to use the XML-RPC API. The URL to use in your applications will NOT change - as soon as you have installed the plugin, you will again be able to use the API.');
diff --git a/lang/append.sh b/lang/append.sh
new file mode 100644 (file)
index 0000000..27d8605
--- /dev/null
@@ -0,0 +1,4 @@
+#!/bin/bash
+
+cat $1 >> $2
+
index e3a91daa728a72c5bb543522a4bdef0358d3bd7e..dee9d672b66f0625202897870a9db4d5979287e7 100644 (file)
 @define('SYNDICATION_PLUGIN_SHOW_MAIL', 'Show E-Mail addresses?');
 @define('INSTALL_BLOG_EMAIL', 'Blog\'s E-Mail address');
 @define('INSTALL_BLOG_EMAIL_DESC', 'This configures the E-Mail address that is used as the "From"-Part of outgoing mails. Be sure to set this to an address that is recognized by the mailserver used on your host - many mailservers reject messages that have unknown From-addresses.');
+@define('XMLRPC_NO_LONGER_BUNDLED', 'The XML-RPC API Interface to Serendipity is no longer bundled because of ongoing security issues with this API and not many people using it. Thus you need to install the XML-RPC Plugin to use the XML-RPC API. The URL to use in your applications will NOT change - as soon as you have installed the plugin, you will again be able to use the API.');
index 0886c632e0cf163f6b0a80cd5f8010e9b6c7c158..285aff2725c09855deb0bc9011343a8d3c440995 100644 (file)
 @define('SYNDICATION_PLUGIN_SHOW_MAIL', 'Show E-Mail addresses?');
 @define('INSTALL_BLOG_EMAIL', 'Blog\'s E-Mail address');
 @define('INSTALL_BLOG_EMAIL_DESC', 'This configures the E-Mail address that is used as the "From"-Part of outgoing mails. Be sure to set this to an address that is recognized by the mailserver used on your host - many mailservers reject messages that have unknown From-addresses.');
+@define('XMLRPC_NO_LONGER_BUNDLED', 'The XML-RPC API Interface to Serendipity is no longer bundled because of ongoing security issues with this API and not many people using it. Thus you need to install the XML-RPC Plugin to use the XML-RPC API. The URL to use in your applications will NOT change - as soon as you have installed the plugin, you will again be able to use the API.');
index d70aeeb3ece46a76af4f190778ec66765e47b15c..4bc7da23359981300c252a377a56e680db87abda 100644 (file)
 @define('SYNDICATION_PLUGIN_SHOW_MAIL', 'Show E-Mail addresses?');
 @define('INSTALL_BLOG_EMAIL', 'Blog\'s E-Mail address');
 @define('INSTALL_BLOG_EMAIL_DESC', 'This configures the E-Mail address that is used as the "From"-Part of outgoing mails. Be sure to set this to an address that is recognized by the mailserver used on your host - many mailservers reject messages that have unknown From-addresses.');
+@define('XMLRPC_NO_LONGER_BUNDLED', 'The XML-RPC API Interface to Serendipity is no longer bundled because of ongoing security issues with this API and not many people using it. Thus you need to install the XML-RPC Plugin to use the XML-RPC API. The URL to use in your applications will NOT change - as soon as you have installed the plugin, you will again be able to use the API.');
index 05b702764eeee2e4c575a2e85cee597611a804e8..d1102bb31643a0752229a0a9ae0898be800722fb 100644 (file)
 @define('SYNDICATION_PLUGIN_SHOW_MAIL', 'Show E-Mail addresses?');
 @define('INSTALL_BLOG_EMAIL', 'Blog\'s E-Mail address');
 @define('INSTALL_BLOG_EMAIL_DESC', 'This configures the E-Mail address that is used as the "From"-Part of outgoing mails. Be sure to set this to an address that is recognized by the mailserver used on your host - many mailservers reject messages that have unknown From-addresses.');
+@define('XMLRPC_NO_LONGER_BUNDLED', 'The XML-RPC API Interface to Serendipity is no longer bundled because of ongoing security issues with this API and not many people using it. Thus you need to install the XML-RPC Plugin to use the XML-RPC API. The URL to use in your applications will NOT change - as soon as you have installed the plugin, you will again be able to use the API.');
index ff256e9d614249b8af5fcfec95ec3b2b4047b358..29082d5d923d5ada041237b3402e0f5d2d867674 100644 (file)
 @define('SYNDICATION_PLUGIN_SHOW_MAIL', 'Vis E-Mail adresser?');
 @define('INSTALL_BLOG_EMAIL', 'Blog\'s E-Mail address');
 @define('INSTALL_BLOG_EMAIL_DESC', 'This configures the E-Mail address that is used as the "From"-Part of outgoing mails. Be sure to set this to an address that is recognized by the mailserver used on your host - many mailservers reject messages that have unknown From-addresses.');
+@define('XMLRPC_NO_LONGER_BUNDLED', 'The XML-RPC API Interface to Serendipity is no longer bundled because of ongoing security issues with this API and not many people using it. Thus you need to install the XML-RPC Plugin to use the XML-RPC API. The URL to use in your applications will NOT change - as soon as you have installed the plugin, you will again be able to use the API.');
index 416c1d086e1ef710a7959fc0f382688ed2cf8ec8..b0ae73fa89df4a6b623eedfc4f293d7ce780a110 100644 (file)
 @define('SYNDICATION_PLUGIN_SHOW_MAIL', 'E-Mail Adressen einbinden?');
 @define('INSTALL_BLOG_EMAIL', 'Blog\'s E-Mail address');
 @define('INSTALL_BLOG_EMAIL_DESC', 'This configures the E-Mail address that is used as the "From"-Part of outgoing mails. Be sure to set this to an address that is recognized by the mailserver used on your host - many mailservers reject messages that have unknown From-addresses.');
+@define('XMLRPC_NO_LONGER_BUNDLED', 'The XML-RPC API Interface to Serendipity is no longer bundled because of ongoing security issues with this API and not many people using it. Thus you need to install the XML-RPC Plugin to use the XML-RPC API. The URL to use in your applications will NOT change - as soon as you have installed the plugin, you will again be able to use the API.');
index 4225dfb86bca449be14cdf22ffefbaf4cfbf56b0..180fdc744bea7f53e024e1d08ac0219b6bb7734f 100644 (file)
 @define('SYNDICATION_PLUGIN_SHOW_MAIL', 'Show E-Mail addresses?');
 @define('INSTALL_BLOG_EMAIL', 'Blog\'s E-Mail address');
 @define('INSTALL_BLOG_EMAIL_DESC', 'This configures the E-Mail address that is used as the "From"-Part of outgoing mails. Be sure to set this to an address that is recognized by the mailserver used on your host - many mailservers reject messages that have unknown From-addresses.');
+@define('XMLRPC_NO_LONGER_BUNDLED', 'The XML-RPC API Interface to Serendipity is no longer bundled because of ongoing security issues with this API and not many people using it. Thus you need to install the XML-RPC Plugin to use the XML-RPC API. The URL to use in your applications will NOT change - as soon as you have installed the plugin, you will again be able to use the API.');
index 152096cf8e7a4bca32e0abd7205659abb98e1eef..596331c6c7df1229e846f164e64188d9dec85b22 100644 (file)
 @define('SYNDICATION_PLUGIN_SHOW_MAIL', 'Show E-Mail addresses?');
 @define('INSTALL_BLOG_EMAIL', 'Blog\'s E-Mail address');
 @define('INSTALL_BLOG_EMAIL_DESC', 'This configures the E-Mail address that is used as the "From"-Part of outgoing mails. Be sure to set this to an address that is recognized by the mailserver used on your host - many mailservers reject messages that have unknown From-addresses.');
+@define('XMLRPC_NO_LONGER_BUNDLED', 'The XML-RPC API Interface to Serendipity is no longer bundled because of ongoing security issues with this API and not many people using it. Thus you need to install the XML-RPC Plugin to use the XML-RPC API. The URL to use in your applications will NOT change - as soon as you have installed the plugin, you will again be able to use the API.');
index 0c08ba2a8480d3fc2d3e1acd2f6a9c74f328ad92..2ec21c7131b2a1245e276d5df4747d534a102f87 100644 (file)
 @define('SYNDICATION_PLUGIN_SHOW_MAIL', 'آیا آدرس ایمیل ها دیده شود؟');
 @define('INSTALL_BLOG_EMAIL', 'Blog\'s E-Mail address');
 @define('INSTALL_BLOG_EMAIL_DESC', 'This configures the E-Mail address that is used as the "From"-Part of outgoing mails. Be sure to set this to an address that is recognized by the mailserver used on your host - many mailservers reject messages that have unknown From-addresses.');
+@define('XMLRPC_NO_LONGER_BUNDLED', 'The XML-RPC API Interface to Serendipity is no longer bundled because of ongoing security issues with this API and not many people using it. Thus you need to install the XML-RPC Plugin to use the XML-RPC API. The URL to use in your applications will NOT change - as soon as you have installed the plugin, you will again be able to use the API.');
index 3c90761a407276240d808017755029fb6109372c..4529dedfac1e7b4d10bfc1c96a06a431da2cc91b 100644 (file)
 @define('SYNDICATION_PLUGIN_SHOW_MAIL', 'Show E-Mail addresses?');
 @define('INSTALL_BLOG_EMAIL', 'Blog\'s E-Mail address');
 @define('INSTALL_BLOG_EMAIL_DESC', 'This configures the E-Mail address that is used as the "From"-Part of outgoing mails. Be sure to set this to an address that is recognized by the mailserver used on your host - many mailservers reject messages that have unknown From-addresses.');
+@define('XMLRPC_NO_LONGER_BUNDLED', 'The XML-RPC API Interface to Serendipity is no longer bundled because of ongoing security issues with this API and not many people using it. Thus you need to install the XML-RPC Plugin to use the XML-RPC API. The URL to use in your applications will NOT change - as soon as you have installed the plugin, you will again be able to use the API.');
index 29b6b758571d9ba28dae11d9c35883e102ff00d4..5674f8c68f75feaba3147faf19577d245855aca0 100644 (file)
 @define('SYNDICATION_PLUGIN_SHOW_MAIL', 'Montrer l\'adresse E-Mail?');
 @define('INSTALL_BLOG_EMAIL', 'Blog\'s E-Mail address');
 @define('INSTALL_BLOG_EMAIL_DESC', 'This configures the E-Mail address that is used as the "From"-Part of outgoing mails. Be sure to set this to an address that is recognized by the mailserver used on your host - many mailservers reject messages that have unknown From-addresses.');
+@define('XMLRPC_NO_LONGER_BUNDLED', 'The XML-RPC API Interface to Serendipity is no longer bundled because of ongoing security issues with this API and not many people using it. Thus you need to install the XML-RPC Plugin to use the XML-RPC API. The URL to use in your applications will NOT change - as soon as you have installed the plugin, you will again be able to use the API.');
index 9658c8f9bf5a80e770c5d655e8cbbad9981564a2..214610bec209f89ab172dcd6f7490ade7df84ed7 100644 (file)
 @define('SYNDICATION_PLUGIN_SHOW_MAIL', 'Sýna netföng?');
 @define('INSTALL_BLOG_EMAIL', 'Blog\'s E-Mail address');
 @define('INSTALL_BLOG_EMAIL_DESC', 'This configures the E-Mail address that is used as the "From"-Part of outgoing mails. Be sure to set this to an address that is recognized by the mailserver used on your host - many mailservers reject messages that have unknown From-addresses.');
+@define('XMLRPC_NO_LONGER_BUNDLED', 'The XML-RPC API Interface to Serendipity is no longer bundled because of ongoing security issues with this API and not many people using it. Thus you need to install the XML-RPC Plugin to use the XML-RPC API. The URL to use in your applications will NOT change - as soon as you have installed the plugin, you will again be able to use the API.');
index 9b506b8753afbecbcb63a42969a9ebeca5caaaa1..9df8a2948fc9231e311e0b73dc444752849a3d03 100644 (file)
 @define('SYNDICATION_PLUGIN_SHOW_MAIL', 'Show E-Mail addresses?');
 @define('INSTALL_BLOG_EMAIL', 'Blog\'s E-Mail address');
 @define('INSTALL_BLOG_EMAIL_DESC', 'This configures the E-Mail address that is used as the "From"-Part of outgoing mails. Be sure to set this to an address that is recognized by the mailserver used on your host - many mailservers reject messages that have unknown From-addresses.');
+@define('XMLRPC_NO_LONGER_BUNDLED', 'The XML-RPC API Interface to Serendipity is no longer bundled because of ongoing security issues with this API and not many people using it. Thus you need to install the XML-RPC Plugin to use the XML-RPC API. The URL to use in your applications will NOT change - as soon as you have installed the plugin, you will again be able to use the API.');
index a0ddf271a4edfd3cc10dd06f434376852427da53..75e43c53a16a27c09de741d3f94c568574a69ca6 100644 (file)
@@ -668,3 +668,4 @@ Serendipity のアップグレードステージを無視しました。正し
 @define('SYNDICATION_PLUGIN_SHOW_MAIL', '電子メールアドレスを表示しますか?');
 @define('INSTALL_BLOG_EMAIL', 'Blog\'s E-Mail address');
 @define('INSTALL_BLOG_EMAIL_DESC', 'This configures the E-Mail address that is used as the "From"-Part of outgoing mails. Be sure to set this to an address that is recognized by the mailserver used on your host - many mailservers reject messages that have unknown From-addresses.');
+@define('XMLRPC_NO_LONGER_BUNDLED', 'The XML-RPC API Interface to Serendipity is no longer bundled because of ongoing security issues with this API and not many people using it. Thus you need to install the XML-RPC Plugin to use the XML-RPC API. The URL to use in your applications will NOT change - as soon as you have installed the plugin, you will again be able to use the API.');
index 83d127de615c6435df886254c0bc68b3c3879a44..43e92a04230b7a3f84a96471ab9a7da774a1179d 100644 (file)
 @define('SYNDICATION_PLUGIN_SHOW_MAIL', '이메일 주소 표시?');
 @define('INSTALL_BLOG_EMAIL', '블로그의 전자우편 주소');
 @define('INSTALL_BLOG_EMAIL_DESC', '발송하는 전자우편의 "보낸 사람" 부분에 나타날 전자우편 주소를 설정합니다. 호스트의 메일 서버에서 인식하는 주소로 반드시 설정하십시오. 상당수의 메일 서버는 보낸 사람 주소를 알 수 없는 전자우편을 거부합니다.');
+@define('XMLRPC_NO_LONGER_BUNDLED', 'The XML-RPC API Interface to Serendipity is no longer bundled because of ongoing security issues with this API and not many people using it. Thus you need to install the XML-RPC Plugin to use the XML-RPC API. The URL to use in your applications will NOT change - as soon as you have installed the plugin, you will again be able to use the API.');
index 6f3a770fb39f67d3ca97a50b851100b9acb75dd8..aa0bbbaac451226adc92c6ef8fc0bc43a7f6802f 100644 (file)
 @define('SYNDICATION_PLUGIN_SHOW_MAIL', 'Show E-Mail addresses?');
 @define('INSTALL_BLOG_EMAIL', 'Blog\'s E-Mail address');
 @define('INSTALL_BLOG_EMAIL_DESC', 'This configures the E-Mail address that is used as the "From"-Part of outgoing mails. Be sure to set this to an address that is recognized by the mailserver used on your host - many mailservers reject messages that have unknown From-addresses.');
+@define('XMLRPC_NO_LONGER_BUNDLED', 'The XML-RPC API Interface to Serendipity is no longer bundled because of ongoing security issues with this API and not many people using it. Thus you need to install the XML-RPC Plugin to use the XML-RPC API. The URL to use in your applications will NOT change - as soon as you have installed the plugin, you will again be able to use the API.');
index 51651ace91a96fb75140142010de65cccc1017b0..1842491bed94dc7314f064712588b4a95474300e 100644 (file)
 @define('SYNDICATION_PLUGIN_SHOW_MAIL', 'Show E-Mail addresses?');
 @define('INSTALL_BLOG_EMAIL', 'Blog\'s E-Mail address');
 @define('INSTALL_BLOG_EMAIL_DESC', 'This configures the E-Mail address that is used as the "From"-Part of outgoing mails. Be sure to set this to an address that is recognized by the mailserver used on your host - many mailservers reject messages that have unknown From-addresses.');
+@define('XMLRPC_NO_LONGER_BUNDLED', 'The XML-RPC API Interface to Serendipity is no longer bundled because of ongoing security issues with this API and not many people using it. Thus you need to install the XML-RPC Plugin to use the XML-RPC API. The URL to use in your applications will NOT change - as soon as you have installed the plugin, you will again be able to use the API.');
index a4a9df2ae6c6a7d3e405e443f227570f499f28c0..865a8ff88521cca1c50e90987430adb21004b3ee 100644 (file)
 @define('SYNDICATION_PLUGIN_SHOW_MAIL', 'Show E-Mail addresses?');
 @define('INSTALL_BLOG_EMAIL', 'Blog\'s E-Mail address');
 @define('INSTALL_BLOG_EMAIL_DESC', 'This configures the E-Mail address that is used as the "From"-Part of outgoing mails. Be sure to set this to an address that is recognized by the mailserver used on your host - many mailservers reject messages that have unknown From-addresses.');
+@define('XMLRPC_NO_LONGER_BUNDLED', 'The XML-RPC API Interface to Serendipity is no longer bundled because of ongoing security issues with this API and not many people using it. Thus you need to install the XML-RPC Plugin to use the XML-RPC API. The URL to use in your applications will NOT change - as soon as you have installed the plugin, you will again be able to use the API.');
index e64d9c56a6afc937831dba69b8984bb0a5499f6b..24e851dd3596dd4c4511d52bd9194e879573dc2d 100644 (file)
 @define('IMAGE_MORE_INPUT', 'Add more images'); // Translate
 @define('INSTALL_BLOG_EMAIL', 'Blog\'s E-Mail address');
 @define('INSTALL_BLOG_EMAIL_DESC', 'This configures the E-Mail address that is used as the "From"-Part of outgoing mails. Be sure to set this to an address that is recognized by the mailserver used on your host - many mailservers reject messages that have unknown From-addresses.');
+@define('XMLRPC_NO_LONGER_BUNDLED', 'The XML-RPC API Interface to Serendipity is no longer bundled because of ongoing security issues with this API and not many people using it. Thus you need to install the XML-RPC Plugin to use the XML-RPC API. The URL to use in your applications will NOT change - as soon as you have installed the plugin, you will again be able to use the API.');
index 178ed7813deace6a10e12a5349283a8da63e1f11..4654ee918093343402298ce07818567b2a60bd81 100644 (file)
 @define('SYNDICATION_PLUGIN_SHOW_MAIL', 'Show E-Mail addresses?');
 @define('INSTALL_BLOG_EMAIL', 'Blog\'s E-Mail address');
 @define('INSTALL_BLOG_EMAIL_DESC', 'This configures the E-Mail address that is used as the "From"-Part of outgoing mails. Be sure to set this to an address that is recognized by the mailserver used on your host - many mailservers reject messages that have unknown From-addresses.');
+@define('XMLRPC_NO_LONGER_BUNDLED', 'The XML-RPC API Interface to Serendipity is no longer bundled because of ongoing security issues with this API and not many people using it. Thus you need to install the XML-RPC Plugin to use the XML-RPC API. The URL to use in your applications will NOT change - as soon as you have installed the plugin, you will again be able to use the API.');
index c87ca46d1f57ae0c6082ac2634126e6d8cfdf67c..5e7f5bc8be816da48302437fe143e825f449d791 100644 (file)
 @define('SYNDICATION_PLUGIN_SHOW_MAIL', '顯示電子郵件嗎?');
 @define('INSTALL_BLOG_EMAIL', 'Blog\'s E-Mail address');
 @define('INSTALL_BLOG_EMAIL_DESC', 'This configures the E-Mail address that is used as the "From"-Part of outgoing mails. Be sure to set this to an address that is recognized by the mailserver used on your host - many mailservers reject messages that have unknown From-addresses.');
+@define('XMLRPC_NO_LONGER_BUNDLED', 'The XML-RPC API Interface to Serendipity is no longer bundled because of ongoing security issues with this API and not many people using it. Thus you need to install the XML-RPC Plugin to use the XML-RPC API. The URL to use in your applications will NOT change - as soon as you have installed the plugin, you will again be able to use the API.');
index 5262df43c612d26a389762061e18e504114e0418..9cda2e01904f0ffbf450f5a426f8da8cf266921b 100644 (file)
 @define('SYNDICATION_PLUGIN_SHOW_MAIL', 'Åã¥Ü¹q¤l¶l¥ó¶Ü?');
 @define('INSTALL_BLOG_EMAIL', 'Blog\'s E-Mail address');
 @define('INSTALL_BLOG_EMAIL_DESC', 'This configures the E-Mail address that is used as the "From"-Part of outgoing mails. Be sure to set this to an address that is recognized by the mailserver used on your host - many mailservers reject messages that have unknown From-addresses.');
+@define('XMLRPC_NO_LONGER_BUNDLED', 'The XML-RPC API Interface to Serendipity is no longer bundled because of ongoing security issues with this API and not many people using it. Thus you need to install the XML-RPC Plugin to use the XML-RPC API. The URL to use in your applications will NOT change - as soon as you have installed the plugin, you will again be able to use the API.');
index 07da4a622530bc03bb6b9d5e44632b1784607f7e..d90ee38fcc2248c26821700cbe6ca51e67085c21 100644 (file)
 @define('SYNDICATION_PLUGIN_SHOW_MAIL', 'Show E-Mail addresses?');
 @define('INSTALL_BLOG_EMAIL', 'Blog\'s E-Mail address');
 @define('INSTALL_BLOG_EMAIL_DESC', 'This configures the E-Mail address that is used as the "From"-Part of outgoing mails. Be sure to set this to an address that is recognized by the mailserver used on your host - many mailservers reject messages that have unknown From-addresses.');
+@define('XMLRPC_NO_LONGER_BUNDLED', 'The XML-RPC API Interface to Serendipity is no longer bundled because of ongoing security issues with this API and not many people using it. Thus you need to install the XML-RPC Plugin to use the XML-RPC API. The URL to use in your applications will NOT change - as soon as you have installed the plugin, you will again be able to use the API.');
index cbb8b3e7858fca0002d8ab4d37cd4134132a4930..f5e793eb22bfb27be03fd653f7d2af26804fbef1 100644 (file)
 # Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
 # All rights reserved.  See LICENSE file for licensing details
 
-$debug_xmlrpc = false;
-if ($debug_xmlrpc) {
-    $fp = fopen('rpc.log', 'a');
-    fwrite($fp, '[' . date('d.m.Y H:i') . ']' . print_r($HTTP_RAW_POST_DATA, true));
-    fclose($fp);
-    ob_start();
-}
-
 require_once 'serendipity_config.inc.php';
-require_once 'bundled-libs/XML/RPC/Server.php';
-
-$dispatches = array(
-                    /* BLOGGER API */
-                    'blogger.getUsersBlogs' =>
-                        array('function' => 'blogger_getUsersBlogs'),
-                    'blogger.getUserInfo' =>
-                        array('function' => 'blogger_getUserInfo'),
-                    'blogger.newPost' =>
-                        array('function' => 'blogger_newPost'),
-                    'blogger.editPost' =>
-                        array('function' => 'blogger_editPost'),
-                    'blogger.deletePost' =>
-                        array('function' => 'blogger_deletePost'),
-                    'blogger.getRecentPosts' =>
-                        array('function' => 'blogger_getRecentPosts'),
-                    'blogger.getPost' =>
-                        array('function' => 'blogger_getPost'),
-
-                    /* MT/metaWeblog API */
-                    'metaWeblog.newPost' =>
-                        array('function' => 'metaWeblog_newPost'),
-                    'metaWeblog.editPost' =>
-                        array('function' => 'metaWeblog_editPost'),
-                    'metaWeblog.getPost' =>
-                        array('function' => 'metaWeblog_getPost'),
-                    'metaWeblog.deletePost' =>
-                        array('function' => 'metaWeblog_deletePost'),
-                    'metaWeblog.setPostCategories' =>
-                        array('function' => 'metaWeblog_setPostCategories'),
-                    'metaWeblog.getPostCategories' =>
-                        array('function' => 'metaWeblog_getPostCategories'),
-                    'metaWeblog.newMediaObject' =>
-                        array('function' => 'metaWeblog_newMediaObject'),
-                    'metaWeblog.getRecentPosts' =>
-                        array('function' => 'metaWeblog_getRecentPosts'),
-                    'mt.getRecentPostTitles' =>
-                        array('function' => 'mt_getRecentPostTitles'),
-                    'mt.getCategoryList' =>
-                        array('function' => 'mt_getCategoryList'),
-                    'mt.getPostCategories' =>
-                        array('function' => 'metaWeblog_getPostCategories'),
-                    'mt.setPostCategories' =>
-                        array('function' => 'metaWeblog_setPostCategories'),
-                    'mt.supportedTextFilters' =>
-                        array('function' => 'mt_supportedTextFilters'),
-                    'mt.publishPost' =>
-                        array('function' => 'metaWeblog_publishPost'));
-
-function blogger_getUsersBlogs($message) {
-    global $serendipity;
-
-    $val = $message->params[1];
-    $username = $val->getval();
-    $val = $message->params[2];
-    $password = $val->getval();
-    if (!serendipity_authenticate_author($username, $password)) {
-        return new XML_RPC_Response('', 4, 'Authentication Failed');
-    }
-    $blog1 = new XML_RPC_Value(
-        array('url'      => new XML_RPC_Value($serendipity['baseURL']),
-              'blogid'   => new XML_RPC_Value('1'),
-              'blogName' => new XML_RPC_Value($serendipity['blogTitle'])),
-        'struct');
-    $blogs = new XML_RPC_Value( array($blog1), 'array');
-    $r = new XML_RPC_Response($blogs);
-    return($r);
-}
-
-function blogger_getUserInfo($message) {
-    global $serendipity;
-    $val = $message->params[1];
-    $username = $val->getval();
-    $val = $message->params[2];
-    $password = $val->getval();
-    if (!serendipity_authenticate_author($username, $password)) {
-        return new XML_RPC_Response('', 4, 'Authentication Failed');
-    }
-    $userdata = new XML_RPC_Value(
-        array('nickname'  => new XML_RPC_Value($serendipity['serendipityUser']),
-              'userid'    => new XML_RPC_Value($serendipity['authorid'], 'string'),
-              'url'       => new XML_RPC_Value($serendipity['baseURL']),
-              'email'     => new XML_RPC_Value($serendipity['serendipityEmail']),
-              'lastname'  => new XML_RPC_Value(''),
-              'firstname' => new XML_RPC_Value('')),
-        'struct');
-    $r = new XML_RPC_Response($userdata);
-    return($r);
-}
-
-function blogger_getRecentPosts($message) {
-    $val = $message->params[2];
-    $username = $val->getval();
-    $val = $message->params[3];
-    $password = $val->getval();
-    $val = $message->params[4];
-    $numposts = $val->getval();
-    if (!serendipity_authenticate_author($username, $password)) {
-        return new XML_RPC_Response('', 4, 'Authentication Failed');
-    }
-    $entries = serendipity_fetchEntries('', false, $numposts);
-    $xml_entries_vals = array();
-    foreach ((array) $entries as $entry ) {
-        $xml_entries_vals[] = new XML_RPC_Value(
-            array(
-                  'postid'      => new XML_RPC_Value($entry['id'], 'string'),
-                  'title'       => new XML_RPC_Value($entry['title'], 'string'),
-                  'content'                    => new XML_RPC_Value($entry['body'], 'string'),
-                  'userid'      => new XML_RPC_Value($entry['authorid'], 'string'),
-                  'dateCreated' => new XML_RPC_Value(XML_RPC_iso8601_encode($entry['timestamp']), 'dateTime.iso8601')
-                  ), 'struct');
-    }
-    $xml_entries = new XML_RPC_Value($xml_entries_vals, 'array');
-    return new XML_RPC_Response($xml_entries);
-}
-
-function blogger_getPost($message) {
-    global $serendipity;
-    $val = $message->params[1];
-    $postid = $val->getval();
-    $val = $message->params[2];
-    $username = $val->getval();
-    $val = $message->params[3];
-    $password = $val->getval();
-    if (!serendipity_authenticate_author($username, $password)) {
-        return new XML_RPC_Response('', 4, 'Authentication Failed');
-    }
-
-    $entry = serendipity_fetchEntry('id', $postid);
-    $entry = new XML_RPC_Value(blogger_setEntry($entry), 'struct');
-    return new XML_RPC_Response($entry);
-}
-
-function mt_getCategoryList($message) {
-    global $serendipity;
-
-    $val = $message->params[1];
-    $username = $val->getval();
-    $val = $message->params[2];
-    $password = $val->getval();
-    if (!serendipity_authenticate_author($username, $password)) {
-        return new XML_RPC_Response('', 4, 'Authentication Failed');
-    }
-    $cats = serendipity_fetchCategories($serendipity['authorid']);
-    $xml_entries_vals = array();
-    foreach ((array) $cats as $cat ) {
-        $xml_entries_vals[] = new XML_RPC_Value(
-            array(
-              'categoryId'   => new XML_RPC_Value($cat['categoryid'], 'string'),
-              'categoryName' => new XML_RPC_Value($cat['category_name'], 'string')
-            ),
-            'struct'
-        );
-    }
-    $xml_entries = new XML_RPC_Value($xml_entries_vals, 'array');
-    return new XML_RPC_Response($xml_entries);
-}
-
-function metaWeblog_getRecentPosts($message) {
-    $val = $message->params[1];
-    $username = $val->getval();
-    $val = $message->params[2];
-    $password = $val->getval();
-    $val = $message->params[3];
-    $numposts = $val->getval();
-    if (!serendipity_authenticate_author($username, $password)) {
-        return new XML_RPC_Response('', 4, 'Authentication Failed');
-    }
-    $entries = serendipity_fetchEntries('', false, $numposts);
-    $xml_entries_vals = array();
-
-    foreach ((array)$entries as $tentry) {
-        $entry = serendipity_fetchEntry('id', $tentry['id']);
-        $xml_entries_vals[] = new XML_RPC_Value(
-            array(
-                'dateCreated'       => new XML_RPC_Value(XML_RPC_iso8601_encode($entry['timestamp']), 'dateTime.iso8601'),
-                'postid'            => new XML_RPC_Value($entry['id'], 'string'),
-                'userid'            => new XML_RPC_Value($entry['authorid'], 'string'),
-                'description'       => new XML_RPC_Value($entry['body'], 'string'),
-                'mt_excerpt'        => new XML_RPC_Value('', 'string'),
-                'mt_allow_comments' => new XML_RPC_Value(1, 'int'),
-                'mt_text_more'         => new XML_RPC_Value($entry['extended'], 'string' ),
-                'mt_allow_pings'    => new XML_RPC_Value(1, 'int'),
-                'mt_convert_breaks' => new XML_RPC_Value('', 'string'),
-                'mt_keywords'       => new XML_RPC_Value('', 'string'),
-                'title'             => new XML_RPC_Value($entry['title'],'string'),
-                'permalink'         => new XML_RPC_Value(serendipity_archiveURL($entry['id'], $entry['title'], 'serendipityHTTPPath', true, array('timestamp' => $entry['timestamp'])), 'string'),
-                'link'              => new XML_RPC_Value(serendipity_archiveURL($entry['id'], $entry['title'], 'serendipityHTTPPath', true, array('timestamp' => $entry['timestamp'])), 'string')
-             ),
-            'struct');
-            
-     }
-    $xml_entries = new XML_RPC_Value($xml_entries_vals, 'array');
-    return new XML_RPC_Response($xml_entries);
-
-}
-function mt_getRecentPostTitles($message) {
-    $val = $message->params[1];
-    $username = $val->getval();
-    $val = $message->params[2];
-    $password = $val->getval();
-    $val = $message->params[3];
-    $numposts = $val->getval();
-    if (!serendipity_authenticate_author($username, $password)) {
-        return new XML_RPC_Response('', 4, 'Authentication Failed');
-    }
-    $entries = serendipity_fetchEntries('', false, $numposts);
-    $xml_entries_vals = array();
-    foreach ((array)$entries as $entry) {
-        $xml_entries_vals[] = new XML_RPC_Value(
-            array(
-                'postid'      => new XML_RPC_Value($entry['id'], 'string'),
-                'title'       => new XML_RPC_Value($entry['title'], 'string'),
-                'userid'      => new XML_RPC_Value($entry['authorid'], 'string'),
-                'dateCreated' => new XML_RPC_Value(XML_RPC_iso8601_encode($entry['timestamp']), 'dateTime.iso8601')
-            ),
-            'struct');
-    }
-    $xml_entries = new XML_RPC_Value($xml_entries_vals, 'array');
-    return new XML_RPC_Response($xml_entries);
-}
-
-function mt_supportedTextFilters($message) {
-    # we support no text filters currently
-    return new XML_RPC_Response(new XML_RPC_Value(array(), 'array'));
-}
-
-function blogger_newPost($message) {
-    global $serendipity;
-    $val = $message->params[2];
-    $username = $val->getval();
-    $val = $message->params[3];
-    $password = $val->getval();
-    if (!serendipity_authenticate_author($username, $password)) {
-        return new XML_RPC_Response('', 4, 'Authentication Failed');
-    }
-    $val = $message->params[4];
-    $entry['body']  = $val->getval();
-    $val = $message->params[5];
-    $topublish = $val->getval();
-    if ($topublish == 1){
-        $entry['isdraft'] = 'false';
-    } else { $entry['isdraft'] = 'true'; }
-    
-    $entry['allow_comments'] = $serendipity['allowCommentsDefault'];
-    $entry['moderate_comments'] = $serendipity['moderateCommentsDefault'];
-    $id = serendipity_updertEntry($entry);
-    return new XML_RPC_Response(new XML_RPC_Value($id, 'string'));
-}
-
-function blogger_editPost($message) {
-    $val = $message->params[1];
-    $entry['id'] = $val->getval();
-    $val = $message->params[2];
-    $username = $val->getval();
-    $val = $message->params[3];
-    $password = $val->getval();
-    if (!serendipity_authenticate_author($username, $password)) {
-        return new XML_RPC_Response('', 4, 'Authentication Failed');
-    }
-    $val = $message->params[4];
-    $entry['body']  = $val->getval();
-    $entry['author'] = $username;
-    $id = serendipity_updertEntry($entry);
-    return new XML_RPC_Response(new XML_RPC_Value($id, 'string'));
-}
-
-function blogger_deletePost($message) {
-    $val = $message->params[1];
-    $entry['id'] = $val->getval();
-    $val = $message->params[2];
-    $username = $val->getval();
-    $val = $message->params[3];
-    $password = $val->getval();
-    if (!serendipity_authenticate_author($username, $password)) {
-        return new XML_RPC_Response('', 4, 'Authentication Failed');
-    }
-    
-    $id = serendipity_deleteEntry($entry['id']);
-    return new XML_RPC_Response(new XML_RPC_Value(1, 'boolean'));
-}
-
-function universal_fetchCategories($post_categories) {
-    global $serendipity;
-
-    $categories = array();
-    if (is_array($post_categories)) {
-        foreach($post_categories AS $cat_id => $cat_obj) {
-            if (is_object($cat_obj)) {
-                $cat_name = $cat_obj->getval();
-                $cat = serendipity_fetchCategories(null, $cat_name);
-                if (isset($cat[0]['categoryid'])) {
-                    $categories[$cat[0]['categoryid']] = $cat[0]['categoryid'];
-                }
-            } elseif (is_array($cat_obj) && isset($cat_obj['categoryId'])) {
-                $cat_id = $cat_obj['categoryId']->getval();
-                $categories[$cat_id] = $cat_id;
-            }
-        }
-    }
-
-    return $categories;
-}
-
-function metaWeblog_newPost($message) {
-    global $serendipity;
-    $val = $message->params[1];
-    $username = $val->getval();
-    $val = $message->params[2];
-    $password = $val->getval();
-
-    if (!serendipity_authenticate_author($username, $password)) {
-        return new XML_RPC_Response('', 4, 'Authentication Failed');
-    }
-
-    $val = $message->params[3];
-    $post_array = $val->getval();
-    $val = $message->params[4];
-    $publish = $val->getval();
-
-       
-    $entry['categories']        = universal_fetchCategories($post_array['categories']);
-    $entry['title']             = $post_array['title'];
-    $entry['body']              = $post_array['description'];
-    $entry['extended']          = $post_array['mt_text_more'];
-    $entry['isdraft']           = ($publish == 0) ? 'true' : 'false';
-    if (isset($post_array['mt_allow_comments'])) {
-        $entry['allow_comments'] = $post_array['mt_allow_comments'];
-    } else {
-        $entry['allow_comments'] = $serendipity['allowCommentsDefault'];
-    }
-
-    $entry['moderate_comments'] = $serendipity['moderateCommentsDefault'];
-
-    $id = serendipity_updertEntry($entry);
-
-    return new XML_RPC_Response(new XML_RPC_Value($id, 'string'));
-}
 
-function metaWeblog_publishPost($message) {
-    global $serendipity;
-
-    $val = $message->params[0];
-    $postid = $val->getval();
-    $val = $message->params[1];
-    $username = $val->getval();
-    $val = $message->params[2];
-    $password = $val->getval();
-
-    if (!serendipity_authenticate_author($username, $password)) {
-        return new XML_RPC_Response('', 4, 'Authentication Failed');
-    }
-
-    $entry['isdraft']    = 'false';
-    $entry['id']         = $postid;
-
-    $id = serendipity_updertEntry($entry);
-    return new XML_RPC_Response(new XML_RPC_Value($id ? true : false, 'boolean'));
-}
-
-function metaWeblog_editPost($message) {
-    global $serendipity;
-
-    $val = $message->params[0];
-    $postid = $val->getval();
-    $val = $message->params[1];
-    $username = $val->getval();
-    $val = $message->params[2];
-    $password = $val->getval();
-
-    if (!serendipity_authenticate_author($username, $password)) {
-        return new XML_RPC_Response('', 4, 'Authentication Failed');
-    }
-
-    $val = $message->params[3];
-    $post_array = $val->getval();
-    $val = $message->params[4];
-    $publish = $val->getval();
-
-    if (isset($post_array['categories'])) {
-       $entry['categories'] = universal_fetchCategories($post_array['categories']);
-    }
-    $entry['title']         = $post_array['title'];
-    $entry['body']          = $post_array['description'];
-    $entry['extended']      = $post_array['mt_text_more'];
-    $entry['isdraft']       = ($publish == 0) ? 'true' : 'false';
-    $entry['author']        = $username;
-    $entry['authorid']      = $serendipity['authorid'];
-    $entry['id']            = $postid;
-
-    $id = serendipity_updertEntry($entry);
-    return new XML_RPC_Response(new XML_RPC_Value($id ? true : false, 'boolean'));
-}
-
-
-function metaWeblog_getPost($message) {
-    global $serendipity;
-    $val = $message->params[0];
-    $postid = $val->getval();
-    $val = $message->params[1];
-    $username = $val->getval();
-    $val = $message->params[2];
-    $password = $val->getval();
-    if (!serendipity_authenticate_author($username, $password)) {
-        return new XML_RPC_Response('', 4, 'Authentication Failed');
-    }
-
-    $entry = serendipity_fetchEntry('id', $postid);
-
-    $tmp = new XML_RPC_Value(array(
-        'userid'            => new XML_RPC_Value($entry['authorid'], 'string'),
-        'dateCreated'       => new XML_RPC_Value(XML_RPC_iso8601_encode($entry['timestamp']), 'dateTime.iso8601'),
-        'postid'            => new XML_RPC_Value($postid, 'string'),
-        'description'       => new XML_RPC_Value($entry['body'], 'string'),
-        'title'             => new XML_RPC_Value($entry['title'],'string'),
-        'link'              => new XML_RPC_Value(serendipity_archiveURL($entry['id'], $entry['title'], 'baseURL', true, array('timestamp' => $entry['timestamp'])), 'string'),
-        'permalink'         => new XML_RPC_Value(serendipity_archiveURL($entry['id'], $entry['title'], 'baseURL', true, array('timestamp' => $entry['timestamp'])), 'string'),
-        'mt_excerpt'        => new XML_RPC_Value($entry['excerpt'], 'string'),
-        'mt_text_more'      => new XML_RPC_Value($entry['extended'], 'string'),
-        'mt_allow_comments' => new XML_RPC_Value(($entry['allow_comments'] == true ? 1 : 0), 'int'),
-        'mt_allow_pings'    => new XML_RPC_Value(($entry['mt_allow_pings'] == true ? 1 : 0), 'int'),
-        'mt_convert_breaks' => new XML_RPC_Value($entry['mt_convert_breaks'], 'string'),
-        'mt_keywords'       => new XML_RPC_Value($entry['mt_keywords'], 'string')), 'struct');
-
-    return new XML_RPC_Response($tmp);
-}
-
-function metaWeblog_deletePost($message) {
-    $val = $message->params[1];
-    $entry['id'] = $val->getval();
-    $val = $message->params[2];
-    $username = $val->getval();
-    $val = $message->params[3];
-    $password = $val->getval();
-    if (!serendipity_authenticate_author($username, $password)) {
-        return new XML_RPC_Response('', 4, 'Authentication Failed');
-    }
-    $val = $message->params[4];
-    $entry['body'] = $val->getval();
-    $entry['author'] = $username;
-    $id = serendipity_deleteEntry($entry['id']);
-    return new XML_RPC_Response(new XML_RPC_Value(1, 'boolean'));
-}
-
-function metaWeblog_setPostCategories($message) {
-    global $serendipity;
-    $val = $message->params[0];
-    $postid = $val->getval();
-    $val = $message->params[1];
-    $username = $val->getval();
-    $val = $message->params[2];
-    $password = $val->getval();
-    $categories = $message->params[3];
-
-    if (!serendipity_authenticate_author($username, $password)) {
-        return new XML_RPC_Response('', 4, 'Authentication Failed');
-    }
-
-    $category_ids = universal_fetchCategories($categories->getval(), true);
-    $entry = serendipity_fetchEntry ( 'id', $postid );
-    $entry['categories'] = $category_ids;
-    $entry = serendipity_updertEntry ( $entry );
-    //serendipity_updateEntryCategories($postid, $category_ids);
-    return new XML_RPC_Response(new XML_RPC_Value(1, 'boolean'));
-}
-
-function metaWeblog_getPostCategories($message) {
-    $val = $message->params[0];
-    $postid = $val->getval();
-    $val = $message->params[1];
-    $username = $val->getval();
-    $val = $message->params[2];
-    $password = $val->getval();
-    if (!serendipity_authenticate_author($username, $password)) {
-        return new XML_RPC_Response('', 4, 'Authentication Failed');
-    }
-
-    $entry = serendipity_fetchEntry('id', (int)$postid);
-
-    $categories = array();
-    if (is_array($entry['categories'])) {
-        foreach($entry['categories'] AS $i => $cat) {
-            $categories[] = new XML_RPC_Value(
-                array(
-                  'categoryId'   => new XML_RPC_Value($cat['categoryid'], 'string'),
-                  'categoryName' => new XML_RPC_Value($cat['category_name'], 'string')
-                ),
-                'struct'
-            );
-        }
-    }
-
-    return new XML_RPC_Response(new XML_RPC_Value($categories, 'array'));
-}
-
-function metaWeblog_newMediaObject($message) {
-    global $serendipity;
-    $val = $message->params[0];
-    $postid = $val->getval();
-    $val = $message->params[1];
-    $username = $val->getval();
-    $val = $message->params[2];
-    $password = $val->getval();
-    $val = $message->params[3];
-    $struct = $val->getval();
-    if (!serendipity_authenticate_author($username, $password)) {
-        return new XML_RPC_Response('', 4, 'Authentication Failed');
-    }
-
-    $full = $serendipity['serendipityPath'] . $serendipity['uploadPath'] . $struct['name'];
-
-    if (!is_dir(dirname($full))) {
-        @mkdir(dirname($full));
-    }
-
-    $fp = fopen($full, 'w');
-    fwrite($fp, $struct['bits']);
-    fclose($fp);
-    $path = $serendipity['baseURL'] . $serendipity['uploadPath'] . $struct['name'];
-    return new XML_RPC_Response(new XML_RPC_Value(array('url' => new XML_RPC_Value($path, 'string')), 'struct'));
-}
-
-function blogger_setEntry(&$entry) {
-    $tmp = array(
-          'content'           => new XML_RPC_Value($entry['extended'], 'string'),
-    );
-    return universal_setEntry($entry, $tmp);
-}
-
-function metaWeblog_setEntry(&$entry) {
-    $tmp = array(
-          'mt_text_more'      => new XML_RPC_Value($entry['extended'], 'string'),
-    );
-    return universal_setEntry($entry, $tmp);
-}
-
-function universal_setEntry(&$entry, &$tmp) {
-    $tmp = array(
-        'dateCreated'       => new XML_RPC_Value(XML_RPC_iso8601_encode($entry['timestamp']), 'dateTime.iso8601'),
-        'postid'            => new XML_RPC_Value($entry['id'], 'string'),
-        'userid'            => new XML_RPC_Value($entry['authorid'], 'string'),
-        'description'       => new XML_RPC_Value($entry['body'], 'string'),
-        'mt_excerpt'        => new XML_RPC_Value('', 'string'),
-        'mt_allow_comments' => new XML_RPC_Value(1, 'int'),
-        'mt_allow_pings'    => new XML_RPC_Value(1, 'int'),
-        'mt_convert_breaks' => new XML_RPC_Value('', 'string'),
-        'mt_keywords'       => new XML_RPC_Value('', 'string'),
-        'title'             => new XML_RPC_Value($entry['title'],'string'),
-        'permalink'         => new XML_RPC_Value(serendipity_rewriteURL(PATH_ARCHIVES.'/' . $entry['id']. '_.html', 'baseURL'), 'string'),
-        'link'              => new XML_RPC_Value(serendipity_rewriteURL(PATH_ARCHIVES.'/' . $entry['id'] . '_.html', 'baseURL'), 'string'),
-    );
-
-    return array_merge($entry, $tmp);
-}
+$data = array();
+serendipity_plugin_api::hook_event('frontend_xmlrpc', $data);
 
-$server = new XML_RPC_Server($dispatches,1);
-if ($debug_xmlrpc) {
-    $fp = fopen('rpc.log', 'a');
-    fwrite($fp, ob_get_contents() . "\n---------------------------------------\n");
-    fclose($fp);
-    ob_end_flush();
+if (count($data) == 0) {
+    die(XMLRPC_NO_LONGER_BUNDLED);
 }
-/* vim: set sts=4 ts=4 expandtab : */
-?>