minor changes

pull/217/head
Christophe Vandeplas 2013-06-24 15:12:30 +02:00
parent 70f062962c
commit ac5c59e9af
8 changed files with 36 additions and 14 deletions

7
.pydevproject Normal file
View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?eclipse-pydev version="1.0"?>
<pydev_project>
<pydev_property name="org.python.pydev.PYTHON_PROJECT_INTERPRETER">Default</pydev_property>
<pydev_property name="org.python.pydev.PYTHON_PROJECT_VERSION">python 2.7</pydev_property>
</pydev_project>

View File

@ -174,7 +174,7 @@
*/
Configure::write('Session', array(
'timeout' => 3600, // Session timeout, default is 1 hour
'defaults' => 'php'
'defaults' => 'database'
));
/**

View File

@ -118,14 +118,14 @@ class Event extends AppModel {
//'on' => 'create', // Limit validation to 'create' or 'update' operations
),
'distribution' => array(
'numeric' => array(
'rule' => array('numeric'),
//'message' => 'Options : Your organisation only, This community only, Connected communities, All communities',
//'allowEmpty' => false,
'required' => true,
//'last' => false, // Stop validation after this rule
//'on' => 'create', // Limit validation to 'create' or 'update' operations
)),
'rule' => array('inList', array('0', '1', '2', '3')),
'message' => 'Options : Your organisation only, This community only, Connected communities, All communities',
//'allowEmpty' => false,
'required' => true,
//'last' => false, // Stop validation after this rule
//'on' => 'create', // Limit validation to 'create' or 'update' operations
),
'analysis' => array(
'rule' => array('inList', array('0', '1', '2')),
'message' => 'Options : 0, 1, 2',
@ -621,6 +621,9 @@ class Event extends AppModel {
$authkey = $server['Server']['authkey'];
if (null == $HttpSocket) {
App::uses('HttpSocket', 'Network/Http');
//$HttpSocket = new HttpSocket(array(
// 'ssl_verify_peer' => false
// ));
$HttpSocket = new HttpSocket();
}
$request = array(
@ -654,6 +657,9 @@ class Event extends AppModel {
if (null == $HttpSocket) {
App::uses('HttpSocket', 'Network/Http');
//$HttpSocket = new HttpSocket(array(
// 'ssl_verify_peer' => false
// ));
$HttpSocket = new HttpSocket();
}
$request = array(
@ -671,7 +677,6 @@ class Event extends AppModel {
//debug($response->body);
$xml = Xml::build($response->body);
$eventArray = Xml::toArray($xml);
// correct $eventArray if just one event
if (is_array($eventArray['response']['Event']) && isset($eventArray['response']['Event']['id'])) {
$tmp = $eventArray['response']['Event'];

1
app/webroot/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/webgrind

View File

@ -129,6 +129,14 @@ td.searchLabelCancel{
top: 90%;
}
form .error-message {
border-color: #b94a48;
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
-moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
background-color: #f2dede;
}
/* Form */
div.form,

1
app/webroot/js/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/ext-all-debug.js

View File

@ -1,2 +1,2 @@
curl -H "Accept: application/xml" -H "Authorization: vlf4o42bYSVVWLm28jLB85my4HBZWXTri8vGdySb" \
-X GET http://localhost/events/$1
curl -H "Accept: application/xml" -H "Authorization: 3xoBdRRCjr3dLS0WyqETzWZrMhmpK5iNCGpQxgsR" \
-X GET http://localhost:8888/events/$1

View File

@ -3,7 +3,7 @@
import httplib2
import urllib
api_key = 'ADD6qRRO95hkh6Rfoe5cmEcdcDCXkHWUkz0KqSzA'
api_key = '3xoBdRRCjr3dLS0WyqETzWZrMhmpK5iNCGpQxgsR'
base_url = 'http://localhost:8888'
http = httplib2.Http()
@ -219,7 +219,7 @@ def add(model, xml_body) :
#response, content = index('event')
response, content = view('event', 82)
response, content = view('event', 672)
#response, content = add('event', xml_body_add_attachment)
# get last EventID
#response, content = index('events/index/sort:id/direction:desc/limit:1')