Index: openacs-4/packages/acs-admin/www/apm/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/apm/index.tcl,v diff -u -N -r1.30 -r1.30.2.1 --- openacs-4/packages/acs-admin/www/apm/index.tcl 7 Aug 2017 23:47:45 -0000 1.30 +++ openacs-4/packages/acs-admin/www/apm/index.tcl 13 Mar 2019 09:32:15 -0000 1.30.2.1 @@ -17,22 +17,22 @@ set user_id [ad_conn user_id] -# Determine the user's email address. If its not registered, put in a default. -set my_email [db_string email_by_user_id { - select email from parties where party_id = :user_id -} -default "me"] +# Determine the user's email address to filter packages belonging to 'me' +set my_email [party::get -party_id $user_id -element email] set dimensional_list { { supertype "Package Type:" all { - { apm_application "Applications" { where "[db_map apm_application]" } } - { apm_service "Services" { where "t.package_type = 'apm_service'"} } + { apm_application "Applications" { where {t.package_type = 'apm_application'} } } + { apm_service "Services" { where {t.package_type = 'apm_service'}} } { all "All" {} } } } { owned_by "Owned by:" everyone { - { me "Me" {where "[db_map everyone]"} } + { me "Me" {where {exists (select 1 from apm_package_owners o + where o.version_id = v.version_id + and owner_uri='mailto:' || :my_email)}} } { everyone "Everyone" {where "1 = 1"} } } } Index: openacs-4/packages/acs-admin/www/apm/index.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/apm/index.xql,v diff -u -N --- openacs-4/packages/acs-admin/www/apm/index.xql 27 Oct 2014 16:38:51 -0000 1.5 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,16 +0,0 @@ - - - - - - t.package_type = 'apm_application' - - - - - - exists (select 1 from apm_package_owners o where o.version_id = v.version_id and owner_uri='mailto:$my_email') - - - -