View | Details | Raw Unified | Return to bug 222097
Collapse All | Expand All

(-)www/phpvirtualbox/Makefile (+1 lines)
Lines 3-8 Link Here
3
3
4
PORTNAME=	phpvirtualbox
4
PORTNAME=	phpvirtualbox
5
DISTVERSION=	5.1-1
5
DISTVERSION=	5.1-1
6
PORTREVISION=	1
6
CATEGORIES=	www
7
CATEGORIES=	www
7
8
8
MAINTAINER=	vbox@FreeBSD.org
9
MAINTAINER=	vbox@FreeBSD.org
(-)www/phpvirtualbox/files/patch-endpoints_lib_vboxconnector.php (-19 / +28 lines)
Lines 5-11 Link Here
5
 			foreach($checks as $iso) {
5
 			foreach($checks as $iso) {
6
 				try {
6
 				try {
7
-					$gem = $this->vbox->openMedium($iso,'DVD','ReadOnly');
7
-					$gem = $this->vbox->openMedium($iso,'DVD','ReadOnly');
8
+					$gem = $this->vbox->openMedium($iso,'DVD','ReadOnly',null);
8
+					$gem = $this->vbox->openMedium($iso, 'DVD', 'ReadOnly', false);
9
 					break;
9
 					break;
10
 				} catch (Exception $e) {
10
 				} catch (Exception $e) {
11
 					// Ignore
11
 					// Ignore
Lines 14-20 Link Here
14
 		}
14
 		}
15
 		/* @var $m IMachine */
15
 		/* @var $m IMachine */
16
-		$m = $this->vbox->createMachine($this->vbox->composeMachineFilename($args['name'],null,null),$args['name'],null,null,null,false);
16
-		$m = $this->vbox->createMachine($this->vbox->composeMachineFilename($args['name'],null,null),$args['name'],null,null,null,false);
17
+		$m = $this->vbox->createMachine($this->vbox->composeMachineFilename($args['name'],null,null,null),$args['name'],null,null,null,false);
17
+		$m = $this->vbox->createMachine($this->vbox->composeMachineFilename($args['name'], null, null, null), $args['name'], null, null, null, false);
18
 		$sfpath = $m->settingsFilePath;
18
 		$sfpath = $m->settingsFilePath;
19
 
19
 
20
 		/* @var $cm CloneMode */
20
 		/* @var $cm CloneMode */
Lines 23-29 Link Here
23
 								}
23
 								}
24
 							} else {
24
 							} else {
25
-								$med = $this->vbox->openMedium($ma['medium']['location'],$ma['type']);
25
-								$med = $this->vbox->openMedium($ma['medium']['location'],$ma['type']);
26
+								$med = $this->vbox->openMedium($ma['medium']['location'],$ma['type'],null,null);
26
+								$med = $this->vbox->openMedium($ma['medium']['location'], $ma['type'], 'ReadWrite', false);
27
 							}
27
 							}
28
 						} else {
28
 						} else {
29
 							$med = null;
29
 							$med = null;
Lines 36-47 Link Here
36
 				$eprops = array_combine($eprops[1],$eprops[0]);
36
 				$eprops = array_combine($eprops[1],$eprops[0]);
37
 				$iprops = array_map(create_function('$a','$b=explode("=",$a); return array($b[0]=>$b[1]);'),preg_split('/[\r|\n]+/',$args['networkAdapters'][$i]['properties']));
37
 				$iprops = array_map(create_function('$a','$b=explode("=",$a); return array($b[0]=>$b[1]);'),preg_split('/[\r|\n]+/',$args['networkAdapters'][$i]['properties']));
38
 				$inprops = array();
38
 				$inprops = array();
39
@@ -1942,7 +1942,7 @@ class vboxconnector {
40
 			if($args['bootOrder'][$i]) {
41
 				$m->setBootOrder(($i + 1),$args['bootOrder'][$i]);
42
 			} else {
43
-				$m->setBootOrder(($i + 1),null);
44
+				$m->setBootOrder(($i + 1), 'Null');
45
 			}
46
 		}
47
 
39
@@ -2028,7 +2028,7 @@ class vboxconnector {
48
@@ -2028,7 +2028,7 @@ class vboxconnector {
40
 						}
49
 						}
41
 					} else {
50
 					} else {
42
 						/* @var $med IMedium */
51
 						/* @var $med IMedium */
43
-						$med = $this->vbox->openMedium($ma['medium']['location'],$ma['type']);
52
-						$med = $this->vbox->openMedium($ma['medium']['location'],$ma['type']);
44
+						$med = $this->vbox->openMedium($ma['medium']['location'],$ma['type'],null,null);
53
+						$med = $this->vbox->openMedium($ma['medium']['location'], $ma['type'], 'ReadWrite', false);
45
 					}
54
 					}
46
 				} else {
55
 				} else {
47
 					$med = null;
56
 					$med = null;
Lines 59-65 Link Here
59
 	public function remote_vboxGetEnumerationMap($args) {
68
 	public function remote_vboxGetEnumerationMap($args) {
60
 
69
 
61
-		$c = new $args['class'];
70
-		$c = new $args['class'];
62
+		$c = new $args['class'](null,null);
71
+		$c = new $args['class'](null, null);
63
 		return (@isset($args['ValueMap']) ? $c->ValueMap : $c->NameMap);
72
 		return (@isset($args['ValueMap']) ? $c->ValueMap : $c->NameMap);
64
 	}
73
 	}
65
 
74
 
Lines 68-74 Link Here
68
 			$delete = $machine->unregister('DetachAllReturnHardDisksOnly');
77
 			$delete = $machine->unregister('DetachAllReturnHardDisksOnly');
69
 			foreach($delete as $hd) {
78
 			foreach($delete as $hd) {
70
-				$hds[] = $this->vbox->openMedium($hd->location,'HardDisk')->handle;
79
-				$hds[] = $this->vbox->openMedium($hd->location,'HardDisk')->handle;
71
+				$hds[] = $this->vbox->openMedium($hd->location,'HardDisk',null,null)->handle;
80
+				$hds[] = $this->vbox->openMedium($hd->location, 'HardDisk', 'ReadWrite', false)->handle;
72
 			}
81
 			}
73
 
82
 
74
 			/* @var $progress IProgress */
83
 			/* @var $progress IProgress */
Lines 77-83 Link Here
77
 
86
 
78
 		/* Check if file exists */
87
 		/* Check if file exists */
79
-		$filename = $this->vbox->composeMachineFilename($args['name'],($this->settings->phpVboxGroups ? '' : $args['group']),$this->vbox->systemProperties->defaultMachineFolder);
88
-		$filename = $this->vbox->composeMachineFilename($args['name'],($this->settings->phpVboxGroups ? '' : $args['group']),$this->vbox->systemProperties->defaultMachineFolder);
80
+		$filename = $this->vbox->composeMachineFilename($args['name'],($this->settings->phpVboxGroups ? '' : $args['group']),$this->vbox->systemProperties->defaultMachineFolder,null);
89
+		$filename = $this->vbox->composeMachineFilename($args['name'], ($this->settings->phpVboxGroups ? '' : $args['group']), $this->vbox->systemProperties->defaultMachineFolder, null);
81
 
90
 
82
 		if($this->remote_fileExists(array('file'=>$filename))) {
91
 		if($this->remote_fileExists(array('file'=>$filename))) {
83
 			return array('exists' => $filename);
92
 			return array('exists' => $filename);
Lines 86-92 Link Here
86
 				$sc->releaseRemote();
95
 				$sc->releaseRemote();
87
 
96
 
88
-				$m = $this->vbox->openMedium($args['disk'],'HardDisk');
97
-				$m = $this->vbox->openMedium($args['disk'],'HardDisk');
89
+				$m = $this->vbox->openMedium($args['disk'],'HardDisk',null,null);
98
+				$m = $this->vbox->openMedium($args['disk'], 'HardDisk', 'ReadWrite', false);
90
 
99
 
91
 				$this->session->machine->attachDevice(trans($HDbusType,'UIMachineSettingsStorage'),0,0,'HardDisk',$m->handle);
100
 				$this->session->machine->attachDevice(trans($HDbusType,'UIMachineSettingsStorage'),0,0,'HardDisk',$m->handle);
92
 
101
 
Lines 113-119 Link Here
113
 
122
 
114
 			/* @var $progress IProgress */
123
 			/* @var $progress IProgress */
115
-			list($progress, $snapshotId) = $this->session->machine->takeSnapshot($args['name'], $args['description']);
124
-			list($progress, $snapshotId) = $this->session->machine->takeSnapshot($args['name'], $args['description']);
116
+			list($progress, $snapshotId) = $this->session->machine->takeSnapshot($args['name'], $args['description'],null);
125
+			list($progress, $snapshotId) = $this->session->machine->takeSnapshot($args['name'], $args['description'], null);
117
 
126
 
118
 			// Does an exception exist?
127
 			// Does an exception exist?
119
 			try {
128
 			try {
Lines 122-128 Link Here
122
 	    $this->connect();
131
 	    $this->connect();
123
 
132
 
124
-	    $m = $this->vbox->openMedium($args['medium'],'HardDisk');
133
-	    $m = $this->vbox->openMedium($args['medium'],'HardDisk');
125
+	    $m = $this->vbox->openMedium($args['medium'],'HardDisk',null,null);
134
+	    $m = $this->vbox->openMedium($args['medium'], 'HardDisk', 'ReadWrite', false);
126
 
135
 
127
 	    $retval = $m->checkEncryptionPassword($args['password']);
136
 	    $retval = $m->checkEncryptionPassword($args['password']);
128
 
137
 
Lines 131-137 Link Here
131
 	    $this->connect();
140
 	    $this->connect();
132
 
141
 
133
-	    $m = $this->vbox->openMedium($args['medium'], 'HardDisk', 'ReadWrite');
142
-	    $m = $this->vbox->openMedium($args['medium'], 'HardDisk', 'ReadWrite');
134
+	    $m = $this->vbox->openMedium($args['medium'], 'HardDisk', 'ReadWrite',null);
143
+	    $m = $this->vbox->openMedium($args['medium'], 'HardDisk', 'ReadWrite', false);
135
 
144
 
136
 	    /* @var $progress IProgress */
145
 	    /* @var $progress IProgress */
137
 	    $progress = $m->changeEncryption($args['old_password'],
146
 	    $progress = $m->changeEncryption($args['old_password'],
Lines 140-146 Link Here
140
 		$this->connect();
149
 		$this->connect();
141
 
150
 
142
-		$m = $this->vbox->openMedium($args['medium'], 'HardDisk');
151
-		$m = $this->vbox->openMedium($args['medium'], 'HardDisk');
143
+		$m = $this->vbox->openMedium($args['medium'], 'HardDisk',null,null);
152
+		$m = $this->vbox->openMedium($args['medium'], 'HardDisk', 'ReadWrite', false);
144
 
153
 
145
 		/* @var $progress IProgress */
154
 		/* @var $progress IProgress */
146
 		$progress = $m->resize($args['bytes']);
155
 		$progress = $m->resize($args['bytes']);
Lines 149-155 Link Here
149
 
158
 
150
 		/* @var $src IMedium */
159
 		/* @var $src IMedium */
151
-		$src = $this->vbox->openMedium($args['src'], 'HardDisk');
160
-		$src = $this->vbox->openMedium($args['src'], 'HardDisk');
152
+		$src = $this->vbox->openMedium($args['src'], 'HardDisk',null,null);
161
+		$src = $this->vbox->openMedium($args['src'], 'HardDisk', 'ReadWrite', false);
153
 
162
 
154
 		$type = array(($args['type'] == 'fixed' ? 'Fixed' : 'Standard'));
163
 		$type = array(($args['type'] == 'fixed' ? 'Fixed' : 'Standard'));
155
 		if($args['split']) $type[] = 'VmdkSplit2G';
164
 		if($args['split']) $type[] = 'VmdkSplit2G';
Lines 158-164 Link Here
158
 
167
 
159
 		/* @var $m IMedium */
168
 		/* @var $m IMedium */
160
-		$m = $this->vbox->openMedium($args['medium'], 'HardDisk');
169
-		$m = $this->vbox->openMedium($args['medium'], 'HardDisk');
161
+		$m = $this->vbox->openMedium($args['medium'], 'HardDisk',null,null);
170
+		$m = $this->vbox->openMedium($args['medium'], 'HardDisk', 'ReadWrite', false);
162
 		$m->type = $args['type'];
171
 		$m->type = $args['type'];
163
 		$m->releaseRemote();
172
 		$m->releaseRemote();
164
 
173
 
Lines 167-173 Link Here
167
 		$this->connect();
176
 		$this->connect();
168
 
177
 
169
-		return $this->vbox->composeMachineFilename($args['name'],($this->settings->phpVboxGroups ? '' : $args['group']),$this->vbox->systemProperties->defaultMachineFolder);
178
-		return $this->vbox->composeMachineFilename($args['name'],($this->settings->phpVboxGroups ? '' : $args['group']),$this->vbox->systemProperties->defaultMachineFolder);
170
+		return $this->vbox->composeMachineFilename($args['name'],($this->settings->phpVboxGroups ? '' : $args['group']),$this->vbox->systemProperties->defaultMachineFolder,null);
179
+		return $this->vbox->composeMachineFilename($args['name'], ($this->settings->phpVboxGroups ? '' : $args['group']), $this->vbox->systemProperties->defaultMachineFolder, null);
171
 
180
 
172
 	}
181
 	}
173
 
182
 
Lines 176-182 Link Here
176
 
185
 
177
 		/* @var $m IMedium */
186
 		/* @var $m IMedium */
178
-		$m = $this->vbox->openMedium($args['medium'],$args['type']);
187
-		$m = $this->vbox->openMedium($args['medium'],$args['type']);
179
+		$m = $this->vbox->openMedium($args['medium'],$args['type'],null,null);
188
+		$m = $this->vbox->openMedium($args['medium'], $args['type'], 'ReadWrite', false);
180
 		$mediumid = $m->id;
189
 		$mediumid = $m->id;
181
 
190
 
182
 		// connected to...
191
 		// connected to...
Lines 185-191 Link Here
185
 
194
 
186
 		/* @var $m IMedium */
195
 		/* @var $m IMedium */
187
-		$m = $this->vbox->openMedium($args['medium'],$args['type']);
196
-		$m = $this->vbox->openMedium($args['medium'],$args['type']);
188
+		$m = $this->vbox->openMedium($args['medium'],$args['type'],null,null);
197
+		$m = $this->vbox->openMedium($args['medium'], $args['type'], 'ReadWrite', false);
189
 
198
 
190
 		if($args['delete'] && @$this->settings->deleteOnRemove && (string)$m->deviceType == 'HardDisk') {
199
 		if($args['delete'] && @$this->settings->deleteOnRemove && (string)$m->deviceType == 'HardDisk') {
191
 
200
 
Lines 194-200 Link Here
194
 			} else {
203
 			} else {
195
 				/* @var $med IMedium */
204
 				/* @var $med IMedium */
196
-				$med = $this->vbox->openMedium($args['medium']['location'],$args['medium']['deviceType']);
205
-				$med = $this->vbox->openMedium($args['medium']['location'],$args['medium']['deviceType']);
197
+				$med = $this->vbox->openMedium($args['medium']['location'],$args['medium']['deviceType'],null,null);
206
+				$med = $this->vbox->openMedium($args['medium']['location'], $args['medium']['deviceType'], 'ReadWrite', false);
198
 			}
207
 			}
199
 		}
208
 		}
200
 
209
 
Lines 203-209 Link Here
203
 
212
 
204
 		// For $fixed value
213
 		// For $fixed value
205
-		$mvenum = new MediumVariant();
214
-		$mvenum = new MediumVariant();
206
+		$mvenum = new MediumVariant(null,null);
215
+		$mvenum = new MediumVariant(null, null);
207
 		$variant = 0;
216
 		$variant = 0;
208
 
217
 
209
 		foreach($m->variant as $mv) {
218
 		foreach($m->variant as $mv) {

Return to bug 222097