ソースを参照

fixed url check if url was empty

CauseFX 4 年 前
コミット
232e1cd84d
1 ファイル変更7 行追加2 行削除
  1. 7 2
      api/classes/organizr.class.php

+ 7 - 2
api/classes/organizr.class.php

@@ -3200,8 +3200,8 @@ class Organizr
 		$this->applyTabVariables($queries['tabs']);
 		$all['tabs'] = $queries['tabs'];
 		foreach ($queries['tabs'] as $k => $v) {
-			$v['url_local'] = $v['type'] !== 0 ? $this->qualifyURL($v['url_local']) : $v['url_local'];
-			$v['url'] = $v['type'] !== 0 ? $this->qualifyURL($v['url']) : $v['url'];
+			$v['url_local'] = $v['type'] !== 0 ? $this->checkTabURL($v['url_local']) : $v['url_local'];
+			$v['url'] = $v['type'] !== 0 ? $this->checkTabURL($v['url']) : $v['url'];
 			$v['access_url'] = (!empty($v['url_local']) && ($v['url_local'] !== null) && ($v['url_local'] !== 'null') && $this->isLocal() && $v['type'] !== 0) ? $v['url_local'] : $v['url'];
 		}
 		$count = array_map(function ($element) {
@@ -3222,6 +3222,11 @@ class Organizr
 		}
 	}
 
+	public function checkTabURL($url = null)
+	{
+		return $url ? $this->qualifyURL($url) : '';
+	}
+
 	public function refreshList()
 	{
 		$searchTerm = "Refresh";