Move library/markdown.php to src
This commit is contained in:
parent
903b960d4c
commit
fabbf810b0
6 changed files with 52 additions and 55 deletions
|
@ -4,10 +4,12 @@
|
|||
*
|
||||
* @brief Friendica admin
|
||||
*/
|
||||
|
||||
use Friendica\App;
|
||||
use Friendica\Content\Feature;
|
||||
use Friendica\Core\System;
|
||||
use Friendica\Content\Text\Markdown;
|
||||
use Friendica\Core\Config;
|
||||
use Friendica\Core\System;
|
||||
use Friendica\Core\Worker;
|
||||
use Friendica\Database\DBM;
|
||||
use Friendica\Database\DBStructure;
|
||||
|
@ -1777,9 +1779,7 @@ function admin_page_plugins(App $a)
|
|||
|
||||
$readme = Null;
|
||||
if (is_file("addon/$plugin/README.md")) {
|
||||
require_once 'library/markdown.php';
|
||||
$readme = file_get_contents("addon/$plugin/README.md");
|
||||
$readme = Markdown($readme, false);
|
||||
$readme = Markdown::convert(file_get_contents("addon/$plugin/README.md"), false);
|
||||
} elseif (is_file("addon/$plugin/README")) {
|
||||
$readme = "<pre>" . file_get_contents("addon/$plugin/README") . "</pre>";
|
||||
}
|
||||
|
@ -2028,9 +2028,7 @@ function admin_page_themes(App $a)
|
|||
|
||||
$readme = null;
|
||||
if (is_file("view/theme/$theme/README.md")) {
|
||||
require_once 'library/markdown.php';
|
||||
$readme = file_get_contents("view/theme/$theme/README.md");
|
||||
$readme = Markdown($readme, false);
|
||||
$readme = Markdown::convert(file_get_contents("view/theme/$theme/README.md"), false);
|
||||
} elseif (is_file("view/theme/$theme/README")) {
|
||||
$readme = "<pre>" . file_get_contents("view/theme/$theme/README") . "</pre>";
|
||||
}
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
<?php
|
||||
|
||||
use Friendica\App;
|
||||
use Friendica\Content\Text\Markdown;
|
||||
|
||||
require_once 'include/bbcode.php';
|
||||
require_once 'library/markdown.php';
|
||||
require_once 'include/bb2diaspora.php';
|
||||
require_once 'include/html2bbcode.php';
|
||||
require_once 'include/pgettext.php';
|
||||
|
||||
function visible_lf($s)
|
||||
{
|
||||
|
@ -51,7 +51,7 @@ function babel_content()
|
|||
$o .= '<h2>' . t('bb2diaspora: ') . '</h2>' . EOL . EOL;
|
||||
$o .= visible_lf($diaspora) . EOL . EOL;
|
||||
|
||||
$html = Markdown($diaspora);
|
||||
$html = Markdown::convert($diaspora);
|
||||
$o .= '<h2>' . t('bb2diaspora => Markdown: ') . '</h2>' . EOL . EOL;
|
||||
$o .= $html . EOL . EOL;
|
||||
|
||||
|
|
|
@ -1,10 +1,9 @@
|
|||
<?php
|
||||
|
||||
use Friendica\App;
|
||||
use Friendica\Content\Text\Markdown;
|
||||
use Friendica\Core\System;
|
||||
|
||||
require_once('library/markdown.php');
|
||||
|
||||
if (!function_exists('load_doc_file')) {
|
||||
|
||||
function load_doc_file($s) {
|
||||
|
@ -50,7 +49,7 @@ function help_content(App $a) {
|
|||
$filename = "Home";
|
||||
$a->page['title'] = t('Help');
|
||||
} else {
|
||||
$a->page['aside'] = Markdown($home, false);
|
||||
$a->page['aside'] = Markdown::convert($home, false);
|
||||
}
|
||||
|
||||
if (!strlen($text)) {
|
||||
|
@ -61,7 +60,7 @@ function help_content(App $a) {
|
|||
));
|
||||
}
|
||||
|
||||
$html = Markdown($text, false);
|
||||
$html = Markdown::convert($text, false);
|
||||
|
||||
if ($filename !== "Home") {
|
||||
// create TOC but not for home
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue