Merge branch 'dev' into wip-app-bin

This commit is contained in:
Mario Vavti
2017-02-03 09:24:09 +01:00
18 changed files with 75 additions and 240 deletions

View File

@@ -2191,7 +2191,7 @@ function store_diaspora_comment_sig($datarray, $channel, $parent_item, $post_id,
// since Diaspora doesn't handle edits we can only do this for the original text and not update it.
require_once('include/bb2diaspora.php');
require_once('include/markdown.php');
$signed_body = bb2diaspora_itembody($datarray,$walltowall);
if($walltowall) {

View File

@@ -1,6 +1,6 @@
<?php
/**
* @file include/bb2diaspora.php
* @file include/markdown.php
* @brief Some functions for BB conversions for Diaspora protocol.
*/

View File

@@ -556,21 +556,47 @@ function head_add_css($src, $media = 'screen') {
function head_remove_css($src, $media = 'screen') {
$index = array_search(array($src, $media), App::$css_sources);
if ($index !== false)
if($index !== false)
unset(App::$css_sources[$index]);
}
function head_get_css() {
$str = '';
$sources = App::$css_sources;
if (count($sources)) {
foreach ($sources as $source)
if(count($sources)) {
foreach($sources as $source)
$str .= format_css_if_exists($source);
}
return $str;
}
function head_add_link($arr) {
if($arr) {
App::$linkrel[] = $arr;
}
}
function head_get_links() {
$str = '';
$sources = App::$linkrel;
if(count($sources)) {
foreach($sources as $source) {
if(is_array($source) && count($source)) {
$str .= '<link';
foreach($source as $k => $v) {
$str .= ' ' . $k . '="' . $v . '"';
}
$str .= ' />' . "\r\n";
}
}
}
return $str;
}
function format_css_if_exists($source) {
$path_prefix = script_path() . '/';