Merge lp:~leeturner/quam-plures/xmlrpc_off into lp:quam-plures

Proposed by Lee Turner
Status: Merged
Merged at revision: 7646
Proposed branch: lp:~leeturner/quam-plures/xmlrpc_off
Merge into: lp:quam-plures
Diff against target: 188 lines (+64/-4)
8 files modified
qp_inc/settings/settings.ctrl.php (+17/-0)
qp_inc/settings/views/_general.form.php (+9/-0)
qp_inc/xmlrpc/apis/_b2.api.php (+6/-0)
qp_inc/xmlrpc/apis/_blogger.api.php (+6/-0)
qp_inc/xmlrpc/apis/_metaweblog.api.php (+6/-0)
qp_inc/xmlrpc/apis/_mt.api.php (+6/-1)
qp_srvc/rsd.php (+14/-2)
qp_srvc/xmlrpc.php (+0/-1)
To merge this branch: bzr merge lp:~leeturner/quam-plures/xmlrpc_off
Reviewer Review Type Date Requested Status
EdB Approve
Review via email: mp+116129@code.launchpad.net

Description of the change

http://forums.quamplures.net/viewtopic.php?f=11&t=1167

Allows you to enable or disable each of the xml-rpc API individually.

To post a comment you must log in.
Revision history for this message
EdB (edb) wrote :

Move the new section down below "Notifications", PLEASE!

That page was alphabetized after figuring out there really doesn't seem to be a 'best order' is the reason. Can't see why we would go away from that ... unless a 'best order' really does show up one day.

lp:~leeturner/quam-plures/xmlrpc_off updated
7643. By Lee Turner <email address hidden>

moved the remote publishing settings to the correct place in the settings screen

Revision history for this message
Lee Turner (leeturner) wrote :

Never realised it was alphabetical until you mentioned it. Obvious now I look :-)

Now moved to the correct place.

Revision history for this message
EdB (edb) wrote :

:)

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'qp_inc/settings/settings.ctrl.php'
--- qp_inc/settings/settings.ctrl.php 2011-01-09 17:19:59 +0000
+++ qp_inc/settings/settings.ctrl.php 2012-07-23 07:49:20 +0000
@@ -86,6 +86,10 @@
86 */86 */
8787
88 $Settings->delete_array( array(88 $Settings->delete_array( array(
89 'general_xmlrpc_b2',
90 'general_xmlrpc_blogger',
91 'general_xmlrpc_metaweblog',
92 'general_xmlrpc_mt',
89 'outbound_notifications_mode',93 'outbound_notifications_mode',
90 'eblog_enabled',94 'eblog_enabled',
91 'eblog_method',95 'eblog_method',
@@ -134,6 +138,19 @@
134 }138 }
135 else139 else
136 {140 {
141 // Remote publishing
142 param( 'general_xmlrpc_b2', 'boolean', 0 );
143 $Settings->set( 'general_xmlrpc_b2', $general_xmlrpc_b2 );
144
145 param( 'general_xmlrpc_blogger', 'boolean', 0 );
146 $Settings->set( 'general_xmlrpc_blogger', $general_xmlrpc_blogger );
147
148 param( 'general_xmlrpc_metaweblog', 'boolean', 0 );
149 $Settings->set( 'general_xmlrpc_metaweblog', $general_xmlrpc_metaweblog );
150
151 param( 'general_xmlrpc_mt', 'boolean', 0 );
152 $Settings->set( 'general_xmlrpc_mt', $general_xmlrpc_mt );
153
137 // After each new post...154 // After each new post...
138 param( 'outbound_notifications_mode', 'string', true );155 param( 'outbound_notifications_mode', 'string', true );
139 $Settings->set( 'outbound_notifications_mode', get_param('outbound_notifications_mode') );156 $Settings->set( 'outbound_notifications_mode', get_param('outbound_notifications_mode') );
140157
=== modified file 'qp_inc/settings/views/_general.form.php'
--- qp_inc/settings/views/_general.form.php 2011-03-31 22:48:44 +0000
+++ qp_inc/settings/views/_general.form.php 2012-07-23 07:49:20 +0000
@@ -199,6 +199,15 @@
199199
200// --------------------------------------------200// --------------------------------------------
201201
202$Form->begin_fieldset( get_manual_link('remote_publishing').T_('Remote publishing') );
203 $Form->checkbox_input( 'general_xmlrpc_b2', $Settings->get('general_xmlrpc_b2'), T_('Enable B2'), array( 'note' => T_('Enable the B2 XML-RPC publishing protocol.') ) );
204 $Form->checkbox_input( 'general_xmlrpc_blogger', $Settings->get('general_xmlrpc_blogger'), T_('Enable Blogger'), array( 'note' => T_('Enable the Blogger XML-RPC publishing protocol.') ) );
205 $Form->checkbox_input( 'general_xmlrpc_metaweblog', $Settings->get('general_xmlrpc_metaweblog'), T_('Enable MetaWeblog'), array( 'note' => T_('Enable the MetaWeblog XML-RPC publishing protocol.') ) );
206 $Form->checkbox_input( 'general_xmlrpc_mt', $Settings->get('general_xmlrpc_mt'), T_('Enable Movable Type'), array( 'note' => T_('Enable the Movable Type XML-RPC publishing protocol.') ) );
207$Form->end_fieldset();
208
209// --------------------------------------------
210
202$Form->begin_fieldset( get_manual_link( 'security-options' ).T_('Security options') );211$Form->begin_fieldset( get_manual_link( 'security-options' ).T_('Security options') );
203 $Form->text_input( 'user_minpwdlen', (int)$Settings->get( 'user_minpwdlen' ), 2, T_('Minimum password length'), T_('characters.'), array( 'maxlength'=>2, 'required'=>true ) );212 $Form->text_input( 'user_minpwdlen', (int)$Settings->get( 'user_minpwdlen' ), 2, T_('Minimum password length'), T_('characters.'), array( 'maxlength'=>2, 'required'=>true ) );
204 $Form->checkbox_input( 'js_passwd_hashing', (bool)$Settings->get( 'js_passwd_hashing' ), T_('Login password hashing'), array( 'note'=>T_('Check to enable the login form to hash the password with Javascript before transmitting it. This provides extra security on non-SSL connections.')) );213 $Form->checkbox_input( 'js_passwd_hashing', (bool)$Settings->get( 'js_passwd_hashing' ), T_('Login password hashing'), array( 'note'=>T_('Check to enable the login form to hash the password with Javascript before transmitting it. This provides extra security on non-SSL connections.')) );
205214
=== modified file 'qp_inc/xmlrpc/apis/_b2.api.php'
--- qp_inc/xmlrpc/apis/_b2.api.php 2010-12-31 12:12:03 +0000
+++ qp_inc/xmlrpc/apis/_b2.api.php 2012-07-23 07:49:20 +0000
@@ -13,6 +13,12 @@
13 */13 */
14if( !defined('QP_MAIN_INIT') ) die( 'Please, do not access this page directly.' );14if( !defined('QP_MAIN_INIT') ) die( 'Please, do not access this page directly.' );
1515
16if( ! $Settings->get('general_xmlrpc_b2') )
17{ // We cannot use XML-RPC: send an error response ( "17 Internal server error" ).
18 $errMessage = 'The B2 XML-RPC service is disabled on this system.';
19 $errResponse = new xmlrpcresp( 0, 17, $errMessage );
20 die( $errResponse->serialize() );
21}
1622
17$b2newpost_doc='Adds a post, blogger-api like, +title +category +postdate';23$b2newpost_doc='Adds a post, blogger-api like, +title +category +postdate';
18$b2newpost_sig = array(array($xmlrpcString, $xmlrpcString, $xmlrpcString, $xmlrpcString, $xmlrpcString, $xmlrpcString, $xmlrpcBoolean, $xmlrpcString, $xmlrpcString, $xmlrpcString));24$b2newpost_sig = array(array($xmlrpcString, $xmlrpcString, $xmlrpcString, $xmlrpcString, $xmlrpcString, $xmlrpcString, $xmlrpcBoolean, $xmlrpcString, $xmlrpcString, $xmlrpcString));
1925
=== modified file 'qp_inc/xmlrpc/apis/_blogger.api.php'
--- qp_inc/xmlrpc/apis/_blogger.api.php 2010-12-31 12:12:03 +0000
+++ qp_inc/xmlrpc/apis/_blogger.api.php 2012-07-23 07:49:20 +0000
@@ -15,6 +15,12 @@
15 */15 */
16if( !defined('QP_MAIN_INIT') ) die( 'Please, do not access this page directly.' );16if( !defined('QP_MAIN_INIT') ) die( 'Please, do not access this page directly.' );
1717
18if( ! $Settings->get('general_xmlrpc_blogger') )
19{ // We cannot use XML-RPC: send an error response ( "17 Internal server error" ).
20 $errMessage = 'The Blogger XML-RPC service is disabled on this system.';
21 $errResponse = new xmlrpcresp( 0, 17, $errMessage );
22 die( $errResponse->serialize() );
23}
1824
19$bloggernewpost_doc = 'Adds a post, blogger-api like';25$bloggernewpost_doc = 'Adds a post, blogger-api like';
20$bloggernewpost_sig = array(array($xmlrpcString, $xmlrpcString, $xmlrpcString, $xmlrpcString, $xmlrpcString, $xmlrpcString, $xmlrpcBoolean));26$bloggernewpost_sig = array(array($xmlrpcString, $xmlrpcString, $xmlrpcString, $xmlrpcString, $xmlrpcString, $xmlrpcString, $xmlrpcBoolean));
2127
=== modified file 'qp_inc/xmlrpc/apis/_metaweblog.api.php'
--- qp_inc/xmlrpc/apis/_metaweblog.api.php 2010-12-31 12:12:03 +0000
+++ qp_inc/xmlrpc/apis/_metaweblog.api.php 2012-07-23 07:49:20 +0000
@@ -16,6 +16,12 @@
16 */16 */
17if( !defined('QP_MAIN_INIT') ) die( 'Please, do not access this page directly.' );17if( !defined('QP_MAIN_INIT') ) die( 'Please, do not access this page directly.' );
1818
19if( ! $Settings->get('general_xmlrpc_metaweblog') )
20{ // We cannot use XML-RPC: send an error response ( "17 Internal server error" ).
21 $errMessage = 'The Metaweblog XML-RPC service is disabled on this system.';
22 $errResponse = new xmlrpcresp( 0, 17, $errMessage );
23 die( $errResponse->serialize() );
24}
1925
20/**26/**
21 * Decode the dateCreated27 * Decode the dateCreated
2228
=== modified file 'qp_inc/xmlrpc/apis/_mt.api.php'
--- qp_inc/xmlrpc/apis/_mt.api.php 2010-12-31 12:12:03 +0000
+++ qp_inc/xmlrpc/apis/_mt.api.php 2012-07-23 07:49:20 +0000
@@ -17,7 +17,12 @@
17 */17 */
18if( !defined('QP_MAIN_INIT') ) die( 'Please, do not access this page directly.' );18if( !defined('QP_MAIN_INIT') ) die( 'Please, do not access this page directly.' );
1919
2020if( ! $Settings->get('general_xmlrpc_mt') )
21{ // We cannot use XML-RPC: send an error response ( "17 Internal server error" ).
22 $errMessage = 'The Movable Type XML-RPC service is disabled on this system.';
23 $errResponse = new xmlrpcresp( 0, 17, $errMessage );
24 die( $errResponse->serialize() );
25}
2126
22$mt_setPostCategories_sig = array(array($xmlrpcBoolean, $xmlrpcString, $xmlrpcString, $xmlrpcString, $xmlrpcArray));27$mt_setPostCategories_sig = array(array($xmlrpcBoolean, $xmlrpcString, $xmlrpcString, $xmlrpcString, $xmlrpcArray));
23$mt_setPostCategories_doc = 'Sets the categories for a post.';28$mt_setPostCategories_doc = 'Sets the categories for a post.';
2429
=== modified file 'qp_srvc/rsd.php'
--- qp_srvc/rsd.php 2010-12-31 12:12:03 +0000
+++ qp_srvc/rsd.php 2012-07-23 07:49:20 +0000
@@ -37,20 +37,28 @@
37 <engineLink><?php echo $app_homepage; ?></engineLink>37 <engineLink><?php echo $app_homepage; ?></engineLink>
38 <homePageLink><?php echo $app_baseurl; ?></homePageLink>38 <homePageLink><?php echo $app_baseurl; ?></homePageLink>
39 <apis>39 <apis>
40 <api name="MetaWeblog" preferred="true" apiLink="<?php echo $srvc_url; ?>xmlrpc.php"<?php40 <?php if( $Settings->get('general_xmlrpc_metaweblog') )
41 {?>
42 <api name="MetaWeblog" preferred="true" apiLink="<?php echo $srvc_url; ?>xmlrpc.php"<?php
41 if( !empty($blog) ) { echo ' blogID="'.$blog.'"'; }43 if( !empty($blog) ) { echo ' blogID="'.$blog.'"'; }
42 ?>>44 ?>>
43 <settings>45 <settings>
44 <docs>http://manual.b2evolution.net/MetaWeblog_API</docs>46 <docs>http://manual.b2evolution.net/MetaWeblog_API</docs>
45 </settings>47 </settings>
46 </api>48 </api>
47 <api name="MovableType" preferred="false" apiLink="<?php echo $srvc_url; ?>xmlrpc.php"<?php49 <?}?>
50 <?php if( $Settings->get('general_xmlrpc_mt') )
51 {?>
52 <api name="MovableType" preferred="false" apiLink="<?php echo $srvc_url; ?>xmlrpc.php"<?php
48 if( !empty($blog) ) { echo ' blogID="'.$blog.'"'; }53 if( !empty($blog) ) { echo ' blogID="'.$blog.'"'; }
49 ?>>54 ?>>
50 <settings>55 <settings>
51 <docs>http://manual.b2evolution.net/MovableType_API</docs>56 <docs>http://manual.b2evolution.net/MovableType_API</docs>
52 </settings>57 </settings>
53 </api>58 </api>
59 <?}?>
60 <?php if( $Settings->get('general_xmlrpc_blogger') )
61 {?>
54 <api name="Blogger" preferred="false" apiLink="<?php echo $srvc_url; ?>xmlrpc.php"<?php62 <api name="Blogger" preferred="false" apiLink="<?php echo $srvc_url; ?>xmlrpc.php"<?php
55 if( !empty($blog) ) { echo ' blogID="'.$blog.'"'; }63 if( !empty($blog) ) { echo ' blogID="'.$blog.'"'; }
56 ?>>64 ?>>
@@ -58,6 +66,9 @@
58 <docs>http://manual.b2evolution.net/Blogger_API</docs>66 <docs>http://manual.b2evolution.net/Blogger_API</docs>
59 </settings>67 </settings>
60 </api>68 </api>
69 <?}?>
70 <?php if( $Settings->get('general_xmlrpc_b2') )
71 {?>
61 <api name="b2" preferred="false" apiLink="<?php echo $srvc_url; ?>xmlrpc.php"<?php72 <api name="b2" preferred="false" apiLink="<?php echo $srvc_url; ?>xmlrpc.php"<?php
62 if( !empty($blog) ) { echo ' blogID="'.$blog.'"'; }73 if( !empty($blog) ) { echo ' blogID="'.$blog.'"'; }
63 ?>>74 ?>>
@@ -65,6 +76,7 @@
65 <docs>http://manual.b2evolution.net/B2_API</docs>76 <docs>http://manual.b2evolution.net/B2_API</docs>
66 </settings>77 </settings>
67 </api>78 </api>
79 <?}?>
68 </apis>80 </apis>
69 </service>81 </service>
70</rsd>82</rsd>
7183
=== modified file 'qp_srvc/xmlrpc.php'
--- qp_srvc/xmlrpc.php 2010-12-31 12:12:03 +0000
+++ qp_srvc/xmlrpc.php 2012-07-23 07:49:20 +0000
@@ -41,7 +41,6 @@
41 die( $errResponse->serialize() );41 die( $errResponse->serialize() );
42}42}
4343
44
45// We can't display standard error messages. We must return XMLRPC responses.44// We can't display standard error messages. We must return XMLRPC responses.
46$DB->halt_on_error = false;45$DB->halt_on_error = false;
47$DB->show_errors = false;46$DB->show_errors = false;

Subscribers

People subscribed via source and target branches