mirror of
https://github.com/humhub/humhub.git
synced 2025-04-22 16:11:55 +02:00
Merge branch 'master' into v1.2-dev
# Conflicts: # protected/humhub/modules/admin/controllers/ModuleController.php # protected/humhub/modules/admin/controllers/UserController.php # protected/humhub/modules/admin/widgets/SpaceMenu.php # protected/humhub/modules/content/Events.php # protected/humhub/modules/content/models/Wall.php # protected/humhub/modules/content/models/WallEntry.php # protected/humhub/modules/dashboard/components/actions/DashboardStream.php # protected/humhub/modules/dashboard/tests/codeception/unit/DashboardStreamTest.php # protected/humhub/modules/space/controllers/SpaceController.php # protected/humhub/modules/space/models/Membership.php # protected/humhub/modules/space/widgets/SpaceNameColorInput.php # protected/humhub/tests/codeception/unit/modules/activity/BaseActivityTest.php # protected/humhub/tests/codeception/unit/modules/notification/BaseNotificationTest.php
This commit is contained in:
commit
b0a854db10
1
.gitignore
vendored
1
.gitignore
vendored
@ -33,3 +33,4 @@ favicon.ico
|
||||
/.settings
|
||||
/.buildpath
|
||||
/.project
|
||||
/protected/vendor/
|
@ -168,29 +168,7 @@ $(document).ready(function () {
|
||||
initPlugins();
|
||||
|
||||
$(document).on('click', 'a[data-ui-loader], button[data-ui-loader]', function () {
|
||||
var $this = $(this);
|
||||
|
||||
if($this.find('.loader').length) {
|
||||
return false;
|
||||
}
|
||||
|
||||
//Adopt current color for the loader animation
|
||||
var color = $this.css('color') || '#ffffff';
|
||||
var $loader = $('<span class="loader"><span class="sk-spinner sk-spinner-three-bounce"><span class="sk-bounce1"></span><span class="sk-bounce2"></span><span class="sk-bounce3"></span></span></span>');
|
||||
|
||||
//Align bouncer animation color and size
|
||||
$loader.find('.sk-bounce1, .sk-bounce2, .sk-bounce3')
|
||||
.addClass('disabled')
|
||||
.css( {'background-color': color, 'width': '10px', 'height': '10px'});
|
||||
|
||||
//The loader does have some margin we have to hide
|
||||
$this.css('overflow', 'hidden');
|
||||
$this.addClass('disabled');
|
||||
|
||||
//Prevent the container from resizing
|
||||
$this.css('min-width', this.getBoundingClientRect().width);
|
||||
$this.data('text', $this.text());
|
||||
$this.html($loader);
|
||||
|
||||
});
|
||||
|
||||
$(document).on('afterValidate', function(evt, messages, errors) {
|
||||
|
@ -11,7 +11,7 @@ namespace humhub\commands;
|
||||
use Yii;
|
||||
use yii\console\Controller;
|
||||
use yii\helpers\Console;
|
||||
use humhub\models\Setting;
|
||||
|
||||
|
||||
/**
|
||||
* Cronjobs
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
namespace humhub\commands;
|
||||
|
||||
use Yii;
|
||||
|
||||
use yii\console\Controller;
|
||||
use yii\helpers\Console;
|
||||
|
||||
|
@ -9,12 +9,11 @@
|
||||
namespace humhub\commands;
|
||||
|
||||
use Yii;
|
||||
use yii\console\Controller;
|
||||
use yii\console\Exception;
|
||||
|
||||
|
||||
use yii\helpers\Console;
|
||||
use yii\helpers\FileHelper;
|
||||
use yii\helpers\VarDumper;
|
||||
use yii\i18n\GettextPoFile;
|
||||
|
||||
|
||||
/**
|
||||
* Extracts messages to be translated from source files.
|
||||
|
@ -9,8 +9,7 @@
|
||||
namespace humhub\commands;
|
||||
|
||||
use Yii;
|
||||
use yii\console\Controller;
|
||||
use yii\helpers\Console;
|
||||
|
||||
|
||||
/**
|
||||
* Manages application migrations.
|
||||
|
@ -8,9 +8,6 @@
|
||||
|
||||
namespace humhub\compat;
|
||||
|
||||
use \humhub\compat\CHtml;
|
||||
use yii\helpers\Html;
|
||||
|
||||
/**
|
||||
* CActiveForm is a Yii 1 compatible active form
|
||||
*
|
||||
|
@ -8,8 +8,6 @@
|
||||
|
||||
namespace humhub\components;
|
||||
|
||||
use Yii;
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
|
@ -8,9 +8,9 @@
|
||||
|
||||
namespace humhub\components;
|
||||
|
||||
use Yii;
|
||||
|
||||
use yii\helpers\Url;
|
||||
use humhub\models\Setting;
|
||||
|
||||
|
||||
/**
|
||||
* Base Controller
|
||||
|
@ -9,8 +9,8 @@
|
||||
namespace humhub\components;
|
||||
|
||||
use Yii;
|
||||
use humhub\models\ModuleEnabled;
|
||||
use yii\base\Exception;
|
||||
|
||||
|
||||
use yii\helpers\Json;
|
||||
|
||||
/**
|
||||
|
@ -11,7 +11,7 @@ namespace humhub\components;
|
||||
use Yii;
|
||||
use yii\helpers\FileHelper;
|
||||
use humhub\libs\ThemeHelper;
|
||||
use humhub\models\Setting;
|
||||
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
|
@ -9,7 +9,7 @@
|
||||
namespace humhub\components\behaviors;
|
||||
|
||||
use Yii;
|
||||
use yii\db\ActiveRecord;
|
||||
|
||||
use yii\base\Behavior;
|
||||
|
||||
/**
|
||||
|
@ -9,7 +9,6 @@
|
||||
namespace humhub\components\console;
|
||||
|
||||
use Yii;
|
||||
use humhub\models\Setting;
|
||||
|
||||
/**
|
||||
* Description of Application
|
||||
|
@ -9,7 +9,7 @@
|
||||
namespace humhub\components\i18n;
|
||||
|
||||
use Yii;
|
||||
use humhub\models\Setting;
|
||||
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
|
@ -10,7 +10,7 @@ namespace humhub\controllers;
|
||||
|
||||
use Yii;
|
||||
use humhub\components\Controller;
|
||||
use humhub\models\Setting;
|
||||
|
||||
use yii\web\HttpException;
|
||||
use yii\base\UserException;
|
||||
|
||||
|
@ -1,7 +1,10 @@
|
||||
Internationalization (I18N)
|
||||
===========================
|
||||
|
||||
**Optionally** you can use following module translation method instead of Yii's standard approach ([http://www.yiiframework.com/doc-2.0/guide-tutorial-i18n.html#translating-module-messages](http://www.yiiframework.com/doc-2.0/guide-tutorial-i18n.html#translating-module-messages)).
|
||||
**Optionally** you can use following module translation method instead of Yii's standard approach (<http://www.yiiframework.com/doc-2.0/guide-tutorial-i18n.html#translating-module-messages>).
|
||||
|
||||
For Internationalization to work properly, you should also consider the notes on [Setting Up PHP Environment](http://www.yiiframework.com/doc-2.0/guide-tutorial-i18n.html#setup-environment)
|
||||
from the Yii Guide.
|
||||
|
||||
|
||||
### Message Category
|
||||
|
@ -9,7 +9,7 @@
|
||||
namespace humhub\libs;
|
||||
|
||||
use Yii;
|
||||
use humhub\models\Setting;
|
||||
|
||||
|
||||
/**
|
||||
* CURLHelper
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
namespace humhub\libs;
|
||||
|
||||
use Yii;
|
||||
|
||||
use yii\grid\DataColumn;
|
||||
use yii\helpers\Html;
|
||||
|
||||
@ -86,7 +86,6 @@ class DropDownGridColumn extends DataColumn
|
||||
$i++;
|
||||
}
|
||||
|
||||
$options = [];
|
||||
if (is_array($this->dropDownOptions)) {
|
||||
$options = $this->dropDownOptions;
|
||||
} else {
|
||||
|
@ -10,8 +10,7 @@ namespace humhub\libs;
|
||||
|
||||
use Yii;
|
||||
use yii\helpers\ArrayHelper;
|
||||
use humhub\libs\ThemeHelper;
|
||||
use humhub\models\Setting;
|
||||
|
||||
|
||||
/**
|
||||
* DynamicConfig provides access to the dynamic configuration file.
|
||||
@ -128,20 +127,27 @@ class DynamicConfig extends \yii\base\Object
|
||||
if (Yii::$app->settings->get('mailer.transportType') == 'smtp') {
|
||||
$mail['transport']['class'] = 'Swift_SmtpTransport';
|
||||
|
||||
if (Yii::$app->settings->get('mailer.hostname'))
|
||||
if (Yii::$app->settings->get('mailer.hostname')) {
|
||||
$mail['transport']['host'] = Yii::$app->settings->get('mailer.hostname');
|
||||
}
|
||||
|
||||
if (Yii::$app->settings->get('mailer.username'))
|
||||
if (Yii::$app->settings->get('mailer.username')) {
|
||||
$mail['transport']['username'] = Yii::$app->settings->get('mailer.username');
|
||||
} else if(!Yii::$app->settings->get('mailer.password')) {
|
||||
$mail['transport']['authMode'] = 'null';
|
||||
}
|
||||
|
||||
if (Yii::$app->settings->get('mailer.password'))
|
||||
if (Yii::$app->settings->get('mailer.password')) {
|
||||
$mail['transport']['password'] = Yii::$app->settings->get('mailer.password');
|
||||
}
|
||||
|
||||
if (Yii::$app->settings->get('mailer.encryption'))
|
||||
if (Yii::$app->settings->get('mailer.encryption')) {
|
||||
$mail['transport']['encryption'] = Yii::$app->settings->get('mailer.encryption');
|
||||
}
|
||||
|
||||
if (Yii::$app->settings->get('mailer.port'))
|
||||
if (Yii::$app->settings->get('mailer.port')) {
|
||||
$mail['transport']['port'] = Yii::$app->settings->get('mailer.port');
|
||||
}
|
||||
|
||||
/*
|
||||
if (Yii::$app->settings->get('mailer.allowSelfSignedCerts')) {
|
||||
|
@ -41,7 +41,7 @@ class Helpers
|
||||
$textlength = mb_strlen($text);
|
||||
if ($textlength > $length) {
|
||||
$text = self::substru($text, 0, $textlength - ($textlength - $length));
|
||||
$text = $text . "...";
|
||||
$text .= '...';
|
||||
}
|
||||
$text = str_replace("<br />", "", $text);
|
||||
|
||||
@ -85,30 +85,23 @@ class Helpers
|
||||
* */
|
||||
public static function getFormattedTime($sekunden)
|
||||
{
|
||||
|
||||
$negative = false;
|
||||
$minus = "";
|
||||
$minus = '';
|
||||
if ($sekunden < 0) {
|
||||
$negative = true;
|
||||
$sekunden = $sekunden * (-1);
|
||||
$minus = "-";
|
||||
$sekunden *= -1;
|
||||
$minus = '-';
|
||||
}
|
||||
|
||||
$minuten = bcdiv($sekunden, '60', 0);
|
||||
$sekunden = bcmod($sekunden, '60');
|
||||
|
||||
$stunden = bcdiv($minuten, '60', 0);
|
||||
$minuten = bcmod($minuten, '60');
|
||||
|
||||
if ($minuten < 10) {
|
||||
$minuten = "0" . $minuten;
|
||||
$minuten = '0' . $minuten;
|
||||
}
|
||||
|
||||
$tage = bcdiv($stunden, '24', 0);
|
||||
$stunden = bcmod($stunden, '24');
|
||||
|
||||
|
||||
|
||||
return $minus . $stunden . ':' . $minuten;
|
||||
}
|
||||
|
||||
|
@ -37,7 +37,6 @@ class LogoImage
|
||||
public function getUrl()
|
||||
{
|
||||
$cacheId = 0;
|
||||
$path = "";
|
||||
|
||||
// Workaround for absolute urls in console applications (Cron)
|
||||
if (Yii::$app->request->isConsoleRequest) {
|
||||
|
@ -233,6 +233,20 @@ class SelfTest
|
||||
);
|
||||
}
|
||||
|
||||
$title = 'PHP - PDO Mysql Extension';
|
||||
if (extension_loaded('pdo_mysql')) {
|
||||
$checks[] = array(
|
||||
'title' => Yii::t('base', $title),
|
||||
'state' => 'OK'
|
||||
);
|
||||
} else {
|
||||
$checks[] = array(
|
||||
'title' => Yii::t('base', $title),
|
||||
'state' => 'ERROR',
|
||||
'hint' => 'Install PDO Mysql Extension'
|
||||
);
|
||||
}
|
||||
|
||||
// Checks Writeable Config
|
||||
/*
|
||||
$title = 'Permissions - Config';
|
||||
|
@ -10,7 +10,7 @@ namespace humhub\libs;
|
||||
|
||||
use DateTime;
|
||||
use DateTimeZone;
|
||||
use Yii;
|
||||
|
||||
|
||||
/**
|
||||
* TimezoneHelpers
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
use yii\db\Schema;
|
||||
|
||||
use yii\db\Migration;
|
||||
|
||||
class m131023_165755_initial extends Migration
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
use yii\db\Schema;
|
||||
|
||||
use yii\db\Migration;
|
||||
|
||||
class m131203_110444_oembed extends Migration
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
use yii\db\Schema;
|
||||
|
||||
use yii\db\Migration;
|
||||
|
||||
class m140226_111945_ldap extends Migration
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
use yii\db\Schema;
|
||||
|
||||
use yii\db\Migration;
|
||||
|
||||
class m140321_000917_content extends Migration
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
use yii\db\Schema;
|
||||
|
||||
use yii\db\Migration;
|
||||
|
||||
class m140830_145504_following extends Migration
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
use yii\db\Schema;
|
||||
|
||||
use yii\db\Migration;
|
||||
|
||||
class m141015_173305_follow_notifications extends Migration
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
use yii\db\Schema;
|
||||
|
||||
use yii\db\Migration;
|
||||
|
||||
class m141020_162639_fix_default extends Migration
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
use yii\db\Schema;
|
||||
|
||||
use yii\db\Migration;
|
||||
|
||||
class m141021_162639_oembed_setting extends Migration
|
||||
|
@ -3,7 +3,6 @@
|
||||
namespace humhub\models;
|
||||
|
||||
use Yii;
|
||||
use humhub\models\Setting;
|
||||
|
||||
|
||||
/**
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
namespace humhub\models\forms;
|
||||
|
||||
use Yii;
|
||||
|
||||
use yii\base\Model;
|
||||
|
||||
/**
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
use yii\db\Schema;
|
||||
|
||||
use yii\db\Migration;
|
||||
|
||||
class m131023_170339_initial extends Migration
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
use yii\db\Schema;
|
||||
|
||||
use yii\db\Migration;
|
||||
|
||||
class m140930_205511_fix_default extends Migration
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
use yii\db\Schema;
|
||||
|
||||
use yii\db\Migration;
|
||||
|
||||
class m150703_012735_typelength extends Migration
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
use yii\db\Schema;
|
||||
|
||||
use yii\db\Migration;
|
||||
|
||||
class m150703_024635_activityTypes extends Migration
|
||||
|
@ -1,10 +1,10 @@
|
||||
<?php
|
||||
|
||||
use yii\db\Schema;
|
||||
|
||||
use humhub\components\Migration;
|
||||
use humhub\modules\activity\models\Activity;
|
||||
use humhub\modules\space\models\Space;
|
||||
use humhub\modules\like\models\Like;
|
||||
|
||||
|
||||
class m150703_130157_migrate extends Migration
|
||||
{
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
use yii\db\Schema;
|
||||
|
||||
use yii\db\Migration;
|
||||
|
||||
class m150714_093525_activity extends Migration
|
||||
|
@ -63,7 +63,6 @@ class Activity extends \yii\base\Widget
|
||||
|
||||
|
||||
// Dertermine View
|
||||
$view = "";
|
||||
if ($this->activity->module == "") {
|
||||
$view = '@humhub/modules/activity/views/activities/' . $this->activity->type;
|
||||
} else {
|
||||
|
@ -9,7 +9,7 @@
|
||||
namespace humhub\modules\admin;
|
||||
|
||||
use Yii;
|
||||
use humhub\models\Setting;
|
||||
|
||||
|
||||
/**
|
||||
* @package humhub.modules_core.admin
|
||||
|
@ -9,7 +9,7 @@
|
||||
namespace humhub\modules\admin\controllers;
|
||||
|
||||
use Yii;
|
||||
use yii\helpers\Url;
|
||||
|
||||
use humhub\modules\admin\components\Controller;
|
||||
|
||||
/**
|
||||
|
@ -185,7 +185,7 @@ class ModuleController extends Controller
|
||||
$results = array();
|
||||
foreach ($modules as $module) {
|
||||
if (stripos($module['name'], $keyword) !== false || stripos($module['description'], $keyword) !== false) {
|
||||
array_push($results, $module);
|
||||
$results[] = $module;
|
||||
}
|
||||
}
|
||||
$modules = $results;
|
||||
|
@ -15,6 +15,7 @@ use humhub\compat\HForm;
|
||||
use humhub\modules\user\models\forms\Registration;
|
||||
use humhub\modules\admin\components\Controller;
|
||||
use humhub\modules\user\models\User;
|
||||
|
||||
use humhub\modules\admin\models\forms\UserEditForm;
|
||||
use humhub\modules\admin\permissions\ManageUsers;
|
||||
use humhub\modules\admin\permissions\ManageGroups;
|
||||
@ -162,7 +163,7 @@ class UserController extends Controller
|
||||
if ($form->submitted('become') && $this->canBecomeUser($user)) {
|
||||
|
||||
Yii::$app->user->switchIdentity($form->models['User']);
|
||||
return $this->redirect(Url::toRoute("/"));
|
||||
return $this->redirect(Url::home());
|
||||
}
|
||||
|
||||
if ($form->submitted('delete')) {
|
||||
|
@ -9,7 +9,7 @@
|
||||
namespace humhub\modules\admin\controllers;
|
||||
|
||||
use Yii;
|
||||
use yii\helpers\Url;
|
||||
|
||||
use yii\web\HttpException;
|
||||
use humhub\compat\HForm;
|
||||
use humhub\modules\admin\components\Controller;
|
||||
|
@ -11,7 +11,7 @@ namespace humhub\modules\admin\libs;
|
||||
use Yii;
|
||||
use yii\helpers\Json;
|
||||
use humhub\libs\CURLHelper;
|
||||
use humhub\models\Setting;
|
||||
|
||||
|
||||
/**
|
||||
* HumHubAPI provides access to humhub.com for fetching available modules or latest version.
|
||||
|
@ -12,9 +12,9 @@ use ZipArchive;
|
||||
use Yii;
|
||||
use yii\web\HttpException;
|
||||
use yii\base\Exception;
|
||||
use humhub\models\Setting;
|
||||
|
||||
use humhub\libs\CURLHelper;
|
||||
use humhub\modules\admin\libs\HumHubAPI;
|
||||
|
||||
|
||||
/**
|
||||
* Handles remote module installation, updates and module listing
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
use yii\db\Schema;
|
||||
|
||||
use yii\db\Migration;
|
||||
|
||||
class m140513_180317_createlogging extends Migration
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
use yii\db\Schema;
|
||||
|
||||
use yii\db\Migration;
|
||||
|
||||
class m140704_080659_installationid extends Migration
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
use yii\db\Schema;
|
||||
|
||||
use humhub\components\Migration;
|
||||
|
||||
class m150924_133344_update_notification_fix extends Migration
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
namespace humhub\modules\admin\models;
|
||||
|
||||
use Yii;
|
||||
|
||||
use yii\base\Model;
|
||||
use yii\data\ActiveDataProvider;
|
||||
use humhub\modules\user\models\Group;
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
namespace humhub\modules\admin\models;
|
||||
|
||||
use Yii;
|
||||
|
||||
|
||||
/**
|
||||
* This is the model class for table "log".
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
namespace humhub\modules\admin\models;
|
||||
|
||||
use Yii;
|
||||
|
||||
use yii\base\Model;
|
||||
use yii\data\ActiveDataProvider;
|
||||
use humhub\modules\space\models\Space;
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
namespace humhub\modules\admin\models;
|
||||
|
||||
use Yii;
|
||||
|
||||
use yii\base\Model;
|
||||
use yii\data\ActiveDataProvider;
|
||||
use humhub\modules\user\models\User;
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
namespace humhub\modules\admin\models\forms;
|
||||
|
||||
use Yii;
|
||||
|
||||
|
||||
/**
|
||||
* GroupForm is used to modify group settings
|
||||
|
@ -1,9 +1,3 @@
|
||||
<?php
|
||||
|
||||
use yii\helpers\Html;
|
||||
use humhub\models\Setting;
|
||||
?>
|
||||
|
||||
<p>
|
||||
<strong>Status:</strong><br/>
|
||||
<?php
|
||||
|
@ -1,9 +1,3 @@
|
||||
<?php
|
||||
|
||||
use yii\helpers\Html;
|
||||
use yii\helpers\Url;
|
||||
?>
|
||||
|
||||
<p>Database migration results:</p>
|
||||
|
||||
<div class="well">
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
use humhub\compat\CHtml;
|
||||
use yii\helpers\Html;
|
||||
use humhub\models\Setting;
|
||||
|
||||
?>
|
||||
<div>
|
||||
<?php echo Yii::t('AdminModule.views_logging_index', 'Total {count} entries found.', array("{count}" => $pagination->totalCount)); ?>
|
||||
|
@ -3,7 +3,7 @@
|
||||
use humhub\compat\CActiveForm;
|
||||
use humhub\compat\CHtml;
|
||||
use humhub\models\Setting;
|
||||
use yii\helpers\Url;
|
||||
|
||||
?>
|
||||
<?php $this->beginContent('@admin/views/setting/_advancedLayout.php') ?>
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
use humhub\compat\CActiveForm;
|
||||
use humhub\compat\CHtml;
|
||||
use humhub\models\Setting;
|
||||
use yii\helpers\Url;
|
||||
|
||||
?>
|
||||
<?php $this->beginContent('@admin/views/setting/_emailLayout.php') ?>
|
||||
|
||||
|
@ -2,8 +2,8 @@
|
||||
|
||||
use humhub\compat\CActiveForm;
|
||||
use humhub\compat\CHtml;
|
||||
use humhub\models\Setting;
|
||||
use yii\helpers\Url;
|
||||
|
||||
|
||||
?>
|
||||
<?php $this->beginContent('@admin/views/setting/_advancedLayout.php') ?>
|
||||
|
||||
|
@ -27,8 +27,6 @@ class AuthenticationMenu extends \humhub\widgets\BaseMenu
|
||||
*/
|
||||
public function init()
|
||||
{
|
||||
$groupId = Yii::$app->request->get('id');
|
||||
|
||||
$this->addItem(array(
|
||||
'label' => Yii::t('AdminModule.setting', 'General'),
|
||||
'url' => Url::toRoute(['/admin/authentication']),
|
||||
|
@ -10,7 +10,7 @@ namespace humhub\modules\admin\widgets;
|
||||
|
||||
use Yii;
|
||||
use yii\helpers\Url;
|
||||
use humhub\models\Setting;
|
||||
|
||||
|
||||
/**
|
||||
* Group Administration Menu
|
||||
|
@ -27,8 +27,6 @@ class MailSettingMenu extends \humhub\widgets\BaseMenu
|
||||
*/
|
||||
public function init()
|
||||
{
|
||||
$groupId = Yii::$app->request->get('id');
|
||||
|
||||
$this->addItem(array(
|
||||
'label' => Yii::t('AdminModule.views_setting_mailing', 'General'),
|
||||
'url' => Url::toRoute(['/admin/setting/mailing']),
|
||||
|
@ -13,6 +13,7 @@ use yii\helpers\Url;
|
||||
use humhub\modules\admin\permissions\ManageSpaces;
|
||||
use humhub\modules\admin\permissions\ManageSettings;
|
||||
|
||||
|
||||
/**
|
||||
* Space Administration Menu
|
||||
*
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
use yii\db\Schema;
|
||||
|
||||
use yii\db\Migration;
|
||||
|
||||
class m131023_170253_initial extends Migration
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
use yii\db\Schema;
|
||||
|
||||
use yii\db\Migration;
|
||||
|
||||
class m141020_193920_rm_alsocreated extends Migration
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
use yii\db\Schema;
|
||||
|
||||
use humhub\components\Migration;
|
||||
use humhub\modules\comment\models\Comment;
|
||||
|
||||
|
@ -42,7 +42,6 @@ class Form extends \yii\base\Widget
|
||||
|
||||
$modelName = $this->object->content->object_model;
|
||||
$modelId = $this->object->content->object_id;
|
||||
$id = $modelName . "_" . $modelId;
|
||||
|
||||
return $this->render('form', array(
|
||||
'modelName' => $modelName,
|
||||
|
@ -1,6 +1,5 @@
|
||||
<?php
|
||||
|
||||
use yii\helpers\Html;
|
||||
use yii\helpers\Url;
|
||||
use humhub\widgets\AjaxButton;
|
||||
?>
|
||||
|
@ -12,6 +12,7 @@ use Yii;
|
||||
use humhub\modules\content\models\Content;
|
||||
use humhub\modules\content\components\MailUpdateSender;
|
||||
|
||||
|
||||
/**
|
||||
* Events provides callbacks to handle events.
|
||||
*
|
||||
|
@ -11,8 +11,6 @@ namespace humhub\modules\content\components;
|
||||
use Yii;
|
||||
use yii\base\Exception;
|
||||
use humhub\components\ActiveRecord;
|
||||
use humhub\modules\content\components\ContentActiveRecord;
|
||||
use humhub\modules\content\components\ContentAddonActiveRecord;
|
||||
|
||||
/**
|
||||
* HActiveRecordContentAddon is the base active record for content addons.
|
||||
|
@ -10,8 +10,7 @@ namespace humhub\modules\content\components;
|
||||
|
||||
use Yii;
|
||||
use yii\web\HttpException;
|
||||
use humhub\modules\content\components\ContentActiveRecord;
|
||||
use humhub\modules\content\components\ContentAddonActiveRecord;
|
||||
|
||||
|
||||
/**
|
||||
* ContentAddonController is a base controller for ContentAddons.
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
namespace humhub\modules\content\components;
|
||||
|
||||
use Yii;
|
||||
|
||||
use humhub\components\Module;
|
||||
|
||||
/**
|
||||
|
@ -10,7 +10,6 @@ namespace humhub\modules\content\components;
|
||||
|
||||
use Yii;
|
||||
use yii\helpers\Console;
|
||||
use humhub\models\Setting;
|
||||
use humhub\modules\user\models\User;
|
||||
use humhub\modules\notification\components\BaseNotification;
|
||||
use humhub\modules\activity\components\BaseActivity;
|
||||
@ -43,7 +42,6 @@ class MailUpdateSender extends \yii\base\Component
|
||||
public static function processCron($controller)
|
||||
{
|
||||
// Detect the mailing interval we're in
|
||||
$interval = 0;
|
||||
if (Yii::$app->controller->action->id == 'hourly') {
|
||||
$interval = self::INTERVAL_HOURY;
|
||||
} elseif (Yii::$app->controller->action->id == 'daily') {
|
||||
@ -69,7 +67,7 @@ class MailUpdateSender extends \yii\base\Component
|
||||
$mailsSent++;
|
||||
}
|
||||
|
||||
Console::updateProgress(++$processed, $totalUsers);
|
||||
Console::updateProgress( ++$processed, $totalUsers);
|
||||
}
|
||||
|
||||
Console::endProgress(true);
|
||||
@ -100,6 +98,9 @@ class MailUpdateSender extends \yii\base\Component
|
||||
if ($activities['html'] !== '' || $notifications['html'] !== '') {
|
||||
|
||||
try {
|
||||
// TODO: find cleaner solution...
|
||||
Yii::$app->view->params['showUnsubscribe'] = true;
|
||||
|
||||
$mail = Yii::$app->mailer->compose([
|
||||
'html' => '@humhub/modules/content/views/mails/Update',
|
||||
'text' => '@humhub/modules/content/views/mails/plaintext/Update'
|
||||
|
@ -49,7 +49,7 @@ class SettingsBehavior extends Behavior
|
||||
*/
|
||||
public function setSetting($name, $value, $moduleId = "")
|
||||
{
|
||||
$value = $this->getModule($moduleId)->settings->contentContainer($this->owner)->set($name, $value);
|
||||
$this->getModule($moduleId)->settings->contentContainer($this->owner)->set($name, $value);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
use yii\db\Schema;
|
||||
|
||||
use yii\db\Migration;
|
||||
|
||||
class m131023_165625_initial extends Migration
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
use yii\db\Schema;
|
||||
|
||||
use yii\db\Migration;
|
||||
|
||||
class m150322_194403_remove_type_field extends Migration
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
use yii\db\Schema;
|
||||
|
||||
use yii\db\Migration;
|
||||
use humhub\modules\content\permissions\CreatePublicContent;
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
namespace humhub\modules\content\models;
|
||||
|
||||
use Yii;
|
||||
|
||||
use humhub\components\behaviors\PolymorphicRelation;
|
||||
use humhub\modules\content\components\ContentContainerActiveRecord;
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
namespace humhub\modules\content\models;
|
||||
|
||||
use Yii;
|
||||
|
||||
|
||||
/**
|
||||
* This is the model class for table "contentcontainer_permission".
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
use yii\helpers\Url;
|
||||
|
||||
use yii\web\JsExpression;
|
||||
|
||||
/* @var $this humhub\components\View */
|
||||
|
@ -1,6 +1,5 @@
|
||||
<?php
|
||||
|
||||
use yii\helpers\Url;
|
||||
|
||||
/* @var $this humhub\components\View */
|
||||
?>
|
||||
|
@ -10,7 +10,7 @@ namespace humhub\modules\dashboard;
|
||||
|
||||
use Yii;
|
||||
use yii\helpers\Url;
|
||||
use humhub\models\Setting;
|
||||
|
||||
use humhub\modules\dashboard\widgets\ShareWidget;
|
||||
|
||||
/**
|
||||
|
@ -85,8 +85,8 @@ class DashboardStream extends Stream
|
||||
$usersFriends = (new Query())
|
||||
->select(["ufrc.id"])
|
||||
->from('user ufr')
|
||||
->leftJoin('user_friendship recv', 'ufr.id=recv.friend_user_id AND recv.user_id=' . intval($this->user->id))
|
||||
->leftJoin('user_friendship snd', 'ufr.id=snd.user_id AND snd.friend_user_id=' . intval($this->user->id))
|
||||
->leftJoin('user_friendship recv', 'ufr.id=recv.friend_user_id AND recv.user_id=' . (int)$this->user->id)
|
||||
->leftJoin('user_friendship snd', 'ufr.id=snd.user_id AND snd.friend_user_id=' . (int)$this->user->id)
|
||||
->leftJoin('contentcontainer ufrc', 'ufr.id=ufrc.pk AND ufrc.class=:userClass')
|
||||
->where('recv.id IS NOT NULL AND snd.id IS NOT NULL AND ufrc.id IS NOT NULL');
|
||||
$union .= " UNION " . Yii::$app->db->getQueryBuilder()->build($usersFriends)[0];
|
||||
|
@ -9,6 +9,7 @@ use humhub\modules\post\models\Post;
|
||||
use humhub\modules\dashboard\components\actions\DashboardStream;
|
||||
use humhub\modules\user\models\User;
|
||||
use humhub\modules\space\models\Space;
|
||||
|
||||
use humhub\modules\content\models\Content;
|
||||
|
||||
class DashboardStreamTest extends HumHubDbTestCase
|
||||
|
@ -9,7 +9,7 @@
|
||||
namespace humhub\modules\directory\controllers;
|
||||
|
||||
use Yii;
|
||||
use yii\helpers\Url;
|
||||
|
||||
use humhub\modules\directory\widgets\Sidebar;
|
||||
|
||||
/**
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
use yii\helpers\Url;
|
||||
use yii\helpers\Html;
|
||||
use humhub\modules\user\models\User;
|
||||
|
||||
?>
|
||||
<div class="panel panel-default groups">
|
||||
|
||||
|
@ -10,7 +10,7 @@ namespace humhub\modules\directory\widgets;
|
||||
|
||||
use Yii;
|
||||
use yii\helpers\Url;
|
||||
use humhub\modules\user\models\Group;
|
||||
|
||||
use humhub\modules\directory\models\User;
|
||||
|
||||
/**
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
use yii\helpers\Html;
|
||||
use humhub\models\Setting;
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
use humhub\models\Setting;
|
||||
|
||||
?>
|
||||
<div class="panel panel-default" id="user-statistics-panel">
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
use yii\helpers\Html;
|
||||
use humhub\models\Setting;
|
||||
|
||||
?>
|
||||
|
||||
<div class="panel panel-default" id="spaces-statistics-panel">
|
||||
|
@ -12,7 +12,7 @@ use Yii;
|
||||
use yii\web\HttpException;
|
||||
use yii\web\UploadedFile;
|
||||
use yii\helpers\FileHelper;
|
||||
use humhub\models\Setting;
|
||||
|
||||
use humhub\modules\file\models\File;
|
||||
use humhub\modules\content\components\ContentActiveRecord;
|
||||
use humhub\modules\content\components\ContentAddonActiveRecord;
|
||||
|
@ -10,7 +10,7 @@ namespace humhub\modules\file\libs;
|
||||
|
||||
use Yii;
|
||||
use yii\base\Exception;
|
||||
use humhub\components\SettingsManager;
|
||||
|
||||
|
||||
/**
|
||||
* ImageConverter provides a simple interface for converting or resizing images.
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
use yii\db\Schema;
|
||||
|
||||
use yii\db\Migration;
|
||||
|
||||
class m131023_170159_initial extends Migration
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
use yii\db\Schema;
|
||||
|
||||
use yii\db\Migration;
|
||||
|
||||
class m140901_080432_indices extends Migration
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
use yii\db\Schema;
|
||||
|
||||
use yii\db\Migration;
|
||||
|
||||
class m140930_210142_fix_default extends Migration
|
||||
|
@ -1,8 +1,8 @@
|
||||
<?php
|
||||
|
||||
use yii\db\Schema;
|
||||
|
||||
use yii\db\Migration;
|
||||
use humhub\models\Setting;
|
||||
|
||||
|
||||
class m150322_195619_allowedExt2Text extends Migration
|
||||
{
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
use yii\db\Schema;
|
||||
|
||||
use yii\db\Migration;
|
||||
|
||||
class m160125_053702_stored_filename extends Migration
|
||||
|
@ -12,7 +12,7 @@ use Yii;
|
||||
use yii\web\UploadedFile;
|
||||
use yii\helpers\Url;
|
||||
use yii\base\Exception;
|
||||
use humhub\models\Setting;
|
||||
|
||||
use humhub\modules\file\libs\ImageConverter;
|
||||
use humhub\modules\content\components\ContentActiveRecord;
|
||||
use humhub\modules\content\components\ContentAddonActiveRecord;
|
||||
|
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