Kaynağa Gözat

U ref list in more functions

Piotr Labudda 7 yıl önce
ebeveyn
işleme
7e1306e299
1 değiştirilmiş dosya ile 2 ekleme ve 2 silme
  1. 2 2
      SE/se-lib/Core/AclHelper.php

+ 2 - 2
SE/se-lib/Core/AclHelper.php

@@ -288,7 +288,7 @@ class Core_AclHelper {// Helper class for Acl
 			foreach ($backRefList as $backRef) { // [ namespace, idInstance ]
 			foreach ($backRefList as $backRef) { // [ namespace, idInstance ]
 				$backRefLabel = V::get($backRef['namespace'], $backRef['namespace'], $backRefLabelsByNs);
 				$backRefLabel = V::get($backRef['namespace'], $backRef['namespace'], $backRefLabelsByNs);
 				$backRefShort = explode("/", $backRefLabel);
 				$backRefShort = explode("/", $backRefLabel);
-				$backRefShort = array_pop($backRefShort);
+				$backRefShort = trim( array_pop($backRefShort) );
 				$backRefShort = (strlen($backRefShort) > 28) ? substr($backRefShort, 0, 28) . "..." : $backRefShort;
 				$backRefShort = (strlen($backRefShort) > 28) ? substr($backRefShort, 0, 28) . "..." : $backRefShort;
 
 
 				try {
 				try {
@@ -323,7 +323,7 @@ class Core_AclHelper {// Helper class for Acl
 			foreach ($refList as $refInfo) { // [ namespace, idInstance ]
 			foreach ($refList as $refInfo) { // [ namespace, idInstance ]
 				$refLabel = V::get($refInfo['namespace'], $refInfo['namespace'], $refLabelsByNs);
 				$refLabel = V::get($refInfo['namespace'], $refInfo['namespace'], $refLabelsByNs);
 				$refShortLabel = explode("/", $refLabel);
 				$refShortLabel = explode("/", $refLabel);
-				$refShortLabel = array_pop($refShortLabel);
+				$refShortLabel = trim( array_pop($refShortLabel) );
 				$refShortLabel = (strlen($refShortLabel) > 28) ? substr($refShortLabel, 0, 28) . "..." : $refShortLabel;
 				$refShortLabel = (strlen($refShortLabel) > 28) ? substr($refShortLabel, 0, 28) . "..." : $refShortLabel;
 
 
 				try {
 				try {