Merge branch '0.8.x' of git@gitorious.org:laconica/mainline into 0.8.x
This commit is contained in:
commit
ab2f6fb860
1
.gitignore
vendored
1
.gitignore
vendored
@ -2,6 +2,7 @@ avatar/*
|
|||||||
background/*
|
background/*
|
||||||
files/*
|
files/*
|
||||||
file/*
|
file/*
|
||||||
|
local/*
|
||||||
_darcs/*
|
_darcs/*
|
||||||
logs/*
|
logs/*
|
||||||
config.php
|
config.php
|
||||||
|
@ -198,13 +198,13 @@ class TemplatePlugin extends Plugin {
|
|||||||
// unless laconica config:
|
// unless laconica config:
|
||||||
// $config['template']['mode'] = 'html';
|
// $config['template']['mode'] = 'html';
|
||||||
if (!(common_config('template', 'mode') == 'html')) {
|
if (!(common_config('template', 'mode') == 'html')) {
|
||||||
$tpl_file = 'tpl/index.php';
|
$tpl_file = $this->templateFolder() . '/index.php';
|
||||||
$tags = array_merge($vars,$this->blocks);
|
$tags = array_merge($vars,$this->blocks);
|
||||||
include $tpl_file;
|
include $tpl_file;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$tpl_file = 'tpl/index.html';
|
$tpl_file = $this->templateFolder() . '/index.html';
|
||||||
|
|
||||||
// read the static template
|
// read the static template
|
||||||
$output = file_get_contents( $tpl_file );
|
$output = file_get_contents( $tpl_file );
|
||||||
@ -236,6 +236,9 @@ class TemplatePlugin extends Plugin {
|
|||||||
return true;
|
return true;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
function templateFolder() {
|
||||||
|
return 'tpl';
|
||||||
|
}
|
||||||
|
|
||||||
// catching the StartShowHTML event to halt the rendering
|
// catching the StartShowHTML event to halt the rendering
|
||||||
function onStartShowHTML( &$act ) {
|
function onStartShowHTML( &$act ) {
|
||||||
@ -300,7 +303,7 @@ class TemplateAction extends Action
|
|||||||
$this->clientError(_('only User #1 can update the template'), $code = 401);
|
$this->clientError(_('only User #1 can update the template'), $code = 401);
|
||||||
|
|
||||||
// open the old template
|
// open the old template
|
||||||
$tpl_file = 'tpl/index.html';
|
$tpl_file = $this->templateFolder() . '/index.html';
|
||||||
$fp = fopen( $tpl_file, 'w+' );
|
$fp = fopen( $tpl_file, 'w+' );
|
||||||
|
|
||||||
// overwrite with the new template
|
// overwrite with the new template
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html>
|
<?php echo '<?';?>xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html>
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||||
<head>
|
<head>
|
||||||
<title><?php echo section('title'); ?></title>
|
<title><?php echo section('title'); ?></title>
|
||||||
|
Loading…
Reference in New Issue
Block a user