fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [11933] property: fix listing custom menu items


From: Sigurd Nes
Subject: [Fmsystem-commits] [11933] property: fix listing custom menu items
Date: Fri, 02 May 2014 07:57:37 +0000

Revision: 11933
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=11933
Author:   sigurdne
Date:     2014-05-02 07:57:34 +0000 (Fri, 02 May 2014)
Log Message:
-----------
property: fix listing custom menu items

Modified Paths:
--------------
    trunk/property/inc/class.sogeneric.inc.php

Modified: trunk/property/inc/class.sogeneric.inc.php
===================================================================
--- trunk/property/inc/class.sogeneric.inc.php  2014-04-30 13:24:03 UTC (rev 
11932)
+++ trunk/property/inc/class.sogeneric.inc.php  2014-05-02 07:57:34 UTC (rev 
11933)
@@ -2379,7 +2379,8 @@
                                                        'entry_date'    => 
array('add'  => 'time()'),
                                                        'modified_date' => 
array('edit' => 'time()'),
                                                ),
-                                               'check_grant'           => false
+                                               'check_grant'           => 
false,
+                                               'mapping'                       
=> array('name' => 'text')
                                        );
 
                                break;
@@ -3470,6 +3471,7 @@
 
                public function get_path($data)
                {
+
                        $this->get_location_info($data['type'], 
$data['type_id']);
 
                        if (!isset($this->location_info['table']) || !$table = 
$this->location_info['table'])
@@ -3478,8 +3480,17 @@
                        }
                        $this->table = $table;
 
-                       $sql = "SELECT name, parent_id FROM {$table} WHERE id = 
'{$data['id']}'";
+                       if(isset($this->location_info['mapping']) && 
$this->location_info['mapping'])
+                       {
+                               $mapping = $this->location_info['mapping'];
+                       }
+                       else
+                       {
+                               $mapping = array('name' => 'name');
+                       }
 
+                       $sql = "SELECT {$mapping['name']}, parent_id FROM 
{$table} WHERE id = '{$data['id']}'";
+
                        $this->_db->query($sql,__LINE__,__FILE__);
                        $this->_db->next_record();
 




reply via email to

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