function updates_requested()
{
global $wpdb;
if (isset($_POST['update']) or isset($_POST['action']) or isset($_POST['update_uri'])) {
// Only do things with side-effects for HTTP POST or command line
$fwp_update_invoke = 'post';
} else {
$fwp_update_invoke = 'get';
}
$update_set = array();
if ($fwp_update_invoke != 'get') {
if (is_array(MyPHP::post('link_ids')) and MyPHP::post('action') == FWP_UPDATE_CHECKED) {
// Get single link ID or multiple link IDs from REQUEST parameters
// if available. Sanitize values for MySQL.
$link_list = $this->requested_link_ids_sql();
// $link_list has previously been sanitized for html by self::requested_link_ids_sql
$targets = $wpdb->get_results("\n\t\t\t\tSELECT * FROM {$wpdb->links}\n\t\t\t\tWHERE link_id IN {$link_list}\n\t\t\t\t");
if (is_array($targets)) {
foreach ($targets as $target) {
$update_set[] = $target->link_rss;
}
} else {
// This should never happen
FeedWordPress::critical_bug('fwp_syndication_manage_page::targets', $targets, __LINE__, __FILE__);
}
} elseif (!is_null(MyPHP::post('update_uri'))) {
$targets = MyPHP::post('update_uri');
if (!is_array($targets)) {
$targets = array($targets);
}
$first = each($targets);
if (!is_numeric($first['key'])) {
// URLs in keys
$targets = array_keys($targets);
}
$update_set = $targets;
}
}
return $update_set;
}