Archived
Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7382cd91bd | ||
|
|
fece8b9416 |
@@ -1 +0,0 @@
|
|||||||
public/* linguist-vendored
|
|
||||||
+34
-34
@@ -33,7 +33,7 @@ GIT
|
|||||||
|
|
||||||
GIT
|
GIT
|
||||||
remote: git://github.com/rails/rails.git
|
remote: git://github.com/rails/rails.git
|
||||||
revision: 22aec58a2565a76e0f55d05d045b7a45715c5bb9
|
revision: 3804d017333da16d76d9fc6633faf5635c7b03d7
|
||||||
branch: 4-2-stable
|
branch: 4-2-stable
|
||||||
specs:
|
specs:
|
||||||
actionmailer (4.2.10)
|
actionmailer (4.2.10)
|
||||||
@@ -96,19 +96,19 @@ GEM
|
|||||||
multi_json (~> 1.11, >= 1.11.2)
|
multi_json (~> 1.11, >= 1.11.2)
|
||||||
rack (>= 1.5.2, < 3)
|
rack (>= 1.5.2, < 3)
|
||||||
railties (>= 4.0)
|
railties (>= 4.0)
|
||||||
airbrussh (1.3.1)
|
airbrussh (1.3.0)
|
||||||
sshkit (>= 1.6.1, != 1.7.0)
|
sshkit (>= 1.6.1, != 1.7.0)
|
||||||
arel (6.0.4)
|
arel (6.0.4)
|
||||||
base32 (0.3.2)
|
base32 (0.3.2)
|
||||||
bcrypt (3.1.12)
|
bcrypt (3.1.11)
|
||||||
better_errors (2.5.0)
|
better_errors (2.4.0)
|
||||||
coderay (>= 1.0.0)
|
coderay (>= 1.0.0)
|
||||||
erubi (>= 1.0.0)
|
erubi (>= 1.0.0)
|
||||||
rack (>= 0.9.0)
|
rack (>= 0.9.0)
|
||||||
binding_of_caller (0.8.0)
|
binding_of_caller (0.8.0)
|
||||||
debug_inspector (>= 0.0.1)
|
debug_inspector (>= 0.0.1)
|
||||||
builder (3.2.3)
|
builder (3.2.3)
|
||||||
capistrano (3.11.0)
|
capistrano (3.10.1)
|
||||||
airbrussh (>= 1.0.0)
|
airbrussh (>= 1.0.0)
|
||||||
i18n
|
i18n
|
||||||
rake (>= 10.0.0)
|
rake (>= 10.0.0)
|
||||||
@@ -119,7 +119,7 @@ GEM
|
|||||||
capistrano-rails (1.1.8)
|
capistrano-rails (1.1.8)
|
||||||
capistrano (~> 3.1)
|
capistrano (~> 3.1)
|
||||||
capistrano-bundler (~> 1.1)
|
capistrano-bundler (~> 1.1)
|
||||||
capistrano-rbenv (2.1.4)
|
capistrano-rbenv (2.1.3)
|
||||||
capistrano (~> 3.1)
|
capistrano (~> 3.1)
|
||||||
sshkit (~> 1.3)
|
sshkit (~> 1.3)
|
||||||
choice (0.2.0)
|
choice (0.2.0)
|
||||||
@@ -131,15 +131,15 @@ GEM
|
|||||||
coffee-script-source
|
coffee-script-source
|
||||||
execjs
|
execjs
|
||||||
coffee-script-source (1.12.2)
|
coffee-script-source (1.12.2)
|
||||||
concurrent-ruby (1.1.3)
|
concurrent-ruby (1.0.5)
|
||||||
crass (1.0.4)
|
crass (1.0.3)
|
||||||
debug_inspector (0.0.3)
|
debug_inspector (0.0.3)
|
||||||
domain_name (0.5.20180417)
|
domain_name (0.5.20170404)
|
||||||
unf (>= 0.0.5, < 1.0.0)
|
unf (>= 0.0.5, < 1.0.0)
|
||||||
erubi (1.7.1)
|
erubi (1.7.1)
|
||||||
erubis (2.7.0)
|
erubis (2.7.0)
|
||||||
execjs (2.7.0)
|
execjs (2.7.0)
|
||||||
ffi (1.9.25)
|
ffi (1.9.23)
|
||||||
globalid (0.4.1)
|
globalid (0.4.1)
|
||||||
activesupport (>= 4.2.0)
|
activesupport (>= 4.2.0)
|
||||||
gpgme (2.0.16)
|
gpgme (2.0.16)
|
||||||
@@ -149,7 +149,7 @@ GEM
|
|||||||
domain_name (~> 0.5)
|
domain_name (~> 0.5)
|
||||||
i18n (0.9.5)
|
i18n (0.9.5)
|
||||||
concurrent-ruby (~> 1.0)
|
concurrent-ruby (~> 1.0)
|
||||||
jquery-rails (4.3.3)
|
jquery-rails (4.3.1)
|
||||||
rails-dom-testing (>= 1, < 3)
|
rails-dom-testing (>= 1, < 3)
|
||||||
railties (>= 4.2.0)
|
railties (>= 4.2.0)
|
||||||
thor (>= 0.14, < 2.0)
|
thor (>= 0.14, < 2.0)
|
||||||
@@ -158,28 +158,28 @@ GEM
|
|||||||
railties (>= 3.2.0)
|
railties (>= 3.2.0)
|
||||||
sass-rails (>= 3.2.0)
|
sass-rails (>= 3.2.0)
|
||||||
kgio (2.11.2)
|
kgio (2.11.2)
|
||||||
loofah (2.2.3)
|
loofah (2.2.2)
|
||||||
crass (~> 1.0.2)
|
crass (~> 1.0.2)
|
||||||
nokogiri (>= 1.5.9)
|
nokogiri (>= 1.5.9)
|
||||||
mail (2.7.1)
|
mail (2.7.0)
|
||||||
mini_mime (>= 0.1.1)
|
mini_mime (>= 0.1.1)
|
||||||
mime-types (3.2.2)
|
mime-types (3.1)
|
||||||
mime-types-data (~> 3.2015)
|
mime-types-data (~> 3.2015)
|
||||||
mime-types-data (3.2018.0812)
|
mime-types-data (3.2016.0521)
|
||||||
mini_mime (1.0.1)
|
mini_mime (1.0.0)
|
||||||
mini_portile2 (2.3.0)
|
mini_portile2 (2.3.0)
|
||||||
minitest (5.11.3)
|
minitest (5.11.3)
|
||||||
multi_json (1.13.1)
|
multi_json (1.13.1)
|
||||||
mysql2 (0.5.2)
|
mysql2 (0.4.10)
|
||||||
net-scp (1.2.1)
|
net-scp (1.2.1)
|
||||||
net-ssh (>= 2.6.5)
|
net-ssh (>= 2.6.5)
|
||||||
net-ssh (5.0.2)
|
net-ssh (4.2.0)
|
||||||
netrc (0.11.0)
|
netrc (0.11.0)
|
||||||
nokogiri (1.8.5)
|
nokogiri (1.8.2)
|
||||||
mini_portile2 (~> 2.3.0)
|
mini_portile2 (~> 2.3.0)
|
||||||
nokogumbo (2.0.1)
|
nokogumbo (1.5.0)
|
||||||
nokogiri (~> 1.8, >= 1.8.4)
|
nokogiri
|
||||||
rack (1.6.11)
|
rack (1.6.9)
|
||||||
rack-test (0.6.3)
|
rack-test (0.6.3)
|
||||||
rack (>= 1.0)
|
rack (>= 1.0)
|
||||||
rails-deprecated_sanitizer (1.0.3)
|
rails-deprecated_sanitizer (1.0.3)
|
||||||
@@ -196,7 +196,7 @@ GEM
|
|||||||
rails-html-sanitizer (1.0.4)
|
rails-html-sanitizer (1.0.4)
|
||||||
loofah (~> 2.2, >= 2.2.2)
|
loofah (~> 2.2, >= 2.2.2)
|
||||||
raindrops (0.19.0)
|
raindrops (0.19.0)
|
||||||
rake (12.3.2)
|
rake (12.3.0)
|
||||||
rb-fsevent (0.10.3)
|
rb-fsevent (0.10.3)
|
||||||
rb-inotify (0.9.10)
|
rb-inotify (0.9.10)
|
||||||
ffi (>= 0.5.0, < 2)
|
ffi (>= 0.5.0, < 2)
|
||||||
@@ -206,12 +206,12 @@ GEM
|
|||||||
http-cookie (>= 1.0.2, < 2.0)
|
http-cookie (>= 1.0.2, < 2.0)
|
||||||
mime-types (>= 1.16, < 4.0)
|
mime-types (>= 1.16, < 4.0)
|
||||||
netrc (~> 0.8)
|
netrc (~> 0.8)
|
||||||
ruby-graphviz (1.2.4)
|
ruby-graphviz (1.2.3)
|
||||||
sanitize (5.0.0)
|
sanitize (4.6.4)
|
||||||
crass (~> 1.0.2)
|
crass (~> 1.0.2)
|
||||||
nokogiri (>= 1.8.0)
|
nokogiri (>= 1.4.4)
|
||||||
nokogumbo (~> 2.0)
|
nokogumbo (~> 1.4)
|
||||||
sass (3.7.2)
|
sass (3.5.5)
|
||||||
sass-listen (~> 4.0.0)
|
sass-listen (~> 4.0.0)
|
||||||
sass-listen (4.0.0)
|
sass-listen (4.0.0)
|
||||||
rb-fsevent (~> 0.9, >= 0.9.4)
|
rb-fsevent (~> 0.9, >= 0.9.4)
|
||||||
@@ -222,7 +222,7 @@ GEM
|
|||||||
sprockets (>= 2.8, < 4.0)
|
sprockets (>= 2.8, < 4.0)
|
||||||
sprockets-rails (>= 2.0, < 4.0)
|
sprockets-rails (>= 2.0, < 4.0)
|
||||||
tilt (>= 1.1, < 3)
|
tilt (>= 1.1, < 3)
|
||||||
sprockets (3.7.2)
|
sprockets (3.7.1)
|
||||||
concurrent-ruby (~> 1.0)
|
concurrent-ruby (~> 1.0)
|
||||||
rack (> 1, < 3)
|
rack (> 1, < 3)
|
||||||
sprockets-rails (3.2.1)
|
sprockets-rails (3.2.1)
|
||||||
@@ -230,24 +230,24 @@ GEM
|
|||||||
activesupport (>= 4.0)
|
activesupport (>= 4.0)
|
||||||
sprockets (>= 3.0.0)
|
sprockets (>= 3.0.0)
|
||||||
sqlite3 (1.3.13)
|
sqlite3 (1.3.13)
|
||||||
sshkit (1.18.0)
|
sshkit (1.16.0)
|
||||||
net-scp (>= 1.1.2)
|
net-scp (>= 1.1.2)
|
||||||
net-ssh (>= 2.8.0)
|
net-ssh (>= 2.8.0)
|
||||||
strip_attributes (1.8.0)
|
strip_attributes (1.8.0)
|
||||||
activemodel (>= 3.0, < 6.0)
|
activemodel (>= 3.0, < 6.0)
|
||||||
thor (0.20.3)
|
thor (0.20.0)
|
||||||
thread_safe (0.3.6)
|
thread_safe (0.3.6)
|
||||||
tilt (2.0.8)
|
tilt (2.0.8)
|
||||||
totp (1.0.0)
|
totp (1.0.0)
|
||||||
base32
|
base32
|
||||||
tzinfo (1.2.5)
|
tzinfo (1.2.5)
|
||||||
thread_safe (~> 0.1)
|
thread_safe (~> 0.1)
|
||||||
uglifier (4.1.20)
|
uglifier (4.1.8)
|
||||||
execjs (>= 0.3.0, < 3)
|
execjs (>= 0.3.0, < 3)
|
||||||
unf (0.1.4)
|
unf (0.1.4)
|
||||||
unf_ext
|
unf_ext
|
||||||
unf_ext (0.0.7.5)
|
unf_ext (0.0.7.5)
|
||||||
unicorn (5.4.1)
|
unicorn (5.4.0)
|
||||||
kgio (~> 2.6)
|
kgio (~> 2.6)
|
||||||
raindrops (~> 0.7)
|
raindrops (~> 0.7)
|
||||||
webrick (1.4.2)
|
webrick (1.4.2)
|
||||||
@@ -287,4 +287,4 @@ DEPENDENCIES
|
|||||||
webrick
|
webrick
|
||||||
|
|
||||||
BUNDLED WITH
|
BUNDLED WITH
|
||||||
1.17.3
|
1.16.2
|
||||||
|
|||||||
-116
@@ -1,116 +0,0 @@
|
|||||||
CC0 1.0 Universal
|
|
||||||
|
|
||||||
Statement of Purpose
|
|
||||||
|
|
||||||
The laws of most jurisdictions throughout the world automatically confer
|
|
||||||
exclusive Copyright and Related Rights (defined below) upon the creator and
|
|
||||||
subsequent owner(s) (each and all, an "owner") of an original work of
|
|
||||||
authorship and/or a database (each, a "Work").
|
|
||||||
|
|
||||||
Certain owners wish to permanently relinquish those rights to a Work for the
|
|
||||||
purpose of contributing to a commons of creative, cultural and scientific
|
|
||||||
works ("Commons") that the public can reliably and without fear of later
|
|
||||||
claims of infringement build upon, modify, incorporate in other works, reuse
|
|
||||||
and redistribute as freely as possible in any form whatsoever and for any
|
|
||||||
purposes, including without limitation commercial purposes. These owners may
|
|
||||||
contribute to the Commons to promote the ideal of a free culture and the
|
|
||||||
further production of creative, cultural and scientific works, or to gain
|
|
||||||
reputation or greater distribution for their Work in part through the use and
|
|
||||||
efforts of others.
|
|
||||||
|
|
||||||
For these and/or other purposes and motivations, and without any expectation
|
|
||||||
of additional consideration or compensation, the person associating CC0 with a
|
|
||||||
Work (the "Affirmer"), to the extent that he or she is an owner of Copyright
|
|
||||||
and Related Rights in the Work, voluntarily elects to apply CC0 to the Work
|
|
||||||
and publicly distribute the Work under its terms, with knowledge of his or her
|
|
||||||
Copyright and Related Rights in the Work and the meaning and intended legal
|
|
||||||
effect of CC0 on those rights.
|
|
||||||
|
|
||||||
1. Copyright and Related Rights. A Work made available under CC0 may be
|
|
||||||
protected by copyright and related or neighboring rights ("Copyright and
|
|
||||||
Related Rights"). Copyright and Related Rights include, but are not limited
|
|
||||||
to, the following:
|
|
||||||
|
|
||||||
i. the right to reproduce, adapt, distribute, perform, display, communicate,
|
|
||||||
and translate a Work;
|
|
||||||
|
|
||||||
ii. moral rights retained by the original author(s) and/or performer(s);
|
|
||||||
|
|
||||||
iii. publicity and privacy rights pertaining to a person's image or likeness
|
|
||||||
depicted in a Work;
|
|
||||||
|
|
||||||
iv. rights protecting against unfair competition in regards to a Work,
|
|
||||||
subject to the limitations in paragraph 4(a), below;
|
|
||||||
|
|
||||||
v. rights protecting the extraction, dissemination, use and reuse of data in
|
|
||||||
a Work;
|
|
||||||
|
|
||||||
vi. database rights (such as those arising under Directive 96/9/EC of the
|
|
||||||
European Parliament and of the Council of 11 March 1996 on the legal
|
|
||||||
protection of databases, and under any national implementation thereof,
|
|
||||||
including any amended or successor version of such directive); and
|
|
||||||
|
|
||||||
vii. other similar, equivalent or corresponding rights throughout the world
|
|
||||||
based on applicable law or treaty, and any national implementations thereof.
|
|
||||||
|
|
||||||
2. Waiver. To the greatest extent permitted by, but not in contravention of,
|
|
||||||
applicable law, Affirmer hereby overtly, fully, permanently, irrevocably and
|
|
||||||
unconditionally waives, abandons, and surrenders all of Affirmer's Copyright
|
|
||||||
and Related Rights and associated claims and causes of action, whether now
|
|
||||||
known or unknown (including existing as well as future claims and causes of
|
|
||||||
action), in the Work (i) in all territories worldwide, (ii) for the maximum
|
|
||||||
duration provided by applicable law or treaty (including future time
|
|
||||||
extensions), (iii) in any current or future medium and for any number of
|
|
||||||
copies, and (iv) for any purpose whatsoever, including without limitation
|
|
||||||
commercial, advertising or promotional purposes (the "Waiver"). Affirmer makes
|
|
||||||
the Waiver for the benefit of each member of the public at large and to the
|
|
||||||
detriment of Affirmer's heirs and successors, fully intending that such Waiver
|
|
||||||
shall not be subject to revocation, rescission, cancellation, termination, or
|
|
||||||
any other legal or equitable action to disrupt the quiet enjoyment of the Work
|
|
||||||
by the public as contemplated by Affirmer's express Statement of Purpose.
|
|
||||||
|
|
||||||
3. Public License Fallback. Should any part of the Waiver for any reason be
|
|
||||||
judged legally invalid or ineffective under applicable law, then the Waiver
|
|
||||||
shall be preserved to the maximum extent permitted taking into account
|
|
||||||
Affirmer's express Statement of Purpose. In addition, to the extent the Waiver
|
|
||||||
is so judged Affirmer hereby grants to each affected person a royalty-free,
|
|
||||||
non transferable, non sublicensable, non exclusive, irrevocable and
|
|
||||||
unconditional license to exercise Affirmer's Copyright and Related Rights in
|
|
||||||
the Work (i) in all territories worldwide, (ii) for the maximum duration
|
|
||||||
provided by applicable law or treaty (including future time extensions), (iii)
|
|
||||||
in any current or future medium and for any number of copies, and (iv) for any
|
|
||||||
purpose whatsoever, including without limitation commercial, advertising or
|
|
||||||
promotional purposes (the "License"). The License shall be deemed effective as
|
|
||||||
of the date CC0 was applied by Affirmer to the Work. Should any part of the
|
|
||||||
License for any reason be judged legally invalid or ineffective under
|
|
||||||
applicable law, such partial invalidity or ineffectiveness shall not
|
|
||||||
invalidate the remainder of the License, and in such case Affirmer hereby
|
|
||||||
affirms that he or she will not (i) exercise any of his or her remaining
|
|
||||||
Copyright and Related Rights in the Work or (ii) assert any associated claims
|
|
||||||
and causes of action with respect to the Work, in either case contrary to
|
|
||||||
Affirmer's express Statement of Purpose.
|
|
||||||
|
|
||||||
4. Limitations and Disclaimers.
|
|
||||||
|
|
||||||
a. No trademark or patent rights held by Affirmer are waived, abandoned,
|
|
||||||
surrendered, licensed or otherwise affected by this document.
|
|
||||||
|
|
||||||
b. Affirmer offers the Work as-is and makes no representations or warranties
|
|
||||||
of any kind concerning the Work, express, implied, statutory or otherwise,
|
|
||||||
including without limitation warranties of title, merchantability, fitness
|
|
||||||
for a particular purpose, non infringement, or the absence of latent or
|
|
||||||
other defects, accuracy, or the present or absence of errors, whether or not
|
|
||||||
discoverable, all to the greatest extent permissible under applicable law.
|
|
||||||
|
|
||||||
c. Affirmer disclaims responsibility for clearing rights of other persons
|
|
||||||
that may apply to the Work or any use thereof, including without limitation
|
|
||||||
any person's Copyright and Related Rights in the Work. Further, Affirmer
|
|
||||||
disclaims responsibility for obtaining any necessary consents, permissions
|
|
||||||
or other rights required for any use of the Work.
|
|
||||||
|
|
||||||
d. Affirmer understands and acknowledges that Creative Commons is not a
|
|
||||||
party to this document and has no duty or obligation with respect to this
|
|
||||||
CC0 or use of the Work.
|
|
||||||
|
|
||||||
For more information, please see
|
|
||||||
<http://creativecommons.org/publicdomain/zero/1.0/>
|
|
||||||
@@ -103,3 +103,12 @@ textarea {
|
|||||||
.notice {
|
.notice {
|
||||||
color:white;
|
color:white;
|
||||||
}
|
}
|
||||||
|
.info-suggestions {
|
||||||
|
a:not(:hover) {
|
||||||
|
color: gray;
|
||||||
|
}
|
||||||
|
|
||||||
|
a:first-child {
|
||||||
|
border-right: 1px solid white !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -89,7 +89,7 @@ class ForumsController < ApplicationController
|
|||||||
end
|
end
|
||||||
|
|
||||||
def forum_params(add = [])
|
def forum_params(add = [])
|
||||||
a = [:name, :position, :role_read_id, :role_write_id, :necro_length, :disable_deletion] + add
|
a = [:name, :position, :role_read_id, :role_write_id, :necro_length] + add
|
||||||
params.require(:forum).permit(a)
|
params.require(:forum).permit(a)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ class ForumthreadsController < ApplicationController
|
|||||||
@threads = Forumthread.filter(current_user, params[:title].try(:slice, 0..255), params[:content].try(:slice, 0..255), params[:reply].try(:slice, 0..255), params[:label], User.find_by(ign: params[:author].to_s.strip) || params[:author], params[:query].try(:slice, 0..255), Forum.find_by(id: params[:forum]))
|
@threads = Forumthread.filter(current_user, params[:title].try(:slice, 0..255), params[:content].try(:slice, 0..255), params[:reply].try(:slice, 0..255), params[:label], User.find_by(ign: params[:author].to_s.strip) || params[:author], params[:query].try(:slice, 0..255), Forum.find_by(id: params[:forum]))
|
||||||
.page(params[:page]).per(30)
|
.page(params[:page]).per(30)
|
||||||
end
|
end
|
||||||
|
|
||||||
def show
|
def show
|
||||||
if params[:reverse] == "true"
|
if params[:reverse] == "true"
|
||||||
@replies = @thread.replies.order(id: :desc).page(params[:page])
|
@replies = @thread.replies.order(id: :desc).page(params[:page])
|
||||||
@@ -73,7 +72,7 @@ class ForumthreadsController < ApplicationController
|
|||||||
end
|
end
|
||||||
|
|
||||||
def destroy
|
def destroy
|
||||||
if mod? || (@thread.author.is?(current_user) && !@thread.forum.disable_deletion)
|
if mod? || @thread.author.is?(current_user)
|
||||||
if @thread.destroy
|
if @thread.destroy
|
||||||
flash[:notice] = "Thread deleted!"
|
flash[:notice] = "Thread deleted!"
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -149,9 +149,9 @@ class UsersController < ApplicationController
|
|||||||
def update
|
def update
|
||||||
if (mod? && current_user.role >= @user.role ) || (@user.is?(current_user) && confirmed?)
|
if (mod? && current_user.role >= @user.role ) || (@user.is?(current_user) && confirmed?)
|
||||||
if mod?
|
if mod?
|
||||||
userdata = user_params([:name, :discord, :youtube, :twitter, :about, :role, :badge, :confirmed, :header_scroll, :utc_time, :dark])
|
userdata = user_params([:name, :skype, :youtube, :twitter, :about, :role, :badge, :confirmed, :header_scroll, :utc_time, :dark])
|
||||||
else
|
else
|
||||||
userdata = user_params([:name, :discord, :youtube, :twitter, :about, :header_scroll, :utc_time, :dark])
|
userdata = user_params([:name, :skype, :youtube, :twitter, :about, :header_scroll, :utc_time, :dark])
|
||||||
end
|
end
|
||||||
if User.find_by(name: userdata[:name]) && User.find_by(name: userdata[:name]) != @user
|
if User.find_by(name: userdata[:name]) && User.find_by(name: userdata[:name]) != @user
|
||||||
flash[:alert] = "You have entered a name that belongs to someone else. Please try another."
|
flash[:alert] = "You have entered a name that belongs to someone else. Please try another."
|
||||||
|
|||||||
@@ -51,4 +51,5 @@ module UsersHelper
|
|||||||
return nil
|
return nil
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
+1
-2
@@ -21,7 +21,6 @@ class User < ActiveRecord::Base
|
|||||||
|
|
||||||
validates :email, uniqueness: {case_sensitive: false}, format: {with: /\A.+@(.+\..{2,}|\[(IPv6)?[0-9a-f:.]+\])\z/i, message: "That doesn't look like an email address."}
|
validates :email, uniqueness: {case_sensitive: false}, format: {with: /\A.+@(.+\..{2,}|\[(IPv6)?[0-9a-f:.]+\])\z/i, message: "That doesn't look like an email address."}
|
||||||
validates :ign, uniqueness: {case_sensitive: false}, format: {with: /\A[a-z\d_]+\z/i, message: "Username is invalid (a-z, 0-9, _)."}
|
validates :ign, uniqueness: {case_sensitive: false}, format: {with: /\A[a-z\d_]+\z/i, message: "Username is invalid (a-z, 0-9, _)."}
|
||||||
validates :discord, uniqueness: {case_sensitive: false}, format: {with: /\A^(?!everyone|here|discordtag|.*```.*)([^@#:]{2,32}#[0-9]{4})$\z/i, message: "Discord name is invalid."}, allow_blank: true
|
|
||||||
|
|
||||||
validates :public_key, format: {with: /\A(-----BEGIN PGP PUBLIC KEY BLOCK-----((.|\n)*?)-----END PGP PUBLIC KEY BLOCK-----)?\z/i, message: "That doesn't look like a PGP formatted public key."}
|
validates :public_key, format: {with: /\A(-----BEGIN PGP PUBLIC KEY BLOCK-----((.|\n)*?)-----END PGP PUBLIC KEY BLOCK-----)?\z/i, message: "That doesn't look like a PGP formatted public key."}
|
||||||
|
|
||||||
@@ -169,7 +168,7 @@ class User < ActiveRecord::Base
|
|||||||
self.ign.strip! if self.ign
|
self.ign.strip! if self.ign
|
||||||
self.email.strip! if self.email
|
self.email.strip! if self.email
|
||||||
self.about.strip! if self.about
|
self.about.strip! if self.about
|
||||||
self.discord.strip! if self.discord
|
self.skype.strip! if self.skype
|
||||||
self.youtube.strip! if self.youtube
|
self.youtube.strip! if self.youtube
|
||||||
self.twitter.strip! if self.twitter
|
self.twitter.strip! if self.twitter
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -25,10 +25,6 @@
|
|||||||
<td><%= f.label :necro_length, "Necropost warning delay (in days)" %></td>
|
<td><%= f.label :necro_length, "Necropost warning delay (in days)" %></td>
|
||||||
<td><%= f.number_field :necro_length, placeholder: "Warning Delay (leave blank for no warning)" %></td>
|
<td><%= f.number_field :necro_length, placeholder: "Warning Delay (leave blank for no warning)" %></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
|
||||||
<td><%= f.label :disable_deletion, "Disable deletion of threads for non-staff" %></td>
|
|
||||||
<td><%= f.check_box :disable_deletion %></td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
</table>
|
||||||
<p><%= f.submit "Update Forum", class: "btn blue left" %></p>
|
<p><%= f.submit "Update Forum", class: "btn blue left" %></p>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<% title "Forums" %>
|
<% title "Forums" %>
|
||||||
|
|
||||||
<%= link_to "Search All Threads", forumthreads_path, class: "btn blue right" %>
|
<%= link_to "All Threads", forumthreads_path, class: "btn blue right" %>
|
||||||
<br>
|
<br>
|
||||||
<div id="forum_groups">
|
<div id="forum_groups">
|
||||||
<% @groups.each do |group| %>
|
<% @groups.each do |group| %>
|
||||||
|
|||||||
@@ -25,10 +25,6 @@
|
|||||||
<td><%= f.label :necro_length, "Necropost warning delay (in days)" %></td>
|
<td><%= f.label :necro_length, "Necropost warning delay (in days)" %></td>
|
||||||
<td><%= f.number_field :necro_length, placeholder: "Warning Delay (leave blank for no warning)" %></td>
|
<td><%= f.number_field :necro_length, placeholder: "Warning Delay (leave blank for no warning)" %></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
|
||||||
<td><%= f.label :disable_deletion %></td>
|
|
||||||
<td><%= f.check_box :disable_deletion %></td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
</table>
|
||||||
<%= f.hidden_field :forumgroup_id %>
|
<%= f.hidden_field :forumgroup_id %>
|
||||||
<p><%= f.submit "Create Forum", class: "btn blue left" %></p>
|
<p><%= f.submit "Create Forum", class: "btn blue left" %></p>
|
||||||
|
|||||||
@@ -11,8 +11,6 @@
|
|||||||
end
|
end
|
||||||
%>
|
%>
|
||||||
|
|
||||||
<% forum = Forum.find(@thread.forum_id) %>
|
|
||||||
|
|
||||||
<h1>Edit Thread</h1>
|
<h1>Edit Thread</h1>
|
||||||
<%= link_to @thread.forum.group, forumgroup_path(@thread.forum.group) %> → <%= link_to @thread.forum, @thread.forum %> → <%= link_to @thread, @thread %> → Edit thread
|
<%= link_to @thread.forum.group, forumgroup_path(@thread.forum.group) %> → <%= link_to @thread.forum, @thread.forum %> → <%= link_to @thread, @thread %> → Edit thread
|
||||||
<%= form_for @thread do |f|%>
|
<%= form_for @thread do |f|%>
|
||||||
@@ -39,7 +37,5 @@
|
|||||||
<%= render partial: "md_editor", locals: {name: "forumthread[content]", content: @thread.content} %>
|
<%= render partial: "md_editor", locals: {name: "forumthread[content]", content: @thread.content} %>
|
||||||
<p><%= f.submit "Update Thread", class: "btn blue left" %></p>
|
<p><%= f.submit "Update Thread", class: "btn blue left" %></p>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% if mod? || !forum.disable_deletion %>
|
<%= button_to "Delete Thread", @thread, :method => "delete", data: {confirm: "Delete thread & comments forever?"}, class: "btn red right" %>
|
||||||
<%= button_to "Delete Thread", @thread, :method => "delete", data: {confirm: "Delete thread & comments forever?"}, class: "btn red right" %>
|
|
||||||
<% end %>
|
|
||||||
<div class="clear"></div>
|
<div class="clear"></div>
|
||||||
|
|||||||
@@ -20,5 +20,10 @@
|
|||||||
<%= link_to "https://discord.gg/QjfcPEJ", title: "Redstoner's Official Discord" do %>
|
<%= link_to "https://discord.gg/QjfcPEJ", title: "Redstoner's Official Discord" do %>
|
||||||
Discord <%= image_tag("discord.png") %>
|
Discord <%= image_tag("discord.png") %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
<% if current_user %>
|
||||||
|
| <%= link_to "/slack/?" + {mail: current_user.try(:email)}.to_param do %>
|
||||||
|
Join us on <img src="/slack/badge.svg" alt="Slack">
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
<% end %>
|
<% end %>
|
||||||
<%= csrf_meta_tags %>
|
<%= csrf_meta_tags %>
|
||||||
<%= favicon_link_tag "favicon.ico" %>
|
<%= favicon_link_tag "favicon.ico" %>
|
||||||
<%= javascript_include_tag "https://cdn.jsdelivr.net/gh/jomo/ago.js@0.0.1/ago.min.js", crossorigin: :anonymous, integrity: "sha256-xw0JUUdbuZQCVO+QScoxrlEsD4nZGCjMRh9PP8GLhcY=" %>
|
<%= javascript_include_tag "https://cdn.rawgit.com/jomo/ago.js/v0.0.1/ago.min.js", crossorigin: :anonymous, integrity: "sha256-xw0JUUdbuZQCVO+QScoxrlEsD4nZGCjMRh9PP8GLhcY=" %>
|
||||||
<%= javascript_include_tag "application" %>
|
<%= javascript_include_tag "application" %>
|
||||||
<link type="application/atom+xml" rel="alternate" href="<%= blogposts_path(:atom) %>">
|
<link type="application/atom+xml" rel="alternate" href="<%= blogposts_path(:atom) %>">
|
||||||
<%= yield(:site_headers) %>
|
<%= yield(:site_headers) %>
|
||||||
|
|||||||
@@ -19,7 +19,6 @@
|
|||||||
<ul>
|
<ul>
|
||||||
<li>The warm feeling of donating for a good thing, plus a huge "<b>thank you</b>"!
|
<li>The warm feeling of donating for a good thing, plus a huge "<b>thank you</b>"!
|
||||||
<li>You can have a nickname. See <%= link_to "our nickname guidelines", info_path("12-nickname-guidelines") %>
|
<li>You can have a nickname. See <%= link_to "our nickname guidelines", info_path("12-nickname-guidelines") %>
|
||||||
<li>You can chat in <font color="red">color</font> in-game.</i>
|
|
||||||
<li>A "$" next to your name <i>(Including website)</i>
|
<li>A "$" next to your name <i>(Including website)</i>
|
||||||
<li><i>Donator+</i> has access to the in-game command <code>/lol id</code></li>
|
<li><i>Donator+</i> has access to the in-game command <code>/lol id</code></li>
|
||||||
</ul>
|
</ul>
|
||||||
@@ -27,11 +26,11 @@
|
|||||||
<div class="donations">
|
<div class="donations">
|
||||||
<div class="donation">
|
<div class="donation">
|
||||||
<div class="left">
|
<div class="left">
|
||||||
<img src="https://crafatar.com/renders/body/d2693e91-93e1-4e3f-929f-f38e1ce8df03?overlay=true&scale=3" alt="sponsor's skin" class="body">
|
<img src="https://crafatar.com/renders/body/97a4928198f045998e0e7a97eabae6ae?overlay=true&scale=3" alt="sponsor's skin" class="body">
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<h1>Donate to our server sponsor</h1>
|
<h1>Donate to our server sponsor</h1>
|
||||||
<h4>Pepich1851 pays for the server hardware. You can help him by donating here.</h4>
|
<h4>PotatoKek pays for the server hardware. You can help him by donating here.</h4>
|
||||||
<form target="_blank" method="post" action="https://www.paypal.com/cgi-bin/webscr">
|
<form target="_blank" method="post" action="https://www.paypal.com/cgi-bin/webscr">
|
||||||
<% if current_user %>
|
<% if current_user %>
|
||||||
<input name="custom" type="hidden" placeholder="Your Minecraft name" value="<%= current_user.ign %>">
|
<input name="custom" type="hidden" placeholder="Your Minecraft name" value="<%= current_user.ign %>">
|
||||||
|
|||||||
@@ -43,9 +43,9 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<% end %>
|
<% end %>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Discord username</td>
|
<td>Skype username</td>
|
||||||
<td>
|
<td>
|
||||||
<%= f.text_field :discord, placeholder: "Discord username", disabled: !can_edit? %>
|
<%= f.text_field :skype, placeholder: "Skype username", disabled: !can_edit? %>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
<% if !@user.confirmed? %>
|
<% if !@user.confirmed? %>
|
||||||
<% if @user.is?(current_user) || mod? %>
|
<% if @user.is?(current_user) || mod? %>
|
||||||
<span class="user-unconfirmed">Please confirm your email <u><%= @user.email %></u> !</span>
|
<span class="user-unconfirmed">Please confirm your email <u><%= @user.email %></u> !</span>
|
||||||
<%= button_to "Resend the confirmation mail", resend_mail_user_path, class: "btn blue", form_class: "inline-block", data: {confirm: "Did you check your spam folder?"} %>
|
<%= button_to "Resend the confirmation mail", resend_mail_user_path, class: "btn dark", form_class: "inline-block", data: {confirm: "Did you check your spam folder?"} %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<span class="user-unconfirmed">This user hasn't confirmed their email yet!</span>
|
<span class="user-unconfirmed">This user hasn't confirmed their email yet!</span>
|
||||||
<% end %>
|
<% end %>
|
||||||
@@ -54,10 +54,10 @@
|
|||||||
<td><b>Role</b></td>
|
<td><b>Role</b></td>
|
||||||
<td><%= link_to @user.role, users_path(:role => @user.role.name) %></td>
|
<td><%= link_to @user.role, users_path(:role => @user.role.name) %></td>
|
||||||
</tr>
|
</tr>
|
||||||
<% if current_user && !@user.discord.blank? %>
|
<% if current_user && !@user.skype.blank? %>
|
||||||
<tr>
|
<tr>
|
||||||
<td><b>Discord</b></td>
|
<td><b>Skype</b></td>
|
||||||
<td><%= @user.discord %></td>
|
<td><%= link_to @user.skype, "skype:#{@user.skype}?chat", target: "_blank" %></a></td>
|
||||||
</tr>
|
</tr>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% if !@user.youtube.blank? && !@user.youtube_channelname.blank? %>
|
<% if !@user.youtube.blank? && !@user.youtube_channelname.blank? %>
|
||||||
@@ -82,16 +82,6 @@
|
|||||||
<td><b>Joined</b></td>
|
<td><b>Joined</b></td>
|
||||||
<td><%= ago @user.created_at %></td>
|
<td><%= ago @user.created_at %></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
|
||||||
<td><b>Last seen</b></td>
|
|
||||||
<td>
|
|
||||||
<% if @user.last_seen %>
|
|
||||||
<%= ago @user.last_seen %>
|
|
||||||
<% else %>
|
|
||||||
Never
|
|
||||||
<% end %>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<% if mod? || @user.is?(current_user) %>
|
<% if mod? || @user.is?(current_user) %>
|
||||||
<tr>
|
<tr>
|
||||||
<td><b>Last IP</b></td>
|
<td><b>Last IP</b></td>
|
||||||
@@ -101,6 +91,16 @@
|
|||||||
<td><b>Email</b></td>
|
<td><b>Email</b></td>
|
||||||
<td><%= mail_to @user.email, @user.email, :subject => "Redstoner" %></td>
|
<td><%= mail_to @user.email, @user.email, :subject => "Redstoner" %></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><b>Last seen</b></td>
|
||||||
|
<td>
|
||||||
|
<% if @user.last_seen %>
|
||||||
|
<%= ago @user.last_seen %>
|
||||||
|
<% else %>
|
||||||
|
Never
|
||||||
|
<% end %>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
<% end %>
|
<% end %>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
# config valid only for current version of Capistrano
|
# config valid only for current version of Capistrano
|
||||||
lock '3.11.0'
|
lock '3.10.1'
|
||||||
|
|
||||||
set :repo_url, 'https://github.com/RedstonerServer/redstoner.com'
|
set :repo_url, 'https://github.com/RedstonerServer/redstoner.com'
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +0,0 @@
|
|||||||
class DropForumsLabels < ActiveRecord::Migration
|
|
||||||
def change
|
|
||||||
drop_table :forums_labels
|
|
||||||
end
|
|
||||||
end
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
class RemoveSkypeAddDiscordFromUsers < ActiveRecord::Migration
|
|
||||||
def change
|
|
||||||
remove_column :users, :skype
|
|
||||||
add_column :users, :discord, :string
|
|
||||||
end
|
|
||||||
end
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
class DisableDeletionForums < ActiveRecord::Migration
|
|
||||||
def change
|
|
||||||
add_column :forums, :disable_deletion, :boolean
|
|
||||||
end
|
|
||||||
end
|
|
||||||
+15
-11
@@ -11,7 +11,7 @@
|
|||||||
#
|
#
|
||||||
# It's strongly recommended that you check this file into your version control system.
|
# It's strongly recommended that you check this file into your version control system.
|
||||||
|
|
||||||
ActiveRecord::Schema.define(version: 20190224093907) do
|
ActiveRecord::Schema.define(version: 20180606223258) do
|
||||||
|
|
||||||
create_table "badges", force: :cascade do |t|
|
create_table "badges", force: :cascade do |t|
|
||||||
t.string "name", limit: 191
|
t.string "name", limit: 191
|
||||||
@@ -46,13 +46,17 @@ ActiveRecord::Schema.define(version: 20190224093907) do
|
|||||||
end
|
end
|
||||||
|
|
||||||
create_table "forums", force: :cascade do |t|
|
create_table "forums", force: :cascade do |t|
|
||||||
t.string "name", limit: 255
|
t.string "name", limit: 255
|
||||||
t.integer "position", limit: 4
|
t.integer "position", limit: 4
|
||||||
t.integer "role_read_id", limit: 4
|
t.integer "role_read_id", limit: 4
|
||||||
t.integer "role_write_id", limit: 4
|
t.integer "role_write_id", limit: 4
|
||||||
t.integer "forumgroup_id", limit: 4
|
t.integer "forumgroup_id", limit: 4
|
||||||
t.integer "necro_length", limit: 4
|
t.integer "necro_length", limit: 4
|
||||||
t.boolean "disable_deletion", default: false
|
end
|
||||||
|
|
||||||
|
create_table "forums_labels", id: false, force: :cascade do |t|
|
||||||
|
t.integer "forum_id", limit: 4
|
||||||
|
t.integer "label_id", limit: 4
|
||||||
end
|
end
|
||||||
|
|
||||||
create_table "forumthreads", force: :cascade do |t|
|
create_table "forumthreads", force: :cascade do |t|
|
||||||
@@ -130,6 +134,7 @@ ActiveRecord::Schema.define(version: 20190224093907) do
|
|||||||
t.string "email", limit: 191
|
t.string "email", limit: 191
|
||||||
t.text "about", limit: 65535
|
t.text "about", limit: 65535
|
||||||
t.string "last_ip", limit: 255
|
t.string "last_ip", limit: 255
|
||||||
|
t.string "skype", limit: 255
|
||||||
t.string "youtube", limit: 255
|
t.string "youtube", limit: 255
|
||||||
t.string "youtube_channelname", limit: 255
|
t.string "youtube_channelname", limit: 255
|
||||||
t.string "twitter", limit: 255
|
t.string "twitter", limit: 255
|
||||||
@@ -149,15 +154,14 @@ ActiveRecord::Schema.define(version: 20190224093907) do
|
|||||||
t.boolean "header_scroll", default: false
|
t.boolean "header_scroll", default: false
|
||||||
t.boolean "dark", default: false
|
t.boolean "dark", default: false
|
||||||
t.text "public_key", limit: 65535
|
t.text "public_key", limit: 65535
|
||||||
t.string "totp_secret", limit: 255
|
t.string "totp_secret", limit: 255
|
||||||
t.boolean "totp_enabled", default: false
|
t.boolean "totp_enabled", default: false
|
||||||
t.string "discord", limit: 191
|
|
||||||
end
|
end
|
||||||
|
|
||||||
add_index "users", ["email"], name: "index_users_on_email", unique: true, using: :btree
|
add_index "users", ["email"], name: "index_users_on_email", unique: true, using: :btree
|
||||||
add_index "users", ["ign"], name: "index_users_on_ign", unique: true, using: :btree
|
add_index "users", ["ign"], name: "index_users_on_ign", unique: true, using: :btree
|
||||||
add_index "users", ["name"], name: "index_users_on_name", unique: true, using: :btree
|
add_index "users", ["name"], name: "index_users_on_name", unique: true, using: :btree
|
||||||
add_index "users", ["discord"], name: "index_users_on_discord", unique: true, using: :btree
|
add_index "users", ["skype"], name: "index_users_on_skype", unique: true, using: :btree
|
||||||
add_index "users", ["twitter"], name: "index_users_on_twitter", unique: true, using: :btree
|
add_index "users", ["twitter"], name: "index_users_on_twitter", unique: true, using: :btree
|
||||||
add_index "users", ["uuid"], name: "index_users_on_uuid", unique: true, using: :btree
|
add_index "users", ["uuid"], name: "index_users_on_uuid", unique: true, using: :btree
|
||||||
add_index "users", ["youtube"], name: "index_users_on_youtube", unique: true, using: :btree
|
add_index "users", ["youtube"], name: "index_users_on_youtube", unique: true, using: :btree
|
||||||
|
|||||||
+1
-1
@@ -32,7 +32,7 @@ deleted_user = User.create!(
|
|||||||
password_confirmation: userpw,
|
password_confirmation: userpw,
|
||||||
role: Role.get(:disabled),
|
role: Role.get(:disabled),
|
||||||
badge: Badge.get(:none),
|
badge: Badge.get(:none),
|
||||||
discord: "echo123#9804",
|
skype: "echo123",
|
||||||
last_ip: "0.0.0.0",
|
last_ip: "0.0.0.0",
|
||||||
confirmed: true,
|
confirmed: true,
|
||||||
last_seen: Time.utc(0).to_datetime,
|
last_seen: Time.utc(0).to_datetime,
|
||||||
|
|||||||
Reference in New Issue
Block a user