Bugs fixes

This commit is contained in:
dignajar 2015-08-23 19:07:14 -03:00
parent bc096d0f6e
commit 0c5b90521b
7 changed files with 22 additions and 28 deletions

View File

@ -27,8 +27,8 @@ $themesPaths = Filesystem::listDirectories(PATH_THEMES);
// Load each plugin clasess // Load each plugin clasess
foreach($themesPaths as $themePath) foreach($themesPaths as $themePath)
{ {
$langLocaleFile = $themePath.DS.'language'.DS.$Site->locale().'.json'; $langLocaleFile = $themePath.DS.'languages'.DS.$Site->locale().'.json';
$langDefaultFile = $themePath.DS.'language'.DS.'en_US.json'; $langDefaultFile = $themePath.DS.'languages'.DS.'en_US.json';
$database = false; $database = false;
// Check if exists locale language // Check if exists locale language

View File

@ -11,7 +11,7 @@
<label> <label>
<?php $Language->p('Content') ?> <span class="forms-desc"><?php $Language->p('HTML and Markdown code supported') ?></span> <?php $Language->p('Content') ?> <span class="forms-desc"><?php $Language->p('HTML and Markdown code supported') ?></span>
<textarea id="jscontent" name="content" rows="15" class="width-80"><?php echo $_Page->contentRaw(true, false) ?></textarea> <textarea id="jscontent" name="content" rows="15" class="width-80"><?php echo $_Page->contentRaw(false) ?></textarea>
</label> </label>
<?php <?php

View File

@ -11,7 +11,7 @@
<label> <label>
<?php $Language->p('Content') ?> <span class="forms-desc"><?php $Language->p('HTML and Markdown code supported') ?></span> <?php $Language->p('Content') ?> <span class="forms-desc"><?php $Language->p('HTML and Markdown code supported') ?></span>
<textarea id="jscontent" name="content" rows="15" class="width-80"><?php echo $_Post->contentRaw(true, false) ?></textarea> <textarea id="jscontent" name="content" rows="15" class="width-80"><?php echo $_Post->contentRaw(false) ?></textarea>
</label> </label>
<?php <?php

View File

@ -22,8 +22,8 @@ $theme = array(
// Main // Main
// ============================================================================ // ============================================================================
$langLocaleFile = PATH_THEME.'language'.DS.$Site->locale().'.json'; $langLocaleFile = PATH_THEME.'languages'.DS.$Site->locale().'.json';
$langDefaultFile = PATH_THEME.'language'.DS.'en_US.json'; $langDefaultFile = PATH_THEME.'languages'.DS.'en_US.json';
$database = false; $database = false;
// Check if exists locale language // Check if exists locale language

View File

@ -3,7 +3,7 @@
class Page extends fileContent class Page extends fileContent
{ {
function __construct($key) function __construct($key)
{ {
// Database Key // Database Key
$this->setField('key', $key); $this->setField('key', $key);
@ -16,10 +16,8 @@ class Page extends fileContent
return $this->getField('title'); return $this->getField('title');
} }
// Returns the content. // Returns the content. This content is markdown parser.
// This content is markdown parser. // (boolean) $html, TRUE returns the content without satinize, FALSE otherwise.
// $fullContent, TRUE returns all content, if FALSE returns the first part of the content.
// $html, TRUE returns the content without satinize, FALSE otherwise.
public function content($html=true) public function content($html=true)
{ {
// This content is not sanitized. // This content is not sanitized.
@ -32,16 +30,14 @@ class Page extends fileContent
return Sanitize::html($content); return Sanitize::html($content);
} }
// Returns the content. // Returns the content. This content is not markdown parser.
// This content is not markdown parser. // (boolean) $raw, TRUE returns the content without sanitized, FALSE otherwise.
// $fullContent, TRUE returns all content, if FALSE returns the first part of the content. public function contentRaw($raw=true)
// $html, TRUE returns the content without satinize, FALSE otherwise.
public function contentRaw($html=true)
{ {
// This content is not sanitized. // This content is not sanitized.
$content = $this->getField('contentRaw'); $content = $this->getField('contentRaw');
if($html) { if($raw) {
return $content; return $content;
} }

View File

@ -18,19 +18,18 @@ class Post extends fileContent
// Returns the content. // Returns the content.
// This content is markdown parser. // This content is markdown parser.
// $fullContent, TRUE returns all content, if FALSE returns the first part of the content. // (boolean) $fullContent, TRUE returns all content, if FALSE returns the first part of the content.
// $html, TRUE returns the content without satinize, FALSE otherwise. // (boolean) $raw, TRUE returns the content without sanitized, FALSE otherwise.
public function content($fullContent=true, $html=true) public function content($fullContent=true, $raw=true)
{ {
// This content is not sanitized. // This content is not sanitized.
$content = $this->getField('content'); $content = $this->getField('content');
if(!$fullContent) if(!$fullContent) {
{
$content = $this->getField('breakContent'); $content = $this->getField('breakContent');
} }
if($html) { if($raw) {
return $content; return $content;
} }
@ -42,15 +41,14 @@ class Post extends fileContent
return $this->getField('readMore'); return $this->getField('readMore');
} }
// Returns the content. // Returns the content. This content is not markdown parser.
// This content is not markdown parser. // (boolean) $raw, TRUE returns the content without sanitized, FALSE otherwise.
// $html, TRUE returns the content without satinize, FALSE otherwise. public function contentRaw($raw=true)
public function contentRaw($html=true)
{ {
// This content is not sanitized. // This content is not sanitized.
$content = $this->getField('contentRaw'); $content = $this->getField('contentRaw');
if($html) { if($raw) {
return $content; return $content;
} }