mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-17 15:03:25 +00:00
Fix #1134 : Fix permalinks use accross application
This commit is contained in:
@@ -541,15 +541,9 @@ class record_preview extends record_adapter
|
||||
$row['referrer'] = _('report:: visualiseur cooliris');
|
||||
|
||||
if (strpos($row['referrer'], $registry->get('GV_ServerName') . 'document/') !== false) {
|
||||
if (strpos($row['referrer'], '/view/') !== false)
|
||||
$row['referrer'] = _('report::presentation page preview');
|
||||
else
|
||||
$row['referrer'] = _('report::acces direct');
|
||||
}
|
||||
if (strpos($row['referrer'], $registry->get('GV_ServerName') . 'permalink/') !== false) {
|
||||
if (strpos($row['referrer'], '/view/') !== false)
|
||||
$row['referrer'] = _('report::presentation page preview');
|
||||
else
|
||||
$row['referrer'] = _('report::acces direct');
|
||||
}
|
||||
if ( ! isset($referrers[$row['referrer']]))
|
||||
|
@@ -65,9 +65,8 @@ $right = false;
|
||||
$sha256 = $record->get_sha256();
|
||||
$type = $record->get_type();
|
||||
|
||||
$url = '';
|
||||
|
||||
$url = $record->get_preview()->get_permalink()->get_url();
|
||||
$pageurl = $record->get_preview()->get_permalink()->get_page($registry);
|
||||
|
||||
$embed = '';
|
||||
|
||||
@@ -101,22 +100,22 @@ $right = false;
|
||||
break;
|
||||
case 'image':
|
||||
default:
|
||||
$embed = '<a href="' . $url . 'view/"><img src="' . $url . '" title="" /></a>';
|
||||
$embed = '<a href="' . $pageurl . '"><img src="' . $url . '" title="" /></a>';
|
||||
break;
|
||||
}
|
||||
}
|
||||
?>
|
||||
<div class="boxCloser" onclick="parent.hideDwnl();"><?php echo _('boutton::fermer') ?></div>
|
||||
<div id="tweet">
|
||||
<div style="margin-left:20px;padding:10px 0 5px;"><a href="http://www.twitter.com/home/?status=<?php echo $url . 'view/' ?>" target="_blank"><img src="/skins/icons/twitter.ico" title="share this on twitter" style="vertical-align:middle;padding:0 5px;"/> Send to Twitter</a></div>
|
||||
<div style="margin-left:20px;padding:5px 0 10px;"><a href="http://www.facebook.com/sharer.php?u=<?php echo $url . 'view/' ?>" target="_blank"><img src="/skins/icons/facebook.ico" title="share on facebook" style="vertical-align:middle;padding:0 5px;"/> Send to Facebook</a></div>
|
||||
<div style="margin-left:20px;padding:10px 0 5px;"><a href="http://www.twitter.com/home/?status=<?php echo $pageurl ?>" target="_blank"><img src="/skins/icons/twitter.ico" title="share this on twitter" style="vertical-align:middle;padding:0 5px;"/> Send to Twitter</a></div>
|
||||
<div style="margin-left:20px;padding:5px 0 10px;"><a href="http://www.facebook.com/sharer.php?u=<?php echo $pageurl ?>" target="_blank"><img src="/skins/icons/facebook.ico" title="share on facebook" style="vertical-align:middle;padding:0 5px;"/> Send to Facebook</a></div>
|
||||
</div>
|
||||
<div id="embed" style="text-align:center;padding:10px 0;">
|
||||
<div style="text-align:left;margin-left:20px;padding:10px 0;">URL : </div>
|
||||
<?php
|
||||
if ($url != '') {
|
||||
?>
|
||||
<input style="width:90%;" readonly="true" type="text" value="<?php echo $url ?>view/" onfocus="this.focus();this.select();" onclick="this.focus();this.select();" />
|
||||
<input style="width:90%;" readonly="true" type="text" value="<?php echo $pageurl ?>" onfocus="this.focus();this.select();" onclick="this.focus();this.select();" />
|
||||
<?php
|
||||
} else {
|
||||
?>
|
||||
|
Reference in New Issue
Block a user