fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [6660] merge 6655:6659 from trunk


From: Sigurd Nes
Subject: [Fmsystem-commits] [6660] merge 6655:6659 from trunk
Date: Thu, 09 Dec 2010 08:19:04 +0000

Revision: 6660
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=6660
Author:   sigurdne
Date:     2010-12-09 08:19:03 +0000 (Thu, 09 Dec 2010)
Log Message:
-----------
merge 6655:6659 from trunk

Modified Paths:
--------------
    branches/Version-1_0-branch/admin/inc/class.uiasyncservice.inc.php
    
branches/Version-1_0-branch/booking/inc/class.socompleted_reservation.inc.php
    branches/Version-1_0-branch/frontend/inc/hook_config.inc.php
    branches/Version-1_0-branch/frontend/templates/base/config.tpl
    branches/Version-1_0-branch/phpgwapi/inc/class.asyncservice.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
   + 
/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

Modified: branches/Version-1_0-branch/admin/inc/class.uiasyncservice.inc.php
===================================================================
--- branches/Version-1_0-branch/admin/inc/class.uiasyncservice.inc.php  
2010-12-08 20:28:56 UTC (rev 6659)
+++ branches/Version-1_0-branch/admin/inc/class.uiasyncservice.inc.php  
2010-12-09 08:19:03 UTC (rev 6660)
@@ -84,9 +84,19 @@
 
                                if ( $test )
                                {
-                                       $prefs = 
$GLOBALS['phpgw']->preferences->create_email_preferences();
-                                       if 
(!$async->set_timer($times,'test','admin.uiasyncservice.test',array('to' => 
$prefs['email']['address'])))
+                                       $email = phpgw::get_var('email', 
'string', 'POST');
+                                       if(!$email)
                                        {
+                                               $prefs = 
$GLOBALS['phpgw']->preferences->create_email_preferences();
+                                               $email = 
$prefs['email']['address'];
+                                       }
+                                       $validator = 
CreateObject('phpgwapi.EmailAddressValidator');
+                                       
if(!$validator->check_email_address($email))
+                                       {
+                                               echo '<p><b>'.lang("Not a not 
valid email address")."</b></p>\n";                                       
+                                       }
+                                       else if 
(!$async->set_timer($times,'test','admin.uiasyncservice.test',array('to' => 
$email)))
+                                       {
                                                echo '<p><b>'.lang("Error 
setting timer, wrong syntax or maybe there's one already running 
!!!")."</b></p>\n";
                                        }
                                        unset($prefs);
@@ -200,6 +210,7 @@
                                echo 
"<p>asyncservice::next_run(";print_r($times);echo")=".($next === False ? 
'False':"'$next'=".$GLOBALS['phpgw']->common->show_date($next))."</p>\n";
                        }
                        echo '<hr><p><input type="submit" name="cancel" 
value="'.lang('Cancel TestJob!')."\"> &nbsp;\n";
+                       echo lang('email') . '<input type="text" name="email" 
value="">'."\n";
                        echo '<input type="submit" name="test" 
value="'.lang('Start TestJob!')."\">\n";
                        echo lang('for the times above')."</p>\n";
                        echo '<p>'.lang('The TestJob sends you a mail everytime 
it is called.')."</p>\n";

Modified: 
branches/Version-1_0-branch/booking/inc/class.socompleted_reservation.inc.php
===================================================================
--- 
branches/Version-1_0-branch/booking/inc/class.socompleted_reservation.inc.php   
    2010-12-08 20:28:56 UTC (rev 6659)
+++ 
branches/Version-1_0-branch/booking/inc/class.socompleted_reservation.inc.php   
    2010-12-09 08:19:03 UTC (rev 6660)
@@ -168,10 +168,10 @@
                        $entity['article_description'] = $building['name'] . ': 
' . implode(', ', $this->get_resource_names($reservation['resources']));
                        
                        if (mb_strlen($entity['article_description']) > 35) {
-                               $entity['article_description'] = 
mb_substr($entity['article_description'], 0, 32).'...'; 
+                               $entity['article_description'] = 
mb_substr($entity['article_description'], 0, 32, 'UTF-8').'...'; 
                        }
                        
-                       $entity['description'] = mb_substr($entity['from_'], 0, 
-3) .' - '. mb_substr($entity['to_'], 0, -3);
+                       $entity['description'] = mb_substr($entity['from_'], 0, 
-3, 'UTF-8') .' - '. mb_substr($entity['to_'], 0, -3, 'UTF-8');
                        $entity['building_name'] = $building['name'];
                        $entity['building_id'] = $building['id'];
                }
@@ -346,4 +346,4 @@
                        
                        return 0;
                }
-       }
\ No newline at end of file
+       }

Modified: branches/Version-1_0-branch/frontend/inc/hook_config.inc.php
===================================================================
--- branches/Version-1_0-branch/frontend/inc/hook_config.inc.php        
2010-12-08 20:28:56 UTC (rev 6659)
+++ branches/Version-1_0-branch/frontend/inc/hook_config.inc.php        
2010-12-09 08:19:03 UTC (rev 6660)
@@ -165,3 +165,29 @@
                return $cat_select;
        }
 
+       /**
+       * Get HTML checkbox with categories that are candidates for frontend 
ticket cat
+       *
+       * @param $config
+       * @return string options for selectbox
+       */
+       function tts_frontend_cat($config)
+       {
+               $cats   = CreateObject('phpgwapi.categories', -1, 'property', 
'.ticket');
+               $cats->supress_info = true;
+               $values = $cats->return_sorted_array(0, false, '', '', '', 
$globals = true, '', $use_acl = false);
+               $tts_frontend_cat_selected = isset($config['tts_frontend_cat']) 
? $config['tts_frontend_cat'] : array();
+               $out = '';
+               foreach ( $values as $entry)
+               {
+                       $checked = '';
+                       if ( in_array($entry['id'], $tts_frontend_cat_selected))
+                       {
+                               $checked = ' checked';
+                       }
+                       $out .=  <<<HTML
+                               <tr><td><input type="checkbox" 
name="newsettings[tts_frontend_cat][]" value="{$entry['id']}" 
{$checked}><label>{$entry['name']}</label></td></tr>
+HTML;
+               }
+               return $out;
+       }

Modified: branches/Version-1_0-branch/frontend/templates/base/config.tpl
===================================================================
--- branches/Version-1_0-branch/frontend/templates/base/config.tpl      
2010-12-08 20:28:56 UTC (rev 6659)
+++ branches/Version-1_0-branch/frontend/templates/base/config.tpl      
2010-12-09 08:19:03 UTC (rev 6660)
@@ -46,6 +46,16 @@
                        </td>
                </tr>
                <tr class="row_off">
+                       <td>{lang_ticket_frontend_category}:</td>
+                       <td>
+               <!--to be able to blank the setting - need an empty value-->
+               <input type = 'hidden' name="newsettings[tts_frontend_cat][]" 
value="">
+                    <table>
+{hook_tts_frontend_cat}
+                        </table>
+                       </td>
+               </tr>
+               <tr class="row_off">
                        <td>{lang_ticket_default_category}:</td>
                        <td>
                                <select name="newsettings[tts_default_cat]">

Modified: branches/Version-1_0-branch/phpgwapi/inc/class.asyncservice.inc.php
===================================================================
--- branches/Version-1_0-branch/phpgwapi/inc/class.asyncservice.inc.php 
2010-12-08 20:28:56 UTC (rev 6659)
+++ branches/Version-1_0-branch/phpgwapi/inc/class.asyncservice.inc.php 
2010-12-09 08:19:03 UTC (rev 6660)
@@ -604,9 +604,22 @@
 
                        if (!is_executable($this->crontab))
                        {
-                               //echo "<p>Error: $this->crontab not found 
!!!</p>";
+                               if($this->debug)
+                               {
+                                       echo "<p>Error: $this->crontab not 
found !!!</p>";
+                               }
                                return 0;
                        }
+
+                       if (!is_executable($this->php))
+                       {
+                               if($this->debug)
+                               {
+                                       echo "<p>Error: $this->php not found 
!!!</p>";
+                               }
+                               return 0;
+                       }
+
                        $times = False;
                        $this->other_cronlines = array();
                        if (($crontab = popen('/bin/sh -c "'.$this->crontab.' 
-l" 2>&1','r')) !== False)




reply via email to

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