--- mysite.module	2008-02-13 01:27:07.000000000 +0000
+++ /home/jonny/sites/drupal5/modules/mysite/mysite.module	2008-03-25 05:12:06.000000000 +0000
@@ -726,7 +726,14 @@ function mysite_page($uid = NULL, $page 
           append the themed data to the $data array
           using the order value as the key
       */
-      $sql = 'SELECT mid, uid, page, title, type, type_id, sort, position, format, settings, locked FROM {mysite_data} WHERE (uid = %d OR (uid = 0 AND locked = 1)) AND page = %d ORDER BY position ASC, sort ASC';
+
+			if($user->uid != $owner->uid && module_exists('mysite_ur_access_control')) {
+				$sql = _mysite_ur_access_control_sql($user, $owner);
+			}
+			else {
+	      $sql = 'SELECT mid, uid, page, title, type, type_id, sort, position, format, settings, locked FROM {mysite_data} WHERE (uid = %d OR (uid = 0 AND locked = 1)) AND page = %d ORDER BY position ASC, sort ASC';
+	    }
+
       $result = db_query($sql, $owner->uid, $page);
       $i = 0;
       $allowed = variable_get('mysite_content', array());
@@ -2148,6 +2155,11 @@ function mysite_content_settings_form($e
     '#type' => 'value',
     '#value' => $edit['position']
   );
+  
+	if(module_exists('mysite_ur_access_control')) {
+		$form['data']['ur_access_control'] = _mysite_ur_access_control_form($edit['mid']);
+	}
+  
   // formats for the item -- test the data for format options
   $func = 'mysite_type_'. $edit['type'] .'_data';
   mysite_load_includes('types', $edit['type']);
@@ -2283,6 +2295,11 @@ function mysite_content_settings_form_su
   if (function_exists('mysite_type_'. $form_values['type'] .'_content_form_submit')) {
     module_invoke('mysite_type', $form_values['type'] .'_content_form_submit', $form_values);
   }
+
+ 	if(module_exists('mysite_ur_access_control')) {
+		_mysite_ur_access_control_form_submit($form_values);
+	}
+
   mysite_updated($form_values['uid']);
 }
 
