Completed
Branch master (468205)
by Sarah
01:51
created
models/UserSearch.php 2 patches
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -4,10 +4,8 @@
 block discarded – undo
4 4
 
5 5
 use humhub\modules\geolocation\Module;
6 6
 use humhub\modules\queue\driver\MySQLCommand;
7
-use Yii;
8 7
 use yii\base\Model;
9 8
 use yii\data\ActiveDataProvider;
10
-use yii\db\QueryBuilder;
11 9
 
12 10
 /**
13 11
  * UserSearch represents the model behind the search form of `humhub\modules\geolocation\models\User`.
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@
 block discarded – undo
59 59
             return $dataProvider;
60 60
         }
61 61
 
62
-        $newQuery = new MySQLCommand('geolocatioin',Module::getInstance());
62
+        $newQuery = new MySQLCommand('geolocatioin', Module::getInstance());
63 63
 
64 64
         // grid filtering conditions
65 65
         $query->andFilterWhere([
Please login to merge, or discard this patch.
views/widgets/Menu.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,6 @@
 block discarded – undo
10 10
 
11 11
 use Yii;
12 12
 use yii\helpers\Url;
13
-
14 13
 use humhub\modules\directory\models\User;
15 14
 
16 15
 /**
Please login to merge, or discard this patch.
widgets/Menu.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,6 @@
 block discarded – undo
10 10
 
11 11
 use Yii;
12 12
 use yii\helpers\Url;
13
-
14 13
 use humhub\modules\directory\models\User;
15 14
 
16 15
 /**
Please login to merge, or discard this patch.
widgets/views/memberActionsButton.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
 if (!Yii::$app->user->isGuest && !$user->isCurrentUser() && Yii::$app->getModule('friendship')->getIsEnabled()) {
23 23
     $friendShipState = Friendship::getStateForUser(Yii::$app->user->getIdentity(), $user);
24 24
     if ($friendShipState === Friendship::STATE_NONE) {
25
-        echo Html::a('<span class="glyphicon glyphicon-plus"></span>&nbsp;&nbsp;' . Yii::t("FriendshipModule.base", "Add Friend"), Url::to(['/friendship/request/add', 'userId' => $user->id]), ['class' => 'btn btn-primary btn-sm','data-ui-loader' => '', 'data-method' => 'POST']);
25
+        echo Html::a('<span class="glyphicon glyphicon-plus"></span>&nbsp;&nbsp;' . Yii::t("FriendshipModule.base", "Add Friend"), Url::to(['/friendship/request/add', 'userId' => $user->id]), ['class' => 'btn btn-primary btn-sm', 'data-ui-loader' => '', 'data-method' => 'POST']);
26 26
     } elseif ($friendShipState === Friendship::STATE_FRIENDS) {
27 27
         echo Html::a('<span class="glyphicon glyphicon-ok"></span>&nbsp;&nbsp;' . Yii::t("FriendshipModule.base", "Friends"), $user->getUrl(), ['class' => 'btn btn-info btn-sm', 'data-ui-loader' => '']);
28 28
     }
Please login to merge, or discard this patch.
assets/Assets.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,8 +21,8 @@
 block discarded – undo
21 21
     public $jsOptions = ['position' => View::POS_END];
22 22
 
23 23
     /**
24
-    * @var array change forceCopy to true when testing your js in order to rebuild this assets on every request (otherwise they will be cached)
25
-    */
24
+     * @var array change forceCopy to true when testing your js in order to rebuild this assets on every request (otherwise they will be cached)
25
+     */
26 26
     public $publishOptions = [
27 27
         'forceCopy' => false
28 28
     ];
Please login to merge, or discard this patch.
Module.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -32,16 +32,16 @@
 block discarded – undo
32 32
     public $guestAccess = false;
33 33
 
34 34
     /**
35
-    * @inheritdoc
36
-    */
35
+     * @inheritdoc
36
+     */
37 37
     public function getConfigUrl()
38 38
     {
39 39
         return Url::to(['/geolocation/admin']);
40 40
     }
41 41
 
42 42
     /**
43
-    * @inheritdoc
44
-    */
43
+     * @inheritdoc
44
+     */
45 45
     public function disable()
46 46
     {
47 47
         $uninstall = new Uninstall();
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@
 block discarded – undo
67 67
         return (Group::find()->where(['show_at_directory' => 1])->count() != 0);
68 68
     }
69 69
 
70
-    public function getPath(){
70
+    public function getPath() {
71 71
         return "protected/modules/geolocation";
72 72
     }
73 73
 
Please login to merge, or discard this patch.
migration/Uninstall.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -12,11 +12,11 @@
 block discarded – undo
12 12
     {
13 13
         $table = Yii::$app->db->getTableSchema('user');
14 14
 
15
-        if (isset($table->columns['longitude'])){
15
+        if (isset($table->columns['longitude'])) {
16 16
             $this->dropColumn('user', 'longitude');
17 17
         }
18 18
 
19
-        if (isset($table->columns['latitude'])){
19
+        if (isset($table->columns['latitude'])) {
20 20
             $this->dropColumn('user', 'latitude');
21 21
         }
22 22
 
Please login to merge, or discard this patch.
migration/Enable.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -18,11 +18,11 @@
 block discarded – undo
18 18
     {
19 19
         $table = Yii::$app->db->getTableSchema('user');
20 20
 
21
-        if (!isset($table->columns['longitude'])){
21
+        if (!isset($table->columns['longitude'])) {
22 22
             $this->addColumn('user', 'longitude', 'string');
23 23
         }
24 24
 
25
-        if (!isset($table->columns['latitude'])){
25
+        if (!isset($table->columns['latitude'])) {
26 26
             $this->addColumn('user', 'latitude', 'string');
27 27
         }
28 28
         $this->db->createCommand('DROP FUNCTION IF EXISTS `get_distance_in_miles_between_geo_locations`')->execute();
Please login to merge, or discard this patch.
config.php 1 patch
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -5,19 +5,19 @@
 block discarded – undo
5 5
 use humhub\widgets\TopMenu;
6 6
 
7 7
 return [
8
-	'id' => 'geolocation',
9
-	'class' => 'humhub\modules\geolocation\Module',
10
-	'namespace' => 'humhub\modules\geolocation',
11
-	'events' => [
8
+    'id' => 'geolocation',
9
+    'class' => 'humhub\modules\geolocation\Module',
10
+    'namespace' => 'humhub\modules\geolocation',
11
+    'events' => [
12 12
 
13
-		[
14
-			'class' => AdminMenu::class,
15
-			'event' => AdminMenu::EVENT_INIT,
16
-			'callback' => [Events::class, 'onAdminMenuInit']
17
-		],
13
+        [
14
+            'class' => AdminMenu::class,
15
+            'event' => AdminMenu::EVENT_INIT,
16
+            'callback' => [Events::class, 'onAdminMenuInit']
17
+        ],
18 18
 
19 19
         ['class' => TopMenu::class, 'event' => TopMenu::EVENT_BEFORE_RUN, 'callback' => [\humhub\modules\geolocation\Events::class, 'onTopMenuInit']],
20
-	],
20
+    ],
21 21
 
22 22
 
23 23
 ];
Please login to merge, or discard this patch.