Merge branch 'master' into sri-into-config

This commit is contained in:
El RIDO
2024-07-09 21:32:42 +02:00
13 changed files with 34 additions and 25 deletions

View File

@@ -27,7 +27,7 @@ class Controller
*
* @const string
*/
const VERSION = '1.7.3';
const VERSION = '1.7.4';
/**
* minimal required PHP version

View File

@@ -598,18 +598,8 @@ class Database extends AbstractData
$sql = 'SELECT table_name FROM all_tables';
break;
case 'pgsql':
$sql = 'SELECT c."relname" AS "table_name" '
. 'FROM "pg_class" c, "pg_user" u '
. 'WHERE c."relowner" = u."usesysid" AND c."relkind" = \'r\' '
. 'AND NOT EXISTS (SELECT 1 FROM "pg_views" WHERE "viewname" = c."relname") '
. "AND c.\"relname\" !~ '^(pg_|sql_)' "
. 'UNION '
. 'SELECT c."relname" AS "table_name" '
. 'FROM "pg_class" c '
. "WHERE c.\"relkind\" = 'r' "
. 'AND NOT EXISTS (SELECT 1 FROM "pg_views" WHERE "viewname" = c."relname") '
. 'AND NOT EXISTS (SELECT 1 FROM "pg_user" WHERE "usesysid" = c."relowner") '
. "AND c.\"relname\" !~ '^pg_'";
$sql = 'SELECT "tablename" FROM "pg_catalog"."pg_tables" '
. 'WHERE "schemaname" NOT IN (\'pg_catalog\', \'information_schema\')';
break;
case 'sqlite':
$sql = 'SELECT "name" FROM "sqlite_master" WHERE "type"=\'table\' '

View File

@@ -47,7 +47,7 @@ class YourlsProxy
*/
public function __construct(Configuration $conf, $link)
{
if (strpos($link, $conf->getKey('basepath') . '?') === false) {
if (strpos($link, $conf->getKey('basepath') . '?') !== 0) {
$this->_error = 'Trying to shorten a URL that isn\'t pointing at our instance.';
return;
}