function doUpdate($sql) { global $debugdb; if ($debugdb) { logMessage('db', 3, "SQL - " . $sql); } $conn = getConn(); $result = $conn->query($sql); if (DB::isError($result)) { logMessage('db', 0, "Query Error " . $result->getMessage(), null, null); genPipeError('db'); } return $conn->affectedrows(); }
if ($_SERVER['HTTP_X_SECONDLIFE_OWNER_NAME'] == $ownername || $_REQUEST['psk'] == $authuser) { $authorized = true; } $command = $_REQUEST['command']; if ($command == "profilepic") { if (!$authorized) { genPipeError('auth'); } if (!isset($_REQUEST['key'])) { genPipeError('param'); } $key = avatarProfilePic($_REQUEST['key']); if ($key == null) { genPipeError('lookup'); } else { genPipeResponse(friendlyUUID($key)); } } else { if ($command == "grouplist") { if (!$authorized) { genPipeError('auth'); } if (!isset($_REQUEST['key'])) { genPipeError('param'); } $list = avatarGroupList($_REQUEST['key']); genPipeResponse($list); } else { genPipeError('param'); } }