Merge branch '2.2RC' of https://github.com/redmatrix/hubzilla into 2.2RC_merge
This commit is contained in:
commit
1acfe53f74
@ -1,4 +1,5 @@
|
||||
Hubzilla 2.2 (2017-??-??)
|
||||
- Provide version compatibility check for themes (minversion, maxversion)
|
||||
- Use chanlink_hash() instead of chanlink_url() where appropriate
|
||||
- Use head_add_link() for feed discovery
|
||||
- Provide HTTP header parser which honours continuation lines
|
||||
|
@ -163,6 +163,14 @@ class Site {
|
||||
foreach($files as $file) {
|
||||
$vars = '';
|
||||
$f = basename($file);
|
||||
|
||||
$info = get_theme_info($f);
|
||||
$compatible = check_plugin_versions($info);
|
||||
if(!$compatible) {
|
||||
$theme_choices[$f] = $theme_choices_mobile[$f] = sprintf(t('%s - (Incompatible)'), $f);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (file_exists($file . '/library'))
|
||||
continue;
|
||||
if (file_exists($file . '/mobile'))
|
||||
|
@ -130,11 +130,19 @@ class Display {
|
||||
if($allowed_themes) {
|
||||
foreach($allowed_themes as $th) {
|
||||
$f = $th;
|
||||
|
||||
$info = get_theme_info($th);
|
||||
$compatible = check_plugin_versions($info);
|
||||
if(!$compatible) {
|
||||
$mobile_themes[$f] = $themes[$f] = sprintf(t('%s - (Incompatible)'), $f);
|
||||
continue;
|
||||
}
|
||||
|
||||
$is_experimental = file_exists('view/theme/' . $th . '/experimental');
|
||||
$unsupported = file_exists('view/theme/' . $th . '/unsupported');
|
||||
$is_mobile = file_exists('view/theme/' . $th . '/mobile');
|
||||
$is_library = file_exists('view/theme/'. $th . '/library');
|
||||
$mobile_themes["---"] = t("No special theme for mobile devices");
|
||||
$mobile_themes['---'] = t("No special theme for mobile devices");
|
||||
|
||||
if (!$is_experimental or ($is_experimental && (get_config('experimentals','exp_themes')==1 or get_config('experimentals','exp_themes')===false))){
|
||||
$theme_name = (($is_experimental) ? sprintf(t('%s - (Experimental)'), $f) : $f);
|
||||
@ -147,7 +155,6 @@ class Display {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -234,10 +234,8 @@ class Wiki extends \Zotlabs\Web\Controller {
|
||||
|
||||
$mimeType = $p['mimeType'];
|
||||
|
||||
$rawContent = (($p['mimeType'] == 'text/bbcode')
|
||||
? htmlspecialchars_decode(json_decode($p['content']),ENT_COMPAT)
|
||||
: htmlspecialchars_decode($p['content'],ENT_COMPAT)
|
||||
);
|
||||
$rawContent = htmlspecialchars_decode(json_decode($p['content']),ENT_COMPAT);
|
||||
|
||||
$content = ($p['content'] !== '' ? $rawContent : '"# New page\n"');
|
||||
// Render the Markdown-formatted page content in HTML
|
||||
if($mimeType == 'text/bbcode') {
|
||||
@ -245,7 +243,7 @@ class Wiki extends \Zotlabs\Web\Controller {
|
||||
}
|
||||
else {
|
||||
require_once('library/markdown.php');
|
||||
$html = Zlib\NativeWikiPage::generate_toc(zidify_text(purify_html(Markdown(Zlib\NativeWikiPage::bbcode(json_decode($content))))));
|
||||
$html = Zlib\NativeWikiPage::generate_toc(zidify_text(purify_html(Markdown(Zlib\NativeWikiPage::bbcode($content)))));
|
||||
$renderedContent = Zlib\NativeWikiPage::convert_links($html, argv(0) . '/' . argv(1) . '/' . $wikiUrlName);
|
||||
}
|
||||
$showPageControls = $wiki_editor;
|
||||
|
@ -70,9 +70,15 @@ class Theme {
|
||||
$chosen_theme = $_GET['theme_preview'];
|
||||
|
||||
// Allow theme selection of the form 'theme_name:schema_name'
|
||||
|
||||
$themepair = explode(':', $chosen_theme);
|
||||
|
||||
// Check if $chosen_theme is compatible with core. If not fall back to default
|
||||
$info = get_theme_info($themepair[0]);
|
||||
$compatible = check_plugin_versions($info);
|
||||
if(!$compatible) {
|
||||
$chosen_theme = '';
|
||||
}
|
||||
|
||||
if($chosen_theme && (file_exists('view/theme/' . $themepair[0] . '/css/style.css') || file_exists('view/theme/' . $themepair[0] . '/php/style.php'))) {
|
||||
return($themepair);
|
||||
}
|
||||
|
@ -471,6 +471,8 @@ function get_theme_info($theme){
|
||||
'description' => '',
|
||||
'author' => array(),
|
||||
'version' => '',
|
||||
'minversion' => '',
|
||||
'maxversion' => '',
|
||||
'compat' => '',
|
||||
'credits' => '',
|
||||
'maintainer' => array(),
|
||||
|
@ -3,7 +3,9 @@
|
||||
/**
|
||||
* * Name: Redbasic
|
||||
* * Description: Hubzilla standard theme
|
||||
* * Version: 1.0
|
||||
* * Version: 2.0
|
||||
* * MinVersion: 2.2RC
|
||||
* * MaxVersion: 3.0
|
||||
* * Author: Fabrixxm
|
||||
* * Maintainer: Mike Macgirvin
|
||||
* * Maintainer: Mario Vavti
|
||||
|
@ -1,5 +1,5 @@
|
||||
<div id="banner" class="hidden-sm hidden-xs">{{$banner}}</div>
|
||||
|
||||
<ul id="nav-notifications-template" rel="template">
|
||||
<li class="{5}"><a href="{0}" title="{2} {3}"><img class="dropdown-menu-img-sm" data-src="{1}"><span class="contactname">{2}</span><span class="dropdown-sub-text">{3}<br>{4}</span></a></li>
|
||||
<li class="{5}"><a href="{0}" title="{2} {3}"><img class="dropdown-menu-img-sm" data-src="{1}"><span class="contactname">{2}</span><span class="dropdown-sub-text">{3}<br>{4}</span><div class="clear"></div></a></li>
|
||||
</ul>
|
||||
|
@ -107,7 +107,7 @@
|
||||
<script>
|
||||
window.wiki_resource_id = '{{$resource_id}}';
|
||||
window.wiki_page_name = '{{$page}}';
|
||||
window.wiki_page_content = {{if !$mimeType || $mimeType == 'text/markdown'}}{{$content}}{{else}}`{{$content}}`{{/if}};
|
||||
window.wiki_page_content = `{{$content}}`;
|
||||
window.wiki_page_commit = '{{$commit}}';
|
||||
|
||||
$("#generic-modal-ok-{{$wikiModalID}}").removeClass('btn-primary');
|
||||
|
Reference in New Issue
Block a user