Closed (fixed)
Project:
Windows Live Writer BlogAPI
Version:
6.x-1.2
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
9 Dec 2008 at 17:12 UTC
Updated:
24 Dec 2008 at 02:41 UTC
function wlw_blogapi_blogger_get_users_blogs($appid, $username, $password) {
$user = wlw_blogapi_validate_user($username, $password);
if ($user->uid) {
$types = _wlw_blogapi_get_node_types();
$structs = array();
foreach ($types as $type) {
if (strcmp($type, 'blog') == 0) {
$url = 'blog/'. $user->uid;
$blogName = $user->name .': '. $type;
}
else {
$url = 'node/';
$blogName = $type;
}
$structs[] = array('url' => url($url, array('absolute' => TRUE)), 'blogid' => $type, 'blogName' => $blogName);
}
return $structs;
}
else {
return wlw_blogapi_error($user);
}
}
I found "blog/" literal in you code.
but page of "story" or "page" and user-defined ContentTypes are "node".
so, I fix it.
This fix makes style retrieval success.
Lucky!! :-)
I think ContentType.name is more better than ContentType.type for $blogName.
but I don't know grammer of php language. and tired...
so, please support it. sorry.
and I think $blogName and $url of ContentTypes from module are to get from the module, rather than literal.
... Is there any API ? I don't know... orz...
---
I send my contact info from contact form, but no responce... busy?
and I thought here is more proper than corey blog.
Comments
Comment #1
jrglasgow commentedThis is the proper place to bring these things up.
I made your changes, they seem to work fine for my tests.
I committed the changes and they are in the most recent release 6.x-1.3
Comment #2
jrglasgow commented