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]

  1.  
  2. using System;
  3. using System.Data.SQLite;
  4. using System.Collections;
  5.  
  6. namespace Dizzy
  7. {
  8.  
  9.  
  10. public class FileList
  11. {
  12.  
  13. GlobalConfig config;
  14. SQLiteConnection connection;
  15.  
  16. public FileList(ref GlobalConfig config) {
  17.  
  18. this.config = config;
  19.  
  20. string connectionString = "Data Source=" + this.config.ListFileName () + ";Version=3";
  21. this.connection = new SQLiteConnection(connectionString);
  22. }
  23.  
  24. public ArrayList Search(string keyword, string type, string user) {
  25.  
  26. this.connection.Open ();
  27. ArrayList matches = new ArrayList ();
  28.  
  29. // Eseguiamo la query
  30. SQLiteCommand sqlCmd = this.connection.CreateCommand ();
  31. sqlCmd.CommandText = "SELECT * from files WHERE name LIKE '%" + keyword + "%'";
  32. SQLiteDataReader reader = sqlCmd.ExecuteReader ();
  33.  
  34. File tmp;
  35. while(reader.Read())
  36. {
  37. tmp = new File(reader.GetString(0), // Path
  38. reader.GetString(2), // User
  39. reader.GetString(1), // Name
  40. reader.GetInt32(3)); // Size
  41.  
  42. if ( (type == "Qualsiasi" || tmp.type.Name() == type) &&
  43. (user == "" || user == tmp.user) )
  44. {
  45. matches.Add (tmp);
  46. }
  47. }
  48.  
  49. this.connection.Close ();
  50. return matches;
  51. }
  52. }
  53. }