Skip to content

Commit

Permalink
A bug in config of elfinder is fixed. (It caused an error while runni…
Browse files Browse the repository at this point in the history
…ng panel tests)
  • Loading branch information
alenoosh committed Sep 9, 2015
1 parent 29a7b24 commit 81d7f9b
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 15 deletions.
12 changes: 1 addition & 11 deletions src/Serverfireteam/Panel/config/elfinder.php
Original file line number Diff line number Diff line change
@@ -1,16 +1,6 @@
<?php

function validName($name) {
return strpos($name, '.') !== 0;
}

function access($attr, $path, $data, $volume) {
if (strpos(basename($path), '.') === 0) {
return !($attr == 'read');
} else {
return null;
}
}
use \Serverfireteam\Panel\libs\AppHelper;

return array(

Expand Down
14 changes: 13 additions & 1 deletion src/Serverfireteam/Panel/libs/AppHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,16 @@ class AppHelper {
public function getNameSpace(){
return $this->getAppNamespace();
}
}

public static function validName($name) {
return strpos($name, '.') !== 0;
}

public static function access($attr, $path, $data, $volume) {
if (strpos(basename($path), '.') === 0) {
return !($attr == 'read');
} else {
return null;
}
}
}
6 changes: 3 additions & 3 deletions tests/ResetPasswordTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public function test_reset_password()
->type('12345', 'password')
->press('Login')
->see('Dashboard')
->click('Reset Password')
->click('Change Password')
->type('admin@change.me', 'email')
->type('ooooo', 'current_password')
->type('pppppp', 'password')
Expand All @@ -27,7 +27,7 @@ public function test_reset_password()
->type('12345', 'password')
->press('Login')
->see('Dashboard')
->click('Reset Password')
->click('Change Password')
->type('admin@change.me', 'email')
->type('12345', 'current_password')
->type('pppppp', 'password')
Expand All @@ -40,7 +40,7 @@ public function test_reset_password()
->type('12345', 'password')
->press('Login')
->see('Dashboard')
->click('Reset Password')
->click('Change Password')
->type('admin@change.me', 'email')
->type('12345', 'current_password')
->type('pppppp', 'password')
Expand Down

0 comments on commit 81d7f9b

Please sign in to comment.