From 7204909bdabac41629bf3e3ce170b79dad7599a2 Mon Sep 17 00:00:00 2001 From: garvinhicking Date: Mon, 15 Aug 2005 10:03:20 +0000 Subject: [PATCH] Backport unbundling XMLRPC --- lang/addlang.sh | 12 + lang/addlang.txt | 1 + lang/append.sh | 4 + lang/serendipity_lang_bg.inc.php | 1 + lang/serendipity_lang_cn.inc.php | 1 + lang/serendipity_lang_cs.inc.php | 1 + lang/serendipity_lang_cz.inc.php | 1 + lang/serendipity_lang_da.inc.php | 1 + lang/serendipity_lang_de.inc.php | 1 + lang/serendipity_lang_en.inc.php | 1 + lang/serendipity_lang_es.inc.php | 1 + lang/serendipity_lang_fa.inc.php | 1 + lang/serendipity_lang_fi.inc.php | 1 + lang/serendipity_lang_fr.inc.php | 1 + lang/serendipity_lang_is.inc.php | 1 + lang/serendipity_lang_it.inc.php | 1 + lang/serendipity_lang_ja.inc.php | 1 + lang/serendipity_lang_ko.inc.php | 1 + lang/serendipity_lang_nl.inc.php | 1 + lang/serendipity_lang_no.inc.php | 1 + lang/serendipity_lang_pt.inc.php | 1 + lang/serendipity_lang_ro.inc.php | 1 + lang/serendipity_lang_ru.inc.php | 1 + lang/serendipity_lang_tn.inc.php | 1 + lang/serendipity_lang_tw.inc.php | 1 + lang/serendipity_lang_zh.inc.php | 1 + serendipity_xmlrpc.php | 573 +------------------------------ 27 files changed, 44 insertions(+), 569 deletions(-) create mode 100644 lang/addlang.sh create mode 100644 lang/addlang.txt create mode 100644 lang/append.sh diff --git a/lang/addlang.sh b/lang/addlang.sh new file mode 100644 index 0000000..9357e09 --- /dev/null +++ b/lang/addlang.sh @@ -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 index 0000000..9e0c4b4 --- /dev/null +++ b/lang/addlang.txt @@ -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 index 0000000..27d8605 --- /dev/null +++ b/lang/append.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +cat $1 >> $2 + diff --git a/lang/serendipity_lang_bg.inc.php b/lang/serendipity_lang_bg.inc.php index e3a91da..dee9d67 100644 --- a/lang/serendipity_lang_bg.inc.php +++ b/lang/serendipity_lang_bg.inc.php @@ -653,3 +653,4 @@ @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.'); diff --git a/lang/serendipity_lang_cn.inc.php b/lang/serendipity_lang_cn.inc.php index 0886c63..285aff2 100644 --- a/lang/serendipity_lang_cn.inc.php +++ b/lang/serendipity_lang_cn.inc.php @@ -667,3 +667,4 @@ @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.'); diff --git a/lang/serendipity_lang_cs.inc.php b/lang/serendipity_lang_cs.inc.php index d70aeeb..4bc7da2 100644 --- a/lang/serendipity_lang_cs.inc.php +++ b/lang/serendipity_lang_cs.inc.php @@ -669,3 +669,4 @@ @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.'); diff --git a/lang/serendipity_lang_cz.inc.php b/lang/serendipity_lang_cz.inc.php index 05b7027..d1102bb 100644 --- a/lang/serendipity_lang_cz.inc.php +++ b/lang/serendipity_lang_cz.inc.php @@ -669,3 +669,4 @@ @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.'); diff --git a/lang/serendipity_lang_da.inc.php b/lang/serendipity_lang_da.inc.php index ff256e9..29082d5 100644 --- a/lang/serendipity_lang_da.inc.php +++ b/lang/serendipity_lang_da.inc.php @@ -668,3 +668,4 @@ @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.'); diff --git a/lang/serendipity_lang_de.inc.php b/lang/serendipity_lang_de.inc.php index 416c1d0..b0ae73f 100644 --- a/lang/serendipity_lang_de.inc.php +++ b/lang/serendipity_lang_de.inc.php @@ -667,3 +667,4 @@ @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.'); diff --git a/lang/serendipity_lang_en.inc.php b/lang/serendipity_lang_en.inc.php index 4225dfb..180fdc7 100644 --- a/lang/serendipity_lang_en.inc.php +++ b/lang/serendipity_lang_en.inc.php @@ -666,3 +666,4 @@ @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.'); diff --git a/lang/serendipity_lang_es.inc.php b/lang/serendipity_lang_es.inc.php index 152096c..596331c 100644 --- a/lang/serendipity_lang_es.inc.php +++ b/lang/serendipity_lang_es.inc.php @@ -672,3 +672,4 @@ @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.'); diff --git a/lang/serendipity_lang_fa.inc.php b/lang/serendipity_lang_fa.inc.php index 0c08ba2..2ec21c7 100644 --- a/lang/serendipity_lang_fa.inc.php +++ b/lang/serendipity_lang_fa.inc.php @@ -668,3 +668,4 @@ @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.'); diff --git a/lang/serendipity_lang_fi.inc.php b/lang/serendipity_lang_fi.inc.php index 3c90761..4529ded 100644 --- a/lang/serendipity_lang_fi.inc.php +++ b/lang/serendipity_lang_fi.inc.php @@ -666,3 +666,4 @@ @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.'); diff --git a/lang/serendipity_lang_fr.inc.php b/lang/serendipity_lang_fr.inc.php index 29b6b75..5674f8c 100644 --- a/lang/serendipity_lang_fr.inc.php +++ b/lang/serendipity_lang_fr.inc.php @@ -674,3 +674,4 @@ @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.'); diff --git a/lang/serendipity_lang_is.inc.php b/lang/serendipity_lang_is.inc.php index 9658c8f..214610b 100644 --- a/lang/serendipity_lang_is.inc.php +++ b/lang/serendipity_lang_is.inc.php @@ -666,3 +666,4 @@ @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.'); diff --git a/lang/serendipity_lang_it.inc.php b/lang/serendipity_lang_it.inc.php index 9b506b8..9df8a29 100644 --- a/lang/serendipity_lang_it.inc.php +++ b/lang/serendipity_lang_it.inc.php @@ -668,3 +668,4 @@ @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.'); diff --git a/lang/serendipity_lang_ja.inc.php b/lang/serendipity_lang_ja.inc.php index a0ddf27..75e43c5 100644 --- a/lang/serendipity_lang_ja.inc.php +++ b/lang/serendipity_lang_ja.inc.php @@ -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.'); diff --git a/lang/serendipity_lang_ko.inc.php b/lang/serendipity_lang_ko.inc.php index 83d127d..43e92a0 100644 --- a/lang/serendipity_lang_ko.inc.php +++ b/lang/serendipity_lang_ko.inc.php @@ -668,3 +668,4 @@ @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.'); diff --git a/lang/serendipity_lang_nl.inc.php b/lang/serendipity_lang_nl.inc.php index 6f3a770..aa0bbba 100644 --- a/lang/serendipity_lang_nl.inc.php +++ b/lang/serendipity_lang_nl.inc.php @@ -669,3 +669,4 @@ @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.'); diff --git a/lang/serendipity_lang_no.inc.php b/lang/serendipity_lang_no.inc.php index 51651ac..1842491 100644 --- a/lang/serendipity_lang_no.inc.php +++ b/lang/serendipity_lang_no.inc.php @@ -669,3 +669,4 @@ @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.'); diff --git a/lang/serendipity_lang_pt.inc.php b/lang/serendipity_lang_pt.inc.php index a4a9df2..865a8ff 100644 --- a/lang/serendipity_lang_pt.inc.php +++ b/lang/serendipity_lang_pt.inc.php @@ -669,3 +669,4 @@ @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.'); diff --git a/lang/serendipity_lang_ro.inc.php b/lang/serendipity_lang_ro.inc.php index e64d9c5..24e851d 100644 --- a/lang/serendipity_lang_ro.inc.php +++ b/lang/serendipity_lang_ro.inc.php @@ -667,3 +667,4 @@ @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.'); diff --git a/lang/serendipity_lang_ru.inc.php b/lang/serendipity_lang_ru.inc.php index 178ed78..4654ee9 100644 --- a/lang/serendipity_lang_ru.inc.php +++ b/lang/serendipity_lang_ru.inc.php @@ -668,3 +668,4 @@ @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.'); diff --git a/lang/serendipity_lang_tn.inc.php b/lang/serendipity_lang_tn.inc.php index c87ca46..5e7f5bc 100644 --- a/lang/serendipity_lang_tn.inc.php +++ b/lang/serendipity_lang_tn.inc.php @@ -667,3 +667,4 @@ @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.'); diff --git a/lang/serendipity_lang_tw.inc.php b/lang/serendipity_lang_tw.inc.php index 5262df4..9cda2e0 100644 --- a/lang/serendipity_lang_tw.inc.php +++ b/lang/serendipity_lang_tw.inc.php @@ -667,3 +667,4 @@ @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.'); diff --git a/lang/serendipity_lang_zh.inc.php b/lang/serendipity_lang_zh.inc.php index 07da4a6..d90ee38 100644 --- a/lang/serendipity_lang_zh.inc.php +++ b/lang/serendipity_lang_zh.inc.php @@ -667,3 +667,4 @@ @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.'); diff --git a/serendipity_xmlrpc.php b/serendipity_xmlrpc.php index cbb8b3e..f5e793e 100644 --- a/serendipity_xmlrpc.php +++ b/serendipity_xmlrpc.php @@ -2,576 +2,11 @@ # 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 : */ -?> -- 2.39.5