Merge commit '5a437edc7f22d5797e5af29d9b450a03eccec304' into glitch-soc/merge-upstream
This commit is contained in:
@@ -100,7 +100,7 @@ class LinkFooter extends PureComponent {
|
||||
{DividingCircle}
|
||||
<a href={source_url} rel='noopener noreferrer' target='_blank'><FormattedMessage id='footer.source_code' defaultMessage='View source code' /></a>
|
||||
{DividingCircle}
|
||||
v{version}
|
||||
<span class='version'>v{version}</span>
|
||||
</p>
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -9009,6 +9009,10 @@ noscript {
|
||||
color: $dark-text-color;
|
||||
margin-bottom: 20px;
|
||||
|
||||
.version {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
strong {
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
@@ -34,7 +34,9 @@ class Importer::BaseImporter
|
||||
# Estimate the amount of documents that would be indexed. Not exact!
|
||||
# @returns [Integer]
|
||||
def estimate!
|
||||
ActiveRecord::Base.connection_pool.with_connection { |connection| connection.select_one("SELECT reltuples AS estimate FROM pg_class WHERE relname = '#{index.adapter.target.table_name}'")['estimate'].to_i }
|
||||
reltuples = ActiveRecord::Base.connection_pool.with_connection { |connection| connection.select_one("SELECT reltuples FROM pg_class WHERE relname = '#{index.adapter.target.table_name}'")['reltuples'].to_i }
|
||||
# If the table has never yet been vacuumed or analyzed, reltuples contains -1
|
||||
[reltuples, 0].max
|
||||
end
|
||||
|
||||
# Import data from the database into the index
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class BackupPolicy < ApplicationPolicy
|
||||
MIN_AGE = 1.week
|
||||
MIN_AGE = 6.days
|
||||
|
||||
def create?
|
||||
user_signed_in? && current_user.backups.where('created_at >= ?', MIN_AGE.ago).count.zero?
|
||||
|
||||
Reference in New Issue
Block a user