diff options
author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2008-08-06 12:48:15 +0000 |
---|---|---|
committer | Kelly Rauchenberger <fefferburbia@gmail.com> | 2008-08-06 12:48:15 +0000 |
commit | d000f93b1c6b930874f3b02d04c3965b54e784d5 (patch) | |
tree | 6ad6b6b6eacce02df8fb44bbc929fee9d4ed1029 /central | |
parent | b0a04dab2757b6d3ff20f82ac8215c161a6eb030 (diff) | |
download | instadisc-d000f93b1c6b930874f3b02d04c3965b54e784d5.tar.gz instadisc-d000f93b1c6b930874f3b02d04c3965b54e784d5.tar.bz2 instadisc-d000f93b1c6b930874f3b02d04c3965b54e784d5.zip |
Central: Changed semantics' type
Previously, semantics was an array, but apparently XML-RPC only allows arrays of xmlrpcvals, so it was changed to a serialized array (string).
Diffstat (limited to 'central')
-rw-r--r-- | central/trunk/instadisc.php | 8 | ||||
-rw-r--r-- | central/trunk/xmlrpc.php | 2 |
2 files changed, 8 insertions, 2 deletions
diff --git a/central/trunk/instadisc.php b/central/trunk/instadisc.php index 5da1d54..421f058 100644 --- a/central/trunk/instadisc.php +++ b/central/trunk/instadisc.php | |||
@@ -70,6 +70,12 @@ function instaDisc_sendItem($username, $id) | |||
70 | $out .= 'Title: ' . $getitem3['title'] . "\r\n"; | 70 | $out .= 'Title: ' . $getitem3['title'] . "\r\n"; |
71 | $out .= 'Author: ' . $getitem3['author'] . "\r\n"; | 71 | $out .= 'Author: ' . $getitem3['author'] . "\r\n"; |
72 | $out .= 'URL: ' . $getitem3['url'] . "\r\n"; | 72 | $out .= 'URL: ' . $getitem3['url'] . "\r\n"; |
73 | |||
74 | foreach (deserialize($getitem3['semantics']) as $name => $value) | ||
75 | { | ||
76 | $out .= $name . ': ' . $value . "\r\n"; | ||
77 | } | ||
78 | |||
73 | $out .= "\r\n\r\n"; | 79 | $out .= "\r\n\r\n"; |
74 | 80 | ||
75 | fwrite($fp, $out); | 81 | fwrite($fp, $out); |
@@ -128,7 +134,7 @@ function instaDisc_addItem($username, $subscription, $title, $author, $url, $sem | |||
128 | $setuser = "UPDATE users SET nextItemID = nextItemID+1 WHERE username = \"" . mysql_real_escape_string($username) . "\""; | 134 | $setuser = "UPDATE users SET nextItemID = nextItemID+1 WHERE username = \"" . mysql_real_escape_string($username) . "\""; |
129 | $setuser2 = mysql_query($setuser); | 135 | $setuser2 = mysql_query($setuser); |
130 | 136 | ||
131 | $insitem = "INSERT INTO inbox (username, itemID, subscription, title, author, url, semantics) VALUES (\"" . mysql_real_escape_string($username) . "\", " . $itemID . ", \"" . mysql_real_escape_string($subscription) . "\", \"" . mysql_real_escape_string($title) . "\", \"" . mysql_real_escape_string($author) . "\", \"" . mysql_real_escape_string($url) . "\", \"" . mysql_real_escape_string(serialize($semantics)) . "\")"; | 137 | $insitem = "INSERT INTO inbox (username, itemID, subscription, title, author, url, semantics) VALUES (\"" . mysql_real_escape_string($username) . "\", " . $itemID . ", \"" . mysql_real_escape_string($subscription) . "\", \"" . mysql_real_escape_string($title) . "\", \"" . mysql_real_escape_string($author) . "\", \"" . mysql_real_escape_string($url) . "\", \"" . mysql_real_escape_string($semantics) . "\")"; |
132 | $insitem2 = mysql_query($insitem); | 138 | $insitem2 = mysql_query($insitem); |
133 | 139 | ||
134 | instaDisc_sendItem($username, $itemID); | 140 | instaDisc_sendItem($username, $itemID); |
diff --git a/central/trunk/xmlrpc.php b/central/trunk/xmlrpc.php index 3ffd1e1..5373f80 100644 --- a/central/trunk/xmlrpc.php +++ b/central/trunk/xmlrpc.php | |||
@@ -102,7 +102,7 @@ function sendFromUpdate($username, $verification, $verificationID, $subscription | |||
102 | new xmlrpcval($title, 'string'), | 102 | new xmlrpcval($title, 'string'), |
103 | new xmlrpcval($author, 'string'), | 103 | new xmlrpcval($author, 'string'), |
104 | new xmlrpcval($url, 'string'), | 104 | new xmlrpcval($url, 'string'), |
105 | new xmlrpcval($semantics, 'array'), | 105 | new xmlrpcval($semantics, 'string'), |
106 | new xmlrpcval(instaDisc_getConfig('softwareVersion'), 'int'), | 106 | new xmlrpcval(instaDisc_getConfig('softwareVersion'), 'int'), |
107 | new xmlrpcval(instaDisc_getConfig('databaseVersion'), 'int'))); | 107 | new xmlrpcval(instaDisc_getConfig('databaseVersion'), 'int'))); |
108 | $client->send($msg); | 108 | $client->send($msg); |