lint: apply phpcbf to plugins/
Signed-off-by: VirtualTam <virtualtam@flibidi.net>
This commit is contained in:
parent
f211e417bf
commit
a0ab3c3f68
6 changed files with 16 additions and 15 deletions
|
@ -73,7 +73,6 @@ function hook_demo_plugin_render_header($data)
|
||||||
{
|
{
|
||||||
// Only execute when linklist is rendered.
|
// Only execute when linklist is rendered.
|
||||||
if ($data['_PAGE_'] == Router::$PAGE_LINKLIST) {
|
if ($data['_PAGE_'] == Router::$PAGE_LINKLIST) {
|
||||||
|
|
||||||
// If loggedin
|
// If loggedin
|
||||||
if ($data['_LOGGEDIN_'] === true) {
|
if ($data['_LOGGEDIN_'] === true) {
|
||||||
/*
|
/*
|
||||||
|
@ -448,8 +447,7 @@ function hook_demo_plugin_render_feed($data)
|
||||||
foreach ($data['links'] as &$link) {
|
foreach ($data['links'] as &$link) {
|
||||||
if ($data['_PAGE_'] == Router::$PAGE_FEED_ATOM) {
|
if ($data['_PAGE_'] == Router::$PAGE_FEED_ATOM) {
|
||||||
$link['description'] .= ' - ATOM Feed' ;
|
$link['description'] .= ' - ATOM Feed' ;
|
||||||
}
|
} elseif ($data['_PAGE_'] == Router::$PAGE_FEED_RSS) {
|
||||||
elseif ($data['_PAGE_'] == Router::$PAGE_FEED_RSS) {
|
|
||||||
$link['description'] .= ' - RSS Feed';
|
$link['description'] .= ' - RSS Feed';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -139,7 +139,6 @@ function hook_markdown_render_includes($data)
|
||||||
|| $data['_PAGE_'] == Router::$PAGE_DAILY
|
|| $data['_PAGE_'] == Router::$PAGE_DAILY
|
||||||
|| $data['_PAGE_'] == Router::$PAGE_EDITLINK
|
|| $data['_PAGE_'] == Router::$PAGE_EDITLINK
|
||||||
) {
|
) {
|
||||||
|
|
||||||
$data['css_files'][] = PluginManager::$PLUGINS_PATH . '/markdown/markdown.css';
|
$data['css_files'][] = PluginManager::$PLUGINS_PATH . '/markdown/markdown.css';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -195,8 +194,7 @@ function reverse_text2clickable($description)
|
||||||
// Detect and toggle block of code
|
// Detect and toggle block of code
|
||||||
if (!$codeBlockOn) {
|
if (!$codeBlockOn) {
|
||||||
$codeBlockOn = preg_match('/^```/', $descriptionLine) > 0;
|
$codeBlockOn = preg_match('/^```/', $descriptionLine) > 0;
|
||||||
}
|
} elseif (preg_match('/^```/', $descriptionLine) > 0) {
|
||||||
elseif (preg_match('/^```/', $descriptionLine) > 0) {
|
|
||||||
$codeBlockOn = false;
|
$codeBlockOn = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -302,13 +300,17 @@ function sanitize_html($description)
|
||||||
foreach ($escapeTags as $tag) {
|
foreach ($escapeTags as $tag) {
|
||||||
$description = preg_replace_callback(
|
$description = preg_replace_callback(
|
||||||
'#<\s*'. $tag .'[^>]*>(.*</\s*'. $tag .'[^>]*>)?#is',
|
'#<\s*'. $tag .'[^>]*>(.*</\s*'. $tag .'[^>]*>)?#is',
|
||||||
function ($match) { return escape($match[0]); },
|
function ($match) {
|
||||||
$description);
|
return escape($match[0]);
|
||||||
|
},
|
||||||
|
$description
|
||||||
|
);
|
||||||
}
|
}
|
||||||
$description = preg_replace(
|
$description = preg_replace(
|
||||||
'#(<[^>]+\s)on[a-z]*="?[^ "]*"?#is',
|
'#(<[^>]+\s)on[a-z]*="?[^ "]*"?#is',
|
||||||
'$1',
|
'$1',
|
||||||
$description);
|
$description
|
||||||
|
);
|
||||||
return $description;
|
return $description;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -82,7 +82,8 @@ function hook_pubsubhubbub_save_link($data, $conf)
|
||||||
*
|
*
|
||||||
* @throws Exception An error occurred.
|
* @throws Exception An error occurred.
|
||||||
*/
|
*/
|
||||||
function nocurl_http_post($url, $postString) {
|
function nocurl_http_post($url, $postString)
|
||||||
|
{
|
||||||
$params = array('http' => array(
|
$params = array('http' => array(
|
||||||
'method' => 'POST',
|
'method' => 'POST',
|
||||||
'content' => $postString,
|
'content' => $postString,
|
||||||
|
|
|
@ -17,7 +17,8 @@ function hook_qrcode_render_linklist($data)
|
||||||
$qrcode_html = file_get_contents(PluginManager::$PLUGINS_PATH . '/qrcode/qrcode.html');
|
$qrcode_html = file_get_contents(PluginManager::$PLUGINS_PATH . '/qrcode/qrcode.html');
|
||||||
|
|
||||||
foreach ($data['links'] as &$value) {
|
foreach ($data['links'] as &$value) {
|
||||||
$qrcode = sprintf($qrcode_html,
|
$qrcode = sprintf(
|
||||||
|
$qrcode_html,
|
||||||
urlencode($value['url']),
|
urlencode($value['url']),
|
||||||
$value['url'],
|
$value['url'],
|
||||||
PluginManager::$PLUGINS_PATH
|
PluginManager::$PLUGINS_PATH
|
||||||
|
|
|
@ -69,4 +69,3 @@ function wallabag_dummy_translation()
|
||||||
t('Wallabag API URL');
|
t('Wallabag API URL');
|
||||||
t('Wallabag API version (1 or 2)');
|
t('Wallabag API version (1 or 2)');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue