mirror of
https://github.com/PrivateBin/PrivateBin.git
synced 2026-04-17 21:38:10 -04:00
Merge branch 'master' into sri-into-config
This commit is contained in:
@@ -27,7 +27,7 @@ class Controller
|
||||
*
|
||||
* @const string
|
||||
*/
|
||||
const VERSION = '1.7.3';
|
||||
const VERSION = '1.7.4';
|
||||
|
||||
/**
|
||||
* minimal required PHP version
|
||||
|
||||
@@ -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\' '
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user