[moodle] / moodle / lib / googleapi.php Repository:

Diff of /moodle/lib/googleapi.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.3, Mon Jan 19 14:59:47 2009 WST revision 1.4, Mon Jan 19 15:19:26 2009 WST

By moodler:

repository/picasa MDL-17473 Use picasa description as the filename if it exists

# Line 432  Line 432 
432              //hacky...              //hacky...
433              $thumbnailinfo = $mediainfo->group->thumbnail[0]->attributes();              $thumbnailinfo = $mediainfo->group->thumbnail[0]->attributes();
434    
435              $files[] = array('title' => (string) $mediainfo->group->title,              // Derive the nicest file name we can
436                if (!empty($mediainfo->group->description)) {
437                    $title = shorten_text((string)$mediainfo->group->description, 20, false, '');
438                    $title = clean_filename($title).'.jpg';
439                } else {
440                    $title = (string)$mediainfo->group->title;
441                }
442    
443                $files[] = array(
444                    'title' => $title,
445                  'date'  => userdate($gphoto->timestamp),                  'date'  => userdate($gphoto->timestamp),
446                  'size' => (int) $gphoto->size,                  'size' => (int) $gphoto->size,
447                  'path' => $gphoto->albumid.'/'.$gphoto->id,                  'path' => $gphoto->albumid.'/'.$gphoto->id,
448                  'thumbnail' => (string) $thumbnailinfo['url'],                  'thumbnail' => (string) $thumbnailinfo['url'],
449                  'thumbnail_width' => 72,  // 72 is the native maximum dimension                  'thumbnail_width' => 72,  // 72 is the native maximum dimension
450                  'thumbnail_height' => 72,                  'thumbnail_height' => 72,
451                  'source' => (string) $fullinfo['url'],                  'source' => (string) $fullinfo['url']
452              );              );
453          }          }
454    

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

Moodle CVS Admin
ViewVC Help
Powered by ViewVC 1.0.7