Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking β€œSign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pico 2.0 #334

Merged
merged 201 commits into from
Jul 1, 2018
Merged
Changes from 1 commit
Commits
Show all changes
201 commits
Select commit Hold shift + click to select a range
56b2ed6
Allow manual plugin loading
PhrozenByte Feb 29, 2016
5a9c02f
Allow plugins to trigger events
PhrozenByte Feb 29, 2016
a8f0fd1
Merge branch 'master' into pico-1.1
PhrozenByte Feb 29, 2016
86614a3
Default theme: Use flexbox to grow content div
PhrozenByte Mar 2, 2016
a3fa373
Default theme: Move elements into Twig blocks
PhrozenByte Mar 2, 2016
1709b92
Add AbstractPicoPlugin::getPluginConfig() method
PhrozenByte Mar 2, 2016
2a3e2fa
Fix typos in class docs/exception messages
PhrozenByte Mar 2, 2016
0d40259
Merge branch 'master' into pico-1.1
PhrozenByte Mar 2, 2016
43705d0
Minor code refactoring
PhrozenByte Mar 5, 2016
479926e
Add Pico::VERSION constant
PhrozenByte Mar 5, 2016
245cd15
Refactor Pico::prepareFileContent() for better performance
PhrozenByte Mar 5, 2016
5bb1c32
Add onSinglePageLoading event; allow skipping pages in onSinglePageLo…
PhrozenByte Mar 5, 2016
75d5081
Use scope isolated includes for plugins & config
PhrozenByte Mar 6, 2016
cd74b68
Fix scope isolated config includes
PhrozenByte Mar 6, 2016
988a23f
Modular config: Load config from any config/*.config.php
PhrozenByte Mar 6, 2016
dc621b2
Improve class docs of Pico::loadConfig()
PhrozenByte Mar 6, 2016
3d11b8a
Replace is_a() function calls with instanceof operator
PhrozenByte Mar 11, 2016
d56d3f8
Revert "Default theme: Move elements into Twig blocks"
PhrozenByte Mar 11, 2016
b133f6d
Add Pico::VERSION_ID (like PHP_VERSION_ID)
PhrozenByte Apr 22, 2016
a119122
Fix coding standard violation
PhrozenByte Apr 22, 2016
1b3ef75
Drop the "index" part of URLs
PhrozenByte Apr 23, 2016
d19621a
Improve themes dir guessing; add $config['theme_url'] config
PhrozenByte Apr 23, 2016
6465c2b
Support REQUEST_URI routing method
PhrozenByte Apr 24, 2016
0e8cd08
Merge branch 'master' into pico-1.1
PhrozenByte Apr 24, 2016
6c4f69c
Update inline user docs to reflect 6465c2b0a99b5262f25083af70b94668c1…
PhrozenByte Apr 24, 2016
e010443
Build system: Use dynamic phpDoc title
PhrozenByte Apr 24, 2016
0f8deda
Update .htaccess
PhrozenByte Apr 27, 2016
eeb43e1
Pico::prepareFileContent(): Declare $variables variable
PhrozenByte May 6, 2016
ddf3da0
Merge branch 'master' into pico-1.1
PhrozenByte Jun 18, 2016
f251bc8
Update composer.json: Use Symfony YAML 3.1 and later
PhrozenByte Jun 20, 2016
81dddc9
Revert "Update composer.json: Use Symfony YAML 3.1 and later"
PhrozenByte Jun 20, 2016
848e28b
Declare Pico::getFiles() public
PhrozenByte Jul 13, 2016
aa1bc07
Add $dropIndex parameter to Pico::getPageUrl() method
PhrozenByte Jul 13, 2016
e27be7a
Merge branch 'master' into pico-1.1
PhrozenByte Jul 15, 2016
21bd18b
Replace Pico::discoverRequestFile() with public Pico::resolveFilePath()
PhrozenByte Jul 20, 2016
6a13915
Refactor default theme
PhrozenByte Aug 2, 2016
432710c
Default theme: Improve compatibility with older browsers
PhrozenByte Aug 2, 2016
518d9b5
Default theme: Fix rem unit
PhrozenByte Aug 2, 2016
d143105
Default theme (JavaScript): Fix coding standard
PhrozenByte Aug 2, 2016
eef4169
Default theme: Add basic form themeing
PhrozenByte Aug 2, 2016
51e8f31
Default theme: Improve form theming
PhrozenByte Aug 3, 2016
65a37f1
Default theme: Add basic support for IE8
PhrozenByte Aug 3, 2016
73a0b40
Default theme: Fix hr element theming in IE8+
PhrozenByte Aug 3, 2016
f9f998a
Default theme: Fix default container width
PhrozenByte Aug 3, 2016
f73c962
Fix Pico::evaluateRequestUrl(): PHP's built-in webserver doesn't alwa…
PhrozenByte Sep 17, 2016
0b4099f
Improve class docs
PhrozenByte Sep 17, 2016
a74db1d
Add Pico::filterVariable() method
PhrozenByte Sep 17, 2016
00603f6
Add integrated 404 Not Found page
PhrozenByte Oct 1, 2016
3ebb51a
Improve class docs
PhrozenByte Oct 1, 2016
bea610d
Pico::evaluateRequestUrl(): Replace strpos()+substr() with strstr()
PhrozenByte Oct 5, 2016
38615e4
Use Pico::loadFileContent() in Pico::readPages()
PhrozenByte Oct 9, 2016
d6a0942
Merge branch 'master' into pico-1.1
PhrozenByte Nov 2, 2016
0a26974
Add Pico::is404Content() method
PhrozenByte Nov 26, 2016
7a6e4f8
Sort all loaded plugins using a plugin dependency topology
PhrozenByte Dec 6, 2016
5cf47e6
Various small improvements
PhrozenByte Dec 6, 2016
ea2146b
Remove default plugins PicoParsePagesContent and PicoExcerpt
PhrozenByte Dec 6, 2016
b712650
Default theme: Navigation: Show top-level pages only
PhrozenByte Dec 6, 2016
b493ebd
Default theme: Navigation: Hide pages starting with a underscore (_)
PhrozenByte Dec 6, 2016
82c6dd9
Don't sort pages when a unknown sort method is specified
PhrozenByte Dec 6, 2016
bc57296
Fire onMetaHeaders event only once, cache results of Pico::getMetaHea…
PhrozenByte Dec 6, 2016
5d48aa7
Let Pico::getTwigVariables() return the "real" array
PhrozenByte Dec 6, 2016
5193b77
Reuse YAML parser instance
PhrozenByte Dec 6, 2016
ec3f7fb
Improve class docs
PhrozenByte Dec 6, 2016
9a2dd4f
Mark Twig variables rewrite_url and is_front_page as deprecated
PhrozenByte Dec 6, 2016
9b72b5c
Give pages starting with a underscore (_) a special treatment
PhrozenByte Dec 12, 2016
2e880d6
Discover the previous and next pages of all pages
PhrozenByte Dec 12, 2016
8f7e4da
Rename Pico 1.1 to Pico 2.0
PhrozenByte Dec 12, 2016
1f35346
Improve detection of hidden files to serve 404 contents instead
PhrozenByte Dec 12, 2016
46f5d3d
Move Twig link filter and url_param and form_param functions to PicoT…
PhrozenByte Dec 12, 2016
586d792
Update Pico::VERSION_ID constant
PhrozenByte Dec 12, 2016
eec1d62
Add Pico::getFilesGlob() method
PhrozenByte Dec 12, 2016
9254240
Load plugins from <plugin name>.php and <plugin name>/<plugin name>.p…
PhrozenByte Dec 12, 2016
c56ba02
Reintroduce plugin prefix classifications
PhrozenByte Dec 12, 2016
0a080c8
Add lazy init for Symfony YAML, Parsedown and Twig
PhrozenByte Feb 5, 2017
9b7523b
Use .yml files to configure Pico
PhrozenByte Feb 5, 2017
5429a3a
Add Pico::getTwigTemplate()
PhrozenByte Feb 5, 2017
d4c65fa
Allow configuring Parsedown
PhrozenByte Feb 5, 2017
882a80a
Update docs to reflect 9b7523b
PhrozenByte Feb 5, 2017
56fffe9
Add Bountysource to default contents and README.md
PhrozenByte Feb 12, 2017
921b951
Add Bountysource to README.md
PhrozenByte Feb 19, 2017
25468dc
Update CHANGELOG.md
PhrozenByte Feb 19, 2017
82a342b
Various small improvements
PhrozenByte May 1, 2017
3f17a2e
Merge branch 'master' into pico-1.1
PhrozenByte May 1, 2017
a39bc38
Update keywords in composer.json; Use screenshot from website in READ…
PhrozenByte May 1, 2017
cbb8ece
Move PicoDeprecated plugin and default theme to separate repos
PhrozenByte May 1, 2017
f52e3dc
Add Pico::getVendorDir()
PhrozenByte May 1, 2017
a114821
Add 2.0-dev branch alias to composer.json
PhrozenByte May 1, 2017
bba9375
Use dev dependencies for pico-deprecated and pico-theme
PhrozenByte May 1, 2017
1d73524
Search for content/index.md to determine the content dir to use
PhrozenByte May 1, 2017
3f98896
Create empty content/ dir
PhrozenByte May 1, 2017
4d1f92a
Update CONTRIBUTING.md
PhrozenByte May 1, 2017
aaf52dd
Create empty assets/ dir
PhrozenByte May 6, 2017
8a11a65
Create distinct _build/.gitignore
PhrozenByte May 6, 2017
6574d48
Update .gitattributes
PhrozenByte May 6, 2017
e8e60f4
Update DummyPlugin
PhrozenByte May 7, 2017
36b3aef
Fix Pico::loadPlugin() when called before Pico::loadPlugins()
PhrozenByte May 7, 2017
7b222b0
Add Pico::API_VERSION
PhrozenByte May 10, 2017
6e28a51
Refactor onPages… and onPage… core events
PhrozenByte May 13, 2017
191f6ed
Don't pass the $plugins argument of the onPluginsLoaded event by refe…
PhrozenByte May 13, 2017
624310b
Various small improvements
PhrozenByte May 13, 2017
f4332a2
Force PicoDeprecated to be first plugin in the plugins array
PhrozenByte May 13, 2017
80c88f2
Refactor onMetaHeaders event
PhrozenByte May 13, 2017
773f479
Remove Pico::registerTwig(), use Pico::getTwig() instead
PhrozenByte May 13, 2017
d26da62
Add onSinglePageContent event
PhrozenByte May 13, 2017
b098e22
Various small improvements
PhrozenByte May 13, 2017
cd2cc60
Sync versions of pico-deprecated and pico-theme with Pico
PhrozenByte Jun 12, 2017
3131042
Merge branch 'master' into pico-1.1
PhrozenByte Jun 12, 2017
66cc087
Travis CI: Explicitly set root package version for branches
PhrozenByte Jun 13, 2017
91771e6
Update .htaccess
PhrozenByte Jun 14, 2017
23ad80b
Let Pico load plugins from vendor/pico-plugin.php
PhrozenByte Jun 14, 2017
21051fe
Pico::loadComposerPlugins(): Use Pico::getVendorDir() instead of Pico…
PhrozenByte Jun 14, 2017
793fcdb
Add "remove" fallback to Twig's "sort_by" filter
PhrozenByte Jun 20, 2017
fd78ec3
Various small improvements
PhrozenByte Jun 20, 2017
4cd993c
Fix PHP Syntax Error
PhrozenByte Jun 20, 2017
05c8d95
Only load Twig_Extension_Debug when Twig's debug mode is enabled
PhrozenByte Jun 20, 2017
df532e4
Travis CI: Use Build Stages
PhrozenByte Jun 21, 2017
55a0a5b
Add Pico::substituteFileContent() method
PhrozenByte Jun 21, 2017
b626782
Use Pico::substituteFileContent() for Twig's "markdown" filter
PhrozenByte Jun 21, 2017
414f5ac
Allow pages to be sorted by arbitrary meta values
PhrozenByte Jul 14, 2017
de74e7d
Improve class docs
PhrozenByte Jul 14, 2017
53e9eaa
Fix Pico's REQUEST_URI routing method when installed to /
PhrozenByte Jul 18, 2017
3e88c58
Merge branch 'master' into pico-1.1
PhrozenByte Jul 18, 2017
b73e197
Refactor YAML frontmatter date parsing
PhrozenByte Jul 28, 2017
8138212
Pico::evaluateRequestUrl(): Improve REQUEST_URI handling
PhrozenByte Aug 3, 2017
32ae70f
Add $default param to getConfig() method
PhrozenByte Aug 4, 2017
fc76d37
Improve class docs
PhrozenByte Aug 5, 2017
7087573
Pico::loadPlugins(): Load composer-plugins first and skip conflicting…
PhrozenByte Oct 7, 2017
9a9872f
Add Pico::getPageId()
PhrozenByte Oct 7, 2017
b6468ca
Various small improvements
PhrozenByte Oct 7, 2017
20297de
Pico::loadLocalPlugins(): Don't load plugins case-insensitive
PhrozenByte Oct 12, 2017
9dcb06c
Pico::sortPlugins(): Fix sorting of non-native plugins
PhrozenByte Oct 12, 2017
ee013f9
Build system: Fix _build/create-release-archive.sh
PhrozenByte Oct 12, 2017
0318cc2
Build system: Add cloc statistics to release deployment
PhrozenByte Oct 12, 2017
867f81a
Various small improvements
PhrozenByte Oct 12, 2017
7094163
Pico::loadPlugins(): Add plugin blacklist and allow disabling local p…
PhrozenByte Oct 13, 2017
a231abc
Remove picocms/pico-deprecated and picocms/pico-theme dependencies
PhrozenByte Oct 13, 2017
151908f
Remove various event params that are a bit out of place
PhrozenByte Oct 14, 2017
d8a649e
Don't lower meta data unsolicited and flip meta headers array
PhrozenByte Oct 14, 2017
61319b0
Add license/copyright file header; improve phpDoc class docs
PhrozenByte Oct 19, 2017
63616b5
Add license/copyright file headers to index.php and index.php.dist
PhrozenByte Oct 19, 2017
81ebc4c
Build system: Move helper scripts to _build/tools dir
PhrozenByte Oct 22, 2017
498961b
Build system: Various small improvements
PhrozenByte Oct 22, 2017
448fff4
Build system: Add version parser, handle pre-releases differently
PhrozenByte Oct 22, 2017
1dee2c1
Build system: Use 'picocms/pico-composer' to create release archives
PhrozenByte Oct 22, 2017
0532fef
Update composer dependencies
PhrozenByte Oct 28, 2017
c71169a
Update CONTRIBUTING.md
PhrozenByte Oct 28, 2017
dfed9cc
Build system: Create GitHub releases as draft
PhrozenByte Oct 28, 2017
2a30c46
Build system: Add config/config.yml.template to release archives
PhrozenByte Nov 4, 2017
cc47043
Update README.md screenshot
PhrozenByte Nov 4, 2017
e8a19cb
Fix Pico::parseFileMeta()
PhrozenByte Nov 4, 2017
ae99e0c
Merge branch 'master' into pico-1.1
PhrozenByte Nov 4, 2017
da0d4c3
Build system: Add tools/github-commit.sh
PhrozenByte Nov 4, 2017
1afc495
Build system: Remove cloc release statistics
PhrozenByte Nov 4, 2017
6e88e7f
Build system: Disable Travis IRC notifications
PhrozenByte Nov 4, 2017
4fb0b40
Build system: Improve and fix deployment
PhrozenByte Nov 5, 2017
619ae9d
Add Developer Certificate of Origin to CONTRIBUTING.md
PhrozenByte Nov 5, 2017
46a6ff1
Don't ignore index.php.dist when exporting Git repo
PhrozenByte Nov 5, 2017
66bb17a
Build system: Make sure to create release archive in $TRAVIS_BUILD_DIR
PhrozenByte Nov 5, 2017
1cd6e24
Prepare v2.0.0-beta.1
PhrozenByte Nov 5, 2017
22aa688
Version 2.0.0-beta.1
PhrozenByte Nov 5, 2017
f5f38a7
DummyPlugin: Improve phpDoc class docs
PhrozenByte Nov 18, 2017
3846d3b
Various small improvements
PhrozenByte Nov 18, 2017
28d2648
Add Pico::buildPageTree()
PhrozenByte Nov 18, 2017
a192a42
Travis CI: Add PHP 7.2
PhrozenByte Nov 25, 2017
37dfe0e
Force themes to use .twig as file extension
PhrozenByte Nov 25, 2017
0c83f36
Build system: Move _build/tools directory to a separate repo
PhrozenByte Dec 2, 2017
722de2a
Build system: Refactor scripts to use picocms/ci-tools
PhrozenByte Dec 2, 2017
68b7110
Merge branch 'master' into pico-1.1
PhrozenByte Dec 2, 2017
a1dcf54
Add .github/PULL_REQUEST_TEMPLATE.md
PhrozenByte Dec 2, 2017
e517eac
Improve .htaccess regex
PhrozenByte Dec 24, 2017
1ce1780
Build system: Fix release deployment
PhrozenByte Dec 24, 2017
afd0a4d
Change AbstractPicoPlugin::$enabled's behavior
PhrozenByte Dec 27, 2017
b129a4f
Various small improvements
PhrozenByte Dec 27, 2017
888190f
Various small improvements
PhrozenByte Jan 21, 2018
c697ec2
Update CHANGELOG.md for Pico v2.0.0-beta.1 and upcoming v2.0.0-beta.2
PhrozenByte Jan 21, 2018
fb7d99d
Update CHANGELOG.md
PhrozenByte Jan 21, 2018
604ee70
Version 2.0.0-beta.2
PhrozenByte Jan 21, 2018
e079946
Build system: Don't delete .gitignore when creating release archives
PhrozenByte Jan 27, 2018
b6bd714
README.md: Add Pico 2.0 install/upgrade instructions
PhrozenByte Jan 27, 2018
6bb65fb
Deny access to composer.phar in .htaccess
PhrozenByte Jan 27, 2018
25bfa28
Inline docs: Update nginx rewrite rules to match .htaccess
PhrozenByte Jan 27, 2018
a58bfc5
Improve inline docs
PhrozenByte Jan 28, 2018
03cc101
Fix page tree
PhrozenByte Jan 31, 2018
9c182bd
Add Lighttpd config to sample contents
PhrozenByte Feb 3, 2018
5f7b455
Add README.md, CONTRIBUTING.md and CHANGELOG.md to pre-bundled releases
PhrozenByte Feb 24, 2018
80263a9
Disallow the use of the callback filter for the url_param and form_pa…
PhrozenByte Feb 24, 2018
05c2c96
Use filter_id() for the url_param and form_param Twig functions
PhrozenByte Feb 24, 2018
190889b
Fix sorting of Pico::$nativePlugins
PhrozenByte Mar 29, 2018
b405edb
Various small improvements
PhrozenByte Mar 29, 2018
568166a
Check Pico::VERSION constant before deploying a new release
PhrozenByte Mar 29, 2018
93f2162
Update CHANGELOG.md
PhrozenByte Mar 29, 2018
25ada4a
Update CHANGELOG.md
PhrozenByte Apr 7, 2018
822d58d
Fix auto-publishing of pre-bundled releases
PhrozenByte Apr 7, 2018
a30dcbc
Version 2.0.0-beta.3
PhrozenByte Apr 7, 2018
c12b50d
stop config.yml on loading again
jheimbach Apr 29, 2018
af237c1
Merge pull request #429 from JHeimbach/fix-configloading
PhrozenByte Apr 29, 2018
f994ef1
Merge branch 'enhancement/bountysource' into pico-1.1
PhrozenByte Jul 1, 2018
6d6a39b
Fix Travis build
PhrozenByte Jul 1, 2018
1ce4a0b
Sync user and inline docs
PhrozenByte Jul 1, 2018
09057db
Add Pico::setConfig() example to index.php.dist
PhrozenByte Jul 1, 2018
25c32de
Update CHANGELOG.md
PhrozenByte Jul 1, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Pico::evaluateRequestUrl(): Improve REQUEST_URI handling
Don't 404 "/index.php" requests
PhrozenByte committed Aug 3, 2017
commit 8138212a27c4d572dc6f797626e6b0f92d5995bb
8 changes: 6 additions & 2 deletions lib/Pico.php
Original file line number Diff line number Diff line change
@@ -972,8 +972,12 @@ protected function evaluateRequestUrl()
$requestUri = isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : '';
if ($requestUri && (substr($requestUri, 0, $basePathLength) === $basePath)) {
$requestUri = substr($requestUri, $basePathLength);
$requestUri = strstr($requestUri, '?', true) ?: $requestUri;
$this->requestUrl = rtrim(rawurldecode($requestUri), '/');
if ($requestUri && (($queryStringPos = strpos($requestUri, '?')) !== false)) {
$requestUri = substr($requestUri, 0, $queryStringPos);
}
if ($requestUri && ($requestUri !== basename($_SERVER['SCRIPT_NAME']))) {
$this->requestUrl = rtrim(rawurldecode($requestUri), '/');
}
}
}
}