Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Internal / switch over to MyPHP utility class.

  • Loading branch information...
commit 350493f06fcc328ce73dacd8d337e380786fb51d 1 parent b15fdd1
Charles Johnson authored
View
4 admin-ui.php
@@ -163,12 +163,12 @@ function update_requested_in ($post) {
);
foreach ($submit_buttons as $field) :
if (isset($fwp_post[$field])) :
- $link_id = $_REQUEST['save_link_id'];
+ $link_id = MyPHP::request('save_link_id');
endif;
endforeach;
if (is_null($link_id) and isset($_REQUEST['link_id'])) :
- $link_id = $_REQUEST['link_id'];
+ $link_id = MyPHP::request('link_id');
endif;
return $link_id;
View
6 feeds-page.php
@@ -775,9 +775,9 @@ function display_feedfinder () {
$lookup = (isset($_REQUEST['lookup']) ? $_REQUEST['lookup'] : NULL);
- $auth = FeedWordPress::param('link_rss_auth_method');
- $username = FeedWordPress::param('link_rss_username');
- $password = FeedWordPress::param('link_rss_password');
+ $auth = MyPHP::request('link_rss_auth_method');
+ $username = MyPHP::request('link_rss_username');
+ $password = MyPHP::request('link_rss_password');
$credentials = array(
"authentication" => $auth,
"username" => $username,
View
21 feedwordpress.php
@@ -1442,10 +1442,7 @@ function clear_cache_magic_url () {
} /* FeedWordPress::clear_cache_magic_url() */
function clear_cache_requested () {
- return (
- isset($_GET['clear_cache'])
- and $_GET['clear_cache']
- );
+ return MyPHP::request('clear_cache');
} /* FeedWordPress::clear_cache_requested() */
function update_requested () {
@@ -2134,21 +2131,13 @@ function path ($filename = '') {
return $path;
}
+ // These are superceded by MyPHP::param/post/get/request, but kept
+ // here for backward compatibility.
function param ($key, $type = 'REQUEST', $default = NULL) {
- $where = '_'.strtoupper($type);
- $ret = $default;
- if (isset($GLOBALS[$where]) and is_array($GLOBALS[$where])) :
- if (isset($GLOBALS[$where][$key])) :
- $ret = $GLOBALS[$where][$key];
- if (get_magic_quotes_gpc()) :
- $ret = stripslashes_deep($ret);
- endif;
- endif;
- endif;
- return $ret;
+ return MyPHP::param($key, $default, $type);
}
function post ($key, $default = NULL) {
- return FeedWordPress::param($key, 'POST');
+ return MyPHP::post($key, $default);
}
} // class FeedWordPress
View
16 feedwordpresssyndicationpage.class.php
@@ -82,8 +82,8 @@ function updates_requested () {
$update_set = array();
if ($fwp_update_invoke != 'get') :
- if (is_array(FeedWordPress::post('link_ids'))
- and (FeedWordPress::post('action')==FWP_UPDATE_CHECKED)) :
+ if (is_array(MyPHP::post('link_ids'))
+ and (MyPHP::post('action')==FWP_UPDATE_CHECKED)) :
$targets = $wpdb->get_results("
SELECT * FROM $wpdb->links
WHERE link_id IN (".implode(",",$_POST['link_ids']).")
@@ -95,8 +95,8 @@ function updates_requested () {
else : // This should never happen
FeedWordPress::critical_bug('fwp_syndication_manage_page::targets', $targets, __LINE__, __FILE__);
endif;
- elseif (!is_null(FeedWordPress::post('update_uri'))) :
- $targets = FeedWordPress::post('update_uri');
+ elseif (!is_null(MyPHP::post('update_uri'))) :
+ $targets = MyPHP::post('update_uri');
if (!is_array($targets)) :
$targets = array($targets);
endif;
@@ -351,7 +351,7 @@ function display () {
FWP_RESUB_CHECKED => 'multiundelete_page',
);
- $act = FeedWordPress::param('action');
+ $act = MyPHP::request('action');
if (isset($dispatcher[$act])) :
$method = $dispatcher[$act];
if (method_exists($this, $method)) :
@@ -1141,14 +1141,14 @@ function fwp_switchfeed_page () {
endif;
if (isset($existingLink)) :
- $auth = FeedWordPress::post('link_rss_auth_method');
+ $auth = MyPHP::post('link_rss_auth_method');
if (!is_null($auth) and (strlen($auth) > 0) and ($auth != '-')) :
$existingLink->update_setting('http auth method', $auth);
$existingLink->update_setting('http username',
- FeedWordPress::post('link_rss_username')
+ MyPHP::post('link_rss_username')
);
$existingLink->update_setting('http password',
- FeedWordPress::post('link_rss_password')
+ MyPHP::post('link_rss_password')
);
else :
$existingLink->update_setting('http auth method', NULL);
Please sign in to comment.
Something went wrong with that request. Please try again.