mirror of
				https://github.com/invoiceninja/invoiceninja.git
				synced 2025-10-31 18:07:35 -04:00 
			
		
		
		
	Remove mb_strimwidth
This commit is contained in:
		
							parent
							
								
									c843da52d2
								
							
						
					
					
						commit
						bc4f70e3ed
					
				| @ -1228,4 +1228,9 @@ class Utils | |||||||
| 
 | 
 | ||||||
|         return round($amount + $tax1 + $tax2, 2); |         return round($amount + $tax1 + $tax2, 2); | ||||||
|     } |     } | ||||||
|  | 
 | ||||||
|  |     public static function truncateString($string, $length) | ||||||
|  |     { | ||||||
|  |         return strlen($string) > $length ? rtrim(substr($string, 0, $length)) . '...' : $in; | ||||||
|  |     } | ||||||
| } | } | ||||||
|  | |||||||
| @ -137,7 +137,7 @@ class Expense extends EntityModel | |||||||
|         if ($this->transaction_id) { |         if ($this->transaction_id) { | ||||||
|             return $this->transaction_id; |             return $this->transaction_id; | ||||||
|         } elseif ($this->public_notes) { |         } elseif ($this->public_notes) { | ||||||
|             return mb_strimwidth($this->public_notes, 0, 16, '...'); |             return Utils::truncateString($this->public_notes, 16); | ||||||
|         } else { |         } else { | ||||||
|             return '#' . $this->public_id; |             return '#' . $this->public_id; | ||||||
|         } |         } | ||||||
|  | |||||||
| @ -196,7 +196,7 @@ class Task extends EntityModel | |||||||
|     public function getDisplayName() |     public function getDisplayName() | ||||||
|     { |     { | ||||||
|         if ($this->description) { |         if ($this->description) { | ||||||
|             return mb_strimwidth($this->description, 0, 16, '...'); |             return Utils::truncateString($this->description, 16); | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|         return '#' . $this->public_id; |         return '#' . $this->public_id; | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user