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
foreach($themesPaths as $themePath)
{
$langLocaleFile = $themePath.DS.'language'.DS.$Site->locale().'.json';
$langDefaultFile = $themePath.DS.'language'.DS.'en_US.json';
$langLocaleFile = $themePath.DS.'languages'.DS.$Site->locale().'.json';
$langDefaultFile = $themePath.DS.'languages'.DS.'en_US.json';
$database = false;
// Check if exists locale language

View File

@ -11,7 +11,7 @@
<label>
<?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>
<?php

View File

@ -11,7 +11,7 @@
<label>
<?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>
<?php

View File

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

View File

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

View File

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