Fix root domains on Windows servers
[gitphp.git] / include / Util.class.php
blob:a/include/Util.class.php -> blob:b/include/Util.class.php
--- a/include/Util.class.php
+++ b/include/Util.class.php
@@ -44,6 +44,11 @@
 		return (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN');
 	}
 
+	public static function NullFile()
+	{
+		return self::IsWindows() ? 'NUL' : '/dev/null';
+	}
+
 	/**
 	 * Tests if this is a 64 bit machine
 	 *
@@ -63,10 +68,10 @@
 	public static function MakeSlug($str)
 	{
 		$from = array(
-			'/'
+			'/&'
 		);
 		$to = array(
-			'-'
+			'--'
 		);
 		return str_replace($from, $to, $str);
 	}

comments