";
(array)$name = explode('/', $this->path);
echo htmlentities(end($name), ENT_QUOTES ,'UTF-8');
diff --git a/src/classes/BoardHeader.php b/src/classes/BoardHeader.php
index 16b3179..fd6d17c 100644
--- a/src/classes/BoardHeader.php
+++ b/src/classes/BoardHeader.php
@@ -60,7 +60,7 @@ class BoardHeader{
*/
public function __construct(){
$this->path = urlencode(File::a2r(CurrentUser::$path));
- $this->title = is_dir(CurrentUser::$path)?end(explode('/', CurrentUser::$path)):end(explode('/', dirname(CurrentUser::$path)));
+ $this->title = is_dir(CurrentUser::$path)?mb_basename(CurrentUser::$path):mb_basename(dirname(CurrentUser::$path));
$this->w = File::a2r(CurrentUser::$path);
}
diff --git a/src/classes/BoardItem.php b/src/classes/BoardItem.php
index f60fae4..1366806 100644
--- a/src/classes/BoardItem.php
+++ b/src/classes/BoardItem.php
@@ -81,7 +81,7 @@ public function toHTML(){
echo "
\n";
diff --git a/src/classes/Comments.php b/src/classes/Comments.php
index 09b5cce..c541e1f 100644
--- a/src/classes/Comments.php
+++ b/src/classes/Comments.php
@@ -74,11 +74,13 @@ public function __construct($file=null){
/// No item, no comment !
if(!isset($file) || is_array($file)) return;
+
+ /// No right to view
+ if(!Judge::view($file))
+ return;
/// Set variables
$this->file = $file;
- $settings = new Settings();
- $basefile = new File($file);
$basepath = File::a2r($file);
/// Urlencode basepath
@@ -86,7 +88,7 @@ public function __construct($file=null){
/// Build relative path to comments file
if(is_file($file)){
- $comments = dirname($basepath)."/.".basename($file)."_comments.xml";
+ $comments = dirname($basepath)."/.".mb_basename($file)."_comments.xml";
}else{
$comments = $basepath."/.comments.xml";
}
@@ -161,7 +163,7 @@ public function save(){
$c = $xml->addChild("comment");
$c->addChild("login" , $comment->login);
$c->addChild("date" , $comment->date);
- $c->addChild("content" , $comment->content);
+ $c->content = $comment->content;
}
if(!file_exists(dirname($this->commentsfile))){
@@ -219,6 +221,9 @@ private function toMainCommentsFile($comment){
* @author Thibaud Rohmer
*/
public function toHTML(){
+ if(!$this->file)
+ return;
+
echo '
'.Settings::_("comments","comments").'
';
echo "
'.Settings::_("description","description").'
'; + + echo "\n"; + } + + } +} + +?> \ No newline at end of file diff --git a/src/classes/Exif.php b/src/classes/Exif.php index 32a822d..ff35dc6 100644 --- a/src/classes/Exif.php +++ b/src/classes/Exif.php @@ -51,9 +51,6 @@ class Exif implements HTMLObject /// Exif values, nice and clean private $exif=array(); - /// Name of the file - private $filename; - /** * Create Exif class * @@ -94,7 +91,6 @@ public function __construct($file=null){ } } } - $this->filename = basename($file); } /** @@ -122,7 +118,7 @@ private function init_wanted(){ */ public function toHTML(){ if($this->exif){ - echo 'Exif
'; + echo ''.Settings::_("judge","exif").'
'; echo "Groups
".Settings::_("jsaccounts","groups")."