$image["thumb"] = $a->get_baseurl()."/photo/{$hash}-3.".$ph->getExt();
}
- if (isset($image["thumb"]))
- $image["preview"] = $image["thumb"];
+ // Set the full image as preview image. This will be overwritten, if the picture is larger than 640.
+ $image["preview"] = $image["full"];
- if (isset($image["small"]))
- $image["preview"] = $image["small"];
+ // Deactivated, since that would result in a cropped preview, if the picture wasn't larger than 320
+ //if (isset($image["thumb"]))
+ // $image["preview"] = $image["thumb"];
+
+ // Unsure, if this should be activated or deactivated
+ //if (isset($image["small"]))
+ // $image["preview"] = $image["small"];
if (isset($image["medium"]))
$image["preview"] = $image["medium"];
if(false === $r)
$errors .= t('Errors encountered creating database tables.').$name.EOL;
} else {
+ // Drop the index if it isn't present in the definition
+ foreach ($database[$name]["indexes"] AS $indexname => $fieldnames)
+ if (!isset($structure["indexes"][$indexname])) {
+ $sql2=db_drop_index($indexname);
+ if ($sql3 == "")
+ $sql3 = "ALTER TABLE `".$name."` ".$sql2;
+ else
+ $sql3 .= ", ".$sql2;
+ }
+
// Compare the field structure field by field
foreach ($structure["fields"] AS $fieldname => $parameters) {
if (!isset($database[$name]["fields"][$fieldname])) {
}
}
}
- // Drop the index if it isn't present in the definition
- if (isset($database[$name]))
- foreach ($database[$name]["indexes"] AS $indexname => $fieldnames)
- if (!isset($structure["indexes"][$indexname])) {
- $sql2=db_drop_index($indexname);
- if ($sql3 == "")
- $sql3 = "ALTER TABLE `".$name."` ".$sql2;
- else
- $sql3 .= ", ".$sql2;
- }
// Create the index
foreach ($structure["indexes"] AS $indexname => $fieldnames) {
),
"indexes" => array(
"PRIMARY" => array("id"),
- "access" => array("cat(30)","k(30)"),
+ "cat_k" => array("cat(30)","k(30)"),
)
);
$database["contact"] = array(
),
"indexes" => array(
"PRIMARY" => array("id"),
- "access" => array("uid","cat(30)","k(30)"),
+ "uid_cat_k" => array("uid","cat(30)","k(30)"),
)
);
$database["photo"] = array(
$msg = trim($msg."\n".$line);
// Is the new message empty by now or is it a reshared message?
elseif (($msg == "") OR (($row == 1) AND (substr($msg, 0, 4) == $recycle)))
- $msg = substr(substr(trim($msg."\n".$line), 0, $limit), 0, -3)."...";
+ $msg = iconv_substr(iconv_substr(trim($msg."\n".$line), 0, $limit, "UTF-8"), 0, -3, "UTF-8")."...";
else
break;
}
$msg = str_replace(" ", " ", $msg);
// Twitter is using its own limiter, so we always assume that shortened links will have this length
- if (strlen($link) > 0)
+ if (iconv_strlen($link, "UTF-8") > 0)
$limit = $limit - 23;
- if (strlen($msg) > $limit) {
+ if (iconv_strlen($msg, "UTF-8") > $limit) {
if (!isset($post["url"])) {
$limit = $limit - 23;