set_time_limit(0);
-define ( 'FRIENDIKA_VERSION', '2.1.940' );
+define ( 'FRIENDIKA_VERSION', '2.1.941' );
define ( 'DFRN_PROTOCOL_VERSION', '2.2' );
-define ( 'DB_UPDATE_VERSION', 1046 );
+define ( 'DB_UPDATE_VERSION', 1047 );
define ( 'EOL', "<br />\r\n" );
define ( 'ATOM_TIME', 'Y-m-d\TH:i:s\Z' );
`plink` char(255) NOT NULL,
`resource-id` char(255) NOT NULL,
`tag` mediumtext NOT NULL,
+ `attach` mediumtext NOT NULL,
`inform` mediumtext NOT NULL,
`location` char(255) NOT NULL,
`coord` char(255) NOT NULL,
if($scheme && $term && stristr($scheme,'X-DFRN:'))
$tag_arr[] = substr($scheme,7,1) . '[url=' . unxmlify(substr($scheme,9)) . ']' . unxmlify($term) . '[/url]';
elseif($term)
- $tag_arr[] = $term;
+ $tag_arr[] = notags(trim($term));
}
$res['tag'] = implode(',', $tag_arr);
}
+ $attach = $item->get_enclosures();
+ if($attach) {
+ $att_arr = array();
+ foreach($attach as $att) {
+ $len = intval($att->get_length());
+ $link = str_replace(',','%2D', notags(trim($att->get_link())));
+ $title = str_replace(',','%2D',notags(trim($att->get_title())));
+ $type = notags(trim($att->get_type()));
+ if((! $link) || (strpos($link,'http') !== 0))
+ continue;
+
+ if(! $title)
+ $title = ' ';
+ if(! $type)
+ $type = 'application/octet-stream';
+
+ // this isn't legal html - there is no size in an 'a' tag, remember to strip it before display
+
+ $att_arr[] = '<a href="' . $link . '" size="' . $len . '" type="' . $type . '">' . $title . '</a>';
+ }
+ $res['attach'] = implode(',', $att_arr);
+ }
+
$rawobj = $item->get_item_tags(NAMESPACE_ACTIVITY, 'object');
if($rawobj) {
}
}
+ $o .= item_getfeedattach($item);
+
$mentioned = get_mentions($item);
if($mentioned)
$o .= $mentioned;
return $ret;
}
+function item_getfeedattach($item) {
+ $ret = array();
+ $arr = explode(',',$item['attach']);
+ if(count($arr)) {
+ foreach($arr as $r) {
+ $matches = false;
+ $cnt = preg_match('|\<a href=\"(.+?)\" size=\"(.+?)\" type=\"(.+?)\" >(.+?)</a>|',$item['attach'],$matches);
+ if($cnt) {
+ $ret .= '<link href="' . $matches[1] . '" type="' . $matches[3] . '" ';
+ if(intval($matches[2]))
+ $ret .= 'size="' . intval($matches[2]) . '" ';
+ if($matches[4] !== ' ')
+ $ret .= 'title="' . $matches[4] . '" ';
+ $ret .= ' />' . "\r\n";
+ }
+ }
+ }
+ return $ret;
+}
+
function item_expire($uid,$days) {
$loose_reg = get_config('system','no_regfullname');
if((! $loose_reg) && (! strpos($username,' ')))
- $err .= t("That doesn\'t appear to be your full \x28First Last\x29 name.") . EOL;
+ $err .= t("That doesn't appear to be your full \x28First Last\x29 name.") . EOL;
if(! allowed_email($email))
$err .= t('Your email domain is not among those allowed on this site.') . EOL;
function update_1045() {
q("ALTER TABLE `user` ADD `language` CHAR( 16 ) NOT NULL DEFAULT 'en' AFTER `timezone` ");
}
+
+function update_1046() {
+ q("ALTER TABLE `item` ADD `attach` MEDIUMTEXT NOT NULL AFTER `tag` ");
+}
msgstr ""
#: ../../mod/register.php:89
-msgid "That doesn\\'t appear to be your full (First Last) name."
+msgid "That doesn't appear to be your full (First Last) name."
msgstr ""
#: ../../mod/register.php:92
$a->strings['Please enter the required information.'] = 'Please enter the required information.';
$a->strings['Please use a shorter name.'] = 'Please use a shorter name.';
$a->strings['Name too short.'] = 'Name too short.';
-$a->strings["That doesn\'t appear to be your full \x28First Last\x29 name."] = "That doesn\'t appear to be your full \x28First Last\x29 name.";
+$a->strings["That doesn't appear to be your full \x28First Last\x29 name."] = "That doesn't appear to be your full \x28First Last\x29 name.";
$a->strings['Your email domain is not among those allowed on this site.'] = 'Your email domain is not among those allowed on this site.';
$a->strings['Not a valid email address.'] = 'Not a valid email address.';
$a->strings['Cannot use that email.'] = 'Cannot use that email.';
#: ../../mod/register.php:89
#, fuzzy
-msgid "That doesn\\'t appear to be your full (First Last) name."
+msgid "That doesn't appear to be your full (First Last) name."
msgstr "Ceci ne semble pas être votre nom complet (Prénom Nom)."
#: ../../mod/register.php:92
$a->strings["Please enter the required information."] = "Entrez les informations requises.";
$a->strings["Please use a shorter name."] = "Utilisez un nom plus court.";
$a->strings["Name too short."] = "Nom trop court.";
-$a->strings["That doesn\\'t appear to be your full (First Last) name."] = "Ceci ne semble pas être votre nom complet (Prénom Nom).";
+$a->strings["That doesn't appear to be your full (First Last) name."] = "Ceci ne semble pas être votre nom complet (Prénom Nom).";
$a->strings["Your email domain is not among those allowed on this site."] = "Votre domaine de courriel n'est pas autorisé sur ce site.";
$a->strings["Not a valid email address."] = "Ceci n'est pas une adresse courriel valide.";
$a->strings["Cannot use that email."] = "Impossible d'utiliser ce courriel.";
msgstr "Il Nome è troppo corto."
#: ../../mod/register.php:89
-msgid "That doesn\\'t appear to be your full (First Last) name."
+msgid "That doesn't appear to be your full (First Last) name."
msgstr "Questo non sembra essere il tuo nome completo (Nome Cognome)."
#: ../../mod/register.php:92
$a->strings["Please enter the required information."] = "Inserisci le informazioni richieste.";
$a->strings["Please use a shorter name."] = "Usa un nome più corto.";
$a->strings["Name too short."] = "Il Nome è troppo corto.";
-$a->strings["That doesn\\'t appear to be your full (First Last) name."] = "Questo non sembra essere il tuo nome completo (Nome Cognome).";
+$a->strings["That doesn't appear to be your full (First Last) name."] = "Questo non sembra essere il tuo nome completo (Nome Cognome).";
$a->strings["Your email domain is not among those allowed on this site."] = "Il dominio della tua email non è tra quelli autorizzati su questo sito.";
$a->strings["Not a valid email address."] = "Indirizzo email invaildo.";
$a->strings["Cannot use that email."] = "Questa email non si puo' usare.";
$a->strings['Please enter the required information.'] = 'Fyll i alla obligatoriska fält.';
$a->strings['Please use a shorter name.'] = 'Välj ett kortare namn.';
$a->strings['Name too short.'] = 'Namnet är för kort.';
-$a->strings["That doesn\'t appear to be your full \x28First Last\x29 name."] = "Du verkar inte ha angett ditt fullständiga namn.";
+$a->strings["That doesn't appear to be your full \x28First Last\x29 name."] = "Du verkar inte ha angett ditt fullständiga namn.";
$a->strings['Your email domain is not among those allowed on this site.'] = 'Din e-postdomän är inte tillåten på den här webbplatsen.';
$a->strings['Not a valid email address.'] = 'Ogiltig e-postadress.';
$a->strings['Cannot use that email.'] = 'Otillåten e-postadress.';