Code Duplication    Length = 4-6 lines in 2 locations

code/Controllers/ModelAsController.php 1 location

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

code/Controllers/RootURLController.php 1 location

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