phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] notes/class.base.php, 1.1.2.12


From: nomail
Subject: [Phpgroupware-cvs] notes/class.base.php, 1.1.2.12
Date: Sun, 9 May 2004 00:06:36 +0200

Update of /notes
Modified Files:
        Branch: proposal-branch
          class.base.php

date: 2004/05/08 22:06:36;  author: jengo;  state: Exp;  lines: +20 -7

Log Message:
Some partial experimental redirects for datamine ... yes, confussing, don't ask
=====================================================================
Index: notes/class.base.php
diff -u notes/class.base.php:1.1.2.11 notes/class.base.php:1.1.2.12
--- notes/class.base.php:1.1.2.11       Sat May  8 00:59:18 2004
+++ notes/class.base.php        Sat May  8 22:06:36 2004
@@ -217,9 +217,10 @@
                                        'content'  => lang('Content')
                                );
                                $obj->field_execMethod['category'] = 
'notes.base._temp_cat';
-                               $result['history_data']     = 
$obj->get('notes.base.' . $args['note_id']);
-                               $result['history_location'] = 'notes.base.' . 
$args['note_id'];
-                               $result['datamine']         = 
execMethod('api.datamine._get','notes.base.' . $args['note_id']);
+                               $result['history_data']       = 
$obj->get('notes.base.' . $args['note_id']);
+                               $result['history_location']   = 'notes.base.' . 
$args['note_id'];
+                               $result['datamine']           = 
execMethod('api.datamine._get','notes.base.' . $args['note_id']);
+                               $result['datamine_location']  = 
'notes.base.view.' . $args['note_id'];
                        }
 
                        return $result;
@@ -231,7 +232,6 @@
                        $args->set('form_submit',array('false','true'),'enum');
                        $args->set('access',array('public','private'),'enum');
                        $args->set('dm_type',array('N','H','S'),'enum');
-                       $args->set('dm_redirect',NOTSET,'any');
                        $args->set('datamine_location',NOTSET,'any');
                        $args->set('content',NOTSET,'any');
                        $args->set('category',0,'number');
@@ -277,7 +277,9 @@
                                                if ($args['dm_type'] != 'N')
                                                {
                                                        
execMethod('api.datamine._set',array('location_from' => 
$args['datamine_location'], 'location_to' => 'notes.base.' . $note_id));
-                                                       return 
execMethod($_SESSION['phpgw_session']['phpgw_data']['op_history'][$args['dm_redirect']]['op'],$_SESSION['phpgw_session']['phpgw_data']['op_history'][$args['dm_redirect']]['data']);
+                                                       list($app,$class,$id) = 
explode('.',$args['datamine_location']);
+
+                                                       return 
execMethod(sprintf('%s.%s.view.%s',$app,$class,$id));
                                                }
                                                else
                                                {
@@ -309,6 +311,7 @@
                        $args->set('category',0,'number');
                        $args = $args->get(func_get_args());
 
+                       $result['nextop']      = 
$GLOBALS['phpgw_data']['api']['nextop'];
                        $result['action_type'] = 'note_edit';
                        $db = $GLOBALS['phpgw']->db->execute("SELECT * from 
phpgw_notes where note_id='"
                                . $args['note_id'] . "'");
@@ -344,7 +347,17 @@
                                                
$GLOBALS['msgbox']->add(lang('There was a problem updating this 
note'),'warning');
                                        }
 
-                                       return $this->view($args['note_id']);
+                                       if 
($GLOBALS['phpgw_data']['api']['nextop'])
+                                       {
+//                                             list($app,$class,$method,$id) = 
explode('.',$GLOBALS['phpgw_data']['api']['nextop']);
+
+//                                             return 
execMethod(sprintf('%s.%s.%s.%s',$app,$class,$method,$id));
+                                               return 
$this->view($args['note_id']);
+                                       }
+                                       else
+                                       {
+                                               return 
$this->view($args['note_id']);
+                                       }
                                }
                                else
                                {




reply via email to

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