je crois que tu as commit un conflit la ...
et avec un peu d'effort tu peux attraper le commit 7000 ![]()
Cedric
pierre.andrews@gmail.com a écrit :
Author: pierre.andrews@gmail.com
Date: Sat Oct 28 12:01:41 2006
New Revision: 6696Log:
la colonne last_update passe en DATETIME pour coller a spip et pouvoir faire des selections dessusModified:
_plugins_/_test_/FpipR/trunk/FpipR_fonctions.php
_plugins_/_test_/FpipR/trunk/README
_plugins_/_test_/FpipR/trunk/base/FpipR_db.php
_plugins_/_test_/FpipR/trunk/test_fpipr.htmlModified: _plugins_/_test_/FpipR/trunk/FpipR_fonctions.php
--- _plugins_/_test_/FpipR/trunk/FpipR_fonctions.php (original)
+++ _plugins_/_test_/FpipR/trunk/FpipR_fonctions.php Sat Oct 28 12:01:41 2006
@@ -120,6 +120,43 @@$extras = array();
+<<<<<<< .mine
+ //on regarde dans les Where (critere de la boucle) si les arguments sont dispo.
+ foreach($boucle->where as $w) {
+ $key = str_replace("'",'',$w[1]);
+ $key = str_replace("$id_table.",'',$key);
+ $val = $w[2];
+ if (in_array($key,$possible_args)){
+ if(in_array($key,$possible_extras)) $extras = $key; + else if($key == 'upload_date') $extras = 'date_upload';
+ else if($key == 'taken_date') $extras ='date_taken';
+ //TODO upload_date doit être en timestamp/1000
+ switch($w[0]) {
+ case "'='":
+ if($key == 'taken_date' || $key == 'upload_date') {
+ $arguments['min_'.$key] = $val;
+ $arguments['max_'.$key] = $val;
+ } else {
+ $arguments[$key] = $val;
+ }
+ break;
+ case "'<'":
+ if($key == 'taken_date' || $key == 'upload_date') {
+ $arguments['min_'.$key] = $val;
+ }
+ break;
+ case "'>'":
+ if($key == 'taken_date' || $key == 'upload_date') {
+ $arguments['max_'.$key] = $val;
+ }
+ break;
+ }
+ }
+ }
+ foreach($boucle->select as $w) {
+ $key = str_replace("'",'',$w);
+ $key = str_replace("$id_table.",'',$key);
+=======
//on regarde dans les Where (critere de la boucle) si les arguments sont dispo.
foreach($boucle->where as $w) {
if($w[0] == "'?'") {
@@ -129,6 +166,7 @@
$val = $w[2];
$key = str_replace("$id_table.",'',$key);
if (in_array($key,$possible_args)){
+>>>>>>> .r6694
if(in_array($key,$possible_extras)) $extras = $key; else if($key == 'upload_date') $extras = 'date_upload';
else if($key == 'taken_date') $extras ='date_taken';Modified: _plugins_/_test_/FpipR/trunk/README
--- _plugins_/_test_/FpipR/trunk/README (original)
+++ _plugins_/_test_/FpipR/trunk/README Sat Oct 28 12:01:41 2006
@@ -70,10 +70,21 @@
{{Balises}}#ID_PHOTO
+#USER_ID
#SECRET
#SERVER
+#TITLE
+#ISPUBLIC
+#ISFRIEND
+#ISFAMILY
+#ORIGINALFORMAT
+#LICENSE
+#UPLOAD_DATE
+#TAKEN_DATE
#ONWER_NAME
+#ICON_SERVER
+#LAST_UPDATE
#LONGITUDE
#LATITUDE
-#USER_ID
+#ACCURACYModified: _plugins_/_test_/FpipR/trunk/base/FpipR_db.php
--- _plugins_/_test_/FpipR/trunk/base/FpipR_db.php (original)
+++ _plugins_/_test_/FpipR/trunk/base/FpipR_db.php Sat Oct 28 12:01:41 2006
@@ -35,7 +35,7 @@
"taken_date" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL",
"owner_name" => "text DEFAULT '' NOT NULL",
"icon_server" => "int NOT NULL",
- "last_update" => "INT",
+ "last_update" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL",
"latitude" => "DOUBLE",
"longitude" => "DOUBLE",
"accuracy" => "smallint NOT NULL",
@@ -48,7 +48,7 @@
"KEY" => "rang"
);-$GLOBALS['FpipR_versions']['spip_fpipr_photos'] = '0.1';
+$GLOBALS['FpipR_versions']['spip_fpipr_photos'] = '0.2';$GLOBALS['tables_principales']['spip_fpipr_photos'] =
array('field' => &$GLOBALS['FpipR_tables']['spip_fpipr_photos_field'], 'key' => &$GLOBALS['FpipR_tables']['spip_fpipr_photos_key']);
@@ -108,7 +108,7 @@
$cnt = 0;
foreach($photos->photos as $photo) {
$query = "REPLACE INTO spip_fpipr_photos (id_photo,user_id,secret,server,title,ispublic,isfriend,isfamily,originalformat,license,upload_date,taken_date,owner_name,icon_server,last_update,longitude,latitude,accuracy,rang)";
- $query .= " VALUES (".intval($photo->id).','.spip_abstract_quote($photo->owner).','.spip_abstract_quote($photo->secret).','.intval($photo->server).','.spip_abstract_quote($photo->title).','.intval($photo->idpublic).','.intval($photo->isfriend).','.intval($photo->isfamily).','.spip_abstract_quote($photo->originalformat).','.intval($photo->license).','.spip_abstract_quote(date('Y-m-d H:i:s',$photo->dateupload)).','.spip_abstract_quote($photo->datetaken).','.spip_abstract_quote($photo->ownername).','.intval($photo->iconserver).','.intval($photo->lastupdate).','.floatval($photo->longitude).','.floatval($photo->latitude).','.intval($photo->accuracy).','.$cnt++.")";
+ $query .= " VALUES (".intval($photo->id).','.spip_abstract_quote($photo->owner).','.spip_abstract_quote($photo->secret).','.intval($photo->server).','.spip_abstract_quote($photo->title).','.intval($photo->idpublic).','.intval($photo->isfriend).','.intval($photo->isfamily).','.spip_abstract_quote($photo->originalformat).','.intval($photo->license).','.spip_abstract_quote(date('Y-m-d H:i:s',$photo->dateupload)).','.spip_abstract_quote($photo->datetaken).','.spip_abstract_quote($photo->ownername).','.intval($photo->iconserver).','.spip_abstract_quote(date('Y-m-d H:i:s',$photo->lastupdate)).','.floatval($photo->longitude).','.floatval($photo->latitude).','.intval($photo->accuracy).','.$cnt++.")";
spip_query($query);
$not_id .= ','.intval($photo->id);
}Modified: _plugins_/_test_/FpipR/trunk/test_fpipr.html
--- _plugins_/_test_/FpipR/trunk/test_fpipr.html (original)
+++ _plugins_/_test_/FpipR/trunk/test_fpipr.html Sat Oct 28 12:01:41 2006
@@ -19,7 +19,7 @@
<B_photos>
<div>
<ul>
-<BOUCLE_photos(FLICKR_PHOTOS_SEARCH) {user_id=#FLICKR_NSID} {"<br/>"} {!par date_posted} {0,10}>
+<BOUCLE_photos(FLICKR_PHOTOS_SEARCH) {user_id=#FLICKR_NSID} {"<br/>"} {!par date_posted} {0,10} {taken_date > 2006-09-01 00:00:00}>
<li>
#COMPTEUR_BOUCLE - #TITLE
<img src="http://static.flickr.com/#SERVER/[(\#ID\_PHOTO\)\]\_\[\(\#SECRET\)\]\_m\.jpg"/>_______________________________________________
Spip-zone-commit@rezo.net - http://listes.rezo.net/mailman/listinfo/spip-zone-commit