Fix for Delete Entry plugin
Posted: 01 July 2008 10:03 AM   [ Ignore ]  
Summer Student
Total Posts:  11
Joined  05-15-2007

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

Profile
 
 
   
 
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 1149, on July 16, 2007 10:33 AM
Total Registered Members: 62690 Total Logged-in Users: 23
Total Topics: 77269 Total Anonymous Users: 15
Total Replies: 417092 Total Guests: 182
Total Posts: 494361    
Members ( View Memberlist )