Fix bug in using webb_site router with RegisterController, a=chris
Fix bug in using webb_site router with RegisterController, a=chris
diff --git a/src/controllers/RegisterController.php b/src/controllers/RegisterController.php
index 664913c47..ad233756c 100755
--- a/src/controllers/RegisterController.php
+++ b/src/controllers/RegisterController.php
@@ -119,7 +119,7 @@ class RegisterController extends Controller implements CrawlConstants
* Besides invoking the base controller, sets up in field variables
* the captcha and recovery question and possible answers.
*/
- public function __construct()
+ public function __construct($web_site = null)
{
$locale = LocaleModel::$current_locale;
$register_view = $this->view("register");
@@ -151,7 +151,7 @@ class RegisterController extends Controller implements CrawlConstants
$this->activities = ["createAccount", "emailVerification",
"processAccountData", "suggestUrl"];
}
- parent::__construct();
+ parent::__construct($web_site);
}
/**
* Main entry method for this controller. Determine which account
@@ -248,8 +248,8 @@ class RegisterController extends Controller implements CrawlConstants
$data[C\CSRF_TOKEN] = $this->generateCSRFToken($user);
$view = $data['REFRESH'];
if (!isset($_SESSION['REMOTE_ADDR'])) {
- if ($_REQUEST['a'] != 'createAccount' && !(
- $_REQUEST['a'] == 'suggestUrl' && !isset($_REQUEST['arg']))) {
+ if (empty($_REQUEST['a']) || ($_REQUEST['a'] != 'createAccount' &&
+ !($_REQUEST['a'] == 'suggestUrl' && !isset($_REQUEST['arg'])))){
$view = "signin";
$data['SCRIPT'] = "doMessage('<h1 class=\"red\" >".
tl('register_controller_need_cookies')."</h1>');";
diff --git a/src/controllers/TestsController.php b/src/controllers/TestsController.php
index b3d7465ac..96738ee2e 100644
--- a/src/controllers/TestsController.php
+++ b/src/controllers/TestsController.php
@@ -69,7 +69,8 @@ $_SERVER["LOG_TO_FILES"] = false;
class TestsController extends Controller
{
/**
- *
+ * Handles requests to list all tests, run all test cases, or run a
+ * particular test case
*/
public function processRequest()
{
@@ -243,7 +244,6 @@ class TestsController extends Controller
}
return $data;
}
-
/**
* Gets the names of all the unit test files in the current directory.
* Doesn't really check for this explicitly, just checks if the file
diff --git a/src/library/VersionManager.php b/src/library/VersionManager.php
index bce81518d..df3549bda 100644
--- a/src/library/VersionManager.php
+++ b/src/library/VersionManager.php
@@ -311,7 +311,7 @@ class VersionManager
return self::SUCCESS;
}
/**
- * Deletes a file $file from the head version of the repository
+ * Deletes a file $file from the version of the repository
*
* @param string $file name of file to delete
* @param bool $lock whether or not a lock should be obtained before
@@ -455,8 +455,6 @@ class VersionManager
}
}
/**
- *
- *
* @param int $timestamp of version what to restore to
* @param bool $lock whether or not a lock should be obtained before
* carrying out the operation