From c3c202d650506ea3ed3ba9bdb92aae0b065d5e47 Mon Sep 17 00:00:00 2001 From: redmatrix Date: Tue, 12 May 2015 22:57:55 -0700 Subject: issue #187 --- mod/page.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'mod') diff --git a/mod/page.php b/mod/page.php index ad1862a7a..b80982ae1 100644 --- a/mod/page.php +++ b/mod/page.php @@ -35,7 +35,11 @@ function page_init(&$a) { } $channel_address = argv(1); - $page_id = argv(2); + + // The page link title was stored in a urlencoded format + // php or the browser may/will have decoded it, so re-encode it for our search + + $page_id = urlencode(argv(2)); $u = q("select channel_id from channel where channel_address = '%s' limit 1", dbesc($channel_address) -- cgit v1.2.3 From d6f98e651170827453a27fec367f0f8059f3a002 Mon Sep 17 00:00:00 2001 From: redmatrix Date: Wed, 13 May 2015 16:01:00 -0700 Subject: product was a bad string to use because we may require it for e-commerce, and RED_PLATFORM is equally problematic for other reasons. --- mod/parse_url.php | 2 +- mod/siteinfo.php | 2 +- mod/zfinger.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'mod') diff --git a/mod/parse_url.php b/mod/parse_url.php index b6c0559f9..2a6f7663e 100644 --- a/mod/parse_url.php +++ b/mod/parse_url.php @@ -325,7 +325,7 @@ function parse_url_content(&$a) { // If this is a Red site, use zrl rather than url so they get zids sent to them by default - if( x($siteinfo,'generator') && (strpos($siteinfo['generator'],RED_PLATFORM . ' ') === 0)) + if( x($siteinfo,'generator') && (strpos($siteinfo['generator'],PLATFORM_NAME . ' ') === 0)) $template = str_replace('url','zrl',$template); if($siteinfo["title"] == "") { diff --git a/mod/siteinfo.php b/mod/siteinfo.php index 856909a27..b6753f1ab 100644 --- a/mod/siteinfo.php +++ b/mod/siteinfo.php @@ -90,7 +90,7 @@ function siteinfo_init(&$a) { 'default_service_restrictions' => $service_class, 'admin' => $admin, 'site_name' => (($site_name) ? $site_name : ''), - 'platform' => RED_PLATFORM, + 'platform' => PLATFORM_NAME, 'dbdriver' => $db->getdriver(), 'lastpoll' => get_config('system','lastpoll'), 'info' => (($site_info) ? $site_info : ''), diff --git a/mod/zfinger.php b/mod/zfinger.php index e236a1e73..6b93b3410 100644 --- a/mod/zfinger.php +++ b/mod/zfinger.php @@ -280,7 +280,7 @@ function zfinger_init(&$a) { $ret['site']['channels'] = channel_total(); - $ret['site']['version'] = RED_PLATFORM . ' ' . RED_VERSION . '[' . DB_UPDATE_VERSION . ']'; + $ret['site']['version'] = PLATFORM_NAME . ' ' . RED_VERSION . '[' . DB_UPDATE_VERSION . ']'; $ret['site']['admin'] = get_config('system','admin_email'); -- cgit v1.2.3 From c82082d2bbb00294d62330d577dcdbc9ec6b9d1c Mon Sep 17 00:00:00 2001 From: redmatrix Date: Wed, 13 May 2015 16:27:04 -0700 Subject: restrict webpage list to undeleted items --- mod/page.php | 1 - mod/webpages.php | 5 +++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'mod') diff --git a/mod/page.php b/mod/page.php index b80982ae1..25b4d8888 100644 --- a/mod/page.php +++ b/mod/page.php @@ -66,7 +66,6 @@ function page_init(&$a) { intval(ITEM_WEBPAGE), intval(ITEM_PDL) ); - if(! $r) { // Check again with no permissions clause to see if it is a permissions issue diff --git a/mod/webpages.php b/mod/webpages.php index 859c93fde..62abfb34a 100644 --- a/mod/webpages.php +++ b/mod/webpages.php @@ -133,8 +133,9 @@ function webpages_content(&$a) { $sql_extra = item_permissions_sql($owner); $r = q("select * from item_id left join item on item_id.iid = item.id - where item_id.uid = %d and service = 'WEBPAGE' $sql_extra order by item.created desc", - intval($owner) + where item_id.uid = %d and service = 'WEBPAGE' and item_restrict = %d $sql_extra order by item.created desc", + intval($owner), + intval(ITEM_WEBPAGE) ); $pages = null; -- cgit v1.2.3