phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] property/class.bocommon.php, 1.1.1.8


From: nomail
Subject: [Phpgroupware-cvs] property/class.bocommon.php, 1.1.1.8
Date: Sun, 23 May 2004 08:16:52 -0000

Update of /property
Modified Files:
        Branch: 
          class.bocommon.php

date: 2004/04/27 11:47:49;  author: sigurdne;  state: Exp;  lines: +46 -1

Log Message:
no message
=====================================================================
Index: property/class.bocommon.php
diff -u property/class.bocommon.php:1.1.1.7 property/class.bocommon.php:1.1.1.8
--- property/class.bocommon.php:1.1.1.7 Mon Apr 26 17:02:30 2004
+++ property/class.bocommon.php Tue Apr 27 11:47:49 2004
@@ -1317,6 +1317,51 @@
                        return 
$this->link('/index.php','sid=cookie&op='.$this->action.$extras);
                }
 
+               function short_link($url='', $extravars = '')
+               {
+                       $url = 'index.php';
+
+                       if (!is_array($extravars) && $extravars != '')
+                       {
+                               $a = explode('&', $extravars);
+                               $i = 0;
+                               while ($i < count($a))
+                               {
+                                       $b = split('=', $a[$i]);
+                                       $new_extravars[$b[0]] = $b[1];
+                                       $i++;
+                               }
+                               $extravars = $new_extravars;
+                               unset($new_extravars);
+                       }
+
+//html_print_r($extravars);
+                       /* if using frames we make sure there is a framepart */
+                       if(@defined('PHPGW_USE_FRAMES') && PHPGW_USE_FRAMES)
+                       {
+                               if (!isset($extravars['framepart']))
+                               {
+                                       $extravars['framepart']='body';
+                               }
+                       }
+
+                       if (is_array($extravars))
+                       {
+                               $new_extravars = '';
+                               reset($extravars);
+                               while(list($key,$value) = each($extravars))
+                               {
+                                       if (!empty($new_extravars))
+                                       {
+                                               $new_extravars .= '&';
+                                       }
+                                       $new_extravars .= 
$key.'='.htmlentities(urlencode($value));
+                               }
+                               return $url .= '?' . $new_extravars;
+                       }
+                       /* if no extravars then we return the cleaned up 
url/scriptname */
+                       return $url;
+               }
                function link($url, $extravars = '')
                {
                        /* first we process the $url to build the full 
scriptname */




reply via email to

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