viewgit/index.php:465 Only variables should be passed by reference [2048]
viewgit/index.php:466 Non-static method GeSHi::get_language_name_from_extension() should not be called statically [2048]
using System; namespace Dizzy { public class FileType { int type; const int UNKNOWN = 0; const int VIDEO = 1; const int AUDIO = 2; const int BOOK = 3; public FileType(string filename) { if(filename.EndsWith(".avi")) type = VIDEO; else if(filename.EndsWith(".pdf")) type = BOOK; else if(filename.EndsWith(".mp3")) type = AUDIO; else type = UNKNOWN; } public string Name() { if(type == VIDEO) return "Video"; else if(type == BOOK) return "Book"; else if(type == AUDIO) return "Audio"; else return "Sconosciuto"; } } public class File { public string user; public string name; public string path; public FileType type; public File (string path, string user) { // Determino il tipo di file string [] a; if (user == "") { a = path.Split('/'); if (a.Length >= 2) user = a[2]; } this.user = user; this.path = path; // Console.WriteLine("Path set to: {0}", this.path); string[] pieces = path.Split ('/'); name = pieces[pieces.Length - 1]; } } }