目前日期文章:201504 (2)

瀏覽方式: 標題列表 簡短摘要
ALTER TABLE `interface` ADD `lastchange` integer DEFAULT '0' NOT NULL
--- zabbix-2.4.4-old/include/schema.inc.php   Thu Apr 23 10:55:52 2015
+++ zabbix-2.4.4/include/schema.inc.php Mon Feb 23 20:28:15 2015
@@ -983,12 +983,6 @@
                                'length' => 10,
                                'default' => '1',
                        ),
-                       'lastchange' => array(
-                               'null' => false,
-                               'type' => DB::FIELD_TYPE_INT,
-                               'length' => 10,
-                               'default' => '0',
-                       ),
                ),
        ),
        'valuemaps' => array(

台南小新 發表在 痞客邦 PIXNET 留言(0) 人氣()

--- zabbix-2.4.4-old/include/classes/api/services/CHost.php   Mon Feb 23 20:28:16 2015
+++ zabbix-2.4.4/include/classes/api/services/CHost.php   Wed Apr 22 17:14:34 2015
@@ -72,6 +72,7 @@
            'where'     => array('flags' => 'h.flags IN ('.ZBX_FLAG_DISCOVERY_NORMAL.','.ZBX_FLAG_DISCOVERY_CREATED.')'),
            'group'     => array(),
            'order'     => array(),
+           'offset'    => 0,
            'limit'     => null
        );
 
@@ -132,6 +133,7 @@
            'preservekeys'              => null,
            'sortfield'                 => '',
            'sortorder'                 => '',
+           'offset'                    => 0,
            'limit'                     => null,
            'limitSelects'              => null
        );
@@ -429,9 +431,14 @@
            $sqlParts['limit'] = $options['limit'];
        }
 
+       // offset
+       if (zbx_ctype_digit($options['offset']) && $options['offset']>=0) {
+           $sqlParts['offset'] = $options['offset'];
+       }
+
        $sqlParts = $this->applyQueryOutputOptions($this->tableName(), $this->tableAlias(), $options, $sqlParts);
        $sqlParts = $this->applyQuerySortOptions($this->tableName(), $this->tableAlias(), $options, $sqlParts);
-       $res = DBselect($this->createSelectQueryFromParts($sqlParts), $sqlParts['limit']);
+       $res = DBselect($this->createSelectQueryFromParts($sqlParts), $sqlParts['limit'], $sqlParts['offset']);
        while ($host = DBfetch($res)) {
            if (!is_null($options['countOutput'])) {
                if (!is_null($options['groupCount'])) {

台南小新 發表在 痞客邦 PIXNET 留言(0) 人氣()