Daniel Rudolf
698a249d45
Force Pico::$requestUrl to have no leading/trailing slash
...
Fixes #291
10 years ago
Daniel Rudolf
2761f8b751
Refactor Pico::isUrlRewritingEnabled()
10 years ago
Daniel Rudolf
86d1f713f2
Move PHP version check to index.php
10 years ago
Daniel Rudolf
81821e7811
Improve Pico::getBaseUrl() code styling
10 years ago
theshka
1fae7ab3df
* [New] added PHP_VERSION check to Pico::run()
10 years ago
Daniel Rudolf
840d41bca5
Improve type hinting
10 years ago
Daniel Rudolf
c34afad4af
Fix typo
10 years ago
Daniel Rudolf
d252df4b98
Throw RuntimeException on invalid content dirs
10 years ago
Daniel Rudolf
f5006c036a
Prevent double slashes in base_url when installed to document root
...
Fixes #274
10 years ago
Daniel Rudolf
c72ea0ecec
PicoDeprecated: Sanitize content_dir and base_url options when reading config.php in Picos root dir
10 years ago
Daniel Rudolf
10de8efa11
Move markdown filter to PicoTwigExtension
10 years ago
Daniel Rudolf
f19adc64b9
Add PicoTwigExtension with map and sort_by filters
10 years ago
Daniel Rudolf
78ceabe878
Various improvements
...
- Reuse ParsedownExtra object
- Add new markdown Twig filter
- Improve class docs in general
- Document plugin number prefix usage
10 years ago
Daniel Rudolf
f9e9642c22
Fix Pico::getPageUrl()
...
With enabled URL rewriting we must call rawurlencode() on the file path parts rather the whole path
10 years ago
Daniel Rudolf
2ca711ad59
Add missing rawurlencode() to Pico::getPageUrl()
...
Replace urldecode() in Pico::evaluateRequestUrl() with rawurldecode()
See #272 for details, thanks @smcdougall for spotting!
10 years ago
Daniel Rudolf
cd7cd374bb
Add content filter to get the parsed contents of a page (lazy loading)
10 years ago
Daniel Rudolf
af8de56512
Fix typos
10 years ago
Daniel Rudolf
ccac8dd4d3
Force trailing slash of $config['base_url'] and force existance of $config['timezone']
10 years ago
Daniel Rudolf
90128f4946
Fix possible foreach on null errors
10 years ago
Daniel Rudolf
ebe007bd78
Guess content directory
...
As pointed out by @Lomanic (see https://github.com/picocms/Pico/pull/260#issuecomment-153091890 ; thank you btw\!) we actually have to explain users how to change the content directory. This runs contrary to our "stupidly simple" claim. So Pico now simply uses the `content` directory when it exists...
10 years ago
Daniel Rudolf
9a702415fb
Remove `return $config` in `config/config.php`
...
I always thought that doing this is pretty unusual... But now it simply breaks BC - please refer to @Lomanic's [comment](https://github.com/picocms/Pico/pull/260#issuecomment-152610857 ). Using a return statement has no advantages, but increases the probability that something goes wrong (e.g. a clueless user removes the return statement). It was introduced with 23b90e2
, but we never released it ([v0.9.1](4cb2b24fae/lib/pico.php (L188-L189)
)). Removing the return statement shouldn't cause any problems even for users which installed Pico in the meantime. As a result we don't break BC and moreover remove a prior BC break 😃
10 years ago
Daniel Rudolf
afb55b9cb6
Improve class docs
10 years ago
Daniel Rudolf
e6681ea903
Improve class docs
...
Also add some ToDos to inline docs
10 years ago
Daniel Rudolf
54ce5b9699
Various small improvements
...
- Improve class docs for phpDocumentor
- Add missing onPagesLoading() event to DummyPlugin
- Add some TODOs to the UPGRADE section of the docs
10 years ago
Daniel Rudolf
647a7b5bb7
Trap empty $requestFileParts
10 years ago
Daniel Rudolf
9e2604af85
Prevent content_dir breakouts using malicious request URLs
...
It's appalling that nobody (including me!) thought about that!
10 years ago
Daniel Rudolf
de6b3a7c28
Fix Markdown %meta.*% replacement
...
Don't even try to use arrays here...
10 years ago
Daniel Rudolf
a654b1585b
phpDocumentor 2.8.5 currently doesn't support the Generic notations
...
This will likely be implemented as soon as the proposed PSR-5: PHPDoc is accepted
10 years ago
Daniel Rudolf
92af554d14
Improve inline code comments; preparing use of phpDocumentor
10 years ago
theshka
01122f2901
fix spelling
10 years ago
theshka
fe83d1fa7f
fix spelling
10 years ago
Daniel Rudolf
b09433a37b
Allow multiple calls to Pico::setConfig()
10 years ago
Daniel Rudolf
1419cf1636
Add Pico::setConfig() method
...
Thanks @dav-m85
10 years ago
Daniel Rudolf
7537159868
Remove the need to register headers during onMetaHeaders()
...
Why? I'm currently writing the user docs and I really have no idea how to explain this whole process in a non-technical way... It is very likely that a normal user wants to use custom tags and it would be absurd to tell him,that he should learn a programming language to do so. On the other hand, providing a copy-and-paste template makes the whole idea of explicitly registering headers worthless. The only reasonable solution is to remove the need to register headers.
Anyway, I think @PontusHorn is right to say that registering headers makes the whole system more predictable. So plugin developers are still instructed to register their meta headers during . We actually can't check and ensure this, but that's imho the best solution.
10 years ago
Daniel Rudolf
46ef63186a
Support $config['<plugin name>']['enabled'] option
...
... as a alternative to $config['<plugin name>.enabled']; Thanks @theshka for giving this hint
10 years ago
Daniel Rudolf
9d518fd722
Move sorting of $pages from Pico::getPages() to Pico::sortPages()
10 years ago
Daniel Rudolf
4f1e8667c3
Cast AbstractPicoPlugin::$dependsOn to array
...
Plugin devs could come up with the idea of setting AbstractPicoPlugin::$dependsOn to a string (single dependency) or null (no dependencies)
10 years ago
Daniel Rudolf
27d694697f
Fix code formatting
10 years ago
Daniel Rudolf
9aa62b4b44
Improve method docs of Pico::load404Content()
10 years ago
Daniel Rudolf
77f939028c
Support per-directory 404.md files
10 years ago
Daniel Rudolf
3a4721a20c
SCANDIR_SORT_* constants are available since PHP 5.4
...
Thanks @Lomanic
10 years ago
Daniel Rudolf
241a52907e
Update inline code comments
10 years ago
Daniel Rudolf
fd64e4fa5e
Add a exception to alpha sorting: List index files first
...
This guarantees that e.g. sub/index.md is listed before sub/foo.md
10 years ago
Daniel Rudolf
45815e2c6d
Don't read file contents of inaccessible pages
10 years ago
Daniel Rudolf
95db5ba1a1
Drop inaccessible pages
...
e.g. drop sub.md if sub/index.md exists
10 years ago
Daniel Rudolf
cdef7a6324
Explicitly treat relative paths to be relative to Picos root dir
...
This tempers the BC break, we can now recommend to simply remove the ROOT_DIR part
10 years ago
Daniel Rudolf
fc7632b0ac
Overhaul init of Pico
...
This may break BC if you're using one of the now deprecated constants (e.g. ROOT_DIR)
10 years ago
Daniel Rudolf
5e77d862bf
Remove twig cache dir
10 years ago
Daniel Rudolf
5533b07531
Re-add lost PicoPluginInterface
10 years ago
Daniel Rudolf
70f187fb45
Rename IPicoPlugin to PicoPluginInterface
10 years ago