We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Fix for Delete Entry plugin

Development and Programming

muttlogic's avatar
muttlogic
14 posts
17 years ago
muttlogic's avatar muttlogic

I found a small problem when using VayaDesign ‘Delete Entries’ plugin (described here and here).

The problem occurs when the plugin generates the link to the delete template in the case where the site is setup with a blank index file (Admin -> System Preferences -> General Configuration -> Name of your site’s index page).

As a quick fix, I added a conditional around the link generation starting on line 41 of version 1.0 of the plugin:

Replace:

$link = "<a >ini('site_url') . $PREFS->ini('site_index') . "/" .  $TMPL->fetch_param('template') . "/" . $TMPL->fetch_param('entryid') . "\"$showconfirm>" . $TMPL->tagdata . "</a>";

With:

if ($PREFS->ini('site_index') == '') {
    $link = "<a >ini('site_url') .  $TMPL->fetch_param('template') . "/" . $TMPL->fetch_param('entryid') . "\"$showconfirm>" . $TMPL->tagdata . "</a>";
} else {
    $link = "<a >ini('site_url') . $PREFS->ini('site_index') . "/" .  $TMPL->fetch_param('template') . "/" . $TMPL->fetch_param('entryid') . "\"$showconfirm>" . $TMPL->tagdata . "</a>";
}

-Jeff

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.