* @param object $blog an instance of Blog class
* @return void
*/
- private function preBlogContent($type, $blog)
+ private function preBlogContent($type, &$blog)
{
global $manager;
- $data = array('blog' => $blog, 'type' => $type);
+ $data = array('blog' => &$blog, 'type' => $type);
$manager->notify('PreBlogContent', $data);
return;
}
* @param objecct $blog an instance of Blog class
* @return void
*/
- private function postBlogContent($type, $blog)
+ private function postBlogContent($type, &$blog)
{
global $manager;
- $data = array('blog' => $blog, 'type' => $type);
+ $data = array('blog' => &$blog, 'type' => $type);
$manager->notify('PostBlogContent', $data);
return;
}
* Actions::parse_archivedate()
* %archivedate(locale,date format)%
*
- * @param string $locale
+ * @param deprecated $locale
* @return void
*/
- public function parse_archivedate($locale = '-def-')
+ public function parse_archivedate($locale='')
{
global $archive;
- /*
- * TODO: these lines are no meaning because there is no $template.
- if ( $locale == '-def-' )
- {
- setlocale(LC_TIME, $template['LOCALE']);
- }
- else
- {
- setlocale(LC_TIME, $locale);
- }
- */
-
// get archive date
sscanf($archive,'%d-%d-%d',$y,$m,$d);
public function parse_blog($template, $amount = 10, $category = '')
{
global $blog, $startpos;
+
list($limit, $offset) = sscanf($amount, '%d(%d)');
$this->setBlogCategory($blog, $category);
$this->preBlogContent('blog',$blog);
$this->amountfound = $blog->readLog($template, $limit, $offset, $startpos);
- $this->parse_benchmark();
$this->postBlogContent('blog',$blog);
return;
}