public
Description: The ultra-lightweight ultra-flexible blogging engine with a fetish for birds and misspellings.
Homepage: http://chyrp.net/
Clone URL: git://github.com/vito/chyrp.git
Click here to lend your support to: chyrp and make a donation at www.pledgie.com !
Added enable_xmlrpc setting. [#137 state:resolved]
brucep (author)
Mon Jun 30 17:58:41 -0700 2008
commit  626b63d4d5a79b38231674a9a257e4b693480af1
tree    54c6fd36ceca612c6c076052fd357b88e6992659
parent  1eb788cbc437c332d6fff3af11cdf0075107305f
...
42
43
44
 
 
 
 
 
 
 
45
46
47
...
42
43
44
45
46
47
48
49
50
51
52
53
54
0
@@ -42,6 +42,13 @@
0
               ${ "Attempts to notify sites linked to from your posts. It'll slow down things a bit when you submit them, depending on how many links you've got in it." | translate }
0
             </small>
0
           </p>
0
+          <p>
0
+            <label for="enable_xmlrpc">${ "Enable XML-RPC Support" | translate }</label>
0
+            <input class="checkbox" type="checkbox" name="enable_xmlrpc" id="enable_xmlrpc"${ site.enable_xmlrpc | checked } />
0
+            <small>
0
+              ${ "XML-RPC support allows for remote access to your site. This allows you to use remote clients (e.g., <a href=\"http://www.red-sweater.com/marsedit/\">MarsEdit</a> or <a href=\"http://flickr.com/help/blogging/\">Flickr</a>) to create/edit content on your site." | translate }
0
+            </small>
0
+          </p>
0
 
0
           <p class="buttons">
0
             <button type="submit" class="yay"><img src="images/icons/success.png" alt="success" />${ "Update" | translate }</button>
...
1151
1152
1153
 
1154
1155
1156
...
1151
1152
1153
1154
1155
1156
1157
0
@@ -1151,6 +1151,7 @@
0
       $config->set("enable_trackbacking", !empty($_POST['enable_trackbacking']));
0
       $config->set("send_pingbacks", !empty($_POST['send_pingbacks']));
0
       $config->set("posts_per_page", $_POST['posts_per_page']);
0
+      $config->set("enable_xmlrpc", !empty($_POST['enable_xmlrpc']));
0
 
0
       redirect("/admin/?action=content_settings&updated");
0
     }
...
469
470
471
 
 
 
472
473
474
...
469
470
471
472
473
474
475
476
477
0
@@ -469,6 +469,9 @@
0
      * Authenticates a given login and password, and checks for appropriate permission
0
      */
0
     private function auth($login, $password, $do = 'add') {
0
+      if (!Config::current()->enable_xmlrpc)
0
+        throw new Exception(__("XML-RPC support is disabled for this site."));
0
+
0
       global $user;
0
       $user = new User(
0
         null,
...
247
248
249
 
250
251
252
...
247
248
249
250
251
252
253
0
@@ -247,6 +247,7 @@
0
       $config->set("guest_group", 5);
0
       $config->set("enable_trackbacking", true);
0
       $config->set("send_pingbacks", false);
0
+      $config->set("enable_xmlrpc", true);
0
       $config->set("secure_hashkey", md5(random(32, true)));
0
       $config->set("uploads_path", "/uploads/");
0
       $config->set("enabled_modules", array());
...
114
115
116
 
117
118
119
...
114
115
116
117
118
119
120
0
@@ -114,6 +114,7 @@
0
   function to_2000() {
0
     global $config, $sql, $misc;
0
     $sql->adapter = null;
0
+    $config->set("enable_xmlrpc", true);
0
     $config->set("uploads_path", "/uploads/");
0
     $config->set("chyrp_url", $config->url);
0
     $config->set("feed_items", $config->rss_posts);

Comments