Index: openacs-4/packages/acs-subsite/www/o.vuh =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/www/o.vuh,v diff -u -r1.1 -r1.2 --- openacs-4/packages/acs-subsite/www/o.vuh 14 Jun 2004 12:27:12 -0000 1.1 +++ openacs-4/packages/acs-subsite/www/o.vuh 5 Feb 2005 11:57:13 -0000 1.2 @@ -8,11 +8,10 @@ @cvs-id $Id$ } {} -if {![regexp {^/([0-9]+)(-(.+))?$} [ad_conn path_info] match object_id dummy anchor]} { - ad_return_warning "Invalid object_id" [subst { - We could not find this object. This probably means that - the link you have clicked is broken. - We are sorry for this inconvenience. [ad_conn path_info] +if {![regexp {^/([0-9]{1,8})(-(.+))?$} [ad_conn path_info] match object_id dummy anchor]} { + ad_return_warning "Invalid object id" [subst { + The identifier given for this object is invalid. Please check your url + or contact the webmaster if you think it should work. }] return } @@ -21,10 +20,13 @@ set anchor "#$anchor" } -db_0or1row object_data { +if {![ db_0or1row object_data { select o.object_type, o.title, o.package_id from acs_objects o where o.object_id = :object_id +}]} { + ns_returnnotfound + return } # Users are handled as a special case since we want to preserve the subsite