[Xfce4-commits] <forum:master> Drop the zombie plugin.

Nick Schermer noreply at xfce.org
Tue May 24 19:34:01 CEST 2011


Updating branch refs/heads/master
         to 435a069c1e6e772e189f42ccff1d8e773d43ef5c (commit)
       from f2e3680ab276eb1641408cfa36802e3d67686fa8 (commit)

commit 435a069c1e6e772e189f42ccff1d8e773d43ef5c
Author: Nick Schermer <nick at xfce.org>
Date:   Tue May 24 18:47:19 2011 +0200

    Drop the zombie plugin.

 plugins/AMP_Zombies.php |   68 -----------------------------------------------
 1 files changed, 0 insertions(+), 68 deletions(-)

diff --git a/plugins/AMP_Zombies.php b/plugins/AMP_Zombies.php
deleted file mode 100644
index f057154..0000000
--- a/plugins/AMP_Zombies.php
+++ /dev/null
@@ -1,68 +0,0 @@
-<?php
-
-$zombie_time = 60*60*24*365;
-$max_age = 60*60*24*30;
-
-// Make sure no one attempts to run this script "directly"
-if (!defined('PUN'))
-	exit;
-
-// Tell admin_loader.php that this is indeed a plugin and that it is loaded
-define('PUN_PLUGIN_LOADED', 1);
-
-// Display the admin navigation menu
-generate_admin_menu($plugin);
-
-?>
-	<div id="exampleplugin" class="blockform">
-		<h2><span>Zombie Detector</span></h2>
-		<div class="box">
-			<div class="inbox">
-				<p>Detect Zombies before they do!</p>
-				<p>Current settings:
-					<table style="width:350px;">
-						<tr>
-							<td>Last post was posted after:</td>
-							<td><?php echo gmdate('M d Y H:i:s', time() - $max_age); ?></td>
-						</tr>
-						<tr>
-							<td>Topic was dead for:</td>
-							<td><?php echo round(($zombie_time / (60 * 60 * 24))); ?> d</td>
-						</tr>
-					</table>
-				</p>
-			</div>
-		</div>
-
-		<h2 class="block2"><span>Undead Topics:</span></h2>
-		<div class="box">
-			<div class="inbox"><p><?php
-			$topic_result = $db->query('SELECT id, subject, last_post FROM '.$db->prefix.'topics WHERE closed=0 AND sticky=0 AND moved_to is null AND (last_post - posted) > '.$zombie_time.' AND last_post > (UNIX_TIMESTAMP() - '.$max_age.') ORDER BY last_post DESC') or error('All clear', __FILE__, __LINE__, $db->error());
-
-			if ($db->num_rows($topic_result))
-			{
-				echo '<ul style="margin-left:20px;">';
-				while ($cur_topic = $db->fetch_assoc($topic_result))
-				{
-					$post_result = $db->query('SELECT id, posted FROM '.$db->prefix.'posts WHERE topic_id='.$cur_topic['id'].' ORDER BY id DESC');
-					if ($db->num_rows($post_result))
-					{
-						$last_post = $cur_topic['last_post'];
-						while ($cur_post = $db->fetch_assoc($post_result))
-						{
-							if (abs($cur_post['posted'] - $last_post) > $zombie_time)
-							{
-								echo '<li><a href="viewtopic.php?pid='.$cur_post['id'].'#p'.$cur_post['id'].'">'.pun_htmlspecialchars($cur_topic['subject']).'</a></li>';
-								break;
-							}
-						$last_post = $cur_post['posted'];
-						}
-					}
-				}
-				echo '</ul>';
-			}
-			?></p></div>
-		</div>
-	</div>
-<?php
-



More information about the Xfce4-commits mailing list