Changeset 833:e52d87b4cbd1
- Timestamp:
- 05/24/12 09:04:39 (13 years ago)
- Branch:
- default
- Children:
- 835:dbc60fa508df, 836:3a54ff018a83
- Location:
- inc
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
inc/core/class.dc.blog.php
r831 r833 672 672 $params = new ArrayObject($params); 673 673 $this->core->callBehavior('coreBlogBeforeGetPosts',$params); 674 $params = (array)$params;675 674 676 675 if ($count_only) … … 1393 1392 1394 1393 $now = dt::toUTC(time()); 1395 $to_change = array();1396 1394 $to_change = new ArrayObject(); 1395 1397 1396 if ($rs->isEmpty()) { 1398 1397 return; … … 1412 1411 } 1413 1412 } 1414 1415 if (!empty($to_change)) 1413 if (count($to_change)) 1416 1414 { 1417 1415 # --BEHAVIOR-- coreBeforeScheduledEntriesPublish 1418 $to_change = new ArrayObject($to_change);1419 1416 $this->core->callBehavior('coreBeforeScheduledEntriesPublish',$this,$to_change); 1420 $to_change = (array)$to_change;1421 1417 1422 1418 $strReq = … … 1424 1420 'post_status = 1 '. 1425 1421 "WHERE blog_id = '".$this->con->escape($this->id)."' ". 1426 'AND post_id '.$this->con->in($to_change).' '; 1427 1422 'AND post_id '.$this->con->in((array)$to_change).' '; 1428 1423 $this->con->execute($strReq); 1429 1424 $this->triggerBlog(); 1430 1425 1431 1426 # --BEHAVIOR-- coreAfterScheduledEntriesPublish 1432 $to_change = new ArrayObject($to_change);1433 1427 $this->core->callBehavior('coreAfterScheduledEntriesPublish',$this,$to_change); 1434 1428 } -
inc/public/class.dc.template.php
r779 r833 572 572 $res = "<?php\n"; 573 573 $res .= $p; 574 $res .= $this->core->callBehavior("templatePrepareParams","Archives", $attr,$content); 574 $res .= $this->core->callBehavior("templatePrepareParams", 575 array("tag" => "Archives","method" => "blog::getDates"), 576 $attr,$content); 575 577 $res .= '$_ctx->archives = $core->blog->getDates($params); unset($params);'."\n"; 576 578 $res .= "?>\n"; … … 680 682 $res = "<?php\n"; 681 683 $res .= $p; 682 $res .= $this->core->callBehavior("templatePrepareParams","ArchiveNext", $attr, $content); 684 $res .= $this->core->callBehavior("templatePrepareParams", 685 array("tag" => "ArchiveNext","method" => "blog::getDates"), 686 $attr, $content); 683 687 $res .= '$_ctx->archives = $core->blog->getDates($params); unset($params);'."\n"; 684 688 $res .= "?>\n"; … … 717 721 718 722 $res = "<?php\n"; 719 $res .= $this->core->callBehavior("templatePrepareParams","ArchivePrevious", $attr, $content); 723 $res .= $this->core->callBehavior("templatePrepareParams", 724 array("tag" => "ArchivePrevious","method" => "blog::getDates"), 725 $attr, $content); 720 726 $res .= $p; 721 727 $res .= '$_ctx->archives = $core->blog->getDates($params); unset($params);'."\n"; … … 940 946 $res = "<?php\n"; 941 947 $res .= $p; 942 $res .= $this->core->callBehavior("templatePrepareParams","Categories", $attr, $content); 948 $res .= $this->core->callBehavior("templatePrepareParams", 949 array("tag" => "Categories","method" => "blog::getCategories"), 950 $attr,$content); 943 951 $res .= '$_ctx->categories = $core->blog->getCategories($params);'."\n"; 944 952 $res .= "?>\n"; … … 1210 1218 $res = "<?php\n"; 1211 1219 $res .= $p; 1212 $res .= $this->core->callBehavior("templatePrepareParams","Entries",$attr,$content); 1220 $res .= $this->core->callBehavior("templatePrepareParams", 1221 array("tag" => "Entries","method" => "blog::getPosts"), 1222 $attr,$content); 1213 1223 $res .= '$_ctx->post_params = $params;'."\n"; 1214 1224 $res .= '$_ctx->posts = $core->blog->getPosts($params); unset($params);'."\n"; … … 1880 1890 $res = "<?php\n"; 1881 1891 $res .= $p; 1882 $res .= $this->core->callBehavior("templatePrepareParams","Languages",$attr,$content); 1892 $res .= $this->core->callBehavior("templatePrepareParams", 1893 array("tag" => "Languages","method" => "blog::getLangs"), 1894 $attr,$content); 1883 1895 $res .= '$_ctx->langs = $core->blog->getLangs($params); unset($params);'."\n"; 1884 1896 $res .= "?>\n"; … … 1955 1967 $p = "<?php\n"; 1956 1968 $p .= '$params = $_ctx->post_params;'."\n"; 1969 $p .= $this->core->callBehavior("templatePrepareParams", 1970 array("tag" => "Pagination","method" => "blog::getPosts"), 1971 $attr,$content); 1957 1972 $p .= '$_ctx->pagination = $core->blog->getPosts($params,true); unset($params);'."\n"; 1958 1973 $p .= "?>\n"; … … 1964 1979 return 1965 1980 $p. 1966 $this->core->callBehavior("templatePrepareParams","Pagination",$attr,$content).1967 1981 '<?php if ($_ctx->pagination->f(0) > $_ctx->posts->count()) : ?>'. 1968 1982 $content. … … 2104 2118 2105 2119 $res = "<?php\n"; 2106 $res .= $this->core->callBehavior("templatePrepareParams","Comments",$attr,$content); 2120 $res .= $this->core->callBehavior("templatePrepareParams", 2121 array("tag" => "Comments","method" => "blog::getComments"), 2122 $attr,$content); 2107 2123 $res .= $p; 2108 2124 $res .= '$_ctx->comments = $core->blog->getComments($params); unset($params);'."\n"; … … 2704 2720 $res = "<?php\n"; 2705 2721 $res .= $p; 2706 $res .= $this->core->callBehavior("templatePrepareParams","Pings",$attr,$content); 2722 $res .= $this->core->callBehavior("templatePrepareParams", 2723 array("tag" => "Pings","method" => "blog::getComments"), 2724 $attr,$content); 2707 2725 $res .= '$_ctx->pings = $core->blog->getComments($params); unset($params);'."\n"; 2708 2726 $res .= "if (\$_ctx->posts !== null) { \$core->blog->withoutPassword(true);}\n";
Note: See TracChangeset
for help on using the changeset viewer.