Compare commits
1 Commits
release-3.
...
phpbb2_RC4
Author | SHA1 | Date | |
---|---|---|---|
|
c368829e74 |
@@ -1,18 +0,0 @@
|
||||
# This file is for standardising the coding style between different editors
|
||||
# http://editorconfig.org/
|
||||
|
||||
root = true
|
||||
|
||||
[*]
|
||||
end_of_line = lf
|
||||
indent_size = 4
|
||||
indent_style = tab
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
|
||||
[*.md]
|
||||
trim_trailing_whitespace = false
|
||||
|
||||
[*.yml]
|
||||
indent_size = 4
|
||||
indent_style = space
|
24
.gitignore
vendored
@@ -1,24 +0,0 @@
|
||||
*~
|
||||
/phpunit.xml
|
||||
/phpBB/cache/*
|
||||
!/phpBB/cache/.htaccess
|
||||
!/phpBB/cache/index.html
|
||||
/phpBB/composer.phar
|
||||
/phpBB/config*.php
|
||||
/phpBB/ext/*
|
||||
/phpBB/files/*
|
||||
/phpBB/images/avatars/gallery/*
|
||||
/phpBB/images/avatars/upload/*
|
||||
/phpBB/images/ranks/*
|
||||
/phpBB/install/schemas/schema.json
|
||||
/phpBB/language/*
|
||||
!/phpBB/language/en
|
||||
/phpBB/store/*
|
||||
/phpBB/styles/*
|
||||
!/phpBB/styles/prosilver
|
||||
!/phpBB/styles/subsilver2
|
||||
/phpBB/vendor
|
||||
/tests/phpbb_unit_tests.sqlite*
|
||||
/tests/test_config*.php
|
||||
/tests/tmp/*
|
||||
/tests/vendor
|
49
.travis.yml
@@ -1,49 +0,0 @@
|
||||
language: php
|
||||
|
||||
matrix:
|
||||
include:
|
||||
- php: 5.3.3
|
||||
env: DB=mysqli
|
||||
- php: 5.3
|
||||
env: DB=mysqli # MyISAM
|
||||
- php: 5.4
|
||||
env: DB=mysqli
|
||||
- php: 5.4
|
||||
env: DB=mysql
|
||||
- php: 5.4
|
||||
env: DB=mariadb
|
||||
- php: 5.4
|
||||
env: DB=postgres
|
||||
- php: 5.4
|
||||
env: DB=sqlite3
|
||||
- php: 5.4
|
||||
env: DB=mysqli;SLOWTESTS=1
|
||||
- php: 5.5
|
||||
env: DB=mysqli
|
||||
- php: 5.6
|
||||
env: DB=mysqli
|
||||
- php: hhvm
|
||||
env: DB=mysqli
|
||||
allow_failures:
|
||||
- php: hhvm
|
||||
fast_finish: true
|
||||
|
||||
services:
|
||||
- redis-server
|
||||
|
||||
install:
|
||||
- travis/setup-phpbb.sh $DB $TRAVIS_PHP_VERSION
|
||||
|
||||
before_script:
|
||||
- travis/setup-database.sh $DB $TRAVIS_PHP_VERSION
|
||||
- phantomjs --webdriver=8910 > /dev/null &
|
||||
|
||||
script:
|
||||
- travis/phing-sniff.sh $DB $TRAVIS_PHP_VERSION
|
||||
- travis/check-sami-parse-errors.sh $DB $TRAVIS_PHP_VERSION
|
||||
- travis/check-image-icc-profiles.sh $DB $TRAVIS_PHP_VERSION
|
||||
- travis/check-executable-files.sh $DB $TRAVIS_PHP_VERSION ./
|
||||
- sh -c "if [ '$SLOWTESTS' != '1' ]; then phpBB/vendor/bin/phpunit --configuration travis/phpunit-$DB-travis.xml; fi"
|
||||
- sh -c "if [ '$SLOWTESTS' = '1' ]; then phpBB/vendor/bin/phpunit --configuration travis/phpunit-$DB-travis.xml --group slow; fi"
|
||||
- sh -c "if [ '$TRAVIS_PHP_VERSION' = '5.3.3' -a '$DB' = 'mysqli' -a '$TRAVIS_PULL_REQUEST' != 'false' ]; then git-tools/commit-msg-hook-range.sh origin/$TRAVIS_BRANCH..FETCH_HEAD; fi"
|
||||
|
36
README.md
@@ -1,36 +0,0 @@
|
||||
[](http://www.phpbb.com)
|
||||
|
||||
## ABOUT
|
||||
|
||||
phpBB is a free bulletin board written in PHP.
|
||||
|
||||
## COMMUNITY
|
||||
|
||||
Find support and lots more on [phpBB.com](http://www.phpbb.com)! Discuss the development on [area51](http://area51.phpbb.com/phpBB/index.php).
|
||||
|
||||
## INSTALLING DEPENDENCIES
|
||||
|
||||
To be able to run an installation from the repo (and not from a pre-built package) you need to run the following commands to install phpBB's dependencies.
|
||||
|
||||
cd phpBB
|
||||
php ../composer.phar install --dev
|
||||
|
||||
|
||||
## CONTRIBUTE
|
||||
|
||||
1. [Create an account on phpBB.com](http://www.phpbb.com/community/ucp.php?mode=register)
|
||||
2. [Create a ticket (unless there already is one)](http://tracker.phpbb.com/secure/CreateIssue!default.jspa)
|
||||
3. [Read our Git Contribution Guidelines](http://wiki.phpbb.com/Git); if you're new to git, also read [the introduction guide](http://wiki.phpbb.com/display/DEV/Working+with+Git)
|
||||
4. Send us a pull request
|
||||
|
||||
## AUTOMATED TESTING
|
||||
|
||||
We have unit and functional tests in order to prevent regressions. You can view the bamboo continuous integration [here](http://bamboo.phpbb.com) or check our travis build below:
|
||||
|
||||
* develop [](http://travis-ci.org/phpbb/phpbb)
|
||||
* develop-ascraeus [](http://travis-ci.org/phpbb/phpbb)
|
||||
* develop-olympus [](http://travis-ci.org/phpbb/phpbb)
|
||||
|
||||
## LICENSE
|
||||
|
||||
[GNU General Public License v2](http://opensource.org/licenses/gpl-2.0.php)
|
399
build/build.xml
@@ -1,399 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<project name="phpBB" description="The phpBB forum software" default="all" basedir="../">
|
||||
<!-- a few settings for the build -->
|
||||
<property name="newversion" value="3.1.3" />
|
||||
<property name="prevversion" value="3.1.3-RC2" />
|
||||
<property name="olderversions" value="3.0.12, 3.0.13, 3.0.13-PL1, 3.1.0, 3.1.1, 3.1.2, 3.1.3-RC1" />
|
||||
<!-- no configuration should be needed beyond this point -->
|
||||
|
||||
<property name="oldversions" value="${olderversions}, ${prevversion}" />
|
||||
<property name="versions" value="${oldversions}, ${newversion}" />
|
||||
|
||||
<!-- These are the main targets which you will probably want to use -->
|
||||
<target name="all" depends="clean,prepare,composer,test,docs,package" />
|
||||
<target name="build" depends="clean,prepare,composer,test,docs" />
|
||||
|
||||
<target name="prepare">
|
||||
<mkdir dir="build/logs" />
|
||||
<mkdir dir="build/api" />
|
||||
<mkdir dir="build/codebrowser" />
|
||||
<mkdir dir="build/coverage" />
|
||||
<mkdir dir="build/cpd" />
|
||||
<mkdir dir="build/dependencies" />
|
||||
<mkdir dir="build/new_version" />
|
||||
<mkdir dir="build/new_version/files" />
|
||||
<mkdir dir="build/new_version/patches" />
|
||||
<mkdir dir="build/new_version/release_files" />
|
||||
<mkdir dir="build/new_version/update" />
|
||||
<mkdir dir="build/old_versions" />
|
||||
<mkdir dir="build/save" />
|
||||
</target>
|
||||
|
||||
<target name="clean">
|
||||
<delete dir="build/logs" />
|
||||
<delete dir="build/api" />
|
||||
<delete dir="build/codebrowser" />
|
||||
<delete dir="build/coverage" />
|
||||
<delete dir="build/cpd" />
|
||||
<delete dir="build/dependencies" />
|
||||
<delete dir="build/new_version" />
|
||||
<delete dir="build/old_versions" />
|
||||
<delete dir="build/save" />
|
||||
</target>
|
||||
|
||||
<!--
|
||||
This target basically just runs composer in the phpBB tree to ensure
|
||||
all dependencies are loaded. Additional development dependencies are
|
||||
loaded because testing framework may depend on them.
|
||||
-->
|
||||
<target name="composer">
|
||||
<exec dir="phpBB"
|
||||
command="php ../composer.phar install --dev"
|
||||
checkreturn="true"
|
||||
passthru="true" />
|
||||
</target>
|
||||
|
||||
<target name="test" depends="clean,prepare,composer">
|
||||
<exec dir="."
|
||||
command="phpBB/vendor/bin/phpunit
|
||||
--log-junit build/logs/phpunit.xml
|
||||
--coverage-clover build/logs/clover.xml
|
||||
--coverage-html build/coverage"
|
||||
passthru="true" />
|
||||
</target>
|
||||
|
||||
<target name="test-slow" depends="clean,prepare,composer">
|
||||
<exec dir="."
|
||||
command="phpBB/vendor/bin/phpunit
|
||||
--log-junit build/logs/phpunit.xml
|
||||
--group slow
|
||||
--coverage-clover build/logs/clover-slow.xml
|
||||
--coverage-html build/coverage-slow"
|
||||
passthru="true" />
|
||||
</target>
|
||||
|
||||
<target name="sniff">
|
||||
<exec command="phpBB/vendor/bin/phpcs
|
||||
-s
|
||||
--extensions=php
|
||||
--standard=build/code_sniffer/ruleset-php-strict-core.xml
|
||||
--ignore=${project.basedir}/phpBB/phpbb/db/migration/data/v30x/*
|
||||
phpBB/phpbb"
|
||||
dir="." returnProperty="retval-php-strict" passthru="true" />
|
||||
<exec command="phpBB/vendor/bin/phpcs
|
||||
-s
|
||||
--extensions=php
|
||||
--standard=build/code_sniffer/ruleset-php-legacy-core.xml
|
||||
--ignore=${project.basedir}/phpBB/cache/*
|
||||
--ignore=${project.basedir}/phpBB/develop/*
|
||||
--ignore=${project.basedir}/phpBB/ext/*
|
||||
--ignore=${project.basedir}/phpBB/includes/diff/*.php
|
||||
--ignore=${project.basedir}/phpBB/includes/sphinxapi.php
|
||||
--ignore=${project.basedir}/phpBB/includes/utf/data/*
|
||||
--ignore=${project.basedir}/phpBB/install/data/*
|
||||
--ignore=${project.basedir}/phpBB/install/database_update.php
|
||||
--ignore=${project.basedir}/phpBB/phpbb/*
|
||||
--ignore=${project.basedir}/phpBB/vendor/*
|
||||
phpBB"
|
||||
dir="." returnProperty="retval-php-legacy" passthru="true" />
|
||||
<exec command="phpBB/vendor/bin/phpcs
|
||||
-s
|
||||
--extensions=php
|
||||
--standard=build/code_sniffer/ruleset-php-extensions.xml
|
||||
--ignore=${project.basedir}/phpBB/ext/*/tests/*
|
||||
--ignore=${project.basedir}/phpBB/ext/*/vendor/*
|
||||
phpBB/ext"
|
||||
dir="." returnProperty="retval-php-ext" passthru="true" />
|
||||
<if>
|
||||
<or>
|
||||
<not><equals arg1="${retval-php-strict}" arg2="0" /></not>
|
||||
<not><equals arg1="${retval-php-legacy}" arg2="0" /></not>
|
||||
<not><equals arg1="${retval-php-ext}" arg2="0" /></not>
|
||||
</or>
|
||||
<then>
|
||||
<fail message="PHP Code Sniffer failed." />
|
||||
</then>
|
||||
</if>
|
||||
</target>
|
||||
|
||||
<!-- Builds docs for current branch into build/api/output/master -->
|
||||
<target name="docs">
|
||||
<exec dir="."
|
||||
command="phpBB/vendor/bin/sami.php update build/sami-checkout.conf.php"
|
||||
passthru="true" />
|
||||
</target>
|
||||
<!-- Builds docs for multiple branches/tags into build/api/output/$branch -->
|
||||
<target name="docs-all">
|
||||
<exec dir="."
|
||||
command="phpBB/vendor/bin/sami.php update build/sami-all.conf.php"
|
||||
passthru="true" />
|
||||
</target>
|
||||
|
||||
<target name="old-version-diffs">
|
||||
<foreach list="${oldversions}" param="version" target="old-version-diff" />
|
||||
</target>
|
||||
|
||||
<!-- This target retrieves an old version from the git tag release-${version}
|
||||
and creates a diff between that release and the new one -->
|
||||
<target name="old-version-diff">
|
||||
<echo msg="Retrieving version ${version}" />
|
||||
<mkdir dir="build/old_versions/release-${version}" />
|
||||
|
||||
<phingcall target="export">
|
||||
<property name="revision" value="release-${version}" />
|
||||
<property name="dir" value="build/old_versions/release-${version}" />
|
||||
</phingcall>
|
||||
|
||||
<phingcall target="clean-diff-dir">
|
||||
<property name="dir" value="build/old_versions/release-${version}" />
|
||||
</phingcall>
|
||||
|
||||
<exec dir="build/old_versions" command="LC_ALL=C diff -crNEBwd release-${version} release-${newversion} >
|
||||
../new_version/patches/phpBB-${version}_to_${newversion}.patch" escape="false" />
|
||||
<exec dir="build/old_versions" command="LC_ALL=C diff -qr release-${version} release-${newversion} | grep 'Only in release-${version}' > ../new_version/patches/phpBB-${version}_to_${newversion}.deleted" escape="false" />
|
||||
</target>
|
||||
|
||||
<target name="prepare-new-version">
|
||||
<!-- select the currently checked out commit (HEAD) for packaging -->
|
||||
<mkdir dir="build/new_version/phpBB3" />
|
||||
<phingcall target="export">
|
||||
<property name="revision" value="HEAD" />
|
||||
<property name="dir" value="build/new_version/phpBB3" />
|
||||
</phingcall>
|
||||
|
||||
<!-- copy into directory for diffs -->
|
||||
<exec dir="build" command="cp -rp new_version/phpBB3 old_versions/release-${newversion}" />
|
||||
<!-- and clean up -->
|
||||
<phingcall target="clean-diff-dir">
|
||||
<property name="dir" value="build/old_versions/release-${newversion}" />
|
||||
</phingcall>
|
||||
|
||||
<!-- create an empty config.php file (not for diffs) -->
|
||||
<touch file="build/new_version/phpBB3/config.php" />
|
||||
|
||||
</target>
|
||||
|
||||
<target name="package" depends="clean,prepare,prepare-new-version,old-version-diffs">
|
||||
<exec dir="build" command="php -f package.php '${versions}' > logs/package.log" escape="false" />
|
||||
<exec dir="build" escape="false"
|
||||
command="diff -crNEBwd old_versions/release-${prevversion}/language new_version/phpBB3/language >
|
||||
save/phpbb-${prevversion}_to_${newversion}_language.patch" />
|
||||
<exec dir="build" escape="false"
|
||||
command="diff -crNEBwd old_versions/release-${prevversion}/styles/prosilver new_version/phpBB3/styles/prosilver >
|
||||
save/phpbb-${prevversion}_to_${newversion}_prosilver.patch" />
|
||||
<exec dir="build" escape="false"
|
||||
command="diff -crNEBwd old_versions/release-${prevversion}/styles/subsilver2 new_version/phpBB3/styles/subsilver2 >
|
||||
save/phpbb-${prevversion}_to_${newversion}_subsilver2.patch" />
|
||||
|
||||
<exec dir="build" escape="false"
|
||||
command="git shortlog --summary --numbered release-${prevversion}...HEAD >
|
||||
save/phpbb-${prevversion}_to_${newversion}_git_shortlog.txt" />
|
||||
<exec dir="build" escape="false"
|
||||
command="git diff --stat release-${prevversion}...HEAD >
|
||||
save/phpbb-${prevversion}_to_${newversion}_git_diffstat.txt" />
|
||||
|
||||
<phingcall target="checksum-dir">
|
||||
<property name="dir" value="build/new_version/release_files" />
|
||||
</phingcall>
|
||||
</target>
|
||||
|
||||
<target name="checksum-dir">
|
||||
<foreach param="filename" absparam="absfilename" target="checksum-file">
|
||||
<fileset dir="${dir}">
|
||||
<type type="file" />
|
||||
</fileset>
|
||||
</foreach>
|
||||
</target>
|
||||
|
||||
<target name="checksum-file">
|
||||
<echo msg="Creating checksum file for ${absfilename}" />
|
||||
<php function="dirname" returnProperty="dir"><param value="${absfilename}"/></php>
|
||||
<exec dir="${dir}" command="sha256sum ${filename} > ${filename}.sha256" />
|
||||
</target>
|
||||
|
||||
<target name="announcement" depends="prepare">
|
||||
<echo msg="Writing download links and checksums for email announcement to save/announcement_email_${newversion}.txt" />
|
||||
<exec dir="build" escape="false"
|
||||
command="php -f build_announcement.php email '${newversion}' 'new_version/release_files' sha256 >
|
||||
save/announcement_email_${newversion}.txt" />
|
||||
|
||||
<echo msg="Writing download links and checksums for bbcode announcement to save/announcement_bbcode_${newversion}.txt" />
|
||||
<exec dir="build" escape="false"
|
||||
command="php -f build_announcement.php bbcode '${newversion}' 'new_version/release_files' sha256 >
|
||||
save/announcement_bbcode_${newversion}.txt" />
|
||||
</target>
|
||||
|
||||
<target name="changelog" depends="prepare">
|
||||
<exec dir="build" escape="false"
|
||||
command="php -f build_changelog.php '${newversion}' >
|
||||
save/changelog_${newversion}.html" />
|
||||
</target>
|
||||
|
||||
<!--
|
||||
This target can be called using phingcall to retrieve a clean
|
||||
checkout of a commit from git. It will only export the phpBB directory.
|
||||
The properties revision and dir are required.
|
||||
This target will remove directories that are not needed in distribution
|
||||
and set correct permissions.
|
||||
-->
|
||||
<target name="export">
|
||||
<exec dir="phpBB"
|
||||
command="git archive ${revision} | tar -xf - -C ../${dir}"
|
||||
checkreturn="true" />
|
||||
|
||||
<!-- Install composer dependencies, if there are any. -->
|
||||
<exec dir="${dir}"
|
||||
command='php -r "\$j = json_decode(file_get_contents(\"composer.json\")); echo isset(\$j->require);"'
|
||||
checkreturn="true"
|
||||
outputProperty='composer-has-dependencies' />
|
||||
<if>
|
||||
<equals arg1="${composer-has-dependencies}" arg2="1" trim="true" />
|
||||
<then>
|
||||
<!-- We have non-dev composer dependencies -->
|
||||
<exec dir="."
|
||||
command="git ls-tree ${revision} composer.phar"
|
||||
checkreturn="true"
|
||||
outputProperty='composer-ls-tree-output' />
|
||||
<if>
|
||||
<equals arg1="${composer-ls-tree-output}" arg2="" trim="true" />
|
||||
<then>
|
||||
<fail message="There are composer dependencies, but composer.phar is missing." />
|
||||
</then>
|
||||
<else>
|
||||
<!-- Export the phar, install dependencies, delete phar. -->
|
||||
<exec dir="."
|
||||
command="git archive ${revision} composer.phar | tar -xf - -C ${dir}"
|
||||
checkreturn="true" />
|
||||
<exec dir="${dir}"
|
||||
command="php composer.phar install --no-dev --optimize-autoloader"
|
||||
checkreturn="true"
|
||||
passthru="true" />
|
||||
<delete file="${dir}/composer.phar" />
|
||||
</else>
|
||||
</if>
|
||||
</then>
|
||||
<else>
|
||||
<!-- We do not have composer dependencies, do not ship composer files -->
|
||||
<delete file="${dir}/composer.json" />
|
||||
<delete file="${dir}/composer.lock" />
|
||||
</else>
|
||||
</if>
|
||||
|
||||
<!-- Create schema.json -->
|
||||
<exec dir="${dir}" command="php develop/create_schema_files.php" />
|
||||
|
||||
<delete file="${dir}/config.php" />
|
||||
<delete dir="${dir}/develop" />
|
||||
<delete dir="${dir}/install/data" />
|
||||
|
||||
<phingcall target="clean-vendor-dir">
|
||||
<property name="dir" value="${dir}" />
|
||||
</phingcall>
|
||||
|
||||
<echo msg="Setting permissions for checkout of ${revision} in ${dir}" />
|
||||
<!-- set permissions of all files to 644, directories to 755 -->
|
||||
<exec dir="${dir}" command="find . -type f|xargs chmod 644" escape="false" />
|
||||
<exec dir="${dir}" command="find . -type d|xargs chmod 755" escape="false" />
|
||||
<!-- set permissions of some directories to 777 -->
|
||||
<chmod mode="0777" file="${dir}/cache" />
|
||||
<chmod mode="0777" file="${dir}/store" />
|
||||
<chmod mode="0777" file="${dir}/files" />
|
||||
<chmod mode="0777" file="${dir}/images/avatars/upload" />
|
||||
</target>
|
||||
|
||||
<target name="clean-vendor-dir">
|
||||
<!-- Delete unrelated files from vendor/, see PHPBB3-12390 -->
|
||||
<delete dir="${dir}/vendor/lusitanian/oauth/examples" />
|
||||
<delete dir="${dir}/vendor/lusitanian/oauth/tests" />
|
||||
<delete file="${dir}/vendor/lusitanian/oauth/.gitignore" />
|
||||
<delete file="${dir}/vendor/lusitanian/oauth/.travis.yml" />
|
||||
<delete file="${dir}/vendor/lusitanian/oauth/phpunit.xml.dist" />
|
||||
<delete file="${dir}/vendor/lusitanian/oauth/README.md" />
|
||||
|
||||
<delete dir="${dir}/vendor/psr/log/Psr/Log/Test" />
|
||||
<delete file="${dir}/vendor/psr/log/.gitignore" />
|
||||
<delete file="${dir}/vendor/psr/log/README.md" />
|
||||
|
||||
<delete dir="${dir}/vendor/symfony/config/Symfony/Component/Config/Tests" />
|
||||
<delete file="${dir}/vendor/symfony/config/Symfony/Component/Config/.gitignore" />
|
||||
<delete file="${dir}/vendor/symfony/config/Symfony/Component/Config/CHANGELOG.md" />
|
||||
<delete file="${dir}/vendor/symfony/config/Symfony/Component/Config/README.md" />
|
||||
<delete file="${dir}/vendor/symfony/config/Symfony/Component/Config/phpunit.xml.dist" />
|
||||
|
||||
<delete dir="${dir}/vendor/symfony/console/Symfony/Component/Console/Tests" />
|
||||
<delete file="${dir}/vendor/symfony/console/Symfony/Component/Console/.gitignore" />
|
||||
<delete file="${dir}/vendor/symfony/console/Symfony/Component/Console/CHANGELOG.md" />
|
||||
<delete file="${dir}/vendor/symfony/console/Symfony/Component/Console/README.md" />
|
||||
<delete file="${dir}/vendor/symfony/console/Symfony/Component/Console/phpunit.xml.dist" />
|
||||
|
||||
<delete dir="${dir}/vendor/symfony/debug/Symfony/Component/Debug/Tests" />
|
||||
<delete file="${dir}/vendor/symfony/debug/Symfony/Component/Debug/.gitignore" />
|
||||
<delete file="${dir}/vendor/symfony/debug/Symfony/Component/Debug/CHANGELOG.md" />
|
||||
<delete file="${dir}/vendor/symfony/debug/Symfony/Component/Debug/README.md" />
|
||||
<delete file="${dir}/vendor/symfony/debug/Symfony/Component/Debug/phpunit.xml.dist" />
|
||||
|
||||
<delete dir="${dir}/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Tests" />
|
||||
<delete file="${dir}/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/.gitignore" />
|
||||
<delete file="${dir}/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/CHANGELOG.md" />
|
||||
<delete file="${dir}/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/README.md" />
|
||||
<delete file="${dir}/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/phpunit.xml.dist" />
|
||||
|
||||
<delete dir="${dir}/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/Tests" />
|
||||
<delete file="${dir}/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/.gitignore" />
|
||||
<delete file="${dir}/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/CHANGELOG.md" />
|
||||
<delete file="${dir}/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/README.md" />
|
||||
<delete file="${dir}/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/phpunit.xml.dist" />
|
||||
|
||||
<delete dir="${dir}/vendor/symfony/filesystem/Symfony/Component/Filesystem/Tests" />
|
||||
<delete file="${dir}/vendor/symfony/filesystem/Symfony/Component/Filesystem/.gitignore" />
|
||||
<delete file="${dir}/vendor/symfony/filesystem/Symfony/Component/Filesystem/CHANGELOG.md" />
|
||||
<delete file="${dir}/vendor/symfony/filesystem/Symfony/Component/Filesystem/README.md" />
|
||||
<delete file="${dir}/vendor/symfony/filesystem/Symfony/Component/Filesystem/phpunit.xml.dist" />
|
||||
|
||||
<delete dir="${dir}/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests" />
|
||||
<delete file="${dir}/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/.gitignore" />
|
||||
<delete file="${dir}/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/CHANGELOG.md" />
|
||||
<delete file="${dir}/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/README.md" />
|
||||
<delete file="${dir}/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/phpunit.xml.dist" />
|
||||
|
||||
<delete dir="${dir}/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests" />
|
||||
<delete file="${dir}/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/.gitignore" />
|
||||
<delete file="${dir}/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/CHANGELOG.md" />
|
||||
<delete file="${dir}/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/README.md" />
|
||||
<delete file="${dir}/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/phpunit.xml.dist" />
|
||||
|
||||
<delete dir="${dir}/vendor/symfony/routing/Symfony/Component/Routing/Tests" />
|
||||
<delete file="${dir}/vendor/symfony/routing/Symfony/Component/Routing/.gitignore" />
|
||||
<delete file="${dir}/vendor/symfony/routing/Symfony/Component/Routing/CHANGELOG.md" />
|
||||
<delete file="${dir}/vendor/symfony/routing/Symfony/Component/Routing/README.md" />
|
||||
<delete file="${dir}/vendor/symfony/routing/Symfony/Component/Routing/phpunit.xml.dist" />
|
||||
|
||||
<delete dir="${dir}/vendor/symfony/yaml/Symfony/Component/Yaml/Tests" />
|
||||
<delete file="${dir}/vendor/symfony/yaml/Symfony/Component/Yaml/.gitignore" />
|
||||
<delete file="${dir}/vendor/symfony/yaml/Symfony/Component/Yaml/CHANGELOG.md" />
|
||||
<delete file="${dir}/vendor/symfony/yaml/Symfony/Component/Yaml/README.md" />
|
||||
<delete file="${dir}/vendor/symfony/yaml/Symfony/Component/Yaml/phpunit.xml.dist" />
|
||||
|
||||
<delete dir="${dir}/vendor/twig/twig/doc" />
|
||||
<delete dir="${dir}/vendor/twig/twig/ext" />
|
||||
<delete dir="${dir}/vendor/twig/twig/test" />
|
||||
<delete file="${dir}/vendor/twig/twig/.editorconfig" />
|
||||
<delete file="${dir}/vendor/twig/twig/.gitignore" />
|
||||
<delete file="${dir}/vendor/twig/twig/.travis.yml" />
|
||||
<delete file="${dir}/vendor/twig/twig/AUTHORS" />
|
||||
<delete file="${dir}/vendor/twig/twig/CHANGELOG" />
|
||||
<delete file="${dir}/vendor/twig/twig/phpunit.xml.dist" />
|
||||
<delete file="${dir}/vendor/twig/twig/README.markdown" />
|
||||
</target>
|
||||
|
||||
<target name="clean-diff-dir">
|
||||
<delete dir="${dir}/cache" />
|
||||
<delete dir="${dir}/docs" />
|
||||
<delete dir="${dir}/files" />
|
||||
<delete dir="${dir}/install" />
|
||||
<delete dir="${dir}/store" />
|
||||
<delete dir="${dir}/vendor" />
|
||||
</target>
|
||||
|
||||
</project>
|
@@ -1,84 +0,0 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
/**
|
||||
*
|
||||
* This file is part of the phpBB Forum Software package.
|
||||
*
|
||||
* @copyright (c) phpBB Limited <https://www.phpbb.com>
|
||||
* @license GNU General Public License, version 2 (GPL-2.0)
|
||||
*
|
||||
* For full copyright and license information, please see
|
||||
* the docs/CREDITS.txt file.
|
||||
*
|
||||
*/
|
||||
|
||||
if (php_sapi_name() !== 'cli' || $_SERVER['argc'] != 5)
|
||||
{
|
||||
echo "Usage (CLI only): build_announcement.php email|bbcode new_version release_files_dir checksum_algorithm\n";
|
||||
exit(1);
|
||||
}
|
||||
|
||||
$mode = $_SERVER['argv'][1];
|
||||
$version = $_SERVER['argv'][2];
|
||||
$root = $_SERVER['argv'][3];
|
||||
$checksum_algorithm = $_SERVER['argv'][4];
|
||||
|
||||
$series_version = substr($version, 0, 3);
|
||||
$base_url = "https://download.phpbb.com/pub/release/$series_version";
|
||||
|
||||
if (version_compare($version, "$series_version.0", '<'))
|
||||
{
|
||||
// Everything before 3.x.0, i.e. unstable (e.g. alpha, beta, rc)
|
||||
$url = "$base_url/unstable/$version";
|
||||
}
|
||||
else if (strpos($version, 'RC') !== false)
|
||||
{
|
||||
// Release candidate of stable release
|
||||
$url = "$base_url/qa/$version";
|
||||
}
|
||||
else
|
||||
{
|
||||
// Stable release (e.g. 3.x.0, 3.x.1, 3.x.2, 3.x.3-PL1)
|
||||
$url = "$base_url/$version";
|
||||
}
|
||||
|
||||
if ($mode === 'bbcode')
|
||||
{
|
||||
$template = "[url=%1\$s/%2\$s]%2\$s[/url]\n{$checksum_algorithm}sum: %3\$s\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
$template = "%s/%s\n{$checksum_algorithm}sum: %s\n";
|
||||
}
|
||||
|
||||
function phpbb_rnatsort($array)
|
||||
{
|
||||
$strrnatcmp = function($a, $b)
|
||||
{
|
||||
return strnatcmp($b, $a);
|
||||
};
|
||||
usort($array, $strrnatcmp);
|
||||
return $array;
|
||||
}
|
||||
|
||||
function phpbb_string_ends_with($haystack, $needle)
|
||||
{
|
||||
return substr($haystack, -strlen($needle)) === $needle;
|
||||
}
|
||||
|
||||
function phpbb_get_checksum($checksum_file)
|
||||
{
|
||||
return array_shift(explode(' ', file_get_contents($checksum_file)));
|
||||
}
|
||||
|
||||
foreach (phpbb_rnatsort(array_diff(scandir($root), array('.', '..'))) as $filename)
|
||||
{
|
||||
if (phpbb_string_ends_with($filename, $checksum_algorithm))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
printf($template, $url, $filename, phpbb_get_checksum("$root/$filename.$checksum_algorithm"));
|
||||
}
|
||||
}
|
@@ -1,57 +0,0 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
/**
|
||||
*
|
||||
* This file is part of the phpBB Forum Software package.
|
||||
*
|
||||
* @copyright (c) phpBB Limited <https://www.phpbb.com>
|
||||
* @license GNU General Public License, version 2 (GPL-2.0)
|
||||
*
|
||||
* For full copyright and license information, please see
|
||||
* the docs/CREDITS.txt file.
|
||||
*
|
||||
*/
|
||||
|
||||
if ($_SERVER['argc'] != 2)
|
||||
{
|
||||
echo "Please specify the new version as argument (e.g. build_changelog.php '1.0.2').\n";
|
||||
exit(1);
|
||||
}
|
||||
|
||||
$fixVersion = $_SERVER['argv'][1];
|
||||
|
||||
$query = 'project IN (PHPBB3, SECURITY)
|
||||
AND resolution = Fixed
|
||||
AND fixVersion = "' . $fixVersion . '"
|
||||
AND status IN ("Unverified Fix", Closed)';
|
||||
|
||||
$url = 'http://tracker.phpbb.com/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?jqlQuery=' . urlencode($query) . '&tempMax=1000';
|
||||
$xml = simplexml_load_string(file_get_contents($url));
|
||||
|
||||
foreach ($xml->xpath('//item') as $item)
|
||||
{
|
||||
$key = (string) $item->key;
|
||||
|
||||
$keyUrl = 'http://tracker.phpbb.com/browse/' . $key;
|
||||
$keyLink = '<a href="' . $keyUrl . '">' . $key . '</a>';
|
||||
|
||||
$value = str_replace($key, $keyLink, htmlspecialchars($item->title));
|
||||
$value = str_replace(']', '] -', $value);
|
||||
|
||||
$types[(string) $item->type][$key] = $value;
|
||||
}
|
||||
|
||||
ksort($types);
|
||||
foreach ($types as $type => $tickets)
|
||||
{
|
||||
echo "<h4>$type</h4>\n";
|
||||
echo "<ul>\n";
|
||||
|
||||
uksort($tickets, 'strnatcasecmp');
|
||||
|
||||
foreach ($tickets as $ticket)
|
||||
{
|
||||
echo "<li>$ticket</li>\n";
|
||||
}
|
||||
echo "</ul>\n";
|
||||
}
|
@@ -1,378 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
*
|
||||
* This file is part of the phpBB Forum Software package.
|
||||
*
|
||||
* @copyright (c) phpBB Limited <https://www.phpbb.com>
|
||||
* @license GNU General Public License, version 2 (GPL-2.0)
|
||||
*
|
||||
* For full copyright and license information, please see
|
||||
* the docs/CREDITS.txt file.
|
||||
*
|
||||
*/
|
||||
|
||||
class build_package
|
||||
{
|
||||
var $package_infos;
|
||||
var $old_packages;
|
||||
var $versions;
|
||||
var $locations;
|
||||
|
||||
// -c - context diff
|
||||
// -r - compare recursive
|
||||
// -N - Treat missing files as empty
|
||||
// -E - Ignore tab expansions
|
||||
// not used: -b - Ignore space changes.
|
||||
// -w - Ignore all whitespace
|
||||
// -B - Ignore blank lines
|
||||
// -d - Try to find smaller set of changes
|
||||
var $diff_options = '-crNEBwd';
|
||||
var $diff_options_long = '-x images -crNEB'; // -x fonts -x imageset //imageset not used here, because it includes the imageset.cfg file. ;)
|
||||
|
||||
var $verbose = false;
|
||||
var $status_begun = false;
|
||||
var $num_dots = 0;
|
||||
|
||||
function build_package($versions, $verbose = false)
|
||||
{
|
||||
$this->versions = $versions;
|
||||
$this->verbose = $verbose;
|
||||
|
||||
// Get last two entries
|
||||
$_latest = $this->versions[sizeof($this->versions) - 1];
|
||||
$_before = $this->versions[sizeof($this->versions) - 2];
|
||||
|
||||
$this->locations = array(
|
||||
'new_version' => dirname(dirname(__FILE__)) . '/phpBB/',
|
||||
'old_versions' => dirname(__FILE__) . '/old_versions/',
|
||||
'root' => dirname(__FILE__) . '/',
|
||||
'package_dir' => dirname(__FILE__) . '/new_version/'
|
||||
);
|
||||
|
||||
$this->package_infos = array(
|
||||
'package_name' => 'phpBB3',
|
||||
'name_prefix' => 'phpbb',
|
||||
'simple_name' => 'release-' . $_latest,
|
||||
'new_version_number' => $_latest,
|
||||
'short_version_number' => str_replace('.', '', $_latest),
|
||||
'release_filename' => 'phpBB-' . $_latest,
|
||||
'last_version' => 'release-' . $_before,
|
||||
'last_version_number' => $_before,
|
||||
);
|
||||
|
||||
$this->package_infos['dest_dir'] = $this->locations['package_dir'] . $this->package_infos['package_name'];
|
||||
$this->package_infos['diff_dir'] = $this->locations['old_versions'] . $this->package_infos['simple_name'];
|
||||
$this->package_infos['patch_directory'] = $this->locations['package_dir'] . 'patches';
|
||||
$this->package_infos['files_directory'] = $this->locations['package_dir'] . 'files';
|
||||
$this->package_infos['update_directory'] = $this->locations['package_dir'] . 'update';
|
||||
$this->package_infos['release_directory'] = $this->locations['package_dir'] . 'release_files';
|
||||
|
||||
// Old packages always exclude the latest version. ;)
|
||||
$this->old_packages = array();
|
||||
|
||||
foreach ($this->versions as $package_version)
|
||||
{
|
||||
if ($package_version == $_latest)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
$this->old_packages['release-' . $package_version] = $package_version . '_to_';
|
||||
}
|
||||
}
|
||||
|
||||
function get($var)
|
||||
{
|
||||
return $this->package_infos[$var];
|
||||
}
|
||||
|
||||
function begin_status($headline)
|
||||
{
|
||||
if ($this->status_begun)
|
||||
{
|
||||
echo "\nDone.\n\n";
|
||||
}
|
||||
|
||||
$this->num_dots = 0;
|
||||
|
||||
echo $headline . "\n ";
|
||||
|
||||
$this->status_begun = true;
|
||||
}
|
||||
|
||||
function run_command($command)
|
||||
{
|
||||
$result = trim(`$command`);
|
||||
|
||||
if ($this->verbose)
|
||||
{
|
||||
echo " command : " . getcwd() . '$ ' . $command . "\n";
|
||||
echo " result : " . $result . "\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($this->num_dots > 70)
|
||||
{
|
||||
echo "\n";
|
||||
$this->num_dots = 0;
|
||||
}
|
||||
echo '.';
|
||||
$this->num_dots++;
|
||||
}
|
||||
|
||||
flush();
|
||||
}
|
||||
|
||||
function create_directory($directory, $dir_struct)
|
||||
{
|
||||
if (!file_exists($directory))
|
||||
{
|
||||
$this->run_command("mkdir $directory");
|
||||
}
|
||||
|
||||
if (is_array($dir_struct))
|
||||
{
|
||||
foreach ($dir_struct as $_dir => $_dir_struct)
|
||||
{
|
||||
$this->create_directory($directory . '/' . $_dir, $_dir_struct);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function collect_diff_files($diff_filename, $package_name)
|
||||
{
|
||||
$diff_result = $binary = array();
|
||||
$diff_contents = file($diff_filename);
|
||||
|
||||
$special_diff_contents = array();
|
||||
|
||||
foreach ($diff_contents as $num => $line)
|
||||
{
|
||||
$line = trim($line);
|
||||
|
||||
if (!$line)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
// Special diff content?
|
||||
if (strpos($line, 'diff ' . $this->diff_options . ' ') === 0 || strpos($line, '*** ') === 0 || strpos($line, '--- ') === 0 || (strpos($line, ' Exp $') !== false && strpos($line, '$Id:') !== false))
|
||||
{
|
||||
$special_diff_contents[] = $line;
|
||||
}
|
||||
else if (strpos($line, 'diff ' . $this->diff_options . ' ') === 0 || strpos($line, '*** ') === 0 || strpos($line, '--- ') === 0 || (strpos($line, ' Exp $') !== false && strpos($line, '$Id:') !== false) || (strpos($line, ' $') !== false && strpos($line, '$Id:') !== false))
|
||||
{
|
||||
$special_diff_contents[] = $line;
|
||||
}
|
||||
|
||||
// Is diffing line?
|
||||
if (strstr($line, 'diff ' . $this->diff_options . ' '))
|
||||
{
|
||||
$next_line = $diff_contents[$num+1];
|
||||
if (strpos($next_line, '***') === 0)
|
||||
{
|
||||
// *** phpbb208/admin/admin_board.php Sat Jul 10 20:16:26 2004
|
||||
$next_line = explode("\t", $next_line);
|
||||
$next_line = trim($next_line[0]);
|
||||
$next_line = str_replace('*** ' . $package_name . '/', '', $next_line);
|
||||
$diff_result[] = $next_line;
|
||||
}
|
||||
}
|
||||
|
||||
// Is binary?
|
||||
if (preg_match('/^Binary files ' . $package_name . '\/(.*) and [a-z0-9._-]+\/\1 differ/i', $line, $match))
|
||||
{
|
||||
$binary[] = trim($match[1]);
|
||||
}
|
||||
}
|
||||
|
||||
// Now go through the list again and find out which files have how many changes...
|
||||
$num_changes = array();
|
||||
|
||||
/* [1070] => diff -crN phpbb200/includes/usercp_avatar.php phpbb2023/includes/usercp_avatar.php
|
||||
[1071] => *** phpbb200/includes/usercp_avatar.php Sat Jul 10 20:16:13 2004
|
||||
[1072] => --- phpbb2023/includes/usercp_avatar.php Wed Feb 6 22:28:04 2008
|
||||
[1073] => *** 6,12 ****
|
||||
[1074] => ! * $Id$
|
||||
[1075] => --- 6,12 ----
|
||||
[1076] => *** 51,59 ****
|
||||
[1077] => --- 51,60 ----
|
||||
[1078] => *** 62,80 ****
|
||||
[1079] => --- 63,108 ----
|
||||
[1080] => *** 87,97 ****
|
||||
*/
|
||||
while (($line = array_shift($special_diff_contents)) !== NULL)
|
||||
{
|
||||
$line = trim($line);
|
||||
|
||||
if (!$line)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
// Is diffing line?
|
||||
if (strstr($line, 'diff ' . $this->diff_options . ' '))
|
||||
{
|
||||
$next_line = array_shift($special_diff_contents);
|
||||
if (strpos($next_line, '*** ') === 0)
|
||||
{
|
||||
// *** phpbb208/admin/admin_board.php Sat Jul 10 20:16:26 2004
|
||||
$next_line = explode("\t", $next_line);
|
||||
$next_line = trim($next_line[0]);
|
||||
$next_line = str_replace('*** ' . $package_name . '/', '', $next_line);
|
||||
|
||||
$is_reached = false;
|
||||
$prev_line = '';
|
||||
|
||||
while (!$is_reached)
|
||||
{
|
||||
$line = array_shift($special_diff_contents);
|
||||
|
||||
if (strpos($line, 'diff ' . $this->diff_options) === 0 || empty($special_diff_contents))
|
||||
{
|
||||
$is_reached = true;
|
||||
array_unshift($special_diff_contents, $line);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (strpos($line, '*** ') === 0 && strpos($line, ' ****') !== false)
|
||||
{
|
||||
$is_comment = false;
|
||||
while (!(strpos($line, '--- ') === 0 && strpos($line, ' ----') !== false))
|
||||
{
|
||||
$line = array_shift($special_diff_contents);
|
||||
if (strpos($line, ' Exp $') !== false || strpos($line, '$Id:') !== false)
|
||||
{
|
||||
$is_comment = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (!$is_comment)
|
||||
{
|
||||
if (!isset($num_changes[$next_line]))
|
||||
{
|
||||
$num_changes[$next_line] = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
$num_changes[$next_line]++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Now remove those results not having changes
|
||||
$return = array();
|
||||
|
||||
foreach ($diff_result as $key => $value)
|
||||
{
|
||||
if (isset($num_changes[$value]))
|
||||
{
|
||||
$return[] = $value;
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($binary as $value)
|
||||
{
|
||||
$return[] = $value;
|
||||
}
|
||||
|
||||
$diff_result = $return;
|
||||
unset($return);
|
||||
unset($special_diff_contents);
|
||||
|
||||
$result = array(
|
||||
'files' => array(),
|
||||
'binary' => array(),
|
||||
'all' => $diff_result,
|
||||
);
|
||||
|
||||
$binary_extensions = array('gif', 'jpg', 'jpeg', 'png', 'ttf');
|
||||
|
||||
// Split into file and binary
|
||||
foreach ($diff_result as $filename)
|
||||
{
|
||||
if (strpos($filename, '.') === false)
|
||||
{
|
||||
$result['files'][] = $filename;
|
||||
continue;
|
||||
}
|
||||
|
||||
$extension = explode('.', $filename);
|
||||
$extension = array_pop($extension);
|
||||
|
||||
if (in_array($extension, $binary_extensions))
|
||||
{
|
||||
$result['binary'][] = $filename;
|
||||
}
|
||||
else
|
||||
{
|
||||
$result['files'][] = $filename;
|
||||
}
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Collect the list of the deleted files from a list of deleted files and folders.
|
||||
*
|
||||
* @param string $deleted_filename The full path to a file containing the list of deleted files and directories
|
||||
* @param string $package_name The name of the package
|
||||
* @return array
|
||||
*/
|
||||
public function collect_deleted_files($deleted_filename, $package_name)
|
||||
{
|
||||
$result = array();
|
||||
$file_contents = file($deleted_filename);
|
||||
|
||||
foreach ($file_contents as $filename)
|
||||
{
|
||||
$filename = trim($filename);
|
||||
|
||||
if (!$filename)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
$filename = str_replace('Only in ' . $package_name, '', $filename);
|
||||
$filename = ltrim($filename, '/');
|
||||
|
||||
if (substr($filename, 0, 1) == ':')
|
||||
{
|
||||
$replace = '';
|
||||
}
|
||||
else
|
||||
{
|
||||
$replace = '/';
|
||||
}
|
||||
|
||||
$filename = str_replace(': ', $replace, $filename);
|
||||
|
||||
if (is_dir("{$this->locations['old_versions']}{$package_name}/{$filename}"))
|
||||
{
|
||||
$iterator = new \RecursiveIteratorIterator(
|
||||
new \RecursiveDirectoryIterator(
|
||||
"{$this->locations['old_versions']}{$package_name}/{$filename}",
|
||||
\FilesystemIterator::UNIX_PATHS | \FilesystemIterator::SKIP_DOTS
|
||||
),
|
||||
\RecursiveIteratorIterator::LEAVES_ONLY
|
||||
);
|
||||
|
||||
foreach ($iterator as $file_info)
|
||||
{
|
||||
$result[] = "{$filename}/{$iterator->getSubPathname()}";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$result[] = $filename;
|
||||
}
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
}
|
@@ -1,222 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
*
|
||||
* This file is part of the phpBB Forum Software package.
|
||||
*
|
||||
* @copyright (c) phpBB Limited <https://www.phpbb.com>
|
||||
* @license GNU General Public License, version 2 (GPL-2.0)
|
||||
*
|
||||
* For full copyright and license information, please see
|
||||
* the docs/CREDITS.txt file.
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* Checks that each PHP source file contains a valid header as defined by the
|
||||
* phpBB Coding Guidelines.
|
||||
*
|
||||
* @package code_sniffer
|
||||
* @author Manuel Pichler <mapi@phpundercontrol.org>
|
||||
*/
|
||||
class phpbb_Sniffs_Commenting_FileCommentSniff implements PHP_CodeSniffer_Sniff
|
||||
{
|
||||
/**
|
||||
* Returns an array of tokens this test wants to listen for.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function register()
|
||||
{
|
||||
return array(T_OPEN_TAG);
|
||||
}
|
||||
|
||||
/**
|
||||
* Processes this test, when one of its tokens is encountered.
|
||||
*
|
||||
* @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
|
||||
* @param int $stackPtr The position of the current token
|
||||
* in the stack passed in $tokens.
|
||||
*
|
||||
* @return null
|
||||
*/
|
||||
public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
|
||||
{
|
||||
// We are only interested in the first file comment.
|
||||
if ($stackPtr !== 0)
|
||||
{
|
||||
if ($phpcsFile->findPrevious(T_OPEN_TAG, $stackPtr - 1) !== false)
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// Fetch next non whitespace token
|
||||
$tokens = $phpcsFile->getTokens();
|
||||
$start = $phpcsFile->findNext(T_WHITESPACE, $stackPtr + 1, null, true);
|
||||
|
||||
// Skip empty files
|
||||
if ($tokens[$start]['code'] === T_CLOSE_TAG)
|
||||
{
|
||||
return;
|
||||
}
|
||||
// Mark as error if this is not a doc comment
|
||||
else if ($start === false || $tokens[$start]['code'] !== T_DOC_COMMENT)
|
||||
{
|
||||
$phpcsFile->addError('Missing required file doc comment.', $stackPtr);
|
||||
return;
|
||||
}
|
||||
|
||||
// Find comment end token
|
||||
$end = $phpcsFile->findNext(T_DOC_COMMENT, $start + 1, null, true) - 1;
|
||||
|
||||
// If there is no end, skip processing here
|
||||
if ($end === false)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// List of found comment tags
|
||||
$tags = array();
|
||||
|
||||
// check comment lines without the first(/**) an last(*/) line
|
||||
for ($i = $start + 1, $c = $end - 1; $i <= $c; ++$i)
|
||||
{
|
||||
$line = $tokens[$i]['content'];
|
||||
|
||||
// Check that each line starts with a '*'
|
||||
if (substr($line, 0, 1) !== '*' && substr($line, 0, 2) !== ' *')
|
||||
{
|
||||
$message = 'The file doc comment should not be indented.';
|
||||
$phpcsFile->addWarning($message, $i);
|
||||
}
|
||||
else if (preg_match('/^[ ]?\*\s+@([\w]+)\s+(.*)$/', $line, $match) !== 0)
|
||||
{
|
||||
if (!isset($tags[$match[1]]))
|
||||
{
|
||||
$tags[$match[1]] = array();
|
||||
}
|
||||
|
||||
$tags[$match[1]][] = array($match[2], $i);
|
||||
}
|
||||
}
|
||||
|
||||
// Check that the first and last line is empty
|
||||
if (trim($tokens[$start + 1]['content']) !== '*')
|
||||
{
|
||||
$message = 'The first file comment line should be empty.';
|
||||
$phpcsFile->addWarning($message, ($start + 1));
|
||||
}
|
||||
if (trim($tokens[$end - 1]['content']) !== '*')
|
||||
{
|
||||
$message = 'The last file comment line should be empty.';
|
||||
$phpcsFile->addWarning($message, $end - 1);
|
||||
}
|
||||
|
||||
//$this->processPackage($phpcsFile, $start, $tags);
|
||||
//$this->processVersion($phpcsFile, $start, $tags);
|
||||
$this->processCopyright($phpcsFile, $start, $tags);
|
||||
$this->processLicense($phpcsFile, $start, $tags);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks that the tags array contains a valid package tag
|
||||
*
|
||||
* @param PHP_CodeSniffer_File $phpcsFile The context source file instance.
|
||||
* @param integer The stack pointer for the first comment token.
|
||||
* @param array(string=>array) $tags The found file doc comment tags.
|
||||
*
|
||||
* @return null
|
||||
*/
|
||||
protected function processPackage(PHP_CodeSniffer_File $phpcsFile, $ptr, $tags)
|
||||
{
|
||||
if (!isset($tags['package']))
|
||||
{
|
||||
$message = 'Missing require @package tag in file doc comment.';
|
||||
$phpcsFile->addError($message, $ptr);
|
||||
}
|
||||
else if (preg_match('/^([\w]+)$/', $tags['package'][0]) === 0)
|
||||
{
|
||||
$message = 'Invalid content found for @package tag.';
|
||||
$phpcsFile->addWarning($message, $tags['package'][1]);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks that the tags array contains a valid version tag
|
||||
*
|
||||
* @param PHP_CodeSniffer_File $phpcsFile The context source file instance.
|
||||
* @param integer The stack pointer for the first comment token.
|
||||
* @param array(string=>array) $tags The found file doc comment tags.
|
||||
*
|
||||
* @return null
|
||||
*/
|
||||
protected function processVersion(PHP_CodeSniffer_File $phpcsFile, $ptr, $tags)
|
||||
{
|
||||
if (!isset($tags['version']))
|
||||
{
|
||||
$message = 'Missing require @version tag in file doc comment.';
|
||||
$phpcsFile->addError($message, $ptr);
|
||||
}
|
||||
else if (preg_match('/^\$Id:[^\$]+\$$/', $tags['version'][0]) === 0)
|
||||
{
|
||||
$message = 'Invalid content found for @version tag, use "$Id: $".';
|
||||
$phpcsFile->addError($message, $tags['version'][1]);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks that the tags array contains a valid copyright tag
|
||||
*
|
||||
* @param PHP_CodeSniffer_File $phpcsFile The context source file instance.
|
||||
* @param integer The stack pointer for the first comment token.
|
||||
* @param array(string=>array) $tags The found file doc comment tags.
|
||||
*
|
||||
* @return null
|
||||
*/
|
||||
protected function processCopyright(PHP_CodeSniffer_File $phpcsFile, $ptr, $tags)
|
||||
{
|
||||
$copyright = '(c) phpBB Limited <https://www.phpbb.com>';
|
||||
|
||||
if (!isset($tags['copyright']))
|
||||
{
|
||||
$message = 'Missing require @copyright tag in file doc comment.';
|
||||
$phpcsFile->addError($message, $ptr);
|
||||
}
|
||||
else if ($tags['copyright'][0][0] !== $copyright)
|
||||
{
|
||||
$message = 'Invalid content found for the first @copyright tag, use "' . $copyright . '".';
|
||||
$phpcsFile->addError($message, $tags['copyright'][0][1]);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks that the tags array contains a valid license tag
|
||||
*
|
||||
* @param PHP_CodeSniffer_File $phpcsFile The context source file instance.
|
||||
* @param integer The stack pointer for the first comment token.
|
||||
* @param array(string=>array) $tags The found file doc comment tags.
|
||||
*
|
||||
* @return null
|
||||
*/
|
||||
protected function processLicense(PHP_CodeSniffer_File $phpcsFile, $ptr, $tags)
|
||||
{
|
||||
$license = 'GNU General Public License, version 2 (GPL-2.0)';
|
||||
|
||||
if (!isset($tags['license']))
|
||||
{
|
||||
$message = 'Missing require @license tag in file doc comment.';
|
||||
$phpcsFile->addError($message, $ptr);
|
||||
}
|
||||
else if (sizeof($tags['license']) !== 1)
|
||||
{
|
||||
$message = 'It must be only one @license tag in file doc comment.';
|
||||
$phpcsFile->addError($message, $ptr);
|
||||
}
|
||||
else if (trim($tags['license'][0][0]) !== $license)
|
||||
{
|
||||
$message = 'Invalid content found for @license tag, use '
|
||||
. '"' . $license . '".';
|
||||
$phpcsFile->addError($message, $tags['license'][0][1]);
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,234 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
*
|
||||
* This file is part of the phpBB Forum Software package.
|
||||
*
|
||||
* @copyright (c) phpBB Limited <https://www.phpbb.com>
|
||||
* @license GNU General Public License, version 2 (GPL-2.0)
|
||||
*
|
||||
* For full copyright and license information, please see
|
||||
* the docs/CREDITS.txt file.
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* Checks that each use statement is used.
|
||||
*/
|
||||
class phpbb_Sniffs_Namespaces_UnusedUseSniff implements PHP_CodeSniffer_Sniff
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function register()
|
||||
{
|
||||
return array(T_USE);
|
||||
}
|
||||
|
||||
protected function check($phpcsFile, $found_name, $full_name, $short_name, $line)
|
||||
{
|
||||
|
||||
if ($found_name === $full_name)
|
||||
{
|
||||
$error = 'Either use statement or full name must be used.';
|
||||
$phpcsFile->addError($error, $line, 'FullName');
|
||||
}
|
||||
|
||||
if ($found_name === $short_name)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
|
||||
{
|
||||
if ($this->should_ignore_use($phpcsFile, $stackPtr) === true)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
$tokens = $phpcsFile->getTokens();
|
||||
|
||||
$class_name_start = $phpcsFile->findNext(array(T_NS_SEPARATOR, T_STRING), ($stackPtr + 1));
|
||||
|
||||
$find = array(
|
||||
T_NS_SEPARATOR,
|
||||
T_STRING,
|
||||
T_WHITESPACE,
|
||||
);
|
||||
|
||||
$class_name_end = $phpcsFile->findNext($find, ($stackPtr + 1), null, true);
|
||||
|
||||
$aliasing_as_position = $phpcsFile->findNext(T_AS, $class_name_end, null, false, null, true);
|
||||
if ($aliasing_as_position !== false)
|
||||
{
|
||||
$alias_position = $phpcsFile->findNext(T_STRING, $aliasing_as_position, null, false, null, true);
|
||||
$class_name_short = $tokens[$alias_position]['content'];
|
||||
$class_name_full = $phpcsFile->getTokensAsString($class_name_start, ($class_name_end - $class_name_start - 1));
|
||||
}
|
||||
else
|
||||
{
|
||||
$class_name_full = $phpcsFile->getTokensAsString($class_name_start, ($class_name_end - $class_name_start));
|
||||
$class_name_short = $tokens[$class_name_end - 1]['content'];
|
||||
}
|
||||
|
||||
$ok = false;
|
||||
|
||||
// Checks in simple statements (new, instanceof and extends)
|
||||
foreach (array(T_INSTANCEOF, T_NEW, T_EXTENDS) as $keyword)
|
||||
{
|
||||
$old_simple_statement = $stackPtr;
|
||||
while (($simple_statement = $phpcsFile->findNext($keyword, ($old_simple_statement + 1))) !== false)
|
||||
{
|
||||
$old_simple_statement = $simple_statement;
|
||||
|
||||
$simple_class_name_start = $phpcsFile->findNext(array(T_NS_SEPARATOR, T_STRING), ($simple_statement + 1));
|
||||
$simple_class_name_end = $phpcsFile->findNext($find, ($simple_statement + 1), null, true);
|
||||
|
||||
$simple_class_name = trim($phpcsFile->getTokensAsString($simple_class_name_start, ($simple_class_name_end - $simple_class_name_start)));
|
||||
|
||||
$ok = $this->check($phpcsFile, $simple_class_name, $class_name_full, $class_name_short, $simple_statement) ? true : $ok;
|
||||
}
|
||||
}
|
||||
|
||||
// Checks paamayim nekudotayim
|
||||
$old_paamayim_nekudotayim = $stackPtr;
|
||||
while (($paamayim_nekudotayim = $phpcsFile->findNext(T_PAAMAYIM_NEKUDOTAYIM, ($old_paamayim_nekudotayim + 1))) !== false)
|
||||
{
|
||||
$old_paamayim_nekudotayim = $paamayim_nekudotayim;
|
||||
|
||||
$paamayim_nekudotayim_class_name_start = $phpcsFile->findPrevious($find, $paamayim_nekudotayim - 1, null, true);
|
||||
$paamayim_nekudotayim_class_name_end = $paamayim_nekudotayim - 1;
|
||||
|
||||
$paamayim_nekudotayim_class_name = trim($phpcsFile->getTokensAsString($paamayim_nekudotayim_class_name_start + 1, ($paamayim_nekudotayim_class_name_end - $paamayim_nekudotayim_class_name_start)));
|
||||
|
||||
$ok = $this->check($phpcsFile, $paamayim_nekudotayim_class_name, $class_name_full, $class_name_short, $paamayim_nekudotayim) ? true : $ok;
|
||||
}
|
||||
|
||||
// Checks in implements
|
||||
$old_implements = $stackPtr;
|
||||
while (($implements = $phpcsFile->findNext(T_IMPLEMENTS, ($old_implements + 1))) !== false)
|
||||
{
|
||||
$old_implements = $implements;
|
||||
|
||||
$old_implemented_class = $implements;
|
||||
while (($implemented_class = $phpcsFile->findNext(T_STRING, ($old_implemented_class + 1), null, false, null, true)) !== false)
|
||||
{
|
||||
$old_implemented_class = $implemented_class;
|
||||
|
||||
$implements_class_name_start = $phpcsFile->findNext(array(T_NS_SEPARATOR, T_STRING), ($implemented_class - 1));
|
||||
$implements_class_name_end = $phpcsFile->findNext($find, ($implemented_class - 1), null, true);
|
||||
|
||||
$implements_class_name = trim($phpcsFile->getTokensAsString($implements_class_name_start, ($implements_class_name_end - $implements_class_name_start)));
|
||||
|
||||
$ok = $this->check($phpcsFile, $implements_class_name, $class_name_full, $class_name_short, $implements) ? true : $ok;
|
||||
}
|
||||
}
|
||||
|
||||
// Checks in type hinting
|
||||
$old_function_declaration = $stackPtr;
|
||||
while (($function_declaration = $phpcsFile->findNext(T_FUNCTION, ($old_function_declaration + 1))) !== false)
|
||||
{
|
||||
$old_function_declaration = $function_declaration;
|
||||
|
||||
// Check docblocks
|
||||
$find = array(
|
||||
T_COMMENT,
|
||||
T_DOC_COMMENT,
|
||||
T_CLASS,
|
||||
T_FUNCTION,
|
||||
T_OPEN_TAG,
|
||||
);
|
||||
|
||||
$comment_end = $phpcsFile->findPrevious($find, ($function_declaration - 1));
|
||||
if ($comment_end !== false)
|
||||
{
|
||||
if (!$tokens[$comment_end]['code'] !== T_DOC_COMMENT)
|
||||
{
|
||||
$comment_start = ($phpcsFile->findPrevious(T_DOC_COMMENT, ($comment_end - 1), null, true) + 1);
|
||||
$comment = $phpcsFile->getTokensAsString($comment_start, ($comment_end - $comment_start + 1));
|
||||
|
||||
try
|
||||
{
|
||||
$comment_parser = new PHP_CodeSniffer_CommentParser_FunctionCommentParser($comment, $phpcsFile);
|
||||
$comment_parser->parse();
|
||||
|
||||
// Check @param
|
||||
foreach ($comment_parser->getParams() as $param) {
|
||||
$type = $param->getType();
|
||||
$types = explode('|', str_replace('[]', '', $type));
|
||||
foreach ($types as $type)
|
||||
{
|
||||
$ok = $this->check($phpcsFile, $type, $class_name_full, $class_name_short, $param->getLine() + $comment_start) ? true : $ok;
|
||||
}
|
||||
}
|
||||
|
||||
// Check @return
|
||||
$return = $comment_parser->getReturn();
|
||||
if ($return !== null)
|
||||
{
|
||||
$type = $return->getValue();
|
||||
$types = explode('|', str_replace('[]', '', $type));
|
||||
foreach ($types as $type)
|
||||
{
|
||||
$ok = $this->check($phpcsFile, $type, $class_name_full, $class_name_short, $return->getLine() + $comment_start) ? true : $ok;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (PHP_CodeSniffer_CommentParser_ParserException $e)
|
||||
{
|
||||
$line = ($e->getLineWithinComment() + $comment_start);
|
||||
$phpcsFile->addError($e->getMessage(), $line, 'FailedParse');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Check type hint
|
||||
$params = $phpcsFile->getMethodParameters($function_declaration);
|
||||
foreach ($params as $param)
|
||||
{
|
||||
$ok = $this->check($phpcsFile, $param['type_hint'], $class_name_full, $class_name_short, $function_declaration) ? true : $ok;
|
||||
}
|
||||
}
|
||||
|
||||
if (!$ok)
|
||||
{
|
||||
$error = 'There must not be unused USE statements.';
|
||||
$phpcsFile->addError($error, $stackPtr, 'Unused');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if this use statement is part of the namespace block.
|
||||
*
|
||||
* @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
|
||||
* @param int $stackPtr The position of the current token in
|
||||
* the stack passed in $tokens.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
private function should_ignore_use(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
|
||||
{
|
||||
$tokens = $phpcsFile->getTokens();
|
||||
|
||||
// Ignore USE keywords inside closures.
|
||||
$next = $phpcsFile->findNext(T_WHITESPACE, ($stackPtr + 1), null, true);
|
||||
if ($tokens[$next]['code'] === T_OPEN_PARENTHESIS)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
// Ignore USE keywords for traits.
|
||||
if ($phpcsFile->hasCondition($stackPtr, array(T_CLASS, T_TRAIT)) === true)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
}
|
||||
}
|
@@ -1,15 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<ruleset name="phpBB Minimum Standard">
|
||||
|
||||
<description>phpBB minimum coding standard</description>
|
||||
|
||||
<!-- All code files MUST use only UTF-8 without BOM. -->
|
||||
<rule ref="Generic.Files.ByteOrderMark" />
|
||||
|
||||
<!-- All code files MUST use the Unix LF (linefeed) line ending. -->
|
||||
<rule ref="Generic.Files.LineEndings" />
|
||||
|
||||
<!-- Tabs MUST be used for indentation -->
|
||||
<rule ref="Generic.WhiteSpace.DisallowSpaceIndent" />
|
||||
|
||||
</ruleset>
|
@@ -1,8 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<ruleset name="phpBB PHP Strict Standard Extensions">
|
||||
|
||||
<description>phpBB coding standard for PHP files of phpBB extensions</description>
|
||||
|
||||
<rule ref="./ruleset-php-strict.xml" />
|
||||
|
||||
</ruleset>
|
@@ -1,11 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<ruleset name="phpBB PHP Legacy Standard Core">
|
||||
|
||||
<description>phpBB legacy coding standard for PHP files of phpBB core</description>
|
||||
|
||||
<rule ref="./ruleset-php-legacy.xml" />
|
||||
|
||||
<!-- Each file MUST start with a valid header as defined by the Coding Guidelines -->
|
||||
<rule ref="./phpbb/Sniffs/Commenting/FileCommentSniff.php" />
|
||||
|
||||
</ruleset>
|
@@ -1,89 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<ruleset name="phpBB PHP Legacy Standard">
|
||||
|
||||
<description>phpBB legacy coding standard for PHP files</description>
|
||||
|
||||
<rule ref="./ruleset-minimum.xml" />
|
||||
|
||||
<!-- "for (; bar; )" should be "while (bar)" instead -->
|
||||
<rule ref="Generic.CodeAnalysis.ForLoopShouldBeWhileLoop" />
|
||||
|
||||
<!-- A method MUST not only call its parent -->
|
||||
<rule ref="Generic.CodeAnalysis.UselessOverridingMethod" />
|
||||
|
||||
<!-- The body of each structure MUST be enclosed by braces. -->
|
||||
<rule ref="Generic.ControlStructures.InlineControlStructure" />
|
||||
|
||||
<!-- There MUST not be more than one statement per line. -->
|
||||
<rule ref="Generic.Formatting.DisallowMultipleStatements" />
|
||||
|
||||
<!-- Call-time pass-by-reference MUST not be used. -->
|
||||
<rule ref="Generic.Functions.CallTimePassByReference.NotAllowed" />
|
||||
|
||||
<!-- Filenames MUST be lowercase. -->
|
||||
<rule ref="Generic.Files.LowercasedFilename" />
|
||||
|
||||
<!-- The function brace MUST be on the line following the function declaration
|
||||
and MUST be indented to the same column as the start of the function declaration. -->
|
||||
<rule ref="Generic.Functions.OpeningFunctionBraceBsdAllman" />
|
||||
|
||||
<!-- There MUST be exactly one space after a cast. -->
|
||||
<rule ref="Generic.Formatting.SpaceAfterCast" />
|
||||
|
||||
<!-- Class constants MUST be declared in all upper case with underscore separators. -->
|
||||
<rule ref="Generic.NamingConventions.UpperCaseConstantName" />
|
||||
|
||||
<!-- Only <?php, no short tags. -->
|
||||
<rule ref="Generic.PHP.DisallowShortOpenTag.EchoFound" />
|
||||
|
||||
<!-- Method arguments with default values MUST go at the end of the argument list. -->
|
||||
<rule ref="PEAR.Functions.ValidDefaultValue" />
|
||||
|
||||
<!-- Each file MUST end with exactly one newline character -->
|
||||
<rule ref="PSR2.Files.EndFileNewline" />
|
||||
|
||||
<!-- When referencing arrays there MUST NOT be any whitespace around the opening bracket
|
||||
or before the closing bracket. -->
|
||||
<rule ref="Squiz.Arrays.ArrayBracketSpacing" />
|
||||
|
||||
<!-- The "else if" statement MUST be written with a space between the words else and if. -->
|
||||
<rule ref="Squiz.ControlStructures.ElseIfDeclaration" />
|
||||
|
||||
<!-- There MUST be a space between each element of a foreach loop. -->
|
||||
<rule ref="Squiz.ControlStructures.ForEachLoopDeclaration" />
|
||||
|
||||
<!-- In a for loop declaration, there MUST be no space inside the brackets
|
||||
and there MUST be 0 spaces before and 1 space after semicolons. -->
|
||||
<rule ref="Squiz.ControlStructures.ForLoopDeclaration" />
|
||||
|
||||
<!-- In the argument list, there MUST NOT be a space before each comma,
|
||||
and there MUST be one space after each comma. -->
|
||||
<rule ref="Squiz.Functions.FunctionDeclarationArgumentSpacing">
|
||||
<properties>
|
||||
<property name="equalsSpacing" value="1"/>
|
||||
</properties>
|
||||
</rule>
|
||||
<rule ref="Squiz.Functions.FunctionDeclarationArgumentSpacing.SpacingAfterHint" />
|
||||
|
||||
<!-- All built-in PHP functions MUST be called lowercased. -->
|
||||
<rule ref="Squiz.Functions.LowercaseFunctionKeywords" />
|
||||
|
||||
<!-- The eval() function MUST NOT be used. -->
|
||||
<rule ref="Squiz.PHP.Eval" />
|
||||
|
||||
<!-- There MUST NOT be trailing whitespace at the end of lines. -->
|
||||
<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace" />
|
||||
|
||||
<!-- There MUST NOT be whitespace before the first content of a file -->
|
||||
<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace.StartFile" />
|
||||
|
||||
<!-- There MUST NOT be whitespace after the last content of a file -->
|
||||
<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace.EndFile" />
|
||||
|
||||
<!-- Functions MUST NOT contain multiple empty lines in a row -->
|
||||
<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace.EmptyLines" />
|
||||
|
||||
<!-- The ?> closing tag MUST be omitted from files containing only PHP. -->
|
||||
<rule ref="Zend.Files.ClosingTag" />
|
||||
|
||||
</ruleset>
|
@@ -1,9 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<ruleset name="phpBB PHP Strict Standard Core">
|
||||
|
||||
<description>phpBB coding standard for PHP files of phpBB core</description>
|
||||
|
||||
<rule ref="./ruleset-php-legacy-core.xml" />
|
||||
<rule ref="./ruleset-php-strict.xml" />
|
||||
|
||||
</ruleset>
|
@@ -1,48 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<ruleset name="phpBB PHP Strict Standard">
|
||||
|
||||
<description>phpBB coding standard for PHP files</description>
|
||||
|
||||
<rule ref="./ruleset-php-legacy.xml" />
|
||||
|
||||
<!-- There SHOULD NOT be more than 80 characters per line
|
||||
There MUST NOT be more than 120 characters per line -->
|
||||
<!--
|
||||
<rule ref="Generic.Files.LineLength">
|
||||
<properties>
|
||||
<property name="lineLimit" value="80"/>
|
||||
<property name="absoluteLineLimit" value="120"/>
|
||||
</properties>
|
||||
</rule>
|
||||
-->
|
||||
|
||||
<!-- The PHP constants true, false, and null MUST be in lower case. -->
|
||||
<rule ref="Generic.PHP.LowerCaseConstant" />
|
||||
|
||||
<!-- PHP keywords MUST be in lower case. -->
|
||||
<rule ref="Generic.PHP.LowerCaseKeyword" />
|
||||
|
||||
<!-- Constructors MUST be called __construct() instead of after the class. -->
|
||||
<rule ref="Generic.NamingConventions.ConstructorName" />
|
||||
|
||||
<!-- Classes etc. MUST be namespaced -->
|
||||
<rule ref="PSR1.Classes.ClassDeclaration.MissingNamespace" />
|
||||
|
||||
<!-- A file MUST not contain more than one class/interface -->
|
||||
<rule ref="PSR1.Classes.ClassDeclaration.MultipleClasses" />
|
||||
|
||||
<!-- Files containing classes MUST not have any side-effects -->
|
||||
<rule ref="PSR1.Files.SideEffects.FoundWithSymbols" />
|
||||
|
||||
<!-- When present, all use declarations MUST go after the namespace declaration.
|
||||
There MUST be one use keyword per declaration.
|
||||
There MUST be one blank line after the use block. -->
|
||||
<rule ref="PSR2.Namespaces.UseDeclaration" />
|
||||
|
||||
<!-- There MUST be one blank line after the namespace declaration -->
|
||||
<rule ref="PSR2.Namespaces.NamespaceDeclaration" />
|
||||
|
||||
<!-- There MUST NOT be unused use statements. -->
|
||||
<rule ref="./phpbb/Sniffs/Namespaces/UnusedUseSniff.php" />
|
||||
|
||||
</ruleset>
|
@@ -1,39 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
orig_dir="../../phpBB"
|
||||
|
||||
|
||||
rm -rf test_release_files
|
||||
mkdir test_release_files
|
||||
cd test_release_files
|
||||
|
||||
for ext in "tar.bz2" "zip"
|
||||
do
|
||||
cp "../new_version/release_files/$1.$ext" ./
|
||||
|
||||
if [ "$ext" = "tar.bz2" ]
|
||||
then
|
||||
command="tar -xjf"
|
||||
else
|
||||
command="unzip -q"
|
||||
fi
|
||||
|
||||
$command "$1.$ext"
|
||||
|
||||
for file in `find phpBB3 -name '.svn' -prune -o -type f -print`
|
||||
do
|
||||
orig_file="${file/#phpBB3/$orig_dir}"
|
||||
diff_result=`diff $orig_file $file`
|
||||
|
||||
if [ -n "$diff_result" ]
|
||||
then
|
||||
echo "Difference in package $1.$ext"
|
||||
echo $diff_result
|
||||
fi
|
||||
done
|
||||
|
||||
rm -rf phpBB3
|
||||
done
|
||||
|
||||
cd ..
|
||||
rm -rf test_release_files
|
||||
|
@@ -1,502 +0,0 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
/**
|
||||
*
|
||||
* This file is part of the phpBB Forum Software package.
|
||||
*
|
||||
* @copyright (c) phpBB Limited <https://www.phpbb.com>
|
||||
* @license GNU General Public License, version 2 (GPL-2.0)
|
||||
*
|
||||
* For full copyright and license information, please see
|
||||
* the docs/CREDITS.txt file.
|
||||
*
|
||||
*/
|
||||
|
||||
//$versions = array('3.0.2', '3.0.3', '3.0.4', '3.0.5', '3.0.6', '3.0.7-RC1', '3.0.7-RC2', '3.0.7', '3.0.7-PL1');
|
||||
|
||||
if ($_SERVER['argc'] < 2)
|
||||
{
|
||||
die("Please specify a list of versions as the first argument (e.g. package.php '1.0.0, 1.0.1, 1.0.2').");
|
||||
}
|
||||
|
||||
$versions = explode(',', $_SERVER['argv'][1]);
|
||||
$versions = array_map('trim', $versions);
|
||||
|
||||
$verbose = true;
|
||||
|
||||
require('build_helper.php');
|
||||
|
||||
$package = new build_package($versions, $verbose);
|
||||
|
||||
echo "Building Release Packages\n";
|
||||
echo "Now all three package types (patch, files, release) are built as well as the update package (update).\n";
|
||||
|
||||
// Go trough all versions making a diff if we even have old versions
|
||||
// For phpBB 3.0.x we might choose a different update method, rendering the things below useless...
|
||||
if (sizeof($package->old_packages))
|
||||
{
|
||||
chdir($package->locations['old_versions']);
|
||||
|
||||
// This array is for holding the filenames change
|
||||
$diff_file_changes = array();
|
||||
|
||||
foreach ($package->old_packages as $_package_name => $dest_package_filename)
|
||||
{
|
||||
$package->begin_status('Parsing patch/diff files for phpBB-' . $dest_package_filename . $package->get('new_version_number'));
|
||||
|
||||
// Parse this diff to determine file changes from the checked versions and save them
|
||||
$diff_file_changes[$_package_name] = $package->collect_diff_files(
|
||||
$package->get('patch_directory') . '/phpBB-' . $dest_package_filename . $package->get('new_version_number') . '.patch',
|
||||
$_package_name
|
||||
);
|
||||
$diff_file_changes[$_package_name]['deleted'] = $package->collect_deleted_files(
|
||||
$package->get('patch_directory') . '/phpBB-' . $dest_package_filename . $package->get('new_version_number') . '.deleted',
|
||||
$_package_name
|
||||
);
|
||||
}
|
||||
|
||||
// Now put those files determined within the correct directories
|
||||
foreach ($diff_file_changes as $_package_name => $file_contents)
|
||||
{
|
||||
$package->begin_status('Creating files-only informations for ' . $package->old_packages[$_package_name] . $package->get('new_version_number'));
|
||||
|
||||
$dest_filename_dir = $package->get('files_directory') . '/' . $package->old_packages[$_package_name] . $package->get('new_version_number');
|
||||
|
||||
if (!file_exists($dest_filename_dir))
|
||||
{
|
||||
$package->run_command('mkdir ' . $dest_filename_dir);
|
||||
}
|
||||
|
||||
// Now copy the file contents
|
||||
foreach ($file_contents['all'] as $file)
|
||||
{
|
||||
$source_filename = $package->get('dest_dir') . '/' . $file;
|
||||
$dest_filename = $dest_filename_dir . '/' . $file;
|
||||
|
||||
// Create Directories along the way?
|
||||
$file = explode('/', $file);
|
||||
// Remove filename portion
|
||||
$file[sizeof($file)-1] = '';
|
||||
|
||||
chdir($dest_filename_dir);
|
||||
foreach ($file as $entry)
|
||||
{
|
||||
$entry = trim($entry);
|
||||
if ($entry)
|
||||
{
|
||||
if (!file_exists('./' . $entry))
|
||||
{
|
||||
$package->run_command('mkdir ' . $entry);
|
||||
}
|
||||
chdir('./' . $entry);
|
||||
}
|
||||
}
|
||||
|
||||
$package->run_command('cp ' . $source_filename . ' ' . $dest_filename);
|
||||
}
|
||||
}
|
||||
|
||||
// Because there might be binary changes, we re-create the patch files... without parsing file differences.
|
||||
$package->run_command('rm -Rv ' . $package->get('patch_directory'));
|
||||
|
||||
if (!file_exists($package->get('patch_directory')))
|
||||
{
|
||||
$package->run_command('mkdir ' . $package->get('patch_directory'));
|
||||
}
|
||||
|
||||
chdir($package->locations['old_versions']);
|
||||
|
||||
foreach ($package->old_packages as $_package_name => $dest_package_filename)
|
||||
{
|
||||
$package->begin_status('Creating patch/diff files for phpBB-' . $dest_package_filename . $package->get('new_version_number'));
|
||||
|
||||
$dest_package_filename = $package->get('patch_directory') . '/phpBB-' . $dest_package_filename . $package->get('new_version_number') . '.patch';
|
||||
$package->run_command('diff ' . $package->diff_options_long . ' ' . $_package_name . ' ' . $package->get('simple_name') . ' > ' . $dest_package_filename);
|
||||
}
|
||||
|
||||
$packages = $diff_file_changes;
|
||||
|
||||
foreach ($packages as $_package_name => $file_contents)
|
||||
{
|
||||
$package->begin_status('Building specific update files for ' . $package->old_packages[$_package_name] . $package->get('new_version_number'));
|
||||
|
||||
$dest_filename_dir = $package->get('update_directory') . '/' . $package->old_packages[$_package_name] . $package->get('new_version_number');
|
||||
|
||||
if (!file_exists($dest_filename_dir))
|
||||
{
|
||||
$package->run_command('mkdir ' . $dest_filename_dir);
|
||||
}
|
||||
|
||||
$package->run_command('cp -Rp ' . $package->get('dest_dir') . '/docs ' . $dest_filename_dir);
|
||||
$package->run_command('cp -Rp ' . $package->get('dest_dir') . '/install ' . $dest_filename_dir);
|
||||
$package->run_command('cp -Rp ' . $package->get('dest_dir') . '/vendor ' . $dest_filename_dir);
|
||||
|
||||
$package->run_command('mkdir ' . $dest_filename_dir . '/install/update');
|
||||
$package->run_command('mkdir ' . $dest_filename_dir . '/install/update/old');
|
||||
$package->run_command('mkdir ' . $dest_filename_dir . '/install/update/new');
|
||||
|
||||
// Remove some files
|
||||
$package->run_command('rm -v ' . $dest_filename_dir . '/install/install_install.php');
|
||||
$package->run_command('rm -v ' . $dest_filename_dir . '/install/install_convert.php');
|
||||
$package->run_command('rm -Rv ' . $dest_filename_dir . '/install/schemas');
|
||||
$package->run_command('rm -Rv ' . $dest_filename_dir . '/install/convertors');
|
||||
|
||||
foreach ($file_contents['all'] as $index => $file)
|
||||
{
|
||||
if (strpos($file, 'recode_cjk') !== false)
|
||||
{
|
||||
unset($file_contents['all'][$index]);
|
||||
}
|
||||
|
||||
$source_filename = $package->locations['old_versions'] . $package->get('simple_name') . '/' . $file;
|
||||
if (!file_exists($source_filename))
|
||||
{
|
||||
unset($file_contents['all'][$index]);
|
||||
}
|
||||
}
|
||||
|
||||
// First of all, fill the 'old' directory
|
||||
foreach ($file_contents['all'] as $file)
|
||||
{
|
||||
$source_filename = $package->locations['old_versions'] . $_package_name . '/' . $file;
|
||||
$dest_filename = $dest_filename_dir . '/install/update/old/' . $file;
|
||||
|
||||
if (!file_exists($source_filename))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
// Create Directories along the way?
|
||||
$file = explode('/', $file);
|
||||
// Remove filename portion
|
||||
$file[sizeof($file)-1] = '';
|
||||
|
||||
chdir($dest_filename_dir . '/install/update/old');
|
||||
foreach ($file as $entry)
|
||||
{
|
||||
$entry = trim($entry);
|
||||
if ($entry)
|
||||
{
|
||||
if (!file_exists('./' . $entry))
|
||||
{
|
||||
$package->run_command('mkdir ' . $entry);
|
||||
}
|
||||
chdir('./' . $entry);
|
||||
}
|
||||
}
|
||||
|
||||
$package->run_command('cp ' . $source_filename . ' ' . $dest_filename);
|
||||
}
|
||||
|
||||
/**
|
||||
* We try to keep the update packages as small as possible while creating them.
|
||||
* However, we sometimes need to include additional files that are not included
|
||||
* in the diff in order to be able to correctly include the relatively
|
||||
* referenced files from the same or subsequent directories.
|
||||
*/
|
||||
$copy_relative_directories = array(
|
||||
'config/' => array(
|
||||
'copied' => false,
|
||||
'copy' => array(
|
||||
'config/*.yml' => 'config',
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
// Then fill the 'new' directory
|
||||
foreach ($file_contents['all'] as $file)
|
||||
{
|
||||
$source_filename = $package->locations['old_versions'] . $package->get('simple_name') . '/' . $file;
|
||||
$dest_filename = $dest_filename_dir . '/install/update/new/' . $file;
|
||||
$filename = $file;
|
||||
|
||||
// Create Directories along the way?
|
||||
$file = explode('/', $file);
|
||||
// Remove filename portion
|
||||
$file[sizeof($file)-1] = '';
|
||||
|
||||
chdir($dest_filename_dir . '/install/update/new');
|
||||
foreach ($file as $entry)
|
||||
{
|
||||
$entry = trim($entry);
|
||||
if ($entry)
|
||||
{
|
||||
if (!file_exists('./' . $entry))
|
||||
{
|
||||
$package->run_command('mkdir ' . $entry);
|
||||
}
|
||||
chdir('./' . $entry);
|
||||
}
|
||||
}
|
||||
|
||||
$package->run_command('cp ' . $source_filename . ' ' . $dest_filename);
|
||||
|
||||
foreach ($copy_relative_directories as $reference => $data)
|
||||
{
|
||||
// Copy all relative referenced files if needed
|
||||
if (strpos($filename, $reference) === 0 && !$data['copied'])
|
||||
{
|
||||
foreach ($data['copy'] as $source_dir_files => $destination_dir)
|
||||
{
|
||||
// Create directories along the way?
|
||||
$directories = explode('/', $destination_dir);
|
||||
|
||||
chdir($dest_filename_dir . '/install/update/new');
|
||||
foreach ($directories as $dir)
|
||||
{
|
||||
$dir = trim($dir);
|
||||
if ($dir)
|
||||
{
|
||||
if (!file_exists('./' . $dir))
|
||||
{
|
||||
$package->run_command('mkdir ' . $dir);
|
||||
}
|
||||
chdir('./' . $dir);
|
||||
}
|
||||
}
|
||||
$source_dir_files = $package->locations['old_versions'] . $package->get('simple_name') . '/' . $source_dir_files;
|
||||
$destination_dir = $dest_filename_dir . '/install/update/new/' . $destination_dir;
|
||||
$package->run_command('cp ' . $source_dir_files . ' ' . $destination_dir);
|
||||
}
|
||||
$copy_relative_directories[$reference]['copied'] = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* We need to always copy the template and asset files that we need in
|
||||
* the update, to ensure that the page is displayed correctly.
|
||||
*/
|
||||
$copy_update_files = array(
|
||||
'adm/images/*' => 'adm/images',
|
||||
'adm/style/admin.css' => 'adm/style',
|
||||
'adm/style/admin.js' => 'adm/style',
|
||||
'adm/style/ajax.js' => 'adm/style',
|
||||
'adm/style/install_*' => 'adm/style',
|
||||
'assets/javascript/*' => 'assets/javascript',
|
||||
);
|
||||
|
||||
foreach ($copy_update_files as $source_files => $destination_dir)
|
||||
{
|
||||
// Create directories along the way?
|
||||
$directories = explode('/', $destination_dir);
|
||||
|
||||
chdir($dest_filename_dir . '/install/update/new');
|
||||
foreach ($directories as $dir)
|
||||
{
|
||||
$dir = trim($dir);
|
||||
if ($dir)
|
||||
{
|
||||
if (!file_exists('./' . $dir))
|
||||
{
|
||||
$package->run_command('mkdir ' . $dir);
|
||||
}
|
||||
chdir('./' . $dir);
|
||||
}
|
||||
}
|
||||
$source_dir_files = $package->locations['old_versions'] . $package->get('simple_name') . '/' . $source_files;
|
||||
$destination_dir = $dest_filename_dir . '/install/update/new/' . $destination_dir;
|
||||
$package->run_command('cp ' . $source_dir_files . ' ' . $destination_dir);
|
||||
}
|
||||
|
||||
// Build index.php file for holding the file structure
|
||||
$index_contents = '<?php
|
||||
|
||||
if (!defined(\'IN_PHPBB\'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
// Set update info with file structure to update
|
||||
$update_info = array(
|
||||
\'version\' => array(\'from\' => \'' . str_replace('_to_', '', $package->old_packages[$_package_name]) . '\', \'to\' => \'' . $package->get('new_version_number') . '\'),
|
||||
';
|
||||
|
||||
if (sizeof($file_contents['all']))
|
||||
{
|
||||
$index_contents .= "\t'files' => array(\n\t\t'" . implode("',\n\t\t'", $file_contents['all']) . "',\n\t),\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
$index_contents .= "\t'files' => array(),\n";
|
||||
}
|
||||
|
||||
if (sizeof($file_contents['binary']))
|
||||
{
|
||||
$index_contents .= "\t'binary' => array(\n\t\t'" . implode("',\n\t\t'", $file_contents['binary']) . "',\n\t),\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
$index_contents .= "\t'binary' => array(),\n";
|
||||
}
|
||||
|
||||
if (sizeof($file_contents['deleted']))
|
||||
{
|
||||
$index_contents .= "\t'deleted' => array(\n\t\t'" . implode("',\n\t\t'", $file_contents['deleted']) . "',\n\t),\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
$index_contents .= "\t'deleted' => array(),\n";
|
||||
}
|
||||
|
||||
$index_contents .= ");\n";
|
||||
|
||||
$fp = fopen($dest_filename_dir . '/install/update/index.php', 'wt');
|
||||
fwrite($fp, $index_contents);
|
||||
fclose($fp);
|
||||
}
|
||||
unset($diff_file_changes);
|
||||
|
||||
$package->begin_status('Clean up all install files');
|
||||
|
||||
// Copy the install files to their respective locations
|
||||
$package->run_command('cp -Rp ' . $package->get('dest_dir') . '/docs ' . $package->get('patch_directory'));
|
||||
$package->run_command('cp -Rp ' . $package->get('dest_dir') . '/install ' . $package->get('patch_directory'));
|
||||
$package->run_command('cp -Rp ' . $package->get('dest_dir') . '/vendor ' . $package->get('patch_directory'));
|
||||
|
||||
// Remove some files
|
||||
chdir($package->get('patch_directory') . '/install');
|
||||
|
||||
$package->run_command('rm -v install_install.php');
|
||||
$package->run_command('rm -v install_update.php');
|
||||
$package->run_command('rm -v install_convert.php');
|
||||
$package->run_command('rm -Rv schemas');
|
||||
$package->run_command('rm -Rv convertors');
|
||||
}
|
||||
|
||||
// Build Main phpBB Release
|
||||
$compress_programs = array(
|
||||
// 'tar.gz' => 'tar -czf',
|
||||
'tar.bz2' => 'tar -cjf',
|
||||
'zip' => 'zip -r'
|
||||
);
|
||||
|
||||
if (sizeof($package->old_packages))
|
||||
{
|
||||
// Build Patch Files
|
||||
chdir($package->get('patch_directory'));
|
||||
|
||||
foreach ($compress_programs as $extension => $compress_command)
|
||||
{
|
||||
$package->begin_status('Packaging phpBB Patch Files for ' . $extension);
|
||||
|
||||
// Build Package
|
||||
$package->run_command($compress_command . ' ../release_files/' . $package->get('release_filename') . '-patch.' . $extension . ' *');
|
||||
}
|
||||
|
||||
// Build Files Package
|
||||
chdir($package->get('files_directory'));
|
||||
|
||||
foreach ($compress_programs as $extension => $compress_command)
|
||||
{
|
||||
$package->begin_status('Packaging phpBB Files for ' . $extension);
|
||||
|
||||
$package->run_command('mkdir ' . $package->get('files_directory') . '/release');
|
||||
$package->run_command('cp -Rp ' . $package->get('dest_dir') . '/docs ' . $package->get('files_directory') . '/release');
|
||||
$package->run_command('cp -Rp ' . $package->get('dest_dir') . '/install ' . $package->get('files_directory') . '/release');
|
||||
$package->run_command('cp -Rp ' . $package->get('dest_dir') . '/vendor ' . $package->get('files_directory') . '/release');
|
||||
|
||||
$package->run_command('rm -v ' . $package->get('files_directory') . '/release/install/install_install.php');
|
||||
$package->run_command('rm -v ' . $package->get('files_directory') . '/release/install/install_update.php');
|
||||
$package->run_command('rm -v ' . $package->get('files_directory') . '/release/install/install_convert.php');
|
||||
$package->run_command('rm -Rv ' . $package->get('files_directory') . '/release/install/schemas');
|
||||
$package->run_command('rm -Rv ' . $package->get('files_directory') . '/release/install/convertors');
|
||||
|
||||
// Pack files
|
||||
foreach ($package->old_packages as $_package_name => $package_path)
|
||||
{
|
||||
chdir($package_path . $package->get('new_version_number'));
|
||||
$command = ($extension == 'zip') ? 'zip -r' : 'tar cf';
|
||||
$_ext = ($extension == 'zip') ? 'zip' : 'tar';
|
||||
$package->run_command("$command ../release/phpBB-$package_path" . $package->get('new_version_number') . ".$_ext *");
|
||||
chdir('..');
|
||||
}
|
||||
|
||||
chdir('./release');
|
||||
$package->run_command("$compress_command ../../release_files/" . $package->get('release_filename') . '-files.' . $extension . ' *');
|
||||
chdir('..');
|
||||
|
||||
$package->run_command('rm -Rv ' . $package->get('files_directory') . '/release');
|
||||
}
|
||||
|
||||
// Build Update Package
|
||||
foreach ($compress_programs as $extension => $compress_command)
|
||||
{
|
||||
chdir($package->get('update_directory'));
|
||||
|
||||
$package->begin_status('Packaging phpBB Update for ' . $extension);
|
||||
|
||||
$package->run_command('mkdir ' . $package->get('update_directory') . '/release');
|
||||
|
||||
// Pack update files
|
||||
$packages = $package->old_packages;
|
||||
|
||||
foreach ($packages as $_package_name => $package_path)
|
||||
{
|
||||
chdir($package_path . $package->get('new_version_number'));
|
||||
|
||||
$package->run_command('rm -v install/install_install.php');
|
||||
$package->run_command('rm -v install/install_convert.php');
|
||||
$package->run_command('rm -v includes/utf/data/recode_cjk.php');
|
||||
$package->run_command('rm -Rv install/schemas');
|
||||
$package->run_command('rm -Rv install/convertors');
|
||||
|
||||
$command = ($extension == 'zip') ? 'zip -r' : 'tar cf';
|
||||
$_ext = ($extension == 'zip') ? 'zip' : 'tar';
|
||||
$package->run_command("$command ../release/$package_path" . $package->get('new_version_number') . ".$_ext *");
|
||||
chdir('..');
|
||||
|
||||
$last_version = $package_path . $package->get('new_version_number');
|
||||
|
||||
// chdir('./release');
|
||||
// $package->run_command("$compress_command ../../release_files/" . $package->get('release_filename') . '-update.' . $extension . ' *');
|
||||
// chdir('..');
|
||||
|
||||
chdir('./' . $last_version);
|
||||
// Copy last package over...
|
||||
$package->run_command('rm -v ../release_files/phpBB-' . $last_version . ".$extension");
|
||||
$package->run_command("$compress_command ../../release_files/phpBB-$last_version.$extension *");
|
||||
chdir('..');
|
||||
}
|
||||
|
||||
$package->run_command('rm -Rv ' . $package->get('update_directory') . '/release');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Delete updater and convertor from main archive
|
||||
chdir($package->get('dest_dir') . '/install');
|
||||
|
||||
// $package->run_command('rm -v database_update.php');
|
||||
$package->run_command('rm -v install_update.php');
|
||||
|
||||
chdir($package->get('dest_dir'));
|
||||
$package->run_command('mv -v styles/subsilver2 ../subsilver2');
|
||||
$package->run_command('cp -p docs/COPYING ../subsilver2/license.txt');
|
||||
|
||||
chdir($package->locations['package_dir']);
|
||||
foreach ($compress_programs as $extension => $compress_command)
|
||||
{
|
||||
$package->begin_status('Packaging phpBB for ' . $extension);
|
||||
$package->run_command('rm -v ./release_files/' . $package->get('release_filename') . ".{$extension}");
|
||||
$package->run_command('rm -v ./release_files/subsilver2_' . $package->get('new_version_number') . ".{$extension}");
|
||||
|
||||
// Build Package
|
||||
$package->run_command("$compress_command ./release_files/" . $package->get('release_filename') . '.' . $extension . ' ' . $package->get('package_name'));
|
||||
|
||||
// Build subSilver2 Package
|
||||
$package->run_command("$compress_command ./release_files/subsilver2_" . $package->get('new_version_number') . '.' . $extension . ' subsilver2');
|
||||
}
|
||||
|
||||
// Microsoft Web PI packaging
|
||||
$package->begin_status('Packaging phpBB for Microsoft WebPI');
|
||||
$file = './release_files/' . $package->get('release_filename') . '.webpi.zip';
|
||||
$package->run_command('cp -p ./release_files/' . $package->get('release_filename') . ".zip $file");
|
||||
$package->run_command('cd ./../webpi && ' . $compress_programs['zip'] . " ./../new_version/$file *");
|
||||
|
||||
// verify results
|
||||
chdir($package->locations['root']);
|
||||
$package->begin_status('********** Verifying packages **********');
|
||||
$package->run_command('./compare.sh ' . $package->package_infos['release_filename']);
|
||||
|
||||
echo "Done.\n";
|
@@ -1,30 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
*
|
||||
* This file is part of the phpBB Forum Software package.
|
||||
*
|
||||
* @copyright (c) phpBB Limited <https://www.phpbb.com>
|
||||
* @license GNU General Public License, version 2 (GPL-2.0)
|
||||
*
|
||||
* For full copyright and license information, please see
|
||||
* the docs/CREDITS.txt file.
|
||||
*
|
||||
*/
|
||||
|
||||
require __DIR__ . '/sami-checkout.conf.php';
|
||||
|
||||
$config['versions'] = Sami\Version\GitVersionCollection::create(__DIR__ . '/../')
|
||||
/*
|
||||
This would be nice, but currently causes various problems that need
|
||||
debugging.
|
||||
->addFromTags('release-3.0.*')
|
||||
->add('develop-olympus', '3.0-next (olympus)')
|
||||
->addFromTags('release-3.1.*')
|
||||
->add('develop-ascraeus', '3.1-next (ascraeus)')
|
||||
->add('develop')
|
||||
*/
|
||||
->add('develop-olympus')
|
||||
->add('develop-ascraeus')
|
||||
;
|
||||
|
||||
return new Sami\Sami($iterator, $config);
|
@@ -1,44 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
*
|
||||
* This file is part of the phpBB Forum Software package.
|
||||
*
|
||||
* @copyright (c) phpBB Limited <https://www.phpbb.com>
|
||||
* @license GNU General Public License, version 2 (GPL-2.0)
|
||||
*
|
||||
* For full copyright and license information, please see
|
||||
* the docs/CREDITS.txt file.
|
||||
*
|
||||
*/
|
||||
|
||||
// Prevent 'Class "acm" does not exist.' exception on removeClass().
|
||||
class PhpbbArrayStore extends Sami\Store\ArrayStore
|
||||
{
|
||||
public function removeClass(Sami\Project $project, $name)
|
||||
{
|
||||
unset($this->classes[$name]);
|
||||
}
|
||||
}
|
||||
|
||||
$iterator = Symfony\Component\Finder\Finder::create()
|
||||
->files()
|
||||
->name('*.php')
|
||||
->in(__DIR__ . '/../phpBB/')
|
||||
->notPath('#^cache/#')
|
||||
->notPath('#^develop/#')
|
||||
->notPath('#^ext/#')
|
||||
->notPath('#^vendor/#')
|
||||
->notPath('data')
|
||||
;
|
||||
|
||||
$config = array(
|
||||
'theme' => 'enhanced',
|
||||
'title' => 'phpBB API Documentation',
|
||||
'build_dir' => __DIR__.'/api/output/%version%',
|
||||
'cache_dir' => __DIR__.'/api/cache/%version%',
|
||||
'default_opened_level' => 2,
|
||||
// Do not use JsonStore. See https://github.com/fabpot/Sami/issues/79
|
||||
'store' => new PhpbbArrayStore,
|
||||
);
|
||||
|
||||
return new Sami\Sami($iterator, $config);
|
@@ -1,39 +0,0 @@
|
||||
/**********************************************************************/
|
||||
/* Install.SQL */
|
||||
/* Creates a login and makes the user a member of db roles */
|
||||
/* */
|
||||
/**********************************************************************/
|
||||
|
||||
-- Declare variables for database name, username and password
|
||||
DECLARE @dbName sysname,
|
||||
@dbUser sysname,
|
||||
@dbPwd nvarchar(max);
|
||||
|
||||
-- Set variables for database name, username and password
|
||||
SET @dbName = 'PlaceHolderForDb';
|
||||
SET @dbUser = 'PlaceHolderForUser';
|
||||
SET @dbPwd = 'PlaceHolderForPassword';
|
||||
|
||||
DECLARE @cmd nvarchar(max)
|
||||
|
||||
-- Create login
|
||||
IF( SUSER_SID(@dbUser) is null )
|
||||
BEGIN
|
||||
print '-- Creating login '
|
||||
SET @cmd = N'CREATE LOGIN ' + quotename(@dbUser) + N' WITH PASSWORD ='''+ replace(@dbPwd, '''', '''''') + N''''
|
||||
EXEC(@cmd)
|
||||
END
|
||||
|
||||
-- Create database user and map to login
|
||||
-- and add user to the datareader, datawriter, ddladmin and securityadmin roles
|
||||
--
|
||||
SET @cmd = N'USE ' + quotename(@DBName) + N';
|
||||
IF( NOT EXISTS (SELECT * FROM sys.database_principals WHERE name = ''' + replace(@dbUser, '''', '''''') + N'''))
|
||||
BEGIN
|
||||
print ''-- Creating user'';
|
||||
CREATE USER ' + quotename(@dbUser) + N' FOR LOGIN ' + quotename(@dbUser) + N';
|
||||
print ''-- Adding user'';
|
||||
EXEC sp_addrolemember ''db_owner'', ''' + replace(@dbUser, '''', '''''') + N''';
|
||||
END'
|
||||
EXEC(@cmd)
|
||||
GO
|
@@ -1,15 +0,0 @@
|
||||
USE PlaceHolderForDb$$
|
||||
|
||||
DROP PROCEDURE IF EXISTS add_user $$
|
||||
|
||||
CREATE PROCEDURE add_user()
|
||||
BEGIN
|
||||
DECLARE EXIT HANDLER FOR 1044 BEGIN END;
|
||||
GRANT ALL PRIVILEGES ON PlaceHolderForDb.* to 'PlaceHolderForUser'@'PlaceHolderForServer' IDENTIFIED BY 'PlaceHolderForPassword';
|
||||
FLUSH PRIVILEGES;
|
||||
END
|
||||
$$
|
||||
|
||||
CALL add_user() $$
|
||||
|
||||
DROP PROCEDURE IF EXISTS add_user $$
|
@@ -1,13 +0,0 @@
|
||||
<msdeploy.iisapp>
|
||||
<iisapp path="phpBB3" />
|
||||
|
||||
<dbmysql path="install/mysql.sql" commandDelimiter="$$" removeCommandDelimiter="true" />
|
||||
|
||||
<dbfullsql path="install/mssql.sql" />
|
||||
|
||||
<setAcl path="phpBB3/cache" setAclAccess="Modify" setAclUser="anonymousAuthenticationUser" />
|
||||
<setAcl path="phpBB3/files" setAclAccess="Modify" setAclUser="anonymousAuthenticationUser" />
|
||||
<setAcl path="phpBB3/store" setAclAccess="Modify" setAclUser="anonymousAuthenticationUser" />
|
||||
<setAcl path="phpBB3/images/avatars/upload" setAclAccess="Modify" setAclUser="anonymousAuthenticationUser" />
|
||||
<setAcl path="phpBB3/config.php" setAclAccess="Modify" setAclUser="anonymousAuthenticationUser" setAclResourceType="File" />
|
||||
</msdeploy.iisapp>
|
@@ -1,256 +0,0 @@
|
||||
<parameters>
|
||||
<parameter
|
||||
name="AppPath"
|
||||
defaultValue="Default Web Site/phpBB3"
|
||||
tags="iisapp">
|
||||
|
||||
<parameterEntry
|
||||
type="ProviderPath"
|
||||
scope="iisapp"
|
||||
match="phpBB3" />
|
||||
</parameter>
|
||||
<!--ACLs-->
|
||||
<parameter
|
||||
name="aclCache"
|
||||
description="Sets the ACL on the cache/ folder"
|
||||
defaultValue="{AppPath}/cache"
|
||||
tags="Hidden">
|
||||
|
||||
<parameterEntry
|
||||
type="ProviderPath"
|
||||
scope="setAcl"
|
||||
match="phpBB3/cache$" />
|
||||
</parameter>
|
||||
|
||||
<parameter
|
||||
name="aclFiles"
|
||||
description="Sets the ACL on the files/ folder"
|
||||
defaultValue="{AppPath}/files"
|
||||
tags="Hidden">
|
||||
|
||||
<parameterEntry
|
||||
type="ProviderPath"
|
||||
scope="setAcl"
|
||||
match="phpBB3/files$" />
|
||||
</parameter>
|
||||
|
||||
<parameter
|
||||
name="aclStore"
|
||||
description="Sets the ACL on the store/ folder"
|
||||
defaultValue="{AppPath}/store"
|
||||
tags="Hidden">
|
||||
|
||||
<parameterEntry
|
||||
type="ProviderPath"
|
||||
scope="setAcl"
|
||||
match="phpBB3/store$" />
|
||||
</parameter>
|
||||
|
||||
<parameter
|
||||
name="aclAvatarUpload"
|
||||
description="Sets the ACL on the avatars/upload/ folder"
|
||||
defaultValue="{AppPath}/images/avatars/upload"
|
||||
tags="Hidden">
|
||||
|
||||
<parameterEntry
|
||||
type="ProviderPath"
|
||||
scope="setAcl"
|
||||
match="phpBB3/images/avatars/upload$" />
|
||||
</parameter>
|
||||
|
||||
<parameter
|
||||
name="aclConfig"
|
||||
description="Sets the ACL on the config.php file"
|
||||
defaultValue="{AppPath}/config.php"
|
||||
tags="Hidden">
|
||||
|
||||
<parameterEntry
|
||||
type="ProviderPath"
|
||||
scope="setAcl"
|
||||
match="phpBB3/config.php$" />
|
||||
</parameter>
|
||||
|
||||
<!-- SQL parameters -->
|
||||
<parameter name="SQL Database Server" description="Enter the database server (usually machine name ) " defaultValue="." tags="SQL">
|
||||
</parameter>
|
||||
|
||||
<parameter name="SQL DatabaseServer Instance" description="Enter the database instance name" defaultValue="SQLExpress" tags="SQL">
|
||||
</parameter>
|
||||
<!-- Read database server from config.php . Update 'dbhost' in config.php on publish -->
|
||||
<parameter name="SQL Automatic DatabaseServer" defaultValue="dbhost = '{SQL Database Server}\\{SQL DatabaseServer Instance}';" tags="Hidden,SQL">
|
||||
<parameterEntry kind="TextFile" scope="\\config\.php$" match="dbhost\s*=\s*'([^']*)'\s*;" />
|
||||
</parameter>
|
||||
<parameter
|
||||
name="SQL DatabaseName" description="Database name for your application." defaultValue="phpbb" tags="SQL, dbName">
|
||||
|
||||
<parameterEntry type="TextFile" scope="install/mssql.sql" match="PlaceHolderForDb" />
|
||||
</parameter>
|
||||
<!-- Read database name from config.php . Update 'dbname' in config.php on publish -->
|
||||
<parameter name="SQL Automatic DatabaseName" defaultValue="dbname = '{SQL DatabaseName}';" tags="Hidden,SQL">
|
||||
<parameterEntry kind="TextFile" scope="\\config\.php$" match="dbname\s*=\s*'([^']*)'\s*;" />
|
||||
</parameter>
|
||||
|
||||
<parameter
|
||||
name="SQL DatabaseAdministrator"
|
||||
description="Database server administartor username."
|
||||
defaultValue="sa"
|
||||
tags="SQL, DbAdminUsername" >
|
||||
</parameter>
|
||||
|
||||
<parameter
|
||||
name="SQL DatabaseAdministratorPassword"
|
||||
description="Database server administrator password."
|
||||
tags="Password,SQL,DbAdminPassword">
|
||||
</parameter>
|
||||
|
||||
<parameter
|
||||
name="SQL Database Username"
|
||||
description="Username to access your database."
|
||||
defaultValue="phpbb"
|
||||
tags="SQL, DbUsername">
|
||||
|
||||
<parameterEntry
|
||||
type="TextFile"
|
||||
scope="install/mssql.sql"
|
||||
match="PlaceHolderForUser" />
|
||||
</parameter>
|
||||
<!-- Read database user from config.php . Update 'dbuser' in config.php on publish -->
|
||||
<parameter name="SQL Automatic Database User" defaultValue="dbuser = '{SQL Database Username}';" tags="Hidden,SQL">
|
||||
<parameterEntry kind="TextFile" scope="\\config\.php$" match="dbuser\s*=\s*'([^']*)'\s*;" />
|
||||
</parameter>
|
||||
|
||||
<parameter
|
||||
name="SQL Database Password"
|
||||
description="Password for your phpBB database. (Must be at least 8 characters, contain at least one lower case letter, one upper case letter and one digit)"
|
||||
tags="New, Password,SQL, DbUserPassword">
|
||||
|
||||
<parameterValidation
|
||||
type = "RegularExpression"
|
||||
validationString = "^.*(?=.{8,})(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).*$" />
|
||||
|
||||
<parameterEntry
|
||||
type="TextFile"
|
||||
scope="install/mssql.sql"
|
||||
match="PlaceHolderForPassword" />
|
||||
</parameter>
|
||||
|
||||
<!-- Read database user password from config.php . Update 'dbpasswd' in config.php on publish -->
|
||||
<parameter name="SQL Automatic Database Password" defaultValue="dbpasswd = '{SQL Database Password}';" tags="Hidden,SQL">
|
||||
<parameterEntry kind="TextFile" scope="\\config\.php$" match="dbpasswd\s*=\s*'([^']*)'\s*;" />
|
||||
</parameter>
|
||||
|
||||
<!-- SQL Connection string -->
|
||||
<parameter
|
||||
name="SQL ConnectionString"
|
||||
description="Automatically sets the connection string for the connection request."
|
||||
defaultValue="Server={SQL Database Server}\{SQL DatabaseServer Instance};Database={SQL DatabaseName};uid={SQL DatabaseAdministrator};Pwd={SQL DatabaseAdministratorPassword};"
|
||||
tags="Hidden,SQLConnectionString,Validate">
|
||||
|
||||
<parameterEntry
|
||||
type="ProviderPath"
|
||||
scope="dbfullsql"
|
||||
match="install/mssql.sql" />
|
||||
</parameter>
|
||||
|
||||
<parameter
|
||||
name="SQL Database type"
|
||||
description="SQL database type"
|
||||
defaultValue="mssql"
|
||||
tags="SQL,Hidden">
|
||||
</parameter>
|
||||
|
||||
<!-- MYSQL parameters -->
|
||||
<parameter
|
||||
name="MySQL Database Server"
|
||||
description="Enter the hostname"
|
||||
defaultValue="localhost"
|
||||
tags="MySQL, dbServer">
|
||||
|
||||
<parameterEntry
|
||||
type="TextFile"
|
||||
scope="install/mysql.sql"
|
||||
match="PlaceHolderForServer" />
|
||||
</parameter>
|
||||
|
||||
<!-- Read database server from config.php . Update 'dbhost' in config.php on publish -->
|
||||
<parameter name="Automatic MySQL DatabaseServer" defaultValue="dbhost = '{MySQL Database Server}';" tags="Hidden,MySQL">
|
||||
<parameterEntry kind="TextFile" scope="\\config\.php$" match="dbhost\s*=\s*'([^']*)'\s*;" />
|
||||
</parameter>
|
||||
|
||||
<parameter
|
||||
name="MySQL Database Name"
|
||||
description="Database Name for your application."
|
||||
defaultValue="phpbb"
|
||||
tags="MySQL, dbName">
|
||||
|
||||
<parameterEntry
|
||||
type="TextFile"
|
||||
scope="install/mysql.sql"
|
||||
match="PlaceHolderForDb" />
|
||||
</parameter>
|
||||
<!-- Read database name from config.php . Update 'dbname' in config.php on publish -->
|
||||
<parameter name="Automatic MySQL Database Name" defaultValue="dbname = '{MySQL Database Name}';" tags="Hidden,MySQL">
|
||||
<parameterEntry kind="TextFile" scope="\\config\.php$" match="dbname\s*=\s*'([^']*)'\s*;" />
|
||||
</parameter>
|
||||
|
||||
<parameter
|
||||
name="MySQL Database Username"
|
||||
description="Username to access your phpBB database."
|
||||
defaultValue="phpbb"
|
||||
tags="MySQL, DbUsername">
|
||||
|
||||
<parameterEntry
|
||||
type="TextFile"
|
||||
scope="install/mysql.sql"
|
||||
match="PlaceHolderForUser" />
|
||||
</parameter>
|
||||
<!-- Read database user from config.php . Update 'dbuser' in config.php on publish -->
|
||||
<parameter name="Automatic MySQL Database User" defaultValue="dbuser = '{MySQL Database Username}';" tags="Hidden,MySQL">
|
||||
<parameterEntry kind="TextFile" scope="\\config\.php$" match="dbuser\s*=\s*'([^']*)'\s*;" />
|
||||
</parameter>
|
||||
|
||||
<parameter
|
||||
name="MySQL Database Password"
|
||||
description="Password for your phpBB database. (Minimum 4 characters)"
|
||||
tags="New, Password,MySQL,DbUserPassword">
|
||||
|
||||
<parameterValidation
|
||||
type = "RegularExpression"
|
||||
validationString = "^.{4,}$" />
|
||||
|
||||
<parameterEntry
|
||||
type="TextFile"
|
||||
scope="install/mysql.sql"
|
||||
match="PlaceHolderForPassword" />
|
||||
</parameter>
|
||||
<!-- Read database password from config.php . Update 'dbpasswd' in config.php on publish -->
|
||||
<parameter name="MySQL Automatic Database Password" defaultValue="dbpasswd = '{MySQL Database Password}';" tags="Hidden,MySQL">
|
||||
<parameterEntry kind="TextFile" scope="\\config\.php$" match="dbpasswd\s*=\s*'([^']*)'\s*;" />
|
||||
</parameter>
|
||||
|
||||
<!-- MySQL admin credentials -->
|
||||
<parameter
|
||||
name="MySQL Database Administrator"
|
||||
description="Database administrator username."
|
||||
defaultValue="root"
|
||||
tags="MySQL, DbAdminUsername" >
|
||||
</parameter>
|
||||
<parameter
|
||||
name="MySQL Database Administrator Password"
|
||||
description="Database administrator password."
|
||||
tags="Password,MySQL,DbAdminPassword" >
|
||||
</parameter>
|
||||
|
||||
<!-- MySQL Connectionstring -->
|
||||
<parameter
|
||||
name="MySQLConnectionString"
|
||||
description="Automatically sets the connection string for the connection request."
|
||||
defaultValue="Server={MySQL Database Server};Database={MySQL Database Name};uid={MySQL Database Administrator};Pwd={MySQL Database Administrator Password};"
|
||||
tags="Hidden,MySQLConnectionString,Validate">
|
||||
|
||||
<parameterEntry
|
||||
type="ProviderPath"
|
||||
scope="dbmysql"
|
||||
match="install/mysql.sql" />
|
||||
</parameter>
|
||||
</parameters>
|
BIN
composer.phar
@@ -1,56 +0,0 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# This file is part of the phpBB Forum Software package.
|
||||
#
|
||||
# @copyright (c) phpBB Limited <https://www.phpbb.com>
|
||||
# @license GNU General Public License, version 2 (GPL-2.0)
|
||||
#
|
||||
# For full copyright and license information, please see
|
||||
# the docs/CREDITS.txt file.
|
||||
#
|
||||
# Calls the git commit-msg hook on all non-merge commits in a given commit range.
|
||||
#
|
||||
|
||||
if [ "$#" -ne 1 ];
|
||||
then
|
||||
echo "Expected one argument (commit range, e.g. phpbb/develop..ticket/12345)."
|
||||
exit
|
||||
fi
|
||||
|
||||
DIR=$(dirname "$0")
|
||||
COMMIT_RANGE="$1"
|
||||
COMMIT_MSG_HOOK_PATH="$DIR/hooks/commit-msg"
|
||||
COMMIT_MSG_HOOK_FATAL=$(git config --bool phpbb.hooks.commit-msg.fatal 2> /dev/null)
|
||||
git config phpbb.hooks.commit-msg.fatal true
|
||||
|
||||
EXIT_STATUS=0
|
||||
for COMMIT_HASH in $(git rev-list --no-merges "$COMMIT_RANGE")
|
||||
do
|
||||
echo "Inspecting commit message of commit $COMMIT_HASH"
|
||||
|
||||
# The git commit-msg hook takes a path to a file containing a commit
|
||||
# message. So we have to extract the commit message into a file first,
|
||||
# which then also needs to be deleted after our work is done.
|
||||
COMMIT_MESSAGE_PATH="$DIR/commit_msg.$COMMIT_HASH"
|
||||
git log -n 1 --pretty=format:%B "$COMMIT_HASH" > "$COMMIT_MESSAGE_PATH"
|
||||
|
||||
# Invoke hook on commit message file.
|
||||
"$COMMIT_MSG_HOOK_PATH" "$COMMIT_MESSAGE_PATH"
|
||||
|
||||
# If any commit message hook complains with a non-zero exit status, we
|
||||
# will send a non-zero exit status upstream.
|
||||
if [ $? -ne 0 ]
|
||||
then
|
||||
EXIT_STATUS=1
|
||||
fi
|
||||
|
||||
rm "$COMMIT_MESSAGE_PATH"
|
||||
done
|
||||
|
||||
# Restore phpbb.hooks.commit-msg.fatal config
|
||||
if [ -n "$COMMIT_MSG_HOOK_FATAL" ]
|
||||
then
|
||||
git config phpbb.hooks.commit-msg.fatal "$COMMIT_MSG_HOOK_FATAL"
|
||||
fi
|
||||
|
||||
exit $EXIT_STATUS
|
@@ -1,359 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# A hook to check syntax of a phpBB3 commit message, per:
|
||||
# * <http://wiki.phpbb.com/display/DEV/Git>
|
||||
# * <http://area51.phpbb.com/phpBB/viewtopic.php?p=209919#p209919>
|
||||
#
|
||||
# This is a commit-msg hook.
|
||||
#
|
||||
# To install this you can either copy or symlink it to
|
||||
# $GIT_DIR/hooks, example:
|
||||
#
|
||||
# ln -s ../../git-tools/hooks/commit-msg \\
|
||||
# .git/hooks/commit-msg
|
||||
#
|
||||
# You can configure whether invalid commit messages abort commits:
|
||||
#
|
||||
# git config phpbb.hooks.commit-msg.fatal true (abort)
|
||||
# git config phpbb.hooks.commit-msg.fatal false (warn only, do not abort)
|
||||
#
|
||||
# The default is to warn only.
|
||||
#
|
||||
# Warning/error messages use color by default if the output is a terminal
|
||||
# ("output" here is normally standard error when you run git commit).
|
||||
# To force or disable the use of color:
|
||||
#
|
||||
# git config phpbb.hooks.commit-msg.color true (force color output)
|
||||
# git config phpbb.hooks.commit-msg.color false (disable color output)
|
||||
|
||||
config_ns="phpbb.hooks.commit-msg";
|
||||
|
||||
if [ "$(git config --bool $config_ns.fatal)" = "true" ]
|
||||
then
|
||||
fatal=1;
|
||||
severity=Error;
|
||||
else
|
||||
fatal=0;
|
||||
severity=Warning;
|
||||
fi
|
||||
|
||||
debug_level=$(git config --int $config_ns.debug || echo 0);
|
||||
|
||||
# Error codes
|
||||
ERR_LENGTH=1;
|
||||
ERR_HEADER=2;
|
||||
ERR_EMPTY=3;
|
||||
ERR_DESCRIPTION=4;
|
||||
ERR_FOOTER=5;
|
||||
ERR_EOF=6;
|
||||
ERR_UNKNOWN=42;
|
||||
|
||||
debug()
|
||||
{
|
||||
local level;
|
||||
|
||||
level=$1;
|
||||
shift;
|
||||
|
||||
if [ $debug_level -ge $level ]
|
||||
then
|
||||
echo $@;
|
||||
fi
|
||||
}
|
||||
|
||||
quit()
|
||||
{
|
||||
if [ $1 -eq 0 ] || [ $1 -eq $ERR_UNKNOWN ]
|
||||
then
|
||||
# success
|
||||
exit 0;
|
||||
elif [ $fatal -eq 0 ]
|
||||
then
|
||||
# problems found but fatal is false
|
||||
complain 'Please run `git commit --amend` and fix the problems mentioned.' 1>&2
|
||||
exit 0;
|
||||
else
|
||||
complain "Aborting commit." 1>&2
|
||||
exit $1;
|
||||
fi
|
||||
}
|
||||
|
||||
use_color()
|
||||
{
|
||||
if [ -z "$use_color_cached" ]
|
||||
then
|
||||
case $(git config --bool $config_ns.color)
|
||||
in
|
||||
false)
|
||||
use_color_cached=1
|
||||
;;
|
||||
true)
|
||||
use_color_cached=0
|
||||
;;
|
||||
*)
|
||||
# tty detection in shell:
|
||||
# http://hwi.ath.cx/jsh/list/shext/isatty.sh.html
|
||||
tty 0>/dev/stdout >/dev/null 2>&1
|
||||
use_color_cached=$?
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
# return value is the flag inverted -
|
||||
# if return value is 0, this means use color
|
||||
return $use_color_cached
|
||||
}
|
||||
|
||||
complain()
|
||||
{
|
||||
if use_color
|
||||
then
|
||||
# Careful: our argument may include arguments to echo like -n
|
||||
# ANSI color codes:
|
||||
# http://pueblo.sourceforge.net/doc/manual/ansi_color_codes.html
|
||||
printf "\033[31m\033[1m"
|
||||
if [ "$1" = "-n" ]
|
||||
then
|
||||
echo "$@"
|
||||
printf "\033[0m"
|
||||
else
|
||||
# This will print one trailing space.
|
||||
# Not sure how to avoid this at the moment.
|
||||
echo "$@" $(printf "\033[0m")
|
||||
fi
|
||||
else
|
||||
echo "$@"
|
||||
fi
|
||||
}
|
||||
|
||||
# Check for empty commit message
|
||||
if ! grep -qv '^#' "$1"
|
||||
then
|
||||
# Commit message is empty (or contains only comments).
|
||||
# Let git handle this.
|
||||
# It will abort with a message like so:
|
||||
#
|
||||
# Aborting commit due to empty commit message.
|
||||
exit 0
|
||||
fi
|
||||
|
||||
msg=$(grep -v '^#' "$1" |grep -nE '.{81,}')
|
||||
|
||||
if [ $? -eq 0 ]
|
||||
then
|
||||
complain "The following lines are greater than 80 characters long:" >&2;
|
||||
complain >&2
|
||||
complain "$msg" >&2;
|
||||
|
||||
quit $ERR_LENGTH;
|
||||
fi
|
||||
|
||||
lines=$(wc -l "$1" | awk '{ print $1; }');
|
||||
expecting=header;
|
||||
in_description=0;
|
||||
in_empty=0;
|
||||
ticket=0;
|
||||
branch_regex="[a-z]+[a-z0-9-]*[a-z0-9]+";
|
||||
i=1;
|
||||
tickets="";
|
||||
|
||||
while [ $i -le $lines ]
|
||||
do
|
||||
# Grab the line we are studying
|
||||
line=$(head -n$i "$1" | tail -n1);
|
||||
|
||||
debug 1 "==> [$i] $line (description: $in_description, empty: $in_empty)";
|
||||
|
||||
err=$ERR_UNKNOWN;
|
||||
|
||||
if [ -z "$expecting" ]
|
||||
then
|
||||
quit $err;
|
||||
fi
|
||||
|
||||
if [ "${expecting#comment}" = "$expecting" ]
|
||||
then
|
||||
# Prefix comments to the expected tokens list
|
||||
expecting="comment $expecting";
|
||||
fi
|
||||
|
||||
debug 2 "Expecting: $expecting";
|
||||
|
||||
# Loop over each of the expected line formats
|
||||
for expect in $expecting
|
||||
do
|
||||
# Reset the error code each iteration
|
||||
err=$ERR_UNKNOWN;
|
||||
|
||||
# Test for validity of each line format
|
||||
# This is done first so $? contains the result
|
||||
case $expect in
|
||||
"header")
|
||||
err=$ERR_HEADER;
|
||||
echo "$line" | grep -Eq "^\[(ticket/[0-9]+|feature/$branch_regex|task/$branch_regex)\] .+$"
|
||||
result=$?
|
||||
if ! echo "$line" | grep -Eq "^\[(ticket/[0-9]+|feature/$branch_regex|task/$branch_regex)\] [a-zA-Z].+$"
|
||||
then
|
||||
# Don't be too strict.
|
||||
# Commits may be temporary, intended to be squashed later.
|
||||
# Just issue a warning here.
|
||||
complain "$severity: heading should be a sentence beginning with a letter." 1>&2
|
||||
complain "You entered:" 1>&2
|
||||
complain "$line" 1>&2
|
||||
fi
|
||||
# restore exit code
|
||||
(exit $result)
|
||||
;;
|
||||
"empty")
|
||||
err=$ERR_EMPTY;
|
||||
echo "$line" | grep -Eq "^$"
|
||||
;;
|
||||
"description")
|
||||
err=$ERR_DESCRIPTION;
|
||||
# Free flow text, the line length was constrained by the initial check
|
||||
echo "$line" | grep -Eq "^.+$";
|
||||
;;
|
||||
"footer")
|
||||
err=$ERR_FOOTER;
|
||||
# Each ticket is on its own line
|
||||
echo "$line" | grep -Eq "^PHPBB3-[0-9]+$";
|
||||
;;
|
||||
"eof")
|
||||
err=$ERR_EOF;
|
||||
# Should not end up here
|
||||
false
|
||||
;;
|
||||
"possibly-eof")
|
||||
# Allow empty and/or comment lines at the end
|
||||
! tail -n +"$i" "$1" |grep -qvE '^($|#)'
|
||||
;;
|
||||
"comment")
|
||||
echo "$line" | grep -Eq "^#";
|
||||
;;
|
||||
*)
|
||||
complain "Unrecognised token $expect" >&2;
|
||||
quit $err;
|
||||
;;
|
||||
esac
|
||||
|
||||
# Preserve the result of the line check
|
||||
result=$?;
|
||||
|
||||
debug 2 "$expect - '$line' - $result";
|
||||
|
||||
if [ $result -eq 0 ]
|
||||
then
|
||||
# Break out the loop on success
|
||||
# otherwise roll on round and keep looking for a match
|
||||
break;
|
||||
fi
|
||||
done
|
||||
|
||||
if [ $result -eq 0 ]
|
||||
then
|
||||
# Have we switched out of description mode?
|
||||
if [ $in_description -eq 1 ] && [ "$expect" != "description" ] && [ "$expect" != "empty" ] && [ "$expect" != "comment" ]
|
||||
then
|
||||
# Yes, okay we need to backtrace one line and reanalyse
|
||||
in_description=0;
|
||||
i=$(( $i - $in_empty ));
|
||||
|
||||
# Reset the empty counter
|
||||
in_empty=0;
|
||||
continue;
|
||||
fi
|
||||
|
||||
# Successful match, but on which line format
|
||||
case $expect in
|
||||
"header")
|
||||
expecting="empty";
|
||||
|
||||
echo "$line" | grep -Eq "^\[ticket/[0-9]+\]$" && (
|
||||
ticket=$(echo "$line" | sed 's,\[ticket/\([0-9]*\)\].*,\1,');
|
||||
)
|
||||
;;
|
||||
"empty")
|
||||
# Description might have empty lines as spacing
|
||||
expecting="footer description";
|
||||
in_empty=$(($in_empty + 1));
|
||||
|
||||
if [ $in_description -eq 1 ]
|
||||
then
|
||||
expecting="$expecting empty";
|
||||
fi
|
||||
;;
|
||||
"description")
|
||||
expecting="description empty";
|
||||
in_description=1;
|
||||
;;
|
||||
"footer")
|
||||
expecting="footer possibly-eof";
|
||||
if [ "$tickets" = "" ]
|
||||
then
|
||||
tickets="$line";
|
||||
else
|
||||
tickets="$tickets $line";
|
||||
fi
|
||||
;;
|
||||
"comment")
|
||||
# Comments should expect the same thing again
|
||||
;;
|
||||
"possibly-eof")
|
||||
expecting="eof";
|
||||
;;
|
||||
*)
|
||||
complain "Unrecognised token $expect" >&2;
|
||||
quit 254;
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ "$expect" != "empty" ]
|
||||
then
|
||||
in_empty=0;
|
||||
fi
|
||||
|
||||
debug 3 "Now expecting: $expecting";
|
||||
else
|
||||
# None of the expected line formats matched
|
||||
# Guess we'll call it a day here then
|
||||
complain "Syntax error on line $i:" >&2;
|
||||
complain ">> $line" >&2;
|
||||
complain -n "Expecting: " >&2;
|
||||
complain "$expecting" | sed 's/ /, /g' >&2;
|
||||
quit $err;
|
||||
fi
|
||||
|
||||
i=$(( $i + 1 ));
|
||||
done
|
||||
|
||||
# If EOF is expected exit cleanly
|
||||
echo "$expecting" | grep -q "eof" || (
|
||||
# Unexpected EOF, error
|
||||
complain "Unexpected EOF encountered" >&2;
|
||||
quit $ERR_EOF;
|
||||
) && (
|
||||
# Do post scan checks
|
||||
if [ ! -z "$tickets" ]
|
||||
then
|
||||
# Check for duplicate tickets
|
||||
dupes=$(echo "$tickets" | sed 's/ /\n/g' | sort | uniq -d);
|
||||
|
||||
if [ ! -z "$dupes" ]
|
||||
then
|
||||
complain "The following tickets are repeated:" >&2;
|
||||
complain "$dupes" | sed 's/ /\n/g;s/^/* /g' >&2;
|
||||
quit $ERR_FOOTER;
|
||||
fi
|
||||
fi
|
||||
# Check the branch ticket is mentioned, doesn't make sense otherwise
|
||||
if [ $ticket -gt 0 ]
|
||||
then
|
||||
echo "$tickets" | grep -Eq "\bPHPBB3-$ticket\b" || (
|
||||
complain "Ticket ID [$ticket] of branch missing from list of tickets:" >&2;
|
||||
complain "$tickets" | sed 's/ /\n/g;s/^/* /g' >&2;
|
||||
quit $ERR_FOOTER;
|
||||
) || exit $?;
|
||||
fi
|
||||
# Got here okay exit to reality
|
||||
exit 0;
|
||||
);
|
||||
exit $?;
|
@@ -1,17 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Script to install the git hooks
|
||||
# by symlinking them into the .git/hooks directory
|
||||
#
|
||||
# Usage (from within git-tools/hooks):
|
||||
# ./install
|
||||
|
||||
dir=$(dirname $0)
|
||||
|
||||
for file in $(ls $dir)
|
||||
do
|
||||
if [ $file != "install" ] && [ $file != "uninstall" ]
|
||||
then
|
||||
ln -s "../../git-tools/hooks/$file" "$dir/../../.git/hooks/$file"
|
||||
fi
|
||||
done
|
@@ -1,88 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# A hook to disallow php syntax errors to be committed
|
||||
# by running php -l (lint) on them. It requires php-cli
|
||||
# to be installed.
|
||||
#
|
||||
# This is a pre-commit hook.
|
||||
#
|
||||
# To install this you can either copy or symlink it to
|
||||
# $GIT_DIR/hooks, example:
|
||||
#
|
||||
# ln -s ../../git-tools/hooks/pre-commit \\
|
||||
# .git/hooks/pre-commit
|
||||
|
||||
if [ -z "$PHP_BIN" ]
|
||||
then
|
||||
PHP_BIN=php
|
||||
fi
|
||||
|
||||
if [ "$(echo -e test)" = test ]
|
||||
then
|
||||
echo_e="echo -e"
|
||||
else
|
||||
echo_e="echo"
|
||||
fi
|
||||
|
||||
# necessary check for initial commit
|
||||
if git rev-parse --verify HEAD >/dev/null 2>&1
|
||||
then
|
||||
against=HEAD
|
||||
else
|
||||
# Initial commit: diff against an empty tree object
|
||||
against=4b825dc642cb6eb9a060e54bf8d69288fbee4904
|
||||
fi
|
||||
|
||||
errors=""
|
||||
if ! which "$PHP_BIN" >/dev/null 2>&1
|
||||
then
|
||||
echo "PHP Syntax check failed:"
|
||||
echo "PHP binary does not exist or is not in path: $PHP_BIN"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# dash does not support $'\n':
|
||||
# http://forum.soft32.com/linux2/Bug-409179-DASH-Settings-IFS-work-properly-ftopict70039.html
|
||||
IFS='
|
||||
'
|
||||
# get a list of staged files
|
||||
for line in $(git diff-index --cached --full-index $against)
|
||||
do
|
||||
# split needed values
|
||||
sha=$(echo $line | cut -d' ' -f4)
|
||||
temp=$(echo $line | cut -d' ' -f5)
|
||||
status=$(echo $temp | cut -d' ' -f1)
|
||||
filename=$(echo $temp | cut -d' ' -f2)
|
||||
|
||||
# file extension
|
||||
ext=$(echo $filename | sed 's/^.*\.//')
|
||||
|
||||
# only check files with php extension
|
||||
if [ $ext != "php" ]
|
||||
then
|
||||
continue
|
||||
fi
|
||||
|
||||
# do not check deleted files
|
||||
if [ $status = "D" ]
|
||||
then
|
||||
continue
|
||||
fi
|
||||
|
||||
# check the staged file content for syntax errors
|
||||
# using php -l (lint)
|
||||
result=$(git cat-file -p $sha | "$PHP_BIN" -n -l -ddisplay_errors\=1 -derror_reporting\=E_ALL -dlog_errrors\=0 2>&1)
|
||||
if [ $? -ne 0 ]
|
||||
then
|
||||
# Swap back in correct filenames
|
||||
errors=$(echo "$errors"; echo "$result" | grep ':' | sed -e "s@in - on@in $filename on@g")
|
||||
fi
|
||||
done
|
||||
unset IFS
|
||||
|
||||
if [ -n "$errors" ]
|
||||
then
|
||||
echo "PHP Syntax check failed: "
|
||||
$echo_e "$errors"
|
||||
exit 1
|
||||
fi
|
@@ -1,42 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# A hook to add [$branch] to the beginning of a commit message
|
||||
# if certain conditions are met.
|
||||
#
|
||||
# This is a prepare-commit-msg hook.
|
||||
#
|
||||
# To install this you can either copy or symlink it to
|
||||
# $GIT_DIR/hooks, example:
|
||||
#
|
||||
# ln -s ../../git-tools/hooks/prepare-commit-msg \\
|
||||
# .git/hooks/prepare-commit-msg
|
||||
|
||||
# get branch name
|
||||
branch="$(git symbolic-ref HEAD)"
|
||||
|
||||
# exit if no branch name is present
|
||||
# (eg. detached HEAD)
|
||||
if [ $? -ne 0 ]
|
||||
then
|
||||
exit
|
||||
fi
|
||||
|
||||
# strip off refs/heads/
|
||||
branch="$(echo "$branch" | sed "s/refs\/heads\///g")"
|
||||
|
||||
# add [branchname] to commit message
|
||||
# * only run when normal commit is made (without -m or -F;
|
||||
# not a merge, etc.)
|
||||
# * also make sure the branch name begins with bug/ or feature/
|
||||
if [ "$2" = "" ]
|
||||
then
|
||||
tail="";
|
||||
|
||||
# Branch is prefixed with 'ticket/', append ticket ID to message
|
||||
if [ "$branch" != "${branch##ticket/}" ];
|
||||
then
|
||||
tail="$(printf "\n\nPHPBB3-${branch##ticket/}")";
|
||||
fi
|
||||
|
||||
echo "[$branch] $tail$(cat "$1")" > "$1"
|
||||
fi
|
@@ -1,16 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Script to uninstall the git hooks
|
||||
#
|
||||
# Usage (from within git-tools/hooks):
|
||||
# ./uninstall
|
||||
|
||||
dir=$(dirname $0)
|
||||
|
||||
for file in $(ls $dir)
|
||||
do
|
||||
if [ $file != "install" ] && [ $file != "uninstall" ]
|
||||
then
|
||||
rm -f "$dir/../../.git/hooks/$file"
|
||||
fi
|
||||
done
|
@@ -1,194 +0,0 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
/**
|
||||
*
|
||||
* This file is part of the phpBB Forum Software package.
|
||||
*
|
||||
* @copyright (c) phpBB Limited <https://www.phpbb.com>
|
||||
* @license GNU General Public License, version 2 (GPL-2.0)
|
||||
*
|
||||
* For full copyright and license information, please see
|
||||
* the docs/CREDITS.txt file.
|
||||
*
|
||||
*/
|
||||
|
||||
function show_usage()
|
||||
{
|
||||
$filename = basename(__FILE__);
|
||||
|
||||
echo "$filename merges a github pull request.\n";
|
||||
echo "\n";
|
||||
|
||||
echo "Usage: [php] $filename -p pull_request_id [OPTIONS]\n";
|
||||
echo "\n";
|
||||
|
||||
echo "Options:\n";
|
||||
echo " -p pull_request_id The pull request id to be merged (mandatory)\n";
|
||||
echo " -r remote Remote of upstream, defaults to 'upstream' (optional)\n";
|
||||
echo " -d Outputs the commands instead of running them (optional)\n";
|
||||
echo " -h This help text\n";
|
||||
|
||||
exit(2);
|
||||
}
|
||||
|
||||
// Handle arguments
|
||||
$opts = getopt('p:r:dh');
|
||||
|
||||
if (empty($opts) || isset($opts['h']))
|
||||
{
|
||||
show_usage();
|
||||
}
|
||||
|
||||
$pull_id = get_arg($opts, 'p', '');
|
||||
$remote = get_arg($opts, 'r', 'upstream');
|
||||
$dry_run = !get_arg($opts, 'd', true);
|
||||
|
||||
try
|
||||
{
|
||||
exit(work($pull_id, $remote));
|
||||
}
|
||||
catch (RuntimeException $e)
|
||||
{
|
||||
echo $e->getMessage();
|
||||
exit($e->getCode());
|
||||
}
|
||||
|
||||
function work($pull_id, $remote)
|
||||
{
|
||||
// Get some basic data
|
||||
$pull = get_pull('phpbb', 'phpbb3', $pull_id);
|
||||
|
||||
if (!$pull_id)
|
||||
{
|
||||
show_usage();
|
||||
}
|
||||
|
||||
if ($pull['state'] != 'open')
|
||||
{
|
||||
throw new RuntimeException(sprintf("Error: pull request is closed\n",
|
||||
$target_branch), 5);
|
||||
}
|
||||
|
||||
$pull_user = $pull['head'][0];
|
||||
$pull_branch = $pull['head'][1];
|
||||
$target_branch = $pull['base'][1];
|
||||
|
||||
switch ($target_branch)
|
||||
{
|
||||
case 'develop-olympus':
|
||||
run("git checkout develop-olympus");
|
||||
run("git pull $remote develop-olympus");
|
||||
|
||||
add_remote($pull_user, 'phpbb3');
|
||||
run("git fetch $pull_user");
|
||||
run("git merge --no-ff $pull_user/$pull_branch");
|
||||
run("phpBB/vendor/bin/phpunit");
|
||||
|
||||
run("git checkout develop");
|
||||
run("git pull $remote develop");
|
||||
run("git merge --no-ff develop-olympus");
|
||||
run("phpBB/vendor/bin/phpunit");
|
||||
break;
|
||||
|
||||
case 'develop':
|
||||
run("git checkout develop");
|
||||
run("git pull $remote develop");
|
||||
|
||||
add_remote($pull_user, 'phpbb3');
|
||||
run("git fetch $pull_user");
|
||||
run("git merge --no-ff $pull_user/$pull_branch");
|
||||
run("phpBB/vendor/bin/phpunit");
|
||||
break;
|
||||
|
||||
default:
|
||||
throw new RuntimeException(sprintf("Error: pull request target branch '%s' is not a main branch\n",
|
||||
$target_branch), 5);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
function add_remote($username, $repository, $pushable = false)
|
||||
{
|
||||
$url = get_repository_url($username, $repository, false);
|
||||
run("git remote add $username $url", true);
|
||||
|
||||
if ($pushable)
|
||||
{
|
||||
$ssh_url = get_repository_url($username, $repository, true);
|
||||
run("git remote set-url --push $username $ssh_url");
|
||||
}
|
||||
}
|
||||
|
||||
function get_repository_url($username, $repository, $ssh = false)
|
||||
{
|
||||
$url_base = ($ssh) ? 'git@github.com:' : 'git://github.com/';
|
||||
|
||||
return $url_base . $username . '/' . $repository . '.git';
|
||||
}
|
||||
|
||||
function api_request($query)
|
||||
{
|
||||
return api_url_request("https://api.github.com/$query?per_page=100");
|
||||
}
|
||||
|
||||
function api_url_request($url)
|
||||
{
|
||||
$contents = file_get_contents($url, false, stream_context_create(array(
|
||||
'http' => array(
|
||||
'header' => "User-Agent: phpBB/1.0\r\n",
|
||||
),
|
||||
)));
|
||||
|
||||
if ($contents === false)
|
||||
{
|
||||
throw new RuntimeException("Error: failed to retrieve pull request data\n", 4);
|
||||
}
|
||||
$contents = json_decode($contents);
|
||||
|
||||
if (isset($contents->message) && strpos($contents->message, 'API Rate Limit') === 0)
|
||||
{
|
||||
throw new RuntimeException('Reached github API Rate Limit. Please try again later' . "\n", 4);
|
||||
}
|
||||
|
||||
return $contents;
|
||||
}
|
||||
|
||||
function get_pull($username, $repository, $pull_id)
|
||||
{
|
||||
$request = api_request("repos/$username/$repository/pulls/$pull_id");
|
||||
|
||||
$pull = $request->pull;
|
||||
|
||||
$pull_data = array(
|
||||
'base' => array($pull->base->user->login, $pull->base->ref),
|
||||
'head' => array($pull->head->user->login, $pull->head->ref),
|
||||
'state' => $pull->state,
|
||||
);
|
||||
|
||||
return $pull_data;
|
||||
}
|
||||
|
||||
function get_arg($array, $index, $default)
|
||||
{
|
||||
return isset($array[$index]) ? $array[$index] : $default;
|
||||
}
|
||||
|
||||
function run($cmd, $ignore_fail = false)
|
||||
{
|
||||
global $dry_run;
|
||||
|
||||
if (!empty($dry_run))
|
||||
{
|
||||
echo "$cmd\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
passthru(escapeshellcmd($cmd), $status);
|
||||
|
||||
if ($status != 0 && !$ignore_fail)
|
||||
{
|
||||
throw new RuntimeException(sprintf("Error: command '%s' failed with status %s'\n",
|
||||
$cmd, $status), 6);
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,292 +0,0 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
/**
|
||||
*
|
||||
* This file is part of the phpBB Forum Software package.
|
||||
*
|
||||
* @copyright (c) phpBB Limited <https://www.phpbb.com>
|
||||
* @license GNU General Public License, version 2 (GPL-2.0)
|
||||
*
|
||||
* For full copyright and license information, please see
|
||||
* the docs/CREDITS.txt file.
|
||||
*
|
||||
*/
|
||||
|
||||
function show_usage()
|
||||
{
|
||||
$filename = basename(__FILE__);
|
||||
|
||||
echo "$filename adds repositories of a github network as remotes to a local git repository.\n";
|
||||
echo "\n";
|
||||
|
||||
echo "Usage: [php] $filename -s collaborators|organisation|contributors|forks [OPTIONS]\n";
|
||||
echo "\n";
|
||||
|
||||
echo "Scopes:\n";
|
||||
echo " collaborators Repositories of people who have push access to the specified repository\n";
|
||||
echo " contributors Repositories of people who have contributed to the specified repository\n";
|
||||
echo " organisation Repositories of members of the organisation at github\n";
|
||||
echo " forks All repositories of the whole github network\n";
|
||||
echo "\n";
|
||||
|
||||
echo "Options:\n";
|
||||
echo " -s scope See description above (mandatory)\n";
|
||||
echo " -u github_username Overwrites the github username (optional)\n";
|
||||
echo " -r repository_name Overwrites the repository name (optional)\n";
|
||||
echo " -m your_github_username Sets up ssh:// instead of git:// for pushable repositories (optional)\n";
|
||||
echo " -d Outputs the commands instead of running them (optional)\n";
|
||||
echo " -h This help text\n";
|
||||
|
||||
exit(1);
|
||||
}
|
||||
|
||||
// Handle arguments
|
||||
$opts = getopt('s:u:r:m:dh');
|
||||
|
||||
if (empty($opts) || isset($opts['h']))
|
||||
{
|
||||
show_usage();
|
||||
}
|
||||
|
||||
$scope = get_arg($opts, 's', '');
|
||||
$username = get_arg($opts, 'u', 'phpbb');
|
||||
$repository = get_arg($opts, 'r', 'phpbb3');
|
||||
$developer = get_arg($opts, 'm', '');
|
||||
$dry_run = !get_arg($opts, 'd', true);
|
||||
run(null, $dry_run);
|
||||
exit(work($scope, $username, $repository, $developer));
|
||||
|
||||
function work($scope, $username, $repository, $developer)
|
||||
{
|
||||
// Get some basic data
|
||||
$forks = get_forks($username, $repository);
|
||||
$collaborators = get_collaborators($username, $repository);
|
||||
|
||||
if ($forks === false || $collaborators === false)
|
||||
{
|
||||
echo "Error: failed to retrieve forks or collaborators\n";
|
||||
return 1;
|
||||
}
|
||||
|
||||
switch ($scope)
|
||||
{
|
||||
case 'collaborators':
|
||||
$remotes = array_intersect_key($forks, $collaborators);
|
||||
break;
|
||||
|
||||
case 'organisation':
|
||||
$remotes = array_intersect_key($forks, get_organisation_members($username));
|
||||
break;
|
||||
|
||||
case 'contributors':
|
||||
$remotes = array_intersect_key($forks, get_contributors($username, $repository));
|
||||
break;
|
||||
|
||||
case 'forks':
|
||||
$remotes = $forks;
|
||||
break;
|
||||
|
||||
default:
|
||||
show_usage();
|
||||
}
|
||||
|
||||
if (file_exists('.git'))
|
||||
{
|
||||
add_remote($username, $repository, isset($collaborators[$developer]));
|
||||
}
|
||||
else
|
||||
{
|
||||
clone_repository($username, $repository, isset($collaborators[$developer]));
|
||||
}
|
||||
|
||||
// Add private security repository for developers
|
||||
if ($username == 'phpbb' && $repository == 'phpbb3' && isset($collaborators[$developer]))
|
||||
{
|
||||
run("git remote add $username-security " . get_repository_url($username, "$repository-security", true));
|
||||
}
|
||||
|
||||
// Skip blessed repository.
|
||||
unset($remotes[$username]);
|
||||
|
||||
foreach ($remotes as $remote)
|
||||
{
|
||||
add_remote($remote['username'], $remote['repository'], $remote['username'] == $developer);
|
||||
}
|
||||
|
||||
run('git remote update');
|
||||
}
|
||||
|
||||
function clone_repository($username, $repository, $pushable = false)
|
||||
{
|
||||
$url = get_repository_url($username, $repository, false);
|
||||
run("git clone $url ./ --origin $username");
|
||||
|
||||
if ($pushable)
|
||||
{
|
||||
$ssh_url = get_repository_url($username, $repository, true);
|
||||
run("git remote set-url --push $username $ssh_url");
|
||||
}
|
||||
}
|
||||
|
||||
function add_remote($username, $repository, $pushable = false)
|
||||
{
|
||||
$url = get_repository_url($username, $repository, false);
|
||||
run("git remote add $username $url");
|
||||
|
||||
if ($pushable)
|
||||
{
|
||||
$ssh_url = get_repository_url($username, $repository, true);
|
||||
run("git remote set-url --push $username $ssh_url");
|
||||
}
|
||||
}
|
||||
|
||||
function get_repository_url($username, $repository, $ssh = false)
|
||||
{
|
||||
$url_base = ($ssh) ? 'git@github.com:' : 'git://github.com/';
|
||||
|
||||
return $url_base . $username . '/' . $repository . '.git';
|
||||
}
|
||||
|
||||
function api_request($query)
|
||||
{
|
||||
return api_url_request("https://api.github.com/$query?per_page=100");
|
||||
}
|
||||
|
||||
function api_url_request($url)
|
||||
{
|
||||
$contents = file_get_contents($url, false, stream_context_create(array(
|
||||
'http' => array(
|
||||
'header' => "User-Agent: phpBB/1.0\r\n",
|
||||
),
|
||||
)));
|
||||
|
||||
$sub_request_result = array();
|
||||
// Check headers for pagination links
|
||||
if (!empty($http_response_header))
|
||||
{
|
||||
foreach ($http_response_header as $header_element)
|
||||
{
|
||||
// Find Link Header which gives us a link to the next page
|
||||
if (strpos($header_element, 'Link: ') === 0)
|
||||
{
|
||||
list($head, $header_content) = explode(': ', $header_element);
|
||||
foreach (explode(', ', $header_content) as $links)
|
||||
{
|
||||
list($url, $rel) = explode('; ', $links);
|
||||
if ($rel == 'rel="next"')
|
||||
{
|
||||
// Found a next link, follow it and merge the results
|
||||
$sub_request_result = api_url_request(substr($url, 1, -1));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($contents === false)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
$contents = json_decode($contents);
|
||||
|
||||
if (isset($contents->message) && strpos($contents->message, 'API Rate Limit') === 0)
|
||||
{
|
||||
throw new RuntimeException('Reached github API Rate Limit. Please try again later' . "\n", 4);
|
||||
}
|
||||
|
||||
return ($sub_request_result) ? array_merge($sub_request_result, $contents) : $contents;
|
||||
}
|
||||
|
||||
function get_contributors($username, $repository)
|
||||
{
|
||||
$request = api_request("repos/$username/$repository/stats/contributors");
|
||||
if ($request === false)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
$usernames = array();
|
||||
foreach ($request as $contribution)
|
||||
{
|
||||
$usernames[$contribution->author->login] = $contribution->author->login;
|
||||
}
|
||||
|
||||
return $usernames;
|
||||
}
|
||||
|
||||
function get_organisation_members($username)
|
||||
{
|
||||
$request = api_request("orgs/$username/public_members");
|
||||
if ($request === false)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
$usernames = array();
|
||||
foreach ($request as $member)
|
||||
{
|
||||
$usernames[$member->login] = $member->login;
|
||||
}
|
||||
|
||||
return $usernames;
|
||||
}
|
||||
|
||||
function get_collaborators($username, $repository)
|
||||
{
|
||||
$request = api_request("repos/$username/$repository/collaborators");
|
||||
if ($request === false)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
$usernames = array();
|
||||
foreach ($request as $collaborator)
|
||||
{
|
||||
$usernames[$collaborator->login] = $collaborator->login;
|
||||
}
|
||||
|
||||
return $usernames;
|
||||
}
|
||||
|
||||
function get_forks($username, $repository)
|
||||
{
|
||||
$request = api_request("repos/$username/$repository/forks");
|
||||
if ($request === false)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
$usernames = array();
|
||||
foreach ($request as $fork)
|
||||
{
|
||||
$usernames[$fork->owner->login] = array(
|
||||
'username' => $fork->owner->login,
|
||||
'repository' => $fork->name,
|
||||
);
|
||||
}
|
||||
|
||||
return $usernames;
|
||||
}
|
||||
|
||||
function get_arg($array, $index, $default)
|
||||
{
|
||||
return isset($array[$index]) ? $array[$index] : $default;
|
||||
}
|
||||
|
||||
function run($cmd, $dry = false)
|
||||
{
|
||||
static $dry_run;
|
||||
|
||||
if (is_null($cmd))
|
||||
{
|
||||
$dry_run = $dry;
|
||||
}
|
||||
else if (!empty($dry_run))
|
||||
{
|
||||
echo "$cmd\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
passthru(escapeshellcmd($cmd));
|
||||
}
|
||||
}
|
@@ -1,75 +0,0 @@
|
||||
<IfModule mod_rewrite.c>
|
||||
RewriteEngine on
|
||||
|
||||
#
|
||||
# Uncomment the statement below if you want to make use of
|
||||
# HTTP authentication and it does not already work.
|
||||
# This could be required if you are for example using PHP via Apache CGI.
|
||||
#
|
||||
#RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
|
||||
|
||||
#
|
||||
# The following 3 lines will rewrite URLs passed through the front controller
|
||||
# to not require app.php in the actual URL. In other words, a controller is
|
||||
# by default accessed at /app.php/my/controller, but can also be accessed at
|
||||
# /my/controller
|
||||
#
|
||||
RewriteCond %{REQUEST_FILENAME} !-f
|
||||
RewriteCond %{REQUEST_FILENAME} !-d
|
||||
RewriteRule ^(.*)$ app.php [QSA,L]
|
||||
|
||||
#
|
||||
# If symbolic links are not already being followed,
|
||||
# uncomment the line below.
|
||||
# http://anothersysadmin.wordpress.com/2008/06/10/mod_rewrite-forbidden-403-with-apache-228/
|
||||
#
|
||||
#Options +FollowSymLinks
|
||||
</IfModule>
|
||||
|
||||
# With Apache 2.4 the "Order, Deny" syntax has been deprecated and moved from
|
||||
# module mod_authz_host to a new module called mod_access_compat (which may be
|
||||
# disabled) and a new "Require" syntax has been introduced to mod_authz_host.
|
||||
# We could just conditionally provide both versions, but unfortunately Apache
|
||||
# does not explicitly tell us its version if the module mod_version is not
|
||||
# available. In this case, we check for the availability of module
|
||||
# mod_authz_core (which should be on 2.4 or higher only) as a best guess.
|
||||
<IfModule mod_version.c>
|
||||
<IfVersion < 2.4>
|
||||
<Files "config.php">
|
||||
Order Allow,Deny
|
||||
Deny from All
|
||||
</Files>
|
||||
<Files "common.php">
|
||||
Order Allow,Deny
|
||||
Deny from All
|
||||
</Files>
|
||||
</IfVersion>
|
||||
<IfVersion >= 2.4>
|
||||
<Files "config.php">
|
||||
Require all denied
|
||||
</Files>
|
||||
<Files "common.php">
|
||||
Require all denied
|
||||
</Files>
|
||||
</IfVersion>
|
||||
</IfModule>
|
||||
<IfModule !mod_version.c>
|
||||
<IfModule !mod_authz_core.c>
|
||||
<Files "config.php">
|
||||
Order Allow,Deny
|
||||
Deny from All
|
||||
</Files>
|
||||
<Files "common.php">
|
||||
Order Allow,Deny
|
||||
Deny from All
|
||||
</Files>
|
||||
</IfModule>
|
||||
<IfModule mod_authz_core.c>
|
||||
<Files "config.php">
|
||||
Require all denied
|
||||
</Files>
|
||||
<Files "common.php">
|
||||
Require all denied
|
||||
</Files>
|
||||
</IfModule>
|
||||
</IfModule>
|
Before Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 51 B |
Before Width: | Height: | Size: 49 B |
Before Width: | Height: | Size: 49 B |
Before Width: | Height: | Size: 51 B |
Before Width: | Height: | Size: 182 B |
Before Width: | Height: | Size: 48 B |
Before Width: | Height: | Size: 48 B |
Before Width: | Height: | Size: 48 B |
Before Width: | Height: | Size: 48 B |
Before Width: | Height: | Size: 416 B |
Before Width: | Height: | Size: 385 B |
Before Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 420 B |
Before Width: | Height: | Size: 826 B |
Before Width: | Height: | Size: 344 B |
Before Width: | Height: | Size: 358 B |
Before Width: | Height: | Size: 229 B |
Before Width: | Height: | Size: 357 B |
Before Width: | Height: | Size: 570 B |
Before Width: | Height: | Size: 357 B |
Before Width: | Height: | Size: 192 B |
Before Width: | Height: | Size: 255 B |
Before Width: | Height: | Size: 249 B |
Before Width: | Height: | Size: 239 B |
Before Width: | Height: | Size: 166 B |
Before Width: | Height: | Size: 242 B |
Before Width: | Height: | Size: 239 B |
Before Width: | Height: | Size: 662 B |
Before Width: | Height: | Size: 708 B |
Before Width: | Height: | Size: 681 B |
Before Width: | Height: | Size: 725 B |
Before Width: | Height: | Size: 251 B |
Before Width: | Height: | Size: 246 B |
Before Width: | Height: | Size: 307 B |
Before Width: | Height: | Size: 240 B |
Before Width: | Height: | Size: 168 B |
Before Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 930 B |
Before Width: | Height: | Size: 401 B |
Before Width: | Height: | Size: 6.5 KiB |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 807 B |
@@ -1,90 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
*
|
||||
* This file is part of the phpBB Forum Software package.
|
||||
*
|
||||
* @copyright (c) phpBB Limited <https://www.phpbb.com>
|
||||
* @license GNU General Public License, version 2 (GPL-2.0)
|
||||
*
|
||||
* For full copyright and license information, please see
|
||||
* the docs/CREDITS.txt file.
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
*/
|
||||
define('IN_PHPBB', true);
|
||||
define('ADMIN_START', true);
|
||||
define('NEED_SID', true);
|
||||
|
||||
// Include files
|
||||
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './../';
|
||||
$phpEx = substr(strrchr(__FILE__, '.'), 1);
|
||||
require($phpbb_root_path . 'common.' . $phpEx);
|
||||
require($phpbb_root_path . 'includes/functions_acp.' . $phpEx);
|
||||
require($phpbb_root_path . 'includes/functions_admin.' . $phpEx);
|
||||
require($phpbb_root_path . 'includes/functions_module.' . $phpEx);
|
||||
|
||||
// Start session management
|
||||
$user->session_begin();
|
||||
$auth->acl($user->data);
|
||||
$user->setup('acp/common');
|
||||
// End session management
|
||||
|
||||
// Have they authenticated (again) as an admin for this session?
|
||||
if (!isset($user->data['session_admin']) || !$user->data['session_admin'])
|
||||
{
|
||||
login_box('', $user->lang['LOGIN_ADMIN_CONFIRM'], $user->lang['LOGIN_ADMIN_SUCCESS'], true, false);
|
||||
}
|
||||
|
||||
// Is user any type of admin? No, then stop here, each script needs to
|
||||
// check specific permissions but this is a catchall
|
||||
if (!$auth->acl_get('a_'))
|
||||
{
|
||||
trigger_error('NO_ADMIN');
|
||||
}
|
||||
|
||||
// We define the admin variables now, because the user is now able to use the admin related features...
|
||||
define('IN_ADMIN', true);
|
||||
|
||||
// Some oft used variables
|
||||
$safe_mode = (@ini_get('safe_mode') == '1' || strtolower(@ini_get('safe_mode')) === 'on') ? true : false;
|
||||
$file_uploads = (@ini_get('file_uploads') == '1' || strtolower(@ini_get('file_uploads')) === 'on') ? true : false;
|
||||
$module_id = request_var('i', '');
|
||||
$mode = request_var('mode', '');
|
||||
|
||||
// Set custom style for admin area
|
||||
$template->set_custom_style(array(
|
||||
array(
|
||||
'name' => 'adm',
|
||||
'ext_path' => 'adm/style/',
|
||||
),
|
||||
), $phpbb_admin_path . 'style');
|
||||
|
||||
$template->assign_var('T_ASSETS_PATH', $phpbb_root_path . 'assets');
|
||||
$template->assign_var('T_TEMPLATE_PATH', $phpbb_admin_path . 'style');
|
||||
|
||||
// Instantiate new module
|
||||
$module = new p_master();
|
||||
|
||||
// Instantiate module system and generate list of available modules
|
||||
$module->list_modules('acp');
|
||||
|
||||
// Select the active module
|
||||
$module->set_active($module_id, $mode);
|
||||
|
||||
// Assign data to the template engine for the list of modules
|
||||
// We do this before loading the active module for correct menu display in trigger_error
|
||||
$module->assign_tpl_vars(append_sid("{$phpbb_admin_path}index.$phpEx"));
|
||||
|
||||
// Load and execute the relevant module
|
||||
$module->load_active();
|
||||
|
||||
// Generate the page
|
||||
adm_page_header($module->get_page_title());
|
||||
|
||||
$template->set_filenames(array(
|
||||
'body' => $module->get_tpl_name(),
|
||||
));
|
||||
|
||||
adm_page_footer();
|
@@ -1,464 +0,0 @@
|
||||
<!-- INCLUDE overall_header.html -->
|
||||
|
||||
<a id="maincontent"></a>
|
||||
|
||||
<!-- IF U_BACK -->
|
||||
<a href="{U_BACK}" style="float: {S_CONTENT_FLOW_END};">« {L_BACK}</a>
|
||||
<!-- ENDIF -->
|
||||
|
||||
<h1>{L_TITLE}</h1>
|
||||
|
||||
<p>{L_TITLE_EXPLAIN}</p>
|
||||
|
||||
<!-- IF S_WARNING -->
|
||||
<div class="errorbox">
|
||||
<h3>{L_WARNING}</h3>
|
||||
<p>{WARNING_MSG}</p>
|
||||
</div>
|
||||
<!-- ENDIF -->
|
||||
|
||||
<!-- IF S_NOTIFY -->
|
||||
<div class="successbox">
|
||||
<h3>{L_NOTIFY}</h3>
|
||||
<p>{NOTIFY_MSG}</p>
|
||||
</div>
|
||||
<!-- ENDIF -->
|
||||
|
||||
<!-- IF S_UPLOADING_FILES -->
|
||||
<h2>{L_UPLOADING_FILES}</h2>
|
||||
|
||||
<!-- BEGIN upload -->
|
||||
:: {upload.FILE_INFO}<br />
|
||||
<!-- IF upload.S_DENIED --><span class="error">{upload.DENIED}</span><!-- ELSEIF upload.ERROR_MSG --><span class="error">{upload.ERROR_MSG}</span><!-- ELSE --><span class="success">{L_SUCCESSFULLY_UPLOADED}</span><!-- ENDIF -->
|
||||
<br /><br />
|
||||
<!-- END upload -->
|
||||
|
||||
<!-- ENDIF -->
|
||||
|
||||
<!-- IF S_ATTACHMENT_SETTINGS -->
|
||||
|
||||
<!-- IF not S_THUMBNAIL_SUPPORT -->
|
||||
<div class="errorbox">
|
||||
<p>{L_NO_THUMBNAIL_SUPPORT}</p>
|
||||
</div>
|
||||
<!-- ENDIF -->
|
||||
|
||||
<form id="attachsettings" method="post" action="{U_ACTION}">
|
||||
<!-- BEGIN options -->
|
||||
<!-- IF options.S_LEGEND -->
|
||||
<!-- IF not options.S_FIRST_ROW -->
|
||||
</fieldset>
|
||||
<!-- ENDIF -->
|
||||
<fieldset>
|
||||
<legend>{options.LEGEND}</legend>
|
||||
<!-- ELSE -->
|
||||
|
||||
<dl>
|
||||
<dt><label for="{options.KEY}">{options.TITLE}{L_COLON}</label><!-- IF options.S_EXPLAIN --><br /><span>{options.TITLE_EXPLAIN}</span><!-- ENDIF --></dt>
|
||||
<dd>{options.CONTENT}</dd>
|
||||
</dl>
|
||||
|
||||
<!-- ENDIF -->
|
||||
<!-- END options -->
|
||||
</fieldset>
|
||||
|
||||
<fieldset class="submit-buttons">
|
||||
<legend>{L_SUBMIT}</legend>
|
||||
<input class="button1" type="submit" id="submit" name="submit" value="{L_SUBMIT}" />
|
||||
<input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" />
|
||||
</fieldset>
|
||||
|
||||
<!-- IF not S_SECURE_DOWNLOADS -->
|
||||
<div class="errorbox">
|
||||
<p>{L_SECURE_DOWNLOAD_NOTICE}</p>
|
||||
</div>
|
||||
<!-- ENDIF -->
|
||||
|
||||
<fieldset>
|
||||
<legend>{L_SECURE_TITLE}</legend>
|
||||
<p>{L_DOWNLOAD_ADD_IPS_EXPLAIN}</p>
|
||||
<dl>
|
||||
<dt><label for="ip_hostname">{L_IP_HOSTNAME}{L_COLON}</label></dt>
|
||||
<dd><textarea id="ip_hostname" cols="40" rows="3" name="ips"></textarea></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="exclude">{L_IP_EXCLUDE}{L_COLON}</label><br /><span>{L_EXCLUDE_ENTERED_IP}</span></dt>
|
||||
<dd><label><input type="radio" id="exclude" name="ipexclude" value="1" class="radio" /> {L_YES}</label>
|
||||
<label><input type="radio" name="ipexclude" value="0" checked="checked" class="radio" /> {L_NO}</label></dd>
|
||||
</dl>
|
||||
|
||||
<p class="quick">
|
||||
<input class="button1" type="submit" id="securesubmit" name="securesubmit" value="{L_SUBMIT}" />
|
||||
</p>
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
<legend>{L_REMOVE_IPS}</legend>
|
||||
<!-- IF S_DEFINED_IPS -->
|
||||
<p>{L_DOWNLOAD_REMOVE_IPS_EXPLAIN}</p>
|
||||
<dl>
|
||||
<dt><label for="remove_ip_hostname">{L_IP_HOSTNAME}{L_COLON}</label></dt>
|
||||
<dd><select name="unip[]" id="remove_ip_hostname" multiple="multiple" size="10">{DEFINED_IPS}</select></dd>
|
||||
</dl>
|
||||
|
||||
<p class="quick">
|
||||
<input class="button1" type="submit" id="unsecuresubmit" name="unsecuresubmit" value="{L_SUBMIT}" />
|
||||
</p>
|
||||
</fieldset>
|
||||
|
||||
<!-- ELSE -->
|
||||
<p>{L_NO_IPS_DEFINED}</p>
|
||||
<!-- ENDIF -->
|
||||
{S_FORM_TOKEN}
|
||||
</fieldset>
|
||||
</form>
|
||||
|
||||
<!-- ELSEIF S_EXTENSION_GROUPS -->
|
||||
|
||||
<!-- IF S_EDIT_GROUP -->
|
||||
<script type="text/javascript" defer="defer">
|
||||
// <![CDATA[
|
||||
function update_image(newimage)
|
||||
{
|
||||
if (newimage == 'no_image')
|
||||
{
|
||||
document.getElementById('image_upload_icon').src = "{ROOT_PATH}images/spacer.gif";
|
||||
}
|
||||
else
|
||||
{
|
||||
document.getElementById('image_upload_icon').src = "{ROOT_PATH}{IMG_PATH}/" + newimage;
|
||||
}
|
||||
}
|
||||
|
||||
function show_extensions(elem)
|
||||
{
|
||||
var str = '';
|
||||
|
||||
for (i = 0; i < elem.length; i++)
|
||||
{
|
||||
var element = elem.options[i];
|
||||
if (element.selected)
|
||||
{
|
||||
if (str)
|
||||
{
|
||||
str = str + ', ';
|
||||
}
|
||||
|
||||
str = str + element.innerHTML;
|
||||
}
|
||||
}
|
||||
|
||||
if (document.all)
|
||||
{
|
||||
document.all.ext.innerText = str;
|
||||
}
|
||||
else if (document.getElementById('ext').textContent)
|
||||
{
|
||||
document.getElementById('ext').textContent = str;
|
||||
}
|
||||
else if (document.getElementById('ext').firstChild.nodeValue)
|
||||
{
|
||||
document.getElementById('ext').firstChild.nodeValue = str;
|
||||
}
|
||||
}
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
<form id="extgroups" method="post" action="{U_ACTION}">
|
||||
<fieldset>
|
||||
<input type="hidden" name="action" value="{ACTION}" />
|
||||
<input type="hidden" name="g" value="{GROUP_ID}" />
|
||||
|
||||
<legend>{L_LEGEND}</legend>
|
||||
<dl>
|
||||
<dt><label for="group_name">{L_GROUP_NAME}{L_COLON}</label></dt>
|
||||
<dd><input type="text" id="group_name" size="20" maxlength="100" name="group_name" value="{GROUP_NAME}" /></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="category">{L_SPECIAL_CATEGORY}{L_COLON}</label><br /><span>{L_SPECIAL_CATEGORY_EXPLAIN}</span></dt>
|
||||
<dd>{S_CATEGORY_SELECT}</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="allowed">{L_ALLOWED}{L_COLON}</label></dt>
|
||||
<dd><input type="checkbox" class="radio" id="allowed" name="allow_group" value="1"<!-- IF ALLOW_GROUP --> checked="checked"<!-- ENDIF --> /></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="allow_in_pm">{L_ALLOW_IN_PM}{L_COLON}</label></dt>
|
||||
<dd><input type="checkbox" class="radio" id="allow_in_pm" name="allow_in_pm" value="1"<!-- IF ALLOW_IN_PM --> checked="checked"<!-- ENDIF --> /></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="upload_icon">{L_UPLOAD_ICON}{L_COLON}</label></dt>
|
||||
<dd><select name="upload_icon" id="upload_icon" onchange="update_image(this.options[selectedIndex].value);">
|
||||
<option value="no_image"<!-- IF S_NO_IMAGE --> selected="selected"<!-- ENDIF -->>{L_NO_IMAGE}</option>{S_FILENAME_LIST}
|
||||
</select></dd>
|
||||
<dd> <img <!-- IF S_NO_IMAGE -->src="{ROOT_PATH}images/spacer.gif"<!-- ELSE -->src="{UPLOAD_ICON_SRC}"<!-- ENDIF --> id="image_upload_icon" alt="" title="" /> </dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="extgroup_filesize">{L_MAX_EXTGROUP_FILESIZE}{L_COLON}</label></dt>
|
||||
<dd><input type="number" id="extgroup_filesize" size="3" maxlength="15" name="max_filesize" value="{EXTGROUP_FILESIZE}" /> <select name="size_select">{S_EXT_GROUP_SIZE_OPTIONS}</select></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="assigned_extensions">{L_ASSIGNED_EXTENSIONS}{L_COLON}</label></dt>
|
||||
<dd><div id="ext">{ASSIGNED_EXTENSIONS}</div> <span>[<a href="{U_EXTENSIONS}">{L_GO_TO_EXTENSIONS}</a> ]</span></dd>
|
||||
<dd><select name="extensions[]" id="assigned_extensions" class="narrow" onchange="show_extensions(this);" multiple="multiple" size="8">{S_EXTENSION_OPTIONS}</select></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="allowed_forums">{L_ALLOWED_FORUMS}{L_COLON}</label><br /><span>{L_ALLOWED_FORUMS_EXPLAIN}</span></dt>
|
||||
<dd><label><input type="radio" id="allowed_forums" class="radio" name="forum_select" value="0"<!-- IF not S_FORUM_IDS --> checked="checked"<!-- ENDIF --> /> {L_ALLOW_ALL_FORUMS}</label></dd>
|
||||
<dd><label><input type="radio" class="radio" name="forum_select" value="1"<!-- IF S_FORUM_IDS --> checked="checked"<!-- ENDIF --> /> {L_ALLOW_SELECTED_FORUMS}</label></dd>
|
||||
<dd><select name="allowed_forums[]" multiple="multiple" size="8">{S_FORUM_ID_OPTIONS}</select></dd>
|
||||
</dl>
|
||||
|
||||
<p class="submit-buttons">
|
||||
<input class="button1" type="submit" id="submit" name="submit" value="{L_SUBMIT}" />
|
||||
<input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" />
|
||||
</p>
|
||||
{S_FORM_TOKEN}
|
||||
</fieldset>
|
||||
|
||||
</form>
|
||||
<!-- ELSE -->
|
||||
|
||||
<form id="extgroups" method="post" action="{U_ACTION}">
|
||||
<fieldset class="tabulated">
|
||||
<legend>{L_TITLE}</legend>
|
||||
|
||||
<table class="table1">
|
||||
<col class="row1" /><col class="row1" /><col class="row2" />
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{L_EXTENSION_GROUP}</th>
|
||||
<th>{L_SPECIAL_CATEGORY}</th>
|
||||
<th>{L_OPTIONS}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<!-- BEGIN groups -->
|
||||
<!-- IF groups.S_ADD_SPACER and not groups.S_FIRST_ROW -->
|
||||
<tr>
|
||||
<td class="spacer" colspan="3"> </td>
|
||||
</tr>
|
||||
<!-- ENDIF -->
|
||||
<tr>
|
||||
<td><strong>{groups.GROUP_NAME}</strong>
|
||||
<!-- IF groups.S_GROUP_ALLOWED and not groups.S_ALLOWED_IN_PM --><br /><span>» {L_NOT_ALLOWED_IN_PM}</span>
|
||||
<!-- ELSEIF groups.S_ALLOWED_IN_PM and not groups.S_GROUP_ALLOWED --><br /><span>» {L_ONLY_ALLOWED_IN_PM}</span>
|
||||
<!-- ELSEIF not groups.S_GROUP_ALLOWED and not groups.S_ALLOWED_IN_PM --><br /><span>» {L_NOT_ALLOWED_IN_PM_POST}</span>
|
||||
<!-- ELSE --><br /><span>» {L_ALLOWED_IN_PM_POST}</span><!-- ENDIF -->
|
||||
</td>
|
||||
<td>{groups.CATEGORY}</td>
|
||||
<td align="center" valign="middle" style="white-space: nowrap;"> <a href="{groups.U_EDIT}">{ICON_EDIT}</a> <a href="{groups.U_DELETE}" data-ajax="row_delete">{ICON_DELETE}</a> </td>
|
||||
</tr>
|
||||
<!-- END groups -->
|
||||
</tbody>
|
||||
</table>
|
||||
<p class="quick">
|
||||
{L_CREATE_GROUP}{L_COLON} <input type="text" name="group_name" maxlength="30" />
|
||||
<input class="button2" name="add" type="submit" value="{L_SUBMIT}" />
|
||||
</p>
|
||||
{S_FORM_TOKEN}
|
||||
</fieldset>
|
||||
</form>
|
||||
|
||||
<!-- ENDIF -->
|
||||
|
||||
<!-- ELSEIF S_EXTENSIONS -->
|
||||
|
||||
<form id="add_ext" method="post" action="{U_ACTION}">
|
||||
<fieldset>
|
||||
<legend>{L_ADD_EXTENSION}</legend>
|
||||
<dl>
|
||||
<dt><label for="add_extension">{L_EXTENSION}</label></dt>
|
||||
<dd><input type="text" id="add_extension" size="20" maxlength="100" name="add_extension" value="{ADD_EXTENSION}" /></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="extension_group">{L_EXTENSION_GROUP}</label></dt>
|
||||
<dd>{GROUP_SELECT_OPTIONS}</dd>
|
||||
</dl>
|
||||
|
||||
<p class="quick">
|
||||
<input type="submit" id="add_extension_check" name="add_extension_check" class="button2" value="{L_SUBMIT}" />
|
||||
</p>
|
||||
{S_FORM_TOKEN}
|
||||
</fieldset>
|
||||
</form>
|
||||
|
||||
<form id="change_ext" method="post" action="{U_ACTION}">
|
||||
|
||||
<fieldset class="tabulated">
|
||||
<legend>{L_TITLE}</legend>
|
||||
|
||||
<table class="table1">
|
||||
<col class="row1" /><col class="row1" /><col class="row2" />
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{L_EXTENSION}</th>
|
||||
<th>{L_EXTENSION_GROUP}</th>
|
||||
<th>{L_DELETE}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<!-- BEGIN extensions -->
|
||||
<!-- IF extensions.S_SPACER -->
|
||||
<tr>
|
||||
<td class="spacer" colspan="3"> </td>
|
||||
</tr>
|
||||
<!-- ENDIF -->
|
||||
<tr>
|
||||
<td><strong>{extensions.EXTENSION}</strong></td>
|
||||
<td>{extensions.GROUP_OPTIONS}</td>
|
||||
<td><input type="checkbox" class="radio" name="extension_id_list[]" value="{extensions.EXTENSION_ID}" /><input type="hidden" name="extension_change_list[]" value="{extensions.EXTENSION_ID}" /></td>
|
||||
</tr>
|
||||
<!-- END extensions -->
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<p class="submit-buttons">
|
||||
<input class="button1" type="submit" id="submit" name="submit" value="{L_SUBMIT}" />
|
||||
<input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" />
|
||||
</p>
|
||||
{S_FORM_TOKEN}
|
||||
</fieldset>
|
||||
</form>
|
||||
|
||||
<!-- ELSEIF S_ORPHAN -->
|
||||
|
||||
<form id="orphan" method="post" action="{U_ACTION}">
|
||||
|
||||
<fieldset class="tabulated">
|
||||
<legend>{L_TITLE}</legend>
|
||||
|
||||
<table class="table1 zebra-table fixed-width-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{L_FILENAME}</th>
|
||||
<th style="width: 15%;">{L_FILEDATE}</th>
|
||||
<th style="width: 15%;">{L_FILESIZE}</th>
|
||||
<th style="width: 15%;">{L_ATTACH_POST_ID}</th>
|
||||
<th style="width: 15%;">{L_ATTACH_TO_POST}</th>
|
||||
<th style="width: 15%;">{L_DELETE}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<!-- BEGIN orphan -->
|
||||
<tr>
|
||||
<td><a href="{orphan.U_FILE}">{orphan.REAL_FILENAME}</a></td>
|
||||
<td>{orphan.FILETIME}</td>
|
||||
<td>{orphan.FILESIZE}</td>
|
||||
<td><strong>{L_ATTACH_ID}{L_COLON} </strong><input type="number" name="post_id[{orphan.ATTACH_ID}]" maxlength="10" value="{orphan.POST_ID}" style="width: 75%;" /></td>
|
||||
<td><input type="checkbox" class="radio" name="add[{orphan.ATTACH_ID}]" /></td>
|
||||
<td><input type="checkbox" class="radio" name="delete[{orphan.ATTACH_ID}]" /></td>
|
||||
</tr>
|
||||
<!-- END orphan -->
|
||||
<tr class="row4">
|
||||
<td colspan="4"> </td>
|
||||
<td class="small"><a href="#" onclick="marklist('orphan', 'add', true); return false;">{L_MARK_ALL}</a> :: <a href="#" onclick="marklist('orphan', 'add', false); return false;">{L_UNMARK_ALL}</a></td>
|
||||
<td class="small"><a href="#" onclick="marklist('orphan', 'delete', true); return false;">{L_MARK_ALL}</a> :: <a href="#" onclick="marklist('orphan', 'delete', false); return false;">{L_UNMARK_ALL}</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<br />
|
||||
|
||||
<p class="submit-buttons">
|
||||
<input class="button1" type="submit" id="submit" name="submit" value="{L_SUBMIT}" />
|
||||
<input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" />
|
||||
</p>
|
||||
{S_FORM_TOKEN}
|
||||
</fieldset>
|
||||
</form>
|
||||
|
||||
<!-- ELSEIF S_MANAGE -->
|
||||
|
||||
<form id="attachments" method="post" action="{U_ACTION}">
|
||||
|
||||
<fieldset class="tabulated">
|
||||
<legend>{L_TITLE}</legend>
|
||||
|
||||
<div class="pagination top-pagination">
|
||||
<!-- IF .pagination or TOTAL_FILES -->
|
||||
{L_NUMBER_FILES}{L_COLON} {TOTAL_FILES} • {L_TOTAL_SIZE}{L_COLON} {TOTAL_SIZE}
|
||||
<!-- IF .pagination -->
|
||||
• <!-- INCLUDE pagination.html -->
|
||||
<!-- ELSE -->
|
||||
• {PAGE_NUMBER}
|
||||
<!-- ENDIF -->
|
||||
<!-- ENDIF -->
|
||||
</div>
|
||||
|
||||
<!-- IF .attachments -->
|
||||
<table class="table1 zebra-table fixed-width-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{L_FILENAME}</th>
|
||||
<th style="width: 15%;">{L_POSTED}</th>
|
||||
<th style="width: 15%;" class="centered-text">{L_FILESIZE}</th>
|
||||
<th style="width: 10%;" class="centered-text">{L_MARK}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<!-- BEGIN attachments -->
|
||||
<tr>
|
||||
<td>
|
||||
<!-- IF attachments.S_IN_MESSAGE -->{L_EXTENSION_GROUP}{L_COLON} <strong><!-- IF attachments.EXT_GROUP_NAME -->{attachments.EXT_GROUP_NAME}<!-- ELSE -->{L_NO_EXT_GROUP}<!-- ENDIF --></strong><br />{attachments.L_DOWNLOAD_COUNT}<br />{L_IN} {L_PRIVATE_MESSAGE}
|
||||
<!-- ELSE --><a href="{attachments.U_FILE}" style="font-weight: bold;">{attachments.REAL_FILENAME}</a><br /><!-- IF attachments.COMMENT -->{attachments.COMMENT}<br /><!-- ENDIF -->{attachments.L_DOWNLOAD_COUNT}<br />{L_TOPIC}{L_COLON} <a href="{attachments.U_VIEW_TOPIC}">{attachments.TOPIC_TITLE}</a><!-- ENDIF -->
|
||||
</td>
|
||||
<td>{attachments.FILETIME}<br />{L_POST_BY_AUTHOR} {attachments.ATTACHMENT_POSTER}</td>
|
||||
<td class="centered-text">{attachments.FILESIZE}</td>
|
||||
<td class="centered-text"><input type="checkbox" class="radio" name="delete[{attachments.ATTACH_ID}]" /></td>
|
||||
</tr>
|
||||
<!-- END attachments -->
|
||||
</tbody>
|
||||
</table>
|
||||
<!-- ELSE -->
|
||||
<div class="errorbox">
|
||||
<p>{L_NO_ATTACHMENTS}</p>
|
||||
</div>
|
||||
<!-- ENDIF -->
|
||||
|
||||
<!-- IF TOTAL_FILES -->
|
||||
<div class="pagination">
|
||||
{L_NUMBER_FILES}{L_COLON} {TOTAL_FILES} • {L_TOTAL_SIZE}{L_COLON} {TOTAL_SIZE}
|
||||
<!-- IF .pagination -->
|
||||
• <!-- INCLUDE pagination.html -->
|
||||
<!-- ELSE -->
|
||||
• {PAGE_NUMBER}
|
||||
<!-- ENDIF -->
|
||||
</div>
|
||||
<!-- ENDIF -->
|
||||
|
||||
<fieldset class="display-options">
|
||||
{L_DISPLAY_LOG}{L_COLON} {S_LIMIT_DAYS} {L_SORT_BY}{L_COLON} {S_SORT_KEY} {S_SORT_DIR}
|
||||
<input class="button2" type="submit" value="{L_GO}" name="sort" />
|
||||
</fieldset>
|
||||
|
||||
<hr />
|
||||
|
||||
<!-- IF .attachments -->
|
||||
<fieldset class="quick">
|
||||
<input class="button2" type="submit" name="submit" value="{L_DELETE_MARKED}" /><br />
|
||||
<p class="small">
|
||||
<a href="#" onclick="marklist('attachments', 'delete', true); return false;">{L_MARK_ALL}</a> •
|
||||
<a href="#" onclick="marklist('attachments', 'delete', false); return false;">{L_UNMARK_ALL}</a>
|
||||
</p>
|
||||
</fieldset>
|
||||
<!-- ENDIF -->
|
||||
{S_FORM_TOKEN}
|
||||
</fieldset>
|
||||
</form>
|
||||
|
||||
<!-- IF S_ACTION_OPTIONS -->
|
||||
<fieldset>
|
||||
<legend>{L_RESYNC_STATS}</legend>
|
||||
<form id="action_stats_form" method="post" action="{U_ACTION}">
|
||||
<dl>
|
||||
<dt><label for="action_stats">{L_RESYNC_FILES_STATS}</label><br /><span>{L_RESYNC_FILES_STATS_EXPLAIN}</span></dt>
|
||||
<dd><input type="hidden" name="action" value="stats" /><input class="button2" type="submit" id="action_stats" name="action_stats" value="{L_RUN}" /></dd>
|
||||
</dl>
|
||||
</form>
|
||||
</fieldset>
|
||||
<!-- ENDIF -->
|
||||
<!-- ENDIF -->
|
||||
|
||||
<!-- INCLUDE overall_footer.html -->
|
@@ -1,11 +0,0 @@
|
||||
<dl>
|
||||
<dt><label for="avatar_gravatar_email">{L_GRAVATAR_AVATAR_EMAIL}{L_COLON}</label><br /><span>{L_GRAVATAR_AVATAR_EMAIL_EXPLAIN}</span></dt>
|
||||
<dd><input type="email" name="avatar_gravatar_email" id="avatar_gravatar_email" value="{AVATAR_GRAVATAR_EMAIL}" class="inputbox" /></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="avatar_gravatar_width">{L_GRAVATAR_AVATAR_SIZE}{L_COLON}</label><br /><span>{L_GRAVATAR_AVATAR_SIZE_EXPLAIN}</span></dt>
|
||||
<dd>
|
||||
<input type="number" name="avatar_gravatar_width" id="avatar_gravatar_width" size="3" value="{AVATAR_GRAVATAR_WIDTH}" class="inputbox autowidth" /> {L_PIXEL} ×
|
||||
<input type="number" name="avatar_gravatar_height" id="avatar_gravatar_height" size="3" value="{AVATAR_GRAVATAR_HEIGHT}" class="inputbox autowidth" /> {L_PIXEL}
|
||||
</dd>
|
||||
</dl>
|
@@ -1,20 +0,0 @@
|
||||
<dl>
|
||||
<dt><label for="category">{L_AVATAR_CATEGORY}{L_COLON}</label></dt>
|
||||
<dd><select name="avatar_local_cat" id="category">
|
||||
<!-- BEGIN avatar_local_cats -->
|
||||
<option value="{avatar_local_cats.NAME}"<!-- IF avatar_local_cats.SELECTED --> selected="selected"<!-- ENDIF -->>{avatar_local_cats.NAME}</option>
|
||||
<!-- END avatar_local_cats -->
|
||||
</select> <input type="submit" value="{L_GO}" name="avatar_local_go" class="button2" /></dd>
|
||||
</dl>
|
||||
<!-- IF AVATAR_LOCAL_SHOW -->
|
||||
<ul id="gallery">
|
||||
<!-- BEGIN avatar_local_row -->
|
||||
<!-- BEGIN avatar_local_col -->
|
||||
<li>
|
||||
<label for="av-{avatar_local_row.S_ROW_COUNT}-{avatar_local_row.avatar_local_col.S_ROW_COUNT}"><img src="{avatar_local_row.avatar_local_col.AVATAR_IMAGE}" alt="" /><br />
|
||||
<input type="radio" name="avatar_local_file" id="av-{avatar_local_row.S_ROW_COUNT}-{avatar_local_row.avatar_local_col.S_ROW_COUNT}" value="{avatar_local_row.avatar_local_col.AVATAR_FILE}" /></label>
|
||||
</li>
|
||||
<!-- END avatar_local_col -->
|
||||
<!-- END avatar_local_row -->
|
||||
</ul>
|
||||
<!-- ENDIF -->
|
@@ -1,11 +0,0 @@
|
||||
<dl>
|
||||
<dt><label for="avatar_remote_url">{L_LINK_REMOTE_AVATAR}{L_COLON}</label><br /><span>{L_LINK_REMOTE_AVATAR_EXPLAIN}</span></dt>
|
||||
<dd><input type="url" name="avatar_remote_url" id="avatar_remote_url" value="{AVATAR_REMOTE_URL}" class="inputbox" /></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="avatar_remote_width">{L_LINK_REMOTE_SIZE}{L_COLON}</label><br /><span>{L_LINK_REMOTE_SIZE_EXPLAIN}</span></dt>
|
||||
<dd>
|
||||
<input type="number" name="avatar_remote_width" id="avatar_remote_width" size="3" value="{AVATAR_REMOTE_WIDTH}" class="inputbox autowidth" /> {L_PIXEL} ×
|
||||
<input type="number" name="avatar_remote_height" id="avatar_remote_height" size="3" value="{AVATAR_REMOTE_HEIGHT}" class="inputbox autowidth" /> {L_PIXEL}
|
||||
</dd>
|
||||
</dl>
|
@@ -1,11 +0,0 @@
|
||||
<dl>
|
||||
<dt><label for="avatar_upload_file">{L_UPLOAD_AVATAR_FILE}{L_COLON}</label></dt>
|
||||
<dd><input type="hidden" name="MAX_FILE_SIZE" value="{AVATAR_UPLOAD_SIZE}" /><input type="file" name="avatar_upload_file" id="avatar_upload_file" class="inputbox autowidth" /></dd>
|
||||
</dl>
|
||||
|
||||
<!-- IF S_UPLOAD_AVATAR_URL -->
|
||||
<dl>
|
||||
<dt><label for="avatar_upload_url">{L_UPLOAD_AVATAR_URL}{L_COLON}</label><br /><span>{L_UPLOAD_AVATAR_URL_EXPLAIN}</span></dt>
|
||||
<dd><input type="url" name="avatar_upload_url" id="avatar_upload_url" value="" class="inputbox" /></dd>
|
||||
</dl>
|
||||
<!-- ENDIF -->
|
@@ -1,131 +0,0 @@
|
||||
<!-- INCLUDE overall_header.html -->
|
||||
|
||||
<a id="maincontent"></a>
|
||||
|
||||
<p>{L_ACP_BAN_EXPLAIN}</p>
|
||||
|
||||
<h1>{L_TITLE}</h1>
|
||||
|
||||
<p>{L_EXPLAIN}</p>
|
||||
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
var ban_length = new Array();
|
||||
ban_length[-1] = '';
|
||||
var ban_reason = new Array();
|
||||
ban_reason[-1] = '';
|
||||
var ban_give_reason = new Array();
|
||||
ban_give_reason[-1] = '';
|
||||
|
||||
<!-- BEGIN bans -->
|
||||
ban_length['{bans.BAN_ID}'] = '{bans.A_LENGTH}';
|
||||
<!-- IF bans.A_REASON -->
|
||||
ban_reason['{bans.BAN_ID}'] = '{bans.A_REASON}';
|
||||
<!-- ENDIF -->
|
||||
<!-- IF bans.A_GIVE_REASON -->
|
||||
ban_give_reason['{bans.BAN_ID}'] = '{bans.A_GIVE_REASON}';
|
||||
<!-- ENDIF -->
|
||||
<!-- END bans -->
|
||||
|
||||
function display_details(option)
|
||||
{
|
||||
document.getElementById('unbanlength').value = ban_length[option];
|
||||
if (option in ban_reason) {
|
||||
document.getElementById('unbanreason').innerHTML = ban_reason[option];
|
||||
} else {
|
||||
document.getElementById('unbanreason').innerHTML = '';
|
||||
}
|
||||
if (option in ban_give_reason) {
|
||||
document.getElementById('unbangivereason').innerHTML = ban_give_reason[option];
|
||||
} else {
|
||||
document.getElementById('unbangivereason').innerHTML = '';
|
||||
}
|
||||
}
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
<form id="acp_ban" method="post" action="{U_ACTION}">
|
||||
|
||||
<fieldset>
|
||||
<legend>{L_TITLE}</legend>
|
||||
<dl>
|
||||
<dt><label for="ban">{L_BAN_CELL}{L_COLON}</label></dt>
|
||||
<dd><textarea name="ban" cols="40" rows="3" id="ban"></textarea></dd>
|
||||
<!-- IF S_USERNAME_BAN --><dd>[ <a href="{U_FIND_USERNAME}" onclick="find_username(this.href); return false;">{L_FIND_USERNAME}</a> ]</dd><!-- ENDIF -->
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="banlength">{L_BAN_LENGTH}{L_COLON}</label></dt>
|
||||
<dd><label for="banlength"><select name="banlength" id="banlength" onchange="if(this.value==-1){document.getElementById('banlengthother').style.display = 'block';}else{document.getElementById('banlengthother').style.display='none';}">{S_BAN_END_OPTIONS}</select></label></dd>
|
||||
<dd id="banlengthother" style="display: none;"><label><input type="text" name="banlengthother" class="inputbox" /><br /><span>{L_YEAR_MONTH_DAY}</span></label></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="banexclude">{L_BAN_EXCLUDE}{L_COLON}</label><br /><span>{L_BAN_EXCLUDE_EXPLAIN}</span></dt>
|
||||
<dd><label><input type="radio" name="banexclude" value="1" class="radio" /> {L_YES}</label>
|
||||
<label><input type="radio" name="banexclude" id="banexclude" value="0" checked="checked" class="radio" /> {L_NO}</label></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="banreason">{L_BAN_REASON}{L_COLON}</label></dt>
|
||||
<dd><input name="banreason" type="text" class="text medium" maxlength="255" id="banreason" /></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="bangivereason">{L_BAN_GIVE_REASON}{L_COLON}</label></dt>
|
||||
<dd><input name="bangivereason" type="text" class="text medium" maxlength="255" id="bangivereason" /></dd>
|
||||
</dl>
|
||||
|
||||
<p class="submit-buttons">
|
||||
<input class="button1" type="submit" id="bansubmit" name="bansubmit" value="{L_SUBMIT}" />
|
||||
<input class="button2" type="reset" id="banreset" name="banreset" value="{L_RESET}" />
|
||||
</p>
|
||||
{S_FORM_TOKEN}
|
||||
</fieldset>
|
||||
</form>
|
||||
|
||||
<br /><br />
|
||||
|
||||
<h1>{L_UNBAN_TITLE}</h1>
|
||||
|
||||
<p>{L_UNBAN_EXPLAIN}</p>
|
||||
|
||||
<form id="acp_unban" method="post" action="{U_ACTION}">
|
||||
|
||||
<fieldset>
|
||||
<legend>{L_UNBAN_TITLE}</legend>
|
||||
|
||||
<!-- IF S_BANNED_OPTIONS -->
|
||||
<dl>
|
||||
<dt><label for="unban">{L_BAN_CELL}{L_COLON}</label></dt>
|
||||
<dd><select id="unban" name="unban[]" multiple="multiple" size="10" style="width: 50%" onchange="if (this.selectedIndex > -1) display_details(this.options[this.selectedIndex].value); else display_details(-1);">{BANNED_OPTIONS}</select></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="unbanlength">{L_BAN_LENGTH}{L_COLON}</label></dt>
|
||||
<dd><input style="border: 0;" type="text" class="text full" readonly="readonly" name="unbanlength" id="unbanlength" /></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="unbanreason">{L_BAN_REASON}{L_COLON}</label></dt>
|
||||
<dd><textarea style="border: 0;" class="text full" readonly="readonly" name="unbanreason" id="unbanreason" rows="5" cols="80"> </textarea></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="unbangivereason">{L_BAN_GIVE_REASON}{L_COLON}</label></dt>
|
||||
<dd><textarea style="border: 0;" class="text full" readonly="readonly" name="unbangivereason" id="unbangivereason" rows="5" cols="80"> </textarea></dd>
|
||||
</dl>
|
||||
|
||||
<p class="submit-buttons">
|
||||
<input class="button1" type="submit" id="unbansubmit" name="unbansubmit" value="{L_SUBMIT}" />
|
||||
<input class="button2" type="reset" id="unbanreset" name="unbanreset" value="{L_RESET}" />
|
||||
</p>
|
||||
{S_FORM_TOKEN}
|
||||
</fieldset>
|
||||
|
||||
<!-- ELSE -->
|
||||
|
||||
<p>{L_NO_BAN_CELL}</p>
|
||||
{S_FORM_TOKEN}
|
||||
</fieldset>
|
||||
|
||||
<!-- ENDIF -->
|
||||
|
||||
</form>
|
||||
|
||||
<!-- INCLUDE overall_footer.html -->
|
@@ -1,126 +0,0 @@
|
||||
<!-- INCLUDE overall_header.html -->
|
||||
|
||||
<a id="maincontent"></a>
|
||||
|
||||
<!-- IF S_EDIT_BBCODE -->
|
||||
|
||||
<a href="{U_BACK}" style="float: {S_CONTENT_FLOW_END};">« {L_BACK}</a>
|
||||
|
||||
<h1>{L_ACP_BBCODES}</h1>
|
||||
|
||||
<p>{L_ACP_BBCODES_EXPLAIN}</p>
|
||||
|
||||
<form id="acp_bbcodes" method="post" action="{U_ACTION}">
|
||||
|
||||
<fieldset>
|
||||
<legend>{L_BBCODE_USAGE}</legend>
|
||||
<p>{L_BBCODE_USAGE_EXPLAIN}</p>
|
||||
<dl>
|
||||
<dt><label for="bbcode_match">{L_EXAMPLES}</label><br /><br /><span>{L_BBCODE_USAGE_EXAMPLE}</span></dt>
|
||||
<dd><textarea id="bbcode_match" name="bbcode_match" cols="60" rows="5">{BBCODE_MATCH}</textarea></dd>
|
||||
</dl>
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
<legend>{L_HTML_REPLACEMENT}</legend>
|
||||
<p>{L_HTML_REPLACEMENT_EXPLAIN}</p>
|
||||
<dl>
|
||||
<dt><label for="bbcode_tpl">{L_EXAMPLES}</label><br /><br /><span>{L_HTML_REPLACEMENT_EXAMPLE}</span></dt>
|
||||
<dd><textarea id="bbcode_tpl" name="bbcode_tpl" cols="60" rows="8">{BBCODE_TPL}</textarea></dd>
|
||||
</dl>
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
<legend>{L_BBCODE_HELPLINE}</legend>
|
||||
<p>{L_BBCODE_HELPLINE_EXPLAIN}</p>
|
||||
<dl>
|
||||
<dt><label for="bbcode_helpline">{L_BBCODE_HELPLINE_TEXT}</label></dt>
|
||||
<dd><input type="text" id="bbcode_helpline" name="bbcode_helpline" size="60" maxlength="255" value="{BBCODE_HELPLINE}" /></dd>
|
||||
</dl>
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
<legend>{L_SETTINGS}</legend>
|
||||
<dl>
|
||||
<dt><label for="display_on_posting">{L_DISPLAY_ON_POSTING}</label></dt>
|
||||
<dd><input type="checkbox" class="radio" name="display_on_posting" id="display_on_posting" value="1"<!-- IF DISPLAY_ON_POSTING --> checked="checked"<!-- ENDIF --> /></dd>
|
||||
</dl>
|
||||
</fieldset>
|
||||
|
||||
<!-- EVENT acp_bbcodes_edit_fieldsets_after -->
|
||||
|
||||
<fieldset class="submit-buttons">
|
||||
<legend>{L_SUBMIT}</legend>
|
||||
<input class="button1" type="submit" id="submit" name="submit" value="{L_SUBMIT}" />
|
||||
<input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" />
|
||||
{S_FORM_TOKEN}
|
||||
</fieldset>
|
||||
|
||||
<br />
|
||||
|
||||
<table class="table1" id="down">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="2">{L_TOKENS}</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="row3" colspan="2">{L_TOKENS_EXPLAIN}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{L_TOKEN}</th>
|
||||
<th>{L_TOKEN_DEFINITION}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<!-- BEGIN token -->
|
||||
<tr style="vertical-align: top;">
|
||||
<td class="row1">{token.TOKEN}</td>
|
||||
<td class="row2">{token.EXPLAIN}</td>
|
||||
</tr>
|
||||
<!-- END token -->
|
||||
</tbody>
|
||||
</table>
|
||||
</form>
|
||||
|
||||
<!-- ELSE -->
|
||||
|
||||
<h1>{L_ACP_BBCODES}</h1>
|
||||
|
||||
<p>{L_ACP_BBCODES_EXPLAIN}</p>
|
||||
|
||||
<form id="acp_bbcodes" method="post" action="{U_ACTION}">
|
||||
<fieldset class="tabulated">
|
||||
<legend>{L_ACP_BBCODES}</legend>
|
||||
|
||||
<table class="table1 zebra-table" id="down">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{L_BBCODE_TAG}</th>
|
||||
<th>{L_ACTION}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<!-- BEGIN bbcodes -->
|
||||
<tr>
|
||||
<td style="text-align: center;">{bbcodes.BBCODE_TAG}</td>
|
||||
<td class="actions"><!-- EVENT acp_bbcodes_actions_prepend --> <a href="{bbcodes.U_EDIT}">{ICON_EDIT}</a> <a href="{bbcodes.U_DELETE}" data-ajax="row_delete">{ICON_DELETE}</a> <!-- EVENT acp_bbcodes_actions_append --></td>
|
||||
</tr>
|
||||
<!-- BEGINELSE -->
|
||||
<tr class="row3">
|
||||
<td colspan="2">{L_ACP_NO_ITEMS}</td>
|
||||
</tr>
|
||||
<!-- END bbcodes -->
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<p class="quick">
|
||||
<input class="button2" name="submit" type="submit" value="{L_ADD_BBCODE}" />
|
||||
</p>
|
||||
{S_FORM_TOKEN}
|
||||
</fieldset>
|
||||
|
||||
</form>
|
||||
|
||||
<!-- ENDIF -->
|
||||
|
||||
<!-- INCLUDE overall_footer.html -->
|
@@ -1,52 +0,0 @@
|
||||
<!-- INCLUDE overall_header.html -->
|
||||
|
||||
<a id="maincontent"></a>
|
||||
|
||||
<h1>{L_TITLE}</h1>
|
||||
|
||||
<p>{L_TITLE_EXPLAIN}</p>
|
||||
|
||||
<!-- IF S_ERROR -->
|
||||
<div class="errorbox">
|
||||
<h3>{L_WARNING}</h3>
|
||||
<p>{ERROR_MSG}</p>
|
||||
</div>
|
||||
<!-- ENDIF -->
|
||||
|
||||
<form id="acp_board" method="post" action="{U_ACTION}">
|
||||
|
||||
<!-- BEGIN options -->
|
||||
<!-- IF options.S_LEGEND -->
|
||||
<!-- IF not options.S_FIRST_ROW -->
|
||||
</fieldset>
|
||||
<!-- ENDIF -->
|
||||
<fieldset>
|
||||
<legend>{options.LEGEND}</legend>
|
||||
<!-- ELSE -->
|
||||
|
||||
<dl>
|
||||
<dt><label for="{options.KEY}">{options.TITLE}{L_COLON}</label><!-- IF options.S_EXPLAIN --><br /><span>{options.TITLE_EXPLAIN}</span><!-- ENDIF --></dt>
|
||||
<dd>{options.CONTENT}</dd>
|
||||
</dl>
|
||||
|
||||
<!-- ENDIF -->
|
||||
<!-- END options -->
|
||||
|
||||
<!-- IF S_AUTH -->
|
||||
</fieldset>
|
||||
<!-- BEGIN auth_tpl -->
|
||||
<!-- INCLUDE {auth_tpl.TEMPLATE_FILE} -->
|
||||
<!-- END auth_tpl -->
|
||||
<fieldset>
|
||||
<legend>{L_ACP_SUBMIT_CHANGES}</legend>
|
||||
<!-- ENDIF -->
|
||||
|
||||
<p class="submit-buttons">
|
||||
<input class="button1" type="submit" id="submit" name="submit" value="{L_SUBMIT}" />
|
||||
<input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" />
|
||||
</p>
|
||||
{S_FORM_TOKEN}
|
||||
</fieldset>
|
||||
</form>
|
||||
|
||||
<!-- INCLUDE overall_footer.html -->
|
@@ -1,102 +0,0 @@
|
||||
<!-- INCLUDE overall_header.html -->
|
||||
|
||||
<a id="maincontent"></a>
|
||||
|
||||
<!-- IF S_EDIT_BOT -->
|
||||
|
||||
<a href="{U_BACK}" style="float: {S_CONTENT_FLOW_END};">« {L_BACK}</a>
|
||||
|
||||
<h1>{L_TITLE}</h1>
|
||||
|
||||
<p>{L_BOT_EDIT_EXPLAIN}</p>
|
||||
|
||||
<!-- IF S_ERROR -->
|
||||
<div class="errorbox">
|
||||
<h3>{L_WARNING}</h3>
|
||||
<p>{ERROR_MSG}</p>
|
||||
</div>
|
||||
<!-- ENDIF -->
|
||||
|
||||
<form id="acp_bots" method="post" action="{U_ACTION}">
|
||||
|
||||
<fieldset>
|
||||
<legend>{L_TITLE}</legend>
|
||||
<dl>
|
||||
<dt><label for="bot_name">{L_BOT_NAME}{L_COLON}</label><br /><span>{L_BOT_NAME_EXPLAIN}</span></dt>
|
||||
<dd><input name="bot_name" type="text" id="bot_name" value="{BOT_NAME}" maxlength="255" /></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="bot_style">{L_BOT_STYLE}{L_COLON}</label><br /><span>{L_BOT_STYLE_EXPLAIN}</span></dt>
|
||||
<dd><select id="bot_style" name="bot_style">{S_STYLE_OPTIONS}</select></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="bot_lang">{L_BOT_LANG}{L_COLON}</label><br /><span>{L_BOT_LANG_EXPLAIN}</span></dt>
|
||||
<dd><select id="bot_lang" name="bot_lang">{S_LANG_OPTIONS}</select></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="bot_active">{L_BOT_ACTIVE}{L_COLON}</label></dt>
|
||||
<dd><select id="bot_active" name="bot_active">{S_ACTIVE_OPTIONS}</select></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="bot_agent">{L_BOT_AGENT}{L_COLON}</label><br /><span>{L_BOT_AGENT_EXPLAIN}</span></dt>
|
||||
<dd><input name="bot_agent" type="text" id="bot_agent" value="{BOT_AGENT}" maxlength="255" /></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="bot_ip">{L_BOT_IP}{L_COLON}</label><br /><span>{L_BOT_IP_EXPLAIN}</span></dt>
|
||||
<dd><input name="bot_ip" type="text" id="bot_ip" value="{BOT_IP}" maxlength="255" /></dd>
|
||||
</dl>
|
||||
|
||||
<p class="submit-buttons">
|
||||
<input class="button1" type="submit" id="submit" name="submit" value="{L_SUBMIT}" />
|
||||
<input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" />
|
||||
{S_FORM_TOKEN}
|
||||
</p>
|
||||
</fieldset>
|
||||
</form>
|
||||
|
||||
<!-- ELSE -->
|
||||
|
||||
<h1>{L_BOTS}</h1>
|
||||
|
||||
<p>{L_BOTS_EXPLAIN}</p>
|
||||
|
||||
<form id="acp_bots" method="post" action="{U_ACTION}">
|
||||
|
||||
<table class="table1 zebra-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{L_BOT_NAME}</th>
|
||||
<th>{L_BOT_LAST_VISIT}</th>
|
||||
<th colspan="3">{L_OPTIONS}</th>
|
||||
<th>{L_MARK}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<!-- BEGIN bots -->
|
||||
<tr>
|
||||
<td style="width: 50%;">{bots.BOT_NAME}</td>
|
||||
<td style="width: 15%; white-space: nowrap;" align="center"> {bots.LAST_VISIT} </td>
|
||||
<td style="text-align: center;"> <a href="{bots.U_ACTIVATE_DEACTIVATE}" data-ajax="activate_deactivate">{bots.L_ACTIVATE_DEACTIVATE}</a> </td>
|
||||
<td style="text-align: center;"> <a href="{bots.U_EDIT}">{L_EDIT}</a> </td>
|
||||
<td style="text-align: center;"> <a href="{bots.U_DELETE}" data-ajax="row_delete">{L_DELETE}</a> </td>
|
||||
<td style="text-align: center;"><input type="checkbox" class="radio" name="mark[]" value="{bots.BOT_ID}" /></td>
|
||||
</tr>
|
||||
<!-- END bots -->
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<fieldset class="quick" style="float: {S_CONTENT_FLOW_BEGIN};">
|
||||
<input class="button2" name="add" type="submit" value="{L_BOT_ADD}" />
|
||||
</fieldset>
|
||||
|
||||
<fieldset class="quick" style="float: {S_CONTENT_FLOW_END};">
|
||||
<select name="action">{S_BOT_OPTIONS}</select>
|
||||
<input class="button2" name="submit" type="submit" value="{L_SUBMIT}" />
|
||||
<p class="small"><a href="#" onclick="marklist('acp_bots', 'mark', true);">{L_MARK_ALL}</a> • <a href="#" onclick="marklist('acp_bots', 'mark', false);">{L_UNMARK_ALL}</a></p>
|
||||
{S_FORM_TOKEN}
|
||||
</fieldset>
|
||||
</form>
|
||||
|
||||
<!-- ENDIF -->
|
||||
|
||||
<!-- INCLUDE overall_footer.html -->
|
@@ -1,72 +0,0 @@
|
||||
<!-- INCLUDE overall_header.html -->
|
||||
|
||||
<a id="maincontent"></a>
|
||||
|
||||
<h1>{L_ACP_VC_SETTINGS}</h1>
|
||||
|
||||
<p>{L_ACP_VC_SETTINGS_EXPLAIN}</p>
|
||||
|
||||
<p>{L_ACP_VC_EXT_GET_MORE}</p>
|
||||
|
||||
<form id="acp_captcha" method="post" action="{U_ACTION}">
|
||||
|
||||
<fieldset>
|
||||
<legend>{L_GENERAL_OPTIONS}</legend>
|
||||
|
||||
<dl>
|
||||
<dt><label for="enable_confirm">{L_VISUAL_CONFIRM_REG}{L_COLON}</label><br /><span>{L_VISUAL_CONFIRM_REG_EXPLAIN}</span></dt>
|
||||
<dd><label><input type="radio" class="radio" id="enable_confirm" name="enable_confirm" value="1"<!-- IF REG_ENABLE --> checked="checked"<!-- ENDIF --> /> {L_ENABLED}</label>
|
||||
<label><input type="radio" class="radio" name="enable_confirm" value="0"<!-- IF not REG_ENABLE --> checked="checked"<!-- ENDIF --> /> {L_DISABLED}</label></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="max_reg_attempts">{L_REG_LIMIT}{L_COLON}</label><br /><span>{L_REG_LIMIT_EXPLAIN}</span></dt>
|
||||
<dd><input id="max_reg_attempts" type="number" size="4" maxlength="4" min="0" max="9999" name="max_reg_attempts" value="{REG_LIMIT}" /></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="max_login_attempts">{L_MAX_LOGIN_ATTEMPTS}{L_COLON}</label><br /><span>{L_MAX_LOGIN_ATTEMPTS_EXPLAIN}</span></dt>
|
||||
<dd><input id="max_login_attempts" type="number" size="4" maxlength="4" min="0" max="9999" name="max_login_attempts" value="{MAX_LOGIN_ATTEMPTS}" /></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="enable_post_confirm">{L_VISUAL_CONFIRM_POST}{L_COLON}</label><br /><span>{L_VISUAL_CONFIRM_POST_EXPLAIN}</span></dt>
|
||||
<dd><label><input type="radio" class="radio" id="enable_post_confirm" name="enable_post_confirm" value="1"<!-- IF POST_ENABLE --> checked="checked"<!-- ENDIF --> /> {L_ENABLED}</label>
|
||||
<label><input type="radio" class="radio" name="enable_post_confirm" value="0"<!-- IF not POST_ENABLE --> checked="checked"<!-- ENDIF --> /> {L_DISABLED}</label></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="confirm_refresh">{L_VISUAL_CONFIRM_REFRESH}{L_COLON}</label><br /><span>{L_VISUAL_CONFIRM_REFRESH_EXPLAIN}</span></dt>
|
||||
<dd><label><input type="radio" class="radio" id="confirm_refresh" name="confirm_refresh" value="1"<!-- IF CONFIRM_REFRESH --> checked="checked"<!-- ENDIF --> /> {L_ENABLED}</label>
|
||||
<label><input type="radio" class="radio" name="confirm_refresh" value="0"<!-- IF not CONFIRM_REFRESH --> checked="checked"<!-- ENDIF --> /> {L_DISABLED}</label></dd>
|
||||
</dl>
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
<legend>{L_AVAILABLE_CAPTCHAS}</legend>
|
||||
<dl>
|
||||
<dt><label for="captcha_select">{L_CAPTCHA_SELECT}{L_COLON}</label><br /><span>{L_CAPTCHA_SELECT_EXPLAIN}</span></dt>
|
||||
<dd><select id="captcha_select" name="select_captcha" onchange="(document.getElementById('acp_captcha')).submit()" >{CAPTCHA_SELECT}</select></dd>
|
||||
</dl>
|
||||
<!-- IF S_CAPTCHA_HAS_CONFIG -->
|
||||
<dl>
|
||||
<dt><label for="configure">{L_CAPTCHA_CONFIGURE}{L_COLON}</label><br /><span>{L_CAPTCHA_CONFIGURE_EXPLAIN}</span></dt>
|
||||
<dd><input class="button2" type="submit" id="configure" name="configure" value="{L_CONFIGURE}" /></dd>
|
||||
</dl>
|
||||
<!-- ENDIF -->
|
||||
</fieldset>
|
||||
|
||||
<!-- IF CAPTCHA_PREVIEW_TPL -->
|
||||
<fieldset>
|
||||
<legend>{L_PREVIEW}</legend>
|
||||
<!-- INCLUDE {CAPTCHA_PREVIEW_TPL} -->
|
||||
</fieldset>
|
||||
<!-- ENDIF -->
|
||||
|
||||
<fieldset>
|
||||
<legend>{L_ACP_SUBMIT_CHANGES}</legend>
|
||||
<p class="submit-buttons">
|
||||
<input class="button1" type="submit" id="main_submit" name="main_submit" value="{L_SUBMIT}" />
|
||||
<input class="button2" type="reset" id="form_reset" name="reset" value="{L_RESET}" />
|
||||
</p>
|
||||
{S_FORM_TOKEN}
|
||||
</fieldset>
|
||||
</form>
|
||||
|
||||
<!-- INCLUDE overall_footer.html -->
|
@@ -1,76 +0,0 @@
|
||||
<!-- INCLUDE overall_header.html -->
|
||||
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
var form_name = 'acp_contact';
|
||||
var text_name = 'contact_admin_info';
|
||||
var load_draft = false;
|
||||
var upload = false;
|
||||
var imageTag = false;
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
<a id="maincontent"></a>
|
||||
|
||||
<h1>{L_ACP_CONTACT_SETTINGS}</h1>
|
||||
|
||||
<p>{L_ACP_CONTACT_SETTINGS_EXPLAIN}</p>
|
||||
|
||||
<form id="acp_contact" method="post" action="{U_ACTION}">
|
||||
<fieldset>
|
||||
<legend>{L_GENERAL_OPTIONS}</legend>
|
||||
<dl>
|
||||
<dt><label for="contact_admin_form_enable">{L_CONTACT_US_ENABLE}{L_COLON}</label><br /><span>{L_CONTACT_US_ENABLE_EXPLAIN}</span></dt>
|
||||
<dd>
|
||||
<label><input type="radio" class="radio" id="contact_admin_form_enable" name="contact_admin_form_enable" value="1"<!-- IF CONTACT_ENABLED --> checked="checked"<!-- ENDIF --> /> {L_ENABLED}</label>
|
||||
<label><input type="radio" class="radio" name="contact_admin_form_enable" value="0"<!-- IF not CONTACT_ENABLED --> checked="checked"<!-- ENDIF --> /> {L_DISABLED}</label>
|
||||
</dd>
|
||||
</dl>
|
||||
</fieldset>
|
||||
|
||||
<!-- IF CONTACT_US_INFO_PREVIEW -->
|
||||
<fieldset>
|
||||
<legend>{L_CONTACT_US_INFO_PREVIEW}</legend>
|
||||
<p>{CONTACT_US_INFO_PREVIEW}</p>
|
||||
</fieldset>
|
||||
<!-- ENDIF -->
|
||||
|
||||
<fieldset>
|
||||
<legend>{L_CONTACT_US_INFO}</legend>
|
||||
<p>{L_CONTACT_US_INFO_EXPLAIN}</p>
|
||||
|
||||
<!-- INCLUDE acp_posting_buttons.html -->
|
||||
|
||||
<dl class="responsive-columns">
|
||||
<dt style="width: 90px;" id="color_palette_placeholder" data-orientation="v" data-height="12" data-width="15" data-bbcode="true">
|
||||
</dt>
|
||||
|
||||
<dd style="margin-{S_CONTENT_FLOW_BEGIN}: 90px;">
|
||||
<textarea name="contact_admin_info" rows="10" cols="60" style="width: 95%;" onselect="storeCaret(this);" onclick="storeCaret(this);" onkeyup="storeCaret(this);" onfocus="initInsertions();" data-bbcode="true">{CONTACT_US_INFO}</textarea>
|
||||
</dd>
|
||||
|
||||
<dd style="margin-{S_CONTENT_FLOW_BEGIN}: 90px; margin-top: 5px;">
|
||||
<!-- IF S_BBCODE_ALLOWED -->
|
||||
<label><input type="checkbox" class="radio" name="disable_bbcode"<!-- IF S_BBCODE_DISABLE_CHECKED --> checked="checked"<!-- ENDIF --> /> {L_DISABLE_BBCODE}</label>
|
||||
<!-- ENDIF -->
|
||||
<!-- IF S_SMILIES_ALLOWED -->
|
||||
<label><input type="checkbox" class="radio" name="disable_smilies"<!-- IF S_SMILIES_DISABLE_CHECKED --> checked="checked"<!-- ENDIF --> /> {L_DISABLE_SMILIES}</label>
|
||||
<!-- ENDIF -->
|
||||
<!-- IF S_LINKS_ALLOWED -->
|
||||
<label><input type="checkbox" class="radio" name="disable_magic_url"<!-- IF S_MAGIC_URL_DISABLE_CHECKED --> checked="checked"<!-- ENDIF --> /> {L_DISABLE_MAGIC_URL}</label>
|
||||
<!-- ENDIF -->
|
||||
</dd>
|
||||
<dd style="margin-{S_CONTENT_FLOW_BEGIN}: 90px; margin-top: 10px;"><strong>{L_OPTIONS}{L_COLON} </strong>{BBCODE_STATUS} :: {IMG_STATUS} :: {FLASH_STATUS} :: {URL_STATUS} :: {SMILIES_STATUS}</dd>
|
||||
</dl>
|
||||
</fieldset>
|
||||
|
||||
<fieldset class="submit-buttons">
|
||||
<input class="button1" type="submit" id="submit" name="submit" value="{L_SUBMIT}" />
|
||||
<input class="button2" type="submit" name="preview" value="{L_PREVIEW}" />
|
||||
{S_FORM_TOKEN}
|
||||
</fieldset>
|
||||
</form>
|
||||
|
||||
<!-- INCLUDE overall_footer.html -->
|
@@ -1,98 +0,0 @@
|
||||
<!-- INCLUDE overall_header.html -->
|
||||
|
||||
<a id="maincontent"></a>
|
||||
|
||||
<!-- IF MODE eq 'restore' -->
|
||||
<h1>{L_ACP_RESTORE}</h1>
|
||||
|
||||
<p>{L_ACP_RESTORE_EXPLAIN}</p>
|
||||
|
||||
<!-- IF .files -->
|
||||
<form id="acp_backup" method="post" action="{U_ACTION}">
|
||||
|
||||
<fieldset>
|
||||
<legend>{L_RESTORE_OPTIONS}</legend>
|
||||
<dl>
|
||||
<dt><label for="file">{L_SELECT_FILE}{L_COLON}</label></dt>
|
||||
<dd><select id="file" name="file" size="10"><!-- BEGIN files --><option value="{files.FILE}"<!-- IF files.S_LAST_ROW --> selected="selected"<!-- ENDIF -->>{files.NAME}</option><!-- END files --></select></dd>
|
||||
</dl>
|
||||
|
||||
<p class="submit-buttons">
|
||||
<input class="button1" type="submit" id="submit" name="submit" value="{L_START_RESTORE}" />
|
||||
<input class="button2" type="submit" id="delete" name="delete" value="{L_DELETE_BACKUP}" />
|
||||
<input class="button2" type="submit" id="download" name="download" value="{L_DOWNLOAD_BACKUP}" />
|
||||
</p>
|
||||
{S_FORM_TOKEN}
|
||||
</fieldset>
|
||||
</form>
|
||||
<!-- ELSE -->
|
||||
<div class="errorbox">
|
||||
<p>{L_ACP_NO_ITEMS}</p>
|
||||
</div>
|
||||
<!-- ENDIF -->
|
||||
|
||||
<!-- ELSE -->
|
||||
<h1>{L_ACP_BACKUP}</h1>
|
||||
|
||||
<p>{L_ACP_BACKUP_EXPLAIN}</p>
|
||||
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function selector(bool)
|
||||
{
|
||||
var table = document.getElementById('table');
|
||||
|
||||
for (var i = 0; i < table.options.length; i++)
|
||||
{
|
||||
table.options[i].selected = bool;
|
||||
}
|
||||
}
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
<form id="acp_backup" method="post" action="{U_ACTION}">
|
||||
|
||||
<fieldset>
|
||||
<legend>{L_BACKUP_OPTIONS}</legend>
|
||||
<dl>
|
||||
<dt><label for="type">{L_BACKUP_TYPE}{L_COLON}</label></dt>
|
||||
<dd><label><input type="radio" class="radio" name="type" value="full" id="type" checked="checked" /> {L_FULL_BACKUP}</label>
|
||||
<label><input type="radio" name="type" class="radio" value="structure" /> {L_STRUCTURE_ONLY}</label>
|
||||
<label><input type="radio" class="radio" name="type" value="data" /> {L_DATA_ONLY}</label></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="method">{L_FILE_TYPE}{L_COLON}</label></dt>
|
||||
<dd><!-- BEGIN methods -->
|
||||
<label><input name="method"<!-- IF methods.S_FIRST_ROW --> id="method" checked="checked"<!-- ENDIF --> type="radio" class="radio" value="{methods.TYPE}" /> {methods.TYPE}</label>
|
||||
<!-- END methods --></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="where">{L_ACTION}{L_COLON}</label></dt>
|
||||
<dd>
|
||||
<label><input id="where" type="radio" class="radio" name="where" value="store" checked="checked" /> {L_STORE_LOCAL}</label>
|
||||
<label><input type="radio" class="radio" name="where" value="download" /> {L_DOWNLOAD}</label>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="table">{L_TABLE_SELECT}{L_COLON}</label></dt>
|
||||
<dd><select id="table" name="table[]" size="10" multiple="multiple">
|
||||
<!-- BEGIN tables -->
|
||||
<option value="{tables.TABLE}">{tables.TABLE}</option>
|
||||
<!-- END tables -->
|
||||
</select></dd>
|
||||
<dd><a href="#" onclick="selector(true); return false;">{L_SELECT_ALL}</a> :: <a href="#" onclick="selector(false); return false;">{L_DESELECT_ALL}</a></dd>
|
||||
</dl>
|
||||
|
||||
<p class="submit-buttons">
|
||||
<input class="button1" type="submit" id="submit" name="submit" value="{L_SUBMIT}" />
|
||||
<input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" />
|
||||
</p>
|
||||
{S_FORM_TOKEN}
|
||||
</fieldset>
|
||||
</form>
|
||||
|
||||
<!-- ENDIF -->
|
||||
|
||||
<!-- INCLUDE overall_footer.html -->
|
@@ -1,45 +0,0 @@
|
||||
<!-- INCLUDE overall_header.html -->
|
||||
|
||||
<a id="maincontent"></a>
|
||||
|
||||
<h1>{L_ACP_DISALLOW_USERNAMES}</h1>
|
||||
|
||||
<p>{L_ACP_DISALLOW_EXPLAIN}</p>
|
||||
|
||||
<form id="acp_disallow" method="post" action="{U_ACTION}">
|
||||
|
||||
<fieldset>
|
||||
<legend>{L_ADD_DISALLOW_TITLE}</legend>
|
||||
<dl>
|
||||
<dt><label for="user">{L_USERNAME}{L_COLON}</label><br /><span>{L_ADD_DISALLOW_EXPLAIN}</span></dt>
|
||||
<dd><input id="user" type="text" class="text medium" maxlength="255" name="disallowed_user" /></dd>
|
||||
</dl>
|
||||
|
||||
<p class="quick">
|
||||
<input class="button1" type="submit" name="disallow" value="{L_SUBMIT}" />
|
||||
</p>
|
||||
</fieldset>
|
||||
|
||||
<h1>{L_DELETE_DISALLOW_TITLE}</h1>
|
||||
|
||||
<p>{L_DELETE_DISALLOW_EXPLAIN}</p>
|
||||
|
||||
<fieldset>
|
||||
<legend>{L_DELETE_DISALLOW_TITLE}</legend>
|
||||
<!-- IF S_DISALLOWED_NAMES -->
|
||||
<dl>
|
||||
<dt><label for="disallowed">{L_USERNAME}{L_COLON}</label></dt>
|
||||
<dd><select name="disallowed_id" id="disallowed">{S_DISALLOWED_NAMES}</select></dd>
|
||||
</dl>
|
||||
|
||||
<p class="quick">
|
||||
<input class="button1" type="submit" name="allow" value="{L_SUBMIT}" />
|
||||
</p>
|
||||
<!-- ELSE -->
|
||||
<p>{L_NO_DISALLOWED}</p>
|
||||
<!-- ENDIF -->
|
||||
{S_FORM_TOKEN}
|
||||
</fieldset>
|
||||
</form>
|
||||
|
||||
<!-- INCLUDE overall_footer.html -->
|
@@ -1,60 +0,0 @@
|
||||
<!-- INCLUDE overall_header.html -->
|
||||
|
||||
<a id="maincontent"></a>
|
||||
|
||||
<h1>{L_ACP_MASS_EMAIL}</h1>
|
||||
|
||||
<p>{L_ACP_MASS_EMAIL_EXPLAIN}</p>
|
||||
|
||||
<!-- IF S_WARNING -->
|
||||
<div class="errorbox">
|
||||
<h3>{L_WARNING}</h3>
|
||||
<p>{WARNING_MSG}</p>
|
||||
</div>
|
||||
<!-- ENDIF -->
|
||||
|
||||
<form id="acp_email" method="post" action="{U_ACTION}">
|
||||
|
||||
<fieldset>
|
||||
<legend>{L_COMPOSE}</legend>
|
||||
<dl>
|
||||
<dt><label for="group">{L_SEND_TO_GROUP}{L_COLON}</label></dt>
|
||||
<dd><select id="group" name="g">{S_GROUP_OPTIONS}</select></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="usernames">{L_SEND_TO_USERS}{L_COLON}</label><br /><span>{L_SEND_TO_USERS_EXPLAIN}</span></dt>
|
||||
<dd><textarea name="usernames" id="usernames" rows="5" cols="40">{USERNAMES}</textarea></dd>
|
||||
<dd>[ <a href="{U_FIND_USERNAME}" onclick="find_username(this.href); return false;">{L_FIND_USERNAME}</a> ]</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="subject">{L_SUBJECT}{L_COLON}</label></dt>
|
||||
<dd><input name="subject" type="text" id="subject" value="{SUBJECT}" /></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="message">{L_MASS_MESSAGE}{L_COLON}</label><br /><span>{L_MASS_MESSAGE_EXPLAIN}</span></dt>
|
||||
<dd><textarea id="message" name="message" rows="10" cols="60">{MESSAGE}</textarea></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="priority">{L_MAIL_PRIORITY}{L_COLON}</label></dt>
|
||||
<dd><select id="priority" name="mail_priority_flag">{S_PRIORITY_OPTIONS}</select></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="banned">{L_MAIL_BANNED}{L_COLON}</label><br /><span>{L_MAIL_BANNED_EXPLAIN}</span></dt>
|
||||
<dd><input id="banned" name="mail_banned_flag" type="checkbox" class="radio" /></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="send">{L_SEND_IMMEDIATELY}{L_COLON}</label></dt>
|
||||
<dd><input id="send" type="checkbox" class="radio" name="send_immediately" checked="checked" /></dd>
|
||||
</dl>
|
||||
|
||||
<!-- EVENT acp_email_options_after -->
|
||||
|
||||
<p class="submit-buttons">
|
||||
<input class="button1" type="submit" id="submit" name="submit" value="{L_SEND_EMAIL}" />
|
||||
<input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" />
|
||||
</p>
|
||||
{S_FORM_TOKEN}
|
||||
</fieldset>
|
||||
</form>
|
||||
|
||||
<!-- INCLUDE overall_footer.html -->
|
@@ -1,40 +0,0 @@
|
||||
<!-- INCLUDE overall_header.html -->
|
||||
|
||||
<a id="maincontent"></a>
|
||||
|
||||
<h1>{L_EXTENSIONS_ADMIN}</h1>
|
||||
|
||||
<p>{L_EXTENSIONS_EXPLAIN}</p>
|
||||
<p>{L_EXTENSION_DELETE_DATA_EXPLAIN}</p>
|
||||
|
||||
<!-- IF MIGRATOR_ERROR -->
|
||||
<div class="errorbox">
|
||||
<p><strong>{L_MIGRATION_EXCEPTION_ERROR}</strong></p>
|
||||
<p>{MIGRATOR_ERROR}</p>
|
||||
<p><a href="{U_RETURN}">{L_RETURN_TO_EXTENSION_LIST}</a></p>
|
||||
</div>
|
||||
<!-- ELSEIF PRE -->
|
||||
<div class="errorbox">
|
||||
<p>{L_CONFIRM_MESSAGE}</p>
|
||||
</div>
|
||||
|
||||
<form id="acp_extensions" method="post" action="{U_PURGE}">
|
||||
<fieldset class="submit-buttons">
|
||||
<legend>{L_EXTENSION_DELETE_DATA}</legend>
|
||||
<input class="button1" type="submit" name="delete_data" value="{L_EXTENSION_DELETE_DATA}" />
|
||||
<input class="button2" type="submit" name="cancel" value="{L_CANCEL}" />
|
||||
</fieldset>
|
||||
</form>
|
||||
<!-- ELSEIF S_NEXT_STEP -->
|
||||
<div class="errorbox">
|
||||
<p>{L_EXTENSION_DELETE_DATA_IN_PROGRESS}</p>
|
||||
</div>
|
||||
<!-- ELSE -->
|
||||
<div class="successbox">
|
||||
<p>{L_EXTENSION_DELETE_DATA_SUCCESS}</p>
|
||||
<br />
|
||||
<p><a href="{U_RETURN}">{L_RETURN_TO_EXTENSION_LIST}</a></p>
|
||||
</div>
|
||||
<!-- ENDIF -->
|
||||
|
||||
<!-- INCLUDE overall_footer.html -->
|
@@ -1,139 +0,0 @@
|
||||
<!-- INCLUDE overall_header.html -->
|
||||
|
||||
<a id="maincontent"></a>
|
||||
|
||||
<a href="{U_BACK}" style="float: {S_CONTENT_FLOW_END};">« {L_BACK}</a>
|
||||
|
||||
<h1>{L_EXTENSIONS_ADMIN}</h1>
|
||||
|
||||
<!-- IF S_VERSIONCHECK -->
|
||||
<div class="<!-- IF S_UP_TO_DATE -->successbox<!-- ELSE -->errorbox<!-- ENDIF -->">
|
||||
<p>{UP_TO_DATE_MSG} - <a href="{U_VERSIONCHECK_FORCE}">{L_VERSIONCHECK_FORCE_UPDATE}</a></p>
|
||||
</div>
|
||||
<!-- ELSE IF S_VERSIONCHECK_STATUS == 0 -->
|
||||
<div class="errorbox notice">
|
||||
<p>{L_VERSIONCHECK_FAIL}</p>
|
||||
<p>{VERSIONCHECK_FAIL_REASON}</p>
|
||||
<p><a href="{U_VERSIONCHECK_FORCE}">{L_VERSIONCHECK_FORCE_UPDATE}</a></p>
|
||||
</div>
|
||||
<!-- ELSE IF S_VERSIONCHECK_STATUS == 1 -->
|
||||
<div class="errorbox notice">
|
||||
<p>{VERSIONCHECK_FAIL_REASON}</p>
|
||||
</div>
|
||||
<!-- ENDIF -->
|
||||
|
||||
<fieldset>
|
||||
<legend>{L_EXT_DETAILS}</legend>
|
||||
<!-- IF META_DISPLAY_NAME -->
|
||||
<dl>
|
||||
<dt><label>{L_DISPLAY_NAME}{L_COLON}</label></dt>
|
||||
<dd><strong id="meta_display_name">{META_DISPLAY_NAME}</strong></dd>
|
||||
</dl>
|
||||
<!-- ENDIF -->
|
||||
<dl>
|
||||
<dt><label>{L_CLEAN_NAME}{L_COLON}</label></dt>
|
||||
<dd><strong id="meta_name">{META_NAME}</strong></dd>
|
||||
</dl>
|
||||
<!-- IF META_DESCRIPTION -->
|
||||
<dl>
|
||||
<dt><label>{L_DESCRIPTION}{L_COLON}</label></dt>
|
||||
<dd><span id="meta_description">{META_DESCRIPTION}</span></dd>
|
||||
</dl>
|
||||
<!-- ENDIF -->
|
||||
<dl>
|
||||
<dt><label>{L_VERSION}{L_COLON}</label></dt>
|
||||
<dd><span id="meta_version">{META_VERSION}</span></dd>
|
||||
</dl>
|
||||
<!-- IF META_HOMEPAGE -->
|
||||
<dl>
|
||||
<dt><label>{L_HOMEPAGE}{L_COLON}</label></dt>
|
||||
<dd><strong id="meta_homepage"><a href="{META_HOMEPAGE}">{META_HOMEPAGE}</a></strong></dd>
|
||||
</dl>
|
||||
<!-- ENDIF -->
|
||||
<!-- IF META_TIME -->
|
||||
<dl>
|
||||
<dt><label>{L_TIME}{L_COLON}</label></dt>
|
||||
<dd><span id="meta_time">{META_TIME}</span></dd>
|
||||
</dl>
|
||||
<!-- ENDIF -->
|
||||
<dl>
|
||||
<dt><label>{L_LICENSE}{L_COLON}</label></dt>
|
||||
<dd><span id="meta_license">{META_LICENSE}</span></dd>
|
||||
</dl>
|
||||
</fieldset>
|
||||
|
||||
<!-- IF S_VERSIONCHECK && not S_UP_TO_DATE -->
|
||||
<fieldset>
|
||||
<legend>{L_LATEST_VERSION}</legend>
|
||||
<!-- BEGIN updates_available -->
|
||||
<fieldset>
|
||||
<dl>
|
||||
<dt><label>{L_VERSION}{L_COLON}</label></dt>
|
||||
<dd><strong>{updates_available.current}</strong></dd>
|
||||
</dl>
|
||||
<!-- IF updates_available.download-->
|
||||
<dl>
|
||||
<dt><label>{L_DOWNLOAD_LATEST}</label></dt>
|
||||
<dd><strong><a href="{updates_available.download}">{L_DOWNLOAD} {META_NAME} {LATEST_VERSION}</a></strong></dd>
|
||||
</dl>
|
||||
<!-- ENDIF -->
|
||||
<!-- IF updates_available.announcement -->
|
||||
<dl>
|
||||
<dt><label>{L_ANNOUNCEMENT_TOPIC}</label></dt>
|
||||
<dd><strong><a href="{updates_available.announcement}">{L_RELEASE_ANNOUNCEMENT}</a></strong></dd>
|
||||
</dl>
|
||||
<!-- ENDIF -->
|
||||
</fieldset>
|
||||
<!-- END updates_available -->
|
||||
</fieldset>
|
||||
<!-- ENDIF -->
|
||||
|
||||
<!-- IF META_REQUIRE_PHPBB || META_REQUIRE_PHP -->
|
||||
<fieldset>
|
||||
<legend>{L_REQUIREMENTS}</legend>
|
||||
<!-- IF META_REQUIRE_PHPBB -->
|
||||
<dl<!-- IF META_REQUIRE_PHPBB_FAIL --> class="requirements_not_met"<!-- ENDIF -->>
|
||||
<dt><label>{L_PHPBB_VERSION}{L_COLON}</label></dt>
|
||||
<dd><span id="require_phpbb">{META_REQUIRE_PHPBB}</span></dd>
|
||||
</dl>
|
||||
<!-- ENDIF -->
|
||||
<!-- IF META_REQUIRE_PHP -->
|
||||
<dl<!-- IF META_REQUIRE_PHP_FAIL --> class="requirements_not_met"<!-- ENDIF -->>
|
||||
<dt><label>{L_PHP_VERSION}{L_COLON}</label></dt>
|
||||
<dd><span id="require_php">{META_REQUIRE_PHP}</span></dd>
|
||||
</dl>
|
||||
<!-- ENDIF -->
|
||||
</fieldset>
|
||||
<!-- ENDIF -->
|
||||
|
||||
<fieldset>
|
||||
<legend>{L_AUTHOR_INFORMATION}</legend>
|
||||
<!-- BEGIN meta_authors -->
|
||||
<fieldset>
|
||||
<dl>
|
||||
<dt><label>{L_AUTHOR_NAME}{L_COLON}</label></dt>
|
||||
<dd><strong>{meta_authors.AUTHOR_NAME}</strong></dd>
|
||||
</dl>
|
||||
<!-- IF meta_authors.AUTHOR_EMAIL -->
|
||||
<dl>
|
||||
<dt><label>{L_AUTHOR_EMAIL}{L_COLON}</label></dt>
|
||||
<dd><strong><a href="mailto:{meta_authors.AUTHOR_EMAIL}">{meta_authors.AUTHOR_EMAIL}</a></strong></dd>
|
||||
</dl>
|
||||
<!-- ENDIF -->
|
||||
<!-- IF meta_authors.AUTHOR_HOMEPAGE -->
|
||||
<dl>
|
||||
<dt><label>{L_AUTHOR_HOMEPAGE}{L_COLON}</label></dt>
|
||||
<dd><strong><a href="{meta_authors.AUTHOR_HOMEPAGE}">{meta_authors.AUTHOR_HOMEPAGE}</a></strong></dd>
|
||||
</dl>
|
||||
<!-- ENDIF -->
|
||||
<!-- IF meta_authors.AUTHOR_ROLE -->
|
||||
<dl>
|
||||
<dt><label>{L_AUTHOR_ROLE}{L_COLON}</label></dt>
|
||||
<dd><strong>{meta_authors.AUTHOR_ROLE}</strong></dd>
|
||||
</dl>
|
||||
<!-- ENDIF -->
|
||||
</fieldset>
|
||||
<!-- END meta_authors -->
|
||||
</fieldset>
|
||||
|
||||
<!-- INCLUDE overall_footer.html -->
|
@@ -1,34 +0,0 @@
|
||||
<!-- INCLUDE overall_header.html -->
|
||||
|
||||
<a id="maincontent"></a>
|
||||
|
||||
<h1>{L_EXTENSIONS_ADMIN}</h1>
|
||||
|
||||
<p>{L_EXTENSIONS_EXPLAIN}</p>
|
||||
<p>{L_EXTENSION_DISABLE_EXPLAIN}</p>
|
||||
|
||||
<!-- IF PRE -->
|
||||
<fieldset>
|
||||
<h2>{L_CONFIRM}</h2>
|
||||
<p>{L_CONFIRM_MESSAGE}</p>
|
||||
</fieldset>
|
||||
|
||||
<form id="acp_extensions" method="post" action="{U_DISABLE}">
|
||||
<fieldset class="submit-buttons">
|
||||
<input class="button1" type="submit" name="disable" value="{L_EXTENSION_DISABLE}" />
|
||||
<input class="button2" type="submit" name="cancel" value="{L_CANCEL}" />
|
||||
</fieldset>
|
||||
</form>
|
||||
<!-- ELSEIF S_NEXT_STEP -->
|
||||
<div class="successbox notice">
|
||||
<p>{L_EXTENSION_DISABLE_IN_PROGRESS}</p>
|
||||
</div>
|
||||
<!-- ELSE -->
|
||||
<div class="successbox">
|
||||
<p>{L_EXTENSION_DISABLE_SUCCESS}</p>
|
||||
<br />
|
||||
<p><a href="{U_RETURN}">{L_RETURN_TO_EXTENSION_LIST}</a></p>
|
||||
</div>
|
||||
<!-- ENDIF -->
|
||||
|
||||
<!-- INCLUDE overall_footer.html -->
|
@@ -1,40 +0,0 @@
|
||||
<!-- INCLUDE overall_header.html -->
|
||||
|
||||
<a id="maincontent"></a>
|
||||
|
||||
<h1>{L_EXTENSIONS_ADMIN}</h1>
|
||||
|
||||
<p>{L_EXTENSIONS_EXPLAIN}</p>
|
||||
<p>{L_EXTENSION_ENABLE_EXPLAIN}</p>
|
||||
|
||||
<!-- IF MIGRATOR_ERROR -->
|
||||
<div class="errorbox">
|
||||
<p><strong>{L_MIGRATION_EXCEPTION_ERROR}</strong></p>
|
||||
<p>{MIGRATOR_ERROR}</p>
|
||||
<p><a href="{U_RETURN}">{L_RETURN_TO_EXTENSION_LIST}</a></p>
|
||||
</div>
|
||||
<!-- ELSEIF PRE -->
|
||||
<fieldset>
|
||||
<h2>{L_CONFIRM}</h2>
|
||||
<p>{L_CONFIRM_MESSAGE}</p>
|
||||
</fieldset>
|
||||
|
||||
<form id="acp_extensions" method="post" action="{U_ENABLE}">
|
||||
<fieldset class="submit-buttons">
|
||||
<input class="button1" type="submit" name="enable" value="{L_EXTENSION_ENABLE}" />
|
||||
<input class="button2" type="submit" name="cancel" value="{L_CANCEL}" />
|
||||
</fieldset>
|
||||
</form>
|
||||
<!-- ELSEIF S_NEXT_STEP -->
|
||||
<div class="successbox notice">
|
||||
<p>{L_EXTENSION_ENABLE_IN_PROGRESS}</p>
|
||||
</div>
|
||||
<!-- ELSE -->
|
||||
<div class="successbox">
|
||||
<p>{L_EXTENSION_ENABLE_SUCCESS}</p>
|
||||
<br />
|
||||
<p><a href="{U_RETURN}">{L_RETURN_TO_EXTENSION_LIST}</a></p>
|
||||
</div>
|
||||
<!-- ENDIF -->
|
||||
|
||||
<!-- INCLUDE overall_footer.html -->
|
@@ -1,115 +0,0 @@
|
||||
<!-- INCLUDE overall_header.html -->
|
||||
|
||||
<a id="maincontent"></a>
|
||||
|
||||
<h1>{L_EXTENSIONS_ADMIN}</h1>
|
||||
|
||||
<p>{L_EXTENSIONS_EXPLAIN}</p>
|
||||
|
||||
<fieldset class="quick">
|
||||
<span class="small"><a href="{U_VERSIONCHECK_FORCE}">{L_VERSIONCHECK_FORCE_UPDATE_ALL}</a> • <a href="javascript:phpbb.toggleDisplay('version_check_settings');">{L_SETTINGS}</a></span>
|
||||
</fieldset>
|
||||
|
||||
<form id="version_check_settings" method="post" action="{U_ACTION}" style="display:none">
|
||||
|
||||
<fieldset>
|
||||
<legend>{L_EXTENSIONS_VERSION_CHECK_SETTINGS}</legend>
|
||||
<dl>
|
||||
<dt><label for="force_unstable">{L_FORCE_UNSTABLE}{L_COLON}</label></dt>
|
||||
<dd>
|
||||
<label><input type="radio" id="force_unstable" name="force_unstable" class="radio" value="1"<!-- IF FORCE_UNSTABLE --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
|
||||
<label><input type="radio" name="force_unstable" class="radio" value="0"<!-- IF not FORCE_UNSTABLE --> checked="checked"<!-- ENDIF --> /> {L_NO}</label>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<p class="submit-buttons">
|
||||
<input class="button1" type="submit" name="update" value="{L_SUBMIT}" />
|
||||
<input class="button2" type="reset" name="reset" value="{L_RESET}" />
|
||||
<input type="hidden" name="action" value="set_config_version_check_force_unstable" />
|
||||
{S_FORM_TOKEN}
|
||||
</p>
|
||||
</fieldset>
|
||||
</form>
|
||||
|
||||
<table class="table1">
|
||||
<col class="row1" ><col class="row1" ><col class="row2" ><col class="row2" >
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{L_EXTENSION_NAME}</th>
|
||||
<th style="text-align: center; width: 20%;">{L_CURRENT_VERSION}</th>
|
||||
<th style="text-align: center; width: 10%;">{L_EXTENSION_OPTIONS}</th>
|
||||
<th style="text-align: center; width: 25%;">{L_EXTENSION_ACTIONS}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<!-- IF .enabled -->
|
||||
<tr>
|
||||
<td class="row3" colspan="4"><strong>{L_EXTENSIONS_ENABLED}</strong></td>
|
||||
</tr>
|
||||
<!-- BEGIN enabled -->
|
||||
<tr class="ext_enabled">
|
||||
<td><strong>{enabled.META_DISPLAY_NAME}</strong></td>
|
||||
<td style="text-align: center;">
|
||||
<!-- IF enabled.S_VERSIONCHECK -->
|
||||
<strong <!-- IF enabled.S_UP_TO_DATE -->style="color: #228822;"<!-- ELSE -->style="color: #BC2A4D;"<!-- ENDIF -->>{enabled.META_VERSION}</strong>
|
||||
<!-- ELSE -->
|
||||
{enabled.META_VERSION}
|
||||
<!-- ENDIF -->
|
||||
</td>
|
||||
<td style="text-align: center;"><a href="{enabled.U_DETAILS}">{L_DETAILS}</a></td>
|
||||
<td style="text-align: center;">
|
||||
<!-- BEGIN actions -->
|
||||
<a href="{enabled.actions.U_ACTION}"<!-- IF enabled.actions.L_ACTION_EXPLAIN --> title="{enabled.actions.L_ACTION_EXPLAIN}"<!-- ENDIF -->>{enabled.actions.L_ACTION}</a>
|
||||
<!-- IF not enabled.actions.S_LAST_ROW --> | <!-- ENDIF -->
|
||||
<!-- END actions -->
|
||||
</td>
|
||||
</tr>
|
||||
<!-- END enabled -->
|
||||
<!-- ENDIF -->
|
||||
|
||||
<!-- IF .disabled -->
|
||||
<tr>
|
||||
<td class="row3" colspan="4"><strong>{L_EXTENSIONS_DISABLED}</strong></td>
|
||||
</tr>
|
||||
<!-- BEGIN disabled -->
|
||||
<tr class="ext_disabled">
|
||||
<td><strong>{disabled.META_DISPLAY_NAME}</strong></td>
|
||||
<td style="text-align: center;">
|
||||
<!-- IF disabled.S_VERSIONCHECK -->
|
||||
<strong <!-- IF disabled.S_UP_TO_DATE -->style="color: #228822;"<!-- ELSE -->style="color: #BC2A4D;"<!-- ENDIF -->>{disabled.META_VERSION}</strong>
|
||||
<!-- ELSE -->
|
||||
{disabled.META_VERSION}
|
||||
<!-- ENDIF -->
|
||||
</td>
|
||||
<td style="text-align: center;">
|
||||
<!-- IF disabled.U_DETAILS --><a href="{disabled.U_DETAILS}">{L_DETAILS}</a><!-- ENDIF -->
|
||||
</td>
|
||||
<td style="text-align: center;">
|
||||
<!-- BEGIN actions -->
|
||||
<a href="{disabled.actions.U_ACTION}"<!-- IF disabled.actions.L_ACTION_EXPLAIN --> title="{disabled.actions.L_ACTION_EXPLAIN}"<!-- ENDIF -->>{disabled.actions.L_ACTION}</a>
|
||||
<!-- IF not disabled.actions.S_LAST_ROW --> | <!-- ENDIF -->
|
||||
<!-- END actions -->
|
||||
</td>
|
||||
</tr>
|
||||
<!-- END disabled -->
|
||||
<!-- ENDIF -->
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<table class="table1">
|
||||
<tr>
|
||||
<th>{L_EXTENSION_UPDATE_HEADLINE}</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="row3">{L_EXTENSION_UPDATE_EXPLAIN}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{L_EXTENSION_REMOVE_HEADLINE}</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="row3">{L_EXTENSION_REMOVE_EXPLAIN}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<!-- INCLUDE overall_footer.html -->
|
@@ -1,517 +0,0 @@
|
||||
<!-- INCLUDE overall_header.html -->
|
||||
|
||||
<a id="maincontent"></a>
|
||||
|
||||
<!-- IF S_EDIT_FORUM -->
|
||||
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
/**
|
||||
* Handle displaying/hiding several options based on the forum type
|
||||
*/
|
||||
function display_options(value)
|
||||
{
|
||||
<!-- IF not S_ADD_ACTION and S_FORUM_ORIG_POST -->
|
||||
if (value == {FORUM_POST})
|
||||
{
|
||||
phpbb.toggleDisplay('type_actions', -1);
|
||||
}
|
||||
else
|
||||
{
|
||||
phpbb.toggleDisplay('type_actions', 1);
|
||||
}
|
||||
<!-- ENDIF -->
|
||||
|
||||
<!-- IF not S_ADD_ACTION and S_FORUM_ORIG_CAT and S_HAS_SUBFORUMS -->
|
||||
if (value == {FORUM_LINK})
|
||||
{
|
||||
phpbb.toggleDisplay('cat_to_link_actions', 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
phpbb.toggleDisplay('cat_to_link_actions', -1);
|
||||
}
|
||||
<!-- ENDIF -->
|
||||
|
||||
if (value == {FORUM_POST})
|
||||
{
|
||||
phpbb.toggleDisplay('forum_post_options', 1);
|
||||
phpbb.toggleDisplay('forum_link_options', -1);
|
||||
phpbb.toggleDisplay('forum_rules_options', 1);
|
||||
phpbb.toggleDisplay('forum_cat_options', -1);
|
||||
}
|
||||
else if (value == {FORUM_LINK})
|
||||
{
|
||||
phpbb.toggleDisplay('forum_post_options', -1);
|
||||
phpbb.toggleDisplay('forum_link_options', 1);
|
||||
phpbb.toggleDisplay('forum_rules_options', -1);
|
||||
phpbb.toggleDisplay('forum_cat_options', -1);
|
||||
}
|
||||
else if (value == {FORUM_CAT})
|
||||
{
|
||||
phpbb.toggleDisplay('forum_post_options', -1);
|
||||
phpbb.toggleDisplay('forum_link_options', -1);
|
||||
phpbb.toggleDisplay('forum_rules_options', 1);
|
||||
phpbb.toggleDisplay('forum_cat_options', 1);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Init the wanted display functionality if javascript is enabled.
|
||||
* If javascript is not available, the user is still able to properly administer.
|
||||
*/
|
||||
onload = function()
|
||||
{
|
||||
<!-- IF not S_ADD_ACTION and S_FORUM_ORIG_POST -->
|
||||
<!-- IF S_FORUM_POST -->
|
||||
phpbb.toggleDisplay('type_actions', -1);
|
||||
<!-- ENDIF -->
|
||||
<!-- ENDIF -->
|
||||
|
||||
<!-- IF not S_ADD_ACTION and S_FORUM_ORIG_CAT and S_HAS_SUBFORUMS -->
|
||||
<!-- IF S_FORUM_CAT -->
|
||||
phpbb.toggleDisplay('cat_to_link_actions', -1);
|
||||
<!-- ENDIF -->
|
||||
<!-- ENDIF -->
|
||||
|
||||
<!-- IF not S_FORUM_POST -->
|
||||
phpbb.toggleDisplay('forum_post_options', -1);
|
||||
<!-- ENDIF -->
|
||||
|
||||
<!-- IF not S_FORUM_CAT -->
|
||||
phpbb.toggleDisplay('forum_cat_options', -1);
|
||||
<!-- ENDIF -->
|
||||
|
||||
<!-- IF not S_FORUM_LINK -->
|
||||
phpbb.toggleDisplay('forum_link_options', -1);
|
||||
<!-- ENDIF -->
|
||||
|
||||
<!-- IF S_FORUM_LINK -->
|
||||
phpbb.toggleDisplay('forum_rules_options', -1);
|
||||
<!-- ENDIF -->
|
||||
}
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
<a href="{U_BACK}" style="float: {S_CONTENT_FLOW_END};">« {L_BACK}</a>
|
||||
|
||||
<h1>{L_TITLE} <!-- IF FORUM_NAME -->:: {FORUM_NAME}<!-- ENDIF --></h1>
|
||||
|
||||
<p>{L_FORUM_EDIT_EXPLAIN}</p>
|
||||
|
||||
<!-- IF S_ERROR -->
|
||||
<div class="errorbox">
|
||||
<h3>{L_WARNING}</h3>
|
||||
<p>{ERROR_MSG}</p>
|
||||
</div>
|
||||
<!-- ENDIF -->
|
||||
|
||||
<form id="forumedit" method="post" action="{U_EDIT_ACTION}">
|
||||
|
||||
<fieldset>
|
||||
<legend>{L_FORUM_SETTINGS}</legend>
|
||||
<!-- EVENT acp_forums_main_settings_prepend -->
|
||||
<dl>
|
||||
<dt><label for="forum_type">{L_FORUM_TYPE}{L_COLON}</label></dt>
|
||||
<dd><select id="forum_type" name="forum_type" onchange="display_options(this.options[this.selectedIndex].value);">{S_FORUM_TYPE_OPTIONS}</select></dd>
|
||||
</dl>
|
||||
<!-- IF not S_ADD_ACTION and S_FORUM_ORIG_POST -->
|
||||
<div id="type_actions">
|
||||
<dl>
|
||||
<dt><label for="type_action">{L_DECIDE_MOVE_DELETE_CONTENT}{L_COLON}</label></dt>
|
||||
<dd><label><input type="radio" class="radio" name="type_action" value="delete"<!-- IF not S_MOVE_FORUM_OPTIONS --> checked="checked" id="type_action"<!-- ENDIF --> /> {L_DELETE_ALL_POSTS}</label></dd>
|
||||
<!-- IF S_MOVE_FORUM_OPTIONS --><dd><label><input type="radio" class="radio" name="type_action" id="type_action" value="move" checked="checked" /> {L_MOVE_POSTS_TO}</label> <select name="to_forum_id">{S_MOVE_FORUM_OPTIONS}</select></dd><!-- ENDIF -->
|
||||
</dl>
|
||||
</div>
|
||||
<!-- ENDIF -->
|
||||
<!-- IF not S_ADD_ACTION and S_FORUM_ORIG_CAT and S_HAS_SUBFORUMS -->
|
||||
<div id="cat_to_link_actions">
|
||||
<dl>
|
||||
<dt><label for="action_subforums">{L_DECIDE_MOVE_DELETE_SUBFORUMS}{L_COLON}</label></dt>
|
||||
<!-- IF S_FORUMS_LIST -->
|
||||
<dd><label><input type="radio" class="radio" id="action_subforums" name="action_subforums" value="move" checked="checked" /> {L_MOVE_SUBFORUMS_TO}</label> <select name="subforums_to_id">{S_FORUMS_LIST}</select></dd>
|
||||
<!-- ELSE -->
|
||||
<dd><label><input type="radio" class="radio" id="action_subforums" name="action_subforums" value="delete" checked="checked" /> {L_DELETE_SUBFORUMS}</label></dd>
|
||||
<!-- ENDIF -->
|
||||
</dl>
|
||||
</div>
|
||||
<!-- ENDIF -->
|
||||
<dl>
|
||||
<dt><label for="parent">{L_FORUM_PARENT}{L_COLON}</label></dt>
|
||||
<dd><select id="parent" name="forum_parent_id"><option value="0"<!-- IF not S_FORUM_PARENT_ID --> selected="selected"<!-- ENDIF -->>{L_NO_PARENT}</option>{S_PARENT_OPTIONS}</select></dd>
|
||||
</dl>
|
||||
<!-- IF S_CAN_COPY_PERMISSIONS -->
|
||||
<dl>
|
||||
<dt><label for="forum_perm_from">{L_COPY_PERMISSIONS}{L_COLON}</label><br /><span>{L_COPY_PERMISSIONS_EXPLAIN}</span></dt>
|
||||
<dd><select id="forum_perm_from" name="forum_perm_from"><option value="0">{L_NO_PERMISSIONS}</option>{S_FORUM_OPTIONS}</select></dd>
|
||||
</dl>
|
||||
<!-- ENDIF -->
|
||||
<dl>
|
||||
<dt><label for="forum_name">{L_FORUM_NAME}{L_COLON}</label></dt>
|
||||
<dd><input class="text medium" type="text" id="forum_name" name="forum_name" value="{FORUM_NAME}" maxlength="255" /></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="forum_desc">{L_FORUM_DESC}{L_COLON}</label><br /><span>{L_FORUM_DESC_EXPLAIN}</span></dt>
|
||||
<dd><textarea id="forum_desc" name="forum_desc" rows="5" cols="45" data-bbcode="true">{FORUM_DESC}</textarea></dd>
|
||||
<dd><label><input type="checkbox" class="radio" name="desc_parse_bbcode"<!-- IF S_DESC_BBCODE_CHECKED --> checked="checked"<!-- ENDIF --> /> {L_PARSE_BBCODE}</label>
|
||||
<label><input type="checkbox" class="radio" name="desc_parse_smilies"<!-- IF S_DESC_SMILIES_CHECKED --> checked="checked"<!-- ENDIF --> /> {L_PARSE_SMILIES}</label>
|
||||
<label><input type="checkbox" class="radio" name="desc_parse_urls"<!-- IF S_DESC_URLS_CHECKED --> checked="checked"<!-- ENDIF --> /> {L_PARSE_URLS}</label></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="forum_image">{L_FORUM_IMAGE}{L_COLON}</label><br /><span>{L_FORUM_IMAGE_EXPLAIN}</span></dt>
|
||||
<dd><input class="text medium" type="text" id="forum_image" name="forum_image" value="{FORUM_IMAGE}" maxlength="255" /></dd>
|
||||
<!-- IF FORUM_IMAGE_SRC -->
|
||||
<dd><img src="{FORUM_IMAGE_SRC}" alt="{L_FORUM_IMAGE}" /></dd>
|
||||
<!-- ENDIF -->
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="forum_password">{L_FORUM_PASSWORD}{L_COLON}</label><br /><span>{L_FORUM_PASSWORD_EXPLAIN}</span></dt>
|
||||
<dd><input type="password" id="forum_password" name="forum_password" value="<!-- IF S_FORUM_PASSWORD_SET -->      <!-- ENDIF -->" autocomplete="off" /></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="forum_password_confirm">{L_FORUM_PASSWORD_CONFIRM}{L_COLON}</label><br /><span>{L_FORUM_PASSWORD_CONFIRM_EXPLAIN}</span></dt>
|
||||
<dd><input type="password" id="forum_password_confirm" name="forum_password_confirm" value="<!-- IF S_FORUM_PASSWORD_SET -->      <!-- ENDIF -->" autocomplete="off" /></dd>
|
||||
</dl>
|
||||
<!-- IF S_FORUM_PASSWORD_SET -->
|
||||
<dl>
|
||||
<dt><label for="forum_password_unset">{L_FORUM_PASSWORD_UNSET}{L_COLON}</label><br /><span>{L_FORUM_PASSWORD_UNSET_EXPLAIN}</span></dt>
|
||||
<dd><input id="forum_password_unset" name="forum_password_unset" type="checkbox" /></dd>
|
||||
</dl>
|
||||
<!-- ENDIF -->
|
||||
<dl>
|
||||
<dt><label for="forum_style">{L_FORUM_STYLE}{L_COLON}</label></dt>
|
||||
<dd><select id="forum_style" name="forum_style"><option value="0">{L_DEFAULT_STYLE}</option>{S_STYLES_OPTIONS}</select></dd>
|
||||
</dl>
|
||||
<!-- EVENT acp_forums_main_settings_append -->
|
||||
</fieldset>
|
||||
|
||||
<div id="forum_cat_options">
|
||||
<fieldset>
|
||||
<legend>{L_GENERAL_FORUM_SETTINGS}</legend>
|
||||
<dl>
|
||||
<dt><label for="display_active">{L_DISPLAY_ACTIVE_TOPICS}{L_COLON}</label><br /><span>{L_DISPLAY_ACTIVE_TOPICS_EXPLAIN}</span></dt>
|
||||
<dd><label><input type="radio" class="radio" name="display_active" value="1"<!-- IF S_ENABLE_ACTIVE_TOPICS --> id="display_active" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
|
||||
<label><input type="radio" class="radio" name="display_active" value="0"<!-- IF not S_ENABLE_ACTIVE_TOPICS --> id="display_active" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
|
||||
</dl>
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
<div id="forum_post_options">
|
||||
<fieldset>
|
||||
<legend>{L_GENERAL_FORUM_SETTINGS}</legend>
|
||||
<!-- EVENT acp_forums_normal_settings_prepend -->
|
||||
<dl>
|
||||
<dt><label for="forum_status">{L_FORUM_STATUS}{L_COLON}</label></dt>
|
||||
<dd><select id="forum_status" name="forum_status">{S_STATUS_OPTIONS}</select></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="display_subforum_list">{L_LIST_SUBFORUMS}{L_COLON}</label><br /><span>{L_LIST_SUBFORUMS_EXPLAIN}</span></dt>
|
||||
<dd><label><input type="radio" class="radio" name="display_subforum_list" value="1"<!-- IF S_DISPLAY_SUBFORUM_LIST --> id="display_subforum_list" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
|
||||
<label><input type="radio" class="radio" name="display_subforum_list" value="0"<!-- IF not S_DISPLAY_SUBFORUM_LIST --> id="display_subforum_list" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="display_on_index">{L_LIST_INDEX}{L_COLON}</label><br /><span>{L_LIST_INDEX_EXPLAIN}</span></dt>
|
||||
<dd><label><input type="radio" class="radio" name="display_on_index" value="1"<!-- IF S_DISPLAY_ON_INDEX --> id="display_on_index" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
|
||||
<label><input type="radio" class="radio" name="display_on_index" value="0"<!-- IF not S_DISPLAY_ON_INDEX --> id="display_on_index" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="enable_post_review">{L_ENABLE_POST_REVIEW}{L_COLON}</label><br /><span>{L_ENABLE_POST_REVIEW_EXPLAIN}</span></dt>
|
||||
<dd><label><input type="radio" class="radio" name="enable_post_review" value="1"<!-- IF S_ENABLE_POST_REVIEW --> id="enable_post_review" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
|
||||
<label><input type="radio" class="radio" name="enable_post_review" value="0"<!-- IF not S_ENABLE_POST_REVIEW --> id="enable_post_review" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="enable_quick_reply">{L_ENABLE_QUICK_REPLY}{L_COLON}</label><br /><span>{L_ENABLE_QUICK_REPLY_EXPLAIN}</span></dt>
|
||||
<dd><label><input type="radio" class="radio" name="enable_quick_reply" value="1"<!-- IF S_ENABLE_QUICK_REPLY --> id="enable_quick_reply" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
|
||||
<label><input type="radio" class="radio" name="enable_quick_reply" value="0"<!-- IF not S_ENABLE_QUICK_REPLY --> id="enable_quick_reply" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="enable_indexing">{L_ENABLE_INDEXING}{L_COLON}</label><br /><span>{L_ENABLE_INDEXING_EXPLAIN}</span></dt>
|
||||
<dd><label><input type="radio" class="radio" name="enable_indexing" value="1"<!-- IF S_ENABLE_INDEXING --> id="enable_indexing" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
|
||||
<label><input type="radio" class="radio" name="enable_indexing" value="0"<!-- IF not S_ENABLE_INDEXING --> id="enable_indexing" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="enable_icons">{L_ENABLE_TOPIC_ICONS}{L_COLON}</label></dt>
|
||||
<dd><label><input type="radio" class="radio" name="enable_icons" value="1"<!-- IF S_TOPIC_ICONS --> id="enable_icons" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
|
||||
<label><input type="radio" class="radio" name="enable_icons" value="0"<!-- IF not S_TOPIC_ICONS --> id="enable_icons" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="display_recent">{L_ENABLE_RECENT}{L_COLON}</label><br /><span>{L_ENABLE_RECENT_EXPLAIN}</span></dt>
|
||||
<dd><label><input type="radio" class="radio" name="display_recent" value="1"<!-- IF S_DISPLAY_ACTIVE_TOPICS --> id="display_recent" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
|
||||
<label><input type="radio" class="radio" name="display_recent" value="0"<!-- IF not S_DISPLAY_ACTIVE_TOPICS --> id="display_recent" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="topics_per_page">{L_FORUM_TOPICS_PAGE}{L_COLON}</label><br /><span>{L_FORUM_TOPICS_PAGE_EXPLAIN}</span></dt>
|
||||
<dd><input type="number" id="topics_per_page" name="topics_per_page" value="{TOPICS_PER_PAGE}" size="4" maxlength="4" min="0" max="9999" /></dd>
|
||||
</dl>
|
||||
<!-- EVENT acp_forums_normal_settings_append -->
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
<legend>{L_FORUM_PRUNE_SETTINGS}</legend>
|
||||
<!-- EVENT acp_forums_prune_settings_prepend -->
|
||||
<dl>
|
||||
<dt><label for="enable_prune">{L_FORUM_AUTO_PRUNE}{L_COLON}</label><br /><span>{L_FORUM_AUTO_PRUNE_EXPLAIN}</span></dt>
|
||||
<dd><label><input type="radio" class="radio" name="enable_prune" value="1"<!-- IF S_PRUNE_ENABLE --> id="enable_prune" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
|
||||
<label><input type="radio" class="radio" name="enable_prune" value="0"<!-- IF not S_PRUNE_ENABLE --> id="enable_prune" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="prune_freq">{L_AUTO_PRUNE_FREQ}{L_COLON}</label><br /><span>{L_AUTO_PRUNE_FREQ_EXPLAIN}</span></dt>
|
||||
<dd><input type="number" id="prune_freq" name="prune_freq" value="{PRUNE_FREQ}" maxlength="4" size="4" min="0" max="9999" /> {L_DAYS}</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="prune_days">{L_AUTO_PRUNE_DAYS}{L_COLON}</label><br /><span>{L_AUTO_PRUNE_DAYS_EXPLAIN}</span></dt>
|
||||
<dd><input type="number" id="prune_days" name="prune_days" value="{PRUNE_DAYS}" maxlength="4" size="4" min="0" max="9999" /> {L_DAYS}</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="prune_viewed">{L_AUTO_PRUNE_VIEWED}{L_COLON}</label><br /><span>{L_AUTO_PRUNE_VIEWED_EXPLAIN}</span></dt>
|
||||
<dd><input type="number" id="prune_viewed" name="prune_viewed" value="{PRUNE_VIEWED}" maxlength="4" size="4" min="0" max="9999" /> {L_DAYS}</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="prune_old_polls">{L_PRUNE_OLD_POLLS}{L_COLON}</label><br /><span>{L_PRUNE_OLD_POLLS_EXPLAIN}</span></dt>
|
||||
<dd><label><input type="radio" class="radio" name="prune_old_polls" value="1"<!-- IF S_PRUNE_OLD_POLLS --> id="prune_old_polls" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
|
||||
<label><input type="radio" class="radio" name="prune_old_polls" value="0"<!-- IF not S_PRUNE_OLD_POLLS --> id="prune_old_polls" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="prune_announce">{L_PRUNE_ANNOUNCEMENTS}{L_COLON}</label></dt>
|
||||
<dd><label><input type="radio" class="radio" name="prune_announce" value="1"<!-- IF S_PRUNE_ANNOUNCE --> id="prune_announce" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
|
||||
<label><input type="radio" class="radio" name="prune_announce" value="0"<!-- IF not S_PRUNE_ANNOUNCE --> id="prune_announce" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="prune_sticky">{L_PRUNE_STICKY}{L_COLON}</label></dt>
|
||||
<dd><label><input type="radio" class="radio" name="prune_sticky" value="1"<!-- IF S_PRUNE_STICKY --> id="prune_sticky" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
|
||||
<label><input type="radio" class="radio" name="prune_sticky" value="0"<!-- IF not S_PRUNE_STICKY --> id="prune_sticky" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="enable_shadow_prune">{L_FORUM_PRUNE_SHADOW}{L_COLON}</label><br /><span>{L_FORUM_PRUNE_SHADOW_EXPLAIN}</span></dt>
|
||||
<dd><label><input type="radio" class="radio" name="enable_shadow_prune" value="1"<!-- IF S_PRUNE_SHADOW_ENABLE --> id="enable_shadow_prune" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
|
||||
<label><input type="radio" class="radio" name="enable_shadow_prune" value="0"<!-- IF not S_PRUNE_SHADOW_ENABLE --> id="enable_shadow_prune" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="prune_shadow_freq">{L_AUTO_PRUNE_SHADOW_FREQ}{L_COLON}</label><br /><span>{L_AUTO_PRUNE_SHADOW_FREQ_EXPLAIN}</span></dt>
|
||||
<dd><input type="number" id="prune_shadow_freq" name="prune_shadow_freq" value="{PRUNE_SHADOW_FREQ}" maxlength="4" size="4" min="0" max="9999" /> {L_DAYS}</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="prune_shadow_days">{L_AUTO_PRUNE_SHADOW_DAYS}{L_COLON}</label><br /><span>{L_AUTO_PRUNE_SHADOW_DAYS_EXPLAIN}</span></dt>
|
||||
<dd><input type="number" id="prune_shadow_days" name="prune_shadow_days" value="{PRUNE_SHADOW_DAYS}" maxlength="4" size="4" min="0" max="9999" /> {L_DAYS}</dd>
|
||||
</dl>
|
||||
<!-- EVENT acp_forums_prune_settings_append -->
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
<div id="forum_link_options">
|
||||
<fieldset>
|
||||
<legend>{L_GENERAL_FORUM_SETTINGS}</legend>
|
||||
<dl>
|
||||
<dt><label for="link_display_on_index">{L_LIST_INDEX}{L_COLON}</label><br /><span>{L_LIST_INDEX_EXPLAIN}</span></dt>
|
||||
<dd><label><input type="radio" class="radio" name="link_display_on_index" value="1"<!-- IF S_DISPLAY_ON_INDEX --> id="link_display_on_index" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
|
||||
<label><input type="radio" class="radio" name="link_display_on_index" value="0"<!-- IF not S_DISPLAY_ON_INDEX --> id="link_display_on_index" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="forum_link">{L_FORUM_LINK}{L_COLON}</label><br /><span>{L_FORUM_LINK_EXPLAIN}</span></dt>
|
||||
<dd><input class="text medium" type="text" id="forum_link" name="forum_link" value="{FORUM_DATA_LINK}" maxlength="255" /></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="forum_link_track">{L_FORUM_LINK_TRACK}{L_COLON}</label><br /><span>{L_FORUM_LINK_TRACK_EXPLAIN}</span></dt>
|
||||
<dd><label><input type="radio" class="radio" name="forum_link_track" value="1"<!-- IF S_FORUM_LINK_TRACK --> id="forum_link_track" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
|
||||
<label><input type="radio" class="radio" name="forum_link_track" value="0"<!-- IF not S_FORUM_LINK_TRACK --> id="forum_link_track" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
|
||||
</dl>
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
<div id="forum_rules_options">
|
||||
<fieldset>
|
||||
<legend>{L_FORUM_RULES}</legend>
|
||||
<!-- EVENT acp_forums_rules_settings_prepend -->
|
||||
<dl>
|
||||
<dt><label for="forum_rules_link">{L_FORUM_RULES_LINK}{L_COLON}</label><br /><span>{L_FORUM_RULES_LINK_EXPLAIN}</span></dt>
|
||||
<dd><input class="text medium" type="text" id="forum_rules_link" name="forum_rules_link" value="{FORUM_RULES_LINK}" maxlength="255" /></dd>
|
||||
</dl>
|
||||
<!-- IF FORUM_RULES_PREVIEW -->
|
||||
<dl>
|
||||
<dt><label>{L_FORUM_RULES_PREVIEW}{L_COLON}</label></dt>
|
||||
<dd>{FORUM_RULES_PREVIEW}</dd>
|
||||
</dl>
|
||||
<!-- ENDIF -->
|
||||
<dl>
|
||||
<dt><label for="forum_rules">{L_FORUM_RULES}{L_COLON}</label><br /><span>{L_FORUM_RULES_EXPLAIN}</span></dt>
|
||||
<dd><textarea id="forum_rules" name="forum_rules" rows="4" cols="70" data-bbcode="true">{FORUM_RULES_PLAIN}</textarea></dd>
|
||||
<dd><label><input type="checkbox" class="radio" name="rules_parse_bbcode"<!-- IF S_BBCODE_CHECKED --> checked="checked"<!-- ENDIF --> /> {L_PARSE_BBCODE}</label>
|
||||
<label><input type="checkbox" class="radio" name="rules_parse_smilies"<!-- IF S_SMILIES_CHECKED --> checked="checked"<!-- ENDIF --> /> {L_PARSE_SMILIES}</label>
|
||||
<label><input type="checkbox" class="radio" name="rules_parse_urls"<!-- IF S_URLS_CHECKED --> checked="checked"<!-- ENDIF --> /> {L_PARSE_URLS}</label></dd>
|
||||
</dl>
|
||||
<!-- EVENT acp_forums_rules_settings_append -->
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
<fieldset class="submit-buttons">
|
||||
<legend>{L_SUBMIT}</legend>
|
||||
<input class="button1" type="submit" id="submit" name="update" value="{L_SUBMIT}" />
|
||||
<input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" />
|
||||
{S_FORM_TOKEN}
|
||||
</fieldset>
|
||||
</form>
|
||||
|
||||
<!-- ELSEIF S_DELETE_FORUM -->
|
||||
|
||||
<a href="{U_BACK}" style="float: {S_CONTENT_FLOW_END};">« {L_BACK}</a>
|
||||
|
||||
<h1>{L_FORUM_DELETE}</h1>
|
||||
|
||||
<p>{L_FORUM_DELETE_EXPLAIN}</p>
|
||||
|
||||
<!-- IF S_ERROR -->
|
||||
<div class="errorbox">
|
||||
<h3>{L_WARNING}</h3>
|
||||
<p>{ERROR_MSG}</p>
|
||||
</div>
|
||||
<!-- ENDIF -->
|
||||
|
||||
<form id="acp_forum" method="post" action="{U_ACTION}">
|
||||
|
||||
<fieldset>
|
||||
<legend>{L_FORUM_DELETE}</legend>
|
||||
<dl>
|
||||
<dt><label>{L_FORUM_NAME}{L_COLON}</label></dt>
|
||||
<dd><strong>{FORUM_NAME}</strong></dd>
|
||||
</dl>
|
||||
<!-- IF S_FORUM_POST -->
|
||||
<dl>
|
||||
<dt><label for="delete_action">{L_ACTION}{L_COLON}</label></dt>
|
||||
<dd><label><input type="radio" class="radio" id="delete_action" name="action_posts" value="delete" checked="checked" /> {L_DELETE_ALL_POSTS}</label></dd>
|
||||
<!-- IF S_MOVE_FORUM_OPTIONS -->
|
||||
<dd><label><input type="radio" class="radio" name="action_posts" value="move" /> {L_MOVE_POSTS_TO}</label> <select name="posts_to_id">{S_MOVE_FORUM_OPTIONS}</select></dd>
|
||||
<!-- ENDIF -->
|
||||
</dl>
|
||||
<!-- ENDIF -->
|
||||
<!-- IF S_HAS_SUBFORUMS -->
|
||||
<dl>
|
||||
<dt><label for="sub_delete_action">{L_ACTION}{L_COLON}</label></dt>
|
||||
<dd><label><input type="radio" class="radio" id="sub_delete_action" name="action_subforums" value="delete" checked="checked" /> {L_DELETE_SUBFORUMS}</label></dd>
|
||||
<!-- IF S_FORUMS_LIST -->
|
||||
<dd><label><input type="radio" class="radio" name="action_subforums" value="move" /> {L_MOVE_SUBFORUMS_TO}</label> <select name="subforums_to_id">{S_FORUMS_LIST}</select></dd>
|
||||
<!-- ENDIF -->
|
||||
</dl>
|
||||
<!-- ENDIF -->
|
||||
|
||||
<p class="quick">
|
||||
<input class="button1" type="submit" name="update" value="{L_SUBMIT}" />
|
||||
</p>
|
||||
{S_FORM_TOKEN}
|
||||
</fieldset>
|
||||
</form>
|
||||
|
||||
<!-- ELSEIF S_CONTINUE_SYNC -->
|
||||
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
var close_waitscreen = 0;
|
||||
// no scrollbars...
|
||||
popup('{UA_PROGRESS_BAR}', 400, 240, '_sync');
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
<h1>{L_FORUM_ADMIN}</h1>
|
||||
|
||||
<p>{L_FORUM_ADMIN_EXPLAIN}</p>
|
||||
|
||||
<p>{L_PROGRESS_EXPLAIN}</p>
|
||||
|
||||
<!-- ELSE -->
|
||||
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
/**
|
||||
* Popup search progress bar
|
||||
*/
|
||||
function popup_progress_bar()
|
||||
{
|
||||
var close_waitscreen = 0;
|
||||
// no scrollbars...
|
||||
popup('{UA_PROGRESS_BAR}', 400, 240, '_sync');
|
||||
}
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
<h1>{L_FORUM_ADMIN}</h1>
|
||||
|
||||
<p>{L_FORUM_ADMIN_EXPLAIN}</p>
|
||||
|
||||
<!-- IF ERROR_MSG -->
|
||||
<div class="errorbox">
|
||||
<h3>{L_WARNING}</h3>
|
||||
<p>{ERROR_MSG}</p>
|
||||
</div>
|
||||
<!-- ENDIF -->
|
||||
|
||||
<!-- IF S_RESYNCED -->
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
var close_waitscreen = 1;
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
<div class="successbox">
|
||||
<h3>{L_NOTIFY}</h3>
|
||||
<p>{L_FORUM_RESYNCED}</p>
|
||||
</div>
|
||||
<!-- ENDIF -->
|
||||
|
||||
<p><strong>{NAVIGATION}<!-- IF S_NO_FORUMS --> [<a href="{U_EDIT}">{L_EDIT}</a> | <a href="{U_DELETE}">{L_DELETE}</a><!-- IF not S_LINK --> | <a href="{U_SYNC}">{L_RESYNC}</a><!-- ENDIF -->]<!-- ENDIF --></strong></p>
|
||||
|
||||
<!-- IF .forums -->
|
||||
<table class="table1 forums">
|
||||
<col class="row1" /><col class="row1" /><col class="row2" />
|
||||
<tbody>
|
||||
<!-- BEGIN forums -->
|
||||
<tr>
|
||||
<td class="folder">{forums.FOLDER_IMAGE}</td>
|
||||
<td class="forum-desc">
|
||||
<!-- IF forums.FORUM_IMAGE --><div style="float: {S_CONTENT_FLOW_BEGIN}; margin-right: 5px;">{forums.FORUM_IMAGE}</div><!-- ENDIF -->
|
||||
<strong><!-- IF forums.S_FORUM_LINK -->{forums.FORUM_NAME}<!-- ELSE --><a href="{forums.U_FORUM}">{forums.FORUM_NAME}</a><!-- ENDIF --></strong>
|
||||
<!-- IF forums.FORUM_DESCRIPTION --><br /><span>{forums.FORUM_DESCRIPTION}</span><!-- ENDIF -->
|
||||
<!-- IF forums.S_FORUM_POST --><br /><br /><span>{L_TOPICS}{L_COLON} <strong>{forums.FORUM_TOPICS}</strong> / {L_POSTS}{L_COLON} <strong>{forums.FORUM_POSTS}</strong></span><!-- ENDIF -->
|
||||
</td>
|
||||
<td class="actions">
|
||||
<span class="up-disabled" style="display:none;">{ICON_MOVE_UP_DISABLED}</span>
|
||||
<span class="up"><a href="{forums.U_MOVE_UP}" data-ajax="row_up">{ICON_MOVE_UP}</a></span>
|
||||
<span class="down-disabled" style="display:none;">{ICON_MOVE_DOWN_DISABLED}</span>
|
||||
<span class="down"><a href="{forums.U_MOVE_DOWN}" data-ajax="row_down">{ICON_MOVE_DOWN}</a></span>
|
||||
<a href="{forums.U_EDIT}">{ICON_EDIT}</a>
|
||||
<!-- IF not forums.S_FORUM_LINK -->
|
||||
<a href="{forums.U_SYNC}" onclick="popup_progress_bar();">{ICON_SYNC}</a>
|
||||
<!-- ELSE -->
|
||||
{ICON_SYNC_DISABLED}
|
||||
<!-- ENDIF -->
|
||||
<a href="{forums.U_DELETE}">{ICON_DELETE}</a>
|
||||
</td>
|
||||
</tr>
|
||||
<!-- END forums -->
|
||||
</tbody>
|
||||
</table>
|
||||
<!-- ENDIF -->
|
||||
|
||||
<form id="fselect" method="post" action="{U_SEL_ACTION}">
|
||||
|
||||
<fieldset class="quick">
|
||||
{L_SELECT_FORUM}{L_COLON} <select name="parent_id" onchange="if(this.options[this.selectedIndex].value != -1){ this.form.submit(); }">{FORUM_BOX}</select>
|
||||
|
||||
<input class="button2" type="submit" value="{L_GO}" />
|
||||
{S_FORM_TOKEN}
|
||||
</fieldset>
|
||||
</form>
|
||||
|
||||
<form id="forums" method="post" action="{U_ACTION}">
|
||||
|
||||
<fieldset class="quick">
|
||||
<input type="hidden" name="action" value="add" />
|
||||
|
||||
<input type="text" name="forum_name" value="" maxlength="255" />
|
||||
<input class="button2" name="addforum" type="submit" value="{L_CREATE_FORUM}" />
|
||||
{S_FORM_TOKEN}
|
||||
</fieldset>
|
||||
</form>
|
||||
|
||||
<!-- ENDIF -->
|
||||
|
||||
<!-- INCLUDE overall_footer.html -->
|
@@ -1,22 +0,0 @@
|
||||
<!-- INCLUDE overall_header.html -->
|
||||
|
||||
<h1>{L_COPY_PERMISSIONS}</h1>
|
||||
|
||||
<p>{L_COPY_PERMISSIONS_EXPLAIN}</p>
|
||||
<p>{L_ACL_LINK}</p>
|
||||
|
||||
<form id="confirm" method="post" action="{S_COPY_ACTION}">
|
||||
|
||||
<fieldset>
|
||||
<dl>
|
||||
<dt><label for="forum_perm_from">{L_COPY_PERMISSIONS}{L_COLON}</label><br /><span>{L_COPY_PERMISSIONS_EXPLAIN}</span></dt>
|
||||
<dd><select id="forum_perm_from" name="forum_perm_from"><option value="0">{L_NO_PERMISSIONS}</option>{S_FORUM_OPTIONS}</select></dd>
|
||||
</dl>
|
||||
<div style="text-align: center;">{S_FORM_TOKEN}{S_HIDDEN_FIELDS}
|
||||
<input type="submit" name="update" value="{L_CONTINUE}" class="button2" />
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
</form>
|
||||
|
||||
<!-- INCLUDE overall_footer.html -->
|