*/
private static function formatListForExport(array $events, $format)
{
+ $o = '';
+
if (!count($events)) {
- return '';
+ return $o;
}
switch ($format) {
// Format the exported data as a CSV file.
case "csv":
header("Content-type: text/csv");
- $o = '"Subject", "Start Date", "Start Time", "Description", "End Date", "End Time", "Location"' . PHP_EOL;
+ $o .= '"Subject", "Start Date", "Start Time", "Description", "End Date", "End Time", "Location"' . PHP_EOL;
foreach ($events as $event) {
/// @todo The time / date entries don't include any information about the
'network' => $item['author-network'], 'url' => $item['author-link']];
$tag['url'] = Contact::magicLinkByContact($author, $tag['url']);
+ $prefix = '';
if ($tag['type'] == TERM_HASHTAG) {
if ($orig_tag != $tag['url']) {
$item['body'] = str_replace($orig_tag, $tag['url'], $item['body']);
}
$customsize = 0;
+ $photo = false;
switch($a->argc) {
- case 4:
- $customsize = intval($a->argv[2]);
- $uid = self::stripExtension($a->argv[3]);
- $photo = self::getAvatar($uid, $a->argv[1]);
- break;
- case 3:
- $uid = self::stripExtension($a->argv[2]);
- $photo = self::getAvatar($uid, $a->argv[1]);
- break;
- case 2:
- $photoid = self::stripExtension($a->argv[1]);
- $scale = 0;
- if (substr($photoid, -2, 1) == "-") {
- $scale = intval(substr($photoid, -1, 1));
- $photoid = substr($photoid, 0, -2);
- }
- $photo = MPhoto::getPhoto($photoid, $scale);
- if ($photo === false) {
- $photo = MPhoto::createPhotoForSystemResource("images/nosign.jpg");
- }
- break;
+ case 4:
+ $customsize = intval($a->argv[2]);
+ $uid = self::stripExtension($a->argv[3]);
+ $photo = self::getAvatar($uid, $a->argv[1]);
+ break;
+ case 3:
+ $uid = self::stripExtension($a->argv[2]);
+ $photo = self::getAvatar($uid, $a->argv[1]);
+ break;
+ case 2:
+ $photoid = self::stripExtension($a->argv[1]);
+ $scale = 0;
+ if (substr($photoid, -2, 1) == "-") {
+ $scale = intval(substr($photoid, -1, 1));
+ $photoid = substr($photoid, 0, -2);
+ }
+ $photo = MPhoto::getPhoto($photoid, $scale);
+ if ($photo === false) {
+ $photo = MPhoto::createPhotoForSystemResource("images/nosign.jpg");
+ }
+ break;
}
if ($photo === false) {