Code Duplication    Length = 4-6 lines in 2 locations

code/Controllers/ModelAsController.php 1 location

@@ 99-104 (lines=6) @@
96
97
		// If the database has not yet been created, redirect to the build page.
98
		/** @skipUpgrade */
99
		if(!DB::is_active() || !ClassInfo::hasTable('SiteTree')) {
100
			$this->getResponse()->redirect(Director::absoluteBaseURL() . 'dev/build?returnURL=' . (isset($_GET['url']) ? urlencode($_GET['url']) : null));
101
			$this->popCurrent();
102
103
			return $this->getResponse();
104
		}
105
106
		try {
107
			$result = $this->getNestedController();

code/Controllers/RootURLController.php 1 location

@@ 156-159 (lines=4) @@
153
154
		if (!$this->getResponse()->isFinished()) {
155
			/** @skipUpgrade */
156
			if (!DB::is_active() || !ClassInfo::hasTable('SiteTree')) {
157
				$this->getResponse()->redirect(Director::absoluteBaseURL() . 'dev/build?returnURL=' . (isset($_GET['url']) ? urlencode($_GET['url']) : null));
158
				return $this->getResponse();
159
			}
160
161
			$request->setUrl(self::get_homepage_link() . '/');
162
			$request->match('$URLSegment//$Action', true);