~ubuntu-branches/ubuntu/intrepid/drupal5/intrepid-security

« back to all changes in this revision

Viewing changes to modules/aggregator/aggregator.module

  • Committer: Bazaar Package Importer
  • Author(s): Emanuele Gentili
  • Date: 2008-01-12 14:00:18 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20080112140018-aef0id92a2r0611p
Tags: 5.6-1ubuntu1
* Merge from debian unstable, remaining changes (LP: #182291):
  + debian/patches/02_htaccess:
    - Add RewriteBase /drupal5
  + debian/control:
    - Replace exim4 with postfix in Depends.
    - Modify Maintainer value to match DebianMaintainerField spec.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
<?php
2
 
// $Id: aggregator.module,v 1.324.2.1 2007/07/09 03:38:22 drumm Exp $
 
2
// $Id: aggregator.module,v 1.324.2.2 2008/01/10 22:14:24 drumm Exp $
3
3
 
4
4
/**
5
5
 * @file
51
51
      'callback arguments' => array('aggregator_form_category'),
52
52
      'access' => $edit,
53
53
      'type' => MENU_LOCAL_TASK);
54
 
    $items[] = array('path' => 'admin/content/aggregator/remove',
 
54
    $items[] = array(
 
55
      'path' => 'admin/content/aggregator/remove',
55
56
      'title' => t('Remove items'),
56
 
      'callback' => 'aggregator_admin_remove_feed',
 
57
      'callback' => 'drupal_get_form',
 
58
      'callback arguments' => array('aggregator_admin_remove_feed'),
57
59
      'access' => $edit,
58
 
      'type' => MENU_CALLBACK);
 
60
      'type' => MENU_CALLBACK,
 
61
    );
59
62
    $items[] = array('path' => 'admin/content/aggregator/update',
60
63
      'title' => t('Update items'),
61
64
      'callback' => 'aggregator_admin_refresh_feed',
1001
1004
  return $output;
1002
1005
}
1003
1006
 
 
1007
function aggregator_admin_remove_feed($fid) {
 
1008
  $feed = aggregator_get_feed($fid);
 
1009
  return confirm_form(
 
1010
    array(
 
1011
      'feed' => array(
 
1012
        '#type' => 'value',
 
1013
        '#value' => $feed,
 
1014
      ),
 
1015
    ),
 
1016
    t('Are you sure you want to remove all items from the feed %feed?', array('%feed' => $feed['title'])),
 
1017
    'admin/content/aggregator',
 
1018
    t('This action cannot be undone.'),
 
1019
    t('Remove items'),
 
1020
    t('Cancel')
 
1021
  );
 
1022
}
 
1023
 
1004
1024
/**
1005
 
 * Menu callback; removes all items from a feed, then redirects to the overview page.
 
1025
 * Remove all items from a feed and redirect to the overview page.
1006
1026
 */
1007
 
function aggregator_admin_remove_feed($feed) {
1008
 
  aggregator_remove(aggregator_get_feed($feed));
1009
 
  drupal_goto('admin/content/aggregator');
 
1027
function aggregator_admin_remove_feed_submit($form_id, $form_values) {
 
1028
  aggregator_remove($form_values['feed']);
 
1029
  return 'admin/content/aggregator';
1010
1030
}
1011
1031
 
1012
1032
/**