Skip to content

Commit 3dd7658

Browse files
committed
Fix Markdown pages wrt. linking
All labels need to be unique globally, so that we can reference them.
1 parent 5754d7e commit 3dd7658

File tree

7 files changed

+37
-45
lines changed

7 files changed

+37
-45
lines changed

cmsimple/classes/CSRFProtection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* @copyright 2013-2021 The CMSimple_XH developers <http://cmsimple-xh.org/?The_Team>
1010
* @copyright GNU GPLv3 <http://www.gnu.org/licenses/gpl-3.0.en.html>
1111
* @since 1.6
12-
* @tutorial XH/CSRFProtection.cls
12+
* @see @ref csrf
1313
*/
1414
class CSRFProtection
1515
{

cmsimple/cms.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -874,7 +874,7 @@
874874
*
875875
* @public
876876
*
877-
* @tutorial CSRFProtection.cls
877+
* @see @ref csrf
878878
*/
879879
$_XH_csrfProtection = null;
880880
if (isset($_COOKIE['status']) && $_COOKIE['status'] == 'adm'

tutorials/XH/CSRFProtection.md

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
CSRF Protection
1+
CSRF Protection {#csrf}
22
===============
33

4-
[TOC]
5-
64
According to [Wikipedia](http://en.wikipedia.org/wiki/Cross-site_request_forgery):
75
> CSRF (Cross-site request forgery) is a type of malicious exploit
86
> of a website whereby unauthorized commands are transmitted from a user
@@ -28,8 +26,8 @@ For now, the CSRF protection functionality is made available as a
2826
global object, @ref $_XH_csrfProtection; this is
2927
quite likely to change in a future version.
3028

31-
Usage {#usage}
32-
=====
29+
Usage {#csrf_usage}
30+
-----
3331

3432
Every form which has to be protected against CSRF attacks has to
3533
be extended by a hidden input element which can be inserted by calling
@@ -69,8 +67,8 @@ CMSimple_XH and the administration forms of plugins, which are handled
6967
by `plugin_admin_common()`. Other forms
7068
require to add CSRF protection in the way described above.
7169

72-
Stronger Protection {#stronger-protection}
73-
===================
70+
Stronger Protection {#csrf_stronger_protection}
71+
-------------------
7472

7573
While a common token for each session gives reasonable protection
7674
againgst CSRF attacks, a new token for each request is even more secure.
@@ -104,8 +102,8 @@ if (!isset($_POST[...])) {
104102
}
105103
````
106104

107-
External Scripts {#external-scripts}
108-
================
105+
External Scripts {#csrf_external_scripts}
106+
----------------
109107

110108
Sometimes a plugin requests an "external" script, i.e. does
111109
not request an index.php of the CMSimple_XH installation. In this

tutorials/XH/FileEdit.md

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,19 @@
1-
The FileEdit Class Hierarchy
1+
The FileEdit Class Hierarchy {#file_editor}
22
============================
33

4-
[TOC]
5-
6-
Introduction {#intro}
7-
=====================
8-
94
The FileEdit class hierarchie is responsible for the handling of the
105
editing of files in the back-end. Its implementation makes heavy use
116
of the [template method pattern](http://en.wikipedia.org/wiki/Template_method_pattern).
127
The two main branches are TextFileEdit and ArrayFileEdit.
138

14-
TextFileEdit {#textfileedit}
15-
----------------------------
9+
TextFileEdit {#file_editor_text}
10+
------------
1611

1712
The predefined concrete subclasses of TextFileEdit offer a
1813
simple textarea to edit the content of a text file.
1914

20-
ArrayFileEdit {#arrayfileedit}
21-
------------------------------
15+
ArrayFileEdit {#file_editor_array}
16+
-------------
2217

2318
This branch offers editing of files storing data in an array
2419
structure. The predefined subclasses handle two- dimensional PHP
@@ -42,8 +37,8 @@ As of CMSimple_XH 1.7.0 it is also possible to mark configuration as advanced
4237
options by prepending a `+`, for instance `+bool` or `+string`. Such options are
4338
only displayed if the user presses the `More …` button in the configuration.
4439

45-
Usage {#usage}
46-
==============
40+
Usage {#file_editor_usage}
41+
-----
4742

4843
To display the edit form XH::FileEdit::form() has to be called; to handle the
4944
form submission XH::FileEdit::submit() has to be called. For instance:

tutorials/XH/JavaScript.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
# JavaScript
2-
3-
[TOC]
1+
JavaScript {#javascript}
2+
==========
43

54
CMSimple_XH is mainly developed in PHP. To improve the user
65
experience browser-side scripting is necessary; this is done
@@ -9,7 +8,8 @@ no precompiled language such as CoffeeScript or TypeScript is used).
98
This is documented in the separate
109
[JavaScript Documentation](../js/index.html).
1110

12-
# jQuery {#jquery}
11+
jQuery {#javascript_jquery}
12+
------
1313

1414
Due to the fact that several major JavaScript frameworks may not be
1515
compatible with each other and the popularity of

tutorials/XH/XH.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,22 @@
1-
# Developer Documentation for CMSimple_XH
2-
3-
[TOC]
4-
5-
# Introduction {#intro}
1+
Developer Documentation for CMSimple_XH {#mainpage}
2+
=======================================
63

74
This documentation is meant for core and plugin developers as well
85
as template designers. It documents the core and the standard
96
plugins which are not developed externally (currently Filebrowser,
107
Meta_tags and Page_params).
118

12-
# System Architecture {#architecture}
9+
System Architecture {#mainpage_architecture}
10+
-------------------
1311

1412
All requests to the website are directed to index.php in the root
1513
folder of the installation or to index.php in a language folder.
1614
These index.php files are just thin wrappers for including
1715
{@link cms.php} which defines variables and constants and
1816
includes necessary files according to the individual request.
1917

20-
## Plugins {#plugins}
18+
Plugins {#mainpage_plugins}
19+
-------
2120

2221
Plugins are handled by the "plugin loader". This term stems from
2322
the past, where it was an external component that had to be
@@ -47,7 +46,8 @@ register an appropriate callback.
4746
More developer information about plugins can be found in the
4847
[Wiki](http://www.cmsimple-xh.org/wiki/doku.php/developers_manual).
4948

50-
## Templates {#templates}
49+
Templates {#mainpage_templates}
50+
---------
5151

5252
At the end of usual page requests the file template.htm of the
5353
active template is included. That is an HTML file with embedded
@@ -57,7 +57,8 @@ PHP, the so-called template tags, which are defined in
5757
More developer information about templates can be found in the
5858
[Wiki](http://www.cmsimple-xh.org/wiki/doku.php/developers_manual).
5959

60-
# API {#api}
60+
API {#mainpage_api}
61+
---
6162

6263
An important part of the API of CMSimple_XH consists of global
6364
variables which are documented in {@link cms.php}. Not all global

tutorials/XH/autoloading.md

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
Class Autoloading
1+
Class Autoloading {#autoloading}
22
=================
33

4-
[TOC]
5-
64
As of CMSimple_XH 1.7.0 the core uses [class
75
autoloading](http://php.net/manual/en/language.oop5.autoload.php), and the
86
autoloader (`XH_autoload()`) can also be used by plugins. It works very similar
@@ -11,8 +9,8 @@ to better suite the tradionational folder structure of CMSimple_XH, namely that
119
the `<Vendor Name>` has actually to be the `<Plugin Name>` (or `XH` in case of
1210
core classes), which maps to the `classes/` folder of the plugin.
1311

14-
Example {#example}
15-
==================
12+
Example {#autoloading_example}
13+
-------
1614

1715
Let's consider a fictious plugin named Foo with the following filesystem
1816
structure (irrelevant files and folders ommitted for brevity):
@@ -30,8 +28,8 @@ classes you can use the fully qualified class name, i.e. `\Foo\Bar\Baz` and
3028
`\Foo\Qux`, respectively, or any short form which resolves to these fully
3129
qualified class names.
3230

33-
Underscores in Namespaces and Class Names {#underscores}
34-
========================================================
31+
Underscores in Namespaces and Class Names {#autoloading_underscores}
32+
-----------------------------------------
3533

3634
Note that the class loader also supports old style pseudo namespacing with
3735
underscores (`_`), which are treated identical to proper namespace separators,
@@ -41,8 +39,8 @@ This is meant for backward compatibility purposes, most notably for core classes
4139
which didn't use namespaces in CMSimple_XH 1.6. For new developments proper
4240
namespacing is recommended.
4341

44-
Case {#case}
45-
============
42+
Case {#autoloading_case}
43+
----
4644

4745
To avoid issues regarding the case (in)sensitivity of different file systems,
4846
you have to write all class names exactly like the name of the file they're

0 commit comments

Comments
 (0)