mirror of
https://github.com/humhub/humhub.git
synced 2025-02-20 08:05:23 +01:00
Merge branch 'v1.2-dev' of https://github.com/humhub/humhub into v1.2-dev
This commit is contained in:
commit
62f7eaef99
5
.gitignore
vendored
5
.gitignore
vendored
@ -29,4 +29,7 @@ nbproject
|
||||
themes/*
|
||||
!themes/HumHub
|
||||
|
||||
favicon.ico
|
||||
favicon.ico
|
||||
/.settings
|
||||
/.buildpath
|
||||
/.project
|
||||
|
@ -15,13 +15,13 @@
|
||||
"minimum-stability": "stable",
|
||||
"require": {
|
||||
"php": ">=5.4.0",
|
||||
"yiisoft/yii2": ">=2.0.4",
|
||||
"yiisoft/yii2-bootstrap": "*",
|
||||
"yiisoft/yii2-swiftmailer": "*",
|
||||
"yiisoft/yii2-authclient": "*",
|
||||
"yiisoft/yii2": "~2.0.4",
|
||||
"yiisoft/yii2-bootstrap": "~2.0.0",
|
||||
"yiisoft/yii2-swiftmailer": "~2.0.0",
|
||||
"yiisoft/yii2-authclient": "~2.0.0",
|
||||
"raoul2000/yii2-jcrop-widget": "*",
|
||||
"cebe/markdown": "1.0.2",
|
||||
"yiisoft/yii2-jui": "^2.0",
|
||||
"yiisoft/yii2-jui": "~2.0.0",
|
||||
"zendframework/zend-http": "*",
|
||||
"jbroadway/urlify": "^1.0",
|
||||
"nqxcode/zendsearch": "^2.0",
|
||||
@ -46,11 +46,11 @@
|
||||
"jonnyw/php-phantomjs": "4.*"
|
||||
},
|
||||
"require-dev": {
|
||||
"yiisoft/yii2-codeception": "*",
|
||||
"yiisoft/yii2-debug": "*",
|
||||
"yiisoft/yii2-gii": "*",
|
||||
"yiisoft/yii2-faker": "*",
|
||||
"yiisoft/yii2-apidoc": "^2.0"
|
||||
"yiisoft/yii2-codeception": "~2.0.0",
|
||||
"yiisoft/yii2-debug": "~2.0.0",
|
||||
"yiisoft/yii2-gii": "~2.0.0",
|
||||
"yiisoft/yii2-faker": "~2.0.0",
|
||||
"yiisoft/yii2-apidoc": "~2.0.0"
|
||||
},
|
||||
"config": {
|
||||
"process-timeout": 1800,
|
||||
|
@ -236,15 +236,17 @@
|
||||
|
||||
img = new Image();
|
||||
if ((onLoadShowImage == null) || onLoadShowImage === true) {
|
||||
var maxW = 700;
|
||||
var windowWidth = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
|
||||
|
||||
var maxW = (windowWidth < 700) ? windowWidth : 700;
|
||||
var maxWVal = (windowWidth < 700) ? '100%' : 700+'px';
|
||||
var maxH = 700;
|
||||
img.onload = function () {
|
||||
var image;
|
||||
var width = img.width;
|
||||
//width = _this.checkImageDimensions(img.width);
|
||||
var image = $('<img />');
|
||||
image.attr('src', img.src);
|
||||
image.css('max-width', maxW+'px');
|
||||
image.css('max-width', maxWVal);
|
||||
image.css('max-height', maxH+'px');
|
||||
image.css('width', 'auto');
|
||||
image.css('height', 'auto');
|
||||
@ -254,7 +256,19 @@
|
||||
if (_this.modal_arrows) {
|
||||
_this.modal_arrows.css('display', 'block');
|
||||
}
|
||||
return _this.resize((width < maxW) ? width : maxW);
|
||||
|
||||
var width = image.width();
|
||||
|
||||
// Don't resize for small devices
|
||||
if(windowWidth < 700) {
|
||||
_this.lightbox_container.find('a').css('line-height', function() {
|
||||
return $(this).parent().height() + 'px';
|
||||
});
|
||||
return _this;
|
||||
} else {
|
||||
return _this.resize((width < maxW) ? width : maxW);
|
||||
}
|
||||
|
||||
};
|
||||
img.onerror = function () {
|
||||
return _this.error('Failed to load image: ' + src);
|
||||
@ -266,13 +280,10 @@
|
||||
resize: function (width) {
|
||||
var width_inc_padding;
|
||||
width_inc_padding = width + this.padding.left + this.padding.right;
|
||||
//this.modal.find('.modal-content').css('width', width_inc_padding);
|
||||
//this.modal.find('.modal-dialog').css('width', width_inc_padding + 20);
|
||||
console.log('width: '+width+' incPadding: '+width_inc_padding);
|
||||
this.modal.find('.modal-content').animate({width: width_inc_padding}, 200);
|
||||
this.modal.find('.modal-dialog').animate({width: width_inc_padding + 20}, 200);
|
||||
this.lightbox_container.find('a').css('padding-top', function () {
|
||||
//return $(this).parent().height() / 2;
|
||||
this.lightbox_container.find('a').css('line-height', function() {
|
||||
return $(this).parent().height() + 'px';
|
||||
});
|
||||
return this;
|
||||
},
|
||||
|
@ -24,12 +24,10 @@ function parseHtml(htmlString) {
|
||||
|
||||
if (currentLoadedJavaScripts.hasItem(js)) {
|
||||
// Remove Script Tag
|
||||
//console.log("Ignore load of : "+js);
|
||||
htmlString = htmlString.replace(match[0], "");
|
||||
|
||||
} else {
|
||||
// Let Script Tag
|
||||
//console.log("First load of: "+js);
|
||||
currentLoadedJavaScripts.setItem(js, 1);
|
||||
|
||||
}
|
||||
@ -135,6 +133,11 @@ $.fn.modal.Constructor.prototype.enforceFocus = function () {
|
||||
if ($(e.target).hasClass('select2-input') || $(e.target).hasClass('hexInput')) {
|
||||
return true;
|
||||
}
|
||||
|
||||
var $parent = $(e.target.parentNode);
|
||||
if($parent.hasClass('cke_dialog_ui_input_select') || $parent.hasClass('cke_dialog_ui_input_text')) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (that.$element[0] !== e.target && !that.$element.has(e.target).length) {
|
||||
that.$element.focus();
|
||||
@ -164,7 +167,7 @@ $(document).ready(function () {
|
||||
|
||||
initPlugins();
|
||||
|
||||
$('a[data-ui-loader], button[data-ui-loader]').on('click', function () {
|
||||
$(document).on('click', 'a[data-ui-loader], button[data-ui-loader]', function () {
|
||||
var $this = $(this);
|
||||
|
||||
if($this.find('.loader').length) {
|
||||
|
@ -6,6 +6,7 @@ function togglePanelUp($id) {
|
||||
// Animation complete.
|
||||
$('#' + $id + ' .panel-collapse').hide();
|
||||
$('#' + $id + ' .panel-expand').show();
|
||||
$('#' + $id).addClass('panel-collapsed');
|
||||
|
||||
$.cookie('pm_' + $id, 'collapsed', 5*365);
|
||||
});
|
||||
@ -19,6 +20,7 @@ function togglePanelDown($id) {
|
||||
// Animation complete.
|
||||
$('#' + $id + ' .panel-expand').hide();
|
||||
$('#' + $id + ' .panel-collapse').show();
|
||||
$('#' + $id).removeClass('panel-collapsed');
|
||||
|
||||
$.cookie('pm_' + $id, 'expanded', 5*365);
|
||||
});
|
||||
@ -45,6 +47,7 @@ function checkPanelMenuCookie($id) {
|
||||
// change menu to 'collapsed' state
|
||||
$('#' + $id + ' .panel-collapse').hide();
|
||||
$('#' + $id + ' .panel-expand').show();
|
||||
$('#' + $id).addClass('panel-collapsed');
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -1,9 +1,7 @@
|
||||
//This file contains style alignments for the select2 multi dropdown js framework.
|
||||
$(document).ready(function () {
|
||||
$.fn.select2.defaults = {};
|
||||
|
||||
//We have to overwrite the the result gui after every change
|
||||
$('.multiselect_dropdown').select2({}).on('change', function () {
|
||||
var checkForMultiSelectDropDowns = function() {
|
||||
//We have to overwrite the the result gui after every change
|
||||
$('.multiselect_dropdown').select2({width: '100%'}).on('change', function () {
|
||||
$(this).trigger('update');
|
||||
}).on('select2:open', function () {
|
||||
$(this).data('isOpen', true);
|
||||
@ -26,11 +24,16 @@ $(document).ready(function () {
|
||||
});
|
||||
|
||||
//Since the focusout of the ontainer is called when the dropdown is opened we have to use this focusout
|
||||
$(document).on('focusout', '.select2-search__field', function () {
|
||||
$(document).off('focusout', '.select2-search__field').on('focusout', '.select2-search__field', function () {
|
||||
if (!$(this).closest('.select2-container').prev('.multiselect_dropdown').data('isOpen')) {
|
||||
$(this).closest('.select2-selection').removeClass('select2-selection--focus');
|
||||
}
|
||||
});
|
||||
|
||||
$('.multiselect_dropdown').trigger('update');
|
||||
}
|
||||
|
||||
$(document).ready(function () {
|
||||
$.fn.select2.defaults = {};
|
||||
checkForMultiSelectDropDowns();
|
||||
});
|
@ -1,8 +1,10 @@
|
||||
$(document).ready(function () {
|
||||
/**
|
||||
* Searches a
|
||||
* Prepares all included fieldsets for $form indexed
|
||||
* by its label (legend).
|
||||
*
|
||||
* @param {type} $form
|
||||
* @returns {$lastFieldSet$fieldSet}
|
||||
* @returns {$lastFieldSet$fieldSet} Array of fieldsets indexed by its label
|
||||
*/
|
||||
var getPreparedFieldSets = function ($form) {
|
||||
var result = {};
|
||||
@ -10,15 +12,14 @@ $(document).ready(function () {
|
||||
|
||||
// Assamble all fieldsets with label
|
||||
$form.find('fieldset').each(function () {
|
||||
var $fieldSet = $(this);
|
||||
$fieldSet.hide();
|
||||
var $fieldSet = $(this).hide();
|
||||
|
||||
var legend = $fieldSet.children('legend').text();
|
||||
|
||||
// If we have a label we add the fieldset as is else we append its inputs to the previous fieldset
|
||||
if (legend && legend.length) {
|
||||
// Make sure all fieldsets are direct children
|
||||
result[legend] = $lastFieldSet = $fieldSet;
|
||||
} else if($lastFieldSet) {
|
||||
// We append form groups to the previous fieldset if no label is defined
|
||||
$lastFieldSet.append($fieldSet.children(".form-group"));
|
||||
}
|
||||
});
|
||||
@ -26,25 +27,18 @@ $(document).ready(function () {
|
||||
};
|
||||
|
||||
/**
|
||||
* Check for errors in a specific category
|
||||
* Check for errors in a specific category.
|
||||
* @param _object
|
||||
* @returns {boolean}
|
||||
*/
|
||||
var hasErrors = function($fieldSet) {
|
||||
var hasError = false;
|
||||
|
||||
$fieldSet.children(".form-group").each(function (index, value) {
|
||||
|
||||
// if an input have the class "error"
|
||||
if ($(this).children('.form-control').hasClass("error")) {
|
||||
hasError = true;
|
||||
return false; // stop loop/function
|
||||
}
|
||||
});
|
||||
return hasError;
|
||||
|
||||
return $fieldSet.find('.error, .has-error').length > 0;
|
||||
};
|
||||
|
||||
/**
|
||||
* Initialize tabbed forms.
|
||||
* Note: this currently does only work with on form per page because of the tab id's
|
||||
*/
|
||||
$('[data-ui-tabbed-form]').each(function () {
|
||||
var activeTab = 0;
|
||||
|
||||
@ -56,12 +50,13 @@ $(document).ready(function () {
|
||||
|
||||
var index = 0;
|
||||
$.each(getPreparedFieldSets($form), function(label, $fieldSet) {
|
||||
|
||||
// activate this tab if there are any errors
|
||||
if (hasErrors($fieldSet)) {
|
||||
activeTab = index;
|
||||
}
|
||||
|
||||
// build tab structure
|
||||
// init tab structure
|
||||
$tabs.append('<li><a href="#tab-' + index + '" data-toggle="tab">' + label + '</a></li>');
|
||||
$tabContent.append('<div class="tab-pane" data-tab-index="'+index+'" id="tab-' + index + '"></div>');
|
||||
|
||||
@ -69,23 +64,45 @@ $(document).ready(function () {
|
||||
var $inputs = $fieldSet.children(".form-group");
|
||||
$('#tab-' + index).html($inputs.clone());
|
||||
|
||||
// Remove old fieldset
|
||||
// remove old fieldset from dom
|
||||
$fieldSet.remove();
|
||||
|
||||
// change tab on tab key for the last input of each tab
|
||||
var tabIndex = index;
|
||||
$tabContent.find('.form-control').last().on('keydown', function(e) {
|
||||
var keyCode = e.keyCode || e.which;
|
||||
|
||||
if(keyCode === 9) { //Tab
|
||||
var $nextTabLink = $tabs.find('a[href="#tab-' + (tabIndex+1) + '"]');
|
||||
if($nextTabLink.length) {
|
||||
e.preventDefault();
|
||||
$nextTabLink.tab('show');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
index++;
|
||||
});
|
||||
|
||||
// prepend error summary to form if present
|
||||
if ($('.errorSummary').length != null) {
|
||||
var _errorSummary = $('.errorSummary').clone();
|
||||
$('.errorSummary').remove();
|
||||
$form.prepend(_errorSummary);
|
||||
// prepend error summary to form if exists
|
||||
var $errorSummary = $('.errorSummary');
|
||||
if ($errorSummary.length) {
|
||||
$form.prepend($errorSummary.clone());
|
||||
$errorSummary.remove();
|
||||
}
|
||||
|
||||
// focus first input on tab change
|
||||
$form.find('a[data-toggle="tab"]').on('shown.bs.tab', function (e) {
|
||||
var tabId = $(e.target).attr('href'); // newly activated tab
|
||||
$(tabId).find('.form-control').first().focus();
|
||||
});
|
||||
|
||||
|
||||
// activate the first tab or the tab with errors
|
||||
$tabs.find('a[href="#tab-' + activeTab + '"]').tab('show');
|
||||
$tabs.find('a[href="#tab-' + activeTab + '"]').tab('show');
|
||||
});
|
||||
|
||||
// Make sure frontend validation also activates the tab with errors.
|
||||
$(document).on('afterValidate', function(evt, messages, errors) {
|
||||
if(errors.length) {
|
||||
var index = $(errors[0].container).closest('.tab-pane').data('tab-index');
|
||||
|
@ -17,6 +17,9 @@ use yii\web\AssetBundle;
|
||||
*/
|
||||
class TabbedFormAsset extends AssetBundle
|
||||
{
|
||||
|
||||
public $jsOptions = ['position' => \yii\web\View::POS_BEGIN];
|
||||
|
||||
public $basePath = '@webroot';
|
||||
public $baseUrl = '@web';
|
||||
|
||||
@ -25,4 +28,8 @@ class TabbedFormAsset extends AssetBundle
|
||||
*/
|
||||
public $js = ['js/tabbedForm.js'];
|
||||
|
||||
public $depends = [
|
||||
'humhub\assets\AppAsset'
|
||||
];
|
||||
|
||||
}
|
||||
|
@ -120,7 +120,7 @@ class MessageController extends \yii\console\controllers\MessageController
|
||||
protected function getModuleByCategory($category)
|
||||
{
|
||||
if (preg_match('/(.*?)Module\./', $category, $result)) {
|
||||
$moduleId = strtolower($result[1]);
|
||||
$moduleId = strtolower(preg_replace("/([A-Z])/", '_\1', lcfirst($result[1])));
|
||||
$module = Yii::$app->moduleManager->getModule($moduleId, true);
|
||||
return $module;
|
||||
}
|
||||
|
@ -20,7 +20,7 @@ class HForm extends \yii\base\Component
|
||||
|
||||
const EVENT_BEFORE_VALIDATE = 'beforeValidate';
|
||||
const EVENT_AFTER_VALIDATE = 'afterValidate';
|
||||
|
||||
|
||||
public $showErrorSummary;
|
||||
protected $form;
|
||||
public $primaryModel = null;
|
||||
@ -64,7 +64,7 @@ class HForm extends \yii\base\Component
|
||||
{
|
||||
$hasErrors = false;
|
||||
$this->trigger(self::EVENT_BEFORE_VALIDATE);
|
||||
|
||||
|
||||
if ($this->primaryModel !== null) {
|
||||
if (!$this->primaryModel->validate()) {
|
||||
$hasErrors = true;
|
||||
@ -76,7 +76,7 @@ class HForm extends \yii\base\Component
|
||||
$hasErrors = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$this->trigger(self::EVENT_AFTER_VALIDATE);
|
||||
return !$hasErrors;
|
||||
}
|
||||
@ -196,16 +196,16 @@ class HForm extends \yii\base\Component
|
||||
if (isset($definition['id'])) {
|
||||
$options['id'] = $definition['id'];
|
||||
}
|
||||
|
||||
|
||||
if (isset($definition['readonly']) && $definition['readonly']) {
|
||||
$options['readOnly'] = true;
|
||||
$options['disabled'] = true;
|
||||
}
|
||||
|
||||
|
||||
if (isset($definition['value'])) {
|
||||
$options['value'] = $definition['value'];
|
||||
}
|
||||
|
||||
|
||||
if (isset($definition['prompt']) && $definition['prompt']) {
|
||||
$options['prompt'] = $definition['prompt'];
|
||||
}
|
||||
@ -213,14 +213,13 @@ class HForm extends \yii\base\Component
|
||||
$options['label'] = $definition['label'];
|
||||
}
|
||||
if (isset($definition['type'])) {
|
||||
switch($definition['type']) {
|
||||
switch ($definition['type']) {
|
||||
case 'text':
|
||||
return $this->form->field($model, $name)->textInput($options);
|
||||
case 'multiselectdropdown':
|
||||
$options['class'] = 'form-control multiselect_dropdown';
|
||||
$options['multiple'] = 'multiple';
|
||||
return $this->form->field($model, $name)->listBox($definition['items'], $options);
|
||||
//return $this->form->field($model, $name)->dropDownList($definition['items'], $options);
|
||||
case 'dropdownlist':
|
||||
return $this->form->field($model, $name)->dropDownList($definition['items'], $options);
|
||||
case 'checkbox':
|
||||
@ -239,8 +238,19 @@ class HForm extends \yii\base\Component
|
||||
if (isset($definition['format'])) {
|
||||
$format = $definition['format'];
|
||||
}
|
||||
return $this->form->field($model, $name)->widget(\yii\jui\DatePicker::className(), ['dateFormat' => $format, 'clientOptions' => ['changeYear' => true, 'yearRange' => (date('Y') - 100) . ":" . date('Y'), 'changeMonth' => true, 'disabled' => (isset($options['readOnly']) && $options['readOnly'])], 'options' => ['class' => 'form-control']]);
|
||||
default:
|
||||
|
||||
$yearRange = isset($definition['yearRange']) ? $definition['yearRange'] : (date('Y') - 100) . ":" . (date('Y') + 100);
|
||||
|
||||
return $this->form->field($model, $name)->widget(\yii\jui\DatePicker::className(), [
|
||||
'dateFormat' => $format,
|
||||
'clientOptions' => ['changeYear' => true, 'yearRange' => $yearRange, 'changeMonth' => true, 'disabled' => (isset($options['readOnly']) && $options['readOnly'])],
|
||||
'options' => ['class' => 'form-control']]);
|
||||
case 'markdown':
|
||||
$options['id'] = $name;
|
||||
$returnField = $this->form->field($model, $name)->textarea($options);
|
||||
$returnField .= \humhub\widgets\MarkdownEditor::widget(array('fieldId' => $name));
|
||||
return $returnField;
|
||||
default:
|
||||
return "Field Type " . $definition['type'] . " not supported by Compat HForm";
|
||||
}
|
||||
} else {
|
||||
|
39
protected/humhub/components/AssetManager.php
Normal file
39
protected/humhub/components/AssetManager.php
Normal file
@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @link https://www.humhub.org/
|
||||
* @copyright Copyright (c) 2016 HumHub GmbH & Co. KG
|
||||
* @license https://www.humhub.com/licences
|
||||
*/
|
||||
|
||||
namespace humhub\components;
|
||||
|
||||
use yii\helpers\FileHelper;
|
||||
|
||||
/**
|
||||
* AssetManager
|
||||
*
|
||||
* @inheritdoc
|
||||
* @author Luke
|
||||
*/
|
||||
class AssetManager extends \yii\web\AssetManager
|
||||
{
|
||||
|
||||
/**
|
||||
* Clears all currently published assets
|
||||
*/
|
||||
public function clear()
|
||||
{
|
||||
if ($this->basePath == '') {
|
||||
return;
|
||||
}
|
||||
|
||||
foreach (scandir($this->basePath) as $file) {
|
||||
if (substr($file, 0, 1) === '.') {
|
||||
continue;
|
||||
}
|
||||
FileHelper::removeDirectory($this->basePath . DIRECTORY_SEPARATOR . $file);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -11,6 +11,7 @@ namespace humhub\components;
|
||||
use Yii;
|
||||
use humhub\models\ModuleEnabled;
|
||||
use yii\base\Exception;
|
||||
use yii\helpers\Json;
|
||||
|
||||
/**
|
||||
* Base Class for Modules / Extensions
|
||||
@ -21,15 +22,13 @@ class Module extends \yii\base\Module
|
||||
{
|
||||
|
||||
/**
|
||||
* @var Array the loaded module.json info file
|
||||
* @var array the loaded module.json info file
|
||||
*/
|
||||
private $_moduleInfo = null;
|
||||
|
||||
/**
|
||||
* The path for module resources (images, javascripts)
|
||||
* @var string The path for module resources (images, javascripts)
|
||||
* Also module related assets like README.md and module_image.png should be placed here.
|
||||
*
|
||||
* @var type
|
||||
*/
|
||||
public $resourcesPath = 'assets';
|
||||
|
||||
@ -59,7 +58,7 @@ class Module extends \yii\base\Module
|
||||
if ($info['name']) {
|
||||
return $info['name'];
|
||||
}
|
||||
return $this->getId();
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -102,25 +101,87 @@ class Module extends \yii\base\Module
|
||||
*/
|
||||
public function getImage()
|
||||
{
|
||||
$moduleImageFile = $this->getBasePath() . '/' . $this->resourcesPath . '/module_image.png';
|
||||
|
||||
if (is_file($moduleImageFile)) {
|
||||
list($path, $url) = Yii::$app->assetManager->publish($moduleImageFile);
|
||||
return $url;
|
||||
$url = $this->getPublishedUrl('/module_image.png');
|
||||
|
||||
if($url == null) {
|
||||
$url = Yii::getAlias("@web/img/default_module.jpg");
|
||||
}
|
||||
|
||||
return Yii::getAlias("@web/img/default_module.jpg");
|
||||
return $url;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the url of an asset file and publishes all module assets if
|
||||
* the file is not published yet.
|
||||
*
|
||||
* @param string $relativePath relative file path e.g. /module_image.jpg
|
||||
* @return string
|
||||
*/
|
||||
public function getPublishedUrl($relativePath)
|
||||
{
|
||||
$path = $this->getAssetPath();
|
||||
|
||||
// If the file has not been published yet we publish the module assets
|
||||
if(!$this->isPublished($relativePath)) {
|
||||
$this->publishAssets();
|
||||
}
|
||||
|
||||
// If its still not published the file does not exist
|
||||
if($this->isPublished($relativePath)) {
|
||||
return Yii::$app->assetManager->getPublishedUrl($path).$relativePath;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if a specific asset file has already been published
|
||||
* @param string $relativePath
|
||||
* @return string
|
||||
*/
|
||||
public function isPublished($relativePath)
|
||||
{
|
||||
$path = $this->getAssetPath();
|
||||
$publishedPath = Yii::$app->assetManager->getPublishedPath($path);
|
||||
return $publishedPath !== false && is_file($publishedPath.$relativePath);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get Assets Url
|
||||
*
|
||||
* @return String Image Url
|
||||
* @return string Image Url
|
||||
*/
|
||||
public function getAssetsUrl()
|
||||
{
|
||||
$published = Yii::$app->assetManager->publish($this->getBasePath() . '/' . $this->resourcesPath, ['forceCopy' => true]);
|
||||
return $published[1];
|
||||
if(($published = $this->publishAssets()) != null) {
|
||||
return $published[1];
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Publishes the basePath/resourcesPath (assets) module directory if existing.
|
||||
* @return array
|
||||
*/
|
||||
public function publishAssets()
|
||||
{
|
||||
if($this->hasAssets()) {
|
||||
return Yii::$app->assetManager->publish($this->getAssetPath(), ['forceCopy' => true]);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines whether or not this module has an asset directory.
|
||||
* @return boolean
|
||||
*/
|
||||
private function hasAssets()
|
||||
{
|
||||
$path = $this->getAssetPath();
|
||||
$path = Yii::getAlias($path);
|
||||
return is_string($path) && is_dir($path);
|
||||
}
|
||||
|
||||
private function getAssetPath()
|
||||
{
|
||||
return $this->getBasePath() . '/' . $this->resourcesPath;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -209,10 +270,10 @@ class Module extends \yii\base\Module
|
||||
}
|
||||
|
||||
/**
|
||||
* Reads module.json which contains basic module informations and
|
||||
* Reads module.json which contains basic module information and
|
||||
* returns it as array
|
||||
*
|
||||
* @return Array module.json content
|
||||
* @return array module.json content
|
||||
*/
|
||||
protected function getModuleInfo()
|
||||
{
|
||||
@ -221,7 +282,7 @@ class Module extends \yii\base\Module
|
||||
}
|
||||
|
||||
$moduleJson = file_get_contents($this->getBasePath() . DIRECTORY_SEPARATOR . 'module.json');
|
||||
return \yii\helpers\Json::decode($moduleJson);
|
||||
return Json::decode($moduleJson);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -27,9 +27,11 @@ class Request extends \yii\web\Request
|
||||
if (\humhub\models\Setting::isInstalled()) {
|
||||
$secret = Yii::$app->settings->get('secret');
|
||||
if ($secret != "") {
|
||||
$this->cookieValidationKey = $secret;
|
||||
$this->cookieValidationKey = $secret;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
if ($this->cookieValidationKey == '') {
|
||||
$this->cookieValidationKey = 'installer';
|
||||
}
|
||||
}
|
||||
|
@ -88,13 +88,13 @@ class SettingsManager extends BaseSettingsManager
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function get($name)
|
||||
public function get($name, $default = null)
|
||||
{
|
||||
if ($this->isFixed($name)) {
|
||||
return Yii::$app->params['fixed-settings'][$this->moduleId][$name];
|
||||
}
|
||||
|
||||
return parent::get($name);
|
||||
return parent::get($name, $default);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -49,7 +49,7 @@ class Widget extends \yii\base\Widget
|
||||
try {
|
||||
/* @var $widget Widget */
|
||||
$widget = Yii::createObject($config);
|
||||
$out = $widget->run();
|
||||
$out = $widget->process();
|
||||
} catch (\Exception $e) {
|
||||
// close the output buffer opened above if it has not been closed already
|
||||
if (ob_get_level() > 0) {
|
||||
@ -62,4 +62,12 @@ class Widget extends \yii\base\Widget
|
||||
return ob_get_clean() . $out;
|
||||
}
|
||||
|
||||
/**
|
||||
* Process is a wrapper for the run method
|
||||
*/
|
||||
public function process()
|
||||
{
|
||||
return $this->run();
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -9,6 +9,7 @@
|
||||
namespace humhub\components\behaviors;
|
||||
|
||||
use Yii;
|
||||
use yii\helpers\ArrayHelper;
|
||||
use yii\web\ForbiddenHttpException;
|
||||
use humhub\models\Setting;
|
||||
|
||||
@ -27,6 +28,13 @@ class AccessControl extends \yii\base\ActionFilter
|
||||
*/
|
||||
public $guestAllowedActions = [];
|
||||
|
||||
/**
|
||||
* Rules for access to controller
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $rules = [];
|
||||
|
||||
/**
|
||||
* Only allow admins access to this controller
|
||||
*
|
||||
@ -51,7 +59,7 @@ class AccessControl extends \yii\base\ActionFilter
|
||||
Yii::$app->response->redirect(['/user/auth/login']);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
if (Yii::$app->user->isGuest) {
|
||||
if (!$this->loggedInOnly && !$this->adminOnly) {
|
||||
return true;
|
||||
@ -59,7 +67,11 @@ class AccessControl extends \yii\base\ActionFilter
|
||||
if (in_array($action->id, $this->guestAllowedActions) && Yii::$app->getModule('user')->settings->get('auth.allowGuestAccess') == 1) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!empty($this->rules) && !empty($this->guestAllowedActions)) {
|
||||
if (in_array($action->id, $this->guestAllowedActions)){
|
||||
return true;
|
||||
}
|
||||
}
|
||||
Yii::$app->user->loginRequired();
|
||||
return false;
|
||||
}
|
||||
@ -68,9 +80,27 @@ class AccessControl extends \yii\base\ActionFilter
|
||||
$this->forbidden();
|
||||
}
|
||||
|
||||
if (!empty($this->rules)) {
|
||||
$action = Yii::$app->controller->action->id;
|
||||
$userGroups = ArrayHelper::getColumn(ArrayHelper::toArray($identity->groups), 'name');
|
||||
$userGroups = array_map('strtolower', $userGroups);
|
||||
foreach ($this->rules as $rule){
|
||||
if (!empty($rule['groups'])){
|
||||
$allowedGroups = array_map('strtolower', $rule['groups']);
|
||||
foreach ($allowedGroups as $allowedGroup){
|
||||
if(in_array($allowedGroup, $userGroups) && in_array($action, $rule['actions'])){
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
$this->forbidden();
|
||||
}
|
||||
|
||||
if ($this->loggedInOnly) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
/**
|
||||
* @link https://www.humhub.org/
|
||||
* @copyright Copyright (c) 2015 HumHub GmbH & Co. KG
|
||||
* @copyright Copyright (c) 2016 HumHub GmbH & Co. KG
|
||||
* @license https://www.humhub.com/licences
|
||||
*/
|
||||
|
||||
@ -16,6 +16,11 @@ use Yii;
|
||||
class I18N extends \yii\i18n\I18N
|
||||
{
|
||||
|
||||
/**
|
||||
* @var string path which contains message overwrites
|
||||
*/
|
||||
public $messageOverwritePath = '@config/messages';
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
@ -31,7 +36,7 @@ class I18N extends \yii\i18n\I18N
|
||||
if ($language == 'zh_tw' && $category == 'yii') {
|
||||
$language = 'zh-TW';
|
||||
}
|
||||
|
||||
|
||||
|
||||
return parent::translate($category, $message, $params, $language);
|
||||
}
|
||||
@ -63,14 +68,14 @@ class I18N extends \yii\i18n\I18N
|
||||
}
|
||||
return parent::getMessageSource($category);
|
||||
}
|
||||
|
||||
|
||||
public function getAllowedLanguages()
|
||||
{
|
||||
$availableLanguages = Yii::$app->params['availableLanguages'];
|
||||
$allowedLanguages = Yii::$app->params['allowedLanguages'];
|
||||
if($allowedLanguages != null && count($allowedLanguages) > 0 ) {
|
||||
if ($allowedLanguages != null && count($allowedLanguages) > 0) {
|
||||
$result = [];
|
||||
foreach($allowedLanguages as $lang) {
|
||||
foreach ($allowedLanguages as $lang) {
|
||||
$result[$lang] = $availableLanguages[$lang];
|
||||
}
|
||||
return $result;
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
/**
|
||||
* @link https://www.humhub.org/
|
||||
* @copyright Copyright (c) 2015 HumHub GmbH & Co. KG
|
||||
* @copyright Copyright (c) 2016 HumHub GmbH & Co. KG
|
||||
* @license https://www.humhub.com/licences
|
||||
*/
|
||||
|
||||
@ -32,7 +32,7 @@ class MessageSource extends \yii\i18n\PhpMessageSource
|
||||
|
||||
protected function getConfigMessageFilePath($category, $language)
|
||||
{
|
||||
return Yii::getAlias("@config/messages" . "/$language/" . $category . '.php');
|
||||
return Yii::getAlias(Yii::$app->i18n->messageOverwritePath . "/$language/" . $category . '.php');
|
||||
}
|
||||
|
||||
/**
|
||||
@ -42,7 +42,7 @@ class MessageSource extends \yii\i18n\PhpMessageSource
|
||||
*/
|
||||
protected function loadMessages($category, $language)
|
||||
{
|
||||
|
||||
|
||||
$messageFile = $this->getMessageFilePath($category, $language);
|
||||
$messages = $this->loadMessagesFromFile($messageFile);
|
||||
|
||||
@ -55,7 +55,7 @@ class MessageSource extends \yii\i18n\PhpMessageSource
|
||||
} elseif ($messages === null && $configMessages !== null) {
|
||||
$messages = $configMessages;
|
||||
}
|
||||
|
||||
|
||||
$fallbackLanguage = substr($language, 0, 2);
|
||||
if ($fallbackLanguage != $language) {
|
||||
$fallbackMessageFile = $this->getMessageFilePath($category, $fallbackLanguage);
|
||||
|
@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* To change this license header, choose License Headers in Project Properties.
|
||||
* To change this template file, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
|
||||
namespace humhub\components\validators;
|
||||
|
||||
use yii\validators\Validator;
|
||||
|
||||
/**
|
||||
* Description of AbstractDateValidator
|
||||
*
|
||||
* @author buddha
|
||||
*/
|
||||
abstract class AbstractDateValidator extends Validator
|
||||
{
|
||||
public $message;
|
||||
|
||||
abstract public function dateValidation($timestamp);
|
||||
|
||||
public function validateAttribute($model, $attribute)
|
||||
{
|
||||
$date = $model->$attribute;
|
||||
if(is_string($model->$attribute)) {
|
||||
$date = strtotime($model->$attribute);
|
||||
} else if($model->$attribute instanceof DateTime) {
|
||||
$date = $model->$attribute->getTimestamp();
|
||||
}
|
||||
|
||||
if ($this->dateValidation($date)) {
|
||||
$this->addError($model, $attribute, $this->message);
|
||||
}
|
||||
}
|
||||
}
|
29
protected/humhub/components/validators/PastDateValidator.php
Normal file
29
protected/humhub/components/validators/PastDateValidator.php
Normal file
@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* To change this license header, choose License Headers in Project Properties.
|
||||
* To change this template file, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
|
||||
namespace humhub\components\validators;
|
||||
|
||||
use Yii;
|
||||
/**
|
||||
* Description of PastDateValidator
|
||||
*
|
||||
* @author buddha
|
||||
*/
|
||||
class PastDateValidator extends AbstractDateValidator
|
||||
{
|
||||
|
||||
public function init()
|
||||
{
|
||||
$this->message = Yii::t('base', 'The date has to be in the past.');
|
||||
}
|
||||
|
||||
public function dateValidation($dateTS)
|
||||
{
|
||||
return $dateTS > time();
|
||||
}
|
||||
}
|
@ -27,7 +27,7 @@ $config = [
|
||||
[
|
||||
'class' => 'yii\log\DbTarget',
|
||||
'levels' => ['error', 'warning'],
|
||||
'except' => ['yii\web\HttpException:404'],
|
||||
'except' => ['yii\web\HttpException:404', 'yii\web\HttpException:403', 'yii\web\HttpException:401'],
|
||||
'logVars' => ['_GET', '_SERVER'],
|
||||
],
|
||||
],
|
||||
@ -84,6 +84,7 @@ $config = [
|
||||
],
|
||||
],
|
||||
'assetManager' => [
|
||||
'class' => '\humhub\components\AssetManager',
|
||||
'appendTimestamp' => true,
|
||||
'bundles' => require(__DIR__ . '/' . (YII_ENV_PROD ? 'assets-prod.php' : 'assets-dev.php')),
|
||||
#'bundles' => require(__DIR__ . '/' . 'assets-prod.php'),
|
||||
@ -194,6 +195,9 @@ $config = [
|
||||
],
|
||||
// Allowed languages limitation (optional)
|
||||
'allowedLanguages' => [],
|
||||
'tour' => [
|
||||
'acceptableNames' => ['interface', 'administration', 'profile', 'spaces']
|
||||
],
|
||||
]
|
||||
];
|
||||
|
||||
|
@ -16,10 +16,8 @@ Getting Started
|
||||
|
||||
Administration
|
||||
---------------------
|
||||
* [User](admin-user.md)
|
||||
* [Spaces](admin-spaces.md)
|
||||
* [Authentication](admin-authentication.md)
|
||||
* [Advanced Configuration](admin-adv-config.md)
|
||||
* [Authentication](admin-authentication.md)
|
||||
* [Console](admin-adv-console.md)
|
||||
* [Search](admin-adv-search.md)
|
||||
* [XSendFile](admin-adv-xsendfile.md)
|
||||
|
@ -31,14 +31,13 @@ You can overwrite the default HumHub / Yii configuration in the folder `/protect
|
||||
|
||||
## Configurations
|
||||
|
||||
# Language
|
||||
### Language
|
||||
|
||||
|
||||
**Restrict Languages:**
|
||||
|
||||
All available languages are configured within the main HumHub confiuration **humhub/config/common.php**.
|
||||
It is possible to restrict the allowed languages of a HumHub instance by the following setting within
|
||||
the web or common config:
|
||||
The allowed languages of your project can be configured within the **humhub/config/common.php** configuration.
|
||||
It is possible to restrict the allowed languages of your HumHub installation by means of the following configuration:
|
||||
|
||||
```php
|
||||
return [
|
||||
@ -48,11 +47,9 @@ return [
|
||||
];
|
||||
```
|
||||
|
||||
This setting will only allow the selection of german and french.
|
||||
|
||||
**Overwrite Default Texts:**
|
||||
|
||||
To overwrite the default text for a language you have to define a new message file with the following path:
|
||||
To overwrite the default text for a language, you have to define a new message file with the following path pattern:
|
||||
|
||||
```
|
||||
config/messages/<language>/<Module_ID>.<messagefile>.php
|
||||
@ -72,9 +69,3 @@ return array (
|
||||
'What\'s on your mind?' => 'Wie geht es dir heute?',
|
||||
);
|
||||
```
|
||||
|
||||
# Further available params
|
||||
|
||||
The following params are available to ch
|
||||
|
||||
- **moduleAutoloadPaths** - Can be used to change the path of your modules folder
|
||||
|
@ -18,8 +18,8 @@ Apache Config Example
|
||||
```
|
||||
|
||||
|
||||
More Informations
|
||||
-----------------
|
||||
More Information
|
||||
----------------
|
||||
|
||||
- Apache: [X-Sendfile](http://tn123.org/mod_xsendfile)
|
||||
- Lighttpd v1.4: [X-LIGHTTPD-send-file](http://redmine.lighttpd.net/projects/lighttpd/wiki/X-LIGHTTPD-send-file)
|
||||
|
@ -12,7 +12,7 @@ Facebook
|
||||
|
||||
In order to use Facebook OAuth you must register your application at <https://developers.facebook.com/apps>.
|
||||
|
||||
Add following block to your configuration (protected/config/common.php):
|
||||
Add the following block to your configuration (protected/config/common.php):
|
||||
|
||||
```php
|
||||
return [
|
||||
|
@ -17,13 +17,13 @@ FLUSH PRIVILEGES;
|
||||
|
||||
### Via: Download Package
|
||||
|
||||
The easiest way to get HumHub is the direct download of the complete package under [http://www.humhub.org/downloads](http://www.humhub.org/downloads).
|
||||
The easiest way to get HumHub, is the direct download of the complete package under [http://www.humhub.org/downloads](http://www.humhub.org/downloads).
|
||||
This package already includes all external dependencies and doesn't require a composer update.
|
||||
After the download is completed, just extract the package into the htdocs folder of your webserver.
|
||||
After the download completed, just extract the package into the htdocs folder of your webserver.
|
||||
|
||||
### Via: Git/Composer
|
||||
|
||||
To be able to install a branch retrieved by git, you'll have to run a composer update to download external dependencies.
|
||||
In order to be able to install a branch fetched by git, you'll have to run a composer update to download external dependencies.
|
||||
|
||||
- Clone Git Repository:
|
||||
|
||||
@ -42,10 +42,10 @@ git checkout stable
|
||||
|
||||
```
|
||||
php composer.phar global require "fxp/composer-asset-plugin:~1.1.1"
|
||||
composer update
|
||||
php composer.phar update
|
||||
```
|
||||
|
||||
> Note: The composer update may have to be executed again after an update of your local repository by a git pull. Read more about updating ([Update Guide](http://localhost/codebase/doku/guide-admin-updating.html#gitcomposer-based-installations))
|
||||
> Note: The composer update may have to be executed again after an update of your local repository by a git pull. Read more about updating ([Update Guide](admin-updating.html#gitcomposer-based-installations))
|
||||
|
||||
## Setting up
|
||||
|
||||
@ -62,7 +62,7 @@ Make the following files executable:
|
||||
- /protected/yii
|
||||
- /protected/yii.bat
|
||||
|
||||
**Make sure following directories are not accessible throu webserver!**
|
||||
**Make sure the following directories are not accessible through the webserver!**
|
||||
|
||||
(These folders are protected by default with ".htaccess")
|
||||
|
||||
|
@ -22,6 +22,9 @@ Requirements
|
||||
* Apache XSendfile
|
||||
|
||||
### Packages for Debian/Ubuntu users
|
||||
|
||||
#### For PHP 5.x
|
||||
|
||||
* imagemagick
|
||||
* php5-curl
|
||||
* php5-mysql
|
||||
@ -32,3 +35,18 @@ Requirements
|
||||
* php-apc (optional)
|
||||
* php5-memcached (optional)
|
||||
* libapache2-mod-xsendfile (optional)
|
||||
|
||||
#### For PHP 7.0 on Ubuntu
|
||||
|
||||
* imagemagick
|
||||
* php7.0-curl
|
||||
* php7.0-mbstring
|
||||
* php7.0-mysql
|
||||
* php7.0-gd
|
||||
* php7.0-cli
|
||||
* php7.0-intl
|
||||
* php7.0-ldap (optional)
|
||||
* php7.0-opcache (optional)
|
||||
* php-memcache (optional)
|
||||
* libapache2-mod-xsendfile (optional)
|
||||
|
||||
|
@ -134,7 +134,7 @@ Each Content ActiveRecord (derived from [[\humhub\modules\content\components\Con
|
||||
This Content record holds all neccessary information and provides common methods:
|
||||
|
||||
- ContentContainer which the Content belongs to
|
||||
- Meta Informations (created_at, created_by, updated_at, updated_by)
|
||||
- Meta Information (created_at, created_by, updated_at, updated_by)
|
||||
- Wall Assignments / Methods
|
||||
- Archiving / Sticking
|
||||
- And more...
|
||||
|
@ -21,7 +21,7 @@ class Post extends ContentActiveRecord implements Searchable
|
||||
// This is required to display the search result
|
||||
public $wallEntryClass = "humhub\modules\post\widgets\WallEntry";
|
||||
|
||||
// Searchable Attributes / Informations
|
||||
// Searchable Attributes / Information
|
||||
public function getSearchAttributes()
|
||||
{
|
||||
return array(
|
||||
|
@ -1,141 +1,102 @@
|
||||
Testing
|
||||
Testing (since v1.2)
|
||||
====================
|
||||
|
||||
## Setup your testing environment
|
||||
## Testenvironment setup
|
||||
|
||||
1. Install codeception
|
||||
|
||||
```
|
||||
composer global require "codeception/codeception=2.0.*" "codeception/specify=*" "codeception/verify=*"
|
||||
```
|
||||
|
||||
2. Create test Database:
|
||||
|
||||
```
|
||||
CREATE DATABASE `humhub_test` CHARACTER SET utf8 COLLATE utf8_general_ci;
|
||||
```
|
||||
|
||||
3. Align your database settings in protected/humhub/tests/config/common.php:
|
||||
3. Configure database access
|
||||
|
||||
```
|
||||
return [
|
||||
'components' => [
|
||||
Configure your database auth in @humhub/tests/config/common.php:
|
||||
|
||||
´´´
|
||||
...
|
||||
'components' => [
|
||||
'db' => [
|
||||
'dsn' => 'mysql:host=localhost;dbname=humhub_test',
|
||||
'username' => '<username>',
|
||||
'password' => '<password>',
|
||||
'username' => 'myUser',
|
||||
'password' => 'myPassword',
|
||||
'charset' => 'utf8',
|
||||
],
|
||||
]
|
||||
...
|
||||
]
|
||||
...
|
||||
´´´
|
||||
|
||||
4. Install test environment:
|
||||
|
||||
´´´
|
||||
cd protected/humhub/tests/codeception/bin
|
||||
php yii migrate/up --includeModuleMigrations=1 --interactive=0
|
||||
php yii installer/auto
|
||||
´´´
|
||||
|
||||
5. Set HUMHUB_PATH system variable
|
||||
|
||||
You should set the HUMHUB_PATH environment which should point to your HumHub root directory you want to use for testing.
|
||||
This is only required for non core module tests and can also be set in your modules test configuration ´/tests/config/test.php´:
|
||||
|
||||
´´´
|
||||
return [
|
||||
'humhub_root' => '/path/to/my/humhub/root',
|
||||
];
|
||||
```
|
||||
´´´
|
||||
|
||||
3. Migrate Up:
|
||||
> Note: The test environment only works with HumHub v1.2 or later.
|
||||
|
||||
```
|
||||
cd protected/humhub/tests/codeception/bin
|
||||
php yii migrate/up --includeModuleMigrations=1 --interactive=0
|
||||
php yii installer/auto
|
||||
```
|
||||
## Run Tests:
|
||||
|
||||
4. Run Tests (core):
|
||||
### Run all core tests:
|
||||
|
||||
```
|
||||
´´´
|
||||
cd protected/humhub/tests/
|
||||
codecept run
|
||||
```
|
||||
´´´
|
||||
|
||||
## Run test suites
|
||||
|
||||
To run a specific test suite execute:
|
||||
|
||||
```
|
||||
codecept run functional
|
||||
|
||||
or
|
||||
|
||||
codecept run acceptance
|
||||
|
||||
or
|
||||
### Run core module test
|
||||
|
||||
´´´
|
||||
cd myModule/tests
|
||||
codecept run unit
|
||||
```
|
||||
´´´
|
||||
|
||||
The corresponding test files for a suite should reside under module_root/tests/codeception/<suite>
|
||||
### Run single test
|
||||
|
||||
### Test configuration
|
||||
´´´
|
||||
codecept run codeception/acceptance/TestCest:testFunction
|
||||
´´´
|
||||
|
||||
The settings of your default configuration files in your `humhub_root/protected/humhub/tests/config` directory can be overwritten for each module
|
||||
within the corresponding `module_root/tests/config` files.
|
||||
### Run acceptance tests
|
||||
#### with phantomjs
|
||||
|
||||
The following configuration files should can be used to overwrite the defaults:
|
||||
- Run phantomjs server (is installed with composer update)
|
||||
|
||||
- The initial test configuration _test.php_ is used to set general test settings as the path to your humhub_root.
|
||||
- The configuration of _common.php_ is used for all suites and can be overwritten by settings in a suite configuation.
|
||||
- Suite specific test configurations (e.g. functional.php) are used to configure humhub for suite tests.
|
||||
cd protected/bin
|
||||
phantomjs --webdriver=44444
|
||||
|
||||
The configurations for a suite will be merged in the following order:
|
||||
#### with chrome driver (selenium)
|
||||
|
||||
- humhub_root/protected/humhub/tests/config/functional.php
|
||||
- module_root/tests/config/common.php
|
||||
- module_root/tests/config/functional.php
|
||||
- module_root/tests/config/env/<env>/common.php (if exists)
|
||||
- module_root/tests/config/env/<env>/functional.php (if exists)
|
||||
- Download chromedriver.exe and selenium standalone server jar and copy them in the same directory.
|
||||
|
||||
#### Environments
|
||||
Start selenium:
|
||||
|
||||
For running a test for a specific environment you'll have to set te `--env` argument for your testrun.
|
||||
´´´
|
||||
java -Dwebdriver.chrome.driver=chromedriver.exe -jar selenium-server-standalone-2.53.0.jar
|
||||
´´´
|
||||
|
||||
Example for running all functional tests of a tasks module in a master environment:
|
||||
Start test server:
|
||||
|
||||
1. Create a file `tasks/tests/config/env/master/test.php` with the following content:
|
||||
´´´
|
||||
cd /myhumHubInstallation
|
||||
php -S localhost:8080
|
||||
´´´
|
||||
|
||||
```
|
||||
return [
|
||||
'humhub_root' => '/pathToMasterBranch'
|
||||
];
|
||||
```
|
||||
run with chrome environment
|
||||
codecept run acceptance --env chrome
|
||||
|
||||
2. If needed set further humhub settings in `tasks/tests/config/env/master/funtional.php`
|
||||
3. Run `codecept run functional --env master`
|
||||
|
||||
>Note: Your modules test.php configuration file should always set an 'modules' array with all non core modules needed for test execution.
|
||||
|
||||
>Note: You can specify multiple --env arguments in codeception, for module tests the first --env argument must contain the environment of your
|
||||
humhub_root settings you want to use for this test run.
|
||||
|
||||
## Run tests for modules
|
||||
|
||||
To run non core module tests you have to edit at least the test config file under `<yourmodule>/tests/config/test.php`.
|
||||
If your modules reside outside of the /protected/humhub/modules directory you'll have to set the following configurations:
|
||||
|
||||
In your `<yourmodule>/tests/config/test.php`:
|
||||
|
||||
```
|
||||
return [
|
||||
// This should contain the root path of your humhub branch you want to test against
|
||||
'humhub_root' => '/pathToHumHub',
|
||||
// This will enable all provided modules for the testenvironment
|
||||
'modules' => ['myModuleId']
|
||||
];
|
||||
```
|
||||
|
||||
In your `<yourmodule>/tests/config/common.php`:
|
||||
|
||||
```
|
||||
return [
|
||||
'params' => [
|
||||
// This is a humhub configuration to include (but not enable) all modules within the given path
|
||||
'moduleAutoloadPaths' => ['/pathToMyModules']
|
||||
]
|
||||
];
|
||||
```
|
||||
|
||||
|
||||
[https://github.com/yiisoft/yii2-app-advanced/blob/master/tests/README.md]
|
||||
|
||||
#### PhantomJs
|
||||
|
||||
```
|
||||
protected/vendor/bin/phantomjs --webdriver=4444
|
||||
```
|
@ -13,7 +13,6 @@ Bundled Software / Libaries
|
||||
* jQuery Cookie Plugin - https://github.com/carhartl/jquery-cookie
|
||||
* jQuery Knob - http://anthonyterrien.com/knob/
|
||||
* Twitter Bootstrap - http://getbootstrap.com/
|
||||
* Bootstrap-datepicker.js - http://www.eyecon.ro/bootstrap-datepicker
|
||||
* Lightbox for Bootstrap 3 - https://github.com/ashleydw/lightbox
|
||||
* Modernizr - http://modernizr.com/
|
||||
* HTML5 Shiv - https://github.com/aFarkas/html5shiv
|
||||
|
@ -84,9 +84,21 @@ abstract class BaseSettingsManager extends Component
|
||||
* @param string $name the name of setting
|
||||
* @return string the setting value or null when not exists
|
||||
*/
|
||||
public function get($name)
|
||||
public function get($name, $default = null)
|
||||
{
|
||||
return isset($this->_loaded[$name]) ? $this->_loaded[$name] : null;
|
||||
return isset($this->_loaded[$name]) ? $this->_loaded[$name] : $default;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the value of setting without any caching
|
||||
*
|
||||
* @param string $name the name of setting
|
||||
* @return string the setting value or null when not exists
|
||||
*/
|
||||
public function getUncached($name, $default = null)
|
||||
{
|
||||
$record = $this->find()->andWhere(['name' => $name])->one();
|
||||
return ($record !== null) ? $record->value : $default;
|
||||
}
|
||||
|
||||
/**
|
||||
|
47
protected/humhub/libs/DateHelper.php
Normal file
47
protected/humhub/libs/DateHelper.php
Normal file
@ -0,0 +1,47 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @link https://www.humhub.org/
|
||||
* @copyright Copyright (c) 2015 HumHub GmbH & Co. KG
|
||||
* @license https://www.humhub.com/licences
|
||||
*/
|
||||
|
||||
namespace humhub\libs;
|
||||
|
||||
/**
|
||||
* Utility class for date issues
|
||||
*
|
||||
* @see \yii\validators\DateValidator
|
||||
* @author buddha
|
||||
*/
|
||||
class DateHelper
|
||||
{
|
||||
/**
|
||||
* Parses a date and optionally a time if timeAttribute is specified.
|
||||
*
|
||||
* @param string $value
|
||||
* @param string $timeValue optional time value
|
||||
* @return int timestamp in utc
|
||||
*/
|
||||
public static function parseDateTimeToTimestamp($value, $timeValue = null)
|
||||
{
|
||||
return DbDateValidator::parseDateTime($value, $timeValue);
|
||||
}
|
||||
|
||||
/**
|
||||
* Parses a date and optionally a time if timeAttribute is specified to
|
||||
* an given pattern or the default pattern 'Y-m-d' if no pattern is provided.
|
||||
*
|
||||
* @param string $value date value
|
||||
* @param string $pattern pattern
|
||||
* @param string $timeValue optional time value
|
||||
* @return int timestamp in utc
|
||||
*/
|
||||
public static function parseDateTime($value, $pattern = 'Y-m-d', $timeValue = null)
|
||||
{
|
||||
$ts = self::parseDateTimeToTimestamp($value, $timeValue);
|
||||
$dt = new \DateTime();
|
||||
$dt->setTimestamp($ts);
|
||||
return $dt->format($pattern);
|
||||
}
|
||||
}
|
@ -86,6 +86,17 @@ class DbDateValidator extends \yii\validators\DateValidator
|
||||
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Parses a date and optionally a time if timeAttribute is specified.
|
||||
*
|
||||
* @param string $value
|
||||
* @return int timestamp in utc
|
||||
*/
|
||||
public static function parseDateTime($value, $timeValue = null)
|
||||
{
|
||||
return (new self())->parseDateTimeValue($value, $timeValue);
|
||||
}
|
||||
|
||||
/**
|
||||
* Parses a date and optionally a time if timeAttribute is specified.
|
||||
|
@ -21,7 +21,7 @@ return array (
|
||||
'Login' => '',
|
||||
'Logout' => 'Zarrar sesión',
|
||||
'Menu' => 'Menú',
|
||||
'Module is not on this content container enabled!' => '',
|
||||
'Module is not enabled on this content container!' => '',
|
||||
'My profile' => 'O mío perfil',
|
||||
'New profile image' => 'Nueva imachen de perfil',
|
||||
'Next' => '',
|
||||
|
File diff suppressed because one or more lines are too long
@ -3,7 +3,7 @@ return array (
|
||||
'<strong>Latest</strong> updates' => '<strong>آخر</strong> التحديثات',
|
||||
'Account settings' => 'إعدادات الحساب',
|
||||
'Administration' => 'الإدارة',
|
||||
'Allow' => '',
|
||||
'Allow' => 'السماح',
|
||||
'Back' => 'عودة',
|
||||
'Back to dashboard' => 'عودة لسطح المكتب',
|
||||
'Choose language:' => 'خيارات اللغه:',
|
||||
@ -12,7 +12,7 @@ return array (
|
||||
'Could not determine content container!' => 'لم يمكن تحديد content container!',
|
||||
'Could not find content of addon!' => 'لم يمكن ايجاد محتويات الإضافة',
|
||||
'Default' => '',
|
||||
'Deny' => '',
|
||||
'Deny' => 'رفض',
|
||||
'Error' => 'خطأ',
|
||||
'Expand' => 'توسعة',
|
||||
'It looks like you may have taken the wrong turn.' => 'يبدو انك أتيت للصفحة الخطأ',
|
||||
@ -21,7 +21,7 @@ return array (
|
||||
'Login' => 'تسجيل الدخول',
|
||||
'Logout' => 'تسجيل الخروج',
|
||||
'Menu' => 'القائمة',
|
||||
'Module is not on this content container enabled!' => 'الموديل ليس متاحاً في هذه الخانة',
|
||||
'Module is not enabled on this content container!' => 'الموديل ليس متاحاً في هذه الخانة',
|
||||
'My profile' => 'صفحتي الشخصية',
|
||||
'New profile image' => 'صورة شخصية جديدة',
|
||||
'Next' => '',
|
||||
|
@ -21,7 +21,7 @@ return array (
|
||||
'Login' => 'Вход',
|
||||
'Logout' => 'Изход',
|
||||
'Menu' => 'Меню',
|
||||
'Module is not on this content container enabled!' => '',
|
||||
'Module is not enabled on this content container!' => '',
|
||||
'My profile' => 'Моят Профил',
|
||||
'New profile image' => 'Нова профилна картинка',
|
||||
'Next' => '',
|
||||
|
@ -21,7 +21,7 @@ return array (
|
||||
'Login' => 'Inici de sessió',
|
||||
'Logout' => 'Sortir',
|
||||
'Menu' => 'Menú',
|
||||
'Module is not on this content container enabled!' => '',
|
||||
'Module is not enabled on this content container!' => '',
|
||||
'My profile' => 'El meu perfil',
|
||||
'New profile image' => 'Nova imatge de perfil',
|
||||
'Next' => 'Següent',
|
||||
|
File diff suppressed because one or more lines are too long
@ -21,7 +21,7 @@ return array (
|
||||
'Login' => 'Přihlásit se',
|
||||
'Logout' => 'Odhlásit',
|
||||
'Menu' => 'Menu',
|
||||
'Module is not on this content container enabled!' => 'Modul nebyl nalezen nebo je vypnut!',
|
||||
'Module is not enabled on this content container!' => 'Modul nebyl nalezen nebo je vypnut!',
|
||||
'My profile' => 'Můj profil',
|
||||
'New profile image' => 'Nový profilový obrázek',
|
||||
'Next' => 'Další',
|
||||
|
File diff suppressed because one or more lines are too long
@ -21,7 +21,7 @@ return array (
|
||||
'Login' => 'Log ind',
|
||||
'Logout' => 'Log ud',
|
||||
'Menu' => 'Menu',
|
||||
'Module is not on this content container enabled!' => 'Modulet er ikke aktiveret i denne indholdscontainer!',
|
||||
'Module is not enabled on this content container!' => 'Modulet er ikke aktiveret i denne indholdscontainer!',
|
||||
'My profile' => 'Min profil',
|
||||
'New profile image' => 'Nyt profilbillede',
|
||||
'Next' => 'Næste',
|
||||
|
File diff suppressed because one or more lines are too long
@ -21,7 +21,7 @@ return array (
|
||||
'Login' => 'Anmelden',
|
||||
'Logout' => 'Ausloggen',
|
||||
'Menu' => 'Menü',
|
||||
'Module is not on this content container enabled!' => 'Dieses Modul ist in diesem Content Container nicht aktiviert!',
|
||||
'Module is not enabled on this content container!' => 'Dieses Modul ist in diesem Content Container nicht aktiviert!',
|
||||
'My profile' => 'Mein Profil',
|
||||
'New profile image' => 'Neues Profilbild',
|
||||
'Next' => 'Nächster',
|
||||
|
@ -21,7 +21,7 @@ return array (
|
||||
'Login' => '',
|
||||
'Logout' => 'Αποσύνδεση',
|
||||
'Menu' => 'Μενού',
|
||||
'Module is not on this content container enabled!' => '',
|
||||
'Module is not enabled on this content container!' => '',
|
||||
'My profile' => 'Το προφίλ μου',
|
||||
'New profile image' => 'Νέα εικόνα προφίλ',
|
||||
'Next' => '',
|
||||
|
File diff suppressed because one or more lines are too long
@ -21,7 +21,7 @@ return array (
|
||||
'Login' => 'Iniciar sesión',
|
||||
'Logout' => 'Salir',
|
||||
'Menu' => 'Menú',
|
||||
'Module is not on this content container enabled!' => 'El módulo no está habilitado en este contenedor de contenido!',
|
||||
'Module is not enabled on this content container!' => 'El módulo no está habilitado en este contenedor de contenido!',
|
||||
'My profile' => 'Mi perfil',
|
||||
'New profile image' => 'Nueva imagen de perfil',
|
||||
'Next' => 'Siguiente',
|
||||
|
@ -1,23 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* Message translations.
|
||||
*
|
||||
* This file is automatically generated by 'yii message' command.
|
||||
* It contains the localizable messages extracted from source code.
|
||||
* You may modify this file by translating the extracted messages.
|
||||
*
|
||||
* Each array element represents the translation (value) of a message (key).
|
||||
* If the value is empty, the message is considered as not translated.
|
||||
* Messages that no longer need translation will have their translations
|
||||
* enclosed between a pair of '@@' marks.
|
||||
*
|
||||
* Message string can be used with plural forms format. Check i18n section
|
||||
* of the guide for details.
|
||||
*
|
||||
* NOTE: this file must be saved in UTF-8 encoding.
|
||||
*/
|
||||
return [
|
||||
'An internal server error occurred.' => '',
|
||||
'You are not allowed to perform this action.' => '',
|
||||
'<strong>Login</strong> required' => 'Es necesario <strong>iniciar sesión</strong>',
|
||||
];
|
||||
return array (
|
||||
'<strong>Login</strong> required' => 'Es necesario <strong>iniciar sesión</strong>',
|
||||
'An internal server error occurred.' => 'Un error interno ha ocurrido',
|
||||
'You are not allowed to perform this action.' => 'Usted no tiene permisos para ejecutar esta acción',
|
||||
);
|
||||
|
File diff suppressed because one or more lines are too long
@ -21,7 +21,7 @@ return array (
|
||||
'Login' => 'ورود',
|
||||
'Logout' => 'خروج',
|
||||
'Menu' => 'منو',
|
||||
'Module is not on this content container enabled!' => 'ماژول در این نگهدارندهی محتوا فعال نیست!',
|
||||
'Module is not enabled on this content container!' => 'ماژول در این نگهدارندهی محتوا فعال نیست!',
|
||||
'My profile' => 'پروفایل من',
|
||||
'New profile image' => 'عکس پروفایل جدید',
|
||||
'Next' => 'بعدي',
|
||||
|
File diff suppressed because one or more lines are too long
@ -21,7 +21,7 @@ return array (
|
||||
'Login' => 'Login',
|
||||
'Logout' => 'Se déconnecter',
|
||||
'Menu' => 'Menu',
|
||||
'Module is not on this content container enabled!' => 'Le module n\'est pas activé pour ce conteneur',
|
||||
'Module is not enabled on this content container!' => 'Le module n\'est pas activé pour ce conteneur',
|
||||
'My profile' => 'Mon profil',
|
||||
'New profile image' => 'Nouvelle image de profil',
|
||||
'Next' => 'Suivant',
|
||||
|
@ -38,7 +38,7 @@ return [
|
||||
'Login' => '',
|
||||
'Logout' => '',
|
||||
'Menu' => '',
|
||||
'Module is not on this content container enabled!' => '',
|
||||
'Module is not enabled on this content container!' => '',
|
||||
'My profile' => '',
|
||||
'New profile image' => '',
|
||||
'Next' => '',
|
||||
|
@ -25,7 +25,7 @@ return [
|
||||
'Default' => '',
|
||||
'Deny' => '',
|
||||
'It looks like you may have taken the wrong turn.' => '',
|
||||
'Module is not on this content container enabled!' => '',
|
||||
'Module is not enabled on this content container!' => '',
|
||||
'New profile image' => '',
|
||||
'Next' => '',
|
||||
'Ok' => '',
|
||||
|
@ -21,7 +21,7 @@ return array (
|
||||
'Login' => 'Masuk',
|
||||
'Logout' => 'Keluar',
|
||||
'Menu' => 'Menu',
|
||||
'Module is not on this content container enabled!' => '@@',
|
||||
'Module is not enabled on this content container!' => '@@',
|
||||
'My profile' => 'Profil saya',
|
||||
'New profile image' => 'Gambar profil baru',
|
||||
'Next' => '',
|
||||
|
File diff suppressed because one or more lines are too long
@ -18,10 +18,10 @@ return array (
|
||||
'It looks like you may have taken the wrong turn.' => 'Sembrerebbe che tu abbia preso una strada sbagliata.',
|
||||
'Language' => 'Lingua',
|
||||
'Latest news' => 'Ultime notizie',
|
||||
'Login' => '',
|
||||
'Login' => 'Login',
|
||||
'Logout' => 'Esci',
|
||||
'Menu' => 'Menu',
|
||||
'Module is not on this content container enabled!' => 'Il modulo non è abilitato in questo contenitore!',
|
||||
'Module is not enabled on this content container!' => 'Il modulo non è abilitato in questo contenitore!',
|
||||
'My profile' => 'Il mio profilo',
|
||||
'New profile image' => 'Nuova immagine profilo',
|
||||
'Next' => 'Avanti',
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
return array (
|
||||
'<strong>Login</strong> required' => '<strong>Login</strong> obbligatorio',
|
||||
'An internal server error occurred.' => '',
|
||||
'An internal server error occurred.' => 'Errore interno del server.',
|
||||
'You are not allowed to perform this action.' => 'Non sei abilitato ad effettuare questa operazione.',
|
||||
);
|
||||
|
@ -9,7 +9,7 @@ return array (
|
||||
'Heading' => 'Intestazione',
|
||||
'Image' => 'Immagine',
|
||||
'Image/File' => 'Immagine/File',
|
||||
'Insert Hyperlink' => '',
|
||||
'Insert Hyperlink' => 'Inserisci un hyperlink',
|
||||
'Insert Image Hyperlink' => '',
|
||||
'Italic' => 'Corsivo',
|
||||
'List' => 'Lista',
|
||||
@ -19,7 +19,7 @@ return array (
|
||||
'Target' => 'Destinazione',
|
||||
'Title' => 'Titolo',
|
||||
'Title of your link' => 'Titolo del tuo link',
|
||||
'URL/Link' => '',
|
||||
'URL/Link' => 'URL/Link',
|
||||
'code text here' => 'testo codice',
|
||||
'emphasized text' => 'testo corsivo',
|
||||
'enter image description here' => 'scrivi la descrizione dell\'immagine qui',
|
||||
|
File diff suppressed because one or more lines are too long
@ -39,7 +39,7 @@ return [
|
||||
'Login' => 'ログイン',
|
||||
'Logout' => 'ログアウト',
|
||||
'Menu' => 'メニュー',
|
||||
'Module is not on this content container enabled!' => 'このコンテンツコンテナに有効なモジュールがありません!',
|
||||
'Module is not enabled on this content container!' => 'このコンテンツコンテナに有効なモジュールがありません!',
|
||||
'My profile' => 'マイプロフィール',
|
||||
'New profile image' => '新しいプロフィール画像',
|
||||
'Next' => '次',
|
||||
|
File diff suppressed because one or more lines are too long
@ -42,7 +42,7 @@ return [
|
||||
'Login' => '로그인',
|
||||
'Logout' => '로그아웃',
|
||||
'Menu' => '메뉴',
|
||||
'Module is not on this content container enabled!' => '이 컨텐츠 컨테이너에는 모듈이 활성화되어 있지 않습니다!',
|
||||
'Module is not enabled on this content container!' => '이 컨텐츠 컨테이너에는 모듈이 활성화되어 있지 않습니다!',
|
||||
'My profile' => '내 프로필',
|
||||
'New profile image' => '새 프로필 이미지',
|
||||
'Oooops...' => '오 이런...',
|
||||
|
File diff suppressed because one or more lines are too long
@ -21,7 +21,7 @@ return array (
|
||||
'Login' => 'Prisijungti',
|
||||
'Logout' => 'Atsijungti',
|
||||
'Menu' => 'Meniu',
|
||||
'Module is not on this content container enabled!' => 'Modulis šioje turinio talpykloje negalimas!',
|
||||
'Module is not enabled on this content container!' => 'Modulis šioje turinio talpykloje negalimas!',
|
||||
'My profile' => 'Mano profilis',
|
||||
'New profile image' => 'Nauja profilio nuotrauka',
|
||||
'Next' => 'Kitas',
|
||||
|
@ -1 +1 @@
|
||||
{"Could not find requested module!":["Fant ikke forespurt modul!"],"Invalid request.":["Ugyldig forespørsel."],"Keyword:":["Nøkkelord:"],"Nothing found with your input.":["Fant ingenting"],"Results":["Resultater"],"Show more results":["Vis flere resultater"],"Sorry, nothing found!":["Beklager, fant ingenting."],"Welcome to %appName%":["Velkommen til %appName%"],"Account settings":["Innstillinger"],"Administration":["Administrasjon"],"Back to dashboard":["Tilbake til oversikten"],"Collapse":["Trekk sammen"],"Could not find content of addon!":["Kunne ikke finne innhold i tillegg!"],"Error":["Feil"],"Expand":["Utvid"],"Insufficent permissions to create content!":["Ikke tilgang til å lage innhold!"],"Latest news":["Siste nytt"],"Logout":["Logg ut"],"Menu":["Meny"],"Module is not on this content container enabled!":["Modulen er ikke aktivert for dette innholdet"],"My profile":["Min profil"],"New profile image":["Nytt profilbilde"],"Oooops...":["Oooops..."],"Search":["Søk"],"Search for users and spaces":["Søk etter brukere eller områder"],"Space not found!":["Fant ikke område."],"User Approvals":["Godkjenninger"],"User not found!":["Fant ikke bruker."],"You cannot create public visible content!":["Du kan ikke opprette offentlig synlig innhold!"],"Your daily summary":["Daglig sammendrag"],"<strong>Login</strong> required":["<strong>로그인</strong>이 필요합니다."],"Close":["Lukk"],"Title":["Tittel"],"Save":["Lagre"],"Message":["Melding"],"Allow limited access for non-authenticated users (guests)":["인증되지 않은 사용자들에게 제한된 접근을 허용 (게스트)"],"Anonymous users can register":["익명 사용자가 등록할 수 있음"],"Default user group for new users":["새 사용자들이 소속될 기본 그룹"],"Default user idle timeout, auto-logout (in seconds, optional)":["사용자의 기본 타임아웃, 자동 로그아웃 시간 (초 단위 입력, 옵션)"],"Default user profile visibility":["사용자 프로필의 기본 가시성"],"Members can invite external users by email":["회원들이 이메일로 외부 사람을 초대 가능"],"Require group admin approval after registration":["가입 후 그룹 관리자의 승인이 필요하게 하기"],"Base URL":["기본 URL"],"Default language":["기본 언어"],"Default space":["기본 스페이스"],"Invalid space":["올바르지 않은 스페이스"],"Logo upload":["로고 업로드"],"Name of the application":["어플리케이션 이름"],"Show introduction tour for new users":["새 유저들을 위한 튜토리얼 보이기"],"Show user profile post form on dashboard":["대시보드에서 유저 프로필 폼 보이기"],"Back to modules":["Tilbake til moduler"],"Active":["Aktiv"],"Mark as unseen for all users":["Marker som usett for alle brukere"],"Breaking News Configuration":["Innstillinger for siste nytt"],"Note: You can use markdown syntax.":["Merk: Du kan bruker Markdown-syntaks."]}
|
||||
{"Could not find requested module!":["Fant ikke forespurt modul!"],"Invalid request.":["Ugyldig forespørsel."],"Keyword:":["Nøkkelord:"],"Nothing found with your input.":["Fant ingenting"],"Results":["Resultater"],"Show more results":["Vis flere resultater"],"Sorry, nothing found!":["Beklager, fant ingenting."],"Welcome to %appName%":["Velkommen til %appName%"],"Account settings":["Innstillinger"],"Administration":["Administrasjon"],"Back to dashboard":["Tilbake til oversikten"],"Collapse":["Trekk sammen"],"Could not find content of addon!":["Kunne ikke finne innhold i tillegg!"],"Error":["Feil"],"Expand":["Utvid"],"Insufficent permissions to create content!":["Ikke tilgang til å lage innhold!"],"Latest news":["Siste nytt"],"Logout":["Logg ut"],"Menu":["Meny"],"Module is not on this content container enabled!":["Modulen er ikke aktivert for dette innholdet"],"My profile":["Min profil"],"New profile image":["Nytt profilbilde"],"Oooops...":["Oooops..."],"Search":["Søk"],"Search for users and spaces":["Søk etter brukere eller områder"],"Space not found!":["Fant ikke område."],"User Approvals":["Godkjenninger"],"User not found!":["Fant ikke bruker."],"You cannot create public visible content!":["Du kan ikke opprette offentlig synlig innhold!"],"Your daily summary":["Daglig sammendrag"],"<strong>Login</strong> required":["<strong>로그인</strong>이 필요합니다."],"Close":["Lukk"],"Title":["Tittel"],"Save":["Lagre"],"Message":["Melding"],"Allow limited access for non-authenticated users (guests)":["인증되지 않은 사용자들에게 제한된 접근을 허용 (게스트)"],"Anonymous users can register":["익명 사용자가 등록할 수 있음"],"Default user group for new users":["새 사용자들이 소속될 기본 그룹"],"Default user idle timeout, auto-logout (in seconds, optional)":["사용자의 기본 타임아웃, 자동 로그아웃 시간 (초 단위 입력, 옵션)"],"Default user profile visibility":["사용자 프로필의 기본 가시성"],"Members can invite external users by email":["회원들이 이메일로 외부 사람을 초대 가능"],"Require group admin approval after registration":["가입 후 그룹 관리자의 승인이 필요하게 하기"],"Base URL":["기본 URL"],"Default language":["기본 언어"],"Default space":["기본 스페이스"],"Invalid space":["올바르지 않은 스페이스"],"Logo upload":["로고 업로드"],"Name of the application":["어플리케이션 이름"],"Show introduction tour for new users":["새 유저들을 위한 튜토리얼 보이기"],"Show user profile post form on dashboard":["대시보드에서 유저 프로필 폼 보이기"],"Back to modules":["Tilbake til moduler"],"Active":["Aktiv"],"Mark as unseen for all users":["Marker som usett for alle brukere"],"Breaking News Configuration":["Innstillinger for siste nytt"],"Note: You can use markdown syntax.":["Merk: Du kan bruker Markdown-syntaks."],"Module is not enabled on this content container!":["Modulen er ikke aktivert for dette innholdet"]}
|
@ -21,7 +21,7 @@ return array (
|
||||
'Login' => '',
|
||||
'Logout' => 'Logg ut',
|
||||
'Menu' => 'Meny',
|
||||
'Module is not on this content container enabled!' => 'Modulen er ikke aktivert for dette innholdet',
|
||||
'Module is not enabled on this content container!' => 'Modulen er ikke aktivert for dette innholdet',
|
||||
'My profile' => 'Min profil',
|
||||
'New profile image' => 'Nytt profilbilde',
|
||||
'Next' => '',
|
||||
|
File diff suppressed because one or more lines are too long
@ -21,7 +21,7 @@ return array (
|
||||
'Login' => 'Log in',
|
||||
'Logout' => 'Uitloggen',
|
||||
'Menu' => 'Menu',
|
||||
'Module is not on this content container enabled!' => 'Module is niet op deze inhoud container ingeschakeld!',
|
||||
'Module is not enabled on this content container!' => 'Module is niet op deze inhoud container ingeschakeld!',
|
||||
'My profile' => 'Mijn profiel',
|
||||
'New profile image' => 'Nieuwe profielfoto',
|
||||
'Next' => 'Volgende',
|
||||
|
File diff suppressed because one or more lines are too long
@ -21,7 +21,7 @@ return array (
|
||||
'Login' => 'Login',
|
||||
'Logout' => 'Wyloguj',
|
||||
'Menu' => 'Menu',
|
||||
'Module is not on this content container enabled!' => 'Moduł w tym kontenerze nie jest uruchomiony!',
|
||||
'Module is not enabled on this content container!' => 'Moduł w tym kontenerze nie jest uruchomiony!',
|
||||
'My profile' => 'Mój profil',
|
||||
'New profile image' => 'Nowe zdjęcie profilowe',
|
||||
'Next' => 'Dalej',
|
||||
|
File diff suppressed because one or more lines are too long
@ -21,7 +21,7 @@ return array (
|
||||
'Login' => '',
|
||||
'Logout' => 'Sair',
|
||||
'Menu' => 'Menu',
|
||||
'Module is not on this content container enabled!' => 'O modulo não está neste recipiente e o seu conteúdo não está activo!',
|
||||
'Module is not enabled on this content container!' => 'O modulo não está neste recipiente e o seu conteúdo não está activo!',
|
||||
'My profile' => 'Meu perfil',
|
||||
'New profile image' => 'Nova imagem de perfil',
|
||||
'Next' => '',
|
||||
|
File diff suppressed because one or more lines are too long
@ -3,7 +3,7 @@ return array (
|
||||
'<strong>Latest</strong> updates' => 'Atualizações',
|
||||
'Account settings' => 'Configurações da conta',
|
||||
'Administration' => 'Administração',
|
||||
'Allow' => '',
|
||||
'Allow' => 'Permitir',
|
||||
'Back' => 'Voltar',
|
||||
'Back to dashboard' => 'Voltar para o painel',
|
||||
'Choose language:' => 'Escolha o idioma:',
|
||||
@ -11,8 +11,8 @@ return array (
|
||||
'Content Addon source must be instance of HActiveRecordContent or HActiveRecordContentAddon!' => 'Conteúdo fonte Addon deve ser instância de HActiveRecordContent ou HActiveRecordContentAddon!',
|
||||
'Could not determine content container!' => 'Não foi possível determinar o conteúdo!',
|
||||
'Could not find content of addon!' => 'Não foi possível encontrar o conteúdo !',
|
||||
'Default' => '',
|
||||
'Deny' => '',
|
||||
'Default' => 'Padrão',
|
||||
'Deny' => 'Recusar',
|
||||
'Error' => 'Erro',
|
||||
'Expand' => 'Expandir',
|
||||
'It looks like you may have taken the wrong turn.' => 'Parece que você pode ter tomado o caminho errado.',
|
||||
@ -21,13 +21,13 @@ return array (
|
||||
'Login' => 'Login',
|
||||
'Logout' => 'Sair',
|
||||
'Menu' => 'Menu',
|
||||
'Module is not on this content container enabled!' => 'O módulo não está habilitado para este container!',
|
||||
'Module is not enabled on this content container!' => 'O módulo não está habilitado para este container!',
|
||||
'My profile' => 'Meu perfil',
|
||||
'New profile image' => 'Nova imagem de perfil',
|
||||
'Next' => 'Avançar',
|
||||
'Ok' => 'Ok',
|
||||
'Oooops...' => 'Oooops...',
|
||||
'Please type at least 3 characters' => '',
|
||||
'Please type at least 3 characters' => 'Por favor digite pelo menos 3 caracteres',
|
||||
'Save' => 'Salvar',
|
||||
'Search' => 'Busca',
|
||||
'Search for users and spaces' => 'Busca por usuários e espaços',
|
||||
|
File diff suppressed because one or more lines are too long
@ -21,7 +21,7 @@ return array (
|
||||
'Login' => 'Autentificare',
|
||||
'Logout' => 'Ieșire cont',
|
||||
'Menu' => 'Meniu',
|
||||
'Module is not on this content container enabled!' => 'Modulul nu este pe acest container de conținut activat!',
|
||||
'Module is not enabled on this content container!' => 'Modulul nu este pe acest container de conținut activat!',
|
||||
'My profile' => 'Profilul meu',
|
||||
'New profile image' => 'Imagine nouă de profil',
|
||||
'Next' => '',
|
||||
|
File diff suppressed because one or more lines are too long
@ -21,7 +21,7 @@ return array (
|
||||
'Login' => 'Войти',
|
||||
'Logout' => 'Выйти',
|
||||
'Menu' => 'Меню',
|
||||
'Module is not on this content container enabled!' => 'Модуль не включён в этой оболочке контента',
|
||||
'Module is not enabled on this content container!' => 'Модуль не включён в этой оболочке контента',
|
||||
'My profile' => 'Мой профиль',
|
||||
'New profile image' => 'Новое изображение профиля',
|
||||
'Next' => 'Следующий',
|
||||
|
@ -38,7 +38,7 @@ return [
|
||||
'Login' => '',
|
||||
'Logout' => '',
|
||||
'Menu' => '',
|
||||
'Module is not on this content container enabled!' => '',
|
||||
'Module is not enabled on this content container!' => '',
|
||||
'My profile' => '',
|
||||
'New profile image' => '',
|
||||
'Next' => '',
|
||||
|
@ -21,7 +21,7 @@ return array (
|
||||
'Login' => '',
|
||||
'Logout' => 'Logga ut',
|
||||
'Menu' => 'Meny',
|
||||
'Module is not on this content container enabled!' => '',
|
||||
'Module is not enabled on this content container!' => '',
|
||||
'My profile' => 'Min profil',
|
||||
'New profile image' => 'Ny profil bild',
|
||||
'Next' => '',
|
||||
|
@ -20,7 +20,7 @@ return [
|
||||
'Content Addon source must be instance of HActiveRecordContent or HActiveRecordContentAddon!' => '',
|
||||
'Could not determine content container!' => '',
|
||||
'Could not find content of addon!' => '',
|
||||
'Module is not on this content container enabled!' => '',
|
||||
'Module is not enabled on this content container!' => '',
|
||||
'Ok' => '',
|
||||
'<strong>Latest</strong> updates' => '<strong>อัพเดท</strong> ล่าสุด',
|
||||
'Account settings' => 'ตั้งค่าบัญชี',
|
||||
|
File diff suppressed because one or more lines are too long
@ -21,7 +21,7 @@ return array (
|
||||
'Login' => 'Giriş',
|
||||
'Logout' => 'Çıkış',
|
||||
'Menu' => 'Menü',
|
||||
'Module is not on this content container enabled!' => 'Etkin içerik kabı üzerinde modül etkin değil!',
|
||||
'Module is not enabled on this content container!' => 'Etkin içerik kabı üzerinde modül etkin değil!',
|
||||
'My profile' => 'Profilim',
|
||||
'New profile image' => 'Yeni profil resmi',
|
||||
'Next' => 'İleri',
|
||||
|
@ -38,7 +38,7 @@ return [
|
||||
'Login' => '',
|
||||
'Logout' => '',
|
||||
'Menu' => '',
|
||||
'Module is not on this content container enabled!' => '',
|
||||
'Module is not enabled on this content container!' => '',
|
||||
'My profile' => '',
|
||||
'New profile image' => '',
|
||||
'Next' => '',
|
||||
|
@ -38,7 +38,7 @@ return [
|
||||
'Login' => '',
|
||||
'Logout' => '',
|
||||
'Menu' => '',
|
||||
'Module is not on this content container enabled!' => '',
|
||||
'Module is not enabled on this content container!' => '',
|
||||
'My profile' => '',
|
||||
'New profile image' => '',
|
||||
'Next' => '',
|
||||
|
@ -27,7 +27,7 @@ return [
|
||||
'Deny' => '',
|
||||
'It looks like you may have taken the wrong turn.' => '',
|
||||
'Login' => '',
|
||||
'Module is not on this content container enabled!' => '',
|
||||
'Module is not enabled on this content container!' => '',
|
||||
'Next' => '',
|
||||
'Ok' => '',
|
||||
'Oooops...' => '',
|
||||
|
File diff suppressed because one or more lines are too long
@ -21,7 +21,7 @@ return array (
|
||||
'Login' => '',
|
||||
'Logout' => '退出',
|
||||
'Menu' => '菜单',
|
||||
'Module is not on this content container enabled!' => '',
|
||||
'Module is not enabled on this content container!' => '',
|
||||
'My profile' => '我的资料',
|
||||
'New profile image' => '新图片',
|
||||
'Next' => '',
|
||||
|
@ -21,7 +21,7 @@ return array (
|
||||
'Login' => '',
|
||||
'Logout' => '登出',
|
||||
'Menu' => '選單',
|
||||
'Module is not on this content container enabled!' => '',
|
||||
'Module is not enabled on this content container!' => '',
|
||||
'My profile' => '我的個人資料',
|
||||
'New profile image' => '新圖檔',
|
||||
'Next' => '',
|
||||
|
@ -149,7 +149,7 @@ class Setting extends \yii\db\ActiveRecord
|
||||
} elseif ($name == 'user' && $moduleId == 'proxy') {
|
||||
return array('proxy.user', 'base');
|
||||
} elseif ($name == 'pass' && $moduleId == 'proxy') {
|
||||
return array('proxy.pass', 'base');
|
||||
return array('proxy.password', 'base');
|
||||
} elseif ($name == 'noproxy' && $moduleId == 'proxy') {
|
||||
return array('proxy.noproxy', 'base');
|
||||
}
|
||||
|
@ -182,7 +182,7 @@ class UrlOembed extends \yii\db\ActiveRecord
|
||||
curl_setopt($curl, CURLOPT_PROXYUSERNAME, Yii::$app->settings->get('proxy.user'));
|
||||
}
|
||||
if (defined('CURLOPT_PROXYPASSWORD')) {
|
||||
curl_setopt($curl, CURLOPT_PROXYPASSWORD, Yii::$app->settings->get('proxy.pass'));
|
||||
curl_setopt($curl, CURLOPT_PROXYPASSWORD, Yii::$app->settings->get('proxy.password'));
|
||||
}
|
||||
if (defined('CURLOPT_NOPROXY')) {
|
||||
curl_setopt($curl, CURLOPT_NOPROXY, Yii::$app->settings->get('proxy.noproxy'));
|
||||
|
@ -0,0 +1,101 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @link https://www.humhub.org/
|
||||
* @copyright Copyright (c) 2016 HumHub GmbH & Co. KG
|
||||
* @license https://www.humhub.com/licences
|
||||
*/
|
||||
|
||||
namespace humhub\modules\admin\controllers;
|
||||
|
||||
use Yii;
|
||||
use humhub\modules\admin\components\Controller;
|
||||
use humhub\components\behaviors\AccessControl;
|
||||
|
||||
/**
|
||||
* ApprovalController handels new user approvals
|
||||
*/
|
||||
class AuthenticationController extends Controller
|
||||
{
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function init()
|
||||
{
|
||||
$this->setActionTitles([
|
||||
'basic' => Yii::t('AdminModule.base', 'Basic'),
|
||||
'authentication' => Yii::t('AdminModule.base', 'Authentication'),
|
||||
'authentication-ldap' => Yii::t('AdminModule.base', 'Authentication')
|
||||
]);
|
||||
|
||||
$this->subLayout = '@admin/views/layouts/user';
|
||||
return parent::init();
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function behaviors()
|
||||
{
|
||||
return [
|
||||
'acl' => [
|
||||
'class' => AccessControl::className(),
|
||||
]
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a List of Users
|
||||
*/
|
||||
public function actionIndex()
|
||||
{
|
||||
$form = new \humhub\modules\admin\models\forms\AuthenticationSettingsForm;
|
||||
if ($form->load(Yii::$app->request->post()) && $form->validate() && $form->save()) {
|
||||
Yii::$app->getSession()->setFlash('data-saved', Yii::t('AdminModule.controllers_SettingController', 'Saved'));
|
||||
}
|
||||
|
||||
// Build Group Dropdown
|
||||
$groups = [];
|
||||
$groups[''] = Yii::t('AdminModule.controllers_SettingController', 'None - shows dropdown in user registration.');
|
||||
foreach (\humhub\modules\user\models\Group::find()->all() as $group) {
|
||||
if (!$group->is_admin_group) {
|
||||
$groups[$group->id] = $group->name;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->render('authentication', array('model' => $form, 'groups' => $groups));
|
||||
}
|
||||
|
||||
public function actionAuthenticationLdap()
|
||||
{
|
||||
$form = new \humhub\modules\admin\models\forms\AuthenticationLdapSettingsForm;
|
||||
if ($form->load(Yii::$app->request->post()) && $form->validate() && $form->save()) {
|
||||
Yii::$app->getSession()->setFlash('data-saved', Yii::t('AdminModule.controllers_SettingController', 'Saved'));
|
||||
return $this->redirect(['/admin/authentication/authentication-ldap']);
|
||||
}
|
||||
|
||||
$enabled = false;
|
||||
$userCount = 0;
|
||||
$errorMessage = "";
|
||||
|
||||
if (Yii::$app->getModule('user')->settings->get('auth.ldap.enabled')) {
|
||||
$enabled = true;
|
||||
try {
|
||||
$ldapAuthClient = new \humhub\modules\user\authclient\ZendLdapClient();
|
||||
$ldap = $ldapAuthClient->getLdap();
|
||||
$userCount = $ldap->count(
|
||||
Yii::$app->getModule('user')->settings->get('auth.ldap.userFilter'), Yii::$app->getModule('user')->settings->get('auth.ldap.baseDn'), \Zend\Ldap\Ldap::SEARCH_SCOPE_SUB
|
||||
);
|
||||
} catch (\Zend\Ldap\Exception\LdapException $ex) {
|
||||
$errorMessage = $ex->getMessage();
|
||||
} catch (\Exception $ex) {
|
||||
$errorMessage = $ex->getMessage();
|
||||
}
|
||||
}
|
||||
|
||||
return $this->render('authentication_ldap', array('model' => $form, 'enabled' => $enabled, 'userCount' => $userCount, 'errorMessage' => $errorMessage));
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
@ -66,7 +66,21 @@ class InformationController extends Controller
|
||||
*/
|
||||
public function actionCronjobs()
|
||||
{
|
||||
return $this->render('cronjobs', array());
|
||||
|
||||
$currentUser = '';
|
||||
if (function_exists('get_current_user')) {
|
||||
$currentUser = get_current_user();
|
||||
}
|
||||
|
||||
$lastRunHourly = Yii::$app->settings->getUncached('cronLastHourlyRun');
|
||||
$lastRunDaily = Yii::$app->settings->getUncached('cronLastDailyRun');
|
||||
|
||||
|
||||
return $this->render('cronjobs', [
|
||||
'lastRunHourly' => $lastRunHourly,
|
||||
'lastRunDaily' => $lastRunDaily,
|
||||
'currentUser' => $currentUser
|
||||
]);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -12,7 +12,6 @@ use Yii;
|
||||
use humhub\libs\ThemeHelper;
|
||||
use humhub\models\UrlOembed;
|
||||
use humhub\modules\admin\components\Controller;
|
||||
use humhub\modules\user\libs\Ldap;
|
||||
|
||||
/**
|
||||
* SettingController
|
||||
@ -29,8 +28,6 @@ class SettingController extends Controller
|
||||
{
|
||||
$this->setActionTitles([
|
||||
'basic' => Yii::t('AdminModule.base', 'Basic'),
|
||||
'authentication' => Yii::t('AdminModule.base', 'Authentication'),
|
||||
'authentication-ldap' => Yii::t('AdminModule.base', 'Authentication'),
|
||||
'caching' => Yii::t('AdminModule.base', 'Caching'),
|
||||
'statistic' => Yii::t('AdminModule.base', 'Statistics'),
|
||||
'mailing' => Yii::t('AdminModule.base', 'Mailing'),
|
||||
@ -83,64 +80,6 @@ class SettingController extends Controller
|
||||
return [];
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a List of Users
|
||||
*/
|
||||
public function actionAuthentication()
|
||||
{
|
||||
$form = new \humhub\modules\admin\models\forms\AuthenticationSettingsForm;
|
||||
if ($form->load(Yii::$app->request->post()) && $form->validate() && $form->save()) {
|
||||
Yii::$app->getSession()->setFlash('data-saved', Yii::t('AdminModule.controllers_SettingController', 'Saved'));
|
||||
}
|
||||
|
||||
// Build Group Dropdown
|
||||
$groups = array();
|
||||
$groups[''] = Yii::t('AdminModule.controllers_SettingController', 'None - shows dropdown in user registration.');
|
||||
foreach (\humhub\modules\user\models\Group::find()->all() as $group) {
|
||||
if (!$group->is_admin_group) {
|
||||
$groups[$group->id] = $group->name;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->render('authentication', array('model' => $form, 'groups' => $groups));
|
||||
}
|
||||
|
||||
public function actionAuthenticationLdap()
|
||||
{
|
||||
$form = new \humhub\modules\admin\models\forms\AuthenticationLdapSettingsForm;
|
||||
if ($form->load(Yii::$app->request->post()) && $form->validate() && $form->save()) {
|
||||
Yii::$app->getSession()->setFlash('data-saved', Yii::t('AdminModule.controllers_SettingController', 'Saved'));
|
||||
return $this->redirect(['/admin/setting/authentication-ldap']);
|
||||
}
|
||||
|
||||
$enabled = false;
|
||||
$userCount = 0;
|
||||
$errorMessage = "";
|
||||
|
||||
if (Yii::$app->getModule('user')->settings->get('auth.ldap.enabled')) {
|
||||
$enabled = true;
|
||||
try {
|
||||
$ldapAuthClient = new \humhub\modules\user\authclient\ZendLdapClient();
|
||||
$ldap = $ldapAuthClient->getLdap();
|
||||
$userCount = $ldap->count(
|
||||
Yii::$app->getModule('user')->settings->get('auth.ldap.userFilter'), Yii::$app->getModule('user')->settings->get('auth.ldap.baseDn'), \Zend\Ldap\Ldap::SEARCH_SCOPE_SUB
|
||||
);
|
||||
} catch (\Zend\Ldap\Exception\LdapException $ex) {
|
||||
$errorMessage = $ex->getMessage();
|
||||
} catch (\Exception $ex) {
|
||||
$errorMessage = $ex->getMessage();
|
||||
}
|
||||
}
|
||||
|
||||
return $this->render('authentication_ldap', array('model' => $form, 'enabled' => $enabled, 'userCount' => $userCount, 'errorMessage' => $errorMessage));
|
||||
}
|
||||
|
||||
public function actionLdapRefresh()
|
||||
{
|
||||
Ldap::getInstance()->refreshUsers();
|
||||
return $this->redirect(['/admin/setting/authentication-ldap']);
|
||||
}
|
||||
|
||||
/**
|
||||
* Caching Options
|
||||
*/
|
||||
@ -149,7 +88,7 @@ class SettingController extends Controller
|
||||
$form = new \humhub\modules\admin\models\forms\CacheSettingsForm;
|
||||
if ($form->load(Yii::$app->request->post()) && $form->validate() && $form->save()) {
|
||||
Yii::$app->cache->flush();
|
||||
|
||||
Yii::$app->assetManager->clear();
|
||||
Yii::$app->getSession()->setFlash('data-saved', Yii::t('AdminModule.controllers_SettingController', 'Saved and flushed cache'));
|
||||
return $this->redirect(['/admin/setting/caching']);
|
||||
}
|
||||
|
@ -82,6 +82,11 @@ class UserController extends Controller
|
||||
'class' => 'form-control',
|
||||
'maxlength' => 100,
|
||||
],
|
||||
'groupSelection' => [
|
||||
'id' => 'user_edit_groups',
|
||||
'type' => 'multiselectdropdown',
|
||||
'items' => UserEditForm::getGroupItems()
|
||||
],
|
||||
'status' => [
|
||||
'type' => 'dropdownlist',
|
||||
'class' => 'form-control',
|
||||
@ -90,11 +95,6 @@ class UserController extends Controller
|
||||
User::STATUS_DISABLED => Yii::t('AdminModule.controllers_UserController', 'Disabled'),
|
||||
User::STATUS_NEED_APPROVAL => Yii::t('AdminModule.controllers_UserController', 'Unapproved'),
|
||||
],
|
||||
],
|
||||
'groupSelection' => [
|
||||
'id' => 'user_edit_groups',
|
||||
'type' => 'multiselectdropdown',
|
||||
'items' => UserEditForm::getGroupItems()
|
||||
]
|
||||
],
|
||||
];
|
||||
|
@ -19,5 +19,7 @@
|
||||
return [
|
||||
'Min value is 20 seconds. If not set, session will timeout after 1400 seconds (24 minutes) regardless of activity (default session timeout)' => '',
|
||||
'Only applicable when limited access for non-authenticated users is enabled. Only affects new users.' => '',
|
||||
'Visible for members only' => '',
|
||||
'Visible for members+guests' => '',
|
||||
'Save' => 'Uložit',
|
||||
];
|
||||
|
@ -18,7 +18,7 @@
|
||||
*/
|
||||
return [
|
||||
'A TLS/SSL is strongly favored in production environments to prevent passwords from be transmitted in clear text.' => '',
|
||||
'Defines the filter to apply, when login is attempted. %uid replaces the username in the login action. Example: "(sAMAccountName=%s)" or "(uid=%s)"' => '',
|
||||
'Defines the filter to apply, when login is attempted. %s replaces the username in the login action. Example: "(sAMAccountName=%s)" or "(uid=%s)"' => '',
|
||||
'LDAP Attribute for E-Mail Address. Default: "mail"' => '',
|
||||
'LDAP Attribute for Username. Example: "uid" or "sAMAccountName"' => '',
|
||||
'Limit access to users meeting this criteria. Example: "(objectClass=posixAccount)" or "(&(objectClass=person)(memberOf=CN=Workers,CN=Users,DC=myDomain,DC=com))"' => '',
|
||||
|
@ -17,5 +17,6 @@
|
||||
* NOTE: this file must be saved in UTF-8 encoding.
|
||||
*/
|
||||
return [
|
||||
'You can add an statistics HTML code snippet - which will added to all rendered pags.' => '',
|
||||
'Save' => 'Uložit',
|
||||
];
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user