summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2008-01-25 18:50:29 +0100
committerAndrew Dolgov <[email protected]>2008-01-25 18:50:29 +0100
commit34459667e259eb01257a73a4c30bff0ba2c3b3d5 (patch)
tree7eb1357ba017d29391872a539e84468f3059814c
parent16211ddbf24c978d88d8eb434ab57d7824827dbd (diff)
new option: ALLOW_SELECT_UPDATE_METHOD (bump config ver)
-rw-r--r--config.php-dist6
-rw-r--r--functions.php10
-rw-r--r--modules/pref-feeds.php21
-rw-r--r--sanity_check.php2
4 files changed, 25 insertions, 14 deletions
diff --git a/config.php-dist b/config.php-dist
index 2c92429ec..191d648e3 100644
--- a/config.php-dist
+++ b/config.php-dist
@@ -174,7 +174,11 @@
// Directory for lockfiles, must be writable to the user you run
// daemon process or cronjobs under.
- define('CONFIG_VERSION', 14);
+ define('ALLOW_SELECT_UPDATE_METHOD', false);
+ // Allow users to select the library to update feeds with - e.g.
+ // Magpie or SimplePie
+
+ define('CONFIG_VERSION', 15);
// Expected config version. Please update this option in config.php
// if necessary (after migrating all new options from this file).
diff --git a/functions.php b/functions.php
index 6cc3b6785..33a5a9077 100644
--- a/functions.php
+++ b/functions.php
@@ -501,10 +501,14 @@
$auth_login = db_fetch_result($result, 0, "auth_login");
$auth_pass = db_fetch_result($result, 0, "auth_pass");
- if (ENABLE_SIMPLEPIE) {
- $use_simplepie = $update_method != 1;
+ if (ALLOW_SELECT_UPDATE_METHOD) {
+ if (ENABLE_SIMPLEPIE) {
+ $use_simplepie = $update_method != 1;
+ } else {
+ $use_simplepie = $update_method == 2;
+ }
} else {
- $use_simplepie = $update_method == 2;
+ $use_simplepie = ENABLE_SIMPLEPIE;
}
if (defined('DAEMON_EXTENDED_DEBUG') || $_GET['xdebug']) {
diff --git a/modules/pref-feeds.php b/modules/pref-feeds.php
index 749f4dc04..932302150 100644
--- a/modules/pref-feeds.php
+++ b/modules/pref-feeds.php
@@ -260,16 +260,19 @@
print "</td>";
- $update_method = db_fetch_result($result, 0, "update_method");
+ if (ALLOW_SELECT_UPDATE_METHOD) {
- print "<tr><td>".__('Update using:')."</td>";
-
- print "<td>";
-
- print_select_hash("update_method", $update_method, $update_methods,
- "class=\"iedit\"");
-
- print "</td>";
+ $update_method = db_fetch_result($result, 0, "update_method");
+
+ print "<tr><td>".__('Update using:')."</td>";
+
+ print "<td>";
+
+ print_select_hash("update_method", $update_method, $update_methods,
+ "class=\"iedit\"");
+
+ print "</td>";
+ }
$auth_login = htmlspecialchars(db_fetch_result($result, 0, "auth_login"));
diff --git a/sanity_check.php b/sanity_check.php
index 250505d00..0a6b9a36c 100644
--- a/sanity_check.php
+++ b/sanity_check.php
@@ -1,7 +1,7 @@
<?php
require_once "functions.php";
- define('EXPECTED_CONFIG_VERSION', 14);
+ define('EXPECTED_CONFIG_VERSION', 15);
define('SCHEMA_VERSION', 31);
if (!file_exists("config.php")) {