Fixes for 423474 and 423377
diff --git a/parts/functions.php b/parts/functions.php
index da7b232..15e00b1 100644
--- a/parts/functions.php
+++ b/parts/functions.php
@@ -18,7 +18,7 @@
 function is_valid_article_file(&$path) {
 	global $root;
 	
-	$parts = split('/', $path);
+	$parts = explode('/', $path);
 	if (count($parts) != 2) return false;
 	$directory = $parts[0];
 	$file = $parts[1];
@@ -40,8 +40,8 @@
 function is_actual_article_directory(&$directory_name) {
 	global $root;
 	
-	if ($directory == ".") return false;
-	if ($directory == "..") return false;
+	if ($directory_name == ".") return false;
+	if ($directory_name == "..") return false;
 	
 	$dir_handle = @opendir($root);
 	while ($file = readdir($dir_handle)) {
@@ -74,7 +74,7 @@
 	/*
 	 * If we can match a title tag, extract it.
 	 */
-	if (eregi("<title>(.*)</title>", $one_line, $title)) {
+	if (preg_match("/<title>(.*)<\/title>/i", $one_line, $title)) {
     	return "Eclipse Corner Article: $title[1]";
 	}
 	
@@ -92,7 +92,7 @@
          * Only read up to the part that includes the
          * end tag for the header area.
          */
-        if (eregi("</head>", $part)) break;
+        if (preg_match("/<\/head>/i", $part)) break;
     }
     fclose($handle);
     return $content;