Author: idael
Date: 2010-08-30 14:04:37 +0200 (Mon, 30 Aug 2010)
New Revision: 30785

Added:
   plugins/idlDropboxPlugin/trunk/
   plugins/idlDropboxPlugin/trunk/LICENSE
   plugins/idlDropboxPlugin/trunk/README
   plugins/idlDropboxPlugin/trunk/lib/
Removed:
   plugins/idlDropboxPlugin/LICENSE
   plugins/idlDropboxPlugin/README
   plugins/idlDropboxPlugin/lib/
Modified:
   plugins/idlDropboxPlugin/trunk/lib/idlDropbox.class.php
Log:
source moved in trunk folder.
Added option to select OAuth library (Pear or Standard PHP lib)

Deleted: plugins/idlDropboxPlugin/LICENSE
===================================================================
--- plugins/idlDropboxPlugin/LICENSE    2010-08-30 09:55:56 UTC (rev 30784)
+++ plugins/idlDropboxPlugin/LICENSE    2010-08-30 12:04:37 UTC (rev 30785)
@@ -1,7 +0,0 @@
-Copyright (c) 2010 Idael Software
-
-Permission is hereby granted, free of charge, to any person obtaining a copy 
of this software and associated documentation files (the "Software"), to deal 
in the Software without restriction, including without limitation the rights to 
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 
of the Software, and to permit persons to whom the Software is furnished to do 
so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all 
copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 
SOFTWARE.

Deleted: plugins/idlDropboxPlugin/README
===================================================================
--- plugins/idlDropboxPlugin/README     2010-08-30 09:55:56 UTC (rev 30784)
+++ plugins/idlDropboxPlugin/README     2010-08-30 12:04:37 UTC (rev 30785)
@@ -1,54 +0,0 @@
-idlDropbox plugin
-==============
-
-The `idlDropboxPlugin` adds 
[Dropbox](https://www.dropbox.com/referrals/NTc5OTg0MzE5) features to Symfony 
project .
-
-Summary of Features
--------------------
-The following features are currently available:
-
-  * retrieve account information
-  * upload file
-  * create directories
-
-More features will come later.
-
-Installation
---------------------
-
-  * Open a user account on 
[Dropbox](https://www.dropbox.com/referrals/NTc5OTg0MzE5)
-  * [Register](https://www.dropbox.com/developers/apply) as developper with 
the new account to get the consumer_key and consumer_secret
-  * Install the plugin
-  * Enable Plugin (Only for Symfony 1.2 and above)
-  * Modify *app.yml* file to add Dropbox authentication info
-   
-        [yml]
-          all:
-            ...
-            dropbox:
-              consumer_key:               myconsumerkey
-              consumer_secret:            myconsumersecret
-              user:                       [email protected]
-              password:                   mypassword
-         
-
-Usage
----------------------
-This plugin provide a idlDropbox class you can use in you project (see inline 
documentation) and add also Symfony tasks.
-
-Task usage example:
-
-      php symfony dropbox:upload --source=C:/myfile.pdf 
--target=test/myfile.pdf
-      php symfony dropbox:account-info
-
-TODO
-----
-
-  * Complete with the others API features like file download
-  * Contact me for any other requirements/ideas
-
-CREDITS
--------
-
-  * Plugin developed by [Idael Software](http://www.idael.ch) (Gael Poffet)
-  * This plugin uses [Dropbox PHP API](http://code.google.com/p/dropbox-php/)
\ No newline at end of file

Copied: plugins/idlDropboxPlugin/trunk/LICENSE (from rev 30763, 
plugins/idlDropboxPlugin/LICENSE)
===================================================================
--- plugins/idlDropboxPlugin/trunk/LICENSE                              (rev 0)
+++ plugins/idlDropboxPlugin/trunk/LICENSE      2010-08-30 12:04:37 UTC (rev 
30785)
@@ -0,0 +1,7 @@
+Copyright (c) 2010 Idael Software
+
+Permission is hereby granted, free of charge, to any person obtaining a copy 
of this software and associated documentation files (the "Software"), to deal 
in the Software without restriction, including without limitation the rights to 
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 
of the Software, and to permit persons to whom the Software is furnished to do 
so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all 
copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 
SOFTWARE.

Copied: plugins/idlDropboxPlugin/trunk/README (from rev 30763, 
plugins/idlDropboxPlugin/README)
===================================================================
--- plugins/idlDropboxPlugin/trunk/README                               (rev 0)
+++ plugins/idlDropboxPlugin/trunk/README       2010-08-30 12:04:37 UTC (rev 
30785)
@@ -0,0 +1,55 @@
+idlDropbox plugin
+==============
+
+The `idlDropboxPlugin` adds 
[Dropbox](https://www.dropbox.com/referrals/NTc5OTg0MzE5) features to Symfony 
project .
+
+Summary of Features
+-------------------
+The following features are currently available:
+
+  * retrieve account information
+  * upload file
+  * create directories
+
+More features will come later.
+
+Installation
+--------------------
+
+  * Open a user account on 
[Dropbox](https://www.dropbox.com/referrals/NTc5OTg0MzE5)
+  * [Register](https://www.dropbox.com/developers/apply) as developper with 
the new account to get the consumer_key and consumer_secret
+  * Install the plugin
+  * Enable Plugin (Only for Symfony 1.2 and above)
+  * Modify *app.yml* file to add Dropbox authentication info
+   
+        [yml]
+          all:
+            ...
+            dropbox:
+              consumer_key:               myconsumerkey
+              consumer_secret:            myconsumersecret
+              user:                       [email protected]
+              password:                   mypassword
+              oauth_lib:                  PHP              #The OAuth library 
to use. Can be PHP standard lib or Pear(optional, by default PHP)
+         
+
+Usage
+---------------------
+This plugin provide a idlDropbox class you can use in you project (see inline 
documentation) and add also Symfony tasks.
+
+Task usage example:
+
+      php symfony dropbox:upload --source=C:/myfile.pdf 
--target=test/myfile.pdf
+      php symfony dropbox:account-info
+
+TODO
+----
+
+  * Complete with the others API features like file download
+  * Contact me for any other requirements/ideas
+
+CREDITS
+-------
+
+  * Plugin developed by [Idael Software](http://www.idael.ch) (Gael Poffet)
+  * This plugin uses [Dropbox PHP API](http://code.google.com/p/dropbox-php/)
\ No newline at end of file

Modified: plugins/idlDropboxPlugin/trunk/lib/idlDropbox.class.php
===================================================================
--- plugins/idlDropboxPlugin/lib/idlDropbox.class.php   2010-08-26 05:32:06 UTC 
(rev 30763)
+++ plugins/idlDropboxPlugin/trunk/lib/idlDropbox.class.php     2010-08-30 
12:04:37 UTC (rev 30785)
@@ -40,6 +40,7 @@
     $this->consumerSecret = sfConfig::get("app_dropbox_consumer_secret", "");
     $this->user = sfConfig::get("app_dropbox_user", "");
     $this->password = sfConfig::get("app_dropbox_password", "");
+    $this->OAuthLib = sfConfig::get("app_dropbox_oauth_lib", "PHP");
     
     //Config validation
     if($this->consumerKey == "" || $this->consumerSecret == "")
@@ -48,7 +49,8 @@
       throw new Exception ("You must define 'user' and 'password' in app.yml 
file !");
       
     //And now we authenticate ourself on dropbox API using OAuth
-    $this->oauth = new Dropbox_OAuth_PHP($this->consumerKey, 
$this->consumerSecret);
+    $className = "Dropbox_OAuth_".$this->OAuthLib;
+    $this->oauth = new $className($this->consumerKey, $this->consumerSecret);
     $this->dropbox = new Dropbox_API($this->oauth);
     $this->tokens = $this->dropbox->getToken($this->user, $this->password);
     //We store the token for future usage

-- 
You received this message because you are subscribed to the Google Groups 
"symfony SVN" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/symfony-svn?hl=en.

Reply via email to