* Web.config:

* Web.csproj:
* instdbws.sql:
* packages.config:
* TestByteA.cs:
* App.master:
* MyClass.cs:
* LocalizedText.resx:
* Index.aspx:
* LocalizedText.fr.resx:
* packages.config:
* Details.aspx:
* packages.config:
* packages.config:
* packages.config:
* EventPub.aspx:
* LocalizedText.Designer.cs:
* FileSystemController.cs:
* FrontOfficeController.cs:
* NpgsqlContentProvider.cs:
* ITContentProvider.csproj:
* FileSystemManager.cs:
* Circle.cs:
* YaEvent.cs:
* NpgsqlBlogProvider.csproj:
* NpgsqlMRPProviders.csproj:
* EventPub.cs:
* NpgsqlContentProvider.csproj:
* EventType.cs:
* UserPrefs.cs:
* CalendarController.cs:
* EstablishmentType.cs: 

* ITCPNpgsqlProvider.cs:
* NpgsqlBlogProvider.cs:
* NpgsqlRoleProvider.cs:
* NpgsqlProfileProvider.cs:
* NpgsqlMembershipProvider.cs: Npgsql Command.Parameters.Add is
  obsolete

* Commande.cs: FileSystem ctor needs a format parameter in order to
  use path by membership

* google-services.json: intented to be used to build android
  application able to receive push notification via GCM
This commit is contained in:
Paul Schneider 2015-06-02 01:42:49 +02:00
commit 31734da129
39 changed files with 777 additions and 469 deletions

View file

@ -56,11 +56,14 @@ namespace Yavsc.Model.FileSystem
/// <summary>
/// Initializes a new instance of the <see cref="Yavsc.Model.FileSystem.FileSystemManager"/> class.
/// </summary>
public FileSystemManager (string rootDirectory="~/files", char dirSep = '/')
public FileSystemManager (string rootDirectory="~/users/{0}", char dirSep = '/')
{
prefix = rootDirectory;
MembershipUser user = Membership.GetUser ();
if (user == null)
throw new Exception ("Not membership available");
Prefix = HttpContext.Current.Server.MapPath (
string.Format (rootDirectory, user.UserName));
DirectorySeparator = dirSep;
}
string regexFileName = "^[A-Za-z0-9#^!+ _~\\-.]+$";
@ -109,9 +112,6 @@ namespace Yavsc.Model.FileSystem
}
set {
prefix = value;
if (value.StartsWith ("~/")) {
prefix = HttpContext.Current.Server.MapPath(value);
}
}
}
@ -145,7 +145,7 @@ namespace Yavsc.Model.FileSystem
{
string path = Prefix;
if (subdir != null) {
checkSubDir (subdir);
checkSubDir (subdir); // checks for specification validity
path = Path.Combine (Prefix, subdir);
}
DirectoryInfo di = new DirectoryInfo (path);