mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
repository/picasa MDL-17473 Use picasa description as the filename if it exists
This commit is contained in:
parent
5d2ee15194
commit
d44cee76fa
2 changed files with 12 additions and 4 deletions
|
@ -6842,10 +6842,9 @@ function random_string ($length=15) {
|
|||
* @return string $truncate - shortened string
|
||||
*/
|
||||
|
||||
function shorten_text($text, $ideal=30, $exact = false) {
|
||||
function shorten_text($text, $ideal=30, $exact = false, $ending='...') {
|
||||
|
||||
global $CFG;
|
||||
$ending = '...';
|
||||
|
||||
// if the plain text is shorter than the maximum length, return the whole text
|
||||
if (strlen(preg_replace('/<.*?>/', '', $text)) <= $ideal) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue