Skip to content

Commit

Permalink
plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
starlying committed Jun 19, 2017
1 parent bfeda5a commit 349e0c1
Show file tree
Hide file tree
Showing 357 changed files with 36,554 additions and 37,031 deletions.
6 changes: 6 additions & 0 deletions source/BaiRong.Core/AppManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,14 @@ public class Sys
public class LeftMenu
{
public const string Site = "Site";
public const string Plugin = "Plugin";
public const string Auxiliary = "Auxiliary";
}

public class Permission
{
public const string SysSite = "sys_site";
public const string SysPlugin = "sys_plugin";
public const string SysAuxiliary = "sys_auxiliary";
}
}
Expand Down Expand Up @@ -268,6 +270,10 @@ public static string GetLeftMenuName(string menuId)
{
retval = "系统站点管理";
}
else if (menuId == Sys.LeftMenu.Plugin)
{
retval = "插件管理";
}
else if (menuId == Sys.LeftMenu.Auxiliary)
{
retval = "辅助表管理";
Expand Down
3 changes: 1 addition & 2 deletions source/BaiRong.Core/BaiRong.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<SccLocalPath>SAK</SccLocalPath>
<SccAuxPath>SAK</SccAuxPath>
<SccProvider>SAK</SccProvider>
<TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<IsWebBootstrapper>false</IsWebBootstrapper>
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
Expand Down Expand Up @@ -235,7 +235,6 @@
<Compile Include="Model\Enumerations\ESubscribePushType.cs" />
<Compile Include="Model\Enumerations\EUserActionType.cs" />
<Compile Include="Model\Enumerations\ELevelPeriodType.cs" />
<Compile Include="Model\Enumerations\EPublishmentSystemType.cs" />
<Compile Include="Model\Enumerations\EUploadType.cs" />
<Compile Include="Model\Enumerations\EUserLockType.cs" />
<Compile Include="Model\Enumerations\ESmsProviderType.cs" />
Expand Down
1 change: 1 addition & 0 deletions source/BaiRong.Core/DirectoryUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ public class SiteFiles
public const string BackupFiles = "BackupFiles";
public const string TemporaryFiles = "TemporaryFiles";
public const string Configuration = "Configuration";
public const string Plugins = "Plugins";
}

public class SiteTemplates
Expand Down
25 changes: 11 additions & 14 deletions source/BaiRong.Core/Model/Enumerations/EContentModelType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -162,14 +162,16 @@ public static void AddListItemsForContentCheck(ListControl listControl)
}
}

public static ContentModelInfo GetContentModelInfo(EPublishmentSystemType publishmentSystemType, int siteID, string tableName, EContentModelType modelType)
public static ContentModelInfo GetContentModelInfo(int siteId, string tableName, EContentModelType modelType)
{
var modelInfo = new ContentModelInfo();
modelInfo.ModelId = GetValue(modelType);
modelInfo.ModelName = GetText(modelType);
modelInfo.SiteId = siteID;
modelInfo.IsSystem = true;
modelInfo.TableName = tableName;
var modelInfo = new ContentModelInfo
{
ModelId = GetValue(modelType),
ModelName = GetText(modelType),
SiteId = siteId,
IsSystem = true,
TableName = tableName
};
if (modelType == EContentModelType.Content)
{
modelInfo.TableType = EAuxiliaryTableType.BackgroundContent;
Expand Down Expand Up @@ -202,14 +204,9 @@ public static ContentModelInfo GetContentModelInfo(EPublishmentSystemType publis
return modelInfo;
}

public static EContentModelType GetEnumTypeByPublishmentSystemType(EPublishmentSystemType publishmentSystemType)
public static bool IsPhoto(string contentModelId)
{
return EContentModelType.Content;
}

public static bool IsPhoto(string contentModelID)
{
var modelType = GetEnumType(contentModelID);
var modelType = GetEnumType(contentModelId);

if (modelType == EContentModelType.Photo)
{
Expand Down
148 changes: 0 additions & 148 deletions source/BaiRong.Core/Model/Enumerations/EPublishmentSystemType.cs

This file was deleted.

10 changes: 10 additions & 0 deletions source/BaiRong.Core/PageUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -790,6 +790,16 @@ public static string GetAdminDirectoryUrl(string relatedUrl)
return Combine(WebConfigUtils.ApplicationPath, FileConfigManager.Instance.AdminDirectoryName, relatedUrl);
}

public static string GetSiteFilesUrl(string relatedUrl)
{
return Combine(WebConfigUtils.ApplicationPath, DirectoryUtils.SiteFiles.DirectoryName, relatedUrl);
}

public static string GetPluginUrl(string pluginId, string relatedUrl)
{
return GetSiteFilesUrl(Combine(DirectoryUtils.SiteFiles.Plugins, pluginId, relatedUrl));
}

public static string GetSiteServerUrl(string className, NameValueCollection queryString)
{
return AddQueryString(GetAdminDirectoryUrl(className.ToLower() + ".aspx"), queryString);
Expand Down
7 changes: 6 additions & 1 deletion source/BaiRong.Core/PathUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,12 @@ public static string GetCurrentPagePath()

public static string GetSiteFilesPath(params string[] paths)
{
return MapPath(Combine("~/sitefiles", Combine(paths)));
return MapPath(Combine("~/" + DirectoryUtils.SiteFiles.DirectoryName, Combine(paths)));
}

public static string GetPluginsPath(params string[] paths)
{
return GetSiteFilesPath(DirectoryUtils.SiteFiles.Plugins, Combine(paths));
}

public static string RemovePathInvalidChar(string filePath)
Expand Down
Loading

0 comments on commit 349e0c1

Please sign in to comment.