本文整理汇总了C#中DotNetNuke.Entities.Portals.PortalController.UpdatePortalInfo方法的典型用法代码示例。如果您正苦于以下问题:C# PortalController.UpdatePortalInfo方法的具体用法?C# PortalController.UpdatePortalInfo怎么用?C# PortalController.UpdatePortalInfo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DotNetNuke.Entities.Portals.PortalController
的用法示例。
在下文中一共展示了PortalController.UpdatePortalInfo方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: MustHaveSandboxedPaymentSettings
public void MustHaveSandboxedPaymentSettings()
{
var portalController = new PortalController();
var site = portalController.GetPortal(0);
if (site.ProcessorPassword == string.Empty)
{
PortalController.UpdatePortalSetting(0, "paypalsandbox", "true");
//uses PayPal sandbox account.
site.ProcessorUserId = "PayPal";
site.ProcessorPassword = "320122999";
site.ProcessorUserId = "philip_1320123085_bi[email protected]";
portalController.UpdatePortalInfo(site);
}
WebConfigManager.TouchConfig(PhysicalPath);
}
示例2: CtlPagesContextMenuItemClick
protected void CtlPagesContextMenuItemClick(object sender, RadTreeViewContextMenuEventArgs e)
{
SelectedNode = e.Node.Value;
var tabController = new TabController();
var portalId = rblMode.SelectedValue == "H" ? Null.NullInteger : PortalId;
var objTab = tabController.GetTab(int.Parse(e.Node.Value), portalId, false);
switch (e.MenuItem.Value.ToLower())
{
case "makehome":
if (PortalSecurity.IsInRole(PortalSettings.AdministratorRoleName))
{
var portalController = new PortalController();
PortalInfo portalInfo = portalController.GetPortal(PortalId);
portalInfo.HomeTabId = objTab.TabID;
PortalSettings.HomeTabId = objTab.TabID;
portalController.UpdatePortalInfo(portalInfo);
DataCache.ClearPortalCache(PortalId, false);
BindTreeAndShowTab(objTab.TabID);
ShowSuccessMessage(string.Format(Localization.GetString("TabMadeHome", LocalResourceFile), objTab.TabName));
}
break;
case "view":
Response.Redirect(objTab.FullUrl);
break;
case "edit":
if (TabPermissionController.CanManagePage(objTab))
{
var editUrl = Globals.NavigateURL(objTab.TabID, "Tab", "action=edit", "returntabid=" + TabId);
// Prevent PageSettings of the current page in a popup if SSL is enabled and enforced, which causes redirection/javascript broswer security issues.
if (PortalSettings.EnablePopUps && !(objTab.TabID == TabId && (PortalSettings.SSLEnabled && PortalSettings.SSLEnforced)))
{
editUrl = UrlUtils.PopUpUrl(editUrl, this, PortalSettings, true, false);
var script = string.Format("<script type=\"text/javascript\">{0}</script>", editUrl);
ClientAPI.RegisterStartUpScript(Page, "EditInPopup", script);
}
else
{
Response.Redirect(editUrl, true);
}
}
break;
case "delete":
if (TabPermissionController.CanDeletePage(objTab))
{
tabController.SoftDeleteTab(objTab.TabID, PortalSettings);
BindTree();
//keep the parent tab selected
if (objTab.ParentId != Null.NullInteger)
{
SelectedNode = objTab.ParentId.ToString(CultureInfo.InvariantCulture);
ctlPages.FindNodeByValue(SelectedNode).Selected = true;
ctlPages.FindNodeByValue(SelectedNode).ExpandParentNodes();
BindTab(objTab.ParentId);
}
else
{
pnlDetails.Visible = false;
}
ShowSuccessMessage(string.Format(Localization.GetString("TabDeleted", LocalResourceFile), objTab.TabName));
}
break;
case "add":
if ((objTab!= null && TabPermissionController.CanAddPage(objTab)) || (PortalSecurity.IsInRole(PortalSettings.AdministratorRoleName)))
{
pnlBulk.Visible = true;
btnBulkCreate.CommandArgument = e.Node.Value;
ctlPages.FindNodeByValue(e.Node.Value).Selected = true;
txtBulk.Focus();
pnlDetails.Visible = false;
//Response.Redirect(NavigateURL(objTab.TabID, "Tab", "action=add", "returntabid=" & TabId.ToString), True)
}
break;
case "hide":
if (TabPermissionController.CanManagePage(objTab))
{
objTab.IsVisible = false;
tabController.UpdateTab(objTab);
BindTreeAndShowTab(objTab.TabID);
ShowSuccessMessage(string.Format(Localization.GetString("TabHidden", LocalResourceFile), objTab.TabName));
}
break;
case "show":
if (TabPermissionController.CanManagePage(objTab))
{
objTab.IsVisible = true;
tabController.UpdateTab(objTab);
BindTreeAndShowTab(objTab.TabID);
ShowSuccessMessage(string.Format(Localization.GetString("TabShown", LocalResourceFile), objTab.TabName));
}
break;
case "disable":
if (TabPermissionController.CanManagePage(objTab))
{
objTab.DisableLink = true;
tabController.UpdateTab(objTab);
BindTreeAndShowTab(objTab.TabID);
ShowSuccessMessage(string.Format(Localization.GetString("TabDisabled", LocalResourceFile), objTab.TabName));
}
//.........这里部分代码省略.........
示例3: UpdatePortal
//.........这里部分代码省略.........
PortalGroupID = existingPortal.PortalGroupID,
PortalName = txtPortalName.Text,
LogoFile = logo,
FooterText = txtFooterText.Text,
ExpiryDate = expiryDate,
UserRegistration = optUserRegistration.SelectedIndex,
BannerAdvertising = optBanners.SelectedIndex,
Currency = currencyCombo.SelectedItem.Value,
AdministratorId = Convert.ToInt32(cboAdministratorId.SelectedItem.Value),
HostFee = hostFee,
HostSpace = hostSpace,
PageQuota = pageQuota,
UserQuota = userQuota,
PaymentProcessor =
String.IsNullOrEmpty(processorCombo.SelectedValue)
? ""
: processorCombo.SelectedItem.Text,
ProcessorUserId = txtUserId.Text,
ProcessorPassword = txtPassword.Text,
Description = txtDescription.Text,
KeyWords = txtKeyWords.Text,
BackgroundFile = background,
SiteLogHistory = siteLogHistory,
SplashTabId = intSplashTabId,
HomeTabId = intHomeTabId,
LoginTabId = intLoginTabId,
RegisterTabId = intRegisterTabId,
UserTabId = intUserTabId,
SearchTabId = intSearchTabId,
DefaultLanguage = existingPortal.DefaultLanguage,
HomeDirectory = lblHomeDirectory.Text,
CultureCode = SelectedCultureCode
};
portalController.UpdatePortalInfo(portal);
if (!refreshPage)
{
refreshPage = (PortalSettings.DefaultAdminSkin == editSkinCombo.SelectedValue) ||
(PortalSettings.DefaultAdminContainer == editContainerCombo.SelectedValue);
}
PortalController.UpdatePortalSetting(_portalId, ClientResourceSettings.OverrideDefaultSettingsKey, chkOverrideDefaultSettings.Checked.ToString(CultureInfo.InvariantCulture), false);
PortalController.UpdatePortalSetting(_portalId, ClientResourceSettings.EnableCompositeFilesKey, chkEnableCompositeFiles.Checked.ToString(CultureInfo.InvariantCulture), false);
PortalController.UpdatePortalSetting(_portalId, ClientResourceSettings.MinifyCssKey, chkMinifyCss.Checked.ToString(CultureInfo.InvariantCulture), false);
PortalController.UpdatePortalSetting(_portalId, ClientResourceSettings.MinifyJsKey, chkMinifyJs.Checked.ToString(CultureInfo.InvariantCulture), false);
PortalController.UpdatePortalSetting(_portalId, "EnableSkinWidgets", chkSkinWidgestEnabled.Checked.ToString(), false);
PortalController.UpdatePortalSetting(_portalId, "DefaultAdminSkin", editSkinCombo.SelectedValue, false);
PortalController.UpdatePortalSetting(_portalId, "DefaultPortalSkin", portalSkinCombo.SelectedValue, false);
PortalController.UpdatePortalSetting(_portalId, "DefaultAdminContainer", editContainerCombo.SelectedValue, false);
PortalController.UpdatePortalSetting(_portalId, "DefaultPortalContainer", portalContainerCombo.SelectedValue, false);
PortalController.UpdatePortalSetting(_portalId, "EnablePopups", enablePopUpsCheckBox.Checked.ToString(), false);
PortalController.UpdatePortalSetting(_portalId, "InlineEditorEnabled", chkInlineEditor.Checked.ToString(), false);
PortalController.UpdatePortalSetting(_portalId, "HideFoldersEnabled", chkHideSystemFolders.Checked.ToString(), false);
PortalController.UpdatePortalSetting(_portalId, "ControlPanelMode", optControlPanelMode.SelectedItem.Value, false);
PortalController.UpdatePortalSetting(_portalId, "ControlPanelVisibility", optControlPanelVisibility.SelectedItem.Value, false);
PortalController.UpdatePortalSetting(_portalId, "ControlPanelSecurity", optControlPanelSecurity.SelectedItem.Value, false);
PortalController.UpdatePortalSetting(_portalId, "MessagingThrottlingInterval", cboMsgThrottlingInterval.SelectedItem.Value, false);
PortalController.UpdatePortalSetting(_portalId, "MessagingRecipientLimit", cboMsgRecipientLimit.SelectedItem.Value, false);
PortalController.UpdatePortalSetting(_portalId, "MessagingAllowAttachments", optMsgAllowAttachments.SelectedItem.Value, false);
PortalController.UpdatePortalSetting(_portalId, "MessagingProfanityFilters", optMsgProfanityFilters.SelectedItem.Value, false);
PortalController.UpdatePortalSetting(_portalId, "MessagingSendEmail", optMsgSendEmail.SelectedItem.Value, false);
PortalController.UpdatePortalSetting(_portalId, "paypalsandbox", chkPayPalSandboxEnabled.Checked.ToString(), false);
PortalController.UpdatePortalSetting(_portalId, "paypalsubscriptionreturn", txtPayPalReturnURL.Text, false);
示例4: UpgradeToVersion540
private static void UpgradeToVersion540()
{
var configDoc = Config.Load();
var configNavigator = configDoc.CreateNavigator().SelectSingleNode("/configuration/system.web.extensions");
if (configNavigator == null)
{
//attempt to remove "System.Web.Extensions" configuration section
string upgradeFile = string.Format("{0}\\Config\\SystemWebExtensions.config", Globals.InstallMapPath);
string message = UpdateConfig(upgradeFile, DotNetNukeContext.Current.Application.Version, "Remove System.Web.Extensions");
var eventLogController = new EventLogController();
eventLogController.AddLog("UpgradeConfig",
string.IsNullOrEmpty(message)
? "Remove System Web Extensions"
: string.Format("Remove System Web Extensions failed. Error reported during attempt to update:{0}", message),
PortalController.GetCurrentPortalSettings(),
UserController.GetCurrentUserInfo().UserID,
EventLogController.EventLogType.HOST_ALERT);
}
//Add Styles Skin Object
AddSkinControl("TAGS", "DotNetNuke.TagsSkinObject", "Admin/Skins/Tags.ascx");
//Add Content List module definition
int moduleDefId = AddModuleDefinition("ContentList", "This module displays a list of content by tag.", "Content List");
AddModuleControl(moduleDefId, "", "", "DesktopModules/Admin/ContentList/ContentList.ascx", "", SecurityAccessLevel.View, 0);
//Update registration page
var portalController = new PortalController();
ArrayList portals = portalController.GetPortals();
foreach (PortalInfo portal in portals)
{
//objPortal.RegisterTabId = objPortal.UserTabId;
portalController.UpdatePortalInfo(portal);
//Add ContentList to Search Results Page
var tabController = new TabController();
int tabId = TabController.GetTabByTabPath(portal.PortalID, "//SearchResults", Null.NullString);
TabInfo searchPage = tabController.GetTab(tabId, portal.PortalID, false);
AddModuleToPage(searchPage, moduleDefId, "Results", "");
}
}
示例5: UpgradeToVersion530
private static void UpgradeToVersion530()
{
//update languages module
int moduleDefId = GetModuleDefinition("Languages", "Languages");
RemoveModuleControl(moduleDefId, "");
AddModuleControl(moduleDefId, "", "", "DesktopModules/Admin/Languages/languageEnabler.ascx", "~/images/icon_language_32px.gif", SecurityAccessLevel.View, 0, "", true);
AddModuleControl(moduleDefId, "Editor", "", "DesktopModules/Admin/Languages/languageeditor.ascx", "~/images/icon_language_32px.gif", SecurityAccessLevel.View, 0);
//Add new View Profile module
moduleDefId = AddModuleDefinition("ViewProfile", "", "ViewProfile", false, false);
AddModuleControl(moduleDefId, "", "", "DesktopModules/Admin/ViewProfile/ViewProfile.ascx", "~/images/icon_profile_32px.gif", SecurityAccessLevel.View, 0);
AddModuleControl(moduleDefId, "Settings", "Settings", "DesktopModules/Admin/ViewProfile/Settings.ascx", "~/images/icon_profile_32px.gif", SecurityAccessLevel.Edit, 0);
//Add new Sitemap settings module
moduleDefId = AddModuleDefinition("Sitemap", "", "Sitemap", false, false);
AddModuleControl(moduleDefId, "", "", "DesktopModules/Admin/Sitemap/SitemapSettings.ascx", "~/images/icon_analytics_32px.gif", SecurityAccessLevel.View, 0);
AddAdminPages("Search Engine Sitemap", "Configure the sitemap for submission to common search engines.", "~/images/icon_analytics_16px.gif", "~/images/icon_analytics_32px.gif", true, moduleDefId, "Search Engine Sitemap", "~/images/icon_analytics_32px.gif");
//Add new Photo Profile field to Host
var listController = new ListController();
Dictionary<string, ListEntryInfo> dataTypes = listController.GetListEntryInfoDictionary("DataType");
var properties = ProfileController.GetPropertyDefinitionsByPortal(Null.NullInteger);
ProfileController.AddDefaultDefinition(Null.NullInteger, "Preferences", "Photo", "Image", 0, properties.Count*2 + 2, UserVisibilityMode.AllUsers, dataTypes);
string installTemplateFile = string.Format("{0}Template\\UserProfile.page.template", Globals.InstallMapPath);
string hostTemplateFile = string.Format("{0}Templates\\UserProfile.page.template", Globals.HostMapPath);
if (File.Exists(installTemplateFile))
{
if (!File.Exists(hostTemplateFile))
{
File.Copy(installTemplateFile, hostTemplateFile);
}
}
if (File.Exists(hostTemplateFile))
{
var tabController = new TabController();
var portalController = new PortalController();
ArrayList portals = portalController.GetPortals();
foreach (PortalInfo portal in portals)
{
properties = ProfileController.GetPropertyDefinitionsByPortal(portal.PortalID);
//Add new Photo Profile field to Portal
ProfileController.AddDefaultDefinition(portal.PortalID, "Preferences", "Photo", "Image", 0, properties.Count*2 + 2, UserVisibilityMode.AllUsers, dataTypes);
//Rename old Default Page template
string defaultPageTemplatePath = string.Format("{0}Templates\\Default.page.template", portal.HomeDirectoryMapPath);
if (File.Exists(defaultPageTemplatePath))
{
File.Move(defaultPageTemplatePath, String.Format("{0}Templates\\Default_old.page.template", portal.HomeDirectoryMapPath));
}
//Update Default profile template in every portal
portalController.CopyPageTemplate("Default.page.template", portal.HomeDirectoryMapPath);
//Add User profile template to every portal
portalController.CopyPageTemplate("UserProfile.page.template", portal.HomeDirectoryMapPath);
//Synchronize the Templates folder to ensure the templates are accessible
FolderManager.Instance.Synchronize(portal.PortalID, "Templates/", false, true);
var xmlDoc = new XmlDocument();
try
{
// open the XML file
xmlDoc.Load(hostTemplateFile);
}
catch (Exception ex)
{
Exceptions.Exceptions.LogException(ex);
}
XmlNode userTabNode = xmlDoc.SelectSingleNode("//portal/tabs/tab");
if (userTabNode != null)
{
string tabName = XmlUtils.GetNodeValue(userTabNode.CreateNavigator(), "name");
var userTab = tabController.GetTabByName(tabName, portal.PortalID) ?? TabController.DeserializeTab(userTabNode, null, portal.PortalID, PortalTemplateModuleAction.Merge);
//Update SiteSettings to point to the new page
if (portal.UserTabId > Null.NullInteger)
{
portal.RegisterTabId = portal.UserTabId;
}
else
{
portal.UserTabId = userTab.TabID;
}
}
portalController.UpdatePortalInfo(portal);
//Add Users folder to every portal
string usersFolder = string.Format("{0}Users\\", portal.HomeDirectoryMapPath);
if (!Directory.Exists(usersFolder))
{
//Create Users folder
Directory.CreateDirectory(usersFolder);
//.........这里部分代码省略.........
示例6: updateButton_Click
protected void updateButton_Click(object sender, EventArgs e)
{
Locale language = null;
PortalController.UpdatePortalSetting(ModuleContext.PortalId, "EnableBrowserLanguage", chkBrowser.Checked.ToString());
// first check whether or not portal default language has changed
string newDefaultLanguage = languagesComboBox.SelectedValue;
if (newDefaultLanguage != PortalSettings.DefaultLanguage)
{
if (!IsLanguageEnabled(newDefaultLanguage))
{
language = LocaleController.Instance.GetLocale(newDefaultLanguage);
Localization.AddLanguageToPortal(ModuleContext.PortalId, language.LanguageId, true);
}
// update portal default language
var objPortalController = new PortalController();
PortalInfo objPortal = objPortalController.GetPortal(PortalId);
objPortal.DefaultLanguage = newDefaultLanguage;
objPortalController.UpdatePortalInfo(objPortal);
_PortalDefault = newDefaultLanguage;
}
BindDefaultLanguageSelector();
BindGrid();
}
示例7: UpdatePortal
//.........这里部分代码省略.........
}
if (dblHostSpace != objPortal.HostSpace)
{
hostChanged = true;
}
if (intPageQuota != objPortal.PageQuota)
{
hostChanged = true;
}
if (intUserQuota != objPortal.UserQuota)
{
hostChanged = true;
}
if (intSiteLogHistory != objPortal.SiteLogHistory)
{
hostChanged = true;
}
if (datExpiryDate != objPortal.ExpiryDate)
{
hostChanged = true;
}
if (hostChanged)
{
throw new Exception();
}
}
objPortalController.UpdatePortalInfo(_portalId,
txtPortalName.Text,
strLogo,
txtFooterText.Text,
datExpiryDate,
optUserRegistration.SelectedIndex,
optBanners.SelectedIndex,
currencyCombo.SelectedItem.Value,
Convert.ToInt32(cboAdministratorId.SelectedItem.Value),
dblHostFee,
dblHostSpace,
intPageQuota,
(int) intUserQuota,
String.IsNullOrEmpty(processorCombo.SelectedValue) ? "" : processorCombo.SelectedItem.Text,
txtUserId.Text,
txtPassword.Text,
txtDescription.Text,
txtKeyWords.Text,
strBackground,
intSiteLogHistory,
intSplashTabId,
intHomeTabId,
intLoginTabId,
intRegisterTabId,
intUserTabId,
intSearchTabId,
objPortal.DefaultLanguage,
lblHomeDirectory.Text,
SelectedCultureCode);
if (!refreshPage)
{
refreshPage = (PortalSettings.DefaultAdminSkin == editSkinCombo.SelectedValue) ||
(PortalSettings.DefaultAdminContainer == editContainerCombo.SelectedValue);
示例8: Wizard_FinishButtonClick
/// <summary>
/// Wizard_FinishButtonClick runs when the Finish Button on the Wizard is clicked.
/// </summary>
/// <history>
/// [cnurse] 10/12/2004 created
/// </history>
protected void Wizard_FinishButtonClick(object sender, WizardNavigationEventArgs e)
{
PortalController objPortalController = new PortalController();
// use Portal Template to update portal content pages
if (lstTemplate.SelectedIndex != -1)
{
string strTemplateFile = lstTemplate.SelectedItem.Text + ".template";
// process zip resource file if present
objPortalController.ProcessResourceFile(PortalSettings.HomeDirectoryMapPath, Globals.HostMapPath + strTemplateFile);
//Process Template
switch (optMerge.SelectedValue)
{
case "Ignore":
objPortalController.ParseTemplate(PortalId, Globals.HostMapPath, strTemplateFile, PortalSettings.AdministratorId, PortalTemplateModuleAction.Ignore, false);
break;
case "Replace":
objPortalController.ParseTemplate(PortalId, Globals.HostMapPath, strTemplateFile, PortalSettings.AdministratorId, PortalTemplateModuleAction.Replace, false);
break;
case "Merge":
objPortalController.ParseTemplate(PortalId, Globals.HostMapPath, strTemplateFile, PortalSettings.AdministratorId, PortalTemplateModuleAction.Merge, false);
break;
}
}
// update Portal info in the database
PortalInfo objPortal = objPortalController.GetPortal(PortalId);
objPortal.Description = txtDescription.Text;
objPortal.KeyWords = txtKeyWords.Text;
objPortal.PortalName = txtPortalName.Text;
objPortal.LogoFile = urlLogo.Url;
objPortalController.UpdatePortalInfo(objPortal);
//Set Portal Skin
SkinController.SetSkin(SkinInfo.RootSkin, PortalId, SkinType.Portal, ctlPortalSkin.SkinSrc);
SkinController.SetSkin(SkinInfo.RootSkin, PortalId, SkinType.Admin, ctlPortalSkin.SkinSrc);
//Set Portal Container
SkinController.SetSkin(SkinInfo.RootContainer, PortalId, SkinType.Portal, ctlPortalContainer.SkinSrc);
SkinController.SetSkin(SkinInfo.RootContainer, PortalId, SkinType.Admin, ctlPortalContainer.SkinSrc);
}
示例9: updateButton_Click
protected void updateButton_Click(object sender, EventArgs e)
{
PortalController.UpdatePortalSetting(ModuleContext.PortalId, "EnableBrowserLanguage", chkBrowser.Checked.ToString());
PortalController.UpdatePortalSetting(ModuleContext.PortalId, "AllowUserUICulture", chkUserCulture.Checked.ToString());
// if contentlocalization is enabled, default language cannot be changed
if (!PortalSettings.ContentLocalizationEnabled)
{
// first check whether or not portal default language has changed
string newDefaultLanguage = languagesComboBox.SelectedValue;
if (newDefaultLanguage != PortalSettings.DefaultLanguage)
{
var needToRemoveOldDefaultLanguage = LocaleController.Instance.GetLocales(PortalId).Count == 1;
var OldDefaultLanguage = LocaleController.Instance.GetLocale(PortalDefault);
if (!IsLanguageEnabled(newDefaultLanguage))
{
var language = LocaleController.Instance.GetLocale(newDefaultLanguage);
Localization.AddLanguageToPortal(ModuleContext.PortalId, language.LanguageId, true);
}
// update portal default language
var objPortalController = new PortalController();
PortalInfo objPortal = objPortalController.GetPortal(PortalId);
objPortal.DefaultLanguage = newDefaultLanguage;
objPortalController.UpdatePortalInfo(objPortal);
_PortalDefault = newDefaultLanguage;
if (needToRemoveOldDefaultLanguage)
{
Localization.RemoveLanguageFromPortal(PortalId, OldDefaultLanguage.LanguageId);
}
}
PortalController.UpdatePortalSetting(ModuleContext.PortalId, "EnableUrlLanguage", chkUrl.Checked.ToString());
}
BindDefaultLanguageSelector();
BindGrid();
}
示例10: cmdUpdate_Click
//.........这里部分代码省略.........
}
int intSplashTabId = Null.NullInteger;
if( cboSplashTabId.SelectedItem != null )
{
intSplashTabId = int.Parse( cboSplashTabId.SelectedItem.Value );
}
int intHomeTabId = Null.NullInteger;
if( cboHomeTabId.SelectedItem != null )
{
intHomeTabId = int.Parse( cboHomeTabId.SelectedItem.Value );
}
int intLoginTabId = Null.NullInteger;
if( cboLoginTabId.SelectedItem != null )
{
intLoginTabId = int.Parse( cboLoginTabId.SelectedItem.Value );
}
int intUserTabId = Null.NullInteger;
if( cboUserTabId.SelectedItem != null )
{
intUserTabId = int.Parse( cboUserTabId.SelectedItem.Value );
}
if( txtPassword.Attributes["value"] != null )
{
txtPassword.Attributes["value"] = txtPassword.Text;
}
// update Portal info in the database
PortalController objPortalController = new PortalController();
//check only relevant fields altered
if( ! UserInfo.IsSuperUser )
{
PortalInfo objPortal = objPortalController.GetPortal( intPortalId );
bool HostChanged = false;
if( dblHostFee != objPortal.HostFee )
{
HostChanged = true;
}
if( dblHostSpace != objPortal.HostSpace )
{
HostChanged = true;
}
if( intPageQuota != objPortal.PageQuota )
{
HostChanged = true;
}
if( intUserQuota != objPortal.UserQuota )
{
HostChanged = true;
}
if( intSiteLogHistory != objPortal.SiteLogHistory )
{
HostChanged = true;
}
if( datExpiryDate != objPortal.ExpiryDate )
{
HostChanged = true;
}
if( HostChanged )
{
throw new Exception();
}
}
objPortalController.UpdatePortalInfo( intPortalId, txtPortalName.Text, strLogo, txtFooterText.Text, datExpiryDate, optUserRegistration.SelectedIndex, optBannerAdvertising.SelectedIndex, cboCurrency.SelectedItem.Value, Convert.ToInt32( cboAdministratorId.SelectedItem.Value ), dblHostFee, dblHostSpace, intPageQuota, (int)intUserQuota, ( ( cboProcessor.SelectedValue == "" ) ? "" : cboProcessor.SelectedItem.Text ).ToString(), txtUserId.Text, txtPassword.Text, txtDescription.Text, txtKeyWords.Text, strBackground, intSiteLogHistory, intSplashTabId, intHomeTabId, intLoginTabId, intUserTabId, cboDefaultLanguage.SelectedValue, Convert.ToInt32( cboTimeZone.SelectedValue ), txtHomeDirectory.Text );
bool blnAdminSkinChanged = SkinChanged( SkinInfo.RootSkin, PortalId, SkinType.Admin, ctlAdminSkin.SkinSrc ) || SkinChanged( SkinInfo.RootContainer, PortalId, SkinType.Admin, ctlAdminContainer.SkinSrc );
//Dim objSkins As New UI.Skins.SkinController
SkinController.SetSkin( SkinInfo.RootSkin, PortalId, SkinType.Portal, ctlPortalSkin.SkinSrc );
SkinController.SetSkin( SkinInfo.RootContainer, PortalId, SkinType.Portal, ctlPortalContainer.SkinSrc );
SkinController.SetSkin( SkinInfo.RootSkin, PortalId, SkinType.Admin, ctlAdminSkin.SkinSrc );
SkinController.SetSkin( SkinInfo.RootContainer, PortalId, SkinType.Admin, ctlAdminContainer.SkinSrc );
if( UserInfo.IsSuperUser )
{
// delete old portal module assignments
DesktopModuleController objDesktopModules = new DesktopModuleController();
objDesktopModules.DeletePortalDesktopModules( intPortalId, Null.NullInteger );
// add new portal module assignments
foreach( ListItem objListItem in ctlDesktopModules.Assigned )
{
objDesktopModules.AddPortalDesktopModule( intPortalId, int.Parse( objListItem.Value ) );
}
}
// Redirect to this site to refresh only if admin skin changed
if( blnAdminSkinChanged )
{
Response.Redirect( Request.RawUrl, true );
}
}
catch( Exception exc ) //Module failed to load
{
Exceptions.ProcessModuleLoadException( this, exc );
}
}