Skip to content

Commit

Permalink
updates to make delete work
Browse files Browse the repository at this point in the history
  • Loading branch information
ixmbran committed Mar 25, 2011
1 parent 6b58560 commit 1e90edf
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 26 deletions.
6 changes: 3 additions & 3 deletions README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@ See http://drupal.org/getting-started/5/install-contrib for instructions on
how to install or update Drupal modules.

Once FeedBurner is installed and enabled, you can start burning your site's
feeds or configure settings at admin/build/feedburner.
feeds or configure settings at admin/structure/feedburner.


FREQUENTLY ASKED QUESTIONS (FAQ)
--------------------------------

Q: Does this module work with feeds with a Google FeedBurner account?
A: Yes it does! All you need to do is go to the module settings page
(admin/build/feedburner/settings) and under the 'Advanced Settings' area,
(admin/structure/feedburner/settings) and under the 'Advanced Settings' area,
change the MyBrand domain to 'feedproxy.google.com'.

Q: How do I get the 'Comments Count' FeedFlare for my Drupal feed?
Expand All @@ -70,7 +70,7 @@ KNOWN ISSUES

- FCKeditor module versions before 6.x-1.3-rc2 or 5.x-2.2-rc2 will add unwanted
HTML to the 'Allowed Useragents' field in the advanced 'Advanced settings'
section of admin/build/feedburner/settings. This extra formatting causes
section of admin/structure/feedburner/settings. This extra formatting causes
unexpected errors. To fix this issue, please update to the latest version of the
FCKeditor module and make sure to go to admin/settings/feedburner and set the
value of the 'Allowed Useragents' field to the following (one on each line):
Expand Down
35 changes: 16 additions & 19 deletions feedburner.admin.inc
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ function feedburner_build_overview($category) {
$row[] = l($feed['alias'], $feed['alias'], array('alias' => TRUE, 'attributes' => array('alt' => $feed['description'], 'title' => $feed['description'])));
if (isset($feed['feedburner'])) {
$row[] = l($feed['feedburner'], _feedburner_construct_url($feed['feedburner']));
$row[] = l(t('Edit'), 'admin/build/feedburner/burn/' . $feed['path']);
$row[] = l(t('Unburn'), 'admin/build/feedburner/unburn/' . $feed['path']);
$row[] = l(t('Edit'), 'admin/structure/feedburner/burn/' . $feed['path']);
$row[] = l(t('Unburn'), 'admin/structure/feedburner/unburn/' . $feed['path']);
$row[] = l(t('Source'), $feed['path'], array('query' => array('redirect' => 'no')));
}
else {
$row[] = '';
$row[] = l(t('Burn'), 'admin/build/feedburner/burn/' . $feed['path']);
$row[] = l(t('Burn'), 'admin/structure/feedburner/burn/' . $feed['path']);
$row[] = '';
$row[] = '';
}
Expand Down Expand Up @@ -105,27 +105,24 @@ function feedburner_build_filter_form($form, &$form_state, $category, $keys = ''
* Process filter form submission when the Filter button is pressed.
*/
function _feedburner_build_filter_form_submit_filter($form, &$form_state) {
$form_state['redirect'] = 'admin/build/feedburner/list/' . $form_state['values']['category'] . '/' . trim($form_state['values']['filter']);
$form_state['redirect'] = 'admin/structure/feedburner/list/' . $form_state['values']['category'] . '/' . trim($form_state['values']['filter']);
}

/**
* Process filter form submission when the Reset button is pressed.
*/
function feedburner_build_filter_form_submit_reset($form, &$form_state) {
$form_state['redirect'] = 'admin/build/feedburner/list/' . $form_state['values']['category'];
$form_state['redirect'] = 'admin/structure/feedburner/list/' . $form_state['values']['category'];
}


function feedburner_burn_form() {
$path = _feedburner_get_path_segment(4);
$result = db_select('feedburner', 'f')
$feedburner = db_select('feedburner', 'f')
->fields('f', array('feedburner'))
->condition('path', $path)
->execute();
foreach ($result as $feed) {

}

->execute()
->fetch();

$form['path'] = array(
'#type' => 'textfield',
Expand Down Expand Up @@ -158,8 +155,8 @@ function feedburner_burn_form() {
// TODO: Feed Management API Options

$form['submit'] = array('#type' => 'submit', '#value' => t('Save'));
$form['cancel'] = array('#value' => l(t('Cancel'), 'admin/build/feedburner'));
$form['#redirect'] = 'admin/build/feedburner';
$form['cancel'] = array('#value' => l(t('Cancel'), 'admin/structure/feedburner'));
$form['#redirect'] = 'admin/structure/feedburner';

return $form;
}
Expand All @@ -181,12 +178,12 @@ function feedburner_burn_form_submit($form, &$form_state) {
}


function feedburner_unburn_form() {
function feedburner_unburn_form($form, &$form_state) {
$path = _feedburner_get_path_segment(4);
$feed = db_select('feedburner', 'f')->fields('f', 'feedburner')->condition('path', $path)->execute()->fetch();
$feed = db_select('feedburner', 'f')->fields('f', array('feedburner'))->condition('path', $path)->execute()->fetch();

if (empty($path) || $feed === FALSE) {
drupal_goto('admin/build/feedburner');
drupal_goto('admin/structure/feedburner');
}

$form['path'] = array(
Expand All @@ -204,9 +201,9 @@ function feedburner_unburn_form() {
// '#access' => $feed && _feedburner_can_api(TRUE),
//);

$form['#redirect'] = 'admin/build/feedburner';
$form['#redirect'] = 'admin/structure/feedburner';

return confirm_form($form, t('Are you sure you want to unburn %feed?', array('%feed' => $path)), 'admin/build/feedburner', t('Requests for this feed will no longer be redirected to FeedBurner. But don\'t worry, you can always re-burn this feed to FeedBurner.'));
return confirm_form($form, t('Are you sure you want to unburn %feed?', array('%feed' => $path)), 'admin/structure/feedburner', t('Requests for this feed will no longer be redirected to FeedBurner. But don\'t worry, you can always re-burn this feed to FeedBurner.'));
}

function feedburner_unburn_form_submit($form, &$form_state) {
Expand Down Expand Up @@ -273,7 +270,7 @@ function feedburner_settings_form() {
'teaser' => t('Teaser view'),
'page' => t('Full-page view'),
),
'#description' => t('When to display the FeedFlare after the node text. There is also a <a href="@block">FeedFlare block available</a>.', array('@block' => url('admin/build/block/configure/feedburner/0'))),
'#description' => t('When to display the FeedFlare after the node text. There is also a <a href="@block">FeedFlare block available</a>.', array('@block' => url('admin/structure/block/configure/feedburner/0'))),
);
//$form['feedflare']['feedburner_standardstats'] = array(
// '#type' => 'checkbox',
Expand Down
8 changes: 4 additions & 4 deletions feedburner.module
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ function feedburner_help($path, $arg) {
switch ($path) {
// case 'admin/help#feedburner':
// return '';
//case 'admin/build/feedburner':
//case 'admin/structure/feedburner':
// $output = '<p>'. t("This is the FeedBurner site feed redirection building page. Make sure to check out the <a href=\"@settings-link\">FeedBurner settings</a>.", array('@settings-link' => url('admin/settings/feedburner'))) .'</p>';
// return $output;
//case 'admin/settings/feedburner':
// $output = '<p>'. t("These are the settings for the FeedBurner module. Once you have everything set, check out your site's <a href=\"@build-link\">FeedBurner feeds</a>.", array('@build-link' => url('admin/build/feedburner'))) .'</p>';
// $output = '<p>'. t("These are the settings for the FeedBurner module. Once you have everything set, check out your site's <a href=\"@build-link\">FeedBurner feeds</a>.", array('@build-link' => url('admin/structure/feedburner'))) .'</p>';
// return $output;
}
}
Expand Down Expand Up @@ -133,7 +133,7 @@ function feedburner_url_outbound_alter(&$path, &$options, $original_path) {
static $feeds;

if ($original_path == 'feedburner/url-rewrite-test') {
// Create a define that can be checked in admin/build/feedburner/settings.
// Create a define that can be checked in admin/structure/feedburner/settings.
define('FEEDBURNER_CUSTOM_URL_REWRITE_OUTBOUND', TRUE);
return;
}
Expand Down Expand Up @@ -511,7 +511,7 @@ function feedburner_load($where, $args = array()) {
* An optional array of arguments.
*/
function feedburner_delete($where, $args = array()) {
if ($where && $args) {
if ($where) {
$query = db_delete('feedburner');
foreach ($where as $key => $value) {
$query->condition($key, $value);
Expand Down

0 comments on commit 1e90edf

Please sign in to comment.