Merge remote-tracking branch 'upstream/master'

Conflicts:
	boot.php
	database.sql
	library/fancybox/jquery.fancybox-1.3.4.css
	mod/search.php
	update.php
This commit is contained in:
Michael Vogel 2013-02-17 12:35:40 +01:00
commit 93143702ed
831 changed files with 37929 additions and 30644 deletions

View file

@ -3665,7 +3665,7 @@ function fix_private_photos($s, $uid, $item = null, $cid = 0) {
// Only embed locally hosted photos
$replace = false;
$i = basename($image);
$i = str_replace(array('.jpg','.png'),array('',''),$i);
$i = str_replace(array('.jpg','.png','.gif'),array('','',''),$i);
$x = strpos($i,'-');
if($x) {
@ -3676,7 +3676,7 @@ function fix_private_photos($s, $uid, $item = null, $cid = 0) {
intval($res),
intval($uid)
);
if(count($r)) {
if($r) {
// Check to see if we should replace this photo link with an embedded image
// 1. No need to do so if the photo is public
@ -3945,6 +3945,34 @@ function drop_item($id,$interactive = true) {
if((local_user() == $item['uid']) || ($cid) || (! $interactive)) {
// Check if we should do HTML-based delete confirmation
if($_REQUEST['confirm']) {
// <form> can't take arguments in its "action" parameter
// so add any arguments as hidden inputs
$query = explode_querystring($a->query_string);
$inputs = array();
foreach($query['args'] as $arg) {
if(strpos($arg, 'confirm=') === false) {
$arg_parts = explode('=', $arg);
$inputs[] = array('name' => $arg_parts[0], 'value' => $arg_parts[1]);
}
}
return replace_macros(get_markup_template('confirm.tpl'), array(
'$method' => 'get',
'$message' => t('Do you really want to delete this item?'),
'$extra_inputs' => $inputs,
'$confirm' => t('Yes'),
'$confirm_url' => $query['base'],
'$confirm_name' => 'confirmed',
'$cancel' => t('Cancel'),
));
}
// Now check how the user responded to the confirmation query
if($_REQUEST['canceled']) {
goaway($a->get_baseurl() . '/' . $_SESSION['return_url']);
}
logger('delete item: ' . $item['id'], LOGGER_DEBUG);
// delete the item