[wixet] r387 committed - [No log message]

0 views
Skip to first unread message

wi...@googlecode.com

unread,
Sep 22, 2010, 8:36:24 PM9/22/10
to wi...@googlegroups.com
Revision: 387
Author: maxpowel
Date: Wed Sep 22 17:35:22 2010
Log: [No log message]
http://code.google.com/p/wixet/source/detail?r=387

Modified:
/trunk/apps/core/modules/account/actions/actions.class.php
/trunk/apps/core/modules/account/templates/validateAccountSuccess.php
/trunk/lib/model/doctrine/base/Basecountry.class.php
/trunk/lib/task/fullCleanTask.class.php

=======================================
--- /trunk/apps/core/modules/account/actions/actions.class.php Fri Sep 17
09:09:57 2010
+++ /trunk/apps/core/modules/account/actions/actions.class.php Wed Sep 22
17:35:22 2010
@@ -46,6 +46,14 @@
$this->email = $validation->getEmail();
$this->hash = $validation->getHash();
$this->username = $i == 1?$username:$newUsername;
+
+ $ch = curl_init();
+ curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
+ $url="http://api.wipmania.com/".$_SERVER['REMOTE_ADDR'];
+ curl_setopt($ch, CURLOPT_URL,$url);
+ $code = curl_exec ($ch);
+ echo $res;
+
}
else
$this->error = true;
=======================================
--- /trunk/apps/core/modules/account/templates/validateAccountSuccess.php
Fri Sep 17 09:09:57 2010
+++ /trunk/apps/core/modules/account/templates/validateAccountSuccess.php
Wed Sep 22 17:35:22 2010
@@ -15,6 +15,7 @@
<table>
<tr><td>Nombre</td><td><input id="firstname" value="<?php echo
$firstname;?>" type="text" class="check ui-widget-content
ui-corner-all"></td></tr>
<tr><td>Apellido</td><td><input id="lastname" value="<?php echo
$lastname;?>" type="text" class="check form ui-widget-content
ui-corner-all"></td></tr>
+ <tr><td>Pais</td><td><img src='/images/country/<?php echo
$countryCode;?>.png' /> <?php echo $country;?><td></tr>
<tr><td>Correo electr&oacute;nico</td><td><?php echo $email;?></td></tr>
<tr><td>Nombre de usuario</td><td><div><input id="username"
value="<?php echo $username;?>" type="text" class="ui-widget-content
ui-corner-all"><span id="usernamestat" style="float:right" class="ui-icon
ui-icon-check"></span></div></td></tr>
<tr><td>Contrase&ntilde;a</td><td><input id="pass1" type="password"
class="check text ui-widget-content ui-corner-all"></td></tr>
=======================================
--- /trunk/lib/model/doctrine/base/Basecountry.class.php Thu Aug 12
18:19:21 2010
+++ /trunk/lib/model/doctrine/base/Basecountry.class.php Wed Sep 22
17:35:22 2010
@@ -7,15 +7,18 @@
*
* @property integer $country_id
* @property varchar $name
+ * @property char $code
* @property Doctrine_Collection $profile
* @property Doctrine_Collection $city
*
* @method integer getCountryId() Returns the current
record's "country_id" value
* @method varchar getName() Returns the current
record's "name" value
+ * @method char getCode() Returns the current
record's "code" value
* @method Doctrine_Collection getProfile() Returns the current
record's "profile" collection
* @method Doctrine_Collection getCity() Returns the current
record's "city" collection
* @method country setCountryId() Sets the current
record's "country_id" value
* @method country setName() Sets the current
record's "name" value
+ * @method country setCode() Sets the current
record's "code" value
* @method country setProfile() Sets the current
record's "profile" collection
* @method country setCity() Sets the current
record's "city" collection
*
@@ -39,6 +42,10 @@
'type' => 'varchar',
'length' => 50,
));
+ $this->hasColumn('code', 'char', 2, array(
+ 'type' => 'char',
+ 'length' => 2,
+ ));
}

public function setUp()
=======================================
--- /trunk/lib/task/fullCleanTask.class.php Wed Sep 1 19:10:52 2010
+++ /trunk/lib/task/fullCleanTask.class.php Wed Sep 22 17:35:22 2010
@@ -19,23 +19,25 @@
$admin = $settings['all']['ldap']['admin'];
$adminPass = $settings['all']['ldap']['password'];
$host = $settings['all']['ldap']['hostname'];
+ $suffix = $settings['all']['ldap']['suffix'];
}else{
$admin = sfConfig::get('sf_ldap_admin');
$adminPass = sfConfig::get('sf_ldap_password');
$host = sfConfig::get('sf_ldap_hostname');
+ $suffix = sfConfig::get('sf_ldap_suffix');
}

- $ds = ldap_connect($host);
+ $ds = ldap_connect($host,10389);
if(!$ds) throw new Exception('Cant connect to LDAP host "'.$host.'"');
ldap_set_option($ds, LDAP_OPT_PROTOCOL_VERSION, 3);

if(!ldap_bind($ds, $admin, $adminPass)) throw new Exception('Cant bind
to LDAP host "'.$host.'"');
- $sr=ldap_search($ds, "ou=People,dc=wixet", "cn=*");
+ $sr=ldap_search($ds, $suffix, "uid=*");
$info = ldap_get_entries($ds, $sr);
foreach($info as $user){
- if(strlen($user['cn'][0]) > 0)
- if(!ldap_delete($ds, "cn=".$user['cn'][0].",ou=People,dc=wixet"))
- throw new Exception('Error while deleting
user "'.$user['cn'][0].'"');
+ if(strlen($user['uid'][0]) > 0)
+ if(!ldap_delete($ds, "uid=".$user['uid'][0].",".$suffix))
+ throw new Exception('Error while deleting
user "'.$user['uid'][0].'"');
}
$this->log("LDAP purge done");
$this->runTask('doctrine:drop-db','--no-confirmation');

Reply all
Reply to author
Forward
0 new messages