Attached Files |
system_config_editor_core.patch [^] (40,410 bytes) 2012-07-23 12:04
[Show Content]
Index: admin_templates/config/config_edit.tpl
===================================================================
--- admin_templates/config/config_edit.tpl (revision 0)
+++ admin_templates/config/config_edit.tpl (revision 0)
@@ -0,0 +1,100 @@
+<inp2:adm_SetPopupSize width="650" height="790"/>
+
+<inp2:m_include t="incs/header"/>
+<inp2:m_Get name="section" result_to_var="section"/>
+<inp2:m_RenderElement name="combined_header" prefix="conf" section="$section" title_preset="config_edit"/>
+
+<!-- ToolBar -->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+ <tr>
+ <td>
+ <script type="text/javascript">
+ a_toolbar = new ToolBar();
+ a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
+ submit_event('conf', '<inp2:conf_SaveEvent/>');
+ }
+ ) );
+ a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
+ cancel_edit('conf', 'OnCancelEdit','<inp2:conf_SaveEvent/>','<inp2:m_Phrase label="la_FormCancelConfirmation" escape="1"/>');
+ }
+ ) );
+
+ a_toolbar.AddButton( new ToolBarButton('reset_edit', '<inp2:m_phrase label="la_ToolTip_Reset" escape="1"/>', function() {
+ reset_form('conf', 'OnReset', '<inp2:m_Phrase label="la_FormResetConfirmation" escape="1"/>');
+ }
+ ) );
+
+ a_toolbar.AddButton( new ToolBarSeparator('sep1') );
+
+ a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>', function() {
+ go_to_id('conf', '<inp2:conf_PrevId/>');
+ }
+ ) );
+ a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
+ go_to_id('conf', '<inp2:conf_NextId/>');
+ }
+ ) );
+
+ a_toolbar.Render();
+
+ <inp2:m_if check="conf_IsSingle" >
+ a_toolbar.HideButton('prev');
+ a_toolbar.HideButton('next');
+ a_toolbar.HideButton('sep1');
+ <inp2:m_else/>
+ <inp2:m_if check="conf_IsLast" >
+ a_toolbar.DisableButton('next');
+ </inp2:m_if>
+ <inp2:m_if check="conf_IsFirst" >
+ a_toolbar.DisableButton('prev');
+ </inp2:m_if>
+ </inp2:m_if>
+ </script>
+ </td>
+ </tr>
+</tbody>
+</table>
+
+<inp2:conf_SaveWarning name="grid_save_warning"/>
+<inp2:conf_ErrorWarning name="form_error_warning"/>
+
+<div id="scroll_container">
+ <table class="edit-form">
+ <inp2:m_RenderElement name="inp_id_label" prefix="conf" field="VariableId" title="la_fld_Id"/>
+ <inp2:m_RenderElement name="inp_edit_box" prefix="conf" field="VariableName" title="la_fld_SystemSettingName"/>
+ <inp2:m_RenderElement name="inp_label" prefix="conf" field="VariableValue" title="la_fld_SystemSettingValue"/>
+ <inp2:m_RenderElement name="inp_edit_options" prefix="conf" field="ModuleOwner" title="la_fld_Module" has_empty="1"/>
+ <inp2:m_RenderElement name="inp_edit_box" prefix="conf" field="Section" title="la_fld_SystemSettingSection"/>
+ <inp2:m_RenderElement name="inp_edit_box" prefix="conf" field="Heading" title="la_prompt_heading"/>
+ <inp2:m_RenderElement name="inp_edit_box" prefix="conf" field="Prompt" title="la_prompt_FieldPrompt"/>
+ <inp2:m_RenderElement name="inp_edit_box" prefix="conf" field="HintLabel" title="la_fld_SystemSettingHint"/>
+ <inp2:m_RenderElement name="inp_edit_options" prefix="conf" field="ElementType" title="la_prompt_InputType" has_empty="1"/>
+ <inp2:m_RenderElement name="inp_edit_textarea" prefix="conf" field="Validation" title="la_fld_SystemSettingValidation" allow_html="0"/>
+ <inp2:m_RenderElement name="inp_edit_textarea" prefix="conf" field="ValueList" title="la_prompt_valuelist" allow_html="0"/>
+ <inp2:m_RenderElement name="inp_edit_box" prefix="conf" field="DisplayOrder" title="la_field_displayorder"/>
+ <inp2:m_RenderElement name="inp_edit_box" prefix="conf" field="GroupDisplayOrder"/>
+ <inp2:m_RenderElement name="inp_edit_filler"/>
+ </table>
+</div>
+
+<script type="text/javascript">
+ $(document).ready(function () {
+ var $field_mask = '<inp2:conf_InputName name="#FIELD_NAME#" js_escape="1"/>',
+ $suggest_url = '<inp2:m_Link template="dummy" pass="m,conf" conf_event="OnSuggestValues" field="#FIELD_NAME#" cur_value="#CUR_VALUE#" no_amp="1"/>';
+
+ new AJAXDropDown($field_mask.replace('#FIELD_NAME#', 'Section'), function(cur_value) {
+ return $suggest_url.replace('#FIELD_NAME#', 'Section').replace('#CUR_VALUE#', encodeURIComponent(cur_value));
+ }, function(item) {
+ return item.getAttribute('value');
+ });
+
+ new AJAXDropDown($field_mask.replace('#FIELD_NAME#', 'Heading'), function(cur_value) {
+ return $suggest_url.replace('#FIELD_NAME#', 'Heading').replace('#CUR_VALUE#', encodeURIComponent(cur_value));
+ }, function(item) {
+ return item.getAttribute('value');
+ });
+ });
+</script>
+
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: admin_templates\config\config_edit.tpl
___________________________________________________________________
Added: svn:eol-style
+ LF
Index: admin_templates/config/config_general.tpl
===================================================================
--- admin_templates/config/config_general.tpl (revision 15437)
+++ admin_templates/config/config_general.tpl (working copy)
@@ -86,6 +86,20 @@
)
);
+ <inp2:m_if check="m_IsDebugMode">
+ a_toolbar.AddButton( new ToolBarSeparator('sep1') );
+
+ a_toolbar.AddButton(
+ new ToolBarButton(
+ 'new_item',
+ '<inp2:m_phrase label="la_ToolTip_NewSystemSetting" escape="1"/>::<inp2:m_phrase label="la_ToolTip_Add" escape="1"/>',
+ function() {
+ std_precreate_item('conf', 'config/config_edit');
+ }
+ )
+ );
+ </inp2:m_if>
+
<inp2:m_ModuleInclude template = "config/custom_toolbar"/>
a_toolbar.Render();
Index: admin_templates/config/config_universal.tpl
===================================================================
--- admin_templates/config/config_universal.tpl (revision 15437)
+++ admin_templates/config/config_universal.tpl (working copy)
@@ -87,6 +87,20 @@
)
);
+ <inp2:m_if check="m_IsDebugMode">
+ a_toolbar.AddButton( new ToolBarSeparator('sep1') );
+
+ a_toolbar.AddButton(
+ new ToolBarButton(
+ 'new_item',
+ '<inp2:m_phrase label="la_ToolTip_NewSystemSetting" escape="1"/>::<inp2:m_phrase label="la_ToolTip_Add" escape="1"/>',
+ function() {
+ std_precreate_item('conf', 'config/config_edit');
+ }
+ )
+ );
+ </inp2:m_if>
+
<inp2:m_ModuleInclude template = "config/custom_toolbar"/>
a_toolbar.Render();
Index: admin_templates/incs/config_blocks.tpl
===================================================================
--- admin_templates/incs/config_blocks.tpl (revision 15437)
+++ admin_templates/incs/config_blocks.tpl (working copy)
@@ -61,10 +61,10 @@
<td style="width: 500px;">
<inp2:Field name="VariableName" result_to_var="error_field"/>
<span class="<inp2:m_if check='HasError' field='$error_field' id_field='VariableName'>error-cell</inp2:m_if>">
- <inp2:Field field="Prompt" as_label="1" /></span><inp2:m_if check="IsRequired"><span class="field-required"> *</span></inp2:m_if>:<inp2:m_if check="Field" name="HintLabel"><span> <img src="<inp2:m_TemplatesBase/>/img/hint_icon.png" width="12" height="13" title="<inp2:Field name='HintLabel' as_label='1' html_escape='1'/>" alt="<inp2:Field name='HintLabel' as_label='1' html_escape='1'/>"/></inp2:m_if>
+ <inp2:Field field="Prompt" as_label="1" /></span><inp2:m_if check="IsRequired" field="VariableValue"><span class="field-required"> *</span></inp2:m_if>:<inp2:m_if check="Field" name="HintLabel"><span> <img src="<inp2:m_TemplatesBase/>/img/hint_icon.png" width="12" height="13" title="<inp2:Field name='HintLabel' as_label='1' html_escape='1'/>" alt="<inp2:Field name='HintLabel' as_label='1' html_escape='1'/>"/></inp2:m_if>
<inp2:m_if check="m_IsDebugMode">
- <br/><small style="color: gray;">[<inp2:Field field="DisplayOrder"/>] <inp2:Field field="VariableName"/></small>
+ <br/><small style="color: gray;">[<inp2:Field field="DisplayOrder"/>] <inp2:Field field="VariableName"/> [<a href="<inp2:ItemEditLink template='config/config_edit'/>" onclick="return direct_edit('<inp2:m_param name="PrefixSpecial"/>', this.href);"><inp2:m_Phrase name="la_btn_Edit"/></a>]</small>
</inp2:m_if>
</td>
</inp2:m_DefineElement>
Index: install/english.lang
===================================================================
--- install/english.lang (revision 15445)
+++ install/english.lang (working copy)
@@ -283,6 +283,7 @@
<PHRASE Label="la_error_TemporaryTableCopyingFailed" Module="Core" Type="1">Q29weWluZyBvcGVyYXRpb24gaW4gVGVtcG9yYXJ5IHRhYmxlcyBoYXMgZmFpbGVkLiBQbGVhc2UgY29udGFjdCB3ZWJzaXRlIGFkbWluaXN0cmF0b3Iu</PHRASE>
<PHRASE Label="la_error_unique" Module="Core" Type="1">UmVjb3JkIGlzIG5vdCB1bmlxdWU=</PHRASE>
<PHRASE Label="la_error_unique_category_field" Module="Core" Type="1">U2VjdGlvbiBmaWVsZCBub3QgdW5pcXVl</PHRASE>
+ <PHRASE Label="la_error_UnknownSection" Module="Core" Type="1">VW5rbm93biBzZWN0aW9u</PHRASE>
<PHRASE Label="la_error_unknown_category" Module="Core" Type="1">VW5rbm93biBzZWN0aW9u</PHRASE>
<PHRASE Label="la_error_UserBanned" Module="Core" Type="1">VXNlciBCYW5uZWQ=</PHRASE>
<PHRASE Label="LA_ERROR_USERNOTFOUND" Module="Core" Type="1">dXNlciBub3QgZm91bmQ=</PHRASE>
@@ -456,6 +457,7 @@
<PHRASE Label="la_fld_FrontRegistration" Module="Core" Type="1" Column="QWxsb3cgUmVnaXN0cmF0aW9u">QWxsb3cgUmVnaXN0cmF0aW9uIG9uIEZyb250LWVuZA==</PHRASE>
<PHRASE Label="la_fld_FullName" Module="Core" Type="1" Column="RnVsbCBOYW1l">RnVsbCBOYW1l</PHRASE>
<PHRASE Label="la_fld_Group" Module="Core" Type="1" Column="R3JvdXA=">VXNlciBHcm91cA==</PHRASE>
+ <PHRASE Label="la_fld_GroupDisplayOrder" Module="Core" Type="1" Hint="T3JkZXIgdG8gdXNlLCB3aGVuIHNvcnRpbmcgMiByZWNvcmRzIHdpdGggc2FtZSAiRGlzcGxheSBPcmRlciIu">R3JvdXAgRGlzcGxheSBPcmRlcg==</PHRASE>
<PHRASE Label="la_fld_GroupId" Module="Core" Type="1">SUQ=</PHRASE>
<PHRASE Label="la_fld_GroupName" Module="Core" Type="1" Column="R3JvdXAgTmFtZQ==">R3JvdXAgTmFtZQ==</PHRASE>
<PHRASE Label="la_fld_Height" Module="Core" Type="1">SGVpZ2h0</PHRASE>
@@ -648,6 +650,11 @@
<PHRASE Label="la_fld_SymLinkCategoryId" Module="Core" Type="1">UG9pbnRzIHRvIFNlY3Rpb24=</PHRASE>
<PHRASE Label="la_fld_SynchronizationModes" Module="Core" Type="1" Hint="IlRvIG90aGVycyIgLSBhbGxvdyB0cmFuc2xhdGVkIHBocmFzZXMgZnJvbSB0aGlzIGxhbmd1YWdlIHRvIGJlIHVzZWQgaW5zdGVhZCBvZiBtaXNzaW5nIHBocmFzZXMgb24gb3RoZXIgbGFuZ3VhZ2VzLiAiRnJvbSBvdGhlcnMiIC0gdXNlIHRyYW5zbGF0ZWQgcGhyYXNlcyBmcm9tIG90aGVyIGxhbmd1YWdlcyBpbnN0ZWFkIG9mIG1pc3NpbmcgcGhyYXNlcyBvbiB0aGlzIGxhbmd1YWdlLg==" Column="U3luY2hyb25pemUgTGFuZ3VhZ2U=">U3luY2hyb25pemUgTGFuZ3VhZ2U=</PHRASE>
<PHRASE Label="la_fld_SystemEvent" Module="Core" Type="1" Column="U3lzdGVtIEV2ZW50">U3lzdGVtIEV2ZW50</PHRASE>
+ <PHRASE Label="la_fld_SystemSettingHint" Module="Core" Type="1" Hint="UGxhY2luZyAiaGludDpsYV9jb25maWdfVmFyaWFibGVOYW1lIiB2YWx1ZSB3b3VsZCB1c3VhbGx5IGRvIHRoZSB0cmljay4=">U2V0dGluZyBIaW50IExhYmVs</PHRASE>
+ <PHRASE Label="la_fld_SystemSettingName" Module="Core" Type="1">U2V0dGluZyBOYW1l</PHRASE>
+ <PHRASE Label="la_fld_SystemSettingSection" Module="Core" Type="1" Hint="U2VjdGlvbiwgd2hlcmUgdGhpcyBzeXN0ZW0gc2V0dGluZyB3aWxsIGJlIGRpc3BsYXllZC4=">U2VjdGlvbg==</PHRASE>
+ <PHRASE Label="la_fld_SystemSettingValidation" Module="Core" Type="1" Hint="U2VyaWFsaXplZCBhcnJheSBvZiB2YWxpZGF0aW9uIG9wdGlvbnMgc3VjaCBhcyAicmVxdWlyZWQiLCAiZm9ybWF0dGVyIiwgZXRjLg==">VmFsaWRhdGlvbiBMb2dpYw==</PHRASE>
+ <PHRASE Label="la_fld_SystemSettingValue" Module="Core" Type="1">U2V0dGluZyBWYWx1ZQ==</PHRASE>
<PHRASE Label="la_fld_TableName" Module="Core" Type="1">VGFibGUgTmFtZSBpbiBEYXRhYmFzZSA=</PHRASE>
<PHRASE Label="la_fld_Tag" Module="Core" Type="1">VGFn</PHRASE>
<PHRASE Label="la_fld_TargetId" Module="Core" Type="1" Column="SXRlbQ==">SXRlbQ==</PHRASE>
@@ -1339,6 +1346,7 @@
<PHRASE Label="la_title_AddingSpellingDictionary" Module="Core" Type="1">QWRkaW5nIFNwZWxsaW5nIERpY3Rpb25hcnk=</PHRASE>
<PHRASE Label="la_title_AddingStopWord" Module="Core" Type="1">QWRkaW5nIFN0b3AgV29yZA==</PHRASE>
<PHRASE Label="la_title_AddingSystemEventSubscription" Module="Core" Type="1">QWRkaW5nIFN5c3RlbSBFdmVudCBTdWJzY3JpcHRpb24=</PHRASE>
+ <PHRASE Label="la_title_AddingSystemSetting" Module="Core" Type="1">QWRkaW5nIFN5c3RlbSBTZXR0aW5n</PHRASE>
<PHRASE Label="la_title_AddingThemeFile" Module="Core" Type="1">QWRkaW5nIFRoZW1lIFRlbXBsYXRl</PHRASE>
<PHRASE Label="la_title_AddingThesaurus" Module="Core" Type="1">QWRkaW5nIFRoZXNhdXJ1cw==</PHRASE>
<PHRASE Label="la_title_Adding_BaseStyle" Module="Core" Type="1">QWRkaW5nIEJhc2UgU3R5bGU=</PHRASE>
@@ -1395,6 +1403,7 @@
<PHRASE Label="la_title_EditingStopWord" Module="Core" Type="1">RWRpdGluZyBTdG9wIFdvcmQ=</PHRASE>
<PHRASE Label="la_title_EditingStyle" Module="Core" Type="1">RWRpdGluZyBTdHlsZQ==</PHRASE>
<PHRASE Label="la_title_EditingSystemEventSubscription" Module="Core" Type="1">RWRpdGluZyBTeXN0ZW0gRXZlbnQgU3Vic2NyaXB0aW9u</PHRASE>
+ <PHRASE Label="la_title_EditingSystemSetting" Module="Core" Type="1">RWRpdGluZyBTeXN0ZW0gU2V0dGluZw==</PHRASE>
<PHRASE Label="la_title_EditingThemeFile" Module="Core" Type="1">RWRpdGluZyBUaGVtZSBGaWxl</PHRASE>
<PHRASE Label="la_title_EditingThesaurus" Module="Core" Type="1">RWRpdGluZyBUaGVzYXVydXM=</PHRASE>
<PHRASE Label="la_title_EditingTranslation" Module="Core" Type="1">RWRpdGluZyBUcmFuc2xhdGlvbg==</PHRASE>
@@ -1559,6 +1568,7 @@
<PHRASE Label="la_ToolTip_NewSearchConfig" Module="Core" Type="1">TmV3IFNlYXJjaCBGaWVsZA==</PHRASE>
<PHRASE Label="la_ToolTip_NewSiteDomain" Module="Core" Type="1">TmV3IFNpdGUgRG9tYWlu</PHRASE>
<PHRASE Label="la_ToolTip_NewStopWord" Module="Core" Type="1">TmV3IFN0b3AgV29yZA==</PHRASE>
+ <PHRASE Label="la_ToolTip_NewSystemSetting" Module="Core" Type="1">TmV3IFN5c3RlbSBTZXR0aW5n</PHRASE>
<PHRASE Label="la_ToolTip_NewTerm" Module="Core" Type="1">TmV3IFRlcm0=</PHRASE>
<PHRASE Label="la_ToolTip_newtheme" Module="Core" Type="1">TmV3IFRoZW1l</PHRASE>
<PHRASE Label="la_ToolTip_NewUser" Module="Core" Type="1">TmV3IFVzZXI=</PHRASE>
Index: install/install_data.sql
===================================================================
--- install/install_data.sql (revision 15458)
+++ install/install_data.sql (working copy)
@@ -532,6 +532,7 @@
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:website_setting_folder.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:user_setting_folder.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configure_advanced.view', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configure_advanced.add', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configure_advanced.edit', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:user_list.view', 11, 1, 1, 0);
@@ -600,6 +601,7 @@
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:advanced_view.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:reviews.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configure_categories.view', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configure_categories.add', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configure_categories.edit', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configuration_search.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configuration_search.edit', 11, 1, 1, 0);
@@ -618,6 +620,7 @@
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:user_groups.advanced:send_email', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:user_groups.advanced:manage_permissions', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configure_users.view', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configure_users.add', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configure_users.edit', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:user_custom.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:user_custom.add', 11, 1, 1, 0);
@@ -643,6 +646,7 @@
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:spam_reports.delete', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configure_general.view', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configure_general.add', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configure_general.edit', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:modules.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:mod_status.view', 11, 1, 1, 0);
Index: install/upgrades.sql
===================================================================
--- install/upgrades.sql (revision 15461)
+++ install/upgrades.sql (working copy)
@@ -2793,3 +2793,8 @@
ALTER TABLE EmailQueue CHANGE LogData LogData LONGTEXT NULL DEFAULT NULL;
DELETE FROM UserPersistentSessionData WHERE VariableName = 'mailing-list[Default]columns_.';
+
+INSERT INTO Permissions VALUES(DEFAULT, 'in-portal:configure_general.add', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES(DEFAULT, 'in-portal:configure_advanced.add', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES(DEFAULT, 'in-portal:configure_categories.add', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES(DEFAULT, 'in-portal:configure_users.add', 11, 1, 1, 0);
Index: units/categories/categories_config.php
===================================================================
--- units/categories/categories_config.php (revision 15437)
+++ units/categories/categories_config.php (working copy)
@@ -225,7 +225,7 @@
'icon' => 'conf_output',
'label' => 'la_tab_ConfigOutput',
'url' => Array ('t' => 'config/config_universal', 'pass_section' => true, 'pass' => 'm'),
- 'permissions' => Array ('view', 'edit'),
+ 'permissions' => Array ('view', 'add', 'edit'),
'priority' => 11.1,
'type' => stTREE,
),
Index: units/configuration/configuration.php
===================================================================
--- units/configuration/configuration.php (revision 15437)
+++ units/configuration/configuration.php (working copy)
@@ -35,30 +35,4 @@
return parent::GetKeyClause($method, $keys_hash);
}
-
- /**
- * Set's field error, if pseudo passed not found then create it with message text supplied.
- * Don't overwrite existing pseudo translation.
- *
- * @param string $field
- * @param string $pseudo
- * @param string $error_label
- * @param Array $error_params
- *
- * @return bool
- * @access public
- */
- public function SetError($field, $pseudo, $error_label = null, $error_params = null)
- {
- if ( !parent::SetError($field, $pseudo, $error_label, $error_params) ) {
- // this field already has an error -> don't overwrite it
- return false;
- }
-
- $list_errors = $this->Application->GetVar('errors_' . $this->getPrefixSpecial(), Array ());
- $list_errors[ $this->GetDBField('VariableName') ] = $this->GetErrorMsg($field);
- $this->Application->SetVar('errors_' . $this->getPrefixSpecial(), $list_errors);
-
- return true;
- }
}
\ No newline at end of file
Index: units/configuration/configuration_config.php
===================================================================
--- units/configuration/configuration_config.php (revision 15437)
+++ units/configuration/configuration_config.php (working copy)
@@ -20,9 +20,14 @@
'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
'EventHandlerClass' => Array ('class' => 'ConfigurationEventHandler', 'file' => 'configuration_event_handler.php', 'build_event' => 'OnBuild'),
'TagProcessorClass' => Array ('class' => 'ConfigurationTagProcessor', 'file' => 'configuration_tag_processor.php', 'build_event' => 'OnBuild'),
+ 'ValidatorClass' => 'ConfigurationValidator',
'AutoLoad' => true,
+ 'RegisterClasses' => Array (
+ Array ('pseudo' => 'ConfigurationValidator', 'class' => 'ConfigurationValidator', 'file' => 'configuration_validator.php', 'build_event' => ''),
+ ),
+
'QueryString' => Array (
1 => 'id',
2 => 'Page',
@@ -45,6 +50,12 @@
'config_list_users' => Array ('prefixes' => Array ('conf_List'), 'format' => "!la_updating_config!"),
'section_label' => Array ('prefixes' => Array ('conf_List'), 'format' => "#section_label#"),
+
+ 'config_edit' => Array (
+ 'new_status_labels' => Array ('conf' => '!la_title_AddingSystemSetting!'),
+ 'edit_status_labels' => Array ('conf' => '!la_title_EditingSystemSetting!'),
+ 'prefixes' => Array ('conf'), 'format' => "#conf_status# '#conf_titlefield#'",
+ ),
),
'TableName' => TABLE_PREFIX . 'SystemSettings',
@@ -61,17 +72,49 @@
'Fields' => Array (
'VariableId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'VariableName' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''),
+ 'VariableName' => Array (
+ 'type' => 'string',
+ 'formatter' => 'kFormatter', 'regexp' => '/^[a-z0-9_]+$/i',
+ 'not_null' => 1, 'required' => 1, 'default' => ''
+ ),
'VariableValue' => Array ('type' => 'string', 'default' => NULL),
- 'ModuleOwner' => Array ('type' => 'string', 'default' => 'In-Portal'),
- 'Section' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''),
- 'Heading' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''),
- 'Prompt' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''),
- 'ElementType' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''),
+ 'ModuleOwner' => Array (
+ 'type' => 'string',
+ 'formatter' => 'kOptionsFormatter', 'options' => Array (),
+ 'required' => 1, 'default' => 'In-Portal'
+ ),
+ 'Section' => Array (
+ 'type' => 'string',
+ 'error_msgs' => Array ('unknown_section' => '!la_error_UnknownSection!'),
+ 'not_null' => 1, 'required' => 1, 'default' => ''
+ ),
+ 'Heading' => Array (
+ 'type' => 'string',
+ 'formatter' => 'kFormatter', 'regexp' => '/^la_section_[A-Z\d:_\-\.]+$/i',
+ 'not_null' => 1, 'required' => 1, 'default' => ''
+ ),
+ 'Prompt' => Array (
+ 'type' => 'string',
+ 'formatter' => 'kFormatter', 'regexp' => '/^la_config_[A-Z\d:_\-\.]+$/i',
+ 'not_null' => 1, 'required' => 1, 'default' => ''
+ ),
+ 'ElementType' => Array (
+ 'type' => 'string',
+ 'formatter' => 'kOptionsFormatter', 'options' => Array ('text' => 'la_type_text', 'select' => 'la_type_select', 'multiselect' => 'la_type_multiselect', 'radio' => 'la_type_radio', 'checkbox' => 'la_type_checkbox', 'password' => 'la_type_password', 'textarea' => 'la_type_textarea'), 'use_phrases' => 1,
+ 'not_null' => 1, 'required' => 1, 'default' => ''
+ ),
'Validation' => Array ('type' => 'string', 'default' => NULL),
'ValueList' => Array ('type' => 'string', 'default' => NULL),
- 'DisplayOrder' => Array ('type' => 'float', 'not_null' => 1, 'default' => 0),
- 'GroupDisplayOrder' => Array ('type' => 'float', 'not_null' => 1, 'default' => 0),
+ 'DisplayOrder' => Array (
+ 'type' => 'float',
+ 'unique' => Array ('ModuleOwner', 'Section', 'GroupDisplayOrder'),
+ 'not_null' => 1, 'required' => 1, 'default' => 0
+ ),
+ 'GroupDisplayOrder' => Array (
+ 'type' => 'float',
+ 'unique' => Array ('ModuleOwner', 'Section', 'DisplayOrder'),
+ 'not_null' => 1, 'required' => 1, 'default' => 0
+ ),
'Install' => Array ('type' => 'int', 'not_null' => 1, 'default' => 1),
'HintLabel' => Array ('type' => 'string', 'max_len' => 255, 'default' => NULL),
),
Index: units/configuration/configuration_event_handler.php
===================================================================
--- units/configuration/configuration_event_handler.php (revision 15460)
+++ units/configuration/configuration_event_handler.php (working copy)
@@ -82,6 +82,24 @@
}
/**
+ * Presets new system setting fields
+ *
+ * @param kEvent $event
+ * @return void
+ * @access protected
+ */
+ protected function OnPreCreate(kEvent $event)
+ {
+ parent::OnPreCreate($event);
+
+ $object = $event->getObject();
+ /* @var $object kDBItem */
+
+ $object->SetDBField('Section', $this->Application->GetVar('section'));
+ $object->SetDBField('ModuleOwner', $this->Application->GetVar('module'));
+ }
+
+ /**
* Sets custom validation
*
* @param kEvent $event
@@ -113,27 +131,22 @@
}
/**
- * Performs validation of configuration variable value
+ * Performs custom validation
*
* @param kEvent $event
* @return void
* @access protected
*/
- protected function OnBeforeItemUpdate(kEvent $event)
+ protected function OnBeforeItemValidate(kEvent $event)
{
- parent::OnBeforeItemUpdate($event);
+ parent::OnBeforeItemValidate($event);
$object = $event->getObject();
/* @var $object kDBItem */
// if password field is empty, then don't update
if ( $object->GetDBField('ElementType') == 'password' ) {
- if ( trim($object->GetDBField('VariableValue')) == '' ) {
- $field_options = $object->GetFieldOptions('VariableValue');
- $field_options['skip_empty'] = 1;
- $object->SetFieldOptions('VariableValue', $field_options);
- }
- else {
+ if ( trim($object->GetDBField('VariableValue')) != '' ) {
$password_formatter = $this->Application->recallObject('kPasswordFormatter');
/* @var $password_formatter kPasswordFormatter */
@@ -141,38 +154,8 @@
}
}
- $field_name = $object->GetDBField('VariableName');
- $field_values = $this->Application->GetVar($event->getPrefixSpecial(true));
- $state_country_hash = Array ('Comm_State' => 'Comm_Country', 'Comm_Shipping_State' => 'Comm_Shipping_Country');
+ $this->_processCountryState($event);
- if ( array_key_exists($field_name, $state_country_hash) ) {
- // if this is state field
- $sql = 'SELECT VariableId
- FROM ' . $this->Application->getUnitOption('conf', 'TableName') . '
- WHERE VariableName = "' . $state_country_hash[$field_name] . '"';
- $country_variable_id = $this->Conn->GetOne($sql);
-
- $check_state = $object->GetDBField('VariableValue');
- $check_country = $field_values[$country_variable_id]['VariableValue'];
-
- if ( !$check_country || !$check_state ) {
- return;
- }
-
- $cs_helper = $this->Application->recallObject('CountryStatesHelper');
- /* @var $cs_helper kCountryStatesHelper */
-
- $state_iso = $cs_helper->getStateIso($check_state, $check_country);
-
- if ( $state_iso !== false ) {
- $object->SetDBField('VariableValue', $state_iso);
- }
- else {
- // selected state doesn't belong to selected country
- $object->SetError('VariableValue', 'invalid_state', 'la_InvalidState');
- }
- }
-
$variable_name = $object->GetDBField('VariableName');
$new_value = $object->GetDBField('VariableValue');
@@ -187,7 +170,7 @@
$compile = $event->MasterEvent->getEventParam('compile_maintenance_template');
$compile = $compile || $new_value != $object->GetOriginalField('VariableValue');
- if ( $compile && !$this->generateMaintenancePage($new_value) ) {
+ if ( $compile && !$this->_generateMaintenancePage($new_value) ) {
$object->SetError('VariableValue', 'template_file_missing', 'la_error_TemplateFileMissing');
}
}
@@ -195,9 +178,103 @@
$email_event_data = $this->Application->GetVar('emailevents_' . $event->Prefix);
$object->SetDBField('VariableValue', $email_event_data[0]['Recipients']);
}
+
+ $sections_helper = $this->Application->recallObject('SectionsHelper');
+ /* @var $sections_helper kSectionsHelper */
+
+ $section = $object->GetDBField('Section');
+
+ if ( $section && !$sections_helper->getSectionData($section) ) {
+ $object->SetError('Section', 'unknown_section');
+ }
}
/**
+ * Checks, that state belongs to selected country
+ *
+ * @param kEvent $event
+ * @access protected
+ */
+ protected function _processCountryState(kEvent $event)
+ {
+ $object = $event->getObject();
+ /* @var $object kDBItem */
+
+ $country_iso = $this->_getCountryByState($event);
+ $state_name = $object->GetDBField('VariableValue');
+
+ if ( !$country_iso || !$state_name ) {
+ return;
+ }
+
+ $cs_helper = $this->Application->recallObject('CountryStatesHelper');
+ /* @var $cs_helper kCountryStatesHelper */
+
+ $state_iso = $cs_helper->getStateIso($state_name, $country_iso);
+
+ if ( $state_iso !== false ) {
+ $object->SetDBField('VariableValue', $state_iso);
+ }
+ else {
+ // selected state doesn't belong to selected country
+ $object->SetError('VariableValue', 'invalid_state', 'la_InvalidState');
+ }
+ }
+
+ /**
+ * Returns country iso code, that matches current state variable name
+ *
+ * @param kEvent $event
+ * @return bool
+ * @access protected
+ */
+ protected function _getCountryByState(kEvent $event)
+ {
+ $object = $event->getObject();
+ /* @var $object kDBItem */
+
+ $variable_name = $object->GetDBField('VariableName');
+
+ $state_country_hash = Array (
+ 'Comm_State' => 'Comm_Country',
+ 'Comm_Shipping_State' => 'Comm_Shipping_Country'
+ );
+
+ if ( !array_key_exists($variable_name, $state_country_hash) ) {
+ return false;
+ }
+
+ $field_values = $this->Application->GetVar($event->getPrefixSpecial(true));
+
+ $sql = 'SELECT VariableId
+ FROM ' . $this->Application->getUnitOption($event->Prefix, 'TableName') . '
+ WHERE VariableName = ' . $this->Conn->qstr($state_country_hash[$variable_name]);
+ $country_variable_id = $this->Conn->GetOne($sql);
+
+ return $field_values[$country_variable_id]['VariableValue'];
+ }
+
+ /**
+ * Does custom password setting processong
+ *
+ * @param kEvent $event
+ * @return void
+ * @access protected
+ */
+ protected function OnBeforeItemUpdate(kEvent $event)
+ {
+ parent::OnBeforeItemUpdate($event);
+
+ $object = $event->getObject();
+ /* @var $object kDBItem */
+
+ // if password field is empty, then don't update
+ if ( $object->GetDBField('ElementType') == 'password' && trim($object->GetDBField('VariableValue')) == '' ) {
+ $object->SetFieldOption('VariableValue', 'skip_empty', 1);
+ }
+ }
+
+ /**
* Occurs after updating item
*
* @param kEvent $event
@@ -213,12 +290,8 @@
$object = $event->getObject();
/* @var $object kDBItem */
- if ( $object->GetDBField('ElementType') == 'password' ) {
- if ( trim($object->GetDBField('VariableValue')) == '' ) {
- $field_options = $object->GetFieldOptions('VariableValue');
- unset($field_options['skip_empty']);
- $object->SetFieldOptions('VariableValue', $field_options);
- }
+ if ( $object->GetDBField('ElementType') == 'password' && trim($object->GetDBField('VariableValue')) == '' ) {
+ $object->SetFieldOption('VariableValue', 'skip_empty', 0);
}
// allows to check if variable's value was changed now
@@ -371,7 +444,7 @@
* @return bool
* @access protected
*/
- protected function generateMaintenancePage($template = null)
+ protected function _generateMaintenancePage($template = null)
{
if ( !isset($template) ) {
$template = $this->Application->ConfigValue('HardMaintenanceTemplate');
@@ -390,4 +463,100 @@
return false;
}
+
+ /**
+ * Returns auto-complete values for ajax-dropdown
+ *
+ * @param kEvent $event
+ * @return void
+ * @access protected
+ */
+ protected function OnSuggestValues(kEvent $event)
+ {
+ if ( !$this->Application->isAdminUser ) {
+ // very careful here, because this event allows to
+ // view every object field -> limit only to logged-in admins
+ return;
+ }
+
+ $event->status = kEvent::erSTOP;
+
+ $field = $this->Application->GetVar('field');
+ $cur_value = $this->Application->GetVar('cur_value');
+
+ $object = $event->getObject();
+ /* @var $object kDBItem */
+
+ if ( !$field || !$cur_value || !$object->isField($field) ) {
+ return;
+ }
+
+ $limit = $this->Application->GetVar('limit');
+ if ( !$limit ) {
+ $limit = 20;
+ }
+
+ $sql = 'SELECT DISTINCT ' . $field . ', ModuleOwner
+ FROM ' . $this->Application->getUnitOption($event->Prefix, 'TableName') . '
+ WHERE ' . $field . ' LIKE ' . $this->Conn->qstr('%' . $cur_value . '%') . '
+ ORDER BY ' . $field . ' ASC';
+ $raw_suggestions = $this->Conn->Query($sql);
+
+ $suggestions = Array ();
+ $this->Application->XMLHeader();
+
+ foreach ($raw_suggestions as $raw_suggestion) {
+ $suggestion = $raw_suggestion[$field];
+
+ if ( !isset($suggestions[$suggestion]) ) {
+ $suggestions[$suggestion] = Array ();
+ }
+
+ $suggestions[$suggestion][] = $raw_suggestion['ModuleOwner'];
+ }
+
+ array_splice($suggestions, $limit);
+
+ echo '<suggestions>';
+ $of_label = $this->Application->Phrase('la_From', false);
+
+ foreach ($suggestions as $suggestion_value => $suggestion_modules) {
+ $suggestion_module = in_array('In-Portal', $suggestion_modules) ? 'In-Portal' : implode(', ', $suggestion_modules);
+ $suggestion_title = $suggestion_value . ' <em style="color: grey;">' . $of_label . ' ' . $suggestion_module . '</em>';
+
+ echo '<item value="' . htmlspecialchars($suggestion_value) . '">' . htmlspecialchars($suggestion_title) . '</item>';
+ }
+
+ echo '</suggestions>';
+ }
+
+ /**
+ * Prefills module dropdown
+ *
+ * @param kEvent $event
+ * @return void
+ * @access protected
+ */
+ protected function OnAfterConfigRead(kEvent $event)
+ {
+ parent::OnAfterConfigRead($event);
+
+ $options = Array ();
+
+ foreach ($this->Application->ModuleInfo as $module_name => $module_info) {
+ if ( $module_name == 'Core' ) {
+ continue;
+ }
+
+ $options[$module_name] = $module_name;
+
+ if ( $module_name == 'In-Portal' ) {
+ $options['In-Portal:Users'] = 'In-Portal:Users';
+ }
+ }
+
+ $fields = $this->Application->getUnitOption($event->Prefix, 'Fields');
+ $fields['ModuleOwner']['options'] = $options;
+ $this->Application->setUnitOption($event->Prefix, 'Fields', $fields);
+ }
}
\ No newline at end of file
Index: units/configuration/configuration_tag_processor.php
===================================================================
--- units/configuration/configuration_tag_processor.php (revision 15437)
+++ units/configuration/configuration_tag_processor.php (working copy)
@@ -157,12 +157,20 @@
function IsRequired($params)
{
- $object = $this->getObject($params);;
- /* @var $object kDBList */
+ $object = $this->getObject($params);
+ /* @var $object kDBItem */
- $field_options = $object->GetDBField('Validation');
- $field_options = $field_options ? unserialize($field_options) : Array ();
+ $field = $params['field'];
+ $field_options = $object->GetFieldOptions($field);
+ if ( $field == 'VariableValue' ) {
+ $custom_options = $object->GetDBField('Validation');
+
+ if ( $custom_options ) {
+ $field_options = array_merge($field_options, unserialize($custom_options));
+ }
+ }
+
return isset($field_options['required']) && $field_options['required'];
}
@@ -171,8 +179,11 @@
$object = $this->getObject($params);
/* @var $object kDBList */
+ if ( !($object instanceof kDBList) ) {
+ return parent::Error($params);
+ }
+
$field = $object->GetDBField($params['id_field']);
-
$errors = $this->Application->GetVar('errors_' . $this->getPrefixSpecial(), Array ());
return array_key_exists($field, $errors) ? $errors[$field] : '';
@@ -261,4 +272,26 @@
return $cached_sections[$var_name];
}
+
+ /**
+ * Returns system setting editing link
+ *
+ * @param Array $params
+ * @return string
+ * @access protected
+ */
+ protected function ItemEditLink($params)
+ {
+ $object = $this->getObject($params);
+ /* @var $object kDBItem */
+
+ $params['m_opener'] = 'd';
+ $params[$object->Prefix . '_mode'] = 't';
+ $params[$object->Prefix . '_event'] = 'OnEdit';
+ $params[$object->Prefix . '_id'] = $object->GetID();
+ $params['pass'] = 'all,' . $object->Prefix;
+
+ return $this->Application->ProcessParsedTag('m', 'Link', $params);
+
+ }
}
\ No newline at end of file
Index: units/configuration/configuration_validator.php
===================================================================
--- units/configuration/configuration_validator.php (revision 0)
+++ units/configuration/configuration_validator.php (revision 0)
@@ -0,0 +1,48 @@
+<?php
+/**
+ * @version $Id$
+ * @package In-Portal
+ * @copyright Copyright (C) 1997 - 2012 Intechnic. All rights reserved.
+ * @license GNU/GPL
+ * In-Portal is Open Source software.
+ * This means that this software may have been modified pursuant
+ * the GNU General Public License, and as distributed it includes
+ * or is derivative of works licensed under the GNU General Public License
+ * or other free or open source software licenses.
+ * See http://www.in-portal.org/license for copyright notices and details.
+ */
+
+defined('FULL_PATH') or die('restricted access!');
+
+class ConfigurationValidator extends kValidator {
+
+ /**
+ * Set's field error, if pseudo passed not found then create it with message text supplied.
+ * Don't overwrite existing pseudo translation.
+ *
+ * @param string $field
+ * @param string $pseudo
+ * @param string $error_label
+ * @param Array $error_params
+ *
+ * @return bool
+ * @access public
+ */
+ public function SetError($field, $pseudo, $error_label = null, $error_params = null)
+ {
+ if ( !parent::SetError($field, $pseudo, $error_label, $error_params) ) {
+ // this field already has an error -> don't overwrite it
+ return false;
+ }
+
+ if ( $field == 'VariableValue' ) {
+ $item_prefix = $this->dataSource->getPrefixSpecial();
+
+ $list_errors = $this->Application->GetVar('errors_' . $item_prefix, Array ());
+ $list_errors[$this->dataSource->GetDBField('VariableName')] = $this->GetErrorMsg($field);
+ $this->Application->SetVar('errors_' . $item_prefix, $list_errors);
+ }
+
+ return true;
+ }
+}
Property changes on: units\configuration\configuration_validator.php
___________________________________________________________________
Added: svn:keywords
+ Id
Added: svn:eol-style
+ LF
Index: units/sections/sections_config.php
===================================================================
--- units/sections/sections_config.php (revision 15437)
+++ units/sections/sections_config.php (working copy)
@@ -167,7 +167,7 @@
'icon' => 'conf_general',
'label' => 'la_tab_General',
'url' => Array ('t' => 'config/config_universal', 'pass_section' => true, 'pass' => 'm'),
- 'permissions' => Array ('view', 'edit'),
+ 'permissions' => Array ('view', 'add', 'edit'),
'priority' => 1,
'type' => stTREE,
),
@@ -177,7 +177,7 @@
'icon' => 'conf_advanced',
'label' => 'la_title_Advanced',
'url' => Array ('t' => 'config/config_universal', 'pass_section' => true, 'pass' => 'm'),
- 'permissions' => Array ('view', 'edit'),
+ 'permissions' => Array ('view', 'add', 'edit'),
'priority' => 2,
'type' => stTREE,
),
Index: units/users/users_config.php
===================================================================
--- units/users/users_config.php (revision 15437)
+++ units/users/users_config.php (working copy)
@@ -256,7 +256,7 @@
'icon' => 'conf_users_general',
'label' => 'la_tab_ConfigSettings',
'url' => Array ('t' => 'config/config_universal', 'module' => 'In-Portal:Users', 'pass_section' => true, 'pass' => 'm'),
- 'permissions' => Array ('view', 'edit'),
+ 'permissions' => Array ('view', 'add', 'edit'),
'priority' => 1,
'type' => stTREE,
),
system_config_editor_modules.patch [^] (12,441 bytes) 2012-07-23 12:04
[Show Content]
Index: in-bulletin/install/install_data.sql
===================================================================
--- in-bulletin/install/install_data.sql (revision 15437)
+++ in-bulletin/install/install_data.sql (working copy)
@@ -202,6 +202,7 @@
INSERT INTO Permissions VALUES (DEFAULT, 'in-bulletin:topics.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-bulletin:setting_folder.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-bulletin:configuration_output.view', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-bulletin:configuration_output.add', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-bulletin:configuration_output.edit', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-bulletin:configuration_search.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-bulletin:configuration_search.edit', 11, 1, 1, 0);
Index: in-bulletin/install/upgrades.php
===================================================================
--- in-bulletin/install/upgrades.php (revision 15437)
+++ in-bulletin/install/upgrades.php (working copy)
@@ -60,6 +60,7 @@
'5.2.0-B2' => Array ('Core' => '5.2.0-B2'),
'5.2.0-B3' => Array ('Core' => '5.2.0-B3'),
'5.2.0-RC1' => Array ('Core' => '5.2.0-RC1'),
+ '5.2.0' => Array ('Core' => '5.2.0'),
);
}
Index: in-bulletin/install/upgrades.sql
===================================================================
--- in-bulletin/install/upgrades.sql (revision 15437)
+++ in-bulletin/install/upgrades.sql (working copy)
@@ -261,3 +261,7 @@
INSERT INTO EmailEvents (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient, BindToSystemEvent) VALUES(DEFAULT, 'TOPIC.ADD.SUB', NULL, 1, 0, 'In-Bulletin', 'Topic Added (for subscribers)', 0, 1, 0, 'bb:OnCreate');
# ===== v 5.2.0-RC1 =====
+
+# ===== v 5.2.0 =====
+INSERT INTO Permissions VALUES(DEFAULT, 'in-bulletin:configuration_output.add', 11, 1, 1, 0);
+
Index: in-bulletin/units/topics/topics_config.php
===================================================================
--- in-bulletin/units/topics/topics_config.php (revision 15437)
+++ in-bulletin/units/topics/topics_config.php (working copy)
@@ -206,7 +206,7 @@
'icon' => 'core:settings_general',
'label' => 'la_tab_GeneralSettings',
'url' => Array ('t' => 'config/config_general', 'pass_section' => true, 'pass' => 'm'),
- 'permissions' => Array ('view', 'edit'),
+ 'permissions' => Array ('view', 'add', 'edit'),
'priority' => 2.9,
'type' => stTREE,
),*/
@@ -216,7 +216,7 @@
'icon' => 'core:conf_output',
'label' => 'la_tab_ConfigOutput',
'url' => Array ('t' => 'config/config_general', 'pass_section' => true, 'pass' => 'm'),
- 'permissions' => Array ('view', 'edit'),
+ 'permissions' => Array ('view', 'add', 'edit'),
'priority' => 3,
'type' => stTREE,
),
Index: in-commerce/install/install_data.sql
===================================================================
--- in-commerce/install/install_data.sql (revision 15437)
+++ in-commerce/install/install_data.sql (working copy)
@@ -418,12 +418,15 @@
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:affiliate_payment_types.advanced:move_up', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:affiliate_payment_types.advanced:move_down', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:general.view', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:general.add', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:general.edit', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:output.view', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:output.add', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:output.edit', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:search.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:search.edit', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:contacts.view', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:contacts.add', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:contacts.edit', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:configuration_custom.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:configuration_custom.add', 11, 1, 1, 0);
Index: in-commerce/install/upgrades.php
===================================================================
--- in-commerce/install/upgrades.php (revision 15437)
+++ in-commerce/install/upgrades.php (working copy)
@@ -60,6 +60,7 @@
'5.2.0-B2' => Array ('Core' => '5.2.0-B2'),
'5.2.0-B3' => Array ('Core' => '5.2.0-B3'),
'5.2.0-RC1' => Array ('Core' => '5.2.0-RC1'),
+ '5.2.0' => Array ('Core' => '5.2.0'),
);
}
Index: in-commerce/install/upgrades.sql
===================================================================
--- in-commerce/install/upgrades.sql (revision 15437)
+++ in-commerce/install/upgrades.sql (working copy)
@@ -277,3 +277,8 @@
# ===== v 5.2.0-RC1 =====
DELETE FROM Currencies WHERE ISO = 'NZD' LIMIT 1;
+
+# ===== v 5.2.0 =====
+INSERT INTO Permissions VALUES(DEFAULT, 'in-commerce:general.add', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES(DEFAULT, 'in-commerce:output.add', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES(DEFAULT, 'in-commerce:contacts.add', 11, 1, 1, 0);
Index: in-commerce/units/products/products_config.php
===================================================================
--- in-commerce/units/products/products_config.php (revision 15437)
+++ in-commerce/units/products/products_config.php (working copy)
@@ -298,7 +298,7 @@
'icon' => 'conf_ecommerce_general',
'label' => 'la_tab_GeneralSettings',
'url' => Array ('t' => 'config/config_general', 'pass_section' => true, 'pass' => 'm'),
- 'permissions' => Array ('view', 'edit'),
+ 'permissions' => Array ('view', 'add', 'edit'),
'priority' => 1,
'type' => stTREE,
),
@@ -308,7 +308,7 @@
'icon' => 'core:conf_output',
'label' => 'la_tab_ConfigOutput',
'url' => Array ('t' => 'config/config_universal', 'pass_section' => true, 'pass' => 'm'),
- 'permissions' => Array ('view', 'edit'),
+ 'permissions' => Array ('view', 'add', 'edit'),
'priority' => 2,
'type' => stTREE,
),
@@ -338,7 +338,7 @@
'icon' => 'conf_contact_info',
'label' => 'la_tab_ConfigContacts',
'url' => Array ('t' => 'config/config_universal', 'pass_section' => true, 'pass' => 'm'),
- 'permissions' => Array ('view', 'edit'),
+ 'permissions' => Array ('view', 'add', 'edit'),
'priority' => 10,
'type' => stTREE,
),
Index: in-link/install/install_data.sql
===================================================================
--- in-link/install/install_data.sql (revision 15437)
+++ in-link/install/install_data.sql (working copy)
@@ -186,6 +186,7 @@
INSERT INTO Permissions VALUES (DEFAULT, 'in-link:links.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-link:setting_folder.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-link:configuration_output.view', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-link:configuration_output.add', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-link:configuration_output.edit', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-link:configuration_search.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-link:configuration_search.edit', 11, 1, 1, 0);
Index: in-link/install/upgrades.php
===================================================================
--- in-link/install/upgrades.php (revision 15437)
+++ in-link/install/upgrades.php (working copy)
@@ -59,6 +59,7 @@
'5.2.0-B2' => Array ('Core' => '5.2.0-B2'),
'5.2.0-B3' => Array ('Core' => '5.2.0-B3'),
'5.2.0-RC1' => Array ('Core' => '5.2.0-RC1'),
+ '5.2.0' => Array ('Core' => '5.2.0'),
);
}
Index: in-link/install/upgrades.sql
===================================================================
--- in-link/install/upgrades.sql (revision 15437)
+++ in-link/install/upgrades.sql (working copy)
@@ -191,3 +191,6 @@
# ===== v 5.2.0-B3 =====
# ===== v 5.2.0-RC1 =====
+
+# ===== v 5.2.0 =====
+INSERT INTO Permissions VALUES(DEFAULT, 'in-link:configuration_output.add', 11, 1, 1, 0);
Index: in-link/units/links/links_config.php
===================================================================
--- in-link/units/links/links_config.php (revision 15437)
+++ in-link/units/links/links_config.php (working copy)
@@ -340,7 +340,7 @@
'icon' => 'core:settings_general',
'label' => 'la_tab_GeneralSettings',
'url' => Array ('t' => 'config/config_general', 'pass_section' => true, 'pass' => 'm'),
- 'permissions' => Array ('view', 'edit'),
+ 'permissions' => Array ('view', 'add', 'edit'),
'priority' => 0.9,
'type' => stTREE,
),*/
@@ -350,7 +350,7 @@
'icon' => 'core:conf_output',
'label' => 'la_tab_ConfigOutput',
'url' => Array ('t' => 'config/config_general', 'pass_section' => true, 'pass' => 'm'),
- 'permissions' => Array ('view', 'edit'),
+ 'permissions' => Array ('view', 'add', 'edit'),
'priority' => 1,
'type' => stTREE,
),
Index: in-news/install/install_data.sql
===================================================================
--- in-news/install/install_data.sql (revision 15437)
+++ in-news/install/install_data.sql (working copy)
@@ -171,6 +171,7 @@
INSERT INTO Permissions VALUES (DEFAULT, 'in-news:articles.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-news:setting_folder.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-news:configuration_output.view', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-news:configuration_output.add', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-news:configuration_output.edit', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-news:configuration_search.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-news:configuration_search.edit', 11, 1, 1, 0);
Index: in-news/install/upgrades.php
===================================================================
--- in-news/install/upgrades.php (revision 15437)
+++ in-news/install/upgrades.php (working copy)
@@ -58,6 +58,7 @@
'5.2.0-B2' => Array ('Core' => '5.2.0-B2'),
'5.2.0-B3' => Array ('Core' => '5.2.0-B3'),
'5.2.0-RC1' => Array ('Core' => '5.2.0-RC1'),
+ '5.2.0' => Array ('Core' => '5.2.0'),
);
}
Index: in-news/install/upgrades.sql
===================================================================
--- in-news/install/upgrades.sql (revision 15437)
+++ in-news/install/upgrades.sql (working copy)
@@ -132,3 +132,6 @@
# ===== v 5.2.0-B3 =====
# ===== v 5.2.0-RC1 =====
+
+# ===== v 5.2.0 =====
+INSERT INTO Permissions VALUES(DEFAULT, 'in-news:configuration_output.add', 11, 1, 1, 0);
Index: in-news/units/articles/articles_config.php
===================================================================
--- in-news/units/articles/articles_config.php (revision 15437)
+++ in-news/units/articles/articles_config.php (working copy)
@@ -246,7 +246,7 @@
'icon' => 'core:settings_general',
'label' => 'la_tab_GeneralSettings',
'url' => Array ('t' => 'config/config_general', 'pass_section' => true, 'pass' => 'm'),
- 'permissions' => Array ('view', 'edit'),
+ 'permissions' => Array ('view', 'add', 'edit'),
'priority' => 0.9,
'type' => stTREE,
),*/
@@ -256,7 +256,7 @@
'icon' => 'core:conf_output',
'label' => 'la_tab_ConfigOutput',
'url' => Array ('t' => 'config/config_general', 'pass_section' => true, 'pass' => 'm'),
- 'permissions' => Array ('view', 'edit'),
+ 'permissions' => Array ('view', 'add', 'edit'),
'priority' => 1,
'type' => stTREE,
),
|