aboutsummaryrefslogtreecommitdiffstats
path: root/include/import.php
diff options
context:
space:
mode:
authorredmatrix <git@macgirvin.com>2016-07-31 20:14:25 -0700
committerredmatrix <git@macgirvin.com>2016-07-31 20:14:25 -0700
commit9b9621e10d669e7d1bc18a781c40bfc5687330c3 (patch)
treef84527d4c04d002b2ed4060de15921cc27de3cc2 /include/import.php
parent86eb923f296ff911e3f516e9052b3edc55a02c8a (diff)
downloadvolse-hubzilla-9b9621e10d669e7d1bc18a781c40bfc5687330c3.tar.gz
volse-hubzilla-9b9621e10d669e7d1bc18a781c40bfc5687330c3.tar.bz2
volse-hubzilla-9b9621e10d669e7d1bc18a781c40bfc5687330c3.zip
add a few more path macros to portable menu elements (channelurl, pageurl, storeurl and baseurl)
Diffstat (limited to 'include/import.php')
-rw-r--r--include/import.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/import.php b/include/import.php
index 0b2cd38df..27e0bfac6 100644
--- a/include/import.php
+++ b/include/import.php
@@ -784,7 +784,11 @@ function import_menus($channel,$menus) {
foreach($menu['items'] as $it) {
$mitem = array();
+ $mitem['mitem_link'] = str_replace('[channelurl]',z_root() . '/channel/' . $channel['channel_address'],$it['link']);
+ $mitem['mitem_link'] = str_replace('[pageurl]',z_root() . '/page/' . $channel['channel_address'],$it['link']);
+ $mitem['mitem_link'] = str_replace('[storeurl]',z_root() . '/store/' . $channel['channel_address'],$it['link']);
$mitem['mitem_link'] = str_replace('[baseurl]',z_root(),$it['link']);
+
$mitem['mitem_desc'] = escape_tags($it['desc']);
$mitem['mitem_order'] = intval($it['order']);
if(is_array($it['flags'])) {
@@ -864,7 +868,12 @@ function sync_menus($channel,$menus) {
foreach($menu['items'] as $it) {
$mitem = array();
+
+ $mitem['mitem_link'] = str_replace('[channelurl]',z_root() . '/channel/' . $channel['channel_address'],$it['link']);
+ $mitem['mitem_link'] = str_replace('[pageurl]',z_root() . '/page/' . $channel['channel_address'],$it['link']);
+ $mitem['mitem_link'] = str_replace('[storeurl]',z_root() . '/store/' . $channel['channel_address'],$it['link']);
$mitem['mitem_link'] = str_replace('[baseurl]',z_root(),$it['link']);
+
$mitem['mitem_desc'] = escape_tags($it['desc']);
$mitem['mitem_order'] = intval($it['order']);
if(is_array($it['flags'])) {