fmsystem-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Fmsystem-commits] [13980] fix filter in docs


From: Sigurd Nes
Subject: [Fmsystem-commits] [13980] fix filter in docs
Date: Mon, 21 Sep 2015 19:33:18 +0000

Revision: 13980
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=13980
Author:   sigurdne
Date:     2015-09-21 19:33:17 +0000 (Mon, 21 Sep 2015)
Log Message:
-----------
fix filter in docs

Modified Paths:
--------------
    trunk/property/inc/class.bodocument.inc.php
    trunk/property/inc/class.sodocument.inc.php

Modified: trunk/property/inc/class.bodocument.inc.php
===================================================================
--- trunk/property/inc/class.bodocument.inc.php 2015-09-21 13:16:45 UTC (rev 
13979)
+++ trunk/property/inc/class.bodocument.inc.php 2015-09-21 19:33:17 UTC (rev 
13980)
@@ -40,6 +40,7 @@
                var $filter;
                var $sort;
                var $order;
+               var $p_num;
                var $cat_id;
                var $entity_id;
                var $status_id;
@@ -77,6 +78,7 @@
                        $sort                                   = 
phpgw::get_var('sort');
                        $order                                  = 
phpgw::get_var('order');
                        $filter                                 = 
phpgw::get_var('filter', 'int');
+                       $p_num                                  = 
phpgw::get_var('p_num', 'int');
                        $cat_id                                 = 
phpgw::get_var('cat_id', 'int');
                        $status_id                              = 
phpgw::get_var('status_id');
                        $entity_id                              = 
phpgw::get_var('entity_id', 'int');
@@ -89,6 +91,7 @@
                        $this->sort                             = isset($sort) 
&& $sort ? $sort : '';
                        $this->order                    = isset($order) && 
$order ? $order : '';
                        $this->filter                   = isset($filter) && 
$filter ? $filter : '';
+                       $this->p_num                    = isset($p_num) && 
$p_num ? $p_num : '';
                        $this->cat_id                   = isset($cat_id) && 
$cat_id ? $cat_id : '';
                        $this->status_id                = isset($status_id) && 
$status_id ? $status_id : '';
                        $this->entity_id                = isset($entity_id) && 
$entity_id ? $entity_id : '';
@@ -231,7 +234,7 @@
 
 
                        $document = $this->so->read_at_location(array('start' 
=> $this->start,'query' => $this->query,'sort' => $this->sort,'order' => 
$this->order,
-                               'filter' => $this->filter,'cat_id' => 
$this->cat_id,'entity_id' => $this->entity_id,
+                               'filter' => $this->filter,'p_num' 
=>$this->p_num, 'cat_id' => $this->cat_id,'entity_id' => $this->entity_id,
                                'location_code' => 
$location_code,'doc_type'=>$this->doc_type, 'allrows' => $this->allrows));
                        $this->total_records = $this->so->total_records;
 

Modified: trunk/property/inc/class.sodocument.inc.php
===================================================================
--- trunk/property/inc/class.sodocument.inc.php 2015-09-21 13:16:45 UTC (rev 
13979)
+++ trunk/property/inc/class.sodocument.inc.php 2015-09-21 19:33:17 UTC (rev 
13980)
@@ -326,13 +326,14 @@
                                $filter                 = 
isset($data['filter']) && $data['filter'] ? (int) $data['filter']: 0;
                                $entity_id              = 
isset($data['entity_id']) && $data['entity_id'] ? (int)$data['entity_id']:0;
                                $cat_id                 = 
isset($data['cat_id']) && $data['cat_id'] ? (int)$data['cat_id']: 0;
+                               $p_num                  = isset($data['p_num']) 
&& $data['p_num'] ? (int)$data['p_num']: 0;
                                $id                             = 
isset($data['id']) && $data['id'] ? (int)$data['id']: 0;
                                $doc_type               = 
isset($data['doc_type']) && $data['doc_type'] ? $data['doc_type']: 0;
                                $allrows                = 
isset($data['allrows'])?$data['allrows']:'';
                                $location_code  = 
isset($data['location_code'])?$data['location_code']:'';
                        }
 
-                       if( !$location_code && !($entity_id && $cat_id ))
+                       if( !$location_code && !($entity_id && $cat_id && 
$p_num))
                        {
                                return array();
                        }
@@ -363,7 +364,7 @@
                        }
                        if ($cat_id > 0)
                        {
-                               $filtermethod .= " $where 
fm_document.p_cat_id={$cat_id} AND fm_document.p_entity_id={$entity_id}";
+                               $filtermethod .= " $where 
fm_document.p_cat_id={$cat_id} AND fm_document.p_entity_id={$entity_id} AND 
p_num = '{$p_num}'";
                                $where = 'AND';
                        }
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]