From 09a89b01d0928667baea0147b2fe898800eb396b Mon Sep 17 00:00:00 2001
From: moodler <moodler>
Date: Mon, 18 Sep 2006 03:28:02 +0000
Subject: [PATCH] Nuked nuke.

---
 blocks/moodleblock.class.php | 56 ------------------------------------
 1 file changed, 56 deletions(-)

diff --git a/blocks/moodleblock.class.php b/blocks/moodleblock.class.php
index d848154904a..c82924d9d00 100644
--- a/blocks/moodleblock.class.php
+++ b/blocks/moodleblock.class.php
@@ -708,60 +708,4 @@ class block_list extends block_base {
 
 }
 
-/**
- * Class for supporting a phpnuke style block as a moodle block
- *
- * @author Jon Papaioannou
- * @package blocks
- */
-class block_nuke extends block_base {
-
-    var $content_type  = BLOCK_TYPE_NUKE;
-
-    function get_content() {
-
-        if ($this->content !== NULL) {
-            return $this->content;
-        }
-
-        global $CFG;
-        $this->content = &New stdClass;
-
-        // This whole thing begs to be written for PHP >= 4.3.0 using glob();
-        $dir = $CFG->dirroot .'/blocks/'. $this->name() .'/nuke/';
-        if ($dh = @opendir($dir)) {
-            while (($file = readdir($dh)) !== false) {
-                $regs = array();
-                if (ereg('^block\-(.*)\.php$', $file, $regs)) {
-                    // Found it! Let's prepare the environment...
-
-                    $oldvals = array();
-                    if (isset($GLOBALS['admin'])) {
-                        $oldvals['admin'] = $GLOBALS['admin'];
-                    }
-
-                    // isteacher() will eventually be deprecated and blocks
-                    // should define their own capabilities.
-                    $GLOBALS['admin'] = isteacher($this->course->id);
-                    
-                    @include($dir.$file);
-
-                    foreach($oldvals as $key => $val) {
-                        $GLOBALS[$key] = $val;
-                    }
-
-                    // We should have $content set now
-                    if (!isset($content)) {
-                        return NULL;
-                    }
-                    return $this->content->text = $content;
-                }
-            }
-        }
-
-        // If we reached here, we couldn't find the nuke block for some reason
-        return $this->content->text = get_string('blockmissingnuke');
-    }
-}
-
 ?>