Skip to content

Commit

Permalink
FIX #369 Comments indentation does not work on frontend
Browse files Browse the repository at this point in the history
  • Loading branch information
haruka-7 committed Jan 28, 2020
1 parent e97d7b1 commit 471f3cd
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 15 deletions.
2 changes: 1 addition & 1 deletion core/lib/class.plx.motor.php
Original file line number Diff line number Diff line change
Expand Up @@ -841,7 +841,7 @@ public function getCommentaires($motif,$ordre='sort',$start=0,$limite=false,$pub
$array[$k] = $this->parseCommentaire(PLX_ROOT.$this->aConf['racine_commentaires'].$v);

# hiérarchisation et indentation des commentaires seulement sur les écrans requis
if( !(defined('PLX_ADMIN') OR defined('PLX_FEED')) OR preg_match('/comment_new/',basename($_SERVER['SCRIPT_NAME']))) {
if( !(defined('plxAdmin::PLX_ADMIN') OR defined('plxFeed::PLX_FEED')) OR preg_match('/comment_new/',basename($_SERVER['SCRIPT_NAME']))) {
$array = $this->parentChildSort_r('index', 'parent', $array);
}

Expand Down
2 changes: 1 addition & 1 deletion core/lib/class.plx.record.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public function __construct(&$array) {
/**
* Méthode qui incrémente judicieusement la variable $i
*
* @return booléen
* @return boolean
* @author Anthony GUÉRIN
**/
public function loop() {
Expand Down
23 changes: 10 additions & 13 deletions core/lib/class.plx.show.php
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,7 @@ public function catName($type='') {
*
* @param format format d'affichage (variables: #img_url, #img_thumb_url, #img_alt, #img_title)
* @param echo si à VRAI affichage à l'écran
* @return stdout
* @return string
* @scope home,categorie,article,tags,archives
* @author Stephane F, Philippe-M
**/
Expand Down Expand Up @@ -1094,28 +1094,25 @@ public function comIndex() {
}

/**
* Méthode qui retourne le niveau d'indentation du commentaire
*
* @return integer numéro du niveau d'indentation du commentaire
* @scope article
* Get comment indent number
* @return integer level number for comment indentation
* @author Stephane F.
**/
public function comNumLevel() {
return $this->plxMotor->plxRecord_coms->f('level');
}

/**
* Méthode qui formate et affiche le niveau d'indentation du commentaire
*
* @param class nom de la classe css servant à l'indentation des commentaires
* @scope article
* @author Stephane F., Jerry Wham
* Add CSS class fort comments indentation
* @param class css class used to indent comments
* @author Stephane F., Jerry Wham, Pedro "P3ter" CADETE
**/
public function comLevel($class='level') {
if($this->comNumLevel() > 5)
echo $class.'-'.$this->comNumLevel().' '.$class.'-max';
$numLevel = $this->comNumLevel();
if($numLevel > 5)
echo $class.'-'.$numLevel.' '.$class.'-max';
else
echo $class.'-'.$this->comNumLevel();
echo $class.'-'.$numLevel;
}

/**
Expand Down
1 change: 1 addition & 0 deletions readme/CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
[+] #371 Check PluXml update using javascript if "curl" or "file_get_contents" can not be used (bazooka07)
FIX #365 plxUtils::getLangs() optimisations (bazooka07)
FIX #367 plxUtils::sendmail() minor correction (bazooka07)
FIX #369 Comments indentation does not work on frontend (P3ter)
FIX #372 [i18n] missing L_CONFIG_ADVANCED_LOSTPASSWORD in oc, es, pl, pt, ro, ru, it (P3ter)

0 comments on commit 471f3cd

Please sign in to comment.