🚧 This instance is under construction; expect occasional downtime. Runners available in /repos. Questions? Ask in #wikimedia-gitlab on libera.chat, or under GitLab on Phabricator.

Commit 9e69b31b authored by Kosta Harlan's avatar Kosta Harlan
Browse files

Initial commit

parents
root = true
[*]
indent_style = tab
indent_size = tab
tab_width = 4
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
# Ensure text editors don't turn leading spaces into tabs,
# e.g. in multi-line bullet list items
[*.md]
indent_style = space
indent_size = 2
# Tabs may not be valid YAML
# @see https://yaml.org/spec/1.2/spec.html#id2777534
[*.{yml,yaml}]
indent_style = space
indent_size = 2
.DS_Store
.idea
*.log
tmp/
vendor
articles
<?xml version="1.0"?>
<ruleset name="MediaWiki">
<rule ref="./vendor/mediawiki/mediawiki-codesniffer/MediaWiki">
<exclude name="Generic.ControlStructures.InlineControlStructure" />
<exclude name="MediaWiki.Commenting.FunctionComment.MissingDocumentationPrivate" />
<exclude name="MediaWiki.Commenting.FunctionComment.MissingDocumentationProtected" />
<exclude name="MediaWiki.Commenting.FunctionComment.MissingDocumentationPublic" />
<exclude name="MediaWiki.Commenting.FunctionComment.WrongStyle" />
<exclude name="MediaWiki.Commenting.PropertyDocumentation.MissingDocumentationPrivate" />
<exclude name="MediaWiki.Commenting.PropertyDocumentation.MissingDocumentationProtected" />
<exclude name="MediaWiki.Commenting.PropertyDocumentation.MissingDocumentationPublic" />
<exclude name="MediaWiki.Commenting.PropertyDocumentation.MissingVar" />
<exclude name="MediaWiki.Commenting.PropertyDocumentation.SpacingAfter" />
<exclude name="MediaWiki.Commenting.PropertyDocumentation.WrongStyle" />
<exclude name="MediaWiki.ControlStructures.AssignmentInControlStructures.AssignmentInControlStructures" />
<exclude name="MediaWiki.NamingConventions.LowerCamelFunctionsName.FunctionName" />
<exclude name="MediaWiki.PHPUnit.AssertCount.NotUsed" />
<exclude name="MediaWiki.Usage.DbrQueryUsage.DbrQueryFound" />
<exclude name="MediaWiki.Usage.DeprecatedGlobalVariables.Deprecated$wgTitle" />
<exclude name="MediaWiki.Usage.DeprecatedGlobalVariables.Deprecated$wgUser" />
<exclude name="MediaWiki.Usage.DeprecatedGlobalVariables.Deprecated$wgVersion" />
<exclude name="MediaWiki.Usage.ExtendClassUsage.FunctionConfigUsage" />
<exclude name="MediaWiki.Usage.ExtendClassUsage.FunctionVarUsage" />
<exclude name="MediaWiki.Usage.ForbiddenFunctions.is_resource" />
<exclude name="MediaWiki.Usage.ForbiddenFunctions.passthru" />
<exclude name="MediaWiki.Usage.SuperGlobalsUsage.SuperGlobals" />
<exclude name="MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.NewLineComment" />
<exclude name="PSR2.Classes.PropertyDeclaration.Multiple" />
</rule>
<rule ref="MediaWiki.NamingConventions.PrefixedGlobalFunctions">
<properties>
<!--
includes/GlobalFunctions.php
* mimeTypeMatch
maintenance/language/transstat.php
* showUsage
maintenance/mcc.php
* mccGetHelp
* mccShowUsage
maintenance/storage/moveToExternal.php
* moveToExternal
maintenance/storage/resolveStubs.php
* resolveStub
* resolveStubs
tests/phpunit/includes/HooksTest.php
* NothingFunction
* NothingFunctionData
tests/qunit/data/styleTest.css.php
* cssfilter
-->
<property name="ignoreList" type="array" value="cssfilter,mccGetHelp,mccShowUsage,mimeTypeMatch,moveToExternal,NothingFunction,NothingFunctionData,resolveStub,resolveStubs,showUsage" />
</properties>
</rule>
<rule ref="MediaWiki.NamingConventions.ValidGlobalName">
<properties>
<property name="ignoreList" type="array" value="$IP" />
</properties>
</rule>
<rule ref="MediaWiki.NamingConventions.ValidGlobalName.allowedPrefix">
<exclude-pattern>*/maintenance/doMaintenance\.php</exclude-pattern>
<exclude-pattern>*/maintenance/mergeMessageFileList\.php</exclude-pattern>
<exclude-pattern>*/maintenance/CommandLineInc\.php</exclude-pattern>
<exclude-pattern>*/tests/phpunit/MediaWikiIntegrationTestCase\.php</exclude-pattern>
</rule>
<rule ref="Generic.Classes.DuplicateClassName.Found">
<exclude-pattern>*/includes/libs/rdbms/dbal/MWPostgreSqlPlatformCompat\.php</exclude-pattern>
</rule>
<rule ref="Generic.Files.LineLength">
<exclude-pattern>*/languages/messages/*</exclude-pattern>
</rule>
<rule ref="MediaWiki.Files.ClassMatchesFilename.NotMatch">
<!--
Continue to allow existing violations, but enable the sniff to prevent
any new occurrences.
-->
<exclude-pattern>*/includes/specials/SpecialMostimages\.php</exclude-pattern>
<exclude-pattern>*/includes/specials/SpecialMovepage\.php</exclude-pattern>
<exclude-pattern>*/includes/specials/SpecialRandompage\.php</exclude-pattern>
<exclude-pattern>*/includes/specials/SpecialUserrights\.php</exclude-pattern>
<exclude-pattern>*/includes/specials/SpecialWantedfiles\.php</exclude-pattern>
<exclude-pattern>*/includes/specials/SpecialWantedpages\.php</exclude-pattern>
<exclude-pattern>*/maintenance/benchmarks/bench_HTTP_HTTPS\.php</exclude-pattern>
<exclude-pattern>*/maintenance/benchmarks/bench_Wikimedia_base_convert\.php</exclude-pattern>
<exclude-pattern>*/maintenance/benchmarks/bench_delete_truncate\.php</exclude-pattern>
<exclude-pattern>*/maintenance/benchmarks/bench_if_switch\.php</exclude-pattern>
<exclude-pattern>*/maintenance/benchmarks/bench_utf8_title_check\.php</exclude-pattern>
<exclude-pattern>*/maintenance/cleanupTitles\.php</exclude-pattern>
<exclude-pattern>*/maintenance/edit\.php</exclude-pattern>
<exclude-pattern>*/maintenance/findDeprecated\.php</exclude-pattern>
<exclude-pattern>*/maintenance/getText\.php</exclude-pattern>
<exclude-pattern>*/maintenance/importDump\.php</exclude-pattern>
<exclude-pattern>*/maintenance/install\.php</exclude-pattern>
<exclude-pattern>*/maintenance/invalidateUserSessions\.php</exclude-pattern>
<exclude-pattern>*/maintenance/jsparse\.php</exclude-pattern>
<exclude-pattern>*/maintenance/lag\.php</exclude-pattern>
<exclude-pattern>*/maintenance/language/StatOutputs\.php</exclude-pattern>
<exclude-pattern>*/maintenance/language/date-formats\.php</exclude-pattern>
<exclude-pattern>*/maintenance/mysql\.php</exclude-pattern>
<exclude-pattern>*/maintenance/parse\.php</exclude-pattern>
<exclude-pattern>*/maintenance/preprocessorFuzzTest\.php</exclude-pattern>
<exclude-pattern>*/maintenance/rebuildImages\.php</exclude-pattern>
<exclude-pattern>*/maintenance/renderDump\.php</exclude-pattern>
<exclude-pattern>*/maintenance/shell\.php</exclude-pattern>
<exclude-pattern>*/maintenance/sql\.php</exclude-pattern>
<exclude-pattern>*/maintenance/term/MWTerm\.php</exclude-pattern>
<exclude-pattern>*/maintenance/update\.php</exclude-pattern>
<exclude-pattern>*/maintenance/userOptions\.php</exclude-pattern>
<exclude-pattern>*/maintenance/view\.php</exclude-pattern>
<!-- Language converters use the pattern of 2 classes in one file -->
<exclude-pattern>*/languages/*</exclude-pattern>
<!-- Skip violations in some tests for now -->
<exclude-pattern>*/tests/parser/*</exclude-pattern>
<exclude-pattern>*/tests/phpunit/maintenance/*</exclude-pattern>
<exclude-pattern>*/tests/phpunit/bootstrap\.php</exclude-pattern>
<exclude-pattern>*/tests/phpunit/phpunit\.php</exclude-pattern>
</rule>
<rule ref="MediaWiki.Files.ClassMatchesFilename.WrongCase">
<!--
Continue to allow existing violations, but enable the sniff to prevent
any new occurrences.
-->
<exclude-pattern>*/maintenance/language/alltrans\.php</exclude-pattern>
<exclude-pattern>*/maintenance/language/digit2html\.php</exclude-pattern>
<exclude-pattern>*/maintenance/language/langmemusage\.php</exclude-pattern>
<exclude-pattern>*/maintenance/mctest\.php</exclude-pattern>
<exclude-pattern>*/maintenance/mergeMessageFileList\.php</exclude-pattern>
<exclude-pattern>*/maintenance/mwdocgen\.php</exclude-pattern>
<exclude-pattern>*/maintenance/rebuildall\.php</exclude-pattern>
<exclude-pattern>*/maintenance/rebuildmessages\.php</exclude-pattern>
<exclude-pattern>*/maintenance/rebuildrecentchanges\.php</exclude-pattern>
<exclude-pattern>*/maintenance/rebuildtextindex\.php</exclude-pattern>
<exclude-pattern>*/maintenance/storage/checkStorage\.php</exclude-pattern>
<exclude-pattern>*/maintenance/storage/recompressTracked\.php</exclude-pattern>
<exclude-pattern>*/maintenance/storage/trackBlobs\.php</exclude-pattern>
<!-- Skip violations in some tests for now -->
<exclude-pattern>*/tests/phpunit/unit/includes/GlobalFunctions/*</exclude-pattern>
<exclude-pattern>*/tests/phpunit/includes/GlobalFunctions/*</exclude-pattern>
<exclude-pattern>*/tests/phpunit/maintenance/*</exclude-pattern>
<exclude-pattern>*/tests/phpunit/integration/includes/GlobalFunctions/*</exclude-pattern>
</rule>
<rule ref="Generic.PHP.NoSilencedErrors.Discouraged">
<!--
Our normal policy of using Wikimedia\AtEase does not always make sense tests.
AtEase cannot be cleanly used in tests that also use expectException() as
the restoreWarnings() call would never be reached:
$this->expectException( PasswordError::class );
AtEase::suppressWarnings();
$password->crypt( 'whatever' );
AtEase::restoreWarnings();
The above will stop at crypt(), as expected, and leave AtEase in a dirty
state for unrelated tests.
TODO: Stop using PHPUnit TestCase directly. Require with a structure test
or with a high-level check in our run() hook, that all test cases use either
MediaWikiUnitTestCase or MediaWikiIntegrationTestCase. Otherwise the check
in MediaWikiTestCaseTrait can still be bypassed and cause a random failures.
-->
<exclude-pattern>*/tests/*</exclude-pattern>
</rule>
<rule ref="Generic.Files.OneObjectStructurePerFile.MultipleFound">
<!--
Continue to allow existing violations, but enable the sniff to prevent
any new occurrences.
-->
<exclude-pattern>*/includes/libs/rdbms/dbal/MWPostgreSqlPlatformCompat\.php</exclude-pattern>
<exclude-pattern>*/maintenance/dumpIterator\.php</exclude-pattern>
<exclude-pattern>*/maintenance/findDeprecated\.php</exclude-pattern>
<exclude-pattern>*/maintenance/storage/recompressTracked\.php</exclude-pattern>
<exclude-pattern>*/maintenance/preprocessorFuzzTest\.php</exclude-pattern>
<exclude-pattern>*/maintenance/language/StatOutputs\.php</exclude-pattern>
<exclude-pattern>*/maintenance/language/generateCollationData\.php</exclude-pattern>
<exclude-pattern>*/maintenance/term/MWTerm\.php</exclude-pattern>
<!-- Language converters use the pattern of 2 classes in one file -->
<exclude-pattern>*/languages/*</exclude-pattern>
<!-- We don't care that much about violations in tests -->
<exclude-pattern>*/tests/*</exclude-pattern>
</rule>
<rule ref="PSR2.Methods.MethodDeclaration.Underscore">
<exclude-pattern>*/includes/StubObject\.php</exclude-pattern>
<exclude-pattern>*/includes/StubUserLang\.php</exclude-pattern>
</rule>
<rule ref="MediaWiki.Usage.AssignmentInReturn.AssignmentInReturn">
<exclude-pattern>*/tests/phpunit/*</exclude-pattern>
</rule>
<rule ref="MediaWiki.Usage.ForbiddenFunctions.escapeshellarg">
<!--
Continue to allow existing violations, but enable the sniff to prevent
any new occurrences.
-->
<exclude-pattern>*/includes/libs/filebackend/FSFileBackend\.php</exclude-pattern>
<exclude-pattern>*/includes/shell/Command\.php</exclude-pattern>
<exclude-pattern>*/includes/shell/Shell\.php</exclude-pattern>
</rule>
<rule ref="MediaWiki.Usage.ForbiddenFunctions.popen">
<!--
Continue to allow existing violations, but enable the sniff to prevent
any new occurrences.
-->
<exclude-pattern>*/includes/GlobalFunctions\.php</exclude-pattern>
<exclude-pattern>*/includes/libs/filebackend/FSFileBackend\.php</exclude-pattern>
<exclude-pattern>*/maintenance/includes/SevenZipStream\.php</exclude-pattern>
<exclude-pattern>*/maintenance/populateImageSha1\.php</exclude-pattern>
</rule>
<rule ref="MediaWiki.Usage.ForbiddenFunctions.proc_open">
<!--
Continue to allow existing violations, but enable the sniff to prevent
any new occurrences.
-->
<exclude-pattern>*/includes/export/DumpPipeOutput\.php</exclude-pattern>
<exclude-pattern>*/includes/resourceloader/ResourceLoaderImage\.php</exclude-pattern>
<exclude-pattern>*/includes/shell/Command\.php</exclude-pattern>
<exclude-pattern>*/maintenance/includes/TextPassDumper\.php</exclude-pattern>
<exclude-pattern>*/maintenance/mysql\.php</exclude-pattern>
<exclude-pattern>*/maintenance/storage/recompressTracked\.php</exclude-pattern>
<exclude-pattern>*/tests/parser/editTests\.php</exclude-pattern>
</rule>
<rule ref="MediaWiki.Usage.ForbiddenFunctions.shell_exec">
<!--
Continue to allow existing violations, but enable the sniff to prevent
any new occurrences.
-->
<exclude-pattern>*/maintenance/mwdocgen\.php</exclude-pattern>
<exclude-pattern>*/maintenance/updateCredits\.php</exclude-pattern>
</rule>
<rule ref="MediaWiki.Usage.ForbiddenFunctions.system">
<!--
Continue to allow existing violations, but enable the sniff to prevent
any new occurrences.
-->
<exclude-pattern>*/maintenance/mwdocgen\.php</exclude-pattern>
</rule>
<rule ref="MediaWiki.Commenting.MissingCovers.MissingCovers">
<exclude-pattern>*/tests/phpunit/structure/*</exclude-pattern>
</rule>
<rule ref="Generic.Arrays.DisallowShortArraySyntax">
<!--
T273340: Rule not to be enabled on any other file.
PHPVersionCheck.php requires syntax to be old PHP compatible.
The rest should therefore use [] rather than array() as per the
MediaWiki style guide.
-->
<include-pattern>includes/PHPVersionCheck\.php</include-pattern>
</rule>
<file>.</file>
<arg name="encoding" value="UTF-8"/>
<arg name="extensions" value="php"/>
<exclude-pattern type="relative">^(extensions|skins)/*</exclude-pattern>
<exclude-pattern>LocalSettings(-installer)?\.php</exclude-pattern>
</ruleset>
# WikiPHPedia
The cool new editor for Wikipedia!
## Setup
```
composer install
php seedContent.php
php -S localhost:8080
```
{
"_readme": [
"This file locks the dependencies of your project to a known state",
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "6e5ffcd7b4995524ab29910eccdb801a",
"packages": [
{
"name": "composer/semver",
"version": "3.2.5",
"source": {
"type": "git",
"url": "https://github.com/composer/semver.git",
"reference": "31f3ea725711245195f62e54ffa402d8ef2fdba9"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/composer/semver/zipball/31f3ea725711245195f62e54ffa402d8ef2fdba9",
"reference": "31f3ea725711245195f62e54ffa402d8ef2fdba9",
"shasum": ""
},
"require": {
"php": "^5.3.2 || ^7.0 || ^8.0"
},
"require-dev": {
"phpstan/phpstan": "^0.12.54",
"symfony/phpunit-bridge": "^4.2 || ^5"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "3.x-dev"
}
},
"autoload": {
"psr-4": {
"Composer\\Semver\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Nils Adermann",
"email": "naderman@naderman.de",
"homepage": "http://www.naderman.de"
},
{
"name": "Jordi Boggiano",
"email": "j.boggiano@seld.be",
"homepage": "http://seld.be"
},
{
"name": "Rob Bast",
"email": "rob.bast@gmail.com",
"homepage": "http://robbast.nl"
}
],
"description": "Semver library that offers utilities, version constraint parsing and validation.",
"keywords": [
"semantic",
"semver",
"validation",
"versioning"
],
"funding": [
{
"url": "https://packagist.com",
"type": "custom"
},
{
"url": "https://github.com/composer",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/composer/composer",
"type": "tidelift"
}
],
"time": "2021-05-24T12:41:47+00:00"
},
{
"name": "composer/spdx-licenses",
"version": "1.5.5",
"source": {
"type": "git",
"url": "https://github.com/composer/spdx-licenses.git",
"reference": "de30328a7af8680efdc03e396aad24befd513200"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/composer/spdx-licenses/zipball/de30328a7af8680efdc03e396aad24befd513200",
"reference": "de30328a7af8680efdc03e396aad24befd513200",
"shasum": ""
},
"require": {
"php": "^5.3.2 || ^7.0 || ^8.0"
},
"require-dev": {
"phpunit/phpunit": "^4.8.35 || ^5.7 || 6.5 - 7"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "1.x-dev"
}
},
"autoload": {
"psr-4": {
"Composer\\Spdx\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Nils Adermann",
"email": "naderman@naderman.de",
"homepage": "http://www.naderman.de"
},
{
"name": "Jordi Boggiano",
"email": "j.boggiano@seld.be",
"homepage": "http://seld.be"
},
{
"name": "Rob Bast",
"email": "rob.bast@gmail.com",
"homepage": "http://robbast.nl"
}
],
"description": "SPDX licenses list and validation library.",
"keywords": [
"license",
"spdx",
"validator"
],
"funding": [
{
"url": "https://packagist.com",
"type": "custom"
},
{
"url": "https://github.com/composer",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/composer/composer",
"type": "tidelift"
}
],
"time": "2020-12-03T16:04:16+00:00"
},
{
"name": "joshtronic/php-loremipsum",
"version": "1.0.6",
"source": {
"type": "git",
"url": "https://github.com/joshtronic/php-loremipsum.git",
"reference": "f0ec43a045b9bfa5e68cac01805e6312a9e9c7e6"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/joshtronic/php-loremipsum/zipball/f0ec43a045b9bfa5e68cac01805e6312a9e9c7e6",
"reference": "f0ec43a045b9bfa5e68cac01805e6312a9e9c7e6",
"shasum": ""
},
"require": {
"php": ">=5.3"
},
"require-dev": {
"phpunit/phpunit": ">=4"
},
"type": "library",
"autoload": {
"psr-4": {
"joshtronic\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Josh Sherman",
"email": "hello@joshtronic.com",
"homepage": "https://joshtronic.com"
}
],
"description": "Lorem ipsum generator in PHP without dependencies",
"homepage": "https://github.com/joshtronic/php-loremipsum",
"keywords": [
"generator",
"ipsum",
"lorem"
],
"time": "2020-06-02T03:25:24+00:00"
},
{
"name": "mediawiki/mediawiki-codesniffer",
"version": "v36.0.0",
"source": {
"type": "git",
"url": "https://github.com/wikimedia/mediawiki-tools-codesniffer.git",
"reference": "f770c6f60de6ee97048cc24298322842c1a7da42"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/wikimedia/mediawiki-tools-codesniffer/zipball/f770c6f60de6ee97048cc24298322842c1a7da42",
"reference": "f770c6f60de6ee97048cc24298322842c1a7da42",
"shasum": ""
},
"require": {
"composer/semver": "^1.7.2|^3.2.4",
"composer/spdx-licenses": "~1.5.2",
"ext-mbstring": "*",
"php": ">=7.2.0",
"squizlabs/php_codesniffer": "3.6.0"
},
"require-dev": {
"mediawiki/mediawiki-phan-config": "0.10.6",
"mediawiki/minus-x": "1.1.1",
"php-parallel-lint/php-console-highlighter": "0.5.0",
"php-parallel-lint/php-parallel-lint": "1.2.0",
"phpunit/phpunit": "^8.5"
},
"type": "phpcodesniffer-standard",
"autoload": {
"psr-4": {
"MediaWiki\\Sniffs\\": "MediaWiki/Sniffs/",
"MediaWiki\\Sniffs\\Tests\\": "MediaWiki/Tests/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"GPL-2.0-or-later"
],
"description": "MediaWiki CodeSniffer Standards",
"homepage": "https://www.mediawiki.org/wiki/Manual:Coding_conventions/PHP",
"keywords": [
"codesniffer",
"mediawiki"
],
"time": "2021-04-29T02:21:21+00:00"
},
{
"name": "squizlabs/php_codesniffer",
"version": "3.6.0",
"source": {
"type": "git",
"url": "https://github.com/squizlabs/PHP_CodeSniffer.git",
"reference": "ffced0d2c8fa8e6cdc4d695a743271fab6c38625"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/ffced0d2c8fa8e6cdc4d695a743271fab6c38625",
"reference": "ffced0d2c8fa8e6cdc4d695a743271fab6c38625",
"shasum": ""
},
"require": {
"ext-simplexml": "*",
"ext-tokenizer": "*",
"ext-xmlwriter": "*",
"php": ">=5.4.0"
},
"require-dev": {
"phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0"
},
"bin": [
"bin/phpcs",
"bin/phpcbf"
],
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.x-dev"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Greg Sherwood",
"role": "lead"
}
],
"description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.",
"homepage": "https://github.com/squizlabs/PHP_CodeSniffer",
"keywords": [
"phpcs",
"standards"
],
"time": "2021-04-09T00:54:41+00:00"
}
],
"packages-dev": [],
"aliases": [],
"minimum-stability": "stable",
"stability-flags": [],
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
"platform-dev": [],
"plugin-api-version": "1.1.0"
}
<?php
require_once 'vendor/autoload.php';
global $baseArticlePath;
$baseArticlePath = 'articles/';
<?php
global $baseArticlePath;
$baseArticlePath = 'articles/';
echo "<head>
<link rel='stylesheet' href='http://design.wikimedia.org/style-guide/css/build/wmui-style-guide.min.css'>
<link rel='stylesheet' href='main.css'>
<script src='http://code.jquery.com/jquery-3.6.0.min.js'></script>
<script src='main.js'></script>
</head>";
$title = '';
$body = '';
if (isset( $_GET['title'] ) ) {
$title = $_GET['title'];
$body = file_get_contents( sprintf('%s/%s', $baseArticlePath, $title ) );
}
$wordCount = getWordCount();
echo "<body>";
echo "<header id=header class=header><div class='content-box'><a href='/'><h1 class='site__title'>WikiPHPedia</h1></a><div>$wordCount</div></div></header>";
echo "<div class=page>";