suppression revisr plugin

This commit is contained in:
Olivier Legat 2021-09-21 15:21:57 +02:00
parent f19bdd6a5c
commit 527f451453
114 changed files with 0 additions and 24418 deletions

View file

@ -1,674 +0,0 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<http://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.

View file

@ -1,295 +0,0 @@
# Revisr #
**Contributors:** ExpandedFronts
**Tags:** revisr, git, git management, revision tracking, revision, backup, database, database backup, database plugin, deploy, commit, bitbucket, github, version control
**Requires at least:** 3.9.2
**Tested up to:** 4.3.1
**Stable tag:** trunk
**License:** GPLv3
**License URI:** http://www.gnu.org/licenses/gpl.html
A simple plugin for managing your WordPress website with Git.
## Description ##
Revisr allows you to manage your WordPress website with a Git repository. With Revisr, you can:
* Track changes to your entire WordPress installation, or just the parts that you prefer
* Commit changes from within the WordPress dashboard
* Backup or restore your entire website in seconds
* Set up daily or weekly automatic backups
* Optionally push or pull changes to a remote repository, like Bitbucket or Github
* Test changes out before deploying them to another server
* Revert your website files and/or database to an earlier version
* Quickly discard any unwanted changes
A must have plugin for deploying and managing WordPress using Git repositories.
## Installation ##
### Requirements ###
* A web server with Git and WordPress installed
* The PHP exec() function enabled
### Instructions ###
* Unzip the plugin folder and upload it to the plugins directory of your WordPress installation.
* If the WordPress installation is not already in a Git repository, you will be able to create a new one in the Revisr Dashboard.
* Go to the Revisr settings page and adjust any settings as needed.
### Notes ###
Please verify that database backups are working before attempting to revert the database, especially if attempting to do so on a production website. Backups use the mysqldump command, supported by most hosts/environments.
If you're using the HTTPS method to connect to the remote repository, the password for the remote repository will be stored in the '.git/config' file. You should take steps to prevent this from being publicly accessible. The following code added to a '.htaccess' file in the '.git/' directory will prevent public access:
`
content: Deny from all
`
If you're using NGINX, you'll have to update your configuration file with something similar to the following:
`
location ~ path/to/your-repo/.git {
deny all;
}
`
This issue can be avoided entirely by using SSH to authenticate, which is recommended in most cases. If using SSH, you will need to generate a SSH key on the server and add it to the remote repository (Bitbucket and Github both support SSH).
It is also adviseable to add Revisr to the .gitignore file via the settings page to make sure that reverts don't rollback any new functionality.
## Frequently Asked Questions ##
### How does Revisr handle the database? ###
You have complete control, and can decide whether you want to track the entire database, just certain tables, or if you don't want to track the database at all. Then, during a backup, the tracked database tables are exported via "mysqldump". When importing or restoring the database to an earlier commit, Revisr first takes a backup of the existing database, creating a restore point from immediately before the import that can be reverted to if needed.
You can also set a "Development URL" that will be automatically replaced in the database during import- allowing for backups and restores that work on both your dev and live environments.
### Why aren't my commits being pushed to Bitbucket/GitHub? ###
This is either an authentication issue or the remote branch is ahead of yours.
### Can I damage my site with this plugin? ###
Care should be taken when dealing with upgrades that depend on the database. Taking verified backups before and after major changes is always recommended.
## Screenshots ##
### 1. The main dashboard of Revisr. ###
![1. The main dashboard of Revisr.](http://ps.w.org/revisr/assets/screenshot-1.png)
### 2. Simple staging area that lets you decide what gets committed. ###
![2. Simple staging area that lets you decide what gets committed.](http://ps.w.org/revisr/assets/screenshot-2.png)
### 3. Easily view changes in files with Revisr's diffs. ###
![3. Easily view changes in files with Revisr's diffs.](http://ps.w.org/revisr/assets/screenshot-3.png)
### 4. A comprehensive history of your website, with unlimited restore points. ###
![4. A comprehensive history of your website, with unlimited restore points.](http://ps.w.org/revisr/assets/screenshot-4.png)
## Changelog ##
### 2.0.2 - December 9, 2015 ###
* Fix: CSS fixes for WordPress 4.4
* Fix: Broken settings link on "All Plugins" page
### 2.0.1 - October 30, 2015 ###
* Fix: Bug causing all files to be committed in some cases
### 2.0 - October 27, 2015 ###
* New: Commits are no longer stored in the database
* New: Setup wizard for when no repo is found
* New: View commits before pushing/pulling them
* New: View remote branches
* New: Sort/paginate branches
* New: Define installation path to Git from the settings page
* New: Action hooks and filters for extending Revisr
* New: Activity log can be filtered by age, event type, or username
* Tweak: Improved commit speed when there are no unstaged files
* Tweak: Include database backups in commit details
* Tweak: Improved general plugin performance
* Tweak: Improved file organization
* Tweak: Improved detection of unpushed commits
* Tweak: Improved information in the Help tab
* Tweak: Always show confirmation dialog before reverts
* Tweak: Removed unused bulk actions for commits
* Tweak: Refactored CSS/JS files
* Fix: PHP notice with saving the .gitignore
* Fix: Minor logging error when committing with "Backup DB" and "Push Changes" checked at the same time
* Fix: Committing a failed database backup
* Fix: Changing salts during a DB import logs a user out with no notification/error in Revisr
* Fix: Bug with the logged "Undo" URL for imports
* Fix: Bug with default sort order in the dashboard
* Fix: Conflict with BuddyPress
### 1.9.5 ###
* Added sizes to database tables for the "Let me decide..." option
* Added ability to search for commits by the 7-letter commit ID/hash
* Added link/filter for viewing tags on dashboard/commits page
* Improved plugin intiation
* Fixed bug with certain errors saved as an array when making a commit
* Fixed bug with first commit not showing correct branch
* Fixed bug with ".gitignore" not showing latest version of gitignore when updated outside of Revisr
### 1.9.4 ###
* Added support for sockets in the DB_HOST constant
* Fixed bug causing error on PHP 5.2
* Fixed bug causing potential error with backups/imports on some systems
### 1.9.3 ###
* Added option to use WordPress instead of MySQL for backups and imports
* Added ability to backup the database through the "New Commit" screen without any pending files
* Added ability to change the amount of events per page on the Revisr dashboard
* Improved .gitignore functionality, automatically remove cached files from repository index
* Several bugfixes and security improvements
### 1.9.2 ###
* Improved error handling for commits, pushes, and pulls
* Fixed bug with saving Git username
* Fixed bug with PHP error reporting
* Fixed bug with push count when backing up DB and pushing at the same time
* Fixed CSS issue with viewing untracked tables after importing
### 1.9.1 ###
* Fixed bug with "Import Pushes" checkbox not showing after saving
* Fixed bug with saving some settings in Windows
* Fixed CSS issue when viewing a branch with no commits
* Small cleanup
### 1.9 ###
* Added support for multiple commit authors
* Added basic support for custom WordPress file structures
* Added support for PHP autoloading when available
* Added pagination to the "Recent Activity" table on the dashboard page
* Added "Debug" page to the "Revisr Settings" page
* Fixed bug with viewing diffs in Firefox,
* Fixed potential XSS and user escalation vulnerabilities, props @jdgrimes
* General UI improvements
* General performance improvements
### 1.8.3 ###
* Fixed bug with spaces in filename
### 1.8.2 ###
* Improved plugin performance
* Fixed bug with timezone on some sites
* Fixed bug with loading translation file
* Changed "Commit Changes" to read "Save Changes"
* Improved Remote URL validation
### 1.8.1 ###
* Fixed bug resulting from changes in WordPress 4.1
* Fixed bug with storing webhook URL in some environments
### 1.8 ###
* Added ability to track individual database tables
* Added ability to import tracked database tables while pulling changes
* Added ability to run a safe search/replace on the database during import to support multiple environments (supports serialization)
* Added unique token to the webhook to improve security (existing webhooks will need to be updated)
* Added fallback to the WordPress database class if mysqldump is not available
* Moved backups to 'wp-content/uploads/revisr-backups/' (path may vary) and automatically generate .htaccess
* Updated pending files count to only show for admins
* Updated error handling for commits
* Small UI improvements
### 1.7.2 ###
* Tweaked permissions check to only check permissions if repository exists.
### 1.7.1 ###
* Fixed potential PHP notice with tags widget
* Fixed permissions to just check the ".git/" directory
### 1.7 ###
* Added ability to create a new repository if one does not already exist
* Added ability to create automatic daily or weekly backups
* Added ability to merge changes
* Added ability to add tags to commits
* Fixed bug with backing up the database when a port is used
* General improvements
### 1.6.3 ###
* Improvements to the list of committed files
* Small bugfixes
### 1.6.2 ###
* Added dedicated page for managing branches
* Database backups from the dashboard now automatically create new commits
* Fixed timezone bug on the dashboard
* Improvements to settings page
* Small UI improvements
### 1.6.1 ###
* Small UI improvements
* Changed Recent Activity to show 15 items
* Fixed bug with multi-site installations
* Fixed bug with reverting files
### 1.6 ###
* Added internationalization support
* Switched to human-friendly time diffs for Recent Activity
* Fixed bug causing dashboard to freeze in some environments
* Improved error handling
* Removed passthru() functions
* Code cleanup
### 1.5.2 ###
* Fixed bug with adding certain files
* Restricted access to super admins for multisite installations
### 1.5.1 ###
* Added support for remote DB hosts
* Fixed bug with deleting files
### 1.5 ###
* Improved commit interface, added ability to stage individual files
* Added ability to see and revert to changes pulled from a remote
* Added ability to set the name of the remotes (defaults to origin)
* Added ability to set the path to MySQL
* Improved compatibility for Mac and Windows
* Bugfixes and general cleanup
### 1.4.1 ###
* Added "Backup Database" button to the Quick Actions
* Added number of unpulled/unpushed commits to the Quick Action buttons
* Updated recent activity text
### 1.4 ###
* Added ability to automatically pull changes from Bitbucket or Github (enabled on the settings page)
* Fixed bug causing call_user_func() error in some enviornments (including Windows)
* Additional validation on Git commands
* Additional error handling
* Fixed bug with saving .gitignore
* Fixed potential bug with viewing pending files
* Minor cleanup
### 1.3.2 ###
* Bugfixes
### 1.3.1 ###
* Added error handling
* Commits are no longer automatically pushed by default. This can be changed in the plugin settings page.
* Fixed issue with .gitignore showing as a pending file
### 1.3 ###
* Added ability to track/revert changes to the database
* The commits listing now shows commits on the current branch by default
* Added basic compatibility check
* Added settings link to the plugin page
### 1.2.1 ###
* Minor bugfixes
### 1.2 ###
* Added ability to view the number of pending files in the admin bar
* Small cleanup, updated wording
### 1.1 ###
* Bugfixes and improvements
* Added ability to view changes in files from a previous commit
### 1.0.2 ###
* Minor bugfixes
### 1.0.1 ###
* Updated readme.txt
### 1.0 ###
* Initial commit

View file

@ -1,131 +0,0 @@
/**
* revisr-admin.css
*
* @package Revisr
* @license GPLv3
* @link https://revisr.io
* @copyright Expanded Fronts, LLC
*/
/*--------------------------------------------------------------
>>> TABLE OF CONTENTS:
----------------------------------------------------------------
# Dashboard Page
## Recent Activity
## "Quick Actions" metabox
## "Branches/Tags" metabox
# Branches Page
# Commits Pages
## Committed
## Staging
# Settings Pages
# Setup
# Misc
--------------------------------------------------------------*/
/*--------------------------------------------------------------
# Dashboard Page
--------------------------------------------------------------*/
.revisr-poststuff { padding-top: 0 !important; }
/*--------------------------------------------------------------
## Recent Activity
--------------------------------------------------------------*/
#revisr-activity-form table th[id=message] { width: 75%; }
#revisr-activity-form .alignleft { display: none; }
/*--------------------------------------------------------------
## "Quick Actions" metabox
--------------------------------------------------------------*/
.revisr-quick-action-btn { width: 100%; text-align: left !important; margin-bottom: 4px !important; }
.revisr-quick-action-btn:before { margin: 5px; display: inline-block; float: left; color: #fff; -webkit-font-smoothing: antialiased; }
.revisr-quick-action-btn-txt { float: left; }
#revisr-commit-btn:before { content: "\f132"; margin: 5px 1px !important; font: normal 20px/1 'dashicons'; color: #444; }
#revisr-discard-btn:before { content: "\f158"; margin: 4px 1px !important; font: normal 20px/1 'dashicons'; color: #444; }
#revisr-backup-btn:before { content: "\f096"; font: normal 17px/1 'octicons'; color: #444; }
#revisr-push-btn:before { content: "\f03d"; font: normal 20px/1 'octicons'; color: #444; }
#revisr-pull-btn:before { content: "\f03f"; font: normal 20px/1 'octicons'; color: #444; }
#revisr-loader { float: right; }
/*--------------------------------------------------------------
## "Branches/Tags" metabox
--------------------------------------------------------------*/
#revisr-branches-tags-widget #branches { padding: 0; }
#revisr-branches-tags-widget #branches-table { border: 0; }
#revisr-branches-tags-widget #branches-table tr:nth-child(odd) { background-color: #f9f9f9; }
#revisr-manage-branches-link { font-size: 12px; }
/*--------------------------------------------------------------
# Branches Page
--------------------------------------------------------------*/
.revisr-col-container { margin-top: 25px !important; }
#revisr-branch-form .tablenav.top { display: none; }
#revisr-add-branch-box { max-width: 280px; }
#revisr-add-branch-box h3 { font-size: 14px; padding: 8px 12px; margin: 0; line-height: 1.4; }
#revisr-add-branch-box #add-branch-submit { text-align: center; margin-bottom: 0; padding-bottom: 0; }
/*--------------------------------------------------------------
# Commits
--------------------------------------------------------------*/
.revisr_page_revisr_commits .alignleft.actions.bulkactions { display: none; }
#revisr-commits-filter #hash, #revisr-commits-filter .column-hash { width:70px !important; }
#revisr-commits-filter .column-title { width: 400px !important; }
#revisr-commits-filter #branch, #revisr-commits-filter #tag, #files_changed, #revisr-commits-filter .column-branch, #revisr-commits-filter .column-tag, .column-files_changed { text-align: center !important; }
.revisr_page_revisr_commits .wrap { margin-top: 27px !important; }
/*--------------------------------------------------------------
## Committed
--------------------------------------------------------------*/
#committed { width: 90%; }
.admin_page_revisr_view_commit .wrap { margin-top: 27px !important; }
/*--------------------------------------------------------------
## Staging
--------------------------------------------------------------*/
#revisr_save_commit .inside, #revisr_view_commit .inside { padding: 0; }
.revisr-timestamp:before { margin-right: 3px; }
#misc-publishing-actions .revisr-octicon-label:before { color: #888; display: inline-block; font: 400 20px/1 octicons; speak: none; left: -1px; position: relative; top: 0; text-decoration: none!important; vertical-align: top; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
#misc-publishing-actions label[for=revisr-branch]:before { content: '\f020'; padding: 0 7px 0 5px; }
#misc-publishing-actions label[for=revisr-tag]:before { content: '\f015'; padding: 0 5px 0 3px; }
.stage-container { width: 100%; display: inline-block; }
#staged { width: 80%; float: left; overflow-y: scroll; }
#unstaged { width: 80%; float: left; overflow-y: scroll; }
.stage-nav { float: left; margin: 5px; }
.stage-nav-button { margin-top: 7px !important; }
.diff_added { background-color: #cfc; }
.diff_removed { background-color: #fdd; }
.admin_page_revisr_new_commit .wrap { margin-top: 27px !important; }
#revisr-commit-form #title { line-height: normal; }
/*--------------------------------------------------------------
# Settings
--------------------------------------------------------------*/
.revisr-settings-form { margin-left: 15px; }
#verify-remote { margin-left: 10px; padding: 4px; font-size: 11px; border-radius: 4px; color: #fff; margin-left: 10px; }
.verify-remote-success { background-color: #5cb85c; }
.verify-remote-error { background-color: #AFAFAF; }
#gitignore { width: 35em; }
.revisr-description { width: 35em; }
.revisr-text { width: 35em !important; }
#post-hook-input { width: 35em; }
#revisr-debug-table { max-width: 750px; }
body.revisr_page_revisr_settings #site5_wrapper { margin-right: 20px; }
/*--------------------------------------------------------------
# Setup
--------------------------------------------------------------*/
#revisr-setup-container { max-width: 400px; background-color: #fff; color: #444; margin: 140px auto 25px; padding: 30px; -webkit-font-smoothing: subpixel-antialiased; -webkit-box-shadow: 0 1px 3px rgba(0,0,0,.13); box-shadow: 0 1px 3px rgba(0,0,0,.13); }
.revisr-setup-input { width: 100% !important; }
.select2-hidden { display:none; }
.revisr-setup-nav { margin-top: 10px; width: 100%; }
.revisr-setup-nav button { width: 48%; }
.revisr-setup-nav:last-child { float: right; }
#revisr-setup-h2 { font-size: 23px; font-weight: 400; padding: 9px 15px 4px 0; line-height: 29px; margin: 0; }
/*--------------------------------------------------------------
# Misc
--------------------------------------------------------------*/
.revisr-arrow-logo { background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAxOC4xLjAsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiDQoJIHZpZXdCb3g9IjI0NS44IDM4MS4xIDgxLjkgODkuNSIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAyNDUuOCAzODEuMSA4MS45IDg5LjUiIHhtbDpzcGFjZT0icHJlc2VydmUiPg0KPHBhdGggZmlsbD0iIzQ0NCIgZD0iTTI5NS4yLDM4Ny4yYy01LjEsNS4xLTUuMSwxMy4zLDAsMTguM2MzLjgsMy44LDkuMyw0LjcsMTMuOSwyLjlsNy4yLTcuMmMxLjgtNC43LDAuOS0xMC4yLTIuOS0xMy45DQoJQzMwOC41LDM4Mi4xLDMwMC4zLDM4Mi4xLDI5NS4yLDM4Ny4yeiBNMzA5LjcsNDAxLjZjLTIuOSwyLjktNy42LDIuOS0xMC42LDBjLTIuOS0yLjktMi45LTcuNiwwLTEwLjZjMi45LTIuOSw3LjYtMi45LDEwLjYsMA0KCUMzMTIuNiwzOTQsMzEyLjYsMzk4LjcsMzA5LjcsNDAxLjZ6Ii8+DQo8cGF0aCBmaWxsPSIjNDQ0IiBkPSJNMjY4LjEsNDU0Yy0xMy4yLTEwLjEtMTYuMS0yOS02LjQtNDIuNmM0LTUuNiw5LjQtOS40LDE1LjQtMTEuNGwtMi0xMC4yYy04LjUsMi41LTE2LjIsNy43LTIxLjcsMTUuNQ0KCWMtMTIuOSwxOC4yLTguOSw0My41LDguOCw1N2wtNS42LDguM2wyNS45LTEuMmwtOC42LTIzLjZMMjY4LjEsNDU0eiIvPg0KPHBhdGggZmlsbD0iIzQ0NCIgZD0iTTMxOC4zLDQwMy4zYzEuMS0yLjEsMS43LTQuNSwxLjctN2MwLTguNC02LjgtMTUuMi0xNS4yLTE1LjJzLTE1LjIsNi44LTE1LjIsMTUuMnM2LjgsMTUuMiwxNS4yLDE1LjINCgljMi4xLDAsNC4xLTAuNCw1LjktMS4yYzguNCwxMC42LDkuMiwyNS44LDEsMzcuMmMtMy45LDUuNi05LjQsOS40LTE1LjQsMTEuNGwyLDEwLjJjOC41LTIuNSwxNi4yLTcuNywyMS43LTE1LjUNCglDMzMxLjIsNDM4LjEsMzI5LjksNDE3LjQsMzE4LjMsNDAzLjN6IE0zMDQuOCw0MDMuM2MtMy44LDAtNi45LTMuMS02LjktNi45czMuMS02LjksNi45LTYuOXM2LjksMy4xLDYuOSw2LjkNCglTMzA4LjcsNDAzLjMsMzA0LjgsNDAzLjN6Ii8+DQo8L3N2Zz4=); background-repeat: no-repeat; width: 24px; height: 24px; margin-top: 3px; margin-right: 8px; float: left; }
#site5_wrapper { width: 80px; text-align: center; font-size: 11px; float: right; margin: 0 10px 10px 10px; padding: 0 5px; background-color: #fff; border: 1px solid #ddd; }
#site5_logo { width: 80px; margin-top: -5px; }
.revisr-alert { margin: 20px 0 !important;}

View file

@ -1,78 +0,0 @@
/* Thickbox Styles */
html {
background-color: #fff;
color: #444;
font-family: "Open Sans",sans-serif;
font-size: 14px;
line-height: 1.4em;
}
body {
margin: 0 !important;
overflow: hidden;
}
input[type="text"] {
height: 25px;
font-size: 13px;
}
a {
color: #0074a2 !important;
}
select {
border: 1px solid #ddd;
padding: 2px;
line-height: 28px;
height: 28px;
vertical-align: middle;
font-size: 14px;
background: #fff;
color: #32373c;
outline: 0;
}
.revisr-tb-description {
padding: 10px 15px 10px 15px;
overflow-y: scroll;
height: 155px;
}
.revisr-tb-submit {
width: 100%;
position: fixed;
bottom: 0px;
padding: 15px 0 15px 0;
border-top: 1px solid #ddd;
background-color: #f5f5f5;
text-align: right;
}
.revisr-tb-btn {
height: 30px;
font-size: 14px;
padding: 0 15px;
margin: 0 15px 0 0;
border-radius: 4px;
}
.revisr-tb-btn:hover {
cursor: pointer;
}
.revisr-tb-danger {
background-color:#e14d43;
border:1px #d02c21 solid;
color:#fff;
-webkit-box-shadow: inset 0 1px 0 #ec8b85,0 1px 0 rgba(0,0,0,.15);
box-shadow: inset 0 1px 0 #ec8b85,0 1px 0 rgba(0,0,0,.15);
}
.revisr-tb-danger:hover {
background: #dd382d;
border-color: #ba281e;
color: #fff;
-webkit-box-shadow: inset 0 1px 0 #e8776f;
box-shadow: inset 0 1px 0 #e8776f;
}
.revisr-btn-cancel {
background-color: #f7f7f7;
border: 1px #ccc solid;
color: #555;
}
.revisr-btn-cancel:hover {
background-color: #fafafa;
border: 1px solid #999;
color: #222;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

View file

@ -1 +0,0 @@
<?php // Silence is golden

View file

@ -1,296 +0,0 @@
/**
* revisr-dashboard.js
*
* Processes AJAX functionality on the Revisr dashboard.
*
* @package Revisr
* @license GPLv3
* @link https://revisr.io
* @copyright Expanded Fronts, LLC
*/
/**
* Discards uncommitted changes.
*/
function revisr_discard() {
tb_remove();
processing();
jQuery.post(ajaxurl, {action: 'process_discard', revisr_dashboard_nonce: revisr_dashboard_vars.ajax_nonce}, function(response) {
process_complete();
});
}
/**
* Pushes changes to a remote server.
*/
function revisr_push() {
tb_remove();
processing();
jQuery.post(ajaxurl, {action: 'process_push', revisr_dashboard_nonce: revisr_dashboard_vars.ajax_nonce}, function(response) {
process_complete();
});
}
/**
* Pulls changes from a remote server.
*/
function revisr_pull() {
tb_remove();
processing();
jQuery.post(ajaxurl, {action: 'process_pull', revisr_dashboard_nonce: revisr_dashboard_vars.ajax_nonce}, function(response) {
process_complete();
});
}
/**
* Refresh the Revisr status bar after any transients have expired.
*/
function delayed_refresh() {
setTimeout( function() {
update_alert();
revisr_list.update();
}, 4000);
}
/**
* Display the latest logged alert.
*/
function update_alert() {
jQuery.ajax({
type : 'POST',
url : ajaxurl,
data : {action: 'render_alert'},
success : function(response){
if ( 0 == response ) {
document.getElementById('revisr-processing-request').innerHTML = '<p>' + revisr_dashboard_vars.login_prompt + '</p>';
} else {
jQuery('#revisr-loading-alert').hide();
jQuery('#revisr-processing-request').hide();
document.getElementById('revisr-alert-container').innerHTML = response;
}
}
});
}
/**
* Update the AJAX button counts.
*/
function update_counts() {
jQuery.post(ajaxurl, {action: 'ajax_button_count', data: 'unpulled'}, function(response) {
if ( 0 == response ) {
response = '';
}
document.getElementById('revisr-unpulled').innerHTML = response;
});
jQuery.post(ajaxurl, {action: 'ajax_button_count',data: 'unpushed'}, function(response) {
if ( 0 == response ) {
response = '';
}
document.getElementById('revisr-unpushed').innerHTML = response;
});
}
/**
* Display the loading message.
*/
function processing() {
jQuery('.revisr-alert').hide();
jQuery('#revisr-loader').show();
jQuery('#revisr-processing-request').show();
}
/**
* Run when an AJAX request from the dashboard has been completed.
*/
function process_complete() {
jQuery('#revisr-loader').hide();
update_alert();
revisr_list.update();
update_counts();
delayed_refresh();
}
/**
* Display the branches list.
*/
jQuery('#branches-link').click(function() {
jQuery('#tags-tab').attr('class', 'hide-if-no-js');
jQuery('#branches-tab').attr('class', 'tabs');
jQuery('#tags').hide();
jQuery('#branches').show();
});
/**
* Display the tags list.
*/
jQuery('#tags-link').click(function() {
jQuery('#branches-tab').attr('class', 'hide-if-no-js');
jQuery('#tags-tab').attr('class', 'tabs');
jQuery('#branches').hide();
jQuery('#tags').show();
});
/**
* Redirects to the new commit screen.
*/
jQuery('#revisr-commit-btn').click(function() {
window.location = 'admin.php?page=revisr_new_commit';
});
/**
* Runs when the 'Backup Database' button is clicked.
*/
jQuery('#revisr-backup-btn').click(function() {
processing();
jQuery.post(ajaxurl, {action: 'backup_db', source: 'ajax_button', revisr_dashboard_nonce: revisr_dashboard_vars.ajax_nonce}, function(response) {
process_complete();
});
});
var revisr_list = {
/**
* Register our triggers
*
* We want to capture clicks on specific links, but also value change in
* the pagination input field. The links contain all the information we
* need concerning the wanted page number or ordering, so we'll just
* parse the URL to extract these variables.
*
* The page number input is trickier: it has no URL so we have to find a
* way around. We'll use the hidden inputs added in TT_Example_List_Table::display()
* to recover the ordering variables, and the default paged input added
* automatically by WordPress.
*/
init: function() {
// This will have its utility when dealing with the page number input
var timer;
var delay = 500;
// Pagination links, sortable link
jQuery('.tablenav-pages a, .manage-column.sortable a, .manage-column.sorted a').on('click', function(e) {
// We don't want to actually follow these links
e.preventDefault();
// Simple way: use the URL to extract our needed variables
var query = this.search.substring( 1 );
var data = {
paged: revisr_list.__query( query, 'paged' ) || '1',
order: revisr_list.__query( query, 'order' ) || 'desc',
orderby: revisr_list.__query( query, 'orderby' ) || 'time',
revisr_event: revisr_list.__query( query, 'revisr_event' ) || 'all',
revisr_user: revisr_list.__query( query, 'revisr_user' ) || 'all',
revisr_time: revisr_list.__query( query, 'revisr_time' ) || 'all'
};
revisr_list.update( data );
});
// Page number input
jQuery('input[name=paged]').on('keyup', function(e) {
// If user hit enter, we don't want to submit the form
// We don't preventDefault() for all keys because it would
// also prevent to get the page number!
if ( 13 == e.which )
e.preventDefault();
// This time we fetch the variables in inputs
var data = {
paged: parseInt( jQuery('input[name=paged]').val() ) || '1',
order: jQuery('input[name=order]').val() || 'asc',
orderby: jQuery('input[name=orderby]').val() || 'title',
revisr_event : jQuery('input[name=revisr_event]').val() || 'all',
revisr_user : jQuery('input[name=revisr_user]').val() || 'all',
revisr_time : jQuery('input[name=revisr_time]').val() || 'all'
};
// Now the timer comes to use: we wait half a second after
// the user stopped typing to actually send the call. If
// we don't, the keyup event will trigger instantly and
// thus may cause duplicate calls before sending the intended
// value
window.clearTimeout( timer );
timer = window.setTimeout(function() {
revisr_list.update( data );
}, delay);
});
},
/**
* AJAX call
*
* Send the call and replace table parts with updated version!
*
* @param object data The data to pass through AJAX
*/
update: function( data ) {
jQuery.ajax({
// /wp-admin/admin-ajax.php
url: ajaxurl,
// Add action and nonce to our collected data
data: jQuery.extend(
{
revisr_list_nonce: jQuery('#revisr_list_nonce').val(),
action: 'revisr_get_custom_list',
},
data
),
// Handle the successful result
success: function( response ) {
// WP_List_Table::ajax_response() returns json
var response = jQuery.parseJSON( response );
// Add the requested rows
if ( response.rows.length )
jQuery('#the-list').html( response.rows );
// Update column headers for sorting
if ( response.column_headers.length )
jQuery('thead tr, tfoot tr').html( response.column_headers );
// Update pagination for navigation
if ( response.pagination.bottom.length )
jQuery('.tablenav.top .tablenav-pages').html( jQuery(response.pagination.top).html() );
if ( response.pagination.top.length )
jQuery('.tablenav.bottom .tablenav-pages').html( jQuery(response.pagination.bottom).html() );
// Init back our event handlers
revisr_list.init();
}
});
},
/**
* Filter the URL Query to extract variables
*
* @see http://css-tricks.com/snippets/javascript/get-url-variables/
*
* @param string query The URL query part containing the variables
* @param string variable Name of the variable we want to get
*
* @return string|boolean The variable value if available, false else.
*/
__query: function( query, variable ) {
var vars = query.split("&");
for ( var i = 0; i <vars.length; i++ ) {
var pair = vars[ i ].split("=");
if ( pair[0] == variable )
return pair[1];
}
return false;
},
}
/**
* Initialize the dashboard.
*/
revisr_list.init();
update_alert();
update_counts();
jQuery('#revisr-loader').hide();
/**
* Initializes select2 selects.
*/
jQuery('#revisr-events-select').select2({
theme: "classic"
});
jQuery('#revisr-author-select').select2({
theme: "classic"
});
jQuery('#revisr-time-select').select2({
theme: "classic"
});

View file

@ -1,80 +0,0 @@
/**
* revisr-settings.js
*
* JS used on the Revisr Settings pages.
*
* @package Revisr
* @license GPLv3
* @link https://revisr.io
* @copyright Expanded Fronts, LLC
*/
remote_field = jQuery('#remote_url');
result_span = jQuery('#verify-remote');
db_driver_select = jQuery('#db-driver-select');
db_tracking_select = jQuery('#db-tracking-select');
advanced_db_tracking = jQuery('#advanced-db-tracking');
post_hook = jQuery('#post-hook');
auto_pull = jQuery('#auto_pull');
remote_field.blur(function() {
data = {
action: 'verify_remote',
remote: remote_field.val()
}
jQuery.post(ajaxurl, data, function(response) {
if (response.indexOf('Success') !== -1) {
result_span.removeClass();
result_span.addClass('verify-remote-success');
}
else {
result_span.removeClass();
result_span.addClass('verify-remote-error');
}
result_span.html( response );
});
});
if ( db_driver_select.val() == 'mysql' ) {
db_driver_select.closest('tr').next('tr').show();
} else {
db_driver_select.closest('tr').next('tr').hide();
}
if ( db_tracking_select.val() == 'custom' ) {
advanced_db_tracking.show();
} else {
advanced_db_tracking.hide();
}
post_hook.hide();
if ( auto_pull.prop('checked') === true ) {
post_hook.show();
}
auto_pull.change( function() {
if ( this.checked ) {
post_hook.fadeIn('fast');
} else {
post_hook.fadeOut('fast');
}
});
db_tracking_select.change( function() {
if ( this.value == 'custom' ) {
advanced_db_tracking.fadeIn('fast');
} else {
advanced_db_tracking.fadeOut('fast');
}
});
db_driver_select.change( function() {
if ( this.value == 'mysql' ) {
jQuery(this).closest('tr').next('tr').fadeIn('fast');
} else {
jQuery(this).closest('tr').next('tr').fadeOut('fast');
}
});

View file

@ -1,42 +0,0 @@
/**
* revisr-setup.js
*
* Processes JS on the Revisr Setup page.
*
* @package Revisr
* @license GPLv3
* @link https://revisr.io
* @copyright Expanded Fronts, LLC
*/
/**
* Initializes select2 selects.
*/
jQuery('#revisr-tracking-options').select2({
theme: 'classic',
width: '100%'
});
jQuery('#revisr-plugin-or-theme').select2({
theme: 'classic',
placeholder: revisr_setup_vars.plugin_or_theme_placeholder,
width: '100%'
});
// Fades in the plugin/theme picker.
jQuery('#revisr-tracking-options').change(function(){
if (this.value == 'single') {
jQuery('#revisr-plugin-or-theme-wrap').fadeIn('fast');
} else {
update_repo_dir(this.value);
jQuery('#revisr-plugin-or-theme-wrap').fadeOut('fast');
}
});
// Updates the repo dir for plugins/themes.
jQuery('#revisr-plugin-or-theme').change(function(){
update_repo_dir(this.value);
});
function update_repo_dir( value ) {
jQuery('#revisr-create-path').val(value);
}

View file

@ -1,72 +0,0 @@
function stage_file() {
jQuery('option:selected', ('#unstaged')).each(function () {
jQuery(this).remove().appendTo('#staged');
});
}
function unstage_file() {
jQuery('option:selected', ('#staged')).each(function () {
jQuery(this).remove().appendTo('#unstaged');
});
}
function stage_all() {
jQuery('option', ('#unstaged')).each(function () {
jQuery(this).remove().appendTo('#staged');
});
}
function unstage_all() {
jQuery('option', ('#staged')).each(function () {
jQuery(this).remove().appendTo('#unstaged');
});
}
function commit_files() {
jQuery('option', ('#staged')).each(function() {
jQuery(this).attr('selected', 'selected');
});
jQuery('option', ('#unstaged')).each(function() {
jQuery(this).attr('selected', 'selected');
});
jQuery('#commit').val('Committing...');
jQuery('#revisr-spinner').css('visibility', 'visible');
}
jQuery(document).ready(function($) {
// Load any pending/untracked files via AJAX in case there are a lot of results.
if ( 'admin_page_revisr_new_commit' === adminpage ) {
var data = {
action: 'pending_files',
security: staging_vars.ajax_nonce
};
$.post(ajaxurl, data, function(response) {
document.getElementById('pending_files_result').innerHTML = response;
});
}
});
jQuery(document).on('dblclick', '.pending', function (event) {
var pending = event.target.value,
status = pending.substr(0, 3);
if ( status.indexOf( 'M' ) !== -1 ) {
var file = ajaxurl + '?action=process_view_diff&security=' + staging_vars.ajax_nonce + '&file=' + pending.substr(3);
tb_show(staging_vars.view_diff, file);
}
});
jQuery(document).on('dblclick', '.committed', function (event) {
var pending = event.target.value,
commit = document.getElementById('commit_hash').value,
status = pending.substr(0, 2),
file = pending.substr(2);
if ( status.indexOf( 'M' ) !== -1 ) {
var file = ajaxurl + '?action=process_view_diff&security=' + staging_vars.ajax_nonce + '&file=' + file.trim() + '&commit=' + commit;
tb_show('View Diff', file);
}
});

View file

@ -1,9 +0,0 @@
(c) 2012-2014 GitHub
When using the GitHub logos, be sure to follow the GitHub logo guidelines (https://github.com/logos)
Font License: SIL OFL 1.1 (http://scripts.sil.org/OFL)
Applies to all font files
Code License: MIT (http://choosealicense.com/licenses/mit/)
Applies to all other files

View file

@ -1 +0,0 @@
If you intend to install Octicons locally, install `octicons-local.ttf`. It should appear as “github-octicons” in your font list. It is specially designed not to conflict with GitHub's web fonts.

View file

@ -1,235 +0,0 @@
@font-face {
font-family: 'octicons';
src: url('octicons.eot?#iefix') format('embedded-opentype'),
url('octicons.woff') format('woff'),
url('octicons.ttf') format('truetype'),
url('octicons.svg#octicons') format('svg');
font-weight: normal;
font-style: normal;
}
/*
.octicon is optimized for 16px.
.mega-octicon is optimized for 32px but can be used larger.
*/
.octicon, .mega-octicon {
font: normal normal normal 16px/1 octicons;
display: inline-block;
text-decoration: none;
text-rendering: auto;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.mega-octicon { font-size: 32px; }
.octicon-alert:before { content: '\f02d'} /*  */
.octicon-alignment-align:before { content: '\f08a'} /*  */
.octicon-alignment-aligned-to:before { content: '\f08e'} /*  */
.octicon-alignment-unalign:before { content: '\f08b'} /*  */
.octicon-arrow-down:before { content: '\f03f'} /*  */
.octicon-arrow-left:before { content: '\f040'} /*  */
.octicon-arrow-right:before { content: '\f03e'} /*  */
.octicon-arrow-small-down:before { content: '\f0a0'} /*  */
.octicon-arrow-small-left:before { content: '\f0a1'} /*  */
.octicon-arrow-small-right:before { content: '\f071'} /*  */
.octicon-arrow-small-up:before { content: '\f09f'} /*  */
.octicon-arrow-up:before { content: '\f03d'} /*  */
.octicon-beer:before { content: '\f069'} /*  */
.octicon-book:before { content: '\f007'} /*  */
.octicon-bookmark:before { content: '\f07b'} /*  */
.octicon-briefcase:before { content: '\f0d3'} /*  */
.octicon-broadcast:before { content: '\f048'} /*  */
.octicon-browser:before { content: '\f0c5'} /*  */
.octicon-bug:before { content: '\f091'} /*  */
.octicon-calendar:before { content: '\f068'} /*  */
.octicon-check:before { content: '\f03a'} /*  */
.octicon-checklist:before { content: '\f076'} /*  */
.octicon-chevron-down:before { content: '\f0a3'} /*  */
.octicon-chevron-left:before { content: '\f0a4'} /*  */
.octicon-chevron-right:before { content: '\f078'} /*  */
.octicon-chevron-up:before { content: '\f0a2'} /*  */
.octicon-circle-slash:before { content: '\f084'} /*  */
.octicon-circuit-board:before { content: '\f0d6'} /*  */
.octicon-clippy:before { content: '\f035'} /*  */
.octicon-clock:before { content: '\f046'} /*  */
.octicon-cloud-download:before { content: '\f00b'} /*  */
.octicon-cloud-upload:before { content: '\f00c'} /*  */
.octicon-code:before { content: '\f05f'} /*  */
.octicon-color-mode:before { content: '\f065'} /*  */
.octicon-comment-add:before,
.octicon-comment:before { content: '\f02b'} /*  */
.octicon-comment-discussion:before { content: '\f04f'} /*  */
.octicon-credit-card:before { content: '\f045'} /*  */
.octicon-dash:before { content: '\f0ca'} /*  */
.octicon-dashboard:before { content: '\f07d'} /*  */
.octicon-database:before { content: '\f096'} /*  */
.octicon-device-camera:before { content: '\f056'} /*  */
.octicon-device-camera-video:before { content: '\f057'} /*  */
.octicon-device-desktop:before { content: '\f27c'} /*  */
.octicon-device-mobile:before { content: '\f038'} /*  */
.octicon-diff:before { content: '\f04d'} /*  */
.octicon-diff-added:before { content: '\f06b'} /*  */
.octicon-diff-ignored:before { content: '\f099'} /*  */
.octicon-diff-modified:before { content: '\f06d'} /*  */
.octicon-diff-removed:before { content: '\f06c'} /*  */
.octicon-diff-renamed:before { content: '\f06e'} /*  */
.octicon-ellipsis:before { content: '\f09a'} /*  */
.octicon-eye-unwatch:before,
.octicon-eye-watch:before,
.octicon-eye:before { content: '\f04e'} /*  */
.octicon-file-binary:before { content: '\f094'} /*  */
.octicon-file-code:before { content: '\f010'} /*  */
.octicon-file-directory:before { content: '\f016'} /*  */
.octicon-file-media:before { content: '\f012'} /*  */
.octicon-file-pdf:before { content: '\f014'} /*  */
.octicon-file-submodule:before { content: '\f017'} /*  */
.octicon-file-symlink-directory:before { content: '\f0b1'} /*  */
.octicon-file-symlink-file:before { content: '\f0b0'} /*  */
.octicon-file-text:before { content: '\f011'} /*  */
.octicon-file-zip:before { content: '\f013'} /*  */
.octicon-flame:before { content: '\f0d2'} /*  */
.octicon-fold:before { content: '\f0cc'} /*  */
.octicon-gear:before { content: '\f02f'} /*  */
.octicon-gift:before { content: '\f042'} /*  */
.octicon-gist:before { content: '\f00e'} /*  */
.octicon-gist-secret:before { content: '\f08c'} /*  */
.octicon-git-branch-create:before,
.octicon-git-branch-delete:before,
.octicon-git-branch:before { content: '\f020'} /*  */
.octicon-git-commit:before { content: '\f01f'} /*  */
.octicon-git-compare:before { content: '\f0ac'} /*  */
.octicon-git-merge:before { content: '\f023'} /*  */
.octicon-git-pull-request-abandoned:before,
.octicon-git-pull-request:before { content: '\f009'} /*  */
.octicon-globe:before { content: '\f0b6'} /*  */
.octicon-graph:before { content: '\f043'} /*  */
.octicon-heart:before { content: '\2665'} /* ♥ */
.octicon-history:before { content: '\f07e'} /*  */
.octicon-home:before { content: '\f08d'} /*  */
.octicon-horizontal-rule:before { content: '\f070'} /*  */
.octicon-hourglass:before { content: '\f09e'} /*  */
.octicon-hubot:before { content: '\f09d'} /*  */
.octicon-inbox:before { content: '\f0cf'} /*  */
.octicon-info:before { content: '\f059'} /*  */
.octicon-issue-closed:before { content: '\f028'} /*  */
.octicon-issue-opened:before { content: '\f026'} /*  */
.octicon-issue-reopened:before { content: '\f027'} /*  */
.octicon-jersey:before { content: '\f019'} /*  */
.octicon-jump-down:before { content: '\f072'} /*  */
.octicon-jump-left:before { content: '\f0a5'} /*  */
.octicon-jump-right:before { content: '\f0a6'} /*  */
.octicon-jump-up:before { content: '\f073'} /*  */
.octicon-key:before { content: '\f049'} /*  */
.octicon-keyboard:before { content: '\f00d'} /*  */
.octicon-law:before { content: '\f0d8'} /* */
.octicon-light-bulb:before { content: '\f000'} /*  */
.octicon-link:before { content: '\f05c'} /*  */
.octicon-link-external:before { content: '\f07f'} /*  */
.octicon-list-ordered:before { content: '\f062'} /*  */
.octicon-list-unordered:before { content: '\f061'} /*  */
.octicon-location:before { content: '\f060'} /*  */
.octicon-gist-private:before,
.octicon-mirror-private:before,
.octicon-git-fork-private:before,
.octicon-lock:before { content: '\f06a'} /*  */
.octicon-logo-github:before { content: '\f092'} /*  */
.octicon-mail:before { content: '\f03b'} /*  */
.octicon-mail-read:before { content: '\f03c'} /*  */
.octicon-mail-reply:before { content: '\f051'} /*  */
.octicon-mark-github:before { content: '\f00a'} /*  */
.octicon-markdown:before { content: '\f0c9'} /*  */
.octicon-megaphone:before { content: '\f077'} /*  */
.octicon-mention:before { content: '\f0be'} /*  */
.octicon-microscope:before { content: '\f089'} /*  */
.octicon-milestone:before { content: '\f075'} /*  */
.octicon-mirror-public:before,
.octicon-mirror:before { content: '\f024'} /*  */
.octicon-mortar-board:before { content: '\f0d7'} /* */
.octicon-move-down:before { content: '\f0a8'} /*  */
.octicon-move-left:before { content: '\f074'} /*  */
.octicon-move-right:before { content: '\f0a9'} /*  */
.octicon-move-up:before { content: '\f0a7'} /*  */
.octicon-mute:before { content: '\f080'} /*  */
.octicon-no-newline:before { content: '\f09c'} /*  */
.octicon-octoface:before { content: '\f008'} /*  */
.octicon-organization:before { content: '\f037'} /*  */
.octicon-package:before { content: '\f0c4'} /*  */
.octicon-paintcan:before { content: '\f0d1'} /*  */
.octicon-pencil:before { content: '\f058'} /*  */
.octicon-person-add:before,
.octicon-person-follow:before,
.octicon-person:before { content: '\f018'} /*  */
.octicon-pin:before { content: '\f041'} /*  */
.octicon-playback-fast-forward:before { content: '\f0bd'} /*  */
.octicon-playback-pause:before { content: '\f0bb'} /*  */
.octicon-playback-play:before { content: '\f0bf'} /*  */
.octicon-playback-rewind:before { content: '\f0bc'} /*  */
.octicon-plug:before { content: '\f0d4'} /*  */
.octicon-repo-create:before,
.octicon-gist-new:before,
.octicon-file-directory-create:before,
.octicon-file-add:before,
.octicon-plus:before { content: '\f05d'} /*  */
.octicon-podium:before { content: '\f0af'} /*  */
.octicon-primitive-dot:before { content: '\f052'} /*  */
.octicon-primitive-square:before { content: '\f053'} /*  */
.octicon-pulse:before { content: '\f085'} /*  */
.octicon-puzzle:before { content: '\f0c0'} /*  */
.octicon-question:before { content: '\f02c'} /*  */
.octicon-quote:before { content: '\f063'} /*  */
.octicon-radio-tower:before { content: '\f030'} /*  */
.octicon-repo-delete:before,
.octicon-repo:before { content: '\f001'} /*  */
.octicon-repo-clone:before { content: '\f04c'} /*  */
.octicon-repo-force-push:before { content: '\f04a'} /*  */
.octicon-gist-fork:before,
.octicon-repo-forked:before { content: '\f002'} /*  */
.octicon-repo-pull:before { content: '\f006'} /*  */
.octicon-repo-push:before { content: '\f005'} /*  */
.octicon-rocket:before { content: '\f033'} /*  */
.octicon-rss:before { content: '\f034'} /*  */
.octicon-ruby:before { content: '\f047'} /*  */
.octicon-screen-full:before { content: '\f066'} /*  */
.octicon-screen-normal:before { content: '\f067'} /*  */
.octicon-search-save:before,
.octicon-search:before { content: '\f02e'} /*  */
.octicon-server:before { content: '\f097'} /*  */
.octicon-settings:before { content: '\f07c'} /*  */
.octicon-log-in:before,
.octicon-sign-in:before { content: '\f036'} /*  */
.octicon-log-out:before,
.octicon-sign-out:before { content: '\f032'} /*  */
.octicon-split:before { content: '\f0c6'} /*  */
.octicon-squirrel:before { content: '\f0b2'} /*  */
.octicon-star-add:before,
.octicon-star-delete:before,
.octicon-star:before { content: '\f02a'} /*  */
.octicon-steps:before { content: '\f0c7'} /*  */
.octicon-stop:before { content: '\f08f'} /*  */
.octicon-repo-sync:before,
.octicon-sync:before { content: '\f087'} /*  */
.octicon-tag-remove:before,
.octicon-tag-add:before,
.octicon-tag:before { content: '\f015'} /*  */
.octicon-telescope:before { content: '\f088'} /*  */
.octicon-terminal:before { content: '\f0c8'} /*  */
.octicon-three-bars:before { content: '\f05e'} /*  */
.octicon-tools:before { content: '\f031'} /*  */
.octicon-trashcan:before { content: '\f0d0'} /*  */
.octicon-triangle-down:before { content: '\f05b'} /*  */
.octicon-triangle-left:before { content: '\f044'} /*  */
.octicon-triangle-right:before { content: '\f05a'} /*  */
.octicon-triangle-up:before { content: '\f0aa'} /*  */
.octicon-unfold:before { content: '\f039'} /*  */
.octicon-unmute:before { content: '\f0ba'} /*  */
.octicon-versions:before { content: '\f064'} /*  */
.octicon-remove-close:before,
.octicon-x:before { content: '\f081'} /*  */
.octicon-zap:before { content: '\26A1'} /* ⚡ */

View file

@ -1,233 +0,0 @@
@octicons-font-path: ".";
@octicons-version: "a594b5fd4cae0b2afd156bca8dad8d27ac3d7594";
@font-face {
font-family: 'octicons';
src: ~"url('@{octicons-font-path}/octicons.eot?#iefix&v=@{octicons-version}') format('embedded-opentype')",
~"url('@{octicons-font-path}/octicons.woff?v=@{octicons-version}') format('woff')",
~"url('@{octicons-font-path}/octicons.ttf?v=@{octicons-version}') format('truetype')",
~"url('@{octicons-font-path}/octicons.svg?v=@{octicons-version}#octicons') format('svg')";
font-weight: normal;
font-style: normal;
}
// .octicon is optimized for 16px.
// .mega-octicon is optimized for 32px but can be used larger.
.octicon, .mega-octicon {
font: normal normal normal 16px/1 octicons;
display: inline-block;
text-decoration: none;
text-rendering: auto;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.mega-octicon { font-size: 32px; }
.octicon-alert:before { content: '\f02d'} /*  */
.octicon-alignment-align:before { content: '\f08a'} /*  */
.octicon-alignment-aligned-to:before { content: '\f08e'} /*  */
.octicon-alignment-unalign:before { content: '\f08b'} /*  */
.octicon-arrow-down:before { content: '\f03f'} /*  */
.octicon-arrow-left:before { content: '\f040'} /*  */
.octicon-arrow-right:before { content: '\f03e'} /*  */
.octicon-arrow-small-down:before { content: '\f0a0'} /*  */
.octicon-arrow-small-left:before { content: '\f0a1'} /*  */
.octicon-arrow-small-right:before { content: '\f071'} /*  */
.octicon-arrow-small-up:before { content: '\f09f'} /*  */
.octicon-arrow-up:before { content: '\f03d'} /*  */
.octicon-beer:before { content: '\f069'} /*  */
.octicon-book:before { content: '\f007'} /*  */
.octicon-bookmark:before { content: '\f07b'} /*  */
.octicon-briefcase:before { content: '\f0d3'} /*  */
.octicon-broadcast:before { content: '\f048'} /*  */
.octicon-browser:before { content: '\f0c5'} /*  */
.octicon-bug:before { content: '\f091'} /*  */
.octicon-calendar:before { content: '\f068'} /*  */
.octicon-check:before { content: '\f03a'} /*  */
.octicon-checklist:before { content: '\f076'} /*  */
.octicon-chevron-down:before { content: '\f0a3'} /*  */
.octicon-chevron-left:before { content: '\f0a4'} /*  */
.octicon-chevron-right:before { content: '\f078'} /*  */
.octicon-chevron-up:before { content: '\f0a2'} /*  */
.octicon-circle-slash:before { content: '\f084'} /*  */
.octicon-circuit-board:before { content: '\f0d6'} /*  */
.octicon-clippy:before { content: '\f035'} /*  */
.octicon-clock:before { content: '\f046'} /*  */
.octicon-cloud-download:before { content: '\f00b'} /*  */
.octicon-cloud-upload:before { content: '\f00c'} /*  */
.octicon-code:before { content: '\f05f'} /*  */
.octicon-color-mode:before { content: '\f065'} /*  */
.octicon-comment-add:before,
.octicon-comment:before { content: '\f02b'} /*  */
.octicon-comment-discussion:before { content: '\f04f'} /*  */
.octicon-credit-card:before { content: '\f045'} /*  */
.octicon-dash:before { content: '\f0ca'} /*  */
.octicon-dashboard:before { content: '\f07d'} /*  */
.octicon-database:before { content: '\f096'} /*  */
.octicon-device-camera:before { content: '\f056'} /*  */
.octicon-device-camera-video:before { content: '\f057'} /*  */
.octicon-device-desktop:before { content: '\f27c'} /*  */
.octicon-device-mobile:before { content: '\f038'} /*  */
.octicon-diff:before { content: '\f04d'} /*  */
.octicon-diff-added:before { content: '\f06b'} /*  */
.octicon-diff-ignored:before { content: '\f099'} /*  */
.octicon-diff-modified:before { content: '\f06d'} /*  */
.octicon-diff-removed:before { content: '\f06c'} /*  */
.octicon-diff-renamed:before { content: '\f06e'} /*  */
.octicon-ellipsis:before { content: '\f09a'} /*  */
.octicon-eye-unwatch:before,
.octicon-eye-watch:before,
.octicon-eye:before { content: '\f04e'} /*  */
.octicon-file-binary:before { content: '\f094'} /*  */
.octicon-file-code:before { content: '\f010'} /*  */
.octicon-file-directory:before { content: '\f016'} /*  */
.octicon-file-media:before { content: '\f012'} /*  */
.octicon-file-pdf:before { content: '\f014'} /*  */
.octicon-file-submodule:before { content: '\f017'} /*  */
.octicon-file-symlink-directory:before { content: '\f0b1'} /*  */
.octicon-file-symlink-file:before { content: '\f0b0'} /*  */
.octicon-file-text:before { content: '\f011'} /*  */
.octicon-file-zip:before { content: '\f013'} /*  */
.octicon-flame:before { content: '\f0d2'} /*  */
.octicon-fold:before { content: '\f0cc'} /*  */
.octicon-gear:before { content: '\f02f'} /*  */
.octicon-gift:before { content: '\f042'} /*  */
.octicon-gist:before { content: '\f00e'} /*  */
.octicon-gist-secret:before { content: '\f08c'} /*  */
.octicon-git-branch-create:before,
.octicon-git-branch-delete:before,
.octicon-git-branch:before { content: '\f020'} /*  */
.octicon-git-commit:before { content: '\f01f'} /*  */
.octicon-git-compare:before { content: '\f0ac'} /*  */
.octicon-git-merge:before { content: '\f023'} /*  */
.octicon-git-pull-request-abandoned:before,
.octicon-git-pull-request:before { content: '\f009'} /*  */
.octicon-globe:before { content: '\f0b6'} /*  */
.octicon-graph:before { content: '\f043'} /*  */
.octicon-heart:before { content: '\2665'} /* ♥ */
.octicon-history:before { content: '\f07e'} /*  */
.octicon-home:before { content: '\f08d'} /*  */
.octicon-horizontal-rule:before { content: '\f070'} /*  */
.octicon-hourglass:before { content: '\f09e'} /*  */
.octicon-hubot:before { content: '\f09d'} /*  */
.octicon-inbox:before { content: '\f0cf'} /*  */
.octicon-info:before { content: '\f059'} /*  */
.octicon-issue-closed:before { content: '\f028'} /*  */
.octicon-issue-opened:before { content: '\f026'} /*  */
.octicon-issue-reopened:before { content: '\f027'} /*  */
.octicon-jersey:before { content: '\f019'} /*  */
.octicon-jump-down:before { content: '\f072'} /*  */
.octicon-jump-left:before { content: '\f0a5'} /*  */
.octicon-jump-right:before { content: '\f0a6'} /*  */
.octicon-jump-up:before { content: '\f073'} /*  */
.octicon-key:before { content: '\f049'} /*  */
.octicon-keyboard:before { content: '\f00d'} /*  */
.octicon-law:before { content: '\f0d8'} /* */
.octicon-light-bulb:before { content: '\f000'} /*  */
.octicon-link:before { content: '\f05c'} /*  */
.octicon-link-external:before { content: '\f07f'} /*  */
.octicon-list-ordered:before { content: '\f062'} /*  */
.octicon-list-unordered:before { content: '\f061'} /*  */
.octicon-location:before { content: '\f060'} /*  */
.octicon-gist-private:before,
.octicon-mirror-private:before,
.octicon-git-fork-private:before,
.octicon-lock:before { content: '\f06a'} /*  */
.octicon-logo-github:before { content: '\f092'} /*  */
.octicon-mail:before { content: '\f03b'} /*  */
.octicon-mail-read:before { content: '\f03c'} /*  */
.octicon-mail-reply:before { content: '\f051'} /*  */
.octicon-mark-github:before { content: '\f00a'} /*  */
.octicon-markdown:before { content: '\f0c9'} /*  */
.octicon-megaphone:before { content: '\f077'} /*  */
.octicon-mention:before { content: '\f0be'} /*  */
.octicon-microscope:before { content: '\f089'} /*  */
.octicon-milestone:before { content: '\f075'} /*  */
.octicon-mirror-public:before,
.octicon-mirror:before { content: '\f024'} /*  */
.octicon-mortar-board:before { content: '\f0d7'} /* */
.octicon-move-down:before { content: '\f0a8'} /*  */
.octicon-move-left:before { content: '\f074'} /*  */
.octicon-move-right:before { content: '\f0a9'} /*  */
.octicon-move-up:before { content: '\f0a7'} /*  */
.octicon-mute:before { content: '\f080'} /*  */
.octicon-no-newline:before { content: '\f09c'} /*  */
.octicon-octoface:before { content: '\f008'} /*  */
.octicon-organization:before { content: '\f037'} /*  */
.octicon-package:before { content: '\f0c4'} /*  */
.octicon-paintcan:before { content: '\f0d1'} /*  */
.octicon-pencil:before { content: '\f058'} /*  */
.octicon-person-add:before,
.octicon-person-follow:before,
.octicon-person:before { content: '\f018'} /*  */
.octicon-pin:before { content: '\f041'} /*  */
.octicon-playback-fast-forward:before { content: '\f0bd'} /*  */
.octicon-playback-pause:before { content: '\f0bb'} /*  */
.octicon-playback-play:before { content: '\f0bf'} /*  */
.octicon-playback-rewind:before { content: '\f0bc'} /*  */
.octicon-plug:before { content: '\f0d4'} /*  */
.octicon-repo-create:before,
.octicon-gist-new:before,
.octicon-file-directory-create:before,
.octicon-file-add:before,
.octicon-plus:before { content: '\f05d'} /*  */
.octicon-podium:before { content: '\f0af'} /*  */
.octicon-primitive-dot:before { content: '\f052'} /*  */
.octicon-primitive-square:before { content: '\f053'} /*  */
.octicon-pulse:before { content: '\f085'} /*  */
.octicon-puzzle:before { content: '\f0c0'} /*  */
.octicon-question:before { content: '\f02c'} /*  */
.octicon-quote:before { content: '\f063'} /*  */
.octicon-radio-tower:before { content: '\f030'} /*  */
.octicon-repo-delete:before,
.octicon-repo:before { content: '\f001'} /*  */
.octicon-repo-clone:before { content: '\f04c'} /*  */
.octicon-repo-force-push:before { content: '\f04a'} /*  */
.octicon-gist-fork:before,
.octicon-repo-forked:before { content: '\f002'} /*  */
.octicon-repo-pull:before { content: '\f006'} /*  */
.octicon-repo-push:before { content: '\f005'} /*  */
.octicon-rocket:before { content: '\f033'} /*  */
.octicon-rss:before { content: '\f034'} /*  */
.octicon-ruby:before { content: '\f047'} /*  */
.octicon-screen-full:before { content: '\f066'} /*  */
.octicon-screen-normal:before { content: '\f067'} /*  */
.octicon-search-save:before,
.octicon-search:before { content: '\f02e'} /*  */
.octicon-server:before { content: '\f097'} /*  */
.octicon-settings:before { content: '\f07c'} /*  */
.octicon-log-in:before,
.octicon-sign-in:before { content: '\f036'} /*  */
.octicon-log-out:before,
.octicon-sign-out:before { content: '\f032'} /*  */
.octicon-split:before { content: '\f0c6'} /*  */
.octicon-squirrel:before { content: '\f0b2'} /*  */
.octicon-star-add:before,
.octicon-star-delete:before,
.octicon-star:before { content: '\f02a'} /*  */
.octicon-steps:before { content: '\f0c7'} /*  */
.octicon-stop:before { content: '\f08f'} /*  */
.octicon-repo-sync:before,
.octicon-sync:before { content: '\f087'} /*  */
.octicon-tag-remove:before,
.octicon-tag-add:before,
.octicon-tag:before { content: '\f015'} /*  */
.octicon-telescope:before { content: '\f088'} /*  */
.octicon-terminal:before { content: '\f0c8'} /*  */
.octicon-three-bars:before { content: '\f05e'} /*  */
.octicon-tools:before { content: '\f031'} /*  */
.octicon-trashcan:before { content: '\f0d0'} /*  */
.octicon-triangle-down:before { content: '\f05b'} /*  */
.octicon-triangle-left:before { content: '\f044'} /*  */
.octicon-triangle-right:before { content: '\f05a'} /*  */
.octicon-triangle-up:before { content: '\f0aa'} /*  */
.octicon-unfold:before { content: '\f039'} /*  */
.octicon-unmute:before { content: '\f0ba'} /*  */
.octicon-versions:before { content: '\f064'} /*  */
.octicon-remove-close:before,
.octicon-x:before { content: '\f081'} /*  */
.octicon-zap:before { content: '\26A1'} /* ⚡ */

View file

@ -1,198 +0,0 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg xmlns="http://www.w3.org/2000/svg">
<metadata>
(c) 2012-2014 GitHub
When using the GitHub logos, be sure to follow the GitHub logo guidelines (https://github.com/logos)
Font License: SIL OFL 1.1 (http://scripts.sil.org/OFL)
Applies to all font files
Code License: MIT (http://choosealicense.com/licenses/mit/)
Applies to all other files
</metadata>
<defs>
<font id="octicons" horiz-adv-x="1024" >
<font-face font-family="octicons" font-weight="400" font-stretch="normal" units-per-em="1024" ascent="832" descent="-192" />
<missing-glyph d="M512 832C229.25 832 0 602.75 0 320c0-226.25 146.688-418.125 350.156-485.812 25.594-4.688 34.938 11.125 34.938 24.625 0 12.188-0.469 52.562-0.719 95.312C242-76.81200000000001 211.906 14.5 211.906 14.5c-23.312 59.125-56.844 74.875-56.844 74.875-46.531 31.75 3.53 31.125 3.53 31.125 51.406-3.562 78.47-52.75 78.47-52.75 45.688-78.25 119.875-55.625 149-42.5 4.654 33 17.904 55.625 32.5 68.375C304.906 106.56200000000001 185.344 150.5 185.344 346.688c0 55.938 19.969 101.562 52.656 137.406-5.219 13-22.844 65.094 5.062 135.562 0 0 42.938 13.75 140.812-52.5 40.812 11.406 84.594 17.031 128.125 17.219 43.5-0.188 87.312-5.875 128.188-17.281 97.688 66.312 140.688 52.5 140.688 52.5 28-70.531 10.375-122.562 5.125-135.5 32.812-35.844 52.625-81.469 52.625-137.406 0-196.688-119.75-240-233.812-252.688 18.438-15.875 34.75-47 34.75-94.75 0-68.438-0.688-123.625-0.688-140.5 0-13.625 9.312-29.562 35.25-24.562C877.438-98 1024 93.875 1024 320 1024 602.75 794.75 832 512 832z" horiz-adv-x="1024" />
<glyph glyph-name="alert" unicode="&#xf02d;" d="M1005.854 31.753000000000043l-438.286 767C556.173 818.694 534.967 831 512 831s-44.173-12.306-55.567-32.247l-438.286-767c-11.319-19.809-11.238-44.144 0.213-63.876C29.811-51.85500000000002 50.899-64 73.714-64h876.572c22.814 0 43.903 12.145 55.354 31.877S1017.173 11.94399999999996 1005.854 31.753000000000043zM576 64H448V192h128V64zM576 256H448V512h128V256z" horiz-adv-x="1024" />
<glyph glyph-name="alignment-align" unicode="&#xf08a;" d="M192 768C85.938 768 0 682.062 0 576s85.938-192 192-192c106.062 0 192 85.938 192 192S298.062 768 192 768zM672 224l160 160H384v-448l160 160 288-288 128 128L672 224z" horiz-adv-x="960" />
<glyph glyph-name="alignment-aligned-to" unicode="&#xf08e;" d="M384 256l128 128 288-288 160 160v-448H512l160 160L384 256zM192 384C85.938 384 0 469.938 0 576S85.938 768 192 768c106.062 0 192-85.938 192-192S298.062 384 192 384z" horiz-adv-x="960" />
<glyph glyph-name="alignment-unalign" unicode="&#xf08b;" d="M512 640L384 512 128 768 0 640l256-256L128 256l64-64 384 384L512 640zM640 256l128 128-64 64L320 64l64-64 128 128 256-256 128 128L640 256z" horiz-adv-x="896" />
<glyph glyph-name="arrow-down" unicode="&#xf03f;" d="M448 384V640H192v-256H0l320-384 320 384H448z" horiz-adv-x="640" />
<glyph glyph-name="arrow-left" unicode="&#xf040;" d="M384 448V640L0 320l384-320V192h256V448H384z" horiz-adv-x="640" />
<glyph glyph-name="arrow-right" unicode="&#xf03e;" d="M640 320L256 640v-192H0v-256h256v-192L640 320z" horiz-adv-x="640" />
<glyph glyph-name="arrow-small-down" unicode="&#xf0a0;" d="M256 384V512H128v-128H0l192-256 192 256H256z" horiz-adv-x="384" />
<glyph glyph-name="arrow-small-left" unicode="&#xf0a1;" d="M256 384V512L0 320l256-192V256h128V384H256z" horiz-adv-x="384" />
<glyph glyph-name="arrow-small-right" unicode="&#xf071;" d="M384 320L128 512v-128H0v-128h128v-128L384 320z" horiz-adv-x="384" />
<glyph glyph-name="arrow-small-up" unicode="&#xf09f;" d="M192 512L0 256h128v-128h128V256h128L192 512z" horiz-adv-x="384" />
<glyph glyph-name="arrow-up" unicode="&#xf03d;" d="M320 640L0 256h192v-256h256V256h192L320 640z" horiz-adv-x="640" />
<glyph glyph-name="beer" unicode="&#xf069;" d="M896 576c-31 0-192 0-192 0v128c0 71-158 128-352 128s-352-57-352-128v-768c0-71 158-128 352-128s352 57 352 128v128s160 0 192 0 64 30 64 64 0 350 0 384-29 64-64 64z m-704-576h-64v512h64v-512z m192-64h-64v512h64v-512z m192 64h-64v512h64v-512z m-224 640c-124 0-224 29-224 64s100 64 224 64 224-29 224-64-100-64-224-64z m480-448h-128v256h128v-256z" horiz-adv-x="1024" />
<glyph glyph-name="book" unicode="&#xf007;" d="M768 256h-128c-34 0-64-32-64-64h256c0 34-32 64-64 64z m-55 416c-167 0-209-32-233-56-24 24-66 56-233 56s-247-46-247-78v-586c29 16 119 48 214 56 115 9 234-9 234-32 0-16 8-31 31-32 0 0 0 0 1 0 0 0 0 0 1 0 23 1 31 16 31 32 0 23 119 41 234 32 94-7 185-40 214-56v586c0 32-80 78-247 78z m-265-572c-30 16-103 28-192 28s-170-12-192-27c0 0 0 411 0 443s64 59 192 59 192-27 192-59 0-444 0-444z m448 1c-22 15-103 27-192 27s-162-12-192-28c0 0 0 412 0 444s64 59 192 59 192-27 192-59 0-443 0-443z m-128 283h-128c-34 0-64-32-64-64h256c0 34-32 64-64 64z m0 128h-128c-34 0-64-32-64-64h256c0 34-32 64-64 64z m-448-128h-128c-32 0-64-30-64-64h256c0 32-30 64-64 64z m0-128h-128c-32 0-64-30-64-64h256c0 32-30 64-64 64z m0 256h-128c-32 0-64-30-64-64h256c0 32-30 64-64 64z" horiz-adv-x="1024" />
<glyph glyph-name="bookmark" unicode="&#xf07b;" d="M0 704v-768l192 128 192-128V704H0zM316.25 507.25l-71.875-51.938 27.188-83.406c2.75-8.375-0.688-11.062-7.562-6.594l-72 52.094-72-52.031c-6.844-4.469-10.312-1.781-7.562 6.594l27.219 83.406L67.783 507.25c-6.469 5.125-5 9.219 3.906 9.219l88 0.125 27.125 83.094c2.812 8.812 7.562 8.812 10.375 0l27.188-83.094 87.938-0.125C321.25 516.469 322.688 512.375 316.25 507.25z" horiz-adv-x="384" />
<glyph glyph-name="briefcase" unicode="&#xf0d3;" d="M896 640H640v66c0 34.2-27.8 62-62 62H446c-34.2 0-62-27.8-62-62v-66H128c-35.3 0-64-28.7-64-64v-512c0-35.3 28.7-64 64-64h768c35.3 0 64 28.7 64 64V576C960 611.3 931.3 640 896 640zM448 688c0 8.8 7.2 16 16 16h96c8.8 0 16-7.2 16-16v-48H448V688zM896 320H576v-64H448v64H128V576h64v-192h640V576h64V320z" horiz-adv-x="1024" />
<glyph glyph-name="broadcast" unicode="&#xf048;" d="M448 640c142 0 256-115 256-256 0-69-28-132-72-178l-16-93c91 56 152 156 152 271 0 177-143 320-320 320s-320-143-320-320c0-115 61-215 152-271l-16 93c-45 46-72 109-72 178 0 142 114 256 256 256z m-64-320c-36 0-64-29-64-64v-128c0-36 30-64 64-64v-256h128v256c34 0 64 28 64 64v128c0 35-28 64-64 64s-64 0-64 0-28 0-64 0z m192 128c0 71-57 128-128 128s-128-57-128-128 57-128 128-128 128 57 128 128z m-128 384c-247 0-448-201-448-448 0-197 128-363 305-423l-12 72c-135 60-229 194-229 351 0 212 172 384 384 384s384-172 384-384c0-157-94-291-229-351l-12-72c177 60 305 225 305 423 0 247-201 448-448 448z" horiz-adv-x="896" />
<glyph glyph-name="browser" unicode="&#xf0c5;" d="M320 640h64v-64h-64V640zM192 640h64v-64h-64V640zM64 640h64v-64H64V640zM832 0H64V512h768V0zM832 576H448v64h384V576zM896 640c0 35.35-28.65 64-64 64H64c-35.35 0-64-28.65-64-64v-640c0-35.35 28.65-64 64-64h768c35.35 0 64 28.65 64 64V640z" horiz-adv-x="896" />
<glyph glyph-name="bug" unicode="&#xf091;" d="M243.621 675.469C190.747 618.688 205.34 528 205.34 528s53.968-64 160-64c106.031 0 160.031 64 160.031 64s14.375 89.469-37.375 146.312c32.375 18.031 51.438 44.094 43.562 61.812-8.938 19.969-48.375 21.75-88.25 3.969-14.812-6.594-27.438-14.969-37.25-23.875-12.438 2.25-25.625 3.781-40.72 3.781-14.061 0-26.561-1.344-38.344-3.25-9.656 8.75-22.062 16.875-36.531 23.344-39.875 17.719-79.375 15.938-88.25-3.969C194.465 718.781 212.497 693.438 243.621 675.469zM644.746 262.25c-8.25 1.75-16.125 2.75-23.75 3.5 0 2.125 0.375 4.125 0.375 6.312 0 33.594-4.75 65.654-12.438 96.125 16.438-1.406 37.375 2.375 58.562 11.779 39.875 17.781 65 48.375 56.125 68.219-8.875 19.969-48.375 21.75-88.25 3.969-18.625-8.312-33.812-19.469-44-30.906-7.75 18.25-16.5 35.781-26.812 51.719-30.188-25.156-87.312-62.719-167.062-71.062v-321.781c0 0-0.25-32-32.031-32-31.75 0-32 32-32 32V401.781c-79.811 8.344-136.968 45.969-167.093 71.062-9.875-15.312-18.375-32-25.938-49.344-10.281 10.625-24.625 20.844-41.969 28.594-39.875 17.719-79.375 15.938-88.25-3.969-8.906-19.906 16.25-50.438 56.125-68.219 19.844-8.846 39.531-12.812 55.469-12.096-7.656-30.404-12.469-62.344-12.469-95.812 0-2.188 0.375-4.25 0.438-6.5-6.719-0.75-13.688-1.75-20.781-3.25-51.969-10.75-91.781-37.625-88.844-59.812 2.938-22.312 47.5-31.5 99.594-20.688 6.781 1.375 13.438 3.125 19.781 5.062C128.684 146 143.34 108.125 163.622 75.5c-12.031-6.062-24.531-15-36.031-26.625C95.715 17 82.779-21.75 98.715-37.68799999999999c15.938-15.937 54.656-3 86.531 28.812 9.344 9.375 16.844 19.25 22.656 29C251.434-22.5 305.965-48 365.465-48c60.343 0 115.781 26.25 159.531 69.938 5.875-10.312 13.75-20.812 23.625-30.688 31.812-31.875 70.625-44.812 86.562-28.875s3 54.625-28.875 86.5c-12.312 12.375-25.688 21.75-38.438 27.938 20.125 32.5 34.625 70.375 43.688 111.062 7.188-2.25 14.688-4.375 22.562-6.062 52.061-10.812 96.625-1.562 99.625 20.688C736.558 224.625 696.746 251.5 644.746 262.25z" horiz-adv-x="733.886" />
<glyph glyph-name="calendar" unicode="&#xf068;" d="M704 320h-64v-128h64V320zM576 320h-64v-128h64V320zM704 512h-64v-128h64V512zM832 320h-64v-128h64V320zM576 128h-64v-128h64V128zM768 832h-64v-128h64V832zM256 832h-64v-128h64V832zM832 512h-64v-128h64V512zM576 512h-64v-128h64V512zM320 128h-64v-128h64V128zM192 320h-64v-128h64V320zM320 320h-64v-128h64V320zM832 768v-128H640V768H320v-128H128V768H0v-896h960V768H832zM896-64H64V576h832V-64zM192 128h-64v-128h64V128zM448 512h-64v-128h64V512zM448 128h-64v-128h64V128zM320 512h-64v-128h64V512zM448 320h-64v-128h64V320zM704 128h-64v-128h64V128z" horiz-adv-x="1024" />
<glyph glyph-name="check" unicode="&#xf03a;" d="M640 640L256 256 128 384 0 256l256-256 512 512L640 640z" horiz-adv-x="768" />
<glyph glyph-name="checklist" unicode="&#xf076;" d="M760.688 315.78099999999995l-49.812 49.656c-6.438 6.529-16.938 6.594-23.375 0L582.5 260.5 462.375 140.125l-93.031 93.125c-6.531 6.562-17.031 6.562-23.5 0l-49.719-49.688c-6.531-6.562-6.531-17.062 0-23.562l104.781-104.875 17.969-17.875 31.688-31.812c6.562-6.562 17.188-6.562 23.562 0l49.625 49.688L760.625 292.22C767.25 298.688 767.25 309.188 760.688 315.78099999999995zM228.469 251.188L278.156 301c42.469 42.375 116.344 42.438 158.781-0.062l25.312-25.312L576 384V704H0v-704h320l-91.531 92.125C184.688 136.062 184.688 207.375 228.469 251.188zM192 640h320v-64H192V640zM192 512h320v-64H192V512zM128 320H64v64h64V320zM128 448H64v64h64V448zM128 576H64v64h64V576zM192 384h64v-64h-64V384z" horiz-adv-x="765.602" />
<glyph glyph-name="chevron-down" unicode="&#xf0a3;" d="M512 512L320 320 128 512 0 384l320-320 320 320L512 512z" horiz-adv-x="640" />
<glyph glyph-name="chevron-left" unicode="&#xf0a4;" d="M448 512L320 640 0 320l320-320 128 128L256 320 448 512z" horiz-adv-x="448" />
<glyph glyph-name="chevron-right" unicode="&#xf078;" d="M128 640L0 512l192-192L0 128l128-128 320 320L128 640z" horiz-adv-x="448" />
<glyph glyph-name="chevron-up" unicode="&#xf0a2;" d="M320 576L0 256l128-128 192 192 192-192 128 128L320 576z" horiz-adv-x="640" />
<glyph glyph-name="circle-slash" unicode="&#xf084;" d="M320 640C143.219 640 0 496.781 0 320c0-176.75 143.219-320 320-320 176.75 0 320 143.25 320 320C640 496.781 496.75 640 320 640zM320 512c27.656 0 53.688-6.094 77.438-16.562L144.562 242.562C134.094 266.312 128 292.34400000000005 128 320 128 426 213.938 512 320 512zM320 128c-28.031 0-54.531 6.375-78.594 17.125l253.906 252.5C505.875 373.812 512 347.719 512 320 512 213.938 426.062 128 320 128z" horiz-adv-x="640" />
<glyph glyph-name="circuit-board" unicode="&#xf0d6;" d="M320 576c35.346 0 64-28.654 64-64 0-35.346-28.654-64-64-64s-64 28.654-64 64C256 547.346 284.654 576 320 576zM960 64c0-106.039-85.961-192-192-192H320l192 192h81.128c22.132-38.258 63.494-64 110.872-64 70.692 0 128 57.308 128 128s-57.308 128-128 128c-47.377 0-88.74-25.742-110.872-64H448L156.044-99.95600000000002C100.845-66.23199999999997 64-5.419999999999959 64 64V576c0 106.039 85.961 192 192 192v-145.128C217.742 600.74 192 559.377 192 512c0-70.692 57.308-128 128-128 47.276 0 88.56 25.633 110.727 63.756l162.416 0.219C615.279 409.731 656.633 384 704 384c70.692 0 128 57.308 128 128s-57.308 128-128 128c-47.388 0-88.758-25.753-110.887-64.025l-162.097-0.219c-11.246 19.54-27.503 35.828-47.016 47.116V768h384c106.039 0 192-85.961 192-192V64zM640 128c0 35.346 28.654 64 64 64s64-28.654 64-64c0-35.346-28.654-64-64-64S640 92.654 640 128zM640 512c0 35.346 28.654 64 64 64s64-28.654 64-64c0-35.346-28.654-64-64-64S640 476.654 640 512z" horiz-adv-x="1024" />
<glyph glyph-name="clippy" unicode="&#xf035;" d="M704-64h-640v576h640v-192h64v320c0 35-29 64-64 64h-192c0 71-57 128-128 128s-128-57-128-128h-192c-35 0-64-29-64-64v-704c0-35 29-64 64-64h640c35 0 64 29 64 64v128h-64v-128z m-512 704c29 0 29 0 64 0s64 29 64 64 29 64 64 64 64-29 64-64 32-64 64-64 33 0 64 0 64-29 64-64h-512c0 39 28 64 64 64z m-64-512h128v64h-128v-64z m448 128v128l-256-192 256-192v128h320v128h-320z m-448-256h192v64h-192v-64z m320 448h-320v-64h320v64z m-192-128h-128v-64h128v64z" horiz-adv-x="896" />
<glyph glyph-name="clock" unicode="&#xf046;" d="M384 256h256l64 64-64 64H512V576l-64 64-64-64V256zM448 768C200.562 768 0 567.438 0 320c0-247.438 200.562-448 448-448 247.438 0 448 200.562 448 448C896 567.438 695.438 768 448 768zM448 0c-176.25 0-320 143.75-320 320 0 175.938 144.188 319.5 320 320 175.812-0.5 320-144.062 320-320C768 143.75 624.25 0 448 0z" horiz-adv-x="896" />
<glyph glyph-name="cloud-download" unicode="&#xf00b;" d="M832 512c-8.75 0-17.125-1.406-25.625-2.562C757.625 623.75 644.125 704 512 704c-132.156 0-245.562-80.25-294.406-194.562C209.156 510.594 200.781 512 192 512 85.938 512 0 426.062 0 320s85.938-192 192-192c20.531 0 39.875 4.25 58.375 10.375C284.469 100.625 331.312 75.25 384 67.5v65.25c-49.844 10.375-91.594 42.812-112.625 87.875C249.531 203 222.219 192 192 192c-70.656 0-128 57.375-128 128 0 70.656 57.344 128 128 128 25.281 0 48.625-7.562 68.406-20.094C281.344 548.219 385.594 640 512 640c126.5 0 229.75-92.219 250.5-212.75 20 13 43.875 20.75 69.5 20.75 70.625 0 128-57.344 128-128 0-70.625-57.375-128-128-128-10.25 0-20 1.5-29.625 3.75C773.438 154.875 725.938 128 672 128c-11.062 0-21.625 1.625-32 4v-64.938c10.438-1.688 21.062-3.062 32-3.062 61.188 0 116.5 24.625 156.938 64.438C830 128.375 830.875 128 832 128c106.062 0 192 85.938 192 192S938.062 512 832 512zM576 320H448v-320H320l192-192 192 192H576V320z" horiz-adv-x="1024" />
<glyph glyph-name="cloud-upload" unicode="&#xf00c;" d="M512 448L320 256h128v-320h128V256h128L512 448zM832 512c-8.75 0-17.125-1.406-25.625-2.562C757.625 623.812 644.125 704 512 704c-132.156 0-245.562-80.188-294.406-194.562C209.156 510.594 200.781 512 192 512 85.938 512 0 426 0 320c0-106.062 85.938-192 192-192 20.531 0 39.875 4.25 58.375 10.438C284.469 100.625 331.312 75.25 384 67.5v65.25c-49.844 10.375-91.594 42.812-112.625 87.75C249.531 203 222.219 192 192 192c-70.656 0-128 57.375-128 128 0 70.656 57.344 128 128 128 25.281 0 48.625-7.562 68.406-20.156C281.344 548.219 385.594 640 512 640c126.5 0 229.75-92.219 250.5-212.75 20 13 43.875 20.75 69.5 20.75 70.625 0 128-57.344 128-128 0-70.625-57.375-128-128-128-10.25 0-20 1.5-29.625 3.75C773.438 154.875 725.938 128 672 128c-11.062 0-21.625 1.625-32 4v-64.938c10.438-1.688 21.062-3.062 32-3.062 61.188 0 116.5 24.688 157 64.438 1 0 1.875-0.438 3-0.438 106.062 0 192 85.938 192 192C1024 426 938.062 512 832 512z" horiz-adv-x="1024" />
<glyph glyph-name="code" unicode="&#xf05f;" d="M608 640l-96-96 224-224L512 96l96-96 288 320L608 640zM288 640L0 320l288-320 96 96L160 320l224 224L288 640z" horiz-adv-x="896" />
<glyph glyph-name="color-mode" unicode="&#xf065;" d="M0 704v-768h768V704H0zM64 0V640h640L64 0z" horiz-adv-x="768" />
<glyph glyph-name="comment" unicode="&#xf02b;" d="M768 704H128C66 704 0 640 0 576v-384c0-128 128-128 128-128h64v-256l256 256c0 0 258 0 320 0s128 68 128 128V576C896 638 832 704 768 704z" horiz-adv-x="896" />
<glyph glyph-name="comment-discussion" unicode="&#xf04f;" d="M256 320c0 64 0 192 0 192s-160 0-192 0-64-32-64-64 0-288 0-320 32-64 64-64 64 0 64 0v-192l194 192s162 0 192 0 62 32 62 64 0 64 0 64-128 0-192 0-128 64-128 128z m576 384c-32 0-416 0-448 0s-64-32-64-64 0-288 0-320 32-64 64-64 190 0 190 0l194-192v192s32 0 64 0 64 32 64 64 0 288 0 320-32 64-64 64z" horiz-adv-x="896" />
<glyph glyph-name="credit-card" unicode="&#xf045;" d="M128 128h128v64h-128v-64z m192 0h128v64h-128v-64z m64 192h-256v-64h256v64z m-128 64h64l128 128h-64l-128-128z m192-128h192v64h-192v-64z m512 384c-32 0-864 0-896 0s-64-32-64-64 0-480 0-512 32-64 64-64 864 0 896 0 64 32 64 64 0 480 0 512-32 64-64 64z m0-256v-288s0-32-32-32h-832c-32 0-32 32-32 32v288h64l128 128h-192v32s0 32 32 32h832c32 0 32-32 32-32v-32h-384l-128-128h512z" horiz-adv-x="1024" />
<glyph glyph-name="dash" unicode="&#xf0ca;" d="M0 384v-128h512V384H0z" horiz-adv-x="512" />
<glyph glyph-name="dashboard" unicode="&#xf07d;" d="M416 367.5c-61.562 0-111.5-49.938-111.5-111.5S354.438 144.5 416 144.5 527.5 194.438 527.5 256c0 8.5-1.125 16.75-3 24.688C606.125 375.625 732.5 523.656 800 608c23.125 28.875-2.312 56.188-32 32-85.188-69.375-232.312-194.688-326.906-275.594C433.031 366.281 424.625 367.5 416 367.5zM447.875 576.125c0 17.656-14.344 32-32 32s-32-14.344-32-32 14.344-32 32-32S447.875 558.469 447.875 576.125zM639.875 320.125c0-17.656 14.375-32 32-32s32 14.344 32 32-14.375 32-32 32S639.875 337.781 639.875 320.125zM287.875 576.125c-17.656 0-32-14.344-32-32s14.344-32 32-32 32 14.344 32 32S305.531 576.125 287.875 576.125zM223.875 448.125c0 17.656-14.344 32-32 32s-32-14.344-32-32 14.344-32 32-32S223.875 430.469 223.875 448.125zM127.875 320.125c0-17.656 14.344-32 32-32s32 14.344 32 32-14.344 32-32 32S127.875 337.781 127.875 320.125zM575.875 544.125c0 17.656-14.375 32-32 32s-32-14.344-32-32 14.375-32 32-32S575.875 526.469 575.875 544.125zM792.875 495.312l-68.75-89.938C731.625 378.188 736 349.625 736 320c0-176.75-143.312-320-320-320S96 143.25 96 320c0 176.688 143.312 320 320 320 65.875 0 127-19.969 177.875-54.094l79.25 60.625C602.375 702.406 513.25 736 416 736 186.25 736 0 549.75 0 320s186.25-416 416-416 416 186.25 416 416C832 382.719 817.75 442 792.875 495.312z" horiz-adv-x="832" />
<glyph glyph-name="database" unicode="&#xf096;" d="M384-128C171.969-128 0-70.625 0 0c0 38.625 0 80.875 0 128 0 11.125 5.562 21.688 13.562 32C56.375 104.875 205.25 64 384 64s327.625 40.875 370.438 96c8-10.312 13.562-20.875 13.562-32 0-37.062 0-76.375 0-128C768-70.625 596-128 384-128zM384 128C171.969 128 0 185.375 0 256c0 38.656 0 80.844 0 128 0 6.781 2.562 13.375 6 19.906l0 0C7.938 408 10.5 412.031 13.562 416 56.375 360.906 205.25 320 384 320s327.625 40.906 370.438 96c3.062-3.969 5.625-8 7.562-12.094l0 0c3.438-6.531 6-13.125 6-19.906 0-37.062 0-76.344 0-128C768 185.375 596 128 384 128zM384 384C171.969 384 0 441.344 0 512c0 20.219 0 41.594 0 64 0 20.344 0 41.469 0 64C0 710.656 171.969 768 384 768c212 0 384-57.344 384-128 0-19.969 0-41.156 0-64 0-19.594 0-40.25 0-64C768 441.344 596 384 384 384zM384 704c-141.375 0-256-28.594-256-64s114.625-64 256-64 256 28.594 256 64S525.375 704 384 704z" horiz-adv-x="768" />
<glyph glyph-name="device-camera" unicode="&#xf056;" d="M512 447.999c-70.691 0-127.999-57.308-127.999-127.999S441.309 192.00099999999998 512 192.00099999999998c5.713 0 11.337 0.38 16.852 1.105-46.344 7.058-81.851 47.079-81.851 95.394 0 53.295 43.204 96.499 96.499 96.499 48.314 0 88.336-35.507 95.394-81.851 0.726 5.515 1.105 11.139 1.105 16.852C639.999 390.691 582.691 447.999 512 447.999zM896 576H767.999L640 704H384L255.999 576H128c-35.348 0-64-28.652-64-64v-448c0-35.347 28.652-64 64-64h768c35.347 0 64 28.653 64 64V512C960 547.348 931.347 576 896 576zM416 640h192l64-64H352L416 640zM160.143 64C142.391 64 128 78.39099999999996 128 96.14300000000003V384h64v64h-64v31.857C128 497.609 142.391 512 160.143 512h182.526c-3.98-3.518-7.881-7.174-11.688-10.98-99.974-99.975-99.974-262.064 0-362.039l74.98-74.98H160.143zM512 128.00099999999998c-106.038 0-191.999 85.961-191.999 191.999S405.962 511.999 512 511.999 703.999 426.038 703.999 320 618.038 128.00099999999998 512 128.00099999999998zM832 352L681.327 512H832V352z" horiz-adv-x="1024" />
<glyph glyph-name="device-camera-video" unicode="&#xf057;" d="M576 640c-35.347 0-64-28.653-64-64s28.653-64 64-64 64 28.653 64 64S611.347 640 576 640zM896 448L768 320v64c0 30.625-21.515 56.21-50.25 62.503C748.958 480.646 768 526.097 768 575.998 768 682.038 682.039 768 576 768c-101.123 0-183.986-78.178-191.45-177.393C350.516 621.306 305.442 640 256 640c-106.038 0-192-85.962-192-192.002C64 341.961 149.962 256 256 256h-64v-128h64v-128c0-35.347 28.653-64 64-64h384c35.347 0 64 28.653 64 64v64l128-128h64V448H896zM256 512c-35.347 0-64-28.653-64-64s28.653-64 64-64v-64c-70.692 0-128 57.308-128 127.999C128 518.692 185.308 576 256 576s128-57.307 128-128h-64C320 483.347 291.347 512 256 512zM576 128H448V256h128V128zM704 237.21299999999997c-33.526 33.547-70.276 70.317-73.373 73.414C624.837 316.418 616.837 320 608 320H416c-17.674 0-32-14.326-32-32v-192c0-8.329 3.183-15.915 8.396-21.607 0.53-0.58 39.123-39.164 74.409-74.393H352c-17.674 0-32 14.326-32 32V352c0 17.674 14.326 32 32 32h320c17.674 0 32-14.326 32-32V237.21299999999997zM576 448c-70.692 0-128 57.308-128 127.999C448 646.692 505.308 704 576 704s128-57.308 128-128.001C704 505.308 646.692 448 576 448zM896 128l-64 64 0.082 128.084L896 384.002V128z" horiz-adv-x="1024" />
<glyph glyph-name="device-desktop" unicode="&#xf27c;" d="M960 768c-32 0-864 0-896 0s-64-32-64-64 0-544 0-576 32-64 64-64 320 0 320 0-192-64-192-128c0-32 32-64 64-64s480 0 512 0 64 32 64 64c0 64-192 128-192 128s288 0 320 0 64 32 64 64 0 544 0 576-32 64-64 64z m0-640h-896v576h896v-576z m-64 512h-192c-384-64-542-300-576-384v-64h768v448z" horiz-adv-x="1024" />
<glyph glyph-name="device-mobile" unicode="&#xf038;" d="M576 832H64C28.688 832 0 803.312 0 768v-896c0-35.375 28.688-64 64-64h512c35.375 0 64 28.625 64 64V768C640 803.312 611.375 832 576 832zM288 768h64c17.625 0 32-14.344 32-32s-14.375-32-32-32h-64c-17.656 0-32 14.344-32 32S270.344 768 288 768zM352-128h-64c-17.656 0-32 14.375-32 32s14.344 32 32 32h64c17.625 0 32-14.375 32-32S369.625-128 352-128zM576 0H64V640h512V0z" horiz-adv-x="640" />
<glyph glyph-name="diff" unicode="&#xf04d;" d="M448 576H320v-128H192v-128h128v-128h128V320h128V448H448V576zM192-64h384V64H192V-64zM640 832H128v-64h480l224-224v-608h64V576L640 832zM0 704v-896h768V512L576 704H0zM704-128H64V640h480l160-160V-128z" horiz-adv-x="896" />
<glyph glyph-name="diff-added" unicode="&#xf06b;" d="M512 512h-128v-128h-128v-128h128v-128h128v128h128v128h-128v128z m320 256c-32 0-736 0-768 0s-64-32-64-64 0-736 0-768 32-64 64-64 736 0 768 0 64 32 64 64 0 736 0 768-32 64-64 64z m-64-736c0-16-17-32-32-32s-558 0-576 0-32 12-32 32c0 16 0 560 0 576s16 32 32 32 561 0 576 0 32-16 32-32 0-560 0-576z" horiz-adv-x="896" />
<glyph glyph-name="diff-ignored" unicode="&#xf099;" d="M832 768h-768c-32 0-64-32-64-64v-768c0-32 32-64 64-64h768c32 0 64 32 64 64v768c0 32-32 64-64 64z m-64-736c0-16-17-32-32-32h-576c-18 0-32 12-32 32v576c0 16 16 32 32 32h576c15 0 32-16 32-32v-576z m-512 194v-98h98l286 286v98h-98l-286-286z" horiz-adv-x="896" />
<glyph glyph-name="diff-modified" unicode="&#xf06d;" d="M832 768h-768c-32 0-64-32-64-64v-768c0-32 32-64 64-64h768c32 0 64 32 64 64v768c0 32-32 64-64 64z m-64-736c0-16-17-32-32-32h-576c-18 0-32 12-32 32v576c0 16 16 32 32 32h576c15 0 32-16 32-32v-576z m-320 416c-71 0-128-57-128-128s57-128 128-128 128 57 128 128-57 128-128 128z" horiz-adv-x="896" />
<glyph glyph-name="diff-removed" unicode="&#xf06c;" d="M832 768h-768c-32 0-64-32-64-64v-768c0-32 32-64 64-64h768c32 0 64 32 64 64v768c0 32-32 64-64 64z m-64-736c0-16-17-32-32-32h-576c-18 0-32 12-32 32v576c0 16 16 32 32 32h576c15 0 32-16 32-32v-576z m-512 224h384v128h-384v-128z" horiz-adv-x="896" />
<glyph glyph-name="diff-renamed" unicode="&#xf06e;" d="M832 768h-768c-32 0-64-32-64-64v-768c0-32 32-64 64-64h768c32 0 64 32 64 64v768c0 32-32 64-64 64z m-64-736c0-16-17-32-32-32h-576c-18 0-32 12-32 32v576c0 16 16 32 32 32h576c15 0 32-16 32-32v-576z m-320 352h-192v-128h192v-128l256 192-256 192v-128z" horiz-adv-x="896" />
<glyph glyph-name="ellipsis" unicode="&#xf09a;" d="M640 512c-64 0-448 0-512 0s-128-64-128-128 0-64 0-128 64-128 128-128 448 0 512 0 128 64 128 128 0 64 0 128-64 128-128 128z m-384-256h-128v128h128v-128z m192 0h-128v128h128v-128z m192 0h-128v128h128v-128z" horiz-adv-x="768" />
<glyph glyph-name="eye" unicode="&#xf04e;" d="M512 704c-192 0-416-128-512-384 96-192 288-320 512-320s416 128 512 320c-96 256-320 384-512 384z m0-640c-192 0-352 128-384 256 32 128 192 256 384 256s352-128 384-256c-32-128-192-256-384-256z m0 448c-20 0-38-4-56-9 33-15 56-48 56-87 0-53-43-96-96-96-39 0-72 23-87 56-5-18-9-36-9-56 0-106 86-192 192-192s192 86 192 192-86 192-192 192z" horiz-adv-x="1024" />
<glyph glyph-name="file-binary" unicode="&#xf094;" d="M0-128V768h576l192-192v-704H0zM704 512L512 704H64v-768h640V512zM320 320H128V576h192V320zM256 512h-64v-128h64V512zM256 64h64v-64H128v64h64V192h-64v64h128V64zM512 384h64v-64H384v64h64V512h-64v64h128V384zM576 0H384V256h192V0zM512 192h-64v-128h64V192z" horiz-adv-x="768" />
<glyph glyph-name="file-code" unicode="&#xf010;" d="M288 448L128 288l160-160 64 64-96 96 96 96L288 448zM416 384l96-96-96-96 64-64 160 160L480 448 416 384zM576 768H0v-896h768V576L576 768zM704-64H64V704h448l192-192V-64z" horiz-adv-x="768" />
<glyph glyph-name="file-directory" unicode="&#xf016;" d="M832 640c-32 0-336 0-352 0s-32 16-32 32 0 0 0 32-32 64-64 64-288 0-320 0-64-32-64-64 0-704 0-704h896s0 544 0 576-32 64-64 64z m-448 0h-320s0 15 0 32 16 32 32 32 241 0 256 0 32-15 32-32 0-32 0-32z" horiz-adv-x="896" />
<glyph glyph-name="file-media" unicode="&#xf012;" d="M576 768H0v-896h768V576L576 768zM704-64H64V704h448l192-192V-64zM128 576v-512h128c0 70.625 57.344 128 128 128-70.656 0-128 57.375-128 128 0 70.656 57.344 128 128 128 70.625 0 128-57.344 128-128 0-70.625-57.375-128-128-128 70.625 0 128-57.375 128-128h128V448L512 576H128z" horiz-adv-x="768" />
<glyph glyph-name="file-pdf" unicode="&#xf014;" d="M576 768H0v-896h768V576L576 768zM64 704h255.812c-13.188-4.094-27.281-15.031-34.625-42.875-13.25-49.406-7.031-130.75 15.625-209.344C276.688 370.562 178.188 175.125 171.531 163.5c-15.625-4.875-65.344-23.625-107.531-59.812V704zM347.125 396.531c57.625-149.781 95-149.531 135.188-167.594C398.344 216 334.219 206.75 249.781 169.5 246.094 163.062 326.281 315.40599999999995 347.125 396.531zM704-64H65.844 64v0.375c0.781-0.062 1.094-0.375 1.844-0.375 33.812 0 84.75 21 180.562 182.375 38.188 15.438 72.062 26.875 78.469 28.938 58.812 14.875 125 26.625 187.562 33.375C566.875 153.5 639.125 135 680.25 132.375c9.625-0.5 16.062 1.188 23.75 2V-64zM704 246.625c-23.688 14.688-54 25-89.125 25-24.25 0-50.625-1.375-78.688-4.375-26.938 13-92.562 32.719-147.188 190.219 17.094 103.625 12.719 173.562 12.719 173.562 6.781 52.938-23.344 72.844-51.625 72.844 0 0-0.279 0.125-0.344 0.125H512l192-192V246.625z" horiz-adv-x="768" />
<glyph glyph-name="file-submodule" unicode="&#xf017;" d="M832 320c-32 0-192 0-192 0 0 32-32 64-64 64s-96 0-128 0-64-32-64-64 0-320 0-320h512s0 224 0 256-32 64-64 64z m-256-64h-128s0 17 0 32 15 32 32 32 48 0 64 0 32-15 32-32 0-32 0-32z m256 320c-32 0-336 0-352 0s-32 17-32 32 0 0 0 32-32 64-64 64-288 0-320 0-64-32-64-64 0-640 0-640h320s0 352 0 384 32 64 64 64 224 0 256 0 64-32 64-64h192s0 96 0 128-32 64-64 64z m-448 0h-320s0 16 0 32 16 32 32 32 240 0 256 0 32-17 32-32 0-32 0-32z" horiz-adv-x="896" />
<glyph glyph-name="file-symlink-directory" unicode="&#xf0b1;" d="M832 640h-352c-16 0-32 16-32 32s0 0 0 32-32 64-64 64h-320c-32 0-64-32-64-64s0-704 0-704h896s0 544 0 576-32 64-64 64z m-768 32c0 17 16 32 32 32h256c15 0 32-15 32-32s0-32 0-32h-320s0 15 0 32z m384-544v128c-125 0-224-56-256-192 0 209 107 320 256 320 0 49 0 128 0 128l256-192-256-192z" horiz-adv-x="896" />
<glyph glyph-name="file-symlink-file" unicode="&#xf0b0;" d="M576 768h-576v-896h768v704l-192 192z m128-832h-640v768h448l192-192v-576z m-320 448c-149 0-256-111-256-320 32 136 131 192 256 192v-128l256 192-256 192s0-79 0-128z" horiz-adv-x="768" />
<glyph glyph-name="file-text" unicode="&#xf011;" d="M448 576H128v-64h320V576zM576 768H0v-896h768V576L576 768zM704-64H64V704h448l192-192V-64zM128 64h512v64H128V64zM128 192h512v64H128V192zM128 320h512v64H128V320z" horiz-adv-x="768" />
<glyph glyph-name="file-zip" unicode="&#xf013;" d="M320 256v64h-64v-64H320zM320 384v64h-64v-64H320zM320 512v64h-64v-64H320zM192 448h64v64h-64V448zM576 768H0v-896h768V576L576 768zM704-64H64V704h192v-64h64v64h192l192-192V-64zM192 576h64v64h-64V576zM192 320h64v64h-64V320zM192 192l-64-64v-128h256V128l-64 64h-64v64h-64V192zM320 128v-64H192v64H320z" horiz-adv-x="768" />
<glyph glyph-name="flame" unicode="&#xf0d2;" d="M433 787c50-134 24-207-32-265-61-64-156-112-223-206-89-125-104-400 217-472-135 71-164 277-18 406-38-125 32-205 119-176 85 29 141-32 139-102-1-48-20-89-69-112 209 37 293 210 293 342 0 174-155 198-77 344-93-8-125-69-116-169 6-66-63-111-114-81-41 25-40 73-4 109 77 76 107 251-115 382z" horiz-adv-x="1024" />
<glyph glyph-name="fold" unicode="&#xf0cc;" d="M896 576H672l-64-64h192L672 384H224L96 512h192l-64 64H0v-63.999L160 352 0 192v-64h224l64 64H96l128 128h448l128-128H608l64-64h224v64L736 352l160 160.001V576zM640 640H512V832H384v-192H256l192-192L640 640zM256 64h128v-192h128V64h128L448 256 256 64z" horiz-adv-x="896" />
<glyph glyph-name="gear" unicode="&#xf02f;" d="M447.938 482C358.531 482 286 409.469 286 320c0-89.375 72.531-162.062 161.938-162.062 89.438 0 161.438 72.688 161.438 162.062C609.375 409.469 537.375 482 447.938 482zM772.625 226.938l-29.188-70.312 52.062-102.25 6.875-13.5-72.188-72.188L611.75 24.625l-70.312-28.875L505.75-113.5l-4.562-14.5H399.156L355-4.687999999999988l-70.312 29-102.404-51.938-13.5-6.75-72.156 72.125 55.875 118.5-28.969 70.25L14.469 262.125 0 266.812V368.781L123.406 413l28.969 70.188-51.906 102.469-6.844 13.438 72.062 72.062 118.594-55.844 70.219 29.031 35.656 109.188L394.75 768h102l44.188-123.469 70.125-29.031L713.5 667.469l13.625 6.844 72.125-72.062-55.875-118.406L772.25 413.5l109.375-35.656L896 373.25v-101.938L772.625 226.938z" horiz-adv-x="896" />
<glyph glyph-name="gift" unicode="&#xf042;" d="M448-128h320V192H448V-128zM64-128h320V192H64V-128zM447.75 455.812c31.469 3.5 66.875 7.406 87.375 9.719C619 474.875 694.5 550.406 703.812 634.25c9.312 83.75-51 144.125-134.688 134.719C503.688 761.656 443.844 714 416 653.625 388.156 714 328.312 761.656 262.906 769.031 179.188 778.375 118.781 718 128.188 634.25c9.344-83.844 84.875-159.312 168.656-168.719 20.531-2.312 55.938-6.281 87.406-9.719C383.75 451.594 384 448 384 448h64C448 448 448.25 451.594 447.75 455.812zM555.375 691.312c45.25 5.062 78-27.562 72.875-72.875-5-45.312-45.875-86.156-91.125-91.219-45.375-5.031-78 27.594-72.938 72.906C469.249 645.436 510.125 686.281 555.375 691.312zM294.906 527.219c-45.25 5.062-86.062 45.906-91.125 91.219-5.063 45.313 27.594 77.938 72.812 72.875 45.312-5.031 86.156-45.875 91.222-91.188C372.875 554.812 340.219 522.188 294.906 527.219zM448 448v-192h384V448H448zM0 256h384V448H0V256z" horiz-adv-x="896" />
<glyph glyph-name="gist" unicode="&#xf00e;" d="M416 448l96-96-96-96 64-64 160 160-160 160-64-64z m-416 320v-832h768v832h-768z m704-768h-640v704h640v-704z m-352 256l-96 96 96 96-64 64-160-160 160-160 64 64z" horiz-adv-x="768" />
<glyph glyph-name="gist-secret" unicode="&#xf08c;" d="M193 128l128-192h-256l-65 256 257 64-64-128z m448 128l64-128-128-192h256l64 256-256 64z m-84 0h-216l44-102-64-218h256l-64 218 44 102z m84 192h-384l-128-64h640l-128 64z m-64 256l-128-64-128 64-64-192h384l-64 192z" horiz-adv-x="896" />
<glyph glyph-name="git-branch" unicode="&#xf020;" d="M512 640c-71 0-128-57-128-128 0-47 26-88 64-110v-18c0-64-64-128-128-128-53 0-95-11-128-29v303c38 22 64 63 64 110 0 71-57 128-128 128s-128-57-128-128c0-47 26-88 64-110v-419c-38-22-64-63-64-110 0-71 57-128 128-128s128 57 128 128c0 34-13 64-34 87 19 23 49 41 98 41 128 0 256 128 256 256v18c38 22 64 63 64 110 0 71-57 128-128 128z m-384 64c35 0 64-29 64-64s-29-64-64-64-64 29-64 64 29 64 64 64z m0-768c-35 0-64 29-64 64s29 64 64 64 64-29 64-64-29-64-64-64z m384 512c-35 0-64 29-64 64s29 64 64 64 64-29 64-64-29-64-64-64z" horiz-adv-x="640" />
<glyph glyph-name="git-commit" unicode="&#xf01f;" d="M694.875 384C666.375 494.219 567.125 576 448 576c-119.094 0-218.375-81.781-246.906-192H0v-128h201.094C229.625 145.75 328.906 64 448 64c119.125 0 218.375 81.75 246.875 192H896V384H694.875zM448 192c-70.656 0-128 57.375-128 128 0 70.656 57.344 128 128 128 70.625 0 128-57.344 128-128C576 249.375 518.625 192 448 192z" horiz-adv-x="896" />
<glyph glyph-name="git-compare" unicode="&#xf0ac;" d="M832 110s0 306 0 402-96 192-192 192c-64 0-64 0-64 0v128l-192-192 192-192v128s32 0 64 0 64-32 64-64 0-402 0-402c-38-22-64-63-64-110 0-71 57-128 128-128s128 57 128 128c0 47-26 88-64 110z m-64-174c-35 0-64 29-64 64s29 64 64 64 64-29 64-64-29-64-64-64z m-448 128s-32 0-64 0-64 32-64 64 0 402 0 402c38 22 64 63 64 110 0 71-57 128-128 128s-128-57-128-128c0-47 26-88 64-110 0 0 0-306 0-402s96-192 192-192c64 0 64 0 64 0v-128l192 192-192 192v-128z m-192 512c-35 0-64 29-64 64s29 64 64 64 64-29 64-64-29-64-64-64z" horiz-adv-x="896" />
<glyph glyph-name="git-merge" unicode="&#xf023;" d="M640 384c-47.625 0-88.625-26.312-110.625-64.906C523.625 319.5 518 320 512 320c-131.062 0-255.438 99.844-300.812 223.438C238.469 566.906 256 601.281 256 640c0 70.656-57.344 128-128 128S0 710.656 0 640c0-47.219 25.844-88.062 64-110.281V110.25C25.844 88.06200000000001 0 47.25 0 0c0-70.625 57.344-128 128-128s128 57.375 128 128c0 47.25-25.844 88.062-64 110.25V340.531C276.156 251.5 392.375 192 512 192c6.375 0 11.625 0.438 17.375 0.625C551.5 154.188 592.5 128 640 128c70.625 0 128 57.375 128 128C768 326.656 710.625 384 640 384zM128-64c-35.312 0-64 28.625-64 64 0 35.312 28.688 64 64 64 35.406 0 64-28.688 64-64C192-35.375 163.406-64 128-64zM128 576c-35.312 0-64 28.594-64 64s28.688 64 64 64c35.406 0 64-28.594 64-64S163.406 576 128 576zM640 192c-35.312 0-64 28.625-64 64 0 35.406 28.688 64 64 64 35.375 0 64-28.594 64-64C704 220.625 675.375 192 640 192z" horiz-adv-x="768" />
<glyph glyph-name="git-pull-request" unicode="&#xf009;" d="M704 110s0 306 0 402-96 192-192 192c-64 0-64 0-64 0v128l-192-192 192-192v128s32 0 64 0 64-32 64-64 0-402 0-402c-38-22-64-63-64-110 0-71 57-128 128-128s128 57 128 128c0 47-26 88-64 110z m-64-174c-35 0-64 29-64 64s29 64 64 64 64-29 64-64-29-64-64-64z m-512 832c-71 0-128-57-128-128 0-47 26-88 64-110v-419c-38-22-64-63-64-110 0-71 57-128 128-128s128 57 128 128c0 47-26 88-64 110v419c38 22 64 63 64 110 0 71-57 128-128 128z m0-832c-35 0-64 29-64 64s29 64 64 64 64-29 64-64-29-64-64-64z m0 640c-35 0-64 29-64 64s29 64 64 64 64-29 64-64-29-64-64-64z" horiz-adv-x="768" />
<glyph glyph-name="globe" unicode="&#xf0b6;" d="M512 704c-212.077 0-384-171.923-384-384s171.923-384 384-384c25.953 0 51.303 2.582 75.812 7.49-9.879 4.725-10.957 40.174-1.188 60.385 10.875 22.5 45 79.5 11.25 98.625s-24.375 27.75-45 49.875-12.19 25.451-13.5 31.125c-4.5 19.5 19.875 48.75 21 51.75s1.125 14.25 0.75 17.625S545.75 265.25 542 265.625s-5.625-6-10.875-6.375-28.125 13.875-33 17.625-7.125 12.75-13.875 19.5-7.5 1.5-18 5.625-44.25 16.5-70.125 27-28.125 25.219-28.5 35.625-15.75 25.5-22.961 36.375c-7.209 10.875-8.539 25.875-11.164 22.5s13.5-42.75 10.875-43.875-8.25 10.875-15.75 20.625 7.875 4.5-16.125 51.75 7.5 71.344 9 96 20.25-9 10.5 6.75 0.75 48.75-6.75 60.75S275 602 275 602c1.125 11.625 37.5 31.5 63.75 49.875s42.281 4.125 63.375-2.625 22.5-4.5 15.375 2.25 3 10.125 19.5 7.5 21-22.5 46.125-20.625 2.625-4.875 6-11.25-3.75-5.625-20.25-16.875S469.25 599 498.5 577.625s20.25 14.25 17.25 30S537.125 611 537.125 611c18-12 14.674-0.66 27.799-4.785S613.625 572 613.625 572c-44.625-24.375-16.5-27-9-32.625s-15.375-16.5-15.375-16.5c-9.375 9.375-10.875-0.375-16.875-3.75s-0.375-12-0.375-12c-31.031-4.875-24-37.5-23.625-45.375s-19.875-19.875-25.125-31.125S536.75 395 527 393.5s-19.5 36.75-72 22.5c-15.828-4.297-51-22.5-32.25-59.625s49.875 10.5 60.375 5.25-3-28.875-0.75-29.25 29.625-1.031 31.125-33 41.625-29.25 50.25-30 37.5 23.625 41.625 24.75S626 309.125 662 288.5s54.375-17.625 66.75-26.25 3.75-25.875 15.375-31.5 58.125 1.875 69.75-17.25-48-115.125-66.75-125.625S719.75 53.375 701 38s-45-34.406-69.75-49.125c-21.908-13.027-25.85-36.365-35.609-43.732C767.496-16.67999999999995 896 136.64999999999998 896 320 896 532.077 724.077 704 512 704zM602 343.625c-5.25-1.5-16.125-11.25-42.75 4.5s-45 12.75-47.25 15.375c0 0-2.25 6.375 9.375 7.5 23.871 2.311 54-22.125 60.75-22.5s10.125 6.75 22.125 2.883C616.25 347.52 607.25 345.125 602 343.625zM476.375 665.75c-2.615 1.902 2.166 4.092 5.016 7.875 1.645 2.186 0.425 5.815 2.484 7.875 5.625 5.625 33.375 13.5 27.949-1.875C506.4 664.25 480.5 662.75 476.375 665.75zM543.5 617c-9.375 0.375-31.443 2.707-27.375 6.75 15.844 15.75-6 20.25-19.5 21.375S477.5 653.75 484.25 654.5s33.75-0.375 38.25-4.125 28.875-13.5 30.375-20.625S552.875 616.625 543.5 617zM624.875 619.625c-7.5-6-45.24 21.529-52.5 27.75-31.5 27-48.375 18-54.99 22.5-6.617 4.5-4.26 10.5 5.865 19.5s38.625-3 55.125-4.875 35.625-14.625 36-29.781C614.75 639.564 632.375 625.625 624.875 619.625z" horiz-adv-x="1024" />
<glyph glyph-name="graph" unicode="&#xf043;" d="M704 576H512v-640h192V576zM960 384H768v-448h192V384zM64-128V0h64v64H64V192h64v64H64V384h64v64H64V576h64v64H64V768h64V832H0v-1024h1024v64H64zM448 256H256v-320h192V256z" horiz-adv-x="1024" />
<glyph glyph-name="heart" unicode="&#x2665;" d="M384-32c399 314 384 425 384 512s-72 192-192 192-192-128-192-128-72 128-192 128-192-105-192-192-15-198 384-512z" horiz-adv-x="768.199" />
<glyph glyph-name="history" unicode="&#xf07e;" d="M448 768c-90.938 0-175.312-27.531-245.938-74.062L128 768v-256h256l-88 88c45.438 24.688 96.688 40 152 40 176.75 0 320-143.219 320-320 0-176.75-143.25-320-320-320-176.781 0-320 143.25-320 320 0 45.562 9.781 88.781 27 128H64v99.406C24.312 480.5 0 403.406 0 320c0-247.438 200.562-448 448-448 247.438 0 448 200.562 448 448C896 567.438 695.438 768 448 768zM447.031 1L512 64V256h128l64 64-64 64H512l-64 64L320 320l64-64v-192L447.031 1z" horiz-adv-x="896" />
<glyph glyph-name="home" unicode="&#xf08d;" d="M192 256l64-384h192V192h128v-320h192l64 384L512 576 192 256zM832 448V704H704l0.312-128.312L512 768 0 256h128l384 384 384-384h128L832 448z" horiz-adv-x="1024" />
<glyph glyph-name="horizontal-rule" unicode="&#xf070;" d="M63.938 384h128v-128h64V639.938h-64V448h-128V639.938H0V256h63.938V384zM639.875 256V384h-63.938v-128H639.875zM639.875 448V575.938h-63.938V448H639.875zM447.938 448V575.938h128v64h-192V256h64V384h128v64H447.938zM0 0h639.875V128H0V0z" horiz-adv-x="639.875" />
<glyph glyph-name="hourglass" unicode="&#xf09e;" d="M571 320c118 85 197 240 197 384 0 71-172 128-384 128s-384-57-384-128c0-144 80-299 197-384-118-85-197-240-197-384 0-71 172-128 384-128s384 57 384 128c0 144-80 299-197 384z m-187 448c141 0 256-29 256-64s-115-64-256-64-256 29-256 64 115 64 256 64z m-64-706c-154-7-238-40-253-82 16 114 75 189 141 251 73 68 112 60 112 103v-273z m-105 352c-70 55-122 130-142 215 70-32 183-53 311-53s241 21 311 53c-20-85-72-160-142-215-24 17-70 34-169 34s-145-17-169-34z m233-352v273c0-43 39-35 112-103 66-62 125-138 141-251-14 41-99 75-253 82z" horiz-adv-x="768" />
<glyph glyph-name="hubot" unicode="&#xf09d;" d="M512 768c-283 0-512-229-512-512 0 0 0-192 0-256s64-128 128-128 704 0 768 0 128 64 128 128 0 256 0 256c0 283-229 512-512 512z m96-768h-192c-18 0-32 14-32 32s14 32 32 32h192c18 0 32-14 32-32s-14-32-32-32z m288 128c0-32-32-64-64-64s-128 0-128 0c0 32-32 64-64 64s-224 0-256 0-64-32-64-64c0 0-96 0-128 0s-64 32-64 64 0 360 0 360c78 129 220 216 384 216s306-87 384-216c0 0 0-328 0-360z m-128 384c-32 0-480 0-512 0s-64-32-64-64 0-96 0-128 32-64 64-64 480 0 512 0 64 32 64 64 0 96 0 128-32 64-64 64z m0-128l-64-64h-128l-64 64-64-64h-128l-64 64v64h64l64-64 64 64h128l64-64 64 64h64v-64z" horiz-adv-x="1024" />
<glyph glyph-name="inbox" unicode="&#xf0cf;" d="M704 640H64L0 256v-256h768V256L704 640zM576 256l-64-128H256l-64 128H79l49 320h512l49-320H576z" horiz-adv-x="768" />
<glyph glyph-name="info" unicode="&#xf059;" d="M448 448c35 0 64 29 64 64s-29 64-64 64-64-29-64-64 29-64 64-64z m0 320c-247 0-448-201-448-448s201-448 448-448 448 201 448 448-201 448-448 448z m0-768c-177 0-320 143-320 320s143 320 320 320 320-143 320-320-143-320-320-320z m64 320c0 32-32 64-64 64s-32 0-64 0-64-32-64-64h64s0-160 0-192 32-64 64-64 32 0 64 0 64 32 64 64h-64s0 160 0 192z" horiz-adv-x="896" />
<glyph glyph-name="issue-closed" unicode="&#xf028;" d="M704 515.969l-96-96L768 256l256 256-96 96L769.25 449.219 704 515.969zM512 0c-176.781 0-320 143.25-320 320 0 176.781 143.219 320 320 320 88.375 0 168.375-35.844 226.25-93.75l90.562 90.5C747.75 717.875 635.75 768 512 768 264.562 768 64 567.438 64 320c0-247.438 200.562-448 448-448 247.438 0 448 200.562 448 448L759.75 119.75C768.688 130.75 684.75 0 512 0zM576 576H448v-320h128V576zM448 64h128V192H448V64z" horiz-adv-x="1024" />
<glyph glyph-name="issue-opened" unicode="&#xf026;" d="M448 768C200.562 768 0 567.438 0 320c0-247.438 200.562-448 448-448 247.438 0 448 200.562 448 448C896 567.438 695.438 768 448 768zM448 0c-176.781 0-320 143.25-320 320 0 176.781 143.219 320 320 320 176.75 0 320-143.219 320-320C768 143.25 624.75 0 448 0zM384 64h128V192H384V64zM384 256h128V576H384V256z" horiz-adv-x="896" />
<glyph glyph-name="issue-reopened" unicode="&#xf027;" d="M639.125 64.75C585.75 24.625 520 0 448 0c-176.781 0-320 143.25-320 320 0 45.562 9.781 88.781 27 128H64v99.469C24.312 480.562 0 403.406 0 320c0-247.438 200.562-448 448-448 107.375 0 204.5 39.312 281.75 102.25L768-64V128H576L639.125 64.75zM384 64h128V192H384V64zM512 576H384v-320h128V576zM896 320c0 247.438-200.562 448-448 448-107.406 0-204.531-39.312-281.656-102.344L128 704v-192h192l-63.156 63.156C310.281 615.312 376 640 448 640c176.75 0 320-143.219 320-320 0-45.562-9.75-88.75-27-128h91v-99.5C871.688 159.438 896 236.5 896 320z" horiz-adv-x="896" />
<glyph glyph-name="jersey" unicode="&#xf019;" d="M704 832h-192c0-32-33-64-97-64s-95 32-95 64h-192c0-128-2-384-128-384 0 0-1-544-1-576s32-64 64-64 672 0 704 0 64 32 64 64 0 576 0 576c-126 0-128 256-128 384z m-609-960c-16 0-31 10-31 32 0 32 0 480 0 480 119 64 128 192 128 384h64c0-96 32-191 160-192s160 96 160 192h64c0-186 32-276 64-339v-557s-593 0-609 0z m385 576l-32-32v-320l32-32h128l32 32v320l-32 32h-128z m96-320h-64v256h64v-256z m-352 320l-32-32v-320l32-32h128l32 32v320l-32 32h-128z m96-320h-64v256h64v-256z" horiz-adv-x="896" />
<glyph glyph-name="jump-down" unicode="&#xf072;" d="M767.75 640H0.25L384 256.25 767.75 640zM0 128v-128h768V128H0z" horiz-adv-x="768" />
<glyph glyph-name="jump-left" unicode="&#xf0a5;" d="M256.25 320L640-63.75v767.5L256.25 320zM0-64h128V704H0V-64z" horiz-adv-x="640" />
<glyph glyph-name="jump-right" unicode="&#xf0a6;" d="M0-63.75L383.75 320 0 703.812V-63.75zM512 704v-768h128V704H512z" horiz-adv-x="640" />
<glyph glyph-name="jump-up" unicode="&#xf073;" d="M0.188 0h767.5L384 383.75 0.188 0zM0 640v-128h768V640H0z" horiz-adv-x="768" />
<glyph glyph-name="key" unicode="&#xf049;" d="M640.9 768.1c-141.4 0-256-114.6-256-256 0-19.6 2.2-38.6 6.4-56.9L0 64v-64l64-64h128l64 64v64h64v64h64v64h128l70.8 70.8c18.7-4.3 38.1-6.6 58.1-6.6 141.4 0 256 114.6 256 256S782.2 768.1 640.9 768.1zM384 320L64 0v64l320 320V320zM704 512c-35.3 0-64 28.7-64 64 0 35.3 28.7 64 64 64s64-28.7 64-64C768 540.7 739.3 512 704 512z" horiz-adv-x="896.9" />
<glyph glyph-name="keyboard" unicode="&#xf00d;" d="M640 256h64V384h-64V256zM768 576h-64v-128h64V576zM640 576h-64v-128h64V576zM512 256h64V384h-64V256zM384 64h320V192H384V64zM768 256h128V576h-64v-192h-64V256zM256 64h64V192h-64V64zM768 64h128V192H768V64zM512 576h-64v-128h64V576zM192 384h-64v-128h64V384zM192 192h-64v-128h64V192zM0 704v-768h1024V704H0zM960 0H64V640h896V0zM384 256h64V384h-64V256zM256 576H128v-128h128V576zM384 576h-64v-128h64V576zM256 256h64V384h-64V256z" horiz-adv-x="1024" />
<glyph glyph-name="law" unicode="&#xf0d8;" d="M514 640c34 1 61 28 62 62 1 37-29 67-66 66-34-1-61-28-62-62-1-37 29-67 66-66z m464-384h-18l-127 246c18 2 36 9 52 16 24 11 29 43 11 62l-1 1c-11 11-28 15-43 8-14-6-34-13-53-13-56 0-81 64-287 64s-231-64-287-64c-20 0-39 6-53 13-15 6-32 3-43-8l-1-1c-18-19-13-50 11-62 16-8 34-14 52-16l-127-246h-18c-8 0-14-7-13-15 11-64 92-113 191-113s180 49 191 113c1 8-5 15-13 15h-18l-127 245c83 7 127 49 191 49v-486c-35 0-64-29-64-64h-71c-28 0-57-29-57-64h512c0 35-29 64-71 64h-57c0 35-29 64-64 64v486c64 0 108-42 191-49l-127-245h-18c-8 0-14-7-13-15 11-64 92-113 191-113s180 49 191 113c1 8-5 15-13 15z m-658 0h-192l96 180 96-180z m384 0l96 180 96-180h-192z" horiz-adv-x="1024" />
<glyph glyph-name="light-bulb" unicode="&#xf000;" d="M512 768c-176.731 0-320-143.269-320-320 0-104.69 50.278-197.633 128-256.015V0c0-35.346 28.653-64 64-64 0-35.346 28.653-64 64-64h128c35.347 0 64 28.654 64 64 35.347 0 64 28.654 64 64V191.985C781.722 250.36699999999996 832 343.31 832 448 832 624.731 688.731 768 512 768zM640 32c0-17.673-14.326-32-32-32H416c-17.674 0-32 14.327-32 32v32h256V32zM704 278.693c-33.234-33.03-64-42.389-64-124.041V128h-64V256l128 128v64l-64 64-64-64-64 64-64-64-64 64-64-64v-64l128-128v-128h-64v26.652c0 81.652-30.766 91.011-64 124.041C280.177 323.82 256 383.082 256 448c0 141.385 114.615 256 256 256s256-114.615 256-256C768 383.082 743.823 323.82 704 278.693zM512 256L384 384v64l64-64 64 64 64-64 64 64v-64L512 256z" horiz-adv-x="1024" />
<glyph glyph-name="link" unicode="&#xf05c;" d="M768 576h-138c48-32 93-89 107-128h30c65 0 128-64 128-128s-65-128-128-128h-192c-63 0-128 64-128 128 0 23 7 45 18 64h-137c-5-21-8-42-8-64 0-128 127-256 255-256s65 0 193 0 256 128 256 256-128 256-256 256z m-481-384h-30c-65 0-128 64-128 128s65 128 128 128h192c63 0 128-64 128-128 0-23-7-45-18-64h137c5 21 8 42 8 64 0 128-127 256-255 256s-65 0-193 0-256-128-256-256 128-256 256-256h138c-48 32-93 89-107 128z" horiz-adv-x="1024" />
<glyph glyph-name="link-external" unicode="&#xf07f;" d="M640 64H128V574.094L256 576V704H0v-768h768V256H640V64zM384 704l128-128L320 384l128-128 192 192 128-128V704H384z" horiz-adv-x="768" />
<glyph glyph-name="list-ordered" unicode="&#xf062;" d="M320 256h448v128h-448v-128z m0-256h448v128h-448v-128z m0 640v-128h448v128h-448z m-241-256h78v256h-36l-85-23v-50l43 2v-185z m110-206c0 36-12 78-96 78-33 0-64-6-83-16l1-66c21 10 42 15 67 15s32-11 32-28c0-26-30-58-110-112v-50h192v67l-91-2c49 30 87 66 87 113l1 1z" horiz-adv-x="768" />
<glyph glyph-name="list-unordered" unicode="&#xf061;" d="M0 256h128v128h-128v-128z m0 256h128v128h-128v-128z m0-512h128v128h-128v-128z m256 256h512v128h-512v-128z m0 256h512v128h-512v-128z m0-512h512v128h-512v-128z" horiz-adv-x="768" />
<glyph glyph-name="location" unicode="&#xf060;" d="M320 832c-177 0-320-143-320-320s160-416 320-704c160 288 320 527 320 704s-143 320-320 320z m0-448c-71 0-128 57-128 128s57 128 128 128 128-57 128-128-57-128-128-128z" horiz-adv-x="640" />
<glyph glyph-name="lock" unicode="&#xf06a;" d="M704 384c-32 0-64 0-64 0s0 64 0 192-128 256-256 256-256-128-256-256 0-192 0-192-32 0-64 0-64-32-64-64 0-416 0-448 32-64 64-64 608 0 640 0 64 32 64 64 0 416 0 448-32 64-64 64z m-192-128h-384v-64h384v-64h-384v-64h384v-64h-384v-64h384v-64h-448v448h448v-64z m0 128h-256s0 128 0 192 64 128 128 128 128-64 128-128 0-192 0-192z" horiz-adv-x="768" />
<glyph glyph-name="logo-github" unicode="&#xf092;" d="M552.73 499.865H311.557c-6.205 0-11.25-5.045-11.25-11.297v-117.887c0-6.252 5.045-11.272 11.25-11.272h94.109v-146.542c0 0-21.145-7.057-79.496-7.057-68.914 0-165.156 25.244-165.156 236.795 0 211.642 100.197 239.491 194.307 239.491 81.465 0 116.514-14.304 138.869-21.241 7.01-2.203 13.404 4.831 13.404 11.105L534.543 785.87c0 2.912-1.041 6.417-4.262 8.785C521.186 801.048 465.865 832 326.168 832 165.133 832 0 763.513 0 434.243 0 105.02099999999996 189.051 56 348.381 56c131.883 0 212.021 56.314 212.021 56.314 3.268 1.801 3.6 6.395 3.6 8.479V488.568C563.955 494.773 558.887 499.865 552.73 499.865zM1772.381 803.866h-135.695c-6.252 0-11.271-5.044-11.271-11.296v-262.393h-211.619V792.57c0 6.252-5.068 11.296-11.178 11.296h-135.838c-6.111 0-11.084-5.044-11.084-11.296v-710.473c0-6.299 5.021-11.32 11.084-11.32h135.838c6.203 0 11.178 5.068 11.178 11.32V385.933h211.619l-0.475-303.883c0-6.3 5.021-11.272 11.084-11.272h135.885c6.252 0 11.131 5.068 11.131 11.272l0.473 710.521C1783.607 798.822 1778.539 803.866 1772.381 803.866zM714.949 787.763c-48.357 0-87.574-39.572-87.574-88.403 0-48.855 39.217-88.428 87.574-88.428s87.527 39.572 87.527 88.428C802.477 748.19 763.307 787.763 714.949 787.763zM792.861 559.874c0 6.205-5.02 11.344-11.131 11.344H646.32c-6.348 0-11.746-6.394-11.746-12.67 0 0 0-394.654 0-469.867 0-13.735 8.572-17.903 19.703-17.903 0 0 57.688 0 121.959 0 13.311 0 16.814 6.536 16.814 18.188-0.094 25.197-0.094 123.808-0.094 142.942C792.861 250.09500000000003 792.861 559.874 792.861 559.874zM2297.973 570.152h-134.701c-6.158 0-11.084-5.092-11.084-11.344v-348.31c0 0-34.244-25.197-82.934-25.197-48.547 0-61.525 22.024-61.525 69.719 0 47.553 0 303.835 0 303.835 0 6.252-5.068 11.345-11.131 11.345h-136.643c-6.252 0-11.178-5.093-11.178-11.345 0 0 0-185.521 0-326.807 0-141.284 78.766-175.906 186.99-175.906 88.854 0 160.609 49.115 160.609 49.115s3.363-25.766 5.068-28.844c1.422-3.078 5.447-6.158 9.852-6.158h86.58c6.158 0 11.178 5.069 11.178 11.321l0.379 477.278C2309.15 565.0609999999999 2304.129 570.152 2297.973 570.152zM2666.932 586.1610000000001c-76.539 0-128.592-34.148-128.592-34.148V792.57c0 6.252-5.068 11.296-11.131 11.296h-136.264c-6.109 0-11.131-5.044-11.131-11.296l-0.379-710.521c0-6.3 5.068-11.272 11.225-11.272 0 0 94.773 0 94.869 0 4.215 0 7.389 2.179 9.805 5.968 2.369 3.837 5.73 32.775 5.73 32.775s55.557-52.763 161.035-52.763c123.807 0 194.758 62.804 194.758 281.906C2856.859 557.482 2743.471 586.1610000000001 2666.932 586.1610000000001zM2613.791 185.77499999999998c-46.701 1.421-78.34 22.64-78.34 22.64v225.07c0 0 31.307 19.206 69.672 22.593 48.547 4.31 95.438-10.326 95.438-126.13C2700.322 207.94100000000003 2679.199 183.83399999999995 2613.791 185.77499999999998zM1185.125 188.33299999999997c-5.969 0-21.219-2.368-36.85-2.368-49.92 0-66.971 23.256-66.971 53.331 0 30.218 0 199.85 0 199.85h101.926c6.252 0 11.178 5.044 11.178 11.343v109.48c0.094 6.299-4.926 11.344-11.178 11.344h-101.926l-0.143 134.535c0 5.092-2.699 7.625-8.572 7.625H933.861c-5.352 0-8.336-2.391-8.336-7.578v-139.035c0 0-69.576-16.79-74.266-18.188-4.641-1.326-8.051-5.684-8.051-10.822v-87.408c0-6.252 5.068-11.344 11.178-11.344h71.139c0 0 0-91.34 0-210.222 0-156.109 109.553-171.455 183.439-171.455 33.723 0 74.076 10.988 80.848 13.356 4.074 1.421 6.395 5.637 6.395 10.136l0.047 96.101C1196.254 183.312 1190.998 188.428 1185.125 188.33299999999997z" horiz-adv-x="2856.857" />
<glyph glyph-name="mail" unicode="&#xf03b;" d="M0 640v-640h896V640H0zM768 576L448 312 128 576H768zM64 512l252.031-191.625L64 128V512zM128 64l254 206.25L448 220l65.875 50.125L768 64H128zM832 128L579.625 320.062 832 512V128z" horiz-adv-x="896" />
<glyph glyph-name="mail-read" unicode="&#xf03c;" d="M576 448H256v-64h320V448zM384 576H256v-64h128V576zM768 603.469V704H627.188L448 832 268.812 704H128v-100.531L0 512v-640h896V512L768 603.469zM192 640h512v-244.812L448 184 192 395.188V640zM64 384l252.031-191.625L64 0V384zM128-64l254 206.25L448 92l65.875 50.125L768-64H128zM832 0L579.625 192.062 832 384V0z" horiz-adv-x="896" />
<glyph glyph-name="mail-reply" unicode="&#xf051;" d="M384 672l-384-288 384-288v192c111 0 329-61 384-280 0 291-196 451-384 472v192z" horiz-adv-x="768" />
<glyph glyph-name="mark-github" unicode="&#xf00a;" d="M512 832C229.25 832 0 602.75 0 320c0-226.25 146.688-418.125 350.156-485.812 25.594-4.688 34.938 11.125 34.938 24.625 0 12.188-0.469 52.562-0.719 95.312C242-76.81200000000001 211.906 14.5 211.906 14.5c-23.312 59.125-56.844 74.875-56.844 74.875-46.531 31.75 3.53 31.125 3.53 31.125 51.406-3.562 78.47-52.75 78.47-52.75 45.688-78.25 119.875-55.625 149-42.5 4.654 33 17.904 55.625 32.5 68.375C304.906 106.56200000000001 185.344 150.5 185.344 346.688c0 55.938 19.969 101.562 52.656 137.406-5.219 13-22.844 65.094 5.062 135.562 0 0 42.938 13.75 140.812-52.5 40.812 11.406 84.594 17.031 128.125 17.219 43.5-0.188 87.312-5.875 128.188-17.281 97.688 66.312 140.688 52.5 140.688 52.5 28-70.531 10.375-122.562 5.125-135.5 32.812-35.844 52.625-81.469 52.625-137.406 0-196.688-119.75-240-233.812-252.688 18.438-15.875 34.75-47 34.75-94.75 0-68.438-0.688-123.625-0.688-140.5 0-13.625 9.312-29.562 35.25-24.562C877.438-98 1024 93.875 1024 320 1024 602.75 794.75 832 512 832z" horiz-adv-x="1024" />
<glyph glyph-name="markdown" unicode="&#xf0c9;" d="M950.154 640H73.846C33.127 640 0 606.873 0 566.154v-492.308C0 33.125 33.127 0 73.846 0h876.308c40.721 0 73.846 33.125 73.846 73.846V566.154C1024 606.873 990.875 640 950.154 640zM576 128.125L448 128V320l-96-123.077L256 320v-192H128V512h128l96-128 96 128 128 0.125V128.125zM767.091 96.125L608 320h96V512h128v-192h96L767.091 96.125z" horiz-adv-x="1024" />
<glyph glyph-name="megaphone" unicode="&#xf077;" d="M832 800c-130 0-124-130-704-128C57.344 672 0 557.375 0 416s57.344-256 128-256c22.781 0 43.188-0.5 64.188-0.875L256-128l192-32 64 96-45.125 203.125C709.375 102.875 733.75 32 832 32c106 0 192 172 192 384C1024 628.031 938 800 832 800zM197 349.062c-39.188 1.469-82.188 2.25-127.562 2.625C66 371.406 64 393.094 64 416c0 88.375 28.688 192 64 192 39.031-0.125 75 0.438 109 1.406C209.656 562.438 192 493.688 192 416 192 392.688 194.062 370.562 197 349.062zM261.312 346.062C258.125 368.312 256 391.625 256 416c0 79.5 18.438 149.5 46.906 196.219 155.156 8.312 251.906 28.469 319.031 50.188C593.625 595.531 576 510.344 576 416c0-40 3.875-78 9.5-114.312C513.344 320.375 412.812 337.406 261.312 346.062zM832 128c-12.125 0-23.688 5.062-34.812 12.125-15.25 67.312-83.438 418.344 117.438 494.188C942.125 581.5 960 503.812 960 416 960 257 902.625 128 832 128z" horiz-adv-x="1024" />
<glyph glyph-name="mention" unicode="&#xf0be;" d="M466.697 732.899C238.66 760.898 31.1 598.735 3.102 370.698c-28-228.038 134.163-435.598 362.2-463.597 71.429-8.756 145.115 0.913 213.325 29.946l-0.016 0.032c24.404 10.357 35.788 38.538 25.431 62.939-10.359 24.403-38.538 35.787-62.94 25.43l-0.001 0.004c-52.472-22.339-109.15-29.799-164.1-23.067-175.413 21.538-300.153 181.2-278.616 356.613 21.538 175.413 181.199 300.154 356.613 278.616 175.412-21.538 300.154-181.199 278.617-356.612-4.309-35.083-21.542-55.725-61.6-55.725-42.5 0-64 45.889-64 81.222V432c0 26.51-21.49 48-48 48-9.699 0-18.72-2.887-26.269-7.833-25.684 20.259-57.437 33.87-94.349 38.402-105.246 12.923-201.045-61.924-213.967-167.17C212.508 238.15200000000004 287.354 142.35400000000004 392.6 129.43200000000002c57.379-7.045 116.216 14.707 157.871 53.13 24.959-28.124 59.866-47.624 100.121-52.567 87.707-10.769 167.537 51.602 178.307 139.309C856.898 497.34 694.734 704.899 466.697 732.899zM511.285 308.30100000000004c-6.462-52.623-54.361-90.047-106.985-83.585-52.623 6.461-90.046 54.36-83.585 106.984 6.461 52.623 54.361 90.046 106.984 83.585C480.322 408.823 517.746 360.924 511.285 308.30100000000004z" horiz-adv-x="832" />
<glyph glyph-name="microscope" unicode="&#xf089;" d="M617-64c86.312 18.75 151 100 151 192 0 58.438-26.625 110.125-67.875 145.375C702.5 288.625 704 304.125 704 320c0 104.844-49.875 197.875-128 256l64 64v64l64 64L640 832l-64-64h-64L256 512l-128-64v-128l64-64h128l64 128 96 96c55.5-33.406 96-90.438 96-160-106.062 0-192-85.938-192-192H0v-64h192c19.125-14.25 42.062-22.125 64-32v-96H128L0-192h768L640-64H617zM512 128c0 35.375 28.625 64 64 64s64-28.625 64-64c0-35.312-28.625-64-64-64S512 92.68799999999999 512 128z" horiz-adv-x="768" />
<glyph glyph-name="milestone" unicode="&#xf075;" d="M704 640H0v-256h704l128 128L704 640zM448 448H320V576h128V448zM448 832H320v-128h128V832zM320-192h128V320H320V-192z" horiz-adv-x="832" />
<glyph glyph-name="mirror" unicode="&#xf024;" d="M320 512L128 320l192-192V256h384v-128l192 192L704 512v-128H320V512zM512 832L0 512v-704l512 256 512-256V512L512 832zM960-64L576 128v64H448v-64L64-64V448l384 256v-256h128V704l384-256V-64z" horiz-adv-x="1024" />
<glyph glyph-name="mortar-board" unicode="&#xf0d7;" d="M501 244l-245 76s0-96 0-160 115-96 256-96 256 32 256 96 0 160 0 160l-245-76c-7-2-15-2-23 0h1z m18 409c-4 1-9 1-13 0l-489-152c-21-7-21-36 0-43l111-35v-113c-19-11-32-32-32-55 0-12 3-23 9-32-5-9-9-20-9-32v-165c0-35 128-35 128 0v165c0 12-3 23-9 32 5 9 9 20 9 32 0 24-13 44-32 55v93l313-98c4-1 9-1 13 0l489 152c21 7 21 36 0 43l-488 153z m-6-205c-35 0-64 14-64 32s29 32 64 32 64-14 64-32-29-32-64-32z" horiz-adv-x="1024" />
<glyph glyph-name="move-down" unicode="&#xf0a8;" d="M640 512H448V832H192v-320H0l320-384L640 512zM0-192h640V0H0V-192z" horiz-adv-x="640" />
<glyph glyph-name="move-left" unicode="&#xf074;" d="M0 0h192V640H0V0zM704 448V640L320 320l384-320V192h320V448H704z" horiz-adv-x="1024" />
<glyph glyph-name="move-right" unicode="&#xf0a9;" d="M832 640v-640h192V640H832zM320 448H0v-256h320v-192l384 320L320 640V448z" horiz-adv-x="1024" />
<glyph glyph-name="move-up" unicode="&#xf0a7;" d="M0 128h192v-320h256V128h192L320 512 0 128zM0 832v-192h640V832H0z" horiz-adv-x="640" />
<glyph glyph-name="mute" unicode="&#xf080;" d="M128 448H0v-256h128l256-192h64V640h-64L128 448zM864 416l-64 64-96-96-96 96-63-63.5 95-96.5-96-96 64-64 96 96 96-96 64 64-96 96L864 416z" horiz-adv-x="896" />
<glyph glyph-name="no-newline" unicode="&#xf09c;" d="M896 512v-128H768V512L576 320l192-192V256h192c0 0 64 0.375 64 64s0 192 0 192H896zM224 544C100.281 544 0 443.719 0 320c0-123.75 100.281-224 224-224s224 100.25 224 224C448 443.719 347.719 544 224 544zM96 320c0 70.656 57.344 128 128 128 18.75 0 36.406-4.219 52.469-11.531L107.531 267.5C100.219 283.625 96 301.25 96 320zM224 192c-18.75 0-36.406 4.25-52.469 11.5l168.938 168.969C347.781 356.406 352 338.75 352 320 352 249.375 294.656 192 224 192z" horiz-adv-x="1024" />
<glyph glyph-name="octoface" unicode="&#xf008;" d="M940.812 554.312c8.25 20.219 35.375 101.75-8.562 211.906 0 0-67.375 21.312-219.875-82.906C648.5 700.875 579.875 703.5 512 703.5c-67.906 0-136.438-2.625-200.5-20.25C159.031 787.531 91.719 766.219 91.719 766.219 47.812 656 74.938 574.531 83.188 554.312 31.5 498.438 0 427.125 0 339.656 0 10.437999999999988 213.25-64 510.844-64 808.562-64 1024 10.437999999999988 1024 339.656 1024 427.125 992.5 498.438 940.812 554.312zM512-1c-211.406 0-382.781 9.875-382.781 214.688 0 48.938 24.062 94.595 65.344 132.312 68.75 62.969 185.281 29.688 317.438 29.688 132.25 0 248.625 33.281 317.438-29.625 41.312-37.78 65.438-83.312 65.438-132.312C894.875 8.875 723.375-1 512-1zM351.156 319.562c-42.469 0-76.906-51.062-76.906-114.188s34.438-114.312 76.906-114.312c42.375 0 76.812 51.188 76.812 114.312S393.531 319.562 351.156 319.562zM672.875 319.562C630.5 319.562 596 268.5 596 205.375s34.5-114.312 76.875-114.312 76.812 51.188 76.812 114.312C749.75 268.5 715.312 319.562 672.875 319.562z" horiz-adv-x="1024" />
<glyph glyph-name="organization" unicode="&#xf037;" d="M768 448h-64H576h-64-64-64-64H192h-64C57.344 448 0 390.656 0 320v-64c0-47.25 25.844-88.062 64-110.25V-64h256v-128h256V-64h256V145.75c38.125 22.188 64 62.938 64 110.25v64C896 390.656 838.625 448 768 448zM256 0H128V256H64v64c0 35.312 28.688 64 64 64h81.719c-11-18.875-17.719-40.562-17.719-64v-128c0-47.25 25.844-88.062 64-110.25V0zM576 128V256h-64v-384H384V256h-64v-128c-35.312 0-64 28.625-64 64V320c0 35.312 28.688 64 64 64h256c35.375 0 64-28.688 64-64v-128C640 156.625 611.375 128 576 128zM832 256h-64v-256H640v81.75c38.125 22.188 64 62.938 64 110.25V320c0 23.438-6.75 45.125-17.75 64H768c35.375 0 64-28.688 64-64V256zM303.688 514.625C338.875 474.125 390.156 448 448 448c57.875 0 109.125 26.125 144.312 66.625C614.125 475.062 655.688 448 704 448c70.625 0 128 57.344 128 128s-57.375 128-128 128c-25.625 0-49.375-7.688-69.375-20.688C614.875 768.438 539.062 832 448 832S281.094 768.438 261.375 683.312C241.344 696.312 217.594 704 192 704c-70.656 0-128-57.344-128-128s57.344-128 128-128C240.312 448 281.844 475.062 303.688 514.625zM704 640c35.375 0 64-28.594 64-64s-28.625-64-64-64c-35.312 0-64 28.594-64 64S668.688 640 704 640zM448 768c70.625 0 128-57.344 128-128s-57.375-128-128-128c-70.656 0-128 57.344-128 128S377.344 768 448 768zM192 512c-35.312 0-64 28.594-64 64s28.688 64 64 64c35.406 0 64-28.594 64-64S227.406 512 192 512z" horiz-adv-x="896" />
<glyph glyph-name="package" unicode="&#xf0c4;" d="M480 768L0 640v-576l480-128 480 128V640L480 768zM63.875 111.06600000000003L63.5 544l384.498-102.533 0.001-432.833L63.875 111.06600000000003zM63.5 608l160.254 42.734L640 539.735v-0.135l-160-42.667L63.5 608zM896.125 111.06600000000003L512.001 8.634000000000015l0.001 432.833L640 475.6v-156l128 34.135V509.733L896.5 544 896.125 111.06600000000003zM768 573.733v0.125L351.734 684.862 480 719.066 896.5 608 768 573.733z" horiz-adv-x="1024" />
<glyph glyph-name="paintcan" unicode="&#xf0d1;" d="M384 832C171.923 832 0 660.077 0 448v-64c0-35.346 28.654-64 64-64v-320c0-70.692 143.269-128 320-128s320 57.308 320 128V320c35.346 0 64 28.654 64 64v64C768 660.077 596.077 832 384 832zM576 192v-32c0-17.673-14.327-32-32-32s-32 14.327-32 32v32c0 17.673-14.327 32-32 32s-32-14.327-32-32v-160c0-17.673-14.327-32-32-32s-32 14.327-32 32V160c0 17.673-14.327 32-32 32s-32-14.327-32-32v-32c0-35.346-28.654-64-64-64s-64 28.654-64 64v64c-35.346 0-64 28.654-64 64V371.193C186.382 340.108 279.318 320 384 320s197.618 20.108 256 51.193V256C640 220.654 611.346 192 576 192zM384 384c-107.433 0-199.393 26.474-237.372 64 37.979 37.526 129.939 64 237.372 64s199.393-26.474 237.372-64C583.393 410.474 491.433 384 384 384zM384 576c-176.62 0-319.816-57.236-319.996-127.867-0.001 0.001-0.002 0.001-0.003 0.002C64.075 624.804 207.314 768 384 768c176.731 0 320-143.269 320-320C704 518.692 560.731 576 384 576z" horiz-adv-x="768" />
<glyph glyph-name="pencil" unicode="&#xf058;" d="M704 768L576 640l192-192 128 128L704 768zM0 64l0.688-192.562L192-128l512 512L512 576 0 64zM192-64H64V64h64v-64h64V-64z" horiz-adv-x="896" />
<glyph glyph-name="person" unicode="&#xf018;" d="M448 640C448 746 362.062 832 256 832S64 746 64 640c0-106.062 85.938-192 192-192S448 533.938 448 640zM256 512c-70.656 0-128 57.344-128 128S185.344 768 256 768c70.625 0 128-57.344 128-128S326.625 512 256 512zM384 448H256 128C57.344 448 0 390.656 0 320v-128c0-70.625 57.344-128 128-128v-256h256V64c70.625 0 128 57.375 128 128V320C512 390.656 454.625 448 384 448zM448 192c0-35.375-28.625-64-64-64V256h-64v-384H192V256h-64v-128c-35.312 0-64 28.625-64 64V320c0 35.312 28.688 64 64 64h256c35.375 0 64-28.688 64-64V192z" horiz-adv-x="512" />
<glyph glyph-name="pin" unicode="&#xf041;" d="M196 128l64-320 64 320c-20-2-43-3-64-3s-44 1-64 3z m254 299c-33 17-62 59-62 85v64c0 22 12 39 23 52 15 13 24 29 24 45 0 53-61 95-175 95s-175-42-175-95c0-16 9-32 24-45 11-13 23-30 23-52v-64c0-26-29-68-62-85-38-19-70-54-70-88 0-74 101-148 260-148s260 73 260 148c0 33-31 68-70 88z" horiz-adv-x="519.657" />
<glyph glyph-name="playback-fast-forward" unicode="&#xf0bd;" d="M0 64l384 256L0 576V64zM768 320L384 576v-256-256L768 320z" horiz-adv-x="768" />
<glyph glyph-name="playback-pause" unicode="&#xf0bb;" d="M0 0h192V640H0V0zM320 640v-640h192V640H320z" horiz-adv-x="512" />
<glyph glyph-name="playback-play" unicode="&#xf0bf;" d="M0 640l512-320L0 0V640z" horiz-adv-x="512" />
<glyph glyph-name="playback-rewind" unicode="&#xf0bc;" d="M384 320l384-256V576L384 320zM0 320l384-256V320 576L0 320z" horiz-adv-x="768" />
<glyph glyph-name="plug" unicode="&#xf0d4;" d="M1003.386 627.336l-0.905 0.905c-24.744 24.744-64.861 24.744-89.605 0l-45.707-45.707-90.51 90.51 45.707 45.707c24.744 24.744 24.744 64.861 0 89.605l-0.905 0.905c-24.744 24.744-64.861 24.744-89.605 0l-47.973-47.973C621.76 802.446 537.237 795.66 482.502 740.926l-24.89-24.89c-109.011-109.011-121.948-277.692-38.854-400.892l-4.138-4.138c-62.392-62.392-62.484-163.493-0.275-225.999 12.41-12.469 12.642-33.327 0.121-45.683-12.509-12.343-32.655-12.292-45.101 0.153l-89.427 89.427c-62.637 62.638-164.63 63.747-227.299 1.141-62.542-62.479-62.562-163.829-0.058-226.332l8.763-8.763c24.744-24.744 64.861-24.744 89.605 0l0.905 0.905c24.744 24.744 24.744 64.861 0 89.605l-8.292 8.292c-12.329 12.329-13.085 32.418-1.098 45.081 12.437 13.138 33.174 13.353 45.882 0.645l89.328-89.328c62.92-62.92 165.504-63.814 228.081-0.553 61.793 62.468 61.65 163.161-0.431 225.451-12.55 12.592-12.777 32.866-0.207 45.437l4.151 4.151c123.2-83.095 291.881-70.158 400.892 38.854l24.89 24.89c54.734 54.735 61.52 139.258 20.362 201.382l47.973 47.973C1028.129 562.475 1028.129 602.593 1003.386 627.336zM889.796 333.632c-37.49-37.49-98.274-37.49-135.765 0L527.757 559.906c-37.49 37.49-37.49 98.274 0 135.765 29.556 29.556 73.585 35.804 109.269 18.759l-41.839-41.839c-24.744-24.744-24.744-64.861 0-89.604l0.905-0.905c24.744-24.744 64.861-24.744 89.605 0l45.707 45.707 90.51-90.51-45.707-45.707c-24.744-24.744-24.744-64.861 0-89.605l0.905-0.905c24.744-24.744 64.861-24.744 89.604 0l41.839 41.839C925.6 407.218 919.351 363.188 889.796 333.632z" horiz-adv-x="1024" />
<glyph glyph-name="plus" unicode="&#xf05d;" d="M384 384V640H256v-256H0v-128h256v-256h128V256h256V384H384z" horiz-adv-x="640" />
<glyph glyph-name="podium" unicode="&#xf0af;" d="M320 832c-32 0-64-32-64-64s0-64 0-64h-64l-192-192v-128h192l64-384-128-64v-64h512v64l-128 64 64 384h192v128l-192 192h-256v64s14 0 32 0 32 17 32 32-16 32-32 32 0 0-32 0z m0-832l-53 320h118l-1-320h-64z m-224 512l128 128h32v-64h64v64h224l128-128h-576z" horiz-adv-x="768" />
<glyph glyph-name="primitive-dot" unicode="&#xf052;" d="M-0.088 320c0 141.5 114.5 256 256 256 141.438 0 256-114.5 256-256s-114.562-256-256-256C114.413 64-0.088 178.5-0.088 320z" horiz-adv-x="511.825" />
<glyph glyph-name="primitive-square" unicode="&#xf053;" d="M512 64H0V576h512V64z" horiz-adv-x="512" />
<glyph glyph-name="pulse" unicode="&#xf085;" d="M736 320.062L563.188 486.406 422.406 288 352 729.594 152.438 320.062H0V192h230.406L288 307.188l57.594-345.562L576 288l102.375-96H896V320.062H736z" horiz-adv-x="896" />
<glyph glyph-name="puzzle" unicode="&#xf0c0;" d="M755.75 256.85c-13.95 9.96-28.52 16.59-43.47 19.92-8.84 1.69-18.06 2.33-27.57 1.81-8.99-0.5-17.56-1.68-25.69-3.52-6.1-1.69-12.22-3.89-18.35-6.59-18.18-8.02-33.89-18.12-46.79-30.33-12.22-12.9-22.32-28.62-30.34-46.79-2.7-6.12-4.9-12.24-6.59-18.34-1.84-8.14-3.03-16.7-3.52-25.69-0.52-9.51 0.12-18.73 1.81-27.57 3.33-14.95 9.96-29.52 19.92-43.47 3.89-5.44 8.08-10.4 12.56-14.88 20.06-20.03 45.83-30.7 75.42-34.11 8.92-1.02 18.12-1.68 26.53-4.48 5.12-1.7 9.16-4.08 12.08-7.02 6.65-6.6 7.63-16.1 2.5-27.24-3.15-6.84-7.7-13.45-12.96-18.84l-2.79-2.86c-3.93-3.92-6.41-6.4-7.05-7.04-3.13-3.16-6.1-6.15-9.06-9.15l-2.96-2.92c-10.52-10.58-21.09-21.12-31.66-31.65-22.76-22.82-45.57-45.58-68.38-68.36-7.5-7.5-15-15-22.5-22.49-3.46-3.45-7.07-6.38-10.78-8.79-1.8-1.22-3.49-2.24-5.18-3.16-19.6-9.89-41.43-5.92-59.24 11.88-5.4 5.4-10.62 10.62-15.85 15.84-30.25 30.25-60.48 60.52-90.77 90.73-8.59 8.57-17.13 17.08-25.68 25.59-6.12 6.09-12.67 11.85-19.56 17.06-5.72 4.33-11.59 7.56-17.46 9.73-21.16 7.32-41.41 2.01-54.67-13.26-3.81-4.8-7-10.47-9.39-16.94-3.43-9.26-4.6-19.47-5.9-29.36-4.9-37.53-25.8-68.43-55.98-82.65-7.48-3.65-15.49-6.29-23.9-7.78-7.95-1.41-15.95-1.71-23.85-1.04-26.61 1.35-49.48 13.09-68.51 32.57-1.68 1.67-2.1 2.09-2.51 2.51-19.48 19.02-31.22 41.9-32.57 68.5-0.68 7.9-0.37 15.9 1.04 23.85 1.49 8.41 4.13 16.43 7.78 23.9 14.22 30.18 45.13 51.07 82.65 55.97 9.89 1.29 20.1 2.47 29.36 5.9 6.94 2.56 12.96 6.05 17.97 10.23 14.54 13.15 19.59 32.63 12.84 52.34-2.78 7.35-6 13.22-10.33 18.94-5.21 6.88-10.97 13.43-17.06 19.55-8.51 8.55-17.03 17.09-25.55 25.63-26.92 26.98-53.84 53.88-80.75 80.78l-10.03 10.03c-5.22 5.22-10.45 10.45-15.26 15.27-18.39 18.4-22.35 40.22-12.46 59.82 0.92 1.69 1.94 3.37 3.08 5.05 2.49 3.84 5.42 7.45 8.87 10.91 7.49 7.5 14.99 15 22.49 22.5 22.77 22.81 45.54 45.62 68.36 68.38 10.53 10.57 21.06 21.14 31.65 31.66l2.92 2.96c2.99 2.97 5.99 5.93 8.98 8.9 0.8 0.81 3.28 3.29 7.2 7.22l2.86 2.79c5.39 5.26 12 9.8 18.84 12.96 11.14 5.13 20.63 4.15 27.24-2.5 2.94-2.92 5.32-6.96 7.02-12.08 2.79-8.41 3.45-17.61 4.48-26.53 3.41-29.59 14.08-55.35 34.11-75.41 4.49-4.48 9.44-8.67 14.88-12.56 13.95-9.96 28.52-16.59 43.47-19.92 8.84-1.69 18.06-2.33 27.57-1.81 8.99 0.5 17.56 1.68 25.69 3.52 6.1 1.69 12.22 3.89 18.35 6.59 18.18 8.02 33.89 18.12 46.79 30.33 12.22 12.9 22.32 28.62 30.34 46.79 2.7 6.12 4.9 12.24 6.59 18.34 1.84 8.14 3.03 16.7 3.52 25.69 0.52 9.51-0.12 18.73-1.81 27.57-3.33 14.95-9.96 29.52-19.92 43.47-3.89 5.44-8.08 10.4-12.56 14.88-20.06 20.03-45.83 30.7-75.42 34.11-8.92 1.02-18.12 1.68-26.53 4.48-5.12 1.7-9.16 4.08-12.08 7.02-6.65 6.6-7.63 16.1-2.5 27.24 3.15 6.84 7.7 13.45 12.96 18.84l2.79 2.86c3.93 3.92 6.41 6.4 7.05 7.04 3.13 3.16 6.1 6.15 9.06 9.15l2.96 2.92c10.52 10.58 21.09 21.12 31.66 31.65 22.76 22.82 45.57 45.58 68.38 68.35 7.5 7.5 15 15 22.5 22.49 3.46 3.45 7.07 6.38 10.78 8.79 1.8 1.22 3.49 2.24 5.18 3.16 19.6 9.89 41.43 5.92 59.24-11.88 5.4-5.4 10.62-10.62 15.85-15.84 30.25-30.25 60.48-60.52 90.77-90.73 8.59-8.57 17.13-17.08 25.68-25.59 6.12-6.09 12.67-11.85 19.56-17.06 5.72-4.33 11.59-7.56 17.46-9.73 21.16-7.32 41.41-2.01 54.67 13.26 3.81 4.8 7 10.47 9.39 16.94 3.43 9.26 4.6 19.47 5.9 29.36 4.9 37.53 25.8 68.43 55.98 82.65 7.48 3.65 15.49 6.28 23.9 7.78 7.95 1.41 15.95 1.71 23.85 1.04 26.61-1.35 49.48-13.09 68.51-32.57 1.68-1.67 2.1-2.09 2.51-2.51 19.48-19.02 31.22-41.9 32.57-68.5 0.68-7.9 0.37-15.9-1.04-23.85-1.49-8.41-4.13-16.43-7.78-23.9-14.22-30.18-45.13-51.07-82.65-55.97-9.89-1.29-20.1-2.47-29.36-5.9-6.94-2.56-12.96-6.05-17.97-10.23-14.54-13.15-19.59-32.63-12.84-52.34 2.78-7.35 6-13.22 10.33-18.94 5.21-6.88 10.97-13.43 17.06-19.55 8.51-8.55 17.03-17.09 25.55-25.63 30.26-30.33 60.54-60.56 90.78-90.81 5.22-5.22 10.45-10.45 15.26-15.27 18.39-18.4 22.35-40.22 12.46-59.82-0.92-1.69-1.94-3.37-3.08-5.05-2.49-3.84-5.42-7.45-8.87-10.91-7.49-7.5-14.99-15-22.49-22.5-22.77-22.81-45.54-45.62-68.36-68.38-10.53-10.57-21.06-21.14-31.65-31.66l-2.92-2.96c-2.99-2.97-5.99-5.93-8.98-8.9-0.8-0.81-3.28-3.29-7.2-7.22l-2.86-2.79c-5.39-5.26-12-9.8-18.84-12.96-11.14-5.13-20.63-4.15-27.24 2.5-2.94 2.92-5.32 6.96-7.02 12.08-2.79 8.41-3.45 17.61-4.48 26.53-3.41 29.59-14.08 55.35-34.11 75.41C766.15 248.76999999999998 761.19 252.97000000000003 755.75 256.85z" horiz-adv-x="1024" />
<glyph glyph-name="question" unicode="&#xf02c;" d="M448 64h128v128h-128v-128z m64 512c-96 0-192-96-192-192h128c0 32 32 64 64 64s64-32 64-64c0-64-128-64-128-128h128c64 22 128 64 128 160s-96 160-192 160z m0 256c-283 0-512-229-512-512s229-512 512-512 512 229 512 512-229 512-512 512z m0-896c-212 0-384 172-384 384s172 384 384 384 384-172 384-384-172-384-384-384z" horiz-adv-x="1024" />
<glyph glyph-name="quote" unicode="&#xf063;" d="M0 320v-256h256V320H128c0 0 0 128 128 128V576C256 576 0 576 0 320zM640 448V576c0 0-256 0-256-256v-256h256V320H512C512 320 512 448 640 448z" horiz-adv-x="640" />
<glyph glyph-name="radio-tower" unicode="&#xf030;" d="M306.838 441.261c15.868 16.306 15.868 42.731 0 59.037-20.521 21.116-30.643 48.417-30.705 76.124 0.062 27.77 10.183 55.039 30.705 76.186 15.868 16.337 15.868 42.764 0 59.069-7.934 8.184-18.272 12.275-28.706 12.275-10.371 0-20.804-4.029-28.738-12.213-36.266-37.297-54.633-86.433-54.57-135.317-0.062-48.792 18.305-97.927 54.57-135.161C265.262 424.955 290.97 424.955 306.838 441.261zM149.093 798.858c-8.121 8.309-18.68 12.463-29.3 12.463-10.558 0-21.179-4.154-29.237-12.463C30.8 737.509 0.751 656.856 0.813 576.422 0.751 496.081 30.8 415.272 90.494 353.985c16.181-16.618 42.356-16.618 58.537 0 16.118 16.587 16.118 43.513 0 60.067-43.7 44.98-65.44 103.456-65.44 162.368s21.74 117.449 65.44 162.368C165.149 755.439 165.149 782.365 149.093 798.858zM513.031 472.153c57.351 0 103.956 46.574 103.956 103.956 0 57.382-46.605 103.955-103.956 103.955-57.381 0-103.956-46.573-103.956-103.955C409.076 518.727 455.65 472.153 513.031 472.153zM933.539 798.233c-16.181 16.618-42.355 16.618-58.475 0-16.181-16.587-16.181-43.513 0-60.068 43.668-44.918 65.409-103.456 65.409-162.368 0-58.85-21.805-117.387-65.473-162.306-16.117-16.618-16.117-43.575 0.062-60.068 8.059-8.309 18.616-12.463 29.237-12.463 10.558 0 21.178 4.154 29.236 12.463 59.726 61.287 89.774 142.096 89.649 222.437C1023.313 656.138 993.264 736.947 933.539 798.233zM513.281 389.127L513.281 389.127c-26.489-0.062-53.04 6.466-77.091 19.429L235.057-127.59000000000003h95.209l54.819 63.973h255.891l53.977-63.973h95.272L589.124 408.431C565.384 395.655 539.395 389.127 513.281 389.127zM512.656 358.483L577.004 128.29999999999995H449.059L512.656 358.483zM385.086 0.3550000000000182l63.974 63.973h127.944l63.974-63.973H385.086zM717.194 710.958c-15.868-16.306-15.868-42.731 0-59.037 20.491-21.116 30.611-48.511 30.674-76.124-0.062-27.77-10.183-55.102-30.674-76.187-15.868-16.336-15.868-42.763 0-59.068 7.871-8.184 18.242-12.213 28.737-12.213 10.309 0 20.741 4.029 28.675 12.213 36.298 37.234 54.665 86.433 54.54 135.255 0.125 48.792-18.181 97.927-54.54 135.161C758.801 727.264 733.062 727.264 717.194 710.958z" horiz-adv-x="1024" />
<glyph glyph-name="repo" unicode="&#xf001;" d="M320 576h-64v-64h64v64z m0 128h-64v-64h64v64z m384 128c-32 0-608 0-640 0s-64-32-64-64 0-736 0-768 32-64 64-64 128 0 128 0v-128l96 96 96-96v128s288 0 320 0 64 32 64 64 0 736 0 768-32 64-64 64z m0-800c0-16-15-32-32-32s-288 0-288 0v64h-192v-64s-79 0-96 0-32 17-32 32 0 96 0 96h640s0-80 0-96z m0 160h-512v576h513l-1-576z m-384 128h-64v-64h64v64z m0 128h-64v-64h64v64z" horiz-adv-x="768" />
<glyph glyph-name="repo-clone" unicode="&#xf04c;" d="M320 448h-64v-64h64v64z m-128 320h256v64s-352 0-384 0-64-32-64-64 0-736 0-768 32-64 64-64 128 0 128 0v-128l96 96 96-96v128s286 0 320 0 64 32 64 64 0 192 0 192h-576v576z m512-640s0-79 0-96-14-32-32-32-288 0-288 0v64h-192v-64s-80 0-96 0-32 16-32 32 0 96 0 96h640z m-384 448h-64v-64h64v64z m-64-320h64v64h-64v-64z m704 576c-32 0-288 0-320 0s-64-32-64-64 0-352 0-384 32-64 64-64 64 0 64 0v-64l32 32 32-32v64s160 0 192 0 64 32 64 64 0 352 0 384-32 64-64 64z m-256-448s-15 0-32 0-32 15-32 32 0 32 0 32h64v-64z m256 32c0-16-15-32-32-32s-160 0-160 0v64h192s0-16 0-32z m0 96h-256v256h224s32 0 32-32 0-224 0-224z m-640 192h-64v-64h64v64z" horiz-adv-x="1024" />
<glyph glyph-name="repo-force-push" unicode="&#xf04a;" d="M768 768c0 32-32 64-64 64s-608 0-640 0-64-32-64-64 0-768 0-768 0 32 0 0 32-64 64-64 128 0 128 0v-128l128 128v128h-128v-64s-79 0-96 0-32 15-32 32 0 96 0 96h256v64h-128v576h512v-576h-128v-64h128s0-80 0-96-15-32-32-32-96 0-96 0v-64s96 0 128 0 64 32 64 64 0 736 0 768z m-272-320h144l-192 256-192-256h144l-144-192h128v-448h128v448h128l-144 192z" horiz-adv-x="767.896" />
<glyph glyph-name="repo-forked" unicode="&#xf002;" d="M768 704c0 71-57 128-128 128s-128-57-128-128c0-47 26-89 64-111v-106l-192-212-192 212v106c38 22 64 63 64 111 0 71-57 128-128 128s-128-57-128-128c0-47 26-89 64-111v-156l256-282v-109c-38-22-64-63-64-111 0-71 57-128 128-128s128 57 128 128c0 47-26 89-64 111v109l256 282v156c38 22 64 63 64 111z m-640 63c34 0 62-28 62-62s-28-62-62-62-62 28-62 62 28 62 62 62z m256-891c-34 0-62 28-62 62s28 62 62 62 62-28 62-62-28-62-62-62z m256 891c34 0 62-28 62-62s-28-62-62-62-62 28-62 62 28 62 62 62z" horiz-adv-x="768" />
<glyph glyph-name="repo-pull" unicode="&#xf006;" d="M1024 512l-192 192v-128h-384v-128h384v-128l192 192z m-320-320h-512v576h512v-128h64s0 96 0 128-32 64-64 64-608 0-640 0-64-32-64-64 0-736 0-768 32-64 64-64 128 0 128 0v-128l96 96 96-96v128s288 0 320 0 64 32 64 64 0 384 0 384h-64v-192z m0-160c0-15-15-32-32-32s-288 0-288 0v64h-192v-64s-79 0-96 0-32 16-32 32 0 96 0 96h640s0-81 0-96z m-384 544h-64v-64h64v64z m0 128h-64v-64h64v64z m0-256h-64v-64h64v64z m-64-192h64v64h-64v-64z" horiz-adv-x="1024" />
<glyph glyph-name="repo-push" unicode="&#xf005;" d="M448 512l-192-256h128v-448h128v448h128l-192 256z m-192 0h64v64h-64v-64z m64 192h-64v-64h64v64z m384 128c-32 0-608 0-640 0s-64-32-64-64 0-736 0-768 32-64 64-64 128 0 128 0v-128l128 128v128h-128v-64s-79 0-96 0-32 14-32 32 0 96 0 96h256v64h-128v576h513l-1-576h-128v-64h128s0-79 0-96-15-32-32-32-96 0-96 0v-64s96 0 128 0 64 32 64 64 0 736 0 768-32 64-64 64z" horiz-adv-x="768" />
<glyph glyph-name="rocket" unicode="&#xf033;" d="M716.737 707.944c-71.926-41.686-148.041-96.13-218.436-166.555-45-45.031-81.213-88.78-110.39-129.778L209.538 378.65 0.047 169.00300000000004l186.818-5.815 131.562 131.562c-46.439-96.224-50.536-160.019-50.536-160.019l58.854-58.792c0 0 65.827 6.255 162.737 53.163L355.107-5.119000000000028l5.88-186.881 209.585 209.521 33.086 179.252c41.403 29.02 85.185 65.046 129.716 109.545 70.425 70.455 124.837 146.541 166.555 218.466-45.97 9.351-88.125 28.488-121.397 61.668C745.257 619.819 725.994 661.975 716.737 707.944zM786.161 745.157c5.004-45 19.952-81.274 44.78-105.98 24.769-24.985 60.98-39.902 106.138-44.844C1003.063 727.677 1023.953 832 1023.953 832S919.63 811.142 786.161 745.157z" horiz-adv-x="1024" />
<glyph glyph-name="rss" unicode="&#xf034;" d="M128 192C57.344 192 0 134.625 0 64s57.344-128 128-128 128 57.375 128 128S198.656 192 128 192zM128 448c0 0-64-2-64-64s64-64 64-64c141.375 0 256-114.625 256-256 0 0 0-64 64-64s64 64 64 64C512 276 340.031 448 128 448zM128 704c0 0-64 0-64-64s64-64 64-64c282.75 0 512-229.25 512-512 0 0 0-64 64-64s64 64 64 64C768 417.406 481.5 704 128 704z" horiz-adv-x="768" />
<glyph glyph-name="ruby" unicode="&#xf047;" d="M768 704H256L0 448l512-512 512 512L768 704zM128 448l192 192h384l192-192L512 64 128 448zM704 576H512v-448l320 320L704 576z" horiz-adv-x="1024" />
<glyph glyph-name="screen-full" unicode="&#xf066;" d="M128 64h639.875V576H128V64zM255.938 448h384v-256h-384V448zM64 639.938h191.938v64H0V448h64V639.938zM64 192H0v-255.938h255.938V0H64V192zM639.938 703.938v-64h191.938V448h64V703.938H639.938zM831.875 0H639.938v-63.938h255.938V192h-64V0z" horiz-adv-x="895.875" />
<glyph glyph-name="screen-normal" unicode="&#xf067;" d="M127.938 640.062H0v-64h191.938V768h-64V640.062zM0-0.06200000000001182h127.938V-128h64V63.93799999999999H0V-0.06200000000001182zM768.062 640.062V768h-64v-191.938H896v64H768.062zM704.062-128h64V-0.06200000000001182H896v64H704.062V-128zM192.062 128H704V512H192.062V128zM320 384h256v-128H320V384z" horiz-adv-x="896" />
<glyph glyph-name="search" unicode="&#xf02e;" d="M960 0L710.875 249.125C746.438 307.188 768 374.844 768 448 768 660.031 596 832 384 832 171.969 832 0 660.031 0 448c0-212 171.969-384 384-384 73.156 0 140.812 21.562 198.875 57L832-128c17.5-17.5 46.5-17.375 64 0l64 64C977.5-46.5 977.5-17.5 960 0zM384 192c-141.375 0-256 114.625-256 256s114.625 256 256 256 256-114.625 256-256S525.375 192 384 192z" horiz-adv-x="973.125" />
<glyph glyph-name="server" unicode="&#xf097;" d="M704 448h-640c-35 0-64-32-64-64v-128c0-32 32-64 64-64h640c32 0 64 32 64 64v128c0 32-32 64-64 64z m-576-192h-64v128h64v-128z m128 0h-64v128h64v-128z m128 0h-64v128h64v-128z m128 0h-64v128h64v-128z m192-128h-640c-35 0-64-32-64-64v-128c0-32 32-64 64-64h640c32 0 64 32 64 64v128c0 32-32 64-64 64z m-576-192h-64v128h64v-128z m128 0h-64v128h64v-128z m128 0h-64v128h64v-128z m128 0h-64v128h64v-128z m192 832h-640c-35 0-64-32-64-64v-128c0-32 32-64 64-64h640c32 0 64 32 64 64v128c0 32-32 64-64 64z m-576-192h-64v128h64v-128z m128 0h-64v128h64v-128z m128 0h-64v128h64v-128z m128 0h-64v128h64v-128z m192 64h-64v64h64v-64z" horiz-adv-x="768" />
<glyph glyph-name="settings" unicode="&#xf07c;" d="M64-64h128V128H64V-64zM192 704H64v-320h128V704zM512 704H384v-128h128V704zM0 192h256V320H0V192zM384-64h128V320H384V-64zM320 384h256V512H320V384zM832 704H704v-384h128V704zM640 256v-128h256V256H640zM704-64h128V64H704V-64z" horiz-adv-x="896" />
<glyph glyph-name="sign-in" unicode="&#xf036;" d="M640 256L640 384 896 384 896 512 640 512 640 640 448 496 448 640 192 768 704 768 704 576 768 576 768 832 64 832 64 0 448-192 448 0 768 0 768 320 704 320 704 64 448 64 448 400z" horiz-adv-x="896" />
<glyph glyph-name="sign-out" unicode="&#xf032;" d="M640 64H384V640L128 768h512v-192h64V832H0v-832l384-192V0h320V320h-64V64zM1024 448L768 640v-128H512v-128h256v-128L1024 448z" horiz-adv-x="1024" />
<glyph glyph-name="split" unicode="&#xf0c6;" d="M448 576l-256 256-192-192 311-300c15 81 43 136 133 230l5 6z m128 256l133-133-197-197c-99-99-128-162-128-309v-384h256v384c0 52 19 94 53 128l197 197 133-133v448h-448z" horiz-adv-x="1024" />
<glyph glyph-name="squirrel" unicode="&#xf0b2;" d="M768 768c-141.385 0-256-83.75-256-186.875C512 457.25 544 387 512 192c0 288-177 405.783-256 405.783 3.266 32.17-30.955 42.217-30.955 42.217s-14-7.124-19.354-21.583c-17.231 20.053-36.154 17.54-36.154 17.54l-8.491-37.081c0 0-117.045-40.876-118.635-206.292C56 371 141.311 353.898 201.887 364.882c57.157-2.956 42.991-50.648 30.193-63.446C178.083 247.438 128 320 64 320s-64-64 0-64 64-64 192-64c-198-77 0-256 0-256h-64c-64 0-64-64-64-64s256 0 384 0c192 0 320 64 320 222.182 0 54.34-27.699 114.629-64 162.228C697.057 349.433 782.453 427.566 832 384s192-64 192 128C1024 653.385 909.385 768 768 768zM160 448c-17.674 0-32 14.327-32 32 0 17.674 14.326 32 32 32 17.673 0 32-14.326 32-32C192 462.327 177.673 448 160 448z" horiz-adv-x="1024" />
<glyph glyph-name="star" unicode="&#xf02a;" d="M896 448l-313.5 40.781L448 768 313.469 488.781 0 448l230.469-208.875L171-63.93799999999999l277 148.812 277.062-148.812L665.5 239.125 896 448z" horiz-adv-x="896" />
<glyph glyph-name="steps" unicode="&#xf0c7;" d="M136 768C60.89 768 0 667.71 0 544c0-68.83 17.02-141.84 34-254.54C47.3 201.16999999999996 79.67 128 136 128s94.08 48.79 94.08 137.97c0 30.37-24.97 78.75-26.08 120.03-2.02 74.46 49.93 104.17 49.93 173C253.93 682.71 211.1 768 136 768zM502.97 512c-75.1 0-117.93-85.29-117.93-209 0-68.83 51.95-98.54 49.93-173-1.109-41.28-26.08-89.66-26.08-120.03 0-89.18 37.75-137.97 94.08-137.97s88.7 73.17 102 161.46c16.98 112.7 34 185.71 34 254.54C638.97 411.71 578.08 512 502.97 512z" horiz-adv-x="640" />
<glyph glyph-name="stop" unicode="&#xf08f;" d="M704 832H320L0 512v-384l320-320h384l320 320V512L704 832zM896 192L640-64H384L128 192V448l256 256h256l256-256V192zM448 256h128V576H448V256zM448 64h128V192H448V64z" horiz-adv-x="1024" />
<glyph glyph-name="sync" unicode="&#xf087;" d="M655.461 358.531c11.875-81.719-13.062-167.781-76.812-230.594-94.188-92.938-239.5-104.375-346.375-34.562l74.875 73L31.96 204.75 70.367-64l84.031 80.5c150.907-111.25 364.938-100.75 502.063 34.562 79.5 78.438 115.75 182.562 111.25 285.312L655.461 358.531zM189.46 511.938c94.156 92.938 239.438 104.438 346.313 34.562l-75-72.969 275.188-38.406L697.586 704l-83.938-80.688C462.711 734.656 248.742 724.031 111.585 588.75 32.085 510.344-4.133 406.219 0.335 303.5l112.25-22.125C100.71 363.125 125.71 449.094 189.46 511.938z" horiz-adv-x="768.051" />
<glyph glyph-name="tag" unicode="&#xf015;" d="M384 768H128L0 640v-256l512-512 384 384L384 768zM64 416V608l96 96h192l448-448L512-32 64 416zM448 512L256 320l256-256 192 192L448 512zM352 320l96 96 160-160-96-96L352 320zM320 544c0 53-43 96-96 96s-96-43-96-96 43-96 96-96S320 491 320 544zM224 512c-17.656 0-32 14.344-32 32s14.344 32 32 32 32-14.344 32-32S241.656 512 224 512z" horiz-adv-x="896" />
<glyph glyph-name="telescope" unicode="&#xf088;" d="M76 409c32 8 229 59 229 59-1-6-2-19-2-19 0-71 49-128 128-128s128 59 128 128c0 11-8 22-19 32l49-3s7 2 31 8c-51-14-108 31-126 99s8 135 60 149c-24-6-31-8-31-8l-168-110c-34-9-55-46-46-80 2-9 7-17 12-23-7-12-12-26-15-40-27 1-51 19-59 46-9 34 11 69 45 78l-245-65c-34-9-54-43-45-77s41-54 73-46z m419-153h-128v-64l-320-320h128l192 128v-128h128v128l192-128h128l-320 320v64z m429 448c-18 68-70 110-122 96-69-18-98-28-186-51-51-14-79-80-61-148s74-115 125-102c87 23 117 33 186 51 51 14 76 85 58 154z m-70-90c-17-5-42 17-51 51s-4 66 13 70 42-17 51-51 4-66-13-70z" horiz-adv-x="929.875" />
<glyph glyph-name="terminal" unicode="&#xf0c8;" d="M831 705H63c-35.35 0-64-28.65-64-64v-640c0-35.35 28.65-64 64-64h768c35.35 0 64 28.65 64 64V641C895 676.35 866.35 705 831 705zM127 257l128 128L127 513l64 64 192-192L191 193 127 257zM639 193H383v64h256V193z" horiz-adv-x="896" />
<glyph glyph-name="three-bars" unicode="&#xf05e;" d="M0 640v-128h768v128h-768z m0-384h768v128h-768v-128z m0-256h768v128h-768v-128z" horiz-adv-x="768" />
<glyph glyph-name="tools" unicode="&#xf031;" d="M286.547 366.984c16.843-16.812 81.716-85.279 81.716-85.279l35.968 37.093-56.373 58.248L456.072 491.98c0 0-48.842 47.623-27.468 28.655 20.438 75.903 1.812 160.589-55.842 220.243C315.608 800.064 234.392 819.47 161.425 799.096l123.653-127.715-32.53-125.309-121.06-33.438L7.898 640.3820000000001c-19.718-75.436-0.969-159.339 56.311-218.556C124.302 359.703 210.83 341.453 286.547 366.984zM698.815 242.769L549.694 95.46100000000001l245.932-254.805c20.062-20.812 46.498-31.188 72.872-31.188 26.25 0 52.624 10.375 72.811 31.188 40.249 41.624 40.249 108.997 0 150.62L698.815 242.769zM1023.681 670.162L867.06 832.001 405.387 354.703l56.373-58.248L185.425 10.839000000000055l-63.154-33.749-89.217-145.559 22.719-23.562 140.839 92.247 32.655 65.312 276.336 285.554 56.404-58.248L1023.681 670.162z" horiz-adv-x="1024" />
<glyph glyph-name="trashcan" unicode="&#xf0d0;" d="M704 704H448c0 0 0 24.057 0 32 0 17.673-14.327 32-32 32s-32-14.327-32-32c0-17.673 0-32 0-32H128c-35.346 0-64-28.654-64-64v-64c0-35.346 28.654-64 64-64v-576c0-35.346 28.654-64 64-64h448c35.346 0 64 28.654 64 64V512c35.346 0 64 28.654 64 64v64C768 675.346 739.346 704 704 704zM640-32c0-17.673-14.327-32-32-32H224c-17.673 0-32 14.327-32 32V512h64v-480c0-17.673 14.327-32 32-32s32 14.327 32 32l0.387 480H384v-480c0-17.673 14.327-32 32-32s32 14.327 32 32l0.387 480h64L512 32c0-17.673 14.327-32 32-32s32 14.327 32 32V512h64V-32zM704 592c0-8.837-7.163-16-16-16H144c-8.837 0-16 7.163-16 16v32c0 8.837 7.163 16 16 16h544c8.837 0 16-7.163 16-16V592z" horiz-adv-x="768" />
<glyph glyph-name="triangle-down" unicode="&#xf05b;" d="M0 448l383.75-383.75L767.5 448H0z" horiz-adv-x="767.5" />
<glyph glyph-name="triangle-left" unicode="&#xf044;" d="M0 320.125l383.75-383.75v767.5L0 320.125z" horiz-adv-x="383.75" />
<glyph glyph-name="triangle-right" unicode="&#xf05a;" d="M0.062 703.75L383.812 320 0.062-63.75V703.75z" horiz-adv-x="383.875" />
<glyph glyph-name="triangle-up" unicode="&#xf0aa;" d="M383.75 576L0 192.25h767.5L383.75 576z" horiz-adv-x="767.5" />
<glyph glyph-name="unfold" unicode="&#xf039;" d="M384 448h128V640h128L448 832 256 640h128V448zM576 576v-64h224L672 384H224L96 512h224v64H0v-63.999L160 352 0 192v-64h320v64H96l128 128h448l128-128H576v-64h320v64L736 352l160 160.001V576H576zM512 256H384v-192H256l192-192 192 192H512V256z" horiz-adv-x="896" />
<glyph glyph-name="unmute" unicode="&#xf0ba;" d="M128 448H0v-256h128l256-192h64V640h-64L128 448zM538.51 410.51c-12.496 12.497-32.758 12.497-45.255 0-12.496-12.496-12.496-32.758 0-45.255 24.994-24.993 24.994-65.516 0-90.51-12.496-12.496-12.496-32.758 0-45.255 12.497-12.496 32.759-12.496 45.255 0C588.497 279.47900000000004 588.497 360.523 538.51 410.51zM629.02 501.019c-12.495 12.497-32.758 12.497-45.255 0-12.495-12.496-12.495-32.758 0-45.255 74.981-74.98 74.981-196.548 0-271.528-12.495-12.497-12.495-32.76 0-45.256 12.497-12.496 32.76-12.496 45.255 0C728.994 238.95399999999995 728.994 401.045 629.02 501.019zM719.529 591.529c-12.497 12.497-32.76 12.497-45.255 0-12.496-12.496-12.496-32.758 0-45.255 124.968-124.968 124.968-327.58 0-452.548-12.496-12.497-12.496-32.759 0-45.255 12.495-12.497 32.758-12.497 45.255 0C869.49 198.433 869.49 441.568 719.529 591.529z" horiz-adv-x="896" />
<glyph glyph-name="versions" unicode="&#xf064;" d="M0 128h128v64H64V448h64v64H0V128zM384 640v-640h512V640H384zM768 128H512V512h256V128zM192 64h128v64h-64V512h64v64H192V64z" horiz-adv-x="896" />
<glyph glyph-name="x" unicode="&#xf081;" d="M640 512L512 640 320 448 128 640 0 512l192-192L0 128l128-128 192 192 192-192 128 128L448 320 640 512z" horiz-adv-x="640" />
<glyph glyph-name="zap" unicode="&#x26A1;" d="M640 384H384L576 832 0 256h256L64-192 640 384z" horiz-adv-x="640" />
</font>
</defs>
</svg>

Before

Width:  |  Height:  |  Size: 85 KiB

View file

@ -1,230 +0,0 @@
@font-face {
font-family: 'octicons';
src: font-url('octicons.eot?#iefix') format('embedded-opentype'),
font-url('octicons.woff') format('woff'),
font-url('octicons.ttf') format('truetype'),
font-url('octicons.svg#octicons') format('svg');
font-weight: normal;
font-style: normal;
}
// .octicon is optimized for 16px.
// .mega-octicon is optimized for 32px but can be used larger.
.octicon, .mega-octicon {
font: normal normal normal 16px/1 octicons;
display: inline-block;
text-decoration: none;
text-rendering: auto;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.mega-octicon { font-size: 32px; }
.octicon-alert:before { content: '\f02d'} /*  */
.octicon-alignment-align:before { content: '\f08a'} /*  */
.octicon-alignment-aligned-to:before { content: '\f08e'} /*  */
.octicon-alignment-unalign:before { content: '\f08b'} /*  */
.octicon-arrow-down:before { content: '\f03f'} /*  */
.octicon-arrow-left:before { content: '\f040'} /*  */
.octicon-arrow-right:before { content: '\f03e'} /*  */
.octicon-arrow-small-down:before { content: '\f0a0'} /*  */
.octicon-arrow-small-left:before { content: '\f0a1'} /*  */
.octicon-arrow-small-right:before { content: '\f071'} /*  */
.octicon-arrow-small-up:before { content: '\f09f'} /*  */
.octicon-arrow-up:before { content: '\f03d'} /*  */
.octicon-beer:before { content: '\f069'} /*  */
.octicon-book:before { content: '\f007'} /*  */
.octicon-bookmark:before { content: '\f07b'} /*  */
.octicon-briefcase:before { content: '\f0d3'} /*  */
.octicon-broadcast:before { content: '\f048'} /*  */
.octicon-browser:before { content: '\f0c5'} /*  */
.octicon-bug:before { content: '\f091'} /*  */
.octicon-calendar:before { content: '\f068'} /*  */
.octicon-check:before { content: '\f03a'} /*  */
.octicon-checklist:before { content: '\f076'} /*  */
.octicon-chevron-down:before { content: '\f0a3'} /*  */
.octicon-chevron-left:before { content: '\f0a4'} /*  */
.octicon-chevron-right:before { content: '\f078'} /*  */
.octicon-chevron-up:before { content: '\f0a2'} /*  */
.octicon-circle-slash:before { content: '\f084'} /*  */
.octicon-circuit-board:before { content: '\f0d6'} /*  */
.octicon-clippy:before { content: '\f035'} /*  */
.octicon-clock:before { content: '\f046'} /*  */
.octicon-cloud-download:before { content: '\f00b'} /*  */
.octicon-cloud-upload:before { content: '\f00c'} /*  */
.octicon-code:before { content: '\f05f'} /*  */
.octicon-color-mode:before { content: '\f065'} /*  */
.octicon-comment-add:before,
.octicon-comment:before { content: '\f02b'} /*  */
.octicon-comment-discussion:before { content: '\f04f'} /*  */
.octicon-credit-card:before { content: '\f045'} /*  */
.octicon-dash:before { content: '\f0ca'} /*  */
.octicon-dashboard:before { content: '\f07d'} /*  */
.octicon-database:before { content: '\f096'} /*  */
.octicon-device-camera:before { content: '\f056'} /*  */
.octicon-device-camera-video:before { content: '\f057'} /*  */
.octicon-device-desktop:before { content: '\f27c'} /*  */
.octicon-device-mobile:before { content: '\f038'} /*  */
.octicon-diff:before { content: '\f04d'} /*  */
.octicon-diff-added:before { content: '\f06b'} /*  */
.octicon-diff-ignored:before { content: '\f099'} /*  */
.octicon-diff-modified:before { content: '\f06d'} /*  */
.octicon-diff-removed:before { content: '\f06c'} /*  */
.octicon-diff-renamed:before { content: '\f06e'} /*  */
.octicon-ellipsis:before { content: '\f09a'} /*  */
.octicon-eye-unwatch:before,
.octicon-eye-watch:before,
.octicon-eye:before { content: '\f04e'} /*  */
.octicon-file-binary:before { content: '\f094'} /*  */
.octicon-file-code:before { content: '\f010'} /*  */
.octicon-file-directory:before { content: '\f016'} /*  */
.octicon-file-media:before { content: '\f012'} /*  */
.octicon-file-pdf:before { content: '\f014'} /*  */
.octicon-file-submodule:before { content: '\f017'} /*  */
.octicon-file-symlink-directory:before { content: '\f0b1'} /*  */
.octicon-file-symlink-file:before { content: '\f0b0'} /*  */
.octicon-file-text:before { content: '\f011'} /*  */
.octicon-file-zip:before { content: '\f013'} /*  */
.octicon-flame:before { content: '\f0d2'} /*  */
.octicon-fold:before { content: '\f0cc'} /*  */
.octicon-gear:before { content: '\f02f'} /*  */
.octicon-gift:before { content: '\f042'} /*  */
.octicon-gist:before { content: '\f00e'} /*  */
.octicon-gist-secret:before { content: '\f08c'} /*  */
.octicon-git-branch-create:before,
.octicon-git-branch-delete:before,
.octicon-git-branch:before { content: '\f020'} /*  */
.octicon-git-commit:before { content: '\f01f'} /*  */
.octicon-git-compare:before { content: '\f0ac'} /*  */
.octicon-git-merge:before { content: '\f023'} /*  */
.octicon-git-pull-request-abandoned:before,
.octicon-git-pull-request:before { content: '\f009'} /*  */
.octicon-globe:before { content: '\f0b6'} /*  */
.octicon-graph:before { content: '\f043'} /*  */
.octicon-heart:before { content: '\2665'} /* ♥ */
.octicon-history:before { content: '\f07e'} /*  */
.octicon-home:before { content: '\f08d'} /*  */
.octicon-horizontal-rule:before { content: '\f070'} /*  */
.octicon-hourglass:before { content: '\f09e'} /*  */
.octicon-hubot:before { content: '\f09d'} /*  */
.octicon-inbox:before { content: '\f0cf'} /*  */
.octicon-info:before { content: '\f059'} /*  */
.octicon-issue-closed:before { content: '\f028'} /*  */
.octicon-issue-opened:before { content: '\f026'} /*  */
.octicon-issue-reopened:before { content: '\f027'} /*  */
.octicon-jersey:before { content: '\f019'} /*  */
.octicon-jump-down:before { content: '\f072'} /*  */
.octicon-jump-left:before { content: '\f0a5'} /*  */
.octicon-jump-right:before { content: '\f0a6'} /*  */
.octicon-jump-up:before { content: '\f073'} /*  */
.octicon-key:before { content: '\f049'} /*  */
.octicon-keyboard:before { content: '\f00d'} /*  */
.octicon-law:before { content: '\f0d8'} /* */
.octicon-light-bulb:before { content: '\f000'} /*  */
.octicon-link:before { content: '\f05c'} /*  */
.octicon-link-external:before { content: '\f07f'} /*  */
.octicon-list-ordered:before { content: '\f062'} /*  */
.octicon-list-unordered:before { content: '\f061'} /*  */
.octicon-location:before { content: '\f060'} /*  */
.octicon-gist-private:before,
.octicon-mirror-private:before,
.octicon-git-fork-private:before,
.octicon-lock:before { content: '\f06a'} /*  */
.octicon-logo-github:before { content: '\f092'} /*  */
.octicon-mail:before { content: '\f03b'} /*  */
.octicon-mail-read:before { content: '\f03c'} /*  */
.octicon-mail-reply:before { content: '\f051'} /*  */
.octicon-mark-github:before { content: '\f00a'} /*  */
.octicon-markdown:before { content: '\f0c9'} /*  */
.octicon-megaphone:before { content: '\f077'} /*  */
.octicon-mention:before { content: '\f0be'} /*  */
.octicon-microscope:before { content: '\f089'} /*  */
.octicon-milestone:before { content: '\f075'} /*  */
.octicon-mirror-public:before,
.octicon-mirror:before { content: '\f024'} /*  */
.octicon-mortar-board:before { content: '\f0d7'} /* */
.octicon-move-down:before { content: '\f0a8'} /*  */
.octicon-move-left:before { content: '\f074'} /*  */
.octicon-move-right:before { content: '\f0a9'} /*  */
.octicon-move-up:before { content: '\f0a7'} /*  */
.octicon-mute:before { content: '\f080'} /*  */
.octicon-no-newline:before { content: '\f09c'} /*  */
.octicon-octoface:before { content: '\f008'} /*  */
.octicon-organization:before { content: '\f037'} /*  */
.octicon-package:before { content: '\f0c4'} /*  */
.octicon-paintcan:before { content: '\f0d1'} /*  */
.octicon-pencil:before { content: '\f058'} /*  */
.octicon-person-add:before,
.octicon-person-follow:before,
.octicon-person:before { content: '\f018'} /*  */
.octicon-pin:before { content: '\f041'} /*  */
.octicon-playback-fast-forward:before { content: '\f0bd'} /*  */
.octicon-playback-pause:before { content: '\f0bb'} /*  */
.octicon-playback-play:before { content: '\f0bf'} /*  */
.octicon-playback-rewind:before { content: '\f0bc'} /*  */
.octicon-plug:before { content: '\f0d4'} /*  */
.octicon-repo-create:before,
.octicon-gist-new:before,
.octicon-file-directory-create:before,
.octicon-file-add:before,
.octicon-plus:before { content: '\f05d'} /*  */
.octicon-podium:before { content: '\f0af'} /*  */
.octicon-primitive-dot:before { content: '\f052'} /*  */
.octicon-primitive-square:before { content: '\f053'} /*  */
.octicon-pulse:before { content: '\f085'} /*  */
.octicon-puzzle:before { content: '\f0c0'} /*  */
.octicon-question:before { content: '\f02c'} /*  */
.octicon-quote:before { content: '\f063'} /*  */
.octicon-radio-tower:before { content: '\f030'} /*  */
.octicon-repo-delete:before,
.octicon-repo:before { content: '\f001'} /*  */
.octicon-repo-clone:before { content: '\f04c'} /*  */
.octicon-repo-force-push:before { content: '\f04a'} /*  */
.octicon-gist-fork:before,
.octicon-repo-forked:before { content: '\f002'} /*  */
.octicon-repo-pull:before { content: '\f006'} /*  */
.octicon-repo-push:before { content: '\f005'} /*  */
.octicon-rocket:before { content: '\f033'} /*  */
.octicon-rss:before { content: '\f034'} /*  */
.octicon-ruby:before { content: '\f047'} /*  */
.octicon-screen-full:before { content: '\f066'} /*  */
.octicon-screen-normal:before { content: '\f067'} /*  */
.octicon-search-save:before,
.octicon-search:before { content: '\f02e'} /*  */
.octicon-server:before { content: '\f097'} /*  */
.octicon-settings:before { content: '\f07c'} /*  */
.octicon-log-in:before,
.octicon-sign-in:before { content: '\f036'} /*  */
.octicon-log-out:before,
.octicon-sign-out:before { content: '\f032'} /*  */
.octicon-split:before { content: '\f0c6'} /*  */
.octicon-squirrel:before { content: '\f0b2'} /*  */
.octicon-star-add:before,
.octicon-star-delete:before,
.octicon-star:before { content: '\f02a'} /*  */
.octicon-steps:before { content: '\f0c7'} /*  */
.octicon-stop:before { content: '\f08f'} /*  */
.octicon-repo-sync:before,
.octicon-sync:before { content: '\f087'} /*  */
.octicon-tag-remove:before,
.octicon-tag-add:before,
.octicon-tag:before { content: '\f015'} /*  */
.octicon-telescope:before { content: '\f088'} /*  */
.octicon-terminal:before { content: '\f0c8'} /*  */
.octicon-three-bars:before { content: '\f05e'} /*  */
.octicon-tools:before { content: '\f031'} /*  */
.octicon-trashcan:before { content: '\f0d0'} /*  */
.octicon-triangle-down:before { content: '\f05b'} /*  */
.octicon-triangle-left:before { content: '\f044'} /*  */
.octicon-triangle-right:before { content: '\f05a'} /*  */
.octicon-triangle-up:before { content: '\f0aa'} /*  */
.octicon-unfold:before { content: '\f039'} /*  */
.octicon-unmute:before { content: '\f0ba'} /*  */
.octicon-versions:before { content: '\f064'} /*  */
.octicon-remove-close:before,
.octicon-x:before { content: '\f081'} /*  */
.octicon-zap:before { content: '\26A1'} /* ⚡ */

View file

@ -1,431 +0,0 @@
.select2-container {
box-sizing: border-box;
display: inline-block;
margin: 0;
position: relative;
vertical-align: middle; }
.select2-container .select2-selection--single {
box-sizing: border-box;
cursor: pointer;
display: block;
height: 28px;
user-select: none;
-webkit-user-select: none; }
.select2-container .select2-selection--single .select2-selection__rendered {
display: block;
padding-left: 8px;
padding-right: 20px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap; }
.select2-container[dir="rtl"] .select2-selection--single .select2-selection__rendered {
padding-right: 8px;
padding-left: 20px; }
.select2-container .select2-selection--multiple {
box-sizing: border-box;
cursor: pointer;
display: block;
min-height: 32px;
user-select: none;
-webkit-user-select: none; }
.select2-container .select2-selection--multiple .select2-selection__rendered {
display: inline-block;
overflow: hidden;
padding-left: 8px;
text-overflow: ellipsis;
white-space: nowrap; }
.select2-container .select2-search--inline {
float: left; }
.select2-container .select2-search--inline .select2-search__field {
box-sizing: border-box;
border: none;
font-size: 100%;
margin-top: 5px; }
.select2-container .select2-search--inline .select2-search__field::-webkit-search-cancel-button {
-webkit-appearance: none; }
.select2-dropdown {
background-color: white;
border: 1px solid #aaa;
border-radius: 4px;
box-sizing: border-box;
display: block;
position: absolute;
left: -100000px;
width: 100%;
z-index: 1051; }
.select2-results {
display: block; }
.select2-results__options {
list-style: none;
margin: 0;
padding: 0; }
.select2-results__option {
padding: 6px;
user-select: none;
-webkit-user-select: none; }
.select2-results__option[aria-selected] {
cursor: pointer; }
.select2-container--open .select2-dropdown {
left: 0; }
.select2-container--open .select2-dropdown--above {
border-bottom: none;
border-bottom-left-radius: 0;
border-bottom-right-radius: 0; }
.select2-container--open .select2-dropdown--below {
border-top: none;
border-top-left-radius: 0;
border-top-right-radius: 0; }
.select2-search--dropdown {
display: block;
padding: 4px; }
.select2-search--dropdown .select2-search__field {
padding: 4px;
width: 100%;
box-sizing: border-box; }
.select2-search--dropdown .select2-search__field::-webkit-search-cancel-button {
-webkit-appearance: none; }
.select2-search--dropdown.select2-search--hide {
display: none; }
.select2-close-mask {
border: 0;
margin: 0;
padding: 0;
display: block;
position: fixed;
left: 0;
top: 0;
min-height: 100%;
min-width: 100%;
height: auto;
width: auto;
opacity: 0;
z-index: 99;
background-color: #fff;
filter: alpha(opacity=0); }
.select2-hidden-accessible {
border: 0;
clip: rect(0 0 0 0);
height: 1px;
margin: -1px;
overflow: hidden;
padding: 0;
position: absolute;
width: 1px; }
.select2-container--default .select2-selection--single {
background-color: #fff;
border: 1px solid #aaa;
border-radius: 4px; }
.select2-container--default .select2-selection--single .select2-selection__rendered {
color: #444;
line-height: 28px; }
.select2-container--default .select2-selection--single .select2-selection__clear {
cursor: pointer;
float: right;
font-weight: bold; }
.select2-container--default .select2-selection--single .select2-selection__placeholder {
color: #999; }
.select2-container--default .select2-selection--single .select2-selection__arrow {
height: 26px;
position: absolute;
top: 1px;
right: 1px;
width: 20px; }
.select2-container--default .select2-selection--single .select2-selection__arrow b {
border-color: #888 transparent transparent transparent;
border-style: solid;
border-width: 5px 4px 0 4px;
height: 0;
left: 50%;
margin-left: -4px;
margin-top: -2px;
position: absolute;
top: 50%;
width: 0; }
.select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__clear {
float: left; }
.select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__arrow {
left: 1px;
right: auto; }
.select2-container--default.select2-container--disabled .select2-selection--single {
background-color: #eee;
cursor: default; }
.select2-container--default.select2-container--disabled .select2-selection--single .select2-selection__clear {
display: none; }
.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b {
border-color: transparent transparent #888 transparent;
border-width: 0 4px 5px 4px; }
.select2-container--default .select2-selection--multiple {
background-color: white;
border: 1px solid #aaa;
border-radius: 4px;
cursor: text; }
.select2-container--default .select2-selection--multiple .select2-selection__rendered {
box-sizing: border-box;
list-style: none;
margin: 0;
padding: 0 5px;
width: 100%; }
.select2-container--default .select2-selection--multiple .select2-selection__placeholder {
color: #999;
margin-top: 5px;
float: left; }
.select2-container--default .select2-selection--multiple .select2-selection__clear {
cursor: pointer;
float: right;
font-weight: bold;
margin-top: 5px;
margin-right: 10px; }
.select2-container--default .select2-selection--multiple .select2-selection__choice {
background-color: #e4e4e4;
border: 1px solid #aaa;
border-radius: 4px;
cursor: default;
float: left;
margin-right: 5px;
margin-top: 5px;
padding: 0 5px; }
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
color: #999;
cursor: pointer;
display: inline-block;
font-weight: bold;
margin-right: 2px; }
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
color: #333; }
.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice, .select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__placeholder {
float: right; }
.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice {
margin-left: 5px;
margin-right: auto; }
.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove {
margin-left: 2px;
margin-right: auto; }
.select2-container--default.select2-container--focus .select2-selection--multiple {
border: solid black 1px;
outline: 0; }
.select2-container--default.select2-container--disabled .select2-selection--multiple {
background-color: #eee;
cursor: default; }
.select2-container--default.select2-container--disabled .select2-selection__choice__remove {
display: none; }
.select2-container--default.select2-container--open.select2-container--above .select2-selection--single, .select2-container--default.select2-container--open.select2-container--above .select2-selection--multiple {
border-top-left-radius: 0;
border-top-right-radius: 0; }
.select2-container--default.select2-container--open.select2-container--below .select2-selection--single, .select2-container--default.select2-container--open.select2-container--below .select2-selection--multiple {
border-bottom-left-radius: 0;
border-bottom-right-radius: 0; }
.select2-container--default .select2-search--dropdown .select2-search__field {
border: 1px solid #aaa; }
.select2-container--default .select2-search--inline .select2-search__field {
background: transparent;
border: none;
outline: 0; }
.select2-container--default .select2-results > .select2-results__options {
max-height: 200px;
overflow-y: auto; }
.select2-container--default .select2-results__option[role=group] {
padding: 0; }
.select2-container--default .select2-results__option[aria-disabled=true] {
color: #999; }
.select2-container--default .select2-results__option[aria-selected=true] {
background-color: #ddd; }
.select2-container--default .select2-results__option .select2-results__option {
padding-left: 1em; }
.select2-container--default .select2-results__option .select2-results__option .select2-results__group {
padding-left: 0; }
.select2-container--default .select2-results__option .select2-results__option .select2-results__option {
margin-left: -1em;
padding-left: 2em; }
.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
margin-left: -2em;
padding-left: 3em; }
.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
margin-left: -3em;
padding-left: 4em; }
.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
margin-left: -4em;
padding-left: 5em; }
.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
margin-left: -5em;
padding-left: 6em; }
.select2-container--default .select2-results__option--highlighted[aria-selected] {
background-color: #5897fb;
color: white; }
.select2-container--default .select2-results__group {
cursor: default;
display: block;
padding: 6px; }
.select2-container--classic .select2-selection--single {
background-color: #f6f6f6;
border: 1px solid #aaa;
border-radius: 4px;
outline: 0;
background-image: -webkit-linear-gradient(top, #ffffff 50%, #eeeeee 100%);
background-image: -o-linear-gradient(top, #ffffff 50%, #eeeeee 100%);
background-image: linear-gradient(to bottom, #ffffff 50%, #eeeeee 100%);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#eeeeee', GradientType=0); }
.select2-container--classic .select2-selection--single:focus {
border: 1px solid #5897fb; }
.select2-container--classic .select2-selection--single .select2-selection__rendered {
color: #444;
line-height: 28px; }
.select2-container--classic .select2-selection--single .select2-selection__clear {
cursor: pointer;
float: right;
font-weight: bold;
margin-right: 10px; }
.select2-container--classic .select2-selection--single .select2-selection__placeholder {
color: #999; }
.select2-container--classic .select2-selection--single .select2-selection__arrow {
background-color: #ddd;
border: none;
border-left: 1px solid #aaa;
border-top-right-radius: 4px;
border-bottom-right-radius: 4px;
height: 26px;
position: absolute;
top: 1px;
right: 1px;
width: 20px;
background-image: -webkit-linear-gradient(top, #eeeeee 50%, #cccccc 100%);
background-image: -o-linear-gradient(top, #eeeeee 50%, #cccccc 100%);
background-image: linear-gradient(to bottom, #eeeeee 50%, #cccccc 100%);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee', endColorstr='#cccccc', GradientType=0); }
.select2-container--classic .select2-selection--single .select2-selection__arrow b {
border-color: #888 transparent transparent transparent;
border-style: solid;
border-width: 5px 4px 0 4px;
height: 0;
left: 50%;
margin-left: -4px;
margin-top: -2px;
position: absolute;
top: 50%;
width: 0; }
.select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__clear {
float: left; }
.select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__arrow {
border: none;
border-right: 1px solid #aaa;
border-radius: 0;
border-top-left-radius: 4px;
border-bottom-left-radius: 4px;
left: 1px;
right: auto; }
.select2-container--classic.select2-container--open .select2-selection--single {
border: 1px solid #5897fb; }
.select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow {
background: transparent;
border: none; }
.select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow b {
border-color: transparent transparent #888 transparent;
border-width: 0 4px 5px 4px; }
.select2-container--classic.select2-container--open.select2-container--above .select2-selection--single {
border-top: none;
border-top-left-radius: 0;
border-top-right-radius: 0;
background-image: -webkit-linear-gradient(top, #ffffff 0%, #eeeeee 50%);
background-image: -o-linear-gradient(top, #ffffff 0%, #eeeeee 50%);
background-image: linear-gradient(to bottom, #ffffff 0%, #eeeeee 50%);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#eeeeee', GradientType=0); }
.select2-container--classic.select2-container--open.select2-container--below .select2-selection--single {
border-bottom: none;
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
background-image: -webkit-linear-gradient(top, #eeeeee 50%, #ffffff 100%);
background-image: -o-linear-gradient(top, #eeeeee 50%, #ffffff 100%);
background-image: linear-gradient(to bottom, #eeeeee 50%, #ffffff 100%);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee', endColorstr='#ffffff', GradientType=0); }
.select2-container--classic .select2-selection--multiple {
background-color: white;
border: 1px solid #aaa;
border-radius: 4px;
cursor: text;
outline: 0; }
.select2-container--classic .select2-selection--multiple:focus {
border: 1px solid #5897fb; }
.select2-container--classic .select2-selection--multiple .select2-selection__rendered {
list-style: none;
margin: 0;
padding: 0 5px; }
.select2-container--classic .select2-selection--multiple .select2-selection__clear {
display: none; }
.select2-container--classic .select2-selection--multiple .select2-selection__choice {
background-color: #e4e4e4;
border: 1px solid #aaa;
border-radius: 4px;
cursor: default;
float: left;
margin-right: 5px;
margin-top: 5px;
padding: 0 5px; }
.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove {
color: #888;
cursor: pointer;
display: inline-block;
font-weight: bold;
margin-right: 2px; }
.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove:hover {
color: #555; }
.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice {
float: right; }
.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice {
margin-left: 5px;
margin-right: auto; }
.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove {
margin-left: 2px;
margin-right: auto; }
.select2-container--classic.select2-container--open .select2-selection--multiple {
border: 1px solid #5897fb; }
.select2-container--classic.select2-container--open.select2-container--above .select2-selection--multiple {
border-top: none;
border-top-left-radius: 0;
border-top-right-radius: 0; }
.select2-container--classic.select2-container--open.select2-container--below .select2-selection--multiple {
border-bottom: none;
border-bottom-left-radius: 0;
border-bottom-right-radius: 0; }
.select2-container--classic .select2-search--dropdown .select2-search__field {
border: 1px solid #aaa;
outline: 0; }
.select2-container--classic .select2-search--inline .select2-search__field {
outline: 0; }
.select2-container--classic .select2-dropdown {
background-color: white;
border: 1px solid transparent; }
.select2-container--classic .select2-dropdown--above {
border-bottom: none; }
.select2-container--classic .select2-dropdown--below {
border-top: none; }
.select2-container--classic .select2-results > .select2-results__options {
max-height: 200px;
overflow-y: auto; }
.select2-container--classic .select2-results__option[role=group] {
padding: 0; }
.select2-container--classic .select2-results__option[aria-disabled=true] {
color: grey; }
.select2-container--classic .select2-results__option--highlighted[aria-selected] {
background-color: #3875d7;
color: white; }
.select2-container--classic .select2-results__group {
cursor: default;
display: block;
padding: 6px; }
.select2-container--classic.select2-container--open .select2-dropdown {
border-color: #5897fb; }

File diff suppressed because one or more lines are too long

View file

@ -1,3 +0,0 @@
/*! Select2 4.0.0 | https://github.com/select2/select2/blob/master/LICENSE.md */
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/az",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum;return t+" simvol silin"},inputTooShort:function(e){var t=e.minimum-e.input.length;return t+" simvol daxil edin"},loadingMore:function(){return"Daha çox nəticə yüklənir…"},maximumSelected:function(e){return"Sadəcə "+e.maximum+" element seçə bilərsiniz"},noResults:function(){return"Nəticə tapılmadı"},searching:function(){return"Axtarılır…"}}}),{define:e.define,require:e.require}})();

View file

@ -1,3 +0,0 @@
/*! Select2 4.0.0 | https://github.com/select2/select2/blob/master/LICENSE.md */
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/bg",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Моля въведете с "+t+" по-малко символ";return t>1&&(n+="a"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Моля въведете още "+t+" символ";return t>1&&(n+="a"),n},loadingMore:function(){return"Зареждат се още…"},maximumSelected:function(e){var t="Можете да направите до "+e.maximum+" ";return e.maximum>1?t+="избора":t+="избор",t},noResults:function(){return"Няма намерени съвпадения"},searching:function(){return"Търсене…"}}}),{define:e.define,require:e.require}})();

View file

@ -1,3 +0,0 @@
/*! Select2 4.0.0 | https://github.com/select2/select2/blob/master/LICENSE.md */
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ca",[],function(){return{errorLoading:function(){return"La càrrega ha fallat"},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Si us plau, elimina "+t+" car";return t==1?n+="àcter":n+="àcters",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Si us plau, introdueix "+t+" car";return t==1?n+="àcter":n+="àcters",n},loadingMore:function(){return"Carregant més resultats…"},maximumSelected:function(e){var t="Només es pot seleccionar "+e.maximum+" element";return e.maximum!=1&&(t+="s"),t},noResults:function(){return"No s'han trobat resultats"},searching:function(){return"Cercant…"}}}),{define:e.define,require:e.require}})();

View file

@ -1,3 +0,0 @@
/*! Select2 4.0.0 | https://github.com/select2/select2/blob/master/LICENSE.md */
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/cs",[],function(){function e(e,t){switch(e){case 2:return t?"dva":"dvě";case 3:return"tři";case 4:return"čtyři"}return""}return{errorLoading:function(){return"Výsledky nemohly být načteny."},inputTooLong:function(t){var n=t.input.length-t.maximum;return n==1?"Prosím zadejte o jeden znak méně":n<=4?"Prosím zadejte o "+e(n,!0)+" znaky méně":"Prosím zadejte o "+n+" znaků méně"},inputTooShort:function(t){var n=t.minimum-t.input.length;return n==1?"Prosím zadejte ještě jeden znak":n<=4?"Prosím zadejte ještě další "+e(n,!0)+" znaky":"Prosím zadejte ještě dalších "+n+" znaků"},loadingMore:function(){return"Načítají se další výsledky…"},maximumSelected:function(t){var n=t.maximum;return n==1?"Můžete zvolit jen jednu položku":n<=4?"Můžete zvolit maximálně "+e(n,!1)+" položky":"Můžete zvolit maximálně "+n+" položek"},noResults:function(){return"Nenalezeny žádné položky"},searching:function(){return"Vyhledávání…"}}}),{define:e.define,require:e.require}})();

View file

@ -1,3 +0,0 @@
/*! Select2 4.0.0 | https://github.com/select2/select2/blob/master/LICENSE.md */
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/da",[],function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Angiv venligst "+t+" tegn mindre";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Angiv venligst "+t+" tegn mere";return n},loadingMore:function(){return"Indlæser flere resultater…"},maximumSelected:function(e){var t="Du kan kun vælge "+e.maximum+" emne";return e.maximum!=1&&(t+="r"),t},noResults:function(){return"Ingen resultater fundet"},searching:function(){return"Søger…"}}}),{define:e.define,require:e.require}})();

View file

@ -1,3 +0,0 @@
/*! Select2 4.0.0 | https://github.com/select2/select2/blob/master/LICENSE.md */
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/de",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum;return"Bitte "+t+" Zeichen weniger eingeben"},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Bitte "+t+" Zeichen mehr eingeben"},loadingMore:function(){return"Lade mehr Ergebnisse…"},maximumSelected:function(e){var t="Sie können nur "+e.maximum+" Eintr";return e.maximum===1?t+="ag":t+="äge",t+=" auswählen",t},noResults:function(){return"Keine Übereinstimmungen gefunden"},searching:function(){return"Suche…"}}}),{define:e.define,require:e.require}})();

View file

@ -1,3 +0,0 @@
/*! Select2 4.0.0 | https://github.com/select2/select2/blob/master/LICENSE.md */
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/en",[],function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Please delete "+t+" character";return t!=1&&(n+="s"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Please enter "+t+" or more characters";return n},loadingMore:function(){return"Loading more results…"},maximumSelected:function(e){var t="You can only select "+e.maximum+" item";return e.maximum!=1&&(t+="s"),t},noResults:function(){return"No results found"},searching:function(){return"Searching…"}}}),{define:e.define,require:e.require}})();

View file

@ -1,3 +0,0 @@
/*! Select2 4.0.0 | https://github.com/select2/select2/blob/master/LICENSE.md */
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/es",[],function(){return{errorLoading:function(){return"La carga falló"},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Por favor, elimine "+t+" car";return t==1?n+="ácter":n+="acteres",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Por favor, introduzca "+t+" car";return t==1?n+="ácter":n+="acteres",n},loadingMore:function(){return"Cargando más resultados…"},maximumSelected:function(e){var t="Sólo puede seleccionar "+e.maximum+" elemento";return e.maximum!=1&&(t+="s"),t},noResults:function(){return"No se encontraron resultados"},searching:function(){return"Buscando…"}}}),{define:e.define,require:e.require}})();

View file

@ -1,3 +0,0 @@
/*! Select2 4.0.0 | https://github.com/select2/select2/blob/master/LICENSE.md */
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/et",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Sisesta "+t+" täht";return t!=1&&(n+="e"),n+=" vähem",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Sisesta "+t+" täht";return t!=1&&(n+="e"),n+=" rohkem",n},loadingMore:function(){return"Laen tulemusi…"},maximumSelected:function(e){var t="Saad vaid "+e.maximum+" tulemus";return e.maximum==1?t+="e":t+="t",t+=" valida",t},noResults:function(){return"Tulemused puuduvad"},searching:function(){return"Otsin…"}}}),{define:e.define,require:e.require}})();

View file

@ -1,3 +0,0 @@
/*! Select2 4.0.0 | https://github.com/select2/select2/blob/master/LICENSE.md */
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/eu",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Idatzi ";return t==1?n+="karaktere bat":n+=t+" karaktere",n+=" gutxiago",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Idatzi ";return t==1?n+="karaktere bat":n+=t+" karaktere",n+=" gehiago",n},loadingMore:function(){return"Emaitza gehiago kargatzen…"},maximumSelected:function(e){return e.maximum===1?"Elementu bakarra hauta dezakezu":e.maximum+" elementu hauta ditzakezu soilik"},noResults:function(){return"Ez da bat datorrenik aurkitu"},searching:function(){return"Bilatzen…"}}}),{define:e.define,require:e.require}})();

View file

@ -1,3 +0,0 @@
/*! Select2 4.0.0 | https://github.com/select2/select2/blob/master/LICENSE.md */
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/fa",[],function(){return{errorLoading:function(){return"امکان بارگذاری نتایج وجود ندارد."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="لطفاً "+t+" کاراکتر را حذف نمایید";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="لطفاً تعداد "+t+" کاراکتر یا بیشتر وارد نمایید";return n},loadingMore:function(){return"در حال بارگذاری نتایج بیشتر..."},maximumSelected:function(e){var t="شما تنها می‌توانید "+e.maximum+" آیتم را انتخاب نمایید";return t},noResults:function(){return"هیچ نتیجه‌ای یافت نشد"},searching:function(){return"در حال جستجو..."}}}),{define:e.define,require:e.require}})();

View file

@ -1,3 +0,0 @@
/*! Select2 4.0.0 | https://github.com/select2/select2/blob/master/LICENSE.md */
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/fi",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum;return"Ole hyvä ja anna "+t+" merkkiä vähemmän"},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Ole hyvä ja anna "+t+" merkkiä lisää"},loadingMore:function(){return"Ladataan lisää tuloksia…"},maximumSelected:function(e){return"Voit valita ainoastaan "+e.maximum+" kpl"},noResults:function(){return"Ei tuloksia"},searching:function(){}}}),{define:e.define,require:e.require}})();

View file

@ -1,3 +0,0 @@
/*! Select2 4.0.0 | https://github.com/select2/select2/blob/master/LICENSE.md */
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/fr",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Supprimez "+t+" caractère";return t!==1&&(n+="s"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Saisissez "+t+" caractère";return t!==1&&(n+="s"),n},loadingMore:function(){return"Chargement de résultats supplémentaires…"},maximumSelected:function(e){var t="Vous pouvez seulement sélectionner "+e.maximum+" élément";return e.maximum!==1&&(t+="s"),t},noResults:function(){return"Aucun résultat trouvé"},searching:function(){return"Recherche en cours…"}}}),{define:e.define,require:e.require}})();

View file

@ -1,3 +0,0 @@
/*! Select2 4.0.0 | https://github.com/select2/select2/blob/master/LICENSE.md */
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/gl",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Engada ";return t===1?n+="un carácter":n+=t+" caracteres",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Elimine ";return t===1?n+="un carácter":n+=t+" caracteres",n},loadingMore:function(){return"Cargando máis resultados…"},maximumSelected:function(e){var t="Só pode ";return e.maximum===1?t+="un elemento":t+=e.maximum+" elementos",t},noResults:function(){return"Non se atoparon resultados"},searching:function(){return"Buscando…"}}}),{define:e.define,require:e.require}})();

View file

@ -1,3 +0,0 @@
/*! Select2 4.0.0 | https://github.com/select2/select2/blob/master/LICENSE.md */
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/he",[],function(){return{errorLoading:function(){return"התוצאות לא נטענו בהלכה"},inputTooLong:function(e){var t=e.input.length-e.maximum,n="נא למחוק "+t+" תווים";return t!=1&&(n+="s"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="נא להכניס "+t+" תווים או יותר";return n},loadingMore:function(){return"טען תוצאות נוספות…"},maximumSelected:function(e){var t="באפשרותך לבחור רק "+e.maximum+" פריטים";return e.maximum!=1&&(t+="s"),t},noResults:function(){return"לא נמצאו תוצאות"},searching:function(){return"מחפש…"}}}),{define:e.define,require:e.require}})();

View file

@ -1,3 +0,0 @@
/*! Select2 4.0.0 | https://github.com/select2/select2/blob/master/LICENSE.md */
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/hi",[],function(){return{errorLoading:function(){return"परिणामों को लोड नहीं किया जा सका।"},inputTooLong:function(e){var t=e.input.length-e.maximum,n=t+" अक्षर को हटा दें";return t>1&&(n=t+" अक्षरों को हटा दें "),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="कृपया "+t+" या अधिक अक्षर दर्ज करें";return n},loadingMore:function(){return"अधिक परिणाम लोड हो रहे है..."},maximumSelected:function(e){var t="आप केवल "+e.maximum+" आइटम का चयन कर सकते हैं";return t},noResults:function(){return"कोई परिणाम नहीं मिला"},searching:function(){return"खोज रहा है..."}}}),{define:e.define,require:e.require}})();

View file

@ -1,3 +0,0 @@
/*! Select2 4.0.0 | https://github.com/select2/select2/blob/master/LICENSE.md */
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/hr",[],function(){function e(e){var t=" "+e+" znak";return e%10<5&&e%10>0&&(e%100<5||e%100>19)?e%10>1&&(t+="a"):t+="ova",t}return{inputTooLong:function(t){var n=t.input.length-t.maximum;return"Unesite "+e(n)},inputTooShort:function(t){var n=t.minimum-t.input.length;return"Unesite još "+e(n)},loadingMore:function(){return"Učitavanje rezultata…"},maximumSelected:function(e){return"Maksimalan broj odabranih stavki je "+e.maximum},noResults:function(){return"Nema rezultata"},searching:function(){return"Pretraga…"}}}),{define:e.define,require:e.require}})();

View file

@ -1,3 +0,0 @@
/*! Select2 4.0.0 | https://github.com/select2/select2/blob/master/LICENSE.md */
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/hu",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum;return"Túl hosszú. "+t+" karakterrel több, mint kellene."},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Túl rövid. Még "+t+" karakter hiányzik."},loadingMore:function(){return"Töltés…"},maximumSelected:function(e){return"Csak "+e.maximum+" elemet lehet kiválasztani."},noResults:function(){return"Nincs találat."},searching:function(){return"Keresés…"}}}),{define:e.define,require:e.require}})();

View file

@ -1,3 +0,0 @@
/*! Select2 4.0.0 | https://github.com/select2/select2/blob/master/LICENSE.md */
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/id",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum;return"Hapuskan "+t+" huruf"},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Masukkan "+t+" huruf lagi"},loadingMore:function(){return"Mengambil data…"},maximumSelected:function(e){return"Anda hanya dapat memilih "+e.maximum+" pilihan"},noResults:function(){return"Tidak ada data yang sesuai"},searching:function(){return"Mencari…"}}}),{define:e.define,require:e.require}})();

View file

@ -1,3 +0,0 @@
/*! Select2 4.0.0 | https://github.com/select2/select2/blob/master/LICENSE.md */
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/is",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Vinsamlegast styttið texta um "+t+" staf";return t<=1?n:n+"i"},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Vinsamlegast skrifið "+t+" staf";return t>1&&(n+="i"),n+=" í viðbót",n},loadingMore:function(){return"Sæki fleiri niðurstöður…"},maximumSelected:function(e){return"Þú getur aðeins valið "+e.maximum+" atriði"},noResults:function(){return"Ekkert fannst"},searching:function(){return"Leita…"}}}),{define:e.define,require:e.require}})();

View file

@ -1,3 +0,0 @@
/*! Select2 4.0.0 | https://github.com/select2/select2/blob/master/LICENSE.md */
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/it",[],function(){return{errorLoading:function(){return"I risultati non possono essere caricati."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Per favore cancella "+t+" caratter";return t!==1?n+="i":n+="e",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Per favore inserisci "+t+" o più caratteri";return n},loadingMore:function(){return"Caricando più risultati…"},maximumSelected:function(e){var t="Puoi selezionare solo "+e.maximum+" element";return e.maximum!==1?t+="i":t+="o",t},noResults:function(){return"Nessun risultato trovato"},searching:function(){return"Sto cercando…"}}}),{define:e.define,require:e.require}})();

View file

@ -1,3 +0,0 @@
/*! Select2 4.0.0 | https://github.com/select2/select2/blob/master/LICENSE.md */
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ko",[],function(){return{errorLoading:function(){return"결과를 불러올 수 없습니다."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="너무 깁니다. "+t+" 글자 지워주세요.";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="너무 짧습니다. "+t+" 글자 더 입력해주세요.";return n},loadingMore:function(){return"불러오는 중…"},maximumSelected:function(e){var t="최대 "+e.maximum+"개까지만 선택 가능합니다.";return t},noResults:function(){return"결과가 없습니다."},searching:function(){return"검색 중…"}}}),{define:e.define,require:e.require}})();

View file

@ -1,3 +0,0 @@
/*! Select2 4.0.0 | https://github.com/select2/select2/blob/master/LICENSE.md */
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/lt",[],function(){function e(e,t,n,r){return e%100>9&&e%100<21||e%10===0?e%10>1?n:r:t}return{inputTooLong:function(t){var n=t.input.length-t.maximum,r="Pašalinkite "+n+" simbol";return r+=e(n,"ių","ius","į"),r},inputTooShort:function(t){var n=t.minimum-t.input.length,r="Įrašykite dar "+n+" simbol";return r+=e(n,"ių","ius","į"),r},loadingMore:function(){return"Kraunama daugiau rezultatų…"},maximumSelected:function(t){var n="Jūs galite pasirinkti tik "+t.maximum+" element";return n+=e(t.maximum,"ų","us","ą"),n},noResults:function(){return"Atitikmenų nerasta"},searching:function(){return"Ieškoma…"}}}),{define:e.define,require:e.require}})();

View file

@ -1,3 +0,0 @@
/*! Select2 4.0.0 | https://github.com/select2/select2/blob/master/LICENSE.md */
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/lv",[],function(){function e(e,t,n,r){return e===11?t:e%10===1?n:r}return{inputTooLong:function(t){var n=t.input.length-t.maximum,r="Lūdzu ievadiet par "+n;return r+=" simbol"+e(n,"iem","u","iem"),r+" mazāk"},inputTooShort:function(t){var n=t.minimum-t.input.length,r="Lūdzu ievadiet vēl "+n;return r+=" simbol"+e(n,"us","u","us"),r},loadingMore:function(){return"Datu ielāde…"},maximumSelected:function(t){var n="Jūs varat izvēlēties ne vairāk kā "+t.maximum;return n+=" element"+e(t.maximum,"us","u","us"),n},noResults:function(){return"Sakritību nav"},searching:function(){return"Meklēšana…"}}}),{define:e.define,require:e.require}})();

View file

@ -1,3 +0,0 @@
/*! Select2 4.0.0 | https://github.com/select2/select2/blob/master/LICENSE.md */
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/mk",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Ве молиме внесете "+e.maximum+" помалку карактер";return e.maximum!==1&&(n+="и"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Ве молиме внесете уште "+e.maximum+" карактер";return e.maximum!==1&&(n+="и"),n},loadingMore:function(){return"Вчитување резултати…"},maximumSelected:function(e){var t="Можете да изберете само "+e.maximum+" ставк";return e.maximum===1?t+="а":t+="и",t},noResults:function(){return"Нема пронајдено совпаѓања"},searching:function(){return"Пребарување…"}}}),{define:e.define,require:e.require}})();

View file

@ -1,3 +0,0 @@
/*! Select2 4.0.0 | https://github.com/select2/select2/blob/master/LICENSE.md */
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/nb",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum;return"Vennligst fjern "+t+" tegn"},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Vennligst skriv inn ";return t>1?n+=" flere tegn":n+=" tegn til",n},loadingMore:function(){return"Laster flere resultater…"},maximumSelected:function(e){return"Du kan velge maks "+e.maximum+" elementer"},noResults:function(){return"Ingen treff"},searching:function(){return"Søker…"}}}),{define:e.define,require:e.require}})();

View file

@ -1,3 +0,0 @@
/*! Select2 4.0.0 | https://github.com/select2/select2/blob/master/LICENSE.md */
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/nl",[],function(){return{errorLoading:function(){return"De resultaten konden niet worden geladen."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Gelieve "+t+" karakters te verwijderen";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Gelieve "+t+" of meer karakters in te voeren";return n},loadingMore:function(){return"Meer resultaten laden…"},maximumSelected:function(e){var t="Er kunnen maar "+e.maximum+" item";return e.maximum!=1&&(t+="s"),t+=" worden geselecteerd",t},noResults:function(){return"Geen resultaten gevonden…"},searching:function(){return"Zoeken…"}}}),{define:e.define,require:e.require}})();

View file

@ -1,3 +0,0 @@
/*! Select2 4.0.0 | https://github.com/select2/select2/blob/master/LICENSE.md */
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/pl",[],function(){var e=["znak","znaki","znaków"],t=["element","elementy","elementów"],n=function(t,n){if(t===1)return n[0];if(t>1&&t<=4)return n[1];if(t>=5)return n[2]};return{errorLoading:function(){return"Nie można załadować wyników."},inputTooLong:function(t){var r=t.input.length-t.maximum;return"Usuń "+r+" "+n(r,e)},inputTooShort:function(t){var r=t.minimum-t.input.length;return"Podaj przynajmniej "+r+" "+n(r,e)},loadingMore:function(){return"Trwa ładowanie…"},maximumSelected:function(e){return"Możesz zaznaczyć tylko "+e.maximum+" "+n(e.maxiumum,t)},noResults:function(){return"Brak wyników"},searching:function(){return"Trwa wyszukiwanie…"}}}),{define:e.define,require:e.require}})();

View file

@ -1,3 +0,0 @@
/*! Select2 4.0.0 | https://github.com/select2/select2/blob/master/LICENSE.md */
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/pt-BR",[],function(){return{errorLoading:function(){return"Os resultados não puderam ser carregados."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Apague "+t+" caracter";return t!=1&&(n+="es"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Digite "+t+" ou mais caracteres";return n},loadingMore:function(){return"Carregando mais resultados…"},maximumSelected:function(e){var t="Você só pode selecionar "+e.maximum+" ite";return e.maximum==1?t+="m":t+="ns",t},noResults:function(){return"Nenhum resultado encontrado"},searching:function(){return"Buscando…"}}}),{define:e.define,require:e.require}})();

View file

@ -1,3 +0,0 @@
/*! Select2 4.0.0 | https://github.com/select2/select2/blob/master/LICENSE.md */
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/pt",[],function(){return{errorLoading:function(){return"Os resultados não puderam ser carregados."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Por favor apague "+t+" ";return n+=t!=1?"caracteres":"carácter",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Introduza "+t+" ou mais caracteres";return n},loadingMore:function(){return"A carregar mais resultados…"},maximumSelected:function(e){var t="Apenas pode seleccionar "+e.maximum+" ";return t+=e.maximum!=1?"itens":"item",t},noResults:function(){return"Sem resultados"},searching:function(){return"A procurar…"}}}),{define:e.define,require:e.require}})();

View file

@ -1,3 +0,0 @@
/*! Select2 4.0.0 | https://github.com/select2/select2/blob/master/LICENSE.md */
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ro",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Vă rugăm să introduceți mai puțin de "+t;return n+=" caracter",n!==1&&(n+="e"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Vă rugăm să introduceți incă "+t;return n+=" caracter",n!==1&&(n+="e"),n},loadingMore:function(){return"Se încarcă…"},maximumSelected:function(e){var t="Aveți voie să selectați cel mult "+e.maximum;return t+=" element",t!==1&&(t+="e"),t},noResults:function(){return"Nu a fost găsit nimic"},searching:function(){return"Căutare…"}}}),{define:e.define,require:e.require}})();

View file

@ -1,3 +0,0 @@
/*! Select2 4.0.0 | https://github.com/select2/select2/blob/master/LICENSE.md */
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ru",[],function(){function e(e,t,n,r){return e%10<5&&e%10>0&&e%100<5||e%100>20?e%10>1?n:t:r}return{errorLoading:function(){return"Невозможно загрузить результаты"},inputTooLong:function(t){var n=t.input.length-t.maximum,r="Пожалуйста, введите на "+n+" символ";return r+=e(n,"","a","ов"),r+=" меньше",r},inputTooShort:function(t){var n=t.minimum-t.input.length,r="Пожалуйста, введите еще хотя бы "+n+" символ";return r+=e(n,"","a","ов"),r},loadingMore:function(){return"Загрузка данных…"},maximumSelected:function(t){var n="Вы можете выбрать не более "+t.maximum+" элемент";return n+=e(t.maximum,"","a","ов"),n},noResults:function(){return"Совпадений не найдено"},searching:function(){return"Поиск…"}}}),{define:e.define,require:e.require}})();

View file

@ -1,3 +0,0 @@
/*! Select2 4.0.0 | https://github.com/select2/select2/blob/master/LICENSE.md */
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/sk",[],function(){var e={2:function(e){return e?"dva":"dve"},3:function(){return"tri"},4:function(){return"štyri"}};return{inputTooLong:function(t){var n=t.input.length-t.maximum;return n==1?"Prosím, zadajte o jeden znak menej":n>=2&&n<=4?"Prosím, zadajte o "+e[n](!0)+" znaky menej":"Prosím, zadajte o "+n+" znakov menej"},inputTooShort:function(t){var n=t.minimum-t.input.length;return n==1?"Prosím, zadajte ešte jeden znak":n<=4?"Prosím, zadajte ešte ďalšie "+e[n](!0)+" znaky":"Prosím, zadajte ešte ďalších "+n+" znakov"},loadingMore:function(){return"Loading more results…"},maximumSelected:function(t){return t.maximum==1?"Môžete zvoliť len jednu položku":t.maximum>=2&&t.maximum<=4?"Môžete zvoliť najviac "+e[t.maximum](!1)+" položky":"Môžete zvoliť najviac "+t.maximum+" položiek"},noResults:function(){return"Nenašli sa žiadne položky"},searching:function(){return"Vyhľadávanie…"}}}),{define:e.define,require:e.require}})();

View file

@ -1,3 +0,0 @@
/*! Select2 4.0.0 | https://github.com/select2/select2/blob/master/LICENSE.md */
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/sr",[],function(){function e(e,t,n,r){return e%10==1&&e%100!=11?t:e%10>=2&&e%10<=4&&(e%100<12||e%100>14)?n:r}return{inputTooLong:function(t){var n=t.input.length-t.maximum,r="Obrišite "+n+" simbol";return r+=e(n,"","a","a"),r},inputTooShort:function(t){var n=t.minimum-t.input.length,r="Ukucajte bar još "+n+" simbol";return r+=e(n,"","a","a"),r},loadingMore:function(){return"Preuzimanje još rezultata…"},maximumSelected:function(t){var n="Možete izabrati samo "+t.maximum+" stavk";return n+=e(t.maximum,"u","e","i"),n},noResults:function(){return"Ništa nije pronađeno"},searching:function(){return"Pretraga…"}}}),{define:e.define,require:e.require}})();

View file

@ -1,3 +0,0 @@
/*! Select2 4.0.0 | https://github.com/select2/select2/blob/master/LICENSE.md */
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/sv",[],function(){return{errorLoading:function(){return"Resultat kunde inte laddas."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Vänligen sudda ut "+t+" tecken";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Vänligen skriv in "+t+" eller fler tecken";return n},loadingMore:function(){return"Laddar fler resultat…"},maximumSelected:function(e){var t="Du kan max välja "+e.maximum+" element";return t},noResults:function(){return"Inga träffar"},searching:function(){return"Söker…"}}}),{define:e.define,require:e.require}})();

View file

@ -1,3 +0,0 @@
/*! Select2 4.0.0 | https://github.com/select2/select2/blob/master/LICENSE.md */
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/th",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="โปรดลบออก "+t+" ตัวอักษร";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="โปรดพิมพ์เพิ่มอีก "+t+" ตัวอักษร";return n},loadingMore:function(){return"กำลังค้นข้อมูลเพิ่ม…"},maximumSelected:function(e){var t="คุณสามารถเลือกได้ไม่เกิน "+e.maximum+" รายการ";return t},noResults:function(){return"ม่พบข้อมูล"},searching:function(){return"กำลังค้นข้อมูล…"}}}),{define:e.define,require:e.require}})();

View file

@ -1,3 +0,0 @@
/*! Select2 4.0.0 | https://github.com/select2/select2/blob/master/LICENSE.md */
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/tr",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n=t+" karakter daha girmelisiniz";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="En az "+t+" karakter daha girmelisiniz";return n},loadingMore:function(){return"Daha fazla…"},maximumSelected:function(e){var t="Sadece "+e.maximum+" seçim yapabilirsiniz";return t},noResults:function(){return"Sonuç bulunamadı"},searching:function(){return"Aranıyor…"}}}),{define:e.define,require:e.require}})();

View file

@ -1,3 +0,0 @@
/*! Select2 4.0.0 | https://github.com/select2/select2/blob/master/LICENSE.md */
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/uk",[],function(){function e(e,t,n,r){return e%100>10&&e%100<15?r:e%10===1?t:e%10>1&&e%10<5?n:r}return{errorLoading:function(){return"Неможливо завантажити результати"},inputTooLong:function(t){var n=t.input.length-t.maximum;return"Будь ласка, видаліть "+n+" "+e(t.maximum,"літеру","літери","літер")},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Будь ласка, введіть "+t+" або більше літер"},loadingMore:function(){return"Завантаження інших результатів…"},maximumSelected:function(t){return"Ви можете вибрати лише "+t.maximum+" "+e(t.maximum,"пункт","пункти","пунктів")},noResults:function(){return"Нічого не знайдено"},searching:function(){return"Пошук…"}}}),{define:e.define,require:e.require}})();

View file

@ -1,3 +0,0 @@
/*! Select2 4.0.0 | https://github.com/select2/select2/blob/master/LICENSE.md */
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/vi",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Vui lòng nhập ít hơn "+t+" ký tự";return t!=1&&(n+="s"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Vui lòng nhập nhiều hơn "+t+' ký tự"';return n},loadingMore:function(){return"Đang lấy thêm kết quả…"},maximumSelected:function(e){var t="Chỉ có thể chọn được "+e.maximum+" lựa chọn";return t},noResults:function(){return"Không tìm thấy kết quả"},searching:function(){return"Đang tìm…"}}}),{define:e.define,require:e.require}})();

View file

@ -1,3 +0,0 @@
/*! Select2 4.0.0 | https://github.com/select2/select2/blob/master/LICENSE.md */
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/zh-CN",[],function(){return{errorLoading:function(){return"无法载入结果。"},inputTooLong:function(e){var t=e.input.length-e.maximum,n="请删除"+t+"个字符";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="请再输入至少"+t+"个字符";return n},loadingMore:function(){return"载入更多结果…"},maximumSelected:function(e){var t="最多只能选择"+e.maximum+"个项目";return t},noResults:function(){return"未找到结果"},searching:function(){return"搜索中…"}}}),{define:e.define,require:e.require}})();

View file

@ -1,3 +0,0 @@
/*! Select2 4.0.0 | https://github.com/select2/select2/blob/master/LICENSE.md */
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/zh-TW",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="請刪掉"+t+"個字元";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="請再輸入"+t+"個字元";return n},loadingMore:function(){return"載入中…"},maximumSelected:function(e){var t="你只能選擇最多"+e.maximum+"項";return t},noResults:function(){return"沒有找到相符的項目"},searching:function(){return"搜尋中…"}}}),{define:e.define,require:e.require}})();

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

View file

@ -1,418 +0,0 @@
<?php
/**
* class-revisr-activity-table.php
*
* Displays the custom WP_List_Table on the Revisr Dashboard.
*
* @package Revisr
* @license GPLv3
* @link https://revisr.io
* @copyright Expanded Fronts, LLC
*/
// Prevent direct access.
if ( ! defined( 'ABSPATH' ) ) exit;
// Include WP_List_Table if it isn't already loaded.
if ( ! class_exists( 'WP_List_Table' ) ) {
require_once( ABSPATH . '/wp-admin/includes/class-wp-list-table.php' );
}
class Revisr_Activity_Table extends WP_List_Table {
/**
* Initiate the class and add necessary action hooks.
* @access public
*/
public function __construct(){
// Prevent PHP notices from breaking AJAX.
if ( defined( 'DOING_AJAX' ) && DOING_AJAX ) {
error_reporting( ~E_NOTICE & ~E_STRICT );
}
// Load the parent class on the appropriate hook.
add_action( 'load-toplevel_page_revisr', array( $this, 'load' ) );
add_action( 'wp_ajax_revisr_get_custom_list', array( $this, 'ajax_callback' ) );
add_filter( 'set-screen-option', array( $this, 'set_screen_option' ), 10, 3 );
}
/**
* Construct the parent class.
* @access public
*/
public function load() {
global $status, $page;
parent::__construct( array(
'singular' => 'activity',
'plural' => 'activity',
'ajax' => true
) );
add_screen_option(
'per_page',
array(
'default' => 15,
'label' => __( 'Events per page', 'revisr' ),
'option' => 'edit_revisr_events_per_page',
)
);
set_screen_options();
}
/**
* Loads additional filters into the table.
* @access public
* @return string
*/
public function extra_tablenav( $which ) {
if ( 'top' === $which ) {
$filter_event = isset( $_REQUEST['revisr_event'] ) ? $_REQUEST['revisr_event'] : 'all';
$filter_user = isset( $_REQUEST['revisr_user'] ) ? $_REQUEST['revisr_user'] : 'all';
$filter_time = isset( $_REQUEST['revisr_time'] ) ? $_REQUEST['revisr_time'] : 'all';
?>
<select id="revisr-events-select" name="revisr_event">
<option value="all"><?php _e( 'All Events', 'revisr' ); ?></option>
<option value="branch" <?php selected( 'branch', $filter_event ); ?>><?php _e( 'Branches', 'revisr' ); ?></option>
<option value="commit" <?php selected( 'commit', $filter_event ); ?>><?php _e( 'Commits', 'revisr' ); ?></option>
<option value="backup" <?php selected( 'backup', $filter_event ); ?>><?php _e( 'Database Backups', 'revisr' ); ?></option>
<option value="imports" <?php selected( 'import', $filter_event ); ?>><?php _e( 'Database Imports', 'revisr' ); ?></option>
<option value="discard" <?php selected( 'discard', $filter_event ); ?>><?php _e( 'File Discards', 'revisr' ); ?></option>
<option value="push" <?php selected( 'push', $filter_event ); ?>><?php _e( 'Pushes', 'revisr' ); ?></option>
<option value="pull" <?php selected( 'pull', $filter_event ); ?>><?php _e( 'Pulls', 'revisr' ); ?></option>
</select>
<select id="revisr-author-select" name="revisr_user">
<option value="all"><?php _e( 'All Users', 'revisr' ); ?></option>
<?php
global $wpdb;
$table = Revisr::get_table_name();
$users = $wpdb->get_results( "SELECT DISTINCT user FROM $table ORDER BY user ASC", ARRAY_A );
foreach ( $users as $user ) {
if ( $user['user'] != null ) {
printf( '<option value="%s" %s>%s</option>', esc_attr( $user['user'] ), selected( $user['user'], $filter_user, false ), esc_attr( $user['user'] ) );
}
}
?>
</select>
<select id="revisr-time-select" name="revisr_time">
<option value="all"><?php _e( 'All Time', 'revisr' ); ?></option>
<option value="halfday" <?php selected( 'halfday', $filter_time ); ?>><?php _e( 'Last 12 Hours', 'revisr' ); ?></option>
<option value="day" <?php selected( 'day', $filter_time ); ?>><?php _e( 'Last 24 Hours', 'revisr' ); ?></option>
<option value="week" <?php selected( 'week', $filter_time ); ?>><?php _e( 'Last Week', 'revisr' ); ?></option>
<option value="month" <?php selected( 'month', $filter_time ); ?>><?php _e( 'Last Month', 'revisr' ); ?></option>
</select>
<input type="submit" id="revisr-filter-submit" class="button" value="<?php _e( 'Filter', 'revisr' ); ?>" />
<?php
if ( $filter_event != 'all' || $filter_time != 'all' || $filter_user != 'all' ) {
echo sprintf( '<a href="%s" id="reset"><span class="dashicons dashicons-dismiss" style="font-size:13px; text-decoration: none; margin-top: 7px;"></span><span class="record-query-reset-text">%s</span></a>', get_admin_url() . 'admin.php?page=revisr', __( 'Reset', 'revisr' ) );
}
}
}
/**
* Sets the screen options for the Revisr dashboard.
* @access public
* @param boolean $status This seems to be false
* @param string $option The name of the option
* @param int $value The number of events to display
* @return int|boolean
*/
public function set_screen_option( $status, $option, $value ) {
if ( 'edit_revisr_events_per_page' === $option ) {
return $value;
}
return $status;
}
/**
* Renders the default data for a column.
* @access public
* @param array $item A singular item (one full row's worth of data)
* @param array $column_name The name/slug of the column to be processed
* @return string
*/
public function column_default( $item, $column_name ) {
switch( $column_name ) {
case 'message':
return wp_kses_post( ucfirst( $item[$column_name] ) );
case 'time':
$current = strtotime( current_time( 'mysql' ) );
$timestamp = strtotime( $item[$column_name] );
return sprintf( __( '%s ago', 'revisr' ), human_time_diff( $timestamp, $current ) );
case 'user':
$url = esc_url( add_query_arg( array( 'revisr_user' => urlencode( $item[$column_name] ) ), $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] ) );
return sprintf( '<a href="%s">%s</a>', $url, esc_html( $item[$column_name] ) );
default:
return print_r( $item, true );
}
}
/**
* Returns an array of the column names.
* @access public
* @return array
*/
public function get_columns() {
$columns = array(
'message' => __( 'Event', 'revisr' ),
'user' => __( 'User', 'revisr' ),
'time' => __( 'Time', 'revisr' )
);
return $columns;
}
/**
* Returns an array of filters for the list table.
* @access public
* @return array
*/
public function get_filters() {
$filters = array();
$filters['revisr_event'] = 'event';
$filters['revisr_user'] = 'user';
$filters['revisr_time'] = 'time';
return apply_filters( 'revisr_list_table_filters', $filters );
}
/**
* Returns an array of columns that are sortable.
* @access public
* @return array
*/
public function get_sortable_columns() {
$sortable_columns = array(
'message' => array( 'message', false ),
'user' => array( 'user', false ),
'time' => array( 'time', false )
);
return $sortable_columns;
}
/**
* Creates a where query based on our custom filters.
* @access public
*/
public function create_where() {
$where = array();
foreach ( $this->get_filters() as $filter => $col ) {
if ( isset( $_REQUEST[$filter] ) && $_REQUEST[$filter] != 'all' ) {
if ( 'revisr_time' === $filter ) {
$value = $_REQUEST[$filter];
$time = '';
switch( $value ) {
case 'halfday':
$time = DAY_IN_SECONDS / 2;
break;
case 'day':
$time = DAY_IN_SECONDS;
break;
case 'week':
$time = DAY_IN_SECONDS * 7;
break;
case 'month':
$time = DAY_IN_SECONDS * 28;
break;
}
if ( $time !== '' ) {
$time = esc_sql( date( 'Y-m-d H:i:s', time() - $time ) );
$where[] = "$col > '$time'";
}
} else {
$value = esc_sql( $_REQUEST[$filter] );
$where[] = "$col = '$value'";
}
}
}
// Build out the WHERE queries.
$where = empty( $where ) ? '' : 'WHERE ' . implode( ' AND ', $where );
// Return the WHERE queries.
return $where;
}
/**
* Prepares the data for display.
* @access public
*/
public function prepare_items() {
global $wpdb;
$table = Revisr::get_table_name();
// Number of items per page.
$per_page = $this->get_items_per_page( 'edit_revisr_events_per_page', 15 );
// Set up the custom columns.
$columns = $this->get_columns();
$hidden = array();
$sortable = $this->get_sortable_columns();
// Builds the list of column headers.
$this->_column_headers = array( $columns, $hidden, $sortable );
// Run any custom filters.
$where = $this->create_where();
// Get the data to populate into the table.
$data = $wpdb->get_results( "SELECT message, time, user FROM $table $where", ARRAY_A );
// Handle sorting of the data.
function usort_reorder($a,$b){
// Default to time for default sort.
$orderby = isset( $_REQUEST['orderby'] ) ? $_REQUEST['orderby'] : 'time';
// Default to descending for default sort order.
$order = isset( $_REQUEST['order'] ) ? $_REQUEST['order'] : 'desc';
// Determine the sort order and send to usort.
$result = strcmp( $a[$orderby], $b[$orderby] );
return ( $order === 'asc' ) ? $result : -$result;
}
usort( $data, 'usort_reorder' );
// Pagination.
$current_page = $this->get_pagenum();
$total_items = count($data);
$data = array_slice($data,(($current_page-1)*$per_page),$per_page);
$this->items = $data;
$this->set_pagination_args( array(
'total_items' => $total_items,
'per_page' => $per_page,
'total_pages' => ceil($total_items/$per_page),
'orderby' => isset( $_REQUEST['orderby'] ) ? $_REQUEST['orderby'] : 'time',
'order' => isset( $_REQUEST['order'] ) ? $_REQUEST['order'] : 'desc'
) );
}
/**
* Displays the table.
* @access public
*/
public function display() {
wp_nonce_field( 'revisr-list-nonce', 'revisr_list_nonce', false );
$filter_event = esc_attr( isset( $_REQUEST['revisr_event'] ) ? $_REQUEST['revisr_event'] : 'all' );
$filter_user = esc_attr( isset( $_REQUEST['revisr_user'] ) ? $_REQUEST['revisr_user'] : 'all' );
$filter_time = esc_attr( isset( $_REQUEST['revisr_time'] ) ? $_REQUEST['revisr_time'] : 'all' );
echo '<input type="hidden" name="revisr_event" value="' . $filter_event . '" />';
echo '<input type="hidden" name="revisr_user" value="' . $filter_user . '" />';
echo '<input type="hidden" name="revisr_time" value="' . $filter_time . '" />';
echo '<input type="hidden" id="order" name="order" value="' . $this->_pagination_args['order'] . '" />';
echo '<input type="hidden" id="orderby" name="orderby" value="' . $this->_pagination_args['orderby'] . '" />';
parent::display();
}
/**
* Renders the top or bottom tablenav.
* @access public
* @param string $which Which tablenav to display (top or bottom)
*/
public function display_tablenav( $which ) {
?>
<div class="tablenav <?php echo esc_attr( $which ); ?>">
<div class="alignleft actions">
<?php $this->bulk_actions(); ?>
</div>
<?php
$this->extra_tablenav( $which );
$this->pagination( $which );
?>
<br class="clear" />
</div>
<?php
}
/**
* Handles the AJAX response.
* @access public
*/
public function ajax_response() {
check_ajax_referer( 'revisr-list-nonce', 'revisr_list_nonce' );
$this->prepare_items();
extract( $this->_args );
extract( $this->_pagination_args, EXTR_SKIP );
ob_start();
if ( ! empty( $_REQUEST['no_placeholder'] ) ) {
$this->display_rows();
} else {
$this->display_rows_or_placeholder();
}
$rows = ob_get_clean();
ob_start();
$this->print_column_headers();
$headers = ob_get_clean();
ob_start();
$this->pagination('top');
$pagination_top = ob_get_clean();
ob_start();
$this->pagination('bottom');
$pagination_bottom = ob_get_clean();
$response = array( 'rows' => $rows );
$response['pagination']['top'] = $pagination_top;
$response['pagination']['bottom'] = $pagination_bottom;
$response['column_headers'] = $headers;
if ( isset( $total_items ) ) {
$response['total_items_i18n'] = sprintf( _n( '1 item', '%s items', $total_items ), number_format_i18n( $total_items ) );
}
if ( isset( $total_pages ) ) {
$response['total_pages'] = $total_pages;
$response['total_pages_i18n'] = number_format_i18n( $total_pages );
}
die( json_encode( $response ) );
}
/**
* The callback for the AJAX response.
* @access public
*/
public function ajax_callback() {
$this->load();
$this->ajax_response();
}
/**
* Called when no activity is found.
* @access public
*/
public function no_items() {
_e( 'Your recent activity will show up here.', 'revisr' );
}
}

View file

@ -1,296 +0,0 @@
<?php
/**
* class-revisr-admin-pages.php
*
* Creates and loads admin pages and scripts.
*
* @package Revisr
* @license GPLv3
* @link https://revisr.io
* @copyright Expanded Fronts, LLC
*/
// Prevent direct access.
if ( ! defined( 'ABSPATH' ) ) exit;
class Revisr_Admin_Pages {
/**
* An array of page hooks returned by add_menu_page and add_submenu_page.
* @var array
*/
public $page_hooks = array();
/**
* Registers the menus used by Revisr.
* @access public
*/
public function menus() {
$cap = Revisr::get_capability();
$icon_svg = 'data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAxOC4xLjAsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiDQoJIHZpZXdCb3g9IjI0NS44IDM4MS4xIDgxLjkgODkuNSIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAyNDUuOCAzODEuMSA4MS45IDg5LjUiIHhtbDpzcGFjZT0icHJlc2VydmUiPg0KPHBhdGggZmlsbD0iI2ZmZiIgZD0iTTI5NS4yLDM4Ny4yYy01LjEsNS4xLTUuMSwxMy4zLDAsMTguM2MzLjgsMy44LDkuMyw0LjcsMTMuOSwyLjlsNy4yLTcuMmMxLjgtNC43LDAuOS0xMC4yLTIuOS0xMy45DQoJQzMwOC41LDM4Mi4xLDMwMC4zLDM4Mi4xLDI5NS4yLDM4Ny4yeiBNMzA5LjcsNDAxLjZjLTIuOSwyLjktNy42LDIuOS0xMC42LDBjLTIuOS0yLjktMi45LTcuNiwwLTEwLjZjMi45LTIuOSw3LjYtMi45LDEwLjYsMA0KCUMzMTIuNiwzOTQsMzEyLjYsMzk4LjcsMzA5LjcsNDAxLjZ6Ii8+DQo8cGF0aCBmaWxsPSIjZmZmIiBkPSJNMjY4LjEsNDU0Yy0xMy4yLTEwLjEtMTYuMS0yOS02LjQtNDIuNmM0LTUuNiw5LjQtOS40LDE1LjQtMTEuNGwtMi0xMC4yYy04LjUsMi41LTE2LjIsNy43LTIxLjcsMTUuNQ0KCWMtMTIuOSwxOC4yLTguOSw0My41LDguOCw1N2wtNS42LDguM2wyNS45LTEuMmwtOC42LTIzLjZMMjY4LjEsNDU0eiIvPg0KPHBhdGggZmlsbD0iI2ZmZiIgZD0iTTMxOC4zLDQwMy4zYzEuMS0yLjEsMS43LTQuNSwxLjctN2MwLTguNC02LjgtMTUuMi0xNS4yLTE1LjJzLTE1LjIsNi44LTE1LjIsMTUuMnM2LjgsMTUuMiwxNS4yLDE1LjINCgljMi4xLDAsNC4xLTAuNCw1LjktMS4yYzguNCwxMC42LDkuMiwyNS44LDEsMzcuMmMtMy45LDUuNi05LjQsOS40LTE1LjQsMTEuNGwyLDEwLjJjOC41LTIuNSwxNi4yLTcuNywyMS43LTE1LjUNCglDMzMxLjIsNDM4LjEsMzI5LjksNDE3LjQsMzE4LjMsNDAzLjN6IE0zMDQuOCw0MDMuM2MtMy44LDAtNi45LTMuMS02LjktNi45czMuMS02LjksNi45LTYuOXM2LjksMy4xLDYuOSw2LjkNCglTMzA4LjcsNDAzLjMsMzA0LjgsNDAzLjN6Ii8+DQo8L3N2Zz4=';
if ( ! Revisr_Admin::is_doing_setup() ) {
$this->page_hooks['menu'] = add_menu_page( __( 'Dashboard', 'revisr' ), __( 'Revisr', 'revisr' ), $cap, 'revisr', array( $this, 'include_page' ), $icon_svg );
$this->page_hooks['dashboard'] = add_submenu_page( 'revisr', __( 'Revisr - Dashboard', 'revisr' ), __( 'Dashboard', 'revisr' ), $cap, 'revisr', array( $this, 'include_page' ) );
$this->page_hooks['commits'] = add_submenu_page( 'revisr', __( 'Revisr - Commits', 'revisr' ), __( 'Commits', 'revisr' ), $cap, 'revisr_commits', array( $this, 'include_page' ) );
$this->page_hooks['new_commit'] = add_submenu_page( NULL, __( 'Revisr - New Commit', 'revisr' ), __( 'New Commit', 'revisr' ), $cap, 'revisr_new_commit', array( $this, 'include_page' ) );
$this->page_hooks['view_commit'] = add_submenu_page( NULL, __( 'Revisr - View Commit', 'revisr' ), __( 'View Commit', 'revisr' ), $cap, 'revisr_view_commit', array( $this, 'include_page' ) );
$this->page_hooks['branches'] = add_submenu_page( 'revisr', __( 'Revisr - Branches', 'revisr' ), __( 'Branches', 'revisr' ), $cap, 'revisr_branches', array( $this, 'include_page' ) );
$this->page_hooks['settings'] = add_submenu_page( 'revisr', __( 'Revisr - Settings', 'revisr' ), __( 'Settings', 'revisr' ), $cap, 'revisr_settings', array( $this, 'include_page' ) );
$this->page_hooks['setup'] = add_submenu_page( NULL, __( 'Revisr - Setup', 'revisr' ), 'Revisr', $cap, 'revisr_setup', array( $this, 'include_page' ) );
} else {
$this->page_hooks['setup'] = add_menu_page( __( 'Revisr Setup', 'revisr' ), __( 'Revisr', 'revisr' ), $cap, 'revisr_setup', array( $this, 'include_page' ), $icon_svg );
$this->page_hooks['dashboard'] = add_submenu_page( null, __( 'Revisr - Dashboard', 'revisr' ), __( 'Dashboard', 'revisr' ), $cap, 'revisr', array( $this, 'include_page' ) );
$this->page_hooks['branches'] = add_submenu_page( NULL, __( 'Revisr - Branches', 'revisr' ), __( 'Branches', 'revisr' ), $cap, 'revisr_branches', array( $this, 'include_page' ) );
$this->page_hooks['settings'] = add_submenu_page( NULL, __( 'Revisr - Settings', 'revisr' ), __( 'Settings', 'revisr' ), $cap, 'revisr_settings', array( $this, 'include_page' ) );
}
}
/**
* Registers and enqueues css and javascript files.
* @access public
* @param string $hook The page to enqueue the styles/scripts.
*/
public function scripts( $hook ) {
// Start registering/enqueuing scripts if the hook is in our allowed pages.
if ( in_array( $hook, $this->page_hooks ) ) {
// Registers all CSS and JS files used by Revisr.
wp_register_style( 'revisr_admin_css', REVISR_URL . 'assets/css/revisr-admin.css', array(), REVISR_VERSION );
wp_register_style( 'revisr_octicons_css', REVISR_URL . 'assets/lib/octicons/octicons.css', array(), REVISR_VERSION );
wp_register_style( 'revisr_select2_css', REVISR_URL . 'assets/lib/select2/css/select2.min.css', array(), REVISR_VERSION );
wp_register_script( 'revisr_dashboard', REVISR_URL . 'assets/js/revisr-dashboard.js', 'jquery', REVISR_VERSION, true );
wp_register_script( 'revisr_staging', REVISR_URL . 'assets/js/revisr-staging.js', 'jquery', REVISR_VERSION, false );
wp_register_script( 'revisr_settings', REVISR_URL . 'assets/js/revisr-settings.js', 'jquery', REVISR_VERSION, true );
wp_register_script( 'revisr_setup', REVISR_URL . 'assets/js/revisr-setup.js', 'jquery', REVISR_VERSION, true );
wp_register_script( 'revisr_select2_js', REVISR_URL . 'assets/lib/select2/js/select2.min.js', 'jquery', REVISR_VERSION, true );
// Enqueues styles/scripts that should be loaded on all allowed pages.
wp_enqueue_style( 'revisr_admin_css' );
wp_enqueue_style( 'thickbox' );
wp_enqueue_style( 'revisr_select2_css' );
wp_enqueue_style( 'revisr_octicons_css' );
wp_enqueue_script( 'thickbox' );
wp_enqueue_script( 'revisr_select2_js' );
// Switch through page-dependant styles/scripts.
switch( $hook ) {
// The main dashboard page.
case 'toplevel_page_revisr':
case 'revisr':
wp_enqueue_script( 'revisr_dashboard' );
wp_localize_script( 'revisr_dashboard', 'revisr_dashboard_vars', array(
'ajax_nonce' => wp_create_nonce( 'revisr_dashboard_nonce' ),
'login_prompt' => sprintf( __( 'Session Expired: Please <a href="%s">click here</a> to log in again.', 'revisr' ), wp_login_url( get_admin_url() . 'admin.php?page=revisr' ) )
)
);
break;
// The branches page.
case 'revisr_page_revisr_branches':
break;
// The settings pages.
case 'revisr_page_revisr_settings':
wp_enqueue_script( 'revisr_settings' );
break;
// The setup page.
case 'toplevel_page_revisr_setup':
wp_enqueue_script( 'revisr_setup' );
wp_localize_script( 'revisr_setup', 'revisr_setup_vars', array(
'plugin_or_theme_placeholder' => __( 'Please select...', 'revisr' )
)
);
break;
// The "New Commit" screen and "View Commit" screen.
case 'admin_page_revisr_new_commit':
case 'admin_page_revisr_view_commit':
wp_enqueue_script( 'revisr_staging' );
wp_localize_script( 'revisr_staging', 'staging_vars', array(
'ajax_nonce' => wp_create_nonce( 'staging_nonce' ),
'view_diff' => __( 'View Diff', 'revisr' ),
)
);
break;
}
}
}
/**
* Filters the display order of the menu pages.
* @access public
*/
public function submenu_order( $menu_ord ) {
global $submenu;
$arr = array();
if ( isset( $submenu['revisr'] ) && ! Revisr_Admin::is_doing_setup() ) {
$arr[] = $submenu['revisr'][0];
$arr[] = $submenu['revisr'][1];
$arr[] = $submenu['revisr'][2];
$arr[] = $submenu['revisr'][3];
$submenu['revisr'] = $arr;
}
return $menu_ord;
}
/**
* Filters the parent_file for the new/view commit pages.
* @access public
* @param string $file
* @return string
*/
public function parent_file( $file ) {
global $plugin_page;
if ( 'revisr_new_commit' === $plugin_page || 'revisr_view_commit' === $plugin_page ) {
$plugin_page = 'revisr_commits';
}
return $file;
}
/**
* Includes custom page templates used in the backend.
* @access public
*/
public function include_page() {
$page = filter_input( INPUT_GET, 'page' );
switch ( $page ) {
case 'revisr_branches':
$file = 'branches.php';
break;
case 'revisr_commits':
$file = 'commits.php';
break;
case 'revisr_new_commit':
$file = 'new-commit.php';
break;
case 'revisr_view_commit':
$file = 'view-commit.php';
break;
case 'revisr_settings':
$file = 'settings.php';
break;
case 'revisr_setup':
$file = 'setup.php';
break;
case 'revisr':
default:
$file = 'dashboard.php';
break;
}
require_once ( REVISR_PATH . "templates/pages/$file" );
}
/**
* Includes a form template.
* @access public
*/
public function include_form() {
if ( isset( $_REQUEST['action'] ) && 'revisr_' === substr( $_REQUEST['action'], 0, 7 ) ) {
$file = REVISR_PATH . 'templates/partials/' . str_replace( '_', '-', substr( $_REQUEST['action'], 7 ) ) . '.php';
if ( file_exists( $file ) ) {
include_once( $file );
}
}
}
/**
* Displays the number of files changed in the admin bar.
* @access public
*/
public function admin_bar( $wp_admin_bar ) {
if ( revisr()->git->is_repo ) {
$untracked = revisr()->git->count_untracked();
if ( $untracked != 0 ) {
$text = sprintf( _n( '%d Untracked File', '%d Untracked Files', $untracked, 'revisr' ), $untracked );
$args = array(
'id' => 'revisr',
'title' => $text,
'href' => get_admin_url() . 'admin.php?page=revisr_new_commit',
'meta' => array( 'class' => 'revisr_commits' ),
);
$wp_admin_bar->add_node( $args );
}
$wp_admin_bar->add_menu( array(
'id' => 'revisr-new-commit',
'title' => __( 'Commit', 'revisr' ),
'parent' => 'new-content',
'href' => get_admin_url() . 'admin.php?page=revisr_new_commit',
)
);
}
}
/**
* Displays the "Sponsored by Site5" logo.
* @access public
*/
public function site5_notice() {
$allowed_pages = array(
'revisr',
'revisr_branches',
'revisr_commits',
'revisr_settings',
'revisr_new_commit',
'revisr_view_commit'
);
if ( isset( $_GET['page'] ) && in_array( $_GET['page'], $allowed_pages ) ) {
$output = true;
} else {
$output = false;
}
if ( $output === true ) {
?>
<div id="site5_wrapper">
<?php _e( 'Sponsored by', 'revisr' ); ?>
<a href="http://www.site5.com/" target="_blank"><img id="site5_logo" src="<?php echo REVISR_URL . 'assets/img/site5.png'; ?>" width="80" /></a>
</div>
<?php
}
}
/**
* Displays the link to the settings on the WordPress plugin page.
* @access public
* @param array $links The links assigned to Revisr.
*/
public function settings_link( $links ) {
$settings_link = '<a href="' . get_admin_url() . 'admin.php?page=revisr_settings">' . __( 'Settings', 'revisr' ) . '</a>';
array_unshift( $links, $settings_link );
return $links;
}
}

View file

@ -1,370 +0,0 @@
<?php
/**
* class-revisr-admin.php
*
* Common functions used throughout the Revisr admin.
*
* @package Revisr
* @license GPLv3
* @link https://revisr.io
* @copyright Expanded Fronts, LLC
*/
// Prevent direct access.
if ( ! defined( 'ABSPATH' ) ) exit;
class Revisr_Admin {
/**
* Stores an alert to be rendered on the dashboard.
* @access public
* @param string $message The message to display.
* @param bool $is_error Whether the message is an error.
* @param array $output An array of output to store for viewing error details.
*/
public static function alert( $message, $is_error = false, $output = array() ) {
if ( true === $is_error ) {
if ( is_array( $output ) && ! empty( $output ) ) {
// Store info about the error for later.
set_transient( 'revisr_error_details', $output );
// Provide a link to view the error.
$error_url = wp_nonce_url( admin_url( 'admin-post.php?action=revisr_view_error&TB_iframe=true&width=350&height=300' ), 'revisr_view_error', 'revisr_error_nonce' );
$message .= sprintf( __( '<br>Click <a href="%s" class="thickbox" title="Error Details">here</a> for more details, or try again.', 'revisr' ), $error_url );
}
set_transient( 'revisr_error', $message, 10 );
} else {
set_transient( 'revisr_alert', $message, 3 );
}
}
/**
* Returns the data for the AJAX buttons.
* @access public
*/
public function ajax_button_count() {
if ( $_REQUEST['data'] == 'unpulled' ) {
echo revisr()->git->count_unpulled();
} else {
echo revisr()->git->count_unpushed();
}
exit();
}
/**
* Deletes existing transients.
* @access public
*/
public static function clear_transients( $errors = true ) {
if ( true === $errors ) {
delete_transient( 'revisr_error' );
delete_transient( 'revisr_error_details' );
} else {
delete_transient( 'revisr_alert' );
}
}
/**
* Helper function for determining if we're in setup mode.
* @access public
* @return boolean
*/
public static function is_doing_setup() {
if ( revisr()->git->is_repo ) {
return false;
} else {
if ( defined( 'REVISR_SKIP_SETUP' ) || get_transient( 'revisr_skip_setup' ) ) {
return false;
}
return true;
}
}
/**
* Escapes a shell arguement.
* @access public
* @param string $string The string to escape.
* @return string $string The escaped string.
*/
public static function escapeshellarg( $string ) {
$os = Revisr_Compatibility::get_os();
if ( 'WIN' !== $os['code'] ) {
return escapeshellarg( $string );
} else {
// Windows-friendly workaround.
return '"' . str_replace( "'", "'\\''", $string ) . '"';
}
}
/**
* Logs an event to the database.
* @access public
* @param string $message The message to show in the Recent Activity.
* @param string $event Will be used for filtering later.
* @param string $user An optional user to associate the record with.
*/
public static function log( $message, $event, $user = '' ) {
global $wpdb;
$time = current_time( 'mysql' );
$table = Revisr::get_table_name();
if ( '' === $user ) {
$user = wp_get_current_user();
$username = $user->user_login;
} else {
$username = $user;
}
if ( ! $username || '' === $username ) {
$username = __( 'Revisr Bot', 'revisr' );
}
$wpdb->insert(
"$table",
array(
'time' => $time,
'message' => $message,
'event' => $event,
'user' => $username,
),
array(
'%s',
'%s',
'%s',
'%s',
)
);
}
/**
* Notifies the admin if notifications are enabled.
* @access private
* @param string $subject The subject line of the email.
* @param string $message The message for the email.
*/
public static function notify( $subject, $message ) {
$options = Revisr::get_options();
$url = get_admin_url() . 'admin.php?page=revisr';
if ( isset( $options['notifications'] ) ) {
$email = $options['email'];
$message .= '<br><br>';
$message .= sprintf( __( '<a href="%s">Click here</a> for more details.', 'revisr' ), $url );
$headers = "Content-Type: text/html; charset=ISO-8859-1\r\n";
wp_mail( $email, $subject, $message, $headers );
}
}
/**
* Renders an alert and removes the old data.
* @access public
* @param boolean $errors_only Whether or not to only display errors.
*/
public static function render_alert( $errors_only = false ) {
$alert = get_transient( 'revisr_alert' );
$error = get_transient( 'revisr_error' );
if ( $error ) {
$alert = '<div class="revisr-alert error">' . wpautop( $error ) . '</div>';
} else if ( $alert ) {
$alert = '<div class="revisr-alert updated">' . wpautop( $alert ) . '</div>';
} else {
if ( revisr()->git->count_untracked() == '0' ) {
$msg = sprintf( __( 'There are currently no untracked files on branch %s.', 'revisr' ), revisr()->git->branch );
$alert = '<div class="revisr-alert updated"><p>' . $msg . '</p></div>';
} else {
$link = get_admin_url() . 'admin.php?page=revisr_new_commit';
$msg = sprintf( __( 'There are currently %d untracked files on branch %s. <a href="%s">Commit</a> your changes to save them.', 'revisr' ), revisr()->git->count_untracked(), revisr()->git->branch, $link );
$alert = '<div class="revisr-alert updated"><p>' . $msg . '</p></div>';
}
}
if ( $errors_only && false !== $error ) {
echo $alert;
} else if ( ! $errors_only ) {
echo $alert;
}
if ( defined( 'DOING_AJAX' ) && DOING_AJAX ) {
exit();
}
}
/**
* Updates user settings to be compatible with 1.8.
* @access public
*/
public function do_upgrade() {
global $wpdb;
// For users upgrading from 1.7 and older.
if ( get_option( 'revisr_db_version' ) === '1.0' ) {
// Check for the "auto_push" option and save it to the config.
if ( isset( revisr()->options['auto_push'] ) ) {
revisr()->git->set_config( 'revisr', 'auto-push', 'true' );
}
// Check for the "auto_pull" option and save it to the config.
if ( isset( revisr()->options['auto_pull'] ) ) {
revisr()->git->set_config( 'revisr', 'auto-pull', 'true' );
}
// Check for the "reset_db" option and save it to the config.
if ( isset( revisr()->options['reset_db'] ) ) {
revisr()->git->set_config( 'revisr', 'import-checkouts', 'true' );
}
// Check for the "mysql_path" option and save it to the config.
if ( isset( revisr()->options['mysql_path'] ) ) {
revisr()->git->set_config( 'revisr', 'mysql-path', revisr()->options['mysql_path'] );
}
// Configure the database tracking to use all tables, as this was how it behaved in 1.7.
revisr()->git->set_config( 'revisr', 'db_tracking', 'all_tables' );
}
// Upgrades from the "revisr_commits" custom post type to pure Git.
$table = Revisr::get_table_name();
$commits = $wpdb->get_results( "SELECT * FROM $table WHERE event = 'commit'", ARRAY_A );
if ( is_array( $commits ) && ! empty( $commits ) ) {
foreach ( $commits as $commit ) {
// Get the commit short hash from the message.
$msg_array = explode( '#', $commit['message'] );
$commit_id = substr( $msg_array[1], 0, 7 );
// Prepare the new message.
$new_msg = sprintf(
__( 'Committed <a href="%s">#%s</a> to the local repository.', 'revisr' ),
get_admin_url() . 'admin.php?page=revisr_view_commit&commit=' . $commit_id,
$commit_id
);
// Update the existing message.
$query = $wpdb->prepare(
"UPDATE $table SET message = %s WHERE id = '%d'",
$new_msg,
$commit['id']
);
$wpdb->query( $query );
}
}
// Update the database schema using dbDelta.
Revisr::install();
}
/**
* Helper function for writing to the wp-config.php file,
* taken from WP Super Cache.
*
* @access public
* @return boolean
*/
public static function replace_config_line( $old, $new, $file = '' ) {
if ( $file === '' ) {
if ( file_exists( ABSPATH . 'wp-config.php') ) {
$file = ABSPATH . 'wp-config.php';
} else {
$file = dirname(ABSPATH) . '/wp-config.php';
}
}
if ( @is_file( $file ) == false ) {
return false;
}
if (!is_writeable( $file ) ) {
return false;
}
$found = false;
$lines = file($file);
foreach( (array)$lines as $line ) {
if ( preg_match("/$old/", $line)) {
$found = true;
break;
}
}
if ($found) {
$fd = fopen($file, 'w');
foreach( (array)$lines as $line ) {
if ( !preg_match("/$old/", $line))
fputs($fd, $line);
else {
fputs($fd, "$new // Added by Revisr\n");
}
}
fclose($fd);
return true;
}
$fd = fopen($file, 'w');
$done = false;
foreach( (array)$lines as $line ) {
if ( $done || !preg_match('/^(if\ \(\ \!\ )?define|\$|\?>/', $line) ) {
fputs($fd, $line);
} else {
fputs($fd, "$new // Added by Revisr\n");
fputs($fd, $line);
$done = true;
}
}
fclose($fd);
return true;
}
/**
* Wrapper for wp_verify_nonce.
*
* @access public
*/
public static function verify_nonce( $nonce, $action ) {
if ( ! wp_verify_nonce( $nonce, $action ) ) {
wp_die( __( 'Cheatin&#8217; uh?', 'revisr' ) );
}
}
/**
* Helper function for processing redirects.
*
* @access public
* @param string $url The URL to redirect to.
* @param bool $echo Set to true if the redirect should be done in Javascript.
*/
public static function redirect( $url = '', $echo = false ) {
if ( '' === $url ) {
$url = get_admin_url() . 'admin.php?page=revisr';
}
if ( $echo || isset( $_REQUEST['echo_redirect'] ) ) {
_e( 'Processing...', 'revisr' );
?>
<script>
window.top.location.href = "<?php echo $url; ?>";
</script>
<?php
} else {
wp_safe_redirect( $url );
exit();
}
}
}

View file

@ -1,315 +0,0 @@
<?php
/**
* class-revisr-branch-table.php
*
* Displays the custom WP_List_Table on the Revisr Branches page.
*
* @package Revisr
* @license GPLv3
* @link https://revisr.io
* @copyright Expanded Fronts
*/
// Prevent direct access.
if ( ! defined( 'ABSPATH' ) ) exit;
// Include WP_List_Table if it isn't already loaded.
if ( ! class_exists( 'WP_List_Table' ) ) {
require_once( ABSPATH . '/wp-admin/includes/class-wp-list-table.php' );
}
class Revisr_Branch_Table extends WP_List_Table {
/**
* Constructs the class.
* @access public
*/
public function __construct() {
// Load the parent class on the appropriate hook.
add_action( 'load-revisr_page_revisr_branches', array( $this, 'load' ) );
add_filter( 'set-screen-option', array( $this, 'set_screen_option' ), 10, 3 );
}
/**
* Construct the parent class.
* @access public
*/
public function load() {
global $status, $page;
parent::__construct( array(
'singular' => 'branch',
'plural' => 'branches'
) );
add_screen_option(
'per_page',
array(
'default' => 10,
'label' => __( 'Branches per page', 'revisr' ),
'option' => 'edit_revisr_branches_per_page',
)
);
set_screen_options();
}
/**
* Sets the screen options for the Revisr branches page.
* @access public
* @param boolean $status This seems to be false
* @param string $option The name of the option
* @param int $value The number of events to display
* @return int|boolean
*/
public function set_screen_option( $status, $option, $value ) {
if ( 'edit_revisr_branches_per_page' === $option ) {
return $value;
}
return $status;
}
/**
* Returns an array of the column names.
* @access public
* @return array
*/
public function get_columns() {
$columns = array(
'branch' => __( 'Branch', 'revisr' ),
'updated' => __( 'Last Updated', 'revisr' ),
'actions' => __( 'Actions', 'revisr' ),
);
return $columns;
}
/**
* Returns an array of columns that are sortable.
* @access public
* @return array
*/
public function get_sortable_columns() {
$sortable_columns = array(
'branch' => array( 'branch', false ),
'updated' => array( 'updated', false )
);
return $sortable_columns;
}
/**
* Returns an array containing the branch information.
* @access public
* @return array
*/
public function get_data() {
// Basic filter for viewing remote branches.
if ( isset( $_GET['branches'] ) && $_GET['branches'] === 'remote' ) {
// We may need to clear out the cache for the remote branches.
revisr()->git->run( 'remote', array( 'update', '--prune' ) );
$remote = true;
} else {
$remote = false;
}
// Get the branches.
$branches = revisr()->git->get_branches( $remote );
$branches_array = array();
if ( is_array( $branches ) && ! empty( $branches ) ) {
$count = 0;
foreach ( $branches as $key => $value ) {
$branch = substr( $value, 2 );
$updated = revisr()->git->get_branch_last_updated( $branch );
if ( substr( $value, 0, 1 ) === '*' ) {
$current = true;
$branch_title = sprintf( '<strong>%s %s</strong>', $branch, __( '(current branch)', 'revisr' ) );
} else {
$current = false;
$branch_title = $branch;
}
$branches_array[$count]['branch'] = $branch_title;
$branches_array[$count]['updated'] = $updated;
$branches_array[$count]['actions'] = $this->get_actions( $branch, $remote, $current );
$count++;
}
}
return $branches_array;
}
/**
* Returns possible actions for a given branch.
* @access public
* @return string
*/
public function get_actions( $branch, $remote, $current ) {
$admin_url = get_admin_url();
$checkout_text = __( 'Checkout', 'revisr' );
$merge_text = __( 'Merge', 'revisr' );
$delete_text = __( 'Delete', 'revisr' );
$checkout_title = __( 'Checkout Branch', 'revisr' );
$merge_title = __( 'Merge Branch', 'revisr' );
$delete_title = __( 'Delete Branch', 'revisr' );
$checkout_url = wp_nonce_url( $admin_url . "admin-post.php?action=process_checkout&branch=" . $branch, 'process_checkout', 'revisr_checkout_nonce' );
$merge_url = $admin_url . "admin-post.php?action=revisr_merge_branch_form&branch=" . $branch . "&TB_iframe=true&width=400&height=225";
$delete_url = $admin_url . "admin-post.php?action=revisr_delete_branch_form&branch=" . $branch . "&TB_iframe=true&width=400&height=225";
if ( $current ) {
return sprintf(
'<a class="button disabled branch-btn" onclick="preventDefault()" href="#">%s</a>
<a class="button disabled branch-btn" onclick="preventDefault()" href="#">%s</a>
<a class="button disabled branch-btn" onclick="preventDefault()" href="#">%s</a>',
$checkout_text,
$merge_text,
$delete_text
);
}
if ( ! $remote ) {
return sprintf(
'<a class="button branch-btn" href="%s">%s</a>
<a class="button branch-btn thickbox" href="%s" title="%s">%s</a>
<a class="button branch-btn thickbox" href="%s" title="%s">%s</a>',
$checkout_url,
$checkout_text,
$merge_url,
$merge_title,
$merge_text,
$delete_url,
$delete_title,
$delete_text
);
} else {
$checkout_url = esc_url( $admin_url . 'admin-post.php?action=revisr_checkout_remote_form&branch=' . $branch . '&TB_iframe=true&width=400&height=225' );
$merge_url = esc_url( $admin_url . 'admin-post.php?action=revisr_merge_branch_form&branch=' . $branch . '&TB_iframe=true&width=400&height=225' );
$delete_url = esc_url( $admin_url . 'admin-post.php?action=revisr_delete_branch_form&branch=' . $branch . '&remote=true&TB_iframe=true&width=400&height=225' );
return sprintf(
'<a class="button branch-btn thickbox" href="%s" title="%s">%s</a>
<a class="button branch-btn thickbox" href="%s" title="%s">%s</a>
<a class="button branch-btn thickbox" href="%s" title="%s">%s</a>',
$checkout_url,
$checkout_title,
$checkout_text,
$merge_url,
$merge_title,
$merge_text,
$delete_url,
$delete_title,
$delete_text
);
}
}
/**
* Renders the default data for a column.
* @access public
* @param array $item A singular item (one full row's worth of data)
* @param array $column_name The name/slug of the column to be processed
* @return string
*/
public function column_default( $item, $column_name ) {
return $item[$column_name];
}
/**
* Called when no branches are found.
* @access public
*/
public function no_items() {
_e( 'No branches found.', 'revisr' );
}
/**
* Prepares the data for display.
* @access public
*/
public function prepare_items() {
global $wpdb;
// Number of items per page.
$per_page = $this->get_items_per_page( 'edit_revisr_branches_per_page', 10 );
// Set up the custom columns.
$columns = $this->get_columns();
$hidden = array();
$sortable = $this->get_sortable_columns();
// Builds the list of column headers.
$this->_column_headers = array( $columns, $hidden, $sortable );
// Get the data to populate into the table.
$data = $this->get_data();
// Handle sorting of the data.
function usort_reorder($a,$b){
$orderby = ( ! empty( $_REQUEST['orderby'] ) ) ? $_REQUEST['orderby'] : 'branch'; //If no sort, default to time.
$order = ( ! empty( $_REQUEST['order'] ) ) ? $_REQUEST['order'] : 'desc'; //If no order, default to desc
$result = strcmp($a[$orderby], $b[$orderby]); //Determine sort order
return ( $order==='asc' ) ? $result : -$result; //Send final sort direction to usort
}
usort( $data, 'usort_reorder' );
// Pagination.
$current_page = $this->get_pagenum();
$total_items = count($data);
$data = array_slice($data,(($current_page-1)*$per_page),$per_page);
$this->items = $data;
$this->set_pagination_args( array(
'total_items' => $total_items,
'per_page' => $per_page,
'total_pages' => ceil($total_items/$per_page),
'orderby' => ! empty( $_REQUEST['orderby'] ) && '' != $_REQUEST['orderby'] ? $_REQUEST['orderby'] : 'time',
'order' => ! empty( $_REQUEST['order'] ) && '' != $_REQUEST['order'] ? $_REQUEST['order'] : 'desc'
) );
}
/**
* Displays the table.
* @access public
*/
public function display() {
wp_nonce_field( 'revisr-branches-nonce', 'revisr_branches_nonce' );
echo '<input type="hidden" id="order" name="order" value="' . $this->_pagination_args['order'] . '" />';
echo '<input type="hidden" id="orderby" name="orderby" value="' . $this->_pagination_args['orderby'] . '" />';
parent::display();
}
/**
* Extra table navigation.
* @access public
* @param string $which
* @return string
*/
public function extra_tablenav( $which ) {
if ( 'top' != $which && revisr()->git->has_remote() ) {
if ( isset( $_GET['branches'] ) && $_GET['branches'] == 'remote' ) {
$url = esc_url( add_query_arg( array( 'branches' => 'local' ) ) );
printf( '<a href="%s">%s</a>', $url, __( 'Local Branches', 'revisr' ) );
} else {
$url = esc_url( add_query_arg( array( 'branches' => 'remote' ) ) );
printf( '<a href="%s">%s</a>', $url, __( 'Remote Branches', 'revisr' ) );
}
}
}
}

View file

@ -1,411 +0,0 @@
<?php
/**
* class-revisr-commits-table.php
*
* Displays the custom WP_List_Table on the Revisr Commits page.
*
* @package Revisr
* @license GPLv3
* @link https://revisr.io
* @copyright Expanded Fronts
*/
// Prevent direct access.
if ( ! defined( 'ABSPATH' ) ) exit;
// Include WP_List_Table if it isn't already loaded.
if ( ! class_exists( 'WP_List_Table' ) ) {
require_once( ABSPATH . '/wp-admin/includes/class-wp-list-table.php' );
}
class Revisr_Commits_Table extends WP_List_Table {
/**
* Constructs the class.
* @access public
*/
public function __construct() {
// Load the parent class on the appropriate hook.
add_action( 'load-revisr_page_revisr_commits', array( $this, 'load' ) );
add_filter( 'set-screen-option', array( $this, 'set_screen_option' ), 10, 3 );
}
/**
* Construct the parent class.
* @access public
*/
public function load() {
global $status, $page;
parent::__construct( array(
'singular' => 'commit',
'plural' => 'commits'
) );
add_screen_option(
'per_page',
array(
'default' => 20,
'label' => __( 'Commits per page', 'revisr' ),
'option' => 'edit_revisr_commits_per_page',
)
);
set_screen_options();
}
/**
* Sets the screen options for the Revisr branches page.
* @access public
* @param boolean $status This seems to be false
* @param string $option The name of the option
* @param int $value The number of events to display
* @return int|boolean
*/
public function set_screen_option( $status, $option, $value ) {
if ( 'edit_revisr_commits_per_page' === $option ) {
return $value;
}
return $status;
}
/**
* Returns an array of the column names.
* @access public
* @return array
*/
public function get_columns() {
$columns = array(
'hash' => __( 'ID', 'revisr' ),
'title' => __( 'Commit', 'revisr' ),
'author' => __( 'Author', 'revisr' ),
'date' => __( 'Date', 'revisr' )
);
return $columns;
}
/**
* Returns an array of columns that are sortable.
* @access public
* @return array
*/
public function get_sortable_columns() {
$sortable_columns = array(
'title' => array( 'title', false ),
'date' => array( 'date', false )
);
return $sortable_columns;
}
/**
* Returns an array containing the branch information.
* @access public
* @return array
*/
public function get_data() {
// Determine which branch to check, if any.
$branch = isset( $_GET['branch'] ) ? $_GET['branch'] : revisr()->git->branch;
if ( 'all' === $branch ) {
$branch = '--all';
}
// Build the search string if necessary..
if ( isset( $_GET['s'] ) ) {
$search = '--grep=' . $_GET['s'];
} else {
$search = false;
}
// Get the date to start from.
if ( isset( $_GET['revisr_time'] ) && $_GET['revisr_time'] != 'all' ) {
$now = time();
switch ( $_GET['revisr_time'] ) {
case 'halfday':
$offset = DAY_IN_SECONDS / 2;
break;
case 'day':
$offset = DAY_IN_SECONDS;
break;
case 'week':
$offset = DAY_IN_SECONDS * 7;
break;
case 'month':
default:
$offset = DAY_IN_SECONDS * 28;
break;
}
$date = $now - $offset;
$date = '--since=' . $date;
} else {
$date = false;
}
// Build the arguements to pass to Git.
$args = array(
'log',
$branch,
'--pretty=format:%h|#|%s|#|%an|#|%at',
);
// Add in search field if needed.
if ( false !== $search ) {
$args[] = '-i'; // case-insensitve
$args[] = $search;
}
// Add in date field if needed.
if ( false !== $date ) {
$args[] = $date;
}
// Get the commits.
$commits = revisr()->git->run( '--no-pager', $args );
$commits_array = array();
// Iterate through and pull out the data.
if ( is_array( $commits ) && ! empty( $commits ) ) {
foreach ( $commits as $key => $value ) {
// Get data from Git log.
$commit = explode( '|#|', $value );
$commits_array[$key]['hash'] = $commit[0];
$commits_array[$key]['title'] = $commit[1];
$commits_array[$key]['author'] = $commit[2];
$commits_array[$key]['date'] = $commit[3];
}
}
// Return the array of commits.
return $commits_array;
}
/**
* Renders the default data for a column.
* @access public
* @param array $item A singular item (one full row's worth of data)
* @param array $column_name The name/slug of the column to be processed
* @return string
*/
public function column_default( $item, $column_name ) {
switch ( $column_name ) {
case 'date':
$current = strtotime( current_time( 'mysql' ) );
$timestamp = $item[$column_name];
return sprintf( __( '%s ago', 'revisr' ), human_time_diff( $timestamp, $current ) );
default:
return $item[$column_name];
}
}
/**
* Renders the title/commit subject column.
* @access public
* @return string
*/
public function column_title( $item ) {
$view_url = get_admin_url() . 'admin.php?page=revisr_view_commit&commit=' . $item['hash'];
$revert_url = get_admin_url() . 'admin-post.php?action=revisr_revert_form&commit=' . $item['hash'] . '&TB_iframe=true&width=400&height=225';
$title = '<strong><a href="' . $view_url . '">' . $item['title'] . '</a></strong>';
$actions['view'] = '<a href="' . $view_url . '">' . __( 'View', 'revisr' ) . '</a>';
$actions['revert'] = '<a class="thickbox" title="' . __( 'Revert', 'revisr' ) . '" href="' . $revert_url . '">' . __( 'Revert', 'revisr' ) . '</a>';
return $title . $this->row_actions( $actions );
}
/**
* Called when no commits are found.
* @access public
*/
public function no_items() {
_e( 'No commits found.', 'revisr' );
}
/**
* Prepares the data for display.
* @access public
*/
public function prepare_items() {
global $wpdb;
// Number of items per page.
$per_page = $this->get_items_per_page( 'edit_revisr_commits_per_page', 10 );
// Set up the custom columns.
$columns = $this->get_columns();
$hidden = array();
$sortable = $this->get_sortable_columns();
// Builds the list of column headers.
$this->_column_headers = array( $columns, $hidden, $sortable );
// Get the data to populate into the table.
$data = $this->get_data();
// Handle sorting of the data.
function usort_reorder( $a,$b ) {
// Sort by date, descending by default.
$orderby = ( ! empty( $_REQUEST['orderby'] ) ) ? $_REQUEST['orderby'] : 'date';
$order = ( ! empty( $_REQUEST['order'] ) ) ? $_REQUEST['order'] : 'desc';
$result = strcmp($a[$orderby], $b[$orderby]);
return ( $order==='asc' ) ? $result : -$result;
}
usort( $data, 'usort_reorder' );
// Pagination.
$current_page = $this->get_pagenum();
$total_items = count($data);
$data = array_slice($data,(($current_page-1)*$per_page),$per_page);
$this->items = $data;
$this->set_pagination_args( array(
'total_items' => $total_items,
'per_page' => $per_page,
'total_pages' => ceil($total_items/$per_page),
'orderby' => ! empty( $_REQUEST['orderby'] ) && '' != $_REQUEST['orderby'] ? $_REQUEST['orderby'] : 'date',
'order' => ! empty( $_REQUEST['order'] ) && '' != $_REQUEST['order'] ? $_REQUEST['order'] : 'desc'
) );
}
/**
* Displays the table.
* @access public
*/
public function display() {
wp_nonce_field( 'revisr-commits-nonce', 'revisr_commits_nonce', false );
echo '<input type="hidden" id="order" name="order" value="' . $this->_pagination_args['order'] . '" />';
echo '<input type="hidden" id="orderby" name="orderby" value="' . $this->_pagination_args['orderby'] . '" />';
parent::display();
}
/**
* Displays the "subsubsub" list.
* @access public
*/
public function render_views() {
$branches = revisr()->git->get_branches();
$views = array();
$base_url = get_admin_url() . 'admin.php?page=revisr_commits';
if ( is_array( $branches ) && ! empty( $branches ) ) {
foreach ( $branches as $branch ) {
if ( substr( $branch, 0, 2) === '* ' ) {
$branch = substr( $branch, 2 );
$count = revisr()->git->run( 'rev-list', array( '--count', $branch ) );
$count = is_array( $count ) ? absint( $count[0] ) : 0;
if ( ! isset( $_GET['branch'] ) || $_GET['branch'] === $branch ) {
$views[$branch] = '<a class="current" href="#">' . $branch . ' <span class="count">(' . $count . ')</span></a>';
} else {
$views[$branch] = '<a href="' . $base_url . '&branch=' . $branch . '">' . $branch . ' <span class="count">(' . $count . ')</span></a>';
}
} else {
$branch = trim( $branch );
$count = revisr()->git->run( 'rev-list', array( '--count', $branch ) );
$count = is_array( $count ) ? absint( $count[0] ) : 0;
if ( isset( $_GET['branch'] ) && $_GET['branch'] === $branch ) {
$views[$branch] = '<a class="current" href="#">' . $branch . ' <span class="count">(' . $count . ')</span></a>';
} elseif ( isset( $_GET['branch'] ) && 'all' === $branch ) {
$views[$branch] = '<a href="' . $base_url . '&branch=' . $branch . '">' . $branch . '</a>';
} else {
$views[$branch] = '<a href="' . $base_url . '&branch=' . $branch . '">' . $branch . ' <span class="count">(' . $count . ')</span></a>';
}
}
}
}
// Start outputting the list.
echo '<ul class="subsubsub">';
foreach ( $views as $class => $view ) {
$views[$class] = "\t<li class='$class'>$view";
}
// Render the "All" link.
$all_class = isset( $_GET['branch'] ) && 'all' === $_GET['branch'] ? 'current' : '';
$all_count = revisr()->git->run( 'rev-list', array( '--count', '--all' ) );
$all_count = is_array( $all_count ) ? absint( $all_count[0] ) : 0;
echo '<li class="all"><a class="' . $all_class . '" href="' . $base_url . '&branch=all">' . __( 'All', 'revisr' ) . ' <span class="count">(' . $all_count . ')</span></a> |</li>';
// Render the branches.
echo implode( " |</li>\n", $views ) . "</li>\n";
echo '</ul>';
}
/**
* Displays the search box.
* @access public
*/
public function render_search() {
$value = isset( $_GET['s'] ) ? esc_attr( $_GET['s'] ) : '';
?>
<p class="search-box">
<label class="screen-reader-text" for="post-search-input"><?php _e( 'Search Commits:', 'revisr' ); ?></label>
<input type="search" id="post-search-input" name="s" value="<?php echo $value; ?>">
<input type="submit" id="search-submit" class="button" value="Search Commits">
</p>
<?php
}
/**
* Renders the top or bottom tablenav.
* @access public
* @param string $which Which tablenav to display (top or bottom)
*/
public function display_tablenav( $which ) {
?>
<div class="tablenav <?php echo esc_attr( $which ); ?>">
<?php
$this->extra_tablenav( $which );
$this->pagination( $which );
?>
<br class="clear" />
</div>
<?php
}
/**
* Extra table navigation.
* @access public
* @param string $which
* @return string
*/
public function extra_tablenav( $which ) {
$filter_time = isset( $_REQUEST['revisr_time'] ) ? $_REQUEST['revisr_time'] : 'all';
if ( 'top' === $which ) {
?>
<select id="revisr-time-select" name="revisr_time">
<option value="all"><?php _e( 'All Time', 'revisr' ); ?></option>
<option value="halfday" <?php selected( 'halfday', $filter_time ); ?>><?php _e( 'Last 12 Hours', 'revisr' ); ?></option>
<option value="day" <?php selected( 'day', $filter_time ); ?>><?php _e( 'Last 24 Hours', 'revisr' ); ?></option>
<option value="week" <?php selected( 'week', $filter_time ); ?>><?php _e( 'Last Week', 'revisr' ); ?></option>
<option value="month" <?php selected( 'month', $filter_time ); ?>><?php _e( 'Last Month', 'revisr' ); ?></option>
</select>
<input type="submit" name="filter_action" id="post-query-submit" class="button" value="Filter">
<?php
}
}
}

View file

@ -1,233 +0,0 @@
<?php
/**
* class-revisr-compatibility.php
*
* Checks if Revisr is compatible with the current server.
*
* @package Revisr
* @license GPLv3
* @link https://revisr.io
* @copyright Expanded Fronts, LLC
*/
// Prevent direct access.
if ( ! defined( 'ABSPATH' ) ) exit;
class Revisr_Compatibility {
/**
* Returns the system info.
* @access public
* @return string
*/
public static function get_sysinfo() {
global $wpdb;
$return = '### Begin System Info ###' . "\n\n";
// Basic site info
$return .= '-- WordPress Configuration' . "\n\n";
$return .= 'Site URL: ' . site_url() . "\n";
$return .= 'Home URL: ' . home_url() . "\n";
$return .= 'Multisite: ' . ( is_multisite() ? 'Yes' : 'No' ) . "\n";
$return .= 'Version: ' . get_bloginfo( 'version' ) . "\n";
$return .= 'Language: ' . ( defined( 'WPLANG' ) && WPLANG ? WPLANG : 'en_US' ) . "\n";
$return .= 'Table Prefix: ' . 'Length: ' . strlen( $wpdb->prefix ) . "\n";
$return .= 'WP_DEBUG: ' . ( defined( 'WP_DEBUG' ) ? WP_DEBUG ? 'Enabled' : 'Disabled' : 'Not set' ) . "\n";
$return .= 'Memory Limit: ' . WP_MEMORY_LIMIT . "\n";
// Revisr Configuration
$return .= "\n" . '-- Revisr Configuration' . "\n\n";
$return .= 'Plugin Version: ' . REVISR_VERSION . "\n";
if ( isset( revisr()->options['automatic_backups'] ) && 'none' !== revisr()->options['automatic_backups'] ) {
$backups = 'Enabled';
} else {
$backups = 'Disabled';
}
$return .= 'Automatic Backups: ' . $backups . "\n";
if ( revisr()->git->get_config( 'revisr', 'auto-push' ) === 'true' ) {
$auto_push = 'Enabled';
} else {
$auto_push = 'Disabled';
}
$return .= 'Auto-Push: ' . $auto_push . "\n";
if ( revisr()->git->get_config( 'revisr', 'auto-pull' ) === 'true' ) {
$auto_pull = 'Enabled';
} else {
$auto_pull = 'Disabled';
}
$return .= 'Auto-Pull: ' . $auto_pull . "\n";
if ( revisr()->git->get_config( 'revisr', 'import-checkouts' ) === 'true' ) {
$import_checkouts = 'Enabled';
} else {
$import_checkouts = 'Disabled';
}
$return .= 'Import checkouts: ' . $import_checkouts . "\n";
if ( revisr()->git->get_config( 'revisr', 'import-pulls' ) === 'true' ) {
$import_pulls = 'Enabled';
} else {
$import_pulls = 'Disabled';
}
$return .= 'Import pulls: ' . $import_pulls . "\n";
$return .= 'Work Tree: ' . revisr()->git->get_work_tree() . "\n";
$return .= 'Git Dir: ' . revisr()->git->get_git_dir() . "\n";
if ( revisr()->git->is_repo ) {
$detected = 'true';
} else {
$detected = 'false';
}
$return .= 'Repository Detected: ' . $detected . "\n";
if ( 'true' === $detected ) {
$return .= 'Repository Writable: ' . Revisr_Compatibility::server_has_permissions( revisr()->git->get_git_dir() ) . "\n";
}
// Server Configuration
$return .= "\n" . '-- Server Configuration' . "\n\n";
$os = Revisr_Compatibility::get_os();
$return .= 'Operating System: ' . $os['name'] . "\n";
$return .= 'PHP Version: ' . PHP_VERSION . "\n";
$return .= 'MySQL Version: ' . $wpdb->db_version() . "\n";
$return .= 'Git Version: ' . revisr()->git->version() . "\n";
$return .= 'Git Install Path: ' . Revisr_Compatibility::guess_path( 'git' ) . "\n";
$return .= 'MySQL Install Path: ' . Revisr_Compatibility::guess_path( 'mysql' ) . "\n";
$return .= 'Server Software: ' . $_SERVER['SERVER_SOFTWARE'] . "\n";
$return .= 'Server User: ' . Revisr_Compatibility::get_user() . "\n";
// PHP configs... now we're getting to the important stuff
$return .= "\n" . '-- PHP Configuration' . "\n\n";
$return .= 'Safe Mode: ' . ( ini_get( 'safe_mode' ) ? 'Enabled' : 'Disabled' . "\n" );
if ( function_exists( 'exec' ) ) {
$exec = 'Enabled';
} else {
$exec = 'Disabled';
}
$return .= 'Exec Enabled: ' . $exec . "\n";
$return .= 'Memory Limit: ' . ini_get( 'memory_limit' ) . "\n";
$return .= 'Upload Max Size: ' . ini_get( 'upload_max_filesize' ) . "\n";
$return .= 'Post Max Size: ' . ini_get( 'post_max_size' ) . "\n";
$return .= 'Upload Max Filesize: ' . ini_get( 'upload_max_filesize' ) . "\n";
$return .= 'Time Limit: ' . ini_get( 'max_execution_time' ) . "\n";
$return .= 'Max Input Vars: ' . ini_get( 'max_input_vars' ) . "\n";
$return .= 'Display Errors: ' . ( ini_get( 'display_errors' ) ? 'On (' . ini_get( 'display_errors' ) . ')' : 'N/A' ) . "\n";
// WordPress active plugins
$return .= "\n" . '-- WordPress Active Plugins' . "\n\n";
$plugins = get_plugins();
$active_plugins = get_option( 'active_plugins', array() );
foreach( $plugins as $plugin_path => $plugin ) {
if( !in_array( $plugin_path, $active_plugins ) )
continue;
$return .= $plugin['Name'] . ': ' . $plugin['Version'] . "\n";
}
// WordPress inactive plugins
$return .= "\n" . '-- WordPress Inactive Plugins' . "\n\n";
foreach( $plugins as $plugin_path => $plugin ) {
if( in_array( $plugin_path, $active_plugins ) )
continue;
$return .= $plugin['Name'] . ': ' . $plugin['Version'] . "\n";
}
if( is_multisite() ) {
// WordPress Multisite active plugins
$return .= "\n" . '-- Network Active Plugins' . "\n\n";
$plugins = wp_get_active_network_plugins();
$active_plugins = get_site_option( 'active_sitewide_plugins', array() );
foreach( $plugins as $plugin_path ) {
$plugin_base = plugin_basename( $plugin_path );
if( !array_key_exists( $plugin_base, $active_plugins ) )
continue;
$plugin = get_plugin_data( $plugin_path );
$return .= $plugin['Name'] . ': ' . $plugin['Version'] . "\n";
}
}
$return .= "\n" . '### End System Info ###';
return $return;
}
/**
* Determines the current operating system.
* @access public
* @return array
*/
public static function get_os() {
$os = array();
$uname = php_uname( 's' );
$os['code'] = strtoupper( substr( $uname, 0, 3 ) );
$os['name'] = $uname;
return $os;
}
/**
* Gets the user running this PHP process.
* @access public
* @return string
*/
public static function get_user() {
if ( function_exists( 'exec' ) ) {
return exec( 'whoami' );
}
return __( 'Unknown', 'revisr' );
}
/**
* Tries to guess the install path to the provided program.
* @access public
* @param string $program The program to check for.
* @return string
*/
public static function guess_path( $program ) {
$os = Revisr_Compatibility::get_os();
$program = Revisr_Admin::escapeshellarg( $program );
if ( $os['code'] !== 'WIN' ) {
$path = exec( "which $program" );
} else {
$path = exec( "where $program" );
}
if ( $path ) {
return $path;
} else {
return __( 'Not Found', 'revisr' );
}
}
/**
* Checks if the exec() function is enabled.
* @access public
* @return string
*/
public static function server_has_exec() {
if ( function_exists( 'exec' ) ) {
return 'true';
}
return 'false';
}
/**
* Checks if Revisr has write permissions to the repository.
* @access public
* @param string $path The path to the repository.
* @return string
*/
public static function server_has_permissions( $path ) {
if ( ! is_writable( $path ) || ! is_writeable( $path . DIRECTORY_SEPARATOR . 'config' ) ) {
return 'false';
}
return 'true';
}
}

View file

@ -1,101 +0,0 @@
<?php
/**
* class-revisr-cron.php
*
* Processes scheduled events for Revisr.
*
* @package Revisr
* @license GPLv3
* @link https://revisr.io
* @copyright Expanded Fronts, LLC
*/
// Prevent direct access.
if ( ! defined( 'ABSPATH' ) ) exit;
class Revisr_Cron {
/**
* Creates new schedules.
* @access public
* @param array $schedules An array of available schedules.
*/
public function revisr_schedules( $schedules ) {
// Adds weekly backups
$schedules['weekly'] = array(
'interval' => 604800,
'display' => __( 'Weekly', 'revisr' )
);
return $schedules;
}
/**
* The main "automatic backup" event.
* @access public
*/
public function run_automatic_backup() {
revisr()->git = new Revisr_Git();
revisr()->db = new Revisr_DB();
$backup_type = revisr()->git->get_config( 'revisr', 'automatic-backups' ) ? revisr()->git->get_config( 'revisr', 'automatic-backups' ) : 'none';
// Make sure backups have been enabled for this environment.
if ( 'none' !== $backup_type ) {
// Defaults.
$date = date("F j, Y");
$files = revisr()->git->status() ? revisr()->git->status() : array();
$commit_msg = sprintf( __( '%s backup - %s', 'revisr' ), ucfirst( $backup_type ), $date );
// Stage the files and commit.
revisr()->git->stage_files( $files );
revisr()->git->commit( $commit_msg );
// Backup the DB.
revisr()->db->backup();
// Log result - TODO: improve error handling as necessary.
$log_msg = sprintf( __( 'The %s backup was successful.', 'revisr' ), $backup_type );
Revisr_Admin::log( $log_msg, 'backup' );
}
}
/**
* Processes the "auto-pull" functionality.
* @access public
*/
public function run_autopull() {
revisr()->git = new Revisr_Git();
// If auto-pull isn't enabled, we definitely don't want to do this.
if ( revisr()->git->get_config( 'revisr', 'auto-pull' ) !== 'true' ) {
wp_die( __( 'Cheatin&#8217; uh?', 'revisr' ) );
}
// Verify the provided token matches the token stored locally.
$remote = new Revisr_Remote();
$remote->check_token();
// If we're still running at this point, we've successfully authenticated.
revisr()->git->reset();
revisr()->git->fetch();
// Grab the commits that need to be pulled.
$commits_since = revisr()->git->run( 'log', array( revisr()->git->branch . '..' . revisr()->git->remote . '/' . revisr()->git->branch, '--pretty=oneline' ) );
// Maybe backup the database.
if ( revisr()->git->get_config( 'revisr', 'import-pulls' ) === 'true' ) {
revisr()->db = new Revisr_DB();
revisr()->db->backup();
$undo_hash = revisr()->git->current_commit();
revisr()->git->set_config( 'revisr', 'last-db-backup', $undo_hash );
}
// Pull the changes or return an error on failure.
revisr()->git->pull( $commits_since );
}
}

View file

@ -1,133 +0,0 @@
<?php
/**
* class-revisr-db-backup.php
*
* Performs database backup operations.
*
* @package Revisr
* @license GPLv3
* @link https://revisr.io
* @copyright Expanded Fronts, LLC
*/
// Prevent direct access.
if ( ! defined( 'ABSPATH' ) ) exit;
class Revisr_DB_Backup extends Revisr_DB {
/**
* Backs up a single database table using mysqldump.
* @access public
* @param string $table The database table to backup.
* @return array An array of the results.
*/
public function backup_table_mysql( $table ) {
// Build the connection to use with mysqldump.
$conn = $this->build_conn( $table );
// Grab the path to use for mysqldump.
$path = $this->get_path();
// Backup the table.
$current_dir = getcwd();
chdir( $this->backup_dir );
exec( "{$path}mysqldump $conn > revisr_$table.sql --skip-comments", $output, $return_code );
chdir( $current_dir );
// Handle any errors
if ( 0 !== $return_code ) {
return false;
}
// Add the table into version control.
$this->add_table( $table );
// Makes sure that the backup file exists and is not empty.
return $this->verify_backup( $table );
}
/**
* Backs up a single database table using the WordPress database class.
* @access public
* @param string $table The database table to backup.
* @return boolean
*/
public function backup_table_wpdb( $table ) {
$table = esc_sql( $table );
// Initialize the results, ultimately stored in the backup file.
$results = '';
// An empty array to store the queries for the table in later.
$queries = array();
// Grab the SQL needed to create the table.
$show_create = $this->wpdb->get_row( "SHOW CREATE TABLE `$table`" );
$want = 'Create Table';
if ( $show_create ) {
// Store the table schema in the backup file.
$results .= "DROP TABLE IF EXISTS `$table`;" . PHP_EOL;
$results .= $show_create->$want . ';' . PHP_EOL;
// Grab the content of the database table.
foreach ( $this->wpdb->get_results( "SELECT * FROM `$table`" ) as $row ) {
$vals = array();
foreach ( get_object_vars( $row ) as $i => $v ) {
$vals[] = sprintf( "'%s'", esc_sql( $v ) );
}
$queries[] = sprintf( "(%s)", implode( ',', $vals ) );
}
if ( ! empty( $queries ) ) {
// Implode the queries and generate the rest of the SQL file.
$results .= "LOCK TABLES `$table` WRITE;" . PHP_EOL;
$results .= "INSERT INTO `$table` VALUES " . implode( ', ', $queries ) . ';' . PHP_EOL;
$results .= 'UNLOCK TABLES;' . PHP_EOL;
}
}
// Store the contents of the SQL file.
file_put_contents( $this->backup_dir . "revisr_$table.sql", $results );
$this->add_table( $table );
// Verify the backup was successful and return a boolean.
return $this->verify_backup( $table );
}
/**
* Processes the results and alerts the user as necessary.
* @access public
* @param array $args An array containing the results of the backup.
* @return boolean
*/
public function callback( $args ) {
if ( in_array( false, $args ) ) {
$msg = __( 'Error backing up the database.', 'revisr' );
Revisr_Admin::alert( $msg, true );
Revisr_Admin::log( $msg, 'error' );
} else {
$msg = __( 'Successfully backed up the database.', 'revisr' );
Revisr_Admin::alert( $msg );
Revisr_Admin::log( $msg, 'backup' );
// Fires after a successful database backup.
do_action( 'revisr_post_db_backup' );
return true;
}
return false;
}
}

View file

@ -1,315 +0,0 @@
<?php
/**
* class-revisr-db-import.php
*
* Performs database import operations.
*
* @package Revisr
* @license GPLv3
* @link https://revisr.io
* @copyright Expanded Fronts, LLC
*/
// Prevent direct access.
if ( ! defined( 'ABSPATH' ) ) exit;
class Revisr_DB_Import extends Revisr_DB {
/**
* Imports a single database table using MySQL directly.
* @access public
* @param string $table The table to import
* @return boolean Whether it was successful.
*/
public function import_table_mysql( $table, $replace_url = '' ) {
// Build the connection to use with MySQL.
$conn = $this->build_conn();
// Grab the path to use for MySQL.
$path = $this->get_path();
// Grab the site url.
$live_url = site_url();
// Import the table.
$current_dir = getcwd();
chdir( $this->backup_dir );
exec( "{$path}mysql {$conn} < revisr_$table.sql", $output, $return_code );
chdir( $current_dir );
// Handle any errors.
if ( 0 !== $return_code ) {
Revisr_Admin::log( implode( '<br>', $output ), 'error' );
return false;
}
// Run a search replace if necessary.
if ( $replace_url !== '' && $replace_url !== false ) {
$this->revisr_srdb( $table, $replace_url, $live_url );
}
// If we're still running at this point, everything worked.
return true;
}
/**
* Imports a single database table using the WordPress database class.
* @access public
* @param string $table The table to import
* @return array An array of the results.
*/
public function import_table_wpdb( $table, $replace_url = '' ) {
$live_url = site_url();
$fh = fopen( "{$this->backup_dir}revisr_$table.sql", 'r' );
$size = filesize( "{$this->backup_dir}revisr_$table.sql" );
$status = array(
'errors' => 0,
'updates' => 0
);
while( !feof( $fh ) ) {
$query = trim( stream_get_line( $fh, $size, ';' . PHP_EOL ) );
if ( empty( $query ) ) {
$status['dropped_queries'][] = $query;
continue;
}
if ( $this->wpdb->query( $query ) === false ) {
$status['errors']++;
$status['bad_queries'][] = $query;
} else {
$status['updates']++;
$status['good_queries'][] = $query;
}
}
fclose( $fh );
if ( '' !== $replace_url ) {
$this->revisr_srdb( $table, $replace_url, $live_url );
}
if ( 0 !== $status['errors'] ) {
return false;
}
return true;
}
/**
* Processes the results and alerts the user as necessary.
* @access public
* @param array $args An array containing the results of the backup.
* @return boolean
*/
public function callback( $args ) {
if ( in_array( false, $args ) ) {
// There were one or more errors with the import.
$msg = __( 'Error importing the database.', 'revisr' );
Revisr_Admin::log( $msg, 'error' );
Revisr_Admin::alert( $msg, true );
} else {
// Everything imported properly.
$get_hash = revisr()->git->run( 'config', array( 'revisr.last-db-backup' ) );
$revert_link = '';
if ( is_array( $get_hash ) ) {
$undo_hash = $get_hash[0];
$undo_url = get_admin_url() . 'admin-post.php?action=process_revert&revert_type=db&db_hash=' . $undo_hash;
$undo_nonced = wp_nonce_url( $undo_url, 'revisr_revert_nonce', 'revisr_revert_nonce' );
$revert_link = '<a href="' . $undo_nonced . '">' . __( 'Undo', 'revisr') . '</a>';
revisr()->git->run( 'config', array( '--unset', 'revisr.last-db-backup' ) );
}
// Alert the user.
$msg = sprintf( __( 'Successfully imported the database. %s', 'revisr'), $revert_link );
Revisr_Admin::log( $msg, 'import' );
Revisr_Admin::alert( $msg );
// Fires after a successful database import.
do_action( 'revisr_post_db_import' );
return true;
}
return false;
}
/**
* Gets the columns in a table.
* @access public
* @param string $table The table to check.
* @return array
*/
public function get_columns( $table ) {
$primary_key = null;
$columns = array();
$fields = $this->wpdb->get_results( 'DESCRIBE ' . $table );
if ( is_array( $fields ) ) {
foreach ( $fields as $column ) {
$columns[] = $column->Field;
if ( $column->Key == 'PRI' ) {
$primary_key = $column->Field;
}
}
}
return array( $primary_key, $columns );
}
/**
* Adapated from interconnect/it's search/replace script.
* Modified to use WordPress wpdb functions instead of PHP's native mysql/pdo functions.
*
* @link https://interconnectit.com/products/search-and-replace-for-wordpress-databases/
*
* @access private
* @param string $table The table to run the replacement on.
* @param string $search The string to replace.
* @param string $replace The string to replace with.
* @return boolean
*/
private function revisr_srdb( $table, $search = '', $replace = '' ) {
$table = esc_sql( $table );
// Get a list of columns in this table.
list( $primary_key, $columns ) = $this->get_columns( $table );
// Bail out early if there isn't a primary key.
if ( null === $primary_key ) {
return false;
}
// Count the number of rows we have in the table if large we'll split into blocks, This is a mod from Simon Wheatley
$row_count = $this->wpdb->get_var( "SELECT COUNT(*) FROM $table" );
if ( $row_count == 0 ) {
return true;
}
$page_size = 50000;
$pages = ceil( $row_count / $page_size );
for( $page = 0; $page < $pages; $page++ ) {
$current_row = 0;
$start = $page * $page_size;
$end = $page_size;
// Grab the content of the table.
$data = $this->wpdb->get_results( "SELECT * FROM $table LIMIT $start, $end", ARRAY_A );
// Loop through the data.
foreach ( $data as $row ) {
$current_row++;
$update_sql = array();
$where_sql = array();
$upd = false;
foreach( $columns as $column ) {
$data_to_fix = $row[ $column ];
if ( $column == $primary_key ) {
$where_sql[] = $column . ' = "' . $this->mysql_escape_mimic( $data_to_fix ) . '"';
continue;
}
// Run a search replace on the data that'll respect the serialisation.
$edited_data = $this->recursive_unserialize_replace( $search, $replace, $data_to_fix );
// Something was changed
if ( $edited_data != $data_to_fix ) {
$update_sql[] = $column . ' = "' . $this->mysql_escape_mimic( $edited_data ) . '"';
$upd = true;
}
}
if ( $upd && ! empty( $where_sql ) ) {
$sql = 'UPDATE ' . $table . ' SET ' . implode( ', ', $update_sql ) . ' WHERE ' . implode( ' AND ', array_filter( $where_sql ) );
$result = $this->wpdb->query( $sql );
if ( ! $result ) {
$error_msg = sprintf( __( 'Error updating the table: %s.', 'revisr' ), $table );
}
}
}
}
$this->wpdb->flush();
if ( isset( $error_msg ) ) {
Revisr_Admin::log( $error_msg, 'error' );
return false;
}
}
/**
* Adapated from interconnect/it's search/replace script.
*
* @link https://interconnectit.com/products/search-and-replace-for-wordpress-databases/
*
* Take a serialised array and unserialise it replacing elements as needed and
* unserialising any subordinate arrays and performing the replace on those too.
*
* @access private
* @param string $from String we're looking to replace.
* @param string $to What we want it to be replaced with.
* @param array $data Used to pass any subordinate arrays back to in.
* @param bool $serialised Does the array passed via $data need serialising.
*
* @return string|array The original array with all elements replaced as needed.
*/
private function recursive_unserialize_replace( $from = '', $to = '', $data = '', $serialised = false ) {
try {
if ( is_string( $data ) && ( $unserialized = @unserialize( $data ) ) !== false ) {
$data = $this->recursive_unserialize_replace( $from, $to, $unserialized, true );
}
elseif ( is_array( $data ) ) {
$_tmp = array( );
foreach ( $data as $key => $value ) {
$_tmp[ $key ] = $this->recursive_unserialize_replace( $from, $to, $value, false );
}
$data = $_tmp;
unset( $_tmp );
}
// Submitted by Tina Matter
elseif ( is_object( $data ) ) {
// $data_class = get_class( $data );
$_tmp = $data; // new $data_class( );
$props = get_object_vars( $data );
foreach ( $props as $key => $value ) {
$_tmp->$key = $this->recursive_unserialize_replace( $from, $to, $value, false );
}
$data = $_tmp;
unset( $_tmp );
}
else {
if ( is_string( $data ) )
$data = str_replace( $from, $to, $data );
}
if ( $serialised )
return serialize( $data );
} catch( Exception $error ) {
Revisr_Admin::log( $error, 'error' );
}
return $data;
}
}

View file

@ -1,523 +0,0 @@
<?php
/**
* class-revisr-db.php
*
* The base database class, acting as a factory via run() for
* backups and imports. Also contains some methods shared
* across all database operations.
*
* @package Revisr
* @license GPLv3
* @link https://revisr.io
* @copyright Expanded Fronts, LLC
*/
// Prevent direct access.
if ( ! defined( 'ABSPATH' ) ) exit;
class Revisr_DB {
/**
* The backup directory.
* @var string
*/
protected $backup_dir;
/**
* The WordPress database class.
* @var WPDB
*/
protected $wpdb;
/**
* Constructs the class.
* @access public
*/
public function __construct() {
// Make WPDB available to the class.
global $wpdb;
$this->wpdb = $wpdb;
$upload_dir = wp_upload_dir();
$this->backup_dir = $upload_dir['basedir'] . '/revisr-backups/';
// Set up the "revisr_backups" directory if necessary.
$this->setup_env();
}
/**
* Runs an action on all tracked database tables.
*
* @access private
* @param string $action The action to perform.
* @param array $tables The tables to run on (optional).
* @param string|array $args Any arguements to pass through (optional).
* @return boolean
*/
private function run( $action, $tables = array(), $args = '' ) {
// An empty status array to update later.
$status = array();
// Whether we're using MySQL, WPDB, or maybe even something else.
$driver = $this->get_driver();
// Builds the name of the class to construct.
$class = 'Revisr_DB_' . $action;
// Builds the name of the method to call.
$method = $action . '_table_' . $driver;
// The tables we want to run the action on.
$tables = $tables ? $tables : $this->get_tracked_tables();
if ( is_callable( array( $class, $method ) ) ) {
// Construct the class.
$class = new $class;
/**
* Loop through the tracked tables,
* storing the results in the status array.
*/
foreach ( $tables as $table ) {
$status[$table] = $class->$method( $table, $args );
}
// Fire off the callback.
return $class->callback( $status );
}
}
/**
* Returns the database method being used.
* @access private
* @return string
*/
private function get_driver() {
return revisr()->git->get_config( 'revisr', 'db-driver' ) ? revisr()->git->get_config( 'revisr', 'db-driver' ) : 'mysql';
}
/**
* Returns the path to MySQL.
* @access protected
* @return string
*/
protected function get_path() {
return revisr()->git->get_config( 'revisr', 'mysql-path' ) ? revisr()->git->get_config( 'revisr', 'mysql-path' ) : '';
}
/**
* Returns an array of tables in the database.
* @access public
* @return array
*/
public function get_tables() {
$tables = $this->wpdb->get_col( 'SHOW TABLES' );
return $tables;
}
/**
* Returns an array containing the size of each database table.
* @access public
* @return array
*/
public function get_sizes() {
$sizes = array();
$tables = $this->wpdb->get_results( 'SHOW TABLE STATUS', ARRAY_A );
if ( is_array( $tables ) ) {
foreach ( $tables as $table ) {
$size = round( $table['Data_length'] / 1024 / 1024, 2 );
$sizes[$table['Name']] = sprintf( __( '(%s MB)', 'revisr' ), $size );
}
}
return $sizes;
}
/**
* Returns a list of tables that are in the "revisr-backups" directory,
* but not in the database. Necessary for importing tables that could
* not be added to the tracked tables due to them not existing.
* @access public
* @return array
*/
public function get_tables_not_in_db() {
$backup_tables = array();
$db_tables = $this->get_tables();
foreach ( scandir( $this->backup_dir ) as $file ) {
if ( 'revisr_' !== substr( $file, 0, 7 ) ) {
continue;
}
// Remove the prefix and extension.
$backup_tables[] = substr( substr( $file, 7 ), 0, -4 );
}
$new_tables = array_diff( $backup_tables, $db_tables );
return $new_tables;
}
/**
* Returns the array of tables that are to be tracked.
* @access public
* @return array
*/
public function get_tracked_tables() {
// Get our saved tracking preferences from the .git/config.
$db_tracking = revisr()->git->get_config( 'revisr', 'db-tracking' );
$stored_tables = revisr()->git->run( 'config', array( '--get-all', 'revisr.tracked-tables' ) );
// Determine which tables we want to track.
if ( 'all_tables' == $db_tracking ) {
$tracked_tables = $this->get_tables();
} elseif ( 'custom' == $db_tracking && is_array( $stored_tables ) ) {
$tracked_tables = array_intersect( $stored_tables, $this->get_tables() );
} elseif ( 'none' == $db_tracking) {
$tracked_tables = array();
} else {
$tracked_tables = $this->get_tables();
}
// Return an array of tables we should track.
return $tracked_tables;
}
/**
* Adds a table to version control.
* @access private
* @param string $table The table to add.
*/
protected function add_table( $table ) {
revisr()->git->run( 'add', array( $this->backup_dir . 'revisr_' . $table. '.sql' ) );
}
/**
* Builds the connection string to use with MySQL.
* @access protected
* @param string $table Optionally pass the table to use.
* @return string
*/
protected function build_conn( $table = '' ) {
// Allow using the port or socket from the DB_HOST constant.
$port_or_socket = $this->check_port_or_socket( DB_HOST );
$add_port = '';
$add_socket = '';
$db_host = DB_HOST;
if ( false !== $port_or_socket ) {
if ( null !== $port_or_socket['socket'] ) {
$socket = $port_or_socket['socket'];
$add_socket = " --socket=$socket";
$temp = strlen( $socket ) * -1 - 1;
} else {
$port = $port_or_socket['port'];
$add_port = " --port=$port";
$temp = strlen( $port ) * -1 - 1;
}
$db_host = substr( DB_HOST, 0, $temp );
}
// Maybe connect to a specific table.
if ( '' !== $table ) {
$table = ' ' . Revisr_Admin::escapeshellarg( $table );
}
// Workaround for compatibility between UNIX and Windows.
if ( '' !== DB_PASSWORD ) {
$conn = "-u " . Revisr_Admin::escapeshellarg( DB_USER ) . " -p" . Revisr_Admin::escapeshellarg( DB_PASSWORD ) . " " . DB_NAME . $table . " --host " . $db_host . $add_port . $add_socket;
} else {
$conn = "-u " . Revisr_Admin::escapeshellarg( DB_USER ) . " " . DB_NAME . $table . " --host " . $db_host . $add_port . $add_socket;
}
// Return the connection string.
return $conn;
}
/**
* Creates the backup folder and adds the .htaccess if necessary.
* @access private
*/
private function setup_env() {
// Check if the backups directory has already been created.
if ( is_dir( $this->backup_dir ) ) {
return true;
} else {
// Make the backups directory.
mkdir( $this->backup_dir );
// Add .htaccess to prevent direct access.
$htaccess_content = '<FilesMatch "\.sql">' .
PHP_EOL . 'Order allow,deny' .
PHP_EOL . 'Deny from all' .
PHP_EOL . 'Satisfy All' .
PHP_EOL . '</FilesMatch>';
file_put_contents( $this->backup_dir . '/.htaccess', $htaccess_content );
// Add index.php to prevent directory listing.
$index_content = '<?php // Silence is golden' . PHP_EOL;
file_put_contents( $this->backup_dir . '/index.php', $index_content );
}
}
/**
* Checks if a given DB_HOST parameter is using a port or socket.
*
* Adapated from WordPress core.
*
* @access public
* @param string $url The URL to check.
* @return array|boolean
*/
public function check_port_or_socket( $url ) {
// Initialize the defaults.
$port = null;
$socket = null;
$host = $url;
$port_or_socket = strrchr( $host, ':' );
if ( ! empty( $port_or_socket ) ) {
$port_or_socket = substr( $port_or_socket, 1);
if ( 0 !== strpos( $port_or_socket, '/' ) ) {
$port = intval( $port_or_socket );
$maybe_socket = strstr( $port_or_socket, ':' );
if ( ! empty( $maybe_socket ) ) {
$socket = substr( $maybe_socket, 1 );
}
} else {
$socket = $port_or_socket;
}
}
if ( null === $port && null === $socket ) {
return false;
}
return array( 'port' => $port, 'socket' => $socket );
}
/**
* Mimics the mysql_real_escape_string function. Adapted from a post by 'feedr' on php.net.
* @link http://php.net/manual/en/function.mysql-real-escape-string.php#101248
* @access public
* @param string $input The string to escape.
*/
public function mysql_escape_mimic( $input ) {
if ( is_array( $input ) ) {
return array_map( __METHOD__, $input );
}
if( ! empty( $input ) && is_string( $input ) ) {
return str_replace( array( '\\', "\0", "\n", "\r", "'", '"', "\x1a" ), array( '\\\\', '\\0', '\\n', '\\r', "\\'", '\\"', '\\Z' ), $input );
}
return $input;
}
/**
* Callback for database backups (AJAX button and via New Commit)
* @access public
* @param string $commit_msg A commit message to pass to $this->commit_db() (optional)
* @param boolean $commit_db Whether or not to commit the DB immediately.
* @return boolean
*/
public function backup( $commit_msg = '', $commit_db = true ) {
// Get the tables to backup.
$tables = $this->get_tracked_tables();
if ( empty( $tables ) ) {
$tables = $this->get_tables();
}
// Run the backup.
if ( $this->run( 'backup', $tables ) ) {
// Commit the backed up database tables if necessary.
if ( true === $commit_db ) {
$this->commit_db( $commit_msg );
}
return true;
}
return false;
}
/**
* Reverts all tracked tables to an earlier commit.
* @access public
* @param boolean $redirect Whether or not to redirect via PHP.
*/
public function restore( $redirect = true ) {
// Make sure we really want to do this.
if ( ! wp_verify_nonce( $_REQUEST['revisr_revert_nonce'], 'revisr_revert_nonce' ) ) {
wp_die( __( 'Cheatin&#8217; uh?', 'revisr' ) );
}
$commit = $_REQUEST['db_hash'];
/**
* Backup the database and store the resulting commit hash
* in memory so we can use it to create the revert link later.
*/
$msg = sprintf( __( 'Database backup before revert to #%s.', 'revisr' ), $commit );
$this->backup( $msg );
$current_temp = revisr()->git->current_commit();
if ( $current_temp ) {
/**
* If the backup was successful and we have the resulting commit hash,
* run a revert on the sql files for the tracked tables and import them.
*/
$tables = $this->get_tracked_tables();
$checkout = array();
foreach ( $tables as $table ) {
$checkout[$table] = revisr()->git->run( 'checkout', array( $commit, "{$this->backup_dir}revisr_$table.sql" ) );
}
if ( ! in_array( 1, $checkout ) ) {
$import = $this->import();
if ( $import ) {
// Create a link to undo the revert if necessary.
$undo_nonce = wp_nonce_url( admin_url( "admin-post.php?action=process_revert&revert_type=db&db_hash=" . $current_temp ), 'revisr_revert_nonce', 'revisr_revert_nonce' );
$undo_msg = sprintf( __( 'Successfully reverted the database to a previous commit. <a href="%s">Undo</a>', 'revisr' ), $undo_nonce );
// Store the undo link and alert the user.
Revisr_Admin::log( $undo_msg, 'revert' );
Revisr_Admin::alert( $undo_msg );
}
} else {
// There was an error importing the database.
$msg = __( 'Error reverting one or more database tables.', 'revisr' );
Revisr_Admin::log( $msg, 'error' );
Revisr_Admin::alert( $msg, true );
}
// Redirect if necessary.
if ( $redirect !== false ) {
wp_redirect( get_admin_url() . 'admin.php?page=revisr' );
exit();
}
} else {
wp_die( __( 'Something went wrong. Check your settings and try again.', 'revisr' ) );
}
}
/**
* Runs an import of all tracked tables, importing any new tables
* if tracking all_tables, or providing a link to import new tables
* if necessary.
* @access public
* @param array $tables The tables to import.
* @return boolean
*/
public function import( $tables = array() ) {
// The tables currently being tracked.
$tracked_tables = $this->get_tracked_tables();
// Tables that have import files but aren't in the database.
$new_tables = $this->get_tables_not_in_db();
// All tables.
$all_tables = array_unique( array_merge( $new_tables, $tracked_tables ) );
// The URL to replace during import.
$replace_url = revisr()->git->get_config( 'revisr', 'dev-url' ) ? revisr()->git->get_config( 'revisr', 'dev-url' ) : '';
if ( empty( $tables ) ) {
if ( ! empty( $new_tables ) ) {
// If there are new tables that were imported.
if ( isset( revisr()->options['db_tracking'] ) && revisr()->options['db_tracking'] == 'all_tables' ) {
// If the user is tracking all tables, import all tables.
$import = $this->run( 'import', $all_tables, $replace_url );
} else {
// Import only tracked tables, but provide a warning and import link.
$import = $this->run( 'import', $tracked_tables, $replace_url );
$url = wp_nonce_url( get_admin_url() . 'admin-post.php?action=revisr_import_tables_form&TB_iframe=true&width=400&height=225', 'import_table_form', 'import_nonce' );
$msg = sprintf( __( 'New database tables detected. <a class="thickbox" title="Import Tables" href="%s">Click here</a> to view and import.', 'revisr' ), $url );
Revisr_Admin::log( $msg, 'db' );
}
} else {
// If there are no new tables, go ahead and import the tracked tables.
$import = $this->run( 'import', $tracked_tables, $replace_url );
}
} else {
// Import the provided tables.
$import = $this->run( 'import', $tables, $replace_url );
}
return $import;
}
/**
* Commits the database to the repository and pushes if needed.
* @access public
* @param string $commit_msg A custom commit message.
*/
public function commit_db( $commit_msg = '' ) {
if ( '' === $commit_msg ) {
$commit_msg = __( 'Backed up the database with Revisr.', 'revisr' );
}
// Allow for overriding default commit message through the "New Commit" screen.
if ( isset( $_REQUEST['post_title'] ) && $_REQUEST['post_title'] !== '' ) {
$commit_msg = $_REQUEST['post_title'];
}
// Make the commit.
revisr()->git->commit( $commit_msg );
// Push changes if necessary.
revisr()->git->auto_push();
}
/**
* Verifies a backup for a table.
* @access public
* @param string $table The table to check.
* @return boolean
*/
public function verify_backup( $table ) {
if ( ! file_exists( "{$this->backup_dir}revisr_$table.sql" ) || filesize( "{$this->backup_dir}revisr_$table.sql" ) < 100 ) {
return false;
}
return true;
}
}

View file

@ -1,369 +0,0 @@
<?php
/**
* class-revisr-git-callback.php
*
* Processes Git responses and errors.
*
* @package Revisr
* @license GPLv3
* @link https://revisr.io
* @copyright Expanded Fronts, LLC
*/
// Prevent direct access.
if ( ! defined( 'ABSPATH' ) ) exit;
class Revisr_Git_Callback {
/**
* The default success callback. Fired if no callback is provided.
* @access public
* @return array
*/
public function success_( $output = array(), $args = '' ) {
return $output;
}
/**
* The default failure callback, fired if no callback is provided.
* @access public
* @return boolean
*/
public function null_( $output = array(), $args = '' ) {
return false;
}
/**
* Callback for a successful checkout.
* @access public
*/
public function success_checkout( $output = array(), $args = '' ) {
$branch = revisr()->git->current_branch();
$msg = sprintf( __( 'Checked out branch: %s.', 'revisr' ), $branch );
$email_msg = sprintf( __( '%s was switched to branch %s.', 'revisr' ), get_bloginfo(), $branch );
Revisr_Admin::alert( $msg );
Revisr_Admin::log( $msg, 'branch' );
Revisr_Admin::notify(get_bloginfo() . __( ' - Branch Changed', 'revisr'), $email_msg );
}
/**
* Callback for a failed checkout.
* @access public
*/
public function null_checkout( $output = array(), $args = '' ) {
$msg = __( 'There was an error checking out the branch. Check your configuration and try again.', 'revisr' );
Revisr_Admin::alert( $msg, true, $output );
Revisr_Admin::log( $msg, 'error' );
}
/**
* Callback for a successful commit.
* @access public
*/
public function success_commit( $output = array(), $args = '' ) {
$commit_hash = revisr()->git->current_commit();
$commit_msg = $_REQUEST['post_title'];
$view_link = get_admin_url() . 'admin.php?page=revisr_view_commit&commit=' . $commit_hash . '&success=true';
// Log the event.
$msg = sprintf( __( 'Committed <a href="%s">#%s</a> to the local repository.', 'revisr' ), $view_link, $commit_hash );
Revisr_Admin::log( $msg, 'commit' );
// Notify the admin.
$email_msg = sprintf( __( 'A new commit was made to the repository: <br> #%s - %s', 'revisr' ), $commit_hash, $commit_msg );
Revisr_Admin::notify( get_bloginfo() . __( ' - New Commit', 'revisr' ), $email_msg );
// Add a tag if necessary.
if ( isset( $_REQUEST['tag_name'] ) ) {
revisr()->git->tag( $_POST['tag_name'] );
}
// Fires after the commit has been made.
do_action( 'revisr_post_commit', $output );
// Push if necessary.
revisr()->git->auto_push();
// View the commit.
Revisr_Admin::redirect( $view_link );
}
/**
* Callback for a failed commit.
* @access public
*/
public function null_commit( $output = array(), $args = '' ) {
$msg = __( 'There was an error committing the changes to the local repository.', 'revisr' );
$url = get_admin_url() . 'admin.php?page=revisr_new_commit&error=true';
Revisr_Admin::alert( $msg, true, $output );
Revisr_Admin::log( $msg, 'error' );
Revisr_Admin::redirect( $url );
}
/**
* Callback for successful branch deletion.
* @access public
*/
public function success_delete_branch( $output = array(), $args = '' ) {
$branch = $args;
$msg = sprintf( __( 'Deleted branch %s.', 'revisr' ), $branch );
$url = get_admin_url() . 'admin.php?page=revisr_branches&status=delete_success&branch=' . $branch;
$email_msg = sprintf( __( 'The branch "%s" on the repository for %s was deleted.', 'revisr' ), $branch, get_bloginfo() );
Revisr_Admin::log( $msg, 'branch' );
Revisr_Admin::notify( get_bloginfo() . __( ' - Branch Deleted', 'revisr' ), $email_msg );
Revisr_Admin::redirect( $url, true );
}
/**
* Callback for a failed branch deletion.
* @access public
*/
public function null_delete_branch( $output = array(), $args = '' ) {
$branch = $args;
$url = get_admin_url() . 'admin.php?page=revisr_branches&status=delete_fail&branch=' . $branch;
Revisr_Admin::redirect( $url, true );
}
/**
* Renders the number of unpushed/unpulled commits for the AJAX buttons.
* @access public
*/
public function success_count_ajax_btn( $output = array(), $args = '' ) {
$count = count( $output );
if ( 0 != $count && revisr()->git->has_remote() ) {
echo "($count)";
}
exit();
}
/**
* Returns nothing if there are no commits to push/pull.
* @access public
*/
public function null_count_ajax_btn( $output = array(), $args = '' ) {
exit();
}
/**
* Called if the repo initialization was successful.
* Sets up the '.git/config' file for the first time.
* @access public
*/
public function success_init_repo( $output, $args ) {
// Updates the repository properties.
revisr()->git->is_repo = true;
revisr()->git->git_dir = revisr()->git->get_git_dir();
revisr()->git->work_tree = revisr()->git->get_work_tree();
// Clear out any errors.
Revisr_Admin::clear_transients();
// Grab the current user.
$user = wp_get_current_user();
// Set the default username to use in Git.
if ( isset( revisr()->git->options['username'] ) && revisr()->git->options['username'] != '' ) {
revisr()->git->set_config( 'user', 'name', revisr()->git->options['username'] );
} else {
revisr()->git->set_config( 'user', 'name', $user->user_login );
}
// Set the default email to use in Git.
if ( isset( revisr()->git->options['email'] ) && revisr()->git->options['email'] != '' ) {
revisr()->git->set_config( 'user', 'email', revisr()->git->options['email'] );
} else {
revisr()->git->set_config( 'user', 'email', $user->user_email );
}
// Set the default name of the remote.
if ( isset( revisr()->git->options['remote_name'] ) && revisr()->git->options['remote_name'] != '' ) {
$remote_name = revisr()->git->options['remote_name'];
} else {
$remote_name = 'origin';
}
// Add the remote URL in Git if already set in the database.
if ( isset( revisr()->git->options['remote_url'] ) && revisr()->git->options['remote_url'] != '' ) {
revisr()->git->run( 'remote', array( 'add', $remote_name, revisr()->git->options['remote_url'] ) );
}
// Adds an .htaccess file to the "/.git" directory to prevent public access.
if ( is_writable( revisr()->git->git_dir ) ) {
file_put_contents( revisr()->git->git_dir . DIRECTORY_SEPARATOR . '.htaccess', 'Deny from all' . PHP_EOL );
}
// Fires after the repo has been created.
do_action( 'revisr_post_init', $output );
// Alerts the user.
Revisr_Admin::log( __( 'Successfully created a new repository.', 'revisr' ), 'init' );
// Redirect if necessary (through skipped/legacy setup).
if ( ! defined( 'REVISR_SETUP_INIT' ) ) {
Revisr_Admin::redirect( get_admin_url() . 'admin.php?page=revisr_settings&init=success' );
}
// Return true if we haven't exited already.
return true;
}
/**
* Returns if an initialization failed.
* @access public
*/
public function null_init_repo() {
// Redirect if necessary (through skipped/legacy setup).
if ( ! defined( 'REVISR_SETUP_INIT' ) ) {
Revisr_Admin::log( __( 'Failed to initialize a new repository. Please make sure that Git is installed on the server and that Revisr has write permissons to the WordPress install.', 'revisr' ), 'error' );
Revisr_Admin::redirect();
}
// Return false if we haven't exited already.
return false;
}
/**
* Returns if a merge was successful.
* @access public
*/
public function success_merge( $output = array(), $args = '' ) {
$alert_msg = sprintf( __( 'Successfully merged changes from branch %s into branch %s.', 'revisr' ), $_REQUEST['branch'], revisr()->git->branch );
$log_msg = sprintf( __( 'Merged branch %s into branch %s.', 'revisr' ), $_REQUEST['branch'], revisr()->git->branch );
Revisr_Admin::alert( $alert_msg );
Revisr_Admin::log( $log_msg, 'merge' );
// Fires after a successful merge.
do_action( 'revisr_post_merge', $output );
Revisr_Admin::redirect();
}
/**
* Returns if a merge failed.
* @access public
*/
public function null_merge( $output = array(), $args = '' ) {
$log_msg = sprintf( __( 'Error merging branch %s into %s.', 'revisr'), $_REQUEST['branch'], revisr()->git->branch );
$alert_msg = sprintf( __( 'There was an error merging branch %s into your current branch. The merge was aborted to avoid conflicts.', 'revisr' ), $_REQUEST['branch'] );
Revisr_Admin::alert( $alert_msg, true, $output );
Revisr_Admin::log( $log_msg, 'error' );
Revisr_Admin::redirect();
}
/**
* Returns if a pull was successful.
* @access public
*/
public function success_pull( $output = array(), $args = array() ) {
$commits_since = $args;
$num_commits = count( $commits_since );
if ( 0 === $num_commits ) {
$msg = __( 'The local repository is already up-to-date with the remote repository.', 'revisr' );
Revisr_Admin::alert( $msg );
} else {
foreach ( $commits_since as $commit ) {
$commit_hash = substr( $commit, 0, 7 );
$view_link = get_admin_url() . 'admin.php?page=revisr_view_commit&commit=' . $commit_hash;
$msg = sprintf( __( 'Pulled <a href="%s">#%s</a> from %s/%s.', 'revisr' ), $view_link, $commit_hash, revisr()->git->remote, revisr()->git->branch );
Revisr_Admin::log( $msg, 'pull' );
}
$msg = sprintf( _n( 'Successfully pulled %s commit from %s/%s.', 'Successfully pulled %s commits from %s/%s.', $num_commits, 'revisr' ), $num_commits, revisr()->git->remote, revisr()->git->branch );
Revisr_Admin::alert( $msg );
// Fires just after a successful pull.
do_action( 'revisr_post_pull', $output );
if ( revisr()->git->get_config( 'revisr', 'import-pulls' ) === 'true' ) {
revisr()->db->import();
}
}
}
/**
* Returns if a pull failed.
* @access public
* @return boolean
*/
public function null_pull( $output = array(), $args = '' ) {
$msg = __( 'There was an error pulling from the remote repository. The local repository could be ahead, or there may be an authentication issue.', 'revisr' );
Revisr_Admin::alert( $msg, true, $output );
Revisr_Admin::log( __( 'Error pulling changes from the remote repository.', 'revisr' ), 'error' );
return false;
}
/**
* Returns if a push was successful.
* @access public
*/
public function success_push( $output = array(), $args = '' ) {
$msg = sprintf( _n( 'Successfully pushed %s commit to %s/%s.', 'Successfully pushed %s commits to %s/%s.', $args, 'revisr' ), $args, revisr()->git->remote, revisr()->git->branch );
Revisr_Admin::alert( $msg );
Revisr_Admin::log( $msg, 'push' );
// Fires after a successful push.
do_action( 'revisr_post_push', $output );
if ( revisr()->git->get_config( 'revisr', 'webhook-url' ) !== false ) {
$remote = new Revisr_Remote();
$remote->send_request();
}
}
/**
* Returns if a push failed.
* @access public
*/
public function null_push( $output = array(), $args = '' ) {
$msg = __( 'Error pushing to the remote repository. The remote repository could be ahead, or there may be an authentication issue.', 'revisr' );
Revisr_Admin::alert( $msg, true, $output );
Revisr_Admin::log( __( 'Error pushing changes to the remote repository.', 'revisr' ), 'error' );
return;
}
/**
* Returns "Success!" if the connection to remote was successful.
* @access public
*/
public function success_verify_remote( $output = array(), $args = '' ) {
_e( 'Success!', 'revisr' );
exit();
}
/**
* Returns if the connection to the remote was unsuccessful.
* @access public
*/
public function null_verify_remote( $output = array(), $args = '' ) {
_e( 'Remote not found...', 'revisr' );
exit();
}
/**
* Returns the Git version.
* @access public
*/
public function success_version( $output = array(), $args = '' ) {
return $output['0'];
}
/**
* Returns if Revisr could not detect the Git version.
* @access public
*/
public function null_version( $output = array(), $args = '' ) {
return __( 'Unknown', 'revisr' );
}
}

View file

@ -1,802 +0,0 @@
<?php
/**
* class-revisr-git.php
*
* Processes interactions with Git.
*
* @package Revisr
* @license GPLv3
* @link https://revisr.io
* @copyright Expanded Fronts, LLC
*/
// Prevent direct access.
if ( ! defined( 'ABSPATH' ) ) exit;
// The main Git class.
class Revisr_Git {
/**
* Stores the current branch in Git.
* @var string
*/
public $branch;
/**
* Stores the current remote used by Git.
* @var string
*/
public $remote;
/**
* Stores the ID of the current commit.
* @var string
*/
public $current_commit;
/**
* Stores the current directory during runtime.
* @var string
*/
public $current_dir;
/**
* Stores the path to the .git directory.
* @var string
*/
public $git_dir;
/**
* Stores the path to the working directory.
* @var string
*/
public $work_tree;
/**
* Stores the path to Git.
* @var string
*/
public $git_path;
/**
* Stores the state of the repository
* @var boolean
*/
public $is_repo;
/**
* Initiates the class and it's properties.
* @access public
*/
public function __construct() {
// Necessary for execution of Revisr.
$this->is_repo = true;
$this->current_dir = getcwd();
$this->git_path = $this->get_git_path();
$this->git_dir = $this->get_git_dir();
$this->work_tree = $this->get_work_tree();
// Make sure the provided Git directory is valid.
$this->check_work_tree();
// Load up information about the current repository.
if ( $this->is_repo ) {
$this->branch = $this->current_branch();
$this->remote = $this->current_remote();
$this->current_commit = $this->current_commit();
}
}
/**
* Runs a Git command and fires the given callback.
* @access public
* @param string $command The command to use.
* @param array $args Arguements provided by user.
* @param string $callback The callback to use.
* @param string|array $info Additional info to pass to the callback
*/
public function run( $command, $args, $callback = '', $info = '' ) {
// Setup the command for safe usage.
$safe_path = Revisr_Admin::escapeshellarg( $this->git_path );
$safe_cmd = Revisr_Admin::escapeshellarg( $command );
$safe_args = join( ' ', array_map( array( 'Revisr_Admin', 'escapeshellarg' ), $args ) );
// Allow for customizing the git work-tree and git-dir paths.
$git_dir = Revisr_Admin::escapeshellarg( "--git-dir=$this->git_dir" );
$work_tree = Revisr_Admin::escapeshellarg( "--work-tree=$this->work_tree" );
// Run the command.
chdir( $this->work_tree );
exec( "$safe_path $git_dir $work_tree $safe_cmd $safe_args 2>&1", $output, $return_code );
chdir( $this->current_dir );
// Process the response.
$response = new Revisr_Git_Callback();
$success_callback = 'success_' . $callback;
$failure_callback = 'null_' . $callback;
// Return the callback.
if ( 0 !== $return_code ) {
return $response->$failure_callback( $output, $info );
} else {
return $response->$success_callback( $output, $info );
}
}
/**
* Checks if the provided path is a Git repository.
* @access public
* @param string $dir The directory to check (optional).
* @return boolean
*/
public function check_work_tree( $dir = '' ) {
// If no dir provided, use constant.
if ( '' === $dir ) {
$dir = $this->get_work_tree();
}
// Definitely bail if not a directory.
if ( ! is_dir( $dir ) ) {
return false;
}
$this->work_tree = $dir;
// Check with Git binary if repo is detected.
$git_toplevel = $this->run( 'rev-parse', array( '--show-toplevel' ) );
// If not, set the is_repo flag to false.
if ( ! $git_toplevel ) {
$this->is_repo = false;
return false;
}
return true;
}
/**
* Returns the path to the top-level Git directory.
* @access public
* @return string The path to the top-level Git directory.
*/
public function get_git_dir() {
if ( defined( 'REVISR_GIT_DIR' ) && is_dir( REVISR_GIT_DIR ) ) {
// Force removal of trailing slash upfront.
$git_dir = rtrim( REVISR_GIT_DIR, DIRECTORY_SEPARATOR );
if ( is_dir( REVISR_GIT_DIR . DIRECTORY_SEPARATOR . '.git' ) ) {
// Workaround for backwards compatibility.
if ( ! defined( 'REVISR_WORK_TREE' ) ) {
// Define the REVISR_WORK_TREE constant to match the old REVISR_GIT_DIR constant.
define( 'REVISR_WORK_TREE', REVISR_GIT_DIR );
$line = "define('REVISR_WORK_TREE', '" . REVISR_GIT_DIR . "');";
Revisr_Admin::replace_config_line( 'define *\( *\'REVISR_WORK_TREE\'', $line );
// Update the old REVISR_GIT_DIR constant.
$git_dir = REVISR_GIT_DIR . DIRECTORY_SEPARATOR . '.git';
$line = "define('REVISR_GIT_DIR', '" . REVISR_GIT_DIR . DIRECTORY_SEPARATOR . ".git');";
Revisr_Admin::replace_config_line( 'define *\( *\'REVISR_GIT_DIR\'', $line );
}
} else {
$git_dir = REVISR_GIT_DIR;
}
} else {
// Best guess.
$git_dir = $this->get_work_tree() . DIRECTORY_SEPARATOR . '.git';
}
return $git_dir;
}
/**
* Returns the current path to Git.
* @access public
* @return string The path to the installation of Git.
*/
public function get_git_path() {
if ( defined( 'REVISR_GIT_PATH' ) && file_exists( REVISR_GIT_PATH ) ) {
return REVISR_GIT_PATH;
} else {
// This is surprisingly still the best option
// given the huge amount of possible install paths,
// and ~90% of the time this will work anyway.
return 'git';
}
}
/**
* Returns the path to the Git work-tree in exec() friendly format.
* @access public
* @return string
*/
public function get_work_tree() {
if ( defined( 'REVISR_WORK_TREE' ) && is_dir( REVISR_WORK_TREE ) ) {
$work_tree = REVISR_WORK_TREE;
} else {
$work_tree = ABSPATH;
}
// Remove trailing slash.
$work_tree = rtrim( $work_tree, DIRECTORY_SEPARATOR );
return $work_tree;
}
/**
* Pushes changes if "Automatically push new commits" is enabled.
* @access public
*/
public function auto_push() {
// Allow for preventing auto-push on a per-commit basis.
if ( isset( $_REQUEST['autopush_enabled'] ) && ! isset( $_REQUEST['auto_push'] ) ) {
return;
}
// Push the changes if needed.
if ( $this->get_config( 'revisr', 'auto-push' ) === 'true' || isset( $_REQUEST['auto_push'] ) ) {
$this->push();
}
}
/**
* Checks out an existing branch.
* @access public
* @param string $branch The branch to checkout.
*/
public function checkout( $branch, $new_branch = false ) {
if ( $new_branch ) {
$args = array( '-b', $branch, '-q' );
} else {
$args = array( $branch, '-q' );
}
$this->run( 'checkout', $args, __FUNCTION__ );
}
/**
* Commits any staged files to the local repository.
* @access public
* @param string $message The message to use with the commit.
* @param string $callback The callback to run.
*/
public function commit( $message, $callback = '' ) {
if ( is_user_logged_in() ) {
$current_user = wp_get_current_user();
$author = "$current_user->user_login <$current_user->user_email>";
$commit = $this->run( 'commit', array( '-m', $message, '--author', $author ), $callback );
} else {
$commit = $this->run( 'commit', array( '-m', $message ), $callback );
}
return $commit;
}
/**
* Sets a value in the .git/config.
* @access public
* @param string $section The section to store/update the value for.
* @param string $key The key for the value which is being updated.
* @param string $value The value to set.
* @return boolean
*/
public function set_config( $section, $key, $value ) {
if ( ! $this->run( 'config', array( "$section.$key", $value ) ) ) {
return false;
}
return true;
}
/**
* Gets a single value from the config.
* @access public
* @param string $section The section to check from.
* @param string $key The key who's value to grab.
* @return string|boolean
*/
public function get_config( $section, $key ) {
$result = $this->run( 'config', array( '--get', "$section.$key" ) );
if ( is_array( $result ) ) {
return $result[0];
} elseif ( is_string( $result ) ) {
return $result;
} else {
return false;
}
}
/**
* Returns the number of unpulled commits.
* @access public
*/
public function count_unpulled( $ajax_btn = true ) {
$this->fetch();
if ( true === $ajax_btn ) {
$this->run( 'log', array( $this->branch . '..' . $this->remote . '/' . $this->branch, '--pretty=oneline' ), 'count_ajax_btn' );
} else {
$unpulled = $this->run( 'log', array( $this->branch . '..' . $this->remote . '/' . $this->branch, '--pretty=oneline' ) );
return count( $unpulled );
}
}
/**
* Returns the number of unpushed commits.
* @access public
*/
public function count_unpushed( $ajax_btn = true ) {
if ( true === $ajax_btn ) {
$this->run( 'log', array( $this->branch, '--not', '--remotes', '--oneline' ), 'count_ajax_btn' );
} else {
$unpushed = $this->run( 'log', array( $this->branch, '--not', '--remotes', '--oneline' ) );
return count( $unpushed );
}
}
/**
* Returns the number of untracked/modified files.
* @access public
*/
public function count_untracked() {
$untracked = $this->run( 'status', array( '--short', '--untracked-files=all' ) );
return count( $untracked );
}
/**
* Creates a new branch.
* @access public
* @param string $branch The name of the branch to create.
*/
public function create_branch( $branch ) {
$new_branch = $this->run( 'branch', array( $branch ) );
return $new_branch;
}
/**
* Returns the current branch.
* @access public
*/
public function current_branch() {
$current_branch = $this->run( 'rev-parse', array( '--abbrev-ref', 'HEAD' ) );
if ( $current_branch != false && is_array( $current_branch ) ) {
return $current_branch[0];
}
}
/**
* Returns the hash of the current commit.
* @access public
*/
public function current_commit() {
$commit_hash = $this->run( 'rev-parse', array( '--short', 'HEAD' ) );
if ( is_array( $commit_hash ) ) {
return $commit_hash[0];
}
}
/**
* Returns the name of the current remote.
* @access public
* @return string
*/
public function current_remote() {
$remote = $this->get_config( 'revisr', 'current-remote' );
if ( ! $remote ) {
$remote = 'origin';
}
return $remote;
}
/**
* Deletes a local or remote branch.
* @access public
* @param string $branch The branch to delete.
* @param boolean $redirect Whether or not to redirect on completion.
* @param boolean $remote Whether $branch is a local or remote branch.
* @return mixed
*/
public function delete_branch( $branch, $redirect = true, $remote = false ) {
$callback = '';
if ( $redirect ) {
$callback = __FUNCTION__;
}
if ( $remote ) {
$deletion = $this->run( 'push', array( $this->remote, ":$branch" ), $callback, $branch );
} else {
$deletion = $this->run( 'branch', array( '-D', $branch ), $callback, $branch );
}
return $deletion;
}
/**
* Fetches changes without merging them.
* @access public
*/
public function fetch() {
$fetch = $this->run( 'fetch', array() );
return $fetch;
}
/**
* Returns available branches on the local or remote repository.
* @access public
* @param boolean $remote If set to true, will retrieve the remote branches.
*/
public function get_branches( $remote = false ) {
$params = array();
if ( true === $remote ) {
$params[] = '-r';
}
return $this->run( 'branch', $params );
}
/**
* Returns the date of last update for a branch/ref.
* @access public
* @return string
*/
public function get_branch_last_updated( $branch, $format = '' ) {
$last_updated = $this->run( 'log', array( $branch, '-1', '--format=%cd', '--date=relative' ) );
if ( $last_updated ) {
return $last_updated[0];
} else {
return __( 'Unknown', 'revisr' );
}
}
/**
* Returns the author of a provided commit.
* @access public
* @param string $commit_hash The hash of the commit to get the author of.
* @return string|boolean
*/
public function get_commit_author_by_hash( $commit_hash ) {
$author = $this->run( 'log', array( '-1', '--format=%an', $commit_hash ) );
if ( is_array( $author ) ) {
return $author[0];
}
return false;
}
/**
* Returns an array of details on the provided commit.
* @access public
* @param string $hash The SHA1 of the commit to check.
* @return array
*/
public static function get_commit_details( $hash ) {
// Build an associative array of details.
$commit_details = array(
'hash' => $hash,
'branch' => '',
'author' => '',
'subject' => __( 'Commit not found', 'revisr' ),
'time' => time(),
'files_changed' => 0,
'committed_files' => array(),
'has_db_backup' => false,
'tag' => '',
'status' => false,
);
// Try to get some basic data about the commit.
$commit = revisr()->git->run( 'show', array( '--pretty=format:%s|#|%an|#|%at', '--name-status', '--root', '-r', $hash ) );
if ( is_array( $commit ) ) {
$commit_meta = $commit[0];
$commit_meta = explode( '|#|', $commit_meta );
unset( $commit[0] );
$commit_details['subject'] = $commit_meta[0];
$commit_details['author'] = $commit_meta[1];
$commit_details['time'] = $commit_meta[2];
$commit = array_filter( $commit );
$backed_up_tables = preg_grep( '/revisr.*sql/', $commit );
if ( 0 !== count( $backed_up_tables ) ) {
$commit_details['has_db_backup'] = true;
}
$commit_details['files_changed'] = count( $commit );
$commit_details['committed_files'] = $commit;
$branches = revisr()->git->run( 'branch', array( '--contains', $hash ) );
$commit_details['branch'] = is_array( $branches ) ? implode( ', ', $branches ) : __( 'Unknown', 'revisr' );
$commit_details['status'] = __( 'Committed', 'revisr' );
}
// Return the array.
return $commit_details;
}
/**
* Returns the status of a file.
* @access public
* @param string $status The status code returned via 'git status --short'
*/
public static function get_status( $status ) {
if ( strpos( $status, 'M' ) !== false ){
$status = __( 'Modified', 'revisr' );
} elseif ( strpos( $status, 'D' ) !== false ){
$status = __( 'Deleted', 'revisr' );
} elseif ( strpos( $status, 'A' ) !== false ){
$status = __( 'Added', 'revisr' );
} elseif ( strpos( $status, 'R' ) !== false ){
$status = __( 'Renamed', 'revisr' );
} elseif ( strpos( $status, 'U' ) !== false ){
$status = __( 'Updated', 'revisr' );
} elseif ( strpos( $status, 'C' ) !== false ){
$status = __( 'Copied', 'revisr' );
} elseif ( strpos( $status, '??' ) !== false ){
$status = __( 'Untracked', 'revisr' );
} else {
$status = false;
}
return $status;
}
/**
* Checks if the repo has a remote.
* @access public
* @return boolean
*/
public function has_remote() {
if ( $this->get_config( 'remote', 'origin.url' ) ) {
return true;
}
return false;
}
/**
* Initializes a new repository.
* @access public
*/
public function init_repo() {
$init = $this->run( 'init', array( '.' ), __FUNCTION__ );
return $init;
}
/**
* Checks if the provided branch is an existing branch.
* @access public
* @param string $branch The name of the branch to check.
* @return boolean
*/
public function is_branch( $branch ) {
$branches = $this->get_branches();
if ( in_array( $branch, $branches ) || in_array( "* $branch", $branches ) || in_array( " $branch", $branches ) ) {
return true;
} else {
return false;
}
}
/**
* Merges a branch into the current branch.
* @access public
* @param string $branch The branch to merge into the current branch.
*/
public function merge( $branch ) {
$this->reset();
$merge = $this->run( 'merge', array( $branch, '--strategy-option', 'theirs' ), __FUNCTION__ );
return $merge;
}
/**
* Pulls changes from the remote repository.
* @access public
* @param array $commits The commits we're pulling (used in callback).
*/
public function pull( $commits = array() ) {
$this->reset();
$pull = $this->run( 'pull', array( '-Xtheirs', '--quiet', $this->remote, $this->branch ), __FUNCTION__, $commits );
return $pull;
}
/**
* Pushes changes to the remote repository.
* @access public
*/
public function push() {
$push = $this->run( 'push', array( $this->remote, 'HEAD', '--quiet' ), __FUNCTION__, $this->count_unpushed( false ) );
return $push;
}
/**
* Resets the working directory.
* @access public
* @param string $mode The mode to use for the reset (hard, soft, etc.).
* @param string $path The path to apply the reset to.
* @param boolean $clean Whether to remove any untracked files.
* @return boolean
*/
public function reset( $mode = '--hard', $path = 'HEAD', $clean = false ) {
if ( $this->run( 'reset', array( $mode, $path ) ) ) {
if ( true === $clean ) {
if ( ! $this->run( 'clean', array( '-f', '-d' ) ) ) {
return false;
}
}
return true;
}
return false;
}
/**
* Reverts the working directory to a specified commit.
* @access public
* @param string $commit The hash of the commit to revert to.
*/
public function revert( $commit ) {
$this->reset( '--hard', 'HEAD', true );
$this->reset( '--hard', $commit );
$this->reset( '--soft', 'HEAD@{1}' );
}
/**
* Stages the array of files passed through the New Commit screen.
* @access public
* @param array $staged_files An array of files to add/remove.
* @param boolean $stage_all If set to true, skip the loop and add -A.
* @return boolean
*/
public function stage_files( $staged_files, $stage_all = false ) {
// An empty array for errors.
$errors = array();
if ( true === $stage_all ) {
if ( $this->run( 'add', array( '-A' ) ) === false ) {
$errors[] = $staged_files;
}
} else {
foreach ( $staged_files as $result ) {
$file = substr( $result, 3 );
$status = self::get_status( substr( $result, 0, 2 ) );
if ( $status == __( 'Deleted', 'revisr' ) ) {
if ( $this->run( 'rm', array( $file ) ) === false ) {
$errors[] = $file;
}
} else {
if ( $this->run( 'add', array( $file ) ) === false ) {
$errors[] = $file;
}
}
}
}
if ( ! empty( $errors ) ) {
$msg = __( 'There was an error staging the files. Please check the settings and try again.', 'revisr' );
Revisr_Admin::alert( $msg, true );
Revisr_Admin::log( __( 'Error staging files.', 'revisr' ), 'error' );
return false;
}
return true;
}
/**
* Returns the current status.
* @access public
* @param array $args Defaults to "--short".
*/
public function status( $args = array( '--short', '--untracked-files=all' ) ) {
$status = $this->run( 'status', $args );
return $status;
}
/**
* Adds a tag to the repository, or returns a list of tags if no parameters are passed.
* @access public
* @param string $tag The tag to add.
*/
public function tag( $tag = '' ) {
$tag = $this->run( 'tag', array( $tag ) );
return $tag;
}
/**
* Updates the .gitignore file, and removes files from version control,
* making sure to keep the physical copies of the files on the server.
* @access public
*/
public function update_gitignore() {
// Store the content in the .gitignore.
file_put_contents( $this->work_tree . DIRECTORY_SEPARATOR . '.gitignore', revisr()->options['gitignore'] );
// Add the .gitignore.
$this->run( 'add', array( '.gitignore' ) );
// Convert the .gitignore into an array we can work with.
$files = explode( PHP_EOL, revisr()->options['gitignore'] );
foreach ( $files as $file ) {
if ( '' == $file || '!' === $file[0] ) {
// Don't do anything.
continue;
} else {
/**
* Remove the cached version of the file,
* leaving it intact in the working directory.
*/
$this->run( 'rm', array( '--cached', $file ) );
}
}
// Commit the updates.
$commit_msg = __( 'Updated .gitignore.', 'revisr' );
$this->run( 'commit', array( '-m', $commit_msg ) );
$this->auto_push();
}
/**
* Pings a remote repository to verify that it exists and is reachable.
* @access public
* @param string $remote The remote to ping.
*/
public function verify_remote( $remote = '' ) {
if ( $remote != '' ) {
$ping = $this->run( 'ls-remote', array( $remote, 'HEAD' ), __FUNCTION__ );
} else {
$ping = $this->run( 'ls-remote', array( $_REQUEST['remote'], 'HEAD' ), __FUNCTION__ );
}
return $ping;
}
/**
* Returns the current version of Git.
* @access public
*/
public function version() {
$version = $this->run( 'version', array(), __FUNCTION__ );
return $version;
}
}

View file

@ -1,49 +0,0 @@
<?php
/**
* class-revisr-i18n.php
*
* Defines the internationalization functionality.
*
* Loads and defines the internationalization files for this plugin
* so that its ready for translation.
*
* @package Revisr
* @license GPLv3
* @link https://revisr.io
* @copyright Expanded Fronts, LLC
*/
// Prevent direct access.
if ( ! defined( 'ABSPATH' ) ) exit;
class Revisr_i18n {
/**
* The domain specified for this plugin.
* @access private
* @var string $domain The domain identifier for this plugin.
*/
private $domain;
/**
* Load the plugin text domain for translation.
* @access public
*/
public function load_plugin_textdomain() {
load_plugin_textdomain(
$this->domain,
false,
dirname( dirname( plugin_basename( __FILE__ ) ) ) . 'languages/'
);
}
/**
* Set the domain equal to that of the specified domain.
* @access public
* @param string $domain The domain that represents the locale of this plugin.
*/
public function set_domain( $domain ) {
$this->domain = $domain;
}
}

View file

@ -1,284 +0,0 @@
<?php
/**
* class-revisr-meta-boxes.php
*
* Configures custom metaboxes for the plugin.
*
* @package Revisr
* @license GPLv3
* @link https://revisr.io
* @copyright Expanded Fronts, LLC
*/
// Prevent direct access.
if ( ! defined( 'ABSPATH' ) ) exit;
class Revisr_Meta_Boxes {
/**
* Adds actions responsible for triggering our custom meta boxes.
* @access public
*/
public function add_meta_box_actions() {
do_action( 'add_meta_boxes_admin_page_revisr_new_commit', null );
do_action( 'add_meta_boxes', 'admin_page_revisr_new_commit', null );
do_action( 'add_meta_boxes_admin_page_revisr_view_commit', null );
do_action( 'add_meta_boxes', 'admin_page_revisr_view_commit', null );
wp_enqueue_script( 'postbox' );
add_screen_option( 'layout_columns', array( 'max' => 2, 'default' => 2 ) );
}
/**
* Initializes JS for the Revisr custom meta boxes.
* @access public
*/
public function init_meta_boxes() {
?>
<script>jQuery(document).ready(function(){ postboxes.add_postbox_toggles(pagenow); });</script>
<?php
}
/**
* Adds/removes meta boxes for the "revisr_commits" post type.
* @access public
*/
public function post_meta() {
add_meta_box( 'revisr_committed_files', __( 'Committed Files', 'revisr' ), array( $this, 'committed_files_meta' ), 'admin_page_revisr_view_commit', 'normal', 'high' );
add_meta_box( 'revisr_view_commit', __( 'Commit Details', 'revisr' ), array( $this, 'view_commit_meta' ), 'admin_page_revisr_view_commit', 'side', 'core' );
add_meta_box( 'revisr_pending_files', __( 'Stage Changes', 'revisr' ), array( $this, 'pending_files_meta' ), 'admin_page_revisr_new_commit', 'normal', 'high' );
add_meta_box( 'revisr_add_tag', __( 'Add Tag', 'revisr' ), array( $this, 'add_tag_meta' ), 'admin_page_revisr_new_commit', 'side', 'default' );
add_meta_box( 'revisr_save_commit', __( 'Save Commit', 'revisr' ), array( $this, 'save_commit_meta' ), 'admin_page_revisr_new_commit', 'side', 'core' );
}
/**
* Shows a list of the pending files on the current branch. Clicking a modified file shows the diff.
* @access public
*/
public function pending_files() {
check_ajax_referer( 'staging_nonce', 'security' );
$output = revisr()->git->status();
$total_pending = count( $output );
$text = sprintf( __( 'There are <strong>%s</strong> untracked files that can be added to this commit.', 'revisr' ), $total_pending, revisr()->git->branch );
echo "<br>" . $text . "<br><br>";
_e( 'Use the boxes below to select the files to include in this commit. Only files in the "Staged Files" section will be included.<br>Double-click files marked as "Modified" to view the changes to the file.<br><br>', 'revisr' );
if ( is_array( $output ) ) {
?>
<!-- Staging -->
<div class="stage-container">
<p><strong><?php _e( 'Staged Files', 'revisr' ); ?></strong></p>
<select id='staged' multiple="multiple" name="staged_files[]" size="6">
<?php
// Clean up output from git status and echo the results.
foreach ( $output as $result ) {
$result = str_replace( '"', '', $result );
$short_status = substr( $result, 0, 3 );
$file = substr( $result, 3 );
$status = Revisr_Git::get_status( $short_status );
echo "<option class='pending' value='{$result}'>{$file} [{$status}]</option>";
}
?>
</select>
<div class="stage-nav">
<input id="unstage-file" type="button" class="button button-primary stage-nav-button" value="<?php _e( 'Unstage Selected', 'revisr' ); ?>" onclick="unstage_file()" />
<br>
<input id="unstage-all" type="button" class="button stage-nav-button" value="<?php _e( 'Unstage All', 'revisr' ); ?>" onclick="unstage_all()" />
</div>
</div><!-- /Staging -->
<br>
<!-- Unstaging -->
<div class="stage-container">
<p><strong><?php _e( 'Unstaged Files', 'revisr' ); ?></strong></p>
<select id="unstaged" multiple="multiple" name="unstaged_files[]" size="6">
</select>
<div class="stage-nav">
<input id="stage-file" type="button" class="button button-primary stage-nav-button" value="<?php _e( 'Stage Selected', 'revisr' ); ?>" onclick="stage_file()" />
<br>
<input id="stage-all" type="button" class="button stage-nav-button" value="<?php _e( 'Stage All', 'revisr' ); ?>" onclick="stage_all()" />
</div>
</div><!-- /Unstaging -->
<?php
}
exit();
}
/**
* Shows the files that were added in a given commit.
* @access public
*/
public function committed_files_meta() {
// Get details about the commit.
$commit_hash = isset( $_GET['commit'] ) ? esc_attr( $_GET['commit'] ) : '';
$commit = Revisr_Git::get_commit_details( $commit_hash );
// Start outputting the metabox.
echo '<div id="message"></div><div id="committed_files_result">';
// Files were included in this commit.
if ( 0 !== count( $commit['committed_files'] ) ) {
printf( __('<br><strong>%s</strong> files were included in this commit. Double-click files marked as "Modified" to view the changes in a diff.', 'revisr' ), $commit['files_changed'] );
echo '<input id="commit_hash" name="commit_hash" value="' . $commit['hash'] . '" type="hidden" />';
echo '<br><br><select id="committed" multiple="multiple" size="6">';
// Display the files that were included in the commit.
foreach ( $commit['committed_files'] as $result ) {
$result = str_replace( '"', '', $result );
$short_status = substr( $result, 0, 3 );
$file = substr( $result, 2 );
$status = Revisr_Git::get_status( $short_status );
printf( '<option class="committed" value="%s">%s [%s]</option>', $result, $file, $status );
}
echo '</select>';
} else {
printf( '<p>%s</p>', __( 'No files were included in this commit.', 'revisr' ) );
}
echo '</div>';
}
/**
* Displays the "Add Tag" meta box on the sidebar.
* @access public
*/
public function add_tag_meta() {
printf(
'<label for="tag_name"><p>%s</p></label>
<input id="tag_name" type="text" name="tag_name" />',
__( 'Tag Name:', 'revisr' )
);
}
/**
* Displays the "Save Commit" meta box in the sidebar.
* @access public
*/
public function save_commit_meta() {
?>
<div id="minor-publishing">
<div id="misc-publishing-actions">
<div class="misc-pub-section revisr-pub-status">
<label for="post_status"><?php _e( 'Status:', 'revisr' ); ?></label>
<span><strong><?php _e( 'Pending', 'revisr' ); ?></strong></span>
</div>
<div class="misc-pub-section revisr-pub-branch">
<label for="revisr-branch" class="revisr-octicon-label"><?php _e( 'Branch:', 'revisr' ); ?></label>
<span><strong><?php echo revisr()->git->branch; ?></strong></span>
</div>
<div class="misc-pub-section revisr-backup-cb">
<span><input id="revisr-backup-cb" type="checkbox" name="backup_db" /></span>
<label for="revisr-backup-cb"><?php _e( 'Backup database?', 'revisr' ); ?></label>
</div>
<div class="misc-pub-section revisr-push-cb">
<?php if ( revisr()->git->get_config( 'revisr', 'auto-push' ) == 'true' ): ?>
<input type="hidden" name="autopush_enabled" value="true" />
<span><input id="revisr-push-cb" type="checkbox" name="auto_push" checked /></span>
<?php else: ?>
<span><input id="revisr-push-cb" type="checkbox" name="auto_push" /></span>
<?php endif; ?>
<label for="revisr-push-cb"><?php _e( 'Push changes?', 'revisr' ); ?></label>
</div>
</div><!-- /#misc-publishing-actions -->
</div>
<div id="major-publishing-actions">
<div id="delete-action"></div>
<div id="publishing-action">
<span id="revisr-spinner" class="spinner"></span>
<?php wp_nonce_field( 'process_commit', 'revisr_commit_nonce' ); ?>
<input type="submit" name="publish" id="commit" class="button button-primary button-large" value="<?php _e( 'Commit Changes', 'revisr' ); ?>" onclick="commit_files();" accesskey="p">
</div>
<div class="clear"></div>
</div>
<?php
}
/**
* Displays the "Commit Details" meta box on a previous commit.
* @access public
*/
public function view_commit_meta() {
// Get details about the commit.
$commit_hash = isset( $_GET['commit'] ) ? esc_attr( $_GET['commit'] ) : '';
$commit = Revisr_Git::get_commit_details( $commit_hash );
$revert_url = get_admin_url() . 'admin-post.php?action=revisr_revert_form&commit=' . $commit_hash . '&TB_iframe=true&width=350&height=200';
$time_format = __( 'M j, Y @ G:i' );
$timestamp = sprintf( __( 'Committed on: <strong>%s</strong>', 'revisr' ), date_i18n( $time_format, $commit['time'] ) );
if ( false === $commit['status'] ) {
$commit['status'] = __( 'Error', 'revisr' );
$revert_btn = '<a class="button button-primary disabled" href="#">' . __( 'Revert to this Commit', 'revisr' ) . '</a>';
} else {
$revert_btn = '<a class="button button-primary thickbox" href="' . $revert_url . '" title="' . __( 'Revert', 'revisr' ) . '">' . __( 'Revert to this Commit', 'revisr' ) . '</a>';
}
?>
<div id="minor-publishing">
<div id="misc-publishing-actions">
<div class="misc-pub-section revisr-pub-status">
<label for="post_status"><?php _e( 'Status:', 'revisr' ); ?></label>
<span><strong><?php echo $commit['status']; ?></strong></span>
</div>
<div class="misc-pub-section revisr-pub-branch">
<label for="revisr-branch" class="revisr-octicon-label"><?php _e( 'Branch:', 'revisr' ); ?></label>
<span><strong><?php echo $commit['branch']; ?></strong></span>
</div>
<div class="misc-pub-section curtime misc-pub-curtime">
<span id="timestamp" class="revisr-timestamp"><?php echo $timestamp; ?></span>
</div>
<?php if ( $commit['tag'] !== '' ): ?>
<div class="misc-pub-section revisr-git-tag">
<label for="revisr-tag" class="revisr-octicon-label"><?php _e( 'Tagged:', 'revisr' ); ?></label>
<span><strong><?php echo $commit['tag']; ?></strong></span>
</div>
<?php endif; ?>
</div><!-- /#misc-publishing-actions -->
</div>
<div id="major-publishing-actions">
<div id="delete-action"></div>
<div id="publishing-action">
<span id="revisr-spinner" class="spinner"></span>
<?php echo $revert_btn; ?>
</div>
<div class="clear"></div>
</div>
<?php
}
/**
* The container for the staging area.
* @access public
*/
public function pending_files_meta() {
echo "<div id='message'></div>
<div id='pending_files_result'></div>";
}
}

View file

@ -1,444 +0,0 @@
<?php
/**
* class-revisr-process.php
*
* Processes user actions and delegates work to the correct class.
*
* @package Revisr
* @license GPLv3
* @link https://revisr.io
* @copyright Expanded Fronts, LLC
*/
// Prevent direct access.
if ( ! defined( 'ABSPATH' ) ) exit;
class Revisr_Process {
/**
* Checks if a the current WordPress site is a repository,
* and returns a link to create a new repository if not.
* @access public
* @return boolean
*/
public function is_repo() {
if ( defined( 'REVISR_SKIP_SETUP' ) || get_transient( 'revisr_skip_setup' ) ) {
if ( revisr()->git->is_repo ) {
return true;
} else {
$init_url = wp_nonce_url( get_admin_url() . 'admin-post.php?action=init_repo', 'init_repo', 'revisr_init_nonce' );
$alert = sprintf( __( 'Thanks for installing Revisr! No Git repository was detected, <a href="%s">click here</a> to create one.', 'revisr' ), $init_url );
Revisr_Admin::alert( $alert );
}
return false;
}
}
/**
* Processes the request to checkout an existing branch.
* @access public
*/
public function checkout( $args = '', $new_branch = false ) {
Revisr_Admin::verify_nonce( $_REQUEST['revisr_checkout_nonce'], 'process_checkout' );
if ( revisr()->git->get_config( 'revisr', 'import-checkouts' ) === 'true' ) {
revisr()->db->backup();
}
$branch = isset( $_REQUEST['branch'] ) ? $_REQUEST['branch'] : $args;
$new_branch = isset( $_REQUEST['new_branch'] ) ? $_REQUEST['new_branch'] : false;
// Fires before the checkout.
do_action( 'revisr_pre_checkout', $branch );
revisr()->git->reset();
revisr()->git->checkout( $branch, $new_branch );
if ( revisr()->git->get_config( 'revisr', 'import-checkouts' ) === 'true' && $new_branch === false ) {
revisr()->db->import();
}
Revisr_Admin::redirect();
}
/**
* Processes a new commit from the "New Commit" admin page.
* @access public
*/
public function commit() {
Revisr_Admin::verify_nonce( $_REQUEST['revisr_commit_nonce'], 'process_commit' );
$commit_msg = $_REQUEST['post_title'];
// Backup the database if necessary.
if ( isset( $_POST['backup_db'] ) ) {
revisr()->db->backup( '', false );
}
// Add any staged files.
if ( isset( $_POST['staged_files'] ) ) {
$staged_files = $_POST['staged_files'];
$quick_stage = isset( $_POST['unstaged_files'] ) ? false : true;
revisr()->git->stage_files( $staged_files, $quick_stage );
}
// Make the commit.
revisr()->git->commit( $commit_msg, 'commit' );
}
/**
* Processes the request to create a new branch.
* @access public
*/
public function create_branch() {
Revisr_Admin::verify_nonce( $_REQUEST['revisr_create_branch_nonce'], 'process_create_branch' );
// Branches can't have spaces, so we replace them with hyphens.
$branch = str_replace( ' ', '-', $_REQUEST['branch_name'] );
// Create the branch.
$result = revisr()->git->create_branch( $branch );
$url = get_admin_url() . 'admin.php?page=revisr_branches&branch=' . $branch;
if ( $result !== false ) {
$msg = sprintf( __( 'Created new branch: %s', 'revisr' ), $branch );
Revisr_Admin::log( $msg, 'branch' );
// Maybe checkout the new branch.
if ( isset( $_REQUEST['checkout_new_branch'] ) ) {
revisr()->git->checkout( $branch );
}
$url .= '&status=create_success';
} else {
$url .= '&status=create_error';
}
Revisr_Admin::redirect( $url );
}
/**
* Processes the request to delete an existing branch.
* @access public
*/
public function delete_branch() {
Revisr_Admin::verify_nonce( $_REQUEST['revisr_delete_branch_nonce'], 'process_delete_branch' );
$branch = $_REQUEST['branch'];
// Allows deleting just the remote branch.
if ( isset( $_REQUEST['delete_remote_only'] ) ){
revisr()->git->delete_branch( $branch, true, true );
exit();
}
// Delete local, and maybe remote branches.
if ( isset( $_REQUEST['branch'] ) && $_REQUEST['branch'] != revisr()->git->branch ) {
revisr()->git->delete_branch( $branch, true );
if ( isset( $_REQUEST['delete_remote_branch'] ) ) {
revisr()->git->delete_branch( $branch, false, true );
}
}
exit();
}
/**
* Processes the request to discard all untracked changes.
* @access public
*/
public function discard() {
Revisr_Admin::verify_nonce( $_REQUEST['revisr_dashboard_nonce'], 'revisr_dashboard_nonce' );
// Fires prior to a discard.
do_action( 'revisr_pre_discard' );
if ( revisr()->git->reset( '--hard', 'HEAD', true ) ) {
Revisr_Admin::log( __('Discarded all uncommitted changes.', 'revisr'), 'discard' );
Revisr_Admin::alert( __('Successfully discarded any uncommitted changes.', 'revisr' ) );
// Fires after a successful discard.
do_action( 'revisr_post_discard' );
}
exit();
}
/**
* Processes a Git init.
* @access public
*/
public function init() {
Revisr_Admin::verify_nonce( $_REQUEST['revisr_init_nonce'], 'init_repo' );
// Fires before a repo is created.
do_action( 'revisr_pre_init' );
revisr()->git->init_repo();
}
/**
* Processes the import of additional (new) tables.
* @access public
*/
public function import() {
Revisr_Admin::verify_nonce( $_REQUEST['revisr_import_nonce'], 'process_import' );
if ( isset( $_REQUEST['revisr_import_untracked'] ) && is_array( $_REQUEST['revisr_import_untracked'] ) ) {
revisr()->db->import( $_REQUEST['revisr_import_untracked'] );
Revisr_Admin::redirect();
}
}
/**
* Processes the request to merge a branch into the current branch.
* @access public
*/
public function merge() {
Revisr_Admin::verify_nonce( $_REQUEST['revisr_merge_nonce'], 'process_merge' );
// Fires immediately before a merge.
do_action( 'revisr_pre_merge' );
revisr()->git->merge( $_REQUEST['branch'] );
if ( isset( $_REQUEST['import_db'] ) && $_REQUEST['import_db'] == 'on' ) {
revisr()->db->import();
}
}
/**
* Processes the request to pull changes into the current branch.
* @access public
*/
public function pull() {
Revisr_Admin::verify_nonce( $_REQUEST['revisr_dashboard_nonce'], 'revisr_dashboard_nonce' );
// Fetch the changes so we can compare them.
revisr()->git->reset();
revisr()->git->fetch();
// Build an array of the commits we don't have locally.
$commits_since = revisr()->git->run( 'log', array( revisr()->git->branch . '..' . revisr()->git->remote . '/' . revisr()->git->branch, '--pretty=oneline' ) );
// Maybe backup database.
if ( revisr()->git->get_config( 'revisr', 'import-pulls' ) === 'true' ) {
revisr()->db->backup();
$undo_hash = revisr()->git->current_commit();
revisr()->git->set_config( 'revisr', 'last-db-backup', $undo_hash );
}
// Fires before the changes are pulled.
do_action( 'revisr_pre_pull', $commits_since );
// Pull the changes or return an error on failure.
revisr()->git->pull( $commits_since );
}
/**
* Processes the request to push changes to a remote repository.
* @access public
*/
public function push() {
Revisr_Admin::verify_nonce( $_REQUEST['revisr_dashboard_nonce'], 'revisr_dashboard_nonce' );
// Fires before a push.
do_action( 'revisr_pre_push' );
revisr()->git->push();
}
/**
* Processes a request to revert, routing to the necessary functions.
* @access public
* @param string $type What to revert
* @return null
*/
public function revert( $type = '' ) {
Revisr_Admin::verify_nonce( $_REQUEST['revisr_revert_nonce'], 'revisr_revert_nonce' );
// Determine how to handle the request.
if ( isset( $_REQUEST['revert_type'] ) && $_REQUEST['revert_type'] !== '' ) {
$revert_type = $_REQUEST['revert_type'];
} else {
$revert_type = $type;
}
// Fires before the revert.
do_action( 'revisr_pre_revert', $type );
// Run the action.
switch ( $revert_type ) {
case 'files':
$this->revert_files( false );
break;
case 'db':
revisr()->db->restore( false );
break;
case 'files_and_db':
$this->revert_files( false );
revisr()->db->restore( false );
break;
default:
}
Revisr_Admin::redirect();
}
/**
* Processes the request to revert to an earlier commit.
* @access public
*/
public function revert_files( $redirect = true ) {
Revisr_Admin::verify_nonce( $_REQUEST['revisr_revert_nonce'], 'revisr_revert_nonce' );
$commit = $_REQUEST['commit_hash'];
$commit_msg = sprintf( __( 'Reverted to commit: #%s.', 'revisr' ), $commit );
revisr()->git->reset( '--hard', 'HEAD', true );
revisr()->git->reset( '--hard', $commit );
revisr()->git->reset( '--soft', 'HEAD@{1}' );
revisr()->git->run( 'add', array( '-A' ) );
revisr()->git->commit( $commit_msg );
revisr()->git->auto_push();
$commit_url = get_admin_url() . 'admin.php?page=revisr_view_commit&commit=' . $commit;
$msg = sprintf( __( 'Reverted to commit <a href="%s">#%s</a>.', 'revisr' ), $commit_url, $commit );
$email_msg = sprintf( __( '%s was reverted to commit #%s', 'revisr' ), get_bloginfo(), $commit );
Revisr_Admin::log( $msg, 'revert' );
Revisr_Admin::notify( get_bloginfo() . __( ' - Commit Reverted', 'revisr' ), $email_msg );
if ( true === $redirect ) {
Revisr_Admin::redirect();
}
}
/**
* Processes a diff request.
* @access public
*/
public function view_diff() {
Revisr_Admin::verify_nonce( $_GET['security'], 'staging_nonce' );
if ( isset( $_REQUEST['commit'] ) ) {
$diff = revisr()->git->run( 'show', array( $_REQUEST['commit'], $_REQUEST['file'] ) );
} else {
$diff = revisr()->git->run( 'diff', array( $_REQUEST['file'] ) );
}
if ( is_array( $diff ) ) {
// Loop through the diff and echo the output.
foreach ( $diff as $line ) {
if ( substr( $line, 0, 1 ) === '+' ) {
echo '<span class="diff_added" style="background-color:#cfc;">' . htmlspecialchars( $line ) . '</span><br>';
} else if ( substr( $line, 0, 1 ) === '-' ) {
echo '<span class="diff_removed" style="background-color:#fdd;">' . htmlspecialchars( $line ) . '</span><br>';
} else {
echo htmlspecialchars( $line ) . '<br>';
}
}
} else {
_e( 'Oops! Revisr ran into an error rendering the diff.', 'revisr' );
}
// We may need to exit early if doing_ajax.
if ( defined( 'DOING_AJAX' ) && DOING_AJAX ) {
exit();
}
}
/**
* Processes a view error request.
* @access public
*/
public function view_error() {
if ( $revisr_error = get_transient( 'revisr_error_details' ) ) {
echo implode( '<br>', $revisr_error );
} else {
_e( 'Detailed error information not available.', 'revisr' );
}
}
/**
* Processes a view status request.
* @access public
*/
public function view_status() {
Revisr_Admin::verify_nonce( $_GET['revisr_status_nonce'], 'revisr_view_status' );
$status = revisr()->git->run( 'status', array() );
if ( is_array( $status ) ) {
echo '<pre>';
foreach ( $status as $line ) {
echo $line . PHP_EOL;
}
echo '</pre>';
} else {
_e( 'Error retrieving the status of the repository.', 'revisr' );
}
}
/**
* Downloads the system info.
* @access public
*/
public function download_sysinfo() {
Revisr_Admin::verify_nonce( $_REQUEST['revisr_info_nonce'], 'process_download_sysinfo' );
if ( ! current_user_can( Revisr::get_capability() ) ) {
return;
}
nocache_headers();
header( 'Content-Type: text/plain' );
header( 'Content-Disposition: attachment; filename="revisr-system-info.txt"' );
echo wp_strip_all_tags( $_POST['revisr-sysinfo'] );
die();
}
}

View file

@ -1,109 +0,0 @@
<?php
/**
* class-revisr-remote.php
*
* Processes remote updates for Revisr.
*
* @package Revisr
* @license GPLv3
* @link https://revisr.io
* @copyright Expanded Fronts, LLC
*/
// Prevent direct access.
if ( ! defined( 'ABSPATH' ) ) exit;
class Revisr_Remote {
/**
* Returns the current token, creating one if it does not exist.
* @access public
* @return string|boolean The token, or false on complete failure.
*/
public function get_token() {
$check = revisr()->git->get_config( 'revisr', 'token' );
if ( $check === false ) {
// If there is no token, generate a new one and save it.
$token = wp_generate_password( 16, false, false );
revisr()->git->set_config( 'revisr', 'token', $token );
// Make sure that the token saved correctly.
$new_token = revisr()->git->get_config( 'revisr', 'token' );
if ( is_string( $new_token ) && hash_equals( $new_token, $token ) ) {
if ( $new_token !== false ) {
return $new_token;
}
} else {
return false;
}
} else {
// Return the already saved token.
return $check;
}
}
/**
* Verifies a token is valid.
* @access public
* @return boolean
*/
public function check_token( $token = '' ) {
// Allow testing of this function.
if ( $token !== '' ) {
$token_to_check = $token;
}
// This is set in the Webhook URL.
if ( isset( $_REQUEST['token'] ) && $_REQUEST['token'] !== '' ) {
$token_to_check = $_REQUEST['token'];
}
// Compare the tokens and return true if a complete match.
if ( isset( $token_to_check ) ) {
$safe_token = revisr()->git->get_config( 'revisr', 'token' );
if ( hash_equals( $safe_token, $token_to_check ) ) {
return true;
}
}
// Die if not.
wp_die( __( 'Cheatin&#8217; uh?', 'revisr' ) );
}
/**
* Sends a new HTTP request to the live site.
* @access public
*/
public function send_request() {
$body = array(
'action' => 'revisr_update'
);
$args = array(
'method' => 'POST',
'timeout' => '30',
'redirection' => '5',
'httpversion' => '1.0',
'blocking' => true,
'headers' => array(),
'body' => $body
);
// Get the URL and send the request.
$get_url = revisr()->git->get_config( 'revisr', 'webhook-url' );
if ( $get_url !== false ) {
$webhook = urldecode( $get_url );
$request = wp_remote_post( $webhook, $args );
if ( is_wp_error( $request ) ) {
Revisr_Admin::log( __( 'Error contacting webhook URL.', 'revisr' ), 'error' );
} else {
Revisr_Admin::log( __( 'Sent update request to the webhook.', 'revisr' ), 'push' );
}
}
}
}

View file

@ -1,211 +0,0 @@
<?php
/**
* class-revisr-repository-table.php
*
* Displays the custom WP_List_Table on the Revisr Repositories page.
*
* @package Revisr
* @license GPLv3
* @link https://revisr.io
* @copyright Expanded Fronts
*/
// Prevent direct access.
if ( ! defined( 'ABSPATH' ) ) exit;
// Include WP_List_Table if it isn't already loaded.
if ( ! class_exists( 'WP_List_Table' ) ) {
require_once( ABSPATH . '/wp-admin/includes/class-wp-list-table.php' );
}
class Revisr_Repositories_Table extends WP_List_Table {
/**
* Constructs the class.
* @access public
*/
public function __construct() {
// Load the parent class on the appropriate hook.
add_action( 'load-revisr_page_revisr_repositories', array( $this, 'load' ) );
add_filter( 'set-screen-option', array( $this, 'set_screen_option' ), 10, 3 );
}
/**
* Construct the parent class.
* @access public
*/
public function load() {
global $status, $page;
parent::__construct( array(
'singular' => 'repository',
'plural' => 'repositories'
) );
add_screen_option(
'per_page',
array(
'default' => 10,
'label' => __( 'Repositories per page', 'revisr' ),
'option' => 'edit_revisr_repositories_per_page',
)
);
set_screen_options();
}
/**
* Sets the screen options for the Revisr branches page.
* @access public
* @param boolean $status This seems to be false
* @param string $option The name of the option
* @param int $value The number of events to display
* @return int|boolean
*/
public function set_screen_option( $status, $option, $value ) {
if ( 'edit_revisr_repositories_per_page' === $option ) {
return $value;
}
return $status;
}
/**
* Returns an array of the column names.
* @access public
* @return array
*/
public function get_columns() {
$columns = array(
'name' => __( 'Name', 'revisr' ),
'path' => __( 'Path', 'revisr' ),
'actions' => __( 'Actions', 'revisr' ),
);
return $columns;
}
/**
* Returns an array of columns that are sortable.
* @access public
* @return array
*/
public function get_sortable_columns() {
$sortable_columns = array(
'name' => array( 'name', false )
);
return $sortable_columns;
}
/**
* Returns an array containing the branch information.
* @access public
* @return array
*/
public function get_data() {
if ( file_exists( ABSPATH . 'revisr-config.php' ) ) {
$repos = require ABSPATH . 'revisr-config.php';
} else {
$repos = array();
}
$repositories_array = array();
$c = 0;
foreach ( $repos as $name => $path ) {
$repositories_array[$c]['name'] = $name;
$repositories_array[$c]['path'] = $path;
$repositories_array[$c]['actions'] = $this->get_actions();
$c++;
}
return $repositories_array;
}
/**
* Returns possible actions for a given branch.
* @access public
* @return string
*/
public function get_actions() {
$actions = sprintf( __( '', 'revisr' ) );
return $actions;
}
/**
* Renders the default data for a column.
* @access public
* @param array $item A singular item (one full row's worth of data)
* @param array $column_name The name/slug of the column to be processed
* @return string
*/
public function column_default( $item, $column_name ) {
return $item[$column_name];
}
/**
* Called when no branches are found.
* @access public
*/
public function no_items() {
_e( 'No repositories found.', 'revisr' );
}
/**
* Prepares the data for display.
* @access public
*/
public function prepare_items() {
global $wpdb;
// Number of items per page.
$per_page = $this->get_items_per_page( 'edit_revisr_repositories_per_page', 10 );
// Set up the custom columns.
$columns = $this->get_columns();
$hidden = array();
$sortable = $this->get_sortable_columns();
// Builds the list of column headers.
$this->_column_headers = array( $columns, $hidden, $sortable );
// Get the data to populate into the table.
$data = $this->get_data();
// Handle sorting of the data.
function usort_reorder($a,$b){
$orderby = ( ! empty( $_REQUEST['orderby'] ) ) ? $_REQUEST['orderby'] : 'name'; //If no sort, default to name.
$order = ( ! empty( $_REQUEST['order'] ) ) ? $_REQUEST['order'] : 'desc'; //If no order, default to desc
$result = strcmp($a[$orderby], $b[$orderby]); //Determine sort order
return ( $order==='asc' ) ? $result : -$result; //Send final sort direction to usort
}
usort( $data, 'usort_reorder' );
// Pagination.
$current_page = $this->get_pagenum();
$total_items = count($data);
$data = array_slice($data,(($current_page-1)*$per_page),$per_page);
$this->items = $data;
$this->set_pagination_args( array(
'total_items' => $total_items,
'per_page' => $per_page,
'total_pages' => ceil($total_items/$per_page),
'orderby' => ! empty( $_REQUEST['orderby'] ) && '' != $_REQUEST['orderby'] ? $_REQUEST['orderby'] : 'time',
'order' => ! empty( $_REQUEST['order'] ) && '' != $_REQUEST['order'] ? $_REQUEST['order'] : 'desc'
) );
}
/**
* Displays the table.
* @access public
*/
public function display() {
wp_nonce_field( 'revisr-repositories-nonce', 'revisr_repositories_nonce' );
echo '<input type="hidden" id="order" name="order" value="' . $this->_pagination_args['order'] . '" />';
echo '<input type="hidden" id="orderby" name="orderby" value="' . $this->_pagination_args['orderby'] . '" />';
parent::display();
}
}

View file

@ -1,570 +0,0 @@
<?php
/**
* class-revisr-settings-fields.php
*
* Displays (and updates) the settings fields.
*
* @package Revisr
* @license GPLv3
* @link https://revisr.io
* @copyright Expanded Fronts, LLC
*/
// Prevent direct access.
if ( ! defined( 'ABSPATH' ) ) exit;
class Revisr_Settings_Fields {
/**
* Checks if a setting has been saved and is not empty.
* Used to determine if we should update the .git/config.
* @access private
* @param string $option The option to check.
* @return boolean
*/
private function is_updated( $option ) {
if ( isset( $_GET['settings-updated'] ) ) {
if ( isset( revisr()->options[$option] ) && revisr()->options[$option] != '' ) {
return true;
}
}
return false;
}
/**
* Displays the description for the "General Settings" tab.
* @access public
*/
public function revisr_general_settings_callback() {
_e( 'These settings configure the local repository, and may be required for Revisr to work correctly.', 'revisr' );
}
/**
* Displays the description for the "Remote Settings" tab.
* @access public
*/
public function revisr_remote_settings_callback() {
_e( 'These settings are optional, and only need to be configured if you plan to push your website to a remote repository like Bitbucket or Github.', 'revisr' );
}
/**
* Displays the description for the "Database Settings" tab.
* @access public
*/
public function revisr_database_settings_callback() {
_e( 'These settings configure how Revisr interacts with your database, if at all.', 'revisr' );
}
/**
* Displays/updates the "Username" settings field.
* @access public
*/
public function username_callback() {
// Update the .git/config if necessary.
if ( $this->is_updated( 'username' ) ) {
revisr()->git->set_config( 'user', 'name', revisr()->options['username'] );
}
$check_username = revisr()->git->get_config( 'user', 'name' );
if ( $check_username ) {
$username = $check_username;
} else {
$username = '';
}
printf(
'<input type="text" id="username" name="revisr_general_settings[username]" value="%s" class="regular-text revisr-text" />
<p class="description revisr-description">%s</p>',
esc_attr( $username ),
__( 'The username to commit with in Git.', 'revisr' )
);
}
/**
* Displays/updates the "Email" settings field.
* @access public
*/
public function email_callback() {
// Update the .git/config if necessary.
if ( $this->is_updated( 'email' ) ) {
revisr()->git->set_config( 'user', 'email', revisr()->options['email'] );
}
$check_email = revisr()->git->get_config( 'user', 'email' );
if ( $check_email ) {
$email = $check_email;
}else {
$email = '';
}
printf(
'<input type="text" id="email" name="revisr_general_settings[email]" value="%s" class="regular-text revisr-text" />
<p class="description revisr-description">%s</p>',
esc_attr( $email ),
__( 'The email address associated to your Git username. Also used for notifications (if enabled).', 'revisr' )
);
}
/**
* Displays/updates the "Git Path" settings field.
* @access public
*/
public function git_path_callback() {
$git_path = defined( 'REVISR_GIT_PATH' ) ? REVISR_GIT_PATH : '';
if ( isset( $_GET['settings-updated'] ) ) {
$dir = revisr()->options['git_path'];
$line = "define('REVISR_GIT_PATH', '$dir');";
Revisr_Admin::replace_config_line( 'define *\( *\'REVISR_GIT_PATH\'', $line );
$git_path = revisr()->options['git_path'];
}
printf(
'<input type="text" id="git_path" name="revisr_general_settings[git_path]" class="regular-text revisr-text" value="%s" />
<p class="description revisr-description">%s</p>',
esc_attr( $git_path ),
__( 'If necessary, you can define the installation path to Git here.', 'revisr' )
);
}
/**
* Displays/updates the ".gitignore" settings field.
* @access public
*/
public function gitignore_callback() {
// Update the .gitignore if necessary.
if ( isset( $_GET['settings-updated'] ) ) {
revisr()->git->update_gitignore();
}
// Grab the contents from the .gitignore.
if ( file_exists( revisr()->git->work_tree . '/.gitignore' ) ) {
$gitignore = file_get_contents( revisr()->git->work_tree . '/.gitignore' );
} else {
$gitignore = '';
}
// Display the settings field.
printf(
'<textarea id="gitignore" name="revisr_general_settings[gitignore]" rows="6" />%s</textarea>
<p class="description revisr-description">%s</p>',
esc_textarea( $gitignore ),
__( 'Add files or directories that you don\'t want to show up in Git here, one per line.<br>This will update the ".gitignore" file for this repository.', 'revisr' )
);
}
/**
* Displays/updates the "Automatic Backups" settings field.
* @access public
*/
public function automatic_backups_callback() {
if ( $this->is_updated( 'automatic_backups' ) ) {
$schedule = revisr()->options['automatic_backups'];
// Only do anything if the value has been changed.
if ( revisr()->git->get_config( 'revisr', 'automatic-backups' ) != $schedule ) {
// Set the new value.
revisr()->git->set_config( 'revisr', 'automatic-backups', $schedule );
// Clear the existing cron.
wp_clear_scheduled_hook( 'revisr_cron' );
// Schedule the next one!
if ( 'none' != $schedule ) {
$next_time = time();
wp_schedule_event( $next_time, revisr()->options['automatic_backups'], 'revisr_cron' );
}
}
} else {
$schedule = revisr()->git->get_config( 'revisr', 'automatic-backups' ) ? revisr()->git->get_config( 'revisr', 'automatic-backups' ) : 'none';
}
?>
<select id="automatic_backups" name="revisr_general_settings[automatic_backups]">
<option value="none" <?php selected( $schedule, 'none' ); ?>><?php _e( 'None', 'revisr' ); ?></option>
<option value="daily" <?php selected( $schedule, 'daily' ); ?>><?php _e( 'Daily', 'revisr' ); ?></option>
<option value="weekly" <?php selected( $schedule, 'weekly' ); ?>><?php _e( 'Weekly', 'revisr' ); ?></option>
</select>
<span class="description"><?php _e( 'Automatic backups will backup both the files and database at the interval of your choosing.', 'revisr' ); ?></span>
<?php
}
/**
* Displays/updates the "Notifications" settings field.
* @access public
*/
public function notifications_callback() {
if ( isset( $_GET['settings-updated'] ) ) {
$notifications = isset( revisr()->options['notifications'] ) ? revisr()->options['notifications'] : 'off';
revisr()->git->set_config( 'revisr', 'notifications', $notifications );
}
$notifications = revisr()->git->get_config( 'revisr', 'notifications' );
printf(
'<input type="checkbox" id="notifications" name="revisr_general_settings[notifications]" %s />
<label for="notifications"><span class="description">%s</span></label>',
checked( $notifications, 'on', false ),
__( 'Enabling notifications will send updates about new commits, pulls, and pushes to the email address above.', 'revisr' )
);
}
/**
* Displays/updates the "Uninstall on Delete" settings field.
* @access public
*/
public function uninstall_on_delete_callback() {
if ( isset( $_GET['settings-updated'] ) ) {
$uninstall_on_delete = isset( revisr()->options['uninstall_on_delete'] ) ? 'on' : 'off';
revisr()->git->set_config( 'revisr', 'uninstall-on-delete', $uninstall_on_delete );
}
$uninstall_on_delete = revisr()->git->get_config( 'revisr', 'uninstall-on-delete' );
printf(
'<input type="checkbox" id="uninstall_on_delete" name="revisr_general_settings[uninstall_on_delete]" %s />
<label for="uninstall_on_delete"><span class="description">%s</span></label>',
checked( $uninstall_on_delete, 'on', false ),
__( 'Check to delete all settings and history stored in the database when this plugin is deleted. Settings in the .git/config will not be affected.', 'revisr' )
);
}
/**
* Displays/updates the "Remote Name" settings field.
* @access public
*/
public function remote_name_callback() {
// Default to orign as the remote name.
$remote = $this->is_updated( 'remote_name' ) ? revisr()->options['remote_name'] : 'origin';
// Set the current remote.
if ( isset( $_GET['settings-updated'] ) ) {
revisr()->git->set_config( 'revisr', 'current-remote', $remote );
}
$remote = revisr()->git->get_config( 'revisr', 'current-remote' );
printf(
'<input type="text" id="remote_name" name="revisr_remote_settings[remote_name]" value="%s" class="regular-text revisr-text" placeholder="origin" />
<p class="description revisr-description">%s</p>',
isset( $remote ) ? esc_attr( $remote ) : '',
__( 'Git sets this to "origin" by default when you clone a repository, and this should be sufficient in most cases. If you\'ve changed the remote name or have more than one remote, you can specify that here.', 'revisr' )
);
}
/**
* Displays/updates the "Remote URL" settings field.
* @access public
*/
public function remote_url_callback() {
if ( isset( $_GET['settings-updated'] ) ) {
// Stores the Remote URL.
$remote = $this->is_updated( 'remote_name' ) ? revisr()->options['remote_name'] : 'origin';
$add = revisr()->git->run( 'remote', array( 'add', $remote, revisr()->options['remote_url'] ) );
if ( false == $add ) {
revisr()->git->run( 'remote', array( 'set-url', $remote, revisr()->options['remote_url'] ) );
}
}
$check_remote = revisr()->git->run( 'ls-remote', array( '--get-url' ) );
if ( false !== $check_remote && is_array( $check_remote ) ) {
$remote = $check_remote[0];
} else {
$remote = '';
}
printf(
'<input type="text" id="remote_url" name="revisr_remote_settings[remote_url]" value="%s" class="regular-text revisr-text" placeholder="https://user:pass@host.com/user/example.git" /><span id="verify-remote"></span>
<p class="description revisr-description">%s</p>',
$remote,
__( 'Useful if you need to authenticate over "https://" instead of SSH, or if the remote has not already been set through Git.', 'revisr' )
);
}
/**
* Displays/updates the "Revisr Webhook URL" settings field.
* @access public
*/
public function webhook_url_callback() {
// Allow the user to unset the Webhook URL.
if ( isset( $_GET['settings-updated'] ) ) {
if ( $this->is_updated( 'webhook_url' ) ) {
revisr()->git->set_config( 'revisr', 'webhook-url', revisr()->options['webhook_url'] );
} else {
revisr()->git->run( 'config', array( '--unset', 'revisr.webhook-url' ) );
}
}
// Grab the URL from the .git/config as it MAY be replaced in the database.
$get_url = revisr()->git->get_config( 'revisr', 'webhook-url' );
if ( $get_url ) {
$webhook_url = urldecode($get_url);
} else {
$webhook_url = '';
}
printf(
'<input type="text" name="revisr_remote_settings[webhook_url]" value="%s" class="regular-text revisr-text" /><p class="description revisr-description">%s</p>',
$webhook_url,
__( 'If you have Revisr installed on another server using the same repository,<br> you can add the Revisr Webhook from that server here to trigger an update when pushing.', 'revisr' )
);
}
/**
* Displays/updates the "Auto Push" settings field.
* @access public
*/
public function auto_push_callback() {
if ( isset( $_GET['settings-updated'] ) ) {
if ( isset( revisr()->options['auto_push'] ) ) {
revisr()->git->set_config( 'revisr', 'auto-push', 'true' );
} else {
revisr()->git->run( 'config', array( '--unset', 'revisr.auto-push' ) );
}
}
printf(
'<input type="checkbox" id="auto_push" name="revisr_remote_settings[auto_push]" %s />
<label for="auto_push">%s</label>',
checked( revisr()->git->get_config( 'revisr', 'auto-push' ), 'true', false ),
__( 'Check to automatically push new commits to the remote repository.', 'revisr' )
);
}
/**
* Displays/updates the "Auto Pull" settings field.
* @access public
*/
public function auto_pull_callback() {
if ( isset( $_GET['settings-updated'] ) ) {
if ( isset( revisr()->options['auto_pull'] ) ) {
revisr()->git->set_config( 'revisr', 'auto-pull', 'true' );
} else {
revisr()->git->run( 'config', array( '--unset', 'revisr.auto-pull' ) );
}
}
printf(
'<input type="checkbox" id="auto_pull" name="revisr_remote_settings[auto_pull]" %s />
<label for="auto_pull">%s</label>',
checked( revisr()->git->get_config( 'revisr', 'auto-pull' ), 'true', false ),
__( 'Check to generate the Revisr Webhook and allow Revisr to automatically pull commits from a remote repository.', 'revisr' )
);
$remote = new Revisr_Remote();
$token = $remote->get_token();
if ( $token ) {
$post_hook = get_admin_url() . 'admin-post.php?action=revisr_update&token=' . $remote->get_token();
?>
<div id="post-hook">
<p class="description revisr-description"><?php _e( 'Revisr Webhook:', 'revisr' ); ?></p>
<input id="post-hook-input" type="text" value="<?php echo $post_hook; ?>" disabled />
<p class="description revisr-description"><?php _e( 'You can add the above webhook to Bitbucket, GitHub, or another instance of Revisr to automatically update this repository.', 'revisr' ); ?></p>
</div>
<?php
}
else {
echo '<p id="post-hook" class="description">' . __( 'There was an error generating the webhook. Please make sure that Revisr has write access to the ".git/config" and try again.', 'revisr' ) . '</p>';
}
}
/**
* Displays/updates the "DB Tracking" settings field.
* @access public
*/
public function tracked_tables_callback() {
if ( $this->is_updated( 'db_tracking' ) ) {
revisr()->git->set_config( 'revisr', 'db-tracking', revisr()->options['db_tracking'] );
}
if ( $db_tracking = revisr()->git->get_config( 'revisr', 'db-tracking' ) ) {
if ( $db_tracking == 'custom' && $this->is_updated( 'tracked_tables' ) ) {
revisr()->git->run( 'config', array( '--unset-all', 'revisr.tracked-tables' ) );
$tables = revisr()->options['tracked_tables'];
foreach ( $tables as $table ) {
revisr()->git->run( 'config', array( '--add', 'revisr.tracked-tables', $table ) );
}
} elseif ( $db_tracking != 'custom' ) {
revisr()->git->run( 'config', array( '--unset-all', 'revisr.tracked-tables' ) );
}
} else {
$db_tracking = '';
}
?>
<select id="db-tracking-select" name="revisr_database_settings[db_tracking]">
<option value="all_tables" <?php selected( $db_tracking, 'all_tables' ); ?>><?php _e( 'All Tables', 'revisr' ); ?></option>
<option value="custom" <?php selected( $db_tracking, 'custom' ); ?>><?php _e( 'Let me decide...', 'revisr' ); ?></option>
<option value="none" <?php selected( $db_tracking, 'none' ); ?>><?php _e( 'None', 'revisr' ); ?></option>
</select>
<?php
// Allows the user to select the tables they want to track.
$db = new Revisr_DB();
$tables = $db->get_tables();
$sizes = $db->get_sizes();
echo '<div id="advanced-db-tracking" style="display:none;"><br><select name="revisr_database_settings[tracked_tables][]" multiple="multiple" style="width:35em;height:250px;">';
if ( is_array( $tables ) ) {
foreach ( $tables as $table ) {
$size = isset( $sizes[$table] ) ? $sizes[$table] : '';
$table_selected = '';
if ( in_array( $table, $db->get_tracked_tables() ) ) {
$table_selected = ' selected';
}
echo "<option value='$table'$table_selected>$table $size</option>";
}
}
echo '</select></div>';
}
/**
* Displays/updates the "Development URL" settings field.
* NOTE: DO NOT USE THE OPTION AS STORED IN THE DATABASE!
* @access public
*/
public function development_url_callback() {
// Allow the user to unset the dev URL.
if ( isset( $_GET['settings-updated'] ) ) {
if ( $this->is_updated( 'development_url' ) ) {
revisr()->git->set_config( 'revisr', 'dev-url', esc_url_raw( revisr()->options['development_url'] ) );
} else {
revisr()->git->run( 'config', array( '--unset', 'revisr.dev-url' ) );
}
}
// Grab the URL from the .git/config as it will be replaced in the database.
$get_url = revisr()->git->get_config( 'revisr', 'dev-url' );
if ( $get_url !== false ) {
$dev_url = $get_url;
} else {
$dev_url = '';
}
printf(
'<input type="text" id="development_url" name="revisr_database_settings[development_url]" class="regular-text revisr-text" value="%s" />
<p class="description revisr-description">%s</p>',
$dev_url,
__( 'If you\'re importing the database from a seperate environment, enter the WordPress Site URL for that environment here to replace all occurrences of that URL with the current Site URL during import. This MUST match the WordPress Site URL of the database being imported.', 'revisr' )
);
}
/**
* Displays/updates the "DB Driver" settings field.
* @access public
*/
public function db_driver_callback() {
if ( $this->is_updated( 'db_driver' ) ) {
revisr()->git->set_config( 'revisr', 'db-driver', revisr()->options['db_driver'] );
}
$current = revisr()->git->get_config( 'revisr', 'db-driver' );
?>
<select id="db-driver-select" name="revisr_database_settings[db_driver]">
<option value="mysql" <?php selected( 'mysql', $current ); ?>><?php _e( 'MySQL', 'revisr' ); ?></option>
<option value="wpdb" <?php selected( 'wpdb', $current ); ?>><?php _e( 'WordPress', 'revisr' ); ?></option>
</select>
<p class="description"><?php _e( 'MySQL can be faster, but may not be available on some servers.', 'revisr' ); ?></p>
<?php
}
/**
* Displays/updates the "Path to MySQL" settings field.
* @access public
*/
public function mysql_path_callback() {
if ( isset( $_GET['settings-updated'] ) ) {
if ( $this->is_updated( 'mysql_path' ) ) {
// Properly escape trailing backslashes on Windows.
if ( substr( revisr()->options['mysql_path'], -1 ) === '\\' ) {
revisr()->options['mysql_path'] .= '\\';
}
revisr()->git->set_config( 'revisr', 'mysql-path', revisr()->options['mysql_path'] );
} else {
revisr()->git->run( 'config', array( '--unset', 'revisr.mysql-path' ) );
}
}
if ( $get_path = revisr()->git->get_config( 'revisr', 'mysql-path' ) ) {
$mysql_path = $get_path;
} else {
$mysql_path = '';
}
printf(
'<input type="text" id="mysql_path" name="revisr_database_settings[mysql_path]" value="%s" class="regular-text revisr-text" placeholder="" />
<p class="description revisr-description">%s</p>',
esc_attr( $mysql_path ),
__( 'Leave blank if the full path to MySQL has already been set on the server. Some possible settings include:
<br><br>For MAMP: /Applications/MAMP/Library/bin/<br>
For WAMP: C:\wamp\bin\mysql\mysql5.6.12\bin\ ', 'revisr' )
);
}
/**
* Displays/updates the "Reset DB" settings field.
* @access public
*/
public function reset_db_callback() {
if ( isset( $_GET['settings-updated'] ) ) {
if ( isset( revisr()->options['reset_db'] ) ) {
revisr()->git->set_config( 'revisr', 'import-checkouts', 'true' );
} else {
revisr()->git->run( 'config', array( '--unset-all', 'revisr.import-checkouts' ) );
}
if ( isset( revisr()->options['import_db'] ) ) {
revisr()->git->set_config( 'revisr', 'import-pulls', 'true' );
} else {
revisr()->git->run( 'config', array( '--unset-all', 'revisr.import-pulls' ) );
}
}
printf(
'<input type="checkbox" id="reset_db" name="revisr_database_settings[reset_db]" %s /><label for="reset_db">%s</label><br><br>
<input type="checkbox" id="import_db" name="revisr_database_settings[import_db]" %s /><label for="import_db">%s</label><br><br>
<p class="description revisr-description">%s</p>',
checked( revisr()->git->get_config( 'revisr', 'import-checkouts' ), 'true', false ),
__( 'Import database when changing branches?', 'revisr' ),
checked( revisr()->git->get_config( 'revisr', 'import-pulls' ), 'true', false ),
__( 'Import database when pulling commits?', 'revisr' ),
__( 'If checked, Revisr will automatically import the above tracked tables while pulling from or checking out a branch. The tracked tables will be backed up beforehand to provide a restore point immediately prior to the import. Use this feature with caution and only after verifying that you have a full backup of your website.', 'revisr' )
);
}
}

View file

@ -1,226 +0,0 @@
<?php
/**
* class-revisr-settings.php
*
* Interacts with the WordPress Settings API.
*
* @package Revisr
* @license GPLv3
* @link https://revisr.io
* @copyright Expanded Fronts, LLC
*/
// Prevent direct access.
if ( ! defined( 'ABSPATH' ) ) exit;
class Revisr_Settings {
/**
* The Settings callback class.
* @var Revisr_Settings_Fields()
*/
protected $settings_fields;
/**
* Initialize the class.
* @access public
*/
public function __construct() {
$this->settings_fields = new Revisr_Settings_Fields();
}
/**
* Initialize the settings.
* @access public
*/
public function init_settings() {
$this->revisr_add_settings_sections();
$this->revisr_add_settings_fields();
$this->revisr_register_settings();
}
/**
* Registers the settings sections.
* @access public
*/
public function revisr_add_settings_sections() {
add_settings_section(
'revisr_general_settings',
'General Settings',
array( $this->settings_fields, 'revisr_general_settings_callback' ),
'revisr_general_settings'
);
add_settings_section(
'revisr_remote_settings',
'Repository Settings',
array( $this->settings_fields, 'revisr_remote_settings_callback' ),
'revisr_remote_settings'
);
add_settings_section(
'revisr_database_settings',
'Database Settings',
array( $this->settings_fields, 'revisr_database_settings_callback' ),
'revisr_database_settings'
);
}
/**
* Registers the settings fields.
* @access public
*/
public function revisr_add_settings_fields() {
add_settings_field(
'username',
__( 'Git Username', 'revisr' ),
array( $this->settings_fields, 'username_callback' ),
'revisr_general_settings',
'revisr_general_settings'
);
add_settings_field(
'email',
__( 'Git Email', 'revisr'),
array( $this->settings_fields, 'email_callback' ),
'revisr_general_settings',
'revisr_general_settings'
);
add_settings_field(
'git_path',
__( 'Git Path', 'revisr' ),
array( $this->settings_fields, 'git_path_callback' ),
'revisr_general_settings',
'revisr_general_settings'
);
add_settings_field(
'gitignore',
__( 'Files/Directories to ignore', 'revisr'),
array( $this->settings_fields, 'gitignore_callback' ),
'revisr_general_settings',
'revisr_general_settings'
);
add_settings_field(
'automatic_backups',
__( 'Automatic backup schedule', 'revisr' ),
array( $this->settings_fields, 'automatic_backups_callback' ),
'revisr_general_settings',
'revisr_general_settings'
);
add_settings_field(
'notifications',
__( 'Enable email notifications?', 'revisr' ),
array( $this->settings_fields, 'notifications_callback' ),
'revisr_general_settings',
'revisr_general_settings'
);
add_settings_field(
'uninstall_on_delete',
__( 'Remove data on uninstall?', 'revisr' ),
array( $this->settings_fields, 'uninstall_on_delete_callback' ),
'revisr_general_settings',
'revisr_general_settings'
);
add_settings_field(
'remote_name',
__( 'Remote Name', 'revisr'),
array( $this->settings_fields, 'remote_name_callback' ),
'revisr_remote_settings',
'revisr_remote_settings'
);
add_settings_field(
'remote_url',
__( 'Remote URL', 'revisr'),
array( $this->settings_fields, 'remote_url_callback' ),
'revisr_remote_settings',
'revisr_remote_settings'
);
add_settings_field(
'webhook_url',
__( 'Revisr Webhook URL', 'revisr' ),
array( $this->settings_fields, 'webhook_url_callback' ),
'revisr_remote_settings',
'revisr_remote_settings'
);
add_settings_field(
'auto_push',
__( 'Automatically push new commits?', 'revisr' ),
array( $this->settings_fields, 'auto_push_callback' ),
'revisr_remote_settings',
'revisr_remote_settings'
);
add_settings_field(
'auto_pull',
__( 'Automatically pull new commits?', 'revisr' ),
array( $this->settings_fields, 'auto_pull_callback' ),
'revisr_remote_settings',
'revisr_remote_settings'
);
add_settings_field(
'tracked_tables',
__( 'Database tables to track', 'revisr' ),
array( $this->settings_fields, 'tracked_tables_callback' ),
'revisr_database_settings',
'revisr_database_settings'
);
add_settings_field(
'reset_db',
__( 'Import Options', 'revisr' ),
array( $this->settings_fields, 'reset_db_callback' ),
'revisr_database_settings',
'revisr_database_settings'
);
add_settings_field(
'development_url',
__( 'Development URL', 'revisr'),
array( $this->settings_fields, 'development_url_callback' ),
'revisr_database_settings',
'revisr_database_settings'
);
add_settings_field(
'db_driver',
__( 'Database Driver', 'revisr' ),
array( $this->settings_fields, 'db_driver_callback' ),
'revisr_database_settings',
'revisr_database_settings'
);
add_settings_field(
'mysql_path',
__( 'Path to MySQL', 'revisr' ),
array( $this->settings_fields, 'mysql_path_callback' ),
'revisr_database_settings',
'revisr_database_settings'
);
}
/**
* Register the settings fields with WordPress.
* @access public
*/
public function revisr_register_settings() {
register_setting(
'revisr_general_settings',
'revisr_general_settings'
);
register_setting(
'revisr_remote_settings',
'revisr_remote_settings',
array( $this, 'sanitize_remote' )
);
register_setting(
'revisr_database_settings',
'revisr_database_settings'
);
}
/**
* Sanitizes the "Remote Settings" fields so that URL's can be stored.
* @access public
* @param array $input The data from the form.
* @return array
*/
public function sanitize_remote( $input ) {
if ( isset( $input['webhook_url'] ) ) {
$input['webhook_url'] = urlencode( $input['webhook_url'] );
}
return $input;
}
}

View file

@ -1 +0,0 @@
<?php // Silence is golden

View file

@ -1 +0,0 @@
<?php // Silence is golden

View file

@ -1 +0,0 @@
<?php //Silence is golden...

File diff suppressed because it is too large Load diff

View file

@ -1,287 +0,0 @@
=== Revisr ===
Contributors: ExpandedFronts, mattshaw
Tags: revisr, git, git management, revision tracking, revision, backup, database, database backup, database plugin, deploy, commit, bitbucket, github, version control
Requires at least: 3.9.2
Tested up to: 4.4
Stable tag: trunk
License: GPLv3
License URI: http://www.gnu.org/licenses/gpl.html
A simple plugin for managing your WordPress website with Git.
== Description ==
Revisr allows you to manage your WordPress website with a Git repository. With Revisr, you can:
* Track changes to your entire WordPress installation, or just the parts that you prefer
* Commit changes from within the WordPress dashboard
* Backup or restore your entire website in seconds
* Set up daily or weekly automatic backups
* Optionally push or pull changes to a remote repository, like Bitbucket or Github
* Test changes out before deploying them to another server
* Revert your website files and/or database to an earlier version
* Quickly discard any unwanted changes
A must have plugin for deploying and managing WordPress using Git repositories.
== Installation ==
= Requirements =
* A web server with Git and WordPress installed
* The PHP exec() function enabled
= Instructions =
* Unzip the plugin folder and upload it to the plugins directory of your WordPress installation.
* If the WordPress installation is not already in a Git repository, you will be able to create a new one in the Revisr Dashboard.
* Go to the Revisr settings page and adjust any settings as needed.
= Notes =
Please verify that database backups are working before attempting to revert the database, especially if attempting to do so on a production website. Backups use the mysqldump command, supported by most hosts/environments.
If you're using the HTTPS method to connect to the remote repository, the password for the remote repository will be stored in the '.git/config' file. You should take steps to prevent this from being publicly accessible. The following code added to a '.htaccess' file in the '.git/' directory will prevent public access:
`
content: Deny from all
`
If you're using NGINX, you'll have to update your configuration file with something similar to the following:
`
location ~ path/to/your-repo/.git {
deny all;
}
`
This issue can be avoided entirely by using SSH to authenticate, which is recommended in most cases. If using SSH, you will need to generate a SSH key on the server and add it to the remote repository (Bitbucket and Github both support SSH).
It is also adviseable to add Revisr to the .gitignore file via the settings page to make sure that reverts don't rollback any new functionality.
== Frequently Asked Questions ==
= How does Revisr handle the database? =
You have complete control, and can decide whether you want to track the entire database, just certain tables, or if you don't want to track the database at all. Then, during a backup, the tracked database tables are exported via "mysqldump". When importing or restoring the database to an earlier commit, Revisr first takes a backup of the existing database, creating a restore point from immediately before the import that can be reverted to if needed.
You can also set a "Development URL" that will be automatically replaced in the database during import- allowing for backups and restores that work on both your dev and live environments.
= Why aren't my commits being pushed to Bitbucket/GitHub? =
This is either an authentication issue or the remote branch is ahead of yours.
= Can I damage my site with this plugin? =
Care should be taken when dealing with upgrades that depend on the database. Taking verified backups before and after major changes is always recommended.
== Screenshots ==
1. The main dashboard of Revisr.
2. Simple staging area that lets you decide what gets committed.
3. Easily view changes in files with Revisr's diffs.
4. A comprehensive history of your website, with unlimited restore points.
== Changelog ==
= 2.0.2 - December 9, 2015 =
* Fix: CSS fixes for WordPress 4.4
* Fix: Broken settings link on "All Plugins" page
= 2.0.1 - October 30, 2015 =
* Fix: Bug causing all files to be committed in some cases
= 2.0 - October 27, 2015 =
* New: Commits are no longer stored in the database
* New: Setup wizard for when no repo is found
* New: View commits before pushing/pulling them
* New: View remote branches
* New: Sort/paginate branches
* New: Define installation path to Git from the settings page
* New: Action hooks and filters for extending Revisr
* New: Activity log can be filtered by age, event type, or username
* Tweak: Improved commit speed when there are no unstaged files
* Tweak: Include database backups in commit details
* Tweak: Improved general plugin performance
* Tweak: Improved file organization
* Tweak: Improved detection of unpushed commits
* Tweak: Improved information in the Help tab
* Tweak: Always show confirmation dialog before reverts
* Tweak: Removed unused bulk actions for commits
* Tweak: Refactored CSS/JS files
* Fix: PHP notice with saving the .gitignore
* Fix: Minor logging error when committing with "Backup DB" and "Push Changes" checked at the same time
* Fix: Committing a failed database backup
* Fix: Changing salts during a DB import logs a user out with no notification/error in Revisr
* Fix: Bug with the logged "Undo" URL for imports
* Fix: Bug with default sort order in the dashboard
* Fix: Conflict with BuddyPress
= 1.9.5 =
* Added sizes to database tables for the "Let me decide..." option
* Added ability to search for commits by the 7-letter commit ID/hash
* Added link/filter for viewing tags on dashboard/commits page
* Improved plugin intiation
* Fixed bug with certain errors saved as an array when making a commit
* Fixed bug with first commit not showing correct branch
* Fixed bug with ".gitignore" not showing latest version of gitignore when updated outside of Revisr
= 1.9.4 =
* Added support for sockets in the DB_HOST constant
* Fixed bug causing error on PHP 5.2
* Fixed bug causing potential error with backups/imports on some systems
= 1.9.3 =
* Added option to use WordPress instead of MySQL for backups and imports
* Added ability to backup the database through the "New Commit" screen without any pending files
* Added ability to change the amount of events per page on the Revisr dashboard
* Improved .gitignore functionality, automatically remove cached files from repository index
* Several bugfixes and security improvements
= 1.9.2 =
* Improved error handling for commits, pushes, and pulls
* Fixed bug with saving Git username
* Fixed bug with PHP error reporting
* Fixed bug with push count when backing up DB and pushing at the same time
* Fixed CSS issue with viewing untracked tables after importing
= 1.9.1 =
* Fixed bug with "Import Pushes" checkbox not showing after saving
* Fixed bug with saving some settings in Windows
* Fixed CSS issue when viewing a branch with no commits
* Small cleanup
= 1.9 =
* Added support for multiple commit authors
* Added basic support for custom WordPress file structures
* Added support for PHP autoloading when available
* Added pagination to the "Recent Activity" table on the dashboard page
* Added "Debug" page to the "Revisr Settings" page
* Fixed bug with viewing diffs in Firefox,
* Fixed potential XSS and user escalation vulnerabilities, props @jdgrimes
* General UI improvements
* General performance improvements
= 1.8.3 =
* Fixed bug with spaces in filename
= 1.8.2 =
* Improved plugin performance
* Fixed bug with timezone on some sites
* Fixed bug with loading translation file
* Changed "Commit Changes" to read "Save Changes"
* Improved Remote URL validation
= 1.8.1 =
* Fixed bug resulting from changes in WordPress 4.1
* Fixed bug with storing webhook URL in some environments
= 1.8 =
* Added ability to track individual database tables
* Added ability to import tracked database tables while pulling changes
* Added ability to run a safe search/replace on the database during import to support multiple environments (supports serialization)
* Added unique token to the webhook to improve security (existing webhooks will need to be updated)
* Added fallback to the WordPress database class if mysqldump is not available
* Moved backups to 'wp-content/uploads/revisr-backups/' (path may vary) and automatically generate .htaccess
* Updated pending files count to only show for admins
* Updated error handling for commits
* Small UI improvements
= 1.7.2 =
* Tweaked permissions check to only check permissions if repository exists.
= 1.7.1 =
* Fixed potential PHP notice with tags widget
* Fixed permissions to just check the ".git/" directory
= 1.7 =
* Added ability to create a new repository if one does not already exist
* Added ability to create automatic daily or weekly backups
* Added ability to merge changes
* Added ability to add tags to commits
* Fixed bug with backing up the database when a port is used
* General improvements
= 1.6.3 =
* Improvements to the list of committed files
* Small bugfixes
= 1.6.2 =
* Added dedicated page for managing branches
* Database backups from the dashboard now automatically create new commits
* Fixed timezone bug on the dashboard
* Improvements to settings page
* Small UI improvements
= 1.6.1 =
* Small UI improvements
* Changed Recent Activity to show 15 items
* Fixed bug with multi-site installations
* Fixed bug with reverting files
= 1.6 =
* Added internationalization support
* Switched to human-friendly time diffs for Recent Activity
* Fixed bug causing dashboard to freeze in some environments
* Improved error handling
* Removed passthru() functions
* Code cleanup
= 1.5.2 =
* Fixed bug with adding certain files
* Restricted access to super admins for multisite installations
= 1.5.1 =
* Added support for remote DB hosts
* Fixed bug with deleting files
= 1.5 =
* Improved commit interface, added ability to stage individual files
* Added ability to see and revert to changes pulled from a remote
* Added ability to set the name of the remotes (defaults to origin)
* Added ability to set the path to MySQL
* Improved compatibility for Mac and Windows
* Bugfixes and general cleanup
= 1.4.1 =
* Added "Backup Database" button to the Quick Actions
* Added number of unpulled/unpushed commits to the Quick Action buttons
* Updated recent activity text
= 1.4 =
* Added ability to automatically pull changes from Bitbucket or Github (enabled on the settings page)
* Fixed bug causing call_user_func() error in some enviornments (including Windows)
* Additional validation on Git commands
* Additional error handling
* Fixed bug with saving .gitignore
* Fixed potential bug with viewing pending files
* Minor cleanup
= 1.3.2 =
* Bugfixes
= 1.3.1 =
* Added error handling
* Commits are no longer automatically pushed by default. This can be changed in the plugin settings page.
* Fixed issue with .gitignore showing as a pending file
= 1.3 =
* Added ability to track/revert changes to the database
* The commits listing now shows commits on the current branch by default
* Added basic compatibility check
* Added settings link to the plugin page
= 1.2.1 =
* Minor bugfixes
= 1.2 =
* Added ability to view the number of pending files in the admin bar
* Small cleanup, updated wording
= 1.1 =
* Bugfixes and improvements
* Added ability to view changes in files from a previous commit
= 1.0.2 =
* Minor bugfixes
= 1.0.1 =
* Updated readme.txt
= 1.0 =
* Initial commit

View file

@ -1,403 +0,0 @@
<?php
/**
* The official Revisr WordPress plugin.
*
* A plugin that allows users to manage WordPress websites with Git repositories.
* Integrates several key git functions into the WordPress admin section.
*
* Plugin Name: Revisr
* Plugin URI: https://revisr.io/
* Description: A plugin that allows users to manage WordPress websites with Git repositories.
* Version: 2.0.2
* Author: Expanded Fronts, LLC
* Author URI: http://expandedfronts.com/
* License: GPL-3.0+
* License URI: http://www.gnu.org/licenses/gpl-3.0.txt
* Text Domain: revisr
* Domain Path: /languages
* Network: true
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
// Prevent direct access.
if ( ! defined( 'ABSPATH' ) ) exit;
/**
* The main Revisr class. Initializes the plugin and loads any
* required hooks and dependencies.
*
* @since 1.8.2
*/
final class Revisr {
/**
* Stores the current instance of Revisr.
* @var object
*/
private static $instance;
/**
* Stores the Revisr_DB object.
* @var Revisr_DB
*/
public $db;
/**
* Stores the Revisr_Git object.
* @var Revisr_Git
*/
public $git;
/**
* Stores the Revisr_Activity_Table object.
* @var Revisr_Activity_Table
*/
public $activity_table;
/**
* Stores the Revisr_Branch_Table object.
* @var Revisr_Branch_Table
*/
public $branch_table;
/**
* Stores the Revisr_Commits_Table object.
* @var Revisr_Commits_Table
*/
public $commits_table;
/**
* The name of the plugin.
* @var string
*/
public $plugin_name = 'revisr';
/**
* An array of user options and preferences.
* @var array
*/
public $options;
/**
* Empty construct, use revisr() instead.
* @access private
*/
private function __construct() {
// Do nothing here.
}
/**
* Prevent direct __clones by making the method private.
* @access private
*/
private function __clone() {
_doing_it_wrong( __FUNCTION__, __( 'Cheatin&#8217; huh?', 'revisr' ), '1.8' );
}
/**
* Prevent direct unserialization by making the method private.
* @access private
*/
private function __wakeup() {
_doing_it_wrong( __FUNCTION__, __( 'Cheatin&#8217; huh?', 'revisr' ), '1.8' );
}
/**
* Retrieves the current instance of the Revisr plugin,
* or create a new one if it doesn't already exist.
* @access public
* @since 1.8.2
* @return object
*/
public static function get_instance() {
if ( null == self::$instance ) {
// Create the instance.
self::$instance = new self;
self::$instance->options = self::$instance->get_options();
// Define constants used by the plugin.
self::$instance->define_constants();
// Load the rest of the plugin.
add_action( 'after_setup_theme', array( __CLASS__, 'load_instance' ) );
}
return self::$instance;
}
/**
* Loads dependencies and initiates action hooks.
* @access public
*/
public static function load_instance() {
// Load the classes via autoloader if available.
if ( function_exists( 'spl_autoload_register' ) ) {
spl_autoload_register( array( __CLASS__, 'autoload' ) );
} else {
self::$instance->load_dependencies();
}
// Set the locale.
self::$instance->set_locale();
// Load any public-facing hooks.
self::$instance->load_public_hooks();
// Load any admin-side hooks.
if ( current_user_can( self::get_capability() ) && is_admin() ) {
self::$instance->load_admin_hooks();
}
// Fires after the plugin has loaded.
do_action( 'revisr_loaded' );
}
/**
* Callback for spl_autoload_register.
* @access private
* @param string $class The class to load.
* @since 1.9
*/
private static function autoload( $class ) {
$file = REVISR_PATH . 'classes/class-' . strtolower( str_replace( '_', '-', $class ) ) . '.php';
if ( is_readable( $file ) ) {
require( $file );
}
}
/**
* Loads dependencies if autoloading is not enabled.
* @access private
*/
private function load_dependencies() {
require_once REVISR_PATH . 'classes/class-revisr-i18n.php';
require_once REVISR_PATH . 'classes/class-revisr-git.php';
require_once REVISR_PATH . 'classes/class-revisr-admin.php';
require_once REVISR_PATH . 'classes/class-revisr-remote.php';
require_once REVISR_PATH . 'classes/class-revisr-db.php';
require_once REVISR_PATH . 'classes/class-revisr-db-backup.php';
require_once REVISR_PATH . 'classes/class-revisr-db-import.php';
require_once REVISR_PATH . 'classes/class-revisr-git-callback.php';
require_once REVISR_PATH . 'classes/class-revisr-cron.php';
// Classes that should only be loaded for admins.
if ( current_user_can( self::get_capability() ) && is_admin() ) {
require_once REVISR_PATH . 'classes/class-revisr-admin-pages.php';
require_once REVISR_PATH . 'classes/class-revisr-compatibility.php';
require_once REVISR_PATH . 'classes/class-revisr-process.php';
require_once REVISR_PATH . 'classes/class-revisr-activity-table.php';
require_once REVISR_PATH . 'classes/class-revisr-branch-table.php';
require_once REVISR_PATH . 'classes/class-revisr-commits-table.php';
require_once REVISR_PATH . 'classes/class-revisr-meta-boxes.php';
require_once REVISR_PATH . 'classes/class-revisr-settings.php';
require_once REVISR_PATH . 'classes/class-revisr-settings-fields.php';
}
}
/**
* Defines the constants used by Revisr.
* @access private
*/
private function define_constants() {
// The base plugin file.
define( 'REVISR_FILE', __FILE__ );
// The full path used for includes.
define( 'REVISR_PATH', plugin_dir_path( REVISR_FILE ) );
// The URL of the plugin base directory.
define( 'REVISR_URL', plugin_dir_url( REVISR_FILE ) );
// The current version of the plugin.
define( 'REVISR_VERSION', '2.0.2' );
}
/**
* Sets the locale and loads any translation files.
* @access private
*/
private function set_locale() {
$revisr_i18n = new Revisr_i18n();
$revisr_i18n->set_domain( $this->plugin_name );
add_action( 'plugins_loaded', array( $revisr_i18n, 'load_plugin_textdomain' ) );
}
/**
* Loads any public-facing hooks.
* @access private
*/
private function load_public_hooks() {
$cron = new Revisr_Cron();
add_filter( 'cron_schedules', array( $cron, 'revisr_schedules' ) );
add_action( 'revisr_cron', array( $cron, 'run_automatic_backup' ) );
add_action( 'admin_post_nopriv_revisr_update', array( $cron, 'run_autopull' ) );
}
/**
* Loads hooks used in the admin.
* @access private
*/
private function load_admin_hooks() {
// Load necessary classes into the instance.
self::$instance->git = new Revisr_Git();
self::$instance->db = new Revisr_DB();
self::$instance->activity_table = new Revisr_Activity_Table();
self::$instance->branch_table = new Revisr_Branch_Table();
self::$instance->commits_table = new Revisr_Commits_Table();
// Create/configure custom admin pages and menus.
$admin_pages = new Revisr_Admin_Pages();
add_action( 'admin_menu', array( $admin_pages, 'menus' ), 2 );
add_action( 'admin_enqueue_scripts', array( $admin_pages, 'scripts' ) );
add_filter( 'custom_menu_order', array( $admin_pages, 'submenu_order' ) );
add_filter( 'parent_file', array( $admin_pages, 'parent_file' ) );
add_action( 'admin_bar_menu', array( $admin_pages, 'admin_bar' ), 999 );
add_action( 'admin_notices', array( $admin_pages, 'site5_notice' ) );
add_filter( 'plugin_action_links_' . plugin_basename( __FILE__ ), array( $admin_pages, 'settings_link' ) );
// Load the thickbox forms used by Revisr.
add_action( 'admin_post_revisr_delete_branch_form', array( $admin_pages, 'include_form' ) );
add_action( 'admin_post_revisr_merge_branch_form', array ( $admin_pages, 'include_form' ) );
add_action( 'admin_post_revisr_import_tables_form', array( $admin_pages, 'include_form' ) );
add_action( 'admin_post_revisr_revert_form', array( $admin_pages, 'include_form' ) );
add_action( 'admin_post_revisr_discard_form', array( $admin_pages, 'include_form' ) );
add_action( 'admin_post_revisr_push_form', array( $admin_pages, 'include_form' ) );
add_action( 'admin_post_revisr_pull_form', array( $admin_pages, 'include_form' ) );
add_action( 'admin_post_revisr_checkout_remote_form', array( $admin_pages, 'include_form' ) );
// Add custom meta boxes.
$meta_boxes = new Revisr_Meta_Boxes();
add_action( 'load-admin_page_revisr_new_commit', array( $meta_boxes, 'add_meta_box_actions' ) );
add_action( 'load-admin_page_revisr_view_commit', array( $meta_boxes, 'add_meta_box_actions' ) );
add_action( 'admin_footer-admin_page_revisr_new_commit', array( $meta_boxes, 'init_meta_boxes' ) );
add_action( 'add_meta_boxes_admin_page_revisr_new_commit', array( $meta_boxes, 'post_meta' ) );
add_action( 'wp_ajax_pending_files', array( $meta_boxes, 'pending_files' ) );
// Callbacks for AJAX UI
$admin = new Revisr_Admin();
add_action( 'wp_ajax_render_alert', array( 'Revisr_Admin', 'render_alert' ) );
add_action( 'wp_ajax_ajax_button_count', array( $admin, 'ajax_button_count' ) );
add_action( 'wp_ajax_verify_remote', array( self::$instance->git, 'verify_remote' ) );
// Update the database schema if necessary.
if ( get_option( 'revisr_db_version' ) !== '2.0' ) {
add_action( 'admin_init', array( $admin, 'do_upgrade' ) );
}
// Processes actions taken from within the WordPress dashboard.
$process = new Revisr_Process();
add_action( 'init', array( $process, 'is_repo' ) );
add_action( 'admin_post_process_commit', array( $process, 'commit' ) );
add_action( 'admin_post_process_checkout', array( $process, 'checkout' ) );
add_action( 'admin_post_process_create_branch', array( $process, 'create_branch' ) );
add_action( 'admin_post_process_delete_branch', array( $process, 'delete_branch' ) );
add_action( 'admin_post_process_merge', array( $process, 'merge' ) );
add_action( 'admin_post_process_import', array( $process, 'import' ) );
add_action( 'admin_post_init_repo', array( $process, 'init' ) );
add_action( 'admin_post_process_revert', array( $process, 'revert' ) );
add_action( 'admin_post_revisr_view_error', array( $process, 'view_error' ) );
add_action( 'admin_post_process_view_status', array( $process, 'view_status' ) );
add_action( 'admin_post_process_view_diff', array( $process, 'view_diff' ) );
add_action( 'wp_ajax_process_view_diff', array( $process, 'view_diff' ) );
add_action( 'wp_ajax_process_discard', array( $process, 'discard' ) );
add_action( 'wp_ajax_process_push', array( $process, 'push' ) );
add_action( 'wp_ajax_process_pull', array( $process, 'pull' ) );
add_action( 'wp_ajax_backup_db', array( self::$instance->db, 'backup' ) );
add_action( 'admin_post_revisr_download_sysinfo', array( $process, 'download_sysinfo' ) );
// Load the settings page.
$settings = new Revisr_Settings();
add_action( 'admin_init', array( $settings, 'init_settings' ) );
}
/**
* Returns the name of the capability required to use Revisr.
* @access public
* @return string
*/
public static function get_capability() {
return apply_filters( 'manage_revisr', 'install_plugins' );
}
/**
* Returns an array of user options and preferences.
* @access public
* @return array
*/
public static function get_options() {
$deprecated = get_option( 'revisr_settings' ) ? get_option( 'revisr_settings' ) : array();
$general = get_option( 'revisr_general_settings' ) ? get_option( 'revisr_general_settings' ) : array();
$remote = get_option( 'revisr_remote_settings' ) ? get_option( 'revisr_remote_settings' ) : array();
$database = get_option( 'revisr_database_settings' ) ? get_option( 'revisr_database_settings' ) : array();
$options = array_merge( $deprecated, $general, $remote, $database );
return $options;
}
/**
* Returns the name of the custom table used by Revisr.
* @access public
* @return string
*/
public static function get_table_name() {
global $wpdb;
return esc_sql( $wpdb->prefix . 'revisr' );
}
/**
* Installs the database table.
* @access public
*/
public static function install() {
$table_name = Revisr::get_table_name();
$sql = "CREATE TABLE {$table_name} (
id mediumint(9) NOT NULL AUTO_INCREMENT,
time datetime DEFAULT '0000-00-00 00:00:00' NOT NULL,
message TEXT,
event VARCHAR(42) NOT NULL,
user VARCHAR(60),
UNIQUE KEY id (id)
);";
require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
dbDelta( $sql );
update_option( 'revisr_db_version', '2.0' );
}
}
/**
* Returns a single instance of the Revisr plugin.
*
* @since 1.8.2
* @return object
*/
function revisr() {
return Revisr::get_instance();
}
// Let's go!
revisr();
// Register the activation hook.
register_activation_hook( __FILE__, array( 'Revisr', 'install' ) );

View file

@ -1 +0,0 @@
<?php // Silence is golden

View file

@ -1,85 +0,0 @@
<?php
/**
* branches.php
*
* Displays the branch management page.
*
* @package Revisr
* @license GPLv3
* @link https://revisr.io
* @copyright Expanded Fronts, LLC
*/
// Prevent direct access.
if ( ! defined( 'ABSPATH' ) ) exit;
// Prepares the Revisr custom list table.
revisr()->branch_table->prepare_items();
?>
<div class="wrap">
<h2><?php _e( 'Revisr - Branches', 'revisr' ); ?></h2>
<?php
if ( isset( $_GET['status'] ) && isset( $_GET['branch'] ) ) {
switch ( $_GET['status'] ) {
case "create_success":
$msg = sprintf( esc_html__( 'Successfully created branch: %s.', 'revisr' ), $_GET['branch'] );
echo '<div id="revisr-alert" class="updated" style="margin-top:20px;"><p>' . $msg . '</p></div>';
break;
case "create_error":
$msg = __( 'Failed to create the new branch.', 'revisr' );
if ( revisr()->git->is_branch( $_GET['branch'] ) ) {
$msg = sprintf( esc_html__( 'Failed to create branch: %s (branch already exists).', 'revisr' ), $_GET['branch'] );
}
echo '<div id="revisr-alert" class="error" style="margin-top:20px;"><p>' . $msg . '</p></div>';
break;
case "delete_success":
$msg = sprintf( esc_html__( 'Successfully deleted branch: %s.', 'revisr' ), $_GET['branch'] );
echo '<div id="revisr-alert" class="updated" style="margin-top:20px;"><p>' . $msg . '</p></div>';
break;
case "delete_fail":
$msg = sprintf( esc_html__( 'Failed to delete branch: %s.', 'revisr' ), $_GET['branch'] );
echo '<div id="revisr-alert" class="error" style="margin-top:20px;"><p>' . $msg . '</p></div>';
default:
// Do nothing.
}
}
?>
<div id="col-container" class="revisr-col-container">
<div id="col-right">
<form id="revisr-branch-form">
<?php revisr()->branch_table->display(); ?>
</form>
</div><!-- /#col-right -->
<div id="col-left">
<div id="revisr-add-branch-box" class="postbox">
<h3><?php _e( 'Add New Branch', 'revisr' ); ?></h3>
<div class="inside">
<form id="revisr-add-branch-form" method="post" action="<?php echo get_admin_url() . 'admin-post.php'; ?>">
<div class="form-field form-required">
<label for="revisr-branch-name"><strong><?php _e( 'Name', 'revisr' ); ?></strong></label>
<input id="revisr-branch-name" name="branch_name" type="text" value="" size="40" aria-required="true" />
<p class="description"><?php _e( 'The name of the new branch.', 'revisr' ); ?></p><br>
</div>
<div class="form-field">
<input id="checkout-new-branch" type="checkbox" name="checkout_new_branch" style="width: 17px;">
<label id="checkout-label" for="checkout-new-branch"><?php _e('Checkout new branch?'); ?></label>
<input type="hidden" name="action" value="process_create_branch">
<?php wp_nonce_field( 'process_create_branch', 'revisr_create_branch_nonce' ); ?>
<p id="add-branch-submit" class="submit"><input type="submit" name="submit" id="submit" class="button button-primary" value="<?php _e( 'Create Branch', 'revisr' ); ?>" style="width:150px;"></p>
</div>
</form>
</div>
</div>
</div><!-- /#col-left-->
</div><!-- /#col-container -->
</div><!-- /.wrap -->

View file

@ -1,36 +0,0 @@
<?php
/**
* commits.php
*
* Displays the commits list table page.
*
* @package Revisr
* @license GPLv3
* @link https://revisr.io
* @copyright Expanded Fronts, LLC
*/
// Prevent direct access.
if ( ! defined( 'ABSPATH' ) ) exit;
// Prepares the Revisr custom list table.
revisr()->commits_table->prepare_items();
// Gets current branches for filtering.
$branches = revisr()->git->get_branches();
?>
<div class="wrap">
<h1><?php _e( 'Commits', 'revisr' ); ?> <a href="<?php echo get_admin_url(); ?>admin.php?page=revisr_new_commit" class="page-title-action"><?php _e( 'Add New', 'revisr' ); ?></a></h1>
<?php revisr()->commits_table->render_views(); ?>
<form id="revisr-commits-filter" action="<?php echo get_admin_url();?>admin.php">
<input type="hidden" name="page" value="revisr_commits" />
<?php revisr()->commits_table->render_search(); ?>
<?php revisr()->commits_table->display(); ?>
</form>
</div><!-- /.wrap -->

View file

@ -1,183 +0,0 @@
<?php
/**
* Displays the main dashboard page.
*
* @package Revisr
* @license GPLv3
* @link https://revisr.io
* @copyright Expanded Fronts, LLC
*/
// Prevent direct access.
if ( ! defined( 'ABSPATH' ) ) exit;
$loader_url = REVISR_URL . 'assets/img/loader.gif';
$discard_url = get_admin_url() . 'admin-post.php?action=revisr_discard_form&TB_iframe=true&width=400&height=225';
$push_url = get_admin_url() . 'admin-post.php?action=revisr_push_form&TB_iframe=true&width=400&height=225';
$pull_url = get_admin_url() . 'admin-post.php?action=revisr_pull_form&TB_iframe=true&width=400&height=225';
?>
<?php if ( Revisr_Admin::is_doing_setup() ): ?>
<script>
window.location.href = "<?php echo get_admin_url(); ?>admin.php?page=revisr_setup";
</script>
<?php else: ?>
<?php
// Prepare the wp_list_table.
revisr()->activity_table->prepare_items();
?>
<div class="wrap">
<div id="icon-options-general" class="icon32"></div>
<h2><?php _e( 'Revisr - Dashboard', 'revisr' ); ?></h2>
<div id="revisr-alert-container">
<div id="revisr-loading-alert" class="revisr-alert updated"><p><?php _e( 'Loading...', 'revisr' ); ?></p></div>
<div id="revisr-processing-request" class="revisr-alert updated" style="display:none;"><p><?php _e( 'Processing request...', 'revisr' ); ?></p></div>
</div>
<div id="poststuff" class="revisr-poststuff">
<div id="post-body" class="metabox-holder columns-2">
<!-- main content -->
<div id="post-body-content">
<div class="meta-box-sortables ui-sortable">
<form id="revisr-activity-form">
<input type="hidden" name="page" value="<?php echo esc_attr( $_REQUEST['page'] ); ?>" />
<?php revisr()->activity_table->display(); ?>
</form>
</div><!-- .meta-box-sortables .ui-sortable -->
</div><!-- post-body-content -->
<!-- sidebar -->
<div id="postbox-container-1" class="postbox-container">
<div class="meta-box-sortables">
<!-- BEGIN QUICK ACTIONS -->
<div class="postbox">
<h3><span><?php _e('Quick Actions', 'revisr'); ?></span> <div id="revisr-loader"><img src="<?php echo $loader_url; ?>"/></div></h3>
<div class="inside">
<button id="revisr-commit-btn" class="button revisr-quick-action-btn"><span class="revisr-quick-action-btn-txt">| <?php _e( 'Save Changes', 'revisr' ); ?></span></button>
<a id="revisr-discard-btn" class="button revisr-quick-action-btn thickbox" title="<?php _e( 'Discard Changes', 'revisr' ); ?>" href="<?php echo $discard_url; ?>"><span class="revisr-quick-action-btn-txt">| <?php _e( 'Discard Changes', 'revisr' ); ?></span></a>
<button id="revisr-backup-btn" class="button revisr-quick-action-btn"><span class="revisr-quick-action-btn-txt">| <?php _e( 'Backup Database', 'revisr' ); ?></span></button>
<a id="revisr-push-btn" class="button revisr-quick-action-btn thickbox" title="<?php _e( 'Push Changes', 'revisr' ); ?>" href="<?php echo $push_url; ?>"><span id="push-text" class="revisr-quick-action-btn-txt">| <?php _e( 'Push Changes ', 'revisr' ); ?> <span id="revisr-unpushed"></span></span></a>
<a id="revisr-pull-btn" class="button revisr-quick-action-btn thickbox" title="<?php _e( 'Pull Changes' , 'revisr' ); ?>" href="<?php echo $pull_url; ?>"><span id="pull-text" class="revisr-quick-action-btn-txt">| <?php _e( 'Pull Changes', 'revisr' ); ?> <span id="revisr-unpulled"></span></span></a>
</div> <!-- .inside -->
</div> <!-- .postbox -->
<!-- END QUICK ACTIONS -->
<!-- BEGIN BRANCHES/TAGS WIDGET -->
<div id="revisr-branches-tags-widget" class="postbox ">
<h3 class="hndle"><span><?php _e( 'Branches/Tags', 'revisr' ); ?></span></h3>
<div class="inside">
<div id="taxonomy-category" class="categorydiv">
<ul id="branches-tags-tabs" class="category-tabs">
<li id="branches-tab" class="tabs"><a id="branches-link" href="#branches" onclick="return false;"><?php _e( 'Branches', 'revisr' ); ?></a></li>
<li id="tags-tab" class="hide-if-no-js"><a id="tags-link" href="#tags" onclick="return false;"><?php _e( 'Tags', 'revisr' ); ?></a></li>
</ul>
<div id="branches" class="tabs-panel" style="display: block;">
<table id="branches-table" class="widefat">
<?php
$admin_url = get_admin_url();
$branches = revisr()->git->get_branches();
if ( is_array( $branches ) && ! empty( $branches ) ) {
foreach ( $branches as $key => $value ){
$branch = substr( $value, 2 );
if ( '*' === substr( $value, 0, 1 ) ) {
printf( '<tr><td><strong>%s</strong></td><td width="70"><a class="button disabled branch-btn" onlick="preventDefault()" href="#">%s</a></td></tr>',
$branch,
__( 'Checked Out', 'revisr' )
);
} else {
$branch_url = wp_nonce_url( $admin_url . "admin-post.php?action=process_checkout&branch={$branch}", 'process_checkout', 'revisr_checkout_nonce' );
printf( '<tr><td>%s</td><td width="70"><a class="button branch-btn" href="%s">%s</a></td></tr>',
$branch,
$branch_url,
__( 'Checkout', 'revisr' )
);
}
}
} else {
printf( '<tr><td>%s</td></tr>', __( 'No branches found.', 'revisr' ) );
}
?>
</table>
</div>
<div id="tags" class="tabs-panel" style="display: none;">
<?php
$refs = revisr()->git->run( 'show-ref', array( '--tags', '-d', '--abbrev=7' ) );
$tags = array();
if ( is_array( $refs ) ) {
foreach ( $refs as $ref ) {
$tmp = explode( ' ', $ref );
$tag = explode( '/', $tmp[1] );
$tag = end( $tag );
$tags[$tag] = $tmp[0];
}
}
if ( is_array( $tags ) && ! empty( $tags ) ) {
echo '<ul id="tags-list">';
foreach ( $tags as $tag => $commit_hash ) {
$tag = esc_attr( $tag );
$url = esc_url( get_admin_url() . 'admin.php?page=revisr_view_commit&commit=' . $commit_hash );
echo '<li class="revisr-tag"><a href="' . $url .'">' . $tag . '</a></li>';
}
echo '</ul>';
} else {
printf( '<p>%s</p>', __( 'No tags found.', 'revisr' ) );
}
?>
</div>
<div id="manage-branches" class="wp-hidden-children">
<h4><a id="revisr-manage-branches-link" href="<?php echo get_admin_url() . 'admin.php?page=revisr_branches'; ?>" class="hide-if-no-js"><?php _e( 'Manage Branches', 'revisr' ); ?></a></h4>
</div>
</div>
</div>
</div>
<!-- END BRANCHES/TAGS WIDGET -->
<div class="postbox">
<h3><span><?php _e( 'Documentation', 'revisr' ); ?></span></h3>
<div class="inside">
<?php printf( __( 'Need help? Check out the improved documentation at %s.', 'revisr' ), ' <a href="http://docs.revisr.io/" target="_blank">http://docs.revisr.io</a>' ); ?>
<br><br>
<?php printf( __( '&copy; %d Expanded Fronts, LLC', 'revisr' ), date( 'Y' ) ); ?>
</div> <!-- .inside -->
</div> <!-- .postbox -->
</div> <!-- .meta-box-sortables -->
</div> <!-- #postbox-container-1 .postbox-container -->
</div> <!-- #post-body .metabox-holder .columns-2 -->
<br class="clear">
</div> <!-- #poststuff -->
</div> <!-- .wrap -->
<?php endif; // endif is_doing_setup() ?>

View file

@ -1,40 +0,0 @@
<?php
/**
* Displays the help page.
*
* @package Revisr
* @license GPLv3
* @link https://revisr.io
* @copyright Expanded Fronts, LLC
*/
// Prevent direct access.
if ( ! defined( 'ABSPATH' ) ) exit;
?>
<h3><?php _e( 'Help and Troubleshooting', 'revisr' ); ?></h3>
<p><?php _e( 'Support is available on the <a href="https://wordpress.org/support/plugin/revisr" target="_blank">plugin support forums</a>.', 'revisr' ); ?></p>
<p><?php _e( 'Found a bug or have a feature request? Please open an issue on <a href="https://github.com/ExpandedFronts/revisr" target="_blank">GitHub</a>!', 'revisr' ); ?></p>
</form>
<form class="revisr-settings-form" action="<?php echo esc_url( admin_url( 'admin-post.php' ) ); ?>" method="post">
<textarea readonly="readonly" onclick="this.focus(); this.select()" style="width:750px;height:500px;font-family:Menlo,Monaco,monospace;" name='revisr-sysinfo'><?php echo Revisr_Compatibility::get_sysinfo(); ?></textarea>
<p class="submit">
<input type="hidden" name="action" value="revisr_download_sysinfo" />
<?php wp_nonce_field( 'process_download_sysinfo', 'revisr_info_nonce' ); ?>
<?php submit_button( 'Download System Info', 'primary', 'revisr-download-sysinfo', false ); ?>
<?php
if ( revisr()->git->is_repo ) {
$status_text = __( 'View Status', 'revisr' );
$status_nonce = wp_create_nonce( 'revisr_view_status' );
printf( '<a href="%s" title="%s" class="button thickbox">%s</a>',
get_admin_url() . 'admin-post.php?action=process_view_status&revisr_status_nonce=' . $status_nonce . '&TB_iframe=true',
$status_text,
$status_text
);
}
?>
</p>
</form>

View file

@ -1 +0,0 @@
<?php // Silence is golden

View file

@ -1,59 +0,0 @@
<?php
/**
* new-commit.php
*
* Displays the form to create new commit.
*
* @package Revisr
* @license GPLv3
* @link https://revisr.io
* @copyright Expanded Fronts, LLC
*/
// Prevent direct access.
if ( ! defined( 'ABSPATH' ) ) exit;
?>
<div class="wrap">
<h1><?php _e( 'New Commit', 'revisr' ); ?></h1>
<?php if ( isset( $_GET['error'] ) ) Revisr_Admin::render_alert( true ); ?>
<form id="revisr-commit-form" method="post" action="<?php echo get_admin_url(); ?>admin-post.php">
<input type="hidden" name="action" value="process_commit">
<?php wp_nonce_field( 'process_commit', 'revisr_commit_nonce' );
// Save metabox order, state
wp_nonce_field( 'meta-box-order', 'meta-box-order-nonce', false );
wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false ); ?>
<div id="poststuff">
<div id="post-body" class="metabox-holder columns-<?php echo 1 == get_current_screen()->get_columns() ? '1' : '2'; ?>">
<div id="post-body-content">
<div id="titlediv">
<div id="titlewrap">
<input type="text" name="post_title" size="30" value="" id="title" spellcheck="true" autocomplete="off" placeholder="<?php _e( 'Enter a message for your commit', 'revisr' ); ?>">
</div>
</div><!-- /titlediv -->
</div>
<div id="postbox-container-1" class="postbox-container">
<?php do_meta_boxes( 'admin_page_revisr_new_commit', 'side', null ); ?>
</div>
<div id="postbox-container-2" class="postbox-container">
<?php do_meta_boxes( 'admin_page_revisr_new_commit', 'normal', null ); ?>
</div>
</div> <!-- #post-body -->
</div> <!-- #poststuff -->
</form><!-- #revisr-commit-form -->
</div><!-- .wrap -->

Some files were not shown because too many files have changed in this diff Show more