<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>大宇空间 &#187; uchome</title>
	<atom:link href="http://www.dayu.name/p/category/uh/feed" rel="self" type="application/rss+xml" />
	<link>http://www.dayu.name</link>
	<description>人生是一场旅行，我们才刚刚上路</description>
	<lastBuildDate>Sat, 31 Dec 2011 15:38:25 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>BUG：UCHome分享用户时的头像显示不正常</title>
		<link>http://www.dayu.name/p/392.html</link>
		<comments>http://www.dayu.name/p/392.html#comments</comments>
		<pubDate>Sat, 15 Aug 2009 04:12:23 +0000</pubDate>
		<dc:creator>大宇</dc:creator>
				<category><![CDATA[uchome]]></category>

		<guid isPermaLink="false">http://dayu.name/?p=392</guid>
		<description><![CDATA[版本：UCHome2.0 BUG描述：分享用户时，头像显示会有代码显示的不正常情况出现。 修改建议：修改文件/sourc/cp_share.php $arr['image'] = avatar($id, 'middle'); //修改为 $arr['image'] = avatar($id, 'middle',true);]]></description>
			<content:encoded><![CDATA[<p>版本：UCHome2.0<br />
BUG描述：分享用户时，头像显示会有代码显示的不正常情况出现。<br />
修改建议：修改文件/sourc/cp_share.php</p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline"><span style="color: #00008b;">$arr</span><span style="color: Olive;">[</span><span style="color: #8b0000;">'</span><span style="color: Red;">image</span><span style="color: #8b0000;">'</span><span style="color: Olive;">]</span><span style="color: Gray;"> = </span><span style="color: Blue;">avatar</span><span style="color: Olive;">(</span><span style="color: #00008b;">$id</span><span style="color: Gray;">, </span><span style="color: #8b0000;">'</span><span style="color: Red;">middle</span><span style="color: #8b0000;">'</span><span style="color: Olive;">)</span><span style="color: Gray;">;</span></li>
<li><span style="color: #ffa500;">//修改为</span></li>
<li><span style="color: #00008b;">$arr</span><span style="color: Olive;">[</span><span style="color: #8b0000;">'</span><span style="color: Red;">image</span><span style="color: #8b0000;">'</span><span style="color: Olive;">]</span><span style="color: Gray;"> = </span><span style="color: Blue;">avatar</span><span style="color: Olive;">(</span><span style="color: #00008b;">$id</span><span style="color: Gray;">, </span><span style="color: #8b0000;">'</span><span style="color: Red;">middle</span><span style="color: #8b0000;">'</span><span style="color: Gray;">,</span><span style="color: Green;">true</span><span style="color: Olive;">)</span><span style="color: Gray;">;</span></li>
</ol></div>
]]></content:encoded>
			<wfw:commentRss>http://www.dayu.name/p/392.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>UCHOME API Plus V1.1完稿</title>
		<link>http://www.dayu.name/p/384.html</link>
		<comments>http://www.dayu.name/p/384.html#comments</comments>
		<pubDate>Thu, 13 Aug 2009 09:36:57 +0000</pubDate>
		<dc:creator>大宇</dc:creator>
				<category><![CDATA[uchome]]></category>

		<guid isPermaLink="false">http://dayu.name/?p=384</guid>
		<description><![CDATA[基本上用的都是UCHome自身的代码。 加强版的API基本功能有： 用户登录 博客日志的发布/编辑/获取 下载地址：uchome_pipe_1_1]]></description>
			<content:encoded><![CDATA[<p>基本上用的都是UCHome自身的代码。</p>
<p>加强版的API基本功能有：</p>
<ul>
<li>用户登录</li>
<li>博客日志的发布/编辑/获取</li>
</ul>
<p>下载地址：<a href='http://dayu.name/wp-content/uploads/2009/08/uchome_pipe_1_1.rar'>uchome_pipe_1_1</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.dayu.name/p/384.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>发布日志指定好友时的一个漏洞 or BUG</title>
		<link>http://www.dayu.name/p/381.html</link>
		<comments>http://www.dayu.name/p/381.html#comments</comments>
		<pubDate>Wed, 12 Aug 2009 03:40:14 +0000</pubDate>
		<dc:creator>大宇</dc:creator>
				<category><![CDATA[uchome]]></category>
		<category><![CDATA[BUG]]></category>
		<category><![CDATA[漏洞]]></category>

		<guid isPermaLink="false">http://dayu.name/?p=381</guid>
		<description><![CDATA[文件/sourc/function_blog.php 大约在34行左右，找到代码： $names = empty($_POST['target_names'])?array():explode('&#160;', str_replace(cplang('tab_space'), ' ', $_POST['target_names'])); 注意此处的 $_POST['target_names'] 应该是使用过滤后的 $POST 变量才对]]></description>
			<content:encoded><![CDATA[<p>文件/sourc/function_blog.php</p>
<p>大约在34行左右，找到代码：</p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline"><span style="color: #00008b;">$names</span><span style="color: Gray;"> = </span><span style="color: Green;">empty</span><span style="color: Olive;">(</span><span style="color: #00008b;">$_POST</span><span style="color: Olive;">[</span><span style="color: #8b0000;">'</span><span style="color: Red;">target_names</span><span style="color: #8b0000;">'</span><span style="color: Olive;">])</span><span style="color: Gray;">?</span><span style="color: Green;">array</span><span style="color: Olive;">()</span><span style="color: Gray;">:</span><span style="color: Blue;">explode</span><span style="color: Olive;">(</span><span style="color: #8b0000;">'</span><span style="color: Red;">&nbsp;</span><span style="color: #8b0000;">'</span><span style="color: Gray;">, </span><span style="color: Blue;">str_replace</span><span style="color: Olive;">(</span><span style="color: Blue;">cplang</span><span style="color: Olive;">(</span><span style="color: #8b0000;">'</span><span style="color: Red;">tab_space</span><span style="color: #8b0000;">'</span><span style="color: Olive;">)</span><span style="color: Gray;">, </span><span style="color: #8b0000;">'</span><span style="color: Red;"> </span><span style="color: #8b0000;">'</span><span style="color: Gray;">, </span><span style="color: #00008b;">$_POST</span><span style="color: Olive;">[</span><span style="color: #8b0000;">'</span><span style="color: Red;">target_names</span><span style="color: #8b0000;">'</span><span style="color: Olive;">]))</span><span style="color: Gray;">;</span></li>
</ol></div>
<p>注意此处的 $_POST['target_names'] 应该是使用过滤后的 $POST 变量才对</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dayu.name/p/381.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HACK：WP自带xmlrpc.php导出日志内容换行的问题</title>
		<link>http://www.dayu.name/p/315.html</link>
		<comments>http://www.dayu.name/p/315.html#comments</comments>
		<pubDate>Sat, 25 Jul 2009 03:39:32 +0000</pubDate>
		<dc:creator>大宇</dc:creator>
				<category><![CDATA[uchome]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[xmlrpc]]></category>
		<category><![CDATA[换行]]></category>

		<guid isPermaLink="false">http://dayu.name/?p=315</guid>
		<description><![CDATA[研究uchome导入日志，发现从wp导出的日志内容都被自动去掉了\n换行标记。 解决如下： 修改文件xmlrpc.php中的mw_getRecentPosts方法，因为从uchome的/sourc/cp_import.php代码中发现用的是metaWeblog.getRecentPosts接口 查找 $post = get_extended($entry['post_content']); 替换成 $post = get_extended(nl2br($entry['post_content']));]]></description>
			<content:encoded><![CDATA[<p>研究uchome导入日志，发现从wp导出的日志内容都被自动去掉了\n换行标记。</p>
<p>解决如下：<br />
修改文件xmlrpc.php中的mw_getRecentPosts方法，因为从uchome的/sourc/cp_import.php代码中发现用的是metaWeblog.getRecentPosts接口<br />
查找</p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline"><span style="color: #00008b;">$post</span><span style="color: Gray;"> = </span><span style="color: Blue;">get_extended</span><span style="color: Olive;">(</span><span style="color: #00008b;">$entry</span><span style="color: Olive;">[</span><span style="color: #8b0000;">'</span><span style="color: Red;">post_content</span><span style="color: #8b0000;">'</span><span style="color: Olive;">])</span><span style="color: Gray;">;</span></li>
</ol></div>
<p>替换成</p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline"><span style="color: #00008b;">$post</span><span style="color: Gray;"> = </span><span style="color: Blue;">get_extended</span><span style="color: Olive;">(</span><span style="color: Blue;">nl2br</span><span style="color: Olive;">(</span><span style="color: #00008b;">$entry</span><span style="color: Olive;">[</span><span style="color: #8b0000;">'</span><span style="color: Red;">post_content</span><span style="color: #8b0000;">'</span><span style="color: Olive;">]))</span><span style="color: Gray;">;</span></li>
</ol></div>
]]></content:encoded>
			<wfw:commentRss>http://www.dayu.name/p/315.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bug：UCHome后台禁用模板缓存</title>
		<link>http://www.dayu.name/p/312.html</link>
		<comments>http://www.dayu.name/p/312.html#comments</comments>
		<pubDate>Fri, 24 Jul 2009 08:50:24 +0000</pubDate>
		<dc:creator>大宇</dc:creator>
				<category><![CDATA[uchome]]></category>
		<category><![CDATA[模板]]></category>
		<category><![CDATA[缓存]]></category>

		<guid isPermaLink="false">http://dayu.name/?p=312</guid>
		<description><![CDATA[UCHome后台的“站点管理”项目中，可以禁用“模板缓存”。但程序里却没有与之配合的业务实现（我看了代码，可能设计人员一时遗漏了，也可能是我还不知道哪里还需要调整配置的）。 总之我修改代码实现了与之后台设置配合的“可后台自由选择开启或关闭的模板缓存”设置。 修改uchome文件/source/common_function.php 找到： if(!file_exists($objfile))&#160;{ 修改成： if(!file_exists($objfile) &#124;&#124; !$_SCONFIG['allowcache'])&#160;{]]></description>
			<content:encoded><![CDATA[<p>UCHome后台的“站点管理”项目中，可以禁用“模板缓存”。但程序里却没有与之配合的业务实现（我看了代码，可能设计人员一时遗漏了，也可能是我还不知道哪里还需要调整配置的）。</p>
<p>总之我修改代码实现了与之后台设置配合的“可后台自由选择开启或关闭的模板缓存”设置。</p>
<p>修改uchome文件/source/common_function.php<br />
找到：</p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline"><span style="color: Green;">if</span><span style="color: Olive;">(</span><span style="color: Gray;">!</span><span style="color: Blue;">file_exists</span><span style="color: Olive;">(</span><span style="color: #00008b;">$objfile</span><span style="color: Olive;">))</span><span style="color: Gray;">&nbsp;</span><span style="color: Olive;">{</span></li>
</ol></div>
<p>修改成：</p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline"><span style="color: Green;">if</span><span style="color: Olive;">(</span><span style="color: Gray;">!</span><span style="color: Blue;">file_exists</span><span style="color: Olive;">(</span><span style="color: #00008b;">$objfile</span><span style="color: Olive;">)</span><span style="color: Gray;"> || !</span><span style="color: #00008b;">$_SCONFIG</span><span style="color: Olive;">[</span><span style="color: #8b0000;">'</span><span style="color: Red;">allowcache</span><span style="color: #8b0000;">'</span><span style="color: Olive;">])</span><span style="color: Gray;">&nbsp;</span><span style="color: Olive;">{</span></li>
</ol></div>
]]></content:encoded>
			<wfw:commentRss>http://www.dayu.name/p/312.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>可控的禁用缓存</title>
		<link>http://www.dayu.name/p/95.html</link>
		<comments>http://www.dayu.name/p/95.html#comments</comments>
		<pubDate>Sat, 14 Mar 2009 07:07:42 +0000</pubDate>
		<dc:creator>大宇</dc:creator>
				<category><![CDATA[uchome]]></category>

		<guid isPermaLink="false">http://dayu.name/?p=95</guid>
		<description><![CDATA[后台有一个禁用缓存的设置，但并没有在代码中启用。 修改文件/source/function_common.php中的template()方法如下： 将代码 if(!file_exists($objfile)) { 修改为 if(!file_exists($objfile) &#124;&#124; !$_SCONFIG['allowcache']) {]]></description>
			<content:encoded><![CDATA[<p>后台有一个禁用缓存的设置，但并没有在代码中启用。<br />
修改文件/source/function_common.php中的template()方法如下：<br />
将代码</p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline">if(!file_exists($objfile)) {</li></ol></div>
<p>修改为</p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline">if(!file_exists($objfile) || !$_SCONFIG['allowcache']) {</li></ol></div>
]]></content:encoded>
			<wfw:commentRss>http://www.dayu.name/p/95.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

