fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [7026] Merge 7018:7025 from trunk


From: Sigurd Nes
Subject: [Fmsystem-commits] [7026] Merge 7018:7025 from trunk
Date: Mon, 21 Feb 2011 07:59:06 +0000

Revision: 7026
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=7026
Author:   sigurdne
Date:     2011-02-21 07:59:06 +0000 (Mon, 21 Feb 2011)
Log Message:
-----------
Merge 7018:7025 from trunk

Modified Paths:
--------------
    branches/Version-1_0-branch/bim/inc/class.uibimitem.inc.php
    branches/Version-1_0-branch/booking/inc/class.uibooking.inc.php
    branches/Version-1_0-branch/bookingfrontend/inc/class.uibooking.inc.php
    branches/Version-1_0-branch/emailadmin/inc/class.defaultimap.inc.php
    branches/Version-1_0-branch/emailadmin/inc/class.emailadmin_bo.inc.php
    branches/Version-1_0-branch/felamimail/inc/class.bopreferences.inc.php
    branches/Version-1_0-branch/felamimail/inc/class.uifelamimail.inc.php
    branches/Version-1_0-branch/felamimail/index.php
    branches/Version-1_0-branch/login.php
    branches/Version-1_0-branch/phpgwapi/inc/class.cache.inc.php
    branches/Version-1_0-branch/phpgwapi/inc/class.js.inc.php
    branches/Version-1_0-branch/phpgwapi/inc/class.yui.inc.php
    branches/Version-1_0-branch/property/inc/class.hook_helper.inc.php
    branches/Version-1_0-branch/property/inc/class.sogeneric.inc.php
    branches/Version-1_0-branch/property/inc/class.solocation.inc.php
    branches/Version-1_0-branch/property/inc/class.uiworkorder.inc.php

Property Changed:
----------------
    branches/Version-1_0-branch/


Property changes on: branches/Version-1_0-branch
___________________________________________________________________
Modified: svn:mergeinfo
   - 
/trunk:6439-6441,6443,6445-6447,6449-6464,6466-6468,6470-6474,6476-6477,6479-6480,6483-6488,6490-6491,6493-6494,6496-6501,6503-6504,6506,6508,6510-6511,6513,6515-6516,6518,6520-6524,6526-6528,6533-6534,6536-6541,6543-6565,6567,6569,6571-6576,6578,6580-6586,6588-6596,6598-6600,6602-6604,6606-6607,6609-6611,6613-6625,6629-6639,6641-6643,6645-6646,6648,6650-6654,6656-6659,6661-6663,6665-6666,6668-6669,6672-6673,6675,6677-6678,6680,6682-6686,6688-6717,6719,6721-6722,6724-6728,6730,6732-6734,6736-6739,6741,6743,6745-6746,6748-6756,6758-6762,6764,6766-6788,6790,6792-6798,6800-6814,6816-6819,6821-6822,6824-6826,6828-6837,6839,6841,6843-6849,6851,6853-6869,6871-6874,6876-6877,6879,6881,6883,6885-6886,6888-6893,6895-6897,6899-6901,6903,6905-6907,6909,6911-6929,6931-6936,6938-6947,6949,6951,6953,6955-6956,6958-6959,6961-6968,6970-6971,6973-6974,6976-6978,6980,6982-7017
   + 
/trunk:6439-6441,6443,6445-6447,6449-6464,6466-6468,6470-6474,6476-6477,6479-6480,6483-6488,6490-6491,6493-6494,6496-6501,6503-6504,6506,6508,6510-6511,6513,6515-6516,6518,6520-6524,6526-6528,6533-6534,6536-6541,6543-6565,6567,6569,6571-6576,6578,6580-6586,6588-6596,6598-6600,6602-6604,6606-6607,6609-6611,6613-6625,6629-6639,6641-6643,6645-6646,6648,6650-6654,6656-6659,6661-6663,6665-6666,6668-6669,6672-6673,6675,6677-6678,6680,6682-6686,6688-6717,6719,6721-6722,6724-6728,6730,6732-6734,6736-6739,6741,6743,6745-6746,6748-6756,6758-6762,6764,6766-6788,6790,6792-6798,6800-6814,6816-6819,6821-6822,6824-6826,6828-6837,6839,6841,6843-6849,6851,6853-6869,6871-6874,6876-6877,6879,6881,6883,6885-6886,6888-6893,6895-6897,6899-6901,6903,6905-6907,6909,6911-6929,6931-6936,6938-6947,6949,6951,6953,6955-6956,6958-6959,6961-6968,6970-6971,6973-6974,6976-6978,6980,6982-7017,7019-7025

Modified: branches/Version-1_0-branch/bim/inc/class.uibimitem.inc.php
===================================================================
--- branches/Version-1_0-branch/bim/inc/class.uibimitem.inc.php 2011-02-20 
20:33:04 UTC (rev 7025)
+++ branches/Version-1_0-branch/bim/inc/class.uibimitem.inc.php 2011-02-21 
07:59:06 UTC (rev 7026)
@@ -25,14 +25,18 @@
                'showBimItem' => true
        );
        
-       public function showItems() {
+       public function showItems()
+       {
                $GLOBALS['phpgw']->js->validate_file( 'yui3', 'yui/yui-min', 
'phpgwapi' );
                $GLOBALS['phpgw']->js->validate_file( 'yahoo', 'bim.modellist', 
'bim' );
                $modelId = phpgw::get_var("modelId");
                //$modelId = 3;
-               if(empty($modelId)) {
+               if(empty($modelId))
+               {
                        echo "No modelId!";
-               } else {
+               }
+               else
+               {
                        
$GLOBALS['phpgw']->xslttpl->add_file(array('bim_showitems'));
                        $sobimitem = new sobimitem_impl($this->db);
                        $sobimitem->setModelId($modelId);
@@ -41,26 +45,28 @@
                        $items = $bobimitem->fetchItemsByModelId();
                        $bimItems = array();
                        $count = count(($items));
-                       foreach( $items as $bimItem) {
+                       foreach( $items as $bimItem)
+                       {
                                /* @var $bimItem BimItem*/
                                array_push($bimItems, 
$bimItem->transformObjectToArray());//$bimItem->);
                        }
                        //$bimItems = print_r($items, true);
                        
-                       $data = array(
+                       $data = array
+                       (
                                'someData' => "data",
                                'modelId' => $modelId,
                                'count' => $count,
                                'bimItems' => array("item" => $bimItems)
                        );
                        
-                       
                        $this->setupBimCss();
                        $GLOBALS['phpgw']->xslttpl->set_var('bimitems',$data);
                }
                
        }
-       public function showBimItem() {
+       public function showBimItem()
+       {
                /*$GLOBALS['phpgw_info']['flags']['noheader'] = false;
                        $GLOBALS['phpgw_info']['flags']['nofooter'] = false;
                        $GLOBALS['phpgw_info']['flags']['xslt_app'] = false;
@@ -70,19 +76,16 @@
                $GLOBALS['phpgw']->js->validate_file( 'yahoo', 'bim.modellist', 
'bim' );
                $modelGuid = phpgw::get_var("modelGuid");
                //$modelId = 3;
-               if(empty($modelGuid)) {
+               if(empty($modelGuid))
+               {
                        echo "No guid!";
-               } else {
+               }
+               else
+               {
                        
$GLOBALS['phpgw']->xslttpl->add_file(array('bim_showSingleItem'));
                        $sobimitem = new sobimitem_impl($this->db);
                        /* @var $bimItem BimItem */
-                       $bimItem = $sobimitem->getBimItem($modelGuid);
-                       $data = array(
-                               'item' => $bimItem->transformObjectToArray(),
-                               'dir' => PHPGW_TEMPLATE_DIR
-                       );
-                       //$GLOBALS['phpgw']->xslttpl->set_var('bimitem',$data);
-                       
+                       $bimItem = $sobimitem->getBimItem($modelGuid);          
        
                $GLOBALS['phpgw']->xslttpl->set_xml_data($bimItem->getXml());
                        $this->setupBimCss();
                }

Modified: branches/Version-1_0-branch/booking/inc/class.uibooking.inc.php
===================================================================
--- branches/Version-1_0-branch/booking/inc/class.uibooking.inc.php     
2011-02-20 20:33:04 UTC (rev 7025)
+++ branches/Version-1_0-branch/booking/inc/class.uibooking.inc.php     
2011-02-21 07:59:06 UTC (rev 7026)
@@ -207,6 +207,19 @@
                                $booking['organization_name'] = 
$allocation['organization_name'];
                        }
 
+            //start Debug code for testing problem on production server. to be 
removed ASAP!
+            if (phpgw::get_var('DEBUG', 'str', 'GET') == 'yes') {
+                echo "<pre>\n";
+                echo mb_detect_encoding(phpgw::get_var('from_', 'str', 'GET'), 
"auto");echo "\n";
+                print_r($allocation_id);echo "\n";
+                print_r($booking['from_']);echo "\n";
+                print_r($booking['to_']);echo "\n";
+                print_r($time_from);echo "\n";
+                print_r($time_to);echo "\n";
+                print_r($booking);echo "\n";
+                exit;
+            }
+            //end
                        if($_SERVER['REQUEST_METHOD'] == 'POST')
                        {
                                $today = getdate();
@@ -326,6 +339,21 @@
                                $res_names[] = array('id' => $res['id'],'name' 
=> $res['name']);
                        }
 
+            //start Debug code for testing problem on production server. to be 
removed ASAP!
+            if (phpgw::get_var('DEBUG', 'str', 'GET') == 'end') {
+                echo "<pre>\n";
+                echo "encoding: ";echo 
mb_detect_encoding(phpgw::get_var('from_', 'str', 'GET'), "auto");echo "\n";
+                echo "encoding array: ";echo 
mb_detect_encoding($booking['from_'], "auto");echo "\n";
+                echo "allocation_id: ";print_r($allocation_id);echo "\n";
+                echo "booking from: ";print_r($booking['from_']);echo "\n";
+                echo "booking to: ";print_r($booking['to_']);echo "\n";
+                echo "time from: ";print_r($time_from);echo "\n";
+                echo "time to:";print_r($time_to);echo "\n";
+                echo "booking:\n";print_r($booking);echo "\n";
+                exit;
+            }
+            //end
+
                        if ($step < 2) 
                        {
                                self::render_template('booking_new', 
array('booking' => $booking, 

Modified: 
branches/Version-1_0-branch/bookingfrontend/inc/class.uibooking.inc.php
===================================================================
--- branches/Version-1_0-branch/bookingfrontend/inc/class.uibooking.inc.php     
2011-02-20 20:33:04 UTC (rev 7025)
+++ branches/Version-1_0-branch/bookingfrontend/inc/class.uibooking.inc.php     
2011-02-21 07:59:06 UTC (rev 7026)
@@ -75,11 +75,12 @@
                        $booking = array();
                        $booking['building_id'] = phpgw::get_var('building_id', 
'int', 'GET');
                        $allocation_id = phpgw::get_var('allocation_id', 'int', 
'GET');
-                       $booking['resources'] = phpgw::get_var('resources', 
'int', 'GET');
                        $booking['from_'] = phpgw::get_var('from_', 'str', 
'GET');
                        $booking['to_'] = phpgw::get_var('to_', 'str', 'GET');
+
                        $time_from = split(" ",phpgw::get_var('from_', 'str', 
'GET'));
                        $time_to =      split(" ",phpgw::get_var('to_', 'str', 
'GET'));
+
                        $step = phpgw::get_var('step', 'str', 'POST');
                        if (! isset($step)) $step = 1;
                        $invalid_dates = array();
@@ -95,6 +96,20 @@
                                $booking['building_name'] = $building['name'];
                                array_set_default($booking, 'resources', 
array(get_var('resource', int, 'GET')));
                        }
+            //start Debug code for testing problem on production server. to be 
removed ASAP!
+            if (phpgw::get_var('DEBUG', 'str', 'GET') == 'start') {
+                echo "<pre>\n";
+                echo "encoding get: ";echo 
mb_detect_encoding(phpgw::get_var('from_', 'str', 'GET'), "auto");echo "\n";
+                echo "encoding array: ";echo 
mb_detect_encoding($booking['from_'], "auto");echo "\n";
+                echo "allocation_id: ";print_r($allocation_id);echo "\n";
+                echo "booking from: ";print_r($booking['from_']);echo "\n";
+                echo "booking to: ";print_r($booking['to_']);echo "\n";
+                echo "time from: ";print_r($time_from);echo "\n";
+                echo "time to:";print_r($time_to);echo "\n";
+                echo "booking:\n";print_r($booking);echo "\n";
+                exit;
+            }
+            //end
                        if($_SERVER['REQUEST_METHOD'] == 'POST')
                        {
                                $today = getdate();
@@ -210,12 +225,26 @@
                        $groups = 
$this->group_bo->so->read(array('filters'=>array('organization_id'=>$allocation['organization_id'],
 'active'=>1)));
                        $groups = $groups['results'];
                        $booking['organization_name'] = 
$allocation['organization_name'];
-                       $resouces_full = 
$this->resource_bo->so->read(array('filters'=>array('id'=>$booking['resources']),
 'sort'=>'name'));
+                       $resources_full = 
$this->resource_bo->so->read(array('filters'=>array('id'=>$booking['resources']),
 'sort'=>'name'));
                        $res_names = array();
-                       foreach($resouces_full['results'] as $res)
+                       foreach($resources_full['results'] as $res)
                        {
                                $res_names[] = array('id' => $res['id'],'name' 
=> $res['name']);
                        }
+            //start Debug code for testing problem on production server. to be 
removed ASAP!
+            if (phpgw::get_var('DEBUG', 'str', 'GET') == 'end') {
+                echo "<pre>\n";
+                echo "encoding: ";echo 
mb_detect_encoding(phpgw::get_var('from_', 'str', 'GET'), "auto");echo "\n";
+                echo "encoding array: ";echo 
mb_detect_encoding($booking['from_'], "auto");echo "\n";
+                echo "allocation_id: ";print_r($allocation_id);echo "\n";
+                echo "booking from: ";print_r($booking['from_']);echo "\n";
+                echo "booking to: ";print_r($booking['to_']);echo "\n";
+                echo "time from: ";print_r($time_from);echo "\n";
+                echo "time to:";print_r($time_to);echo "\n";
+                echo "booking:\n";print_r($booking);echo "\n";
+                exit;
+            }
+            //end
 
                        if ($step < 2) 
                        {

Modified: branches/Version-1_0-branch/emailadmin/inc/class.defaultimap.inc.php
===================================================================
--- branches/Version-1_0-branch/emailadmin/inc/class.defaultimap.inc.php        
2011-02-20 20:33:04 UTC (rev 7025)
+++ branches/Version-1_0-branch/emailadmin/inc/class.defaultimap.inc.php        
2011-02-21 07:59:06 UTC (rev 7026)
@@ -11,7 +11,10 @@
        
\***************************************************************************/
        /* $Id$ */
 
-       require_once PHPGW_INCLUDE_ROOT.'/felamimail/inc/egw-pear/Net/IMAP.php';
+       if(!include_once 
PHPGW_INCLUDE_ROOT.'/felamimail/inc/egw-pear/Net/IMAP.php')
+       {
+               throw new Exception('missing egw-pear package');
+       }
 
        define('IMAP_NAMESPACE_PERSONAL', 'personal');
        define('IMAP_NAMESPACE_OTHERS'  , 'others');

Modified: branches/Version-1_0-branch/emailadmin/inc/class.emailadmin_bo.inc.php
===================================================================
--- branches/Version-1_0-branch/emailadmin/inc/class.emailadmin_bo.inc.php      
2011-02-20 20:33:04 UTC (rev 7025)
+++ branches/Version-1_0-branch/emailadmin/inc/class.emailadmin_bo.inc.php      
2011-02-21 07:59:06 UTC (rev 7026)
@@ -488,7 +488,16 @@
                                // fetch the IMAP / incomming server data
                                $icClass = 
isset($this->IMAPServerType[$data['imapType']]) ? 
$this->IMAPServerType[$data['imapType']]['classname'] : 'defaultimap';
 
-                               $icServer =& 
CreateObject('emailadmin.'.$icClass);
+                               try
+                               {
+                                       $icServer =& 
CreateObject('emailadmin.'.$icClass);
+                               }
+                               catch(Exception $e)
+                               {
+                                       
phpgwapi_cache::message_set($e->getMessage(), 'error');
+                                       return false;
+                               }
+
                                $icServer->encryption   = 
($data['imapTLSEncryption'] == 'yes' ? 1 : (int)$data['imapTLSEncryption']);
                                $icServer->host         = $data['imapServer'];
                                $icServer->port         = $data['imapPort'];

Modified: branches/Version-1_0-branch/felamimail/inc/class.bopreferences.inc.php
===================================================================
--- branches/Version-1_0-branch/felamimail/inc/class.bopreferences.inc.php      
2011-02-20 20:33:04 UTC (rev 7025)
+++ branches/Version-1_0-branch/felamimail/inc/class.bopreferences.inc.php      
2011-02-21 07:59:06 UTC (rev 7026)
@@ -156,6 +156,7 @@
 
                                if(!is_a($profileData, 'ea_preferences') || 
!is_a($profileData->ic_server[0], 'defaultimap')) {
 
+       //                              throw new Exception('No preferences or 
Incoming server defined');
                                        return false;
                                }
                                if($profileData->userDefinedAccounts) {

Modified: branches/Version-1_0-branch/felamimail/inc/class.uifelamimail.inc.php
===================================================================
--- branches/Version-1_0-branch/felamimail/inc/class.uifelamimail.inc.php       
2011-02-20 20:33:04 UTC (rev 7025)
+++ branches/Version-1_0-branch/felamimail/inc/class.uifelamimail.inc.php       
2011-02-21 07:59:06 UTC (rev 7026)
@@ -11,6 +11,10 @@
        * Free Software Foundation; version 2 of the License.                   
    *
        
\***************************************************************************/
        /* $Id$ */
+       if(! 
is_file(PHPGW_INCLUDE_ROOT.'/felamimail/inc/egw-pear/Net/IMAP.php'))
+       {
+               throw new Exception('missing egw-pear package');
+       }
 
        class uifelamimail
        {

Modified: branches/Version-1_0-branch/felamimail/index.php
===================================================================
--- branches/Version-1_0-branch/felamimail/index.php    2011-02-20 20:33:04 UTC 
(rev 7025)
+++ branches/Version-1_0-branch/felamimail/index.php    2011-02-21 07:59:06 UTC 
(rev 7026)
@@ -26,5 +26,13 @@
                                                                
        include('../header.inc.php');
 
-       execmethod('felamimail.uifelamimail.viewMainScreen');
+       try
+       {
+               execmethod('felamimail.uifelamimail.viewMainScreen');
+       }
+       catch(Exception $e)
+       {
+               phpgwapi_cache::message_set($e->getMessage(), 'error');
+               $GLOBALS['phpgw']->redirect_link('/home.php');
+       }
 ?>

Modified: branches/Version-1_0-branch/login.php
===================================================================
--- branches/Version-1_0-branch/login.php       2011-02-20 20:33:04 UTC (rev 
7025)
+++ branches/Version-1_0-branch/login.php       2011-02-21 07:59:06 UTC (rev 
7026)
@@ -188,7 +188,7 @@
 //                             
$GLOBALS['phpgw']->redirect_link("/{$partial_url}", array('cd' =>22)); // 
already within a session
 //                             exit;
 
-                               $receipt['message'][]=array('msg'=> lang('Info: 
you have changed domain from "%1" to "%2"' ,$_COOKIE['domain'],$logindomain));
+                               $receipt[] = lang('Info: you have changed 
domain from "%1" to "%2"' ,$_COOKIE['domain'],$logindomain);
                        }
                }
 
@@ -209,7 +209,7 @@
 
                if($receipt)
                {
-                       phpgwapi_cache::session_set('phpgwapi', 
'phpgw_messages', $receipt);
+                       phpgwapi_cache::message_set($receipt, 'message');
                }
 
                $forward = phpgw::get_var('phpgw_forward');

Modified: branches/Version-1_0-branch/phpgwapi/inc/class.cache.inc.php
===================================================================
--- branches/Version-1_0-branch/phpgwapi/inc/class.cache.inc.php        
2011-02-20 20:33:04 UTC (rev 7025)
+++ branches/Version-1_0-branch/phpgwapi/inc/class.cache.inc.php        
2011-02-21 07:59:06 UTC (rev 7026)
@@ -561,4 +561,39 @@
                        }
                        return self::_file_set($key, $value);
                }
+
+               /**
+                * Store system message in the session cache
+                *
+                * @param string or array $message the message set to register
+                * @param string $type the type (error/message) of message
+                * @return bool was the data stored in the session cache?
+                */
+               public static function message_set($message, $type = 'message')
+               {
+                       if(!$type == 'message')
+                       {
+                               $type == 'error';
+                       }
+                       $receipt = self::session_get('phpgwapi', 
'phpgw_messages');
+                       if(!is_array($receipt))
+                       {
+                               $receipt =array();
+                       }
+                       
+                       if(!is_array($message))
+                       {
+                               $_input = array($message);
+                       }
+                       else
+                       {
+                               $_input = $message;
+                       }
+                       foreach($_input as $msg)
+                       {
+                               $receipt[$type][]=array('msg'=> $msg);
+                       }
+
+                       return !!self::session_set('phpgwapi', 
'phpgw_messages', $receipt);
+               }
        }

Modified: branches/Version-1_0-branch/phpgwapi/inc/class.js.inc.php
===================================================================
--- branches/Version-1_0-branch/phpgwapi/inc/class.js.inc.php   2011-02-20 
20:33:04 UTC (rev 7025)
+++ branches/Version-1_0-branch/phpgwapi/inc/class.js.inc.php   2011-02-21 
07:59:06 UTC (rev 7026)
@@ -124,9 +124,8 @@
                                $combine = false;
                                
if(isset($GLOBALS['phpgw_info']['user']['apps']['admin']))
                                {
-                                       $receipt = array();
-                                       $receipt['error'][]=array('msg'=> 
'Speed could be gained from setting suhosin.get.max_value_length = 2000 in 
php.ini');
-                                       phpgwapi_cache::session_set('phpgwapi', 
'phpgw_messages', $receipt);
+                                       $message ='Speed could be gained from 
setting suhosin.get.max_value_length = 2000 in php.ini';
+                                       phpgwapi_cache::message_set($message, 
'error');
                                }
                        }
                        $links = "<!--JS Imports from phpGW javascript class 
-->\n";

Modified: branches/Version-1_0-branch/phpgwapi/inc/class.yui.inc.php
===================================================================
--- branches/Version-1_0-branch/phpgwapi/inc/class.yui.inc.php  2011-02-20 
20:33:04 UTC (rev 7025)
+++ branches/Version-1_0-branch/phpgwapi/inc/class.yui.inc.php  2011-02-21 
07:59:06 UTC (rev 7026)
@@ -52,56 +52,60 @@
                */
                public static function load_widget($widget)
                {
+                       $_type = '-min';        // save som download
+       //              $_type = '';            // full
+       //              $_type = '-debug';      // debug
+
                        $load = array();
                        switch ( $widget )
                        {
                                case 'animation':
-                                       $load = array('animation-min', 
'container-min');
+                                       $load = array("animation{$_type}", 
"container{$_type}");
                                        break;
 
                                case 'autocomplete':
-                                       $load = array('autocomplete-min', 
'connection-min');
+                                       $load = array("autocomplete{$_type}", 
"connection{$_type}");
                                        break;
 
                                case 'button':
-                                       $load = array('button-min', 
'element-min');
+                                       $load = array("button{$_type}", 
"element{$_type}");
                                        break;
 
                                case 'calendar':
-                                       $load = array('calendar-min');
+                                       $load = array("calendar{$_type}");
                                        break;
 
                                case 'colorpicker':
                                case 'colourpicker': // be nice to the speakers 
of H.M. English :)
-                                       $load = array('colorpicker-min');
+                                       $load = array("colorpicker{$_type}");
                                        break;
 
                                case 'container':
-                                       $load = array('container-min', 
'dragdrop-min');
+                                       $load = array("container{$_type}", 
"dragdrop{$_type}");
                                        break;
 
                                case 'history':
-                                       $load = array('history-min');
+                                       $load = array("history{$_type}");
                                        break;
 
                                case 'utilities':
-                                       $load = array('container-min');
+                                       $load = array("container{$_type}");
                                        break;
 
                                case 'connection':
-                                       $load = array('connection-min');
+                                       $load = array("connection{$_type}");
                                        break;
 
                                case 'datasource':
-                                       $load = array('json-min', 
'datasource-min', 'connection-min');
+                                       $load = array("json{$_type}", 
"datasource{$_type}", "connection{$_type}");
                                        break;
 
                                case 'datatable':
-                                       $load = array('json-min', 
'element-min', 'datasource-min', 'datatable-min' );
+                                       $load = array("json{$_type}", 
"element{$_type}", "datasource{$_type}", "datatable{$_type}" );
                                        break;
                                // cramirez: necesary for include a partucular 
js
                                case 'loader':
-                                       $load = array('yuiloader-min');
+                                       $load = array("yuiloader{$_type}");
                                        break;
 
                                case 'dom':
@@ -109,19 +113,19 @@
                                        break;
 
                                case 'dragdrop':
-                                       $load = array('dragdrop-min');
+                                       $load = array("dragdrop{$_type}");
                                        break;
 
                                case 'editor':
-                                       $load = array('dragdrop-min', 
'element-min', 'animation-min', 'resize-min', 'container_core-min', 'menu-min', 
'button-min', 'editor-min');
+                                       $load = array("dragdrop{$_type}", 
"element{$_type}", "animation{$_type}", "resize{$_type}", 
"container_core{$_type}", "menu{$_type}", "button{$_type}", "editor{$_type}");
                                        break;
 
                                case 'element':
-                                       $load = array('element-min');
+                                       $load = array("element{$_type}");
                                        break;
 
                                case 'paginator':
-                                       $load = array('paginator-min');
+                                       $load = array("paginator{$_type}");
                                        break;
 
                                case 'event':
@@ -131,39 +135,39 @@
                                // not including history - as it isn't needed - 
need to handle the not included/used types somewhere
 
                                case 'imageloader':
-                                       $load = array('imageloader-min');
+                                       $load = array("imageloader{$_type}");
                                        break;
 
                                case 'logger':
-                                       $load = array('dragdrop-min', 
'logger-min');
+                                       $load = array("dragdrop{$_type}", 
"logger{$_type}");
                                        break;
 
                                case 'menu':
-                                       $load = array('container_core-min', 
'menu-min');
+                                       $load = array("container_core{$_type}", 
"menu{$_type}");
                                        break;
 
                 case 'resize':
-                                       $load = array('dragdrop-min', 
'element-min', 'resize-min');
+                                       $load = array("dragdrop{$_type}", 
"element{$_type}", "resize{$_type}");
                                        break;
 
                                case 'layout':
-                                       $load = array('dragdrop-min', 
'element-min', 'resize-min', 'layout-min');
+                                       $load = array("dragdrop{$_type}", 
"element{$_type}", "resize{$_type}", "layout{$_type}");
                                        break;
 
                                case 'slider':
-                                       $load = array('dragdrop-min', 
'animation-min', 'slider-min');
+                                       $load = array("dragdrop{$_type}", 
"animation{$_type}", "slider{$_type}");
                                        break;
 
                                case 'tabview':
-                                       $load = array('element-min', 
'tabview-min');
+                                       $load = array("element{$_type}", 
"tabview{$_type}");
                                        break;
 
                                case 'treeview':
-                                       $load = array('treeview-min');
+                                       $load = array("treeview{$_type}");
                                        break;
 
                                case 'uploader':
-                                       $load = array('element-min', 
'uploader-min', 'datasource-min', 'datatable-min');
+                                       $load = array("element{$_type}", 
"uploader{$_type}", "datasource{$_type}", "datatable{$_type}");
                                        break;
 
                                default:
@@ -172,6 +176,10 @@
                                        return '';
                        }
 
+                       if($_type == '-debug')
+                       {
+                               $load[] = 'logger';
+                       }
                        $ok = true;
                        $GLOBALS['phpgw']->js->validate_file('yahoo', 
'yahoo-dom-event/yahoo-dom-event');
                        foreach ( $load as $script )

Modified: branches/Version-1_0-branch/property/inc/class.hook_helper.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.hook_helper.inc.php  
2011-02-20 20:33:04 UTC (rev 7025)
+++ branches/Version-1_0-branch/property/inc/class.hook_helper.inc.php  
2011-02-21 07:59:06 UTC (rev 7026)
@@ -41,7 +41,7 @@
                public function clear_userlist()
                {
                        $cleared = 
ExecMethod('property.bocommon.reset_fm_cache_userlist');
-                       $receipt['message'][] = array('msg' => lang('%1 
userlists cleared from cache',$cleared));
-                       phpgwapi_cache::session_set('phpgwapi', 
'phpgw_messages', $receipt);
+                       $message =lang('%1 userlists cleared from 
cache',$cleared);
+                       phpgwapi_cache::message_set($message, 'message');
                }
        }

Modified: branches/Version-1_0-branch/property/inc/class.sogeneric.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.sogeneric.inc.php    
2011-02-20 20:33:04 UTC (rev 7025)
+++ branches/Version-1_0-branch/property/inc/class.sogeneric.inc.php    
2011-02-21 07:59:06 UTC (rev 7026)
@@ -1891,9 +1891,8 @@
 
 // END BOOKING TABLES
                        default:
-                               $receipt = array();
-                               $receipt['error'][]=array('msg'=>lang('ERROR: 
illegal type %1', $type));
-                               phpgwapi_cache::session_set('phpgwapi', 
'phpgw_messages', $receipt);
+                               $message =lang('ERROR: illegal type %1', $type);
+                               phpgwapi_cache::message_set($message, 'error');
 //                             throw new Exception(lang('ERROR: illegal type 
%1', $type));
                        }
 

Modified: branches/Version-1_0-branch/property/inc/class.solocation.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.solocation.inc.php   
2011-02-20 20:33:04 UTC (rev 7025)
+++ branches/Version-1_0-branch/property/inc/class.solocation.inc.php   
2011-02-21 07:59:06 UTC (rev 7026)
@@ -316,7 +316,7 @@
                        {
                                $location_types = 
$this->soadmin_location->select_location_type();
 
-                               $cols = "fm_location" . ($type_id) .'.*';
+                               $cols = "fm_location{$type_id}.*";
                                $cols_return[]                          = 
'location_code';
                                $uicols['input_type'][]         = 'hidden';
                                $uicols['name'][]                       = 
'location_code';
@@ -330,15 +330,15 @@
                                for ($i=0; $i<($type_id); $i++)
                                {
                                        $uicols['input_type'][]         = 
'text';
-                                       $uicols['name'][]                       
= 'loc' . $location_types[$i]['id'];
+                                       $uicols['name'][]                       
= "loc{$location_types[$i]['id']}";
                                        $uicols['descr'][]                      
= $location_types[$i]['name'];
                                        $uicols['statustext'][]         = 
$location_types[$i]['descr'];
                                        $uicols['exchange'][]           = true;
                                        $uicols['align'][]                      
= 'center';
                                        $uicols['datatype'][]           = 
'link';
                                        $uicols['formatter'][]          = '';
-                                       $cols                                   
        .= ",fm_location" . ($type_id) .".loc" . $location_types[$i]['id'];
-                                       $cols_return[]                          
= 'loc' . $location_types[$i]['id'];
+                                       $cols                                   
        .= ",fm_location{$type_id}.loc{$location_types[$i]['id']}";
+                                       $cols_return[]                          
= "loc{$location_types[$i]['id']}";
                                }
 
                                $uicols['datatype'][$type_id] = 'I'; // correct 
the last one
@@ -349,10 +349,10 @@
                                {
                                        if(isset($list_info[$i]) && 
$list_info[$i])
                                        {
-                                               $cols.= ',fm_location' . $i . 
'.loc' . ($i) . '_name';
-                                               $cols_return[]                  
        = 'loc' . ($i) . '_name';
+                                               $cols.= 
",fm_location{$i}.loc{$i}_name";
+                                               $cols_return[]                  
        = "loc{$i}_name";
                                                $uicols['input_type'][]         
= 'text';
-                                               $uicols['name'][]               
        = 'loc' . ($i) . '_name';
+                                               $uicols['name'][]               
        = "loc{$i}_name";
                                                $uicols['descr'][]              
        = $location_types[($i-1)]['name'] . ' ' . lang('name');
                                                $uicols['statustext'][]         
= $location_types[($i-1)]['name'] . ' ' . lang('name');
                                                $uicols['exchange'][]           
= true;
@@ -366,14 +366,14 @@
                                $paranthesis = '';
                                for ($j=($type_id-1); $j>0; $j--)
                                {
-                                       $joinmethod .= " $this->join 
fm_location". ($j);
+                                       $joinmethod .= " {$this->join} 
fm_location{$j}";
 
                                        $paranthesis .='(';
 
                                        $on = 'ON';
                                        for ($i=($j); $i>0; $i--)
                                        {
-                                               $joinmethod .= " $on 
(fm_location" . ($j+1) .".loc" . ($i). " = fm_location" . ($j) . ".loc" . ($i) 
. ")";
+                                               $joinmethod .= " $on 
(fm_location" . ($j+1) .".loc{$i} = fm_location{$j}.loc{$i})";
                                                $on = 'AND';
                                                if($i==1)
                                                {
@@ -382,6 +382,9 @@
                                        }
                                }
 
+       //                      $paranthesis .='(';
+       //                      $joinmethod .= " {$this->join} fm_part_of_town 
ON (fm_location1.part_of_town_id = fm_part_of_town.part_of_town_id))";
+
                                $config = 
$this->soadmin_location->read_config('');
 
                                //_debug_array($config);
@@ -449,7 +452,7 @@
                                                }
                                                else
                                                {
-                                                       $joinmethod .= " 
$this->left_join  " . $config[$i]['reference_table'] . " ON ( fm_location" . 
$config[$i]['location_type'] . "." . $config[$i]['column_name'] . "=" . 
$config[$i]['reference_table'] . ".".$config[$i]['reference_id']."))";
+                                                       $joinmethod .= " 
{$this->left_join} {$config[$i]['reference_table']} ON ( 
fm_location{$config[$i]['location_type']}.{$config[$i]['column_name']} = 
{$config[$i]['reference_table']}.{$config[$i]['reference_id']}))";
                                                        $paranthesis .='(';
                                                }
                                        }
@@ -760,7 +763,7 @@
                                        $query_name = '';
                                        for ($i=1;$i<($type_id+1);$i++)
                                        {
-                                               $query_name .= "OR loc{$i}_name 
$this->like '%$query%'";
+                                               $query_name .= "OR loc{$i}_name 
{$this->like} '%{$query}%'";
                                        }
 
                                        if(!$criteria_id)
@@ -911,32 +914,32 @@
                        return $values;
                }
 
-               function 
generate_sql($type_id='',$cols='',$cols_return='',$uicols='',$read_single='')
+               function 
generate_sql($type_id,$cols='',$cols_return='',$uicols='',$read_single='')
                {
-                       $joinmethod = " fm_location" . ($type_id);
+                       $joinmethod = " fm_location{$type_id}";
 
                        $location_types = 
$this->soadmin_location->select_location_type();
 
-                       //              $cols .= "fm_location" . ($type_id) 
.".location_code";
+       //              $cols .= "fm_location" . ($type_id) .".location_code";
                        $cols_return[] = 'location_code';
                        for ($i=0; $i<($type_id); $i++)
                        {
                                $uicols['input_type'][]         = 'text';
-                               $uicols['name'][]               = 'loc' . 
$location_types[$i]['id'];
-                               $uicols['descr'][]              = 
$location_types[$i]['name'];
+                               $uicols['name'][]                       = 'loc' 
. $location_types[$i]['id'];
+                               $uicols['descr'][]                      = 
$location_types[$i]['name'];
                                $uicols['statustext'][]         = 
$location_types[$i]['descr'];
-                               //                      $cols                   
        .= ",fm_location" . ($type_id) .".loc" . $location_types[$i]['id'];
-                               $cols_return[]                  = 'loc' . 
$location_types[$i]['id'];
+       //                      $cols                                           
.= ",fm_location" . ($type_id) .".loc" . $location_types[$i]['id'];
+                               $cols_return[]                          = 'loc' 
. $location_types[$i]['id'];
                        }
 
 
                        if($type_id !=1)
                        {
-                               //                              $cols.= 
',fm_location1.loc1_name as loc1_name';
-                               //                              $cols_return[]  
                = 'loc1_name';
+//                             $cols.= ',fm_location1.loc1_name as loc1_name';
+//                             $cols_return[]                          = 
'loc1_name';
                                $uicols['input_type'][]         = 'text';
-                               $uicols['name'][]               = 'loc1_name';
-                               $uicols['descr'][]              = 
lang('Property Name');
+                               $uicols['name'][]                       = 
'loc1_name';
+                               $uicols['descr'][]                      = 
lang('Property Name');
                                $uicols['statustext'][]         = 
lang('Property Name');
                        }
 
@@ -950,7 +953,7 @@
                                $on = 'ON';
                                for ($i=($j); $i>0; $i--)
                                {
-                                       $joinmethod .= " $on (fm_location" . 
($j+1) .".loc" . ($i). " = fm_location" . ($j) . ".loc" . ($i) . ")";
+                                       $joinmethod .= " {$on} (fm_location" . 
($j+1) . ".loc{$i}  = fm_location{$j}.loc{$i})";
                                        $on = 'AND';
                                        if($i==1)
                                        {
@@ -966,7 +969,6 @@
                        {
                                if (($config[$i]['location_type'] <= $type_id) 
&& ($config[$i]['f_key'] ==1))
                                {
-
                                        
if($config[$i]['column_name']=='tenant_id' || 
$config[$i]['column_name']=='street_id')
                                        {
                                                $join=$this->left_join;
@@ -1522,10 +1524,10 @@
                {
                        if(is_array($data))
                        {
-                               $filter = 
(isset($data['filter'])?$data['filter']:0);
-                               $type_id = 
(isset($data['type_id'])?$data['type_id']:'');
-                               $district_id = 
(isset($data['district_id'])?$data['district_id']:'');
-                               $part_of_town_id = 
(isset($data['part_of_town_id'])?$data['part_of_town_id']:'');
+                               $filter =  isset($data['filter']) && 
$data['filter'] ? $data['filter'] : 0;
+                               $type_id =  isset($data['type_id']) && 
$data['type_id'] ?(int)$data['type_id'] : 0;
+                               $district_id =  isset($data['district_id']) && 
$data['district_id'] ? (int)$data['district_id']:0;
+                               $part_of_town_id =  
isset($data['part_of_town_id']) && $data['part_of_town_id'] ? 
(int)$data['part_of_town_id']:0;
                        }
 
                        if(!$type_id)
@@ -1554,7 +1556,7 @@
                                $uicols['input_type'][] = 'text';
                                $cols.=", fm_part_of_town.district_id as 
district_id";
                                $groupmethod .= " ,fm_part_of_town.district_id";
-                               $filtermethod = " $where 
fm_part_of_town.district_id=$district_id";
+                               $filtermethod = " $where 
fm_part_of_town.district_id = {$district_id}";
                                $where = 'AND';
                        }
 
@@ -1565,7 +1567,7 @@
                                $uicols['input_type'][] = 'text';
                                $groupmethod .= " ,fm_part_of_town.name";
                                $cols.=", fm_part_of_town.name as part_of_town";
-                               $filtermethod .= " $where 
fm_part_of_town.part_of_town_id=$part_of_town_id";
+                               $filtermethod .= " $where 
fm_part_of_town.part_of_town_id = {$part_of_town_id}";
                                $where = 'AND';
                        }
 

Modified: branches/Version-1_0-branch/property/inc/class.uiworkorder.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.uiworkorder.inc.php  
2011-02-20 20:33:04 UTC (rev 7025)
+++ branches/Version-1_0-branch/property/inc/class.uiworkorder.inc.php  
2011-02-21 07:59:06 UTC (rev 7026)
@@ -1767,7 +1767,11 @@
                        $receipt = 
$GLOBALS['phpgw']->session->appsession('receipt','property');
                        
$GLOBALS['phpgw']->session->appsession('receipt','property','');
 
-                       $id     = phpgw::get_var('id');
+                       if(!$id = phpgw::get_var('id'))
+                       {
+                               phpgwapi_cache::message_set('ID is required for 
the function uiworkorder::view()', 'error'); 
+                               
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=> 
'property.uiworkorder.index'));
+                       }
 
                        $GLOBALS['phpgw']->xslttpl->add_file(array('workorder', 
'hour_data_view', 'files'));
 




reply via email to

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