fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [9941] dont store homepage on org when content is jus


From: Erik Holm-Larsen
Subject: [Fmsystem-commits] [9941] dont store homepage on org when content is just http://
Date: Fri, 31 Aug 2012 05:52:27 +0000

Revision: 9941
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=9941
Author:   erikhl
Date:     2012-08-31 05:52:26 +0000 (Fri, 31 Aug 2012)
Log Message:
-----------
dont store homepage on org when content is just http://

Modified Paths:
--------------
    trunk/activitycalendarfrontend/inc/class.uiactivity.inc.php
    trunk/activitycalendarfrontend/templates/base/activity_new.php
    trunk/activitycalendarfrontend/templates/base/activity_new_step_1.php

Modified: trunk/activitycalendarfrontend/inc/class.uiactivity.inc.php
===================================================================
--- trunk/activitycalendarfrontend/inc/class.uiactivity.inc.php 2012-08-30 
17:39:40 UTC (rev 9940)
+++ trunk/activitycalendarfrontend/inc/class.uiactivity.inc.php 2012-08-31 
05:52:26 UTC (rev 9941)
@@ -63,65 +63,70 @@
                        {
                                if($o_id_new == "new_org")
                                {
-                                       //add new organization to internal 
activitycalendar organization register
-                               $org_info['name'] = phpgw::get_var('orgname');
-                               $org_info['orgnr'] = phpgw::get_var('orgno');
-                               $org_info['homepage'] = 
phpgw::get_var('homepage');
-                               $org_info['street'] = phpgw::get_var('address');
-                               $org_info['streetnumber'] = 
phpgw::get_var('number');
-                               $org_info['zip'] = phpgw::get_var('postzip');
-                               $org_info['postaddress'] = 
phpgw::get_var('postaddress');
-                               $org_info['status'] = "new";
-                               $o_id = 
$this->so_activity->add_organization_local($org_info);
-                               
-                               //add contact persons
-                               $contact1 = array();
-                               $contact1['name'] = 
phpgw::get_var('org_contact1_name');
-                               $contact1['phone'] = 
phpgw::get_var('org_contact1_phone');
-                               $contact1['mail'] = 
phpgw::get_var('org_contact1_mail');
-                               $contact1['org_id'] = $o_id;
-                               $contact1['group_id'] = 0;
-                               
$this->so_activity->add_contact_person_local($contact1);
-                               
-                               $person_arr = 
$this->so_contact->get_local_contact_persons($o_id);
-                               foreach($person_arr as $p)
-                               {
-                                       $persons[] = $p;
-                               }
-                               
-                               $person_ids = 
$this->so_organization->get_contacts_local($o_id);
-                               $desc = phpgw::get_var('org_description');
-                               $organization = 
$this->so_organization->get_organization_local($o_id);
-                               $new_org = true;
-    
-                               $organization = 
$this->so_organization->get_organization_local($o_id);
-                               $person_arr = 
$this->so_organization->get_contacts_local_as_objects($o_id);
-                               foreach($person_arr as $p)
-                               {
-                                       //var_dump($p);
-                                       $persons[] = $p;
-                               }
-                               
-                               $message = lang('organization_saved_form');
-                               
-                               $this->render('activity_new.php', array
-                                       (
-                                               'activity'      => $activity,
-                                               'new_organization' => true,
-                                               'organization' => $organization,
-                                               'contact1' => $persons[0],
-                                               'arenas' => $arenas,
-                                               'buildings' => $buildings,
-                                               'categories' => $categories,
-                                               'targets' => $targets,
-                                               'districts' => $districts,
-                                               'offices' => $offices,
-                                               'editable' => true,
-                                               'message' => isset($message) ? 
$message : phpgw::get_var('message'),
-                                               'error' => isset($error) ? 
$error : phpgw::get_var('error'),
-                                               'ajaxURL' => $ajaxUrl
-                                       )
-                               );
+                                    //add new organization to internal 
activitycalendar organization register
+                                    $org_homepage = phpgw::get_var('homepage');
+                                    if($org_homepage == 'http://')
+                                    {
+                                        $org_homepage = "";
+                                    }
+                                    $org_info['name'] = 
phpgw::get_var('orgname');
+                                    $org_info['orgnr'] = 
phpgw::get_var('orgno');
+                                    $org_info['homepage'] = $org_homepage;
+                                    $org_info['street'] = 
phpgw::get_var('address');
+                                    $org_info['streetnumber'] = 
phpgw::get_var('number');
+                                    $org_info['zip'] = 
phpgw::get_var('postzip');
+                                    $org_info['postaddress'] = 
phpgw::get_var('postaddress');
+                                    $org_info['status'] = "new";
+                                    $o_id = 
$this->so_activity->add_organization_local($org_info);
+
+                                    //add contact persons
+                                    $contact1 = array();
+                                    $contact1['name'] = 
phpgw::get_var('org_contact1_name');
+                                    $contact1['phone'] = 
phpgw::get_var('org_contact1_phone');
+                                    $contact1['mail'] = 
phpgw::get_var('org_contact1_mail');
+                                    $contact1['org_id'] = $o_id;
+                                    $contact1['group_id'] = 0;
+                                    
$this->so_activity->add_contact_person_local($contact1);
+
+                                    $person_arr = 
$this->so_contact->get_local_contact_persons($o_id);
+                                    foreach($person_arr as $p)
+                                    {
+                                            $persons[] = $p;
+                                    }
+
+                                    $person_ids = 
$this->so_organization->get_contacts_local($o_id);
+                                    $desc = phpgw::get_var('org_description');
+                                    $organization = 
$this->so_organization->get_organization_local($o_id);
+                                    $new_org = true;
+
+                                    $organization = 
$this->so_organization->get_organization_local($o_id);
+                                    $person_arr = 
$this->so_organization->get_contacts_local_as_objects($o_id);
+                                    foreach($person_arr as $p)
+                                    {
+                                            //var_dump($p);
+                                            $persons[] = $p;
+                                    }
+
+                                    $message = lang('organization_saved_form');
+
+                                    $this->render('activity_new.php', array
+                                            (
+                                                    'activity'         => 
$activity,
+                                                    'new_organization' => true,
+                                                    'organization' => 
$organization,
+                                                    'contact1' => $persons[0],
+                                                    'arenas' => $arenas,
+                                                    'buildings' => $buildings,
+                                                    'categories' => 
$categories,
+                                                    'targets' => $targets,
+                                                    'districts' => $districts,
+                                                    'offices' => $offices,
+                                                    'editable' => true,
+                                                    'message' => 
isset($message) ? $message : phpgw::get_var('message'),
+                                                    'error' => isset($error) ? 
$error : phpgw::get_var('error'),
+                                                    'ajaxURL' => $ajaxUrl
+                                            )
+                                    );
                                }
                                else
                                {

Modified: trunk/activitycalendarfrontend/templates/base/activity_new.php
===================================================================
--- trunk/activitycalendarfrontend/templates/base/activity_new.php      
2012-08-30 17:39:40 UTC (rev 9940)
+++ trunk/activitycalendarfrontend/templates/base/activity_new.php      
2012-08-31 05:52:26 UTC (rev 9941)
@@ -363,7 +363,7 @@
                         </LABEL><BR>
                         <INPUT id="arena_address" 
                             onkeyup="javascript:get_address_search_arena()" 
name="arena_address" size="50" 
-                               type="text"><BR>
+                               type="text" autocomplete="off"><BR>
                        <DIV id="arena_address_container"></DIV></DT>
                        <DT style="clear: right; float: left;"><LABEL 
                                for="arena_number">Husnummer</LABEL><BR><INPUT 
name="arena_number" size="5" 

Modified: trunk/activitycalendarfrontend/templates/base/activity_new_step_1.php
===================================================================
--- trunk/activitycalendarfrontend/templates/base/activity_new_step_1.php       
2012-08-30 17:39:40 UTC (rev 9940)
+++ trunk/activitycalendarfrontend/templates/base/activity_new_step_1.php       
2012-08-31 05:52:26 UTC (rev 9941)
@@ -221,7 +221,7 @@
                                                <dd><input type="text" 
name="orgno"/></dd>
                                                <DT style="margin-right: 20px; 
float: left;"><label for="street">Gateadresse
                                                        <a 
onclick="alert('<?php echo lang('help_streetaddress')?>'); return false;" 
href="#"><img alt="Hjelp" 
src="/aktivitetsoversikt/images/hjelp.gif"></a></label><br/>
-                                                       <INPUT id="address" 
onkeyup="javascript:get_address_search()" name="address" size="50" 
type="text"><BR/>
+                                                    <INPUT id="address" 
onkeyup="javascript:get_address_search()" name="address" size="50" type="text" 
autocomplete="off"><BR/>
                                                        <DIV 
id="address_container"></DIV>
                                                </DT>
                                                <DT style="clear: right; float: 
left;"><LABEL for="number">Husnummer</LABEL><BR/>




reply via email to

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