Skip to content

Commit 8166c32

Browse files
authored
Merge pull request #58 from hakasapl/main
Add API option for content management
2 parents 8afd7ac + 6ea5178 commit 8166c32

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
* [Bug] Fixed footer lookup PHP error for sending emails
1515
* [Bug] Fixed changelog format
1616
* [Bug] Fixed styling on content management page (#20)
17+
* [API] Added API call for getting content management text
1718
* [Project] Footers in the project are now generic
1819
* [Project] Default configs do not reference UMA labels anymore
1920

webroot/api/content/index.php

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?php
2+
3+
header('Content-type: text/plain');
4+
5+
require_once "../../../resources/autoload.php";
6+
7+
if (isset($_GET["line_wrap"])) {
8+
$CHAR_WRAP = $_GET["line_wrap"];
9+
} else {
10+
$CHAR_WRAP = 80;
11+
}
12+
13+
if (!isset($_GET["content_name"])) {
14+
die();
15+
}
16+
17+
echo $SQL->getPage($_GET["content_name"])["content"];

0 commit comments

Comments
 (0)