Compare commits

...

4387 Commits

Author SHA1 Message Date
Frank Karlitschek 2d86258fc3 RC2 2012-10-03 12:39:48 +02:00
Jenkins for ownCloud 6fada7a4c0 [tx-robot] updated from transifex 2012-10-03 02:05:14 +02:00
Jenkins for ownCloud 32a6b3b862 [tx-robot] updated from transifex 2012-10-02 23:18:26 +02:00
Thomas Mueller 7abe1360b2 l18n support added to files_external/js 2012-10-02 23:09:28 +02:00
Michael Gapczynski 68c8faf39c Correct checking item source for share from same owner when generating item target 2012-10-02 16:37:39 -04:00
Björn Schießle 431d92e7b2 we are sharing the same file again if item_source of the already shared file and the newly shared file is the same. Therefore we can use the same target name 2012-10-02 21:37:10 +02:00
Björn Schießle db954f5aba remove unnecessary code and add missing items to select statement 2012-10-02 18:59:20 +02:00
Björn Schießle 92b37119e3 remove textbox after pressing "enter" even if the name is the same 2012-10-02 18:38:17 +02:00
Jörn Friedrich Dreyer 39735721ec escape identifiers in queries 2012-10-02 14:11:25 +02:00
Björn Schießle 3e3038cafc merge all possible conflicts into on array 2012-10-02 13:10:46 +02:00
Frank Karlitschek 3fdebaa5dc automatically remove and prevent installation of apps with a require version less than the current one. We check now the first ad second part of the version number.
Also increase the require tags of the core apps to 4.9 Please note that 4.9 is the internal versionnumber of the upcoming 4.5 release.
You have to pu a <require>4.9</require> into the info.xml of your app to make it as compatible with 4.5
2012-10-02 12:10:45 +02:00
Arthur Schiwon 783c02eda9 fix create folder and upload file issue on win, fixes oc-1747, solution follows suggestion from bug tracker 2012-10-02 11:45:47 +02:00
Björn Schießle c6c0fcc7c8 We can't rely on the assumption that if the matching target is from the same owner that the share type will be different.
Files in different folders can have the same name. Therefore also a unique name has to be generated if the matching
target it from the same user. Also for folders and files with the same name a unique target name has to be generated

If matching target is from the same owner, use the same target. The share type will be different so this isn't the sa
2012-10-02 11:41:26 +02:00
Björn Schießle 550813ce41 don't use the complete path but the basename if the file/foder has no extension. Otherwise
we can end up with  different items in the shared directory with the same name (Also folder names can contain dots)
2012-10-02 11:41:26 +02:00
Jenkins for ownCloud f0c4356392 [tx-robot] updated from transifex 2012-10-02 02:06:08 +02:00
Thomas Tanghus 36696a8057 Fixed old, annoying css error that it turned out I had made myself :-P 2012-10-01 23:42:45 +02:00
Lukas Reschke 538c2662a9 Merge pull request #23 from lipemat/patch-1
Fix the File Upload Button in Chrome
Arrow was showing under the button in Chrome. With this commit it should be shown correctly.
2012-10-01 10:28:51 -07:00
Arthur Schiwon 68fa2b10da Search: fix Notice and thus broken search with activiated error reporting 2012-10-01 19:11:26 +02:00
Arthur Schiwon 33e9399ba3 LDAP: fix sharing doesn't work with ldap groups, oc-1819 2012-10-01 18:27:58 +02:00
Georg Ehrke 43c85248d4 Share - Dropdown dialog - cut off username if it's longer than 14 chars - bugfix for oc-1871 2012-10-01 16:04:20 +02:00
Arthur Schiwon b23ad579dc Sharing: backward compatibility to links from OC 4.0. 2012-10-01 14:39:53 +02:00
Robin Appelman 804372947a fix test case for when a user is logged in 2012-10-01 14:07:34 +02:00
Robin Appelman f77dc9b30f add test to make sure filepaths that are passed to filesystems hooks are normalized 2012-10-01 14:00:14 +02:00
Mat Lipe d1010e58d8 Update apps/files/css/files.css
Fixed a strange comment issue
2012-10-01 06:43:31 -05:00
Robin Appelman a61c820369 code style 2012-10-01 12:57:13 +02:00
Mat Lipe 2330dd5f21 Update apps/files/css/files.css
Fix the File Upload Button in Chrome. Tested in IE9-8-7, Firefox, Chrome
2012-09-30 20:02:52 -05:00
Jenkins for ownCloud 377fb19818 [tx-robot] updated from transifex 2012-10-01 02:08:31 +02:00
Robin Appelman 91d12a2f3d update the filecache by setting mtimes to 0 when the mount configuration has changed instead of clearing the cache 2012-09-30 16:12:16 +02:00
Robin Appelman 113c339c41 fix updating the filecache for when contents of a folder has changed 2012-09-30 16:11:01 +02:00
Robin Appelman 258782584e fix mimetype detection using the 'file' command in some edge cases 2012-09-30 03:58:58 +02:00
Robin Appelman f8eebcbb01 reload the current url when login in instead of always redirecting to the default app (oc-1873) 2012-09-30 03:47:37 +02:00
Jenkins for ownCloud 7e30c74ea4 [tx-robot] updated from transifex 2012-09-30 02:05:59 +02:00
Lukas Reschke e8afb3d312 Fix a typo 2012-09-30 00:08:20 +03:00
Bart Visscher a33dda3c65 Fix double url decoding in fileDownloadPath function 2012-09-29 18:10:23 +02:00
Lukas Reschke 424062f4af Merge pull request #21 from raghunayyar/master
CSS typo fixed.
2012-09-29 08:21:42 -07:00
Raghu Nayyar 0ffab9fea8 Update settings/css/settings.css
CSS typo fixed.
2012-09-29 20:50:37 +05:30
Lukas Reschke ef57e9294b Fallback for systems without openssl 2012-09-29 16:44:02 +02:00
Lukas Reschke 992c2c9d4b mt_rand() is not secure from a cryptographic point of view, let's use openssl_random_pseudo_bytes() here 2012-09-29 15:41:13 +02:00
Lukas Reschke 36f1c9b083 rand() + uniqid() are not from cryptographic quality 2012-09-29 15:33:10 +02:00
Lukas Reschke 578aa4e425 Removed sectoken
This token is completly useless since an attacker can easily extract it
from the page.
2012-09-29 15:18:38 +02:00
Lukas Reschke f5fe95a131 Removed sectoken
This token is completly useless since an attacker can easily extract it
from the page.
2012-09-29 15:15:35 +02:00
Lukas Reschke bd804b74c4 mt_rand() is not secure from a security point of view and predictable. Let's use openssl_random_pseudo_bytes() instead.
Before: 26 bits entropy
After: 72 bits entropy
2012-09-29 15:03:09 +02:00
Jenkins for ownCloud dc66e94ee3 [tx-robot] updated from transifex 2012-09-29 02:04:55 +02:00
Jenkins for ownCloud 27bd9df027 [tx-robot] updated from transifex 2012-09-28 23:36:09 +02:00
Thomas Müller 7f6a984e57 Merge pull request #20 from scambra/undo-l10n
undo interpolation in js for 4.5
2012-09-28 14:32:44 -07:00
Bart Visscher 22d22d19c0 Do urlencoding in linkTo functions 2012-09-28 22:27:52 +02:00
Bart Visscher fed34aecfa Fix syntax error in removeETagHook 2012-09-28 21:30:06 +02:00
Bart Visscher 9c4c79346c After selecting a search result, hide the results 2012-09-28 21:18:20 +02:00
Bart Visscher 24bb7d16b7 urlencode filename in search result, fixes problems with & in name 2012-09-28 21:18:20 +02:00
Bart Visscher 366ae6661d Simplify generating file search results 2012-09-28 21:18:20 +02:00
Bart Visscher 4e2f575938 Correctly fix oc-1016 and fix downloading of files 2012-09-28 21:18:20 +02:00
Lukas Reschke cfc9839812 Merge pull request #19 from arkascha/master
Reimplementation of CSRF protection strategy
2012-09-28 10:54:11 -07:00
scambra 8f27881770 undo interpolation in js for 4.5 2012-09-28 19:53:18 +02:00
Christian Reiner 71454b1bca Fix to preserve backward compatibility for apps creating static links containing the request token (currently the contacts app and maybe some 3rd party implementations) 2012-09-28 18:57:20 +02:00
Björn Schießle 35357f3afb etag has to be removed after version rollback to enable the sync client to detect the changes (bug #1829) 2012-09-28 18:50:36 +02:00
Björn Schießle f8f73e2675 move back to "lastmodified" property since "getlastmodified" is protected by webdav 2012-09-28 18:50:36 +02:00
Christian Reiner cd399f9c77 Added name to AUTHORS file, since mentioned in file headers. 2012-09-28 16:38:25 +02:00
Christian Reiner 4dbd4c35c5 Merge branch 'master' of git://github.com/owncloud/core 2012-09-28 13:31:01 +02:00
Christian Reiner 743826bbf3 Reimplementation of CSRF protection including autorefresh 2012-09-28 13:30:44 +02:00
Jenkins for ownCloud 5144d26088 [tx-robot] updated from transifex 2012-09-28 02:06:03 +02:00
Robin Appelman e8df2eeefc some more sane column sizes for appconfig and preferences 2012-09-27 22:49:01 +02:00
Lukas Reschke 232936b99a This .gitkeep is unneeded 2012-09-27 22:24:56 +02:00
Arthur Schiwon 3fa4b34a69 LDAP: comparison, not assignment. Thanks to Manuel Delgado 2012-09-27 19:52:52 +02:00
Björn Schießle aa9ffd119a check if file really exist before add/remove it 2012-09-27 12:37:23 +02:00
Björn Schießle a56f2ec183 only upload valid ssl root certificates 2012-09-27 11:21:29 +02:00
Frank Karlitschek cf14ad2f7d RC 1 2012-09-27 04:10:19 +02:00
Jenkins for ownCloud 09aa95586a [tx-robot] updated from transifex 2012-09-27 02:03:09 +02:00
Björn Schießle 21c6cc45e6 take '\' on windows systems into account to prevent file deletion above upload direectory 2012-09-26 23:08:40 +02:00
Björn Schießle 9ab887fed5 fix security issue, don't allow to go back in the path 2012-09-26 21:35:14 +02:00
Björn Schießle a7292e897a The mtime in the file cache has to be updated after version rollback (copy from outside of the regular files root) (fixes bug #1720) 2012-09-26 17:03:54 +02:00
Robin Appelman cfbca40fbe fix sharing for newly uploaded or created files 2012-09-26 13:25:11 +02:00
Jenkins for ownCloud 2c00f8c850 [tx-robot] updated from transifex 2012-09-26 13:22:37 +02:00
Thomas Müller b57cc67f60 Python language setting on gettext
gettext with language setting 'Python' gives better results than 'Perl'
2012-09-26 14:17:12 +03:00
Björn Schießle 50d7cfbbe7 prepare server for move of property name "lastmodified" to "getlastmodified" according to RFC4918.
Depreciated const can be removed after sync client update and release
2012-09-26 13:06:43 +02:00
Arthur Schiwon 0192d920f0 Sharing: write update errors to logfile; do not die on errors 2012-09-26 12:27:43 +02:00
Björn Schießle fcd70246db Merge branch 'master' of github.com:owncloud/core 2012-09-26 10:50:06 +02:00
Björn Schießle c3c6e52104 - take webdav namespace for properties into account
- change update routine to add the namesapce to all stored properties
2012-09-26 10:48:30 +02:00
Michael Gapczynski b4e40b1c21 Fix unsetting share expiration date 2012-09-26 00:09:35 -04:00
Michael Gapczynski 00103d730f Show share expiration date set for shared item 2012-09-26 00:04:27 -04:00
Michael Gapczynski f967bfc956 Properly format the share expiration time for the database, fixes bug oc-1779 2012-09-25 23:54:46 -04:00
Michael Gapczynski 2bdf89f4d4 Stop autocomplete selection event propogration so share dropdown doesn't disappear, fixes bug oc-1773 2012-09-25 23:18:36 -04:00
Jenkins for ownCloud 5855355faa [tx-robot] updated from transifex 2012-09-26 02:06:37 +02:00
Bart Visscher 737a6730db Add OC_Files::searchByMime function
Include shared files in result
2012-09-25 21:15:01 +02:00
Lukas Reschke c4fc291fa7 Passwords containing a ":" don't work with this explode
Thanks to mETz
2012-09-25 19:57:40 +02:00
Arthur Schiwon 7b8c7aaf0d Add missing Sharing permission 2012-09-25 18:01:56 +02:00
Arthur Schiwon 80fde2d8d1 Sharing update: take over reshares and thus don't fail 2012-09-25 12:14:20 +02:00
Björn Schießle 25499644e3 Merge branch 'master' of github.com:owncloud/core 2012-09-25 12:02:02 +02:00
Björn Schießle 90a1bd5721 seperate the form to set up the mount points and the form to upload ssl certificates 2012-09-25 12:01:09 +02:00
Arthur Schiwon 15e02726d7 Fix files_sharing update script, by making filesystem and users available 2012-09-25 11:47:53 +02:00
Arthur Schiwon a8ff1505d6 backwards compat to older xcache versions, don't fail when trying to clear cache by prefix 2012-09-25 11:47:53 +02:00
Jenkins for ownCloud e5487376da [tx-robot] updated from transifex 2012-09-25 02:05:18 +02:00
Bart Visscher a80e0403a1 Fix getting individual shared file information 2012-09-24 21:12:32 +02:00
Brice Maron 7aca730f71 Small css fix for button new in files. fix oc-1638 2012-09-24 18:40:59 +00:00
Jörn Friedrich Dreyer 1e2074b4eb use file instead of dir in search provider file fix result urls 2012-09-24 19:24:20 +02:00
Jenkins for ownCloud ecb90d72f3 [tx-robot] updated from transifex 2012-09-24 02:04:10 +02:00
Lukas Reschke e8af588210 Fix typo 2012-09-23 21:49:46 +03:00
Lukas Reschke f271afa31c Correct "ownCloud" 2012-09-23 20:23:37 +03:00
Robin Appelman a22a5d6807 some js style fixes 2012-09-23 03:16:52 +02:00
Robin Appelman 4131b205d4 fix some more phpdoc 2012-09-23 02:40:03 +02:00
Robin Appelman f71f731f1c fix phpdoc and handle some edges cases better in oc_db 2012-09-23 02:40:03 +02:00
Jenkins for ownCloud 81ecabb19c [tx-robot] updated from transifex 2012-09-23 02:04:41 +02:00
Lukas Reschke c7043fdd04 Update authors
Copied from http://owncloud.org/about/contact/
2012-09-22 23:03:28 +03:00
Lukas Reschke b4de89e6b4 Sanitize download URL
@MTGap Can you please check if this break something?
2012-09-22 11:20:17 +02:00
Lukas Reschke ac79fe649c Added a missing CSRF check 2012-09-22 11:02:03 +02:00
Lukas Reschke 80aa44565b Sanitize user input 2012-09-22 10:51:03 +02:00
Jenkins for ownCloud 08132587d1 [tx-robot] updated from transifex 2012-09-22 02:01:19 +02:00
Jenkins for ownCloud 01160d0fb4 [tx-robot] updated from transifex 2012-09-22 01:18:31 +02:00
Thomas Müller d5055639b2 Merge pull request #15 from scambra/delete-fixes
use post to delete files, get has a limit and fails with many files
2012-09-21 16:11:11 -07:00
Thomas Müller ac69974d73 Merge pull request #17 from scambra/4.5-l10n-fixes
Fix some untranslated strings
2012-09-21 16:09:30 -07:00
Bart Visscher 40a1899bd9 Catch exceptions when updating an app 2012-09-21 23:32:52 +02:00
Bart Visscher 8cfa618df5 Catch exceptions in upgrading files_sharing, skip the errors for now 2012-09-21 23:31:44 +02:00
Bart Visscher 11bdc8baa8 Fix the mimetype filter in OC_Share_Backend_File 2012-09-21 23:17:12 +02:00
Bart Visscher ee77ef86d3 Check mimetype filter in file share backend 2012-09-21 21:32:09 +02:00
Bart Visscher 4f4498e0d6 Fix undefined user var, use getUser 2012-09-21 21:29:37 +02:00
Bart Visscher 8820cd934a Forgot to return the fileinfo 2012-09-21 21:28:53 +02:00
Björn Schießle 3d2cd64a48 add a line break after every certificate 2012-09-21 16:54:08 +02:00
Tom Needham bcd3d1116c Change background colour of upload button to be consistant with new button 2012-09-21 12:45:11 +00:00
Bart Visscher b6dc6c5bb9 Don't use OC_FileCache directly, but use the functions in OC_Files
This adds getFileInfo to OC_Files to also get fileinfo from shared files
2012-09-21 13:31:12 +02:00
Arthur Schiwon 2a7a928ae9 LDAP: replace expensive recursiveArraySearch with direct SQL search, leading to a performance boost. Imorives UX especially on directories with tons of users, solves complains on ML and probably fixes oc.1080 2012-09-21 13:03:28 +02:00
scambra 107b641708 translate rename and history actions 2012-09-21 12:30:13 +02:00
scambra d5211f9615 some characters in comments avoid finding some strings to translate 2012-09-21 12:05:01 +02:00
scambra e48811017d fix translation for core/lostpassword 2012-09-21 11:54:47 +02:00
scambra 0f15bc881f fix translating dialog buttons, they are translated in core not dialogs app 2012-09-21 11:48:57 +02:00
scambra 22c6b48d2f translate files_sharing app 2012-09-21 11:48:20 +02:00
Jenkins for ownCloud 8f2c76d3da [tx-robot] updated from transifex 2012-09-21 02:04:56 +02:00
Jörn Friedrich Dreyer 59a00f95c3 use AL32UTF8 charset to connect to oracle, fixes file name encoding problems 2012-09-20 21:07:54 +02:00
Jörn Friedrich Dreyer a4082a526f escape user column in OC_FileCache::clear 2012-09-20 21:06:46 +02:00
Jörn Friedrich Dreyer 1c97fd7228 shorten index name, oracle can only handle identifiers <=30 chars 2012-09-20 21:05:37 +02:00
Arthur Schiwon 57c02d16ca LDAP: add forgotten class, fixes oc-1803 2012-09-20 16:59:28 +02:00
Frank Karlitschek 6c644a0c83 change the new button color on mouse over so that the user understands that the button is actually two buttons. 2012-09-20 14:59:28 +02:00
icewind1991 4ea128ee43 Merge pull request #13 from scambra/safari-fixes
fix js success callback on safari when uploading files
2012-09-20 02:24:27 -07:00
Björn Schießle b1c60841e8 float right element needs to be the first element, otherwise firefox will move it to a new line 2012-09-20 10:31:23 +02:00
scambra 1b411df83e use post to delete files, get has a limit and fails with many files 2012-09-20 08:28:35 +02:00
scambra aee8949c92 fix js success callback on safari when uploading files 2012-09-20 08:02:55 +02:00
Jenkins for ownCloud 7c42e88676 [tx-robot] updated from transifex 2012-09-20 02:09:31 +02:00
Robin Appelman 74ec2765b3 db indexes for appconfig and preferences 2012-09-20 01:36:52 +02:00
Robin Appelman 499567397d use tabs in db_structure 2012-09-20 01:36:51 +02:00
Bernhard Posselt 1c643ce4bc made upload button the same height in chrome and firefox
Signed-off-by: Tom Needham <needham.thomas@gmail.com>
2012-09-19 22:10:13 +00:00
Tom Needham edbbb2bd9f General style fixes for the share dropdown 2012-09-19 20:04:16 +00:00
Tom Needham f9127192da Fix styling of public shared files download button 2012-09-19 19:51:52 +00:00
Tom Needham d7b878b303 Dynamicly resize public shared images 2012-09-19 19:46:49 +00:00
Bart Visscher 5f997021d1 Fix syntax bug 2012-09-19 21:29:16 +02:00
Bart Visscher ee32d1aad5 Fix versioning of shared files 2012-09-19 21:29:16 +02:00
Bart Visscher 01ce2babd1 Fix sharing of single files, target name was not correct 2012-09-19 21:29:16 +02:00
Brice Maron 86c3761615 Catch unreadable app folder error 2012-09-19 19:26:57 +00:00
Tom Needham fb3724ba64 Fix datepicker icons for all uses across ownCloud 2012-09-19 16:51:20 +00:00
Frank Karlitschek fe7288b65a beta 4 2012-09-19 16:32:40 +02:00
Arthur Schiwon f66c441f77 LDAP: take out ldapUuidAttribute from on-the-fly check, cannot be set by the user and would lead to server error. Fixes oc-1625 2012-09-19 15:37:05 +02:00
Tom Needham 73ed13fe75 Increase click area of breadcrumb, fix oc-703 2012-09-19 12:31:02 +00:00
Björn Schießle e5de1067ae Merge branch 'master' of github.com:owncloud/core 2012-09-19 14:08:17 +02:00
Björn Schießle 223bf3e47c fix for bug #1752 (Renaming of folders in files view does not work correctly in firefox 15) 2012-09-19 14:05:09 +02:00
Arthur Schiwon 93d0defe9a set configuvalue in table appconfig back to clob. Likely to break LDAP settings, probably responsible for some bugs with it. Might also cause damage in other apps. That's why it was once already set to clob 2012-09-19 12:55:07 +02:00
Björn Schießle c199c4ad67 Merge branch 'master' of github.com:owncloud/core 2012-09-19 12:03:58 +02:00
Björn Schießle 6596094a28 add generated unique file name to the uploadingFiles list instead of the original name 2012-09-19 12:02:36 +02:00
Björn Schießle 1e880feab1 execute lastAction() before add new one 2012-09-19 11:56:31 +02:00
Michael Gapczynski 518ca0ac58 Fix changing of share status icons, bug fix for oc-1631 2012-09-19 01:44:15 -04:00
Michael Gapczynski 1e1e8ae3b5 Don't show the expiration option until a share occurs, bug fix for oc-1724 2012-09-19 01:02:57 -04:00
Michael Gapczynski 39e587b52c Remove the content and table to prevent covering the download link 2012-09-19 00:27:53 -04:00
Michael Gapczynski 749b5b52ca Show preview for public folder links 2012-09-18 23:56:14 -04:00
Jenkins for ownCloud b0e645fe13 [tx-robot] updated from transifex 2012-09-19 02:07:26 +02:00
Tom Needham 8a74a39c42 Fix oc-1769, renaming folders with extensions 2012-09-18 22:08:34 +00:00
Tom Needham 729b36e495 Fix grammer and dont split translatable string 2012-09-18 21:31:03 +00:00
Bart Visscher 703aff6c35 Run proxies and emit signals when finising chunked upload
Otherwise the file cache and the quota isn't checked
2012-09-18 20:23:17 +02:00
Tom Needham 30188847a3 Only try to delete migration.db if it was created. 2012-09-18 16:25:34 +00:00
Tom Needham be76a55ef0 Allow exporting of users from any user backend, fixed oc-1645 2012-09-18 16:24:39 +00:00
Sam Tuke 9df403f051 Added failsafes for retrieving remote apps on settings->apps page, in case categories or app data are not found 2012-09-18 16:55:03 +01:00
Björn Schießle 842cd57fa7 use more oc file operations instead of plain PHP functions 2012-09-18 17:04:22 +02:00
Björn Schießle 2570ea7114 don't interpret strpos '0' as 'false' in while loop 2012-09-18 16:14:04 +02:00
Sam Tuke dc0dc56d48 Merge branch 'master' of https://github.com/owncloud/core 2012-09-18 14:36:08 +01:00
Sam Tuke b765e883f3 Fixed bug with duplicate entries for installed 3rd party apps in settings->apps
Added method getAppstoreApps to OC_App
Added minor documentation
2012-09-18 14:35:27 +01:00
Jenkins for ownCloud 06e963c54f [tx-robot] updated from transifex 2012-09-18 02:04:26 +02:00
Arthur Schiwon 6444c27e6a LDAP: fix MySQL-query with DUAL table by removing wrong backticks. Got broke when they were added to SQL queries. 2012-09-17 22:50:08 +02:00
Robin Appelman 2a8ff8a0d4 fix problem with quota proxy when using copy 2012-09-17 22:16:07 +02:00
Robin Appelman 82ffefb99b dont trigger filesystem hooks when not using the default view 2012-09-17 22:16:07 +02:00
Bart Visscher 7749875a0d Fix 'Search only shows the app name of the first app'
Fixes: oc-1369
2012-09-17 20:00:31 +02:00
Bart Visscher b1bab6d113 Check format of chunked filename 2012-09-17 20:00:31 +02:00
Bart Visscher b04c7175dc Check if the versioned file exists before trying to do the versioning
This didn't work with chunked uploading
2012-09-17 20:00:31 +02:00
Bart Visscher ce10e1c19a Fix return statement 2012-09-17 20:00:31 +02:00
Bart Visscher ab33578add Normalize path before calling removeETagPropertyForPath
This should also fix the dirname problem on windows
2012-09-17 20:00:31 +02:00
Jörn Friedrich Dreyer 7811fa4faf timestamp uses emptystring as NULL default 2012-09-17 17:57:53 +02:00
Tom Needham 597fed4fde Fix oc-1726, cannot delete multiple files one by one without refresh 2012-09-17 15:29:15 +00:00
Björn Schießle 92413217b3 Merge branch 'master' of github.com:owncloud/core 2012-09-17 17:03:57 +02:00
Björn Schießle 1207ae1f99 add leading '?' to parameter list (fixes bug #1732) 2012-09-17 17:02:17 +02:00
Jörn Friedrich Dreyer c790a0c476 fix default values: 1. remove whitespace, don't use emptystring for int, remove empty default for nullable columns to use NULL as default 2012-09-17 16:35:31 +02:00
Jörn Friedrich Dreyer 9da150cd3b use user name as db name for oracle connection made with service name 2012-09-17 16:32:24 +02:00
Thomas Müller f85b709fae Use correct translation file
every translation within the sub folder 'settings' need to use 'settings' on OC_L10N::get
2012-09-17 15:00:22 +03:00
Thomas Müller 1fd3c5fbc0 $l was undefined 2012-09-17 14:50:17 +03:00
Thomas Müller 21bffbfb69 Enhanced space handling - thx fmms 2012-09-17 11:14:44 +03:00
Thomas Müller 7a7d2a06b3 Adding a few more string to translation 2012-09-17 10:54:06 +03:00
Jenkins for ownCloud dbd2dea689 [tx-robot] updated from transifex 2012-09-17 02:07:23 +02:00
Frank Karlitschek a3718ca036 i just learned that we also have to check if directories are readable. it seams that is_readable also checks for 'x' right. 2012-09-16 22:49:03 +02:00
Frank Karlitschek 4356f8daeb add a bit more space 2012-09-16 20:31:56 +02:00
Michael Gapczynski 89fb5d47a4 Add chosen script and style, bug fix for oc-1745 2012-09-16 13:27:27 -04:00
Alessandro Cosentino 158af74b3e makes cron config layout similar to the sharing one 2012-09-16 12:40:08 -04:00
Frank Karlitschek 442f26ea80 structure the settings options a bit better. 2012-09-16 17:23:21 +02:00
Frank Karlitschek f17555285e Merge branch 'master' of https://github.com/owncloud/core 2012-09-16 17:14:04 +02:00
Frank Karlitschek 9d533fcd72 add a legend tag. it´s consistent and looks nicer 2012-09-16 17:13:16 +02:00
Robin Appelman 7da3492ab5 show the size of new files when using New->From Url 2012-09-16 17:05:08 +02:00
Jenkins for ownCloud 6568671bdc [tx-robot] updated from transifex 2012-09-16 02:03:40 +02:00
Jenkins for ownCloud fbdefd5601 [tx-robot] updated from transifex 2012-09-15 02:05:52 +02:00
Jenkins for ownCloud e41ccd4344 [tx-robot] updated from transifex 2012-09-14 02:03:18 +02:00
Thomas Tanghus fdecee1bda Check if categories is an array. 2012-09-13 17:30:26 +02:00
Frank Karlitschek 5a149dcfab mark as an updated beta 3 with some more fixes 2012-09-13 11:39:26 +02:00
Michael Gapczynski f8d907df71 Set configured to true after configuring Dropbox storage 2012-09-12 21:30:04 -04:00
Jenkins for ownCloud bb0b438ace [tx-robot] updated from transifex 2012-09-13 02:03:54 +02:00
Bart Visscher e3e4a2bec2 Enable post_write trigger
This is used when uploading a file with webdav. The trigger will add the file to the cache and make it show up in listings
2012-09-13 00:12:10 +02:00
Bart Visscher 78a022fda6 dirname can also return '.' for empty path 2012-09-13 00:09:00 +02:00
Bart Visscher 10b74f9d05 Don't hide errors doing the versioning copy 2012-09-13 00:09:00 +02:00
Jörn Friedrich Dreyer d3553ce33d correctly calculate the MDB2 portability 2012-09-12 23:10:45 +02:00
Jörn Friedrich Dreyer c7054f374c log details for an error when upgrading the schema 2012-09-12 23:03:56 +02:00
Jörn Friedrich Dreyer 53b0e6dcc1 fix schema updates with oracle\n basically this took me all day to debug and hack, we need a new db layer! MDB2 is dead and pecl oci8 even more so! It has officially been deprecated in php 5.4: http://www.php.net/manual/de/function.ocifetchinto.php 2012-09-12 23:03:56 +02:00
Jörn Friedrich Dreyer b2d60ed6b7 add proper logging to filecache 2012-09-12 23:03:56 +02:00
Michael Gapczynski 87b7a23648 Don't get metadata directly from the 'cached' file cache after upload 2012-09-12 17:00:46 -04:00
Sam Tuke 9bfdf47cd4 Fixed bug oc-1659 - history dialogue cannot be closed once opened 2012-09-12 14:10:12 +01:00
Jörn Friedrich Dreyer 0fe3354c61 add proper error logging in OC_User database queries 2012-09-12 12:47:33 +02:00
Jörn Friedrich Dreyer e31dfb643a add getErrorMessage to OC_DB 2012-09-12 12:47:33 +02:00
Frank Karlitschek df528cfe95 show the current username. This confused some people 2012-09-12 12:23:21 +02:00
Frank Karlitschek f31264a0c2 this is now 4.5 beta 3 2012-09-12 12:12:23 +02:00
Frank Karlitschek 54eae53206 Merge branch 'master' of https://github.com/owncloud/core 2012-09-12 12:10:57 +02:00
Frank Karlitschek c0a3bdb757 improve the documentation for the cron config a bit 2012-09-12 12:09:46 +02:00
Jörn Friedrich Dreyer 62d8202d59 return a message when app could not be enabled 2012-09-12 12:02:39 +02:00
Michael Gapczynski c5f9b887ff Don't call clearCache() for OC_Minimizer statically, create OC_Minimizer objects for both CSS and JS to clear cache after upgrade 2012-09-12 01:18:07 -04:00
Michael Gapczynski ca6322465d Treat getUsers() as case insensitive, helpful for showing proper results in the share with autocomplete 2012-09-12 01:12:25 -04:00
Michael Gapczynski 60feaf9abf Merge branch 'master' into share_expiration
Conflicts:
	core/js/share.js
	lib/util.php
2012-09-12 01:06:57 -04:00
Michael Gapczynski 54d4e556fe Add lock and clock icon for sharing 2012-09-12 01:02:08 -04:00
Michael Gapczynski 8f0354bcdd Temporarily disable sharing with contacts and emails, will come in next release 2012-09-12 01:02:08 -04:00
Michael Gapczynski b194ac3dde Add expiration column to share table and bump version number 2012-09-12 01:01:45 -04:00
Jenkins for ownCloud 8c9c095d48 [tx-robot] updated from transifex 2012-09-12 02:02:58 +02:00
Thomas Mueller 5c1a79210f added hint to restart the web server in case recetly installed php modules are still not available 2012-09-11 23:51:12 +02:00
Jörn Friedrich Dreyer b6a106a920 allow using only dbname for oracle 2012-09-11 18:12:38 +02:00
Jörn Friedrich Dreyer bf2d1e78f2 don't set values with oc_appconfig when oc is not installed yet, allows to render guest page for installation again 2012-09-11 13:16:34 +02:00
Michael Gapczynski 37f0b85d3f Fix problem with non share collection item types being treated as collections 2012-09-11 00:37:31 -04:00
Michael Gapczynski ff6141b1e9 Change version number update occurs on to prevent problem with betas, users using the 4.5 betas will have to manually trigger the update if they want to get their old shared files back again 2012-09-10 21:57:13 -04:00
Jenkins for ownCloud 6a29bbda7a [tx-robot] updated from transifex 2012-09-11 02:03:53 +02:00
Georg Ehrke 463b48b2e1 fix file upload 2012-09-10 14:41:27 +02:00
Jörn Friedrich Dreyer 86c3f9b8fe Merge branch 'master' of github.com:owncloud/core 2012-09-10 14:14:49 +02:00
Jörn Friedrich Dreyer db7a18455f use tabs for indentation 2012-09-10 14:14:36 +02:00
Thomas Müller 5a65c5a46c Respect coding style 2012-09-10 14:59:08 +03:00
Thomas Müller 0444877218 Respect coding style 2012-09-10 12:35:15 +03:00
Thomas Müller c6cd1b77d3 Respect coding style 2012-09-10 12:32:49 +03:00
Thomas Müller 5721bd2786 Respect coding style 2012-09-10 12:31:57 +03:00
Thomas Müller 1a10955644 Respect coding style 2012-09-10 12:29:35 +03:00
Thomas Müller 2271a97992 Respect coding style 2012-09-10 12:28:09 +03:00
Thomas Müller 9a2bc5255b Respect coding style 2012-09-10 12:26:20 +03:00
Thomas Müller 23f348c99f Respect coding style 2012-09-10 12:25:42 +03:00
Thomas Müller 87e1a27fde Respect coding style 2012-09-10 12:23:55 +03:00
Thomas Müller f34588d1ff Respect coding style 2012-09-10 12:21:54 +03:00
Jenkins for ownCloud bd720bdf4c [tx-robot] updated from transifex 2012-09-10 02:04:59 +02:00
Michael Gapczynski deb1fbf9a1 Provide update script for files sharing 2012-09-09 18:29:47 -04:00
Michael Gapczynski 5c5955b31f Disable link sharing for folders temporarily - next release 2012-09-09 14:52:03 -04:00
Michael Gapczynski 6c17a4cb77 Don't display actions for children in shared collections, show the parent collection the child is shared in 2012-09-09 14:44:08 -04:00
Michael Gapczynski 13d513c17c Fix shared collection item searching 2012-09-09 11:50:12 -04:00
Michael Gapczynski 3e7951e1e6 Normalize the file path for shared children as a precaution 2012-09-08 23:42:24 -04:00
Michael Gapczynski fe7f095b08 Insert id for unique user group share rows 2012-09-08 23:09:58 -04:00
Michael Gapczynski b163bd514f Fix fetching shared children items, fixes problem with displaying owner of a shared file inside a shared folder 2012-09-08 23:09:57 -04:00
Robin Appelman a050915167 move breadcrumb css to core so we can reuse it 2012-09-09 03:00:01 +02:00
Robin Appelman 0b2633a787 add breadcrumb controll to js 2012-09-09 03:00:01 +02:00
Michael Gapczynski f23f719d99 Fix unsharing from self for group shares and add test for it 2012-09-08 20:15:47 -04:00
Jenkins for ownCloud 5e790368bc [tx-robot] updated from transifex 2012-09-09 02:03:35 +02:00
Robin Appelman 9beb958845 forgot a , 2012-09-09 00:35:02 +02:00
Robin Appelman b14265b5c3 add js versions of basename and dirname 2012-09-08 23:59:02 +02:00
Robin Appelman 46422e6dbe don't use regular expresions for a simple string replace 2012-09-08 23:40:23 +02:00
Robin Appelman 697061fa9f add OC_Image::fitIn 2012-09-08 23:26:19 +02:00
Thomas Tanghus abc930c57c Suppress error message which would send headers for hosted sited where disk_free_space() has been disabled for security. 2012-09-08 17:58:59 +02:00
Georg Ehrke 2b42893fa9 style fixes for public util api 2012-09-08 16:18:47 +02:00
Georg Ehrke 89f3afe2fe style fixes for public user api 2012-09-08 16:17:01 +02:00
Georg Ehrke 439ede2a1d style fixes for public response api 2012-09-08 16:15:42 +02:00
Georg Ehrke a16565a7fa style fixes for public json api 2012-09-08 16:14:06 +02:00
Georg Ehrke 89e5b85fa7 style fixes for public files api 2012-09-08 16:02:11 +02:00
Georg Ehrke 6b2b8b10ee style fixes for public db api 2012-09-08 16:00:32 +02:00
Georg Ehrke 221257d2fb style fixes for public config api 2012-09-08 15:58:28 +02:00
Georg Ehrke eca24f74f7 style fixes for public app api 2012-09-08 15:54:30 +02:00
Georg Ehrke c692dfc1ab style fixes for public app api 2012-09-08 15:52:29 +02:00
Jenkins for ownCloud d5d2e89622 [tx-robot] updated from transifex 2012-09-08 02:05:41 +02:00
Bart Visscher edcd297476 Move handling of core remotes to OC_TemplateLayout 2012-09-07 16:42:46 +02:00
Bart Visscher 631df21de6 Prevent loading all apps twice from overwriting the core scripts and styles 2012-09-07 16:20:13 +02:00
Thomas Mueller 3829460ab8 adding space between) and { 2012-09-07 15:22:01 +02:00
Bart Visscher 785aa751bb Whitespace fixes 2012-09-07 14:10:43 +02:00
Bart Visscher 285c198c36 EOL fixes
apps/files_external/lib/config.php
apps/files_versions/lib/versions.php
lib/connector/sabre/client.php
2012-09-07 14:10:00 +02:00
Bart Visscher 5e55b4d6e7 Whitespace fixes in lib 2012-09-07 14:08:29 +02:00
Bart Visscher 386d1ac49f Fix setEtagHeader function 2012-09-07 13:42:22 +02:00
Bart Visscher cd4b8dbacd Change caching checks for minimized files
Only use a ETag, but include last modified time into this
Also added the filesize to this. And used the ETag for the
internal cache.
2012-09-07 13:42:22 +02:00
Bart Visscher ff42da58b9 Global file cache should also be able to clear with prefix 2012-09-07 13:42:22 +02:00
Bart Visscher 9ea7817a40 Remove core.{css,js} cache on upgrade 2012-09-07 13:42:22 +02:00
Michael Gapczynski 73d726d1b2 Support for unshare from self, with a bunch of temporary fixes to overcome configuration problems with file actions 2012-09-07 00:02:22 -04:00
Michael Gapczynski 17dadd5c8a Don't show the delete all action if delete permission is not granted 2012-09-07 00:02:22 -04:00
Jenkins for ownCloud a94b56b57b [tx-robot] updated from transifex 2012-09-07 02:07:22 +02:00
Frank Karlitschek 294cff27a7 add check for zlib 2012-09-07 01:39:11 +02:00
Robin Appelman d4fd47d43f clear user filecache after the user mount configuration has changed 2012-09-06 23:14:43 +02:00
Robin Appelman 2144b2f37a clear the filecache if the mount configuration has changed 2012-09-06 23:10:33 +02:00
Bart Visscher 39577495e1 Add a directory separator to filter app directories with the same
prefix.

Fixes: oc-1663
2012-09-06 22:27:56 +02:00
Michael Gapczynski d936590f77 Don't pass content for a new text file from UI, fixes bug oc-1660 2012-09-06 16:01:51 -04:00
Jan-Christoph Borchardt 90462b2dcf make icons look good on bright and dark backgrounds 2012-09-06 13:47:07 +02:00
Michael Gapczynski 837eb1871d Don't delete the file anymore to replace it in the UI, just overwrite it 2012-09-05 22:13:50 -04:00
Michael Gapczynski a5211e31bc Add permissions to new files/folders, bug fix for oc-1649 2012-09-05 21:47:09 -04:00
Jenkins for ownCloud af3e767489 [tx-robot] updated from transifex 2012-09-06 02:06:37 +02:00
Thomas Mueller ebb28412ca no more require_once() 2012-09-05 23:28:59 +02:00
Thomas Mueller daf41885e5 jquery added to ignorelist for l10n 2012-09-05 22:53:48 +02:00
Bart Visscher e0db35fac0 Fix name for OCCategories 2012-09-05 22:26:09 +02:00
Bart Visscher a8de0af273 Add 'var' before some global js vars 2012-09-05 22:26:09 +02:00
Bart Visscher 9329af921d Add missing ; to js code 2012-09-05 22:26:09 +02:00
Robin Appelman 9f1c76beef fix running test cases in multiply app dirs 2012-09-05 19:42:26 +02:00
Robin Appelman aa8cee1afa I don't think this file was meant to be commited 2012-09-05 19:42:26 +02:00
Brice Maron 5fc4c78106 Merge branch 'master' of git://github.com/owncloud/core 2012-09-05 16:16:36 +00:00
Brice Maron a928b4cd66 Add more language name instead of codes for the setting choice 2012-09-05 16:16:19 +00:00
Thomas Tanghus e2ead7db86 Changed oc_preferences configvalue back to clob as it will give us bug reports in calendar, contacts and tasks if less. 2012-09-05 17:22:03 +02:00
Thomas Tanghus f2fd228801 Revert commit 8cf0e853686a5c4f9f082d8e47832277f50ea6c0. 2012-09-05 17:22:03 +02:00
Thomas Tanghus 1edab438d1 Added possibility to get permissions for shared item with ajax call. 2012-09-05 17:22:03 +02:00
Thomas Tanghus a2b6a92107 Disable asking to save password when adding users. 2012-09-05 17:22:03 +02:00
Thomas Müller 24977d0fd0 Respect coding style 2012-09-05 15:49:42 +03:00
Thomas Müller e5cb638c09 Respect coding style 2012-09-05 15:42:06 +03:00
Thomas Müller d5fd5cd584 Respect coding style 2012-09-05 15:40:21 +03:00
Thomas Müller 9eccc0121a Respect coding style 2012-09-05 13:22:38 +03:00
Michael Gapczynski a26ea6d65c Implement support for replacing files during upload with the actions: replace, suggest name, and cancel 2012-09-05 00:12:25 -04:00
Jenkins for ownCloud e8fcc71129 [tx-robot] updated from transifex 2012-09-05 02:05:39 +02:00
Thomas Mueller 685f03edf6 fixing translation - thx eMerzh 2012-09-04 23:49:43 +02:00
Thomas Mueller 66c2a391cb underline link to the app store 2012-09-04 23:42:49 +02:00
Thomas Mueller 02f9de55a3 add translation string 2012-09-04 23:42:49 +02:00
Thomas Mueller 1e2d582123 fixing button to add additional site 2012-09-04 23:42:49 +02:00
Bart Visscher f188f6cc2f Fix some jslint warnings 2012-09-04 21:27:37 +02:00
Bart Visscher 41f135daee Remove () from return statement 2012-09-04 21:27:36 +02:00
Thomas Mueller ae8d2d029f Adding missing translation 2012-09-04 20:48:10 +02:00
Thomas Müller 69ee842521 Fixing: http://bugs.owncloud.org/thebuggenie/owncloud/issues/oc-1617 2012-09-04 17:13:34 +03:00
Georg Ehrke 745f279fbc make use of OC_User::getHome in files_external app 2012-09-04 15:56:00 +02:00
Thomas Müller 7901fc33a8 fixing syntax error 2012-09-04 15:54:38 +03:00
Thomas Müller aff08925c1 fixing syntax error - sorry for that 2012-09-04 15:46:43 +03:00
Thomas Müller 2028500c0a fixing syntax error - sorry for that 2012-09-04 15:42:58 +03:00
Thomas Müller e4e0b5a822 Respect coding style 2012-09-04 15:34:09 +03:00
Thomas Müller d14f8fa681 Respect coding style 2012-09-04 15:21:52 +03:00
Jenkins for ownCloud acb9682807 [tx-robot] updated from transifex 2012-09-04 12:43:53 +02:00
Thomas Müller 9760b5e153 Respect coding style 2012-09-04 13:32:27 +03:00
Thomas Müller a3cda32392 Respect coding style 2012-09-04 13:26:13 +03:00
Thomas Müller 3d74c5b3ec Respect coding style 2012-09-04 13:25:53 +03:00
Thomas Müller 5868f834c8 Respect coding style 2012-09-04 13:21:36 +03:00
Thomas Müller ae67841461 Respect coding style 2012-09-04 13:21:00 +03:00
Thomas Müller ff8b8909c1 Respect coding style 2012-09-04 13:19:44 +03:00
Thomas Müller f4cace6cc1 Respect coding style 2012-09-04 13:19:04 +03:00
Thomas Müller 6e76c59007 Remove closing php tag 2012-09-04 13:18:11 +03:00
Thomas Müller 5bd4d6b051 Respect coding style 2012-09-04 13:17:14 +03:00
Thomas Müller 9e5807d1f9 fixing syntax error - sorry for that 2012-09-04 13:13:18 +03:00
Thomas Müller 6d358c051f Update core/lostpassword/templates/email.php
respect coding style
2012-09-04 13:10:14 +03:00
Thomas Müller 97e4647ad5 Update core/lostpassword/resetpassword.php 2012-09-04 13:09:25 +03:00
Thomas Müller 395ea2a028 Update core/lostpassword/index.php
respect coding style
2012-09-04 13:08:55 +03:00
Thomas Müller 3ddd28b972 Update files/webdav.php 2012-09-04 13:06:55 +03:00
Thomas Müller c252de56d0 Update search/index.php
respect coding style
2012-09-04 13:06:03 +03:00
Thomas Müller 409ede0975 Update settings/templates/users.php
respect coding style
2012-09-04 13:05:09 +03:00
Thomas Müller f3e330ce64 Update settings/templates/help.php
respect coding style
2012-09-04 13:03:51 +03:00
Thomas Müller b698fab109 Update settings/ajax/userlist.php
respect coding style
2012-09-04 13:00:56 +03:00
Thomas Müller 4b3fc27a22 Update settings/ajax/togglegroups.php
respect coding style
2012-09-04 12:58:07 +03:00
Thomas Müller 9a8a101756 Update settings/ajax/setloglevel.php
respect coding style
2012-09-04 12:55:20 +03:00
Thomas Müller dafe28e079 Update settings/ajax/setlanguage.php
respect coding style
2012-09-04 12:54:36 +03:00
Thomas Müller 93496a32cc Update settings/ajax/removeuser.php
$l->t added for error message
2012-09-04 12:54:04 +03:00
Thomas Müller de987b475d Update settings/ajax/removeuser.php
respect coding style
2012-09-04 12:51:04 +03:00
Thomas Müller 04aea1eb2e Update settings/ajax/removegroup.php
$l->t added for error message
2012-09-04 12:50:16 +03:00
Thomas Müller b49e8cd04d Update settings/ajax/removegroup.php
respect coding style
2012-09-04 12:49:50 +03:00
Thomas Müller 16b3ffb588 Update settings/ajax/openid.php
respect coding style
2012-09-04 12:49:21 +03:00
Thomas Müller 83575a4436 Update settings/ajax/creategroup.php
$l->t added to error messages
2012-09-04 12:48:42 +03:00
Thomas Müller 04033585b0 Update settings/ajax/lostpassword.php
respect coding style
2012-09-04 12:47:35 +03:00
Thomas Müller 6308f80329 Update settings/ajax/getlog.php
respect coding style
2012-09-04 12:46:56 +03:00
Thomas Müller caaaf7a7bf Update settings/ajax/creategroup.php
respect coding style
2012-09-04 12:45:54 +03:00
Thomas Müller a570cc7b60 Update settings/ajax/setquota.php
respect coding style
2012-09-04 12:36:21 +03:00
Thomas Müller e10f46d978 Update settings/ajax/createuser.php
respect coding style
2012-09-04 12:34:52 +03:00
Thomas Müller 69240afd7a Update settings/ajax/changepassword.php
respect coding style
2012-09-04 12:32:27 +03:00
Thomas Müller 8bea9f34e6 Update settings/ajax/apps/ocs.php
respect coding style
2012-09-04 12:31:28 +03:00
Thomas Müller 7ab5256922 Update settings/personal.php
respect coding style
2012-09-04 12:29:41 +03:00
Thomas Müller 1063034e93 Update settings/apps.php
respect coding style
2012-09-04 12:28:49 +03:00
Thomas Müller e87387c956 Update settings/users.php
respect coding style
2012-09-04 12:19:01 +03:00
Thomas Müller 01f5aa1b2d Update settings/settings.php
respect coding style
2012-09-04 12:17:02 +03:00
Thomas Müller dc2648b14c Update settings/personal.php
respect coding style
2012-09-04 12:16:24 +03:00
Thomas Müller 0fe0bd86b8 Update settings/help.php
respect coding style
2012-09-04 12:14:43 +03:00
Thomas Müller cfd62d422b Update settings/apps.php
respect coding style
2012-09-04 12:14:09 +03:00
Thomas Müller c25f53c3f9 Update status.php
respect coding style
2012-09-04 12:12:38 +03:00
Thomas Müller ca2a518945 Update remote.php
respect coding style
2012-09-04 12:11:11 +03:00
Thomas Müller cfa2fded05 Update public.php
respect coding style
2012-09-04 12:10:26 +03:00
Thomas Müller 08edb5dc58 Update index.php 2012-09-04 12:09:39 +03:00
Thomas Müller a1bd1ae484 Update cron.php
respect coding style
2012-09-04 12:08:58 +03:00
Thomas Müller b0d186265a Update files/webdav.php
respect coding style
2012-09-04 12:07:05 +03:00
Jenkins for ownCloud b867b738e8 [tx-robot] updated from transifex 2012-09-04 02:03:21 +02:00
Bart Visscher 5153b8b293 Add url-params to url with new parameter in linkTo function 2012-09-03 21:51:32 +02:00
Bart Visscher 1a46192433 Add args parameter to linkTo(Absolute) function, to append the args automaticly 2012-09-03 21:51:32 +02:00
Bart Visscher 38116c7efa Add check for missing appinfo in apps settings page 2012-09-03 21:51:32 +02:00
Frank Karlitschek bb65e173d4 4.5 beta 2 2012-09-03 20:38:50 +02:00
Michael Gapczynski c6858fb5ca Add additional html tags to public links template for previewers 2012-09-03 13:14:23 -04:00
Jenkins for ownCloud d386e0172a [tx-robot] updated from transifex 2012-09-03 02:07:40 +02:00
Michael Gapczynski 4c065deb55 Listen to post_deleteGroup hook in Share API 2012-09-02 20:01:09 -04:00
Michael Gapczynski dc569ea300 Fix some warnings from Jenkins in the Share API 2012-09-02 19:30:01 -04:00
Michael Gapczynski db37a454b3 Add parameter documentation 2012-09-02 18:29:55 -04:00
Michael Gapczynski f0f2d93908 Restructure generateTarget for the post_addToGroup hook 2012-09-02 18:23:19 -04:00
Michael Gapczynski a77c16371f Make item targets be based off of the parent item target for reshares 2012-09-02 18:23:19 -04:00
Thomas Mueller 5f2751c672 in some cases no translations are loaded because $this->lang is empty not null 2012-09-02 14:15:03 +02:00
Robin Appelman 3c784ede83 use str_ireplace instead of duplicate str_replace 2012-09-02 13:58:01 +02:00
Jenkins for ownCloud 2bb7cb9f64 [tx-robot] updated from transifex 2012-09-02 02:02:53 +02:00
Michael Gapczynski 6c29334b48 Add support for share expiration 2012-09-01 18:53:48 -04:00
Robin Appelman 2508f64efe set debug mode if an xdebug session is active 2012-09-01 20:52:13 +02:00
Jörn Friedrich Dreyer 2c1f732880 use null instead of -1 on all getUser() 2012-09-01 20:50:03 +02:00
Robin Appelman 828ca2ba36 translate UNIX_TIMESTAMP() into sqlite and pgsql equivilents 2012-09-01 20:38:14 +02:00
Michael Gapczynski 5a9a795cd5 Fix check in Javascript for password protected link 2012-09-01 13:52:12 -04:00
Michael Gapczynski 29d1e8087d Implement generateTarget for file sharing backend 2012-09-01 13:46:57 -04:00
Robin Appelman 6d48f3fab8 we still need this for pgsql 2012-09-01 16:49:29 +02:00
Robin Appelman 0fa254508d dont use shorthand php tags 2012-09-01 16:38:23 +02:00
Robin Appelman a7255181ad fix autoloader throwing errors for non-oc classes 2012-09-01 15:36:52 +02:00
Thomas Mueller ef8cf87f49 removing unmaintained (unused?) translation de_DE 2012-09-01 13:54:02 +02:00
Jenkins for ownCloud c0c48cb3ee [tx-robot] updated from transifex 2012-09-01 13:37:28 +02:00
Thomas Mueller 10bd64debd translation support enhanced 2012-09-01 13:23:37 +02:00
Thomas Müller 0d6b84dad3 Update l10n/zh_TW/lib.po 2012-09-01 13:23:11 +03:00
Robin Appelman 3dacf149de allow configuring user backends in config.php 2012-09-01 02:50:27 +02:00
Robin Appelman f67aef608f load authentication apps on login 2012-09-01 02:50:27 +02:00
Robin Appelman ebd813ae95 don't throw errors in the autoloader when a class doesn't exist 2012-09-01 02:50:27 +02:00
Jenkins for ownCloud ab090d5277 [tx-robot] updated from transifex 2012-09-01 02:04:00 +02:00
Michael Gapczynski efa0478d2d Remove share permission for encrypted files 2012-08-31 17:31:28 -04:00
Michael Gapczynski c07eb4fec6 Make css selector more specific for the sharing dropdown 2012-08-31 17:26:32 -04:00
Frank Karlitschek 72e80bf6bd send the current owncloud version to the ocs server so that we can filter for compatible apps 2012-08-31 20:22:03 +02:00
Thomas Mueller 6f8efcfe61 l18n support lib/updater.php 2012-08-31 10:51:35 +02:00
Jenkins for ownCloud 75cd7eacf8 [tx-robot] updated from transifex 2012-08-31 02:07:19 +02:00
Jörn Friedrich Dreyer 73d0a2b8f7 use OC.PERMISSION_X to filter selected drag'n'drop elements 2012-08-31 01:11:10 +02:00
Jörn Friedrich Dreyer ca8120e9f4 unify permissions (3/3): remove old PERMISSION_X from FileActions & OC.Share 2012-08-31 01:11:10 +02:00
Jörn Friedrich Dreyer 3ba27e624f unify permissions (2/3): change apps to use OC::PERMISSION_X 2012-08-31 01:11:10 +02:00
Jörn Friedrich Dreyer 61a3e5f96b unify permissions (1/3): add permission conastants to javascript OC 2012-08-31 01:11:10 +02:00
Thomas Mueller 077e988136 oc-1548: prevent user from leaving the page while a file upload is in progress 2012-08-31 00:45:03 +02:00
Thomas Mueller bd809574dc fix translations within subfolder /lib 2012-08-31 00:43:50 +02:00
Jörn Friedrich Dreyer 26ef012418 use permissions to quickfix drag selections 2012-08-31 00:13:02 +02:00
Thomas Mueller 58b1e841f1 fix translations within subfolder /lib 2012-08-30 23:51:44 +02:00
Bart Visscher 6324daecc0 Don't wait for document ready for setting requesttoken 2012-08-30 23:10:24 +02:00
Robin Appelman 8380e6f658 add backup files and kate-swp files to gitignore 2012-08-30 22:18:11 +02:00
Robin Appelman b5234a4f34 allow html inside app descriptions 2012-08-30 22:17:54 +02:00
Arthur Schiwon 7027742bd6 LDAP settings, add missing p tags 2012-08-30 15:06:33 +02:00
Arthur Schiwon 1a6f34865c LDAP: on upgrade update user cols in database only when necessary 2012-08-30 15:03:02 +02:00
Arthur Schiwon 2440e500b8 LDAP: on upgrade set homeDirs of users where it is not set. Avoids new folders (empty), depending on the configuration 2012-08-30 14:55:07 +02:00
Michael Gapczynski f2534e7428 Show notification that no preview is available if no previewer is found for a public link to a file 2012-08-29 21:12:23 -04:00
Michael Gapczynski 756b514fee Check if file source exists before searching for link 2012-08-29 21:12:23 -04:00
Robin Appelman 8990855f88 add OC.get and OC.set to get/set variables by name in javascript 2012-08-30 03:02:29 +02:00
Jenkins for ownCloud 898ca364a2 [tx-robot] updated from transifex 2012-08-30 02:06:45 +02:00
Bart Visscher 598815b21e More info about not compatible apps (app id) 2012-08-29 22:38:06 +02:00
Bart Visscher c958d5ba80 Fix filesystem setup for shared public link with logged in user 2012-08-29 21:35:55 +02:00
Michael Gapczynski 301baf0215 $storage shouldn't be static in OC_Cache_File 2012-08-29 14:42:40 -04:00
Michael Gapczynski 8d490b9880 Fix shared storage working with user backend defined data directories 2012-08-29 14:39:13 -04:00
Michael Gapczynski 3828d86191 Remove old Javascript code 2012-08-29 14:37:36 -04:00
Bart Visscher db18218a1b Space before tab fixes 2012-08-29 20:34:44 +02:00
Bart Visscher 9e32e07306 Fix OC_Cache_File 2012-08-29 20:29:43 +02:00
Bart Visscher 0365f8fd01 Remove php close at end of file 2012-08-29 20:29:43 +02:00
Bart Visscher 0e58800016 Whitespace fixes in apps 2012-08-29 20:29:43 +02:00
Bart Visscher 52f2e7112e Whitespace fixes in lib 2012-08-29 20:28:45 +02:00
Michael Gapczynski 76bc4753e9 Fix displaying if a link is password protected 2012-08-29 14:06:55 -04:00
Michael Gapczynski 0788c6e968 Hide link password controls if link is removed 2012-08-29 14:06:55 -04:00
Michael Gapczynski 26501a0bc8 Delete old link if user sets a password 2012-08-29 14:06:55 -04:00
Arthur Schiwon 224e55e590 LDAP: fix debug message with undefined variable 2012-08-29 19:37:18 +02:00
Arthur Schiwon 741a21292e LDAP: fix potential infinite loop introduced with 4c4aa92eef, as side effect optimize groupExists-method. 2012-08-29 19:37:18 +02:00
Arthur Schiwon 8be8f6fff2 LDAP: Remove unnecessary debug output, fixes a Notice 2012-08-29 19:37:18 +02:00
Michael Gapczynski e5cbc532c3 Fix password authentication for links and fix template problems for links by creating a new base layout 2012-08-29 11:54:49 -04:00
Michael Gapczynski 9fcb916057 Fix toggling of password protection in sharing dropdown 2012-08-29 11:54:49 -04:00
Jenkins for ownCloud 9338d093f9 [tx-robot] updated from transifex 2012-08-29 02:06:48 +02:00
Robin Appelman 92c782c1b0 return the jQuery deferred object when using OC.loadScript 2012-08-29 01:57:59 +02:00
Thomas Mueller d786194ddc fixing: apps/files/ajax/scan.php 2012-08-29 01:39:42 +02:00
Thomas Mueller b64229a89e apply coding style 2012-08-29 01:39:42 +02:00
Arthur Schiwon 4c4aa92eef LDAP: check for existing username from other backends when creating one for an LDAP user or group. Led also to some code cleanup. Fixes oc-1551 in master. 2012-08-29 01:23:51 +02:00
Thomas Mueller fe49cbafc7 apply coding style 2012-08-29 00:50:12 +02:00
Thomas Mueller f301bfd8c9 apply coding style 2012-08-29 00:36:27 +02:00
Thomas Mueller 6d0737de22 removing obsolete .tx 2012-08-28 23:27:00 +02:00
Bart Visscher 32721e7b07 Remember storage view in OC_Cache_File 2012-08-28 23:10:32 +02:00
Bart Visscher 53e51fe46b Clean user cache on login 2012-08-28 23:07:28 +02:00
Bart Visscher 8a02a8852f Add background job for global file cache cleanup 2012-08-28 23:07:28 +02:00
Michael Gapczynski 95cd48dea8 Fix sharing test case 2012-08-28 14:00:46 -04:00
Michael Gapczynski 9ca6290317 Remove unused settings log file 2012-08-28 13:46:16 -04:00
Michael Gapczynski ff076caeee Check usernames in the database as case insensitive, they are still stored case sensitive. Bug fix for oc-422 and oc-1514 2012-08-28 11:28:38 -04:00
Michael Gapczynski e05db00468 404 if service is not set for public.php 2012-08-28 11:13:02 -04:00
Michael Gapczynski da44e5405a Fix typo 2012-08-28 11:12:18 -04:00
Michael Gapczynski 4ac7c414c4 Check if path info is empty for remote.php, prevent error 2012-08-28 11:08:24 -04:00
Michael Gapczynski c53310e49b Remove unnecessary ajax file from files_sharing 2012-08-28 09:57:09 -04:00
Michael Gapczynski 1e2ba8398d Remove old database xml file for files_sharing, bump version number 2012-08-28 09:55:24 -04:00
Michael Gapczynski 0a1f24142a Change public file from get.php to public.php 2012-08-28 09:53:31 -04:00
Michael Gapczynski fd2ca21fc2 Allow share_with column to be null for links 2012-08-28 09:51:00 -04:00
Arthur Schiwon 42a9969304 LDAP: implement getHome() function, use either username (default) or specify an LDAP attribute value to use 2012-08-28 14:24:50 +02:00
Frank Karlitschek 549f69cbc1 marked as shipped app 2012-08-28 07:35:31 +02:00
Frank Karlitschek 70b71338cd beta 1 2012-08-28 07:22:31 +02:00
Michael Gapczynski aad7dc8390 Remove sharing notice in users settings - The default is now share with anyone, groups only sharing is now a setting in the admin page 2012-08-27 20:55:11 -04:00
Michael Gapczynski 42a291286b Fix incorrect Javascript for changing Share API settings 2012-08-27 20:45:36 -04:00
Michael Gapczynski 9cd55508c3 Add Share API settings to admin page 2012-08-27 20:39:31 -04:00
Michael Gapczynski 2aac6f02a0 Reimplement links support for sharing and add password protection option 2012-08-27 20:37:38 -04:00
Michael Gapczynski 0ad16e84c5 Fix share collection query 2012-08-27 20:37:38 -04:00
Michael Gapczynski 0a9d1ed3a6 Initial previewer for public links 2012-08-27 20:37:38 -04:00
Jenkins for ownCloud 8374a49cc1 [tx-robot] updated from transifex 2012-08-28 02:03:56 +02:00
Thomas Mueller 07df52c998 assert array length and individual content instead of assertEqual on arrays 2012-08-28 00:35:10 +02:00
Thomas Mueller 2abb63de70 assert array length and individual content instead of assertEqual on arrays 2012-08-28 00:12:01 +02:00
Jan-Christoph Borchardt 09300e5f6e fix cronjobs radio button width 2012-08-27 14:05:18 -07:00
Jan-Christoph Borchardt 4910717c09 remove background fade from navigation, fix flickering icon issue and make it feel faster 2012-08-27 14:05:18 -07:00
Jan-Christoph Borchardt 6b5f1ffdb4 upload button improvement, better separation, fix wrap issue 2012-08-27 14:05:18 -07:00
Frank Karlitschek c2290a542e add deprecated warning 2012-08-27 22:58:50 +02:00
Arthur Schiwon 5985d00c6f LDAP: transliterate other latin characters to ASCII when creating owncloud names. Already created usernames are not being affected. 2012-08-27 21:32:56 +02:00
Jörn Friedrich Dreyer 84a5faff36 remove files_imageviewer and files_texteditor from blacklist so they can be activated in a multi apps environment 2012-08-27 20:35:05 +02:00
Jörn Friedrich Dreyer 3b83c7fa74 update now(), current_timestamp and backtick replacement 2012-08-27 18:37:16 +02:00
Georg Ehrke ead7de6bff only mount every single homefolder when using sharing app 2012-08-27 16:10:37 +02:00
Georg Ehrke b56a46bdea fix filesharing for multiple data directories 2012-08-27 15:55:46 +02:00
Arthur Schiwon 0f379fd28a OC_User: getHome is an optional method, taking it out of the Interface 2012-08-27 14:07:28 +02:00
Jörn Friedrich Dreyer 3970d0e636 Merge branch 'master' of github.com:owncloud/core 2012-08-27 14:00:17 +02:00
Jörn Friedrich Dreyer d91bd37bd7 fix two bugs in MDB2, patches committed upstream https://pear.php.net/bugs/bug.php?id=19582 2012-08-27 13:59:59 +02:00
Jörn Friedrich Dreyer f105e9b454 remove oc_log, as it is unused
add length to text columns or newer mysql will produce columns too wide
2012-08-27 13:40:48 +02:00
Jörn Friedrich Dreyer 15cdde74d3 return standard SQL values (sqlite3 understands CURRENT_...) 2012-08-27 13:33:24 +02:00
Georg Ehrke 16aff1045d make use of OC_User::getHome in lib/migrate.php 2012-08-27 13:21:40 +02:00
Michael Gapczynski 59cf1d19e5 setbackgroundjobsmode.php got lost somewhere - switched call to use the perferred OC.AppConfig.setValue() instead 2012-08-26 22:05:34 -04:00
Michael Gapczynski 617449b230 Change URL from gitorious to github 2012-08-26 21:38:53 -04:00
Michael Gapczynski 18517f6adb Fix share getItems() limit 2012-08-26 21:34:37 -04:00
Jenkins for ownCloud c33a2ca01d [tx-robot] updated from transifex 2012-08-27 02:02:37 +02:00
Michael Gapczynski 545812f589 Move additional jquery.inview files 2012-08-26 18:50:20 -04:00
Michael Gapczynski d6bb04a74e Move jquery.inview from contacts app to core 2012-08-26 17:55:51 -04:00
Georg Ehrke cd5c217c0d use OC_User::getHome in lib/filesystem.php 2012-08-26 22:24:08 +02:00
Georg Ehrke 045c94ec3e enable user backends to define their own place where to store the data 2012-08-26 22:04:31 +02:00
Georg Ehrke 5586054961 fix c&p fail from earlier commit today 2012-08-26 22:04:31 +02:00
Jenkins for ownCloud faf702b9e6 [tx-robot] updated from transifex 2012-08-26 19:47:33 +02:00
Thomas Mueller 352128645b changing l10n to reflect latest repo splitt 2012-08-26 19:43:58 +02:00
Frank Karlitschek 184438224c restore the webdavauth app 2012-08-26 17:51:01 +02:00
Frank Karlitschek 72e9a2ce57 moved to apps repository 2012-08-26 17:30:07 +02:00
Lukas Reschke 32bad688bd Wrong function
https://github.com/owncloud/core/commit/2028c8116122f56d8087716e42162fdc
651819d3#commitcomment-1766755
2012-08-26 17:22:41 +02:00
Georg Ehrke 44f5033e29 Merge branch 'master' of github.com:owncloud/core 2012-08-26 16:30:30 +02:00
Georg Ehrke 8c8496aff9 don't allow group admins to change admin's accounts 2012-08-26 16:29:10 +02:00
Georg Ehrke 5a4854079f implement getHome in OC_User 2012-08-26 16:24:25 +02:00
Lukas Reschke 2028c81161 OC_Util is better thank OCP\JSON because it'll redirect the user to the index.php instead of displaying an error 2012-08-26 16:08:58 +02:00
Lukas Reschke 4885a52ba4 Check if app is enabled 2012-08-26 16:05:40 +02:00
Lukas Reschke bcd86bfd02 Remove some empty lines 2012-08-26 15:43:34 +02:00
Lukas Reschke 726be04e5f Use sanitizeHTML instead of strip_tags 2012-08-26 15:41:41 +02:00
Jörn Friedrich Dreyer 39a9a4e73e Merge branch 'master' of github.com:owncloud/core 2012-08-26 15:05:28 +02:00
jfd 9822cd30c0 fix sharing bug introduced with oracle support 2012-08-26 14:57:33 +02:00
Jenkins for ownCloud 922982f070 [tx-robot] updated from transifex 2012-08-26 02:22:02 +02:00
Thomas Mueller ad66d6d5e9 translation support for pdfviewer 2012-08-26 02:17:28 +02:00
Thomas Mueller 8e090d8f67 added translation for odfviewer 2012-08-26 02:17:28 +02:00
Jenkins for ownCloud a1a3862274 [tx-robot] updated from transifex 2012-08-26 02:02:48 +02:00
Lukas Reschke bcacf16ba7 Gitorious => Github 2012-08-26 02:39:42 +03:00
Thomas Mueller 27eb665516 adding coverage extension for simpletest 2012-08-26 01:36:06 +02:00
Jenkins for ownCloud bae07faa34 [tx-robot] updated from transifex 2012-08-26 01:20:16 +02:00
Thomas Mueller c490e10bc6 resources added to transifex 2012-08-26 01:01:39 +02:00
Jenkins for ownCloud fadd84f9d3 [tx-robot] updated from transifex 2012-08-26 00:46:47 +02:00
Thomas Mueller 814cb6bbfa translation support for text editor and impress added 2012-08-26 00:39:23 +02:00
Jenkins for ownCloud c82518cb0e [tx-robot] updated from transifex 2012-08-26 00:12:05 +02:00
Lukas Reschke c915998f40 I like TLS/SSL 2012-08-26 00:52:00 +03:00
Lukas Reschke 66e91b1011 Merge pull request #1 from cornelius/patch-1
Fix URL to sources
2012-08-25 14:49:48 -07:00
Cornelius Schumacher b75802cca7 Fix URL to sources 2012-08-26 00:45:54 +03:00
Georg Ehrke 80374c7cb2 fix UI bug with subadmins 2012-08-25 14:35:24 +02:00
Jörn Friedrich Dreyer 4f5eff2b6f Merge branch 'master' of git://gitorious.org/owncloud/owncloud into oracle-support 2012-08-25 03:14:26 +02:00
jfd dc3bec6211 OC_Share no longer exists. remove hooks that would trigger require_once / autoloading failures, so i can at least upload files 2012-08-25 03:13:59 +02:00
jfd e8ffd5c042 use limit parameter instead of LIMIT SQL for vcard 2012-08-25 02:27:43 +02:00
jfd 1bfe26bb09 remove superflous LIMIT 2012-08-25 02:26:50 +02:00
jfd 379f27ed03 fix missing $ 2012-08-25 02:17:44 +02:00
jfd bc90a34b07 remove duplicate method 2012-08-25 02:13:32 +02:00
jfd 59eb693e51 fix typo in db_structure 2012-08-25 02:13:15 +02:00
Jenkins for ownCloud f57d527a7c [tx-robot] updated from transifex 2012-08-25 02:08:36 +02:00
Jörn Friedrich Dreyer fa3497f6ed add backticks to SQL, use limit parameter instead of LIMIT SQL 2012-08-25 01:52:27 +02:00
Jörn Friedrich Dreyer fd5af9aff4 Merge branch 'master' of git://gitorious.org/owncloud/owncloud into oracle-support 2012-08-25 00:06:20 +02:00
Jörn Friedrich Dreyer c8255a170c Merge branch 'master' of git://gitorious.org/owncloud/owncloud into oracle-support
Conflicts:
	3rdparty/Sabre/CardDAV/Plugin.php
	3rdparty/smb4php/smb.php
	apps/bookmarks/ajax/addBookmark.php
	apps/bookmarks/ajax/editBookmark.php
	apps/bookmarks/appinfo/migrate.php
	apps/calendar/ajax/calendar/edit.form.php
	apps/calendar/ajax/changeview.php
	apps/calendar/ajax/import/import.php
	apps/calendar/ajax/settings/guesstimezone.php
	apps/calendar/ajax/settings/setfirstday.php
	apps/calendar/ajax/settings/settimeformat.php
	apps/calendar/ajax/share/changepermission.php
	apps/calendar/ajax/share/share.php
	apps/calendar/ajax/share/unshare.php
	apps/calendar/appinfo/app.php
	apps/calendar/appinfo/remote.php
	apps/calendar/appinfo/update.php
	apps/calendar/appinfo/version
	apps/calendar/js/calendar.js
	apps/calendar/l10n/da.php
	apps/calendar/l10n/de.php
	apps/calendar/l10n/fi_FI.php
	apps/calendar/l10n/gl.php
	apps/calendar/l10n/he.php
	apps/calendar/l10n/hr.php
	apps/calendar/l10n/ja_JP.php
	apps/calendar/l10n/lb.php
	apps/calendar/l10n/lt_LT.php
	apps/calendar/l10n/nb_NO.php
	apps/calendar/l10n/pl.php
	apps/calendar/l10n/pt_PT.php
	apps/calendar/l10n/ro.php
	apps/calendar/l10n/ru.php
	apps/calendar/l10n/sv.php
	apps/calendar/l10n/zh_CN.php
	apps/calendar/l10n/zh_TW.php
	apps/calendar/lib/app.php
	apps/calendar/lib/calendar.php
	apps/calendar/lib/object.php
	apps/calendar/lib/share.php
	apps/calendar/templates/part.choosecalendar.rowfields.php
	apps/calendar/templates/part.import.php
	apps/calendar/templates/settings.php
	apps/contacts/ajax/activation.php
	apps/contacts/ajax/addressbook/delete.php
	apps/contacts/ajax/contact/add.php
	apps/contacts/ajax/contact/addproperty.php
	apps/contacts/ajax/contact/delete.php
	apps/contacts/ajax/contact/deleteproperty.php
	apps/contacts/ajax/contact/saveproperty.php
	apps/contacts/ajax/createaddressbook.php
	apps/contacts/ajax/cropphoto.php
	apps/contacts/ajax/currentphoto.php
	apps/contacts/ajax/importaddressbook.php
	apps/contacts/ajax/oc_photo.php
	apps/contacts/ajax/savecrop.php
	apps/contacts/ajax/selectaddressbook.php
	apps/contacts/ajax/updateaddressbook.php
	apps/contacts/ajax/uploadimport.php
	apps/contacts/ajax/uploadphoto.php
	apps/contacts/appinfo/migrate.php
	apps/contacts/appinfo/remote.php
	apps/contacts/css/contacts.css
	apps/contacts/import.php
	apps/contacts/index.php
	apps/contacts/js/contacts.js
	apps/contacts/l10n/ca.php
	apps/contacts/l10n/cs_CZ.php
	apps/contacts/l10n/da.php
	apps/contacts/l10n/de.php
	apps/contacts/l10n/el.php
	apps/contacts/l10n/eo.php
	apps/contacts/l10n/es.php
	apps/contacts/l10n/et_EE.php
	apps/contacts/l10n/eu.php
	apps/contacts/l10n/fa.php
	apps/contacts/l10n/fi_FI.php
	apps/contacts/l10n/fr.php
	apps/contacts/l10n/he.php
	apps/contacts/l10n/hr.php
	apps/contacts/l10n/hu_HU.php
	apps/contacts/l10n/ia.php
	apps/contacts/l10n/it.php
	apps/contacts/l10n/ja_JP.php
	apps/contacts/l10n/ko.php
	apps/contacts/l10n/lb.php
	apps/contacts/l10n/mk.php
	apps/contacts/l10n/nb_NO.php
	apps/contacts/l10n/nl.php
	apps/contacts/l10n/pl.php
	apps/contacts/l10n/pt_BR.php
	apps/contacts/l10n/pt_PT.php
	apps/contacts/l10n/ro.php
	apps/contacts/l10n/ru.php
	apps/contacts/l10n/sk_SK.php
	apps/contacts/l10n/sl.php
	apps/contacts/l10n/sv.php
	apps/contacts/l10n/th_TH.php
	apps/contacts/l10n/tr.php
	apps/contacts/l10n/zh_CN.php
	apps/contacts/l10n/zh_TW.php
	apps/contacts/lib/addressbook.php
	apps/contacts/lib/hooks.php
	apps/contacts/lib/vcard.php
	apps/contacts/photo.php
	apps/contacts/templates/part.contact.php
	apps/contacts/templates/part.contacts.php
	apps/contacts/templates/part.cropphoto.php
	apps/contacts/templates/part.importaddressbook.php
	apps/contacts/templates/part.selectaddressbook.php
	apps/contacts/thumbnail.php
	apps/files/ajax/download.php
	apps/files/ajax/newfile.php
	apps/files/ajax/timezone.php
	apps/files/appinfo/update.php
	apps/files/appinfo/version
	apps/files/index.php
	apps/files/js/fileactions.js
	apps/files/js/filelist.js
	apps/files/js/files.js
	apps/files/l10n/ar.php
	apps/files/l10n/bg_BG.php
	apps/files/l10n/ca.php
	apps/files/l10n/cs_CZ.php
	apps/files/l10n/da.php
	apps/files/l10n/de.php
	apps/files/l10n/el.php
	apps/files/l10n/eo.php
	apps/files/l10n/es.php
	apps/files/l10n/et_EE.php
	apps/files/l10n/eu.php
	apps/files/l10n/fa.php
	apps/files/l10n/fi_FI.php
	apps/files/l10n/fr.php
	apps/files/l10n/gl.php
	apps/files/l10n/he.php
	apps/files/l10n/hr.php
	apps/files/l10n/hu_HU.php
	apps/files/l10n/ia.php
	apps/files/l10n/id.php
	apps/files/l10n/it.php
	apps/files/l10n/ja_JP.php
	apps/files/l10n/ko.php
	apps/files/l10n/lb.php
	apps/files/l10n/lt_LT.php
	apps/files/l10n/mk.php
	apps/files/l10n/ms_MY.php
	apps/files/l10n/nb_NO.php
	apps/files/l10n/nl.php
	apps/files/l10n/nn_NO.php
	apps/files/l10n/pl.php
	apps/files/l10n/pt_BR.php
	apps/files/l10n/pt_PT.php
	apps/files/l10n/ro.php
	apps/files/l10n/ru.php
	apps/files/l10n/sk_SK.php
	apps/files/l10n/sl.php
	apps/files/l10n/sr.php
	apps/files/l10n/sr@latin.php
	apps/files/l10n/sv.php
	apps/files/l10n/th_TH.php
	apps/files/l10n/tr.php
	apps/files/l10n/uk.php
	apps/files/l10n/zh_CN.php
	apps/files/l10n/zh_TW.php
	apps/files_archive/js/archive.js
	apps/files_encryption/lib/cryptstream.php
	apps/files_encryption/lib/proxy.php
	apps/files_encryption/tests/proxy.php
	apps/files_external/appinfo/app.php
	apps/files_external/lib/smb.php
	apps/files_external/lib/streamwrapper.php
	apps/files_external/tests/config.php
	apps/files_external/tests/smb.php
	apps/files_sharing/ajax/email.php
	apps/files_sharing/ajax/getitem.php
	apps/files_sharing/ajax/setpermissions.php
	apps/files_sharing/ajax/share.php
	apps/files_sharing/ajax/toggleresharing.php
	apps/files_sharing/ajax/unshare.php
	apps/files_sharing/ajax/userautocomplete.php
	apps/files_sharing/js/settings.js
	apps/files_sharing/js/share.js
	apps/files_sharing/lib_share.php
	apps/files_sharing/settings.php
	apps/files_sharing/sharedstorage.php
	apps/files_sharing/templates/settings.php
	apps/files_versions/ajax/rollbackVersion.php
	apps/files_versions/versions.php
	apps/gallery/ajax/thumbnail.php
	apps/gallery/appinfo/app.php
	apps/gallery/appinfo/update.php
	apps/gallery/appinfo/version
	apps/gallery/css/styles.css
	apps/gallery/index.php
	apps/gallery/js/pictures.js
	apps/gallery/l10n/ca.php
	apps/gallery/l10n/cs_CZ.php
	apps/gallery/l10n/de.php
	apps/gallery/l10n/el.php
	apps/gallery/l10n/es.php
	apps/gallery/l10n/fi_FI.php
	apps/gallery/l10n/fr.php
	apps/gallery/l10n/it.php
	apps/gallery/l10n/pl.php
	apps/gallery/l10n/pt_PT.php
	apps/gallery/l10n/ru.php
	apps/gallery/l10n/sl.php
	apps/gallery/l10n/sv.php
	apps/gallery/l10n/th_TH.php
	apps/gallery/l10n/tr.php
	apps/gallery/l10n/zh_CN.php
	apps/gallery/lib/album.php
	apps/gallery/lib/hooks_handlers.php
	apps/gallery/lib/managers.php
	apps/gallery/lib/photo.php
	apps/gallery/lib/tiles.php
	apps/gallery/lib/tiles_test.php
	apps/gallery/templates/index.php
	apps/media/lib_ampache.php
	apps/media/lib_collection.php
	apps/media/lib_media.php
	apps/remoteStorage/lib_remoteStorage.php
	apps/tasks/ajax/addtaskform.php
	apps/tasks/ajax/edittask.php
	apps/user_ldap/appinfo/update.php
	apps/user_ldap/group_ldap.php
	apps/user_ldap/lib_ldap.php
	apps/user_ldap/settings.php
	apps/user_ldap/templates/settings.php
	apps/user_ldap/user_ldap.php
	apps/user_migrate/appinfo/app.php
	apps/user_migrate/templates/settings.php
	apps/user_webfinger/host-meta.php
	config/config.sample.php
	core/js/js.js
	core/l10n/da.php
	core/l10n/de.php
	core/l10n/fi_FI.php
	core/l10n/gl.php
	core/l10n/he.php
	core/l10n/hr.php
	core/l10n/id.php
	core/l10n/ja_JP.php
	core/l10n/lb.php
	core/l10n/lt_LT.php
	core/l10n/nb_NO.php
	core/l10n/pl.php
	core/l10n/pt_PT.php
	core/l10n/ro.php
	core/l10n/ru.php
	core/l10n/sv.php
	core/lostpassword/index.php
	core/templates/layout.user.php
	core/templates/login.php
	db_structure.xml
	index.php
	l10n/af/calendar.po
	l10n/af/contacts.po
	l10n/af/core.po
	l10n/af/files.po
	l10n/af/settings.po
	l10n/ar/calendar.po
	l10n/ar/contacts.po
	l10n/ar/core.po
	l10n/ar/files.po
	l10n/ar/media.po
	l10n/ar/settings.po
	l10n/bg_BG/calendar.po
	l10n/bg_BG/contacts.po
	l10n/bg_BG/core.po
	l10n/bg_BG/files.po
	l10n/bg_BG/media.po
	l10n/bg_BG/settings.po
	l10n/ca/calendar.po
	l10n/ca/contacts.po
	l10n/ca/core.po
	l10n/ca/files.po
	l10n/ca/gallery.po
	l10n/ca/settings.po
	l10n/cs_CZ/calendar.po
	l10n/cs_CZ/contacts.po
	l10n/cs_CZ/core.po
	l10n/cs_CZ/files.po
	l10n/cs_CZ/gallery.po
	l10n/cs_CZ/settings.po
	l10n/da/calendar.po
	l10n/da/contacts.po
	l10n/da/core.po
	l10n/da/files.po
	l10n/da/settings.po
	l10n/de/calendar.po
	l10n/de/contacts.po
	l10n/de/core.po
	l10n/de/files.po
	l10n/de/gallery.po
	l10n/de/settings.po
	l10n/el/calendar.po
	l10n/el/contacts.po
	l10n/el/core.po
	l10n/el/files.po
	l10n/el/gallery.po
	l10n/el/settings.po
	l10n/eo/calendar.po
	l10n/eo/contacts.po
	l10n/eo/core.po
	l10n/eo/files.po
	l10n/eo/media.po
	l10n/eo/settings.po
	l10n/es/calendar.po
	l10n/es/contacts.po
	l10n/es/core.po
	l10n/es/files.po
	l10n/es/gallery.po
	l10n/es/settings.po
	l10n/et_EE/calendar.po
	l10n/et_EE/contacts.po
	l10n/et_EE/core.po
	l10n/et_EE/files.po
	l10n/et_EE/settings.po
	l10n/eu/calendar.po
	l10n/eu/contacts.po
	l10n/eu/core.po
	l10n/eu/files.po
	l10n/eu/settings.po
	l10n/fa/calendar.po
	l10n/fa/contacts.po
	l10n/fa/core.po
	l10n/fa/files.po
	l10n/fa/settings.po
	l10n/fi_FI/calendar.po
	l10n/fi_FI/contacts.po
	l10n/fi_FI/core.po
	l10n/fi_FI/files.po
	l10n/fi_FI/gallery.po
	l10n/fi_FI/settings.po
	l10n/fr/calendar.po
	l10n/fr/contacts.po
	l10n/fr/core.po
	l10n/fr/files.po
	l10n/fr/gallery.po
	l10n/fr/media.po
	l10n/fr/settings.po
	l10n/gl/calendar.po
	l10n/gl/contacts.po
	l10n/gl/core.po
	l10n/gl/files.po
	l10n/gl/settings.po
	l10n/he/calendar.po
	l10n/he/contacts.po
	l10n/he/core.po
	l10n/he/files.po
	l10n/he/settings.po
	l10n/hr/calendar.po
	l10n/hr/contacts.po
	l10n/hr/core.po
	l10n/hr/files.po
	l10n/hr/settings.po
	l10n/hu_HU/calendar.po
	l10n/hu_HU/contacts.po
	l10n/hu_HU/core.po
	l10n/hu_HU/files.po
	l10n/hu_HU/settings.po
	l10n/hy/calendar.po
	l10n/hy/contacts.po
	l10n/hy/core.po
	l10n/hy/files.po
	l10n/hy/settings.po
	l10n/ia/calendar.po
	l10n/ia/contacts.po
	l10n/ia/core.po
	l10n/ia/files.po
	l10n/ia/settings.po
	l10n/id/calendar.po
	l10n/id/contacts.po
	l10n/id/core.po
	l10n/id/files.po
	l10n/id/settings.po
	l10n/it/calendar.po
	l10n/it/contacts.po
	l10n/it/core.po
	l10n/it/files.po
	l10n/it/gallery.po
	l10n/it/settings.po
	l10n/ja_JP/calendar.po
	l10n/ja_JP/contacts.po
	l10n/ja_JP/core.po
	l10n/ja_JP/files.po
	l10n/ja_JP/settings.po
	l10n/ko/calendar.po
	l10n/ko/contacts.po
	l10n/ko/core.po
	l10n/ko/files.po
	l10n/ko/settings.po
	l10n/lb/calendar.po
	l10n/lb/contacts.po
	l10n/lb/core.po
	l10n/lb/files.po
	l10n/lb/settings.po
	l10n/lt_LT/calendar.po
	l10n/lt_LT/contacts.po
	l10n/lt_LT/core.po
	l10n/lt_LT/files.po
	l10n/lt_LT/settings.po
	l10n/mk/calendar.po
	l10n/mk/contacts.po
	l10n/mk/core.po
	l10n/mk/files.po
	l10n/mk/settings.po
	l10n/ms_MY/calendar.po
	l10n/ms_MY/contacts.po
	l10n/ms_MY/core.po
	l10n/ms_MY/files.po
	l10n/ms_MY/settings.po
	l10n/nb_NO/calendar.po
	l10n/nb_NO/contacts.po
	l10n/nb_NO/core.po
	l10n/nb_NO/files.po
	l10n/nb_NO/settings.po
	l10n/nl/calendar.po
	l10n/nl/contacts.po
	l10n/nl/core.po
	l10n/nl/files.po
	l10n/nl/settings.po
	l10n/nn_NO/calendar.po
	l10n/nn_NO/contacts.po
	l10n/nn_NO/core.po
	l10n/nn_NO/files.po
	l10n/nn_NO/settings.po
	l10n/pl/calendar.po
	l10n/pl/contacts.po
	l10n/pl/core.po
	l10n/pl/files.po
	l10n/pl/gallery.po
	l10n/pl/settings.po
	l10n/pt_BR/calendar.po
	l10n/pt_BR/contacts.po
	l10n/pt_BR/core.po
	l10n/pt_BR/files.po
	l10n/pt_BR/settings.po
	l10n/pt_PT/calendar.po
	l10n/pt_PT/contacts.po
	l10n/pt_PT/core.po
	l10n/pt_PT/files.po
	l10n/pt_PT/gallery.po
	l10n/pt_PT/settings.po
	l10n/ro/calendar.po
	l10n/ro/contacts.po
	l10n/ro/core.po
	l10n/ro/files.po
	l10n/ro/settings.po
	l10n/ru/calendar.po
	l10n/ru/contacts.po
	l10n/ru/core.po
	l10n/ru/files.po
	l10n/ru/gallery.po
	l10n/ru/settings.po
	l10n/sk_SK/calendar.po
	l10n/sk_SK/contacts.po
	l10n/sk_SK/core.po
	l10n/sk_SK/files.po
	l10n/sk_SK/settings.po
	l10n/sl/calendar.po
	l10n/sl/contacts.po
	l10n/sl/core.po
	l10n/sl/files.po
	l10n/sl/gallery.po
	l10n/sl/settings.po
	l10n/sr/calendar.po
	l10n/sr/contacts.po
	l10n/sr/core.po
	l10n/sr/files.po
	l10n/sr/settings.po
	l10n/sr@latin/calendar.po
	l10n/sr@latin/contacts.po
	l10n/sr@latin/core.po
	l10n/sr@latin/files.po
	l10n/sr@latin/settings.po
	l10n/sv/calendar.po
	l10n/sv/contacts.po
	l10n/sv/core.po
	l10n/sv/files.po
	l10n/sv/gallery.po
	l10n/sv/media.po
	l10n/sv/settings.po
	l10n/templates/bookmarks.pot
	l10n/templates/calendar.pot
	l10n/templates/contacts.pot
	l10n/templates/core.pot
	l10n/templates/files.pot
	l10n/templates/gallery.pot
	l10n/templates/media.pot
	l10n/templates/settings.pot
	l10n/th_TH/calendar.po
	l10n/th_TH/contacts.po
	l10n/th_TH/core.po
	l10n/th_TH/files.po
	l10n/th_TH/gallery.po
	l10n/th_TH/settings.po
	l10n/tr/calendar.po
	l10n/tr/contacts.po
	l10n/tr/core.po
	l10n/tr/files.po
	l10n/tr/gallery.po
	l10n/tr/settings.po
	l10n/uk/calendar.po
	l10n/uk/contacts.po
	l10n/uk/core.po
	l10n/uk/files.po
	l10n/uk/media.po
	l10n/uk/settings.po
	l10n/zh_CN/calendar.po
	l10n/zh_CN/contacts.po
	l10n/zh_CN/core.po
	l10n/zh_CN/files.po
	l10n/zh_CN/gallery.po
	l10n/zh_CN/settings.po
	l10n/zh_TW/calendar.po
	l10n/zh_TW/contacts.po
	l10n/zh_TW/core.po
	l10n/zh_TW/files.po
	l10n/zh_TW/settings.po
	lib/app.php
	lib/base.php
	lib/connector/sabre/file.php
	lib/connector/sabre/locks.php
	lib/connector/sabre/node.php
	lib/db.php
	lib/filecache.php
	lib/fileproxy/quota.php
	lib/files.php
	lib/filestorage/local.php
	lib/filesystemview.php
	lib/group/database.php
	lib/helper.php
	lib/installer.php
	lib/json.php
	lib/l10n.php
	lib/migrate.php
	lib/mimetypes.fixlist.php
	lib/ocs.php
	lib/preferences.php
	lib/public/json.php
	lib/public/util.php
	lib/template.php
	lib/user.php
	lib/user/database.php
	lib/util.php
	lib/vcategories.php
	ocs/providers.php
	settings/admin.php
	settings/ajax/lostpassword.php
	settings/ajax/removeuser.php
	settings/ajax/setbackgroundjobsmode.php
	settings/ajax/setlanguage.php
	settings/ajax/setquota.php
	settings/ajax/togglegroups.php
	settings/apps.php
	settings/css/settings.css
	settings/js/apps.js
	settings/js/users.js
	settings/l10n/bg_BG.php
	settings/l10n/ca.php
	settings/l10n/cs_CZ.php
	settings/l10n/da.php
	settings/l10n/de.php
	settings/l10n/el.php
	settings/l10n/eo.php
	settings/l10n/es.php
	settings/l10n/et_EE.php
	settings/l10n/eu.php
	settings/l10n/fa.php
	settings/l10n/fi_FI.php
	settings/l10n/fr.php
	settings/l10n/gl.php
	settings/l10n/he.php
	settings/l10n/hr.php
	settings/l10n/hu_HU.php
	settings/l10n/it.php
	settings/l10n/ja_JP.php
	settings/l10n/ko.php
	settings/l10n/lt_LT.php
	settings/l10n/mk.php
	settings/l10n/ms_MY.php
	settings/l10n/nb_NO.php
	settings/l10n/nl.php
	settings/l10n/nn_NO.php
	settings/l10n/pl.php
	settings/l10n/pt_BR.php
	settings/l10n/pt_PT.php
	settings/l10n/ru.php
	settings/l10n/sk_SK.php
	settings/l10n/sl.php
	settings/l10n/sv.php
	settings/l10n/th_TH.php
	settings/l10n/tr.php
	settings/l10n/zh_CN.php
	settings/personal.php
	settings/templates/admin.php
	settings/templates/users.php
2012-08-25 00:05:07 +02:00
Michael Gapczynski d84b1adf34 Dynamically update shared status icon 2012-08-24 15:32:06 -04:00
Michael Gapczynski 0c4575db7a Temporary fix to prevent rename action in root of Shared directory 2012-08-24 15:12:16 -04:00
Michael Gapczynski 7168fa4b05 Add padding to the reshared text 2012-08-24 15:12:16 -04:00
Michael Gapczynski fedb3641f9 Determine if reshare needs to be checked 2012-08-24 15:12:16 -04:00
Thomas Tanghus ee04b626b4 Correct variable name. 2012-08-24 17:23:01 +02:00
Michael Gapczynski 36487246ed Switch to using file cache ids instead of paths for file sharing 2012-08-24 10:05:37 -04:00
Michael Gapczynski cfec290ad9 Prevent resharing in UI if share permission not granted 2012-08-24 10:05:37 -04:00
Michael Gapczynski 3148edbdef Fix shared storage rename. Note: You can only rename shared files/folders that are inside a shared folder, not individual shared files/folders. 2012-08-24 10:01:46 -04:00
jfd 0c0ae928dc escape all identifiers with backticks 2012-08-24 15:08:57 +02:00
Lukas Reschke 63d6884e23 Sanitizing the user input to prevent a reflected XSS. Thanks to Nico Golde (ngolde.de) 2012-08-24 15:00:53 +02:00
Arthur Schiwon eadb894eff Fix deletion for browser that do not support onBeforeUnload, fixes oc-1534 2012-08-24 15:00:53 +02:00
Lukas Reschke 9188d2a844 Add a missing exit(); 2012-08-24 15:00:53 +02:00
Lukas Reschke 4e5291c77a Use SCRIPT_NAME instead of PHP_SELF which won't send the PATH_INFO, this prevents XSS in old browsers. Thanks to Nico Golde. 2012-08-24 15:00:53 +02:00
Georg Ehrke 4d3c45a826 backport 1bccc80996 2012-08-24 15:00:53 +02:00
Frank Karlitschek f86f4c8bfd 4.0.7
and remove some ^M while at it
2012-08-24 15:00:53 +02:00
Lukas Reschke 1d530192b9 Disable user enumeration 2012-08-24 15:00:53 +02:00
Michael Gapczynski 12df81fe0b Check blacklist when renaming files 2012-08-24 15:00:52 +02:00
Lukas Reschke 5cb2d58c9f Also check some other files 2012-08-24 15:00:52 +02:00
Lukas Reschke 9917c611d3 Disable listing of all users 2012-08-24 15:00:52 +02:00
Jakob Sack 1dfa6f3d8f Fix OC_Connector_Sabre_Locks for SQLite 2012-08-24 15:00:52 +02:00
Lukas Reschke 78e8cbd52c Check if webfinger is enabled 2012-08-24 14:58:48 +02:00
Michael Gapczynski ffb55d5a17 Don't return file handle if the mode supports writing and the file is not writable
Conflicts:
	apps/files_sharing/sharedstorage.php
2012-08-24 14:58:48 +02:00
Lukas Reschke 360c22fd28 Validate cookie to prevent auth bypasses. 2012-08-24 14:58:48 +02:00
Lukas Reschke 76e0ca785b Added XSRF check 2012-08-24 14:58:48 +02:00
Lukas Reschke 3644517b01 Missed an "echo" 2012-08-24 14:58:47 +02:00
Lukas Reschke 4f7e4c20d2 Sanitize user input 2012-08-24 14:58:47 +02:00
Thomas Tanghus cb736b42e3 Fix for broken Mail App in OSX Mountain Lion. https://mail.kde.org/pipermail/owncloud/2012-August/004649.html 2012-08-24 14:58:47 +02:00
Bjoern Schiessle 0ac8434670 fix for bug 879 - add parent directory to file cache if it does not exist yet.
For example this can happen if the sync client is used before the user created the root directory (e.g. through web login).
2012-08-24 14:58:47 +02:00
Georg Ehrke 2832311640 fix label for versioning in admin settings 2012-08-24 14:54:17 +02:00
Bart Visscher 5e9f92e5dd Calendar: remove double html encoding 2012-08-24 14:54:17 +02:00
Bart Visscher 646bc1fc24 Contacts: Fix no active Addressbooks 2012-08-24 14:54:16 +02:00
Arthur Schiwon 2af7473651 LDAP: sanitize base, user and group trees. fixes oc-1302 2012-08-24 14:54:16 +02:00
Arthur Schiwon a3b4cb205c Show Login-Button when user+pw are autocompleted, fixes oc-1068 2012-08-24 14:54:16 +02:00
Thomas Tanghus 46d6fd15e4 Implemented sharing api for CalDAV. 2012-08-24 14:26:06 +02:00
Thomas Tanghus d1421ca5ab White-space. 2012-08-24 13:49:56 +02:00
Thomas Tanghus b716296203 Forgot to reenable the export plugin. 2012-08-24 05:04:45 +02:00
Thomas Tanghus 953f9d95f8 Implemented sharing api for CardDAV. Next step CalDAV. 2012-08-24 04:56:21 +02:00
Jenkins for ownCloud 07a889631e [tx-robot] updated from transifex 2012-08-24 02:07:18 +02:00
Thomas Tanghus 2cffcfbc03 Permission checking for shared addressbooks/contacts. 2012-08-23 22:03:36 +02:00
Thomas Tanghus f568ba9c8c Removed redundant __CLASS__ in logging. 2012-08-23 22:03:36 +02:00
Thomas Tanghus fdb4c820d3 Fix for deleting queued contacts. 2012-08-23 22:03:35 +02:00
Thomas Tanghus 394617e0b6 Missing IM variable assignments. 2012-08-23 22:03:35 +02:00
Thomas Tanghus 069d16fdd4 Use correct js class in first-run template. 2012-08-23 22:03:35 +02:00
Thomas Tanghus a3af9f4773 Used non-existing variable. 2012-08-23 22:03:35 +02:00
Thomas Tanghus d5127b14be Return newly created addressbook. 2012-08-23 22:03:35 +02:00
Arthur Schiwon d5c111a984 LDAP: identify (map) users with their directory UUID. Fixes the issue, that usernames for owncloud will change, when the DN changes (which happens rarely, but it happens). 2012-08-23 18:29:43 +02:00
Thomas Tanghus c90c358f0d Only load js and css once. 2012-08-23 05:02:30 +02:00
Thomas Tanghus 2d97164f80 Limit styles so they don't interfere with sharing dropdown. 2012-08-23 05:02:30 +02:00
Thomas Tanghus aefa52018d Use right variable name. 2012-08-23 05:02:30 +02:00
Thomas Tanghus 6941266e7b Remove obsolete closure. 2012-08-23 05:02:30 +02:00
Jenkins for ownCloud 082ed4ab71 [tx-robot] updated from transifex 2012-08-23 02:07:35 +02:00
Thomas Tanghus 99d17c5190 Don't add empty property parameters. 2012-08-23 01:18:59 +02:00
Thomas Tanghus 1df596e758 CSS fix for Windows. 2012-08-23 00:40:10 +02:00
Juan Carlos Cornejo 0944b4455b Moves the lastAction=null outside the if so it can include the undo requests from replace 2012-08-22 17:08:10 -04:00
Juan Carlos Cornejo 24a207a8fa Fixes a bug where if one tries to delete a file, then clicks undo, and then tries to delete the file again, no questions or undo options were presented.
Essentially, just set FileLists.lastAction = null when one clicks undo.
2012-08-22 16:56:00 -04:00
Thomas Tanghus 61c7700ce6 Add support for IMPP properties. 2012-08-22 18:51:17 +02:00
Michael Gapczynski 885b8c481b Check if files_sharing app is enabled, move file specific javascript to files_sharing app 2012-08-22 12:32:07 -04:00
Michael Gapczynski 3debb67458 Move share CSS to core, add script and style from inside Share API 2012-08-22 11:57:58 -04:00
Michael Gapczynski 25d474579a Removing most of files_sharing, the Share API implemented the majority of it 2012-08-22 11:57:58 -04:00
Michael Gapczynski 9699ff03bd Revert using item name, no longer allowing the same item source exist for a user 2012-08-22 11:57:58 -04:00
Arthur Schiwon 536fbb9189 LDAP: fix potentially unavailable LDAP resource, which can prevent successful login 2012-08-22 15:22:52 +02:00
Arthur Schiwon 63c454c7b2 LDAP: make refreshInterval for background jobs configurable in the DB 2012-08-22 12:44:46 +02:00
Arthur Schiwon 056d9adb23 LDAP: bg jobs: sane default refresh interval 2012-08-22 12:44:46 +02:00
Arthur Schiwon c48732987e LDAP: permanantly watch group members. Emit post_addToGroup resp. post_removeFromGroup on membership changes, so that Sharing App can take care of files shared within the groups. Requires and relies on background jobs. 2012-08-22 12:44:46 +02:00
Arthur Schiwon 2b8a2e16ed LDAP: don't pass -1 as length to array slice, when no limit is given. It cuts off the last item. 2012-08-22 12:44:46 +02:00
Thomas Tanghus ac9fd79329 Email type list wasn't initialized. 2012-08-22 12:40:35 +02:00
Thomas Tanghus 78b7e28ce0 Removed unused variable. 2012-08-22 12:40:35 +02:00
Thomas Tanghus 5c1dd82998 Minor layout change. 2012-08-22 12:40:35 +02:00
Jenkins for ownCloud e6d87b2c4b [tx-robot] updated from transifex 2012-08-22 02:08:16 +02:00
Frank Karlitschek 1d7018158e 4.5 alpha 1 2012-08-21 18:47:26 +02:00
Michael Gapczynski 53350b2f19 Remove unnecessary file 2012-08-21 10:33:20 -04:00
Frank Karlitschek 1cfa831239 A first basic presentation app based on the amazing impress.js.
You have to put a presentation file that contains the presentation defined in html into your ownCloud with the file extension .impress
Then you can use this app to play it. It also contains a demo presentation that you can use to learn.
Help is welcome to improve this app. :-)
2012-08-21 14:44:23 +02:00
Thomas Tanghus 25dd0e940f Preliminary support for Apple X-ABLabel. Also for oc-1508. 2012-08-21 03:57:48 +02:00
Thomas Tanghus 8d38dc04a0 Remove class contactsection 2012-08-21 03:57:48 +02:00
Michael Gapczynski 68f5dc2a44 Remove unnecessary files 2012-08-20 21:22:23 -04:00
Michael Gapczynski 09e851a9c4 Fix share ajax calls to use itemName/itemSource, show who shared a file with you 2012-08-20 21:22:22 -04:00
Michael Gapczynski 49229da0e1 Remove setTarget from ajax 2012-08-20 21:22:22 -04:00
Jenkins for ownCloud b819aa33f7 [tx-robot] updated from transifex 2012-08-21 02:09:12 +02:00
Thomas Tanghus 1e42cd162e Added types to emails. Support for custom types. Partial fix for oc-1508. 2012-08-21 00:20:18 +02:00
Thomas Tanghus 719ae155db Try to align and float contact parts better. 2012-08-21 00:20:18 +02:00
Arthur Schiwon ef3eebfd3e Fix deletion for browser that do not support onBeforeUnload, fixes oc-1534. 2012-08-20 17:24:10 +02:00
Michael Gapczynski cb0464ca4e Bump version number for Share API 2012-08-19 22:36:19 -04:00
Michael Gapczynski 82d81e8d39 Merge branch 'share_api'
Conflicts:
	apps/contacts/lib/vcard.php
	apps/files/index.php
	lib/files.php
2012-08-19 22:29:01 -04:00
Michael Gapczynski 5eca531f99 Refactor again so we can tell what item is being reshared in case the same source shows up. This is the end of the share_api branch, moving to master. 2012-08-19 22:14:38 -04:00
Jenkins for ownCloud f893d21660 [tx-robot] updated from transifex 2012-08-20 02:03:51 +02:00
Jenkins for ownCloud 36474e5681 [tx-robot] updated from transifex 2012-08-20 02:01:32 +02:00
Michael Gapczynski f987e22d85 Large refactoring to allow for the same item to be shared to a group and again with a user in the group with different permissions 2012-08-19 16:30:38 -04:00
Thomas Tanghus 2d3ec5cb4b Removed stray img element. 2012-08-19 17:05:45 +02:00
Thomas Tanghus 4946e23bdc Strip slashes from commas and semi-colons. 2012-08-19 16:32:32 +02:00
Robin Appelman a4e840f4f1 improve hasUpdated for archive storage backend 2012-08-19 06:29:57 +02:00
Robin Appelman 758ebe0446 don't report ctime in the archive storage backend since it isn't reliable 2012-08-19 06:18:40 +02:00
Robin Appelman 7f6a037b8c small fix for normalizing paths in archives 2012-08-19 06:15:33 +02:00
Robin Appelman 50cc5d5921 fix creating nested folders inside tar files 2012-08-19 05:54:16 +02:00
Robin Appelman 808d6c58fe ensure proper result format when using opendir on the archive storage backend 2012-08-19 05:45:55 +02:00
Robin Appelman 2ea46ee1ca better file_get_contents, file_put_contents and toTmpFile for archive storage backend 2012-08-19 05:05:55 +02:00
Robin Appelman 3da1339cd8 fix error when adding string data to an archive 2012-08-19 05:04:58 +02:00
Robin Appelman 154ce0f68d also add getLocalFolder to OC_Filsystem and OC_FilesystemView 2012-08-19 02:42:15 +02:00
Robin Appelman 9b44d0cb32 add OC_FileStorage::getLocalFolder 2012-08-19 02:30:33 +02:00
Robin Appelman eb42148210 fix error in check if app is installed 2012-08-18 23:15:38 +02:00
Robin Appelman 5962469892 add OC_Archive::addRecursive 2012-08-18 22:42:35 +02:00
Lukas Reschke d54390b1a0 Optimized image size 2012-08-18 13:56:04 +02:00
Lukas Reschke 6ef5edf5ea Use SCRIPT_NAME instead of PHP_SELF which won't send the PATH_INFO, this prevents XSS in old browsers. Thanks to Nico Golde. 2012-08-18 09:30:01 +02:00
Jenkins for ownCloud f1cabdd8e0 [tx-robot] updated from transifex 2012-08-18 02:04:07 +02:00
Thomas Tanghus c3cd49926a Merge commit 'refs/merge-requests/139' of git://gitorious.org/owncloud/owncloud into merge-requests/139 2012-08-18 00:40:29 +02:00
Georg Ehrke 41639f0517 fix fail in sql query of isDuplicate method of OC_Calendar_Import 2012-08-17 21:29:26 +02:00
Georg Ehrke 44272b9889 increase margin top of calendar import's color picker 2012-08-17 20:48:47 +02:00
Georg Ehrke ced234a81a rename subadmin to group admin 2012-08-17 16:00:24 +02:00
Frank Karlitschek 850ee93711 add impress mimetype 2012-08-17 12:39:05 +02:00
Jenkins for ownCloud 017d8b410a [tx-robot] updated from transifex 2012-08-17 02:02:51 +02:00
Robin Appelman 53a888cc81 more path normalization 2012-08-17 01:22:54 +02:00
Jenkins for ownCloud 70e8a7e25c [tx-robot] updated from transifex 2012-08-17 00:45:46 +02:00
Anders Nor Berle b6a3bf154d Comment out javascript that hides login button
It has been reported problems with the javascript that hides the
login button so jancborchardt okayed that I made this change.
2012-08-16 20:55:10 +00:00
Michael Gapczynski df8a2e5361 File sharing cleanup, works perfectly I think :) 2012-08-16 12:20:14 -04:00
Jenkins for ownCloud 1e6dc67517 [tx-robot] updated from transifex 2012-08-16 02:09:15 +02:00
Thomas Tanghus 4c638f101e Merge addressbooks. 2012-08-16 00:25:32 +02:00
Michael Gapczynski 9cb3113f42 Fix problems exposed by tests 2012-08-15 11:59:08 -04:00
Michael Gapczynski 137e4cb342 Add tests for Share API, all tests passing :) 2012-08-15 11:55:54 -04:00
Bart Visscher dd3208fe6f Fix webfinger documentation 2012-08-15 14:50:25 +02:00
Jenkins for ownCloud da3896808a [tx-robot] updated from transifex 2012-08-15 02:07:20 +02:00
Michael Gapczynski ddfa760a5e Change to correct function call getItemSharedWithBySource() 2012-08-14 17:06:41 -04:00
Michael Gapczynski b440dfc67e Remove setTarget() function, changing target names only leads to confusion 2012-08-14 17:05:38 -04:00
Michael Gapczynski 9661a63a72 Ensure permissions can't be escalated during a reshare 2012-08-14 16:54:38 -04:00
Michael Gapczynski 028c79fc9d Use if instead of switch for detecting share type and throw exceptions when setting permissions 2012-08-14 16:30:13 -04:00
Thomas Tanghus a75870489c Use correct class. 2012-08-14 20:06:45 +02:00
Lukas Reschke db5b995a6b Disable user enumeration 2012-08-14 17:23:26 +02:00
Michael Gapczynski 937d1b29d8 Retrieve all file dependent items when looking for file item type 2012-08-14 11:02:29 -04:00
Michael Gapczynski 4c7fd8cd01 Merge branch 'master' into share_api
Conflicts:
	lib/group.php
	lib/group/backend.php
	lib/group/database.php
	lib/group/interface.php
	lib/public/user.php
	lib/user.php
	lib/user/backend.php
	lib/user/database.php
	lib/user/interface.php
2012-08-14 10:22:13 -04:00
Arthur Schiwon 62e4f55f72 LDAP: adjust usersInGroup to updated interface 2012-08-14 14:30:03 +02:00
Arthur Schiwon 3c1380b093 LDAP: adjust getGroups to updated interface 2012-08-14 14:22:05 +02:00
Arthur Schiwon 452f55e163 adjust LDAP to updated interface 2012-08-14 14:14:20 +02:00
Robin Appelman 1522f7f211 fix some minor problems with path noramlization 2012-08-14 03:07:14 +02:00
Robin Appelman 0c8ce0bb32 some basic path normalization 2012-08-14 02:44:45 +02:00
Jenkins for ownCloud c312171252 [tx-robot] updated from transifex 2012-08-14 02:03:22 +02:00
Jenkins for ownCloud 19446fb22f [tx-robot] updated from transifex 2012-08-13 23:19:31 +02:00
Michael Gapczynski 830676b475 Improve usability for configuring Dropbox and Google Drive external storage 2012-08-13 17:10:58 -04:00
Michael Gapczynski d3bdab286b Suggest mount point name, don't reload custom javascript file 2012-08-13 17:10:58 -04:00
Michael Gapczynski 98c7d40fcd Throw exception in Dropbox and Google Drive storage constructors if parameters are not correct 2012-08-13 17:10:58 -04:00
Michael Gapczynski 863d3a43b2 Catch exceptions and write to log when creating storage object fails 2012-08-13 17:10:58 -04:00
Michael Gapczynski 7f12a65c24 Show access granted label immediately after granting access 2012-08-13 17:10:58 -04:00
Michael Gapczynski 0e6d22e25f Prevent editing Dropbox configuration input after access granted 2012-08-13 17:10:58 -04:00
Michael Gapczynski b6b2f8826b Show access granted label next to Google Drive and Dropbox storage in configuration 2012-08-13 17:10:58 -04:00
Michael Gapczynski be32625fcc Fix remove button display for external storage 2012-08-13 17:10:58 -04:00
Thomas Mueller 53f117c01a l10n directories have been missing 2012-08-13 23:10:10 +02:00
Thomas Tanghus d303763d1f Automatically check radio when new addressbook fields get focus. 2012-08-13 15:07:15 +02:00
Lukas Reschke e72a57f595 Also check for some other files 2012-08-13 00:57:01 +02:00
Thomas Mueller 3e504cf894 translation resources added and updated 2012-08-13 00:47:40 +02:00
Thomas Mueller 7ffd95e56d translation resources added and updated 2012-08-13 00:30:45 +02:00
Bart Visscher 758f476fe3 Calendar: remove not used style rules 2012-08-12 22:40:36 +02:00
Bart Visscher 73b1b68fff Rewrite remoteStorage settings, remove block echo 2012-08-12 22:30:13 +02:00
Bart Visscher ab8e7f1da3 Remove unused gallery template 2012-08-12 22:30:13 +02:00
Bart Visscher cb71996008 Change image links to use imagePath function 2012-08-12 22:30:13 +02:00
Michael Gapczynski 64ef1e2181 Change name of share function to shareItem, silly PHP 5.3.1 thinking it is a constructor... 2012-08-12 14:49:41 -04:00
Thomas Tanghus 329bc28d06 Commented out unused(?) class that interfered with appsettings. 2012-08-12 18:44:18 +02:00
Thomas Tanghus eb516b79b6 Position appsettings fixed and load it in dynamically added element. 2012-08-12 18:42:54 +02:00
Thomas Tanghus 7113e80184 Readded refresh param. 304 and ETag is still sent so shouldn't matter. 2012-08-12 17:30:09 +02:00
Jakob Sack 4d3d4522f9 Backgroundjobs: Fix wrong var names 2012-08-12 12:14:27 +02:00
Jakob Sack deef1f73db Backgroundjobs: fix bug in QueuedTask 2012-08-12 09:02:20 +02:00
Jenkins for ownCloud 355a1adb3a [tx-robot] updated from transifex 2012-08-12 02:04:58 +02:00
Jakob Sack 0c69e64b86 Backgroundjobs: Fix template 2012-08-12 00:44:25 +02:00
Jakob Sack 2bc8d3e5d6 Backgroundjobs: interface improvements 2012-08-12 00:37:14 +02:00
Michael Gapczynski a5a5ab2318 Add type text to new user, fixes display issue 2012-08-11 16:29:41 -04:00
Michael Gapczynski 651245effa Use limit and offset for subadmin users 2012-08-11 16:25:28 -04:00
Michael Gapczynski a1c88a3e39 Add search, limit, offset parameters to usersInGroups() 2012-08-11 16:25:28 -04:00
Michael Gapczynski 4f1b3631ba Change limit parameter in OC_User as well 2012-08-11 16:25:28 -04:00
Michael Gapczynski 400533af2c Start with 30 users, this fills my screen 2012-08-11 16:25:27 -04:00
Michael Gapczynski 874f31b8d7 Make getting all users and groups the default 2012-08-11 16:25:27 -04:00
Michael Gapczynski 9d2ae5fa1f Add infinite scrolling to Settings -> Users, still a little buggy 2012-08-11 16:25:27 -04:00
Michael Gapczynski 8d1eb674ec Add search, limit, and offset parameters to getUsers() and getGroups() 2012-08-11 16:25:27 -04:00
Michael Gapczynski baa0b4d530 Cast subadmin groups as strings 2012-08-11 16:25:27 -04:00
Lukas Reschke 5b16c7a25d This is unnessecary because we already run htmlentities() over the template engine 2012-08-11 20:53:56 +02:00
Jakob Sack bd90b7eaca Backgroundjobs: Fix bug in admin interface 2012-08-11 17:37:53 +02:00
Jakob Sack 1d7e3071e0 bump version to reate new tables 2012-08-11 17:32:17 +02:00
Jakob Sack bf7afa28d5 Backgroundjobs: cron.php now checks for mode=="none" 2012-08-11 17:18:49 +02:00
Lukas Reschke 0d8df3f55c Revert "Combine install checks in lib/base.php"
This reverts commit aa9fbf6639.
2012-08-11 17:07:35 +02:00
Michael Gapczynski 465767670b Check blacklist when renaming files 2012-08-11 11:04:04 -04:00
Jenkins for ownCloud 39b9052c2f [tx-robot] updated from transifex 2012-08-11 02:05:58 +02:00
Lukas Reschke d3427be5e4 Following the code guidelines makes Michael happy :-) 2012-08-10 22:20:32 +02:00
Lukas Reschke 85f2e737a4 Disable listening, instead checking the ACL to prevent DoS 2012-08-10 22:18:08 +02:00
Lukas Reschke 11895a86b0 Activate ACLs 2012-08-10 22:02:04 +02:00
Lukas Reschke 8ec45870a3 Validate cookie properly and prevent auth bypass
BIG (!) thanks to Julien CAYSSOL
2012-08-10 15:28:59 +02:00
Bart Visscher fb493c45dd Calendar: update share backend using contacts backend as template 2012-08-10 14:40:48 +02:00
Bart Visscher 6a95e4288e Contacts: Check format parameter 2012-08-10 14:40:43 +02:00
Bart Visscher 6d971d3b1d Contacts: Better parameter names in addressbook share backend 2012-08-10 14:32:54 +02:00
Jakob Sack 0de81f9dad Backgroundjobs: don't execute cron.php if owncloud has not been installed 2012-08-10 14:03:26 +02:00
Jakob Sack 0ea4fa298c Backgroundjobs: don't try to access OC_Appconfig if ownCloud has not been installed 2012-08-10 13:53:40 +02:00
Jakob Sack 81b997b56e Merge branch 'backgroundjobs' 2012-08-10 13:00:51 +02:00
Bart Visscher 82b10954e7 Simplify loading app php script files 2012-08-10 12:27:37 +02:00
Bart Visscher 5e7086adc9 Move login handling to OC class 2012-08-10 12:17:13 +02:00
Bart Visscher 1823dafe44 Remove checks before displaying login page
At that point the checks are already done before
2012-08-10 12:09:19 +02:00
Bart Visscher 83403784d1 Always load when the requested file is css 2012-08-10 11:43:04 +02:00
Bart Visscher da07245f59 Move OC::loadfile and OC::loadapp next to OC::handleRequest 2012-08-10 11:43:04 +02:00
Bart Visscher e3c732040b Make OC::loadfile and OC::loadapp protected, only used in OC::handleRequest 2012-08-10 11:43:04 +02:00
Bart Visscher 0973969386 Cleanup OC::loadfile 2012-08-10 11:43:04 +02:00
Bart Visscher 667cd318fe Use OC_Util::displayLoginPage and cleanup the function 2012-08-10 11:43:04 +02:00
Bart Visscher aa9fbf6639 Combine install checks in lib/base.php 2012-08-10 11:43:04 +02:00
Lukas Reschke e73292339f Check if webfinger is enabled 2012-08-10 10:01:56 +02:00
Jakob Sack 9ad31e5f81 Backgroundjobs: use correct var name in template 2012-08-10 01:44:38 +02:00
Jakob Sack 7c766cdfe0 Backgroundjobs: fix bugs in template 2012-08-10 01:42:30 +02:00
Thomas Tanghus 2c5ab91c7d Used wrong class. 2012-08-10 01:39:05 +02:00
Jakob Sack 7055d2aa2b Backgroundjobs: improve admin form 2012-08-10 01:36:33 +02:00
Jakob Sack 595591a460 Backgroundjobs: Add table to db_structure.xml 2012-08-10 01:30:08 +02:00
Lukas Reschke 2dfc485149 XSRF checks 2012-08-10 00:44:35 +02:00
Lukas Reschke 334296b027 Removed unused file 2012-08-10 00:09:00 +02:00
Lukas Reschke ab97c04894 Added XSRF check 2012-08-10 00:09:00 +02:00
Jakob Sack 831ec985db Backgroundjobs: fix stupid bug 2012-08-09 23:52:48 +02:00
Jakob Sack 7b3c35107d Error handling works better now 2012-08-09 23:49:20 +02:00
Thomas Tanghus 26a9d7ea71 Fixed 3 - THREE - errors in one method call :-P 2012-08-09 23:16:07 +02:00
Jakob Sack f46fdfd814 Backgroundjobs: Add reset counter in worker 2012-08-09 22:30:11 +02:00
Jakob Sack 66511469e0 Backgroundjobs: Improve error handling in cron.php 2012-08-09 22:22:43 +02:00
Lukas Reschke 5f51366435 Sanitzing user input 2012-08-09 22:14:09 +02:00
Jakob Sack a6a1f892f0 BackgroundJobs: fix bug 2012-08-09 22:07:18 +02:00
Arthur Schiwon 7780e37f38 LDAP: don't give Test Connection button red background on fail, it is becoming unreadable 2012-08-09 21:42:35 +02:00
Jakob Sack 2b5f005547 Backgroundjobs: Forgot to require lib/base.php 2012-08-09 21:29:45 +02:00
Michael Gapczynski be03ee29f0 Bump up version number 2012-08-09 13:55:36 -04:00
Michael Gapczynski 3b13051f7a Additional permission checks for editing and deleting contacts 2012-08-09 13:54:59 -04:00
Jakob Sack 28c1ec19ea BackgroundJob: forgot to rename file 2012-08-09 19:26:49 +02:00
Jakob Sack ceda0ae052 Backgroundjobs: rename ScheduledTask to QueuedTask 2012-08-09 19:04:04 +02:00
Thomas Tanghus b2c58bf5a6 Fix for broken Mail App in OSX Mountain Lion. https://mail.kde.org/pipermail/owncloud/2012-August/004649.html 2012-08-09 17:49:45 +02:00
Georg Ehrke 7955120aed remove debug code from calendar - thanks michael for pointing that out :) 2012-08-09 17:39:16 +02:00
Michael Gapczynski 78cd1153f0 Merge branch 'master' into share_api
Conflicts:
	apps/contacts/lib/vcard.php
	apps/files_sharing/sharedstorage.php
2012-08-09 11:38:22 -04:00
Georg Ehrke 6e922035e1 add SabreDav 1.6.4 2012-08-09 17:34:19 +02:00
Georg Ehrke 4e85848c92 remove SabreDav 1.6.3 2012-08-09 17:34:18 +02:00
Thomas Tanghus f9cec1426f Change parameter name and update docs. 2012-08-09 17:04:14 +02:00
Robin Appelman acd8381094 fix scanning of archives in some cases 2012-08-09 16:36:16 +02:00
Thomas Tanghus 39814edf81 Another take at profile photo/thumbnail caching. oc-839. 2012-08-09 16:32:05 +02:00
Georg Ehrke 00d7ae8319 move calendar settings from personal settings to in app settings 2012-08-09 12:37:26 +02:00
Georg Ehrke 10d0861872 remove unstable lib 2012-08-09 12:37:26 +02:00
Thomas Tanghus d24582503a Fix require statements. Fix for oc-1460. 2012-08-09 11:35:14 +02:00
Jakob Sack 1ce2cd73ff Add first version of backgroundjobs settings 2012-08-09 10:41:10 +02:00
Jakob Sack 889f0a1c6d rename appconfig keys for backgroundjobs 2012-08-09 10:40:39 +02:00
Michael Gapczynski b830b3e24b Start adding permission checks for addressbooks 2012-08-08 21:43:02 -04:00
Michael Gapczynski 2c5744f16c Add back getItemSharedWithBySource(), some situtations require this ability 2012-08-08 20:56:55 -04:00
Jenkins for ownCloud f4ab2ba115 [tx-robot] updated from transifex 2012-08-09 02:03:19 +02:00
Jakob Sack 37ee88aa6d Fixed bug in OC_BackgroundJob_Worker 2012-08-09 01:29:15 +02:00
Michael Gapczynski f4285a25ef Don't include shared addressbook if source not found 2012-08-08 19:12:59 -04:00
Jakob Sack 13a0818fec Be more precise regarding backgroundjobs mode 2012-08-09 01:02:05 +02:00
Jakob Sack 7fa896971f JavaScript file for activating web cron 2012-08-09 00:58:54 +02:00
Jakob Sack 14cbb8724c Add "cron.php" for background jobs. It is named cron.php because more people will recognize the purpose of the file then. 2012-08-09 00:48:36 +02:00
Jakob Sack 4107273a79 fix license text 2012-08-09 00:46:50 +02:00
Jakob Sack 088b3ea0bc Add public interface to background jobs 2012-08-09 00:01:06 +02:00
Jakob Sack 443e198224 Renaming backgroundjobs on file system as well 2012-08-09 00:00:12 +02:00
Jakob Sack 6025d2ebc3 Rename Backgroundjobs to BackgroundJob 2012-08-08 23:59:30 +02:00
Michael Gapczynski d02b0e39b2 Fix issues with hiding and showing dropdown 2012-08-08 17:50:09 -04:00
Jakob Sack 4f90860001 Add initial version of backgroundjobs library 2012-08-08 23:39:30 +02:00
Bart Visscher 3387454094 Move login code from index.php to OC class 2012-08-08 22:42:51 +02:00
Bart Visscher 9156fb73fd Move handling request of index.php to OC class 2012-08-08 22:42:50 +02:00
Bart Visscher 10cfcd4ff0 Remove useless setting of RUNTIME_NOAPPS 2012-08-08 22:42:50 +02:00
Bart Visscher 7522a23693 Remove unused RUNTIME_NOSETUPFS var 2012-08-08 22:42:50 +02:00
Michael Gapczynski a22f30fb78 Reset item shares variable, fixes autocomplete not showing people 2012-08-08 11:39:00 -04:00
Michael Gapczynski 05648dac61 Don't return file handle if the mode supports writing and the file is not writable 2012-08-08 11:25:24 -04:00
Bjoern Schiessle 0bf2a3e6d6 while loop not needed because of recursive call of put() 2012-08-08 11:29:44 +02:00
Bjoern Schiessle dc927bd346 fix for bug 879 - add parent directory to file cache if it does not exist yet.
This can happen if the sync client is used before user created the root directory (e.g. through web login) for example.
2012-08-08 10:51:19 +02:00
Michael Gapczynski b1a7e30819 Actually change background image of shared items 2012-08-07 21:23:55 -04:00
Bart Visscher 35a1738a39 Use new sharing API in OC_Calendar_Share::allSharedwithuser 2012-08-07 23:31:06 +02:00
Bart Visscher d4882df8cb Fix warnings and better styling 2012-08-07 23:29:56 +02:00
Bart Visscher 1b5c8ff471 Don't return error when just no sharing found 2012-08-07 23:29:01 +02:00
Bart Visscher 1e644b5a53 Add Event share backend 2012-08-07 23:27:06 +02:00
Bart Visscher b287b11ff2 adjust the query generation in getItems, to use placeholders 2012-08-07 21:49:31 +02:00
Michael Gapczynski 9580d0ef29 Initial calendar sharing backend 2012-08-07 14:57:52 -04:00
Michael Gapczynski 3533f43d12 Implement groupExists in group database backend 2012-08-07 14:48:55 -04:00
Bart Visscher 31003b475e Decode the alternative path_info 2012-08-07 20:43:00 +02:00
Bart Visscher 7d20e98aec Move getting the path info to OC_Request 2012-08-07 20:43:00 +02:00
Bart Visscher 95031cb139 remoteStorage: Use OCP\\Util for redirecting for login and generating link 2012-08-07 20:43:00 +02:00
Bart Visscher 4e6b4b265b remoteStorage: split auth allow template 2012-08-07 20:43:00 +02:00
Bart Visscher 34c076e2a8 Add comments the other functions in OC_Request 2012-08-07 20:43:00 +02:00
Bart Visscher 99ce7ba1df Move serverHost and serverProtocol functions to OC_Request 2012-08-07 20:43:00 +02:00
Bart Visscher c4f1a1de5b Added function to make url absolute 2012-08-07 20:43:00 +02:00
Bart Visscher 6d0390dcca Fix rewriting GET parameters with ? in REQUESTEDAPP 2012-08-07 20:43:00 +02:00
Michael Gapczynski 8d56c42fde Add search and limit to getGroups search in groupExists implementation 2012-08-07 14:42:11 -04:00
Michael Gapczynski b6bbbb4c47 Remove undefined return variable 2012-08-07 14:38:02 -04:00
Michael Gapczynski 0ddfc94cf5 Try to fix last commit 2012-08-07 14:34:29 -04:00
Michael Gapczynski 5e2ef1e918 Check if itemShares share type is an array instead of set, javascript likes to set indexes to 'undefined' 2012-08-07 14:11:48 -04:00
Michael Gapczynski b6b713eb76 Only show the user's groups in the share with autocomplete 2012-08-06 20:43:08 -04:00
Jenkins for ownCloud a9f894ce11 [tx-robot] updated from transifex 2012-08-07 02:07:50 +02:00
Thomas Tanghus 2eac79b782 Some UI improvements on the addressbooks settings. 2012-08-07 00:06:18 +02:00
Michael Gapczynski de7f48b050 Check if New and Upload buttons exist before adding their width to the total breadcrumbs width 2012-08-06 17:37:10 -04:00
Michael Gapczynski 7c0a5d4a59 Check if New and Upload buttons exist before adding their width to the total breadcrumbs width 2012-08-06 17:35:22 -04:00
Michael Gapczynski a96a75c263 Select the correct column when searching for similar targets 2012-08-06 16:48:20 -04:00
Michael Gapczynski 5e95e2a131 Set filePath variable 2012-08-06 16:46:44 -04:00
Michael Gapczynski 1b21cde2b3 Throw more exceptions 2012-08-06 16:37:51 -04:00
Michael Gapczynski 3be4f5f2f1 Sharing backends for contacts and addressbooks 2012-08-06 16:11:03 -04:00
Michael Gapczynski 51ddc44b62 Somewhat fixes dropdown display issues in the contacts app 2012-08-06 15:43:20 -04:00
Michael Gapczynski 14d13a740f Load icons for addressbooks, fix statuses for types other than files 2012-08-06 15:24:08 -04:00
Michael Gapczynski 03d65af5dc Add share action back into addressbook settings, bump up z-index of dropdown so the autocomplete list is visible 2012-08-06 15:09:01 -04:00
Michael Gapczynski 6f83540dd6 Remove person from array after unshare, so name appears in autocomplete again 2012-08-06 14:45:45 -04:00
Michael Gapczynski 83117445ac Fix offset for folder detection, no longer including '/Shared' in file target path 2012-08-06 14:33:47 -04:00
Michael Gapczynski e954de6030 Make the file source path relative earlier 2012-08-06 14:15:37 -04:00
Michael Gapczynski e280e3ecc9 Throw more exceptions 2012-08-06 14:09:58 -04:00
Michael Gapczynski 1db1d40414 Add additional check for post_deleteUser so we don't delete any non-user shares with the same name 2012-08-06 13:58:26 -04:00
Michael Gapczynski ea23854328 Merge branch 'master' into share_api
Conflicts:
	apps/contacts/lib/app.php
	apps/contacts/templates/part.chooseaddressbook.rowfields.php
2012-08-06 13:49:54 -04:00
Michael Gapczynski ba0cf98175 Remove extra line, caused 'headers already sent' issues 2012-08-06 13:33:53 -04:00
Michael Gapczynski 4f10574065 Don't load item if it doesn't have it status set 2012-08-06 13:30:44 -04:00
Bart Visscher fe6450002d Change hardcoded urls to use linkTo function 2012-08-06 18:51:41 +02:00
Michael Gapczynski 2554f674de Database scheme for share API 2012-08-06 12:22:47 -04:00
Michael Gapczynski 3b2c853916 Lots of refactoring to share API 2012-08-06 11:27:13 -04:00
Arthur Schiwon e6759a980b LDAP: layout settings form. Hope it is now a bit clearer and prettier. 2012-08-06 17:25:59 +02:00
Jenkins for ownCloud 9ca8d20a99 [tx-robot] updated from transifex 2012-08-06 02:02:50 +02:00
Arthur Schiwon 95c33e466c LDAP: offer option to disable SSL certificate checks. Works around problems with self-signed certificates, for example. However, the best and right way to solve it is always to import the LDAP server cert to the owncloud server, so you it for testing only.
Like to hear wether it works, instead appending LDAPTLS_REQCERT=never to ldap.conf.
2012-08-05 23:00:47 +02:00
Arthur Schiwon 6fd48675e6 remove accidentally added blank lines 2012-08-05 22:03:47 +02:00
Arthur Schiwon c10010e410 LDAP: check for always available attribute on userExists, fixes oc-1440 2012-08-05 22:02:34 +02:00
Arthur Schiwon c3cbb463e3 add missing \ 2012-08-05 21:35:37 +02:00
Arthur Schiwon d546718179 LDAP: sanitize user and group base trees for strripos comparison. fixes oc-1302 2012-08-05 21:28:59 +02:00
Jenkins for ownCloud 6fbc4f712a [tx-robot] updated from transifex 2012-08-05 19:02:23 +02:00
Thomas Tanghus 80ca883d4c Correct path to ajax file. 2012-08-05 03:36:16 +02:00
Thomas Tanghus 07fd517fda Make 3rd party label a bit smaller. 2012-08-05 02:54:18 +02:00
Thomas Tanghus a138b4d04e Some more pixel pushing. 2012-08-05 01:57:13 +02:00
Thomas Tanghus ce866a5bdb CSS tweaks for app settings. 2012-08-05 01:42:17 +02:00
Thomas Tanghus c6b337c3dd Return possibly changed appid. 2012-08-05 01:42:17 +02:00
Thomas Tanghus cc445e4e47 Small changes to allow updating main menu dynamically. 2012-08-05 01:42:17 +02:00
Tom Needham 538e72fe61 Fix scrollbar issue. Fixes oc-1414 2012-08-04 23:30:28 +00:00
Thomas Tanghus 97853a1ae5 Restructure JS code and small fixes. 2012-08-04 23:48:36 +02:00
Michael Gapczynski f95ca36b49 Listen to correct undo click for undoing deleting users 2012-08-04 17:03:36 -04:00
Michael Gapczynski 1ec27399a7 Show delete tipsy for users 2012-08-04 17:00:16 -04:00
Michael Gapczynski 002ad4ba16 Tweak users delete notification 2012-08-04 16:44:26 -04:00
Michael Gapczynski 086397d8a1 Fix condition checking for resizing breadcrumbs 2012-08-04 15:57:49 -04:00
Michael Gapczynski 207ca3ec06 Dynamically resize breadcrumbs, fix for bug oc-468 2012-08-04 15:50:32 -04:00
Thomas Tanghus 3b37181550 Use correct variable name. 2012-08-04 21:25:41 +02:00
Thomas Tanghus f17876d093 Remove unused code. 2012-08-04 21:25:41 +02:00
Alessandro Cosentino 95fc7f4cb7 Merge branch 'master' of gitorious.org:owncloud/owncloud 2012-08-04 14:35:27 -04:00
Alessandro Cosentino 84aa7c7b54 link of Add your app was broken 2012-08-04 14:34:57 -04:00
Thomas Tanghus e1d4f85102 Wait with csrf check for now. 2012-08-04 20:26:28 +02:00
Thomas Tanghus d19803654f And add the file goddammit 2012-08-04 20:25:20 +02:00
Thomas Tanghus 24af2e8078 Load OCS apps in an ajax call to avoid blocking the WUI. 2012-08-04 20:16:32 +02:00
Alessandro Cosentino a6ce497dd9 OC_App::getAppVersion return blank if version is not specified 2012-08-04 13:39:36 -04:00
Alessandro Cosentino 226af11f33 reset version number when not specified - again bug oc-1433 2012-08-04 13:08:55 -04:00
Georg Ehrke da4057ecfd fix label for versioning in admin settings 2012-08-04 18:51:09 +02:00
Alessandro Cosentino 627ea9efe4 fixes bug oc-1433 2012-08-04 12:39:23 -04:00
Georg Ehrke 1bccc80996 hide morelog button if there are no more log entries - bugfix for oc-1398 2012-08-04 17:38:31 +02:00
Jenkins for ownCloud d7e77f6426 [tx-robot] updated from transifex 2012-08-04 02:04:21 +02:00
Thomas Tanghus bef63527ce Reorganize ajax scripts. 2012-08-03 21:32:27 +02:00
Thomas Tanghus 3610975bc1 Some fixes for keyboard shortcuts. 2012-08-03 21:32:27 +02:00
Thomas Tanghus e3de746bb6 FF complained about missing charset. 2012-08-03 21:32:27 +02:00
Thomas Tanghus 578e074c00 White space. 2012-08-03 21:32:27 +02:00
Thomas Tanghus 98057dba5b Revert "Removed text/plain header."
This reverts commit fa6d26b53c.
2012-08-03 21:32:27 +02:00
Michael Gapczynski 09bb3bfaf8 Preparing for proper collection implementation 2012-08-03 15:05:45 -04:00
Georg Ehrke fc4a542dd0 add iWork mimetypes 2012-08-03 20:06:29 +02:00
Bart Visscher b12ed88794 Calendar: remove double html encoding 2012-08-03 16:18:33 +02:00
Bart Visscher 599741bdd6 audit: update appinfo to OC4 2012-08-03 16:05:48 +02:00
Bart Visscher e36e00dc00 Merge branch 'chunked_upload' 2012-08-03 15:58:17 +02:00
Arthur Schiwon c5d5ca88a8 Show Login-Button when user+pw are autocompleted, fixes oc-1068 2012-08-03 13:15:15 +02:00
Jenkins for ownCloud 7dc799c167 [tx-robot] updated from transifex 2012-08-03 02:04:12 +02:00
Thomas Tanghus 7dda5527f1 Return properly formatted jsondata. 2012-08-02 19:03:45 +02:00
Thomas Tanghus d07f4a5ea8 Correct namespace usage. 2012-08-02 19:03:06 +02:00
Thomas Tanghus 40d2bb70d7 Remove logging 2012-08-02 19:01:55 +02:00
Thomas Tanghus 8f3357c305 I was a bit too fast in removing methods yesterday... 2012-08-02 18:57:03 +02:00
Thomas Tanghus a484ee817c If first addressbook was empty it was seen as if there where no contacts at all. 2012-08-02 18:50:20 +02:00
Thomas Tanghus a1239a37aa Line length... 2012-08-02 05:02:36 +02:00
Thomas Tanghus 30c3a783d9 Remove onunload handler when delete is cancelled. 2012-08-02 05:01:54 +02:00
Thomas Tanghus 20f8971222 Use popup class style for ninja-mode help. 2012-08-02 04:18:44 +02:00
Thomas Tanghus f84e92e6e3 More files to delete \o/ 2012-08-02 04:18:44 +02:00
Thomas Tanghus 937058cdec Updated JS namespace. 2012-08-02 04:18:44 +02:00
Michael Gapczynski 6c7baacf89 Throw exception for items already shared in a collection 2012-08-01 20:08:18 -04:00
Jenkins for ownCloud 91e828c6ce [tx-robot] updated from transifex 2012-08-02 02:06:16 +02:00
Michael Gapczynski 26e406c3c0 Hide 'can edit' if not checked 2012-08-01 18:03:00 -04:00
Thomas Tanghus f159f607de And then the missing files ;) 2012-08-02 00:02:07 +02:00
Thomas Tanghus a8faae4f42 Addressbooks settings rewrite and cleanup. 2012-08-02 00:02:07 +02:00
Michael Gapczynski 92d683587a Fix contact email share type redirection 2012-08-01 17:52:59 -04:00
Michael Gapczynski 4933128850 Throw exceptions in share API for UI to display 2012-08-01 17:52:29 -04:00
Michael Gapczynski 2201074e1f Basic setup for sharing with contacts 2012-08-01 17:17:28 -04:00
Jörn Friedrich Dreyer 14c5d08a3f reorder code for readability 2012-08-01 22:38:27 +02:00
Jörn Friedrich Dreyer 417bebd9b7 dix php strict warnings in mdb2 oci8 2012-08-01 22:37:57 +02:00
Georg Ehrke 47e4793c30 little fix for previous commit 2012-08-01 18:04:06 +02:00
Georg Ehrke 8766b3286b fix a subadmin UI bug 2012-08-01 18:03:08 +02:00
Thomas Tanghus 98f37b93f6 Propagate exceptions in OC.appSettings. 2012-08-01 16:24:02 +02:00
Jörn Friedrich Dreyer c7be0db853 use dbname for non privileged user 2012-08-01 15:00:54 +02:00
Jörn Friedrich Dreyer ab976863ae fix sql 2012-08-01 15:00:07 +02:00
Jörn Friedrich Dreyer e13f381189 add limit support to OC_DB & OCP/DB 2012-08-01 14:59:08 +02:00
Michael Gapczynski 83b935a1c2 Prevent up and down arrow from changing the share with input value 2012-07-31 21:31:59 -04:00
Michael Gapczynski b6aa5d2875 Include contacts in share with search 2012-07-31 21:05:00 -04:00
Jenkins for ownCloud 274d1ef87f [tx-robot] updated from transifex 2012-08-01 02:02:35 +02:00
Jakob Sack 1fe9892292 Fix #476 2012-07-31 23:31:25 +02:00
Jenkins for ownCloud 36ccaf51ed [tx-robot] updated from transifex 2012-07-31 22:57:24 +02:00
Michael Gapczynski 94ce8f2168 Merge branch 'master' into share_api
Conflicts:
	apps/contacts/lib/app.php
	apps/files_sharing/js/share.js
2012-07-31 15:00:04 -04:00
Michael Gapczynski 269922543e Give share with search focus when sharing dropdown appears 2012-07-31 14:48:19 -04:00
Michael Gapczynski 9e4c3b8342 Remove break, it broke the statuses :) 2012-07-31 14:21:46 -04:00
Jörn Friedrich Dreyer 795e78809f add oracle to install & setup 2012-07-31 19:34:30 +02:00
Michael Gapczynski 8d01e1a355 Don't show self or already shared with users and groups in the share with search 2012-07-31 13:06:32 -04:00
jfd 3aff7a298c use CURRENT_TIMESTAMP in default column definitions (sqlite, mysql, postgres and oracle DO understand it), change clob columns to text (clob will give sorting and uniqueness problems and in general is not what we want) 2012-07-31 19:00:54 +02:00
jfd 727f4357fb remove superflous index (already indexed with primary key derived from <autoincrement> by MDB2), oracle will bark on this 2012-07-31 18:54:24 +02:00
jfd ede464f058 escape all identifiers with backticks 2012-07-31 18:53:05 +02:00
Jörn Friedrich Dreyer 3c5670b662 comment extra timestamp quotation for oci8. Oracle can handle CURRENT_TIMESTAMP pretty well 2012-07-31 17:49:49 +02:00
Jörn Friedrich Dreyer c03daca712 add oci8 to MDB2 2012-07-31 17:42:36 +02:00
Michael Gapczynski 8729119d4b Add suggestion to share with search for sharing via email 2012-07-31 10:18:26 -04:00
Thomas Tanghus 6df95db8e8 Forgot to also use the options I added :-P 2012-07-31 16:05:58 +02:00
Thomas Tanghus 8837576ce7 Added some more options to OC.appSettings(). 2012-07-31 16:03:08 +02:00
Thomas Tanghus 5eed59bd54 Changed fix parameter to OC.appSettings(). 2012-07-31 14:18:32 +02:00
Thomas Tanghus fb14cb87bd Made the parameter for OC.appSettings() an object to be able to extend it. 2012-07-31 14:17:28 +02:00
Thomas Tanghus 084866cb1e White space 2012-07-31 14:06:44 +02:00
Thomas Tanghus 90a1b5a758 Unregister from personal settings. 2012-07-31 12:23:22 +02:00
Thomas Tanghus 19c55e2d44 Implemented app settings in popup. 2012-07-31 12:23:22 +02:00
Thomas Tanghus 553773f2e1 Popup for app specific settings. 2012-07-31 12:23:22 +02:00
Frank Karlitschek aa60771736 4.0.6 2012-07-31 10:13:10 +02:00
Michael Gapczynski d66f071d3e Use search and limit parameters for share with search in sharing dropdown 2012-07-30 20:21:48 -04:00
Michael Gapczynski 2f1a990cad Add search, limit, and offset parameters to getUsers() and getGroups() 2012-07-30 20:20:46 -04:00
Michael Gapczynski ed71343df8 Autocomplete for share with search in sharing dropdown 2012-07-30 15:30:21 -04:00
Jakob Sack 8a92cd21d6 Remove OC_App::register call in OCP\App::register 2012-07-30 21:26:14 +02:00
Michael Gapczynski dfae77dec1 Add notifications and undo support for replacing files when renaming 2012-07-30 12:22:11 -04:00
Arthur Schiwon b465fc84ae LDAP: don't die on unexpected collisions, handle empty display-name attributes properly 2012-07-30 17:42:33 +02:00
Arthur Schiwon b523366acd LDAP: don't die on unexpected collisions, handle empty display-name attributes properly 2012-07-30 17:30:11 +02:00
Michael Gapczynski 98c020d954 Remove more accidentally added files 2012-07-30 10:42:44 -04:00
Michael Gapczynski 29dab0846e Remove another accidently added 3rdparty app 2012-07-30 10:37:54 -04:00
Michael Gapczynski 530e7f03cd Remove accidently added 3rd party apps 2012-07-30 10:34:12 -04:00
Michael Gapczynski b9bd54bd98 Add additional error handling for emailing private links 2012-07-30 10:07:20 -04:00
Michael Gapczynski dab708b625 Correction for 'Fix group detection for sharing in case username contains '@', fix for oc-1270' 2012-07-30 10:07:20 -04:00
Michael Gapczynski 519eb39422 Remove delete tipsy if file is deleted, fixes bug oc-958 2012-07-30 10:07:19 -04:00
Michael Gapczynski 3e183b2eea Set filter to empty if not set by Ampache client
Conflicts:
	apps/media/lib_ampache.php
2012-07-30 10:07:19 -04:00
Michael Gapczynski d07b8448d1 Set the user id when authenticating user for Ampache, fixes bug oc-219 2012-07-30 10:07:19 -04:00
Michael Gapczynski 7d17c59a51 Fix group detection for sharing in case username contains '@', fix for oc-1270 2012-07-30 10:07:19 -04:00
Michael Gapczynski f378415377 Only call mkdir() if the root folder does not exist for FTP external storage 2012-07-30 10:07:19 -04:00
Michael Gapczynski 6b83470c96 Fix incorrect copy/paste for file_put_contents() 2012-07-30 10:07:19 -04:00
Michael Gapczynski 93c75f46e5 Forgot data parameter for file_put_contents() streams pre proxies 2012-07-30 10:07:19 -04:00
Michael Gapczynski ea18d70c60 Run pre and post proxies for file_put_contents() streams
Conflicts:
	lib/filesystemview.php
2012-07-30 10:07:19 -04:00
Michael Gapczynski 41a74e3dd2 Check if size isset, try to fix used space calculation again, fixs bug oc-1331
Conflicts:
	settings/personal.php
2012-07-30 10:07:19 -04:00
Michael Gapczynski 164fc1c981 Fix used space calculation if shared folder does not exist, fixes bug oc-1331
Conflicts:
	settings/personal.php
2012-07-30 10:07:19 -04:00
Michael Gapczynski f328f53ec1 Fix filesystem hash, no longer using basicOperation()
Conflicts:
	lib/filesystemview.php
2012-07-30 10:07:19 -04:00
Michael Gapczynski 099b16350f Delete old session files, suggested by Torben Nehmer, see bug oc-736 2012-07-30 10:07:19 -04:00
Michael Gapczynski 89027545a0 Check if user is already logged in for DAV auth, instead of logging in and creating new sessions for every request 2012-07-30 10:07:18 -04:00
Thomas Tanghus 01f25119d5 Merge branch 'stable4' of git://gitorious.org/owncloud/owncloud into stable4 2012-07-30 12:28:40 +02:00
Thomas Tanghus f91783e9ab Fix errors when no addressbook. 2012-07-30 12:28:10 +02:00
Thomas Tanghus fa62ff62d2 Remove deprecated code. 2012-07-30 05:31:48 +02:00
Thomas Tanghus d614c3b1d5 Code style. 2012-07-30 05:31:06 +02:00
Thomas Tanghus 118d9e17b6 Check if the are contacts marked as deleted and warn if so. 2012-07-30 04:57:14 +02:00
Thomas Tanghus b25b73b5b4 Fixed potential error in logging. 2012-07-30 04:57:14 +02:00
Thomas Tanghus fa6d26b53c Removed text/plain header. 2012-07-30 04:57:14 +02:00
Jenkins for ownCloud 3430dcd367 [tx-robot] updated from transifex 2012-07-30 02:05:41 +02:00
Michael Gapczynski 5262cde6a6 Add additional error handling for emailing private links 2012-07-29 18:02:09 -04:00
Michael Gapczynski e18639551d Tweak appearance of undo delete notification 2012-07-29 18:02:08 -04:00
Tom Needham 0836366d87 Methods to disable and enable users 2012-07-29 16:07:51 +00:00
Jenkins for ownCloud 18f6552a08 [tx-robot] updated from transifex 2012-07-29 02:06:29 +02:00
Michael Gapczynski 7ff04be091 Correction for 'Fix group detection for sharing in case username contains '@', fix for oc-1270' 2012-07-28 11:06:36 -04:00
Michael Gapczynski e02d8d7f7e Remove delete tipsy if file is deleted, fixes bug oc-958 2012-07-27 21:28:41 -04:00
Jenkins for ownCloud fa4052d6f1 [tx-robot] updated from transifex 2012-07-28 02:05:38 +02:00
Thomas Mueller 6bc45f11f7 bookmarks.pot and lib.pot added to transifex 2012-07-28 00:25:34 +02:00
Michael Gapczynski dd4765ad16 Set filter to empty if not set by Ampache client 2012-07-27 18:10:40 -04:00
Michael Gapczynski 6a4c46e2c2 Set the user id when authenticating user for Ampache, fixes bug oc-219 2012-07-27 18:05:18 -04:00
Michael Gapczynski df9f5b902a Fix group detection for sharing in case username contains '@', fix for oc-1270 2012-07-27 15:34:51 -04:00
Bart Visscher 896d27de36 Chunked upload: Support reusing local chunks 2012-07-27 19:35:33 +02:00
Bart Visscher 1ea33ff36b Chunked upload: Refactor OC_FileChunking to object 2012-07-27 19:35:28 +02:00
Bart Visscher 2d85ef0e04 Chunked upload: Refactor to static class 2012-07-27 19:32:44 +02:00
Michael Gapczynski 48f33be848 Only call mkdir() if the root folder does not exist for FTP external storage 2012-07-27 12:32:03 -04:00
Michael Gapczynski db72ce398b Add support for configuring which permissions are possible for items 2012-07-27 10:13:23 -04:00
Michael Gapczynski 4c822df28d Fix incorrect copy/paste for file_put_contents() 2012-07-27 09:37:47 -04:00
Bjoern Schiessle 680eed6bac fix for bug #1295, don't escape password reset link 2012-07-27 15:35:36 +02:00
Georg Ehrke bccd372565 Merge commit 'refs/merge-requests/76' of git://gitorious.org/owncloud/owncloud into merge-requests/76 2012-07-27 14:17:55 +02:00
Bart Visscher a7a5433108 Merge branch 'master' into chunked_upload
Conflicts:
	lib/connector/sabre/directory.php
2012-07-27 11:40:51 +02:00
Michael Gapczynski 7050f0fa67 Cast groups as string, fixes bug oc-1309. Thanks to nderambure. 2012-07-26 23:54:25 -04:00
Michael Gapczynski ea2e76eecc Forgot data parameter for file_put_contents() streams pre proxies 2012-07-26 23:10:21 -04:00
Michael Gapczynski d006a551f4 Run pre and post proxies for file_put_contents() streams 2012-07-26 22:53:55 -04:00
Michael Gapczynski cb21406e18 Implement CRUDS in share dropdown, and some clean-up 2012-07-26 21:56:22 -04:00
Michael Gapczynski d1dee28437 Check if size isset, try to fix used space calculation again, fixs bug oc-1331 2012-07-26 20:45:58 -04:00
Jenkins for ownCloud 0a9c33e151 [tx-robot] updated from transifex 2012-07-27 02:04:26 +02:00
Georg Ehrke 16928f4d59 fix spelling fail 2012-07-26 18:50:59 +02:00
Georg Ehrke d8aca0c78e apply fix suggested in oc-1132 - bugfix for oc-1132 2012-07-26 18:40:12 +02:00
Arthur Schiwon 6fbed6a588 LDAP: add Test Configuration functionality in the settings 2012-07-26 18:11:12 +02:00
Bart Visscher d26f87e738 Smarter remove of etag properties for path 2012-07-26 17:56:32 +02:00
Bart Visscher 3725cd079b Fix oc-1362: post_rename has no path param but newpath and oldpath 2012-07-26 17:41:57 +02:00
Georg Ehrke ebe4d1f0ee Merge branch 'subadmin' 2012-07-26 16:50:02 +02:00
Georg Ehrke e1d14ab461 Merge branch 'master' into subadmin 2012-07-26 16:47:05 +02:00
Michael Gapczynski 0810f92894 Fix used space calculation if shared folder does not exist, fixes bug oc-1331 2012-07-26 10:30:33 -04:00
Arthur Schiwon 6c92a85d49 LDAP: use OC_Cache to cache results from LDAP. Default is set to 10 min. Should improve performance especially when LDAP users use the sync client, because userExists checks with the LDAP server are reduced. 2012-07-26 16:11:32 +02:00
Arthur Schiwon e0121ea75e LDAP: some cleanup 2012-07-26 16:11:32 +02:00
Arthur Schiwon b893aa9567 code style 2012-07-26 16:11:32 +02:00
Georg Ehrke c8de77b3fd fix errors like Failed opening required ownCloudcalendar/appinfo/remote.php 2012-07-26 16:03:19 +02:00
Georg Ehrke e4679770c4 declare OCP\App::register as deprecated 2012-07-26 15:16:07 +02:00
Georg Ehrke 4e62e121a6 mark OCP\App::register as deprecated 2012-07-26 15:12:57 +02:00
Georg Ehrke 8cff0d997f convert through caldav transmitted rgba calendarcolor to rgb 2012-07-26 14:48:00 +02:00
Georg Ehrke f7155b4276 convert through caldav transmitted rgba calendarcolor to rgb 2012-07-26 14:46:03 +02:00
Jenkins for ownCloud ba0ea21074 [tx-robot] updated from transifex 2012-07-26 08:04:12 +02:00
Jenkins for ownCloud 42c22bee36 [tx-robot] updated from transifex 2012-07-26 08:03:10 +02:00
Lukas Reschke 12dfe5868a Updated style 2012-07-26 01:38:46 +02:00
Lukas Reschke d24326ecce Updated style 2012-07-26 01:38:20 +02:00
Lukas Reschke d425740dc2 Remove unused files 2012-07-26 01:19:46 +02:00
Lukas Reschke 1554d7a2c0 Check for admin user 2012-07-26 01:16:32 +02:00
Lukas Reschke efbd7ca166 Updated packages 2012-07-26 01:16:22 +02:00
Lukas Reschke 95936024bc Updated packages 2012-07-26 01:12:58 +02:00
Lukas Reschke 9605e1926c Check for admin user 2012-07-26 00:06:51 +02:00
Lukas Reschke 85a410d7a3 Remove unused files 2012-07-26 00:04:12 +02:00
Michael Gapczynski 586fe8f940 Change is_writable() call to isUpdatable() 2012-07-25 17:39:28 -04:00
Michael Gapczynski add8f09355 No longer need hash() in shared storage, already implemented by the common file storage 2012-07-25 17:13:48 -04:00
Bart Visscher 783d67be62 Create uniqid ETag for directories 2012-07-25 23:09:03 +02:00
Bart Visscher 381e493a8c Rename functions
getETagPropertyForFile -> getETagPropertyForPath
removeETagPropertyForFile -> removeETagPropertyForPath
2012-07-25 23:09:03 +02:00
Michael Gapczynski 30b58f5677 Merge branch 'master' into share_api
Conflicts:
	apps/calendar/js/loader.js
	apps/contacts/index.php
	apps/contacts/js/loader.js
	apps/files/js/files.js
	apps/files_sharing/sharedstorage.php
	lib/filesystemview.php
2012-07-25 17:08:18 -04:00
Michael Gapczynski f25ccaff59 Fix filesystem hash, no longer using basicOperation() 2012-07-25 16:55:01 -04:00
Michael Gapczynski 4d17ed2f71 Make file actions permissions aware 2012-07-25 16:33:08 -04:00
Jenkins for ownCloud 37bccf54f2 [tx-robot] updated from transifex 2012-07-25 22:15:24 +02:00
Arthur Schiwon b94631de0c LDAP: check if php-ldap is installed. If not, give an error output. FIX: blank Users page when the module is not installed. 2012-07-25 18:40:48 +02:00
Arthur Schiwon 3c9919e475 LDAP: check if php-ldap is installed. If not, give an error output. FIX: blank Users page when the module is not installed. 2012-07-25 18:21:16 +02:00
Bart Visscher d17eb2983f OpenID: fix include path 2012-07-25 17:45:59 +02:00
Georg Ehrke 9b0870bb91 add some calendar sharing hooks in stable4 - bugfix for oc-1325 2012-07-25 17:02:24 +02:00
Arthur Schiwon 71b862e571 LDAP: replace deprecated constant 2012-07-25 15:11:58 +02:00
Arthur Schiwon 4a2295b75b code style 2012-07-25 15:10:56 +02:00
Arthur Schiwon 6285cc2604 LDAP: remove debug output 2012-07-25 13:19:07 +02:00
Arthur Schiwon ab1d9507a9 code style 2012-07-25 13:18:31 +02:00
Arthur Schiwon edfd789a87 LDAP: remove obsolete require_once 2012-07-25 13:16:31 +02:00
Arthur Schiwon 8664729843 code style 2012-07-25 13:14:32 +02:00
Arthur Schiwon 15f7d838fa code style 2012-07-25 13:13:01 +02:00
Arthur Schiwon 569e52b87c remove unnecessary debug output 2012-07-25 13:11:42 +02:00
Arthur Schiwon c8404a7bfa code style 2012-07-25 13:10:59 +02:00
Arthur Schiwon 92f447ca50 code style 2012-07-25 13:09:51 +02:00
Arthur Schiwon a6c5309e16 LDAP: adjust test after refactoring 2012-07-25 12:56:09 +02:00
Arthur Schiwon b10f7aafb7 LDAP: silence warning, but handle the error 2012-07-25 12:56:09 +02:00
Arthur Schiwon 25ad1d5c3e LDAP: split up LIB_LDAP into Access for LDAP interaction functions and Connection for configuration and resource management. Adjust user_ldap, group_ldap and the app accordingly. 2012-07-25 12:56:09 +02:00
Arthur Schiwon eefe6882f9 method not used externally, thus not needed in interface 2012-07-25 12:56:09 +02:00
Arthur Schiwon d0aebf05bf LDAP: group backend now implements the interface, does not inherit backend class 2012-07-25 12:56:08 +02:00
Arthur Schiwon 6b320a2604 provide recursiveArraySearch as Helper function and make available through API 2012-07-25 12:56:08 +02:00
Arthur Schiwon 42492338fc LDAP: put app under the OCA\user_ldap\ namespace 2012-07-25 12:56:08 +02:00
Arthur Schiwon 57c375ea24 Support for OCA namespace 2012-07-25 12:56:08 +02:00
Arthur Schiwon 5888cb48b6 Support for OCA namespace 2012-07-25 12:56:08 +02:00
Arthur Schiwon afdc5bf264 LDAP: switch user backend from extending class OC_User_Backend to implementing OC_User_Interface for improved flexibility 2012-07-25 12:56:08 +02:00
Arthur Schiwon 81c0ca4ffb remove only internally used function from interface 2012-07-25 12:56:08 +02:00
Arthur Schiwon 0196e6eada Offer User and Group interfaces in public API 2012-07-25 12:56:08 +02:00
Arthur Schiwon 0bdebe0e4a LDAP: pass user backend as instance, not classname 2012-07-25 12:56:08 +02:00
Arthur Schiwon e499bc37c8 define an interface for the Group Backend 2012-07-25 12:56:08 +02:00
Arthur Schiwon fdcbc23ed6 define an interface for the User Backend 2012-07-25 12:56:07 +02:00
Michael Gapczynski 6f58eca534 Change read only check to isCreatable 2012-07-24 21:35:03 -04:00
Michael Gapczynski ede2b8a55f Missed a is_readable() call in local filestorage 2012-07-24 21:17:43 -04:00
Michael Gapczynski fc72d4b10f Add root directory checks for CRUDS permissions in shared storage 2012-07-24 21:16:47 -04:00
Michael Gapczynski f7b89f0475 Add CRUDS permissions calls to filesystem, deprecate is_readable() and is_writable() 2012-07-24 20:10:28 -04:00
Michael Gapczynski c60c6024a7 Remove toTmpFile() from shared storage, no longer needed 2012-07-24 14:50:43 -04:00
Michael Gapczynski eac297e8c4 Improve file source caching for shared folders 2012-07-24 14:41:19 -04:00
Michael Gapczynski e8675586af Fix permission check for rmdir(), implement unlink(), rename(), and copy() 2012-07-24 14:22:07 -04:00
Frank Karlitschek d28be8de64 add the calls for the new keyserver. Still not connectect to the encryption system 2012-07-24 15:18:52 +02:00
Frank Karlitschek 20cb0af8ad migrate the webapps call to ocs 2012-07-24 10:06:00 +02:00
Michael Gapczynski e6678bd454 Permission check should be made on parent folder when creating a new folder 2012-07-23 22:39:29 -04:00
Michael Gapczynski b58e72cdb2 Alert user of errors when creating new files or folders 2012-07-23 22:35:34 -04:00
Michael Gapczynski 7b01e3285e Include a few CRUDS permissions checks in shared storage, plus a little clean-up in shared storage 2012-07-23 22:05:53 -04:00
Robin Appelman 856d9c0b54 some indention fixes 2012-07-24 00:39:59 +02:00
Robin Appelman 7967685771 move some openid files to 3rdparty 2012-07-24 00:02:01 +02:00
Robin Appelman 59364366d8 use dummy user backend for oc_cache_file tests 2012-07-23 22:32:07 +02:00
Robin Appelman e49666d36b add option to clear user backends 2012-07-23 22:31:48 +02:00
Thomas Mueller ab7a2d43e8 create a user for Test_Cache_File to allow unit tesing within ci 2012-07-23 22:07:42 +02:00
Frank Karlitschek 21631be2ff make it generic and implement a dummy call for quota set 2012-07-23 19:43:28 +02:00
Frank Karlitschek e7e1f234dd first part of the new new OCS CLOUD module. So far only quota is implemented.
The specification is developed here:
http://www.freedesktop.org/wiki/Specifications/open-collaboration-services-1.7#CLOUD
will be moved to
http://www.freedesktop.org/wiki/Specifications/open-collaboration-services
as soon as everything is done.
2012-07-23 18:34:21 +02:00
Bjoern Schiessle 73734c98e0 - remove namespace from file property name (webdav)
- update script to fix broken properties in the database
2012-07-23 11:00:37 +02:00
Bjoern Schiessle bd63fddbf4 fix broken properties in the database 2012-07-23 10:34:01 +02:00
Bjoern Schiessle c0e37c7d69 quick fix for broken properties 2012-07-23 10:25:35 +02:00
Bjoern Schiessle 708c771296 update routine to fix broken file properties in db 2012-07-23 10:25:26 +02:00
Thomas Tanghus 25e1c13ef7 Remove unused ajax file. 2012-07-23 01:17:38 +02:00
Thomas Tanghus 67b6ff22bc Cache DOM lookups, general cleanup. 2012-07-23 01:17:38 +02:00
Thomas Tanghus b60e5942a5 Cleaner event handling. 2012-07-23 01:17:38 +02:00
Thomas Tanghus fb9ef90c45 No need to set checksum on PHOTO. 2012-07-23 01:17:38 +02:00
Thomas Tanghus 0439a18324 Cleaner variable handling. 2012-07-23 01:17:38 +02:00
Thomas Tanghus b00de0258b Make sure notifier cleans up. 2012-07-23 01:17:38 +02:00
Thomas Tanghus 644b6e60d5 Revert "No need to set checksum for PHOTO."
This reverts commit 3937d19fa2ef3da2719d0425ce02707d0345960c.
2012-07-23 01:17:38 +02:00
Thomas Tanghus dc05fd7b92 No need to set checksum for PHOTO. 2012-07-23 01:17:38 +02:00
Thomas Tanghus 294e65fa38 Use insertContact 2012-07-23 01:17:38 +02:00
Thomas Tanghus 641bd7a456 Whitespace 2012-07-23 01:17:38 +02:00
Bart Visscher 9e70f64d44 Fix oc-1163: gzdecode function not always defined
This function is only found in newer php versions
2012-07-22 17:27:30 +02:00
Robin Appelman b1010160b3 CSRF protection for eventsource 2012-07-22 16:37:49 +02:00
Robin Appelman a49c07cf88 progressbar for New->From Url 2012-07-22 03:56:51 +02:00
Robin Appelman 59ab8b14c7 cache fileid's in oc_cache 2012-07-22 03:24:34 +02:00
Robin Appelman 6843beeae9 add option to only get fast cache 2012-07-22 03:21:20 +02:00
Robin Appelman 51566e87c7 add prefix option to OC_Cache::clear 2012-07-22 02:31:48 +02:00
Robin Appelman 2b74778958 add method to OC_Cache to check whether a fast cache (apc/xdebug/etc) is available 2012-07-22 02:23:24 +02:00
Robin Appelman 2a73678fef use file extension for determining mimetypes on default
should be more reliable for files that "look like" other types based on their magic numbers such as odf and docx files
also a lot faster then the old way
2012-07-22 01:53:20 +02:00
Thomas Tanghus ab8ce89df3 Added help for keyboard shortcuts. 2012-07-22 00:15:28 +02:00
Thomas Tanghus 38d38c1797 First stab at Ninja mode ;-) 2012-07-21 22:00:27 +02:00
Thomas Tanghus 359dc8736a Improved scrollTo method. Still not quite there... 2012-07-21 22:00:27 +02:00
Thomas Tanghus eb57544518 Added next/previous methods to contacts list. 2012-07-21 22:00:27 +02:00
Thomas Tanghus 7d520bc7a9 Remove wrong comment. 2012-07-21 22:00:27 +02:00
Thomas Tanghus 0eade1b0d5 Code style. One down... 2012-07-21 22:00:27 +02:00
Georg Ehrke 81b917b2f6 increase width of user migrates form in personal settings, so you can read the whole label in all languages 2012-07-21 19:50:45 +02:00
Georg Ehrke f9d3388854 Merge branch 'master' into calendar_import 2012-07-21 17:37:10 +02:00
Georg Ehrke 57207ddb82 some style fixes for calendar 2012-07-21 17:09:10 +02:00
Georg Ehrke 6ccd4e0cfb Merge branch 'master' into subadmin 2012-07-21 17:01:45 +02:00
Georg Ehrke 11725efd7e add some hooks for subadmins 2012-07-21 16:43:39 +02:00
Thomas Tanghus e07cd26571 Implemented undelete for contacts. 2012-07-21 16:02:12 +02:00
Thomas Tanghus 51bafd32d6 Made contactlist optional in insertContact(). 2012-07-21 14:26:57 +02:00
Thomas Tanghus 00de757169 White space. 2012-07-21 14:26:26 +02:00
Thomas Tanghus 11aa571751 Added option to notify method. 2012-07-21 14:24:26 +02:00
Georg Ehrke 5508a95065 Merge branch 'master' into subadmin 2012-07-21 13:14:52 +02:00
Thomas Tanghus 687c87bc5b DRYed inserting into contacts list. 2012-07-21 13:13:41 +02:00
Georg Ehrke 88f66460a3 some js improvements for subadmins 2012-07-21 13:10:51 +02:00
Bart Visscher 5381cc7418 Fix missing parameter decleration, thanks Jenkins :-) 2012-07-21 01:18:51 +02:00
Bart Visscher ad12e13f14 Tasks: Remove unused code 2012-07-21 00:52:49 +02:00
Bart Visscher 060b8865a4 DRY for getting calendar timezone setting 2012-07-21 00:45:30 +02:00
Bart Visscher 1c30a97833 Style fixes 2012-07-21 00:45:30 +02:00
Thomas Tanghus 06b5e05c86 Damn, that Jenkins dude is tough ;) 2012-07-21 00:43:01 +02:00
Robin Appelman 8a19e134df fix ununsed variables 2012-07-21 00:20:27 +02:00
Robin Appelman 48ec78299e cleanup some obsolete foldersize code from the shared storage backend 2012-07-21 00:20:27 +02:00
Robin Appelman aa118a4c64 remove obsolete oc_filesystem::mountall 2012-07-21 00:20:26 +02:00
Bart Visscher 0b338a7a41 Add missing public to function definition 2012-07-21 00:13:30 +02:00
Bart Visscher 14af503374 Fix parameter order in OC_Filestorage_Common->hash 2012-07-21 00:13:30 +02:00
Bart Visscher cdd9ffc8a5 Add ETag support to the Sabre file connector.
This is based on the md5 of the file, can be changed later
2012-07-21 00:13:30 +02:00
Bjoern Schiessle 53bdb049cb adapted to new SabreDav version 2012-07-20 23:31:08 +02:00
Thomas Tanghus 0af454a23b Trying to get documentation to "Do The Right Thing" (TM) 2012-07-20 23:11:06 +02:00
Thomas Tanghus 42fbc111a2 Hide progressbar on error. 2012-07-20 22:25:09 +02:00
Thomas Tanghus 3103a4cb3f Corrected retry count for uploaded imports. 2012-07-20 21:54:24 +02:00
Tom Needham 29d16f61fa Fix strict standards warnings 2012-07-20 19:27:51 +00:00
Thomas Tanghus de8ed98541 Added some more documentation to OCP\JSON. 2012-07-20 21:20:51 +02:00
Lukas Reschke 93579d88dc CSRF checks 2012-07-20 20:39:20 +02:00
Thomas Tanghus 10337c059c Added some documentation for OCP\JSON::callCheck() 2012-07-20 20:15:39 +02:00
Lukas Reschke 38271ded75 Added CSRF checks 2012-07-20 20:12:36 +02:00
Robin Appelman d393638cc8 forgot to make one function abstract 2012-07-20 19:03:33 +02:00
Robin Appelman c9be9ab251 remove unused variables 2012-07-20 18:56:18 +02:00
Robin Appelman 7152b8b4ee remove unused and depricated getFolderSize 2012-07-20 18:32:40 +02:00
Robin Appelman 39086ef63e dont try to create mountpoints automatically 2012-07-20 17:58:06 +02:00
Robin Appelman 0e6238c66f fix OC_Cache_File tests if encryption is not enabled 2012-07-20 17:58:05 +02:00
Robin Appelman 48306a3c4f fix unused variables 2012-07-20 17:58:05 +02:00
Robin Appelman 0e111e1a17 fix increasing folder sizes in filecache for custom roots 2012-07-20 17:58:05 +02:00
Robin Appelman 57ed83f266 fix eventsource fallback when more then one eventsource is active 2012-07-20 17:58:05 +02:00
Georg Ehrke fdb167a046 Merge branch 'master' into subadmin 2012-07-20 17:20:14 +02:00
Georg Ehrke bf9b6e9ccc don't show label 'add group' for subadmins and remove some debug code 2012-07-20 17:18:40 +02:00
Thomas Tanghus ecf8e77dab Remove unused file. 2012-07-20 17:11:13 +02:00
Thomas Tanghus 7fff386679 Code style. 2012-07-20 17:11:13 +02:00
Robin Appelman 3c2967074f remove unused variable from dropbox filestorage backend 2012-07-20 16:48:28 +02:00
Robin Appelman 1224d7ec01 minor fixes for the google filestorage backend 2012-07-20 16:47:26 +02:00
Robin Appelman 445f52ef8b dont check for filecache updates when getting quota info over webdav 2012-07-20 16:35:51 +02:00
Robin Appelman 23c71b15a0 remove unused variables from webdav file backend 2012-07-20 16:35:51 +02:00
Lukas Reschke c04aa8d6a9 Add CSRF checks 2012-07-20 15:45:17 +02:00
Georg Ehrke bd91ee4d22 add SabreDav 1.6.3 files 2012-07-20 15:25:36 +02:00
Georg Ehrke e4154e6832 remove old files 2012-07-20 15:23:56 +02:00
Georg Ehrke ea79ff191c Merge branch 'master' into subadmin 2012-07-20 15:22:12 +02:00
Georg Ehrke c3bd30cc6b improve default qouta for subadmins 2012-07-20 15:20:48 +02:00
Thomas Tanghus b3d7043f9c Change uri fields from 100 to 200 chars. 2012-07-20 15:15:18 +02:00
Georg Ehrke 7f08c84739 fix tooglegroup for subadmins 2012-07-20 15:13:51 +02:00
Georg Ehrke e42f765697 simplify code of createuser.php 2012-07-20 15:04:50 +02:00
Thomas Mueller 8c06452434 fixing syntax error 2012-07-20 09:14:32 +02:00
Thomas Mueller 5fe0027568 fixing syntax error 2012-07-20 08:20:45 +02:00
Robin Appelman 98e769d269 dont use the mtimes stored in zip archives since they dont update correctly 2012-07-20 00:52:10 +02:00
Thomas Tanghus b8eea32478 Coding style. 2012-07-20 00:18:23 +02:00
Thomas Tanghus 1cbddcf211 Code style 2012-07-20 00:18:23 +02:00
Thomas Tanghus 616f2f336e Trigger loading of more contacts a bit earlier. 2012-07-20 00:18:23 +02:00
Thomas Tanghus 5c0c9bbdc1 Cleaning up a bit. 2012-07-20 00:18:23 +02:00
Thomas Tanghus fc46322d4c Tweak dragging. 2012-07-20 00:18:23 +02:00
Thomas Tanghus 87da179e6c Eye candy for the draggables. 2012-07-20 00:18:23 +02:00
Robin Appelman ad14d67c8d ftp user backend 2012-07-19 23:03:02 +02:00
Robin Appelman b357a968c0 smb user backend 2012-07-19 22:42:26 +02:00
Robin Appelman 57fb37151a imap user backend 2012-07-19 22:42:18 +02:00
Georg Ehrke 9157888334 simplify code of changepassword.php 2012-07-19 19:32:59 +02:00
Georg Ehrke abb9f52dd7 add isGroupAccessible in OC_SubAdmin 2012-07-19 19:17:01 +02:00
Robin Appelman e52ab59b40 Revert "use readfile() instead iof fopen() for file download over webdav."
This reverts commit 9af74a9c80.
2012-07-19 18:13:10 +02:00
Georg Ehrke 6cf418f2fa fix copy&paste fail and deny subadmins to set the default qouta 2012-07-19 18:00:33 +02:00
Georg Ehrke 05bc541276 add some doc for lib/subadmin.php 2012-07-19 16:43:46 +02:00
Georg Ehrke 2fc834230a fix setqouta for subadmins 2012-07-19 16:37:41 +02:00
Georg Ehrke ffc55f3510 simplify code of remoteuser.php 2012-07-19 16:35:14 +02:00
Robin Appelman 33b8de91ea allow a more flexible way of using user backends 2012-07-19 16:31:55 +02:00
Georg Ehrke 6e139f16e4 add isUserAccessible method to OC_SubAdmin class 2012-07-19 16:30:58 +02:00
Robin Appelman e031b9b880 fix running test cases from browser 2012-07-19 16:19:23 +02:00
Frank Karlitschek 10bf36a6ae 4.0.5 2012-07-19 09:10:18 +02:00
Thomas Mueller b30da61d59 postgres added to autotest mechanism 2012-07-18 21:45:12 +02:00
Georg Ehrke fb6468936e fix removeuser.php for subadmins 2012-07-18 17:23:40 +02:00
Georg Ehrke a5bebb86a5 add checkSubAdminUser method to OC_JSON class 2012-07-18 17:11:09 +02:00
Georg Ehrke f503aea099 remove unused code from togglesubadmins.php 2012-07-18 15:28:12 +02:00
Georg Ehrke 4490a88492 fix changepassword.php for subadmins 2012-07-18 15:27:31 +02:00
Georg Ehrke 1a57d392e9 Merge branch 'master' into subadmin 2012-07-18 14:51:52 +02:00
Bjoern Schiessle 20a174e71b remove second "autocomplete" statement 2012-07-18 12:27:15 +02:00
Bjoern Schiessle 3895e3a5ae remember username and provide autocomplete feature 2012-07-18 12:26:10 +02:00
Bjoern Schiessle 0ea29398c7 remember username and provide autocomplete feature 2012-07-18 12:22:30 +02:00
Georg Ehrke f0c82686fd Merge branch 'master' into subadmin 2012-07-18 00:04:17 +02:00
Arthur Schiwon 0bd7d14b7a Sharing: offer an option to allow sharing with everyone, i.e. do not check group memberships 2012-07-17 14:09:01 +02:00
Thomas Tanghus ec4891b7d3 Fixed require path. 2012-07-17 12:07:14 +02:00
Thomas Tanghus 2c9aa029a7 Added missing CSRF checks. 2012-07-17 12:04:34 +02:00
Thomas Tanghus 748fcabba4 Added CSRF checks to files_versions. Expect some error messages - and report them ;) 2012-07-17 11:57:38 +02:00
Thomas Tanghus 8444fc5787 Added CSRF checks to Tasks. Expect some error messages - and report them ;) 2012-07-17 11:52:11 +02:00
Thomas Tanghus 06ff6c6d7d Added CSRF checks to Calendar. Expect some error messages - and report them ;) 2012-07-17 11:46:01 +02:00
Thomas Tanghus 9326f4f535 Added hooks for postCreateUser to add default address book and calendar. Fixes oc-1265. 2012-07-17 10:45:15 +02:00
Thomas Tanghus f4a8c233cf Added hook for postCreateUser. Probably fix for oc-1265.
Conflicts:

	apps/calendar/appinfo/app.php
2012-07-17 10:35:46 +02:00
Thomas Tanghus 1f4d6896df Wrong version comparison in update.php. 2012-07-17 03:59:41 +02:00
Thomas Tanghus 258df5eea2 Added hook for postCreateUser. Probably fix for oc-1265. 2012-07-17 03:04:04 +02:00
Thomas Tanghus 4b8a34df21 Wrong argument count in postCreateUser hook for contacts. 2012-07-17 01:37:28 +02:00
Thomas Tanghus 4de66880ed If a contact wasn't loaded in the list you coulcn't access it from search result. Fixes oc-1264. 2012-07-17 01:35:35 +02:00
Thomas Tanghus f128b96ac0 Format birthday as BDAY;VALUE=DATE:YYYY-MM-DD. Fixes oc-1276. 2012-07-16 23:44:18 +02:00
Thomas Tanghus eb2a15d58f Format birthday as BDAY;VALUE=DATE:YYYY-MM-DD. Fixes oc-1276. 2012-07-16 23:36:11 +02:00
Thomas Tanghus 47d50fc424 Merge branch 'stable4' of git://gitorious.org/owncloud/owncloud into stable4 2012-07-16 21:22:07 +02:00
Thomas Tanghus d64300251b Corrected javascript definition. 2012-07-16 21:21:37 +02:00
Georg Ehrke 47566b0c42 stop using of OC_L10N::tA 2012-07-16 20:26:14 +02:00
Robin Appelman 19f2ce6997 improve webfinger for situations where owncloud is not installed in the server root 2012-07-16 19:58:05 +02:00
Robin Appelman f047fdbfaa revert to using fopen for webdav instead of readfile 2012-07-16 19:58:05 +02:00
Robin Appelman 7ab35af6dd use the remote.php infrastructure for remoteStorage 2012-07-16 19:58:05 +02:00
Georg Ehrke d4e2cb6e62 fix encoding fail in calendar app - bugfix for oc-1194 2012-07-16 19:53:19 +02:00
Georg Ehrke ccb1c57745 add warning in log if OC_L10N::tA was called 2012-07-16 19:35:40 +02:00
Thomas Tanghus 296f79d1a4 latin1 => utf8 2012-07-16 01:46:16 +02:00
Thomas Tanghus 7a7ac58094 Remove obsolete code. 2012-07-16 01:46:16 +02:00
Thomas Tanghus 2035bc7905 Fix sorting - again :-P 2012-07-16 01:46:16 +02:00
Thomas Tanghus 0fb1a76113 Bold active address book. 2012-07-16 01:46:16 +02:00
Thomas Tanghus 25f50e8273 Set the address book of the active contact active. 2012-07-16 01:46:16 +02:00
Thomas Tanghus 8fba6b9bc7 UI part of addressbook merging. 2012-07-16 01:46:16 +02:00
Thomas Tanghus 502f420678 Wrap image uploading in anonymous function. 2012-07-16 01:46:16 +02:00
Thomas Tanghus 001a47afb0 Remove obsolete FIXMEs. 2012-07-16 01:46:16 +02:00
Thomas Tanghus 225726c8d9 latin1 => utf8. I thought I did this a month ago? 2012-07-16 01:41:45 +02:00
Thomas Mueller 3ffc96c3e9 add database type to xml report 2012-07-16 00:07:40 +02:00
Thomas Mueller 6bb3a281b1 some more structure added 2012-07-15 23:22:19 +02:00
Michael Gapczynski 72ebc2a32a Delete old session files, suggested by Torben Nehmer, see bug oc-736 2012-07-15 15:22:31 -04:00
Michael Gapczynski b1a7826d56 Check if user is already logged in for DAV auth, instead of logging in and creating new sessions for every request 2012-07-15 15:17:27 -04:00
Thomas Mueller a1b9b4b43e fixing reset on autotest 2012-07-15 18:51:40 +02:00
Thomas Tanghus dd95149238 Also unlink unsuccessful imports. 2012-07-15 17:34:30 +02:00
Georg Ehrke d49b789348 Merge branch 'master' into calendar_import 2012-07-15 16:56:38 +02:00
Georg Ehrke 4700222ea9 Merge branch 'master' into subadmin 2012-07-15 16:33:17 +02:00
Georg Ehrke 044134a289 add another file which was missing in the previous commit 2012-07-15 16:32:57 +02:00
Georg Ehrke e707e94857 subadmins can now add users 2012-07-15 16:31:28 +02:00
Thomas Tanghus 160e701fbf Make list droppable too instead of just the header. 2012-07-15 12:28:29 +02:00
Thomas Tanghus db034f05ca Improve temp file handling. 2012-07-15 12:28:29 +02:00
Thomas Tanghus 8b49e304e0 Hide file form field behind image so it will maybe work with IE... 2012-07-15 12:28:29 +02:00
Thomas Tanghus 48521fcfaa Made notifications more flexible. 2012-07-15 12:28:29 +02:00
Thomas Tanghus d71da67bee Typo. 2012-07-15 12:28:29 +02:00
Thomas Tanghus 7af608881b Added notification. 2012-07-15 12:28:29 +02:00
Thomas Tanghus 4e684b9e9d Fixed sorting of addressbooks. 2012-07-15 12:28:29 +02:00
Thomas Tanghus 287285880c Removed obsolete TODO. 2012-07-15 12:28:28 +02:00
Thomas Mueller ce40576881 MySql testing added 2012-07-15 12:09:15 +02:00
Thomas Tanghus eba4f08015 Refactored contacts import. 2012-07-15 04:17:30 +02:00
Thomas Tanghus 87912a8c65 Fix loading previous or next contact after deleting one. 2012-07-15 04:17:30 +02:00
Michael Gapczynski b455149bae Fix undo delete user 2012-07-14 16:57:16 -04:00
Michael Gapczynski 1ff2dd8f63 Listen to post_deleteUser, post_addToGroup, and post_removeFromGroup hooks 2012-07-14 14:06:57 -04:00
Michael Gapczynski cc6c940b9a Implement post_removeFromGroup() 2012-07-14 11:55:22 -04:00
Michael Gapczynski 82dea705d4 Add option to delete() to check the owner of the first search of reshares 2012-07-14 11:53:02 -04:00
Michael Gapczynski 0e9ab5cf2a Fix post_deleteUser(), column name changed and item_source is no longer needed 2012-07-14 11:02:16 -04:00
Michael Gapczynski 459bcd8d5e Update documentation 2012-07-14 10:55:34 -04:00
Michael Gapczynski bbbfc2c565 Fix delete(), it was going in an infinite loop 2012-07-14 10:52:31 -04:00
Michael Gapczynski 8de69fcb18 Update documentation 2012-07-14 10:19:18 -04:00
Michael Gapczynski 51a4518396 Add support for CRUDS permissions 2012-07-14 09:35:39 -04:00
Thomas Tanghus 140263003a Give default address book a more intuitive name and replace spaces with underscores in uri. 2012-07-14 14:11:43 +02:00
Thomas Tanghus d45d73eecf Try to avoid occasional error messages. 2012-07-14 14:11:43 +02:00
Robin Appelman 880d80be67 fix minified js and css 2012-07-14 00:10:17 +02:00
Robin Appelman 7d1f644011 use new way to register remote/public.php entries in user_webfinger 2012-07-13 23:24:22 +02:00
Robin Appelman b45d3ced79 fix remote and public.php 2012-07-13 22:44:35 +02:00
Bjoern Schiessle 50eef9a71c update script to fix fscache 2012-07-13 15:17:36 +02:00
Thomas Mueller 6ee228cac7 rediect test results to autotest-results-sqlite.xml 2012-07-13 15:10:30 +02:00
Thomas Mueller fd0c6da410 autotest.sh added: create an fresh environment using sqlite (mysql anf pg will follow) and executes the test suite 2012-07-13 13:55:15 +02:00
Thomas Mueller 5de2a292fc restructuring test suite invocation - now we load all test cases into one suite and execute this single suite. this is necessary to be able to generate one xml report and is also a precondition for code coverage analysis(which will follow soon) 2012-07-13 13:41:13 +02:00
Thomas Mueller 967c6d7d3c allow command line based installation/setup 2012-07-13 13:25:43 +02:00
Bjoern Schiessle 80ed5412f1 if the '/Shared' was the modified directory, than scan it. 2012-07-13 11:57:14 +02:00
Michael Gapczynski f638340d1f Add check for folder item type as well 2012-07-12 14:29:51 -04:00
Michael Gapczynski 63b6f20e05 Move already shared with check out of user and group cases, and add check for already shared with inside a collection 2012-07-12 12:11:04 -04:00
Michael Gapczynski ecae3ea430 Rename parents to collectionTypes, getCollectionItemTypes() shouldn't include the original item type 2012-07-12 12:10:50 -04:00
Michael Gapczynski bdcfa4bb63 Add check if file is found in file cache 2012-07-11 20:43:48 -04:00
Michael Gapczynski f496a9dea6 Rename $contacts to $has_contacts, it missed this commit: 7cb74a0 2012-07-11 20:29:59 -04:00
Michael Gapczynski ac395dced1 Rename $contacts to $has_contacts, it missed this commit: 7cb74a0 2012-07-11 20:28:29 -04:00
Michael Gapczynski 4bf13adff2 Merge branch 'master' into share_api
Conflicts:
	apps/contacts/lib/addressbook.php
	apps/files_sharing/js/share.js
	apps/files_sharing/sharedstorage.php
2012-07-11 20:25:59 -04:00
Michael Gapczynski 88f4845ca3 Sanitization isn't required here 2012-07-11 20:04:18 -04:00
Michael Gapczynski 7b2ec41477 Revert santizing toaddress, because PHPMailer now throws exceptions
Conflicts:
	apps/files_sharing/ajax/email.php
2012-07-11 19:38:57 -04:00
Michael Gapczynski 632fc6ec61 Fix log write() parameters in wrong order 2012-07-11 19:38:57 -04:00
Lukas Reschke ac5abc5603 Handling exceptions 2012-07-11 19:38:57 -04:00
Michael Gapczynski e887fd7ba8 Catch exceptions from PHPMailer 2012-07-11 19:38:57 -04:00
Michael Gapczynski ebcf5bce3c Sanitize toaddress for emailing private links
Conflicts:
	apps/files_sharing/ajax/email.php
2012-07-11 19:38:56 -04:00
Michael Gapczynski 71491612e3 Move line counter so we only count lines towards the offset that are equal or above the log level 2012-07-11 19:38:56 -04:00
Michael Gapczynski bc3462f022 Improvements and bug fix for log reading, fixes bug oc-982 2012-07-11 19:38:56 -04:00
Michael Gapczynski 8890a41280 Fix setting custom quota size for users, bug fix for oc-1128 2012-07-11 18:25:08 -04:00
Michael Gapczynski 91a15bae76 Revert santizing toaddress, because PHPMailer now throws exceptions 2012-07-11 16:02:43 -04:00
Michael Gapczynski 281bf62af9 Fix log write() parameters in wrong order 2012-07-11 15:56:18 -04:00
Lukas Reschke 8afcddf44f Handling exceptions 2012-07-11 21:52:51 +02:00
Michael Gapczynski 66da0a2151 Catch exceptions from PHPMailer 2012-07-11 15:36:27 -04:00
Michael Gapczynski 7077678f7f Sanitize toaddress for emailing private links 2012-07-11 15:26:22 -04:00
Lukas Reschke d203fa2c50 Sanitizing file names 2012-07-11 19:15:11 +02:00
Lukas Reschke c3fea30811 Sanitizing file names 2012-07-11 19:14:04 +02:00
Michael Gapczynski cbf851de69 Show private link in dropdown 2012-07-11 12:21:30 -04:00
Michael Gapczynski ccb5e99395 Generate random token for private links (more entropy than past private links) 2012-07-11 12:18:59 -04:00
Michael Gapczynski e896c0a9e3 Fix addressbook sharing, formatItems() changed in past commits 2012-07-11 11:33:48 -04:00
Bjoern Schiessle 07efd39d8a prevent script execution during slideshow 2012-07-11 15:44:39 +02:00
Bjoern Schiessle 9af74a9c80 use readfile() instead iof fopen() for file download over webdav.
fopen() didn't work for large files on some servers while readfile()
seems to work for all files on all configurations.
2012-07-11 12:04:20 +02:00
Bjoern Schiessle e248412ca9 use getStorage() to get versions location
update routine implemented
version number of files_versions increased

Conflicts:

	apps/files_versions/lib/hooks.php
2012-07-11 11:06:29 +02:00
Georg Ehrke 0cb9f5e159 fix merge conflicts 2012-07-11 10:50:18 +02:00
Georg Ehrke 5575493900 Merge branch 'master' into calendar_import 2012-07-11 10:47:30 +02:00
Michael Gapczynski b148256233 Get rid of sneaky error_log() that got left behind 2012-07-10 21:30:52 -04:00
Michael Gapczynski a7416b1cd8 Add back returning only the item if the limit is 1 and now check that the format is set to none 2012-07-10 21:30:16 -04:00
Michael Gapczynski c21ff29a53 Fix getItems() calls 2012-07-10 21:29:34 -04:00
Jörn Friedrich Dreyer 0f0aa1827f Merge branch 'master' of gitorious.org:/owncloud/owncloud 2012-07-11 02:34:28 +02:00
Jörn Friedrich Dreyer ca8028bd73 small fixes in merge request 104, use OCP\Files::getStorage 2012-07-11 02:33:11 +02:00
Michael Gapczynski 0b14b4e3e8 Call exit() to prevent further code execution if directory does not exist 2012-07-11 02:33:11 +02:00
BlackEagle ef1924dbbb gallery :: display big picture according to exif
- fixes oc-314
- caching of the 'big' images in subfolder view
  next to the tumbnails
- now choosen to use max 1200px for viewing
  this helps speeding up the viewing process

Signed-off-by: BlackEagle <ike.devolder@gmail.com>
2012-07-11 02:33:10 +02:00
Michael Gapczynski c0e1b8e7e7 Sanitize POST and GET in ajax/share 2012-07-10 19:54:03 -04:00
Michael Gapczynski ca04c1a0f8 Call exit() to prevent further code execution if directory does not exist 2012-07-10 19:15:08 -04:00
Michael Gapczynski 3134a962d9 Call exit() to prevent further code execution if directory does not exist 2012-07-10 18:59:42 -04:00
Michael Gapczynski 7c908a0016 Sharing files working using share API 2012-07-10 18:56:22 -04:00
Bjoern Schiessle e7a0c4f0bb use readfile() instead iof fopen() for file download over webdav.
fopen() didn't work for large files on some servers while readfile()
seems to work for all files on all configurations.
2012-07-10 19:22:06 +02:00
Bjoern Schiessle bf09bcc854 add OCP\Files to access files 2012-07-10 19:22:06 +02:00
Jörn Friedrich Dreyer 9be6432aac shrink css height for gallery_div from 152 to 150 to shrink grey background thumbnail height 2012-07-10 16:58:37 +02:00
Jörn Friedrich Dreyer acb9612332 fix thumbnail size calculation, use const for THUMBNAIL_HEIGHT 2012-07-10 16:58:37 +02:00
Johannes Willnecker 02c9b03b8e Missing dir added. 2012-07-10 16:58:37 +02:00
Johannes Willnecker 570ea787f1 fixed typo 2012-07-10 16:58:37 +02:00
Johannes Willnecker 3e53bf4a86 Fix for oc-972, oc-1144 and oc-1191 2012-07-10 16:58:37 +02:00
Sam Tuke 91da4b05b7 fixed typos 2012-07-10 15:51:57 +01:00
Robin Appelman b470869114 when checking for updates in the filecache, explicitly state that we are querying a folder 2012-07-10 14:42:15 +02:00
Robin Appelman 71f9a6c093 dont throw errors when opening a dir using fopen over the smb streamwrapper 2012-07-10 14:40:25 +02:00
Robin Appelman b8a6ffe261 fix statcache for filenames containing non-alphanumeric characters in smb streamwrapper 2012-07-10 14:21:50 +02:00
Robin Appelman 7f57591ef1 suppress error when using is_dir on non directory in smb backend 2012-07-10 14:20:30 +02:00
Robin Appelman aeed130b3a improve caching smb results a bit 2012-07-10 14:20:19 +02:00
Robin Appelman 8a902d8f65 improve filecache support for smb 2012-07-10 14:20:11 +02:00
Robin Appelman a1fefea66f split share and root config for smb backend, also sanitize config a bit more 2012-07-10 14:19:51 +02:00
Robin Appelman 8fcce55e76 share code between smb and ftp filestorage backends 2012-07-10 14:19:40 +02:00
Robin Appelman 539e4a1813 smb filestorage backend 2012-07-10 14:19:31 +02:00
Jörn Friedrich Dreyer 528567ae4e gitignore phpStorm .idea metadata folder 2012-07-10 12:27:12 +02:00
Thomas Tanghus 9d2cbc88f0 Revert reversion of f5c329af98 :-P 2012-07-10 01:24:40 +02:00
Thomas Tanghus 34ac2ea1ba Don't escape assigned values. 2012-07-10 01:24:40 +02:00
Thomas Tanghus 861c379255 Make sure the proper DOM is loaded and the right address book gets expanded. 2012-07-10 01:24:40 +02:00
Thomas Tanghus 0744e5a172 Look for the right field :-P 2012-07-10 01:24:40 +02:00
Thomas Tanghus 7cb74a0bf3 Reduce variables assigned. 2012-07-10 01:24:40 +02:00
Thomas Tanghus 50462903d6 Revert "Delay fetching of carddata and set ETag and size instead."
This reverts commit f5c329af98.
2012-07-10 01:24:40 +02:00
Thomas Mueller b97eb3a48f fixing oc-1198 2012-07-09 23:50:26 +02:00
Georg Ehrke d0b625352c some work on subadmins 2012-07-09 21:51:19 +02:00
Bjoern Schiessle 43f00a2dc8 create uploads directory for ssl certificates if it didn't exists 2012-07-09 18:11:29 +02:00
Jörn Friedrich Dreyer e59a1806cf remove superfluous ?> at the end of .php files (left out apps/*/templates) 2012-07-09 16:51:16 +02:00
jfd b67199bb45 add css id attribute, minor fixes 2012-07-09 16:04:46 +02:00
Jörn Friedrich Dreyer 6f408c3651 add supersized slideshow 2012-07-09 15:13:23 +02:00
Bjoern Schiessle 77f07c672e remove hard coded path 2012-07-09 12:49:04 +02:00
Bjoern Schiessle 6bf1473f0e replace urlencoded slash 2012-07-09 11:58:16 +02:00
Bjoern Schiessle 82a57f0ce3 revert performance improvements in userExists() because it breaks new user creation 2012-07-09 10:31:50 +02:00
Bjoern Schiessle 32b476d6ec remove comments around code block 2012-07-09 10:19:19 +02:00
Bjoern Schiessle 7d41d3aba8 webdav ssl cleanup 2012-07-09 09:40:33 +02:00
Thomas Tanghus f5c329af98 Delay fetching of carddata and set ETag and size instead. 2012-07-09 01:48:42 +02:00
Thomas Tanghus 47aaca49a1 Rescan categories in small batches to reduce memory usage. 2012-07-09 00:16:14 +02:00
Thomas Tanghus d1cf787197 Move code to OC_Contacts_App::scanCategories(). 2012-07-09 00:15:37 +02:00
Thomas Tanghus 6116dc6b65 Added default parameter $reset to allow for incremental rescan. 2012-07-09 00:14:42 +02:00
Thomas Tanghus 6d123e90f3 Remove deleted address book from list. 2012-07-08 23:38:03 +02:00
Thomas Tanghus 0b6cd8d203 Simplify VCF generation. 2012-07-08 23:36:52 +02:00
Bart Visscher e8010209bb Custom chunking support 2012-07-08 22:11:36 +02:00
Thomas Tanghus 197086a952 Make it possible to import files using CR as eol. 2012-07-08 18:34:00 +02:00
Thomas Tanghus dc8193fccb Make it possible to import files using CR as eol. 2012-07-08 18:28:55 +02:00
Thomas Tanghus 334257d2b6 Implemented VCFExportPlugin. 2012-07-08 17:52:57 +02:00
Thomas Tanghus 3424785db0 Implemented Sabre iCalendar Export Plugin. 2012-07-08 16:58:17 +02:00
Thomas Tanghus 747b7fbbfe Set the loading class on the property being changed, not on its container. Now on all the places relevant ;-) 2012-07-08 16:17:10 +02:00
Thomas Tanghus f5c620006e Set the loading class on the property being changed, not on its container. Now on all the places relevant ;-) 2012-07-08 16:15:52 +02:00
Thomas Tanghus 97106f198f Set the loading class on the property being changed, not on its container. 2012-07-08 16:11:45 +02:00
Thomas Tanghus d730d3edd4 Set the loading class on the property being changed, not on its container. 2012-07-08 16:10:12 +02:00
Thomas Tanghus 25b95a9ec7 Improve checking for active addressbooks and creating default addressbook. 2012-07-08 15:41:38 +02:00
Thomas Tanghus 554cb2d3ab Add missing requesttoken. 2012-07-08 14:48:49 +02:00
Thomas Tanghus 47f96e2d5e Missing semi-colon. 2012-07-08 14:42:33 +02:00
Thomas Tanghus 746eef0d5c Format error response correctly. 2012-07-08 14:31:40 +02:00
Thomas Tanghus e6a60198e4 Return error messages in correct format. 2012-07-08 14:11:48 +02:00
Thomas Tanghus 2b22f0db0a Add missing requesttoken. 2012-07-08 13:28:12 +02:00
Lukas Reschke ea70ca3ce3 CSRF checks 2012-07-07 16:12:21 +02:00
Lukas Reschke 2c318f45f4 CSRF checks 2012-07-07 16:08:27 +02:00
Lukas Reschke 04a0755fd3 CSRF checks 2012-07-07 16:03:21 +02:00
Lukas Reschke b7c510a61a CSRF checks 2012-07-07 16:02:33 +02:00
Lukas Reschke 0abcf0a421 CSRF checks 2012-07-07 15:58:11 +02:00
Lukas Reschke c63db28eaf CSRF check 2012-07-07 15:54:52 +02:00
Lukas Reschke b46d3019ca Uninitialized variable 2012-07-07 15:52:49 +02:00
Lukas Reschke 777eb1d8b1 CSRF check in the settings 2012-07-07 15:27:04 +02:00
Georg Ehrke acb196e17f add group_admin table 2012-07-07 15:18:50 +02:00
Lukas Reschke ec7bb86b28 Fixes a problem with the user creation ("User already existed" even if the user don't exists.) Thanks to Phil Reinhardt for pointing this out. 2012-07-07 15:00:02 +02:00
Michael Gapczynski f955e5e9b2 Move line counter so we only count lines towards the offset that are equal or above the log level 2012-07-06 17:29:45 -04:00
Michael Gapczynski 0045e64041 Fix time formatting for minutes, prepend 0 if minutes is less than 10 2012-07-06 16:49:15 -04:00
Michael Gapczynski 90e4af312a Fix time formatting for minutes, prepend 0 if minutes is less than 10 2012-07-06 16:38:54 -04:00
Michael Gapczynski 466d7c0d99 Improvements and bug fix for log reading, fixes bug oc-982 2012-07-06 15:51:01 -04:00
Frank Karlitschek b967530795 increase the time limit again to a sensible granularity of 1 min.
Please talk to me before changing this.
2012-07-06 18:42:41 +02:00
Bjoern Schiessle ca26bcc581 close file after write process 2012-07-06 17:09:20 +02:00
Bjoern Schiessle e91b4bc2ac allow user to upload his own root certificate for secure webdav mount 2012-07-06 15:58:38 +02:00
Thomas Tanghus 75d01b065d Make export batch size configurable. 2012-07-06 13:49:04 +02:00
Thomas Tanghus cafbd02337 Fix endless loop when no addressbooks. 2012-07-06 13:24:56 +02:00
Thomas Tanghus a1872412bf Correct hack ;) 2012-07-06 12:59:07 +02:00
Thomas Tanghus ab1b4f1f03 Fugly fixed include. 2012-07-06 12:59:07 +02:00
Bjoern Schiessle 963faf6458 CURLOPT_SSL_VERIFYPEER=false shouldn't be in master 2012-07-06 12:35:29 +02:00
Bjoern Schiessle ba8dee0520 introduce subclassed client.php and revert changes to 3rdparty 2012-07-06 12:26:54 +02:00
Bjoern Schiessle 8353517969 use OC_Connector_Sabre_Client 2012-07-06 12:24:03 +02:00
Georg Ehrke f875240b47 comment out some code 2012-07-06 11:23:20 +02:00
Georg Ehrke 9a10efd80f Merge branch 'master' into calendar_import 2012-07-06 11:01:12 +02:00
Thomas Tanghus a5a1d929ca No need for being protected. 2012-07-06 03:22:42 +02:00
Thomas Tanghus 59b38e668d Missing requesttoken 2012-07-06 03:22:42 +02:00
Bart Visscher 5e0b80dc8d Contacts: Fix copy&paste error 2012-07-05 17:12:52 +02:00
Bjoern Schiessle 5bf050b13b moved performance improvement from isLoggedIn() to userExists() to avoid webdav problems 2012-07-05 15:55:46 +02:00
Bjoern Schiessle bd494f562f fixed faulty commit 2012-07-05 15:03:14 +02:00
Bjoern Schiessle 51774cca6b use OC_Filesystem for rollback 2012-07-05 14:20:40 +02:00
Bjoern Schiessle 378fa2bc86 check if caview really exists 2012-07-05 12:17:33 +02:00
Bjoern Schiessle 55cde0e5aa moved remove and rename hook to libs/hooks.php 2012-07-05 11:35:08 +02:00
Georg Ehrke c067930856 Merge branch 'master' into subadmin 2012-07-05 11:32:59 +02:00
Bjoern Schiessle aa3b575ceb disabled user upload of root certificates until sabredav client can handle them 2012-07-05 11:31:30 +02:00
Georg Ehrke aa95cf2c98 Merge branch 'master' into calendar_import 2012-07-05 11:30:37 +02:00
Bjoern Schiessle f86ecb3bf7 send ca cert path to sabredav client 2012-07-05 11:28:32 +02:00
Thomas Tanghus 9d00f4d2fb Correct db default value. 2012-07-05 00:40:11 +02:00
Thomas Tanghus dac2c14ae9 Add missing CSRF check. 2012-07-05 00:37:08 +02:00
Thomas Tanghus b11b6afbb9 Hopefully fix for drag'n'drop import in oc-813. 2012-07-05 00:25:38 +02:00
Thomas Tanghus 5d79444852 Missing update script. 2012-07-04 22:58:31 +02:00
Thomas Tanghus 706a13544b Remove ugly activation hack. 2012-07-04 22:13:36 +02:00
Georg Ehrke 7ec2d6ce85 Merge branch 'master' into calendar_import 2012-07-04 21:15:32 +02:00
Georg Ehrke a4c2893128 some more work on calendar import - new import is (nearly) done 2012-07-04 21:14:40 +02:00
Bart Visscher 280c59e914 More helpfull debug msg for redirectToDefaultPage 2012-07-04 17:51:07 +02:00
Bart Visscher 621b83df72 Remove referer check, this is unreliable. The header doesnt need te exist, or can be wrong 2012-07-04 17:51:07 +02:00
Bart Visscher 9ea34cae43 Simplified remote.php file loading 2012-07-04 17:51:07 +02:00
Georg Ehrke 5880bbee8f add miniColors 2012-07-04 17:37:47 +02:00
Bjoern Schiessle e258da5c3c certificate should be only visible for users 2012-07-04 17:22:04 +02:00
Bjoern Schiessle 5d61b85a1d allow users to upload ssl root certificates for the webdav client 2012-07-04 17:18:36 +02:00
Thomas Tanghus b2eac08ad3 Query contacts in batches of 20. Possible fix for oc-1126. 2012-07-04 16:54:00 +02:00
Thomas Tanghus 5fb9b3e965 Disable expires header on thumbnail and photo. 2012-07-04 15:32:41 +02:00
Sam Tuke 825d92d59c Added undo functionality to delete user procedure on user settings page 2012-07-04 14:30:42 +01:00
Thomas Tanghus 6d3afb3857 Moved action buttons down to the add field menu. Fixes oc-1155. 2012-07-04 13:57:07 +02:00
Thomas Tanghus f72a11f852 Moved action buttons down to the add field menu. Fixes oc-1155. 2012-07-04 13:49:39 +02:00
Georg Ehrke 657eef354a Merge branch 'master' into calendar_import 2012-07-04 13:03:30 +02:00
Brice Maron 3b09aa8578 Correct Postgresql connection with space in password. Work around php bug 2012-07-04 10:13:00 +00:00
Brice Maron 799e34acd4 Add slash to app url if not set fix oc-1169 2012-07-03 21:58:36 +00:00
Georg Ehrke 393eefa5d2 replace some direct links with OC.imagePath 2012-07-03 23:44:47 +02:00
Michael Gapczynski 1ad5e3e39f Add parameter to showDropDown to not show private link UI, only files can be shared as private links 2012-07-03 17:00:23 -04:00
Michael Gapczynski db33765e36 Add share with to list in dropdown after sharing 2012-07-03 16:52:53 -04:00
Georg Ehrke f98bd1ad66 Merge branch 'master' into calendar_import 2012-07-03 22:35:46 +02:00
Georg Ehrke c036700c54 some more work on calendar import 2012-07-03 22:33:24 +02:00
Michael Gapczynski 96dea9507a Return false for single item checks and an empty array for multiple item checks 2012-07-03 14:03:04 -04:00
Michael Gapczynski 5e8ef33190 Clean up in the dropdown for unsharing 2012-07-03 14:00:09 -04:00
Sam Tuke b1c9785eb3 Merge branch 'master' of gitorious.org:owncloud/owncloud
Conflicts:
	apps/files_versions/lib/versions.php
2012-07-03 18:17:32 +01:00
Sam Tuke a775deaf22 Moved hooks and versions.php into new lib directory
Part-ported filesystem operations to OC_FilesystemView
Refactored Storage class to depend on an OC_FsV object and have fewer static classes
2012-07-03 17:42:51 +01:00
Bjoern Schiessle aec6eea235 use filesystem abstraction layer to copy file versions 2012-07-03 18:25:49 +02:00
Michael Gapczynski 1e36e1f2cb Use formatted shared addressbook in all cases, addressbooks out of order now 2012-07-03 11:36:57 -04:00
Michael Gapczynski 4185bd6292 Load shared addressbooks inside OC_Contacts_Addressbook instead of the index, add public functions getItemShared(With)BySource() for contacts app 2012-07-03 11:11:01 -04:00
Georg Ehrke 641e77327e Merge branch 'master' into calendar_import 2012-07-03 16:48:30 +02:00
Georg Ehrke b6cff93254 fix spelling fail in code 2012-07-03 16:47:46 +02:00
Bjoern Schiessle 4bc9e4e012 wrong var name fixed 2012-07-03 16:43:57 +02:00
Georg Ehrke 0b3ed2b048 Merge branch 'master' into calendar_import 2012-07-03 16:39:09 +02:00
Georg Ehrke ca2b1f7863 fix encoding fail in calendar app - bugfix for oc-1194 2012-07-03 13:55:48 +02:00
Georg Ehrke cfcfdd674e Merge branch 'master' into calendar_import 2012-07-03 13:43:52 +02:00
Georg Ehrke 29a9559fa9 some work on calendar import dialog 2012-07-03 13:43:18 +02:00
Brice Maron 8a1c279183 Escape pg connection string on setup 2012-07-03 09:20:42 +02:00
Michael Gapczynski 77b582e4e6 Change getItems() return to a 3-dimensional array to handle multiple shares of the same item 2012-07-02 15:29:34 -04:00
Tom Needham 88cbbc86b8 Text editor: Always use UTF-8 to keep Ace happy. 2012-07-02 19:06:40 +00:00
Arthur Schiwon 0a6f7b33c3 LDAP: make it UTF-8 save 2012-07-02 20:31:19 +02:00
Arthur Schiwon 52822652bc provide multibyte aware helper functions mb_str_replace, mb_substr_replace and mb_array_change_key_case for handling with UTF 8 2012-07-02 20:31:19 +02:00
Michael Gapczynski dd56416a39 Remove the method getItemsSharedStatuses, it is easy enough to just pass the format instead 2012-07-02 14:23:13 -04:00
Bjoern Schiessle ab036d4764 webdav client crashes for secure connections if he doesn't have the right root certificate for ssl verification. For the moment I print at least a useful error message to the OC log and the Apache log 2012-07-02 17:52:51 +02:00
Arthur Schiwon 515adceace LDAP: reset resource on failed bind
check for resource
2012-07-02 14:03:29 +02:00
Lukas Reschke 90331a3fa1 Remove forced download 2012-07-02 12:20:43 +02:00
Lukas Reschke 0465129eba Remove the forced download§ 2012-07-02 12:19:48 +02:00
Lukas Reschke 47bad20132 Restoring stable4... 2012-07-02 10:47:45 +02:00
Lukas Reschke e29681e233 Applying the fix 2012-07-02 10:29:04 +02:00
Lukas Reschke 5223724809 Wrong file - Sorry! 2012-07-02 10:28:11 +02:00
Lukas Reschke f5e0e5587d Merge branch 'master' of gitorious.org:owncloud/owncloud 2012-07-02 10:25:53 +02:00
Lukas Reschke f8cebed348 Don't display error messages 2012-07-02 10:24:22 +02:00
Georg Ehrke e4960c3bb4 fix a small PHP fail 2012-07-02 10:23:32 +02:00
Lukas Reschke 4235ce0b63 Merge branch 'stable4' of gitorious.org:owncloud/owncloud into stable4 2012-07-02 10:22:33 +02:00
Lukas Reschke 134d5d93c8 Don't display error messages 2012-07-02 10:21:38 +02:00
Georg Ehrke e89a0949c4 remove some whitespace 2012-07-01 23:32:21 +02:00
Georg Ehrke 5ff72f2cd7 fix a small PHP fail 2012-07-01 21:51:46 +02:00
Georg Ehrke 8b5cae3c6c fix a small PHP fail 2012-07-01 21:50:53 +02:00
Georg Ehrke 803f2c2517 some work on calendar import 2012-07-01 21:36:09 +02:00
Michael Gapczynski eca2e073f8 Don't reload the page after sending private link to email address 2012-07-01 11:54:32 -04:00
Michael Gapczynski bf93dd4661 Don't reload the page after sending private link to email address 2012-07-01 11:53:29 -04:00
Michael Gapczynski ffadbfcef3 Prevent duplicate group showing in multiselect that added the group 2012-07-01 11:36:57 -04:00
Michael Gapczynski dd7d34a40e Prevent adding a duplicate to a multiselect 2012-07-01 11:36:44 -04:00
Michael Gapczynski 949cab7ea1 Add new group to other user's group select forms 2012-07-01 11:36:31 -04:00
Michael Gapczynski 5121c262e2 Revert "bugfix for #1098 (assigning a group to a user, the group appears incrementally many times the more you assign it)"
This reverts commit 265d7e50f5.
2012-07-01 11:35:58 -04:00
Michael Gapczynski 7ceba61413 Revert "bugfix for #1098 (assigning a group to a user, the group appears incrementally many times the more you assign it)"
This reverts commit 265d7e50f5.
2012-07-01 11:29:02 -04:00
Lukas Reschke fa7d4c2b39 Disable mimesniffing 2012-07-01 13:53:06 +02:00
Lukas Reschke 4e63981da9 Disable mimesniffing 2012-07-01 13:45:20 +02:00
Michael Gapczynski 3e8a34f906 Don't select all columns for FORMAT_STATUSES 2012-06-30 21:15:10 -04:00
Michael Gapczynski 0b9b1757fe Add share action to addressbooks! 2012-06-30 21:06:49 -04:00
Michael Gapczynski f456cee9d8 Fix fetching item type from share class element, comment out the auto hider for now since it doesn't work outside of the Files app 2012-06-30 21:06:04 -04:00
Michael Gapczynski 47f46890c8 Fix generateTarget() for contacts backend 2012-06-30 21:03:36 -04:00
Michael Gapczynski c073216d8d Don't overwrite the item variable when checking if the item is already shared 2012-06-30 20:57:31 -04:00
Georg Ehrke 6a060ecd23 use light grey instead of white 2012-07-01 01:02:54 +02:00
Tom Needham b2cb7d54d1 Fixed app path 2012-06-30 22:56:47 +00:00
Tom Needham cfc78d44bb Return correct json response, fix syntax 2012-06-30 22:56:47 +00:00
Tom Needham c7a4075aaa Updates contacts migration provider 2012-06-30 22:56:47 +00:00
Georg Ehrke be11f71d27 fix doc for OC_Calendar_Calendar::generateTextColor() 2012-07-01 00:31:05 +02:00
Georg Ehrke 601237a0c3 add algorithm to generate the calendar's text color 2012-07-01 00:09:33 +02:00
Michael Gapczynski 75c111a33b Have getItems() return an empty array instead of false, so apps only need to do an array_merge() 2012-06-30 18:00:01 -04:00
Michael Gapczynski 2418d9a1a9 Change registerBackend calls class argument to strings 2012-06-30 17:33:30 -04:00
Michael Gapczynski 7a649fc65a Switch back to registering just the class and not the object, better for performance 2012-06-30 17:25:21 -04:00
Georg Ehrke ce331bd1d3 improvements for dropoimport 2012-06-30 23:18:41 +02:00
Georg Ehrke a705b19cd5 little fix for import 2012-06-30 22:45:12 +02:00
Georg Ehrke f15941a967 improve dropimport 2012-06-30 22:26:29 +02:00
Georg Ehrke 4890bbb30d Merge branch 'master' into calendar_import 2012-06-30 22:08:36 +02:00
Georg Ehrke 376431fa0d import works now for dropimport 2012-06-30 22:08:30 +02:00
Georg Ehrke fa5b31ac9c fix documentation style 2012-06-30 17:09:20 +02:00
Florian Hülsmann 4ed55315e7 fixed linkTo() 2012-06-30 16:53:41 +02:00
Georg Ehrke 8e0addebc3 fix some doc 2012-06-30 15:39:20 +02:00
Georg Ehrke 34b2486d53 some improvements for calendar export 2012-06-30 15:23:21 +02:00
Georg Ehrke 390f5cc89f some work on (drop)import) 2012-06-30 15:17:29 +02:00
Tom Needham 51173163ce Contacts: align the bottom control buttons 2012-06-30 11:22:09 +00:00
Tom Needham 704a1c655e Contacts: fix add contact icon path 2012-06-30 11:07:54 +00:00
Georg Ehrke 433d15d309 Merge branch 'master' into calendar_import 2012-06-30 12:50:26 +02:00
Georg Ehrke 6e6f90a8a2 fix merge conflicts 2012-06-30 12:44:51 +02:00
Georg Ehrke 34d4eb8edd some more work on calendar import class 2012-06-30 12:42:36 +02:00
Michael Gapczynski edc6a648d1 Fix placeholder value for optional fields in external storage UI 2012-06-29 19:35:57 -04:00
Robin Appelman 2c35e185f7 make sure the filesystem is setup properly for oc_cache_file tests 2012-06-30 01:14:01 +02:00
Robin Appelman d43ed43b5a cant to ttl tests for xcache 2012-06-30 01:13:33 +02:00
Robin Appelman 252453cd34 fix encryption test cases when not logged in 2012-06-30 01:05:18 +02:00
Michael Gapczynski c992482e92 Prevent duplicate group showing in multiselect that added the group 2012-06-29 17:52:44 -04:00
Thomas Tanghus a4614f83ff Don't add duplicate contacts in the list when en-/disable an address book. 2012-06-29 23:18:47 +02:00
Michael Gapczynski 8e4832bd12 Prevent adding a duplicate to a multiselect 2012-06-29 16:44:08 -04:00
Michael Gapczynski 05cb94801a Add new group to other user's group select forms 2012-06-29 16:29:58 -04:00
Georg Ehrke 246894243a Merge branch 'master' into calendar_import 2012-06-29 21:46:09 +02:00
Michael Gapczynski 719c7f7f6e Fix WebDAV external storage opendir() and stat() for directories, bug fix for oc-1160 2012-06-29 13:01:00 -04:00
Bart Visscher 3ed7738d5e Increment user_openid version to load new app type 2012-06-29 18:38:04 +02:00
Bart Visscher f61793aa14 Coding style fixes 2012-06-29 18:38:04 +02:00
Bart Visscher 2b4ecbaba0 Whitespace fixes 2012-06-29 18:38:04 +02:00
Georg Ehrke 652a874fa6 fix displaying of events 2012-06-29 18:13:52 +02:00
Georg Ehrke 3bcf176a53 add some hooks to fix calendar sharing 2012-06-29 17:27:29 +02:00
Michael Gapczynski 7e9455c382 Allow multiple Google Drive and Dropbox external storages to be configured 2012-06-29 11:22:54 -04:00
Michael Gapczynski 2d49a491fb Clear the mount point value for the new mount point row 2012-06-29 11:10:51 -04:00
Michael Gapczynski f311c2a2ff Hide the delete button on new mount point row 2012-06-29 11:10:51 -04:00
Bjoern Schiessle 94add1c000 typo fixed 2012-06-29 16:49:22 +02:00
Georg Ehrke bda0026374 fix birthday calendar 2012-06-29 15:43:18 +02:00
Bjoern Schiessle b95996c02c - when creating a new text file or directory which name already exist use the same pattern as for file uploads in such a case (add a (N) to the name)
- don't allow renaming if a file/directory with the name already exists
2012-06-29 15:23:04 +02:00
Georg Ehrke 08e707d258 some work on OC_Calendar_Import 2012-06-29 14:32:07 +02:00
Bjoern Schiessle 60ec46f706 - remove leading http[s] to let createBaseUri() generate secure/unsecure base URI
- if secure is set to true add 's' to http
2012-06-29 12:01:23 +02:00
Frank Karlitschek bd908affa3 Merge branch 'master' of gitorious.org:owncloud/owncloud 2012-06-29 11:08:43 +02:00
Frank Karlitschek 6917d74193 move the ownCloud version to admin which makes more sense. A normal user can´t update ownCloud anyways. 2012-06-29 11:07:41 +02:00
Michael Gapczynski 9c083d3519 Fix setting custom quota size for users, bug fix for oc-1128 2012-06-28 21:26:39 -04:00
Robin Appelman 75af5778a4 pass progresskey the correct way during calender import 2012-06-29 00:49:37 +02:00
Michael Gapczynski 31bba86e87 Fix external storage UI for Admin page 2012-06-28 17:55:22 -04:00
Bart Visscher 1ccbbfad53 Spelling fix 2012-06-28 22:11:04 +02:00
Bart Visscher 02e4e0e08f Gallery: Get all the image information for a directory at once 2012-06-28 22:11:04 +02:00
Bart Visscher bf09edcbf1 Remember the app root information. 2012-06-28 22:11:04 +02:00
Bart Visscher 19bb4e83c9 Remove redundant code from OC_Helper::linkTo 2012-06-28 22:11:04 +02:00
Brice Maron b2cbf1199d Pg setup enhancement
do not create a db if already existing .. and reset the user password instead of creating if the user already exists
2012-06-28 19:38:03 +00:00
Georg Ehrke 91d92aed02 fix for previous commit 2012-06-28 19:13:43 +02:00
Georg Ehrke 4b3af1f73b use OC_Calendar_Export for publicly shared calendars 2012-06-28 19:12:50 +02:00
Georg Ehrke 930bbeabd4 Calendar Export: replace spaces with dashes in the name of the calendar / event 2012-06-28 19:04:14 +02:00
Georg Ehrke 9dd7ca2667 some changes and more doc for OC_Calendar_Export class 2012-06-28 18:54:13 +02:00
Georg Ehrke 9a4709e68d fix calendar export for Apple iCal - i hate bloody line ends 2012-06-28 16:41:00 +02:00
Georg Ehrke c4f5639cb4 Merge branch 'master' into calendar_export 2012-06-28 15:24:30 +02:00
Bjoern Schiessle bdd1baeb85 use public API 2012-06-28 14:18:57 +02:00
Bjoern Schiessle e5792cc064 adjust the name and/or location of the stored versions if the actual file gets moved or renamed 2012-06-28 14:06:20 +02:00
Bjoern Schiessle f22f49671b move hook to erase versions from deleted files to the right place 2012-06-28 12:42:47 +02:00
Bjoern Schiessle 52f99a7570 delete file versions if the user deletes a file 2012-06-28 11:48:57 +02:00
Bjoern Schiessle dac539b619 handover the correct timestamp 2012-06-28 11:46:17 +02:00
Georg Ehrke 3cea1b062e Merge branch 'master' into calendar_export 2012-06-28 09:27:54 +02:00
Michael Gapczynski 45e964c7aa Return login errors for PostgreSQL setup 2012-06-27 20:25:46 -04:00
Michael Gapczynski 81953e7bb5 Return login errors for PostgreSQL setup 2012-06-27 20:24:06 -04:00
Thomas Tanghus e04a605b9b No need for this anymore. 2012-06-28 01:51:42 +02:00
Thomas Tanghus a48aba316e Smoother profile picture loading - hopefully. 2012-06-28 01:46:33 +02:00
Michael Gapczynski db6139fd41 Don't overwrite fake directory stream for Amazon S3 storage 2012-06-27 19:44:52 -04:00
Tom Needham 426193cf6c Migration: Fix contacts and bookmarks 2012-06-27 21:18:31 +00:00
Thomas Tanghus 77b7f214d2 Load contactlist progressivly. 2012-06-27 22:44:28 +02:00
Tom Needham 7284e57c91 Migration: fix app paths 2012-06-27 20:43:33 +00:00
Georg Ehrke e029e8cb14 Merge branch 'master' into calendar_export 2012-06-27 22:27:55 +02:00
Georg Ehrke 8712754f8c fix style of some doc 2012-06-27 22:27:48 +02:00
Georg Ehrke 1f738d8c9f Merge branch 'master' into calendar_export 2012-06-27 22:24:12 +02:00
Brice Maron 2706988225 Set table prefix if not set in postgresql install 2012-06-27 16:08:46 -04:00
Michael Gapczynski 9b605969f1 Fixes in Dropbox API, try to catch Dropbox exceptions, implement rename and copy in Dropbox storage backend 2012-06-27 15:23:49 -04:00
Georg Ehrke 77c66e8cc4 move some documentation to the right place 2012-06-27 21:05:46 +02:00
Georg Ehrke 25a50f00bd add merge calendar function and add some documentation to OC_Calendar_Calendar 2012-06-27 20:56:58 +02:00
Michael Gapczynski b7f86cf282 Add Samba Share parameter to external storage UI 2012-06-27 12:24:21 -04:00
Michael Gapczynski 895d5707ee Don't overwrite fake directory stream for Shared storage 2012-06-27 12:09:11 -04:00
Michael Gapczynski 2c773d549d Don't overwrite fake directory stream for Shared storage 2012-06-27 12:07:42 -04:00
Michael Gapczynski 19f94774fb Don't overwrite fake directory stream for Dropbox and Google Drive 2012-06-27 12:04:33 -04:00
Bjoern Schiessle c0e86489c9 no reason to strip tags at this point 2012-06-27 17:56:00 +02:00
Bjoern Schiessle c67ae2e7f1 no reason to strip tags at this point 2012-06-27 15:56:14 +02:00
Bart Visscher 235515e84b Something like this should do it for sharing contacts 2012-06-27 15:44:42 +02:00
Bjoern Schiessle d5237c42bc Util::formatDate() expect $timestamp as double 2012-06-27 15:05:40 +02:00
Bart Visscher 2d8a380a21 Fix recursion when running an update script 2012-06-27 14:56:34 +02:00
Georg Ehrke 726bec73f0 Merge branch 'master' into oc_error 2012-06-27 14:06:31 +02:00
Georg Ehrke 90b5cf680f Merge branch 'master' into calendar_export 2012-06-27 14:05:11 +02:00
Georg Ehrke 153ce2f9ab Merge branch 'master' into calendar_import 2012-06-27 14:02:05 +02:00
Robin Appelman 12f7cb8767 fix running tests from cli 2012-06-27 13:21:45 +02:00
Robin Appelman 420d23a875 fix webdav errors for empty folders 2012-06-27 13:08:16 +02:00
Bjoern Schiessle 060a297260 enable highlighting of address in OSM. 2012-06-27 11:46:42 +02:00
Bjoern Schiessle 7af76e36e1 enable highlighting of address in OSM. 2012-06-27 11:41:52 +02:00
Michael Gapczynski 79da782892 Improve error handling of Dropbox storage backend 2012-06-26 20:37:50 -04:00
Thomas Tanghus 3edc40a68a Load default categories if there are none, 2012-06-27 02:12:53 +02:00
Thomas Tanghus 823bef3a09 Ensure event handlers are being set when adding first contact. 2012-06-27 02:12:53 +02:00
Thomas Tanghus afd9705283 Add check for return value. 2012-06-27 02:12:53 +02:00
Michael Gapczynski cb19fdd55b Show users and groups shared with in dropdown 2012-06-27 01:05:37 +02:00
Michael Gapczynski d95d738723 Fix FORMAT_STATUSES 2012-06-27 01:05:36 +02:00
Michael Gapczynski 578b8a9da1 $_POST variables should be $_GET for fetch 2012-06-27 01:05:36 +02:00
Michael Gapczynski b5961635ea Fix ajax share file and replace 'User or Group' select form with a textbox 2012-06-27 01:05:36 +02:00
Michael Gapczynski 9fdfcc29fe Fix group sharing 2012-06-27 01:05:36 +02:00
Bart Visscher b9e1033563 Basic framework for contacts sharing 2012-06-27 01:05:36 +02:00
Bart Visscher d332e1e9c1 Documentation fix 2012-06-27 01:05:36 +02:00
Michael Gapczynski c41cb192c9 Fix which line needs '' wrapped around the array values 2012-06-27 01:05:36 +02:00
Michael Gapczynski 243faf6334 Fix searching for parent item types, search for file source instead of item source for the file item type in case the item was converted 2012-06-27 01:05:36 +02:00
Michael Gapczynski 32f9901bcd Fix retrieving supported file extensions from backend and remove the dependsOn and supportedFileExtensions parameters from registerBackend() 2012-06-27 01:05:36 +02:00
Michael Gapczynski 28b7793d5b Fixes and change database table from sharing to share 2012-06-27 01:05:36 +02:00
Michael Gapczynski f21fdf14f9 Forgot I got rid of the class field backendTypes, use the array keys of the backends field instead 2012-06-27 01:05:36 +02:00
Michael Gapczynski bc68f14c4b Prepare drop down UI for share API 2012-06-27 01:05:36 +02:00
Michael Gapczynski 8198114615 Some more changes to getItems() and fixes in shared storage 2012-06-27 01:05:36 +02:00
Michael Gapczynski 5f1aa1b92e Fix additional getItems calls due to parameter change 2012-06-27 01:05:36 +02:00
Michael Gapczynski 71350bc618 I'm having trouble making up my mind... translateItem -> getItems() -> formatItems(). It may change again. Preparing shared storage for new api. 2012-06-27 01:05:36 +02:00
Michael Gapczynski 10986f00dc Use share type and share with in db instead of separate columns for user and group 2012-06-27 01:05:36 +02:00
Michael Gapczynski bd8769a7c5 Fixes for registering and fetching backends 2012-06-27 01:05:36 +02:00
Michael Gapczynski 945565f420 Move ajax and js files to core 2012-06-27 01:05:36 +02:00
Michael Gapczynski c7e0449a75 Finish parent folder implementation, change recursive delete process 2012-06-27 01:05:36 +02:00
Michael Gapczynski 0cc7ae904d Initial work on a share API 2012-06-27 01:05:36 +02:00
Bart Visscher 153ee9dcfa Check if app is enabled before loading in remote and public.php 2012-06-27 01:05:12 +02:00
Bart Visscher dab58f3464 Cache result of OC_App::getAppVersions 2012-06-27 01:05:12 +02:00
Bart Visscher 2f0b4983e9 Move app upgrade check to loading of apps 2012-06-27 01:05:12 +02:00
Thomas Tanghus a25ae4b4b6 Make Categories a bit quieter. 2012-06-27 01:03:53 +02:00
Frank Karlitschek d163fe02cd 4.0.4 2012-06-26 21:51:32 +02:00
Michael Gapczynski f55f13eebc Don't call getLocalFile() until you know it actually is music 2012-06-26 14:51:31 -04:00
Thomas Tanghus cad282b73f Added some error checking. 2012-06-26 18:15:24 +02:00
Thomas Tanghus 1b2d09f9ca Added missing requesttoken. 2012-06-26 18:15:24 +02:00
Thomas Tanghus d8b181cd84 Added error checking on all db queries. 2012-06-26 18:15:24 +02:00
Thomas Tanghus db115429f7 Added createUser hook. 2012-06-26 18:15:24 +02:00
Bjoern Schiessle de4a540ce6 Merge branch 'master' of gitorious.org:owncloud/owncloud 2012-06-26 16:30:34 +02:00
Thomas Tanghus 46e93168cd Fix variable name. 2012-06-26 16:06:52 +02:00
Bjoern Schiessle 7dc72a48cc Merge branch 'master' of gitorious.org:owncloud/owncloud 2012-06-26 15:48:21 +02:00
Georg Ehrke ae00f40b97 add OC_Calendar_Object::createUID() 2012-06-26 15:21:41 +02:00
Georg Ehrke b9ce4e1f40 add OC_Calendar_Object::createUID() 2012-06-26 15:20:29 +02:00
Bjoern Schiessle 9cb01bd093 xss fix 2012-06-26 14:27:50 +02:00
Georg Ehrke 4e53db3d9c Merge branch 'master' into oc_error 2012-06-26 14:17:32 +02:00
Georg Ehrke c7de74c471 Merge branch 'master' into calendar_export 2012-06-26 14:15:07 +02:00
Bjoern Schiessle 265d7e50f5 bugfix for #1098 (assigning a group to a user, the group appears incrementally many times the more you assign it) 2012-06-26 12:54:09 +02:00
Bjoern Schiessle 72b365842f bugfix for #1098 (assigning a group to a user, the group appears incrementally many times the more you assign it) 2012-06-26 12:51:32 +02:00
Bjoern Schiessle 595ff468f5 typo in js statement fixed 2012-06-26 10:36:33 +02:00
Bjoern Schiessle 18d5420744 typo in js statement fixed 2012-06-26 10:35:19 +02:00
Thomas Tanghus bf756293c6 Added signals. 2012-06-26 05:26:50 +02:00
Thomas Tanghus 8df59852a4 Adjust pic width a bit. 2012-06-26 04:09:45 +02:00
Thomas Tanghus ac4e19218e All is good ;-) 2012-06-26 02:47:59 +02:00
Thomas Tanghus b384d79bf8 Remove x-scrollbar from contacts list. 2012-06-25 23:32:03 +02:00
Bart Visscher 103ae6faa4 Media: Change includes in app.php to use the autoloader 2012-06-25 21:05:10 +02:00
Bart Visscher c6b9f613bb Cache: try to set the fast cache in the Broker 2012-06-25 21:05:10 +02:00
Bart Visscher fe0f281b4f Fix setting ETag header on cache miss 2012-06-25 21:05:10 +02:00
Bart Visscher 531c1c509c Cache: Add APC and XCache to global cache handler 2012-06-25 21:05:10 +02:00
Bart Visscher 4e4a1a4274 Cache: Use getUserCache cache in OC_Cache 2012-06-25 21:05:10 +02:00
Bart Visscher cae089df91 Cache: Create global cache in OC_Cache 2012-06-25 21:05:10 +02:00
Arthur Schiwon a72eddeef7 LDAP: compare base trees case insensitively 2012-06-25 20:54:21 +02:00
Arthur Schiwon fb53708d10 LDAP: compare base trees case insensitively 2012-06-25 20:53:45 +02:00
Thomas Tanghus 2250fb1159 Emit Completed. 2012-06-25 20:30:21 +02:00
Thomas Tanghus b1f3364eee Maybe fix out of memory..? 2012-06-25 19:42:38 +02:00
Brice Maron a52036f3ef Quick fix of multi app migration. Need a better solution 2012-06-25 17:37:30 +00:00
Thomas Tanghus 2ad93849ab Idiot proof dialog ;-) 2012-06-25 19:33:51 +02:00
Sam Tuke f374dae233 Added text ACS warning to admin's user settings page, and corresponding CSS styles 2012-06-25 18:04:10 +01:00
Thomas Tanghus dc4b891327 Better visual feedback and prevent drop on self. 2012-06-25 18:24:15 +02:00
Thomas Tanghus b8d6ad0431 Improve styling on draggables. 2012-06-25 18:24:15 +02:00
Sam Tuke 380f41136c Added placeholder msg to share with menu to clarify user list restricted to security context 2012-06-25 16:57:41 +01:00
Arthur Schiwon 9bb409d881 fix syntax error after merge 2012-06-25 17:34:28 +02:00
Thomas Tanghus ef93bf223a Try to conserve some memory. Should fix oc-1106 for master. 2012-06-25 17:26:44 +02:00
Thomas Tanghus ad5aa5ac15 Try to conserve some memory. Should fix oc-1106 for stable4. 2012-06-25 17:16:34 +02:00
Thomas Tanghus 42a5cd21b9 Missing requesttoken. 2012-06-25 17:15:33 +02:00
Thomas Tanghus ddf321d534 Merge branch 'stable4' of git://gitorious.org/owncloud/owncloud into stable4 2012-06-25 16:22:19 +02:00
Thomas Tanghus 56ed8ba70b Select which address book to add a contact to. Fixes oc-1071. 2012-06-25 16:21:29 +02:00
Brice Maron 09a9f5400e Trim url and path of appsroot to have and standart type of path fix oc-1107 2012-06-25 15:50:27 +02:00
Arthur Schiwon 594e19bddc LDAP: always sanitize DN and DN-containing attributes 2012-06-25 13:22:49 +02:00
Arthur Schiwon 3f6a7859c9 LDAP: cheaper userExists() implementation, fixes oc-1012 2012-06-25 13:22:00 +02:00
Arthur Schiwon d64a7716f1 LDAP: always sanitize DN and DN-containing attributes 2012-06-25 13:22:00 +02:00
Bjoern Schiessle a09a01a49f sanitizeHTML() has to be called later to keep the path unchanged 2012-06-25 12:44:54 +02:00
Bjoern Schiessle 85ac75b4f4 xss vulnerability fixed 2012-06-25 12:38:11 +02:00
Frank Karlitschek a4c47c674d write sql errors into the error log for better debugging 2012-06-25 11:55:51 +02:00
Bjoern Schiessle 9ee528bc74 Only delete existing thumbnails (bug #1100) 2012-06-25 10:15:20 +02:00
Bjoern Schiessle 0083dbb3ce Only delete existing thumbnails (bug #1100) 2012-06-25 10:11:06 +02:00
Thomas Tanghus 5ac4830e75 XSS fix. 2012-06-25 05:03:30 +02:00
Thomas Tanghus c3130919c2 Allow direct link to app. 2012-06-25 05:02:01 +02:00
Thomas Tanghus 052bd8efbb Drag'n'Drop contacts between addressbook. Still needs some css magic. 2012-06-25 03:42:27 +02:00
Brice Maron 51d33768b8 Prevent errors and mini enhancement of saved window in bookmarks 2012-06-24 21:30:14 +00:00
Brice Maron 0fb9d0bf29 Correct bookmark app : add through interface and remove missing css 2012-06-24 21:24:43 +00:00
Brice Maron 564cd82599 Fix the fix about filecache and postgres 2012-06-24 20:49:48 +00:00
Thomas Tanghus e845e56749 Remove excessive debugging. 2012-06-24 22:25:32 +02:00
Thomas Tanghus 3afbc3d2dc Add some DRYness to logging. 2012-06-24 22:25:32 +02:00
Thomas Tanghus f10c51193b Fixed function name. 2012-06-24 22:25:32 +02:00
Thomas Tanghus df1eca4fa2 Also load categories from VJOURNAL. 2012-06-24 22:25:32 +02:00
Brice Maron 2a6a155e23 Correct File cache error with postgresql 2012-06-24 19:52:30 +00:00
Brice Maron 61adae1e49 Use intervals for sessions deletion with postgres fix oc-492 2012-06-24 19:41:23 +00:00
Brice Maron f56b3df0bc Resolve scanning issue case comparison of songs 2012-06-24 16:03:25 +00:00
Brice Maron c53a8fa541 Correct seq name in media songs fix oc-589 2012-06-24 16:02:41 +00:00
Brice Maron 6da926f1c3 Resolve scanning issue case comparison of songs 2012-06-24 15:58:51 +00:00
Brice Maron 5b908209de Correct seq name in media songs fix oc-589 2012-06-24 15:12:05 +00:00
Thomas Tanghus 0f9b9fa111 Remove unneeded parameter. 2012-06-24 16:07:18 +02:00
Thomas Tanghus 5393c0cfed Click to select which address book to add to. 2012-06-24 16:03:10 +02:00
Thomas Tanghus b182e6c86a Trim trailing whitespace from version. 2012-06-24 15:07:44 +02:00
Thomas Tanghus 9e6d2f2f82 Improve prev/next selection on delete. 2012-06-24 15:07:44 +02:00
Frank Karlitschek ac358ed1b3 4.0.3a
Two important fixes after 4.0.3
2012-06-24 11:38:54 +02:00
Brice Maron 0ab6e2ee3d Try to fix the remote pbm. fix oc-1090 2012-06-24 08:06:42 +00:00
Georg Ehrke a12557ca4d another fix for oc-1044 2012-06-24 09:42:14 +02:00
Georg Ehrke ca5de26bac another fix for oc-1044 2012-06-24 09:41:37 +02:00
Georg Ehrke a113ee9e9f add x-webkit-speech to searchbox 2012-06-24 00:42:16 +02:00
Robin Appelman 44e36ecf49 fix 'files' entries showing up in Files before the users files are scanned properly 2012-06-23 23:42:54 +02:00
Robin Appelman f1e4c845ce fix duplicates showing up in the filecache 2012-06-23 23:32:44 +02:00
Georg Ehrke 51c5e7035e Merge branch 'master' into oc_error 2012-06-23 19:54:20 +02:00
Georg Ehrke 17e289aef2 Merge branch 'master' into calendar_export 2012-06-23 19:54:12 +02:00
Florian Hülsmann 7109c7ea1c Merge branch 'master' of gitorious.org:owncloud/owncloud 2012-06-23 17:01:28 +02:00
Florian Hülsmann d450560b39 remove trailing slash in %appswebroot% placeholder 2012-06-23 16:59:55 +02:00
Tom Needham 1c0e72cd5a Text editor: Waste less space for line numbers 2012-06-23 14:43:52 +00:00
Tom Needham 6e5573acb5 Merge branch 'master' of gitorious.org:owncloud/owncloud 2012-06-23 14:42:54 +00:00
Tom Needham 5323983fc7 Text editor: Waste less space for line numbers 2012-06-23 14:42:37 +00:00
Frank Karlitschek 2c1c1ba88c close only if exist 2012-06-23 16:21:47 +02:00
Frank Karlitschek a8868fa007 work with non existing apps directory. thanks toAntonio for the hint 2012-06-23 16:20:31 +02:00
Frank Karlitschek 7c5ff900d0 work with non existing apps directory. thanks to Antonio for the hint 2012-06-23 16:17:59 +02:00
Brice Maron d39d7fb9ff Remove references to /apps/ and correct inclusion of settings 2012-06-22 22:05:39 +00:00
Brice Maron 33165e3915 Do not close php tag on config file 2012-06-22 21:01:12 +00:00
Brice Maron b5e3e150eb Correction of path looking for apps and css 2012-06-22 20:58:52 +00:00
Bart Visscher ded9ea5ad3 Spelling fixes 2012-06-22 22:57:35 +02:00
Bart Visscher ea3a6d9fcf Merge resource error-suppressing fix 2012-06-22 22:54:25 +02:00
Bart Visscher 2e6e154475 Gallery: Fix opening folders with a ' in the name 2012-06-22 22:46:12 +02:00
Georg Ehrke 243f910ae4 Merge branch 'master' into oc_error 2012-06-22 21:37:03 +02:00
Georg Ehrke 0939b1b0ab Merge branch 'master' into calendar_export 2012-06-22 21:36:51 +02:00
Bart Visscher f4b937c6fe Simplify search result js code 2012-06-22 20:31:59 +02:00
Michael Gapczynski 618a3c1d94 Fix removing personal mounts 2012-06-22 12:22:42 -04:00
Michael Gapczynski b650f46698 Fix variable checks for mounting Google Drive 2012-06-22 12:22:42 -04:00
Tom Needham b591c83008 Text Editor: fix editor positioning 2012-06-22 16:20:09 +00:00
Tom Needham 41cfd55f55 Merge branch 'master' of gitorious.org:owncloud/owncloud 2012-06-22 16:17:23 +00:00
Bart Visscher ebfc5b2762 Add compatability function for APC cache 2012-06-22 17:21:57 +02:00
Bart Visscher f655981baf Fix initialization of OC_Filesystem setup from DAV 2012-06-22 17:21:56 +02:00
Bart Visscher 96ec7a66bb More session_write_close 2012-06-22 17:21:56 +02:00
Bart Visscher 50667dcb82 Convert OC_L10N_String to a string in OC_JSON::encodedPrint 2012-06-22 17:21:56 +02:00
Bart Visscher 432aa58bab Spelling fixes 2012-06-22 17:21:56 +02:00
Bart Visscher 60f558cdbb Fix initialization of OC_Filesystem setup from DAV 2012-06-22 17:20:10 +02:00
Tom Needham 0aafc717ec Text Editor: fix editor positioning 2012-06-22 15:02:03 +00:00
Bjoern Schiessle 036530b2fd log messages are looking nicer if html code gets interpreted. (xss prevention happens on another place) 2012-06-22 17:00:56 +02:00
Bjoern Schiessle e943f6c0c8 log messages are looking nicer if they are not escaped. (xss prevention happens on another place) 2012-06-22 16:53:45 +02:00
Thomas Mueller aade44471d pdf viewer no longer 'eats' keyboard input 2012-06-22 16:10:25 +02:00
Brice Maron 2d2366bb57 Avoid fetch ocs info if the appstore is disabled 2012-06-22 16:06:46 +02:00
Brice Maron 06e20fe4b8 Correct css inclusion with minimizer 2012-06-22 15:21:44 +02:00
Thomas Tanghus 1f06cdf81f Small js fix. 2012-06-22 14:27:46 +02:00
Thomas Tanghus 07124ee38d Cast translation to string. 2012-06-22 14:27:46 +02:00
Bjoern Schiessle e1fa9c282b xss vulnerabilities fixed 2012-06-22 14:11:57 +02:00
Bjoern Schiessle 033d372f98 Merge branch 'master' of gitorious.org:owncloud/owncloud 2012-06-22 14:03:59 +02:00
Bjoern Schiessle b6c862b32f use sanitizeHTML() function
Conflicts:

	apps/gallery/lib/tiles.php
2012-06-22 14:03:05 +02:00
Bjoern Schiessle 5b46734a40 xss vulnerability fixed 2012-06-22 13:58:15 +02:00
Brice Maron 115c30bdb4 Enhance hint about writable app directory 2012-06-22 13:57:54 +02:00
Brice Maron 8c2803a7c1 Correct image path and apps path replacement 2012-06-22 13:12:03 +02:00
Arthur Schiwon e5171da300 remove unnecessary closing PHP tag 2012-06-22 12:50:49 +02:00
Arthur Schiwon 19931e2008 remove unnecessary closing PHP tag 2012-06-22 12:49:56 +02:00
Brice Maron 72fe463f7f Correct OC_Config writer. Use var_export (has support for array,...) 2012-06-22 12:46:21 +02:00
Arthur Schiwon 0d9534eb4b LDAP: cheaper userExists() implementation 2012-06-22 12:43:09 +02:00
Arthur Schiwon bef9b671ee LDAP: cheaper userExists() implementation 2012-06-22 12:42:07 +02:00
Brice Maron df60d6d5d2 Fixes for multi app dir :
Url should be given as relative path (to webroot)
Correct link construction from js
2012-06-22 12:24:56 +02:00
Bjoern Schiessle 65c14e21ce date don't change correctly in the view list (bug #973) fixed 2012-06-22 11:32:57 +02:00
Bjoern Schiessle 8c28aec664 date don't change correctly in the view list (bug #973) fixed 2012-06-22 11:30:40 +02:00
Brice Maron e5d458c068 Correct File cache error with postgresql 2012-06-22 10:46:49 +02:00
Thomas Mueller ba2d203a54 some path fixes for multi-dir app 2012-06-22 09:56:54 +02:00
Frank Karlitschek ca6339c480 4.0.3 2012-06-22 09:25:41 +02:00
Brice Maron b5953e7a83 Provide solution for smoother migration for apps to multi-app dir 2012-06-21 22:22:36 +00:00
Brice Maron fcaf04cad9 Add little more doc about app folders 2012-06-21 22:00:48 +00:00
Bart Visscher 82f39d3292 Contacts: Fix name and carddav-url encoding 2012-06-21 23:30:04 +02:00
Bart Visscher fd23c286ef Calendar: Fix caldav url encoding 2012-06-21 23:30:04 +02:00
Bart Visscher 4a22f4ca78 Calendar: convert choosecalendar.rowfields template from plain php to html+php 2012-06-21 23:30:04 +02:00
Bart Visscher 1d07b9e291 Calendar: Missing userid in allCalendars call 2012-06-21 23:30:04 +02:00
Bart Visscher c047fdafdb Calendar: Fix missing template parameter 'shared' for new and update calendar 2012-06-21 23:30:04 +02:00
Brice Maron f46623da6c Do not search apps if oc is not yet installed 2012-06-21 21:29:18 +00:00
Brice Maron 95b5202893 Correct usage of approot 2012-06-21 21:13:12 +00:00
Thomas Tanghus d72b85684f Only search for VEVENTs. 2012-06-21 20:53:50 +02:00
Bart Visscher 9045557258 Tasks: Add delete action 2012-06-21 20:18:12 +02:00
Bart Visscher d75b5cfdd2 Tasks: Use list label for ordering by list 2012-06-21 20:18:08 +02:00
Bart Visscher dda56c5e3d Tasks: Fix position of the summary input 2012-06-21 20:17:49 +02:00
Bart Visscher bae592d69b Prefer requested app before redirecting to default page 2012-06-21 20:15:23 +02:00
Bart Visscher a7e427a3cc Remember result of OC_User::isLoggedIn, can be very expensive to check 2012-06-21 20:14:53 +02:00
Bart Visscher 8aa7ed39a5 Only check for apps owncloud version requirment when there is a new owncloud version 2012-06-21 20:13:30 +02:00
Robin Appelman 46ad51cbe2 dont change the encryption key during the test case 2012-06-21 18:53:52 +02:00
Robin Appelman bd8b921de4 only use 1 fsview when initializing encryption 2012-06-21 18:36:16 +02:00
Michael Gapczynski bf6abdde2d Add missing ')' 2012-06-21 12:26:06 -04:00
Brice Maron a5938e4e37 Merge branch 'master' into multi_app_dir 2012-06-21 20:19:31 +00:00
Thomas Tanghus 37d12144c2 Fix URL delimiter. 2012-06-21 22:03:57 +02:00
Thomas Tanghus ad7154b344 Fix being able to link directly to contact, that I broke in other commit. 2012-06-21 22:02:17 +02:00
Brice Maron 84b9ac2678 Correct writable check for app dir 2012-06-21 19:35:34 +00:00
Brice Maron d22f805b63 Correct inclusion paths 2012-06-21 19:19:39 +00:00
Thomas Tanghus b17bf59ced Only search for VEVENTs. 2012-06-21 20:51:23 +02:00
Bart Visscher b17e682609 Tasks: Add delete action 2012-06-21 19:49:28 +02:00
Bart Visscher 10351550cd Tasks: Use list label for ordering by list 2012-06-21 19:49:28 +02:00
Bart Visscher b9e3b0ddf9 Tasks: Fix position of the summary input 2012-06-21 19:49:28 +02:00
Brice Maron e5c56b2433 Merge branch 'master' into multi_app_dir
Conflicts:
	lib/app.php
	lib/base.php
	lib/minimizer/css.php
	lib/minimizer/js.php
	lib/template.php
	lib/util.php
2012-06-21 17:15:35 +00:00
Sam Tuke a9a913c273 Implemented deleteAll() method in OC_FilesystemView (interface) and OC_Filestorage_Common (logic)
Made OC_Filestorage_Local and OC_Filestorage_Shared extend OC_Filestorage_Common
Set searchInDir() to protected instead of private in OC_Filestorage_Local and OC_Filestorage_Shared
Added class documentation to OC_Filestorage_Common
Cleaned up OCA_Versions::expireAll()
2012-06-21 18:15:22 +01:00
Robin Appelman 49033ff8e0 dont change the encryption key during the test case 2012-06-21 18:53:10 +02:00
Robin Appelman 6707e4187e only use 1 fsview when initializing encryption 2012-06-21 18:35:12 +02:00
Robin Appelman 56de98ed8c fix saved file size for uploaded files 2012-06-21 18:22:18 +02:00
Robin Appelman da9107fe69 fix saved file size for uploaded files 2012-06-21 18:07:56 +02:00
Robin Appelman 7b4cb44af8 truncate decrypted files based on size 2012-06-21 17:51:54 +02:00
Robin Appelman d0455c5819 truncate decrypted files based on filelength 2012-06-21 17:38:00 +02:00
Bjoern Schiessle 1338279ca0 Merge branch 'master' of gitorious.org:owncloud/owncloud 2012-06-21 16:42:16 +02:00
Georg Ehrke 49d9eb7acf fix calendar 2012-06-21 16:24:05 +02:00
Georg Ehrke 096f5598b4 fix calendar 2012-06-21 16:23:13 +02:00
Sam Tuke 7c3f6f61db Fixed missing jQuery event object - expire interface now works with Firefox 2012-06-21 14:54:24 +01:00
Georg Ehrke 288c5e7581 fix a PHP Notice 2012-06-21 15:20:53 +02:00
Georg Ehrke f5740a6f92 fix a PHP Notice 2012-06-21 15:20:15 +02:00
Frank Karlitschek 5212fa3fa7 check if the data directory is accessible via http. Show a big security warning if yes 2012-06-21 14:18:43 +02:00
Frank Karlitschek e95055b2bd check if the data directory is accessible via http. Show a big security warning if yes 2012-06-21 14:07:04 +02:00
Bjoern Schiessle 34739b7ec5 use new sanitizeHTML() function 2012-06-21 13:57:18 +02:00
Bjoern Schiessle 3b4d2a971a check if user is allowed to edit bookmarks 2012-06-21 12:29:50 +02:00
Bjoern Schiessle 09d2f76727 Merge branch 'master' of gitorious.org:owncloud/owncloud 2012-06-21 11:51:50 +02:00
Bjoern Schiessle 2f9763d216 check if user is allowed to edit bookmarks 2012-06-21 11:50:51 +02:00
Georg Ehrke 37ed3b5bd2 make edit event form work with DateTime Property UTC 2012-06-21 11:35:58 +02:00
Georg Ehrke 1db2539223 make edit event form work with DateTime Property UTC 2012-06-21 11:35:20 +02:00
Bjoern Schiessle 8870d36776 Merge branch 'master' of gitorious.org:owncloud/owncloud 2012-06-21 10:29:08 +02:00
Bjoern Schiessle cd005e6c62 use new sanitizeHTML() function 2012-06-21 10:28:43 +02:00
Georg Ehrke 96d0b9834a fix mimetype for cdr files - bugfix for oc 559 2012-06-21 09:58:38 +02:00
Georg Ehrke 43674b1759 fix mimetype for cdr files - bugfix for oc 559 2012-06-21 09:58:04 +02:00
Bjoern Schiessle f8ec280b6e correct presentation of HTML encoded characters 2012-06-21 09:44:20 +02:00
Georg Ehrke 4d312f7849 Merge branch 'master' into oc_error 2012-06-21 09:08:38 +02:00
Georg Ehrke 82e8cb23fe Merge branch 'master' into calendar_export 2012-06-21 09:08:26 +02:00
Michael Gapczynski cc3835d657 Only call OC_FileCache::get('/Shared') if it exists in the file cache, prevents premature addition of the Shared folder to the file cache
Conflicts:

	lib/fileproxy/quota.php
2012-06-20 19:39:17 -04:00
Michael Gapczynski 6524f6ad30 Only call OC_FileCache::get('/Shared') if it exists in the file cache, prevents premature addition of the Shared folder to the file cache 2012-06-20 19:24:45 -04:00
Bart Visscher fedfa4c98e DateTime objects are directly comparable 2012-06-20 21:38:56 +02:00
Bart Visscher a6dc7345d0 Gallery: Move code/js/css from main template to the right place 2012-06-20 21:28:37 +02:00
Thomas Tanghus 10a0d5a46c More changes for updating the contacts list. 2012-06-20 21:00:49 +02:00
Thomas Tanghus dc8c188ffe Better error checking. 2012-06-20 21:00:49 +02:00
Thomas Tanghus 426ed27be2 Make sure address books are shown even if empty. 2012-06-20 21:00:49 +02:00
Thomas Tanghus 0f1fe0b505 Log error as ERROR. 2012-06-20 21:00:49 +02:00
Robin Appelman e43d02fadb fix encrypted flags not being saved correctly 2012-06-20 20:18:42 +02:00
Robin Appelman 9ba467d629 fix encryption for binary files 2012-06-20 20:18:42 +02:00
Robin Appelman 0f2600e9ea add binary test case for encryption 2012-06-20 20:18:41 +02:00
Robin Appelman e3f1507374 use absolute path for file proxies 2012-06-20 20:18:41 +02:00
Georg Ehrke 69d7c763a9 Merge branch 'master' into oc_error 2012-06-20 20:15:17 +02:00
Georg Ehrke 40e7b56783 Merge branch 'master' into calendar_export 2012-06-20 20:15:07 +02:00
Georg Ehrke 7d0d1ebd4f Merge branch 'master' into oc_error 2012-06-20 20:14:15 +02:00
Georg Ehrke 0f13cbb47d Merge branch 'master' into calendar_repeat 2012-06-20 20:14:08 +02:00
Georg Ehrke c1d205cbf5 Merge branch 'master' into calendar_export 2012-06-20 20:14:03 +02:00
Arthur Schiwon d0dbc8beab make bookmarks bookmarklet work again, kudos to Victor Dubiniuk 2012-06-20 20:04:41 +02:00
Arthur Schiwon f255ac8b3a make bookmarks bookmarklet work again, kudos to Victor Dubiniuk 2012-06-20 20:03:25 +02:00
Arthur Schiwon 4b231c15d5 bookmarks: make read later-button draggable again, fixes oc-944 2012-06-20 19:43:02 +02:00
Sam Tuke 72215a818d added new user settings interface for deleting old file versions
fixed OCA_VersionsexpireAll() to use native PHP readdir()
removed local storage implementation of readdir()
2012-06-20 18:25:12 +01:00
Sam Tuke d6bf62ea4e Merge branch 'master' of gitorious.org:owncloud/owncloud 2012-06-20 16:26:02 +01:00
Sam Tuke c244daac89 removed readdir to fix bug oc-1054 2012-06-20 16:24:49 +01:00
Bart Visscher 6308ca6b8a Merge branch 'shared_log' 2012-06-20 17:20:46 +02:00
Bart Visscher 0086639891 Merge branch 'audit' 2012-06-20 17:20:39 +02:00
Bart Visscher 7a3d606cac Prefer requested app before redirecting to default page 2012-06-20 17:10:49 +02:00
Bart Visscher 6404476bec Delay setup of FS until OC_Filesystem is used 2012-06-20 17:10:49 +02:00
Bart Visscher cd934d5d89 Adjust OC_Filesystem use in hooks to string, so the class is loaded as late as possible 2012-06-20 17:10:49 +02:00
Bart Visscher 5c8e774cea Small code reorder 2012-06-20 17:10:48 +02:00
Bjoern Schiessle 5cc75ad818 Merge branch 'stable4' of gitorious.org:owncloud/owncloud into stable4 2012-06-20 17:08:48 +02:00
Bjoern Schiessle e71dffcdf0 no need to escape the title 2012-06-20 17:01:07 +02:00
Bjoern Schiessle 8e427d80d3 use sanitizeHTML() function 2012-06-20 17:00:55 +02:00
Bjoern Schiessle 0e61b5457b use new sanitizeHTML() function 2012-06-20 17:00:33 +02:00
Bjoern Schiessle 902c649dad use new sanitize HTML function backported
Conflicts:

	lib/template.php
2012-06-20 16:59:51 +02:00
Bjoern Schiessle d9607df26f backport of sanitizeHTML() function 2012-06-20 16:43:31 +02:00
Arthur Schiwon a7f0811829 bookmarks: make read later-button draggable again, fixes oc-944 2012-06-20 16:31:22 +02:00
Bjoern Schiessle 6644511124 remove unnecessary comment 2012-06-20 16:29:19 +02:00
Bjoern Schiessle e52230d11c no need to escape the title 2012-06-20 15:41:05 +02:00
Bjoern Schiessle 5a2c93ec2d use sanitizeHTML() function 2012-06-20 15:11:14 +02:00
Georg Ehrke a054541df4 Merge branch 'master' into oc_error 2012-06-20 13:29:17 +02:00
Georg Ehrke 572dd9fbad Merge branch 'master' into calendar_repeat 2012-06-20 13:29:12 +02:00
Georg Ehrke 27c995230c Merge branch 'master' into calendar_export 2012-06-20 13:28:30 +02:00
Bjoern Schiessle 1ecbf459c9 Merge branch 'master' of gitorious.org:owncloud/owncloud 2012-06-20 13:01:55 +02:00
Arthur Schiwon 5b02217906 forgotten $, incorrect subtract 2012-06-20 12:47:31 +02:00
Arthur Schiwon 7c6b8475eb LDAP: only map users within the User Base Tree 2012-06-20 12:47:24 +02:00
Arthur Schiwon 0289f442a8 forgotten $, incorrect subtract 2012-06-20 12:41:30 +02:00
Bjoern Schiessle 8d89bba07c use new sanitizeHTML() function 2012-06-20 12:23:26 +02:00
Robin Appelman c4d1363419 don't show other users file if the filesystem is not index already 2012-06-20 11:35:45 +02:00
Robin Appelman 13a9ef36fb don't show other users file if the filesystem is not index already 2012-06-20 11:34:17 +02:00
Bart Visscher 311c2bc0d3 Calendar: Write-close session to enable parallel events.php requests 2012-06-19 23:18:26 +02:00
Bart Visscher 0524f6fd3c Fix webdav property name compare 2012-06-19 23:18:07 +02:00
Bart Visscher 2d4e1b45ce Load app before running update script 2012-06-19 23:17:40 +02:00
Bart Visscher c260db0e9a Tasks: Fix resizing of the content part 2012-06-19 23:17:14 +02:00
Bart Visscher 0d43d6402d Tasks: Use POST for ajax calls that change data 2012-06-19 23:17:00 +02:00
Bart Visscher cff1b6e699 Don't use substr to get first char of string 2012-06-19 23:16:17 +02:00
Bart Visscher bb649dd0d5 Smarter code for OC_FileProxy
Conflicts:

	lib/fileproxy.php
2012-06-19 23:15:33 +02:00
Bart Visscher 598a090db4 Add cache for getStorage and getInternalPath functions.
These are called for almost every file operation.
2012-06-19 23:13:24 +02:00
Bart Visscher e728635c8a Add stat cache to OC_Connector_Sabre_Node and OC_Connector_Sabre_File
Speeds up access of directories with large number of files.
2012-06-19 23:13:21 +02:00
Bart Visscher 4d627d66a1 Add help texts to config options in config.sample.php 2012-06-19 23:11:54 +02:00
Bart Visscher 98bc916016 Make check for writable apps dir configurable
Conflicts:

	config/config.sample.php
2012-06-19 23:11:14 +02:00
Bart Visscher f54ef5a464 Remove OC::$CONFIG_DATADIRECTORY, not used 2012-06-19 22:54:14 +02:00
Bart Visscher d8b32c2f0e Move check code from setupFS to checkServer 2012-06-19 22:54:13 +02:00
Thomas Mueller 637f8398ba fixes oc-668 2012-06-19 22:37:25 +02:00
Sam Tuke 28a72e0e3c Fixed deleteAll function for deleting all old versions of files (expireAll)
Added new readdir() method to all storage classes and handlers (only working implementation in local.php)
2012-06-19 19:42:40 +01:00
Bjoern Schiessle f11e4d7cd6 removing sanitizeHTML() function from template.php since I moved it to util.php
to make it more generic.
2012-06-19 19:29:43 +02:00
Bart Visscher 4b6f6291c5 Remember result of OC_User::isLoggedIn, can be very expensive to check 2012-06-19 17:54:19 +02:00
Bjoern Schiessle 089ae980c4 use new sanitize HTML function 2012-06-19 17:24:55 +02:00
Bjoern Schiessle d2936bd90c introducing a sanitize HTML function for the internal and the public API. This
allows to easily convert strings to HTML before displaying them on the web page
to reduce the risk of xss vulnerabilities.
2012-06-19 17:20:19 +02:00
Thomas Tanghus 0b9a48b4b6 Re-add missing loadhandlers() call. 2012-06-19 14:56:21 +02:00
Thomas Tanghus 33aec973df Loading of contacts was placed outside of $(document).ready() function. 2012-06-19 14:55:14 +02:00
Georg Ehrke 5ce0097b6f Calendar: only run ->expand if the event is repeating 2012-06-19 13:30:45 +02:00
Georg Ehrke 2b2da6fe35 Calendar: js fix 2012-06-19 13:26:55 +02:00
Georg Ehrke c8c105df33 Calendar: fix modifying of end DateTime object 2012-06-19 13:04:11 +02:00
Georg Ehrke ccacb6f918 Merge branch 'master' into oc_error 2012-06-19 11:30:18 +02:00
Georg Ehrke a38463d41a Merge branch 'master' into calendar_repeat 2012-06-19 11:30:12 +02:00
Georg Ehrke 8a8dda726c Merge branch 'master' into calendar_export 2012-06-19 11:30:06 +02:00
Bjoern Schiessle 1b142a1155 quota calculation fixed 2012-06-19 09:36:50 +02:00
Bjoern Schiessle 0469f529fa quota calculation fixed 2012-06-19 09:35:13 +02:00
Arthur Schiwon 244920aeb0 LDAP: only map users within the User Base Tree 2012-06-19 01:15:58 +02:00
Victor Dubiniuk db7542b640 Reverting 249190c89b. Fixed in master 2012-06-19 00:56:48 +03:00
Thomas Mueller c1df0539a0 fixes oc-668 2012-06-18 23:33:02 +02:00
Florian Hülsmann c3cd3f3571 CSS class headerAction -> header-action 2012-06-18 23:22:52 +02:00
Victor Dubiniuk 249190c89b Fix mime-type detection 2012-06-19 00:20:33 +03:00
Florian Hülsmann c723e1107d Merge branch 'master' of gitorious.org:owncloud/owncloud 2012-06-18 23:19:15 +02:00
Florian Hülsmann 0132b80282 added CSS class .headerAction 2012-06-18 23:18:32 +02:00
Georg Ehrke 8c8a0cca75 Merge branch 'master' into calendar_export 2012-06-18 23:10:01 +02:00
Bart Visscher d4044d0283 Delay loading of translations until they are used 2012-06-18 23:07:32 +02:00
Thomas Mueller a1364c9726 fixes oc-1026 2012-06-18 22:48:52 +02:00
Brice Maron b31962fdc2 Hide image with no source (avoid placeholder img) 2012-06-18 20:15:20 +00:00
Brice Maron cfb3b633f5 Force sanitize function to use UTF8 (for php lower than 5.4) 2012-06-18 19:52:05 +00:00
Robin Appelman debd9c8dfb fix problem with encryption flag not being saved correctly in the filecache 2012-06-18 18:18:10 +02:00
Bjoern Schiessle 92bb59c95d fixed broken function call 2012-06-18 17:30:21 +02:00
Bjoern Schiessle 814cab97cf ignore "Shared"-directory when calculating free space
Conflicts:

	lib/fileproxy/quota.php
2012-06-18 17:27:42 +02:00
Bjoern Schiessle e6384251eb Merge branch 'master' of gitorious.org:owncloud/owncloud 2012-06-18 17:25:00 +02:00
Bjoern Schiessle d496a5e19f ignore "Shared"-directory when calculating free space 2012-06-18 17:23:54 +02:00
Georg Ehrke 6bd0a158f7 Merge branch 'master' into oc_error 2012-06-18 15:59:39 +02:00
Georg Ehrke 16560fe5c1 Merge branch 'master' into calendar_repeat 2012-06-18 15:59:26 +02:00
Georg Ehrke 6e405513ab Merge branch 'master' into calendar_export 2012-06-18 15:59:21 +02:00
Georg Ehrke 13aad8f06d some little fixes for repeating events caching 2012-06-18 15:58:01 +02:00
Bart Visscher 2f00384b51 Use TemplateLayout functions for finding js and css files in minimizer 2012-06-18 15:40:48 +02:00
Bart Visscher 3000e8f9d5 Prepare template js and css functions for use in the js and css minimizers 2012-06-18 15:40:48 +02:00
Bart Visscher 180243d92a Move page layout handling to its own class 2012-06-18 15:40:48 +02:00
Bart Visscher 332603a263 Move formfactor code to OC_Template 2012-06-18 15:40:48 +02:00
Bart Visscher 79f9d61ec8 Allow apps to load before login, needed for user_openid 2012-06-18 15:40:48 +02:00
Bjoern Schiessle ca41f2e96a don't add the "Shared"-directory size to users quota 2012-06-18 15:38:38 +02:00
Bjoern Schiessle 405ac36e0c Merge branch 'master' of gitorious.org:owncloud/owncloud 2012-06-18 15:38:24 +02:00
Bjoern Schiessle 2fd7df57d9 don't add the "Shared"-directory size to users quota 2012-06-18 15:35:22 +02:00
Georg Ehrke beed6e0f0e Revert "Revert "create OC_Calendar_Object::generateStartEndDate function""
This reverts commit e3b58f6783.
2012-06-18 14:47:58 +02:00
Georg Ehrke e3b58f6783 Revert "create OC_Calendar_Object::generateStartEndDate function"
This reverts commit aa7ce480f4.
2012-06-18 14:47:09 +02:00
Georg Ehrke e31c9a7b6f Merge branch 'master' into oc_error 2012-06-18 14:34:49 +02:00
Georg Ehrke 6b6d3d68d4 Merge branch 'master' into calendar_repeat 2012-06-18 14:34:43 +02:00
Georg Ehrke c2b7d05188 Merge branch 'master' into calendar_export 2012-06-18 14:34:38 +02:00
Florian Hülsmann 7064f3a8a8 Merge branch 'master' of gitorious.org:owncloud/owncloud 2012-06-18 13:37:25 +02:00
Florian Hülsmann 4a50c15a8e corrected header width and floating (can now dynamically add stuff to header); someone may test this in IE 2012-06-18 13:36:49 +02:00
Bart Visscher 977cd0df6b Fix errors for minimizer 2012-06-18 11:33:24 +02:00
Bart Visscher a5a1a9fd4a Forgot a file 2012-06-18 11:12:53 +02:00
Bart Visscher 617de811f7 Cache the minimized output also on the server 2012-06-18 11:11:46 +02:00
Bjoern Schiessle 9d0cfacd67 escape log messages to avoid possible js execution 2012-06-18 09:43:56 +02:00
Bjoern Schiessle 91f69858e4 escape log messages to avoid possible js execution 2012-06-18 09:42:31 +02:00
Thomas Tanghus e5feb4e1aa Remove obsolete js. 2012-06-18 02:22:22 +02:00
Thomas Tanghus 73fd4c979a Update js after contactlist change. 2012-06-18 02:21:29 +02:00
Thomas Tanghus d8048414aa Removed erroneous value attributes. Partial fix for oc-1029. 2012-06-18 00:39:38 +02:00
Thomas Tanghus a4f53922c2 Removed erroneous value attributes. Partial fix for oc-1029. 2012-06-18 00:36:25 +02:00
Thomas Tanghus cab4a634df Save addressbook id to be able to rearrange contacts properly. 2012-06-17 23:14:02 +02:00
Thomas Tanghus 3efec3fde9 Make contact list fit in viewport. 2012-06-17 23:12:48 +02:00
Thomas Tanghus ea4d8ccf70 Rearrange markup. 2012-06-17 23:12:11 +02:00
Thomas Tanghus 8337b30e43 Add thumbnail links so they are loaded when addressbook is expanded. 2012-06-17 23:09:25 +02:00
Thomas Tanghus 7d84c4741c Use uasort instead of usort. 2012-06-17 21:50:49 +02:00
Thomas Tanghus 46a771d2e6 Sort addressbooks. 2012-06-17 21:47:15 +02:00
Thomas Tanghus fb700de4a4 Add effect on addressbook show/hide. 2012-06-17 21:37:13 +02:00
Thomas Tanghus 9e4a41e9cb Add effect on addressbook show/hide. 2012-06-17 21:34:56 +02:00
Thomas Tanghus 5a8f4b8783 Adjustments for inview handler etc. 2012-06-17 20:25:32 +02:00
Thomas Tanghus b6b6d69158 Moved parsing to the controller and js to contacts.js. 2012-06-17 20:25:32 +02:00
Thomas Tanghus 2875901fc7 Obsolete language="Javascript". 2012-06-17 20:25:32 +02:00
Thomas Tanghus 91f5a1de39 Obsolete language="Javascript". 2012-06-17 20:25:32 +02:00
Thomas Tanghus b1cfc99f63 Styled address book entries. 2012-06-17 20:25:32 +02:00
Thomas Tanghus 56d25d4d1b Make the parsing in the controller, not in the template. Assign only relevant entries to the template. 2012-06-17 20:25:32 +02:00
Stephan Bergemann 92e35bd843 now a little less in template - more in ajax controller 2012-06-17 20:25:32 +02:00
Stephan Bergemann 7f485d1b20 contacts app now lists contacts sorted by expandable/collapsable addressbooks 2012-06-17 20:25:32 +02:00
Georg Ehrke 1710086b67 Merge branch 'master' into oc_error 2012-06-17 16:41:54 +02:00
Georg Ehrke b8daae30b6 Merge branch 'master' into calendar_repeat 2012-06-17 16:41:49 +02:00
Georg Ehrke 4b872d10fc Merge branch 'master' into calendar_export 2012-06-17 16:41:44 +02:00
Tom Needham 8d67ca09b5 user_migrate: remove old code 2012-06-17 12:07:16 +00:00
Tom Needham b064fc6968 user_migrate: remove old code 2012-06-17 12:06:40 +00:00
Georg Ehrke 06c610c2ee Merge branch 'master' into oc_error 2012-06-17 08:36:33 +02:00
Georg Ehrke 229587a31e Merge branch 'master' into calendar_repeat 2012-06-17 08:36:26 +02:00
Georg Ehrke a8da950819 Merge branch 'master' into calendar_export 2012-06-17 08:36:20 +02:00
Robin Appelman ad4f066bac suppress error when using is_dir on non directory in smb backend 2012-06-17 03:09:49 +02:00
Robin Appelman ed66c63c29 improve caching smb results a bit 2012-06-17 02:59:38 +02:00
Robin Appelman 769cbe9a4c improve filecache support for smb 2012-06-17 02:54:23 +02:00
Robin Appelman 5b6229544d fix statcache for filenames containing non-alphanumeric characters in smb streamwrapper 2012-06-17 02:42:40 +02:00
Robin Appelman 549541215e get the correct metadate from updated folders to put in the cache 2012-06-17 02:15:11 +02:00
Michael Gapczynski e8dd86ce0d Revert "Set default charset to utf-8."
This reverts commit 709dbd82a6.
2012-06-16 19:48:03 -04:00
Robin Appelman b38e46276f when checking if the content of a folder has been updated, exlicitly state that we are checking a folder
solves some issues with external storages not updating correctly
2012-06-17 01:31:57 +02:00
Bart Visscher 6f93176a4b Be smarter when checking single app language availability 2012-06-16 20:52:10 +02:00
Bart Visscher 6e9cd63fa1 Only check for apps owncloud version requirment when there is a new owncloud version 2012-06-16 20:52:10 +02:00
Bart Visscher 99a68abbd5 Add session_write_close to the minimizer 2012-06-16 20:52:10 +02:00
Thomas Tanghus 33ab91710f PDF Viewer: Double encode link. 2012-06-16 19:49:57 +02:00
Thomas Tanghus 9c6d82d00d PDF Viewer: Double encode link. 2012-06-16 19:48:33 +02:00
Georg Ehrke 1e7c7bedb9 Merge branch 'master' into oc_error 2012-06-16 19:04:55 +02:00
Georg Ehrke 7f1e0287a9 Merge branch 'master' into calendar_repeat 2012-06-16 19:04:50 +02:00
Georg Ehrke 56f8fc0f70 Merge branch 'master' into calendar_export 2012-06-16 19:04:45 +02:00
Thomas Tanghus 707660b35f files_imageviewer: Double encode paths. Fixes oc-1016. 2012-06-16 18:57:51 +02:00
Thomas Tanghus 1118498050 files_imageviewer: Double encode paths. Fixes oc-1016. 2012-06-16 18:54:55 +02:00
Thomas Tanghus 4cbdd59859 Fix char encoding. 2012-06-16 18:38:20 +02:00
Thomas Tanghus 6642ef6a50 Fix string encoding probs. 2012-06-16 18:06:47 +02:00
Thomas Müller a91e3d68b0 fixing syntax error 2012-06-16 17:53:14 +02:00
Georg Ehrke 12f6205fa8 Merge branch 'master' into oc_error 2012-06-16 17:10:53 +02:00
Georg Ehrke af1cdbda72 Merge branch 'master' into calendar_repeat 2012-06-16 17:10:49 +02:00
Georg Ehrke 3ef8d4a64b Merge branch 'master' into calendar_export 2012-06-16 17:10:44 +02:00
Thomas Tanghus 709dbd82a6 Set default charset to utf-8. 2012-06-16 17:01:12 +02:00
Georg Ehrke dd7932bf5c Merge branch 'master' into oc_error 2012-06-16 09:48:53 +02:00
Georg Ehrke fd9a4f8d51 Merge branch 'master' into calendar_repeat 2012-06-16 09:48:43 +02:00
Georg Ehrke be4820bbca Merge branch 'master' into calendar_export 2012-06-16 09:48:32 +02:00
Georg Ehrke fc632b5795 fix merge conflicts 2012-06-16 09:48:07 +02:00
Georg Ehrke 31ec93bd00 remove a lot of closing php tags and empty lines at a file's end in calendar app 2012-06-16 09:45:17 +02:00
Georg Ehrke bb8ebccd3b Merge branch 'master' into oc_error 2012-06-16 09:41:36 +02:00
Georg Ehrke 05c1afd0d1 Merge branch 'master' into calendar_repeat 2012-06-16 09:41:31 +02:00
Georg Ehrke 4d392801cc Merge branch 'master' into calendar_export 2012-06-16 09:41:24 +02:00
Georg Ehrke cbe5449f47 remove a closing php tag in calendar 2012-06-16 09:40:32 +02:00
Georg Ehrke b6375e7a8c remove a closing php tag in calendar 2012-06-16 09:40:03 +02:00
Georg Ehrke 14f6d4dcba Merge branch 'master' into oc_error 2012-06-16 09:35:57 +02:00
Georg Ehrke a6531d0311 Merge branch 'master' into calendar_repeat 2012-06-16 09:35:53 +02:00
Georg Ehrke 81e8ffc4ba Merge branch 'master' into calendar_export 2012-06-16 09:35:48 +02:00
Robin Appelman bf2062b09d write_close the session when scanning files or music 2012-06-16 01:35:39 +02:00
Michael Gapczynski ec3033a5dd Check for '\' as well when searching for parent folders, because Windows returns '\' for dirname() 2012-06-15 19:34:25 -04:00
Robin Appelman 195c37f88a fix for encryption binary files 2012-06-16 01:31:03 +02:00
Tom Needham c1744d2eb6 Move user import to personal settings. Fix user migration between servers. 2012-06-15 23:17:31 +00:00
Tom Needham 8484e16516 Merge branch 'master' of gitorious.org:owncloud/owncloud 2012-06-15 23:14:48 +00:00
Tom Needham e37ef6dd47 Move user import to personal settings. Fix user migration between servers. 2012-06-15 23:14:40 +00:00
Bart Visscher 4268fe61ba Calendar: Write-close session to enable parallel events.php requests 2012-06-16 00:44:23 +02:00
Bart Visscher 18ce53f426 Merge commit 'refs/merge-requests/121' of git://gitorious.org/owncloud/owncloud 2012-06-16 00:15:02 +02:00
Bart Visscher 6d3ae575b6 Remove $DOCUMENTROOT, not used 2012-06-16 00:11:36 +02:00
Robin Appelman 03951ccc6b fix encryption proxy for updated filecache 2012-06-15 23:11:55 +02:00
Robin Appelman 19bfe21401 add binary test case for encryption 2012-06-15 23:11:33 +02:00
Robin Appelman cb833e45c2 get rid of php4 style constructors in mdb2 2012-06-15 21:59:40 +02:00
Bart Visscher e11c5a23d5 Optimize WebDav access by preloading dav custom properties 2012-06-15 21:21:42 +02:00
Bart Visscher e905b14758 Spelling fix 2012-06-15 21:21:42 +02:00
Bart Visscher 463a506fcb Fix webdav property name compare 2012-06-15 21:21:42 +02:00
Bart Visscher 27efdbd58f Use setter for FileinfoCache 2012-06-15 21:21:42 +02:00
Georg Ehrke 2c8a61ae9c Merge branch 'master' into oc_error 2012-06-15 20:48:37 +02:00
Georg Ehrke fbd45a939f Merge branch 'master' into calendar_repeat 2012-06-15 20:48:32 +02:00
Georg Ehrke 4d2894f390 Merge branch 'master' into calendar_export 2012-06-15 20:48:26 +02:00
Robin Appelman f06c08a637 cleanup oc_filecache, splitting it in several parts and using the new hasUpdated 2012-06-15 19:56:15 +02:00
Robin Appelman a9a424a519 also add hasUpdated to oc_filesystem and oc_filesystemview 2012-06-15 17:42:39 +02:00
Robin Appelman 449760f665 add hasUpdated to oc_filestorage 2012-06-15 16:43:24 +02:00
Bjoern Schiessle 0074062b53 fixed xss vulnerability 2012-06-15 16:16:00 +02:00
Bjoern Schiessle 6ca87656be Merge branch 'master' of gitorious.org:owncloud/owncloud 2012-06-15 16:14:31 +02:00
Bart Visscher 400769ab40 Optimize WebDav access using OC_FileCache 2012-06-15 16:04:07 +02:00
Thomas Tanghus 5c6a7172ca Files: Double encode download links. Fix for oc-1016. 2012-06-15 15:58:10 +02:00
Thomas Tanghus 8f6121ffa8 Files: Double encode download links. Fix for oc-1016. 2012-06-15 15:57:04 +02:00
Bjoern Schiessle 3ddaedee3b fixed xss vulnerability 2012-06-15 15:51:06 +02:00
Georg Ehrke aa7ce480f4 create OC_Calendar_Object::generateStartEndDate function 2012-06-15 12:11:22 +02:00
Georg Ehrke 4767c70578 fix merge conflicts 2012-06-15 11:48:26 +02:00
Georg Ehrke 22a33b509f use DateTime as type of parameter in the functions is_cached_inperiod and get_inperiod 2012-06-15 11:39:19 +02:00
Georg Ehrke e4529301ff change some function names in OC_Calendar_Repeat 2012-06-15 11:34:21 +02:00
Georg Ehrke 5c10683432 use easier parseable date to init datetime 2012-06-15 11:29:16 +02:00
Georg Ehrke 6f20d51646 fix generateEventOutput for calendar hook 2012-06-15 11:25:29 +02:00
Georg Ehrke b6a8de8530 don't clean and cache calendar on every update 2012-06-15 11:24:40 +02:00
Bart Visscher 2b228fba34 Load app before running update script 2012-06-15 11:18:44 +02:00
Bart Visscher 0d3f5f736f Disable minizing when DEBUG is true 2012-06-15 11:18:44 +02:00
Bjoern Schiessle f9c34942e1 applied merge request #128: fixed some sorting and display issues with gallery app.
This also fix bug #872 for the new gallery
2012-06-15 10:46:29 +02:00
Georg Ehrke 0dd4ea5a4f Merge branch 'master' into calendar_export 2012-06-15 10:41:06 +02:00
Bjoern Schiessle 4b7bdd5ace Merge commit 'refs/merge-requests/128' of git://gitorious.org/owncloud/owncloud into merge-requests/128
Conflicts:
	apps/gallery/templates/index.php
2012-06-15 09:51:04 +02:00
Thomas Tanghus effb6f1309 Update stylesheet for type=url. 2012-06-15 04:32:01 +02:00
Thomas Tanghus 8a68d09b0f Use type=url for URL field. 2012-06-15 04:32:01 +02:00
Michael Gapczynski 92083aa20c Fix upload for Google Drive; Google Documents List API documentation was misleading 2012-06-14 20:57:08 -04:00
Thomas Tanghus f6aa366857 Make sure there is a calendar after delete. 2012-06-15 02:10:55 +02:00
Thomas Tanghus 3c75ac5f62 Update calendar after delete. 2012-06-15 02:07:32 +02:00
Thomas Tanghus ad8c4ab182 Only create new calendar when there are none. Fix oc-1007. 2012-06-15 01:55:02 +02:00
Thomas Tanghus ad32c20300 Agree on argument type (cleaned this time). 2012-06-15 01:51:26 +02:00
Thomas Tanghus 6d43e6565e Revert "Agree on argument type."
This reverts commit 0f6b1be0e6.
2012-06-15 00:53:13 +02:00
Thomas Tanghus 0f6b1be0e6 Agree on argument type. 2012-06-15 00:50:42 +02:00
Thomas Tanghus 1e76a530ea No need to find calendar twice. 2012-06-15 00:28:12 +02:00
Thomas Tanghus 31db583f03 Make events show again. 2012-06-15 00:26:34 +02:00
Brice Maron df83df5263 Correct sample config 2012-06-14 21:19:11 +00:00
Brice Maron 4753cc3ebd Merge branch 'master' into multi_app_dir
Conflicts:
	apps/bookmarks/ajax/addBookmark.php
	config/config.sample.php
	lib/app.php
	remote.php
2012-06-14 21:16:59 +00:00
Thomas Tanghus 96a3e28c2e Cleanup code. 2012-06-14 23:05:31 +02:00
Thomas Tanghus 27ab6daeb0 If Hr. Lerdorf had made up his mind on parameter order, life would have been a lot easier... 2012-06-14 23:05:31 +02:00
Brice Maron 6da5a2fdd4 Add possibility to choose the installation folder 2012-06-14 21:00:02 +00:00
Michael Gapczynski f3b30e4658 Forgot $ sign for variable 2012-06-14 15:14:01 -04:00
Michael Gapczynski f7e686d4f1 Revert "Fix a counting mistake"
This reverts commit c20abfef38.
2012-06-14 15:05:20 -04:00
Thomas Mueller ec69377ade first load compatibility.js 2012-06-14 21:00:19 +02:00
Thomas Mueller 4cc9bf09be fix javascript error 2012-06-14 20:55:36 +02:00
Stephan Bergemann 4eb0c270aa fixed handling of fallback_images 2012-06-14 19:38:43 +02:00
Arthur Schiwon b025ff8de3 reverting 8c7fa15aaf, differs between OC3 and 4 2012-06-14 18:33:00 +02:00
Arthur Schiwon 12bfc551fb reverting 8c7fa15aaf, differs between OC3 and 4 2012-06-14 18:31:38 +02:00
Michael Gapczynski 6e15b231b0 Check for '\' as well when searching for parent folders, because Windows returns '\' for dirname() 2012-06-14 12:27:30 -04:00
Thomas Tanghus 47c03a0eff Contacts: Fixes for CSRF. 2012-06-14 18:13:01 +02:00
Thomas Tanghus f0b87bc421 Make requesttoken global. 2012-06-14 18:13:01 +02:00
Thomas Tanghus 3b58c7a407 Remove debug statements. 2012-06-14 18:03:50 +02:00
Stephan Bergemann a3afd51b94 fixed one issue with last directory in structure having a lot of
subdirectories and finally some pictures
2012-06-14 18:02:07 +02:00
Thomas Tanghus b6ee4c458b Merge branch 'stable4' of git://gitorious.org/owncloud/owncloud into stable4 2012-06-14 18:00:45 +02:00
Thomas Tanghus 5b1a14f9ea Contacts: Implement CSRF prevention. 2012-06-14 18:00:13 +02:00
Bart Visscher 4510571aa1 Add app for logging access to shared files 2012-06-14 17:44:41 +02:00
Bjoern Schiessle fa67927eb5 fixed bug #996: first picture in folder is repeated in the last position behaving like a directory
Conflicts:
	apps/gallery/templates/index.php
2012-06-14 17:08:52 +02:00
Bjoern Schiessle 60bd2562d8 fixed bug #996: first picture in folder is repeated in the last position behaving like a directory 2012-06-14 15:16:13 +02:00
Bjoern Schiessle 6468e0a1d5 fixed bug #996: first picture in folder is repeated in the last position behaving like a directory 2012-06-14 15:14:36 +02:00
Bjoern Schiessle df4737f52a prevent xss attacks also if some javascript ends up in the alt-tag 2012-06-14 14:19:12 +02:00
Bjoern Schiessle d28a4f0638 prevent xss attacks also if some javascript ends up in the alt-tag 2012-06-14 14:17:30 +02:00
Thomas Tanghus 3e143601fe Merge branch 'stable4' of git://gitorious.org/owncloud/owncloud into stable4 2012-06-14 13:53:05 +02:00
Thomas Tanghus 625cd822c3 Backport CSRF prevention. 2012-06-14 13:52:22 +02:00
Bjoern Schiessle cd759aee00 fixed xss vulnerability in un-packed version of jquery.fancybox and repack it 2012-06-14 13:45:33 +02:00
Bjoern Schiessle 87855f2506 Merge branch 'master' of gitorious.org:owncloud/owncloud 2012-06-14 13:44:42 +02:00
Bjoern Schiessle 211a546600 fixed xss vulnerability in un-packed version of jquery.fancybox and repack it 2012-06-14 13:41:39 +02:00
Thomas Tanghus 8fd9cbcc54 White-space fix. 2012-06-14 13:23:12 +02:00
Thomas Tanghus a34db3fbe0 Don't add slash if it's there already. 2012-06-14 13:23:12 +02:00
Thomas Tanghus 756eb3548f Use the right csrf token. 2012-06-14 13:23:12 +02:00
Bjoern Schiessle 544f97f034 debugging output removed 2012-06-14 13:19:11 +02:00
Bjoern Schiessle 4a47fa255d xss vulnerability fixed for fancybox image viewer 2012-06-14 13:18:59 +02:00
Bjoern Schiessle b0420ee8be suppress warning if /dev/urandom is not readable (bug #997) 2012-06-14 13:18:50 +02:00
Bjoern Schiessle b0ecef02e9 debugging output removed 2012-06-14 13:17:06 +02:00
Bjoern Schiessle e7b93b1807 xss vulnerability fixed for fancybox image viewer 2012-06-14 13:13:17 +02:00
Stephan Bergemann bc6884b176 we don't neede the functions for empty stacks any more 2012-06-14 12:51:27 +02:00
Stephan Bergemann b32afd1331 we don't have empty previewstacks any more - code cleaned up 2012-06-14 12:39:18 +02:00
Bjoern Schiessle 6c7e10245c suppress warning if /dev/urandom is not readable (bug #997) 2012-06-14 12:01:16 +02:00
Stephan Bergemann 56d2e99239 deleted some debugging output 2012-06-14 01:29:41 +02:00
Stephan Bergemann 22cd610a79 use images from deeper directories for preview if the actual directory doesn't contain any 2012-06-14 01:29:25 +02:00
Stephan Bergemann 9f59cc5eb0 improved look of directories not containing images directly 2012-06-14 01:29:17 +02:00
Stephan Bergemann e99a95a756 now also working for directories only containing one image 2012-06-14 01:27:34 +02:00
Stephan Bergemann 4711c2bb41 fixed second_level_images issue 2012-06-14 01:27:26 +02:00
Stephan Bergemann e4278574a8 fixed sorting errors and missbehaviours - now sorting like file browser 2012-06-14 01:27:01 +02:00
Georg Ehrke f9af0ef703 fix another ui bug of calendar 2012-06-13 22:21:23 +02:00
Georg Ehrke e154806838 fix another ui bug of calendar 2012-06-13 22:20:43 +02:00
Georg Ehrke 92a11011b1 another ui fix 2012-06-13 22:15:12 +02:00
Georg Ehrke 2e44ffaf02 another ui fix 2012-06-13 22:14:40 +02:00
Georg Ehrke 4ff11308a3 fix a ui bug for calendar sharing 2012-06-13 22:13:24 +02:00
Georg Ehrke b1139e977a fix a ui bug for calendar sharing 2012-06-13 22:12:54 +02:00
Georg Ehrke e543ec6eb6 show username of the body who shares in the summary 2012-06-13 22:07:30 +02:00
Georg Ehrke 6bd80d6457 show username of the body who shares in the summary 2012-06-13 22:07:23 +02:00
Georg Ehrke 7d29bee859 fix merge conflicts 2012-06-13 21:40:05 +02:00
Bart Visscher 12b34d2dda Whitespace fix 2012-06-13 21:39:12 +02:00
Bart Visscher c98b56d2da CSSMin: Remove debug code 2012-06-13 21:39:12 +02:00
Bart Visscher 61b044e00e Files Texteditor: Use our own "Droid Sans Mono" font-face and fonts 2012-06-13 21:39:12 +02:00
Bart Visscher 7a8e7f18db Calendar: Clicking #datecontrol_date gives datepicker to jump to date 2012-06-13 21:39:12 +02:00
Bart Visscher 4da6b3a391 Calendar: Make button of #datecontrol_date 2012-06-13 21:39:12 +02:00
Georg Ehrke c24752dc1d Merge branch 'master' into calendar_export 2012-06-13 21:38:33 +02:00
Michael Gapczynski b5889d6ffe Merge commit 'refs/merge-requests/127' of git://gitorious.org/owncloud/owncloud into merge-requests/127
Conflicts:
	apps/files_external/templates/settings.php
	lib/template.php
2012-06-13 15:17:46 -04:00
Michael Gapczynski bd01e93469 Add support for mounting Google Drive in external storage UI 2012-06-13 13:54:50 -04:00
Thomas Tanghus 3e339f3d66 Remove check for encryption. 2012-06-13 19:04:47 +02:00
Thomas Tanghus 613a122437 Remove check for encryption. 2012-06-13 19:03:34 +02:00
Thomas Tanghus d33d599b1b Remove debug statements. 2012-06-13 18:57:12 +02:00
Thomas Tanghus 9e7c28835b Allow same host redirects (/somepath). 2012-06-13 18:32:07 +02:00
Thomas Tanghus f589df7366 Redirect HTTP Auth requests to REQUEST_URI. Partial fix for http://bugs.owncloud.org/thebuggenie/owncloud/issues/oc-874 2012-06-13 18:31:36 +02:00
Thomas Tanghus bc1e8cb0a2 Contacts: implemented CSRF prevention. 2012-06-13 17:35:42 +02:00
Thomas Tanghus 89464721c7 Added JSON methods for CSRF prevention. Make request token accessible from template and add js var. 2012-06-13 17:33:19 +02:00
Frank Karlitschek 9e9c40eabd fix time call 2012-06-13 17:27:49 +02:00
Bjoern Schiessle 48ee265170 urlencode link fort password reset (bug #970) 2012-06-13 17:26:30 +02:00
Bjoern Schiessle b9d5f510c3 urlencode link fort password reset (bug #970) 2012-06-13 17:22:28 +02:00
Georg Ehrke 9f82edc157 Merge branch 'master' into oc_error 2012-06-13 15:30:04 +02:00
Georg Ehrke 3a8b280c06 Merge branch 'master' into calendar_export 2012-06-13 15:29:47 +02:00
Georg Ehrke 9bdad6fdbf fix merge conflicts 2012-06-13 11:40:00 +02:00
Michael Gapczynski 7868b25dcc Fix incorrect creation of filesystem for user@group in data folder during shares 2012-06-12 21:34:35 -04:00
Michael Gapczynski 6f55a52858 Fix incorrect creation of filesystem for user@group in data folder during shares 2012-06-12 21:33:05 -04:00
Bartek Przybylski db1353655b check for view before trying to invoke method on object 2012-06-13 00:32:44 +02:00
Thomas Mueller 521294d0bf fixes http://bugs.owncloud.org/thebuggenie/owncloud/issues/oc-987 2012-06-12 23:16:26 +02:00
Michael Gapczynski 790ae70e32 Create directory for mount point if it doesn't already exist 2012-06-12 15:25:34 -04:00
Georg Ehrke 48116cf9ab increase version of calendar app to force db upgrade 2012-06-12 19:54:07 +02:00
Georg Ehrke d54fc6dfd4 increase possible size of uri in database - fix oc-140 2012-06-12 19:54:07 +02:00
Georg Ehrke deb2f87556 increase version of calendar app to force db upgrade 2012-06-12 19:53:26 +02:00
Georg Ehrke dc0adbad02 increase possible size of uri in database - fix oc-140 2012-06-12 19:52:25 +02:00
Georg Ehrke f7727a322d Merge branch 'master' into calendar_repeat 2012-06-12 19:26:52 +02:00
Michael Gapczynski 5f80be7664 Add support for mounting Dropbox in external storage UI 2012-06-12 11:36:43 -04:00
Bjoern Schiessle 635a2f8ec9 Label the delete operation "unshare" for files in the "Shared" folder to reduce
confusion about the operation.
2012-06-12 16:32:00 +02:00
Bjoern Schiessle 8626f04f5d Label the delete operation "unshare" for files in the "Shared" folder to reduce
confusion about the operation.
2012-06-12 16:27:24 +02:00
Georg Ehrke 71573f7934 Merge branch 'master' into calendar_repeat 2012-06-12 15:58:01 +02:00
Georg Ehrke c9d408ff8c automatic cache repeating events after an update 2012-06-12 15:56:51 +02:00
Bjoern Schiessle ef6b6ac230 block slashes only for new files and new folders but not for file upload from url (bug #964) 2012-06-12 14:16:09 +02:00
Bjoern Schiessle f6e7c633a0 block slashes only for new files and new folders but not for file upload from url (bug #964) 2012-06-12 14:11:28 +02:00
Thomas Tanghus cee9d400c0 Contacts: Final (for now) fix to encoding probs on import. 2012-06-12 12:33:37 +02:00
Thomas Tanghus c44591e27a Contacts: Final (for now) fix to encoding probs on import. 2012-06-12 12:32:37 +02:00
Arthur Schiwon b70226b493 Merge branch 'stable4' of git://gitorious.org/owncloud/owncloud into stable4 2012-06-12 11:57:36 +02:00
Bjoern Schiessle 4501407283 committed patch (bug #967) to add missing translations for file actions 2012-06-12 11:41:13 +02:00
Bjoern Schiessle b38ce8adfd committed patch (bug #967) to add missing translations for file actions 2012-06-12 11:39:03 +02:00
Bjoern Schiessle 107c2de25d applied patch provided by bug #966 to fix broken user specific quota settings 2012-06-12 11:22:25 +02:00
Bjoern Schiessle 1b6dd6628a applied patch provided by bug #966 to fix broken user specific quota settings 2012-06-12 11:18:34 +02:00
Thomas Mueller 5e37a10334 PDF.JS updated, compatibility.js added for browser support, should fix: oc-395 2012-06-12 00:50:34 +02:00
Marco B 3be5e2af26 utf8 in der DB config 2012-06-11 23:04:28 +02:00
Thomas Tanghus d623deb298 Add .vimrc to .gitignore. 2012-06-11 22:55:10 +02:00
Thomas Tanghus 2473348c5d Add .vimrc to .gitignore. 2012-06-11 22:53:20 +02:00
Georg Ehrke 66c3ddcd74 Merge branch 'master' into calendar_repeat 2012-06-11 22:18:46 +02:00
Thomas Tanghus 210b71502b Fix copy/paste error. 2012-06-11 22:18:14 +02:00
Georg Ehrke 3c9be43aa4 add some information about repeating events caching on personal settings page 2012-06-11 22:16:26 +02:00
Thomas Tanghus e0a5e3e992 Fix js for missing address fields. 2012-06-11 22:15:56 +02:00
Thomas Tanghus c75a7966de Contacts: Fix encoding errors, import errors, developer headache, paint cute kittens and pink clouds ;-) 2012-06-11 22:15:31 +02:00
Thomas Tanghus ac11647d7a Fix js for missing address fields. 2012-06-11 22:14:21 +02:00
Thomas Tanghus 4b86cbcb6f Quick fix for index errors when not importing from files. 2012-06-11 22:14:21 +02:00
Thomas Tanghus c75f9f9397 Encoding conversion moved to OC_Contacts_VCard::decodeProperty in commit 95cc9730aa49963a69e46154b0cba19232219d2e 2012-06-11 22:14:21 +02:00
Thomas Tanghus 8af53829d5 Contacts: Fix encoding errors, import errors, developer headache, paint cute kittens and pink clouds ;-) 2012-06-11 22:14:21 +02:00
Georg Ehrke 08a3a4f185 fix a bug in OC_Calendar_Repeat 2012-06-11 21:43:24 +02:00
Bart Visscher 759ddcbf32 Tasks: Fix resizing of the content part 2012-06-11 20:34:06 +02:00
Bart Visscher 0eee140eaf Gallery: remove extra include of lib/base.php 2012-06-11 20:34:06 +02:00
Bart Visscher eddad8bedb Calendar: remove unused markup from #controls 2012-06-11 20:34:06 +02:00
Lukas Reschke f9bf34340c Removed unecessary sanitization 2012-06-11 19:49:24 +02:00
Lukas Reschke 68f819ee20 Removed double sanitization 2012-06-11 19:47:42 +02:00
Georg Ehrke 9edd40354e Merge branch 'master' into calendar_repeat 2012-06-11 19:46:12 +02:00
Lukas Reschke ad36fc8938 Fix double sanitization 2012-06-11 19:43:37 +02:00
Lukas Reschke d2a34f4b35 Fixes a issue with the log 2012-06-11 19:33:16 +02:00
Lukas Reschke 6defbc7f4d Removed some unessecary sanitizations 2012-06-11 19:20:48 +02:00
Lukas Reschke 2b22c538c8 Make some apps compatible 2012-06-11 19:07:51 +02:00
Bjoern Schiessle 1d493a70e7 replace "=0D=0A" (\r\n) with a simple "\n" in vards during import 2012-06-11 18:13:12 +02:00
Lukas Reschke 6d68b7620c Check for string 2012-06-11 18:12:46 +02:00
Bjoern Schiessle 18d19b022f Merge branch 'master' of gitorious.org:owncloud/owncloud 2012-06-11 17:28:15 +02:00
Georg Ehrke 09e744b793 connect OC_Calendar_repeat to events.php 2012-06-11 17:25:03 +02:00
Georg Ehrke 009c4c9045 add function isrepeating to OC_Calendar_Object class and change OC_Calendar_Object::getUTCforMDB from protected to public 2012-06-11 17:15:50 +02:00
Georg Ehrke 2dd84373c1 fix bug in OC_Calendar_Repeat 2012-06-11 17:13:20 +02:00
Arthur Schiwon 266c5238c9 LDAP: offer config option for Group Display Name attribute 2012-06-11 16:50:54 +02:00
Arthur Schiwon fcc9a5c8d4 LDAP: offer config option for Group Display Name attribute 2012-06-11 16:48:43 +02:00
Bjoern Schiessle 739589f485 make sure that contact data are always utf8 encoded to avoid encoding problems 2012-06-11 16:26:21 +02:00
Georg Ehrke 24a1ab8c15 Merge branch 'master' into calendar_repeat 2012-06-11 15:38:02 +02:00
Georg Ehrke 44e62c03e2 increase version number of calendar 2012-06-11 15:37:19 +02:00
Georg Ehrke 32b366585d some fixes for repeating events caching 2012-06-11 15:36:48 +02:00
Thomas Tanghus 4f6978c30f Redirect HTTP Auth requests to REQUEST_URI. Partial fix for http://bugs.owncloud.org/thebuggenie/owncloud/issues/oc-874 2012-06-11 15:22:58 +02:00
Thomas Tanghus 2ee809fd86 Allow same host redirects (/somepath). 2012-06-11 15:21:37 +02:00
Georg Ehrke e6c8febafc add hooks to connect calendar / event changes with OC_Calendar_Repeat 2012-06-11 15:18:46 +02:00
Georg Ehrke 5cb9d82b45 modify hooks in OC_Calendar_Calendar 2012-06-11 15:16:59 +02:00
Georg Ehrke eb3605aa63 modify hooks in OC_Calendar_Object 2012-06-11 15:15:13 +02:00
Lukas Reschke 18e44ba2f3 Some updates... 2012-06-11 15:03:45 +02:00
Georg Ehrke 01bd048bb3 remove insert id 2012-06-11 15:01:48 +02:00
Georg Ehrke 40459c8c66 some work on repeating events caching - basic class should work now :) 2012-06-11 15:00:51 +02:00
Lukas Reschke b63795ccb8 Handling arrays 2012-06-11 14:36:11 +02:00
Lukas Reschke c009bc4b87 Revert 2012-06-11 13:27:32 +02:00
Thomas Tanghus 74eece2620 Contacts: Fix NOTE also on add, not just save. 2012-06-11 12:56:41 +02:00
Thomas Tanghus 6d9947b3ff Contacts: Fix NOTE also on add, not just save. 2012-06-11 12:55:54 +02:00
Lukas Reschke ec4c373eaa Settings... 2012-06-11 12:48:47 +02:00
Lukas Reschke 6817a6b102 First try of implementing assignHTML 2012-06-11 12:45:07 +02:00
Arthur Schiwon 0df67aeae9 ldap: check array for emptiness, not nullness 2012-06-11 12:26:48 +02:00
Arthur Schiwon c110308c1e Merge branch 'stable4' of git://gitorious.org/owncloud/owncloud into stable4 2012-06-11 12:14:10 +02:00
Arthur Schiwon 7f5e8e39c4 ldap: check array for emptiness, not nullness 2012-06-11 12:13:55 +02:00
Frank Karlitschek cd16c5e479 implement a simple request token session garbage collector 2012-06-11 12:13:08 +02:00
Lukas Reschke 6da717b644 Merge branch 'stable4' of gitorious.org:owncloud/owncloud into stable4
Backport for sanitized user data.
2012-06-11 11:57:36 +02:00
Lukas Reschke d294373f47 Sanitzing user input 2012-06-11 11:56:54 +02:00
Lukas Reschke f8337c9d72 Using POST instead of GET. 2012-06-11 11:56:11 +02:00
Lukas Reschke cc653a8a40 Sanitize user input 2012-06-11 11:54:45 +02:00
Lukas Reschke 8f09299e24 Sanitizing user input 2012-06-11 11:54:03 +02:00
Bart Visscher f2216dc9d2 Gallery: Fix database creation on update, also only from version less then 0.5 2012-06-11 11:20:51 +02:00
Georg Ehrke f4c459782b Merge branch 'master' into calendar_repeat 2012-06-11 10:59:19 +02:00
Georg Ehrke ece1162949 use native sabredav functions to generate repeating events 2012-06-11 10:55:26 +02:00
Thomas Tanghus a21fd725d6 Categories: Turned the debugging down a bit. 2012-06-11 03:07:20 +02:00
Thomas Tanghus 1cb1980d62 Categories: Turned the debugging down a bit. 2012-06-11 03:05:33 +02:00
Thomas Tanghus e79e18d866 Copy/paste error. 2012-06-11 02:40:55 +02:00
Lukas Reschke 3f9b967be7 Sanitizing user input 2012-06-11 00:36:58 +02:00
Lukas Reschke f8d2e21c66 Sanitize user input 2012-06-11 00:23:35 +02:00
Lukas Reschke 27d1c1bb94 Sanitize user input 2012-06-11 00:14:28 +02:00
Lukas Reschke 9f276729c2 Using POST instead of GET. 2012-06-10 23:38:26 +02:00
Lukas Reschke 380aab470f Sanitzing user input 2012-06-10 23:16:59 +02:00
Michael Gapczynski 3c57fb935b Mount personal mount points into filesystem 2012-06-10 16:34:44 -04:00
Michael Gapczynski dd8303b975 Stop AWS SDK from looking for configuration files, forgot to include lib/cachecore 2012-06-10 16:34:44 -04:00
Thomas Tanghus 40f8419fdf Contacts: 11th hour fix for invalid VCARD from CardDAV. 2012-06-10 20:56:55 +02:00
Thomas Tanghus c898a8a6c9 Contacts: 11th hour fix for invalid VCARD from CardDAV. 2012-06-10 20:54:52 +02:00
Thomas Tanghus cdac0eae46 Merge branch 'stable4' of git://gitorious.org/owncloud/owncloud into stable4 2012-06-10 20:47:35 +02:00
Frank Karlitschek cfea28101a 4.0.2 2012-06-10 20:31:31 +02:00
Frank Karlitschek 6a44d02898 XSS-- 2012-06-10 19:54:04 +02:00
Frank Karlitschek bf4626da93 prevent XSS 2012-06-10 19:52:23 +02:00
Georg Ehrke c6a03ec6d8 remove include command for when 2012-06-10 18:41:17 +02:00
Georg Ehrke 82abbed883 Merge branch 'master' into oc_error 2012-06-10 18:38:38 +02:00
Georg Ehrke ef1b04619d fix merge conflicts 2012-06-10 18:38:01 +02:00
Georg Ehrke bdb76d4873 Merge branch 'master' into calendar_export 2012-06-10 18:37:16 +02:00
Bartek Przybylski c11f6cc3f9 fix variable name and undefined index notice 2012-06-10 17:25:50 +02:00
Bartek Przybylski 3970be3d7f fix variable name and undefined index notice 2012-06-10 17:25:19 +02:00
Bartek Przybylski 31d48d4ba4 adding missing file 2012-06-10 13:20:49 +02:00
Bartek Przybylski de6b683b50 fix first time image loading error 2012-06-10 13:19:22 +02:00
Bartek Przybylski 2dca0926b0 gallery: removing search provider for now 2012-06-10 13:19:17 +02:00
Bartek Przybylski f1250a3867 add function in filesystem to strip webroot 2012-06-10 13:19:10 +02:00
Bartek Przybylski e7d1af48fb handle encrypted images files in oc_image 2012-06-10 13:19:05 +02:00
Bartek Przybylski 7ee722e0da removing app access check, fix title for links in tiles 2012-06-10 13:18:55 +02:00
Bartek Przybylski e073cd756c tabs for spaces, fix array key name 2012-06-10 13:18:47 +02:00
Bartek Przybylski f6c07094c2 hide share button until sharing wont be fixed 2012-06-10 13:18:41 +02:00
Bartek Przybylski 1853a83874 adding navigation bar to gallery 2012-06-10 13:18:36 +02:00
Bartek Przybylski fe64e625ff remove old code 2012-06-10 13:18:30 +02:00
Bartek Przybylski f0f9269161 adding missing file 2012-06-10 13:18:17 +02:00
Bartek Przybylski 6682c60866 pictures: update script and removal some all stuff 2012-06-10 13:17:23 +02:00
Bartek Przybylski 9c1cc15c8d adding title when fancybox is displayed 2012-06-10 13:16:19 +02:00
Bartek Przybylski c932f93a40 replace spaces with tabs, use const and linkTo instead of static path 2012-06-10 13:16:12 +02:00
Bartek Przybylski 276aefba81 hack for file download 2012-06-10 13:16:06 +02:00
Bartek Przybylski 71b4cddd52 removing test image 2012-06-10 13:16:00 +02:00
Bartek Przybylski c67de113c6 aviod incorrect image size returning in gallery listing 2012-06-10 13:15:51 +02:00
Bartek Przybylski 63c02fd595 use fancybox to display image preview 2012-06-10 13:15:45 +02:00
Bartek Przybylski 7aff5eae6c navigate on galleries 2012-06-10 13:15:39 +02:00
Bartek Przybylski 2b80102909 new db scheme 2012-06-10 13:15:32 +02:00
Bartek Przybylski 9b2b5e0f6d git status 2012-06-10 13:15:23 +02:00
Bartek Przybylski 76f20eb57c fix first time image loading error 2012-06-10 13:05:00 +02:00
Thomas Tanghus 746994c2be Fixed merge conflict. 2012-06-10 12:59:36 +02:00
Thomas Tanghus f90c8738ab Contacts: Used non-existent var. 2012-06-10 12:48:39 +02:00
Bartek Przybylski 0838b4c225 gallery: removing search provider for now 2012-06-10 09:52:33 +02:00
Frank Karlitschek be6848a549 let´s put the files_odfviewer application into the stable4 branch for convinience. We release it as part of ownCloud 4.0.x anyways. 2012-06-09 23:18:56 +02:00
Frank Karlitschek 689c8f5f09 paging not yet implemented. increasing pagesize to 100 as a temporary quickfix 2012-06-09 22:02:29 +02:00
Frank Karlitschek 3947aa3ef7 apps paging is not yet implemented. increase pagesize to 100 as a quickfix 2012-06-09 22:00:28 +02:00
Michiel de Jong 995f9c7348 sanitize scope and host 2012-06-09 21:08:24 +02:00
Michiel de Jong 322fd51261 avoid clickjacking 2012-06-09 21:08:24 +02:00
Michael Gapczynski ab41b57f62 Add Dropbox storage backend 2012-06-09 15:02:48 -04:00
Michiel de Jong b46903fa76 sanitize when logged in as another user 2012-06-09 20:39:24 +02:00
Frank Karlitschek 061938cbb5 finally fix the updater. next is an automatic updater. but this is a bit more tricky. 2012-06-09 17:56:23 +02:00
Frank Karlitschek 897bfa8814 finally fix the updater. next is an automatic updater. but this is a bit more tricky. 2012-06-09 17:43:02 +02:00
Robin Appelman d065b2d29e prevent opening non-music files through the media ajax api 2012-06-09 17:39:14 +02:00
Robin Appelman 601bac746d use absolute path for file proxies 2012-06-09 17:34:13 +02:00
Georg Ehrke e7f6f7e452 fix another XSS 2012-06-09 16:45:37 +02:00
Georg Ehrke 642e7ce110 fix another XSS 2012-06-09 16:44:48 +02:00
Georg Ehrke f955f6a685 fix XSS in Calendar 2012-06-09 16:36:01 +02:00
Georg Ehrke c9214afff8 fix XSS in Calendar 2012-06-09 16:35:35 +02:00
Thomas Tanghus b16136642b Bump version to trigger db update. 2012-06-09 16:05:21 +02:00
Robin Appelman ba1dec64c1 load all apps when loging in, needed for apps listening to login hooks 2012-06-09 15:58:30 +02:00
Georg Ehrke 9c644fe53b Merge branch 'master' of gitorious.org:owncloud/owncloud 2012-06-09 15:40:48 +02:00
Georg Ehrke ff4b175622 increase height of event dialog 2012-06-09 15:40:27 +02:00
Georg Ehrke 009fbd89b4 fix creation of monthly repeated events 2012-06-09 15:40:27 +02:00
Georg Ehrke 2862740674 increase height of event dialog 2012-06-09 15:38:03 +02:00
Thomas Tanghus 815eb2591a Changed preferences configvalue to clob. Fixes several bugs e.g. oc-825 and oc-743. 2012-06-09 15:37:57 +02:00
Thomas Tanghus 6e9fea341b Changed preferences configvalue to clob. Fixes several bugs e.g. oc-825 and oc-743. 2012-06-09 15:36:28 +02:00
Robin Appelman ec55eaef5b dont load apps when displaying the login page
and only load authentication apps during login
2012-06-09 15:28:57 +02:00
Bartek Przybylski 43501309e3 add function in filesystem to strip webroot 2012-06-09 15:26:26 +02:00
Bartek Przybylski 120997112c handle encrypted images files in oc_image 2012-06-09 15:22:18 +02:00
Georg Ehrke 531132d64f fix a bug in when 2012-06-09 15:15:00 +02:00
Georg Ehrke cfb9c764ca fix creation of monthly repeated events 2012-06-09 15:15:00 +02:00
Bartek Przybylski 001293a702 removing app access check, fix title for links in tiles 2012-06-09 15:12:50 +02:00
Robin Appelman 8f616ecf76 fix potential xss in multiselect 2012-06-09 15:08:05 +02:00
Robin Appelman cfe219fbb9 fix potential xss in multiselect 2012-06-09 15:07:16 +02:00
Frank Karlitschek 344299a074 add two csrf check calls. Review and lot´s of porting needed. 2012-06-09 15:05:14 +02:00
Thomas Tanghus 0f454215e7 Code cleanup. 2012-06-09 15:04:08 +02:00
Thomas Tanghus 83caaa6d3f Merge branch 'stable4' of git://gitorious.org/owncloud/owncloud into stable4 2012-06-09 15:02:38 +02:00
Thomas Tanghus 59d16c5f9a Contacts: Use POST instead of GET. 2012-06-09 15:02:23 +02:00
Thomas Tanghus 081e1874cb Contacts: Use POST instead of GET. 2012-06-09 15:00:44 +02:00
Thomas Tanghus 88341e5797 Code cleanup. 2012-06-09 15:00:44 +02:00
Georg Ehrke 28ab92ee76 make use of post instead of get 2012-06-09 14:41:26 +02:00
Bart Visscher 4aee5a7ce4 Tasks: Use POST for ajax calls that change data 2012-06-09 14:39:41 +02:00
Bart Visscher 014895aeab Check for missing path_info, also use OC_Response for 404 error 2012-06-09 14:39:41 +02:00
Robin Appelman 6e1ca36207 fix infinite redirect during setup for windows hosts 2012-06-09 14:38:50 +02:00
Robin Appelman 76de92477f fix infinite redirect during setup for windows hosts 2012-06-09 14:38:05 +02:00
Georg Ehrke c83f418a02 Merge branch 'master' into calendar_repeat 2012-06-09 12:30:39 +02:00
Georg Ehrke a9b561430a add hooks for events 2012-06-09 12:30:09 +02:00
Georg Ehrke 7ed30649bb add hooks for calendars 2012-06-09 12:18:25 +02:00
Georg Ehrke cac995ee9f some more work on repeating events caching 2012-06-09 11:49:25 +02:00
Georg Ehrke cf1c3635ff fix loading of OC::$REQUESTEDAPP if WTFE the app parameter is given but empty aka /?app 2012-06-08 22:32:58 +02:00
Georg Ehrke bdd12df4a2 fix loading of OC::$REQUESTEDAPP if WTFE the app parameter is given but empty aka /?app 2012-06-08 22:31:44 +02:00
Georg Ehrke ac74d87e3e some work on repeating events caching 2012-06-08 22:22:16 +02:00
Bartek Przybylski 201a40a1a3 tabs for spaces, fix array key name 2012-06-08 21:55:28 +02:00
Bartek Przybylski 0c7431e57d hide share button until sharing wont be fixed 2012-06-08 21:44:33 +02:00
Bartek Przybylski 8bc22907b8 adding navigation bar to gallery 2012-06-08 21:44:33 +02:00
Bartek Przybylski 6b0a2ae60e remove old code 2012-06-08 21:44:32 +02:00
Bartek Przybylski 71b04717ab adding missing file 2012-06-08 21:44:31 +02:00
Bartek Przybylski 9e434dea60 tabs for spaces, removing thumbnail on file removal 2012-06-08 21:44:31 +02:00
Bart Visscher ac36512102 Don't use substr to get first char of string 2012-06-08 21:38:10 +02:00
Bart Visscher b9a1524508 Smarter code for OC_FileProxy 2012-06-08 21:38:10 +02:00
Bart Visscher 6af980c20c Add cache for getStorage and getInternalPath functions.
These are called for almost every file operation.
2012-06-08 21:38:10 +02:00
Bart Visscher d9d6876be9 Add stat cache to OC_Connector_Sabre_Node and OC_Connector_Sabre_File
Speeds up access of directories with large number of files.
2012-06-08 21:38:10 +02:00
Bart Visscher 7c5c257bf6 Comment layout and spelling fixes 2012-06-08 21:38:10 +02:00
Thomas Tanghus 23533a763a Don't fix bugs not present in this branch ;-) 2012-06-08 20:44:58 +02:00
Thomas Tanghus 5eb5d23ac1 Contacts: Closed stupid XSS hole. Thanks AnybodyElse ;-)
Conflicts:

	apps/contacts/ajax/uploadphoto.php
2012-06-08 20:43:42 +02:00
Thomas Tanghus 0a49bae87a Contacts: Closed stupid XSS hole. Thanks AnybodyElse ;-) 2012-06-08 20:39:54 +02:00
Georg Ehrke 4f2993cb1d remove buggy when 2012-06-08 19:59:12 +02:00
Georg Ehrke e83e30a8a9 Merge branch 'master' into calendar_repeat 2012-06-08 19:54:42 +02:00
Michael Gapczynski 8fcdccdcdc Add Amazon Web Services SDK to 3rdparty for Amazon S3 external storage 2012-06-08 13:48:38 -04:00
Michael Gapczynski 4b3ae60558 Working UI for external storage mount configuration 2012-06-08 11:42:29 -04:00
Bjoern Schiessle eb192ff4f3 code cleanup from previous commit 2012-06-08 16:31:12 +02:00
Bjoern Schiessle cf1430df45 Merge branch 'stable4' of gitorious.org:owncloud/owncloud into stable4 2012-06-08 16:27:07 +02:00
Bjoern Schiessle 0722ff6e32 fix for bug #872: Folders not holding any images are ignored, even if they hold subfolders with images 2012-06-08 16:24:31 +02:00
Arthur Schiwon 0dc371f579 typo in var 2012-06-08 14:58:07 +02:00
Arthur Schiwon f70615106f typo in var 2012-06-08 14:57:27 +02:00
Frank Karlitschek a7a861b2c6 backport the password salting fix.
a salt is generated during setup and used to salt the user password hases in the database backend
2012-06-08 12:42:35 +02:00
Frank Karlitschek 6119f05ac0 generate a random salt during installation and store it in the config.php. use it to salt the password hashing. 2012-06-08 12:31:37 +02:00
Arthur Schiwon 8c7fa15aaf Sharing, fix: connect to hooks from the correct classes 2012-06-08 11:58:00 +02:00
Arthur Schiwon 4d3b7574f3 Sharing, fix: connect to hooks from the correct classes 2012-06-08 11:55:16 +02:00
Frank Karlitschek 6a24e8279f Merge branch 'master' of gitorious.org:owncloud/owncloud 2012-06-08 11:50:08 +02:00
Frank Karlitschek f568b7ccb4 add spacing lines to our awesome new sample config file. readability++ 2012-06-08 11:49:14 +02:00
Bjoern Schiessle 4a15cf28a9 fixed broken lines in user table
Conflicts:

	settings/css/settings.css
2012-06-08 11:44:04 +02:00
Bjoern Schiessle f91ad08613 fixed broken lines in user table 2012-06-08 11:37:04 +02:00
Georg Ehrke f43fd1765e fix merge conflicts 2012-06-08 11:23:58 +02:00
Georg Ehrke 65cd15ca15 fix merge conflicts 2012-06-08 11:21:55 +02:00
Georg Ehrke 1d93a8fcfe Merge branch 'master' into calendar_export 2012-06-08 11:20:17 +02:00
Robin Appelman 4768510923 split share and root config for smb backend, also sanitize config a bit more 2012-06-08 01:29:55 +02:00
Bart Visscher 4afcae8d56 Gallery: Fix database creation on update, also only from version less then 0.5 2012-06-07 23:38:50 +02:00
Brice Maron dd98afc56c Add doc about multi app dir in sample config 2012-06-07 20:56:21 +00:00
Bart Visscher 0575d149b4 Use the default parameter of OC_Config::getValue to set defaults 2012-06-07 22:49:50 +02:00
Bart Visscher e867edd1c8 Add help texts to config options in config.sample.php 2012-06-07 22:47:18 +02:00
Brice Maron 9ec68c819b Change parameter 'web' to 'url' and take array of array in config instead of : separated values 2012-06-07 20:36:55 +00:00
Bart Visscher 4260dce826 Better handling of core.css and core.js
Fixes calling remote.php on install.
Fixes http://bugs.owncloud.org/thebuggenie/owncloud/issues/oc-933
2012-06-07 21:35:40 +02:00
Brice Maron 9f1c46b6f6 Correct Minizer inclusions 2012-06-07 19:22:43 +00:00
Brice Maron 0f7fdd4148 ReAdd possibility to load existing app folders 2012-06-07 19:15:31 +00:00
Brice Maron cf02f3c107 Merge branch 'master' into multi_app_dir 2012-06-07 19:11:55 +00:00
Thomas Tanghus d4f6f3e935 Contacts: Attempt to make file upload work in ICS Chrome. 2012-06-07 20:29:16 +02:00
Thomas Tanghus 33c802dcaa Break text to fit in dialog. 2012-06-07 20:29:15 +02:00
Tom Needham 1f409ec524 Protect the help page 2012-06-07 17:43:26 +00:00
Arthur Schiwon 0f68276921 LDAP: cache the results, reduce LDAP searches 2012-06-07 18:56:06 +02:00
Arthur Schiwon c2f557f1dd LDAP: cache the results, reduce LDAP searches 2012-06-07 18:55:32 +02:00
Arthur Schiwon 4beabe23e7 ldap: enable the destructor 2012-06-07 18:15:11 +02:00
Arthur Schiwon 6626598435 ldap: enable the destructor 2012-06-07 18:13:41 +02:00
Thomas Tanghus c696f449a2 Make it easier to subclass OC_L10N. 2012-06-07 17:26:28 +02:00
Bartek Przybylski 14e1be56a0 pictures: update script and removal some all stuff 2012-06-07 17:08:04 +02:00
Thomas Tanghus d2a8746c49 Edited combobox to adhere to coding standards and added a dblclick handler. 2012-06-07 16:44:54 +02:00
Michael Gapczynski d28e0f4d5b Remove old internal mail call for password reset, fixes bug oc-934
Conflicts:
	core/lostpassword/index.php
2012-06-07 09:36:23 -04:00
Michael Gapczynski 3c3a2b9b27 Remove old internal mail call for password reset, fixes bug oc-934 2012-06-07 09:25:50 -04:00
Arthur Schiwon f3f3c791ba ldap: correct query condition and determining of success 2012-06-07 13:40:26 +02:00
Arthur Schiwon 691f00eb39 ldap: check index carefully, can be 0 2012-06-07 13:40:16 +02:00
Arthur Schiwon 44880ab3fa ldap: remove unused private functions 2012-06-07 13:39:42 +02:00
Arthur Schiwon 6894882ca9 ldap: correct query condition and determining of success 2012-06-07 13:39:42 +02:00
Arthur Schiwon 470cb17f90 ldap: check index carefully, can be 0 2012-06-07 13:39:42 +02:00
Thomas Tanghus 9266f4da99 Migration: Fixed wrong download URL: http://forum.owncloud.org/viewtopic.php?f=4&t=2511 2012-06-07 13:10:19 +02:00
Thomas Tanghus 312536dbf9 Migration: Fixed wrong download URL: http://forum.owncloud.org/viewtopic.php?f=4&t=2511 2012-06-07 13:08:42 +02:00
Thomas Tanghus de6d550cce Calendar: Added more explicit sync links and fixed indentation. 2012-06-07 12:22:25 +02:00
Thomas Tanghus e1f4978150 Calendar: Added more explicit sync links and fixed indentation. 2012-06-07 12:21:24 +02:00
Thomas Tanghus 3d48bf18d3 Contacts: Import upload button was obscured on Android browser. 2012-06-07 10:58:15 +02:00
Thomas Tanghus 3804f68ff5 Contacts: Import upload button was obscured on Android browser. 2012-06-07 10:55:40 +02:00
Thomas Tanghus 9c84149119 A bit of pixel-pushing. 2012-06-07 10:55:40 +02:00
Bartek Przybylski 8fd6cdf407 adding title when fancybox is displayed 2012-06-06 23:29:23 +02:00
Bartek Przybylski 5417d803c4 replace spaces with tabs, use const and linkTo instead of static path 2012-06-06 23:23:49 +02:00
Brice Maron e8447e0bda Rework to fit with minizer 2012-06-06 21:11:15 +00:00
Bart Visscher 8dba47d466 Add layer to select fast or slow cache for storing values 2012-06-06 22:41:36 +02:00
Brice Maron 5c2b2fc842 Change app path logic in templates 2012-06-06 20:24:16 +00:00
Brice Maron 6a812644e4 Correct remote and public, and last occurence of OC:: 2012-06-06 20:24:15 +00:00
Brice Maron 6a250d0d20 Correct css file inclusion 2012-06-06 20:24:15 +00:00
Brice Maron cc494259d3 Unit path and webpath, correct some more 2012-06-06 20:24:15 +00:00
Brice Maron 6832aec60f Correct installer 2012-06-06 20:23:17 +00:00
Brice Maron b6c5ca126b First almost working version 2012-06-06 20:23:17 +00:00
Bartek Przybylski a90089c792 hack for file download 2012-06-06 22:20:56 +02:00
Bartek Przybylski 7c88081acb removing test image 2012-06-06 22:13:49 +02:00
Bartek Przybylski aa0fc3c69a aviod incorrect image size returning in gallery listing 2012-06-06 22:13:49 +02:00
Bartek Przybylski 671fe49809 use fancybox to display image preview 2012-06-06 22:13:49 +02:00
Bartek Przybylski 76e7e361ae navigate on galleries 2012-06-06 22:13:49 +02:00
Bartek Przybylski 34a21a63ce new db scheme 2012-06-06 22:13:49 +02:00
Bartek Przybylski 6d211155ab git status 2012-06-06 22:13:48 +02:00
Bjoern Schiessle bb07c20bf4 fixed var name, $filename should be $foldername 2012-06-06 18:11:23 +02:00
Bjoern Schiessle c960e42a17 fixed var name, $filename should be $foldername 2012-06-06 18:08:51 +02:00
Arthur Schiwon 6ca2b49292 avoid too-early database access and thus make owncloud installable again 2012-06-06 17:29:57 +02:00
Thomas Tanghus 5c17338ac7 Contacts: Make js a tad DRYer. Added URL property. 2012-06-06 15:29:33 +02:00
Thomas Tanghus ed950e3ba2 Correct mime type. 2012-06-06 15:29:33 +02:00
Frank Karlitschek 2ddb72bb58 fix wrong documentation 2012-06-06 14:18:30 +02:00
Arthur Schiwon 48ccfa42d3 LDPA: don't drop legal whitespaces when sanitizing DN. Fixes oc-914 2012-06-06 12:31:22 +02:00
Arthur Schiwon 190fca1121 LDPA: don't drop legal whitespaces when sanitizing DN. Fixes oc-914 2012-06-06 12:29:48 +02:00
Thomas Tanghus ca0108aabf Corrected typos. 2012-06-06 11:50:49 +02:00
Thomas Tanghus 517bd28940 Corrected typos. 2012-06-06 11:49:45 +02:00
Bjoern Schiessle 6abe8f9e2e fixed wrong function call 2012-06-06 10:40:22 +02:00
Georg Ehrke fa0c45b005 Merge branch 'master' into oc_error 2012-06-06 10:12:54 +02:00
Georg Ehrke 2fa19ce9a0 Merge branch 'master' into calendar_repeat 2012-06-06 10:12:11 +02:00
Georg Ehrke d8d558377c Merge branch 'master' into calendar_export 2012-06-06 10:11:34 +02:00
Thomas Tanghus fce614b82c Less aggressive caching on thumbnails too. 2012-06-06 01:06:13 +02:00
Thomas Tanghus 68670bcc66 Cleanup. 2012-06-06 01:06:13 +02:00
Thomas Tanghus 624f8ae36d Also use OC_Cache here. 2012-06-06 01:06:13 +02:00
Thomas Tanghus 80de23d08b Contacts: Removed temp dir cleanup after using OC_Cache. 2012-06-06 01:06:12 +02:00
Michael Gapczynski 826a439c15 Supress any warnings if log file does not exist 2012-06-05 18:42:16 -04:00
Robin Appelman f1b10fcc93 update translations 2012-06-06 00:29:44 +02:00
Robin Appelman f7d221f5f0 update translations 2012-06-06 00:29:28 +02:00
Robin Appelman a3c1f70be4 dont show config option for file upload size if we cant write the new value 2012-06-06 00:24:15 +02:00
Robin Appelman 549889d3cb update l10n script to better read js files 2012-06-06 00:11:45 +02:00
Robin Appelman 063c9accb6 prevent creating files with a / the name 2012-06-06 00:04:02 +02:00
Robin Appelman e6c4e53486 prevent creating files with a / the name 2012-06-06 00:02:51 +02:00
Michael Gapczynski 3ce6344d40 Supress any warnings if log file does not exist 2012-06-05 17:44:07 -04:00
Bart Visscher fc56a668ce Add OC_Cache implementation for APC 2012-06-05 23:19:28 +02:00
Bart Visscher 86961b6445 Skip test for XCache when the module is not there 2012-06-05 23:10:51 +02:00
Bart Visscher ab788eaa23 OC_Cache_File ttl=0 indicates forever, but expire in a day to keep the cache clean 2012-06-05 23:09:49 +02:00
Bart Visscher 9984c2a593 Spelling fixes in XCache files 2012-06-05 23:07:11 +02:00
Thomas Tanghus 20aee83d07 Use UID for cache key. 2012-06-05 21:20:10 +02:00
Robin Appelman 86ddf386d9 add TTL tests for OC_Cache 2012-06-05 20:59:52 +02:00
Robin Appelman f6298cb74f add hasKey for XCache backend 2012-06-05 20:54:07 +02:00
Thomas Tanghus cb941996c0 Contacts: Use OC_Cache for contact photo handling instead of temp dir. 2012-06-05 20:34:12 +02:00
Thomas Tanghus 098beae751 Added hasKey() method to OC_Cache. 2012-06-05 20:34:12 +02:00
Thomas Tanghus 9dbb07b806 Added data() method to OC_Image to return raw image data. 2012-06-05 20:31:15 +02:00
Robin Appelman 301a14dcd6 add XCache backend and testcases for OC_Cache 2012-06-05 19:58:30 +02:00
Robin Appelman e11bf460e0 add OC_Cache::clear 2012-06-05 19:57:49 +02:00
Robin Appelman 10eef49c3c return null when a cache variable is not set 2012-06-05 19:33:15 +02:00
Robin Appelman dcf1eed816 add unique instance id 2012-06-05 19:32:48 +02:00
Bart Visscher eed0450351 Fix remap dir for CSS minimizer 2012-06-05 18:09:32 +02:00
Bjoern Schiessle 3a5076d646 show pictures in folder with special characters, e.g. '+' 2012-06-05 17:58:23 +02:00
Bart Visscher 9d936976a9 Make check for writable apps dir configurable 2012-06-05 17:51:52 +02:00
Bart Visscher 57326ea1f8 Move setting remote_core.* to after setup of OC, also check if it is not set yet 2012-06-05 17:51:52 +02:00
Bjoern Schiessle 0d1a07d4ae show pictures in folder with special characters, e.g. '+' 2012-06-05 16:36:05 +02:00
Bjoern Schiessle edecc5bca3 Merge branch 'master' of gitorious.org:owncloud/owncloud 2012-06-05 15:29:59 +02:00
Frank Karlitschek 4bc7387d7c fi login for hosts running n port 80 2012-06-05 15:28:00 +02:00
Frank Karlitschek ae91557748 Merge branch 'master' of gitorious.org:owncloud/owncloud 2012-06-05 15:26:51 +02:00
Frank Karlitschek e747fd794e fix login for hosts running on port 80 2012-06-05 15:26:31 +02:00
Thomas Tanghus 6c4231b3d3 Per user quota didn't show in FF (and possibly IE) http://forum.owncloud.org/viewtopic.php?f=4&t=2716&p=5373#p5324. 2012-06-05 14:17:38 +02:00
Arthur Schiwon 769d94ab26 linkTo instead of hard links in Files and Files_Archive. Hope that makes sense. 2012-06-05 14:14:26 +02:00
Frank Karlitschek 5c9325bbe0 CLI is no availabe in stable4 2012-06-05 14:10:50 +02:00
Arthur Schiwon 7621559d00 make groups not static, fixes oc-919 2012-06-05 14:02:13 +02:00
Frank Karlitschek d3bb01b598 more reliable host detection for reverse proxy scenarios 2012-06-05 12:53:48 +02:00
Frank Karlitschek 80fc01388a Merge branch 'master' of gitorious.org:owncloud/owncloud 2012-06-05 12:52:44 +02:00
Frank Karlitschek e3031ae28b more reliable host detection for reverse proxy servers 2012-06-05 12:52:23 +02:00
Bjoern Schiessle 061abb88b5 write a warning to the log file if .htaccess is not writable instead of failing silently 2012-06-05 11:50:21 +02:00
Bjoern Schiessle 44260a552c xss vulnerability fixed 2012-06-05 10:49:36 +02:00
Bjoern Schiessle e817504569 xss vulnerability fixed 2012-06-05 10:49:26 +02:00
Bjoern Schiessle d71c4db10a xss vulnerability fixed 2012-06-05 10:46:28 +02:00
Bjoern Schiessle 564b0358f9 Merge branch 'master' of gitorious.org:owncloud/owncloud 2012-06-05 10:38:42 +02:00
Bjoern Schiessle dcc5b5ca0a xss vulnerability fixed 2012-06-05 10:37:22 +02:00
Thomas Tanghus d194132b6f Contacts: Cache standard photo less aggressively 2012-06-05 10:32:26 +02:00
Frank Karlitschek 7e931575b4 comment out non working code 2012-06-05 09:28:51 +02:00
Bart Visscher 7e017253f5 Load apps before minimizing the core css and js 2012-06-04 23:17:50 +02:00
Bart Visscher 64f6534f51 Tasks: styling fixes 2012-06-04 23:04:31 +02:00
Bart Visscher 4a5973662c Merge branch 'unstable'
Conflicts:
	apps/files_external/tests/config.php
	apps/files_versions/ajax/getVersions.php
	apps/files_versions/appinfo/app.php
	apps/files_versions/history.php
	apps/files_versions/js/versions.js
	apps/files_versions/templates/history.php
	apps/files_versions/versions.php
	lib/base.php
2012-06-04 23:02:05 +02:00
Bart Visscher 786325a4bb Fix newline in code 2012-06-04 22:24:17 +02:00
Bart Visscher 091b343d5c Calendar & Contacts: Store import progress in OC_Cache
Convert calendar and contacts import to use a caching system
for storing the import progress percentage. OC_Cache can later
be made smarter about storing values.
2012-06-04 22:24:17 +02:00
Arthur Schiwon dfc90021ca load authentication apps before checking wether user exists. fixes oc-910 2012-06-04 21:40:32 +02:00
Arthur Schiwon b0d83d6d8d make it possible to load apps seperately. needed to fix oc-910 without breaking oc-863 2012-06-04 21:40:18 +02:00
Arthur Schiwon ae2bcf968d Merge branch 'stable4' of git://gitorious.org/owncloud/owncloud into stable4 2012-06-04 21:33:02 +02:00
Arthur Schiwon 454f81fb15 load authentication apps before checking wether user exists. fixes oc-910 2012-06-04 21:31:35 +02:00
Arthur Schiwon 773f3cf973 make it possible to load apps seperately. needed to fix oc-910 without breaking oc-863 2012-06-04 21:30:58 +02:00
Tom Needham daa4d2cd84 Validate email on save 2012-06-04 18:44:55 +00:00
Tom Needham cf85a1e264 Merge branch 'master' of gitorious.org:owncloud/owncloud 2012-06-04 18:43:22 +00:00
Tom Needham 55e88120cd Validate email on save 2012-06-04 18:42:25 +00:00
Michael Gapczynski adc200c1f3 Hide app page link for internal apps, fixes bug oc-913 2012-06-04 14:26:30 -04:00
Robin Appelman b117a1e3ec update file paths in filecache when the parent is renamed 2012-06-04 18:12:25 +02:00
Bjoern Schiessle 4bc88ef59d prevent xss attacks by manipulating image file names 2012-06-04 18:11:17 +02:00
Bjoern Schiessle d5566d0267 prevent xss attacks by manipulating text file names 2012-06-04 18:11:08 +02:00
Bjoern Schiessle ca64a4080f don't allow user to delete Shared dir via webdav and sync client (bug #774) 2012-06-04 18:08:51 +02:00
Bjoern Schiessle 6d70f42dd4 Merge branch 'master' of gitorious.org:owncloud/owncloud 2012-06-04 18:04:29 +02:00
Bjoern Schiessle c6a1d9491b don't allow user to delete Shared dir via webdav and sync client (bug #774) 2012-06-04 18:03:16 +02:00
Robin Appelman 59086fe082 update file paths in filecache when the parent is renamed 2012-06-04 17:59:42 +02:00
Bjoern Schiessle f291a843bf prevent xss attacks by manipulating image file names 2012-06-04 16:22:25 +02:00
Bjoern Schiessle 1d6ca084a6 prevent xss attacks by manipulating text file names 2012-06-04 16:20:03 +02:00
Bjoern Schiessle 7fbe306990 no move (rename) operation for "Shared" directory 2012-06-04 14:00:35 +02:00
Bjoern Schiessle c8f670dfab Don't allow user to delete, rename and re-share the "Shared" directory 2012-06-04 14:00:35 +02:00
Thomas Tanghus 3b9bf83fe7 Contacts: Make tmp file cleaup a bit safer. 2012-06-04 13:38:37 +02:00
Arthur Schiwon 782d82730a commited a bit too much before 2012-06-04 13:28:31 +02:00
Arthur Schiwon 8983c6dd6b commited a bit too much before 2012-06-04 13:27:55 +02:00
Thomas Tanghus 2842088b75 Contacts: When editing photo on a newly created contact the name in the contact list was cleared. 2012-06-04 13:14:31 +02:00
Thomas Tanghus 855f404e5c Contacts: Temporary files weren't deleted if crop window was closed without saving. 2012-06-04 13:14:31 +02:00
Thomas Tanghus d657263403 Merge branch 'stable4' of git://gitorious.org/owncloud/owncloud into stable4 2012-06-04 13:13:53 +02:00
Thomas Tanghus 74ac2ac63a Contacts: When editing photo on a newly created contact the name in the contact list was cleared. 2012-06-04 13:13:43 +02:00
Arthur Schiwon 59bbf0acee LDAP: link to documentation on settings page 2012-06-04 13:05:18 +02:00
Arthur Schiwon 8554525ebe Merge branch 'stable4' of git://gitorious.org/owncloud/owncloud into stable4 2012-06-04 13:04:37 +02:00
Arthur Schiwon b48228ae3d LDAP: link to documentation on settings page 2012-06-04 13:04:18 +02:00
Frank Karlitschek 64fe06710a add deprecated warning 2012-06-04 12:49:33 +02:00
Frank Karlitschek 8755fd88bb Merge branch 'master' of gitorious.org:owncloud/owncloud 2012-06-04 12:46:22 +02:00
Frank Karlitschek 1e6802e567 add deprecated warning 2012-06-04 12:45:45 +02:00
Georg Ehrke 6560f1d894 don't change events timezone and remove the DTSTART value tag 2012-06-04 12:28:05 +02:00
Bjoern Schiessle 4eba41a2a0 no move (rename) operation for "Shared" directory 2012-06-04 11:04:05 +02:00
Bjoern Schiessle 2d80c148ba Don't allow user to delete, rename and re-share the "Shared" directory 2012-06-04 10:42:09 +02:00
Georg Ehrke b8275691e7 Merge branch 'master' into oc_error 2012-06-04 10:35:50 +02:00
Georg Ehrke bb02330bec Merge branch 'master' into calendar_repeat 2012-06-04 10:35:00 +02:00
Georg Ehrke a6e3739671 Merge branch 'master' into calendar_export 2012-06-04 10:34:50 +02:00
Frank Karlitschek f3c1d1eded link to apps.owncloud.com
thanks to guillaume for the patch
2012-06-03 23:48:59 +02:00
Frank Karlitschek 300f6894e0 4.0.1 2012-06-03 21:06:07 +02:00
Georg Ehrke 4d1428db0f Merge branch 'master' into calendar_repeat 2012-06-03 19:17:05 +02:00
Georg Ehrke 865b7d6a7b Merge branch 'master' into calendar_export 2012-06-03 14:56:25 +02:00
Georg Ehrke c2a51d1f48 proper export for calendar app - doesn't work with apple ical yet - even though a ics validator says it's valid 2012-06-03 14:54:53 +02:00
Robin Appelman e90cbcaf5b http user backend 2012-06-03 02:51:05 +02:00
Michael Gapczynski 0145c65bf3 Verify user exists when checking if logged in, fix for bug oc-863 2012-06-02 20:09:44 -04:00
Michael Gapczynski 993ebc4c90 Verify user exists when checking if logged in, fix for bug oc-863 2012-06-02 20:06:52 -04:00
Michael Gapczynski cc84bd2993 Fix typo in log message 2012-06-01 15:15:05 -04:00
Michael Gapczynski 4db5481ad5 Improve efficiency of retrieving log file entries 2012-06-01 14:42:14 -04:00
Michael Gapczynski 66f1957e3b Improve efficiency of retrieving log file entries 2012-06-01 14:39:50 -04:00
Frank Karlitschek 52b3305892 add a pdo check 2012-06-01 20:01:23 +02:00
Sam Tuke 3d7143c730 Merge branch 'master' of gitorious.org:owncloud/owncloud 2012-06-01 19:01:00 +01:00
Frank Karlitschek 4aa96de537 add a check for pdo 2012-06-01 20:00:33 +02:00
Sam Tuke 2ccf3da411 Merge branch 'master' of gitorious.org:owncloud/owncloud 2012-06-01 19:00:28 +01:00
Sam Tuke 410b556a86 Added class comment block 2012-06-01 18:59:57 +01:00
Frank Karlitschek 07e1e3a945 check if apps folder is writable 2012-06-01 19:54:07 +02:00
Frank Karlitschek 3ef944521e add check if apps folder is writable. needed to install 3rd party apps 2012-06-01 19:52:45 +02:00
Sam Tuke 4b4d13165a Minor change to comment 2012-06-01 16:46:18 +01:00
Sam Tuke 7203f6951e Extended class comment 2012-06-01 16:34:09 +01:00
Frank Karlitschek 60b8e172d5 prevent a division by zero problem 2012-06-01 16:49:14 +02:00
Frank Karlitschek e6b0eb3423 prevend a division by zero problem 2012-06-01 16:48:42 +02:00
Frank Karlitschek 1395e411f4 Merge branch 'master' of gitorious.org:owncloud/owncloud 2012-06-01 16:35:14 +02:00
Frank Karlitschek 2c97f4788b Merge branch 'stable4' of gitorious.org:owncloud/owncloud into stable4 2012-06-01 16:34:52 +02:00
Frank Karlitschek aa9824d35b fix proper error reporting 2012-06-01 16:33:24 +02:00
Frank Karlitschek dcb06393a8 fix propper error reporting 2012-06-01 16:30:47 +02:00
Arthur Schiwon e58efd7877 LDAP group backend: Set configured true when it is... fixe oc-887 2012-06-01 16:02:38 +02:00
Arthur Schiwon 34464b1f8b LDAP group backend: Set configured true when it is... fixe oc-887 2012-06-01 16:02:04 +02:00
Frank Karlitschek aa88ec81c7 sort users and groups. fixes oc-779 2012-06-01 14:21:24 +02:00
Frank Karlitschek ad6562d14f sort users and groups. fixes oc-779 2012-06-01 14:18:14 +02:00
Arthur Schiwon 86279bc192 LDAP group backend: If a group filter is not configured, do not do anything. Fixes oc-867 2012-06-01 14:05:08 +02:00
Arthur Schiwon a4f177d75d LDAP group backend: If a group filter is not configured, do not do anything. Fixes oc-867 2012-06-01 13:49:11 +02:00
Georg Ehrke 46b3b30d46 add status
file for repeating events caching
2012-06-01 13:47:48 +02:00
Frank Karlitschek 0468f53f73 switch magic quotes off.
they are evil and deprecated
2012-06-01 12:42:50 +02:00
Frank Karlitschek 75d56f24f2 try to switch magic quotes off.
it´s evil and deprecated
2012-06-01 12:41:38 +02:00
Frank Karlitschek 1b34bda76b fix oc-874 2012-06-01 12:16:04 +02:00
Frank Karlitschek 93295994dc fix oc-769 2012-06-01 12:15:03 +02:00
Frank Karlitschek e44f9ab46e correctly detect https 2012-06-01 11:47:14 +02:00
Frank Karlitschek a2b41a140e correctly detect https 2012-06-01 11:46:18 +02:00
Georg Ehrke e75146a811 Merge branch 'master' into calendar_repeat 2012-06-01 11:40:39 +02:00
Georg Ehrke 7a8e322679 some work for repeating events caching 2012-06-01 11:30:54 +02:00
Frank Karlitschek 83c6714c72 don´t start a session here. I don´t think it´s needed. Let´s see if it breaks something 2012-06-01 11:12:50 +02:00
Frank Karlitschek 8ed13e627e don´t do warnings.
Not sure if this start_session call is really needed here.
2012-06-01 11:08:40 +02:00
Frank Karlitschek 0d2d613f59 added a serverProtocol function that correctly returns the used protocol even if the ssl connection is terminated at a reverse_proxy or at a load balancer 2012-06-01 11:06:49 +02:00
Frank Karlitschek 24d14783d7 added a serverProtocol function that correctly returns the used protocol even if the ssl connection is terminated at a reverse_proxy or at a load balancer 2012-06-01 10:38:44 +02:00
Frank Karlitschek baae4c741d fix the breadcrumb 2012-05-31 21:44:05 +02:00
Frank Karlitschek 670022cc8a fix the breadcrumb 2012-05-31 21:43:07 +02:00
Frank Karlitschek a72e6cc113 fix oc-780 2012-05-31 21:28:58 +02:00
Frank Karlitschek 3a6341c880 fix oc-780 2012-05-31 21:27:46 +02:00
Frank Karlitschek 5f4132d6ba more fixes 2012-05-31 21:16:36 +02:00
Frank Karlitschek c3ccdbaa79 more fixes 2012-05-31 21:14:46 +02:00
Frank Karlitschek 57a56299d8 more fixes
i don´t understand why this worked before.
2012-05-31 21:10:03 +02:00
Frank Karlitschek d56966f14f someone broke this completely. Hope it works again. Please check your apache error log and turn php notices on if you work on ajax call 2012-05-31 20:45:39 +02:00
Frank Karlitschek d4ea853fcf use our own serverHost call so that ownCloud works with reverse proxy servers 2012-05-31 20:26:09 +02:00
Frank Karlitschek 739c5488a5 Merge branch 'stable4' of gitorious.org:owncloud/owncloud into stable4 2012-05-31 20:17:30 +02:00
Frank Karlitschek 5d425a9f79 use our own serverHost call so that ownCloud works with reverse proxy servers 2012-05-31 20:16:44 +02:00
Georg Ehrke 0059535140 fix potential XSS 2012-05-31 20:03:15 +02:00
Georg Ehrke f0bd571866 fix potential XSS 2012-05-31 20:01:12 +02:00
Arthur Schiwon 3db28d7616 linkTo instead of hard links in Files and Files_Archive. Hope that makes sense. 2012-05-31 19:46:51 +02:00
Sam Tuke ec0c0f3907 Added & improved documentation 2012-05-31 17:57:34 +01:00
Sam Tuke ef60dcc23e fixed typo 2012-05-31 17:38:35 +01:00
Sam Tuke 6b3df8ae9c Improved class comment block 2012-05-31 17:32:34 +01:00
Sam Tuke 8744b09959 added extensive class comment based on icewind's January list email 2012-05-31 17:02:35 +01:00
Sam Tuke fc400e06c3 fixed typos in var names 2012-05-31 14:53:52 +01:00
Sam Tuke 43fcae0409 clarified comment 2012-05-31 14:50:41 +01:00
Sam Tuke e93bb5135d Applied fix from kalassico for "Chiper text must be a string" bug (http://forum.owncloud.org/viewtopic.php?f=3&t=2586&p=5094) 2012-05-31 12:25:07 +01:00
Arthur Schiwon 3b36a9b704 LDAP: make queries compatible also with PostgreSQL 2012-05-31 13:07:49 +02:00
Arthur Schiwon 7ec3e37199 LDAP: make queries compatible also with PostgreSQL 2012-05-31 13:06:27 +02:00
Bart Visscher a33f580db1 Remove OC_App::register function
The data supplied is never used in OwnCloud. Removed the call from all the apps, and made the public API function empty.
2012-05-31 13:01:30 +02:00
Bart Visscher 2ae58ee6c0 Calendar: small cleanup of import progress writing 2012-05-31 13:01:30 +02:00
Bart Visscher 0934a975b2 Remove unused L10N variable 2012-05-31 13:01:30 +02:00
Bart Visscher 4434016a8b Whitespace fixes 2012-05-31 13:01:30 +02:00
Georg Ehrke 54001ec7d8 Merge branch 'master' into oc_error 2012-05-31 12:21:06 +02:00
Georg Ehrke c5cc70c0e3 Merge branch 'master' into calendar_repeat 2012-05-31 12:20:56 +02:00
Robin Appelman d98a0a1bb9 fix for pgsql database migration 2012-05-31 00:01:49 +02:00
Robin Appelman f4577bf00c fix for pgsql database migration 2012-05-31 00:01:03 +02:00
Arthur Schiwon 449b9b92f0 LDAP: fix wrong value for input type 2012-05-30 22:37:00 +02:00
Arthur Schiwon 93849916bb LDAP: support for 'member' as group-member-association 2012-05-30 22:36:48 +02:00
Arthur Schiwon 8b4e16ec77 LDAP: fix wrong value for input type 2012-05-30 22:34:51 +02:00
Frank Karlitschek 4dc7ed139b don´t hardcode /tmp 2012-05-30 14:18:47 +02:00
Frank Karlitschek 22a04d8e93 don´t hardcode /tmp 2012-05-30 14:14:32 +02:00
Thomas Tanghus dbcd26be68 Contacts: Rewrote import script. 2012-05-29 23:41:53 +02:00
Frank Karlitschek c1f7d320e8 mark as 4.0.1 pre 2012-05-29 22:18:07 +02:00
Georg Ehrke 49689dbc7a Merge branch 'master' into oc_error 2012-05-29 19:48:07 +02:00
Georg Ehrke f1a48aec73 Merge branch 'master' into calendar_repeat 2012-05-29 19:47:48 +02:00
Georg Ehrke 29b17672b4 a bit of work for repeating events caching 2012-05-29 19:46:17 +02:00
Michael Gapczynski 1d983c28aa Restrict requested app to apps directory 2012-05-29 12:35:52 -04:00
Michael Gapczynski fbe58755e5 Restrict requested app to apps directory 2012-05-29 12:31:47 -04:00
Michael Gapczynski d334f33eba Initial support for Amazon S3 storage backend
Conflicts:

	apps/files_external/tests/config.php
2012-05-29 12:19:29 -04:00
Thomas Tanghus c9df18ed8c Forgot a break. 2012-05-29 16:46:54 +02:00
Thomas Tanghus 6515c5c1e7 Contacts: NOTE wasn't saved properly. 2012-05-29 16:45:52 +02:00
Thomas Tanghus 51aa84e70a Contacts: NOTE wasn't saved properly. 2012-05-29 16:43:59 +02:00
Thomas Tanghus dff16e70a9 Contacts: Improve loading and cleanup of dialogs. 2012-05-29 16:43:59 +02:00
Georg Ehrke 29372677ae add lib collection and lib scanner to media's appinfo/app.php 2012-05-29 13:36:51 +02:00
Georg Ehrke 482caa04f9 add button to clear calendar's cache 2012-05-29 13:34:27 +02:00
Georg Ehrke e0b17a05ff Merge branch 'master' into oc_error 2012-05-29 13:16:34 +02:00
Georg Ehrke a56f2dbce7 Merge branch 'master' into calendar_repeat 2012-05-29 13:16:08 +02:00
Georg Ehrke 1c1ed52867 fix status
of timezone detection
2012-05-29 13:14:36 +02:00
Georg Ehrke 75afc09b9d fix status
of timezone detection
2012-05-29 13:14:05 +02:00
Brice Maron d1f0261b5d Correct typo in last_insert_id for calendar and pg fix #oc-731 2012-05-28 20:57:52 +00:00
Brice Maron 2f8412defc Set table prefix if not set in postgresql install 2012-05-28 20:56:21 +00:00
Brice Maron 22cd0f1cda Correct typo in last_insert_id for calendar and pg fix #oc-731 2012-05-28 20:41:39 +00:00
Benjamin Diele 7b8664bbe5 Check for valid LDAP-resource before querying.
Check if we have get valid link identifier from
self::getConnectionResource() before using ldap_search() and
ldap_get_entries(), otherwise return an empty array.

Signed-off-by: Benjamin Diele <benjamin@diele.be>
2012-05-28 17:54:38 +04:00
Thomas Tanghus 817f9ff57d Contacts: Fix XSS. 2012-05-28 14:42:57 +02:00
Thomas Tanghus cf113409ad Contacts: Fix XSS. 2012-05-28 14:41:48 +02:00
Frank Karlitschek 1eebbaebdb Merge branch 'master' of gitorious.org:owncloud/owncloud 2012-05-28 13:59:47 +02:00
Frank Karlitschek c79a529edd remove not needed includes 2012-05-28 13:57:45 +02:00
Thomas Tanghus df5bdc8e42 Contacts: Double check XSS, and fix a rookie error ;-) 2012-05-28 13:19:31 +02:00
Thomas Tanghus 53da328aa1 Contacts: Double check XSS. 2012-05-28 12:56:56 +02:00
Thomas Tanghus 8bd6d862b8 Please don't tell me I did that :-P 2012-05-28 12:52:18 +02:00
Georg Ehrke 5b7ef90d3a add urlencode for caldav link 2012-05-28 10:50:10 +02:00
Georg Ehrke 5e7b318e42 add urlencode for caldav link 2012-05-28 10:49:27 +02:00
Georg Ehrke b14f2d0388 update When 2012-05-27 12:31:51 +02:00
Georg Ehrke 94c633b6b7 Merge branch 'master' into oc_error 2012-05-26 22:54:49 +02:00
Georg Ehrke 459114b994 Merge branch 'master' into calendar_repeat 2012-05-26 22:54:24 +02:00
Robin Appelman 3db5fb891c allow longer paths for gallery 2012-05-26 21:54:49 +02:00
Robin Appelman 143287738a allow longer paths for gallery 2012-05-26 21:50:54 +02:00
Frank Karlitschek 54c421f384 check during ownCloud upgrade if all the installed apps are compatible with the new ownCloud version. Disable them if not 2012-05-26 20:40:12 +02:00
Frank Karlitschek 982cde0bb1 check during ownCloud upgrade if all the installed apps are compatible with the new ownCloud version. Disable them if not 2012-05-26 20:37:10 +02:00
Frank Karlitschek a945fa10a6 update copyright 2012-05-26 19:14:24 +02:00
Arthur Schiwon d2369b6e96 LDAP: support for 'member' as group-member-association 2012-05-26 16:38:37 +02:00
Georg Ehrke 1645f77aad fix share for users with a point within their name 2012-05-26 15:41:32 +02:00
Georg Ehrke a1c9191006 fix share for users with a point within their name 2012-05-26 15:23:46 +02:00
Brice Maron 85dbfc8165 Correct small typo to Crypt_Blowfish 3drparty fix oc-810 2012-05-25 22:18:02 +00:00
BlackEagle c704e8077f remote.php :: use non apache-only env vars
- fixes following error when using nginx + php-fpm

[error] *6568 FastCGI sent in stderr: "PHP message:
PHP Warning:  strpos(): Offset not contained in string in
/some-path/owncloud/remote.php on line 10"

Signed-off-by: BlackEagle <ike.devolder@gmail.com>
2012-05-25 21:08:04 +02:00
Frank Karlitschek dfd5a9759c only enable compatible apps 2012-05-25 11:31:46 +02:00
Brice Maron 2774ff1ad8 Add HEAD request management for files ajax/download.php 2012-05-25 11:19:38 +02:00
Georg Ehrke 79bf933319 Merge branch 'master' into oc_error 2012-05-25 10:30:44 +02:00
Georg Ehrke bc9accd26e Merge branch 'master' into calendar_repeat 2012-05-25 10:30:00 +02:00
Brice Maron 9c2a6fb551 Add HEAD request management for files ajax/download.php 2012-05-24 22:48:10 +00:00
Brice Maron 5fa14806c8 Add translation for error message 2012-05-24 19:16:00 +00:00
Brice Maron 2c9311cf48 Add error message when uploading folder or null files. ref oc-739 2012-05-24 18:47:34 +00:00
Robin Appelman a1539dace7 share code between smb and ftp filestorage backends 2012-05-24 19:41:32 +02:00
Brice Maron f00a50c76a Add pending line in file list before trying to upload. Correct indentation 2012-05-24 16:56:19 +00:00
Robin Appelman 2f40f11c87 smb filestorage backend 2012-05-24 18:23:59 +02:00
Michael Gapczynski bee724c53e Initial work on UI for mounting external storage 2012-05-24 11:06:03 -04:00
Michael Gapczynski d8ca4f78cf Fix private link sharing via email, fix for bug oc-750 2012-05-23 19:36:39 -04:00
Michael Gapczynski 970124a90b Fix private link sharing via email, fix for bug oc-750 2012-05-23 19:35:29 -04:00
Frank Karlitschek 24318354f2 changed the default from Berlin to UTC.
Greetings form Berlin by the way ;-)
2012-05-24 00:49:21 +02:00
Frank Karlitschek f97f1b4266 use UTC instead of Berlin as default 2012-05-24 00:47:03 +02:00
Brice Maron 20e9903396 Correct small style problem with task app fix #oc-689 2012-05-23 22:36:36 +00:00
Brice Maron 97d682dc13 Correct small style problem with task app fix #oc-689 2012-05-23 21:02:34 +00:00
Robin Appelman 60fdc13ae6 enable running unit tests from cli 2012-05-22 20:22:53 +02:00
Sam Tuke 3fee3a4633 Merge branch 'unstable' of gitorious.org:owncloud/owncloud into unstable 2012-05-22 14:44:40 +01:00
Sam Tuke 27f7dae932 removed closing php tag 2012-05-22 13:42:55 +01:00
Florian Hülsmann d2e2a2b2c0 prevent apps from printing output from app.php 2012-05-22 13:10:42 +02:00
Frank Karlitschek 647888eea2 add a ldap encryption warning 2012-05-22 12:35:28 +02:00
Frank Karlitschek 8cd7410447 encryption is not yet compatible with ldap 2012-05-22 12:15:51 +02:00
Thomas Tanghus 54a3717005 Contacts: Backport XSS fix. 2012-05-21 21:49:35 +02:00
Thomas Tanghus a896da0d91 Contacts: XSS fix. Still some more to check. 2012-05-21 21:47:15 +02:00
Thomas Mueller ede89ee405 oc-657: icons for M$ office file types 2012-05-21 09:35:31 +02:00
Robin Appelman 3775c0d8b2 dont throw errors when apps dont have types configured 2012-05-20 18:52:44 +02:00
Robin Appelman 3b4c47c52e files app is always enabled 2012-05-20 18:52:27 +02:00
Robin Appelman cb23bae8d9 dont throw errors when apps dont have types configured 2012-05-20 18:52:03 +02:00
Robin Appelman f00b57f8be files app is always enabled 2012-05-20 18:52:03 +02:00
Frank Karlitschek d7c09d8bb5 add a warning 2012-05-20 10:59:37 +02:00
Frank Karlitschek 2f8f7501ef add warning 2012-05-20 10:58:20 +02:00
Georg Ehrke ad66bb9c84 Merge branch 'calendar_dropimport' 2012-05-19 18:58:24 +02:00
Frank Karlitschek c0db603d29 this is 5 pre alpha now 2012-05-19 18:21:33 +02:00
Frank Karlitschek 8a0dc774bc 4 2012-05-19 18:20:23 +02:00
Michael Gapczynski 5a48ade933 Make sure sharing and versions dropdowns come down in the same location for all files 2012-05-19 11:24:23 -04:00
Georg Ehrke d4072c82dd some fixes for contacts, gallery and openid 2012-05-19 15:22:21 +02:00
Georg Ehrke 07fa8da278 fix for calendar 2012-05-19 15:05:58 +02:00
Frank Karlitschek 7e49a33d64 getStorage belongs to files not to apps. 2012-05-19 10:44:08 +02:00
Frank Karlitschek 08f7d4c552 document the public classes a bit more 2012-05-19 10:36:57 +02:00
Michael Gapczynski 35bd601215 Fix check for when to store a new version of a file 2012-05-18 22:27:43 -04:00
Michael Gapczynski f750da1802 Fix revert link on history page of file versions 2012-05-18 22:07:48 -04:00
Michael Gapczynski 89f5701d1a Fix versioning of shared files 2012-05-18 22:07:48 -04:00
Robin Appelman a2cc772aa5 dont run update scripts for apps that arent enabled 2012-05-19 02:00:46 +02:00
Robin Appelman b096fd9ed8 log upgrades 2012-05-19 01:55:20 +02:00
Robin Appelman df64b9b0e9 strict standards fixes for sqlite3 2012-05-19 01:39:41 +02:00
Michael Gapczynski 90cbc32c77 Fix redirect after login, prevent open redirects 2012-05-18 16:56:48 -04:00
Frank Karlitschek e03b5ff665 Merge branch 'master' of gitorious.org:owncloud/owncloud 2012-05-18 21:16:03 +02:00
Frank Karlitschek fdbe0c9734 don´t claim that already downloaded 3rd party apps are internal apps 2012-05-18 21:14:07 +02:00
Frank Karlitschek 0df376d472 Merge branch 'master' of gitorious.org:owncloud/owncloud 2012-05-18 18:25:31 +02:00
Frank Karlitschek 16224e5e8b "fopen(" interferes with our own classes.
remove it for now and let´s fix this later
2012-05-18 18:22:37 +02:00
Arthur Schiwon c1bb8139a0 LDAP: we're 0.2 now 2012-05-18 18:00:30 +02:00
Arthur Schiwon bae954a797 LDAP: only check once for name conflicts on update. Set a value on install as well 2012-05-18 18:00:30 +02:00
Thomas Tanghus 7922338050 Contacts: Added MS opacity mumbo-jumbo that I can't test myself to file form fields. 2012-05-18 17:39:19 +02:00
Arthur Schiwon e606213fa0 make upload work with IE again 2012-05-18 17:07:00 +02:00
Arthur Schiwon 0c7efc234b LDAP: update meta info 2012-05-18 17:07:00 +02:00
Michael Gapczynski ea7456a06a Forgot to actually call remove on the history dropdown 2012-05-18 10:53:58 -04:00
Michael Gapczynski fcb4d2aaee Remove the history dropdown before creating a new one 2012-05-18 10:42:49 -04:00
Michael Gapczynski 122d1efecf Don't show the select form in the history dropdown if a file has no other versions 2012-05-18 10:39:43 -04:00
Michiel de Jong fc536c3491 add htmlentities() call into login form 2012-05-18 16:12:49 +02:00
Frank Karlitschek 9e73524168 mark the apps as part of the shipped package and increase the requirement to ownCloud 4 2012-05-18 16:06:57 +02:00
Frank Karlitschek 2d3c709163 Merge branch 'master' of gitorious.org:owncloud/owncloud 2012-05-18 15:56:15 +02:00
Frank Karlitschek db77dc91bc only try to install apps that are compatible with oC4 2012-05-18 15:54:36 +02:00
Frank Karlitschek 2e9115efe0 increase to RC2 2012-05-18 15:54:17 +02:00
Michiel de Jong a6ff909911 this code looks wrong to me but i'm putting it back while we find out what the right code should look like 2012-05-18 15:39:28 +02:00
Michiel de Jong 1a874b4c56 make redirect safe by restricting it to current host 2012-05-18 15:32:41 +02:00
Michiel de Jong 9b5e8a2c63 fix redirect to desired page after login 2012-05-18 15:11:01 +02:00
Arthur Schiwon ea33b4aaa1 LDAP: don't make us of global constants (completing, was removed with latest additions to update.php) 2012-05-18 12:55:38 +02:00
Arthur Schiwon 253f101b39 LDAP: check wether applying naming rule would end up in conflicts on update, if so don't do it 2012-05-18 12:55:37 +02:00
Georg Ehrke 73a72054a3 fix call of all versions page 2012-05-18 12:00:35 +02:00
Georg Ehrke 7d49bf7f6e some changes in calendar repeat class 2012-05-18 11:48:18 +02:00
Michael Gapczynski b7aee58ef9 Hooks aren't working across different users' filesystems, so update the mtime of the Shared folder for all shared item events 2012-05-17 21:26:55 -04:00
Robin Appelman 48505c5626 improve tar archive backend 2012-05-18 01:54:59 +02:00
Michael Gapczynski 5b42325b01 History dropdown clean-up 2012-05-17 18:57:52 -04:00
Tom Needham 74d49920f2 Close history dropdown on success. Avoids confusion. 2012-05-17 21:22:48 +00:00
Tom Needham 0aac70aaf1 Revert google webfont removal. Sadly this causes havoc with the editor! 2012-05-17 20:23:43 +00:00
Georg Ehrke 3d713e711b Merge branch 'master' into oc_error 2012-05-17 22:17:31 +02:00
Georg Ehrke f7366de673 Merge branch 'master' into calendar_repeat 2012-05-17 22:17:23 +02:00
Georg Ehrke 38b93653a1 Merge branch 'master' into calendar_dropimport 2012-05-17 22:17:06 +02:00
Michael Gapczynski fbe0d0d4fd Fix private links inside folders 2012-05-17 16:12:33 -04:00
Georg Ehrke b35c6b57a9 allow loading of css files even if a user isn't logged in 2012-05-17 21:56:33 +02:00
Georg Ehrke 6146b6a131 fix paths to images and set height for calendar management dialog 2012-05-17 21:51:38 +02:00
Michael Gapczynski 57d41bb1f8 Merge branch 'merge-requests/115' 2012-05-17 15:39:39 -04:00
Michael Gapczynski cbfbbe672c Merge commit 'refs/merge-requests/115' of git://gitorious.org/owncloud/owncloud into merge-requests/115
Conflicts:
	apps/files/templates/index.php
2012-05-17 15:38:28 -04:00
Michiel de Jong 2cc0515161 no use for double quotes here 2012-05-17 21:03:06 +02:00
Michiel de Jong f998ed331a removing dead code 2012-05-17 21:01:42 +02:00
Michiel de Jong 3e454d3459 oops! was hardcoding my test domain inadvertently 2012-05-17 21:00:11 +02:00
Arthur Schiwon 7a7c301d7d LDAP: follow user- and groupname char limitations for LDAP display names
WARNING: may affect existing installations if display names included unallowed characters. Allowed are only a-zA-Z0-9._-@ This fix is however needed, because names with unallowed characters may cause conflicts
2012-05-17 17:17:40 +02:00
Arthur Schiwon 57cf0ae3d1 LDAP: remove unnecessary debug output 2012-05-17 17:17:40 +02:00
Arthur Schiwon 38c56388c1 LDAP: Fix case sensitivity issues with display name attribute 2012-05-17 17:17:40 +02:00
Thomas Tanghus b9cd0ecc8a Contacts: wrong name was set on initial load. 2012-05-17 16:46:39 +02:00
Michael Gapczynski cf181e88bb Try to setup a user's filesystem if the user hasn't logged in before and is shared a file 2012-05-17 09:24:54 -04:00
Thomas Tanghus 2f1e601809 Contacts: Disable in-app import if encryption is enabled, and make an attempt of supporting IE uploads too. Can't test it though... 2012-05-17 14:31:04 +02:00
Michael Gapczynski 9b3847f49b Initial support for Amazon S3 storage backend 2012-05-16 21:52:05 -04:00
Robin Appelman bfdb374a2c allow reverting file from history dropdown 2012-05-17 02:16:33 +02:00
Robin Appelman 4ccfd27fa2 fix versioning for movable apps 2012-05-17 01:53:23 +02:00
Robin Appelman c1ba4deb72 when scanning a folder that is a mountpoint, use the root of the mount for checking if a folder is writable instead of the folder 2012-05-17 01:47:58 +02:00
Robin Appelman 58adeaa80a only check our own input fields when determining to show the login button
fixes a problem with browser plugins adding hidden inputs
2012-05-17 01:17:44 +02:00
Robin Appelman aac9629e88 add support for custom ports for mysql/pgsql by adding :portnumber to the database host 2012-05-17 01:06:22 +02:00
Robin Appelman 5fe7200a7f update documentation of oc_user::checkpassword 2012-05-17 00:57:43 +02:00
Robin Appelman 2c99924f7d make sure the group exists in the backend before adding a user to it 2012-05-17 00:47:43 +02:00
Robin Appelman ac8bfc218e update translations 2012-05-17 00:36:21 +02:00
Thomas Tanghus d216678481 Contacts: removed check for empty FN field because Chrome/Chromium barfed. 2012-05-16 23:45:43 +02:00
Georg Ehrke 9e83c3f823 add caldav and carddav files in their old place for backward compatibility - add rewriterule for caldav and carddav 2012-05-16 21:05:15 +02:00
Sam Tuke 22dd155e4d Merge branch 'unstable' of gitorious.org:owncloud/owncloud into unstable 2012-05-16 18:30:35 +01:00
Sam Tuke 9acd1065b0 made initial testing version of expireAll for version control \ngave some old vars new camelcase names 2012-05-16 18:30:26 +01:00
Bart Visscher c645a7d0f8 Fix empty jsfiles and cssfiles in layout template 2012-05-16 18:53:46 +02:00
Bart Visscher ce1e4425c2 Combine and minimize core and default app js files 2012-05-16 18:53:46 +02:00
Bart Visscher f71fec8cdc Combine and minimize core and default app css files 2012-05-16 18:53:46 +02:00
Bart Visscher 2faae817f1 Template: Fix var name 2012-05-16 18:53:46 +02:00
Bart Visscher 6d20fe4012 Template: Make getFormFactorExtension function public 2012-05-16 18:53:46 +02:00
Bart Visscher b39f01fce6 Comment spelling fix 2012-05-16 18:52:40 +02:00
Bart Visscher 5d72681d10 Better place to check caching headers 2012-05-16 18:52:40 +02:00
Arthur Schiwon ab18a0bfe8 ldap: unique index names for the database, fixes non-creating of indexes for the second table and potential issues in the app 2012-05-16 18:11:42 +02:00
Michiel de Jong eceed497b1 fix paths in apps/remoteStorage/ajax/revokeToken.php 2012-05-16 18:08:50 +02:00
Sam Tuke fefa4412c4 added phpdoc comment 2012-05-16 15:17:51 +01:00
Sam Tuke 2afd516ee9 Merge branch 'unstable' of gitorious.org:owncloud/owncloud into unstable 2012-05-16 15:03:51 +01:00
Sam Tuke c0df40084a added recognition of which version is 'current' - which is currently live and in use on history page 2012-05-16 15:00:36 +01:00
Arthur Schiwon fbc2892083 try to remove deprecated files from /files on update 2012-05-16 15:59:36 +02:00
Sam Tuke 0a46ae4f6d added recognition of which version is 'current' - which is currently live and in use on history page 2012-05-16 14:59:00 +01:00
Michael Gapczynski c04074692e Fix incorrect toaddress being passed for emailing private links 2012-05-15 19:05:26 -04:00
Sam Tuke a00c5ac78c fixed some include path issues
imroved wording of history page revert instructions
cleaned up js call to ajax getVersions.php
2012-05-15 18:21:51 +01:00
Thomas Tanghus 0f66870470 Contacts: Corrected i18n call. 2012-05-15 18:49:38 +02:00
Michael Gapczynski b619821f4a Create a new OC_Share object instead of manually inserting rows when adding a user to a group share, prevents a couple of potential bugs 2012-05-15 12:03:20 -04:00
Michael Gapczynski 6673375eeb No multiple file sharing in this next release, sharing UI isn't ready for it :( 2012-05-15 11:45:59 -04:00
Michael Gapczynski 7b92c27777 Check if a file is encrypted before sharing (encrypted files cannot be shared) 2012-05-15 11:29:02 -04:00
Sam Tuke 2ad6b5048e fixed 'delete' label so it doesn't break translations 2012-05-15 16:24:06 +01:00
Arthur Schiwon 01b366df80 avoid corrupt ZIP files on lighttpd, should fix oc-467 2012-05-15 11:57:24 +02:00
Arthur Schiwon 35effbcd3f LDAP: convert all DNs to lowercase so to make comparisons and everything work 2012-05-15 11:12:29 +02:00
Michael Gapczynski 568b6a7f56 Make only writable files draggable 2012-05-14 20:41:06 -04:00
Michael Gapczynski a3b06e9658 Check if a private link points to a folder or file and change text accordingly 2012-05-14 20:21:31 -04:00
Michael Gapczynski cda9dcc7aa Fix private link emailing and clean up file name displayed in email 2012-05-14 20:21:31 -04:00
Michael Gapczynski 5cf42b88af Replace all %2F with a / in private link 2012-05-14 20:21:31 -04:00
Thomas Mueller 583dce5276 removing executable bit - again 2012-05-15 00:52:00 +02:00
Brice Maron 97e8ff6801 Switch enable button only when app is really installed or uninstalled 2012-05-14 21:52:40 +00:00
Michael Gapczynski d4271ed9df Use original source when resharing a file, fixes bug oc-210 2012-05-14 17:31:03 -04:00
Thomas Mueller 954d4e5200 No need to keep the 'source files' in here, because the latest 'git master' release can be pulled
from http://mozilla.github.com/pdf.js/build/pdf.js

README added to document the fact stated above
update.sh added for easy update of pdfjs

CAUTION:
Don't update before OC4! API has been changed and we need to adopt files_pdfviewer
2012-05-14 23:21:29 +02:00
Robin Appelman 8b1bc322ff remove simpletests internet test cases due to xss issues 2012-05-14 23:12:16 +02:00
Robin Appelman 6779f28af4 cache app types during install or update 2012-05-14 22:49:31 +02:00
Michael Gapczynski e03c5f39a8 Call is_writable explicitly on folders for readonly check 2012-05-14 16:31:00 -04:00
Thomas Tanghus e74f4b406f Remove logging. 2012-05-14 17:50:24 +02:00
Thomas Tanghus 9b3d8660eb Contacts: Had forgotten to call local function. 2012-05-14 17:49:33 +02:00
Thomas Tanghus de850dfa52 Contacts: Fix layout in contacts list that I had broken in an earlier fix :-P 2012-05-14 17:49:33 +02:00
Michiel de Jong 4c6d11e223 move auth.css and remoteStorage-big.png to assets folders From where they can be included 2012-05-14 17:05:35 +02:00
Georg Ehrke 18c8896b3c better user permission check for files in ajax/calendar/ 2012-05-14 15:59:06 +02:00
Georg Ehrke 84827ff992 some fixes for calendar's export.php 2012-05-14 15:52:24 +02:00
Georg Ehrke 3f86fd5193 remove redirects in htaccess to improve compatibility with desktop client 2012-05-14 15:42:16 +02:00
Georg Ehrke 9c8eb104b6 check user permissions in calendar's changepermission.php 2012-05-14 15:42:16 +02:00
Georg Ehrke 55eb318265 check user permissions in calendar's unshare.php 2012-05-14 15:42:16 +02:00
Thomas Mueller bda2dbec1f Prevent Clickjacking by adding additional headers:
header('X-Frame-Options: Sameorigin');
                header('X-XSS-Protection: 1; mode=block');
                header('X-Content-Type-Options: nosniff');

Thanks to Lukas Reschke for reporting this issue (and many more).
2012-05-14 15:34:28 +02:00
Arthur Schiwon 0c8740c1d5 LDAP: and don't forget the else part 2012-05-14 13:13:08 +02:00
Arthur Schiwon 82cfb3e0f5 LDAP: don't store agent password in plain text 2012-05-14 12:58:58 +02:00
Arthur Schiwon 2e34673989 LDAP: no whitespaces after the , in the DNs, resolves conflicts with some servers 2012-05-14 12:25:33 +02:00
Thomas Tanghus 1f2b37c08b Contacts: Photo upload handlers wern't being loaded for new contacts.
Name conflict with two FileUploads :-P
2012-05-14 11:08:00 +02:00
Klaas Freitag 3514ec5947 Merge branch 'master' of gitorious.org:owncloud/owncloud 2012-05-14 10:52:25 +02:00
Klaas Freitag 1fc74ea174 Add ctmp extension to blacklist to make sync test files not versioned. 2012-05-14 10:51:41 +02:00
Thomas Tanghus 40f91d9f7c Contacts: The proper DOM wasn't loaded after import and thumbnails weren't being updated. 2012-05-14 10:13:45 +02:00
Michael Gapczynski 6d37f9b951 Remove scroll to bookmarks_menu, no longer existent and the bookmark controls are always visible at the top anyways 2012-05-13 21:10:27 -04:00
Robin Appelman e7c106d91e selective app loading for remote/public 2012-05-14 00:28:28 +02:00
Robin Appelman 0fb90fa875 set public handeler in info,xml for sharing 2012-05-14 00:28:27 +02:00
Thomas Tanghus 4e1e978b89 Contacts: Forgot one file for the import fix. 2012-05-13 23:27:14 +02:00
Thomas Tanghus 9295f49553 Contacts: Add error checking and reporting to import from files app. 2012-05-13 23:27:14 +02:00
Michael Gapczynski 1629c77eb5 Validate bookmark inputs, fixes bug oc-636 2012-05-13 16:58:47 -04:00
Tom Needham 90518e8d2a Merge branch 'master' of gitorious.org:owncloud/owncloud 2012-05-13 20:50:19 +00:00
Tom Needham b80b8656eb Third time lucky fixing google font include 2012-05-13 20:49:54 +00:00
Michael Gapczynski 8a42d159f7 Variable not declared in media app, fixes bug oc-633. Thanks to die3lustigen2. 2012-05-13 16:45:03 -04:00
Tom Needham ddb8d1460b Revert "Remove google webfont include"
This reverts commit 30d31fecd9.
2012-05-13 20:43:20 +00:00
Tom Needham 2e2eccc879 Merge branch 'master' of gitorious.org:owncloud/owncloud 2012-05-13 20:19:25 +00:00
Tom Needham 21dfe9dc5e Fixed keyboard shortcut for saving files. Thanks adlr in #ace! 2012-05-13 20:19:20 +00:00
Michael Gapczynski 198b73ddd1 Sanitize search queries, thanks to Lukas Reschke 2012-05-13 15:57:46 -04:00
Georg Ehrke 3ce6eca40a fix fail in previous commit 2012-05-13 21:46:34 +02:00
Georg Ehrke 3327aabe4d fix remote.php for servers which doesn't support PATH_INFO 2012-05-13 21:46:34 +02:00
Tom Needham 82d3fe2e1c Merge branch 'master' of gitorious.org:owncloud/owncloud 2012-05-13 19:42:00 +00:00
Tom Needham 30d31fecd9 Remove google webfont include 2012-05-13 19:41:41 +00:00
Tom Needham 78ecfc89a7 Fix breadcrumb path 2012-05-13 19:33:42 +00:00
Michael Gapczynski a332c39472 Check if path_info is empty as well, fixes bug oc-632. Thanks to die3lustigen2. 2012-05-13 15:26:30 -04:00
Robin Appelman 6b6477a90a fix getting the db scheme from existing database 2012-05-13 21:22:08 +02:00
Robin Appelman 8d475debe0 additional logging when db upgrade fails 2012-05-13 21:21:39 +02:00
Robin Appelman 68fd5a5d58 some mdb2 pgsql fixes 2012-05-13 20:56:25 +02:00
Robin Appelman 1a2ab2ef68 prevent user creation with empty password 2012-05-13 20:53:56 +02:00
Robin Appelman 77e2387d94 more MDB2 updates 2012-05-13 20:53:55 +02:00
Georg Ehrke ddf0903ace add post user delete hook for calendar sharing 2012-05-13 20:03:52 +02:00
Robin Appelman ee0294bbb1 update translations 2012-05-13 20:00:34 +02:00
Georg Ehrke a5f0ac811f Merge branch 'master' into oc_error 2012-05-13 19:13:31 +02:00
Georg Ehrke 11780ad40d Merge branch 'master' into calendar_repeat 2012-05-13 19:13:17 +02:00
Georg Ehrke 6e9ed3791b Merge branch 'master' into calendar_dropimport 2012-05-13 19:12:35 +02:00
Georg Ehrke da9486157d Merge branch 'master' into calendar_repeat 2012-05-13 19:10:49 +02:00
Georg Ehrke 0892abd050 some little js fixes for drop import 2012-05-13 15:08:27 +02:00
Thomas Tanghus 3926e2d4f3 VCategories: Made a small check for categories that seems to resolv the problems in Calender. Also reverts the changes from 9e6221b229. 2012-05-13 15:07:07 +02:00
Georg Ehrke 62a86748b5 Merge branch 'master' into calendar_dropimport 2012-05-13 15:06:02 +02:00
Georg Ehrke 63a1b066bc add first version of drop import 2012-05-13 15:05:57 +02:00
Georg Ehrke 5ac10a9c0e hide share tab for new events, because you can't share an event that haven't got an id yet 2012-05-13 12:28:28 +02:00
Georg Ehrke f45411f79d fix another php notice 2012-05-13 12:25:26 +02:00
Georg Ehrke 85cc34fd05 fix another php notice 2012-05-13 12:14:08 +02:00
Georg Ehrke f6dc158d51 fix php notice and displaying of events 2012-05-13 12:02:36 +02:00
Thomas Tanghus 9e6221b229 VCategories: Suppress error messages stemming from import from file app. 2012-05-13 09:16:53 +02:00
Thomas Tanghus 56bd3f1220 Revert "Edited combobox to adhere to coding standards and added a dblclick handler."
This reverts commit 19b55d3fce.
2012-05-13 06:22:15 +02:00
Thomas Tanghus 996020d82b Revert "Contacts: Change placeholder text to avoid confusion. No, JanC, I won't change it back again ;-)"
This reverts commit a36a8faad4.

Moved it to unstable branch for now.
2012-05-13 06:22:15 +02:00
Frank Karlitschek af77ce9a9b This is RC now 2012-05-13 05:11:10 +02:00
Georg Ehrke dfef36ba2f some changes for calendar repeat class 2012-05-12 23:16:11 +02:00
Georg Ehrke b1cae9651e add functions get cached events in a specific time period 2012-05-12 23:00:21 +02:00
Georg Ehrke dc34ed5a12 Merge branch 'master' into calendar_repeat 2012-05-12 22:55:35 +02:00
Thomas Mueller 546ae30421 non-minified version added 2012-05-12 20:56:29 +02:00
Thomas Mueller 51cb1c9ffa fixing file headers with copyright 2012-05-12 20:46:07 +02:00
Thomas Tanghus 19b55d3fce Edited combobox to adhere to coding standards and added a dblclick handler. 2012-05-12 13:43:34 +02:00
Thomas Tanghus a36a8faad4 Contacts: Change placeholder text to avoid confusion. No, JanC, I won't change it back again ;-) 2012-05-12 13:43:33 +02:00
Bartek Przybylski ab9927d5fc oc-627, calling base function instead of loading too much useless functions 2012-05-12 13:25:04 +02:00
Michael Gapczynski b4e7c05959 Encoded slashes (%2F) don't look pretty in our private link urls 2012-05-11 20:58:21 -04:00
Michael Gapczynski faebee5f25 Turn async off when fetching users to make sure the users get removed from the select form 2012-05-11 20:39:48 -04:00
Robin Appelman 9eb91a111d update to jquery 1.7.2 2012-05-12 00:37:19 +02:00
Robin Appelman d07512c82d fix gallery previous not showing 2012-05-12 00:37:19 +02:00
Bart Visscher 20499e336b Remove duplicate line 2012-05-11 22:13:05 +02:00
Brice Maron 5b7c69f978 Change sqlite escaping of identifier to double quote. Fixing some issues 2012-05-11 19:45:53 +00:00
Bart Visscher 919681f3e6 Make processed css files cachable 2012-05-11 21:33:02 +02:00
Bart Visscher 97233b77cd Remove DOCUMENTROOT static var, and make SUBURI var private 2012-05-11 21:31:51 +02:00
Robin Appelman 847832ae77 also set remote/public paths on installing apps 2012-05-11 20:58:23 +02:00
Robin Appelman d12021e3c4 fix sqlite3 driver against updated MDB2 2012-05-11 20:56:02 +02:00
Robin Appelman cf3940425f don't do the initial scanning of the users home folder trough the update system 2012-05-11 20:49:19 +02:00
Robin Appelman 0622fa79ba add temporary filestorage backend for testing purposed 2012-05-11 20:33:56 +02:00
Robin Appelman b40f9670ae allow clearing hooks and fileproxies 2012-05-11 20:33:56 +02:00
Robin Appelman 736739bbbd load remote and public paths from info.xml during upgrade instead of setting them every time 2012-05-11 20:33:56 +02:00
Robin Appelman d2bd78c41a update MDB2 and XML_Parser 2012-05-11 20:33:56 +02:00
Arthur Schiwon 3c2af95108 LDAP: offer only ownCloud-enabled users for sharing 2012-05-11 19:21:13 +02:00
Thomas Tanghus 8e5240d579 Contacts: Make the structured name dialog modal to avoid confusion. 2012-05-11 18:21:55 +02:00
Thomas Tanghus 646a4bd635 Contacts: Clone event handlers as well. 2012-05-11 18:21:55 +02:00
Thomas Tanghus 08e0b6cf5e Contacts: Also strip parameters. 2012-05-11 18:21:55 +02:00
Sam Tuke d98d72aa99 improved url generation - made use of OC.linkTo() for linking to versions history page 2012-05-11 17:13:58 +01:00
Michiel de Jong c99d7dd94f the ',last' breaks all other rewrite rules and is also not there in the committed .htaccess, so removing it. anybody know why it was there? 2012-05-11 17:59:21 +02:00
Robin Appelman 9c2f105164 update PEAR to 1.9.4 2012-05-11 17:57:55 +02:00
Michiel de Jong 347ce2aafa match setup script to .htaccess from repo 2012-05-11 17:30:27 +02:00
Michiel de Jong f0362dbf58 register public.php?service=host-meta 2012-05-11 17:25:32 +02:00
Michiel de Jong 4462b26160 oops, typo in lib/setup.php 2012-05-11 17:09:10 +02:00
Michiel de Jong 2dff357a4e add new htaccess things into setup script too 2012-05-11 17:06:04 +02:00
Michiel de Jong 9469c9947f fix warning 'unknown var appsDir' 2012-05-11 16:59:44 +02:00
Georg Ehrke 232788396d some changes for login 2012-05-11 16:43:45 +02:00
Arthur Schiwon 7efa7171e3 LDAP: wrong assumptions for case (in)sensitivity, implement far better solution 2012-05-11 15:42:57 +02:00
Michiel de Jong 3fd2e0d2ce correct host-meta mime type 2012-05-11 15:27:11 +02:00
Michiel de Jong 4c02a82f6c move lrdd to jrd 2012-05-11 15:26:45 +02:00
Michiel de Jong b133f22d7f move host-meta to JRD because I can't work out how to deal with ampersands in XRD 2012-05-11 15:21:45 +02:00
Michiel de Jong a95c1b8082 fix auth dialog includes 2012-05-11 15:21:45 +02:00
Jan-Christoph Borchardt 00e1d174a9 fixed settings text not being clickable 2012-05-11 12:24:49 +00:00
Sam Tuke e98305fa65 Merge branch 'master' of gitorious.org:owncloud/owncloud 2012-05-11 13:18:51 +01:00
Sam Tuke 03fad97764 fixed some include path issues
imroved wording of history page revert instructions
cleaned up js call to ajax getVersions.php
2012-05-11 13:17:37 +01:00
Georg Ehrke 8f2217ca2e make default app choosable 2012-05-11 13:56:52 +02:00
Michiel de Jong 61d535984d clean up auth dialog 2012-05-11 11:05:44 +02:00
Michiel de Jong 2e309aae97 announce OAuth2 implicit grant end-point the new way 2012-05-11 10:52:37 +02:00
Michiel de Jong 02cee2c562 trying to fix /.well-known/host-meta 2012-05-11 10:47:42 +02:00
Michiel de Jong 0c7f0aa3fa attempt to align the webfinger app with new public.php routing 2012-05-11 10:26:30 +02:00
Michael Gapczynski 59a2616105 Fix music file action i.e. click to play, make OC.filePath act like OC_Helper::linkTo() for index.php links 2012-05-10 23:04:27 -04:00
Michael Gapczynski 20d9a8b6a1 Fix accidental creation of duplicate files because of extra / in search results 2012-05-10 22:04:05 -04:00
Michael Gapczynski a3f250bfe6 Fix text files for search results 2012-05-10 21:44:04 -04:00
Michael Gapczynski 0c86f8a61e Fix image previews for search results 2012-05-10 21:36:17 -04:00
Michael Gapczynski daff3aa667 Prevent overwriting of private link status 2012-05-10 21:06:45 -04:00
Michael Gapczynski 60103d9b94 Only mount shared storage after a user has logged in, fixes shared folder not appearing for some WebDAV clients and sync client 2012-05-10 19:56:41 -04:00
Thomas Tanghus e5840e1fe2 Contacts: Hack to add structured name from formatted name. 2012-05-11 01:14:11 +02:00
Thomas Tanghus aa51639271 Contacts: Fix check for version. 2012-05-11 01:14:11 +02:00
Thomas Tanghus 78c11700f9 Added some margin. 2012-05-11 01:14:11 +02:00
Tom Needham 709b0a1ddc Check if app is enabled before exporting its data 2012-05-10 23:06:53 +00:00
Brice Maron 4094f6f8e0 Correct undef variable mistake from prev commit 2012-05-10 19:51:03 +00:00
Jan-Christoph Borchardt d1e5a56bc6 fixing upload icon color 2012-05-10 21:40:22 +02:00
Brice Maron ffe5ef2268 Correct calendar loading when calendar are from hooks. fix oc-619 2012-05-10 19:36:30 +00:00
Thomas Tanghus 7bc6e86969 Contacts: Fix some regressions from last commit. 2012-05-10 20:44:12 +02:00
Tom Needham bf93b9e98a Make select_all checkbox more central 2012-05-10 18:08:46 +00:00
Jan-Christoph Borchardt 20f8137ca0 upload button goes MJ 2012-05-10 20:05:30 +02:00
Georg Ehrke a69c53caef remove empty line in .htaccess 2012-05-10 18:14:59 +02:00
Michael Gapczynski de95bf62a2 Prevent any null bytes related exploits, thanks to Lukas Reschke 2012-05-10 11:44:06 -04:00
Michael Gapczynski 3c6c8ecab0 Make email private link submit on enter as well 2012-05-10 11:44:06 -04:00
Thomas Tanghus 2c6740b0c7 Some UI and code restructering according to usability tests: https://mail.kde.org/pipermail/owncloud/2012-May/003194.html 2012-05-10 16:53:25 +02:00
Thomas Tanghus ddd991a59e Minor css fix. 2012-05-10 16:42:10 +02:00
Michael Gapczynski d9fbdae758 Prevent XSS exploit by checking if path-info is set, thanks to Lukas Reschke 2012-05-10 10:26:12 -04:00
Jan-Christoph Borchardt e3f452cf53 larger clickable area for new button 2012-05-10 14:08:08 +00:00
Jan-Christoph Borchardt 2ae37b32d4 fixing background for clicked new button 2012-05-10 13:44:30 +00:00
Jan-Christoph Borchardt 8fc565821f reduced text shadow brightness 2012-05-10 13:37:48 +00:00
Jan-Christoph Borchardt 46b1f35107 highlight the files new and upload button all the time 2012-05-10 13:34:44 +00:00
Sam Tuke b055ebc1fc added documentation to OCP namespace 2012-05-10 14:19:17 +01:00
Arthur Schiwon 7a5028317d LDAP: don't fall over case insensitive LDAP attribute name 2012-05-10 12:59:20 +02:00
Vitaly Kuznetsov 6f981738bb Fix some non-utf8-friendly htmlentities (resulting in wrong display of utf8-encoded directory names for example) 2012-05-10 09:10:53 +00:00
Bart Visscher 9a66b869c0 Gallery: Use App storage instead of contructing our own path 2012-05-10 09:14:27 +02:00
Bart Visscher c2230580c1 Remove unused OC static variable CONFIG_DATADIRECTORY_ROOT 2012-05-10 09:14:27 +02:00
Bart Visscher b022ccb863 Whitespace fixes 2012-05-10 09:14:26 +02:00
Bart Visscher e77ba0280a Implement default functions in OC_Group backend
Simplifies calling these functions, and makes code simpler

functions:
inGroup
getUserGroups
getGroups
usersInGroup
2012-05-10 09:14:26 +02:00
Bart Visscher ac2e0cd6e4 Implement default functions in OC_User backend
Simplifies calling these functions, and makes code simpler

functions:
deleteUser
getUsers
userExists
2012-05-10 09:14:26 +02:00
Bart Visscher a9d7c67bf2 The log message is not always shown in html
The log message can also be logged with syslog, here we don't want to have html-entities. Also the log messages through json are displayed as text not html.
2012-05-10 09:13:09 +02:00
Bart Visscher 94803dc222 Gallery: No short tags 2012-05-10 09:04:10 +02:00
Bart Visscher 2062ebacef Gallery: Show thumbnails after document is ready 2012-05-10 09:04:10 +02:00
Michael Gapczynski 798e6aa40b Merge commit 'refs/merge-requests/100' of git://gitorious.org/owncloud/owncloud into merge-requests/100 2012-05-09 17:50:14 -04:00
Michael Gapczynski 93c0e8b3bf Fix unsharing files also deleting private link, bug fix for oc-251 2012-05-09 17:38:35 -04:00
Brice Maron de6aa0f88c Use a clean uri param constructor to get files 2012-05-09 21:35:59 +00:00
Michael Gapczynski 98cd98e2e5 Skip over users that have already been shared with when sharing with a group 2012-05-09 17:16:31 -04:00
Michael Gapczynski d4636f4b86 Fix renaming of shared files if target already exists, bug fix for oc-81 2012-05-09 17:01:46 -04:00
Michael Gapczynski 2e826fa82a Go back to updating mtime of shared folder to invoke a file cache rescan 2012-05-09 16:20:38 -04:00
Robin Appelman 3e57e76c48 fix creating the shared folder when the user home folder is not in the root mount 2012-05-09 20:36:08 +02:00
Robin Appelman 03f66c6351 also scan new folders when checking for updates
it might cause long load times but seems the best for now
2012-05-09 20:35:12 +02:00
Michael Gapczynski 14b240a3f4 Still trying to fix some sharing use cases 2012-05-09 13:51:52 -04:00
Georg Ehrke a589a700e1 revert 000d7ba975 2012-05-09 18:34:44 +02:00
Georg Ehrke bc60b8d87a fix bug in public api 2012-05-09 18:33:40 +02:00
Georg Ehrke 99db3c01ee fix bug in events.php 2012-05-09 17:36:48 +02:00
Michiel de Jong 890c57bad5 fix requires in apps/remoteStorage/ajax/revoke.php 2012-05-09 15:40:39 +02:00
Michiel de Jong 4de182c7af bearer token should be the whole thing, not the http basic pass 2012-05-09 15:28:30 +02:00
Michiel de Jong 9d443e021d new requires in WebDAV.php 2012-05-09 15:28:30 +02:00
Michiel de Jong 2cf5bb6849 new requires now necessary 2012-05-09 15:28:30 +02:00
Michiel de Jong 7d090a45d2 attempt at reusing access tokens 2012-05-09 15:28:30 +02:00
Michael Gapczynski 63cc1ccacd Sanitize group in togglegroups 2012-05-09 09:23:19 -04:00
Philipp Roggan bba434ca37 fixed typo in lib/public/util.php:106 (varname to ) 2012-05-09 15:17:40 +02:00
Robin Appelman 588b51d88a update translations 2012-05-09 12:41:01 +02:00
Georg Ehrke 000d7ba975 fix bug in calendar 2012-05-09 11:53:16 +02:00
Arthur Schiwon eb7e2d7d35 Sharing: even if a user has more groups in common, he should appear only once in the dropdown list 2012-05-09 11:35:36 +02:00
Brice Maron fae1ce4ea7 Correct file move by dropping on folder 2012-05-08 22:07:14 +00:00
Arthur Schiwon c1490239e5 LDAP group: support for memberUid, fix for oc-594 2012-05-08 23:49:33 +02:00
Michael Gapczynski 051442bc76 Sanitize redirect urls 2012-05-08 17:41:50 -04:00
Tom Needham 7dcf38c40f Better checking of ajax paramters and better logging 2012-05-08 19:48:28 +00:00
Tom Needham 9c47346373 Protect admin from evil log messages 2012-05-08 19:41:31 +00:00
Brice Maron 41d0308806 Change label for saving bookmark button 2012-05-08 19:04:06 +00:00
Bart Visscher 4f88fadbc1 Add remote for media/tomahawk.php 2012-05-08 18:40:40 +02:00
Bart Visscher da1da8197e Calendar: Resize content after creating calendar layout
The calendar can be higher than the window, this corrects for the scrollbar
2012-05-08 18:40:40 +02:00
Brice Maron fa4a52260f Try to correct query string url for search in bookmark 2012-05-08 16:22:35 +00:00
Georg Ehrke 52717d2a1b remove comments 2012-05-08 17:07:50 +02:00
Michael Gapczynski f6df71b74d Set Content-Disposition to attachment for shared private links 2012-05-08 10:27:02 -04:00
Arthur Schiwon 9dee2a6b2c LDAP: settings for group filter, fixes oc-587 2012-05-08 14:44:29 +02:00
Arthur Schiwon c067cfc3b5 , not . 2012-05-08 14:09:38 +02:00
Arthur Schiwon d01db3a807 LDAP: make sure, configuration is read when a public method needs it 2012-05-08 14:02:16 +02:00
Arthur Schiwon 5dee914ed2 LDAP: sqlite compatibility 2012-05-08 13:56:07 +02:00
Arthur Schiwon 251a6d1a9f LDAP: write to log in case bind fails. 2012-05-08 12:04:52 +02:00
Georg Ehrke cdf5d4e231 fix for previous commit 2012-05-08 08:49:14 +02:00
Georg Ehrke 0ce1cbdd14 fix calendar vulnerability 2012-05-08 08:46:27 +02:00
Brice Maron 010b97febd Avoid touch operation when unshare public link 2012-05-07 22:37:18 +00:00
Brice Maron 9921ca11b5 Add protection for non-authorized char in installation form 2012-05-07 22:12:30 +00:00
Brice Maron 5962a0d4ac Enhance user creation (avoid create+delete row), clear create user form after action 2012-05-07 21:27:03 +00:00
Frank Karlitschek 43978abd80 increase to 4 beta 2012-05-07 22:58:22 +02:00
Frank Karlitschek 10d291d6b3 Merge branch 'master' of gitorious.org:owncloud/owncloud 2012-05-07 22:56:34 +02:00
Frank Karlitschek 40b823bc8b some more docu fixes 2012-05-07 22:55:44 +02:00
Bart Visscher 4dbc2093c6 Create a function for linking to remote.php 2012-05-07 21:47:14 +02:00
Georg Ehrke 9b5e0bebef fix path for ampache in settings 2012-05-07 20:47:32 +02:00
Georg Ehrke 5b7cefb1e5 make ampache work with remote.php 2012-05-07 20:26:09 +02:00
Arthur Schiwon 5a1ea62437 LDAP: Fall back to Base DN if user/group base settings are blanked 2012-05-07 18:38:02 +02:00
Michael Gapczynski bf8b3b0696 Forgot to set token variable 2012-05-07 12:36:29 -04:00
Michael Gapczynski 52d113b9e1 Prevent extra '/' from being added to url if app is not defined 2012-05-07 12:35:02 -04:00
Brice Maron da4688d804 Reorder code to avoid race condition in user creation 2012-05-07 16:08:35 +00:00
Arthur Schiwon e9c7ecf22d applying coding guideline 2012-05-07 17:35:23 +02:00
Arthur Schiwon 0ff5ab65be applying coding guideline 2012-05-07 17:35:23 +02:00
Simon Birnbach df6b15445d Fix bug on browsers like rekonq which stopped execution of javascript 2012-05-07 17:35:23 +02:00
Michael Gapczynski e0a5f976e7 Fix bug oc-542, encode urls for private links 2012-05-07 11:30:36 -04:00
Michael Gapczynski 71423ec566 Fix bug oc-402, check if token is set for a private link 2012-05-07 10:47:55 -04:00
Michael Gapczynski b9033d3b78 Only load sharing statuses if in files app 2012-05-07 10:47:55 -04:00
Georg Ehrke f28d71bb9c fix gallery sharing 2012-05-07 16:46:35 +02:00
Georg Ehrke ef073a148f make calendar compatible with public.php 2012-05-07 15:48:41 +02:00
Georg Ehrke 936c8ba1cc improve remote.php and create public.php 2012-05-07 15:39:17 +02:00
Georg Ehrke 5904d5cf50 Merge branch 'remote.php' 2012-05-07 15:07:16 +02:00
Georg Ehrke d032345191 fix validation of getfile parameter - i hate this bloody merge conflicts 2012-05-07 13:23:55 +02:00
Georg Ehrke 1138df0f4b fix webdav, bloody merge conflicts 2012-05-07 12:47:34 +02:00
Georg Ehrke 6bdbcc1f49 fix path of carddav in addressbook management 2012-05-07 12:18:58 +02:00
Georg Ehrke b125caaaf6 fix path of caldav in calendar management 2012-05-07 12:16:25 +02:00
Georg Ehrke e33b12a375 fix path of webdav 2012-05-07 12:07:39 +02:00
Georg Ehrke ef10603c26 fix pathes in calendar and contacts 2012-05-07 12:02:20 +02:00
Georg Ehrke 9bdd00c0f2 update htaccess file and remove remote folder 2012-05-07 11:54:42 +02:00
Georg Ehrke 46fe2e3e2a fix merge conflicts 2012-05-07 11:47:14 +02:00
Georg Ehrke 7d2a68fc31 make carddav work with remote.php 2012-05-07 11:24:19 +02:00
Georg Ehrke 5a264040d4 fix remote.php 2012-05-07 11:24:00 +02:00
Florian Hülsmann 8534373f2f better invalid webfinger URI handling 2012-05-07 11:15:24 +02:00
Michiel de Jong 3a184e2e1d whitespace correction in webfinger.php 2012-05-07 09:51:37 +02:00
Michiel de Jong c4e47953ac require base lib and deal with malformed user addresses in webfinger.php 2012-05-07 09:46:15 +02:00
Michiel de Jong 5155f589fd prevent xss in webfinger 2012-05-07 09:26:54 +02:00
Bart Visscher 2d581c675f Audit: Log sharing actions 2012-05-07 09:04:07 +02:00
Bart Visscher a2df8a4746 Audit: Log messages with separate function 2012-05-07 09:04:07 +02:00
Bart Visscher 1e12db35ee Audit: Add user login/logout logging 2012-05-07 09:04:07 +02:00
Bart Visscher 640ba1828f Start of audit app
Audit the filesystem action
2012-05-07 09:04:07 +02:00
Thomas Tanghus cde60dba0f Fix typo. 2012-05-07 04:46:09 +02:00
Thomas Tanghus 65b9850e53 Code cleanup. 2012-05-07 04:46:09 +02:00
Michael Gapczynski 471cad7d90 Remove manual file cache insertions of shared files, update mtime of shared folder 2012-05-06 20:14:29 -04:00
Michael Gapczynski aa0c3ddcfe Fix updateFolder() in OC_FileCache 2012-05-06 20:11:10 -04:00
Michael Gapczynski 41179a1456 Fix feedback for sharing errors 2012-05-06 19:06:24 -04:00
Michael Gapczynski e0db22cc07 Provide feedback when user creation fails 2012-05-06 18:04:48 -04:00
Brice Maron 333345d201 Add php-pdo to soft depend check 2012-05-06 21:42:33 +00:00
Brice Maron fe8b10a922 Add php-xml as dependency for core fix oc-364 2012-05-06 21:38:35 +00:00
Frank Karlitschek d2b0de614e fix an XSS bug 2012-05-06 23:06:38 +02:00
Frank Karlitschek 1945cd6946 ported the oc_template class 2012-05-06 23:00:36 +02:00
Frank Karlitschek 5d55c709dd some more documentation cleanups. much more is needed.
And greeting from the Atlanta airport. ;-)
2012-05-06 22:02:16 +02:00
Frank Karlitschek 2edf59c026 first part of documentation update. lot´s more to come 2012-05-06 21:46:39 +02:00
Thomas Tanghus 2488cdb8a1 Calendar: Fixed image paths. 2012-05-06 19:19:16 +02:00
Thomas Tanghus 5bf69cace1 Contacts: Re-added some styling that got lost in a revert. 2012-05-06 19:19:15 +02:00
Brice Maron 9dbc6b5158 Correct wrong DB quotes for calendar share functions 2012-05-06 15:41:14 +00:00
Daniel 35177e00c0 Merge commit 'refs/merge-requests/109' of git://gitorious.org/owncloud/owncloud into merge-requests/109 2012-05-06 16:13:13 +02:00
Thomas Tanghus bede32be24 Contacts: Fix for Android browser again, again. 2012-05-06 13:51:16 +02:00
Thomas Tanghus c1019a6e98 Contacts: Resized Add button. Now how do I add a gradient? ;-) 2012-05-06 13:51:16 +02:00
Thomas Tanghus 400ade063c Revert Android positioning 'fix'.
This reverts commit 20f1c1e6ca and 93ae945414.
2012-05-06 13:51:16 +02:00
Thomas Tanghus f2ec68d40c Revert "Contacts: Fix for leftcontent positioning in Android browser."
This reverts commit 93ae945414.
2012-05-06 13:51:16 +02:00
Bart Visscher f69f764e8b Working remote.php with webdav and caldav 2012-05-06 00:12:51 +02:00
Georg Ehrke c996600786 push changes 2012-05-05 22:54:14 +02:00
Georg Ehrke 6c2fc0cbe8 fix writing of webdav.php 2012-05-05 20:43:11 +02:00
Georg Ehrke 6330fdad08 fix path of webdav 2012-05-05 19:02:13 +02:00
Georg Ehrke aa4f01fbcc fix pathes for cal andcarddav 2012-05-05 18:58:58 +02:00
Georg Ehrke 4b4c3c3f3a remove debug messages 2012-05-05 18:58:58 +02:00
Bart Visscher 24a8451b2e Tasks: Fix addtask for <5.4 php version 2012-05-05 18:48:24 +02:00
Georg Ehrke 101406eba7 fix writing in remote folder 2012-05-05 18:29:26 +02:00
Bart Visscher 2facf509cc Merge branch 'tasks' for Tasks app 2012-05-05 18:26:13 +02:00
Bart Visscher 2092caf6d3 Tasks: Fix add task action 2012-05-05 18:16:14 +02:00
Thomas Müller d46bea8867 fixing file headers with copy right 2012-05-05 18:13:40 +02:00
Robin Appelman c0e67fa24a fix opening encrypted files from the browser 2012-05-05 16:49:48 +02:00
Robin Appelman 70cb053e6b improve cryptstream fro writing non-chunksized data 2012-05-05 16:49:48 +02:00
Robin Appelman d875191777 only emit the filesystem hooks once when creating a new file 2012-05-05 16:49:48 +02:00
Florian Hülsmann 4a7591d0ab Custom icons for contacts app 2012-05-05 16:31:58 +02:00
Thomas Tanghus 74a0df335a Contacts: Make editable fields more discoverable. Align group field vertically #pixelpushing 2012-05-05 15:23:48 +02:00
Thomas Tanghus 2580d8540d Dialogs: Clean indentation. Add some missing brackets. 2012-05-05 13:49:47 +02:00
Thomas Tanghus eda42cece9 Contacts: Don't try to render invalid properties. 2012-05-05 13:49:47 +02:00
Thomas Tanghus f9aadfff7a Contacts: Set min-width on note to make it render correctly. 2012-05-05 13:49:47 +02:00
Frank Karlitschek 9bcc5c11a8 porting the hooks and starting with the templates 2012-05-05 10:18:45 +02:00
Brice Maron 4a89eb77c1 Escape strings for DB and User creation at setup. Fix oc-124 2012-05-04 22:54:55 +00:00
Thomas Tanghus 2c264f836c Contacts: Better checks for GD library. 2012-05-04 23:53:29 +02:00
Bart Visscher d0b7b01737 Tasks: Some styling 2012-05-04 20:57:37 +02:00
Bart Visscher a004759230 Tasks: Really correct icon 2012-05-04 20:44:11 +02:00
Bart Visscher 19d2b94837 Tasks: More updates to public API 2012-05-04 20:20:37 +02:00
Thomas Tanghus 76b8d06284 Add missing file. 2012-05-04 20:17:15 +02:00
Thomas Tanghus d9592ddcb0 Tried to make settings/apps more keyboard/screenreader friendly. 2012-05-04 17:56:00 +02:00
Bart Visscher 1fef13b0c0 Calendar: Use array_merge to join event arrays 2012-05-04 17:34:13 +02:00
Bart Visscher eae21f3269 Tasks: Fix ajax calls in javascript 2012-05-04 17:27:10 +02:00
Bart Visscher 0006b432f5 Tasks: Update for movable apps 2012-05-04 17:20:24 +02:00
Bart Visscher 439467746a Tasks: Update to new public API 2012-05-04 17:19:25 +02:00
Bart Visscher 1e47156226 Merge branch 'master' into tasks 2012-05-04 17:04:11 +02:00
Thomas Tanghus 01da64caf7 Contacts: Changed the Add property button to not fixed and use plain button. 2012-05-04 16:36:45 +02:00
Thomas Tanghus 248eae2d0f Contacts: Improve NOTE UI. Cleanup markup. 2012-05-04 15:47:55 +02:00
Arthur Schiwon 907fa9d85b LDAP: check first, if requested attribute exists 2012-05-04 14:13:23 +02:00
Arthur Schiwon 716c5a3c8e LDAP: use the correct attribute for the display name 2012-05-04 14:02:04 +02:00
Arthur Schiwon 231eec7325 LDAP: also those functions were not meant to be static 2012-05-04 13:48:55 +02:00
Arthur Schiwon 6c670cb82d LDAP: more cleanup 2012-05-04 13:48:18 +02:00
Arthur Schiwon 333e8986f6 LDAP: copyright stuff 2012-05-04 13:26:07 +02:00
Arthur Schiwon def59755ad LDAP: cleanup 2012-05-04 13:26:07 +02:00
Arthur Schiwon adb32ad347 LDAP: checkPassword ain't static 2012-05-04 13:26:07 +02:00
Arthur Schiwon 594221a467 LDAP: make oc_user_ldap::checkPassword make use of central OC_LDAP 2012-05-04 13:26:07 +02:00
Arthur Schiwon 3499783ea5 remove debug info 2012-05-04 13:26:07 +02:00
Arthur Schiwon 7aad40ca4d LDAP: make oc_user_ldap::userExists make use of central OC_LDAP 2012-05-04 13:26:07 +02:00
Arthur Schiwon 6f982d2e20 LDAP: make oc_user_ldap::getUsers make use of central OC_LDAP 2012-05-04 13:26:07 +02:00
Arthur Schiwon 7a06e144ec LDAP: central function for user and group list retrieval (will replace retrieveList from group part) 2012-05-04 13:26:07 +02:00
Thomas Tanghus 2296521a2e Changed $APPROOT to $APPSROOT as in https://gitorious.org/owncloud/owncloud/merge_requests/116 2012-05-04 11:16:29 +02:00
Frank Karlitschek eab4a05d78 implement missing getusers call 2012-05-04 11:13:07 +02:00
Thomas Tanghus 27da29525a Made the global settings icon accessable via keyboard.
Bug http://bugs.owncloud.org/thebuggenie/owncloud/issues/oc-561
2012-05-04 09:53:36 +02:00
Thomas Tanghus 8d1754041e VCategories: Check if any categories are selected before json call. Add Close button. Remove log calls. 2012-05-04 01:33:47 +02:00
Thomas Tanghus e61e40c23d Contacts: Hack around malformed BDAY. 2012-05-04 01:27:59 +02:00
Thomas Tanghus bde5b4a7ff Contacts: Don't load event handlers more than once, or you're asking for trouble :-P 2012-05-04 00:13:35 +02:00
Thomas Tanghus a4a3d62a55 Check for callback in OC.dialogs.alert. 2012-05-04 00:13:35 +02:00
Bart Visscher 07ff1e723a Calendar: Fix repeating events 2012-05-03 23:33:44 +02:00
Bart Visscher 89c8316f8f Merge branch 'master' of git://gitorious.org/owncloud/owncloud 2012-05-03 23:26:43 +02:00
Bart Visscher 077ea94f71 Merge commit 'refs/merge-requests/89' of git://gitorious.org/owncloud/owncloud
Conflicts:
	apps/calendar/ajax/events.php
2012-05-03 23:18:43 +02:00
Robin Appelman 3d6909f372 add mount config to gitignore 2012-05-03 23:17:03 +02:00
Robin Appelman a22a79cddd fix filecache for postgresql 2012-05-03 23:17:03 +02:00
Arthur Schiwon 76a60a2fc3 ups, we don't have a CSS file therefore 2012-05-03 23:03:05 +02:00
Robin Appelman 9e03ea4a28 ensure the files app is always loaded 2012-05-03 20:47:18 +02:00
Bart Visscher b62a8ba0f8 Better regex for old apps rewrite rule 2012-05-03 17:33:57 +02:00
Bart Visscher b6ea57c8b6 Bookmarks: Move delete code to Bookmarks class, also change to use id 2012-05-03 17:33:57 +02:00
Thomas Tanghus 8076b1e12d Contacts: Remove some logging. 2012-05-03 16:01:40 +02:00
Thomas Tanghus a89231ac1d Contacts: Clean up tipsies. 2012-05-03 16:01:40 +02:00
Thomas Tanghus 5be9084c73 Contacts: Fixed paths in import. 2012-05-03 16:01:40 +02:00
Thomas Tanghus cbee0d3128 Contacts: Fix paths and improve markup and css in address book overview. 2012-05-03 16:01:40 +02:00
Frank Karlitschek 55194e0343 Merge branch 'master' of gitorious.org:owncloud/owncloud 2012-05-03 13:07:28 +02:00
Frank Karlitschek 97a8af7f25 ported oc_db 2012-05-03 13:06:08 +02:00
Bartek Przybylski 5611e6c9d3 fix incorrect dialog computing in ff 2012-05-03 12:32:37 +02:00
Frank Karlitschek f85d076a4e Merge branch 'master' of gitorious.org:owncloud/owncloud 2012-05-03 12:26:28 +02:00
Frank Karlitschek 43caa3b3b9 ported oc_json 2012-05-03 12:23:29 +02:00
Bartek Przybylski 8feb7dd9d9 fix filepicker in webkit 2012-05-03 12:09:59 +02:00
Thomas Tanghus 375ba98645 Contacts: Move gif used by jquery.Jcrop and make style sheet use %webroot% path. 2012-05-03 11:15:44 +02:00
Thomas Tanghus 15be032740 Contacts: Improve loading contact. 2012-05-03 11:15:44 +02:00
Thomas Tanghus 6cc9f600d2 Contacts: Don't resize profile picture if it's not too big. 2012-05-03 11:15:44 +02:00
Frank Karlitschek 351740601a port oc_response 2012-05-03 10:46:27 +02:00
Michael Gapczynski 80dff77b65 Fix private links 2012-05-02 19:24:43 -04:00
Robin Appelman e5ef3e1340 move archive library to core so we can properly depend on it 2012-05-02 23:48:23 +02:00
Robin Appelman 0b51c53443 run none of the extranal storage tests on default 2012-05-02 23:44:00 +02:00
Robin Appelman 4ba527625f don't try to register file actions when we're not in the files app 2012-05-02 23:26:57 +02:00
Bart Visscher 47081a2471 Gallery: Update version for database update 2012-05-02 21:36:34 +02:00
Bart Visscher f7e410147f Contacts: check for malformed VCards in calendar hook 2012-05-02 21:36:33 +02:00
Bart Visscher ec98ecff05 Catch old app paths, change them to new form 2012-05-02 21:36:33 +02:00
Michael Gapczynski 31d623f426 Fix log viewing bug 2012-05-02 15:26:42 -04:00
Michael Gapczynski 6d37b8567b Refactoring and upload support for Google Drive backend 2012-05-02 14:41:57 -04:00
Frank Karlitschek 4fe90f62f4 port checkAppEnabled 2012-05-02 19:08:37 +02:00
Frank Karlitschek eec7c3833c fix install 2012-05-02 19:02:41 +02:00
Frank Karlitschek 10bbbc8cd2 new checkAppEnabled call 2012-05-02 18:54:31 +02:00
Bart Visscher 71f9b1968e Tasks: Make it possible to close the details area 2012-05-02 17:28:19 +02:00
Georg Ehrke 33c343ed11 add require_once('../lib/base.php'); to webdav.php 2012-05-02 16:47:25 +02:00
Georg Ehrke da03d05700 create folder 'remote' for the remote services like caldav, carddav and webdav 2012-05-02 16:41:23 +02:00
Georg Ehrke c536e930f4 add appswebroot to the guest template 2012-05-02 16:41:23 +02:00
Frank Karlitschek 82a61e2e1a port oc_preferences 2012-05-02 15:54:34 +02:00
Frank Karlitschek ff66600bc0 port appconfig 2012-05-02 14:11:29 +02:00
Frank Karlitschek 8e99475886 first part of the config stuff 2012-05-02 13:28:56 +02:00
Frank Karlitschek 8c7f854671 move all the files stuff into a files class 2012-05-02 12:54:31 +02:00
Thomas Tanghus f1830866a3 Contacts: Removed styling and (most) js from template. Started making app more keyboard/screenreader friendly. General cleanup in code and markup. 2012-05-02 12:10:44 +02:00
Thomas Tanghus 72256abf34 Contacts: Trying to improve PHOTO handling a bit. 2012-05-02 11:44:00 +02:00
Arthur Schiwon 6750998984 files is not internal any more, part II 2012-05-02 11:26:22 +02:00
Arthur Schiwon d71600213a files is not internal any more 2012-05-02 11:14:11 +02:00
Arthur Schiwon c9eaffd336 send downloadfile piece by piece. saves RAM and is better suited for large files. 2012-05-02 11:02:13 +02:00
Thomas Müller 8ed8d9cd91 fixing namespace 2012-05-02 00:55:26 +02:00
Frank Karlitschek 2fe646dcec ported the oc_app calls 2012-05-02 00:50:26 +02:00
Frank Karlitschek c94f39b488 Merge branch 'master' of gitorious.org:owncloud/owncloud 2012-05-02 00:24:24 +02:00
Frank Karlitschek 93b63cf375 ported the rest of the OC_Helper calls 2012-05-02 00:20:45 +02:00
unknown 98e0db15a2 correction of bug oc-393 in using owncloud V2, V3, V4 with android browser :
JSON.parse(null) results in 'Uncaught illegal access' and not 'null' (see google for details)

solved

Signed-off-by: bourgeoa
2012-05-01 23:46:51 +02:00
Frank Karlitschek e48f511606 port linkto and serverHost 2012-05-01 23:19:39 +02:00
Frank Karlitschek 31e32e3c10 ported checkLoggedIn and checkAdmin 2012-05-01 22:59:38 +02:00
Frank Karlitschek e2fb094693 some more porting 2012-05-01 21:07:08 +02:00
Frank Karlitschek ab58471904 Merge branch 'master' of gitorious.org:owncloud/owncloud 2012-05-01 20:07:36 +02:00
Frank Karlitschek 1a2bbd2ee4 ported addSyript and other small stuff 2012-05-01 20:03:41 +02:00
Michael Gapczynski 20f3875f1b Change default from address to sharing-noreply@server for emailing private links 2012-05-01 13:06:17 -04:00
Frank Karlitschek 254b8b9506 porting of OC_User to public API complete.
What better thing to do during a long train ride than refactoring ;-)
2012-05-01 19:04:20 +02:00
Frank Karlitschek 70cea18cce ported getUser 2012-05-01 18:50:31 +02:00
Frank Karlitschek dc7cdda5cc Merge branch 'master' of gitorious.org:owncloud/owncloud 2012-05-01 18:48:04 +02:00
Frank Karlitschek 5bf69237b2 ported isLoggedIn 2012-05-01 18:46:15 +02:00
Georg Ehrke 7b548837df create remote directory 2012-05-01 18:22:54 +02:00
Georg Ehrke 2ad673b7bd revert d251f3a994 2012-05-01 18:22:16 +02:00
Georg Ehrke d251f3a994 create remote directory 2012-05-01 18:20:32 +02:00
Frank Karlitschek d0554bef06 finish porting of the LOG calls or the apps to the public api 2012-05-01 17:38:27 +02:00
Marvin Thomas Rabe 7ded9cf520 Checks if config folder is writable on begin of the installation. 2012-05-01 16:35:46 +02:00
Georg Ehrke f817ff573e Merge branch 'master' into calendar_repeat 2012-05-01 16:18:55 +02:00
Georg Ehrke f75a7c084f add class for repeating events 2012-05-01 16:16:12 +02:00
Arthur Schiwon d3ce2cacd6 OC_User: handle success properly 2012-05-01 14:40:56 +02:00
Frank Karlitschek 3f9ac6405a port some of the log call to the new public api
more to come
2012-05-01 14:29:34 +02:00
Arthur Schiwon 8a69116e94 OC_User: don't say password changed when it is not true 2012-05-01 13:40:01 +02:00
Arthur Schiwon 51b6aab436 LDAP: remove Notices on settings 2012-05-01 12:25:17 +02:00
Arthur Schiwon 54854b2e3d LDAP: decent behaviour and log message when there is no connection to the LDAP server 2012-05-01 12:17:33 +02:00
Bartek Przybylski 11314c81d9 add/remove handlers 2012-05-01 10:07:48 +02:00
Frank Karlitschek e8ec999090 port to use the new public api 2012-05-01 09:49:22 +02:00
Frank Karlitschek 0195d5b439 some more work on the public API 2012-05-01 09:39:12 +02:00
Frank Karlitschek e409e7cd4c forgot a file 2012-05-01 09:38:10 +02:00
Thomas Müller 5193ddd7d7 fixing syntax error 2012-04-30 21:55:25 +02:00
Georg Ehrke 8a3d41c043 fix a PHP Notice 2012-04-30 21:46:33 +02:00
Georg Ehrke 6c908a4cd0 fix path in calendars geo.js 2012-04-30 21:18:54 +02:00
Frank Karlitschek f425b80deb one todo less 2012-04-30 19:21:29 +02:00
Frank Karlitschek b20b30b6fe Implement a basic versioning configuration. Only a on/off switch for now.
I changed my mind about the more complex configuration options. We go with good default for now and don´t expose all the technical options to the users.
They can still override in the config file if it´s really really needed and they know what they are doing
2012-04-30 19:18:00 +02:00
Frank Karlitschek 04c6582af1 load the files app in a way that doesn´t break oC3 configurations 2012-04-30 13:58:48 +02:00
Frank Karlitschek e1268cd5f4 we require php 5.3 now. so please notify the user if an old version is in use 2012-04-30 13:28:31 +02:00
Frank Karlitschek 051cb7d96b show the username in the title. good idea. 2012-04-30 13:08:32 +02:00
Frank Karlitschek f0701f75a9 tiny typo 2012-04-30 13:08:08 +02:00
Thomas Mueller 07f2e316e4 removing executable bit from various files 2012-04-30 12:05:57 +02:00
Thomas Tanghus 9c520c70a8 Various file path fixes. 2012-04-30 01:48:01 +02:00
Thomas Tanghus a8b6fdd396 Contacts: Small css tweaks. 2012-04-30 01:01:24 +02:00
Thomas Tanghus 0bccd9c18c Contacts: Forgot to add the import template. 2012-04-29 23:26:14 +02:00
Thomas Tanghus f6fefe9a36 Contacts: Ensure TYPE parameters on email aren't deleted on edit. They are still not shown in the UI.
Remove an obsolute file and did some cleanup.
2012-04-29 22:12:27 +02:00
Thomas Tanghus 023479b1e2 Contacts: removed unused method and ajax file. 2012-04-29 22:12:27 +02:00
Thomas Tanghus 163344243b jquery.combobox: Added 'showButton' option 2012-04-29 22:12:27 +02:00
Frank Karlitschek c7e7767f58 don´t hardcode files app. we have no a standard info.xml in files 2012-04-29 21:27:02 +02:00
Frank Karlitschek b862c49ae6 enable by default. at least during oC4 testing 2012-04-29 21:18:28 +02:00
Frank Karlitschek 0d0129221b add a info.xml to files 2012-04-29 21:17:22 +02:00
Frank Karlitschek b5db852438 add files to blacklist. Should be always on 2012-04-29 21:16:41 +02:00
Robin Appelman 4d3ef9a824 improve rescanning folders 2012-04-29 16:11:17 +02:00
Robin Appelman 84bd83b1dc fix file deletion 2012-04-29 16:09:41 +02:00
Robin Appelman e3adbcb7d5 remove non existing files from the cache when rescanning a folder 2012-04-29 15:09:47 +02:00
Robin Appelman 09a5c59cca only install shipped apps on setup that should be enabled by default 2012-04-29 14:38:56 +02:00
Daniel f0f1adb994 bugfix for oc-346 2012-04-29 01:11:40 +02:00
NIEK Antoine c6f034a5d2 Support "songs" ampache API action for proper rhythmbox support 2012-04-29 00:47:57 +02:00
Jan-Christoph Borchardt afeb9d9cbf moving the file actions properly 2012-04-28 23:11:48 +02:00
Georg Ehrke bef701c448 add version file to files app 2012-04-28 13:35:05 +02:00
Georg Ehrke 2e77df91e9 add apps/inc.php to .gitignore 2012-04-28 13:18:17 +02:00
Georg Ehrke 7eb7492360 some fixes for sharing 2012-04-27 23:14:53 +02:00
Bartek Przybylski 72c0d6968e fix duplicated entries on upload 2012-04-27 22:48:27 +02:00
Georg Ehrke 3aedbc5f95 remove debug message 2012-04-27 22:22:58 +02:00
Georg Ehrke 06e9ac8591 fix parsing of app parameter and fix external app 2012-04-27 22:22:03 +02:00
Bart Visscher 6e7f5ec4ce Tasks: Add input to edit the task location 2012-04-27 20:26:12 +02:00
Bart Visscher c627657fc6 Tasks: Fix the display of the list of tasks 2012-04-27 17:48:08 +02:00
Georg Ehrke 657d02371c fix login 2012-04-27 14:55:26 +02:00
Sam Tuke a1b309a42a Merge branch 'master' of gitorious.org:owncloud/owncloud 2012-04-27 13:23:58 +01:00
Georg Ehrke 0aaf6d16a5 Merge branch 'master' into movable_apps_2 2012-04-27 14:22:12 +02:00
Sam Tuke 80c850d018 added revert attempt outcome messages, removed contextual ajax revert button for now as it's not functional, improved readaibility of scripts 2012-04-27 13:19:16 +01:00
Thomas Tanghus 768041b6cb Contacts: Added convinience method for notifications. 2012-04-27 10:35:31 +02:00
Thomas Tanghus 18c11ec81b jquery.combobox: Added 'editable' option and cleaned up a bit. 2012-04-27 10:35:31 +02:00
Thomas Tanghus 1384fdfe01 Contacts: Updated first run page. 2012-04-27 10:35:31 +02:00
Georg Ehrke 993d655aad Merge branch 'master' into movable_apps_2 2012-04-27 10:30:50 +02:00
Georg Ehrke 1b935a22ce add old webdav file 2012-04-27 10:23:29 +02:00
Frank Karlitschek ee0cb68f5e some csrf fixes. needs testing 2012-04-27 01:18:21 +02:00
Frank Karlitschek 74b5e22a68 some more csrf fixes 2012-04-26 23:17:46 +02:00
Georg Ehrke f7fb4a54c9 ampache should work now 2012-04-26 22:00:37 +02:00
Georg Ehrke 5483c1be42 hide fails 2012-04-26 21:58:43 +02:00
Georg Ehrke 5fda0e4b3b make *DAV work with movable apps 2012-04-26 21:56:29 +02:00
Georg Ehrke 6930af4c0f Merge branch 'master' into movable_apps_2 2012-04-26 21:27:22 +02:00
Georg Ehrke 78b2da583d move files to the correct place 2012-04-26 21:24:41 +02:00
Georg Ehrke 6039dd0fe8 remove merge conflicts fail 2012-04-26 21:23:38 +02:00
Sam Tuke d96e962fc1 Merge branch 'master' of gitorious.org:owncloud/owncloud 2012-04-26 18:45:59 +01:00
Sam Tuke 18a024e251 started implementing ajax file rollback 2012-04-26 18:45:17 +01:00
Frank Karlitschek 6bdefef31e csrf protection 2012-04-26 19:35:33 +02:00
Georg Ehrke 2b10371bde fix merge conflicts 2012-04-26 18:08:49 +02:00
Georg Ehrke 40f95ffdf3 fix security check for the path of the requested file 2012-04-26 17:55:00 +02:00
Sam Tuke c693ee2adb added available version names to files dropdown menu via new ajax script 2012-04-26 16:48:43 +01:00
Georg Ehrke 0249a72cab fix downloading of files in files app 2012-04-26 17:35:12 +02:00
Frank Karlitschek 1277962183 a lot of users have problems with big files. So add an explicit button to the documentation 2012-04-26 16:53:18 +02:00
Michael Gapczynski 754844f5c9 Add ability to send private links from sharing via email 2012-04-26 10:33:24 -04:00
Sam Tuke 6312067ab5 improved styling, called css file in history.php 2012-04-26 14:32:29 +01:00
Georg Ehrke ebd82ee772 fixes for media app 2012-04-26 15:23:17 +02:00
Georg Ehrke 2c92a79b5d fixes for contacts app 2012-04-26 15:20:01 +02:00
Georg Ehrke ebcaa46482 fix loading of css files that are core related 2012-04-26 15:19:27 +02:00
Sam Tuke b19fae392b linked more button to history page 2012-04-26 13:54:38 +01:00
Georg Ehrke 3f64eb25ab some fixes fore movable apps 2012-04-26 14:52:55 +02:00
Sam Tuke 02c1127de3 changed function name to avoid clash with sharing dropdown 2012-04-26 13:41:22 +01:00
Thomas Tanghus 4bb1a2c2d6 Contacts: Some js cleanup. 2012-04-26 10:38:39 +02:00
Thomas Tanghus 5dbf362623 Contacts: Added import with with file picker. 2012-04-26 03:21:52 +02:00
Michael Gapczynski c20abfef38 Fix a counting mistake 2012-04-25 19:30:58 -04:00
Arthur Schiwon 249e0c1ee2 bring fileactions to the right position again 2012-04-26 01:03:01 +02:00
Michael Gapczynski 32de47d1d9 Update sharing when users are removed, added to groups, and removed from groups 2012-04-25 18:18:58 -04:00
Arthur Schiwon de135e3b9b resolve merge conflicts 2012-04-26 00:14:21 +02:00
Robin Appelman 9d91e53027 fix problem with filescanning 2012-04-25 22:42:00 +02:00
Georg Ehrke b75f680b8e gallery app seems to work now :) 2012-04-25 21:20:30 +02:00
Georg Ehrke 1a913ac282 bookmarks app seems to work now :) 2012-04-25 21:20:06 +02:00
Michael Gapczynski 6895c54a3f Fix javascript checkbox toggle for resharing 2012-04-25 14:37:14 -04:00
Arthur Schiwon cbba469990 LDAP rewrite, use unique LDAP user and group identifiers on LDAP side as well as fancy (unqiue as far as users a know from LDAP) names on the ownCloud side. It's done via mapping of owncloud names and LDAP identifiers.
some performance enhancements: faster searching for users and groups in their specific subtrees. Reading instead of searching were possible.

thanks for the feedback of Kevin van Kuik
2012-04-25 20:35:30 +02:00
Arthur Schiwon 0933b5e7ab use uniquemember instead of deprecated memberuid to identify LDAP group members. Attention: not every method is adjusted yet, so it breaks some things. 2012-04-25 20:35:30 +02:00
Arthur Schiwon a82d709f87 don't forget new JS file 2012-04-25 20:35:30 +02:00
Arthur Schiwon e1cd690a7c LDPA: group settings into basic and advanced to look less crowded. Still needs some love. Looks different to the other admin settings, though. 2012-04-25 20:35:29 +02:00
Sam Tuke c00762b49b added dropdown js menu for file versions, improved readability of history.php 2012-04-25 17:37:45 +01:00
Michael Gapczynski 7d9587bab3 Forgot to remove error log messages... 2012-04-25 11:54:16 -04:00
Michael Gapczynski b369adbd94 Allow admin to disable resharing of files 2012-04-25 11:51:30 -04:00
Sam Tuke a3dff248a1 fixed path to history script 2012-04-25 14:27:55 +01:00
Sam Tuke 02a65f30ec added history buttons 2012-04-25 14:01:03 +01:00
Sam Tuke 8ae1430090 added script and loaded it for adding history button 2012-04-25 13:56:43 +01:00
Sam Tuke 81f549baee made code a little more readable 2012-04-25 13:51:08 +01:00
Thomas Tanghus 4795295fb1 Contacts: Fixed some file paths. 2012-04-25 10:44:27 +02:00
Georg Ehrke d76552a009 Merge branch 'sabredav_1.6' 2012-04-25 10:39:31 +02:00
Jernej Virag e459309511 Fixed escaping of filename when determining MIME type 2012-04-25 10:33:52 +02:00
Thomas Tanghus 20f1c1e6ca Forgot to fix one file... 2012-05-06 00:39:01 +02:00
Bart Visscher 6c554d0ffa Calendar: Fix calendar export link 2012-05-06 00:35:49 +02:00
Thomas Tanghus 93ae945414 Contacts: Fix for leftcontent positioning in Android browser. 2012-05-06 00:34:08 +02:00
Thomas Tanghus 2953f4d11a Contacts: Removed redundant styles. 2012-05-06 00:34:07 +02:00
Frank Karlitschek b462795be2 added a nice API to get the installes Apps with names, urls and icon from the outside.
This is useful for some nice upcoming desktop and mobile integration
2012-05-05 23:42:38 +02:00
Michael Gapczynski 565e02d061 Add back removed groups to the select form correctly 2012-05-05 17:10:07 -04:00
Bart Visscher d854e4a144 Calendar: fix return of insert id 2012-05-05 22:32:55 +02:00
Bart Visscher f991948a71 Fix loading by apptype in webdav 2012-05-05 21:58:10 +02:00
Michael Gapczynski ef9511c713 Refactor sharing UI; bug fixes, code clean-up, and more efficient with less ajax calls 2012-05-05 15:18:14 -04:00
Michael Gapczynski d764585d8b Remove blind effect for email private link in drop down 2012-05-05 14:57:25 -04:00
Georg Ehrke 03f81fdd88 fix js fail in media player 2012-04-25 10:27:17 +02:00
Georg Ehrke 323b19a4a0 some fixes in contacts javascript files 2012-04-25 10:17:54 +02:00
Georg Ehrke 476043ecb9 add a proper 404 2012-04-25 10:17:20 +02:00
Georg Ehrke 60c0827ba3 Merge branch 'master' into movable_apps 2012-04-25 09:23:01 +02:00
Georg Ehrke 9ee2bb9719 fix js fail in media player 2012-04-25 09:22:19 +02:00
Robin Appelman 5b70e2fb25 some performance improvements to the openstack swift backend 2012-04-25 00:12:12 +02:00
Robin Appelman 5c3ea14819 fix mimetypes of encrypted files 2012-04-25 00:12:12 +02:00
Robin Appelman cc2bfd313d minor filecache improvements 2012-04-25 00:12:12 +02:00
Robin Appelman 9015c46e31 emit the correct hooks for file_put_contents and some readfile improvements 2012-04-25 00:12:12 +02:00
Robin Appelman 60b924c954 initial mount configuration work 2012-04-25 00:12:12 +02:00
Robin Appelman fa502e160d allow manually scanning of specific directories 2012-04-25 00:12:12 +02:00
Georg Ehrke f17eea506a fix merge conflicts 2012-04-24 21:59:56 +02:00
Georg Ehrke d6346b5b0b fix OC.filePath in main js 2012-04-24 21:54:09 +02:00
Georg Ehrke a85d49833b fix position of Semicolon 2012-04-24 21:52:44 +02:00
Georg Ehrke fb84d0aff8 fix php fail 2012-04-24 21:37:19 +02:00
Georg Ehrke 9b29bc96de remove debug message 2012-04-24 21:36:54 +02:00
Georg Ehrke 684007bbae fix pathes in contacts 2012-04-24 21:33:34 +02:00
Georg Ehrke 0b06eff3a0 another fix for linkto function 2012-04-24 20:17:00 +02:00
Georg Ehrke 29b9e27078 fix linkto function in OC_Helper 2012-04-24 20:14:42 +02:00
Frank Karlitschek 9b134b0636 move granite also to apps-playground because it´s not stable yet and is no longer used 2012-04-24 15:41:54 +02:00
Frank Karlitschek a3d0a74d03 Merge branch 'master' of gitorious.org:owncloud/owncloud 2012-04-24 15:38:36 +02:00
Frank Karlitschek 69a2173fdb non working app. moved to the apps-playground repository 2012-04-24 14:00:44 +02:00
Thomas Tanghus b824425186 Added loading indicator. 2012-04-24 11:38:11 +02:00
Thomas Tanghus 988f98fc6f Contacts: Check that UIDs really are unique on import. Better solution would be to suggest to merge contacts, but that will have to wait to OC5 ;-) 2012-04-24 11:35:56 +02:00
Thomas Tanghus 22f4acadc0 Contacts: In app import (for Chrome and Firefox only) 2012-04-24 01:44:07 +02:00
Thomas Tanghus b8da5c5262 Contacts: Tried to format NOTE field a bit. Needs to be improved more though. 2012-04-24 01:44:07 +02:00
Thomas Tanghus 6848b069c9 OC_App::getStorage() failed if app dir didn't exist. 2012-04-24 01:44:07 +02:00
Thomas Tanghus dfc94cbe84 Contacts: In app import. Cleanup still needed. 2012-04-24 01:44:07 +02:00
Thomas Tanghus 0cd9570277 Applied patches by Nicolas progweb at free.fr - https://mail.kde.org/pipermail/owncloud/2012-April/002900.html 2012-04-24 01:44:07 +02:00
Frank Karlitschek 4ea927a798 wrote a new versioning app over the weekend. Basic functionality to far but it works (TM) and has all the needed features (TM) for ownCloud 4. Userinterface integration and small improvements still missing. 2012-04-23 23:54:49 +02:00
Bart Visscher b704ff1bc7 Tasks: Simple add task action 2012-04-23 22:13:35 +02:00
Georg Ehrke fd47fbe176 fix contacts app a bit 2012-04-23 20:42:52 +02:00
Georg Ehrke 9092692b8e make calendar work with movable apps 2012-04-23 20:32:55 +02:00
Georg Ehrke 95c220a246 remove debug code in lib base 2012-04-23 20:31:03 +02:00
Georg Ehrke 10eea3f464 fix pathes of shared calendars 2012-04-23 20:13:55 +02:00
Georg Ehrke 19109afa79 fix bug in lib base 2012-04-23 20:11:21 +02:00
Georg Ehrke d1110c62ef fix file path in apps/media/ajax/api.php 2012-04-23 20:01:48 +02:00
Georg Ehrke 42a570788b Merge branch 'master' into movable_apps 2012-04-23 19:56:07 +02:00
Bart Visscher 728e6a6bf9 Tasks: Simple categories input 2012-04-23 18:28:44 +02:00
Georg Ehrke 6d92ebca45 use native functions of php to parse the string into the Var 2012-04-23 17:09:28 +02:00
Georg Ehrke 9226cb7a6a rename var file to getfile to prevent fails in files app 2012-04-23 16:36:24 +02:00
Georg Ehrke aaedb23f05 fix bug in lib/helper.php and fix file upload 2012-04-23 16:28:37 +02:00
Georg Ehrke 3b9d283245 fix path in apps/files/templats/index.php 2012-04-23 16:25:07 +02:00
Georg Ehrke c0df15367f fix style.css of the files app 2012-04-23 16:18:15 +02:00
Georg Ehrke 08fe6bdb27 fix path in /apps/files/js/timezone.php 2012-04-23 16:17:35 +02:00
Frank Karlitschek f5c9fe9ece first step to an public api of ownCloud for the apps. In the future they shouldn´t call internall classes, functions or session variables because this will change and break in upcoming versions. Apps should only call this public interface that we will kepp stable over different releases. The namespace is OCP for ownCloud public. This is just the first step. more coming soon 2012-04-23 15:50:30 +02:00
Jan-Christoph Borchardt 1b29fc3fb2 fixing multiselect overflow, issue 341 2012-04-23 14:29:11 +02:00
Jan-Christoph Borchardt 3ba9a9e6a8 adding proper copyright and license notice to the style files 2012-04-23 14:19:03 +02:00
Arthur Schiwon 912c87eeda LDAP: optimize LDAP requests for users and groups. Settings are still to do, though. 2012-04-23 13:04:58 +02:00
Georg Ehrke 1b084cc120 Merge branch 'master' into movable_apps 2012-04-23 13:03:50 +02:00
Arthur Schiwon 6ee7dc5f59 only retrieve requested attributes 2012-04-23 12:32:17 +02:00
Arthur Schiwon fffbf26159 don't forget to declare class properties 2012-04-23 11:22:11 +02:00
Thomas Tanghus 82ba2151d1 Wrong app check. 2012-04-23 10:52:13 +02:00
Thomas Tanghus 8f2e9caf96 Contacts: Tipsyfied photo toolbar. 2012-04-23 10:52:13 +02:00
Robin Appelman d17eba19c1 fix image viewer 2012-04-22 21:27:20 +02:00
Robin Appelman c5b31b001a add the option to disable file encryption while still being able to decrypt existing files 2012-04-22 21:27:20 +02:00
Georg Ehrke 44fa4433bc move files of fullcalendar 1.5.3 2012-04-22 21:18:40 +02:00
Georg Ehrke c77fa42143 add new files of fullcalendar 1.5.3 2012-04-22 21:18:40 +02:00
Georg Ehrke 43ee5cf224 remove old fullcalendar files 2012-04-22 21:18:40 +02:00
Thomas Tanghus e8f062dc93 Contacts:
- Added overlay toolbar to contact photo with 'Delete current', 'Edit current', 'Load from OC_Filesystem' and 'Upload' options.
- Made action icons translucent instead of hiding them.
2012-04-22 20:47:24 +02:00
Thomas Tanghus 8a6cb23170 Contacts: Clear cache for contact photo and thumbnail when it has been changed. 2012-04-22 20:47:24 +02:00
Georg Ehrke e888f4d9bc Merge branch 'master' into sabredav_1.6 2012-04-22 13:20:50 +02:00
Georg Ehrke 6b9072de58 fix merge conflicts 2012-04-22 13:20:25 +02:00
Georg Ehrke 4c2cf35050 fix merge conflicts 2012-04-22 13:19:12 +02:00
Georg Ehrke 1bba445642 hide alarm and attendees tab 2012-04-22 13:15:24 +02:00
Thomas Tanghus f08cfcecec Personal settings: Emphasized labels etc, mono-spaced generated paths and moved text formatting to style sheet. 2012-04-22 03:59:28 +02:00
Thomas Tanghus 24aff287cf Link to icon was absolute. 2012-04-22 03:39:59 +02:00
Thomas Tanghus f85aaf1f58 Contacts: Added bg color and shadow to controls. I suck at CSS... 2012-04-22 02:32:51 +02:00
Thomas Tanghus 80ddf37bb7 Missing double quote. 2012-04-22 02:09:13 +02:00
Thomas Tanghus 651de1e588 Contacts: Fix error on photo crop. 2012-04-22 01:50:46 +02:00
Thomas Tanghus 9e3242d05e Contacts: Changed layout as discussed with JanC. Still WiP. 2012-04-22 00:44:53 +02:00
Thomas Tanghus 56e064bd09 Don't trigger unnecessary change events. 2012-04-22 00:44:53 +02:00
Thomas Tanghus 16fc4dfd1a Contacts: Fixed contact photo drag'n'drop upload - again... 2012-04-22 00:44:53 +02:00
Thomas Tanghus a34631f84e Contacts: Add check for empty FN field. 2012-04-22 00:44:53 +02:00
Frank Karlitschek 69f3b5e2d2 make the button a bit more consistent to the other ownCloud interface 2012-04-21 23:34:24 +02:00
Frank Karlitschek c6144535a8 document the log settings 2012-04-21 23:30:14 +02:00
Georg Ehrke e2f64394f3 update to SabreDav 1.6.2 2012-04-21 23:24:39 +02:00
Georg Ehrke a0a80e74c2 remove old sabredav files 2012-04-21 23:23:46 +02:00
Frank Karlitschek 260c48c29a cleanup the admin page layout mess a bit. Still a lot to improve in the future :-) 2012-04-21 23:23:02 +02:00
Georg Ehrke 0918fc7d91 fix merge conflicts 2012-04-21 23:21:50 +02:00
Frank Karlitschek 80950f2e1c make field completely visible 2012-04-21 23:10:35 +02:00
Frank Karlitschek ff3b199cc8 use less space 2012-04-21 23:08:52 +02:00
Frank Karlitschek 1a49497899 structure the information a bit more so that is easier readable 2012-04-21 22:55:18 +02:00
Frank Karlitschek fd54791952 Merge branch 'master' of gitorious.org:owncloud/owncloud 2012-04-21 22:50:30 +02:00
Frank Karlitschek a86d89f5ca Add a static code checker for evil patterns in apps.
Disabled by default for now.
We will check for private api calls here later once the public api is in place
2012-04-21 22:47:56 +02:00
Georg Ehrke 74e5402711 fix a php notice 2012-04-21 22:27:19 +02:00
Georg Ehrke e29ae46609 fix merge conflicts 2012-04-21 22:12:31 +02:00
Frank Karlitschek 6bfe2289be improve the app installer.
show a label if an app is an internal app or a third party app from the app store.
show a preview image of the app if available
2012-04-21 15:30:58 +02:00
Frank Karlitschek ef80ad1d48 add a link to the desktop and mobile clients download. 2012-04-21 00:33:24 +02:00
Frank Karlitschek d1fe3c2314 add a button to open the online documentation 2012-04-21 00:18:47 +02:00
Bart Visscher acea156a3d Tasks: Save description field 2012-04-20 23:37:42 +02:00
Bart Visscher 3d68732657 Tasks: Due date without time support added 2012-04-20 22:56:59 +02:00
Georg Ehrke 711aa229b8 Merge branch 'master' into movable_apps 2012-04-20 22:41:39 +02:00
Georg Ehrke 12ef2f5054 modify OC.filepath for movable apps 2012-04-20 22:35:12 +02:00
Georg Ehrke c3d78cf77a remove require once lib base in files scan.php 2012-04-20 22:34:13 +02:00
Georg Ehrke 99a473bd62 support file calls with parameter 2012-04-20 22:33:30 +02:00
Frank Karlitschek 0f5864d864 support searching the knowledge base 2012-04-20 21:49:57 +02:00
Frank Karlitschek c3cb000cb2 add phpmailer to 3rdparty 2012-04-20 20:53:36 +02:00
Frank Karlitschek 2fbc92bd4b new OC_Mail class to handle all mail sending. The benefit is that is way mor flexible than the standard mail command. can be configured to use a remote smtp relay for example. also port the lostpassword code 2012-04-20 20:49:35 +02:00
Bart Visscher 1384be4bff Tasks: Task summary is always text, at it as suchs 2012-04-20 18:19:10 +02:00
Bart Visscher 70ba428222 Tasks: Make gettasks more robust against malformed VTODO data 2012-04-20 18:18:07 +02:00
Bart Visscher c75bbb59a9 Tasks: Add due property handling 2012-04-20 18:16:39 +02:00
Georg Ehrke 2e85313701 optimize code 2012-04-19 22:26:36 +02:00
Georg Ehrke 909282c81e remove parameters in file var before call require once 2012-04-19 22:25:21 +02:00
Georg Ehrke 3aeea0c196 Merge branch 'merge-requests/105' 2012-04-19 20:31:24 +02:00
Georg Ehrke 3706bbec1b Merge commit 'refs/merge-requests/105' of git://gitorious.org/owncloud/owncloud into merge-requests/105 2012-04-19 20:30:58 +02:00
Georg Ehrke 85019887df add loading of files 2012-04-19 16:44:49 +02:00
Jan-Christoph Borchardt 9abb70245a showing the file extensions more visible by default. I still think it's shitty design, but I get worse nightmares over thinking that showing file extensions would become a configuration option. 2012-04-19 16:41:37 +02:00
Robin Appelman 5cefd34660 emulate touch with custom mtime for swift backend 2012-04-19 00:25:47 +02:00
Robin Appelman 9a707e10bf add SWIFT (openstack object storage) storage backend 2012-04-18 20:54:28 +02:00
Robin Appelman aceda02887 check if removed folders are really gone 2012-04-18 20:54:28 +02:00
Robin Appelman bdb3962b8d add function to get mimetype from string 2012-04-18 20:54:28 +02:00
Robin Appelman d1ad4dc8d6 add test cases for cryptstream 2012-04-18 20:54:28 +02:00
Robin Appelman b39c3d4c4e make use of the fact that stream_read will always read 8192 bytes for encryption stream
https://bugs.php.net/bug.php?id=21641
2012-04-18 20:54:28 +02:00
Robin Appelman 26e9a0dd13 bugfixes for encryption library and test cases 2012-04-18 20:54:28 +02:00
Georg Ehrke 3fb91a7411 restore require once command for non app files 2012-04-18 17:49:50 +02:00
Georg Ehrke b44bc9f4b2 remove require once lib base in some more files 2012-04-18 17:42:11 +02:00
Bart Visscher 921fc59d8f Tasks: Add "more" block containing description 2012-04-18 17:28:16 +02:00
Georg Ehrke 45de7ad221 move files to app folder 2012-04-18 17:27:34 +02:00
Georg Ehrke dfc92675e0 make menu work with movable apps 2012-04-18 17:25:44 +02:00
Georg Ehrke eb29c577c2 Merge branch 'master' into movable_apps 2012-04-18 12:20:09 +02:00
Georg Ehrke cf492a9649 Merge branch 'master' into calendar_sharing 2012-04-18 11:51:59 +02:00
Georg Ehrke de71842888 implement shared calendar activation on server side 2012-04-18 11:50:12 +02:00
Georg Ehrke 8959e0af3d implement shared calendar activation on js-side 2012-04-18 11:39:00 +02:00
Georg Ehrke 7402543d3e resotre old templates/part.choosecalendar.rowfields.php - i hate merge conflicts 2012-04-18 09:53:54 +02:00
Georg Ehrke 3e0e6e35f4 open app thru index.php 2012-04-18 08:20:51 +02:00
Georg Ehrke 69ee0efc0b remove the require_once lib base from all (or nearly all) files 2012-04-17 19:31:29 +02:00
Arthur Schiwon 57b8ff890c check if PHP mod GD is installed 2012-04-17 19:09:41 +02:00
Arthur Schiwon d24abc3b9d check if PHP mod JSON is installed 2012-04-17 19:06:45 +02:00
Robin Appelman 4dabd0fb9c test data for archives 2012-04-17 18:04:06 +02:00
Bart Visscher 6ba30cb713 Tasks: Clicking task summary opens input for edit 2012-04-17 17:32:21 +02:00
Jan-Christoph Borchardt d8761d7edd upload arrow has full opacity, button is highlighted for new users and empty folders 2012-04-17 14:29:02 +02:00
Arthur Schiwon 66018b89b2 LDAP: don't forget to unbind 2012-04-16 18:03:02 +02:00
Arthur Schiwon 86192c2f8d checked, works for me 2012-04-16 17:31:39 +02:00
Arthur Schiwon 9cd5221d47 group ldap: check configuration 2012-04-16 17:28:58 +02:00
Arthur Schiwon ed54de1bbf group LDAP: implement groupExists function, needed for Sharing 2012-04-16 16:23:00 +02:00
Bart Visscher 8afeb0fedb Tasks: Implement task lists overview 2012-04-16 15:34:14 +02:00
Arthur Schiwon 320fde9eec OC_Group does expect object, not string 2012-04-16 15:09:38 +02:00
Arthur Schiwon 899c7631d5 minor code beautification 2012-04-16 15:09:38 +02:00
Arthur Schiwon e1948c651b use the right attribute for member retrieval 2012-04-16 15:09:38 +02:00
Arthur Schiwon 02f4e78f3e a string be a string 2012-04-16 15:09:38 +02:00
Robin Appelman c3187e9388 dont show action text for folders bold 2012-04-16 13:14:41 +02:00
Robin Appelman 6af808edc9 fix delete button not always disapearing 2012-04-16 13:11:41 +02:00
Robin Appelman cfd0140e2f fix 2 potential xss problems 2012-04-16 12:59:38 +02:00
Jan-Christoph Borchardt 3c182bdb35 adding sticker logo jpg 2012-04-16 12:57:17 +02:00
Jan-Christoph Borchardt 961c239ee4 improving leftcontent display, increasing item height 2012-04-16 12:52:48 +02:00
Robin Appelman e59c87ee36 reload log after changing log level 2012-04-16 12:27:21 +02:00
Robin Appelman 5720bd296d merge log into admin 2012-04-16 12:21:48 +02:00
Jan-Christoph Borchardt 70d0103a67 updated logos and icons 2012-04-16 11:34:16 +02:00
Robin Appelman 464c751f30 fix creating unique filenames 2012-04-16 10:58:40 +02:00
Robin Appelman fa97c59f95 fix group backend 2012-04-16 10:36:21 +02:00
Robin Appelman b61f6438ba return user specific paths from oc_filecache::getpath 2012-04-16 10:06:52 +02:00
Simon Birnbach 965a8ba2c6 Fixed cancelling of uploads and wrong merge conflict resolution 2012-04-15 23:52:36 +02:00
Georg Ehrke 77cefdedb8 Merge branch 'master' into sabredav_1.6 2012-04-15 22:28:11 +02:00
Georg Ehrke c8cb870a27 Merge branch 'master' into oc_error 2012-04-15 22:27:47 +02:00
Georg Ehrke dc18e65b46 fix merge conflicts 2012-04-15 22:26:55 +02:00
Jan-Christoph Borchardt 1281809300 improving file actions also for multiselect 2012-04-15 17:49:54 +02:00
Jan-Christoph Borchardt e5cda3abcd tooltip for delete shows up to the left 2012-04-15 17:49:54 +02:00
Jan-Christoph Borchardt 2dfab65a33 fixing file action positioning 2012-04-15 17:49:54 +02:00
Robin Appelman 8ecddb5bc3 create a new filename when the uploaded file already exist 2012-04-15 17:34:53 +02:00
Bart Visscher 74ba09f95c Fix password is being saved even if not changed
Fixes: http://bugs.owncloud.org/thebuggenie/owncloud/issues/oc-303
2012-04-15 17:11:03 +02:00
Bart Visscher 68b1ae1a36 OC_Group_Backend.php misses function groupexists
Fix http://bugs.owncloud.org/thebuggenie/owncloud/issues/oc-182
2012-04-15 17:11:03 +02:00
Bart Visscher ea99e1184d Add well-known redirects to htaccess
Fixes:
http://bugs.owncloud.org/thebuggenie/owncloud/issues/oc-232
http://bugs.owncloud.org/thebuggenie/owncloud/issues/oc-445
2012-04-15 17:11:03 +02:00
Tom Needham b0e68d039c Merge branch 'master' of gitorious.org:owncloud/owncloud 2012-04-15 15:09:54 +00:00
Tom Needham 712e25bb02 Update ace 2012-04-15 15:09:37 +00:00
Thomas Müller a0d917fe98 fixing oc-375 - a number is appended tp the filename 2012-04-15 17:00:49 +02:00
Jakob Sack 0b426b5e64 Display correct URL in caldav and carddav paths 2012-04-15 16:50:45 +02:00
Jakob Sack 9b1d6246a9 Remove useless, unmaintained dav.php 2012-04-15 16:50:44 +02:00
Simon Birnbach 8e27b725ba Fixed cancelling upload of same file to folder and subfolder 2012-04-15 16:47:53 +02:00
Robin Appelman 9ac65c51f5 dont try to view psd files 2012-04-15 16:26:08 +02:00
Robin Appelman c0bdad5893 dont allow draging files to the current directory 2012-04-15 16:06:55 +02:00
Robin Appelman dae34edf4f fix filecache rename hook 2012-04-15 16:06:55 +02:00
Tom Needham fef3434bdf Merge branch 'master' of gitorious.org:owncloud/owncloud 2012-04-15 14:02:13 +00:00
Tom Needham 738601f4fe Remove google web font 2012-04-15 14:01:59 +00:00
Thomas Müller 679ddc0e32 Merge branch 'master' of gitorious.org:owncloud/owncloud 2012-04-15 16:01:06 +02:00
Simon Birnbach a384fcb99f Merge git://gitorious.org/owncloud/owncloud
Conflicts:
	files/css/files.css
	files/js/files.js
2012-04-15 15:59:57 +02:00
Thomas Müller f36d31f74d pdfjs updated from github 2012-04-15 15:59:31 +02:00
Arthur Schiwon 80f4c4f923 Bookmarks: handle input with & and ?, fixes oc-201 2012-04-15 15:53:40 +02:00
Robin Appelman 75a4e46872 do no offer 'undo delete' on opera
opera lacks the onunload to make it work
2012-04-15 15:48:19 +02:00
Tom Needham 9ee3eb1412 remove unused css 2012-04-15 13:44:43 +00:00
Tom Needham cdf9f8c42a Force Files app to top of app menu 2012-04-15 13:41:22 +00:00
Bart Visscher 947d2e5705 Tasks: Mark task as complete when checking the checkbox 2012-04-15 15:39:49 +02:00
Bart Visscher 19d81068f6 Tasks: Code cleanup 2012-04-15 15:38:44 +02:00
Robin Appelman b3bd4bc384 sanity check on language selection 2012-04-15 15:35:20 +02:00
Robin Appelman b3ae2208b1 clean the collection view after rescanning 2012-04-15 15:19:30 +02:00
Robin Appelman cf3bb08dfb enable archive support on default 2012-04-15 15:19:30 +02:00
Robin Appelman 9ee931e790 only run archive tests if the test data is available 2012-04-15 15:19:30 +02:00
Robin Appelman 71cdfdcec8 only run tests of enabled apps 2012-04-15 15:19:30 +02:00
Arthur Schiwon 819af69972 group LDAP: simple basic tests 2012-04-15 14:50:03 +02:00
Arthur Schiwon 0a46c7a393 group LDAP: usersInGroup not getUsersInGroup
offer static readonly properties
2012-04-15 14:50:03 +02:00
Arthur Schiwon 2a03db6065 don't forget changes in lib_ldap for last commit 2012-04-15 14:50:03 +02:00
Arthur Schiwon 8a6fa65ed6 group LDAP: implemented getUsersInGroup() 2012-04-15 14:50:03 +02:00
Arthur Schiwon b480071946 group LDAP: implemented getUserGroups() 2012-04-15 14:50:03 +02:00
Arthur Schiwon 0912f40ebe typo 2012-04-15 14:50:03 +02:00
Arthur Schiwon 54a9fd2e6a group LDAP: implemented inGroup() 2012-04-15 14:50:03 +02:00
Jan-Christoph Borchardt 1f91224f9e fixing opacity and fading, also for IE 2012-04-15 14:37:42 +02:00
Georg Ehrke 8ddea7e95c Merge branch 'master' into calendar_sharing 2012-04-15 14:28:31 +02:00
Jan-Christoph Borchardt 897261daf4 display file actions perfectly 2012-04-15 14:15:11 +02:00
Jan-Christoph Borchardt 38cb716a57 increasing the file row height a bit 2012-04-15 13:34:31 +02:00
Jan-Christoph Borchardt 7ddd043427 renamed extention to extension, also now only showing lowercase 2012-04-15 13:34:30 +02:00
Jan-Christoph Borchardt d32799e4bf show text for file actions 2012-04-15 13:34:30 +02:00
Jan-Christoph Borchardt 5868199e85 fixed settings hover, now whole row sensitive and fading not jerky 2012-04-15 13:34:30 +02:00
Robin Appelman b669c846b0 add span around fileactions 2012-04-15 13:25:31 +02:00
Georg Ehrke e292b1fcdb fix merge conflicts 2012-04-15 12:43:07 +02:00
Robin Appelman a6a8e2c553 add public api to get the file id from the cache 2012-04-15 11:44:04 +02:00
Robin Appelman c5b8a3eb94 fix installing shipped apps 2012-04-15 11:05:55 +02:00
Daniel fd16784bcc fix bug where users could use wildcards in username to login
e.g. user Peter could probably login using username Pet%
fixed same problem in the migration script
2012-04-15 10:30:22 +02:00
Bartek Przybylski f241615693 fix getAppVersion error 2012-04-15 00:05:28 +02:00
Jan-Christoph Borchardt ba5e60e2e4 firefighting Robin-breakage 2012-04-14 19:05:01 +02:00
Robin Appelman 4410f15dd8 don't rely on the old version in info.xml anymore 2012-04-14 19:01:59 +02:00
Jan-Christoph Borchardt fbb314ef4b Merge branch 'master' of gitorious.org:owncloud/owncloud 2012-04-14 18:56:55 +02:00
Jan-Christoph Borchardt f16cfbab5e improved installation instructions 2012-04-14 18:44:32 +02:00
Jan-Christoph Borchardt 85cb171cb8 improved updater wording 2012-04-14 18:41:09 +02:00
Bart Visscher 3b71e46cf7 Contact: Don't use non core class in appinfo/app.php 2012-04-14 18:34:59 +02:00
Bart Visscher 402c6da968 Typo fix (breif->brief) 2012-04-14 18:31:42 +02:00
Bart Visscher 4976daca7a Fix default database type string 2012-04-14 18:31:41 +02:00
Bart Visscher 30498fd6f8 Use offset function to position block elements 2012-04-14 18:31:41 +02:00
Arthur Schiwon 29bb5d27e4 few pieces of documentation 2012-04-14 18:26:51 +02:00
Robin Appelman 8113a43252 typo 2012-04-14 18:09:42 +02:00
Arthur Schiwon 19243b3e91 give back expected result types as long as logic is not there yet 2012-04-14 18:08:40 +02:00
Arthur Schiwon e160acefe3 test for ldap group backend 2012-04-14 18:08:40 +02:00
Arthur Schiwon 61a43419a5 starting to create the ldap group backend (with some inspiration from Yoann Gini) and preparing an general LDAP class 2012-04-14 18:08:40 +02:00
Robin Appelman dec139716e cache app types in the db 2012-04-14 17:53:02 +02:00
Robin Appelman 5608867edc use the correct array indexes... 2012-04-14 17:52:49 +02:00
Jan-Christoph Borchardt a0a5668d1e increase opacity of search field and logout icon 2012-04-14 17:20:50 +02:00
Robin Appelman b1bcc60d83 reuse OC_L10N objects 2012-04-14 16:44:15 +02:00
Robin Appelman 721311c909 some minor optimizations 2012-04-14 16:29:11 +02:00
Robin Appelman 926b2b78fe keep version numbers in their own files for faster reading 2012-04-14 16:29:11 +02:00
Robin Appelman bfdbdd9b20 remove outdated file 2012-04-14 16:29:11 +02:00
Bart Visscher 029e1aced7 Tasks: Update to use new categories interface 2012-04-14 14:55:37 +02:00
Tom Needham 44c34115a4 Remove go to line 2012-04-14 12:49:31 +00:00
Tom Needham c069aa62a4 Fix annoying error in log 2012-04-14 12:31:48 +00:00
Bart Visscher 7d1880078c Merge branch 'master' into tasks 2012-04-14 13:47:56 +02:00
Tom Needham 9b1c881ca8 Merge branch 'master' of gitorious.org:owncloud/owncloud 2012-04-14 11:18:25 +00:00
Robin Appelman 386663ddb6 swap enable and dissable error messages 2012-04-14 13:16:37 +02:00
Robin Appelman d8864d4f4b show error when installing an app has failed 2012-04-14 12:57:10 +02:00
Robin Appelman d3bf013761 prevent users with the same name but different casing from being created 2012-04-14 12:57:10 +02:00
Bart Visscher 5c55b9c5ac Sharing: Add a filename after public share link
We don't do anythink with the name, but it is nice to know the file the
link point to.
2012-04-14 12:45:32 +02:00
Bart Visscher 524bd2e75f Sharing: Don't get share icon for undefined filename 2012-04-14 12:45:32 +02:00
Bart Visscher 7504ceb6f2 Sharing: Define missing template vars 2012-04-14 12:45:32 +02:00
Robin Appelman 137dce87fc remove outdated code 2012-04-14 11:42:11 +02:00
Robin Appelman 3babb8c22c improve flexibility of search providers a bit 2012-04-14 11:29:54 +02:00
Arthur Schiwon 8ed4606685 LDAP: don't keep possibly outdated passwords 2012-04-14 11:08:50 +02:00
Robin Appelman d8e54acbf3 test cases for user backends 2012-04-14 10:43:28 +02:00
Georg Ehrke e256ac8791 fix unsharing of events 2012-04-13 21:49:24 -04:00
Georg Ehrke c65adc12d5 add chosen script to calendar 2012-04-13 21:29:51 -04:00
Georg Ehrke 5d4c546693 fix public sharing of calendars 2012-04-13 17:36:47 -04:00
Georg Ehrke ea3499a712 fix class name 2012-04-13 17:26:34 -04:00
Georg Ehrke 1e0364baa8 check permission check in share function 2012-04-13 17:16:28 -04:00
Arthur Schiwon 9ef34cd831 typo 2012-04-13 23:02:42 +02:00
Arthur Schiwon 74f0bebfc8 don't fail on missing extension 2012-04-13 23:02:42 +02:00
Arthur Schiwon b9bdad5165 make sure temporary files are being removed, fixes oc-450 2012-04-13 23:02:42 +02:00
Georg Ehrke e5e7d4a73a fix merge conflicts 2012-04-13 16:44:31 -04:00
Georg Ehrke 77a9e343aa Merge branch 'master' into sabredav_1.6 2012-04-13 16:42:10 -04:00
Georg Ehrke afcb0aee40 fix merge conflicts 2012-04-13 16:40:10 -04:00
Georg Ehrke 02dc343209 fix address of public shared calendars 2012-04-13 16:26:06 -04:00
Georg Ehrke 854eaff34f hide share tab in shared events 2012-04-13 16:20:19 -04:00
Tom Needham 0aaaefbb4b Merge branch 'master' of gitorious.org:owncloud/owncloud 2012-04-13 20:10:35 +00:00
Tom Needham 1165b358b4 Update language string 2012-04-13 20:09:04 +00:00
Bart Visscher b9f9228a22 Contacts: Save the category list update when updating/adding contact 2012-04-13 21:13:58 +02:00
Bart Visscher 4c52007996 Calendar: Update category list when updating/adding event 2012-04-13 21:13:58 +02:00
Bart Visscher 471e735b0c Calendar: Document active parameter in allCalendars 2012-04-13 21:13:58 +02:00
Bart Visscher 7cf7d5c3dd Calendar: Also set repeat options when editing a non repeating event 2012-04-13 21:13:58 +02:00
Bart Visscher 28e0d64ede Calendar: Fix saving of Categories in an event 2012-04-13 21:13:58 +02:00
Bart Visscher f9b7ed3a1f Calendar: Implement rescan of Categories 2012-04-13 21:13:58 +02:00
Bart Visscher b8466d362e Fix rescan "File not Found" error handling in oc-vcategories.js 2012-04-13 21:13:58 +02:00
Thomas Tanghus 6aee6dae6b VCategories css is now in styles.css 2012-04-13 18:50:40 +02:00
Thomas Tanghus b654121b50 Contacts: Better error reporting. 2012-04-13 18:50:40 +02:00
Robin Appelman 6066ea3170 only run tests for files_external when asked for explicitly 2012-04-13 18:49:50 +02:00
Robin Appelman 8686667b10 some idexes for the media player tables 2012-04-13 18:49:50 +02:00
Jan-Christoph Borchardt eea0d2e096 fixing delete tooltip 2012-04-13 18:28:17 +02:00
Jan-Christoph Borchardt add9673ad6 merging tanghus category CSS 2012-04-13 17:23:56 +02:00
Jan-Christoph Borchardt 31df4c00ec adding tipsy tooltips for file actions 2012-04-13 17:22:23 +02:00
Arthur Schiwon b95f561bf2 file settings: let people set no more than upper boundary for file uploads, but they should can really go up to the limit 2012-04-13 11:25:38 +02:00
Arthur Schiwon 1bd27891e2 make upload size settings work probably. do not replace whole .htaccess, only replace what is needed. Consistent, human readable input on admin settings page. 2012-04-13 10:43:44 +02:00
Georg Ehrke df2e788a1c fix calendarid in eventform and validation of calendarid 2012-04-12 23:15:19 -04:00
Georg Ehrke a7908ba76b fix bugs in share class 2012-04-12 22:11:48 -04:00
Robin Appelman 1d8fdf52d5 allow multiply group backends 2012-04-13 01:59:05 +02:00
Bart Visscher e9c1f8b4e6 Contacts: No need to sort the categories anymore 2012-04-12 23:10:49 +02:00
Bart Visscher 43ba23430d Contacts: Change "category" to "group" in UI 2012-04-12 23:10:49 +02:00
Bart Visscher 78189e2247 Contacts: update category list when the categories change 2012-04-12 23:10:49 +02:00
Bart Visscher 9165b5c28e Use the same category input and management as the contacts app 2012-04-12 23:10:49 +02:00
Bart Visscher 69d584331d OC_VCategories: sort categories in natural order using usort
Use usort to sort, so that the json encoding is an array.
2012-04-12 23:10:49 +02:00
Bart Visscher b2011bd0a0 Remove unused function getCategoryOptions from OC_Calendar_Object 2012-04-12 23:10:49 +02:00
Bart Visscher 5fa90cd214 Contacts: Also initialize org var in updateValuesFromAdd 2012-04-12 23:10:49 +02:00
Bart Visscher 86edc0da31 Contacts: add space before parameter 2012-04-12 23:10:49 +02:00
Bart Visscher fa853102e4 Contacts: Move use of OC_Contacts_App::$categories to inside of OC_Contacts_App
This is in preparation of making $categories protected and initialized
with default categories.
2012-04-12 23:10:49 +02:00
Bart Visscher bc81179163 Fix categories delete fallback when there is no app specific ajax categories delete function 2012-04-12 23:10:49 +02:00
Bart Visscher 815649dbd7 Implement default categories in OC_VCategories 2012-04-12 23:10:49 +02:00
Frank Karlitschek 56bc2c4591 add a title attribute to the logout button 2012-04-12 20:34:56 +02:00
Frank Karlitschek 48f99fe661 off by default. great tool for developers but confusing for users. 2012-04-12 20:23:45 +02:00
Arthur Schiwon 1ade37305f always display config values
don't change values unintentionally
2012-04-12 20:17:52 +02:00
Florian Preinstorfer b86f2069ff Fix a session fixation vulnerability
- regenerate the session for every successful login
- properly destroy a session

Further information can be found on:
https://en.wikipedia.org/wiki/session_fixation
2012-04-12 19:15:38 +02:00
unknown 2f3c0a6d80 wrong defaultValue definition in OC.AppConfig.getValue
done
2012-04-12 19:14:25 +02:00
Deepak Mittal bd262eaac0 Fixed OC-261 by modifying js files in apps/media/ 2012-04-12 17:56:53 +02:00
Grundik 7e7de25710 UTF8 locale by default 2012-04-12 17:54:20 +02:00
Daniele E. Domenichelli d9aa31fd92 Use OC_Helper::serverHost() in openid settings 2012-04-12 17:51:17 +02:00
Daniele E. Domenichelli 156bdae2fe Use OC_Helper::serverHost() in OC_Helper::linkToAbsolute() 2012-04-12 17:51:17 +02:00
Daniele E. Domenichelli 7b5395675d Add method OC_Helper::serverHost()
This method returns the server host, even if the website uses one or
more reverse proxies.
2012-04-12 17:51:17 +02:00
Robin Appelman 0466437fa7 tests for oc_filesystem 2012-04-12 15:55:56 +02:00
Robin Appelman 8cea656ad7 upgrade getid3 2012-04-12 15:54:08 +02:00
Georg Ehrke 0f16935763 fix bugs and optimize OC_Calendar_Object Class 2012-04-11 10:21:45 -04:00
Frank Karlitschek 637db92e60 increase version to show that we are not the same as stable 2012-04-11 09:20:28 +02:00
Georg Ehrke 613e15035e Merge branch 'master' into sabredav_1.6 2012-04-10 22:44:13 -04:00
Georg Ehrke ac2d14101c Merge branch 'master' into calendar_sharing 2012-04-10 20:10:07 -04:00
Georg Ehrke 64d3301523 make shared events editable and add (empty) classes for alarm and attendees 2012-04-10 16:03:38 -04:00
Bart Visscher 9f547a1b39 VCategories: fix function names to coding standard 2012-04-10 21:53:51 +02:00
Bart Visscher 2dfa02a346 Contacts: fix function names to coding standard 2012-04-10 21:53:36 +02:00
Bart Visscher 3f6e971571 Contacts: Don't lowercase categories value when saving 2012-04-10 21:19:39 +02:00
Bart Visscher fd72556fd1 Contacts: Make part.no_contacts.php translatable 2012-04-10 21:15:38 +02:00
Bart Visscher 17af1ba893 Silence error for missing appinfo info file 2012-04-10 21:04:35 +02:00
Georg Ehrke eaa649cfb2 fix bug in share lib of calendar 2012-04-10 11:18:02 -04:00
Frank Karlitschek 07719045db Merge branch 'master' of gitorious.org:owncloud/owncloud 2012-04-10 15:05:59 +02:00
Frank Karlitschek 47f94548ce don´t enable by default. still broken 2012-04-10 15:05:33 +02:00
Arthur Schiwon 0c56f82db5 fix: drag'n'drop actions with files containing special chars, fixes oc-420 2012-04-10 13:53:27 +02:00
Frank Karlitschek 6cf3f10d35 fix includes 2012-04-09 22:51:53 +02:00
Frank Karlitschek b0894b3148 Add Craigs granite library to 3rdparty and files_versioning. Still not working and lots ot stuff to do. 2012-04-09 22:10:29 +02:00
Thomas Tanghus 4fda6af725 Contacts: Fix for not being able to add contact to empty/non-existant address book. 2012-04-09 16:30:58 +02:00
Thomas Tanghus 9c247ce874 Removed padding. 2012-04-09 16:30:58 +02:00
Thomas Tanghus 53091551d8 Re-added file I had accidentally removed earlier :-P 2012-04-09 16:30:58 +02:00
Tom Needham 8e188cd96f Copy over all file app data for imported user 2012-04-08 19:16:03 +00:00
Tom Needham ecc596534a Decode json response for admin exports 2012-04-08 19:08:17 +00:00
Tom Needham e5ebbacc9e Fix sqlite version detection 2012-04-08 18:52:31 +00:00
Georg Ehrke 9294a95438 fix view of single shared events 2012-04-07 22:54:38 -04:00
Georg Ehrke 960553f9c4 fix path and class name 2012-04-07 22:45:44 -04:00
Georg Ehrke 5a4237a31d make dropdown menu work with single event sharing 2012-04-07 22:41:24 -04:00
Georg Ehrke 97d216c94d add dropdown to eventform 2012-04-07 22:40:20 -04:00
Georg Ehrke 4d884c3849 clean up events.php of calendar 2012-04-07 22:39:37 -04:00
Georg Ehrke e940152bce fix bugs in share lib of calendar 2012-04-07 22:39:02 -04:00
Georg Ehrke eef9a1e7ed add access check to ajax files 2012-04-07 22:37:26 -04:00
Georg Ehrke e18c0d54f6 add output functions and access function to app.php of calendar 2012-04-07 22:35:29 -04:00
Tom Needham 5e314e8eff Emit hooks for user creation 2012-04-07 22:00:32 +00:00
Tom Needham c0869887cf Return JSON for import and export methods of OC_Migrate 2012-04-07 21:55:16 +00:00
Tom Needham 9edf45a324 Merge branch 'master' into migration 2012-04-07 17:31:30 +00:00
Tom Needham d2886f2020 Hide instance import as it eats data 2012-04-07 17:27:09 +00:00
Tom Needham 00449cdf37 rename admin_export -> admin_migrate 2012-04-07 17:23:25 +00:00
Tom Needham 23d39f7ef0 Display errors on import 2012-04-07 16:13:18 +00:00
Thomas Tanghus d1ae6512cc Contacts: Misc. cleanup tweaks. 2012-04-07 16:03:43 +02:00
Thomas Tanghus b71cf1a4f9 Fix bug oc-413: PHP fatal error in contacts page when no contacts in ownCloud. 2012-04-07 16:03:43 +02:00
Tom Needham 660951dc64 Add some filetypes 2012-04-07 13:32:00 +00:00
Tom Needham 42e110b49c Update url 2012-04-07 13:07:44 +00:00
Tom Needham a098c7c685 Give editor focus after saving 2012-04-06 21:38:38 +00:00
Tom Needham 22466010fc Provide undo when closing editor with unsaved changes 2012-04-06 21:37:28 +00:00
Tom Needham 2fe0716cb4 Show nice errors 2012-04-06 20:52:41 +00:00
Bartek Przybylski 96c99125da mimetype filter for filepicker 2012-04-05 23:18:44 +02:00
Bartek Przybylski fe3d3be399 filepicker loading style fixup 2012-04-05 22:25:58 +02:00
Bartek Przybylski 5b4a303672 loading screen for filepicker 2012-04-05 21:29:54 +02:00
Florian Hülsmann 8a2c5dda6d Merge commit 'refs/merge-requests/102' of git://gitorious.org/owncloud/owncloud into merge-requests/102 2012-04-04 21:36:50 +02:00
Tom Needham 85f9869f69 Make the token really random 2012-04-04 13:18:02 +00:00
Arthur Schiwon 60e3b563e2 webdav needs to load authentication apps 2012-04-04 12:41:32 +02:00
Tom Needham acdce2b1e0 Check blacklist before saving to filesystem 2012-04-03 22:31:34 +00:00
Tom Needham 95c2ac5d58 Dont typecast variables as integers 2012-04-03 21:14:55 +00:00
Bartek Przybylski cd05dfb943 adding icons to filepicker 2012-04-03 22:18:03 +02:00
Thomas Tanghus dd4e577f6d Contacts: l11n for geo autocomplete. Not sure if it works though. 2012-04-03 08:13:10 +02:00
Thomas Tanghus fc555b48ec Contacts: Added autocomplete using geonames.org. 2012-04-03 07:29:47 +02:00
Thomas Tanghus b3f107ddda Contacts: First work on cleaner design. 2012-04-03 03:29:12 +02:00
Thomas Tanghus 896bff5748 Contacts: rescan categories on load if there are none. 2012-04-03 03:29:12 +02:00
Florian Hülsmann bd9fa658de merged from upstream 2012-04-02 23:54:18 +02:00
Bartek Przybylski ff5dbc52b8 multiselect handle for filepicker 2012-04-02 21:32:35 +02:00
Tom Needham 9f9b448161 Merge branch 'master' of gitorious.org:owncloud/owncloud 2012-04-02 17:44:24 +00:00
Tom Needham adc9d906e4 confirm close when there are unsaved changes 2012-04-02 17:44:15 +00:00
Bartek Przybylski f21d6d4f9f dialogs filepicker first draft 2012-04-02 19:39:24 +02:00
Tom Needham dc499c5b4e add * to filename when changes have been made 2012-04-02 17:27:06 +00:00
Tom Needham d0cb99e347 use OC_Dialogs instead of alert() 2012-04-02 16:35:11 +00:00
Florian Hülsmann 2cb741adff Merge branch 'master' of gitorious.org:~cbix/owncloud/cbix-owncloud 2012-04-02 17:13:21 +02:00
Florian Hülsmann 33c1fa6e28 webfinger protocol compatible + minor changes 2012-04-02 17:12:52 +02:00
Georg Ehrke 72a43b3929 revert 0fd8b1a044 2012-04-02 08:32:27 -04:00
Florian Hülsmann 3e150ff548 webfinger protocol compatible + minor changes 2012-04-02 06:31:00 +02:00
Michael Gapczynski ff4b0c4d7f Move writable check into local filestorage so shared files can be renamed 2012-04-01 13:30:41 -04:00
Robin Appelman cce59df2ae the core apps don't have types 2012-04-01 19:22:23 +02:00
Robin Appelman 39e8981bc2 oc_db is not pdo
also pgsql does not like double quotes
2012-04-01 17:32:13 +02:00
Frank Karlitschek b758725bf7 Try to configure php to enable big file uploads.
This doesn´t work always depending on the webserver and php configuration.
Let´s try to overwrite some defaults anyways
2012-04-01 17:02:32 +02:00
Frank Karlitschek 1b8a644c31 update outdated README 2012-04-01 16:06:08 +02:00
Frank Karlitschek 6545e48787 Show the different editions to the user. Used in the status call, on the personal settings page and in the updater to update to the next available version from the same edition. 2012-04-01 11:20:12 +02:00
Michael Gapczynski 6bb48b2731 Check file handle exists before trying to read file 2012-04-01 02:38:26 -04:00
Scott Shambarger d896c19011 cal import should group events by uid, export should have correct newlines, fix for oc-384 2012-03-31 20:16:42 -07:00
Tom Needham eba6a65908 try to use transactions to replace db 2012-04-01 00:25:47 +00:00
Tom Needham ffbd72bbcf Fix user app data export 2012-04-01 00:07:39 +00:00
Tom Needham a248cc73e6 Merge branch 'master' into migration 2012-03-31 23:56:16 +00:00
Tom Needham daf742c086 Fix owncloud log 2012-03-31 23:55:41 +00:00
Tom Needham ce89ff15aa Remove db tmp file after export creation 2012-03-31 23:20:08 +00:00
Robin Appelman d01b78a4b4 prevent an possible xss exploit 2012-04-01 00:55:49 +02:00
Tom Needham 3e84d85482 remove debug 2012-03-31 22:50:57 +00:00
Tom Needham aba3182a7d Fix loading image after export failure 2012-03-31 22:47:38 +00:00
Tom Needham f7d8a8c571 Merge branch 'master' into migration 2012-03-31 22:44:50 +00:00
Tom Needham d20eea9761 Use ajax to download file, OC_Dialogs for errors 2012-03-31 22:41:43 +00:00
Bartek Przybylski 4e327295c6 adding callback when ok click on alert dialog 2012-04-01 00:30:52 +02:00
Georg Ehrke 0fd8b1a044 fix events.php for rewritten OC_Caledar_App class 2012-03-31 16:16:34 -04:00
Georg Ehrke ca2c7001c4 remove unused code in OC_Calendar_App class 2012-03-31 16:15:04 -04:00
Georg Ehrke 70237f7ecc rewrite OC_Calendar_APP class 2012-03-31 16:13:04 -04:00
Georg Ehrke 10fc51dc92 add public sharing fir calendars and events - add function in Share class 2012-03-31 16:12:27 -04:00
Georg Ehrke cf26f8a6a7 add public sharing for calendars and events 2012-03-31 17:32:43 +01:00
Georg Ehrke 4b3f074309 add new parameters to export file 2012-03-31 17:27:30 +01:00
Robin Appelman 2f68b08491 fix eventsource for ie 2012-03-31 16:40:42 +02:00
Robin Appelman ebc7a6a0a6 dont send to much when scanning large folders 2012-03-31 16:28:22 +02:00
Robin Appelman 9d2f8aa717 send more progress updates when scanning large folders 2012-03-31 16:24:53 +02:00
Robin Appelman b72d7f1ab3 make sure output buffering is dissabled when using eventsource 2012-03-31 16:20:32 +02:00
Robin Appelman ad495a9218 fix potential problem when using multiply eventsource's 2012-03-31 16:10:29 +02:00
Georg Ehrke 1f8cf2d8f2 fix name of constants 2012-03-31 13:37:44 +02:00
Georg Ehrke a88305b4cb remove share tab from read only event dialog 2012-03-31 13:11:30 +02:00
Florian Hülsmann f9f91a08b4 webfinger reimplementation started 2012-03-31 02:42:41 +02:00
Bart Visscher 71b70bb05f Fix HTML, misspelled span close tag 2012-03-30 23:41:54 +02:00
Bart Visscher 20fc23c82b Move logfile determination to init function 2012-03-30 23:41:54 +02:00
Bart Visscher 3300d6ea53 checkUpgrade has to be after template initialization
The error path of checkUpgrade uses the template
2012-03-30 23:41:54 +02:00
Bart Visscher a7438189f3 Move more from base init to separate functions 2012-03-30 23:41:53 +02:00
Bart Visscher 3a4521a012 Add support for logging to syslog 2012-03-30 23:41:53 +02:00
Georg Ehrke 926e777061 filter notice and deprecated errors and write a proper error handler function 2012-03-30 23:37:47 +02:00
Bartek Przybylski 6b704a780d select field added to oc.dialogs.form, gallery ported to use it 2012-03-30 22:50:57 +02:00
Florian Hülsmann 5161758921 create static host-meta instead of symlink and .htaccess 2012-03-30 21:35:09 +02:00
Bartek Przybylski 6abb2cb92e fix sharing nested galleries 2012-03-30 21:14:01 +02:00
Robin Appelman 65eee1f69d clean pre-path_hash fscache entries 2012-03-30 19:44:49 +02:00
Georg Ehrke ef1e359c7c Merge branch 'master' into sabredav_1.6 2012-03-30 18:48:30 +02:00
Georg Ehrke 7e53d82ff3 Merge branch 'master' into oc_error 2012-03-30 18:43:09 +02:00
Georg Ehrke e3203f87ff Merge branch 'master' into calendar_sharing 2012-03-30 18:42:09 +02:00
Jan-Christoph Borchardt 284955573c clarifying remoteStorage description 2012-03-30 18:18:37 +02:00
Jan-Christoph Borchardt dde5660915 renamed Gallery to Pictures, still needs to be changed in the code to also reflect in the path 2012-03-30 18:18:37 +02:00
Jan-Christoph Borchardt 011132feb3 renaming remote storage support to External storage support to clear up naming conflict 2012-03-30 18:18:37 +02:00
Robin Appelman 7552390031 add path_hash to the filesystem cache 2012-03-30 18:12:33 +02:00
Robin Appelman 523fdda399 add the option to only load apps of a specific type 2012-03-30 14:39:07 +02:00
Robin Appelman a07c6b1a2e optimizations for loadApps 2012-03-30 14:08:18 +02:00
Robin Appelman 7bc9fa765c optimizations for updateApps 2012-03-30 14:08:18 +02:00
Georg Ehrke 90286353e2 Merge branch 'master' into sabredav_1.6 2012-03-29 23:20:03 +02:00
Georg Ehrke d15959d573 Merge branch 'master' into calendar_sharing 2012-03-29 23:19:31 +02:00
Georg Ehrke e45e48ff3d Merge branch 'master' into oc_error 2012-03-29 23:18:47 +02:00
Georg Ehrke d049d9bd0c initial commit for OC_Exception 2012-03-29 23:16:19 +02:00
Bartek Przybylski f74d11c0c3 fix gallery sharing when root is not / 2012-03-29 20:45:21 +02:00
Arthur Schiwon 45a3d84748 checkobx opacity on files page for IE8 2012-03-29 18:32:25 +02:00
Arthur Schiwon af75ecf9da make checkboxes on files page work with IE8 () 2012-03-29 18:32:25 +02:00
Arthur Schiwon e2fd0bbf02 IE 8: fix appeareance of checkboxes on login and files pages 2012-03-29 18:32:25 +02:00
Thomas Tanghus 4b3282b325 Contacts: Removed obsolete code. 2012-03-29 15:36:04 +02:00
Thomas Tanghus 11f7eeb63a Improve actions on delete. 2012-03-29 15:25:24 +02:00
Thomas Tanghus b559952806 Cleanup stylesheet. 2012-03-29 15:25:24 +02:00
Tom Needham 73eca66a89 Fix comments 2012-03-29 10:17:08 +00:00
Michael Gapczynski 5fef9dfc22 Make users only able to share with users in groups they belong to 2012-03-28 21:18:17 -04:00
Robin Appelman 60ba5508a4 add support for installing apps from a subfolder in the zip/tgz file 2012-03-29 00:11:29 +02:00
Robin Appelman d6a9af3138 add support for installing apps from tgz 2012-03-29 00:07:28 +02:00
Robin Appelman 72882beb0d enble browsing tar files in the web interface 2012-03-28 23:53:51 +02:00
Robin Appelman 1b6fe4f65e stricter tests for archive backends and make sure we make the tests 2012-03-28 23:47:44 +02:00
Robin Appelman c26e003462 add tar backend for OC_Archive
also handles bz2/gz compression
2012-03-28 23:47:44 +02:00
Robin Appelman e57de98bbe add extract all option to OC_Archive 2012-03-28 23:47:44 +02:00
Robin Appelman d8e9db207f add tempory folder utility to OC_Helper 2012-03-28 23:47:44 +02:00
Robin Appelman f42897344f allow running a single test or group of tests 2012-03-28 23:47:44 +02:00
Georg Ehrke 08b4f996d3 add backslash r to the newline var 2012-03-28 17:06:16 +02:00
Georg Ehrke e5c009599d remove check for variable which was set one line above - bugfix for oc-324 2012-03-28 16:38:42 +02:00
Georg Ehrke 0d16f177cb add scrollbar to the music list - bugfix for oc-301 2012-03-28 16:21:54 +02:00
Florian Hülsmann 34a0128ddf whitespace indentation fix 2012-03-28 16:12:34 +02:00
Florian Hülsmann bcda46eda3 webfinger installation creates symlink in document root 2012-03-28 16:07:50 +02:00
Tom Needham bd4fd76bfb Fix bookmarks migration provider 2012-03-27 21:35:29 +00:00
Tom Needham ef33219e4f import method returns each apps' import status 2012-03-27 21:21:14 +00:00
Tom Needham 31d268fe92 check for sqlite 2012-03-27 20:55:53 +00:00
Tom Needham 553f4533c0 look for migrate.php in appinfo folder 2012-03-27 20:45:37 +00:00
Tom Needham b201e51528 Stop error on export 2012-03-27 20:43:44 +00:00
Tom Needham c8acd4a594 Merge branch 'master' into migration 2012-03-27 20:19:38 +00:00
Simon Birnbach 4e89a0faf6 Added uploading to folder and cancellable downloads 2012-03-27 21:38:55 +02:00
Georg Ehrke 536a3ecb42 Merge branch 'master' into sabredav_1.6 2012-03-27 20:54:16 +02:00
Georg Ehrke ede0a675bc Merge branch 'master' into calendar_sharing 2012-03-27 20:53:40 +02:00
Thomas Tanghus cb2dd97509 Trigger autocomplete wo button. 2012-03-27 12:30:20 +02:00
Thomas Tanghus fa165498cc Improvements in adding/deleting properties. 2012-03-27 12:30:20 +02:00
Thomas Tanghus ff038f8766 Contacts: Update contact list thumbnail when deleting PHOTO. 2012-03-27 12:30:20 +02:00
Thomas Tanghus 0a07e5fdaa Added some documentation. 2012-03-27 12:30:20 +02:00
Georg Ehrke ff75d65d7e Merge branch 'master' into calendar_sharing 2012-03-27 09:29:16 +02:00
Georg Ehrke c384e3ba4f fix width of dropdown to select monthdays - bugfix oc-354 2012-03-27 09:24:55 +02:00
Arthur Schiwon c92fc9bf65 return path of tmp file like filestorage/common does. Fixes broken folder-/multifile-download. 2012-03-27 02:24:52 +02:00
Arthur Schiwon 24bc639222 Do not use always the same name for download-zip to avoid collisions. 2012-03-27 01:19:34 +02:00
Arthur Schiwon bcef775d6b Overwrite Download-ZIP if it already exists. We do not want to show alien content. 2012-03-27 01:18:38 +02:00
Robin Appelman 266699ddf9 fix square images not getting proper thumbnails 2012-03-27 00:42:15 +02:00
Robin Appelman 128d446f39 fix timestamps when viewing logs 2012-03-27 00:21:31 +02:00
Robin Appelman eb3ec05f88 fix gallery scan when an image cant be loaded 2012-03-26 23:56:07 +02:00
Robin Appelman 73c6db5c8e crop and resize in a single step when creating thumbnail
also so more explicit memory cleanup
2012-03-26 23:53:48 +02:00
Robin Appelman 3f881f1ca5 memory cleanup in gallery 2012-03-26 22:40:38 +02:00
Robin Appelman 0ba9332358 some more memory cleanup in OC_Image 2012-03-26 22:33:37 +02:00
Robin Appelman 0c19e44a61 some more memory cleanup in OC_Image 2012-03-26 22:28:51 +02:00
Thomas Tanghus 60a939dfcf Small change and muting debug. 2012-03-26 22:26:06 +02:00
Thomas Tanghus 0da988a1bb Check for empty value.
Added missing classes on action icons.
2012-03-26 22:08:03 +02:00
Bart Visscher ee31bc7995 Contacts: Fix saveproperty for categories 2012-03-26 21:47:37 +02:00
Georg Ehrke a867bcab46 Merge branch 'master' into calendar_sharing 2012-03-26 21:46:40 +02:00
Georg Ehrke 31e20d2283 added some authors to the Authors file 2012-03-26 21:46:10 +02:00
Thomas Tanghus 6ff89dcf72 Removed obsolete code. 2012-03-26 19:13:48 +02:00
Georg Ehrke f479105f5e optimize choosecalendar dialog for shared calendars 2012-03-26 16:01:55 +02:00
Georg Ehrke 10ef01b04b fix displayed username of person who shares 2012-03-26 15:44:24 +02:00
Georg Ehrke 8b9d439841 Calendar: fix address for import file 2012-03-26 15:37:47 +02:00
Georg Ehrke 179bf15daf fix group sql generator in calendar's share lib 2012-03-26 15:30:04 +02:00
Georg Ehrke 71b32f7ad4 add read only 'form' for shared events 2012-03-26 15:24:43 +02:00
Georg Ehrke 96dd008f5e Merge branch 'master' into calendar_sharing 2012-03-26 09:50:39 +02:00
Georg Ehrke b7a5ae38c5 fix sql command in calendar's share lib 2012-03-26 09:48:58 +02:00
Thomas Tanghus 102cf150b3 Fixed error in OC_Contacts_VCard::addFromDAVData as pointed out by Guillaume ZITTA 2012-03-26 02:04:34 +02:00
Georg Ehrke ec40f69c9e add error 403 site 2012-03-25 14:16:39 +02:00
Georg Ehrke ac0c5ba6da Merge branch 'master' into sabredav_1.6 2012-03-25 14:02:40 +02:00
Georg Ehrke 19c101a660 fix merge conflicts 2012-03-25 14:02:02 +02:00
Michael Gapczynski 34c08b3165 Add test for Google Docs storage backend, tester needs to token and token secret to config 2012-03-24 15:46:28 -04:00
Michael Gapczynski d139e3c3cd Move Google Docs storage backend to files_remote app 2012-03-24 15:28:05 -04:00
Bartek Przybylski c23090b43c spaces to tabs in bookmarks 2012-03-24 19:55:44 +01:00
Bartek Przybylski a3125f164e bookmarks tag placement & list width fix 2012-03-24 19:55:43 +01:00
Michael Gapczynski 26fcb35a89 Implement fopen() for Google Docs storage backend 2012-03-24 14:50:17 -04:00
Bartek Przybylski 826cb2c650 fix sharing address construction in opera and firefox 2012-03-24 19:26:53 +01:00
Bartek Przybylski be60b451eb fix albums thumbnails preview for opera 2012-03-24 19:21:36 +01:00
Bartek Przybylski afcf965498 fixup: sharing gallery for loggedin users fail 2012-03-24 18:40:27 +01:00
Bartek Przybylski cbdcb68c2b gallery sharing, experimental version 2012-03-24 18:35:42 +01:00
Robin Appelman e0cbefc727 webdav storage backend 2012-03-23 18:55:26 +01:00
Robin Appelman 109d806617 make sure we can load OC_Config when we need it 2012-03-23 18:55:26 +01:00
Georg Ehrke 0e11cc9f6f fix previous made bug and fix oc bug - oc-139 2012-03-23 17:27:52 +01:00
Georg Ehrke ac8362e34a check if the title of an event is null - bugfix for oc-139 2012-03-23 17:09:51 +01:00
Georg Ehrke b63b377c4d Bookmarks: make link text click clickable too - bugfix for oc-131 2012-03-23 16:58:48 +01:00
Georg Ehrke 45b320d674 use unnamed as title for a bookmark if no title was entered and curl fails 2012-03-23 16:54:15 +01:00
Frank Karlitschek 7cad6ccce0 don´t show ugly error message 2012-03-23 16:48:16 +01:00
Frank Karlitschek a191b75c31 make it possible to connect to other ocs appstores and other ocs knowledgebase servers.
also make it possible to switch the app store and the knowledgebase off completely.
2012-03-23 15:52:41 +01:00
Nils Jansen 7ed8f39744 as preperation for the sgf viewer app i added a file icon for .sgf files (saved go games), and an according mimetype. 2012-03-23 13:34:07 +01:00
Georg Ehrke 37963fee28 Merge branch 'master' into calendar_sharing 2012-03-22 20:40:20 +01:00
Georg Ehrke 8e8c4a8edc Merge branch 'master' into sabredav_1.6 2012-03-22 20:40:04 +01:00
Robin Appelman 82b54938e3 ftp storage backend 2012-03-22 19:56:19 +01:00
Robin Appelman 0a93d4eccf loosen tests for mtime and ctime a bit 2012-03-22 19:54:24 +01:00
Georg Ehrke 5b03de9a66 fix comments in crypt lib 2012-03-21 17:43:09 +01:00
Tom Needham 892343c7c1 Fix instance import 2012-03-21 16:30:59 +00:00
Arthur Schiwon d91bc9b317 use placeholder in template file 2012-03-21 13:10:02 +01:00
Arthur Schiwon 7c815054c7 Config file is more appropriate here
adjust default value
2012-03-21 13:05:15 +01:00
Georg Ehrke 61166c1002 Merge branch 'master' into calendar_sharing 2012-03-21 09:43:29 +01:00
Georg Ehrke 8f8d486f35 Merge branch 'master' into sabredav_1.6 2012-03-21 09:42:53 +01:00
Tom Needham 07d7138df0 Register admin pane 2012-03-20 20:34:20 +00:00
Tom Needham 0fa5e196ef Try to use old uid when importing 2012-03-20 20:32:01 +00:00
Tom Needham 514c9ad8e7 Added unified import method. 2012-03-20 20:19:21 +00:00
Georg Ehrke 19bbb61b20 fix spelling fail in texteditor's style.css 2012-03-20 19:48:08 +01:00
Georg Ehrke 89c39b47bc add microsoft office mimetypes to the fixlist - bugfix for oc-357 2012-03-20 18:46:56 +01:00
Bart Visscher 632b3cbbbb Cleanup the template code for redundant code 2012-03-19 21:56:55 +01:00
Bart Visscher 3d8a09b147 Split the init function in lib/base.php a bit 2012-03-19 21:56:55 +01:00
Tom Needham 145d6f3566 Add OC_Migration_Content class to help app devs. Restructure OC_Migrate. 2012-03-19 20:44:20 +00:00
Georg Ehrke fa104fee17 fix mimetype detection 2012-03-19 12:42:33 +01:00
Arthur Schiwon b13ab2b17e enable admin to turn off ZIP downloads
user interface offers multi-file/folder downloads only if available

make function name more clear
2012-03-19 11:56:02 +01:00
Georg Ehrke 194211500b register text/x-vcard as a fileaction for vcard import 2012-03-19 09:58:44 +01:00
Georg Ehrke 9848bc33e5 Merge branch 'master' into sabredav_1.6 2012-03-19 09:14:15 +01:00
Georg Ehrke 03120959e9 add a proper email address for lostpassword service - bugfix for oc-178 2012-03-19 09:09:18 +01:00
Georg Ehrke 33b06c4484 Merge branch 'master' into sabredav_1.6 2012-03-19 08:33:36 +01:00
Georg Ehrke ddb7197c9c Merge branch 'master' into calendar_sharing 2012-03-18 00:53:02 +01:00
Bartek Przybylski de09883d86 creating and retrive thumbnails for intermediate galleries 2012-03-17 23:41:10 +01:00
Simon Birnbach b1a33110fc Added global progressbar for all uploads 2012-03-17 22:20:39 +01:00
Tom Needham 77f6872ea4 Shorten export zip names 2012-03-17 17:45:39 +00:00
Tom Needham bc085c3ff4 Create new user, create new data dir, copy files, import app data 2012-03-17 16:25:14 +00:00
Tom Needham 247b25e7a9 Fix structure of export zip 2012-03-17 15:01:08 +00:00
Tom Needham 5234e66bab Add exportinfo to user exports. 2012-03-17 13:53:00 +00:00
Tom Needham 27bf34f7be Move user import to the admin 2012-03-17 13:30:58 +00:00
Georg Ehrke eaa1074ccb Merge branch 'master' into calendar_sharing 2012-03-17 13:59:00 +01:00
Simon Birnbach 38072e1900 Fixed upload of undeleted file and size information 2012-03-17 13:56:33 +01:00
Tom Needham 7ba8dbb920 Don't truncate users email 2012-03-17 12:51:11 +00:00
Tom Needham 122f7e4c2f Dont truncate the time format 2012-03-17 12:41:16 +00:00
Bartek Przybylski 8e22823501 bredcrumb fix 2012-03-17 13:30:45 +01:00
Georg Ehrke de49652536 Merge branch 'master' into calendar_sharing 2012-03-17 00:00:04 +01:00
Tom Needham 222bb2303f Added prototype of user import 2012-03-16 22:54:37 +00:00
Tom Needham 5332c319a2 Migration info is an object. Other fixes 2012-03-16 22:50:35 +00:00
Tom Needham c442a06a02 Fix export for admin and users. Added 3 admin export types 2012-03-16 21:09:36 +00:00
Simon Birnbach 9377b75350 Support for legacy browsers 2012-03-16 19:58:28 +01:00
Arthur Schiwon 3267d91bda it may take time for zip file download, so give a message 2012-03-16 16:25:41 +01:00
Arthur Schiwon a77edf88c6 check if selected files for zip archive are not too large
offer config option
2012-03-16 16:25:15 +01:00
Arthur Schiwon cfc41942e4 make Files settings work 2012-03-16 16:00:12 +01:00
Georg Ehrke 27218f85cb Merge branch 'master' into calendar_sharing 2012-03-16 12:17:58 +01:00
Simon Birnbach b949619d04 coding guidelines 2012-03-16 00:11:50 +01:00
Simon Birnbach 45c9f1978e Initial version of drag&drop file upload support 2012-03-16 00:03:23 +01:00
Tom Needham 50233d075c Improve admin_export ui and move system export cde to OC_Migrate 2012-03-15 20:52:43 +00:00
Bartek Przybylski 0fadbee699 fix adding photo to incorrect gallery 2012-03-15 00:09:06 +01:00
Bartek Przybylski 193e93e4a9 creating intermediate galleries 2012-03-14 22:28:55 +01:00
Tom Needham c9be325af2 Fix zip creation. Add param to cleanUp() method. Add defaults to createExportFile() method. 2012-03-14 16:43:06 +00:00
Tom Needham a310a81053 move zip creation inside OC_Migrate 2012-03-13 23:09:43 +00:00
Tom Needham 5a50144a16 typo :/ 2012-03-13 21:29:31 +00:00
Tom Needham fa8b66ca4f Add getApps() method to return apps supporting migration 2012-03-13 21:28:53 +00:00
Tom Needham a919a136c4 Finish import function for bookmarks 2012-03-13 21:24:07 +00:00
Tom Needham cd2f75fdad Use data dir from config.php 2012-03-13 17:27:47 +00:00
Tom Needham 0f3eebbbd9 added cleanUp() method to OC_Migrate 2012-03-13 17:18:42 +00:00
Tom Needham 7e3b35a57c fix structure of user export zip 2012-03-13 17:08:20 +00:00
Tom Needham 111af7fed5 json encode the output 2012-03-13 17:04:49 +00:00
Tom Needham 4d5646a59f Find migrate.php even for disabled apps. Improve ui for user and admin migrations 2012-03-13 16:21:17 +00:00
Thomas Tanghus 4a91c6dbed Make PHOTO deletable. 2012-03-13 14:56:03 +01:00
Thomas Tanghus 9e83f0247f Added sync path for iOS/OS X. 2012-03-13 14:28:38 +01:00
Thomas Tanghus 6b01d7be9a Fixed NOTE property UI. 2012-03-13 02:55:17 +01:00
Thomas Tanghus dd0daa6e33 Cleanup in Contacts. 2012-03-13 00:55:15 +01:00
Tom Needham d108bdc7c7 Improved import function. Added param to connectDB() to load the db from the import 2012-03-12 21:41:32 +00:00
Thomas Tanghus 551b4443e1 Force load profile pic after edit hack. 2012-03-12 21:56:28 +01:00
Thomas Tanghus 60fe9dda5d Remember categories when they have changed. 2012-03-12 21:55:54 +01:00
Tom Needham 1cdb4396a4 Fix copyRows() return value. Generate app info and oc info on return 2012-03-12 18:40:14 +00:00
Thomas Tanghus 3efa5f17f2 Rename... 2012-03-12 16:47:29 +01:00
Thomas Tanghus c55d2af6b3 More modifications for using jquery.multiple_autocomplete. 2012-03-12 16:44:16 +01:00
Thomas Tanghus 2b8125f4ba Small fix to jquery.multiple_autocomplete. 2012-03-12 15:30:52 +01:00
Thomas Tanghus d36d317bb2 Contacts: Modifications for using categories. 2012-03-12 14:13:03 +01:00
Thomas Tanghus 03eb5197b6 Added category editor for apps using OC_VObjects. 2012-03-12 14:13:03 +01:00
Tom Needham 9c032ecc33 Fix return value of export 2012-03-11 22:20:01 +00:00
Tom Needham a2d7e9c6e8 Merge returns from insertData() 2012-03-11 22:13:50 +00:00
Tom Needham fa5a5649c6 Fix copyRows() and sqlite connection 2012-03-11 22:09:16 +00:00
Robin Appelman a85a10b378 oc_db isn't pdo 2012-03-11 21:48:52 +01:00
Bartek Przybylski 618f92b3fb fix thumbnail generation 2012-03-11 20:00:50 +01:00
Bartek Przybylski d5959872e1 disabling file handlers in gallery for now 2012-03-11 19:17:51 +01:00
Bartek Przybylski 4b8ff4d910 media scanner fix 2012-03-11 17:29:21 +01:00
Bartek Przybylski f6075cc1fe gallery migration to events system 2012-03-11 16:49:42 +01:00
Tom Needham 92221e98de spaces to tabs 2012-03-11 12:03:41 +00:00
Tom Needham d712d7f52c Lots of fixes, improve copyRows() method and update settings page. 2012-03-10 18:18:58 +00:00
Tom Needham 3ca76d24a9 Add OC_Migrate::copyRows() method 2012-03-10 15:52:38 +00:00
Tom Needham dc3dd272f7 Text editor will now wrap text based on window size 2012-03-10 14:32:57 +00:00
Tom Needham 1aaf008020 fix character encoding bug oc-278 2012-03-10 14:06:30 +00:00
Tom Needham 3f507898d0 update file extensions in editor 2012-03-10 14:00:57 +00:00
Tom Needham c3dfcc5b21 First basic implementation of migration.db. 2012-03-09 23:33:11 +00:00
Bartek Przybylski b4ffaa9498 spaces to tabs replacement 2012-03-09 16:47:53 +01:00
Bartek Przybylski ca9b4e467f filescan by mimetype scan 2012-03-09 16:45:57 +01:00
Bartek Przybylski 84d6c53970 filecache search comparition fix 2012-03-09 16:28:26 +01:00
Thomas Tanghus 2582fe1c89 Yet a missing file :-P 2012-03-09 13:56:20 +01:00
Thomas Tanghus 98bf8cfeb6 Added missing template. 2012-03-09 12:11:52 +01:00
Thomas Tanghus 2cbd281637 Merge branch 'vcategories' 2012-03-09 10:29:58 +01:00
Thomas Tanghus 8228a554a4 Temporarily disabled multi_autoselect. 2012-03-09 10:29:00 +01:00
Thomas Tanghus bc5d9f5868 Parses malformed N fields a bit more tolerantly. Thanks to nibbler for the patch :-) 2012-03-09 07:39:35 +01:00
Thomas Tanghus 8495e1a63e Add missing file. 2012-03-09 07:39:35 +01:00
Bart Visscher f8b62d49ee Tasks: Ordering of the task list 2012-03-08 22:27:29 +01:00
Bart Visscher d1b2c10422 Tasks: Update task list when adding or updating tasks 2012-03-08 22:26:54 +01:00
Robin Appelman 700a120c22 fix write hook for gallery 2012-03-08 15:47:49 +01:00
Thomas Tanghus a33a62bf60 Merge branch 'vcategories' of gitorious.org:owncloud/owncloud into vcategories
Conflicts:
	apps/contacts/lib/vcard.php
	apps/contacts/templates/part.contact.php
2012-03-08 02:55:48 +01:00
Thomas Tanghus ae7aab2d6e Merge gitorious.org:owncloud/owncloud into vcategories
Conflicts:
	apps/contacts/ajax/saveproperty.php
	apps/contacts/lib/vcard.php
2012-03-07 23:38:44 +01:00
Thomas Tanghus 91d85e9b16 Use OC.dialogs. 2012-03-07 22:57:37 +01:00
Bart Visscher 340320625e Contacts: Add UI for categories 2012-03-07 21:50:55 +01:00
Bart Visscher 9908adb320 Merge branch 'master' into vcategories
Conflicts:
	apps/contacts/lib/vcard.php
2012-03-07 21:49:46 +01:00
Bart Visscher d8cfe77ba5 Contacts: small fixes and cleanups 2012-03-07 21:46:42 +01:00
Bart Visscher 9599548203 Contacts: change card parameter type of VCard::edit and VCard::add
changed to OC_VObject
2012-03-07 21:46:42 +01:00
Bart Visscher ab760578f8 Allow overflow of rightcontent area 2012-03-07 21:46:42 +01:00
Bart Visscher 97ab706a6a Contacts: No random token for contactphoto 2012-03-07 21:46:42 +01:00
Bart Visscher 46aa011ef9 Contacts: Add Organisation as Name property choice 2012-03-07 21:46:41 +01:00
Bart Visscher 9ccf46d350 Contacts: convert class attribute selectors to class selectors 2012-03-07 21:46:41 +01:00
Robin Appelman 018f0c4b72 add option to add file from url 2012-03-07 21:43:44 +01:00
Thomas Tanghus 57c4d39b1e Fix conflict. 2012-03-07 20:57:05 +01:00
Robin Appelman cf5d63f0ab some js cleanup for gallary
also tabs no spaces
2012-03-07 18:58:10 +01:00
Robin Appelman d8d2939668 dont use numRows and fix some of the gallary hooks 2012-03-07 17:31:01 +01:00
Thomas Tanghus 75323b86d1 Contacts: UI updates and ajax methods for categories. 2012-03-07 16:39:56 +01:00
Robin Appelman 1d88ab57ec dont open the album when clicking the remove/rename button 2012-03-07 16:28:57 +01:00
Robin Appelman 41817db2e2 no rounded borders for album decoration 2012-03-07 16:27:51 +01:00
Robin Appelman a4543175ce make gallary work with archives 2012-03-07 16:24:49 +01:00
Robin Appelman 9f01533710 fix for webdav when having additional storage backends mounted 2012-03-07 15:44:46 +01:00
rok fb88bdba69 Ability to save an arbitrary number of external sites 2012-03-07 14:59:19 +01:00
Bartek Przybylski 0a78849391 multilevel gallery 2012-03-04 18:28:41 +01:00
Georg Ehrke c40668e3a9 Merge branch 'master' into calendar_sharing 2012-03-04 10:10:19 +01:00
Bartek Przybylski c411826fe5 moving gallery op to one file, migrate gallery dialogs to oc dialogs 2012-03-04 00:35:37 +01:00
Robin Appelman f06858689f revert an accidental change 2012-03-03 22:12:17 +01:00
Robin Appelman af214d9dcd change gallary scanning to support gallaries inside archives 2012-03-03 22:04:34 +01:00
Robin Appelman a5df3f8ea7 allow transparent opening of zip files from the web interface 2012-03-03 21:23:35 +01:00
Robin Appelman 72947e46d1 small improvement for is_dir 2012-03-03 21:23:35 +01:00
Robin Appelman bb97cbbb0c fix commong filestorage for files without extention 2012-03-03 21:23:35 +01:00
Robin Appelman 0f54084305 also delete childs of folders from the cache 2012-03-03 21:23:35 +01:00
Robin Appelman 2e365658c8 better handeling of files that can behave like folder (e.g. archives) 2012-03-03 21:23:35 +01:00
Tom Needham 691103acd5 Use json for migration data 2012-03-03 17:30:21 +00:00
Tom Needham 34f05ba180 Udpdate bookmarks migration provider. App version included in export. 2012-03-03 14:35:17 +00:00
Georg Ehrke f2dcab50b5 fix merge conflicts 2012-03-03 15:06:51 +01:00
Georg Ehrke 4c45483ad3 make calendar compatible with php 5.2 - works for me with PHP 5.2.12 2012-03-03 14:30:52 +01:00
Tom Needham 188a304625 Replace db on import. Update user_migration export function. 2012-03-03 13:26:01 +00:00
Tom Needham 6906988b4e Update bookmarks migration provider. 2012-03-03 13:22:45 +00:00
Robin Appelman 23b64cd9ce remove the archive after a testcase is done 2012-03-03 01:37:00 +01:00
Robin Appelman 042878a5a9 add archive library and a storage provider on top of the archive library
only zip backend is implemented atm
2012-03-03 00:57:52 +01:00
Robin Appelman c609b30841 fix the filestorage test a bit 2012-03-03 00:57:52 +01:00
Robin Appelman 1794ad353d fix file_get_content on empty files for filestorage common 2012-03-03 00:57:52 +01:00
Tom Needham 86fed4c226 Update database.xml locations. Fix dbexport.xml. 2012-03-02 22:19:06 +00:00
Tom Needham 8188a9f51b change <create> value in db export 2012-03-02 21:54:44 +00:00
Tom Needham 9c79de4aa0 removed duplicate function 2012-03-02 21:47:20 +00:00
Tom Needham 45ef2ecf52 Fix merge conflict 2012-03-02 21:35:48 +00:00
Jakob Sack 3e84f170e7 The tables "principals" and "principalgroups" are obsolete 2012-03-02 21:07:37 +01:00
Jakob Sack 1865659ce1 Fix missing bracket 2012-03-02 21:01:44 +01:00
Jakob Sack 90e2962c91 Remove the link between the principals table and the sabre principals connector. 2012-03-02 20:37:49 +01:00
Jakob Sack 503e5cada3 Add /dav.php, a single location bundling all *DAV-operations. 2012-03-02 20:25:20 +01:00
Robin Appelman 48fe85d9bd add streamwrapper that provides a callback on stream close 2012-03-02 18:42:57 +01:00
Robin Appelman e8afe4f158 add search implementation to filestorage common 2012-03-02 18:42:57 +01:00
Robin Appelman 4daedda35a only test enabled apps 2012-03-02 18:42:57 +01:00
Robin Appelman b621431c11 don't try to seach apps in hidden folders 2012-03-02 18:42:57 +01:00
Robin Appelman 3b9ce95fc3 allow apps to ship test cases 2012-03-02 18:42:57 +01:00
Bart Visscher d1dcd7893c Search: Change provider registration to class name, for lazy loading of search providers 2012-03-01 22:59:35 +01:00
Bart Visscher 8c7b13db70 Files: Fix wrong attribute name in OC_Search_Provider_File 2012-03-01 22:59:35 +01:00
Bart Visscher 3d3190309f Simplify stripping the last part off WEBROOT and SERVERROOT for 3rdparty and app dir 2012-03-01 22:59:35 +01:00
Michiel de Jong 1471d8f710 remoteStorage app version 0.5 2012-03-01 20:58:14 +00:00
Michiel de Jong e10402c61b remoteStorage app version 0.5 2012-03-01 20:55:20 +00:00
Michiel de Jong 5d8d7ef2a1 remoteStorage app version 0.5 2012-03-01 20:55:12 +00:00
Bart Visscher 5dcd9e20d0 Small cleanups 2012-03-01 21:00:23 +01:00
Bart Visscher ec2f49833d Calendar: Don't request edit form for readonly events 2012-03-01 21:00:23 +01:00
Bart Visscher f914cd0144 Implement showing Birthdays of contacts in the calendar 2012-03-01 21:00:22 +01:00
Bart Visscher fe3bcb5fe2 Calendar: fix bug in creating DTEND from DTSTART 2012-03-01 21:00:22 +01:00
Bart Visscher 642ccd27ab Bookmarks: fix loading and displaying of the bookmarks 2012-03-01 20:57:11 +01:00
Tom Needham 33c5b3a2ef Added replaceDB method in lib/db.php 2012-03-01 19:41:14 +00:00
Robin Appelman 6ecbaf0041 load streamwrappers earlier 2012-03-01 18:44:33 +01:00
Frank Karlitschek 0b4607321f Merge branch 'master' of gitorious.org:owncloud/owncloud 2012-03-01 15:21:12 +01:00
Frank Karlitschek d29a02a65a undo the change of the webroot detection. seams to be buggy 2012-03-01 15:19:44 +01:00
Arthur Schiwon fa6ad6ba68 LDAP: set also quota, when there is no explicit default value 2012-03-01 14:31:06 +01:00
Arthur Schiwon b192f86d84 LDPA: fix setting variables and add missing ones to the array 2012-03-01 14:21:38 +01:00
Arthur Schiwon eb8ffd9315 LDAP fix: set user quota, if attribute is provided 2012-03-01 14:18:28 +01:00
Robin Appelman f193e474c1 add test cases for stat and touch 2012-02-29 23:47:53 +01:00
Robin Appelman e76e4e7540 add touch() to all storage backands, and make parameter optional 2012-02-29 23:44:05 +01:00
Robin Appelman b23b5aae7f remove debug output 2012-02-29 23:17:49 +01:00
Michael Gapczynski baffa03fa5 Fix opendir for folders aka Google Docs collections 2012-02-29 13:18:33 -05:00
Arthur Schiwon f040ce044c consider changed/new setting variables for user_ldap 2012-02-29 13:03:44 +01:00
Arthur Schiwon 3c72a7c934 make ldap settings a little bit less ugly 2012-02-29 12:57:11 +01:00
Michael Gapczynski 02f15e9a03 More work on Google Docs storage backend 2012-02-28 19:16:52 -05:00
Bartek Przybylski 2754cac21f dialogs library for apps 2012-02-28 23:02:30 +01:00
Arthur Schiwon ea15c17149 typo in function call 2012-02-28 21:04:56 +01:00
Frank Karlitschek 0a9b0ee382 change the detection of the webroot. it is simpler now and also works for app directories outside the owncloud folder. works for me and hopefully for everybody else too 2012-02-28 18:21:23 +01:00
Robin Appelman a829ce69c5 make sure the streamwrappers are registered early 2012-02-28 17:25:15 +01:00
Frank Karlitschek 5e9d268c21 never try to load an non existing template,css,img.
do propper checking, error reporting and motivate the developerto fix it ;-)
2012-02-28 16:14:12 +01:00
Arthur Schiwon de642697bb make LDAP filter for user list configurable 2012-02-28 14:12:53 +01:00
Robin Appelman d1c3aa3112 add test case for getLocalFile 2012-02-28 12:06:34 +01:00
Robin Appelman de37bafa5c use in-memory files for the datase scheme during installation 2012-02-28 11:39:39 +01:00
Robin Appelman 3e0bb3e7c4 use temporary file managment 2012-02-28 11:33:59 +01:00
Robin Appelman a76ff563d6 fix temporary file creation 2012-02-28 11:32:45 +01:00
Robin Appelman 7ec1c0703d fix testcase runner 2012-02-28 11:16:58 +01:00
Robin Appelman 273d7fb4fd fix copy/paste error in common filestorage 2012-02-28 11:16:41 +01:00
Robin Appelman 77b51f03e3 add temporary file managment 2012-02-28 11:16:19 +01:00
Alessandro Cosentino 76d7ce4b52 Merge branch 'master' of git://gitorious.org/owncloud/owncloud 2012-02-27 18:24:45 -05:00
Alessandro Cosentino 630cee0ef2 bookmarklets should not look like buttons 2012-02-27 18:20:40 -05:00
Michael Gapczynski d190ebee48 Initial work on Google Docs storage backend 2012-02-27 15:00:17 -05:00
Frank Karlitschek 5943af17e7 spaces -> tabs
Thanks to Jakob for reminding me
2012-02-27 18:01:43 +01:00
Robin Appelman 63a088c2b1 more tests for filestorage 2012-02-27 12:20:47 +01:00
Robin Appelman d8d4420f22 some cleanup in filestorage 2012-02-27 12:20:37 +01:00
Robin Appelman cef230c141 extend filestorage common and provide test implementation 2012-02-27 12:04:42 +01:00
Robin Appelman 4eb9a69bd8 fix test case for filestorage
file storage no longer needs to implement file_put_contents for streams
2012-02-27 12:01:06 +01:00
Robin Appelman e2721fc93c make OC_FileStorage abstract 2012-02-27 11:28:11 +01:00
Robin Appelman 5eca0e4f29 remove accidendally added file 2012-02-26 23:31:09 +01:00
Roland van Laar 2a351f4456 Fixed off by one bug. List length is 1 larger than the index of the last
element.
2012-02-26 22:09:21 +01:00
Georg Ehrke aae0d990ca fix baseUri of the Carddav server 2012-02-26 21:46:20 +01:00
Georg Ehrke 089c24e650 fix baseUri of the Caldav server 2012-02-26 21:44:35 +01:00
Georg Ehrke 8c09330959 add missing parameter to addEventListener function - bugfix for oc-225 2012-02-26 21:29:52 +01:00
Georg Ehrke 04c9cc6034 give users the possibility to choose between monday and sunday as first day of the week 2012-02-26 21:23:20 +01:00
Frank Karlitschek a501d4b61e change back to 32bit. autoincrement doesn´t work with sqlite otherwise 2012-02-26 19:13:14 +01:00
Frank Karlitschek ab96fa67c8 first part of the abstraction work of the apps folder. more to come 2012-02-26 18:26:41 +01:00
Robin Appelman 8148480cfe dont enable encryption on default 2012-02-26 16:49:57 +01:00
Robin Appelman 01fcc080bb dont set the encryption flag for existing non-encrypted files 2012-02-26 15:56:47 +01:00
Robin Appelman 857535403c add more valid fopen modes 2012-02-26 15:32:58 +01:00
Robin Appelman ff0a542e48 always set encrypted flag when overwriting a file we should encrypt 2012-02-26 15:32:45 +01:00
Robin Appelman d4d09b06f8 merge master into encryption 2012-02-26 14:21:06 +01:00
Robin Appelman 3d0d47957e improved humanFileSize for js 2012-02-26 14:12:50 +01:00
Robin Appelman 62cd89da14 improved password hashing based one phpass
old passwords are automatically upgraded on login
2012-02-26 14:12:50 +01:00
Georg Ehrke 89865cb8a0 stop using 3rdparty services for timezone detection 2012-02-26 13:45:51 +01:00
Georg Ehrke 92c7b2717d add OC_Geo class 2012-02-26 13:45:20 +01:00
Robin Appelman 6c501f90bb hopefully a fix for webroot detection 2012-02-26 04:09:48 +01:00
Robin Appelman 0af31a5328 missed one is_writeable 2012-02-26 03:56:45 +01:00
Robin Appelman c8c3b8a63e chunked implementation for readfile
prevents memory issues when downloading large files
2012-02-26 03:54:21 +01:00
Robin Appelman 0b19af5e10 application/ogg is music to 2012-02-26 03:42:48 +01:00
Robin Appelman fe0832746b intval() of a number seems unnecessary
and it could cause 32bit integer overflow issues
2012-02-26 03:31:04 +01:00
Robin Appelman ff9111847f additional error codes for file upload 2012-02-26 03:24:00 +01:00
Robin Appelman a5e892505e more robust png fallback 2012-02-26 03:10:29 +01:00
Robin Appelman 797e921b9a improve log browsing 2012-02-26 03:10:29 +01:00
Michiel de Jong a7d7597d55 fix type error in dir creation for categories 2012-02-25 23:15:31 +00:00
Michiel de Jong 42735429da bump up version and update license 2012-02-25 22:03:14 +00:00
Michiel de Jong 28650191c3 bump up version and update license 2012-02-25 22:01:04 +00:00
Michiel de Jong 820f2f27f6 security hardening in remoteStorage app 2012-02-25 21:59:58 +00:00
Michiel de Jong a1d03de666 Merge branch 'master' of gitorious.org:owncloud/owncloud 2012-02-25 21:58:59 +00:00
Bartek Przybylski 8fe5251029 unicode chars in gallery name fix 2012-02-25 20:38:22 +01:00
Robin Appelman 4f627c428e some more error reporting during filesystem scan 2012-02-25 20:27:16 +01:00
Georg Ehrke bfb67286c8 fix merge conflicts 2012-02-25 16:54:27 +01:00
Robin Appelman dda79a90cf don't limit ourselfs to 32bit integers 2012-02-25 16:51:59 +01:00
Robin Appelman ea8f71a19c Merge branch 'master' into encryption 2012-02-25 16:36:58 +01:00
Robin Appelman 8b93a9a237 add javascript bindings for OC_AppConfig 2012-02-25 16:35:40 +01:00
Robin Appelman 862f824d64 some multiselect improvements 2012-02-25 16:35:40 +01:00
Georg Ehrke 097ce76fc4 Merge branch 'master' into sabredav_1.6 2012-02-25 16:29:32 +01:00
Georg Ehrke 0d2f1688e4 add empty methods updatePrincipal and searchPrincipals and change method getPrincipalByPath to work with sabredav 1.6 2012-02-25 16:26:47 +01:00
Bartek Przybylski 3cf81cadd5 gallery thumbnail creation fix 2012-02-25 10:03:58 +01:00
Georg Ehrke cc15852386 replace Sabre_DAV_Exception_FileNotFound with Sabre_DAV_Exception_NotFound 2012-02-25 09:35:35 +01:00
Robin Appelman 7988541476 cleanup pdfviewer app name 2012-02-24 23:54:38 +01:00
Robin Appelman 66f4f06dd9 if a deleted file is uploaded, finish the delete first
otherwise the upload will fail because the file still exists on the server, the old file will be deleted and neither the old or new file will be left
2012-02-24 23:54:38 +01:00
Robin Appelman 11cb45bd43 slight change to select style 2012-02-24 23:54:38 +01:00
Robin Appelman 9dcf29ff51 fix bug in group mangement 2012-02-24 23:54:38 +01:00
Robin Appelman 0d3181b6d1 add configure option for default quota 2012-02-24 23:54:38 +01:00
Robin Appelman 4230e217af new config widget for user quota 2012-02-24 23:54:38 +01:00
Robin Appelman 9f5bce81b0 add a default user quota 2012-02-24 23:54:38 +01:00
Robin Appelman e039015ca1 prevent errors when a user backends gives an invalid result 2012-02-24 23:54:38 +01:00
Georg Ehrke 1d1dfcbc1a replace Sabre_VObject_Element_DateTime with Sabre_VObject_Property_DateTime 2012-02-24 22:20:40 +01:00
Georg Ehrke e082d473bb Merge branch 'master' into sabredav_1.6 2012-02-24 18:51:38 +01:00
Arthur Schiwon ca874a3ad7 remove limit from configvalue for long config values 2012-02-24 14:18:09 +01:00
Marvin Thomas Rabe 9df193f051 Calendar selection only available if there are more than one. 2012-02-23 22:28:14 +01:00
Marvin Thomas Rabe 7c738a1384 Sharing dropdown width fixed. 2012-02-23 22:28:13 +01:00
Georg Ehrke eae32e05c9 Merge branch 'master' into sabredav_1.6 2012-02-23 22:12:00 +01:00
Georg Ehrke b1fb325d48 rename updatecalendar to update 2012-02-23 22:07:31 +01:00
Georg Ehrke f285790fa1 change links in the event form for the new ajax folders 2012-02-23 22:07:08 +01:00
Georg Ehrke 319e93f7fb change pathes in calendar/templates/* files to make them work with the new folder structure in /calendar/ajax 2012-02-23 22:06:43 +01:00
Georg Ehrke cfa284bfa8 update js files for new ajax pathes 2012-02-23 22:06:16 +01:00
Georg Ehrke 8cd1027214 better var name in changeview.php 2012-02-23 22:00:46 +01:00
Georg Ehrke b7de1850a0 add moved files to clean up ajax folder 2012-02-23 21:58:39 +01:00
Georg Ehrke e188b96596 remove old ajax files 2012-02-23 21:58:01 +01:00
Bart Visscher 8f9c852325 Add filtering on category, priority and location 2012-02-23 21:11:31 +01:00
Marvin Thomas Rabe ce4fe9e7cb Editor fixed. 2012-02-23 20:36:20 +01:00
Bartek Przybylski a02d5d1a3d log typo fix 2012-02-23 19:29:11 +01:00
Georg Ehrke 3e756407a0 check if the tempfile was created successfully 2012-02-23 18:23:09 +01:00
Georg Ehrke 95fe159914 make lib/vobject.php work with sabredav 1.6 2012-02-23 17:20:03 +01:00
Frank Karlitschek a62e109e8c make the location of the 3rdparty folder flexible.
It´s automatically search in the owncloud folder and in the parent folder.
override with an option in config.php is also possible
2012-02-23 15:37:38 +01:00
Marvin Thomas Rabe 196d619689 Little bookmark improvement 2012-02-22 23:58:38 +01:00
Marvin Thomas Rabe 358fd1c024 Changed text 2012-02-22 23:53:54 +01:00
Marvin Thomas Rabe 77493e8d70 Changed bookmarklet to read later widget 2012-02-22 23:52:56 +01:00
Marvin Thomas Rabe 996e6cf419 No bookmarks message will now show up if all bookmarks are delted 2012-02-22 23:28:36 +01:00
Marvin Thomas Rabe 3988ec2813 Updated bookmark form 2012-02-22 23:22:17 +01:00
Marvin Thomas Rabe 5387820a3b changed look of bookmarklet 2012-02-22 23:08:50 +01:00
Alessandro Cosentino 70f9936651 sharing code between the two bookmarklets 2012-02-22 16:38:05 -05:00
Robin Appelman 814bc2fd2b make encryption filetype blacklist configurable 2012-02-22 22:20:46 +01:00
Robin Appelman 2e05bd69f5 add javascript bindings for OC_AppConfig 2012-02-22 22:20:11 +01:00
Bart Visscher c768751c23 Display more information in the task list 2012-02-22 22:06:06 +01:00
Robin Appelman 8bfc73c188 some multiselect improvements 2012-02-22 21:38:15 +01:00
Bart Visscher f3ebd29661 Fix updating task for new calendar API 2012-02-22 21:15:57 +01:00
Bart Visscher 18bac944b4 Change loading of tasks to ajax call 2012-02-22 20:21:27 +01:00
Bart Visscher 92db4f8be0 Update edittaskform for new calendar API 2012-02-22 20:12:54 +01:00
Bart Visscher 7f754c02f3 Change code from using OC_Tasks_VTodo to OC_Tasks_App 2012-02-22 20:11:38 +01:00
Michiel de Jong 3f87c2cedb correct header Content-Type: application/xrd+xml 2012-02-22 19:05:41 +00:00
Michiel de Jong 9850820b42 BearerAuth and multiple tokens support in remoteStorage app 2012-02-22 18:05:52 +00:00
Michiel de Jong 6c6b570ff1 avoid notice in error log from user_webfinger app 2012-02-22 18:04:21 +00:00
Marvin Thomas Rabe fd72f2bd29 Removed redundant code. 2012-02-22 16:04:32 +01:00
Marvin Thomas Rabe e2d6bf4c63 Bookmarklet Window closes itself after submit. 2012-02-22 16:04:32 +01:00
Marvin Thomas Rabe d9914664f6 Text editor display error fixed. 2012-02-22 16:04:31 +01:00
Marvin Thomas Rabe b3f3b8c23f UI problems solved. Bookmarks app updated. 2012-02-22 16:04:31 +01:00
Robin Appelman ed0c99ef14 make sure we always have the encryption key unlocked 2012-02-22 15:18:22 +01:00
Robin Appelman 1a9ded981b Merge branch 'master' into enc 2012-02-22 14:26:52 +01:00
Thomas Tanghus faf6055baa Translate and fix copy/paste error. 2012-02-22 14:19:23 +01:00
Bart Visscher 499ec15c26 Add icon for tasks app 2012-02-22 13:32:04 +01:00
Bart Visscher 4af22bfb7a Merge branch 'master' into tasks 2012-02-22 11:56:24 +01:00
Georg Ehrke 9460c9e907 remove old import.php 2012-02-22 11:53:28 +01:00
Thomas Tanghus 9794e7e427 Fix merge conflict. 2012-02-22 11:20:57 +01:00
Georg Ehrke cff0ac2bf9 better permission check in resize.php 2012-02-22 10:42:33 +01:00
Georg Ehrke 0ae088a50a add getowner function to OC_Calendar_Object 2012-02-22 10:42:01 +01:00
Georg Ehrke 48f42176cd add is_editing_allowed function to OC_Calendar_Share 2012-02-22 10:41:16 +01:00
Georg Ehrke d20b8399c3 clean up sql commands in OC_Calendar_Share 2012-02-22 10:20:58 +01:00
Thomas Tanghus c5c843bfef Improved upgrading VCARD v. 2.1 => 3.0. Improved import of malformed cards. Remove duplicate code. 2012-02-21 23:22:06 +01:00
Thomas Tanghus e0c92662f8 JS fix on address book creation. 2012-02-21 23:22:06 +01:00
Thomas Tanghus a79f5d40de Remove my FIXME comments when I've fixed it :-P 2012-02-21 23:22:06 +01:00
Robin Appelman c20319d377 fix incorrect information in the filecache when using encryption 2012-02-21 20:48:49 +01:00
Robin Appelman d9c7e4c333 proper mimetypes for encrypted files 2012-02-21 20:48:48 +01:00
Robin Appelman 325858e9e2 add stream wrapper for in-memory files and dont use global variables for the fakedir stream wrapper 2012-02-21 20:48:48 +01:00
Robin Appelman c121a1a1e7 implement file_put_contents with stream data using fopen 2012-02-21 20:48:48 +01:00
Robin Appelman 6a8364c3ff rework the way file_put_contents is handeled 2012-02-21 20:48:48 +01:00
Robin Appelman 95459d068e non existing files can never be updated 2012-02-21 20:48:48 +01:00
Robin Appelman 1cffeefa06 move implementation of from/toTmpFile from the file storage to the filesystem 2012-02-21 20:48:48 +01:00
Robin Appelman 6658f51098 provide early file system when using webdav 2012-02-21 20:48:48 +01:00
Robin Appelman b3a974d8bb only trigger hooks for the default filesystem view 2012-02-21 20:48:48 +01:00
Robin Appelman 501678f981 always mount the root filesystem, sometimes we need the filesystem when not logged in 2012-02-21 20:48:48 +01:00
Robin Appelman f1cbb9effc initial integration of encryption 2012-02-21 20:48:48 +01:00
Robin Appelman e53e7990c4 improve get_temp_dir() implementation 2012-02-21 20:48:48 +01:00
Robin Appelman fd4b30ac6f no post hooks for fopen 2012-02-21 20:48:48 +01:00
Robin Appelman e9af218562 use streams instead of temporary files for cross-storage copy and rename 2012-02-21 20:48:48 +01:00
Robin Appelman e2b4954176 simple file encryption wip 2012-02-21 20:48:48 +01:00
Robin Appelman 82394f9527 add option to dissable fileproxies 2012-02-21 20:48:47 +01:00
Robin Appelman 3d67cd51c2 encryption proxy wip 2012-02-21 20:48:47 +01:00
Robin Appelman abc749feeb make documentation reflect reality a bit better 2012-02-21 20:48:47 +01:00
Robin Appelman b6ed61eab2 pass paramters to file proxies by reference so they can be modified 2012-02-21 20:48:47 +01:00
Bart Visscher d3e6ea6ac0 Bookmarks: uses the core action icons 2012-02-21 20:28:24 +01:00
Georg Ehrke 3d8d6d718b add 'permissions' as a sql condition in allSharedwithuser 2012-02-21 20:10:52 +01:00
Bart Visscher 86d2927c02 Calendar: Correct calendarcolor format for ical color property 2012-02-21 20:10:40 +01:00
Bart Visscher 987845c312 Move the redirect_url from linkTo function to the checkLoggedIn function 2012-02-21 20:09:24 +01:00
Georg Ehrke 236d2aa5b8 rename updatecalendar to update 2012-02-21 19:42:48 +01:00
Georg Ehrke e227a65f66 Merge remote-tracking branch 'origin/calendar_sharing' into calendar_sharing 2012-02-21 19:36:42 +01:00
Georg Ehrke 70a369e16d change links in the event form for the new ajax folders 2012-02-21 19:16:14 +01:00
Marvin Thomas Rabe 21f8d0992f Added missing files 2012-02-21 18:29:49 +01:00
Alessandro Cosentino 36b7d819e5 restore redirect after checkLoggedIn 2012-02-21 10:22:17 -05:00
Thomas Tanghus be948a9baa Check for empty value in ctor and being conservative about configvalue name ;-) 2012-02-21 09:53:03 +01:00
Thomas Tanghus 7c7031df44 Forgot to assign param. 2012-02-21 00:02:27 +01:00
Thomas Tanghus c691c9d24c Merge branch 'vcategories' of gitorious.org:owncloud/owncloud into vcategories 2012-02-20 23:43:59 +01:00
Thomas Tanghus 7a49c8e59c Merge gitorious.org:owncloud/owncloud into vcategories 2012-02-20 23:42:06 +01:00
Thomas Mueller 6540bda238 some icons for filetypes have been added.
for licensing information please have look at core/img/filetypes/readme-2.txt
2012-02-20 22:33:38 +01:00
Bart Visscher 77ab89a7cb Review changes of OC_VCategory 2012-02-20 22:32:57 +01:00
VicDeo d5f7a39936 Contact list scroll fix 2012-02-20 23:54:23 +03:00
Thomas Tanghus ffdfe8257b Contacts: Fix adding/updating address book with empty name. 2012-02-20 15:24:54 +01:00
Thomas Tanghus 456ada01fa Contacts: Apply strip_tags on compound values. 2012-02-20 14:36:21 +01:00
Thomas Tanghus 12bcbcdc62 Update ctag in deleteFromDAVData. 2012-02-20 14:24:10 +01:00
Thomas Tanghus 8ed4262393 Merge gitorious.org:owncloud/owncloud into vcategories 2012-02-20 13:18:22 +01:00
Thomas Tanghus 430ccef09c Added OC_VCategories::rescan() 2012-02-20 13:16:51 +01:00
Georg Ehrke 0ae2e250f5 change pathes in calendar/templates/* files to make them work with the new folder structure in /calendar/ajax 2012-02-20 11:52:19 +01:00
Georg Ehrke a069d83f44 fix unexspected T-String in calendars index.php 2012-02-20 11:46:10 +01:00
Georg Ehrke ec7ed3c882 add rw and r to events.php 2012-02-20 11:35:19 +01:00
Georg Ehrke 619c62e681 change parameter names for shared calendars 2012-02-20 11:31:41 +01:00
Georg Ehrke 548a2e6263 add readonly calendar to the eventsources 2012-02-20 11:28:20 +01:00
Georg Ehrke 3efa69bc84 update js files for new ajax pathes 2012-02-20 11:27:25 +01:00
Georg Ehrke 1cf7fc261f better var name in changeview.php 2012-02-20 11:26:43 +01:00
Georg Ehrke 8dff0fb58d add moved files to clean up ajax folder 2012-02-20 11:26:22 +01:00
Georg Ehrke ceb0016bdc remove old ajax files 2012-02-20 11:25:42 +01:00
Arthur Schiwon 30d524b426 load apps before logout so that logout-hook works 2012-02-20 11:21:46 +01:00
Arthur Schiwon 7ff4e40b20 Combing LDAP backend with LDAP extended backend 2012-02-20 10:39:55 +01:00
Alessandro Cosentino 490c9db15d Added bookmarklet for browser. Inspired by Google Bookmarks 2012-02-19 20:18:27 -05:00
Thomas Tanghus c62673d360 Added public static OC_VCategories object to OC_Contacts_App.
Parse cards for new categories in add and edit methods.
2012-02-19 23:32:09 +01:00
Florian Pritz 9d2379742b apps/calendar: update ctag after deleteFromDAVData
Without this clients won't see the update because they compare ctags
before fetching the actual calendar to reduce traffic.

Signed-off-by: Florian Pritz <bluewind@xinu.at>
2012-02-19 21:42:47 +01:00
Thomas Tanghus 8a1b671fdd Switch from using separate db table to use OC_Preferences.
There is a limitation in that the the configvalue field in the preferences table is a varchar(255).
2012-02-19 17:00:07 +01:00
Thomas Tanghus adec09b075 Merge gitorious.org:owncloud/owncloud into vcategories 2012-02-19 13:11:13 +01:00
Michael Gapczynski 87627c7a50 Fix overwriting of internal sharing for shared folders - bug oc-260 2012-02-18 19:30:54 -05:00
Tom Needham 71a2241aee Fixed call to OC_User. Thanks Burillo on IRC 2012-02-18 23:53:10 +00:00
Thomas Tanghus 2ee2f87efe Strip tags on address on client side. 2012-02-18 11:49:31 +01:00
Thomas Tanghus 868cf6bb83 Avoid errors from missing GD library. 2012-02-18 11:49:31 +01:00
Thomas Tanghus 96612c506e Removed obsolete commented code and made minor speed improvements.
Added stub function for loading categories.
2012-02-18 11:49:31 +01:00
Thomas Tanghus 71aa36c3f1 ETags must be quoted. 2012-02-18 11:49:31 +01:00
Thomas Tanghus 0203f55fbf Added first draft of OC_VCategories. 2012-02-18 11:45:36 +01:00
Thomas Tanghus a3e58157ee Strip tags on address on client side. 2012-02-18 11:42:58 +01:00
Georg Ehrke d8734cee02 fix sql command 2012-02-18 11:21:07 +01:00
Michael Gapczynski 6f1ed85f0b Temporary fix for sharing files 2012-02-17 21:56:20 -05:00
Bart Visscher 1fa05894d5 Move config.php writable test to update path
This should make it possible to use owncloud with a read-only config.php
2012-02-17 22:10:03 +01:00
Bart Visscher 45cff7b737 Move storing "last updated at" time to the app config
This way the config.php file is not changed every time you go to the
personal page. Step to make it possible to have a read-only config.php
most of the time
2012-02-17 22:10:03 +01:00
Bart Visscher bd7227bb93 Spelling fix hint text 2012-02-17 22:10:02 +01:00
Bart Visscher 6bbd67c3c6 Calendar: only update default view when it really changed 2012-02-17 22:10:02 +01:00
Bart Visscher 539fd7240c Calendar: optimize sending calendar events, also enabled caching of result 2012-02-17 22:09:31 +01:00
Bart Visscher a33b757b19 Calendar: Add default repeat values when editing a non-repeating event 2012-02-17 22:09:22 +01:00
Bart Visscher dab5531474 Bookmarks: Fix image urls in bookmarks.js 2012-02-17 22:07:15 +01:00
Bart Visscher e8b69d45a3 Fixup use of OC_Helper::linkTo function 2012-02-17 22:07:14 +01:00
Bart Visscher f47444e1f7 Use separate function to make absolute urls 2012-02-17 22:07:14 +01:00
Bart Visscher 5f3c549227 Contacts: Add removed app enabled check 2012-02-17 22:07:14 +01:00
Bart Visscher f54c767d72 Fix parameter of OC_Response::sendFile 2012-02-17 22:07:13 +01:00
Bart Visscher bcbebe390b Document OC_Response 2012-02-17 22:07:13 +01:00
Georg Ehrke 011bc1e764 fix unsharing of groups 2012-02-17 21:19:04 +01:00
Thomas Tanghus 6e35d50cbb Avoid errors from missing GD library. 2012-02-17 19:04:12 +01:00
Henning Becker 62da0bae43 Handle event exceptions in calendar app. Execeptions to recurring events are not shown anymore. 2012-02-17 14:32:02 +01:00
Georg Ehrke a3b8d54576 Merge branch 'master' into calendar_sharing 2012-02-17 14:14:53 +01:00
Thomas Tanghus 98b2d2db3d Removed obsolete commented code and made minor speed improvements.
Added stub function for loading categories.
2012-02-17 09:35:18 +01:00
Thomas Tanghus 496c1581d7 ETags must be quoted. 2012-02-16 23:24:23 +01:00
Thomas Tanghus 86893ea78c UI tweaks for name selector combobox. 2012-02-16 10:38:00 +01:00
Thomas Tanghus 0e2531ba57 Added method for loading from file handle. 2012-02-16 10:38:00 +01:00
Thomas Tanghus fa7fabf024 Minor tweaks 2012-02-16 10:38:00 +01:00
Robin Appelman 20553c1afe Revert "remove the 3rdparty files. everything is now in https://gitorious.org/owncloud/3rdparty"
This reverts commit dccdeca258.
2012-02-16 09:44:49 +01:00
Robin Appelman 19827b8b35 Merge branch 'master' of gitorious.org:owncloud/owncloud 2012-02-16 09:42:30 +01:00
Frank Karlitschek dccdeca258 remove the 3rdparty files. everything is now in https://gitorious.org/owncloud/3rdparty 2012-02-15 20:40:37 +01:00
Robin Appelman c2fb5fed02 use cached size for getting the size of a moved file 2012-02-15 14:43:06 +01:00
Tom Needham e6b835bea8 Update breadcrumb css on close 2012-02-14 21:55:51 +00:00
Tom Needham aec6a3c32f Fix editing shared files and file opening bug. Fixes oc-209 and oc-195 2012-02-14 21:49:51 +00:00
Frank Karlitschek 127c0c7033 Merge branch 'master' of gitorious.org:owncloud/owncloud 2012-02-14 16:34:33 +01:00
Frank Karlitschek d53ed4b40b make it possible to override every image and logo with a new version from within a theme. I think we have a very cool theming here. *self-praise* 2012-02-14 16:32:38 +01:00
Thomas Tanghus 31dab0372d Added some fixes for what to show when address books are (de)selected, all contacts deleted etc. Still need some cleaning up. 2012-02-14 13:57:11 +01:00
Thomas Tanghus ae426ad115 Added some check for when addinf deleting contacts. 2012-02-14 10:36:22 +01:00
Klaas Freitag 064f87680b Merge branch 'master' of gitorious.org:owncloud/owncloud 2012-02-14 10:01:20 +01:00
Klaas Freitag 60a03580ff allow to set a files mtime through a PROPPATCH request on resource
'lastmodified'. Needed for syncing algorithms.
2012-02-14 09:59:54 +01:00
Thomas Tanghus f7161bb48b Added some error checking as mentioned in http://bugs.owncloud.org/thebuggenie/owncloud/issues/oc-227 2012-02-14 02:15:21 +01:00
Thomas Tanghus dc20900e10 Modify check for missing UID. 2012-02-14 01:56:38 +01:00
Thomas Tanghus 53503148f3 Use proper index file. 2012-02-14 01:47:18 +01:00
Thomas Tanghus 4446854f75 Don't try to load a profile picture for contacts the doesn't have any. 2012-02-14 01:11:21 +01:00
Thomas Tanghus 07c422d81d Removed superfluous debug. 2012-02-14 01:02:01 +01:00
Thomas Tanghus 3adaacc0ce Added OC_Contacts_VCard::moveToAddressBook 2012-02-14 01:00:41 +01:00
Thomas Tanghus 024405e4f1 Added function for later testing. 2012-02-14 01:00:41 +01:00
Robin Appelman 3c52ac7af3 make local filestorage comply with test cases 2012-02-14 01:00:41 +01:00
Robin Appelman bfa18fde19 dummy data for tests cases 2012-02-14 01:00:41 +01:00
Robin Appelman 7323b52560 some additional test cases for file storage backends 2012-02-14 01:00:41 +01:00
Bart Visscher a37bd93222 External: Use OC_Util::checkLoggedIn 2012-02-14 00:13:04 +01:00
Bart Visscher 777804fac2 Gallery: remove unused cover.php 2012-02-14 00:12:22 +01:00
Steven 4cc3a3096a Server verhindert beim OSX Client einen Delete 2012-02-13 23:48:22 +01:00
Bart Visscher 525306c1e2 Replace Expires and caching headers by OC_Response functions 2012-02-13 23:48:05 +01:00
Bart Visscher 29fc82c364 Send gallery album thumbnail with OC_Response::sendFile 2012-02-13 23:35:37 +01:00
Bart Visscher 594dcf13f2 Contacts+OC_Respone: Move enableCaching out of setEtagHeader and setLastModifiedHeader 2012-02-13 22:47:31 +01:00
Bart Visscher 0fd5252cfc OC_Image: Move Content-Type header to show function 2012-02-13 22:41:05 +01:00
Bart Visscher 169ddc5b0b Gallery: Only get local file when generating photo thumbnail 2012-02-13 22:39:30 +01:00
Bart Visscher e137020f67 Gallery: Use OC_Respone::enableCaching for (album)thumbnails 2012-02-13 22:38:34 +01:00
Bart Visscher 363fdc40b8 OC_Response: Set Expire and Cache-Control headers in enableCaching 2012-02-13 22:37:27 +01:00
Bart Visscher 7208abf618 OC_Response: fix var name bugs 2012-02-13 22:35:48 +01:00
Bart Visscher e084386770 Gallery: Move login check to beginning of galleryOp.php 2012-02-13 22:33:52 +01:00
Bart Visscher e402896001 Gallery: Remove autoloaded includes from galleryOp.php 2012-02-13 22:33:48 +01:00
Georg Ehrke 01827e9340 Merge branch 'master' into calendar_sharing 2012-02-13 17:08:52 +01:00
Georg Ehrke d10f4f071d Merge branch 'master' of gitorious.org:owncloud/owncloud 2012-02-13 17:07:24 +01:00
Robin Appelman d6aa5ac7e8 make local filestorage comply with test cases 2012-02-13 10:27:00 +01:00
Robin Appelman 31ea39360c dummy data for tests cases 2012-02-13 10:26:40 +01:00
Robin Appelman 3030f13d5f some additional test cases for file storage backends 2012-02-13 10:25:45 +01:00
Georg Ehrke 40d343e2af fix oc-bug 239 - & => &amp; 2012-02-12 22:34:10 +01:00
Bart Visscher a25bda8e41 Add application name to title 2012-02-12 21:56:01 +01:00
Bart Visscher 5c816c0cc9 Contacts: Optimize thumbnail cache handling a bit 2012-02-12 20:40:52 +01:00
Bart Visscher 125cf79a37 OC_Response: add setExpiresHeader function 2012-02-12 20:40:52 +01:00
Bart Visscher 45bb6f5fd4 OC_Response: add redirect function 2012-02-12 20:40:52 +01:00
Bart Visscher ee7931f457 Contacts: Add missing parameter 2012-02-12 20:40:52 +01:00
Robin Appelman 3579446930 use SimpleTest for unit testing
includes some tests for storage providers, more to come
2012-02-12 18:07:58 +01:00
Bart Visscher 0917bdecdd Contacts: Move response caching to OC_Response 2012-02-12 17:21:33 +01:00
Tom Needham a0bb6079c5 Add description to texteditor info.xml -fix oc-234 2012-02-12 15:42:05 +00:00
Bart Visscher f5385e4a63 Contacts: Add id to vars with id in them 2012-02-12 16:12:46 +01:00
Bart Visscher 623afb69b6 Contacts: cleanup OC_L10N usage 2012-02-12 16:11:41 +01:00
Bart Visscher 39f342d595 Contacts: Move debug logging of $_POST to after access checks 2012-02-12 15:58:55 +01:00
Bart Visscher 6eb1427ac0 Contacts: Document usage of OC_Contacts_App::getAddressbook
Remove redundant access checks and add comments to the calls to
OC_Contacts_App::getAddressbook that are access checks
2012-02-12 15:55:36 +01:00
Bart Visscher b77132edbe Contacts: Save last-modified time in REV property if not set 2012-02-12 15:14:25 +01:00
Bart Visscher 6bd0aad117 Contacts: Fix adding N property in getContactVCard 2012-02-12 15:14:24 +01:00
Bart Visscher facd4cbe17 Contacts: Cleanup photo and thumbnail code 2012-02-12 15:14:24 +01:00
Bart Visscher 3eff161bbf OC_Image: Use valid function instead of checking the resource 2012-02-12 15:14:24 +01:00
Bart Visscher 90d189a8b3 Access check fix in contacts/ajax/activation.php
plus small cleanup
2012-02-12 15:14:24 +01:00
Bart Visscher 8f3da6ee9b Small coding style update
Fixup OC_Contacts_App
2012-02-12 15:14:23 +01:00
Bart Visscher 1a74f0a18c Improve logging in OC_Contacts_App
Add logging to errors paths in getAddressbook and getContactObject.
2012-02-12 15:14:23 +01:00
Bart Visscher c4ee924869 Cleanup OC_Contacts_Addressbook::find usage
Use OC_Contacts_App::getAddressbook($id) instead of OC_Contacts_Addressbook::find($id), it contains access checks.
2012-02-12 15:14:23 +01:00
Bart Visscher 192b8906a3 Add copyright to OC_Connector_Sabre_Principal 2012-02-12 15:14:23 +01:00
Georg Ehrke c9db88aa3b Merge branch 'master' into calendar_sharing 2012-02-12 10:46:34 +01:00
Georg Ehrke 73038156cc check userrights in events.php 2012-02-12 10:40:57 +01:00
Frank Karlitschek 95e7be4aec Merge branch 'master' of gitorious.org:owncloud/owncloud 2012-02-12 00:02:14 +01:00
Frank Karlitschek 5408a26234 add a README 2012-02-12 00:01:46 +01:00
Michael Gapczynski 6929652e14 Redirect to installer if not installed 2012-02-11 17:37:47 -05:00
Frank Karlitschek 26a5c13906 Merge branch 'master' of gitorious.org:owncloud/owncloud 2012-02-11 23:26:42 +01:00
Frank Karlitschek 340b6bf3ad add themeing support and support for autoselection of mobile/tablet and standalone css/jss files and templates 2012-02-11 23:25:35 +01:00
Bart Visscher b5418173e5 Derive the user principles from the owncloud users
The code for updating the principles table is still there. To make it easier to
revert this commit if that is necessary.
2012-02-11 21:09:51 +01:00
Georg Ehrke 1bd3b65069 Revert "initial project import from KDevelop"
This reverts commit 1a0c273a20.
2012-02-11 14:04:44 +01:00
Georg Ehrke db23ec5c1c show shared calendars 2012-02-11 14:02:51 +01:00
Georg Ehrke 66ac6c232c fix sharing calendar manager 2012-02-11 13:30:15 +01:00
Tom Needham 20b9678789 replace database name and table prefix with default values 2012-02-10 20:23:28 +00:00
Georg Ehrke 1a0c273a20 initial project import from KDevelop 2012-02-10 20:04:49 +01:00
Stefan Göckeritz d9db6e73d8 bugfix for oc-236 2012-02-10 19:40:18 +01:00
Georg Ehrke a8b7ae515c Merge branch 'master' into calendar_sharing 2012-02-10 19:36:00 +01:00
Thomas Tanghus 1d6b4f8f3c Merge branch 'tanghus_contacts' 2012-02-10 16:44:06 +01:00
Thomas Tanghus b4924ed1e5 Variable wasn't reset. 2012-02-10 16:43:40 +01:00
Thomas Tanghus fd9ce6da35 Merge gitorious.org:owncloud/owncloud into tanghus_contacts 2012-02-10 16:42:45 +01:00
Thomas Tanghus c95e8a1fc5 Added custom combobox widget. 2012-02-10 16:40:40 +01:00
Tom Needham 2f80df1f9e Merge branch 'master' of gitorious.org:owncloud/owncloud into migration 2012-02-10 15:24:26 +00:00
Klaas Freitag 85853f9ec2 - Added the ability to change a files mtime via webdavs propset.
- Added some minor debug help to fscache
2012-02-10 11:30:38 +01:00
Bart Visscher 9379c3e128 Gallery: remove unset call, not needed anymore 2012-02-09 22:47:05 +01:00
Bart Visscher 8684e847b0 OC_Image: change static vars to object vars 2012-02-09 22:44:26 +01:00
Robin Appelman b4d84bd9bb dont try to remove buffers, can cause trouble with strict warnings 2012-02-09 19:53:02 +01:00
Robin Appelman c4864b4a54 don't use PDO::inTransaction 2012-02-09 19:53:02 +01:00
Thomas Tanghus 25f1263c11 Merge gitorious.org:owncloud/owncloud into tanghus_contacts 2012-02-09 19:07:54 +01:00
Thomas Tanghus ff53b0c209 Keep js data structure in sync on changes.
More checks for missing properties.
2012-02-09 19:04:07 +01:00
Robin Appelman 25381ac5b1 fix filecache with MDB2 2012-02-08 21:39:09 +01:00
Robin Appelman 398fbe7b82 use fetchRow instead of fetch 2012-02-08 21:26:45 +01:00
Bart Visscher 88b2391d2b Fix wrong var name in sharedstorage.php 2012-02-08 21:12:31 +01:00
Bart Visscher 7cd1a302d3 Gallery: Add caching headers to album thumbnail sending 2012-02-08 21:12:31 +01:00
Bart Visscher 158360c09b Gallery: use thumbnails of images for the album thumbnail
The thumbnails were already generated in this function, but now we save them
for displaying of the album.
2012-02-08 21:12:31 +01:00
Bart Visscher 43d2266f5c Add caching to gallery thumbnail generation 2012-02-08 21:12:30 +01:00
Bart Visscher eb5de4d4f7 Change gallery thumbnail generation to OC_Image 2012-02-08 21:12:30 +01:00
Bart Visscher 7c03b612d2 OC-41: [Calendar] Date format not translatable 2012-02-08 21:12:30 +01:00
Robin Appelman 24748ee10f add convinience function to get filesystem view for app storage 2012-02-08 21:01:09 +01:00
Robin Appelman c4a6b99814 use oc_filecache and oc_eventsource for music scanning 2012-02-08 17:30:16 +01:00
Robin Appelman bcebfbfbe2 bugfix in searching files by mimetype 2012-02-08 17:29:54 +01:00
Georg Ehrke 9fd07ee10d Merge branch 'master' into calendar 2012-02-08 17:13:50 +01:00
Robin Appelman 36d696c30d dont load pdfview for ie 2012-02-08 16:28:59 +01:00
Robin Appelman 5f7727629a Merge branch 'filesystem' 2012-02-08 15:50:58 +01:00
Thomas Tanghus 25faa40bd0 More @£#¤ conflicts
Merge branch 'temp' into tanghus_contacts
2012-02-08 09:36:16 +01:00
Thomas Tanghus f4a586a52c Fix merge conflicts 2012-02-08 09:18:58 +01:00
Thomas Tanghus c191ef6459 Added files for new contact editor/viewer. 2012-02-08 09:14:10 +01:00
Thomas Tanghus 0c5eb542bd Fixed broken "Add new" contact.
Possible fix for cards with missing 'FN' property added through DAV.
Misc. UI cleanups.
2012-02-08 08:47:03 +01:00
Thomas Tanghus 6112cdc7e8 Hide container for emails/phones/adresses if there are none. 2012-02-08 08:47:03 +01:00
Thomas Tanghus 9f1370a6d1 Updated copyrights.
Element menu didn't update.
2012-02-08 08:47:03 +01:00
Thomas Tanghus c0c6b5310e Added files for new contact editor/viewer. 2012-02-08 08:47:03 +01:00
Thomas Tanghus 3e9a69b9b7 Merge branch 'tanghus_contacts' of gitorious.org:owncloud/owncloud into tanghus_contacts
Conflicts:
	apps/contacts/ajax/contactdetails.php
	apps/contacts/js/contacts.js
2012-02-08 08:33:51 +01:00
Thomas Tanghus 424c64c0eb Don't import cards that can't be parsed by Sabre, but log it instead.
Fix missing 'N' or 'FN' fields on import.
2012-02-08 07:59:39 +01:00
Thomas Tanghus 249e46c5b7 Some fixes for malformed VCards. 2012-02-08 07:59:39 +01:00
Thomas Tanghus 4db661ba9d Fixed broken "Add new" contact.
Possible fix for cards with missing 'FN' property added through DAV.
Misc. UI cleanups.
2012-02-08 07:59:39 +01:00
Thomas Tanghus 23396721e4 Hide container for emails/phones/adresses if there are none. 2012-02-08 07:59:39 +01:00
Thomas Tanghus 1e4444f25b Updated copyrights.
Element menu didn't update.
2012-02-08 07:59:39 +01:00
Thomas Tanghus 90a830baba Added files for new contact editor/viewer. 2012-02-08 07:59:39 +01:00
Georg Ehrke cdf1cf82ba merge 64a617b2a1 into master 2012-02-07 22:49:23 +01:00
Robin Appelman e50dfbc228 fix filecache when creating a new folder 2012-02-06 19:33:37 +01:00
Thomas Tanghus 2cebfb50a4 Fixed broken "Add new" contact.
Possible fix for cards with missing 'FN' property added through DAV.
Misc. UI cleanups.
2012-02-06 14:18:40 +01:00
Thomas Tanghus 5962e66b6d Hide container for emails/phones/adresses if there are none. 2012-02-06 08:15:23 +01:00
Thomas Tanghus bc79951f33 Updated copyrights.
Element menu didn't update.
2012-02-06 08:04:06 +01:00
Thomas Tanghus 3af427fa54 Added files for new contact editor/viewer. 2012-02-06 07:32:57 +01:00
Thomas Tanghus 89616d81f0 Modification for adding photos. 2012-02-06 07:24:39 +01:00
Tom Needham 960dd750c9 Added dbexport to export output. Initial import code. 2012-02-05 23:00:38 +00:00
Robin Appelman 9f3388ecbc store writable flag for files 2012-02-05 14:04:10 +01:00
Robin Appelman 30673e4786 writable not writeable 2012-02-05 14:03:44 +01:00
Georg Ehrke 89073970d3 change comments in import.php 2012-02-05 12:13:53 +01:00
Georg Ehrke 8337eaa1ec add import function for contacts 2012-02-05 12:13:53 +01:00
Robin Appelman 25e777ef5e watch for changes outside owncloud to the files 2012-02-05 03:06:33 +01:00
Robin Appelman 90c4666b12 fix bug in transactions with PDO 2012-02-05 01:24:06 +01:00
Robin Appelman 0bb48d814b fix bug in transactions with PDO 2012-02-05 01:23:41 +01:00
Robin Appelman 7c00aedc37 some improvements in file scanning 2012-02-05 01:23:04 +01:00
Robin Appelman 36bc1a2102 Merge branch 'master' into filesystem 2012-02-05 01:22:29 +01:00
Tom Needham 493ba20734 Updated readme url for install instructions 2012-02-04 23:40:47 +00:00
Georg Ehrke 55be59e738 Merge branch 'master' into calendar 2012-02-04 21:34:38 +01:00
Georg Ehrke 5e08d1bb40 Merge branch 'calendar' of gitorious.org:owncloud/owncloud into calendar 2012-02-04 21:27:18 +01:00
Georg Ehrke b810380d56 add sharing management for calendars 2012-02-04 21:23:31 +01:00
Bartek Przybylski cfc710e768 preferences store fix 2012-02-04 20:15:55 +01:00
Bartek Przybylski f6a27dfa28 stripping root from gallery name 2012-02-04 15:35:58 +01:00
Bartek Przybylski f1672d7d10 handling special chars in dirnames 2012-02-04 11:02:13 +01:00
Bartek Przybylski 5a106d1036 gallery: fix FS hooks 2012-02-04 10:30:32 +01:00
Tom Needham 24c79c5bce Updated Migrate_provider bookmakr implementation 2012-02-03 22:41:39 +00:00
Tom Needham 1133eaa679 load bookmarks provider class 2012-02-03 21:28:58 +00:00
Tom Needham ee88ded463 more commenting out for debugging, added logging commands 2012-02-03 21:00:12 +00:00
Tom Needham 0bbc9ade7d fix syntax, add logging, debug xml output instead of zip 2012-02-03 20:48:32 +00:00
Bartek Przybylski 8df0650658 gallery settings, defining scan root and shor order 2012-02-03 21:38:44 +01:00
Bartek Przybylski ee01d1a81d removing console error in safari for bookmarks 2012-02-03 21:37:09 +01:00
Tom Needham 5507db9b15 Initial migration code, and basic export for bookmarks 2012-02-03 20:32:06 +00:00
Georg Ehrke ab31a890b6 use strip_tags for calendar names 2012-02-02 21:23:41 +01:00
Robin Appelman 05d76dcd67 allow the usage of the filecache outside of the users home folder 2012-02-02 19:04:13 +01:00
Georg Ehrke bfa69c3e59 add a label calendar to the settings page - bugfix for oc-157 2012-02-02 18:37:06 +01:00
Thomas Tanghus 6225b5ec86 More in-/output sanitation, 2012-02-02 17:54:30 +01:00
Thomas Tanghus 66b96e4440 Sanitize in- and output. 2012-02-02 17:54:30 +01:00
Georg Ehrke f81ac81550 fix merge conflicts 2012-02-02 17:48:29 +01:00
Robin Appelman 7b9fb84fe9 Merge branch 'master' into filesystem 2012-02-02 17:30:54 +01:00
Georg Ehrke 92b8f32386 Calendar: Bugfix: better input validation 2012-02-02 15:01:05 +01:00
Georg Ehrke 91b705cc4f remove debug file 2012-02-02 12:37:58 +01:00
Georg Ehrke f870f9efcf validate parameters in changeview.php 2012-02-02 12:18:29 +01:00
Georg Ehrke 9e5172f75c Merge branch 'master' into calendar 2012-02-02 12:12:48 +01:00
Bartek Przybylski f198296576 gallery works in safari now 2012-02-01 22:15:46 +01:00
Marvin Thomas Rabe f999fbf81a Bookmark layout updated 2012-02-01 22:02:06 +01:00
Marvin Thomas Rabe bbd10a3c94 Bookmark layout updated 2012-02-01 21:19:31 +01:00
Marvin Thomas Rabe e4faea8f90 Fixed upload button display error 2012-02-01 20:58:04 +01:00
Robin Appelman d514b1d92d Merge branch 'master' into filesystem 2012-02-01 15:57:32 +01:00
David Iwanowitsch 6583d30e26 fix javascript 2012-02-01 15:40:59 +01:00
David Iwanowitsch e229a6adec Added searchprovider for bookmarks, initial l10n support for bookmark plugin
moved some code from updateList.php to bookmarks.php, to make it reusable
2012-02-01 15:40:59 +01:00
Robin Appelman 0124809a42 prevent sharing from making aditional http requests while scanning
additional requests to the server can block feedback of scannning depending on server configuration
2012-02-01 15:33:12 +01:00
Robin Appelman a69d3c3346 only show what folder we are scanning to save bandwith 2012-02-01 15:25:00 +01:00
Thomas Schmidt 4145e3b265 pre-select current language, sort available languages 2012-02-01 12:00:38 +01:00
Georg Ehrke 39d312861a add active to the db structure of shared calendars 2012-01-31 22:33:39 +01:00
Georg Ehrke 2b8ec1cad0 Calendar: fix html of import dialog 2012-01-31 22:03:08 +01:00
Georg Ehrke 153467dbe0 add share as a tab 2012-01-31 21:39:40 +01:00
Georg Ehrke 7b82d153c7 Merge branch 'master' into calendar 2012-01-31 21:35:08 +01:00
Georg Ehrke 3a5d3dfd97 increase version number to force db upgrade 2012-01-31 21:33:50 +01:00
Georg Ehrke 32bff22dc7 change db structure of calendar for sharing calendars 2012-01-31 21:26:09 +01:00
Georg Ehrke 64a617b2a1 fix all day with one day to much - bugfix for oc-126 2012-01-31 20:46:27 +01:00
Thomas Tanghus 1f718d31e1 Merge branch 'tanghus_contacts' 2012-01-31 19:35:11 +01:00
Thomas Tanghus 6c340416d9 Resize profile picture if bigger than 200px on either x or y.
Bolded text on message box.
2012-01-31 19:32:24 +01:00
Thomas Tanghus 3f1486534f - Fixed http://bugs.owncloud.org/thebuggenie/owncloud/issues/oc-93
Property was added multiple times.
- Fixed http://bugs.owncloud.org/thebuggenie/owncloud/issues/oc-8
  "Missing "N" field: Contacts app not compatible with vcard 3.0 format"
- Almost sure I've fixed http://bugs.owncloud.org/thebuggenie/owncloud/issues/oc-27
  "Full name in Contacts app doesn't sync to iOS 5 contacts" because it is caused by oc-8
2012-01-31 19:30:56 +01:00
Thomas Tanghus db1f77e4f5 Some reminders in the code of what I have to change post OC3.0 2012-01-31 19:30:56 +01:00
Georg Ehrke 149bbeb260 make tab names translatable 2012-01-31 17:15:25 +01:00
Georg Ehrke f91702d7b5 Merge branch 'master' into calendar 2012-01-31 17:03:48 +01:00
Georg Ehrke c72c4dd412 add alarm as a tab 2012-01-31 16:59:34 +01:00
Georg Ehrke 4c1fb4c282 fix style of the tabs 2012-01-31 16:49:21 +01:00
Robin Appelman 12681e92b0 Merge branch 'master' into filesystem 2012-01-31 16:36:29 +01:00
Robin Appelman fdf3df3de5 add option to send get data along with an eventsource request 2012-01-31 16:35:47 +01:00
Robin Appelman 371b4642bb proper file sorting 2012-01-31 16:33:47 +01:00
Robin Appelman f1c5dce75c dont try to use something that isn't there 2012-01-31 16:33:36 +01:00
Robin Appelman c46f701771 use filesystem cache for searching 2012-01-31 16:12:49 +01:00
Robin Appelman df67c35017 some fixes to scanning 2012-01-31 16:12:38 +01:00
Robin Appelman 7ff86cfebe provide live feedback while scanning files 2012-01-31 13:56:58 +01:00
Robin Appelman 803f86e0fc dont try to use the filesystem when it isnt setup yet 2012-01-31 12:44:01 +01:00
Georg Ehrke 538618df62 Merge branch 'master' into calendar 2012-01-31 11:58:40 +01:00
Georg Ehrke fc70c7094a add tabs for repeating and attendees in the event form 2012-01-31 11:57:09 +01:00
Georg Ehrke 217151eb9c add textfield style declaration 2012-01-31 11:50:45 +01:00
Robin Appelman ffecc3e434 start of proper feedback during filessytem scan 2012-01-30 23:32:55 +01:00
Robin Appelman 8543e79713 add option to send get data along with an eventsource request 2012-01-30 23:26:01 +01:00
Robin Appelman 1191b57b34 Merge branch 'master' into filesystem 2012-01-30 23:20:47 +01:00
Robin Appelman 6a1121ab2e provide server side close option for EventStream 2012-01-30 23:19:58 +01:00
Michael Gapczynski e0f655fb70 Sharing app needs to be loaded for public link of file in Shared folder - fixes bug 113 2012-01-30 16:49:24 -05:00
Frank Karlitschek 0ba315912b fix outdated README file 2012-01-30 22:05:31 +01:00
Robin Appelman 4522d19b4c merge master into filesystem 2012-01-30 20:29:33 +01:00
Robin Appelman 45038af948 provide small wrapper around server side events and provide a fallback for IE 2012-01-30 20:21:16 +01:00
Bartek Przybylski 5574b87e9b new gallery look and feel 2012-01-30 19:36:33 +01:00
Robin Appelman 3552626358 Merge branch 'master' into filesystem 2012-01-20 00:48:03 +01:00
Robin Appelman 11c848b221 initial work on filesystemview 2012-01-20 00:48:00 +01:00
Robin Appelman a1dfe16d0a postgresql needs contraint names to be unque across the database, not only the table 2012-01-16 14:36:47 +01:00
Robin Appelman d7ed456f96 forgot to merge something 2012-01-16 14:36:11 +01:00
Robin Appelman 96e2f15d8a merge master into filesystem 2012-01-16 03:06:11 +01:00
Robin Appelman ccc43f0ea0 merge master into filesystem 2012-01-08 18:01:33 +01:00
Robin Appelman 799a7db638 Merge branch 'filesystem' of gitorious.org:owncloud/owncloud into filesystem 2012-01-08 01:57:14 +01:00
Robin Appelman d1edc360d9 merge master into filesystem 2012-01-08 01:53:40 +01:00
Robin Appelman 8f8985c3e5 Merge branch 'database' 2012-01-08 01:45:18 +01:00
Michael Gapczynski a22b5feda6 Initial commit of common filestorage 2012-01-01 17:05:22 -05:00
Michael Gapczynski 7250dc4e98 Fix updateApp() and add extra check to updateApps() 2012-01-01 16:58:51 -05:00
Robin Appelman 3844fb0e4c also use fscache when getting used space for webdav 2011-12-14 01:19:23 +01:00
Robin Appelman 835d6a9b6e save quota in human readable format (42 MB), should prevent some of the overflow related problems 2011-12-14 01:16:14 +01:00
Robin Appelman a9e94a34c9 use fscache for getting used space 2011-12-14 01:15:07 +01:00
Robin Appelman c67c933d3f Merge branch 'database' into filesystem 2011-12-11 23:57:53 +01:00
Robin Appelman 9fdd1bafdc Merge branch 'master' into filesystem 2011-12-11 23:42:22 +01:00
Robin Appelman efecb694ef make filesize parsing case insensitive 2011-12-11 23:33:24 +01:00
Robin Appelman bd65c18f21 also update the data attribute holding the quota 2011-12-11 23:32:57 +01:00
Robin Appelman b41ca8bacb after editing a user quota, set the value of the quota field to how the server parsed the input, not the user input
this way the user can see when an invalid input is given
2011-12-11 23:23:59 +01:00
Robin Appelman a8148fa94a update apps when their version number increases 2011-12-11 22:08:01 +01:00
Robin Appelman 7f1bb5fd78 Merge branch 'master' into database 2011-12-11 22:00:17 +01:00
Bart Visscher 76c37792cb WIP 2011-12-09 21:41:21 +01:00
Bart Visscher 487c23e27f Merge branch 'master' into tasks 2011-12-08 20:06:26 +01:00
Bart Visscher 5e4f28ea21 Tasks: Fix php warnings with empty tasks list 2011-12-02 21:33:30 +01:00
Bart Visscher 9c5306d9b1 Merge branch 'master' into tasks 2011-12-02 21:25:23 +01:00
Robin Appelman 153029a170 increase version to trigger database upgrade 2011-11-26 01:26:01 +01:00
Robin Appelman a8e4d2946a Merge branch 'database' into filesystem 2011-11-26 01:25:08 +01:00
Robin Appelman 98dc0882cb fix errors during database migration 2011-11-15 16:08:08 +01:00
Robin Appelman 916c72b40b set the installed version after updating the database 2011-11-15 15:59:01 +01:00
Robin Appelman 9686c5b6aa fixes in the sqlite manager driver 2011-11-15 15:58:12 +01:00
Robin Appelman b2f1429b75 automatically upgrade the main database on version number increase (doesnt work with sqlite for now) 2011-11-13 16:16:21 +01:00
Robin Appelman aa7c5a971c small fix in sqlite3 driver 2011-11-13 16:08:47 +01:00
Robin Appelman 486a31bfa3 minor changes to mysql setup 2011-11-13 16:06:29 +01:00
Robin Appelman bf40691ace some fixes in the sqlite3 driver 2011-11-12 18:06:07 +01:00
Robin Appelman 024f4375b6 keep encrypted and versioned flag in fscache 2011-11-12 01:00:04 +01:00
Robin Appelman b2f2a87745 use cache for searching files 2011-11-10 23:50:43 +01:00
Robin Appelman 5a8235eca0 use force parameter 2011-11-10 16:54:45 +01:00
Robin Appelman 7543ffa3b1 always load the filecache 2011-11-10 16:53:08 +01:00
Robin Appelman 524e3686a0 tell the user when the files are being scanned 2011-11-10 16:40:09 +01:00
Robin Appelman 5a6aba1e11 provide caching for file metadata 2011-11-09 18:41:57 +01:00
Robin Appelman 5cc6635eb8 remove OC_Filesystem::fromUploadedFile 2011-11-08 22:36:05 +01:00
Robin Appelman ca6c500799 remove OC_Filesystem::fileatime 2011-11-08 22:26:03 +01:00
Robin Appelman ec015a2e68 remove the need to register storage providers, pass the classname during mounting instead 2011-11-08 22:21:25 +01:00
Robin Appelman 878fc1d197 remove outdated remote storage prototype 2011-11-08 22:18:41 +01:00
Bart Visscher c30aa4ddeb Start using OC_JSON in tasks app 2011-10-06 21:21:38 +02:00
Bart Visscher 16ee08385e Merge branch 'master' into tasks 2011-10-06 15:37:20 +02:00
Bart Visscher 0dd5fd5cd3 Mark form field with error message 2011-09-20 21:25:28 +02:00
Bart Visscher 8826aa8056 Add basic fields to tasks app 2011-09-17 21:55:06 +02:00
Bart Visscher 78863696b7 First version of tasks app 2011-09-17 21:55:06 +02:00
3413 changed files with 401802 additions and 249187 deletions
+10
View File
@@ -2,6 +2,8 @@
data
owncloud
config/config.php
config/mount.php
apps/inc.php
# just sane ignores
.*.sw[po]
@@ -17,10 +19,12 @@ _darcs/*
CVS/*
.svn/*
RCS/*
*.backup*
# kdevelop
.kdev
*.kdev4
*.kate-swp
# Lokalize
*lokalize*
@@ -32,12 +36,18 @@ RCS/*
# netbeans
nbproject
# phpStorm
.idea
# geany
*.geany
# Cloud9IDE
.settings.xml
# vim ex mode
.vimrc
# Mac OS
.DS_Store
Regular → Executable
+14 -4
View File
@@ -1,12 +1,22 @@
ErrorDocument 403 /core/templates/403.php
ErrorDocument 404 /core/templates/404.php
<IfModule mod_php5.c>
php_value upload_max_filesize 512M
php_value post_max_size 512M
php_value upload_max_filesize 513M
php_value post_max_size 513M
php_value memory_limit 512M
SetEnv htaccessWorking true
<IfModule env_module>
SetEnv htaccessWorking true
</IfModule>
</IfModule>
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule .* - [env=HTTP_AUTHORIZATION:%{HTTP:Authorization},last]
RewriteRule .* - [env=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteRule ^.well-known/host-meta /public.php?service=host-meta [QSA,L]
RewriteRule ^.well-known/carddav /remote.php/carddav/ [R]
RewriteRule ^.well-known/caldav /remote.php/caldav/ [R]
RewriteRule ^apps/calendar/caldav.php remote.php/caldav/ [QSA,L]
RewriteRule ^apps/contacts/carddav.php remote.php/carddav/ [QSA,L]
RewriteRule ^apps/([^/]*)/(.*\.(css|php))$ index.php?app=$1&getfile=$2 [QSA,L]
RewriteRule ^remote/(.*) remote.php [QSA,L]
</IfModule>
Options -Indexes
-182
View File
@@ -1,182 +0,0 @@
[main]
host = https://www.transifex.net
[owncloud.core]
file_filter = l10n/<lang>/core.po
host = http://www.transifex.net
source_file = l10n/templates/core.pot
source_lang = en
trans.bg_BG = l10n/bg_BG/core.po
trans.ca = l10n/ca/core.po
trans.cs_CZ = l10n/cs_CZ/core.po
trans.da = l10n/da/core.po
trans.de = l10n/de/core.po
trans.el = l10n/el/core.po
trans.es = l10n/es/core.po
trans.et_EE = l10n/et_EE/core.po
trans.fr = l10n/fr/core.po
trans.id = l10n/id/core.po
trans.it = l10n/it/core.po
trans.lb = l10n/lb/core.po
trans.ms_MY = l10n/ms_MY/core.po
trans.nb_NO = l10n/nb_NO/core.po
trans.nl = l10n/nl/core.po
trans.pl = l10n/pl/core.po
trans.pt_BR = l10n/pt_BR/core.po
trans.pt_PT = l10n/pt_PT/core.po
trans.ro = l10n/ro/core.po
trans.ru = l10n/ru/core.po
trans.sr = l10n/sr/core.po
trans.sr@latin = l10n/sr@latin/core.po
trans.sv = l10n/sv/core.po
trans.zh_CN = l10n/zh_CN/core.po
[owncloud.settings]
file_filter = l10n/<lang>/settings.po
host = http://www.transifex.net
source_file = l10n/templates/settings.pot
source_lang = en
trans.bg_BG = l10n/bg_BG/settings.po
trans.ca = l10n/ca/settings.po
trans.cs_CZ = l10n/cs_CZ/settings.po
trans.da = l10n/da/settings.po
trans.de = l10n/de/settings.po
trans.el = l10n/el/settings.po
trans.es = l10n/es/settings.po
trans.et_EE = l10n/et_EE/settings.po
trans.fr = l10n/fr/settings.po
trans.id = l10n/id/settings.po
trans.it = l10n/it/settings.po
trans.lb = l10n/lb/settings.po
trans.ms_MY = l10n/ms_MY/settings.po
trans.nb_NO = l10n/nb_NO/settings.po
trans.nl = l10n/nl/settings.po
trans.pl = l10n/pl/settings.po
trans.pt_BR = l10n/pt_BR/settings.po
trans.pt_PT = l10n/pt_PT/settings.po
trans.ro = l10n/ro/settings.po
trans.ru = l10n/ru/settings.po
trans.sr = l10n/sr/settings.po
trans.sr@latin = l10n/sr@latin/settings.po
trans.sv = l10n/sv/settings.po
trans.zh_CN = l10n/zh_CN/settings.po
[owncloud.files]
file_filter = translations/owncloud.files/<lang>.po
host = http://www.transifex.net
source_file = l10n/templates/files.pot
source_lang = en
trans.bg_BG = l10n/bg_BG/files.po
trans.ca = l10n/ca/files.po
trans.cs_CZ = l10n/cs_CZ/files.po
trans.da = l10n/da/files.po
trans.de = l10n/de/files.po
trans.el = l10n/el/files.po
trans.es = l10n/es/files.po
trans.et_EE = l10n/et_EE/files.po
trans.fr = l10n/fr/files.po
trans.id = l10n/id/files.po
trans.it = l10n/it/files.po
trans.lb = l10n/lb/files.po
trans.ms_MY = l10n/ms_MY/files.po
trans.nb_NO = l10n/nb_NO/files.po
trans.nl = l10n/nl/files.po
trans.pl = l10n/pl/files.po
trans.pt_BR = l10n/pt_BR/files.po
trans.pt_PT = l10n/pt_PT/files.po
trans.ro = l10n/ro/files.po
trans.ru = l10n/ru/files.po
trans.sr = l10n/sr/files.po
trans.sr@latin = l10n/sr@latin/files.po
trans.sv = l10n/sv/files.po
trans.zh_CN = l10n/zh_CN/files.po
[owncloud.media]
file_filter = translations/owncloud.media/<lang>.po
host = http://www.transifex.net
source_file = l10n/templates/media.pot
source_lang = en
trans.bg_BG = l10n/bg_BG/media.po
trans.ca = l10n/ca/media.po
trans.cs_CZ = l10n/cs_CZ/media.po
trans.da = l10n/da/media.po
trans.de = l10n/de/media.po
trans.el = l10n/el/media.po
trans.es = l10n/es/media.po
trans.et_EE = l10n/et_EE/media.po
trans.fr = l10n/fr/media.po
trans.id = l10n/id/media.po
trans.it = l10n/it/media.po
trans.lb = l10n/lb/media.po
trans.ms_MY = l10n/ms_MY/media.po
trans.nb_NO = l10n/nb_NO/media.po
trans.nl = l10n/nl/media.po
trans.pl = l10n/pl/media.po
trans.pt_BR = l10n/pt_BR/media.po
trans.pt_PT = l10n/pt_PT/media.po
trans.ro = l10n/ro/media.po
trans.ru = l10n/ru/media.po
trans.sr = l10n/sr/media.po
trans.sr@latin = l10n/sr@latin/media.po
trans.sv = l10n/sv/media.po
trans.zh_CN = l10n/zh_CN/media.po
[owncloud.calendar]
file_filter = l10n/<lang>/calendar.po
host = http://www.transifex.net
source_file = l10n/templates/calendar.pot
source_lang = en
trans.bg_BG = l10n/bg_BG/calendar.po
trans.ca = l10n/ca/calendar.po
trans.cs_CZ = l10n/cs_CZ/calendar.po
trans.da = l10n/da/calendar.po
trans.de = l10n/de/calendar.po
trans.el = l10n/el/calendar.po
trans.es = l10n/es/calendar.po
trans.et_EE = l10n/et_EE/calendar.po
trans.fr = l10n/fr/calendar.po
trans.id = l10n/id/calendar.po
trans.it = l10n/it/calendar.po
trans.lb = l10n/lb/calendar.po
trans.ms_MY = l10n/ms_MY/calendar.po
trans.nb_NO = l10n/nb_NO/calendar.po
trans.nl = l10n/nl/calendar.po
trans.pl = l10n/pl/calendar.po
trans.pt_BR = l10n/pt_BR/calendar.po
trans.pt_PT = l10n/pt_PT/calendar.po
trans.ro = l10n/ro/calendar.po
trans.ru = l10n/ru/calendar.po
trans.sr = l10n/sr/calendar.po
trans.sr@latin = l10n/sr@latin/calendar.po
trans.sv = l10n/sv/calendar.po
trans.zh_CN = l10n/zh_CN/calendar.po
[owncloud.contacts]
file_filter = translations/owncloud.contacts/<lang>.po
host = http://www.transifex.net
source_file = l10n/templates/contacts.pot
source_lang = en
trans.bg_BG = l10n/bg_BG/contacts.po
trans.ca = l10n/ca/contacts.po
trans.cs_CZ = l10n/cs_CZ/contacts.po
trans.da = l10n/da/contacts.po
trans.de = l10n/de/contacts.po
trans.el = l10n/el/contacts.po
trans.es = l10n/es/contacts.po
trans.et_EE = l10n/et_EE/contacts.po
trans.fr = l10n/fr/contacts.po
trans.id = l10n/id/contacts.po
trans.it = l10n/it/contacts.po
trans.lb = l10n/lb/contacts.po
trans.ms_MY = l10n/ms_MY/contacts.po
trans.nb_NO = l10n/nb_NO/contacts.po
trans.nl = l10n/nl/contacts.po
trans.pl = l10n/pl/contacts.po
trans.pt_BR = l10n/pt_BR/contacts.po
trans.pt_PT = l10n/pt_PT/contacts.po
trans.ro = l10n/ro/contacts.po
trans.ru = l10n/ru/contacts.po
trans.sr = l10n/sr/contacts.po
trans.sr@latin = l10n/sr@latin/contacts.po
trans.sv = l10n/sv/contacts.po
trans.zh_CN = l10n/zh_CN/contacts.po
+1954
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -221,7 +221,7 @@ class Crypt_Blowfish
function decrypt($cipherText)
{
if (!is_string($cipherText)) {
PEAR::raiseError('Chiper text must be a string', 1, PEAR_ERROR_DIE);
PEAR::raiseError('Cipher text must be a string', 1, PEAR_ERROR_DIE);
}
if (extension_loaded('mcrypt')) {
+380
View File
@@ -0,0 +1,380 @@
<?php
/**
* Dropbox API class
*
* @package Dropbox
* @copyright Copyright (C) 2010 Rooftop Solutions. All rights reserved.
* @author Evert Pot (http://www.rooftopsolutions.nl/)
* @license http://code.google.com/p/dropbox-php/wiki/License MIT
*/
class Dropbox_API {
/**
* Sandbox root-path
*/
const ROOT_SANDBOX = 'sandbox';
/**
* Dropbox root-path
*/
const ROOT_DROPBOX = 'dropbox';
/**
* API URl
*/
protected $api_url = 'https://api.dropbox.com/1/';
/**
* Content API URl
*/
protected $api_content_url = 'https://api-content.dropbox.com/1/';
/**
* OAuth object
*
* @var Dropbox_OAuth
*/
protected $oauth;
/**
* Default root-path, this will most likely be 'sandbox' or 'dropbox'
*
* @var string
*/
protected $root;
protected $useSSL;
/**
* Constructor
*
* @param Dropbox_OAuth Dropbox_Auth object
* @param string $root default root path (sandbox or dropbox)
*/
public function __construct(Dropbox_OAuth $oauth, $root = self::ROOT_DROPBOX, $useSSL = true) {
$this->oauth = $oauth;
$this->root = $root;
$this->useSSL = $useSSL;
if (!$this->useSSL)
{
throw new Dropbox_Exception('Dropbox REST API now requires that all requests use SSL');
}
}
/**
* Returns information about the current dropbox account
*
* @return stdclass
*/
public function getAccountInfo() {
$data = $this->oauth->fetch($this->api_url . 'account/info');
return json_decode($data['body'],true);
}
/**
* Returns a file's contents
*
* @param string $path path
* @param string $root Use this to override the default root path (sandbox/dropbox)
* @return string
*/
public function getFile($path = '', $root = null) {
if (is_null($root)) $root = $this->root;
$path = str_replace(array('%2F','~'), array('/','%7E'), rawurlencode($path));
$result = $this->oauth->fetch($this->api_content_url . 'files/' . $root . '/' . ltrim($path,'/'));
return $result['body'];
}
/**
* Uploads a new file
*
* @param string $path Target path (including filename)
* @param string $file Either a path to a file or a stream resource
* @param string $root Use this to override the default root path (sandbox/dropbox)
* @return bool
*/
public function putFile($path, $file, $root = null) {
$directory = dirname($path);
$filename = basename($path);
if($directory==='.') $directory = '';
$directory = str_replace(array('%2F','~'), array('/','%7E'), rawurlencode($directory));
// $filename = str_replace('~', '%7E', rawurlencode($filename));
if (is_null($root)) $root = $this->root;
if (is_string($file)) {
$file = fopen($file,'rb');
} elseif (!is_resource($file)) {
throw new Dropbox_Exception('File must be a file-resource or a string');
}
$result=$this->multipartFetch($this->api_content_url . 'files/' .
$root . '/' . trim($directory,'/'), $file, $filename);
if(!isset($result["httpStatus"]) || $result["httpStatus"] != 200)
throw new Dropbox_Exception("Uploading file to Dropbox failed");
return true;
}
/**
* Copies a file or directory from one location to another
*
* This method returns the file information of the newly created file.
*
* @param string $from source path
* @param string $to destination path
* @param string $root Use this to override the default root path (sandbox/dropbox)
* @return stdclass
*/
public function copy($from, $to, $root = null) {
if (is_null($root)) $root = $this->root;
$response = $this->oauth->fetch($this->api_url . 'fileops/copy', array('from_path' => $from, 'to_path' => $to, 'root' => $root), 'POST');
return json_decode($response['body'],true);
}
/**
* Creates a new folder
*
* This method returns the information from the newly created directory
*
* @param string $path
* @param string $root Use this to override the default root path (sandbox/dropbox)
* @return stdclass
*/
public function createFolder($path, $root = null) {
if (is_null($root)) $root = $this->root;
// Making sure the path starts with a /
// $path = '/' . ltrim($path,'/');
$response = $this->oauth->fetch($this->api_url . 'fileops/create_folder', array('path' => $path, 'root' => $root),'POST');
return json_decode($response['body'],true);
}
/**
* Deletes a file or folder.
*
* This method will return the metadata information from the deleted file or folder, if successful.
*
* @param string $path Path to new folder
* @param string $root Use this to override the default root path (sandbox/dropbox)
* @return array
*/
public function delete($path, $root = null) {
if (is_null($root)) $root = $this->root;
$response = $this->oauth->fetch($this->api_url . 'fileops/delete', array('path' => $path, 'root' => $root), 'POST');
return json_decode($response['body']);
}
/**
* Moves a file or directory to a new location
*
* This method returns the information from the newly created directory
*
* @param mixed $from Source path
* @param mixed $to destination path
* @param string $root Use this to override the default root path (sandbox/dropbox)
* @return stdclass
*/
public function move($from, $to, $root = null) {
if (is_null($root)) $root = $this->root;
$response = $this->oauth->fetch($this->api_url . 'fileops/move', array('from_path' => rawurldecode($from), 'to_path' => rawurldecode($to), 'root' => $root), 'POST');
return json_decode($response['body'],true);
}
/**
* Returns file and directory information
*
* @param string $path Path to receive information from
* @param bool $list When set to true, this method returns information from all files in a directory. When set to false it will only return infromation from the specified directory.
* @param string $hash If a hash is supplied, this method simply returns true if nothing has changed since the last request. Good for caching.
* @param int $fileLimit Maximum number of file-information to receive
* @param string $root Use this to override the default root path (sandbox/dropbox)
* @return array|true
*/
public function getMetaData($path, $list = true, $hash = null, $fileLimit = null, $root = null) {
if (is_null($root)) $root = $this->root;
$args = array(
'list' => $list,
);
if (!is_null($hash)) $args['hash'] = $hash;
if (!is_null($fileLimit)) $args['file_limit'] = $fileLimit;
$path = str_replace(array('%2F','~'), array('/','%7E'), rawurlencode($path));
$response = $this->oauth->fetch($this->api_url . 'metadata/' . $root . '/' . ltrim($path,'/'), $args);
/* 304 is not modified */
if ($response['httpStatus']==304) {
return true;
} else {
return json_decode($response['body'],true);
}
}
/**
* A way of letting you keep up with changes to files and folders in a user's Dropbox. You can periodically call /delta to get a list of "delta entries", which are instructions on how to update your local state to match the server's state.
*
* This method returns the information from the newly created directory
*
* @param string $cursor A string that is used to keep track of your current state. On the next call pass in this value to return delta entries that have been recorded since the cursor was returned.
* @return stdclass
*/
public function delta($cursor) {
$arg['cursor'] = $cursor;
$response = $this->oauth->fetch($this->api_url . 'delta', $arg, 'POST');
return json_decode($response['body'],true);
}
/**
* Returns a thumbnail (as a string) for a file path.
*
* @param string $path Path to file
* @param string $size small, medium or large
* @param string $root Use this to override the default root path (sandbox/dropbox)
* @return string
*/
public function getThumbnail($path, $size = 'small', $root = null) {
if (is_null($root)) $root = $this->root;
$path = str_replace(array('%2F','~'), array('/','%7E'), rawurlencode($path));
$response = $this->oauth->fetch($this->api_content_url . 'thumbnails/' . $root . '/' . ltrim($path,'/'),array('size' => $size));
return $response['body'];
}
/**
* This method is used to generate multipart POST requests for file upload
*
* @param string $uri
* @param array $arguments
* @return bool
*/
protected function multipartFetch($uri, $file, $filename) {
/* random string */
$boundary = 'R50hrfBj5JYyfR3vF3wR96GPCC9Fd2q2pVMERvEaOE3D8LZTgLLbRpNwXek3';
$headers = array(
'Content-Type' => 'multipart/form-data; boundary=' . $boundary,
);
$body="--" . $boundary . "\r\n";
$body.="Content-Disposition: form-data; name=file; filename=".rawurldecode($filename)."\r\n";
$body.="Content-type: application/octet-stream\r\n";
$body.="\r\n";
$body.=stream_get_contents($file);
$body.="\r\n";
$body.="--" . $boundary . "--";
// Dropbox requires the filename to also be part of the regular arguments, so it becomes
// part of the signature.
$uri.='?file=' . $filename;
return $this->oauth->fetch($uri, $body, 'POST', $headers);
}
/**
* Search
*
* Returns metadata for all files and folders that match the search query.
*
* @added by: diszo.sasil
*
* @param string $query
* @param string $root Use this to override the default root path (sandbox/dropbox)
* @param string $path
* @return array
*/
public function search($query = '', $root = null, $path = ''){
if (is_null($root)) $root = $this->root;
if(!empty($path)){
$path = str_replace(array('%2F','~'), array('/','%7E'), rawurlencode($path));
}
$response = $this->oauth->fetch($this->api_url . 'search/' . $root . '/' . ltrim($path,'/'),array('query' => $query));
return json_decode($response['body'],true);
}
/**
* Creates and returns a shareable link to files or folders.
*
* Note: Links created by the /shares API call expire after thirty days.
*
* @param type $path
* @param type $root
* @return type
*/
public function share($path, $root = null) {
if (is_null($root)) $root = $this->root;
$path = str_replace(array('%2F','~'), array('/','%7E'), rawurlencode($path));
$response = $this->oauth->fetch($this->api_url. 'shares/'. $root . '/' . ltrim($path, '/'), array(), 'POST');
return json_decode($response['body'],true);
}
/**
* Returns a link directly to a file.
* Similar to /shares. The difference is that this bypasses the Dropbox webserver, used to provide a preview of the file, so that you can effectively stream the contents of your media.
*
* Note: The /media link expires after four hours, allotting enough time to stream files, but not enough to leave a connection open indefinitely.
*
* @param type $path
* @param type $root
* @return type
*/
public function media($path, $root = null) {
if (is_null($root)) $root = $this->root;
$path = str_replace(array('%2F','~'), array('/','%7E'), rawurlencode($path));
$response = $this->oauth->fetch($this->api_url. 'media/'. $root . '/' . ltrim($path, '/'), array(), 'POST');
return json_decode($response['body'],true);
}
/**
* Creates and returns a copy_ref to a file. This reference string can be used to copy that file to another user's Dropbox by passing it in as the from_copy_ref parameter on /fileops/copy.
*
* @param type $path
* @param type $root
* @return type
*/
public function copy_ref($path, $root = null) {
if (is_null($root)) $root = $this->root;
$path = str_replace(array('%2F','~'), array('/','%7E'), rawurlencode($path));
$response = $this->oauth->fetch($this->api_url. 'copy_ref/'. $root . '/' . ltrim($path, '/'));
return json_decode($response['body'],true);
}
}
+15
View File
@@ -0,0 +1,15 @@
<?php
/**
* Dropbox base exception
*
* @package Dropbox
* @copyright Copyright (C) 2010 Rooftop Solutions. All rights reserved.
* @author Evert Pot (http://www.rooftopsolutions.nl/)
* @license http://code.google.com/p/dropbox-php/wiki/License MIT
*/
/**
* Base exception class
*/
class Dropbox_Exception extends Exception { }
+18
View File
@@ -0,0 +1,18 @@
<?php
/**
* Dropbox Forbidden exception
*
* @package Dropbox
* @copyright Copyright (C) 2010 Rooftop Solutions. All rights reserved.
* @author Evert Pot (http://www.rooftopsolutions.nl/)
* @license http://code.google.com/p/dropbox-php/wiki/License MIT
*/
/**
* This exception is thrown when we receive the 403 forbidden response
*/
class Dropbox_Exception_Forbidden extends Dropbox_Exception {
}
+20
View File
@@ -0,0 +1,20 @@
<?php
/**
* Dropbox Not Found exception
*
* @package Dropbox
* @copyright Copyright (C) 2010 Rooftop Solutions. All rights reserved.
* @author Evert Pot (http://www.rooftopsolutions.nl/)
* @license http://code.google.com/p/dropbox-php/wiki/License MIT
*/
/**
* This exception is thrown when a non-existant uri is accessed.
*
* Basically, this exception is used when we get back a 404.
*/
class Dropbox_Exception_NotFound extends Dropbox_Exception {
}
+20
View File
@@ -0,0 +1,20 @@
<?php
/**
* Dropbox Over Quota exception
*
* @package Dropbox
* @copyright Copyright (C) 2010 Rooftop Solutions. All rights reserved.
* @author Evert Pot (http://www.rooftopsolutions.nl/)
* @license http://code.google.com/p/dropbox-php/wiki/License MIT
*/
/**
* This exception is thrown when the operation required more space than the available quota.
*
* Basically, this exception is used when we get back a 507.
*/
class Dropbox_Exception_OverQuota extends Dropbox_Exception {
}
+18
View File
@@ -0,0 +1,18 @@
<?php
/**
* Dropbox RequestToken exception
*
* @package Dropbox
* @copyright Copyright (C) 2010 Rooftop Solutions. All rights reserved.
* @author Evert Pot (http://www.rooftopsolutions.nl/)
* @license http://code.google.com/p/dropbox-php/wiki/License MIT
*/
/**
* This exception is thrown when an error occured during the request_token process.
*/
class Dropbox_Exception_RequestToken extends Dropbox_Exception {
}
+19
View File
@@ -0,0 +1,19 @@
Copyright (c) 2010 Rooftop Solutions
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.
+151
View File
@@ -0,0 +1,151 @@
<?php
/**
* Dropbox OAuth
*
* @package Dropbox
* @copyright Copyright (C) 2010 Rooftop Solutions. All rights reserved.
* @author Evert Pot (http://www.rooftopsolutions.nl/)
* @license http://code.google.com/p/dropbox-php/wiki/License MIT
*/
/**
* This class is an abstract OAuth class.
*
* It must be extended by classes who wish to provide OAuth functionality
* using different libraries.
*/
abstract class Dropbox_OAuth {
/**
* After a user has authorized access, dropbox can redirect the user back
* to this url.
*
* @var string
*/
public $authorizeCallbackUrl = null;
/**
* Uri used to fetch request tokens
*
* @var string
*/
const URI_REQUEST_TOKEN = 'https://api.dropbox.com/1/oauth/request_token';
/**
* Uri used to redirect the user to for authorization.
*
* @var string
*/
const URI_AUTHORIZE = 'https://www.dropbox.com/1/oauth/authorize';
/**
* Uri used to
*
* @var string
*/
const URI_ACCESS_TOKEN = 'https://api.dropbox.com/1/oauth/access_token';
/**
* An OAuth request token.
*
* @var string
*/
protected $oauth_token = null;
/**
* OAuth token secret
*
* @var string
*/
protected $oauth_token_secret = null;
/**
* Constructor
*
* @param string $consumerKey
* @param string $consumerSecret
*/
abstract public function __construct($consumerKey, $consumerSecret);
/**
* Sets the request token and secret.
*
* The tokens can also be passed as an array into the first argument.
* The array must have the elements token and token_secret.
*
* @param string|array $token
* @param string $token_secret
* @return void
*/
public function setToken($token, $token_secret = null) {
if (is_array($token)) {
$this->oauth_token = $token['token'];
$this->oauth_token_secret = $token['token_secret'];
} else {
$this->oauth_token = $token;
$this->oauth_token_secret = $token_secret;
}
}
/**
* Returns the oauth request tokens as an associative array.
*
* The array will contain the elements 'token' and 'token_secret'.
*
* @return array
*/
public function getToken() {
return array(
'token' => $this->oauth_token,
'token_secret' => $this->oauth_token_secret,
);
}
/**
* Returns the authorization url
*
* @param string $callBack Specify a callback url to automatically redirect the user back
* @return string
*/
public function getAuthorizeUrl($callBack = null) {
// Building the redirect uri
$token = $this->getToken();
$uri = self::URI_AUTHORIZE . '?oauth_token=' . $token['token'];
if ($callBack) $uri.='&oauth_callback=' . $callBack;
return $uri;
}
/**
* Fetches a secured oauth url and returns the response body.
*
* @param string $uri
* @param mixed $arguments
* @param string $method
* @param array $httpHeaders
* @return string
*/
public abstract function fetch($uri, $arguments = array(), $method = 'GET', $httpHeaders = array());
/**
* Requests the OAuth request token.
*
* @return array
*/
abstract public function getRequestToken();
/**
* Requests the OAuth access tokens.
*
* @return array
*/
abstract public function getAccessToken();
}
+37
View File
@@ -0,0 +1,37 @@
<?php
/**
* HTTP OAuth Consumer
*
* Adapted from halldirector's code in
* http://code.google.com/p/dropbox-php/issues/detail?id=36#c5
*
* @package Dropbox
* @copyright Copyright (C) 2011 Joe Constant / halldirector. All rights reserved.
* @author Joe Constant / halldirector
* @license http://code.google.com/p/dropbox-php/wiki/License MIT
*/
require_once 'HTTP/OAuth.php';
require_once 'HTTP/OAuth/Consumer.php';
/*
* This class is to help work around aomw ssl issues.
*/
class Dropbox_OAuth_Consumer_Dropbox extends HTTP_OAuth_Consumer
{
public function getOAuthConsumerRequest()
{
if (!$this->consumerRequest instanceof HTTP_OAuth_Consumer_Request) {
$this->consumerRequest = new HTTP_OAuth_Consumer_Request;
}
// TODO: Change this and add in code to validate the SSL cert.
// see https://github.com/bagder/curl/blob/master/lib/mk-ca-bundle.pl
$this->consumerRequest->setConfig(array(
'ssl_verify_peer' => false,
'ssl_verify_host' => false
));
return $this->consumerRequest;
}
}
+282
View File
@@ -0,0 +1,282 @@
<?php
/**
* Dropbox OAuth
*
* @package Dropbox
* @copyright Copyright (C) 2011 Daniel Huesken
* @author Daniel Huesken (http://www.danielhuesken.de/)
* @license MIT
*/
/**
* This class is used to sign all requests to dropbox.
*
* This specific class uses WordPress WP_Http to authenticate.
*/
class Dropbox_OAuth_Curl extends Dropbox_OAuth {
/**
*
* @var string ConsumerKey
*/
protected $consumerKey = null;
/**
*
* @var string ConsumerSecret
*/
protected $consumerSecret = null;
/**
*
* @var string ProzessCallBack
*/
public $ProgressFunction = false;
/**
* Constructor
*
* @param string $consumerKey
* @param string $consumerSecret
*/
public function __construct($consumerKey, $consumerSecret) {
if (!function_exists('curl_exec'))
throw new Dropbox_Exception('The PHP curl functions not available!');
$this->consumerKey = $consumerKey;
$this->consumerSecret = $consumerSecret;
}
/**
* Fetches a secured oauth url and returns the response body.
*
* @param string $uri
* @param mixed $arguments
* @param string $method
* @param array $httpHeaders
* @return string
*/
public function fetch($uri, $arguments = array(), $method = 'GET', $httpHeaders = array()) {
$uri=str_replace('http://', 'https://', $uri); // all https, upload makes problems if not
if (is_string($arguments) and strtoupper($method) == 'POST') {
preg_match("/\?file=(.*)$/i", $uri, $matches);
if (isset($matches[1])) {
$uri = str_replace($matches[0], "", $uri);
$filename = $matches[1];
$httpHeaders=array_merge($httpHeaders,$this->getOAuthHeader($uri, array("file" => $filename), $method));
}
} else {
$httpHeaders=array_merge($httpHeaders,$this->getOAuthHeader($uri, $arguments, $method));
}
$ch = curl_init();
if (strtoupper($method) == 'POST') {
curl_setopt($ch, CURLOPT_URL, $uri);
curl_setopt($ch, CURLOPT_POST, true);
// if (is_array($arguments))
// $arguments=http_build_query($arguments);
curl_setopt($ch, CURLOPT_POSTFIELDS, $arguments);
// $httpHeaders['Content-Length']=strlen($arguments);
} else {
curl_setopt($ch, CURLOPT_URL, $uri.'?'.http_build_query($arguments));
curl_setopt($ch, CURLOPT_POST, false);
}
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_TIMEOUT, 300);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
// curl_setopt($ch, CURLOPT_CAINFO, "rootca");
curl_setopt($ch, CURLOPT_FRESH_CONNECT, true);
//Build header
$headers = array();
foreach ($httpHeaders as $name => $value) {
$headers[] = "{$name}: $value";
}
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
if (!ini_get('safe_mode') && !ini_get('open_basedir'))
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true );
if (function_exists($this->ProgressFunction) and defined('CURLOPT_PROGRESSFUNCTION')) {
curl_setopt($ch, CURLOPT_NOPROGRESS, false);
curl_setopt($ch, CURLOPT_PROGRESSFUNCTION, $this->ProgressFunction);
curl_setopt($ch, CURLOPT_BUFFERSIZE, 512);
}
$response=curl_exec($ch);
$errorno=curl_errno($ch);
$error=curl_error($ch);
$status=curl_getinfo($ch,CURLINFO_HTTP_CODE);
curl_close($ch);
if (!empty($errorno))
throw new Dropbox_Exception_NotFound('Curl error: ('.$errorno.') '.$error."\n");
if ($status>=300) {
$body = json_decode($response,true);
switch ($status) {
// Not modified
case 304 :
return array(
'httpStatus' => 304,
'body' => null,
);
break;
case 403 :
throw new Dropbox_Exception_Forbidden('Forbidden.
This could mean a bad OAuth request, or a file or folder already existing at the target location.
' . $body["error"] . "\n");
case 404 :
throw new Dropbox_Exception_NotFound('Resource at uri: ' . $uri . ' could not be found. ' .
$body["error"] . "\n");
case 507 :
throw new Dropbox_Exception_OverQuota('This dropbox is full. ' .
$body["error"] . "\n");
}
if (!empty($body["error"]))
throw new Dropbox_Exception_RequestToken('Error: ('.$status.') '.$body["error"]."\n");
}
return array(
'body' => $response,
'httpStatus' => $status
);
}
/**
* Returns named array with oauth parameters for further use
* @return array Array with oauth_ parameters
*/
private function getOAuthBaseParams() {
$params['oauth_version'] = '1.0';
$params['oauth_signature_method'] = 'HMAC-SHA1';
$params['oauth_consumer_key'] = $this->consumerKey;
$tokens = $this->getToken();
if (isset($tokens['token']) && $tokens['token']) {
$params['oauth_token'] = $tokens['token'];
}
$params['oauth_timestamp'] = time();
$params['oauth_nonce'] = md5(microtime() . mt_rand());
return $params;
}
/**
* Creates valid Authorization header for OAuth, based on URI and Params
*
* @param string $uri
* @param array $params
* @param string $method GET or POST, standard is GET
* @param array $oAuthParams optional, pass your own oauth_params here
* @return array Array for request's headers section like
* array('Authorization' => 'OAuth ...');
*/
private function getOAuthHeader($uri, $params, $method = 'GET', $oAuthParams = null) {
$oAuthParams = $oAuthParams ? $oAuthParams : $this->getOAuthBaseParams();
// create baseString to encode for the sent parameters
$baseString = $method . '&';
$baseString .= $this->oauth_urlencode($uri) . "&";
// OAuth header does not include GET-Parameters
$signatureParams = array_merge($params, $oAuthParams);
// sorting the parameters
ksort($signatureParams);
$encodedParams = array();
foreach ($signatureParams as $key => $value) {
$encodedParams[] = $this->oauth_urlencode($key) . '=' . $this->oauth_urlencode($value);
}
$baseString .= $this->oauth_urlencode(implode('&', $encodedParams));
// encode the signature
$tokens = $this->getToken();
$hash = $this->hash_hmac_sha1($this->consumerSecret.'&'.$tokens['token_secret'], $baseString);
$signature = base64_encode($hash);
// add signature to oAuthParams
$oAuthParams['oauth_signature'] = $signature;
$oAuthEncoded = array();
foreach ($oAuthParams as $key => $value) {
$oAuthEncoded[] = $key . '="' . $this->oauth_urlencode($value) . '"';
}
return array('Authorization' => 'OAuth ' . implode(', ', $oAuthEncoded));
}
/**
* Requests the OAuth request token.
*
* @return void
*/
public function getRequestToken() {
$result = $this->fetch(self::URI_REQUEST_TOKEN, array(), 'POST');
if ($result['httpStatus'] == "200") {
$tokens = array();
parse_str($result['body'], $tokens);
$this->setToken($tokens['oauth_token'], $tokens['oauth_token_secret']);
return $this->getToken();
} else {
throw new Dropbox_Exception_RequestToken('We were unable to fetch request tokens. This likely means that your consumer key and/or secret are incorrect.');
}
}
/**
* Requests the OAuth access tokens.
*
* This method requires the 'unauthorized' request tokens
* and, if successful will set the authorized request tokens.
*
* @return void
*/
public function getAccessToken() {
$result = $this->fetch(self::URI_ACCESS_TOKEN, array(), 'POST');
if ($result['httpStatus'] == "200") {
$tokens = array();
parse_str($result['body'], $tokens);
$this->setToken($tokens['oauth_token'], $tokens['oauth_token_secret']);
return $this->getToken();
} else {
throw new Dropbox_Exception_RequestToken('We were unable to fetch request tokens. This likely means that your consumer key and/or secret are incorrect.');
}
}
/**
* Helper function to properly urlencode parameters.
* See http://php.net/manual/en/function.oauth-urlencode.php
*
* @param string $string
* @return string
*/
private function oauth_urlencode($string) {
return str_replace('%E7', '~', rawurlencode($string));
}
/**
* Hash function for hmac_sha1; uses native function if available.
*
* @param string $key
* @param string $data
* @return string
*/
private function hash_hmac_sha1($key, $data) {
if (function_exists('hash_hmac') && in_array('sha1', hash_algos())) {
return hash_hmac('sha1', $data, $key, true);
} else {
$blocksize = 64;
$hashfunc = 'sha1';
if (strlen($key) > $blocksize) {
$key = pack('H*', $hashfunc($key));
}
$key = str_pad($key, $blocksize, chr(0x00));
$ipad = str_repeat(chr(0x36), $blocksize);
$opad = str_repeat(chr(0x5c), $blocksize);
$hash = pack('H*', $hashfunc(( $key ^ $opad ) . pack('H*', $hashfunc(($key ^ $ipad) . $data))));
return $hash;
}
}
}
+31
View File
@@ -0,0 +1,31 @@
Dropbox-php
===========
This PHP library allows you to easily integrate dropbox with PHP.
The following PHP extension is required:
* json
The library makes use of OAuth. At the moment you can use either of these libraries:
[PHP OAuth extension](http://pecl.php.net/package/oauth)
[PEAR's HTTP_OAUTH package](http://pear.php.net/package/http_oauth)
The extension is recommended, but if you can't install php extensions you should go for the pear package.
Installing
----------
pear channel-discover pear.dropbox-php.com
pear install dropbox-php/Dropbox-alpha
Documentation
-------------
Check out the [documentation](http://www.dropbox-php.com/docs).
Questions?
----------
[Dropbox-php Mailing list](http://groups.google.com/group/dropbox-php)
[Official Dropbox developer forum](http://forums.dropbox.com/forum.php?id=5)
+29
View File
@@ -0,0 +1,29 @@
<?php
/**
* This file registers a new autoload function using spl_autoload_register.
*
* @package Dropbox
* @copyright Copyright (C) 2010 Rooftop Solutions. All rights reserved.
* @author Evert Pot (http://www.rooftopsolutions.nl/)
* @license http://code.google.com/p/dropbox-php/wiki/License MIT
*/
/**
* Autoloader function
*
* @param $className string
* @return void
*/
function Dropbox_autoload($className) {
if(strpos($className,'Dropbox_')===0) {
include dirname(__FILE__) . '/' . str_replace('_','/',substr($className,8)) . '.php';
}
}
spl_autoload_register('Dropbox_autoload');
+21
View File
@@ -0,0 +1,21 @@
The MIT License
Copyright (c) 2007 Andy Smith
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.
Vendored Executable
+751
View File
@@ -0,0 +1,751 @@
<?php
// vim: foldmethod=marker
/* Generic exception class
*/
class OAuthException extends Exception {/*{{{*/
// pass
}/*}}}*/
class OAuthConsumer {/*{{{*/
public $key;
public $secret;
public function __construct($key, $secret, $callback_url=NULL) {/*{{{*/
$this->key = $key;
$this->secret = $secret;
$this->callback_url = $callback_url;
}/*}}}*/
}/*}}}*/
class OAuthToken {/*{{{*/
// access tokens and request tokens
public $key;
public $secret;
/**
* key = the token
* secret = the token secret
*/
function __construct($key, $secret) {/*{{{*/
$this->key = $key;
$this->secret = $secret;
}/*}}}*/
/**
* generates the basic string serialization of a token that a server
* would respond to request_token and access_token calls with
*/
function to_string() {/*{{{*/
return "oauth_token=" . OAuthUtil::urlencodeRFC3986($this->key) .
"&oauth_token_secret=" . OAuthUtil::urlencodeRFC3986($this->secret);
}/*}}}*/
function __toString() {/*{{{*/
return $this->to_string();
}/*}}}*/
}/*}}}*/
class OAuthSignatureMethod {/*{{{*/
public function check_signature(&$request, $consumer, $token, $signature) {
$built = $this->build_signature($request, $consumer, $token);
return $built == $signature;
}
}/*}}}*/
class OAuthSignatureMethod_HMAC_SHA1 extends OAuthSignatureMethod {/*{{{*/
function get_name() {/*{{{*/
return "HMAC-SHA1";
}/*}}}*/
public function build_signature($request, $consumer, $token, $privKey=NULL) {/*{{{*/
$base_string = $request->get_signature_base_string();
$request->base_string = $base_string;
$key_parts = array(
$consumer->secret,
($token) ? $token->secret : ""
);
$key_parts = array_map(array('OAuthUtil','urlencodeRFC3986'), $key_parts);
$key = implode('&', $key_parts);
return base64_encode( hash_hmac('sha1', $base_string, $key, true));
}/*}}}*/
}/*}}}*/
class OAuthSignatureMethod_RSA_SHA1 extends OAuthSignatureMethod {/*{{{*/
public function get_name() {/*{{{*/
return "RSA-SHA1";
}/*}}}*/
protected function fetch_public_cert(&$request) {/*{{{*/
// not implemented yet, ideas are:
// (1) do a lookup in a table of trusted certs keyed off of consumer
// (2) fetch via http using a url provided by the requester
// (3) some sort of specific discovery code based on request
//
// either way should return a string representation of the certificate
throw Exception("fetch_public_cert not implemented");
}/*}}}*/
protected function fetch_private_cert($privKey) {//&$request) {/*{{{*/
// not implemented yet, ideas are:
// (1) do a lookup in a table of trusted certs keyed off of consumer
//
// either way should return a string representation of the certificate
throw Exception("fetch_private_cert not implemented");
}/*}}}*/
public function build_signature(&$request, $consumer, $token, $privKey) {/*{{{*/
$base_string = $request->get_signature_base_string();
// Fetch the private key cert based on the request
//$cert = $this->fetch_private_cert($consumer->privKey);
//Pull the private key ID from the certificate
//$privatekeyid = openssl_get_privatekey($cert);
// hacked in
if ($privKey == '') {
$fp = fopen($GLOBALS['PRIV_KEY_FILE'], "r");
$privKey = fread($fp, 8192);
fclose($fp);
}
$privatekeyid = openssl_get_privatekey($privKey);
//Check the computer signature against the one passed in the query
$ok = openssl_sign($base_string, $signature, $privatekeyid);
//Release the key resource
openssl_free_key($privatekeyid);
return base64_encode($signature);
} /*}}}*/
public function check_signature(&$request, $consumer, $token, $signature) {/*{{{*/
$decoded_sig = base64_decode($signature);
$base_string = $request->get_signature_base_string();
// Fetch the public key cert based on the request
$cert = $this->fetch_public_cert($request);
//Pull the public key ID from the certificate
$publickeyid = openssl_get_publickey($cert);
//Check the computer signature against the one passed in the query
$ok = openssl_verify($base_string, $decoded_sig, $publickeyid);
//Release the key resource
openssl_free_key($publickeyid);
return $ok == 1;
} /*}}}*/
}/*}}}*/
class OAuthRequest {/*{{{*/
private $parameters;
private $http_method;
private $http_url;
// for debug purposes
public $base_string;
public static $version = '1.0';
function __construct($http_method, $http_url, $parameters=NULL) {/*{{{*/
@$parameters or $parameters = array();
$this->parameters = $parameters;
$this->http_method = $http_method;
$this->http_url = $http_url;
}/*}}}*/
/**
* attempt to build up a request from what was passed to the server
*/
public static function from_request($http_method=NULL, $http_url=NULL, $parameters=NULL) {/*{{{*/
$scheme = (!isset($_SERVER['HTTPS']) || $_SERVER['HTTPS'] != "on") ? 'http' : 'https';
@$http_url or $http_url = $scheme . '://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
@$http_method or $http_method = $_SERVER['REQUEST_METHOD'];
$request_headers = OAuthRequest::get_headers();
// let the library user override things however they'd like, if they know
// which parameters to use then go for it, for example XMLRPC might want to
// do this
if ($parameters) {
$req = new OAuthRequest($http_method, $http_url, $parameters);
}
// next check for the auth header, we need to do some extra stuff
// if that is the case, namely suck in the parameters from GET or POST
// so that we can include them in the signature
else if (@substr($request_headers['Authorization'], 0, 5) == "OAuth") {
$header_parameters = OAuthRequest::split_header($request_headers['Authorization']);
if ($http_method == "GET") {
$req_parameters = $_GET;
}
else if ($http_method = "POST") {
$req_parameters = $_POST;
}
$parameters = array_merge($header_parameters, $req_parameters);
$req = new OAuthRequest($http_method, $http_url, $parameters);
}
else if ($http_method == "GET") {
$req = new OAuthRequest($http_method, $http_url, $_GET);
}
else if ($http_method == "POST") {
$req = new OAuthRequest($http_method, $http_url, $_POST);
}
return $req;
}/*}}}*/
/**
* pretty much a helper function to set up the request
*/
public static function from_consumer_and_token($consumer, $token, $http_method, $http_url, $parameters=NULL) {/*{{{*/
@$parameters or $parameters = array();
$defaults = array("oauth_version" => OAuthRequest::$version,
"oauth_nonce" => OAuthRequest::generate_nonce(),
"oauth_timestamp" => OAuthRequest::generate_timestamp(),
"oauth_consumer_key" => $consumer->key);
$parameters = array_merge($defaults, $parameters);
if ($token) {
$parameters['oauth_token'] = $token->key;
}
// oauth v1.0a
/*if (isset($_REQUEST['oauth_verifier'])) {
$parameters['oauth_verifier'] = $_REQUEST['oauth_verifier'];
}*/
return new OAuthRequest($http_method, $http_url, $parameters);
}/*}}}*/
public function set_parameter($name, $value) {/*{{{*/
$this->parameters[$name] = $value;
}/*}}}*/
public function get_parameter($name) {/*{{{*/
return $this->parameters[$name];
}/*}}}*/
public function get_parameters() {/*{{{*/
return $this->parameters;
}/*}}}*/
/**
* Returns the normalized parameters of the request
*
* This will be all (except oauth_signature) parameters,
* sorted first by key, and if duplicate keys, then by
* value.
*
* The returned string will be all the key=value pairs
* concated by &.
*
* @return string
*/
public function get_signable_parameters() {/*{{{*/
// Grab all parameters
$params = $this->parameters;
// Remove oauth_signature if present
if (isset($params['oauth_signature'])) {
unset($params['oauth_signature']);
}
// Urlencode both keys and values
$keys = array_map(array('OAuthUtil', 'urlencodeRFC3986'), array_keys($params));
$values = array_map(array('OAuthUtil', 'urlencodeRFC3986'), array_values($params));
$params = array_combine($keys, $values);
// Sort by keys (natsort)
uksort($params, 'strnatcmp');
if(isset($params['title']) && isset($params['title-exact'])) {
$temp = $params['title-exact'];
$title = $params['title'];
unset($params['title']);
unset($params['title-exact']);
$params['title-exact'] = $temp;
$params['title'] = $title;
}
// Generate key=value pairs
$pairs = array();
foreach ($params as $key=>$value ) {
if (is_array($value)) {
// If the value is an array, it's because there are multiple
// with the same key, sort them, then add all the pairs
natsort($value);
foreach ($value as $v2) {
$pairs[] = $key . '=' . $v2;
}
} else {
$pairs[] = $key . '=' . $value;
}
}
// Return the pairs, concated with &
return implode('&', $pairs);
}/*}}}*/
/**
* Returns the base string of this request
*
* The base string defined as the method, the url
* and the parameters (normalized), each urlencoded
* and the concated with &.
*/
public function get_signature_base_string() {/*{{{*/
$parts = array(
$this->get_normalized_http_method(),
$this->get_normalized_http_url(),
$this->get_signable_parameters()
);
$parts = array_map(array('OAuthUtil', 'urlencodeRFC3986'), $parts);
return implode('&', $parts);
}/*}}}*/
/**
* just uppercases the http method
*/
public function get_normalized_http_method() {/*{{{*/
return strtoupper($this->http_method);
}/*}}}*/
/**
* parses the url and rebuilds it to be
* scheme://host/path
*/
public function get_normalized_http_url() {
$parts = parse_url($this->http_url);
$scheme = (isset($parts['scheme'])) ? $parts['scheme'] : 'http';
$port = (isset($parts['port'])) ? $parts['port'] : (($scheme == 'https') ? '443' : '80');
$host = (isset($parts['host'])) ? strtolower($parts['host']) : '';
$path = (isset($parts['path'])) ? $parts['path'] : '';
if (($scheme == 'https' && $port != '443')
|| ($scheme == 'http' && $port != '80')) {
$host = "$host:$port";
}
return "$scheme://$host$path";
}
/**
* builds a url usable for a GET request
*/
public function to_url() {/*{{{*/
$out = $this->get_normalized_http_url() . "?";
$out .= $this->to_postdata();
return $out;
}/*}}}*/
/**
* builds the data one would send in a POST request
*/
public function to_postdata() {/*{{{*/
$total = array();
foreach ($this->parameters as $k => $v) {
$total[] = OAuthUtil::urlencodeRFC3986($k) . "=" . OAuthUtil::urlencodeRFC3986($v);
}
$out = implode("&", $total);
return $out;
}/*}}}*/
/**
* builds the Authorization: header
*/
public function to_header() {/*{{{*/
$out ='Authorization: OAuth ';
$total = array();
/*
$sig = $this->parameters['oauth_signature'];
unset($this->parameters['oauth_signature']);
uksort($this->parameters, 'strnatcmp');
$this->parameters['oauth_signature'] = $sig;
*/
foreach ($this->parameters as $k => $v) {
if (substr($k, 0, 5) != "oauth") continue;
$out .= OAuthUtil::urlencodeRFC3986($k) . '="' . OAuthUtil::urlencodeRFC3986($v) . '", ';
}
$out = substr_replace($out, '', strlen($out) - 2);
return $out;
}/*}}}*/
public function __toString() {/*{{{*/
return $this->to_url();
}/*}}}*/
public function sign_request($signature_method, $consumer, $token, $privKey=NULL) {/*{{{*/
$this->set_parameter("oauth_signature_method", $signature_method->get_name());
$signature = $this->build_signature($signature_method, $consumer, $token, $privKey);
$this->set_parameter("oauth_signature", $signature);
}/*}}}*/
public function build_signature($signature_method, $consumer, $token, $privKey=NULL) {/*{{{*/
$signature = $signature_method->build_signature($this, $consumer, $token, $privKey);
return $signature;
}/*}}}*/
/**
* util function: current timestamp
*/
private static function generate_timestamp() {/*{{{*/
return time();
}/*}}}*/
/**
* util function: current nonce
*/
private static function generate_nonce() {/*{{{*/
$mt = microtime();
$rand = mt_rand();
return md5($mt . $rand); // md5s look nicer than numbers
}/*}}}*/
/**
* util function for turning the Authorization: header into
* parameters, has to do some unescaping
*/
private static function split_header($header) {/*{{{*/
// this should be a regex
// error cases: commas in parameter values
$parts = explode(",", $header);
$out = array();
foreach ($parts as $param) {
$param = ltrim($param);
// skip the "realm" param, nobody ever uses it anyway
if (substr($param, 0, 5) != "oauth") continue;
$param_parts = explode("=", $param);
// rawurldecode() used because urldecode() will turn a "+" in the
// value into a space
$out[$param_parts[0]] = rawurldecode(substr($param_parts[1], 1, -1));
}
return $out;
}/*}}}*/
/**
* helper to try to sort out headers for people who aren't running apache
*/
private static function get_headers() {/*{{{*/
if (function_exists('apache_request_headers')) {
// we need this to get the actual Authorization: header
// because apache tends to tell us it doesn't exist
return apache_request_headers();
}
// otherwise we don't have apache and are just going to have to hope
// that $_SERVER actually contains what we need
$out = array();
foreach ($_SERVER as $key => $value) {
if (substr($key, 0, 5) == "HTTP_") {
// this is chaos, basically it is just there to capitalize the first
// letter of every word that is not an initial HTTP and strip HTTP
// code from przemek
$key = str_replace(" ", "-", ucwords(strtolower(str_replace("_", " ", substr($key, 5)))));
$out[$key] = $value;
}
}
return $out;
}/*}}}*/
}/*}}}*/
class OAuthServer {/*{{{*/
protected $timestamp_threshold = 300; // in seconds, five minutes
protected $version = 1.0; // hi blaine
protected $signature_methods = array();
protected $data_store;
function __construct($data_store) {/*{{{*/
$this->data_store = $data_store;
}/*}}}*/
public function add_signature_method($signature_method) {/*{{{*/
$this->signature_methods[$signature_method->get_name()] =
$signature_method;
}/*}}}*/
// high level functions
/**
* process a request_token request
* returns the request token on success
*/
public function fetch_request_token(&$request) {/*{{{*/
$this->get_version($request);
$consumer = $this->get_consumer($request);
// no token required for the initial token request
$token = NULL;
$this->check_signature($request, $consumer, $token);
$new_token = $this->data_store->new_request_token($consumer);
return $new_token;
}/*}}}*/
/**
* process an access_token request
* returns the access token on success
*/
public function fetch_access_token(&$request) {/*{{{*/
$this->get_version($request);
$consumer = $this->get_consumer($request);
// requires authorized request token
$token = $this->get_token($request, $consumer, "request");
$this->check_signature($request, $consumer, $token);
$new_token = $this->data_store->new_access_token($token, $consumer);
return $new_token;
}/*}}}*/
/**
* verify an api call, checks all the parameters
*/
public function verify_request(&$request) {/*{{{*/
$this->get_version($request);
$consumer = $this->get_consumer($request);
$token = $this->get_token($request, $consumer, "access");
$this->check_signature($request, $consumer, $token);
return array($consumer, $token);
}/*}}}*/
// Internals from here
/**
* version 1
*/
private function get_version(&$request) {/*{{{*/
$version = $request->get_parameter("oauth_version");
if (!$version) {
$version = 1.0;
}
if ($version && $version != $this->version) {
throw new OAuthException("OAuth version '$version' not supported");
}
return $version;
}/*}}}*/
/**
* figure out the signature with some defaults
*/
private function get_signature_method(&$request) {/*{{{*/
$signature_method =
@$request->get_parameter("oauth_signature_method");
if (!$signature_method) {
$signature_method = "PLAINTEXT";
}
if (!in_array($signature_method,
array_keys($this->signature_methods))) {
throw new OAuthException(
"Signature method '$signature_method' not supported try one of the following: " . implode(", ", array_keys($this->signature_methods))
);
}
return $this->signature_methods[$signature_method];
}/*}}}*/
/**
* try to find the consumer for the provided request's consumer key
*/
private function get_consumer(&$request) {/*{{{*/
$consumer_key = @$request->get_parameter("oauth_consumer_key");
if (!$consumer_key) {
throw new OAuthException("Invalid consumer key");
}
$consumer = $this->data_store->lookup_consumer($consumer_key);
if (!$consumer) {
throw new OAuthException("Invalid consumer");
}
return $consumer;
}/*}}}*/
/**
* try to find the token for the provided request's token key
*/
private function get_token(&$request, $consumer, $token_type="access") {/*{{{*/
$token_field = @$request->get_parameter('oauth_token');
$token = $this->data_store->lookup_token(
$consumer, $token_type, $token_field
);
if (!$token) {
throw new OAuthException("Invalid $token_type token: $token_field");
}
return $token;
}/*}}}*/
/**
* all-in-one function to check the signature on a request
* should guess the signature method appropriately
*/
private function check_signature(&$request, $consumer, $token) {/*{{{*/
// this should probably be in a different method
$timestamp = @$request->get_parameter('oauth_timestamp');
$nonce = @$request->get_parameter('oauth_nonce');
$this->check_timestamp($timestamp);
$this->check_nonce($consumer, $token, $nonce, $timestamp);
$signature_method = $this->get_signature_method($request);
$signature = $request->get_parameter('oauth_signature');
$valid_sig = $signature_method->check_signature(
$request,
$consumer,
$token,
$signature
);
if (!$valid_sig) {
throw new OAuthException("Invalid signature");
}
}/*}}}*/
/**
* check that the timestamp is new enough
*/
private function check_timestamp($timestamp) {/*{{{*/
// verify that timestamp is recentish
$now = time();
if ($now - $timestamp > $this->timestamp_threshold) {
throw new OAuthException("Expired timestamp, yours $timestamp, ours $now");
}
}/*}}}*/
/**
* check that the nonce is not repeated
*/
private function check_nonce($consumer, $token, $nonce, $timestamp) {/*{{{*/
// verify that the nonce is uniqueish
$found = $this->data_store->lookup_nonce($consumer, $token, $nonce, $timestamp);
if ($found) {
throw new OAuthException("Nonce already used: $nonce");
}
}/*}}}*/
}/*}}}*/
class OAuthDataStore {/*{{{*/
function lookup_consumer($consumer_key) {/*{{{*/
// implement me
}/*}}}*/
function lookup_token($consumer, $token_type, $token) {/*{{{*/
// implement me
}/*}}}*/
function lookup_nonce($consumer, $token, $nonce, $timestamp) {/*{{{*/
// implement me
}/*}}}*/
function fetch_request_token($consumer) {/*{{{*/
// return a new token attached to this consumer
}/*}}}*/
function fetch_access_token($token, $consumer) {/*{{{*/
// return a new access token attached to this consumer
// for the user associated with this token if the request token
// is authorized
// should also invalidate the request token
}/*}}}*/
}/*}}}*/
/* A very naive dbm-based oauth storage
*/
class SimpleOAuthDataStore extends OAuthDataStore {/*{{{*/
private $dbh;
function __construct($path = "oauth.gdbm") {/*{{{*/
$this->dbh = dba_popen($path, 'c', 'gdbm');
}/*}}}*/
function __destruct() {/*{{{*/
dba_close($this->dbh);
}/*}}}*/
function lookup_consumer($consumer_key) {/*{{{*/
$rv = dba_fetch("consumer_$consumer_key", $this->dbh);
if ($rv === FALSE) {
return NULL;
}
$obj = unserialize($rv);
if (!($obj instanceof OAuthConsumer)) {
return NULL;
}
return $obj;
}/*}}}*/
function lookup_token($consumer, $token_type, $token) {/*{{{*/
$rv = dba_fetch("${token_type}_${token}", $this->dbh);
if ($rv === FALSE) {
return NULL;
}
$obj = unserialize($rv);
if (!($obj instanceof OAuthToken)) {
return NULL;
}
return $obj;
}/*}}}*/
function lookup_nonce($consumer, $token, $nonce, $timestamp) {/*{{{*/
return dba_exists("nonce_$nonce", $this->dbh);
}/*}}}*/
function new_token($consumer, $type="request") {/*{{{*/
$key = md5(time());
$secret = time() + time();
$token = new OAuthToken($key, md5(md5($secret)));
if (!dba_insert("${type}_$key", serialize($token), $this->dbh)) {
throw new OAuthException("doooom!");
}
return $token;
}/*}}}*/
function new_request_token($consumer) {/*{{{*/
return $this->new_token($consumer, "request");
}/*}}}*/
function new_access_token($token, $consumer) {/*{{{*/
$token = $this->new_token($consumer, 'access');
dba_delete("request_" . $token->key, $this->dbh);
return $token;
}/*}}}*/
}/*}}}*/
class OAuthUtil {/*{{{*/
public static function urlencodeRFC3986($string) {/*{{{*/
return str_replace('%7E', '~', rawurlencode($string));
}/*}}}*/
public static function urldecodeRFC3986($string) {/*{{{*/
return rawurldecode($string);
}/*}}}*/
}/*}}}*/
?>
+185
View File
@@ -0,0 +1,185 @@
<?php
/* Copyright (c) 2009 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Author: Eric Bidelman <e.bidelman@google.com>
*/
$PRIV_KEY_FILE = '/path/to/your/rsa_private_key.pem';
// OAuth library - http://oauth.googlecode.com/svn/code/php/
require_once('OAuth.php');
// Google's accepted signature methods
$hmac_method = new OAuthSignatureMethod_HMAC_SHA1();
$rsa_method = new OAuthSignatureMethod_RSA_SHA1();
$SIG_METHODS = array($rsa_method->get_name() => $rsa_method,
$hmac_method->get_name() => $hmac_method);
/**
* Makes an HTTP request to the specified URL
*
* @param string $http_method The HTTP method (GET, POST, PUT, DELETE)
* @param string $url Full URL of the resource to access
* @param array $extraHeaders (optional) Additional headers to include in each
* request. Elements are header/value pair strings ('Host: example.com')
* @param string $postData (optional) POST/PUT request body
* @param bool $returnResponseHeaders True if resp. headers should be returned.
* @return string Response body from the server
*/
function send_signed_request($http_method, $url, $extraHeaders=null,
$postData=null, $returnResponseHeaders=true) {
$curl = curl_init($url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_FAILONERROR, false);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
// Return request headers in the reponse
// curl_setopt($curl, CURLINFO_HEADER_OUT, true);
// Return response headers ni the response?
if ($returnResponseHeaders) {
curl_setopt($curl, CURLOPT_HEADER, true);
}
$headers = array();
//$headers[] = 'GData-Version: 2.0'; // use GData v2 by default
if (is_array($extraHeaders)) {
$headers = array_merge($headers, $extraHeaders);
}
// Setup default curl options for each type of HTTP request.
// This is also a great place to add additional headers for each request.
switch($http_method) {
case 'GET':
curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
break;
case 'POST':
curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_POSTFIELDS, $postData);
break;
case 'PUT':
$headers[] = 'If-Match: *';
curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, $http_method);
curl_setopt($curl, CURLOPT_POSTFIELDS, $postData);
break;
case 'DELETE':
$headers[] = 'If-Match: *';
curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, $http_method);
break;
default:
curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
}
// Execute the request. If an error occures, fill the response body with it.
$response = curl_exec($curl);
if (!$response) {
$response = curl_error($curl);
}
// Add server's response headers to our response body
$response = curl_getinfo($curl, CURLINFO_HEADER_OUT) . $response;
curl_close($curl);
return $response;
}
/**
* Takes XML as a string and returns it nicely indented
*
* @param string $xml The xml to beautify
* @param boolean $html_output True if returned XML should be escaped for HTML.
* @return string The beautified xml
*/
function xml_pretty_printer($xml, $html_output=false) {
$xml_obj = new SimpleXMLElement($xml);
$level = 2;
// Get an array containing each XML element
$xml = explode("\n", preg_replace('/>\s*</', ">\n<", $xml_obj->asXML()));
// Hold current indentation level
$indent = 0;
$pretty = array();
// Shift off opening XML tag if present
if (count($xml) && preg_match('/^<\?\s*xml/', $xml[0])) {
$pretty[] = array_shift($xml);
}
foreach ($xml as $el) {
if (preg_match('/^<([\w])+[^>\/]*>$/U', $el)) {
// opening tag, increase indent
$pretty[] = str_repeat(' ', $indent) . $el;
$indent += $level;
} else {
if (preg_match('/^<\/.+>$/', $el)) {
$indent -= $level; // closing tag, decrease indent
}
if ($indent < 0) {
$indent += $level;
}
$pretty[] = str_repeat(' ', $indent) . $el;
}
}
$xml = implode("\n", $pretty);
return $html_output ? htmlentities($xml) : $xml;
}
/**
* Joins key/value pairs by $inner_glue and each pair together by $outer_glue.
*
* Example: implode_assoc('=', '&', array('a' => 1, 'b' => 2)) === 'a=1&b=2'
*
* @param string $inner_glue What to implode each key/value pair with
* @param string $outer_glue What to impode each key/value string subset with
* @param array $array Associative array of query parameters
* @return string Urlencoded string of query parameters
*/
function implode_assoc($inner_glue, $outer_glue, $array) {
$output = array();
foreach($array as $key => $item) {
$output[] = $key . $inner_glue . urlencode($item);
}
return implode($outer_glue, $output);
}
/**
* Explodes a string of key/value url parameters into an associative array.
* This method performs the compliment operations of implode_assoc().
*
* Example: explode_assoc('=', '&', 'a=1&b=2') === array('a' => 1, 'b' => 2)
*
* @param string $inner_glue What each key/value pair is joined with
* @param string $outer_glue What each set of key/value pairs is joined with.
* @param array $array Associative array of query parameters
* @return array Urlencoded string of query parameters
*/
function explode_assoc($inner_glue, $outer_glue, $params) {
$tempArr = explode($outer_glue, $params);
foreach($tempArr as $val) {
$pos = strpos($val, $inner_glue);
$key = substr($val, 0, $pos);
$array2[$key] = substr($val, $pos + 1, strlen($val));
}
return $array2;
}
?>
+586 -315
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -42,7 +42,7 @@
// | Author: Lukas Smith <smith@pooteeweet.org> |
// +----------------------------------------------------------------------+
//
// $Id: Date.php,v 1.10 2006/03/01 12:15:32 lsmith Exp $
// $Id$
//
/**
+65 -47
View File
@@ -42,9 +42,9 @@
// | Author: Lukas Smith <smith@pooteeweet.org> |
// +----------------------------------------------------------------------+
//
// $Id: Common.php,v 1.139 2008/12/04 11:50:42 afz Exp $
// $Id$
require_once('MDB2/LOB.php');
require_once 'MDB2/LOB.php';
/**
* @package MDB2
@@ -100,7 +100,7 @@ class MDB2_Driver_Datatype_Common extends MDB2_Module_Common
function getValidTypes()
{
$types = $this->valid_default_values;
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@@ -145,7 +145,7 @@ class MDB2_Driver_Datatype_Common extends MDB2_Module_Common
$types = is_array($types) ? $types : array($types);
foreach ($types as $key => $type) {
if (!isset($this->valid_default_values[$type])) {
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@@ -209,7 +209,7 @@ class MDB2_Driver_Datatype_Common extends MDB2_Module_Common
return fopen('MDB2LOB://'.$lob_index.'@'.$this->db_index, 'r+');
}
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@@ -232,10 +232,10 @@ class MDB2_Driver_Datatype_Common extends MDB2_Module_Common
*/
function convertResult($value, $type, $rtrim = true)
{
if (is_null($value)) {
if (null === $value) {
return null;
}
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@@ -263,7 +263,11 @@ class MDB2_Driver_Datatype_Common extends MDB2_Module_Common
*/
function convertResultRow($types, $row, $rtrim = true)
{
$types = $this->_sortResultFieldTypes(array_keys($row), $types);
//$types = $this->_sortResultFieldTypes(array_keys($row), $types);
$keys = array_keys($row);
if (is_int($keys[0])) {
$types = $this->_sortResultFieldTypes($keys, $types);
}
foreach ($row as $key => $value) {
if (empty($types[$key])) {
continue;
@@ -313,7 +317,7 @@ class MDB2_Driver_Datatype_Common extends MDB2_Module_Common
if (count($types)) {
reset($types);
foreach (array_keys($sorted_types) as $k) {
if (is_null($sorted_types[$k])) {
if (null === $sorted_types[$k]) {
$sorted_types[$k] = current($types);
next($types);
}
@@ -338,7 +342,7 @@ class MDB2_Driver_Datatype_Common extends MDB2_Module_Common
*/
function getDeclaration($type, $name, $field)
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@@ -387,7 +391,7 @@ class MDB2_Driver_Datatype_Common extends MDB2_Module_Common
*/
function getTypeDeclaration($field)
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@@ -453,7 +457,7 @@ class MDB2_Driver_Datatype_Common extends MDB2_Module_Common
*/
function _getDeclaration($name, $field)
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@@ -501,17 +505,17 @@ class MDB2_Driver_Datatype_Common extends MDB2_Module_Common
$default = '';
if (array_key_exists('default', $field)) {
if ($field['default'] === '') {
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
$valid_default_values = $this->getValidTypes();
$field['default'] = $valid_default_values[$field['type']];
if ($field['default'] === ''&& ($db->options['portability'] & MDB2_PORTABILITY_EMPTY_TO_NULL)) {
if ($field['default'] === '' && ($db->options['portability'] & MDB2_PORTABILITY_EMPTY_TO_NULL)) {
$field['default'] = ' ';
}
}
if (!is_null($field['default'])) {
if (null !== $field['default']) {
$default = ' DEFAULT ' . $this->quote($field['default'], $field['type']);
}
}
@@ -524,7 +528,7 @@ class MDB2_Driver_Datatype_Common extends MDB2_Module_Common
// }}}
// {{{ _getCharsetFieldDeclaration()
/**
* Obtain DBMS specific SQL code portion needed to set the CHARACTER SET
* of a field declaration to be used in statements like CREATE TABLE.
@@ -583,7 +587,7 @@ class MDB2_Driver_Datatype_Common extends MDB2_Module_Common
function _getIntegerDeclaration($name, $field)
{
if (!empty($field['unsigned'])) {
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@@ -651,7 +655,7 @@ class MDB2_Driver_Datatype_Common extends MDB2_Module_Common
*/
function _getCLOBDeclaration($name, $field)
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@@ -687,7 +691,7 @@ class MDB2_Driver_Datatype_Common extends MDB2_Module_Common
*/
function _getBLOBDeclaration($name, $field)
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@@ -875,7 +879,7 @@ class MDB2_Driver_Datatype_Common extends MDB2_Module_Common
$type = !empty($current['type']) ? $current['type'] : null;
if (!method_exists($this, "_compare{$type}Definition")) {
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@@ -1114,12 +1118,12 @@ class MDB2_Driver_Datatype_Common extends MDB2_Module_Common
*/
function quote($value, $type = null, $quote = true, $escape_wildcards = false)
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
if (is_null($value)
if ((null === $value)
|| ($value === '' && $db->options['portability'] & MDB2_PORTABILITY_EMPTY_TO_NULL)
) {
if (!$quote) {
@@ -1128,7 +1132,7 @@ class MDB2_Driver_Datatype_Common extends MDB2_Module_Common
return 'NULL';
}
if (is_null($type)) {
if (null === $type) {
switch (gettype($value)) {
case 'integer':
$type = 'integer';
@@ -1218,7 +1222,7 @@ class MDB2_Driver_Datatype_Common extends MDB2_Module_Common
return $value;
}
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@@ -1247,14 +1251,14 @@ class MDB2_Driver_Datatype_Common extends MDB2_Module_Common
$close = false;
if (preg_match('/^(\w+:\/\/)(.*)$/', $value, $match)) {
$close = true;
if ($match[1] == 'file://') {
if (strtolower($match[1]) == 'file://') {
$value = $match[2];
}
$value = @fopen($value, 'r');
}
if (is_resource($value)) {
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@@ -1288,9 +1292,15 @@ class MDB2_Driver_Datatype_Common extends MDB2_Module_Common
*/
function _quoteLOB($value, $quote, $escape_wildcards)
{
$value = $this->_readFile($value);
if (PEAR::isError($value)) {
return $value;
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
if ($db->options['lob_allow_url_include']) {
$value = $this->_readFile($value);
if (PEAR::isError($value)) {
return $value;
}
}
return $this->_quoteText($value, $quote, $escape_wildcards);
}
@@ -1369,11 +1379,11 @@ class MDB2_Driver_Datatype_Common extends MDB2_Module_Common
function _quoteDate($value, $quote, $escape_wildcards)
{
if ($value === 'CURRENT_DATE') {
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
if (isset($db->function) && is_a($db->function, 'MDB2_Driver_Function_Common')) {
if (isset($db->function) && is_object($this->function) && is_a($db->function, 'MDB2_Driver_Function_Common')) {
return $db->function->now('date');
}
return 'CURRENT_DATE';
@@ -1398,11 +1408,11 @@ class MDB2_Driver_Datatype_Common extends MDB2_Module_Common
function _quoteTimestamp($value, $quote, $escape_wildcards)
{
if ($value === 'CURRENT_TIMESTAMP') {
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
if (isset($db->function) && is_a($db->function, 'MDB2_Driver_Function_Common')) {
if (isset($db->function) && is_object($db->function) && is_a($db->function, 'MDB2_Driver_Function_Common')) {
return $db->function->now('timestamp');
}
return 'CURRENT_TIMESTAMP';
@@ -1427,11 +1437,11 @@ class MDB2_Driver_Datatype_Common extends MDB2_Module_Common
function _quoteTime($value, $quote, $escape_wildcards)
{
if ($value === 'CURRENT_TIME') {
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
if (isset($db->function) && is_a($db->function, 'MDB2_Driver_Function_Common')) {
if (isset($db->function) && is_object($this->function) && is_a($db->function, 'MDB2_Driver_Function_Common')) {
return $db->function->now('time');
}
return 'CURRENT_TIME';
@@ -1517,7 +1527,7 @@ class MDB2_Driver_Datatype_Common extends MDB2_Module_Common
*/
function writeLOBToFile($lob, $file)
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@@ -1554,7 +1564,7 @@ class MDB2_Driver_Datatype_Common extends MDB2_Module_Common
*/
function _retrieveLOB(&$lob)
{
if (is_null($lob['value'])) {
if (null === $lob['value']) {
$lob['value'] = $lob['resource'];
}
$lob['loaded'] = true;
@@ -1681,27 +1691,38 @@ class MDB2_Driver_Datatype_Common extends MDB2_Module_Common
*/
function matchPattern($pattern, $operator = null, $field = null)
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
$match = '';
if (!is_null($operator)) {
if (null !== $operator) {
$operator = strtoupper($operator);
switch ($operator) {
// case insensitive
case 'ILIKE':
if (is_null($field)) {
if (null === $field) {
return $db->raiseError(MDB2_ERROR_UNSUPPORTED, null, null,
'case insensitive LIKE matching requires passing the field name', __FUNCTION__);
}
$db->loadModule('Function', null, true);
$match = $db->function->lower($field).' LIKE ';
break;
case 'NOT ILIKE':
if (null === $field) {
return $db->raiseError(MDB2_ERROR_UNSUPPORTED, null, null,
'case insensitive NOT ILIKE matching requires passing the field name', __FUNCTION__);
}
$db->loadModule('Function', null, true);
$match = $db->function->lower($field).' NOT LIKE ';
break;
// case sensitive
case 'LIKE':
$match = is_null($field) ? 'LIKE ' : $field.' LIKE ';
$match = (null === $field) ? 'LIKE ' : ($field.' LIKE ');
break;
case 'NOT LIKE':
$match = (null === $field) ? 'NOT LIKE ' : ($field.' NOT LIKE ');
break;
default:
return $db->raiseError(MDB2_ERROR_UNSUPPORTED, null, null,
@@ -1713,9 +1734,6 @@ class MDB2_Driver_Datatype_Common extends MDB2_Module_Common
if ($key % 2) {
$match.= $value;
} else {
if ($operator === 'ILIKE') {
$value = strtolower($value);
}
$escaped = $db->escape($value);
if (PEAR::isError($escaped)) {
return $escaped;
@@ -1755,7 +1773,7 @@ class MDB2_Driver_Datatype_Common extends MDB2_Module_Common
*/
function mapNativeDatatype($field)
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@@ -1784,7 +1802,7 @@ class MDB2_Driver_Datatype_Common extends MDB2_Module_Common
*/
function _mapNativeDatatype($field)
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@@ -1805,7 +1823,7 @@ class MDB2_Driver_Datatype_Common extends MDB2_Module_Common
*/
function mapPrepareDatatype($type)
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
+59 -10
View File
@@ -43,10 +43,10 @@
// | Author: Lukas Smith <smith@pooteeweet.org> |
// +----------------------------------------------------------------------+
//
// $Id: mysql.php,v 1.65 2008/02/22 19:23:49 quipo Exp $
// $Id$
//
require_once('MDB2/Driver/Datatype/Common.php');
require_once 'MDB2/Driver/Datatype/Common.php';
/**
* MDB2 MySQL driver
@@ -88,6 +88,35 @@ class MDB2_Driver_Datatype_mysql extends MDB2_Driver_Datatype_Common
return 'COLLATE '.$collation;
}
// }}}
// {{{ getDeclaration()
/**
* Obtain DBMS specific SQL code portion needed to declare
* of the given type
*
* @param string $type type to which the value should be converted to
* @param string $name name the field to be declared.
* @param string $field definition of the field
*
* @return string DBMS-specific SQL code portion that should be used to
* declare the specified field.
* @access public
*/
function getDeclaration($type, $name, $field)
{
// MySQL DDL syntax forbids combining NOT NULL with DEFAULT NULL.
// To get a default of NULL for NOT NULL columns, omit it.
if ( isset($field['notnull'])
&& !empty($field['notnull'])
&& array_key_exists('default', $field) // do not use isset() here!
&& null === $field['default']
) {
unset($field['default']);
}
return parent::getDeclaration($type, $name, $field);
}
// }}}
// {{{ getTypeDeclaration()
@@ -116,7 +145,7 @@ class MDB2_Driver_Datatype_mysql extends MDB2_Driver_Datatype_Common
*/
function getTypeDeclaration($field)
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@@ -179,7 +208,15 @@ class MDB2_Driver_Datatype_mysql extends MDB2_Driver_Datatype_Common
case 'timestamp':
return 'DATETIME';
case 'float':
return 'DOUBLE';
$l = '';
if (!empty($field['length'])) {
$l = '(' . $field['length'];
if (!empty($field['scale'])) {
$l .= ',' . $field['scale'];
}
$l .= ')';
}
return 'DOUBLE' . $l;
case 'decimal':
$length = !empty($field['length']) ? $field['length'] : 18;
$scale = !empty($field['scale']) ? $field['scale'] : $db->options['decimal_places'];
@@ -219,7 +256,7 @@ class MDB2_Driver_Datatype_mysql extends MDB2_Driver_Datatype_Common
*/
function _getIntegerDeclaration($name, $field)
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@@ -236,6 +273,9 @@ class MDB2_Driver_Datatype_mysql extends MDB2_Driver_Datatype_Common
$notnull = empty($field['notnull']) ? '' : ' NOT NULL';
$unsigned = empty($field['unsigned']) ? '' : ' UNSIGNED';
if (empty($default) && empty($notnull)) {
$default = ' DEFAULT NULL';
}
$name = $db->quoteIdentifier($name, true);
return $name.' '.$this->getTypeDeclaration($field).$unsigned.$default.$notnull.$autoinc;
}
@@ -308,7 +348,7 @@ class MDB2_Driver_Datatype_mysql extends MDB2_Driver_Datatype_Common
*/
function _getDecimalDeclaration($name, $field)
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@@ -346,24 +386,30 @@ class MDB2_Driver_Datatype_mysql extends MDB2_Driver_Datatype_Common
*/
function matchPattern($pattern, $operator = null, $field = null)
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
$match = '';
if (!is_null($operator)) {
$field = is_null($field) ? '' : $field.' ';
if (null !== $operator) {
$field = (null === $field) ? '' : $field.' ';
$operator = strtoupper($operator);
switch ($operator) {
// case insensitive
case 'ILIKE':
$match = $field.'LIKE ';
break;
case 'NOT ILIKE':
$match = $field.'NOT LIKE ';
break;
// case sensitive
case 'LIKE':
$match = $field.'LIKE BINARY ';
break;
case 'NOT LIKE':
$match = $field.'NOT LIKE BINARY ';
break;
default:
return $db->raiseError(MDB2_ERROR_UNSUPPORTED, null, null,
'not a supported operator type:'. $operator, __FUNCTION__);
@@ -504,6 +550,9 @@ class MDB2_Driver_Datatype_mysql extends MDB2_Driver_Datatype_Common
case 'real':
$type[] = 'float';
$unsigned = preg_match('/ unsigned/i', $field['type']);
if ($decimal !== false) {
$length = $length.','.$decimal;
}
break;
case 'unknown':
case 'decimal':
@@ -531,7 +580,7 @@ class MDB2_Driver_Datatype_mysql extends MDB2_Driver_Datatype_Common
$length = null;
break;
default:
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
+499
View File
@@ -0,0 +1,499 @@
<?php
// +----------------------------------------------------------------------+
// | PHP versions 4 and 5 |
// +----------------------------------------------------------------------+
// | Copyright (c) 1998-2007 Manuel Lemos, Tomas V.V.Cox, |
// | Stig. S. Bakken, Lukas Smith |
// | All rights reserved. |
// +----------------------------------------------------------------------+
// | MDB2 is a merge of PEAR DB and Metabases that provides a unified DB |
// | API as well as database abstraction for PHP applications. |
// | This LICENSE is in the BSD license style. |
// | |
// | Redistribution and use in source and binary forms, with or without |
// | modification, are permitted provided that the following conditions |
// | are met: |
// | |
// | Redistributions of source code must retain the above copyright |
// | notice, this list of conditions and the following disclaimer. |
// | |
// | Redistributions in binary form must reproduce the above copyright |
// | notice, this list of conditions and the following disclaimer in the |
// | documentation and/or other materials provided with the distribution. |
// | |
// | Neither the name of Manuel Lemos, Tomas V.V.Cox, Stig. S. Bakken, |
// | Lukas Smith nor the names of his contributors may be used to endorse |
// | or promote products derived from this software without specific prior|
// | written permission. |
// | |
// | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
// | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
// | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS |
// | FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE |
// | REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, |
// | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, |
// | BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS|
// | OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED |
// | AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
// | LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY|
// | WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
// | POSSIBILITY OF SUCH DAMAGE. |
// +----------------------------------------------------------------------+
// | Author: Lukas Smith <smith@pooteeweet.org> |
// +----------------------------------------------------------------------+
// $Id: oci8.php 295587 2010-02-28 17:16:38Z quipo $
require_once 'MDB2/Driver/Datatype/Common.php';
/**
* MDB2 OCI8 driver
*
* @package MDB2
* @category Database
* @author Lukas Smith <smith@pooteeweet.org>
*/
class MDB2_Driver_Datatype_oci8 extends MDB2_Driver_Datatype_Common
{
// {{{ _baseConvertResult()
/**
* general type conversion method
*
* @param mixed $value refernce to a value to be converted
* @param string $type specifies which type to convert to
* @param boolean $rtrim [optional] when TRUE [default], apply rtrim() to text
* @return object a MDB2 error on failure
* @access protected
*/
function _baseConvertResult($value, $type, $rtrim = true)
{
if (null === $value) {
return null;
}
switch ($type) {
case 'text':
if (is_object($value) && is_a($value, 'OCI-Lob')) {
//LOB => fetch into variable
$clob = $this->_baseConvertResult($value, 'clob', $rtrim);
if (!PEAR::isError($clob) && is_resource($clob)) {
$clob_value = '';
while (!feof($clob)) {
$clob_value .= fread($clob, 8192);
}
$this->destroyLOB($clob);
}
$value = $clob_value;
}
if ($rtrim) {
$value = rtrim($value);
}
return $value;
case 'date':
return substr($value, 0, strlen('YYYY-MM-DD'));
case 'time':
return substr($value, strlen('YYYY-MM-DD '), strlen('HH:MI:SS'));
}
return parent::_baseConvertResult($value, $type, $rtrim);
}
// }}}
// {{{ getTypeDeclaration()
/**
* Obtain DBMS specific SQL code portion needed to declare an text type
* field to be used in statements like CREATE TABLE.
*
* @param array $field associative array with the name of the properties
* of the field being declared as array indexes. Currently, the types
* of supported field properties are as follows:
*
* length
* Integer value that determines the maximum length of the text
* field. If this argument is missing the field should be
* declared to have the longest length allowed by the DBMS.
*
* default
* Text value to be used as default for this field.
*
* notnull
* Boolean flag that indicates whether this field is constrained
* to not be set to null.
* @return string DBMS specific SQL code portion that should be used to
* declare the specified field.
* @access public
*/
function getTypeDeclaration($field)
{
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
switch ($field['type']) {
case 'text':
$length = !empty($field['length'])
? $field['length'] : $db->options['default_text_field_length'];
$fixed = !empty($field['fixed']) ? $field['fixed'] : false;
return $fixed ? 'CHAR('.$length.')' : 'VARCHAR2('.$length.')';
case 'clob':
return 'CLOB';
case 'blob':
return 'BLOB';
case 'integer':
if (!empty($field['length'])) {
switch((int)$field['length']) {
case 1: $digit = 3; break;
case 2: $digit = 5; break;
case 3: $digit = 8; break;
case 4: $digit = 10; break;
case 5: $digit = 13; break;
case 6: $digit = 15; break;
case 7: $digit = 17; break;
case 8: $digit = 20; break;
default: $digit = 10;
}
return 'NUMBER('.$digit.')';
}
return 'INT';
case 'boolean':
return 'NUMBER(1)';
case 'date':
case 'time':
case 'timestamp':
return 'DATE';
case 'float':
return 'NUMBER';
case 'decimal':
$scale = !empty($field['scale']) ? $field['scale'] : $db->options['decimal_places'];
return 'NUMBER(*,'.$scale.')';
}
}
// }}}
// {{{ _quoteCLOB()
/**
* Convert a text value into a DBMS specific format that is suitable to
* compose query statements.
*
* @param string $value text string value that is intended to be converted.
* @param bool $quote determines if the value should be quoted and escaped
* @param bool $escape_wildcards if to escape escape wildcards
* @return string text string that represents the given argument value in
* a DBMS specific format.
* @access protected
*/
function _quoteCLOB($value, $quote, $escape_wildcards)
{
return 'EMPTY_CLOB()';
}
// }}}
// {{{ _quoteBLOB()
/**
* Convert a text value into a DBMS specific format that is suitable to
* compose query statements.
*
* @param string $value text string value that is intended to be converted.
* @param bool $quote determines if the value should be quoted and escaped
* @param bool $escape_wildcards if to escape escape wildcards
* @return string text string that represents the given argument value in
* a DBMS specific format.
* @access protected
*/
function _quoteBLOB($value, $quote, $escape_wildcards)
{
return 'EMPTY_BLOB()';
}
// }}}
// {{{ _quoteDate()
/**
* Convert a text value into a DBMS specific format that is suitable to
* compose query statements.
*
* @param string $value text string value that is intended to be converted.
* @param bool $quote determines if the value should be quoted and escaped
* @param bool $escape_wildcards if to escape escape wildcards
* @return string text string that represents the given argument value in
* a DBMS specific format.
* @access protected
*/
function _quoteDate($value, $quote, $escape_wildcards)
{
return $this->_quoteText("$value 00:00:00", $quote, $escape_wildcards);
}
// }}}
// {{{ _quoteTimestamp()
/**
* Convert a text value into a DBMS specific format that is suitable to
* compose query statements.
*
* @param string $value text string value that is intended to be converted.
* @param bool $quote determines if the value should be quoted and escaped
* @param bool $escape_wildcards if to escape escape wildcards
* @return string text string that represents the given argument value in
* a DBMS specific format.
* @access protected
*/
//function _quoteTimestamp($value, $quote, $escape_wildcards)
//{
// return $this->_quoteText($value, $quote, $escape_wildcards);
//}
// }}}
// {{{ _quoteTime()
/**
* Convert a text value into a DBMS specific format that is suitable to
* compose query statements.
*
* @param string $value text string value that is intended to be converted.
* @param bool $quote determines if the value should be quoted and escaped
* @param bool $escape_wildcards if to escape escape wildcards
* @return string text string that represents the given argument value in
* a DBMS specific format.
* @access protected
*/
function _quoteTime($value, $quote, $escape_wildcards)
{
return $this->_quoteText("0001-01-01 $value", $quote, $escape_wildcards);
}
// }}}
// {{{ writeLOBToFile()
/**
* retrieve LOB from the database
*
* @param array $lob array
* @param string $file name of the file into which the LOb should be fetched
* @return mixed MDB2_OK on success, a MDB2 error on failure
* @access protected
*/
function writeLOBToFile($lob, $file)
{
if (preg_match('/^(\w+:\/\/)(.*)$/', $file, $match)) {
if ($match[1] == 'file://') {
$file = $match[2];
}
}
$lob_data = stream_get_meta_data($lob);
$lob_index = $lob_data['wrapper_data']->lob_index;
$result = $this->lobs[$lob_index]['resource']->writetofile($file);
$this->lobs[$lob_index]['resource']->seek(0);
if (!$result) {
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
return $db->raiseError(null, null, null,
'Unable to write LOB to file', __FUNCTION__);
}
return MDB2_OK;
}
// }}}
// {{{ _retrieveLOB()
/**
* retrieve LOB from the database
*
* @param array $lob array
* @return mixed MDB2_OK on success, a MDB2 error on failure
* @access protected
*/
function _retrieveLOB(&$lob)
{
if (!is_object($lob['resource'])) {
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
return $db->raiseError(MDB2_ERROR_NOT_FOUND, null, null,
'attemped to retrieve LOB from non existing or NULL column', __FUNCTION__);
}
if (!$lob['loaded']
# && !method_exists($lob['resource'], 'read')
) {
$lob['value'] = $lob['resource']->load();
$lob['resource']->seek(0);
}
$lob['loaded'] = true;
return MDB2_OK;
}
// }}}
// {{{ _readLOB()
/**
* Read data from large object input stream.
*
* @param array $lob array
* @param blob $data reference to a variable that will hold data to be
* read from the large object input stream
* @param int $length integer value that indicates the largest ammount of
* data to be read from the large object input stream.
* @return mixed length on success, a MDB2 error on failure
* @access protected
*/
function _readLOB($lob, $length)
{
if ($lob['loaded']) {
return parent::_readLOB($lob, $length);
}
if (!is_object($lob['resource'])) {
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
return $db->raiseError(MDB2_ERROR_NOT_FOUND, null, null,
'attemped to retrieve LOB from non existing or NULL column', __FUNCTION__);
}
$data = $lob['resource']->read($length);
if (!is_string($data)) {
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
return $db->raiseError(null, null, null,
'Unable to read LOB', __FUNCTION__);
}
return $data;
}
// }}}
// {{{ patternEscapeString()
/**
* build string to define escape pattern string
*
* @access public
*
*
* @return string define escape pattern
*/
function patternEscapeString()
{
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
return " ESCAPE '". $db->string_quoting['escape_pattern'] ."'";
}
// }}}
// {{{ _mapNativeDatatype()
/**
* Maps a native array description of a field to a MDB2 datatype and length
*
* @param array $field native field description
* @return array containing the various possible types, length, sign, fixed
* @access public
*/
function _mapNativeDatatype($field)
{
$db_type = strtolower($field['type']);
$type = array();
$length = $unsigned = $fixed = null;
if (!empty($field['length'])) {
$length = $field['length'];
}
switch ($db_type) {
case 'integer':
case 'pls_integer':
case 'binary_integer':
$type[] = 'integer';
if ($length == '1') {
$type[] = 'boolean';
if (preg_match('/^(is|has)/', $field['name'])) {
$type = array_reverse($type);
}
}
break;
case 'varchar':
case 'varchar2':
case 'nvarchar2':
$fixed = false;
case 'char':
case 'nchar':
$type[] = 'text';
if ($length == '1') {
$type[] = 'boolean';
if (preg_match('/^(is|has)/', $field['name'])) {
$type = array_reverse($type);
}
}
if ($fixed !== false) {
$fixed = true;
}
break;
case 'date':
case 'timestamp':
$type[] = 'timestamp';
$length = null;
break;
case 'float':
$type[] = 'float';
break;
case 'number':
if (!empty($field['scale'])) {
$type[] = 'decimal';
$length = $length.','.$field['scale'];
} else {
$type[] = 'integer';
if ($length == '1') {
$type[] = 'boolean';
if (preg_match('/^(is|has)/', $field['name'])) {
$type = array_reverse($type);
}
}
}
break;
case 'long':
$type[] = 'text';
case 'clob':
case 'nclob':
$type[] = 'clob';
break;
case 'blob':
case 'raw':
case 'long raw':
case 'bfile':
$type[] = 'blob';
$length = null;
break;
case 'rowid':
case 'urowid':
default:
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
return $db->raiseError(MDB2_ERROR_UNSUPPORTED, null, null,
'unknown database attribute type: '.$db_type, __FUNCTION__);
}
if ((int)$length <= 0) {
$length = null;
}
return array($type, $length, $unsigned, $fixed);
}
}
?>
+40 -15
View File
@@ -42,9 +42,9 @@
// | Author: Paul Cooper <pgc@ucecom.com> |
// +----------------------------------------------------------------------+
//
// $Id: pgsql.php,v 1.93 2008/08/28 20:32:57 afz Exp $
// $Id$
require_once('MDB2/Driver/Datatype/Common.php');
require_once 'MDB2/Driver/Datatype/Common.php';
/**
* MDB2 PostGreSQL driver
@@ -68,7 +68,7 @@ class MDB2_Driver_Datatype_pgsql extends MDB2_Driver_Datatype_Common
*/
function _baseConvertResult($value, $type, $rtrim = true)
{
if (is_null($value)) {
if (null === $value) {
return null;
}
switch ($type) {
@@ -117,7 +117,7 @@ class MDB2_Driver_Datatype_pgsql extends MDB2_Driver_Datatype_Common
*/
function getTypeDeclaration($field)
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@@ -198,7 +198,7 @@ class MDB2_Driver_Datatype_pgsql extends MDB2_Driver_Datatype_Common
*/
function _getIntegerDeclaration($name, $field)
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@@ -219,6 +219,9 @@ class MDB2_Driver_Datatype_pgsql extends MDB2_Driver_Datatype_Common
}
$notnull = empty($field['notnull']) ? '' : ' NOT NULL';
if (empty($default) && empty($notnull)) {
$default = ' DEFAULT NULL';
}
$name = $db->quoteIdentifier($name, true);
return $name.' '.$this->getTypeDeclaration($field).$default.$notnull;
}
@@ -239,6 +242,16 @@ class MDB2_Driver_Datatype_pgsql extends MDB2_Driver_Datatype_Common
*/
function _quoteCLOB($value, $quote, $escape_wildcards)
{
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
if ($db->options['lob_allow_url_include']) {
$value = $this->_readFile($value);
if (PEAR::isError($value)) {
return $value;
}
}
return $this->_quoteText($value, $quote, $escape_wildcards);
}
@@ -261,11 +274,17 @@ class MDB2_Driver_Datatype_pgsql extends MDB2_Driver_Datatype_Common
if (!$quote) {
return $value;
}
if (version_compare(PHP_VERSION, '5.2.0RC6', '>=')) {
$db =$this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
if ($db->options['lob_allow_url_include']) {
$value = $this->_readFile($value);
if (PEAR::isError($value)) {
return $value;
}
}
if (version_compare(PHP_VERSION, '5.2.0RC6', '>=')) {
$connection = $db->getConnection();
if (PEAR::isError($connection)) {
return $connection;
@@ -317,24 +336,30 @@ class MDB2_Driver_Datatype_pgsql extends MDB2_Driver_Datatype_Common
*/
function matchPattern($pattern, $operator = null, $field = null)
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
$match = '';
if (!is_null($operator)) {
$field = is_null($field) ? '' : $field.' ';
if (null !== $operator) {
$field = (null === $field) ? '' : $field.' ';
$operator = strtoupper($operator);
switch ($operator) {
// case insensitive
case 'ILIKE':
$match = $field.'ILIKE ';
break;
case 'NOT ILIKE':
$match = $field.'NOT ILIKE ';
break;
// case sensitive
case 'LIKE':
$match = $field.'LIKE ';
break;
case 'NOT LIKE':
$match = $field.'NOT LIKE ';
break;
default:
return $db->raiseError(MDB2_ERROR_UNSUPPORTED, null, null,
'not a supported operator type:'. $operator, __FUNCTION__);
@@ -366,7 +391,7 @@ class MDB2_Driver_Datatype_pgsql extends MDB2_Driver_Datatype_Common
*/
function patternEscapeString()
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@@ -492,7 +517,7 @@ class MDB2_Driver_Datatype_pgsql extends MDB2_Driver_Datatype_Common
$length = null;
break;
default:
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@@ -519,7 +544,7 @@ class MDB2_Driver_Datatype_pgsql extends MDB2_Driver_Datatype_Common
*/
function mapPrepareDatatype($type)
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
+17 -8
View File
@@ -43,10 +43,10 @@
// | Author: Lukas Smith <smith@pooteeweet.org> |
// +----------------------------------------------------------------------+
//
// $Id: sqlite.php,v 1.67 2008/02/22 19:58:06 quipo Exp $
// $Id$
//
require_once('MDB2/Driver/Datatype/Common.php');
require_once 'MDB2/Driver/Datatype/Common.php';
/**
* MDB2 SQLite driver
@@ -101,7 +101,7 @@ class MDB2_Driver_Datatype_sqlite extends MDB2_Driver_Datatype_Common
*/
function getTypeDeclaration($field)
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@@ -199,7 +199,7 @@ class MDB2_Driver_Datatype_sqlite extends MDB2_Driver_Datatype_Common
*/
function _getIntegerDeclaration($name, $field)
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@@ -216,6 +216,9 @@ class MDB2_Driver_Datatype_sqlite extends MDB2_Driver_Datatype_Common
$notnull = empty($field['notnull']) ? '' : ' NOT NULL';
$unsigned = empty($field['unsigned']) ? '' : ' UNSIGNED';
if (empty($default) && empty($notnull)) {
$default = ' DEFAULT NULL';
}
$name = $db->quoteIdentifier($name, true);
return $name.' '.$this->getTypeDeclaration($field).$unsigned.$default.$notnull.$autoinc;
}
@@ -237,24 +240,30 @@ class MDB2_Driver_Datatype_sqlite extends MDB2_Driver_Datatype_Common
*/
function matchPattern($pattern, $operator = null, $field = null)
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
$match = '';
if (!is_null($operator)) {
$field = is_null($field) ? '' : $field.' ';
if (null !== $operator) {
$field = (null === $field) ? '' : $field.' ';
$operator = strtoupper($operator);
switch ($operator) {
// case insensitive
case 'ILIKE':
$match = $field.'LIKE ';
break;
case 'NOT ILIKE':
$match = $field.'NOT LIKE ';
break;
// case sensitive
case 'LIKE':
$match = $field.'LIKE ';
break;
case 'NOT LIKE':
$match = $field.'NOT LIKE ';
break;
default:
return $db->raiseError(MDB2_ERROR_UNSUPPORTED, null, null,
'not a supported operator type:'. $operator, __FUNCTION__);
@@ -388,7 +397,7 @@ class MDB2_Driver_Datatype_sqlite extends MDB2_Driver_Datatype_Common
$length = null;
break;
default:
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
+9 -9
View File
@@ -42,7 +42,7 @@
// | Author: Lukas Smith <smith@pooteeweet.org> |
// +----------------------------------------------------------------------+
//
// $Id: Common.php,v 1.21 2008/02/17 18:51:39 quipo Exp $
// $Id$
//
/**
@@ -78,14 +78,14 @@ class MDB2_Driver_Function_Common extends MDB2_Module_Common
* @return mixed a result handle or MDB2_OK on success, a MDB2 error on failure
* @access public
*/
function &executeStoredProc($name, $params = null, $types = null, $result_class = true, $result_wrap_class = false)
function executeStoredProc($name, $params = null, $types = null, $result_class = true, $result_wrap_class = false)
{
$db =& $this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
$error =& $db->raiseError(MDB2_ERROR_UNSUPPORTED, null, null,
$error = $db->raiseError(MDB2_ERROR_UNSUPPORTED, null, null,
'method not implemented', __FUNCTION__);
return $error;
}
@@ -145,12 +145,12 @@ class MDB2_Driver_Function_Common extends MDB2_Module_Common
*/
function unixtimestamp($expression)
{
$db =& $this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
$error =& $db->raiseError(MDB2_ERROR_UNSUPPORTED, null, null,
$error = $db->raiseError(MDB2_ERROR_UNSUPPORTED, null, null,
'method not implemented', __FUNCTION__);
return $error;
}
@@ -166,7 +166,7 @@ class MDB2_Driver_Function_Common extends MDB2_Module_Common
*/
function substring($value, $position = 1, $length = null)
{
if (!is_null($length)) {
if (null !== $length) {
return "SUBSTRING($value FROM $position FOR $length)";
}
return "SUBSTRING($value FROM $position)";
@@ -278,12 +278,12 @@ class MDB2_Driver_Function_Common extends MDB2_Module_Common
*/
function guid()
{
$db =& $this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
$error =& $db->raiseError(MDB2_ERROR_UNSUPPORTED, null, null,
$error = $db->raiseError(MDB2_ERROR_UNSUPPORTED, null, null,
'method not implemented', __FUNCTION__);
return $error;
}
+4 -4
View File
@@ -42,10 +42,10 @@
// | Author: Lukas Smith <smith@pooteeweet.org> |
// +----------------------------------------------------------------------+
//
// $Id: mysql.php,v 1.12 2008/02/17 18:54:08 quipo Exp $
// $Id$
//
require_once('MDB2/Driver/Function/Common.php');
require_once 'MDB2/Driver/Function/Common.php';
/**
* MDB2 MySQL driver for the function modules
@@ -71,9 +71,9 @@ class MDB2_Driver_Function_mysql extends MDB2_Driver_Function_Common
* @return mixed a result handle or MDB2_OK on success, a MDB2 error on failure
* @access public
*/
function &executeStoredProc($name, $params = null, $types = null, $result_class = true, $result_wrap_class = false)
function executeStoredProc($name, $params = null, $types = null, $result_class = true, $result_wrap_class = false)
{
$db =& $this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
+187
View File
@@ -0,0 +1,187 @@
<?php
// +----------------------------------------------------------------------+
// | PHP versions 4 and 5 |
// +----------------------------------------------------------------------+
// | Copyright (c) 1998-2008 Manuel Lemos, Tomas V.V.Cox, |
// | Stig. S. Bakken, Lukas Smith |
// | All rights reserved. |
// +----------------------------------------------------------------------+
// | MDB2 is a merge of PEAR DB and Metabases that provides a unified DB |
// | API as well as database abstraction for PHP applications. |
// | This LICENSE is in the BSD license style. |
// | |
// | Redistribution and use in source and binary forms, with or without |
// | modification, are permitted provided that the following conditions |
// | are met: |
// | |
// | Redistributions of source code must retain the above copyright |
// | notice, this list of conditions and the following disclaimer. |
// | |
// | Redistributions in binary form must reproduce the above copyright |
// | notice, this list of conditions and the following disclaimer in the |
// | documentation and/or other materials provided with the distribution. |
// | |
// | Neither the name of Manuel Lemos, Tomas V.V.Cox, Stig. S. Bakken, |
// | Lukas Smith nor the names of his contributors may be used to endorse |
// | or promote products derived from this software without specific prior|
// | written permission. |
// | |
// | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
// | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
// | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS |
// | FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE |
// | REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, |
// | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, |
// | BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS|
// | OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED |
// | AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
// | LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY|
// | WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
// | POSSIBILITY OF SUCH DAMAGE. |
// +----------------------------------------------------------------------+
// | Author: Lukas Smith <smith@pooteeweet.org> |
// +----------------------------------------------------------------------+
// $Id: oci8.php 295587 2010-02-28 17:16:38Z quipo $
require_once 'MDB2/Driver/Function/Common.php';
/**
* MDB2 oci8 driver for the function modules
*
* @package MDB2
* @category Database
* @author Lukas Smith <smith@pooteeweet.org>
*/
class MDB2_Driver_Function_oci8 extends MDB2_Driver_Function_Common
{
// {{{ executeStoredProc()
/**
* Execute a stored procedure and return any results
*
* @param string $name string that identifies the function to execute
* @param mixed $params array that contains the paramaters to pass the stored proc
* @param mixed $types array that contains the types of the columns in
* the result set
* @param mixed $result_class string which specifies which result class to use
* @param mixed $result_wrap_class string which specifies which class to wrap results in
* @return mixed a result handle or MDB2_OK on success, a MDB2 error on failure
* @access public
*/
function executeStoredProc($name, $params = null, $types = null, $result_class = true, $result_wrap_class = false)
{
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
$query = 'EXEC '.$name;
$query .= $params ? '('.implode(', ', $params).')' : '()';
return $db->query($query, $types, $result_class, $result_wrap_class);
}
// }}}
// {{{ functionTable()
/**
* return string for internal table used when calling only a function
*
* @return string for internal table used when calling only a function
* @access public
*/
function functionTable()
{
return ' FROM dual';
}
// }}}
// {{{ now()
/**
* Return string to call a variable with the current timestamp inside an SQL statement
* There are three special variables for current date and time:
* - CURRENT_TIMESTAMP (date and time, TIMESTAMP type)
* - CURRENT_DATE (date, DATE type)
* - CURRENT_TIME (time, TIME type)
*
* @return string to call a variable with the current timestamp
* @access public
*/
function now($type = 'timestamp')
{
switch ($type) {
case 'date':
case 'time':
case 'timestamp':
default:
return 'TO_CHAR(CURRENT_TIMESTAMP, \'YYYY-MM-DD HH24:MI:SS\')';
}
}
// }}}
// {{{ unixtimestamp()
/**
* return string to call a function to get the unix timestamp from a iso timestamp
*
* @param string $expression
*
* @return string to call a variable with the timestamp
* @access public
*/
function unixtimestamp($expression)
{
$utc_offset = 'CAST(SYS_EXTRACT_UTC(SYSTIMESTAMP) AS DATE) - CAST(SYSTIMESTAMP AS DATE)';
$epoch_date = 'to_date(\'19700101\', \'YYYYMMDD\')';
return '(CAST('.$expression.' AS DATE) - '.$epoch_date.' + '.$utc_offset.') * 86400 seconds';
}
// }}}
// {{{ substring()
/**
* return string to call a function to get a substring inside an SQL statement
*
* @return string to call a function to get a substring
* @access public
*/
function substring($value, $position = 1, $length = null)
{
if (null !== $length) {
return "SUBSTR($value, $position, $length)";
}
return "SUBSTR($value, $position)";
}
// }}}
// {{{ random()
/**
* return string to call a function to get random value inside an SQL statement
*
* @return return string to generate float between 0 and 1
* @access public
*/
function random()
{
return 'dbms_random.value';
}
// }}}}
// {{{ guid()
/**
* Returns global unique identifier
*
* @return string to get global unique identifier
* @access public
*/
function guid()
{
return 'SYS_GUID()';
}
// }}}}
}
?>
+21 -4
View File
@@ -42,9 +42,9 @@
// | Author: Paul Cooper <pgc@ucecom.com> |
// +----------------------------------------------------------------------+
//
// $Id: pgsql.php,v 1.11 2008/11/09 19:46:50 quipo Exp $
// $Id$
require_once('MDB2/Driver/Function/Common.php');
require_once 'MDB2/Driver/Function/Common.php';
/**
* MDB2 MySQL driver for the function modules
@@ -69,9 +69,9 @@ class MDB2_Driver_Function_pgsql extends MDB2_Driver_Function_Common
* @return mixed a result handle or MDB2_OK on success, a MDB2 error on failure
* @access public
*/
function &executeStoredProc($name, $params = null, $types = null, $result_class = true, $result_wrap_class = false)
function executeStoredProc($name, $params = null, $types = null, $result_class = true, $result_wrap_class = false)
{
$db =& $this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@@ -96,6 +96,23 @@ class MDB2_Driver_Function_pgsql extends MDB2_Driver_Function_Common
return 'EXTRACT(EPOCH FROM DATE_TRUNC(\'seconds\', CAST ((' . $expression . ') AS TIMESTAMP)))';
}
// }}}
// {{{ substring()
/**
* return string to call a function to get a substring inside an SQL statement
*
* @return string to call a function to get a substring
* @access public
*/
function substring($value, $position = 1, $length = null)
{
if (null !== $length) {
return "SUBSTRING(CAST($value AS VARCHAR) FROM $position FOR $length)";
}
return "SUBSTRING(CAST($value AS VARCHAR) FROM $position)";
}
// }}}
// {{{ random()
+7 -7
View File
@@ -42,10 +42,10 @@
// | Author: Lukas Smith <smith@pooteeweet.org> |
// +----------------------------------------------------------------------+
//
// $Id: sqlite.php,v 1.10 2008/02/17 18:54:08 quipo Exp $
// $Id$
//
require_once('MDB2/Driver/Function/Common.php');
require_once 'MDB2/Driver/Function/Common.php';
/**
* MDB2 SQLite driver for the function modules
@@ -116,10 +116,10 @@ class MDB2_Driver_Function_sqlite extends MDB2_Driver_Function_Common
*/
function substring($value, $position = 1, $length = null)
{
if (!is_null($length)) {
return "substr($value,$position,$length)";
if (null !== $length) {
return "substr($value, $position, $length)";
}
return "substr($value,$position,length($value))";
return "substr($value, $position, length($value))";
}
// }}}
@@ -147,12 +147,12 @@ class MDB2_Driver_Function_sqlite extends MDB2_Driver_Function_Common
*/
function replace($str, $from_str, $to_str)
{
$db =& $this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
$error =& $db->raiseError(MDB2_ERROR_UNSUPPORTED, null, null,
$error = $db->raiseError(MDB2_ERROR_UNSUPPORTED, null, null,
'method not implemented', __FUNCTION__);
return $error;
}
+61 -37
View File
@@ -43,7 +43,7 @@
// | Lorenzo Alberton <l.alberton@quipo.it> |
// +----------------------------------------------------------------------+
//
// $Id: Common.php,v 1.72 2009/01/14 15:00:40 quipo Exp $
// $Id$
//
/**
@@ -108,7 +108,7 @@ class MDB2_Driver_Manager_Common extends MDB2_Module_Common
*/
function getFieldDeclarationList($fields)
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@@ -140,7 +140,7 @@ class MDB2_Driver_Manager_Common extends MDB2_Module_Common
*/
function _fixSequenceName($sqn, $check = false)
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@@ -168,7 +168,7 @@ class MDB2_Driver_Manager_Common extends MDB2_Module_Common
*/
function _fixIndexName($idx)
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@@ -195,7 +195,7 @@ class MDB2_Driver_Manager_Common extends MDB2_Module_Common
*/
function createDatabase($database, $options = array())
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@@ -218,7 +218,7 @@ class MDB2_Driver_Manager_Common extends MDB2_Module_Common
*/
function alterDatabase($database, $options = array())
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@@ -239,7 +239,7 @@ class MDB2_Driver_Manager_Common extends MDB2_Module_Common
*/
function dropDatabase($database)
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@@ -263,7 +263,7 @@ class MDB2_Driver_Manager_Common extends MDB2_Module_Common
*/
function _getCreateTableQuery($name, $fields, $options = array())
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@@ -356,7 +356,7 @@ class MDB2_Driver_Manager_Common extends MDB2_Module_Common
if (PEAR::isError($query)) {
return $query;
}
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@@ -379,13 +379,17 @@ class MDB2_Driver_Manager_Common extends MDB2_Module_Common
*/
function dropTable($name)
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
$name = $db->quoteIdentifier($name, true);
return $db->exec("DROP TABLE $name");
$result = $db->exec("DROP TABLE $name");
if (MDB2::isError($result)) {
return $result;
}
return MDB2_OK;
}
// }}}
@@ -401,13 +405,17 @@ class MDB2_Driver_Manager_Common extends MDB2_Module_Common
*/
function truncateTable($name)
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
$name = $db->quoteIdentifier($name, true);
return $db->exec("DELETE FROM $name");
$result = $db->exec("DELETE FROM $name");
if (MDB2::isError($result)) {
return $result;
}
return MDB2_OK;
}
// }}}
@@ -429,7 +437,7 @@ class MDB2_Driver_Manager_Common extends MDB2_Module_Common
*/
function vacuum($table = null, $options = array())
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@@ -533,7 +541,7 @@ class MDB2_Driver_Manager_Common extends MDB2_Module_Common
*/
function alterTable($name, $changes, $check)
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@@ -553,7 +561,7 @@ class MDB2_Driver_Manager_Common extends MDB2_Module_Common
*/
function listDatabases()
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@@ -573,7 +581,7 @@ class MDB2_Driver_Manager_Common extends MDB2_Module_Common
*/
function listUsers()
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@@ -596,7 +604,7 @@ class MDB2_Driver_Manager_Common extends MDB2_Module_Common
*/
function listViews($database = null)
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@@ -617,7 +625,7 @@ class MDB2_Driver_Manager_Common extends MDB2_Module_Common
*/
function listTableViews($table)
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@@ -638,7 +646,7 @@ class MDB2_Driver_Manager_Common extends MDB2_Module_Common
*/
function listTableTriggers($table = null)
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@@ -658,7 +666,7 @@ class MDB2_Driver_Manager_Common extends MDB2_Module_Common
*/
function listFunctions()
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@@ -681,7 +689,7 @@ class MDB2_Driver_Manager_Common extends MDB2_Module_Common
*/
function listTables($database = null)
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@@ -702,7 +710,7 @@ class MDB2_Driver_Manager_Common extends MDB2_Module_Common
*/
function listTableFields($table)
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@@ -748,7 +756,7 @@ class MDB2_Driver_Manager_Common extends MDB2_Module_Common
*/
function createIndex($table, $name, $definition)
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@@ -761,7 +769,11 @@ class MDB2_Driver_Manager_Common extends MDB2_Module_Common
$fields[] = $db->quoteIdentifier($field, true);
}
$query .= ' ('. implode(', ', $fields) . ')';
return $db->exec($query);
$result = $db->exec($query);
if (MDB2::isError($result)) {
return $result;
}
return MDB2_OK;
}
// }}}
@@ -777,13 +789,17 @@ class MDB2_Driver_Manager_Common extends MDB2_Module_Common
*/
function dropIndex($table, $name)
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
$name = $db->quoteIdentifier($db->getIndexName($name), true);
return $db->exec("DROP INDEX $name");
$result = $db->exec("DROP INDEX $name");
if (MDB2::isError($result)) {
return $result;
}
return MDB2_OK;
}
// }}}
@@ -798,7 +814,7 @@ class MDB2_Driver_Manager_Common extends MDB2_Module_Common
*/
function listTableIndexes($table)
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@@ -867,7 +883,7 @@ class MDB2_Driver_Manager_Common extends MDB2_Module_Common
*/
function createConstraint($table, $name, $definition)
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@@ -895,7 +911,11 @@ class MDB2_Driver_Manager_Common extends MDB2_Module_Common
$query .= ' ('. implode(', ', $referenced_fields) . ')';
$query .= $this->_getAdvancedFKOptions($definition);
}
return $db->exec($query);
$result = $db->exec($query);
if (MDB2::isError($result)) {
return $result;
}
return MDB2_OK;
}
// }}}
@@ -912,14 +932,18 @@ class MDB2_Driver_Manager_Common extends MDB2_Module_Common
*/
function dropConstraint($table, $name, $primary = false)
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
$table = $db->quoteIdentifier($table, true);
$name = $db->quoteIdentifier($db->getIndexName($name), true);
return $db->exec("ALTER TABLE $table DROP CONSTRAINT $name");
$result = $db->exec("ALTER TABLE $table DROP CONSTRAINT $name");
if (MDB2::isError($result)) {
return $result;
}
return MDB2_OK;
}
// }}}
@@ -934,7 +958,7 @@ class MDB2_Driver_Manager_Common extends MDB2_Module_Common
*/
function listTableConstraints($table)
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@@ -956,7 +980,7 @@ class MDB2_Driver_Manager_Common extends MDB2_Module_Common
*/
function createSequence($seq_name, $start = 1)
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@@ -977,7 +1001,7 @@ class MDB2_Driver_Manager_Common extends MDB2_Module_Common
*/
function dropSequence($name)
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@@ -1000,7 +1024,7 @@ class MDB2_Driver_Manager_Common extends MDB2_Module_Common
*/
function listSequences($database = null)
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@@ -1011,4 +1035,4 @@ class MDB2_Driver_Manager_Common extends MDB2_Module_Common
// }}}
}
?>
?>
+91 -52
View File
@@ -42,10 +42,10 @@
// | Author: Lukas Smith <smith@pooteeweet.org> |
// +----------------------------------------------------------------------+
//
// $Id: mysql.php,v 1.113 2008/11/23 20:30:29 quipo Exp $
// $Id$
//
require_once('MDB2/Driver/Manager/Common.php');
require_once 'MDB2/Driver/Manager/Common.php';
/**
* MDB2 MySQL driver for the management modules
@@ -71,7 +71,7 @@ class MDB2_Driver_Manager_mysql extends MDB2_Driver_Manager_Common
*/
function createDatabase($name, $options = array())
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@@ -101,7 +101,7 @@ class MDB2_Driver_Manager_mysql extends MDB2_Driver_Manager_Common
*/
function alterDatabase($name, $options = array())
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@@ -128,7 +128,7 @@ class MDB2_Driver_Manager_mysql extends MDB2_Driver_Manager_Common
*/
function dropDatabase($name)
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@@ -204,7 +204,7 @@ class MDB2_Driver_Manager_mysql extends MDB2_Driver_Manager_Common
*/
function createTable($name, $fields, $options = array())
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@@ -222,7 +222,7 @@ class MDB2_Driver_Manager_mysql extends MDB2_Driver_Manager_Common
$autoincrement = $fieldname;
}
}
if (!is_null($autoincrement) && count($pk_fields) > 1) {
if ((null !== $autoincrement) && count($pk_fields) > 1) {
$options['primary'] = $pk_fields;
} else {
// the PK constraint is on max one field => OK
@@ -235,7 +235,7 @@ class MDB2_Driver_Manager_mysql extends MDB2_Driver_Manager_Common
return $query;
}
if (!is_null($autoincrement)) {
if (null !== $autoincrement) {
// we have to remove the PK clause added by _getIntegerDeclaration()
$query = str_replace('AUTO_INCREMENT PRIMARY KEY', 'AUTO_INCREMENT', $query);
}
@@ -285,7 +285,7 @@ class MDB2_Driver_Manager_mysql extends MDB2_Driver_Manager_Common
*/
function dropTable($name)
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@@ -321,13 +321,17 @@ class MDB2_Driver_Manager_mysql extends MDB2_Driver_Manager_Common
*/
function truncateTable($name)
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
$name = $db->quoteIdentifier($name, true);
return $db->exec("TRUNCATE TABLE $name");
$result = $db->exec("TRUNCATE TABLE $name");
if (MDB2::isError($result)) {
return $result;
}
return MDB2_OK;
}
// }}}
@@ -349,7 +353,7 @@ class MDB2_Driver_Manager_mysql extends MDB2_Driver_Manager_Common
*/
function vacuum($table = null, $options = array())
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@@ -374,7 +378,10 @@ class MDB2_Driver_Manager_mysql extends MDB2_Driver_Manager_Common
return $result;
}
if (!empty($options['analyze'])) {
return $db->exec('ANALYZE TABLE '.$table);
$result = $db->exec('ANALYZE TABLE '.$table);
if (MDB2::isError($result)) {
return $result;
}
}
return MDB2_OK;
}
@@ -474,7 +481,7 @@ class MDB2_Driver_Manager_mysql extends MDB2_Driver_Manager_Common
*/
function alterTable($name, $changes, $check)
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@@ -561,7 +568,11 @@ class MDB2_Driver_Manager_mysql extends MDB2_Driver_Manager_Common
}
$name = $db->quoteIdentifier($name, true);
return $db->exec("ALTER TABLE $name $query");
$result = $db->exec("ALTER TABLE $name $query");
if (MDB2::isError($result)) {
return $result;
}
return MDB2_OK;
}
// }}}
@@ -575,7 +586,7 @@ class MDB2_Driver_Manager_mysql extends MDB2_Driver_Manager_Common
*/
function listDatabases()
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@@ -601,7 +612,7 @@ class MDB2_Driver_Manager_mysql extends MDB2_Driver_Manager_Common
*/
function listUsers()
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@@ -620,7 +631,7 @@ class MDB2_Driver_Manager_mysql extends MDB2_Driver_Manager_Common
*/
function listFunctions()
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@@ -653,13 +664,13 @@ class MDB2_Driver_Manager_mysql extends MDB2_Driver_Manager_Common
*/
function listTableTriggers($table = null)
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
$query = 'SHOW TRIGGERS';
if (!is_null($table)) {
if (null !== $table) {
$table = $db->quote($table, 'text');
$query .= " LIKE $table";
}
@@ -685,13 +696,13 @@ class MDB2_Driver_Manager_mysql extends MDB2_Driver_Manager_Common
*/
function listTables($database = null)
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
$query = "SHOW /*!50002 FULL*/ TABLES";
if (!is_null($database)) {
if (null !== $database) {
$query .= " FROM $database";
}
$query.= "/*!50002 WHERE Table_type = 'BASE TABLE'*/";
@@ -725,13 +736,13 @@ class MDB2_Driver_Manager_mysql extends MDB2_Driver_Manager_Common
*/
function listViews($database = null)
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
$query = 'SHOW FULL TABLES';
if (!is_null($database)) {
if (null !== $database) {
$query.= " FROM $database";
}
$query.= " WHERE Table_type = 'VIEW'";
@@ -759,7 +770,7 @@ class MDB2_Driver_Manager_mysql extends MDB2_Driver_Manager_Common
*/
function listTableFields($table)
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@@ -815,7 +826,7 @@ class MDB2_Driver_Manager_mysql extends MDB2_Driver_Manager_Common
*/
function createIndex($table, $name, $definition)
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@@ -832,7 +843,11 @@ class MDB2_Driver_Manager_mysql extends MDB2_Driver_Manager_Common
}
}
$query .= ' ('. implode(', ', $fields) . ')';
return $db->exec($query);
$result = $db->exec($query);
if (MDB2::isError($result)) {
return $result;
}
return MDB2_OK;
}
// }}}
@@ -848,14 +863,18 @@ class MDB2_Driver_Manager_mysql extends MDB2_Driver_Manager_Common
*/
function dropIndex($table, $name)
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
$table = $db->quoteIdentifier($table, true);
$name = $db->quoteIdentifier($db->getIndexName($name), true);
return $db->exec("DROP INDEX $name ON $table");
$result = $db->exec("DROP INDEX $name ON $table");
if (MDB2::isError($result)) {
return $result;
}
return MDB2_OK;
}
// }}}
@@ -870,7 +889,7 @@ class MDB2_Driver_Manager_mysql extends MDB2_Driver_Manager_Common
*/
function listTableIndexes($table)
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@@ -934,7 +953,7 @@ class MDB2_Driver_Manager_mysql extends MDB2_Driver_Manager_Common
*/
function createConstraint($table, $name, $definition)
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@@ -1008,14 +1027,18 @@ class MDB2_Driver_Manager_mysql extends MDB2_Driver_Manager_Common
*/
function dropConstraint($table, $name, $primary = false)
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
if ($primary || strtolower($name) == 'primary') {
$query = 'ALTER TABLE '. $db->quoteIdentifier($table, true) .' DROP PRIMARY KEY';
return $db->exec($query);
$result = $db->exec($query);
if (MDB2::isError($result)) {
return $result;
}
return MDB2_OK;
}
//is it a FK constraint? If so, also delete the associated triggers
@@ -1031,13 +1054,21 @@ class MDB2_Driver_Manager_mysql extends MDB2_Driver_Manager_Common
$table = $db->quoteIdentifier($table, true);
$name = $db->quoteIdentifier($db->getIndexName($name), true);
$query = "ALTER TABLE $table DROP FOREIGN KEY $name";
return $db->exec($query);
$result = $db->exec($query);
if (MDB2::isError($result)) {
return $result;
}
return MDB2_OK;
}
$table = $db->quoteIdentifier($table, true);
$name = $db->quoteIdentifier($db->getIndexName($name), true);
$query = "ALTER TABLE $table DROP INDEX $name";
return $db->exec($query);
$result = $db->exec($query);
if (MDB2::isError($result)) {
return $result;
}
return MDB2_OK;
}
// }}}
@@ -1058,7 +1089,7 @@ class MDB2_Driver_Manager_mysql extends MDB2_Driver_Manager_Common
*/
function _createFKTriggers($table, $foreign_keys)
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@@ -1103,10 +1134,14 @@ class MDB2_Driver_Manager_mysql extends MDB2_Driver_Manager_Common
for ($i=0; $i<count($referenced_fields); $i++) {
$conditions2[] = 'NEW.'.$referenced_fields[$i] .' <> OLD.'.$referenced_fields[$i];
}
$restrict_action .= implode(' AND ', $conditions).') IS NOT NULL'
.' AND (' .implode(' OR ', $conditions2) .')'
.' THEN CALL %s_ON_TABLE_'.$table.'_VIOLATES_FOREIGN_KEY_CONSTRAINT();'
.' END IF;';
$restrict_action .= implode(' AND ', $conditions).') IS NOT NULL';
$restrict_action2 = empty($conditions2) ? '' : ' AND (' .implode(' OR ', $conditions2) .')';
$restrict_action3 = ' THEN CALL %s_ON_TABLE_'.$table.'_VIOLATES_FOREIGN_KEY_CONSTRAINT();'
.' END IF;';
$restrict_action_update = $restrict_action . $restrict_action2 . $restrict_action3;
$restrict_action_delete = $restrict_action . $restrict_action3; // There is no NEW row in on DELETE trigger
$cascade_action_update = 'UPDATE '.$table_quoted.' SET '.implode(', ', $new_values) .' WHERE '.implode(' AND ', $conditions). ';';
$cascade_action_delete = 'DELETE FROM '.$table_quoted.' WHERE '.implode(' AND ', $conditions). ';';
@@ -1137,9 +1172,9 @@ class MDB2_Driver_Manager_mysql extends MDB2_Driver_Manager_Common
} elseif ('SET DEFAULT' == $fkdef['onupdate']) {
$sql_update = sprintf($query, $trigger_names['pk_update'], 'BEFORE UPDATE', 'update') . $setdefault_action;
} elseif ('NO ACTION' == $fkdef['onupdate']) {
$sql_update = sprintf($query.$restrict_action, $trigger_names['pk_update'], 'AFTER UPDATE', 'update');
$sql_update = sprintf($query.$restrict_action_update, $trigger_names['pk_update'], 'AFTER UPDATE', 'update');
} elseif ('RESTRICT' == $fkdef['onupdate']) {
$sql_update = sprintf($query.$restrict_action, $trigger_names['pk_update'], 'BEFORE UPDATE', 'update');
$sql_update = sprintf($query.$restrict_action_update, $trigger_names['pk_update'], 'BEFORE UPDATE', 'update');
}
if ('CASCADE' == $fkdef['ondelete']) {
$sql_delete = sprintf($query, $trigger_names['pk_delete'], 'BEFORE DELETE', 'delete') . $cascade_action_delete;
@@ -1148,9 +1183,9 @@ class MDB2_Driver_Manager_mysql extends MDB2_Driver_Manager_Common
} elseif ('SET DEFAULT' == $fkdef['ondelete']) {
$sql_delete = sprintf($query, $trigger_names['pk_delete'], 'BEFORE DELETE', 'delete') . $setdefault_action;
} elseif ('NO ACTION' == $fkdef['ondelete']) {
$sql_delete = sprintf($query.$restrict_action, $trigger_names['pk_delete'], 'AFTER DELETE', 'delete');
$sql_delete = sprintf($query.$restrict_action_delete, $trigger_names['pk_delete'], 'AFTER DELETE', 'delete');
} elseif ('RESTRICT' == $fkdef['ondelete']) {
$sql_delete = sprintf($query.$restrict_action, $trigger_names['pk_delete'], 'BEFORE DELETE', 'delete');
$sql_delete = sprintf($query.$restrict_action_delete, $trigger_names['pk_delete'], 'BEFORE DELETE', 'delete');
}
$sql_update .= ' SET FOREIGN_KEY_CHECKS = 1; END;';
$sql_delete .= ' SET FOREIGN_KEY_CHECKS = 1; END;';
@@ -1198,7 +1233,7 @@ class MDB2_Driver_Manager_mysql extends MDB2_Driver_Manager_Common
*/
function _dropFKTriggers($table, $fkname, $referenced_table)
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@@ -1232,7 +1267,7 @@ class MDB2_Driver_Manager_mysql extends MDB2_Driver_Manager_Common
*/
function listTableConstraints($table)
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@@ -1307,7 +1342,7 @@ class MDB2_Driver_Manager_mysql extends MDB2_Driver_Manager_Common
*/
function createSequence($seq_name, $start = 1, $options = array())
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@@ -1380,13 +1415,17 @@ class MDB2_Driver_Manager_mysql extends MDB2_Driver_Manager_Common
*/
function dropSequence($seq_name)
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
$sequence_name = $db->quoteIdentifier($db->getSequenceName($seq_name), true);
return $db->exec("DROP TABLE $sequence_name");
$result = $db->exec("DROP TABLE $sequence_name");
if (MDB2::isError($result)) {
return $result;
}
return MDB2_OK;
}
// }}}
@@ -1401,13 +1440,13 @@ class MDB2_Driver_Manager_mysql extends MDB2_Driver_Manager_Common
*/
function listSequences($database = null)
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
$query = "SHOW TABLES";
if (!is_null($database)) {
if (null !== $database) {
$query .= " FROM $database";
}
$table_names = $db->queryCol($query);
@@ -1429,4 +1468,4 @@ class MDB2_Driver_Manager_mysql extends MDB2_Driver_Manager_Common
// }}}
}
?>
?>
File diff suppressed because it is too large Load Diff
+64 -34
View File
@@ -42,9 +42,9 @@
// | Author: Paul Cooper <pgc@ucecom.com> |
// +----------------------------------------------------------------------+
//
// $Id: pgsql.php,v 1.87 2008/11/29 14:09:59 afz Exp $
// $Id$
require_once('MDB2/Driver/Manager/Common.php');
require_once 'MDB2/Driver/Manager/Common.php';
/**
* MDB2 MySQL driver for the management modules
@@ -68,7 +68,7 @@ class MDB2_Driver_Manager_pgsql extends MDB2_Driver_Manager_Common
*/
function createDatabase($name, $options = array())
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@@ -95,18 +95,24 @@ class MDB2_Driver_Manager_pgsql extends MDB2_Driver_Manager_Common
*/
function alterDatabase($name, $options = array())
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
$query = 'ALTER DATABASE '. $db->quoteIdentifier($name, true);
$query = '';
if (!empty($options['name'])) {
$query .= ' RENAME TO ' . $options['name'];
}
if (!empty($options['owner'])) {
$query .= ' OWNER TO ' . $options['owner'];
}
if (empty($query)) {
return MDB2_OK;
}
$query = 'ALTER DATABASE '. $db->quoteIdentifier($name, true) . $query;
return $db->standaloneQuery($query, null, true);
}
@@ -122,7 +128,7 @@ class MDB2_Driver_Manager_pgsql extends MDB2_Driver_Manager_Common
*/
function dropDatabase($name)
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@@ -181,13 +187,17 @@ class MDB2_Driver_Manager_pgsql extends MDB2_Driver_Manager_Common
*/
function truncateTable($name)
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
$name = $db->quoteIdentifier($name, true);
return $db->exec("TRUNCATE TABLE $name");
$result = $db->exec("TRUNCATE TABLE $name");
if (MDB2::isError($result)) {
return $result;
}
return MDB2_OK;
}
// }}}
@@ -209,7 +219,7 @@ class MDB2_Driver_Manager_pgsql extends MDB2_Driver_Manager_Common
*/
function vacuum($table = null, $options = array())
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@@ -228,7 +238,11 @@ class MDB2_Driver_Manager_pgsql extends MDB2_Driver_Manager_Common
if (!empty($table)) {
$query .= ' '.$db->quoteIdentifier($table, true);
}
return $db->exec($query);
$result = $db->exec($query);
if (MDB2::isError($result)) {
return $result;
}
return MDB2_OK;
}
// }}}
@@ -326,7 +340,7 @@ class MDB2_Driver_Manager_pgsql extends MDB2_Driver_Manager_Common
*/
function alterTable($name, $changes, $check)
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@@ -412,7 +426,7 @@ class MDB2_Driver_Manager_pgsql extends MDB2_Driver_Manager_Common
return $result;
}
}
if (!empty($field['definition']['notnull'])) {
if (array_key_exists('notnull', $field['definition'])) {
$query = "ALTER $field_name ".($field['definition']['notnull'] ? 'SET' : 'DROP').' NOT NULL';
$result = $db->exec("ALTER TABLE $name $query");
if (PEAR::isError($result)) {
@@ -444,7 +458,7 @@ class MDB2_Driver_Manager_pgsql extends MDB2_Driver_Manager_Common
*/
function listDatabases()
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@@ -477,7 +491,7 @@ class MDB2_Driver_Manager_pgsql extends MDB2_Driver_Manager_Common
*/
function listUsers()
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@@ -504,7 +518,7 @@ class MDB2_Driver_Manager_pgsql extends MDB2_Driver_Manager_Common
*/
function listViews($database = null)
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@@ -535,7 +549,7 @@ class MDB2_Driver_Manager_pgsql extends MDB2_Driver_Manager_Common
*/
function listTableViews($table)
{
$db =& $this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@@ -563,7 +577,7 @@ class MDB2_Driver_Manager_pgsql extends MDB2_Driver_Manager_Common
*/
function listFunctions()
{
$db =& $this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@@ -602,7 +616,7 @@ class MDB2_Driver_Manager_pgsql extends MDB2_Driver_Manager_Common
*/
function listTableTriggers($table = null)
{
$db =& $this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@@ -611,9 +625,9 @@ class MDB2_Driver_Manager_pgsql extends MDB2_Driver_Manager_Common
FROM pg_trigger trg,
pg_class tbl
WHERE trg.tgrelid = tbl.oid';
if (!is_null($table)) {
if (null !== $table) {
$table = $db->quote(strtoupper($table), 'text');
$query .= " AND tbl.relname = $table";
$query .= " AND UPPER(tbl.relname) = $table";
}
$result = $db->queryCol($query);
if (PEAR::isError($result)) {
@@ -636,7 +650,7 @@ class MDB2_Driver_Manager_pgsql extends MDB2_Driver_Manager_Common
*/
function listTables($database = null)
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@@ -683,7 +697,7 @@ class MDB2_Driver_Manager_pgsql extends MDB2_Driver_Manager_Common
*/
function listTableFields($table)
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@@ -695,7 +709,7 @@ class MDB2_Driver_Manager_pgsql extends MDB2_Driver_Manager_Common
$table = $db->quoteIdentifier($schema, true) . '.' .$table;
}
$db->setLimit(1);
$result2 = $db->query("SELECT * FROM $table LIMIT 1");
$result2 = $db->query("SELECT * FROM $table");
if (PEAR::isError($result2)) {
return $result2;
}
@@ -719,7 +733,7 @@ class MDB2_Driver_Manager_pgsql extends MDB2_Driver_Manager_Common
*/
function listTableIndexes($table)
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@@ -772,7 +786,7 @@ class MDB2_Driver_Manager_pgsql extends MDB2_Driver_Manager_Common
*/
function dropConstraint($table, $name, $primary = false)
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@@ -798,11 +812,19 @@ class MDB2_Driver_Manager_pgsql extends MDB2_Driver_Manager_Common
}
if (in_array($name, $unique)) {
return $db->exec('DROP INDEX '.$db->quoteIdentifier($name, true));
$result = $db->exec('DROP INDEX '.$db->quoteIdentifier($name, true));
if (MDB2::isError($result)) {
return $result;
}
return MDB2_OK;
}
$idxname = $db->getIndexName($name);
if (in_array($idxname, $unique)) {
return $db->exec('DROP INDEX '.$db->quoteIdentifier($idxname, true));
$result = $db->exec('DROP INDEX '.$db->quoteIdentifier($idxname, true));
if (MDB2::isError($result)) {
return $result;
}
return MDB2_OK;
}
return $db->raiseError(MDB2_ERROR_NOT_FOUND, null, null,
$name . ' is not an existing constraint for table ' . $table, __FUNCTION__);
@@ -820,7 +842,7 @@ class MDB2_Driver_Manager_pgsql extends MDB2_Driver_Manager_Common
*/
function listTableConstraints($table)
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@@ -885,14 +907,18 @@ class MDB2_Driver_Manager_pgsql extends MDB2_Driver_Manager_Common
*/
function createSequence($seq_name, $start = 1)
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
$sequence_name = $db->quoteIdentifier($db->getSequenceName($seq_name), true);
return $db->exec("CREATE SEQUENCE $sequence_name INCREMENT 1".
$result = $db->exec("CREATE SEQUENCE $sequence_name INCREMENT 1".
($start < 1 ? " MINVALUE $start" : '')." START $start");
if (MDB2::isError($result)) {
return $result;
}
return MDB2_OK;
}
// }}}
@@ -907,13 +933,17 @@ class MDB2_Driver_Manager_pgsql extends MDB2_Driver_Manager_Common
*/
function dropSequence($seq_name)
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
$sequence_name = $db->quoteIdentifier($db->getSequenceName($seq_name), true);
return $db->exec("DROP SEQUENCE $sequence_name");
$result = $db->exec("DROP SEQUENCE $sequence_name");
if (MDB2::isError($result)) {
return $result;
}
return MDB2_OK;
}
// }}}
@@ -927,7 +957,7 @@ class MDB2_Driver_Manager_pgsql extends MDB2_Driver_Manager_Common
*/
function listSequences($database = null)
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@@ -948,4 +978,4 @@ class MDB2_Driver_Manager_pgsql extends MDB2_Driver_Manager_Common
return $result;
}
}
?>
?>
+71 -47
View File
@@ -43,10 +43,10 @@
// | Lorenzo Alberton <l.alberton@quipo.it> |
// +----------------------------------------------------------------------+
//
// $Id: sqlite.php,v 1.76 2008/05/31 11:48:48 quipo Exp $
// $Id$
//
require_once('MDB2/Driver/Manager/Common.php');
require_once 'MDB2/Driver/Manager/Common.php';
/**
* MDB2 SQLite driver for the management modules
@@ -71,8 +71,7 @@ class MDB2_Driver_Manager_sqlite extends MDB2_Driver_Manager_Common
*/
function createDatabase($name, $options = array())
{
$datadir=OC_Config::getValue( "datadirectory", OC::$SERVERROOT."/data" );
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@@ -83,8 +82,7 @@ class MDB2_Driver_Manager_sqlite extends MDB2_Driver_Manager_Common
'database already exists', __FUNCTION__);
}
$php_errormsg = '';
$database_file="$datadir/$database_file.db";
$handle = sqlite_open($database_file, $db->dsn['mode'], $php_errormsg);
$handle = @sqlite_open($database_file, $db->dsn['mode'], $php_errormsg);
if (!$handle) {
return $db->raiseError(MDB2_ERROR_CANNOT_CREATE, null, null,
(isset($php_errormsg) ? $php_errormsg : 'could not create the database file'), __FUNCTION__);
@@ -109,7 +107,7 @@ class MDB2_Driver_Manager_sqlite extends MDB2_Driver_Manager_Common
*/
function dropDatabase($name)
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@@ -176,7 +174,7 @@ class MDB2_Driver_Manager_sqlite extends MDB2_Driver_Manager_Common
*/
function _getCreateTableQuery($name, $fields, $options = array())
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@@ -238,7 +236,7 @@ class MDB2_Driver_Manager_sqlite extends MDB2_Driver_Manager_Common
}
// create triggers to enforce FOREIGN KEY constraints
if (!empty($options['foreign_keys'])) {
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@@ -386,7 +384,7 @@ class MDB2_Driver_Manager_sqlite extends MDB2_Driver_Manager_Common
*/
function dropTable($name)
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@@ -407,7 +405,11 @@ class MDB2_Driver_Manager_sqlite extends MDB2_Driver_Manager_Common
}
$name = $db->quoteIdentifier($name, true);
return $db->exec("DROP TABLE $name");
$result = $db->exec("DROP TABLE $name");
if (MDB2::isError($result)) {
return $result;
}
return MDB2_OK;
}
// }}}
@@ -429,7 +431,7 @@ class MDB2_Driver_Manager_sqlite extends MDB2_Driver_Manager_Common
*/
function vacuum($table = null, $options = array())
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@@ -438,7 +440,11 @@ class MDB2_Driver_Manager_sqlite extends MDB2_Driver_Manager_Common
if (!empty($table)) {
$query .= ' '.$db->quoteIdentifier($table, true);
}
return $db->exec($query);
$result = $db->exec($query);
if (MDB2::isError($result)) {
return $result;
}
return MDB2_OK;
}
// }}}
@@ -536,7 +542,7 @@ class MDB2_Driver_Manager_sqlite extends MDB2_Driver_Manager_Common
*/
function alterTable($name, $changes, $check, $options = array())
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@@ -600,7 +606,7 @@ class MDB2_Driver_Manager_sqlite extends MDB2_Driver_Manager_Common
}
$constraints = array_flip($constraints);
foreach ($constraints as $constraint => $value) {
if (!empty($definition['primary'])) {
if (!empty($definition['primary'])) {
if (!array_key_exists('primary', $options)) {
$options['primary'] = $definition['fields'];
//remove from the $constraint array, it's already handled by createTable()
@@ -682,16 +688,14 @@ class MDB2_Driver_Manager_sqlite extends MDB2_Driver_Manager_Common
}
foreach ($constraints as $constraint => $definition) {
if(empty($definition['primary']) and empty($definition['foreign'])){
$this->createConstraint($name_new, $constraint, $definition);
}
$this->createConstraint($name_new, $constraint, $definition);
}
if (!empty($select_fields) && !empty($data)) {
$query = 'INSERT INTO '.$db->quoteIdentifier($name_new, true);
$query.= '('.implode(', ', array_slice(array_keys($fields), 0, count($select_fields))).')';
$query.=' VALUES (?'.str_repeat(', ?', (count($select_fields) - 1)).')';
$stmt =$db->prepare($query, null, MDB2_PREPARE_MANIP);
$stmt = $db->prepare($query, null, MDB2_PREPARE_MANIP);
if (PEAR::isError($stmt)) {
return $stmt;
}
@@ -716,7 +720,7 @@ class MDB2_Driver_Manager_sqlite extends MDB2_Driver_Manager_Common
*/
function listDatabases()
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@@ -736,7 +740,7 @@ class MDB2_Driver_Manager_sqlite extends MDB2_Driver_Manager_Common
*/
function listUsers()
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@@ -754,9 +758,9 @@ class MDB2_Driver_Manager_sqlite extends MDB2_Driver_Manager_Common
* @return mixed array of view names on success, a MDB2 error on failure
* @access public
*/
function listViews($dummy=null)
function listViews()
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@@ -784,7 +788,7 @@ class MDB2_Driver_Manager_sqlite extends MDB2_Driver_Manager_Common
*/
function listTableViews($table)
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@@ -818,9 +822,9 @@ class MDB2_Driver_Manager_sqlite extends MDB2_Driver_Manager_Common
* @return mixed array of table names on success, a MDB2 error on failure
* @access public
*/
function listTables($dummy=null)
function listTables()
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@@ -854,7 +858,7 @@ class MDB2_Driver_Manager_sqlite extends MDB2_Driver_Manager_Common
*/
function listTableFields($table)
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@@ -902,13 +906,13 @@ class MDB2_Driver_Manager_sqlite extends MDB2_Driver_Manager_Common
*/
function listTableTriggers($table = null)
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
$query = "SELECT name FROM sqlite_master WHERE type='trigger' AND sql NOT NULL";
if (!is_null($table)) {
if (null !== $table) {
if ($db->options['portability'] & MDB2_PORTABILITY_FIX_CASE) {
$query.= ' AND LOWER(tbl_name)='.$db->quote(strtolower($table), 'text');
} else {
@@ -962,17 +966,17 @@ class MDB2_Driver_Manager_sqlite extends MDB2_Driver_Manager_Common
*/
function createIndex($table, $name, $definition)
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
$table = $db->quoteIdentifier($table, true);
$name = $db->getIndexName($name);
$name = $db->quoteIdentifier($db->getIndexName($name), true);
$query = "CREATE INDEX $name ON $table";
$fields = array();
foreach ($definition['fields'] as $field_name => $field) {
$field_string = $field_name;
$field_string = $db->quoteIdentifier($field_name, true);
if (!empty($field['sorting'])) {
switch ($field['sorting']) {
case 'ascending':
@@ -986,7 +990,11 @@ class MDB2_Driver_Manager_sqlite extends MDB2_Driver_Manager_Common
$fields[] = $field_string;
}
$query .= ' ('.implode(', ', $fields) . ')';
return $db->exec($query);
$result = $db->exec($query);
if (MDB2::isError($result)) {
return $result;
}
return MDB2_OK;
}
// }}}
@@ -1002,13 +1010,17 @@ class MDB2_Driver_Manager_sqlite extends MDB2_Driver_Manager_Common
*/
function dropIndex($table, $name)
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
$name = $db->getIndexName($name);
return $db->exec("DROP INDEX $name");
$result = $db->exec("DROP INDEX $name");
if (MDB2::isError($result)) {
return $result;
}
return MDB2_OK;
}
// }}}
@@ -1023,7 +1035,7 @@ class MDB2_Driver_Manager_sqlite extends MDB2_Driver_Manager_Common
*/
function listTableIndexes($table)
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@@ -1084,7 +1096,7 @@ class MDB2_Driver_Manager_sqlite extends MDB2_Driver_Manager_Common
*/
function createConstraint($table, $name, $definition)
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@@ -1116,7 +1128,11 @@ class MDB2_Driver_Manager_sqlite extends MDB2_Driver_Manager_Common
$fields[] = $field_string;
}
$query .= ' ('.implode(', ', $fields) . ')';
return $db->exec($query);
$result = $db->exec($query);
if (MDB2::isError($result)) {
return $result;
}
return MDB2_OK;
}
// }}}
@@ -1137,7 +1153,7 @@ class MDB2_Driver_Manager_sqlite extends MDB2_Driver_Manager_Common
return $this->alterTable($table, array(), false, array('primary' => null));
}
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@@ -1156,7 +1172,11 @@ class MDB2_Driver_Manager_sqlite extends MDB2_Driver_Manager_Common
}
$name = $db->getIndexName($name);
return $db->exec("DROP INDEX $name");
$result = $db->exec("DROP INDEX $name");
if (MDB2::isError($result)) {
return $result;
}
return MDB2_OK;
}
// }}}
@@ -1174,7 +1194,7 @@ class MDB2_Driver_Manager_sqlite extends MDB2_Driver_Manager_Common
*/
function _dropFKTriggers($table, $fkname, $referenced_table)
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@@ -1208,7 +1228,7 @@ class MDB2_Driver_Manager_sqlite extends MDB2_Driver_Manager_Common
*/
function listTableConstraints($table)
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@@ -1278,7 +1298,7 @@ class MDB2_Driver_Manager_sqlite extends MDB2_Driver_Manager_Common
*/
function createSequence($seq_name, $start = 1)
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@@ -1319,13 +1339,17 @@ class MDB2_Driver_Manager_sqlite extends MDB2_Driver_Manager_Common
*/
function dropSequence($seq_name)
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
$sequence_name = $db->quoteIdentifier($db->getSequenceName($seq_name), true);
return $db->exec("DROP TABLE $sequence_name");
$result = $db->exec("DROP TABLE $sequence_name");
if (MDB2::isError($result)) {
return $result;
}
return MDB2_OK;
}
// }}}
@@ -1337,9 +1361,9 @@ class MDB2_Driver_Manager_sqlite extends MDB2_Driver_Manager_Common
* @return mixed array of sequence names on success, a MDB2 error on failure
* @access public
*/
function listSequences($dummy=null)
function listSequences()
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
+1 -1
View File
@@ -42,7 +42,7 @@
// | Author: Lukas Smith <smith@pooteeweet.org> |
// +----------------------------------------------------------------------+
//
// $Id: Common.php,v 1.2 2007/09/09 13:47:36 quipo Exp $
// $Id$
//
/**
+1 -1
View File
@@ -42,7 +42,7 @@
// | Author: Lukas Smith <smith@pooteeweet.org> |
// +----------------------------------------------------------------------+
//
// $Id: mysql.php,v 1.9 2006/06/18 21:59:05 lsmith Exp $
// $Id$
//
require_once 'MDB2/Driver/Native/Common.php';
+60
View File
@@ -0,0 +1,60 @@
<?php
// +----------------------------------------------------------------------+
// | PHP versions 4 and 5 |
// +----------------------------------------------------------------------+
// | Copyright (c) 1998-2006 Manuel Lemos, Tomas V.V.Cox, |
// | Stig. S. Bakken, Lukas Smith, Frank M. Kromann |
// | All rights reserved. |
// +----------------------------------------------------------------------+
// | MDB2 is a merge of PEAR DB and Metabases that provides a unified DB |
// | API as well as database abstraction for PHP applications. |
// | This LICENSE is in the BSD license style. |
// | |
// | Redistribution and use in source and binary forms, with or without |
// | modification, are permitted provided that the following conditions |
// | are met: |
// | |
// | Redistributions of source code must retain the above copyright |
// | notice, this list of conditions and the following disclaimer. |
// | |
// | Redistributions in binary form must reproduce the above copyright |
// | notice, this list of conditions and the following disclaimer in the |
// | documentation and/or other materials provided with the distribution. |
// | |
// | Neither the name of Manuel Lemos, Tomas V.V.Cox, Stig. S. Bakken, |
// | Lukas Smith nor the names of his contributors may be used to endorse |
// | or promote products derived from this software without specific prior|
// | written permission. |
// | |
// | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
// | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
// | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS |
// | FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE |
// | REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, |
// | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, |
// | BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS|
// | OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED |
// | AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
// | LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY|
// | WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
// | POSSIBILITY OF SUCH DAMAGE. |
// +----------------------------------------------------------------------+
// | Author: Lukas Smith <smith@pooteeweet.org> |
// +----------------------------------------------------------------------+
//
// $Id: oci8.php 215004 2006-06-18 21:59:05Z lsmith $
//
require_once 'MDB2/Driver/Native/Common.php';
/**
* MDB2 Oracle driver for the native module
*
* @package MDB2
* @category Database
* @author Lukas Smith <smith@dybnet.de>
*/
class MDB2_Driver_Native_oci8 extends MDB2_Driver_Native_Common
{
}
?>
+2 -2
View File
@@ -42,7 +42,7 @@
// | Author: Paul Cooper <pgc@ucecom.com> |
// +----------------------------------------------------------------------+
//
// $Id: pgsql.php,v 1.12 2006/07/15 13:07:15 lsmith Exp $
// $Id$
require_once 'MDB2/Driver/Native/Common.php';
@@ -67,7 +67,7 @@ class MDB2_Driver_Native_pgsql extends MDB2_Driver_Native_Common
*/
function deleteOID($OID)
{
$db =& $this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
+1 -1
View File
@@ -42,7 +42,7 @@
// | Author: Lukas Smith <smith@pooteeweet.org> |
// +----------------------------------------------------------------------+
//
// $Id: sqlite.php,v 1.9 2006/06/18 21:59:05 lsmith Exp $
// $Id$
//
require_once 'MDB2/Driver/Native/Common.php';
+7 -7
View File
@@ -42,7 +42,7 @@
// | Author: Lukas Smith <smith@pooteeweet.org> |
// +----------------------------------------------------------------------+
//
// $Id: Common.php,v 1.43 2009/01/14 15:01:21 quipo Exp $
// $Id$
//
/**
@@ -107,7 +107,7 @@ class MDB2_Driver_Reverse_Common extends MDB2_Module_Common
*/
function getTableFieldDefinition($table, $field)
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@@ -141,7 +141,7 @@ class MDB2_Driver_Reverse_Common extends MDB2_Module_Common
*/
function getTableIndexDefinition($table, $index)
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@@ -193,7 +193,7 @@ class MDB2_Driver_Reverse_Common extends MDB2_Module_Common
*/
function getTableConstraintDefinition($table, $index)
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@@ -220,7 +220,7 @@ class MDB2_Driver_Reverse_Common extends MDB2_Module_Common
*/
function getSequenceDefinition($sequence)
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@@ -273,7 +273,7 @@ class MDB2_Driver_Reverse_Common extends MDB2_Module_Common
*/
function getTriggerDefinition($trigger)
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@@ -407,7 +407,7 @@ class MDB2_Driver_Reverse_Common extends MDB2_Module_Common
*/
function tableInfo($result, $mode = null)
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
+40 -30
View File
@@ -42,10 +42,10 @@
// | Author: Lukas Smith <smith@pooteeweet.org> |
// +----------------------------------------------------------------------+
//
// $Id: mysql.php,v 1.80 2008/03/26 21:15:37 quipo Exp $
// $Id$
//
require_once('MDB2/Driver/Reverse/Common.php');
require_once 'MDB2/Driver/Reverse/Common.php';
/**
* MDB2 MySQL driver for the schema reverse engineering module
@@ -69,7 +69,7 @@ class MDB2_Driver_Reverse_mysql extends MDB2_Driver_Reverse_Common
*/
function getTableFieldDefinition($table_name, $field_name)
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@@ -113,13 +113,21 @@ class MDB2_Driver_Reverse_mysql extends MDB2_Driver_Reverse_Common
$default = false;
if (array_key_exists('default', $column)) {
$default = $column['default'];
if (is_null($default) && $notnull) {
if ((null === $default) && $notnull) {
$default = '';
}
}
$definition[0] = array(
'notnull' => $notnull,
'nativetype' => preg_replace('/^([a-z]+)[^a-z].*/i', '\\1', $column['type'])
);
$autoincrement = false;
if (!empty($column['extra']) && $column['extra'] == 'auto_increment') {
$autoincrement = true;
if (!empty($column['extra'])) {
if ($column['extra'] == 'auto_increment') {
$autoincrement = true;
} else {
$definition[0]['extra'] = $column['extra'];
}
}
$collate = null;
if (!empty($column['collation'])) {
@@ -127,17 +135,13 @@ class MDB2_Driver_Reverse_mysql extends MDB2_Driver_Reverse_Common
$charset = preg_replace('/(.+?)(_.+)?/', '$1', $collate);
}
$definition[0] = array(
'notnull' => $notnull,
'nativetype' => preg_replace('/^([a-z]+)[^a-z].*/i', '\\1', $column['type'])
);
if (!is_null($length)) {
if (null !== $length) {
$definition[0]['length'] = $length;
}
if (!is_null($unsigned)) {
if (null !== $unsigned) {
$definition[0]['unsigned'] = $unsigned;
}
if (!is_null($fixed)) {
if (null !== $fixed) {
$definition[0]['fixed'] = $fixed;
}
if ($default !== false) {
@@ -146,7 +150,7 @@ class MDB2_Driver_Reverse_mysql extends MDB2_Driver_Reverse_Common
if ($autoincrement !== false) {
$definition[0]['autoincrement'] = $autoincrement;
}
if (!is_null($collate)) {
if (null !== $collate) {
$definition[0]['collate'] = $collate;
$definition[0]['charset'] = $charset;
}
@@ -181,7 +185,7 @@ class MDB2_Driver_Reverse_mysql extends MDB2_Driver_Reverse_Common
*/
function getTableIndexDefinition($table_name, $index_name)
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@@ -192,7 +196,7 @@ class MDB2_Driver_Reverse_mysql extends MDB2_Driver_Reverse_Common
$query = "SHOW INDEX FROM $table /*!50002 WHERE Key_name = %s */";
$index_name_mdb2 = $db->getIndexName($index_name);
$result = $db->queryRow(sprintf($query, $db->quote($index_name_mdb2)));
if (!PEAR::isError($result) && !is_null($result)) {
if (!PEAR::isError($result) && (null !== $result)) {
// apply 'idxname_format' only if the query succeeded, otherwise
// fallback to the given $index_name, without transformation
$index_name = $index_name_mdb2;
@@ -256,7 +260,7 @@ class MDB2_Driver_Reverse_mysql extends MDB2_Driver_Reverse_Common
*/
function getTableConstraintDefinition($table_name, $constraint_name)
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@@ -269,7 +273,7 @@ class MDB2_Driver_Reverse_mysql extends MDB2_Driver_Reverse_Common
if (strtolower($constraint_name) != 'primary') {
$constraint_name_mdb2 = $db->getIndexName($constraint_name);
$result = $db->queryRow(sprintf($query, $db->quote($constraint_name_mdb2)));
if (!PEAR::isError($result) && !is_null($result)) {
if (!PEAR::isError($result) && (null !== $result)) {
// apply 'idxname_format' only if the query succeeded, otherwise
// fallback to the given $index_name, without transformation
$constraint_name = $constraint_name_mdb2;
@@ -356,10 +360,16 @@ class MDB2_Driver_Reverse_mysql extends MDB2_Driver_Reverse_Common
*/
function _getTableFKConstraintDefinition($table, $constraint_name, $definition)
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
//Use INFORMATION_SCHEMA instead?
//SELECT *
// FROM INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS
// WHERE CONSTRAINT_SCHEMA = '$dbname'
// AND TABLE_NAME = '$table'
// AND CONSTRAINT_NAME = '$constraint_name';
$query = 'SHOW CREATE TABLE '. $db->escape($table);
$constraint = $db->queryOne($query, 'text', 1);
if (!PEAR::isError($constraint) && !empty($constraint)) {
@@ -372,10 +382,10 @@ class MDB2_Driver_Reverse_mysql extends MDB2_Driver_Reverse_Common
}
$constraint_name_original = $constraint_name;
$constraint_name = $db->getIndexName($constraint_name);
$pattern = '/\bCONSTRAINT\s+'.$constraint_name.'\s+FOREIGN KEY\s+\(([^\)]+)\) \bREFERENCES\b ([^ ]+) \(([^\)]+)\)/i';
$pattern = '/\bCONSTRAINT\s+'.$constraint_name.'\s+FOREIGN KEY\s+\(([^\)]+)\) \bREFERENCES\b ([^\s]+) \(([^\)]+)\)(?: ON DELETE ([^\s]+))?(?: ON UPDATE ([^\s]+))?/i';
if (!preg_match($pattern, str_replace('`', '', $constraint), $matches)) {
//fallback to original constraint name
$pattern = '/\bCONSTRAINT\s+'.$constraint_name_original.'\s+FOREIGN KEY\s+\(([^\)]+)\) \bREFERENCES\b ([^ ]+) \(([^\)]+)\)/i';
$pattern = '/\bCONSTRAINT\s+'.$constraint_name_original.'\s+FOREIGN KEY\s+\(([^\)]+)\) \bREFERENCES\b ([^\s]+) \(([^\)]+)\)(?: ON DELETE ([^\s]+))?(?: ON UPDATE ([^\s]+))?/i';
}
if (preg_match($pattern, str_replace('`', '', $constraint), $matches)) {
$definition['foreign'] = true;
@@ -397,8 +407,8 @@ class MDB2_Driver_Reverse_mysql extends MDB2_Driver_Reverse_Common
'position' => $colpos++
);
}
$definition['onupdate'] = 'NO ACTION';
$definition['ondelete'] = 'NO ACTION';
$definition['ondelete'] = empty($matches[4]) ? 'RESTRICT' : strtoupper($matches[4]);
$definition['onupdate'] = empty($matches[5]) ? 'RESTRICT' : strtoupper($matches[5]);
$definition['match'] = 'SIMPLE';
return $definition;
}
@@ -424,7 +434,7 @@ class MDB2_Driver_Reverse_mysql extends MDB2_Driver_Reverse_Common
*/
function getTriggerDefinition($trigger)
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@@ -476,7 +486,7 @@ class MDB2_Driver_Reverse_mysql extends MDB2_Driver_Reverse_Common
return parent::tableInfo($result, $mode);
}
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@@ -506,11 +516,11 @@ class MDB2_Driver_Reverse_mysql extends MDB2_Driver_Reverse_Common
$db->loadModule('Datatype', null, true);
for ($i = 0; $i < $count; $i++) {
$res[$i] = array(
'table' => $case_func(@mysql_field_table($resource, $i)),
'name' => $case_func(@mysql_field_name($resource, $i)),
'type' => @mysql_field_type($resource, $i),
'length' => @mysql_field_len($resource, $i),
'flags' => @mysql_field_flags($resource, $i),
'table' => $case_func(@mysql_field_table($resource, $i)),
'name' => $case_func(@mysql_field_name($resource, $i)),
'type' => @mysql_field_type($resource, $i),
'length' => @mysql_field_len($resource, $i),
'flags' => @mysql_field_flags($resource, $i),
);
if ($res[$i]['type'] == 'string') {
$res[$i]['type'] = 'char';
+625
View File
@@ -0,0 +1,625 @@
<?php
// +----------------------------------------------------------------------+
// | PHP versions 4 and 5 |
// +----------------------------------------------------------------------+
// | Copyright (c) 1998-2007 Manuel Lemos, Tomas V.V.Cox, |
// | Stig. S. Bakken, Lukas Smith, Frank M. Kromann, Lorenzo Alberton |
// | All rights reserved. |
// +----------------------------------------------------------------------+
// | MDB2 is a merge of PEAR DB and Metabases that provides a unified DB |
// | API as well as database abstraction for PHP applications. |
// | This LICENSE is in the BSD license style. |
// | |
// | Redistribution and use in source and binary forms, with or without |
// | modification, are permitted provided that the following conditions |
// | are met: |
// | |
// | Redistributions of source code must retain the above copyright |
// | notice, this list of conditions and the following disclaimer. |
// | |
// | Redistributions in binary form must reproduce the above copyright |
// | notice, this list of conditions and the following disclaimer in the |
// | documentation and/or other materials provided with the distribution. |
// | |
// | Neither the name of Manuel Lemos, Tomas V.V.Cox, Stig. S. Bakken, |
// | Lukas Smith nor the names of his contributors may be used to endorse |
// | or promote products derived from this software without specific prior|
// | written permission. |
// | |
// | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
// | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
// | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS |
// | FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE |
// | REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, |
// | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, |
// | BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS|
// | OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED |
// | AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
// | LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY|
// | WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
// | POSSIBILITY OF SUCH DAMAGE. |
// +----------------------------------------------------------------------+
// | Authors: Lukas Smith <smith@pooteeweet.org> |
// | Lorenzo Alberton <l.alberton@quipo.it> |
// +----------------------------------------------------------------------+
//
// $Id: oci8.php 295587 2010-02-28 17:16:38Z quipo $
//
require_once 'MDB2/Driver/Reverse/Common.php';
/**
* MDB2 Oracle driver for the schema reverse engineering module
*
* @package MDB2
* @category Database
* @author Lukas Smith <smith@dybnet.de>
*/
class MDB2_Driver_Reverse_oci8 extends MDB2_Driver_Reverse_Common
{
// {{{ getTableFieldDefinition()
/**
* Get the structure of a field into an array
*
* @param string $table_name name of table that should be used in method
* @param string $field_name name of field that should be used in method
* @return mixed data array on success, a MDB2 error on failure
* @access public
*/
function getTableFieldDefinition($table_name, $field_name)
{
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
$result = $db->loadModule('Datatype', null, true);
if (PEAR::isError($result)) {
return $result;
}
list($owner, $table) = $this->splitTableSchema($table_name);
if (empty($owner)) {
$owner = $db->dsn['username'];
}
$query = 'SELECT column_name AS "name",
data_type AS "type",
nullable AS "nullable",
data_default AS "default",
COALESCE(data_precision, data_length) AS "length",
data_scale AS "scale"
FROM all_tab_columns
WHERE (table_name=? OR table_name=?)
AND (owner=? OR owner=?)
AND (column_name=? OR column_name=?)
ORDER BY column_id';
$stmt = $db->prepare($query);
if (PEAR::isError($stmt)) {
return $stmt;
}
$args = array(
$table,
strtoupper($table),
$owner,
strtoupper($owner),
$field_name,
strtoupper($field_name)
);
$result = $stmt->execute($args);
if (PEAR::isError($result)) {
return $result;
}
$column = $result->fetchRow(MDB2_FETCHMODE_ASSOC);
if (PEAR::isError($column)) {
return $column;
}
$stmt->free();
$result->free();
if (empty($column)) {
return $db->raiseError(MDB2_ERROR_NOT_FOUND, null, null,
$field_name . ' is not a column in table ' . $table_name, __FUNCTION__);
}
$column = array_change_key_case($column, CASE_LOWER);
if ($db->options['portability'] & MDB2_PORTABILITY_FIX_CASE) {
if ($db->options['field_case'] == CASE_LOWER) {
$column['name'] = strtolower($column['name']);
} else {
$column['name'] = strtoupper($column['name']);
}
}
$mapped_datatype = $db->datatype->mapNativeDatatype($column);
if (PEAR::isError($mapped_datatype)) {
return $mapped_datatype;
}
list($types, $length, $unsigned, $fixed) = $mapped_datatype;
$notnull = false;
if (!empty($column['nullable']) && $column['nullable'] == 'N') {
$notnull = true;
}
$default = false;
if (array_key_exists('default', $column)) {
$default = $column['default'];
if ($default === 'NULL') {
$default = null;
}
//ugly hack, but works for the reverse direction
if ($default == "''") {
$default = '';
}
if ((null === $default) && $notnull) {
$default = '';
}
}
$definition[0] = array('notnull' => $notnull, 'nativetype' => $column['type']);
if (null !== $length) {
$definition[0]['length'] = $length;
}
if (null !== $unsigned) {
$definition[0]['unsigned'] = $unsigned;
}
if (null !== $fixed) {
$definition[0]['fixed'] = $fixed;
}
if ($default !== false) {
$definition[0]['default'] = $default;
}
foreach ($types as $key => $type) {
$definition[$key] = $definition[0];
if ($type == 'clob' || $type == 'blob') {
unset($definition[$key]['default']);
}
$definition[$key]['type'] = $type;
$definition[$key]['mdb2type'] = $type;
}
if ($type == 'integer') {
$query= "SELECT trigger_body
FROM all_triggers
WHERE table_name=?
AND triggering_event='INSERT'
AND trigger_type='BEFORE EACH ROW'";
// ^^ pretty reasonable mimic for "auto_increment" in oracle?
$stmt = $db->prepare($query);
if (PEAR::isError($stmt)) {
return $stmt;
}
$result = $stmt->execute(strtoupper($table));
if (PEAR::isError($result)) {
return $result;
}
while ($triggerstr = $result->fetchOne()) {
if (preg_match('/.*SELECT\W+(.+)\.nextval +into +\:NEW\.'.$field_name.' +FROM +dual/im', $triggerstr, $matches)) {
$definition[0]['autoincrement'] = $matches[1];
}
}
$stmt->free();
$result->free();
}
return $definition;
}
// }}}
// {{{ getTableIndexDefinition()
/**
* Get the structure of an index into an array
*
* @param string $table_name name of table that should be used in method
* @param string $index_name name of index that should be used in method
* @return mixed data array on success, a MDB2 error on failure
* @access public
*/
function getTableIndexDefinition($table_name, $index_name)
{
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
list($owner, $table) = $this->splitTableSchema($table_name);
if (empty($owner)) {
$owner = $db->dsn['username'];
}
$query = 'SELECT aic.column_name AS "column_name",
aic.column_position AS "column_position",
aic.descend AS "descend",
aic.table_owner AS "table_owner",
alc.constraint_type AS "constraint_type"
FROM all_ind_columns aic
LEFT JOIN all_constraints alc
ON aic.index_name = alc.constraint_name
AND aic.table_name = alc.table_name
AND aic.table_owner = alc.owner
WHERE (aic.table_name=? OR aic.table_name=?)
AND (aic.index_name=? OR aic.index_name=?)
AND (aic.table_owner=? OR aic.table_owner=?)
ORDER BY column_position';
$stmt = $db->prepare($query);
if (PEAR::isError($stmt)) {
return $stmt;
}
$indexnames = array_unique(array($db->getIndexName($index_name), $index_name));
$i = 0;
$row = null;
while ((null === $row) && array_key_exists($i, $indexnames)) {
$args = array(
$table,
strtoupper($table),
$indexnames[$i],
strtoupper($indexnames[$i]),
$owner,
strtoupper($owner)
);
$result = $stmt->execute($args);
if (PEAR::isError($result)) {
return $result;
}
$row = $result->fetchRow(MDB2_FETCHMODE_ASSOC);
if (PEAR::isError($row)) {
return $row;
}
$i++;
}
if (null === $row) {
return $db->raiseError(MDB2_ERROR_NOT_FOUND, null, null,
$index_name. ' is not an index on table '. $table_name, __FUNCTION__);
}
if ($row['constraint_type'] == 'U' || $row['constraint_type'] == 'P') {
return $db->raiseError(MDB2_ERROR_NOT_FOUND, null, null,
$index_name. ' is a constraint, not an index on table '. $table_name, __FUNCTION__);
}
$definition = array();
while (null !== $row) {
$row = array_change_key_case($row, CASE_LOWER);
$column_name = $row['column_name'];
if ($db->options['portability'] & MDB2_PORTABILITY_FIX_CASE) {
if ($db->options['field_case'] == CASE_LOWER) {
$column_name = strtolower($column_name);
} else {
$column_name = strtoupper($column_name);
}
}
$definition['fields'][$column_name] = array(
'position' => (int)$row['column_position'],
);
if (!empty($row['descend'])) {
$definition['fields'][$column_name]['sorting'] =
($row['descend'] == 'ASC' ? 'ascending' : 'descending');
}
$row = $result->fetchRow(MDB2_FETCHMODE_ASSOC);
}
$result->free();
if (empty($definition['fields'])) {
return $db->raiseError(MDB2_ERROR_NOT_FOUND, null, null,
$index_name. ' is not an index on table '. $table_name, __FUNCTION__);
}
return $definition;
}
// }}}
// {{{ getTableConstraintDefinition()
/**
* Get the structure of a constraint into an array
*
* @param string $table_name name of table that should be used in method
* @param string $constraint_name name of constraint that should be used in method
* @return mixed data array on success, a MDB2 error on failure
* @access public
*/
function getTableConstraintDefinition($table_name, $constraint_name)
{
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
list($owner, $table) = $this->splitTableSchema($table_name);
if (empty($owner)) {
$owner = $db->dsn['username'];
}
$query = 'SELECT alc.constraint_name,
CASE alc.constraint_type WHEN \'P\' THEN 1 ELSE 0 END "primary",
CASE alc.constraint_type WHEN \'R\' THEN 1 ELSE 0 END "foreign",
CASE alc.constraint_type WHEN \'U\' THEN 1 ELSE 0 END "unique",
CASE alc.constraint_type WHEN \'C\' THEN 1 ELSE 0 END "check",
alc.DELETE_RULE "ondelete",
\'NO ACTION\' "onupdate",
\'SIMPLE\' "match",
CASE alc.deferrable WHEN \'NOT DEFERRABLE\' THEN 0 ELSE 1 END "deferrable",
CASE alc.deferred WHEN \'IMMEDIATE\' THEN 0 ELSE 1 END "initiallydeferred",
alc.search_condition AS "search_condition",
alc.table_name,
cols.column_name AS "column_name",
cols.position,
r_alc.table_name "references_table",
r_cols.column_name "references_field",
r_cols.position "references_field_position"
FROM all_cons_columns cols
LEFT JOIN all_constraints alc
ON alc.constraint_name = cols.constraint_name
AND alc.owner = cols.owner
LEFT JOIN all_constraints r_alc
ON alc.r_constraint_name = r_alc.constraint_name
AND alc.r_owner = r_alc.owner
LEFT JOIN all_cons_columns r_cols
ON r_alc.constraint_name = r_cols.constraint_name
AND r_alc.owner = r_cols.owner
AND cols.position = r_cols.position
WHERE (alc.constraint_name=? OR alc.constraint_name=?)
AND alc.constraint_name = cols.constraint_name
AND (alc.owner=? OR alc.owner=?)';
$tablenames = array();
if (!empty($table)) {
$query.= ' AND (alc.table_name=? OR alc.table_name=?)';
$tablenames = array($table, strtoupper($table));
}
$stmt = $db->prepare($query);
if (PEAR::isError($stmt)) {
return $stmt;
}
$constraintnames = array_unique(array($db->getIndexName($constraint_name), $constraint_name));
$c = 0;
$row = null;
while ((null === $row) && array_key_exists($c, $constraintnames)) {
$args = array(
$constraintnames[$c],
strtoupper($constraintnames[$c]),
$owner,
strtoupper($owner)
);
if (!empty($table)) {
$args = array_merge($args, $tablenames);
}
$result = $stmt->execute($args);
if (PEAR::isError($result)) {
return $result;
}
$row = $result->fetchRow(MDB2_FETCHMODE_ASSOC);
if (PEAR::isError($row)) {
return $row;
}
$c++;
}
$definition = array(
'primary' => (boolean)$row['primary'],
'unique' => (boolean)$row['unique'],
'foreign' => (boolean)$row['foreign'],
'check' => (boolean)$row['check'],
'deferrable' => (boolean)$row['deferrable'],
'initiallydeferred' => (boolean)$row['initiallydeferred'],
'ondelete' => $row['ondelete'],
'onupdate' => $row['onupdate'],
'match' => $row['match'],
);
if ($definition['check']) {
// pattern match constraint for check constraint values into enum-style output:
$enumregex = '/'.$row['column_name'].' in \((.+?)\)/i';
if (preg_match($enumregex, $row['search_condition'], $rangestr)) {
$definition['fields'][$column_name] = array();
$allowed = explode(',', $rangestr[1]);
foreach ($allowed as $val) {
$val = trim($val);
$val = preg_replace('/^\'/', '', $val);
$val = preg_replace('/\'$/', '', $val);
array_push($definition['fields'][$column_name], $val);
}
}
}
while (null !== $row) {
$row = array_change_key_case($row, CASE_LOWER);
$column_name = $row['column_name'];
if ($db->options['portability'] & MDB2_PORTABILITY_FIX_CASE) {
if ($db->options['field_case'] == CASE_LOWER) {
$column_name = strtolower($column_name);
} else {
$column_name = strtoupper($column_name);
}
}
$definition['fields'][$column_name] = array(
'position' => (int)$row['position']
);
if ($row['foreign']) {
$ref_column_name = $row['references_field'];
$ref_table_name = $row['references_table'];
if ($db->options['portability'] & MDB2_PORTABILITY_FIX_CASE) {
if ($db->options['field_case'] == CASE_LOWER) {
$ref_column_name = strtolower($ref_column_name);
$ref_table_name = strtolower($ref_table_name);
} else {
$ref_column_name = strtoupper($ref_column_name);
$ref_table_name = strtoupper($ref_table_name);
}
}
$definition['references']['table'] = $ref_table_name;
$definition['references']['fields'][$ref_column_name] = array(
'position' => (int)$row['references_field_position']
);
}
$lastrow = $row;
$row = $result->fetchRow(MDB2_FETCHMODE_ASSOC);
}
$result->free();
if (empty($definition['fields'])) {
return $db->raiseError(MDB2_ERROR_NOT_FOUND, null, null,
$constraint_name . ' is not a constraint on table '. $table_name, __FUNCTION__);
}
return $definition;
}
// }}}
// {{{ getSequenceDefinition()
/**
* Get the structure of a sequence into an array
*
* @param string $sequence name of sequence that should be used in method
* @return mixed data array on success, a MDB2 error on failure
* @access public
*/
function getSequenceDefinition($sequence)
{
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
$sequence_name = $db->getSequenceName($sequence);
$query = 'SELECT last_number FROM user_sequences';
$query.= ' WHERE sequence_name='.$db->quote($sequence_name, 'text');
$query.= ' OR sequence_name='.$db->quote(strtoupper($sequence_name), 'text');
$start = $db->queryOne($query, 'integer');
if (PEAR::isError($start)) {
return $start;
}
$definition = array();
if ($start != 1) {
$definition = array('start' => $start);
}
return $definition;
}
// }}}
// {{{ getTriggerDefinition()
/**
* Get the structure of a trigger into an array
*
* EXPERIMENTAL
*
* WARNING: this function is experimental and may change the returned value
* at any time until labelled as non-experimental
*
* @param string $trigger name of trigger that should be used in method
* @return mixed data array on success, a MDB2 error on failure
* @access public
*/
function getTriggerDefinition($trigger)
{
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
$query = 'SELECT trigger_name AS "trigger_name",
table_name AS "table_name",
trigger_body AS "trigger_body",
trigger_type AS "trigger_type",
triggering_event AS "trigger_event",
description AS "trigger_comment",
1 AS "trigger_enabled",
when_clause AS "when_clause"
FROM user_triggers
WHERE trigger_name = \''. strtoupper($trigger).'\'';
$types = array(
'trigger_name' => 'text',
'table_name' => 'text',
'trigger_body' => 'text',
'trigger_type' => 'text',
'trigger_event' => 'text',
'trigger_comment' => 'text',
'trigger_enabled' => 'boolean',
'when_clause' => 'text',
);
$result = $db->queryRow($query, $types, MDB2_FETCHMODE_ASSOC);
if (PEAR::isError($result)) {
return $result;
}
if (!empty($result['trigger_type'])) {
//$result['trigger_type'] = array_shift(explode(' ', $result['trigger_type']));
$result['trigger_type'] = preg_replace('/(\S+).*/', '\\1', $result['trigger_type']);
}
return $result;
}
// }}}
// {{{ tableInfo()
/**
* Returns information about a table or a result set
*
* NOTE: only supports 'table' and 'flags' if <var>$result</var>
* is a table name.
*
* NOTE: flags won't contain index information.
*
* @param object|string $result MDB2_result object from a query or a
* string containing the name of a table.
* While this also accepts a query result
* resource identifier, this behavior is
* deprecated.
* @param int $mode a valid tableInfo mode
*
* @return array an associative array with the information requested.
* A MDB2_Error object on failure.
*
* @see MDB2_Driver_Common::tableInfo()
*/
function tableInfo($result, $mode = null)
{
if (is_string($result)) {
return parent::tableInfo($result, $mode);
}
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
$resource = MDB2::isResultCommon($result) ? $result->getResource() : $result;
if (!is_resource($resource)) {
return $db->raiseError(MDB2_ERROR_NEED_MORE_DATA, null, null,
'Could not generate result resource', __FUNCTION__);
}
if ($db->options['portability'] & MDB2_PORTABILITY_FIX_CASE) {
if ($db->options['field_case'] == CASE_LOWER) {
$case_func = 'strtolower';
} else {
$case_func = 'strtoupper';
}
} else {
$case_func = 'strval';
}
$count = @OCINumCols($resource);
$res = array();
if ($mode) {
$res['num_fields'] = $count;
}
$db->loadModule('Datatype', null, true);
for ($i = 0; $i < $count; $i++) {
$column = array(
'table' => '',
'name' => $case_func(@OCIColumnName($resource, $i+1)),
'type' => @OCIColumnType($resource, $i+1),
'length' => @OCIColumnSize($resource, $i+1),
'flags' => '',
);
$res[$i] = $column;
$res[$i]['mdb2type'] = $db->datatype->mapNativeDatatype($res[$i]);
if ($mode & MDB2_TABLEINFO_ORDER) {
$res['order'][$res[$i]['name']] = $i;
}
if ($mode & MDB2_TABLEINFO_ORDERTABLE) {
$res['ordertable'][$res[$i]['table']][$res[$i]['name']] = $i;
}
}
return $res;
}
}
?>
+12 -11
View File
@@ -43,9 +43,9 @@
// | Lorenzo Alberton <l.alberton@quipo.it> |
// +----------------------------------------------------------------------+
//
// $Id: pgsql.php,v 1.75 2008/08/22 16:36:20 quipo Exp $
// $Id$
require_once('MDB2/Driver/Reverse/Common.php');
require_once 'MDB2/Driver/Reverse/Common.php';
/**
* MDB2 PostGreSQL driver for the schema reverse engineering module
@@ -69,7 +69,7 @@ class MDB2_Driver_Reverse_pgsql extends MDB2_Driver_Reverse_Common
*/
function getTableFieldDefinition($table_name, $field_name)
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@@ -143,11 +143,12 @@ class MDB2_Driver_Reverse_pgsql extends MDB2_Driver_Reverse_Common
}
$default = null;
if ($column['atthasdef'] === 't'
&& strpos($column['default'], 'NULL') !== 0
&& !preg_match("/nextval\('([^']+)'/", $column['default'])
) {
$pattern = '/^\'(.*)\'::[\w ]+$/i';
$default = $column['default'];#substr($column['adsrc'], 1, -1);
if (is_null($default) && $notnull) {
if ((null === $default) && $notnull) {
$default = '';
} elseif (!empty($default) && preg_match($pattern, $default)) {
//remove data type cast
@@ -159,13 +160,13 @@ class MDB2_Driver_Reverse_pgsql extends MDB2_Driver_Reverse_Common
$autoincrement = true;
}
$definition[0] = array('notnull' => $notnull, 'nativetype' => $column['type']);
if (!is_null($length)) {
if (null !== $length) {
$definition[0]['length'] = $length;
}
if (!is_null($unsigned)) {
if (null !== $unsigned) {
$definition[0]['unsigned'] = $unsigned;
}
if (!is_null($fixed)) {
if (null !== $fixed) {
$definition[0]['fixed'] = $fixed;
}
if ($default !== false) {
@@ -198,7 +199,7 @@ class MDB2_Driver_Reverse_pgsql extends MDB2_Driver_Reverse_Common
*/
function getTableIndexDefinition($table_name, $index_name)
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@@ -256,7 +257,7 @@ class MDB2_Driver_Reverse_pgsql extends MDB2_Driver_Reverse_Common
*/
function getTableConstraintDefinition($table_name, $constraint_name)
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@@ -443,7 +444,7 @@ class MDB2_Driver_Reverse_pgsql extends MDB2_Driver_Reverse_Common
*/
function getTriggerDefinition($trigger)
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@@ -517,7 +518,7 @@ class MDB2_Driver_Reverse_pgsql extends MDB2_Driver_Reverse_Common
return parent::tableInfo($result, $mode);
}
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
+18 -16
View File
@@ -43,10 +43,10 @@
// | Lorenzo Alberton <l.alberton@quipo.it> |
// +----------------------------------------------------------------------+
//
// $Id: sqlite.php,v 1.80 2008/05/03 10:30:14 quipo Exp $
// $Id$
//
require_once('MDB2/Driver/Reverse/Common.php');
require_once 'MDB2/Driver/Reverse/Common.php';
/**
* MDB2 SQlite driver for the schema reverse engineering module
@@ -78,7 +78,7 @@ class MDB2_Driver_Reverse_sqlite extends MDB2_Driver_Reverse_Common
*/
function _getTableColumns($sql)
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@@ -95,7 +95,7 @@ class MDB2_Driver_Reverse_sqlite extends MDB2_Driver_Reverse_Common
return $db->raiseError(MDB2_ERROR_UNSUPPORTED, null, null,
'unexpected empty table column definition list', __FUNCTION__);
}
$regexp = '/^\s*([^\s]+) +(CHAR|VARCHAR|VARCHAR2|TEXT|BOOLEAN|SMALLINT|INT|INTEGER|DECIMAL|BIGINT|DOUBLE|FLOAT|DATETIME|DATE|TIME|LONGTEXT|LONGBLOB)( ?\(([1-9][0-9]*)(:([1-9][0-9]*))?\))?( NULL| NOT NULL)?( UNSIGNED)?( NULL| NOT NULL)?( PRIMARY KEY)?( DEFAULT (\'[^\']*\'|[^ ]+))?( NULL| NOT NULL)?( PRIMARY KEY)?(\s*\-\-.*)?$/i';
$regexp = '/^\s*([^\s]+) +(CHAR|VARCHAR|VARCHAR2|TEXT|BOOLEAN|SMALLINT|INT|INTEGER|DECIMAL|TINYINT|BIGINT|DOUBLE|FLOAT|DATETIME|DATE|TIME|LONGTEXT|LONGBLOB)( ?\(([1-9][0-9]*)(:([1-9][0-9]*))?\))?( NULL| NOT NULL)?( UNSIGNED)?( NULL| NOT NULL)?( PRIMARY KEY)?( DEFAULT (\'[^\']*\'|[^ ]+))?( NULL| NOT NULL)?( PRIMARY KEY)?(\s*\-\-.*)?$/i';
$regexp2 = '/^\s*([^ ]+) +(PRIMARY|UNIQUE|CHECK)$/i';
for ($i=0, $j=0; $i<$count; ++$i) {
if (!preg_match($regexp, trim($column_sql[$i]), $matches)) {
@@ -128,6 +128,8 @@ class MDB2_Driver_Reverse_sqlite extends MDB2_Driver_Reverse_Common
$default = null;
}
$columns[$j]['default'] = $default;
} else {
$columns[$j]['default'] = null;
}
if (isset($matches[7]) && strlen($matches[7])) {
$columns[$j]['notnull'] = ($matches[7] === ' NOT NULL');
@@ -156,11 +158,11 @@ class MDB2_Driver_Reverse_sqlite extends MDB2_Driver_Reverse_Common
*/
function getTableFieldDefinition($table_name, $field_name)
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
list($schema, $table) = $this->splitTableSchema($table_name);
$result = $db->loadModule('Datatype', null, true);
@@ -201,7 +203,7 @@ class MDB2_Driver_Reverse_sqlite extends MDB2_Driver_Reverse_Common
$default = false;
if (array_key_exists('default', $column)) {
$default = $column['default'];
if (is_null($default) && $notnull) {
if ((null === $default) && $notnull) {
$default = '';
}
}
@@ -214,13 +216,13 @@ class MDB2_Driver_Reverse_sqlite extends MDB2_Driver_Reverse_Common
'notnull' => $notnull,
'nativetype' => preg_replace('/^([a-z]+)[^a-z].*/i', '\\1', $column['type'])
);
if (!is_null($length)) {
if (null !== $length) {
$definition[0]['length'] = $length;
}
if (!is_null($unsigned)) {
if (null !== $unsigned) {
$definition[0]['unsigned'] = $unsigned;
}
if (!is_null($fixed)) {
if (null !== $fixed) {
$definition[0]['fixed'] = $fixed;
}
if ($default !== false) {
@@ -258,11 +260,11 @@ class MDB2_Driver_Reverse_sqlite extends MDB2_Driver_Reverse_Common
*/
function getTableIndexDefinition($table_name, $index_name)
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
list($schema, $table) = $this->splitTableSchema($table_name);
$query = "SELECT sql FROM sqlite_master WHERE type='index' AND ";
@@ -341,11 +343,11 @@ class MDB2_Driver_Reverse_sqlite extends MDB2_Driver_Reverse_Common
*/
function getTableConstraintDefinition($table_name, $constraint_name)
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
list($schema, $table) = $this->splitTableSchema($table_name);
$query = "SELECT sql FROM sqlite_master WHERE type='index' AND ";
@@ -532,7 +534,7 @@ class MDB2_Driver_Reverse_sqlite extends MDB2_Driver_Reverse_Common
*/
function getTriggerDefinition($trigger)
{
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@@ -596,7 +598,7 @@ class MDB2_Driver_Reverse_sqlite extends MDB2_Driver_Reverse_Common
return parent::tableInfo($result, $mode);
}
$db =$this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
+87 -58
View File
@@ -43,7 +43,7 @@
// | Author: Lukas Smith <smith@pooteeweet.org> |
// +----------------------------------------------------------------------+
//
// $Id: mysql.php,v 1.214 2008/11/16 21:45:08 quipo Exp $
// $Id$
//
/**
@@ -57,21 +57,30 @@ class MDB2_Driver_mysql extends MDB2_Driver_Common
{
// {{{ properties
var $string_quoting = array('start' => "'", 'end' => "'", 'escape' => '\\', 'escape_pattern' => '\\');
public $string_quoting = array(
'start' => "'",
'end' => "'",
'escape' => '\\',
'escape_pattern' => '\\',
);
var $identifier_quoting = array('start' => '`', 'end' => '`', 'escape' => '`');
public $identifier_quoting = array(
'start' => '`',
'end' => '`',
'escape' => '`',
);
var $sql_comments = array(
public $sql_comments = array(
array('start' => '-- ', 'end' => "\n", 'escape' => false),
array('start' => '#', 'end' => "\n", 'escape' => false),
array('start' => '/*', 'end' => '*/', 'escape' => false),
);
var $server_capabilities_checked = false;
protected $server_capabilities_checked = false;
var $start_transaction = false;
protected $start_transaction = false;
var $varchar_max_length = 255;
public $varchar_max_length = 255;
// }}}
// {{{ constructor
@@ -117,7 +126,7 @@ class MDB2_Driver_mysql extends MDB2_Driver_Common
// }}}
// {{{ _reCheckSupportedOptions()
/**
* If the user changes certain options, other capabilities may depend
* on the new settings, so we need to check them (again).
@@ -338,7 +347,7 @@ class MDB2_Driver_mysql extends MDB2_Driver_Common
register_shutdown_function('MDB2_closeOpenTransactions');
}
$query = $this->start_transaction ? 'START TRANSACTION' : 'SET AUTOCOMMIT = 0';
$result =& $this->_doQuery($query, true);
$result = $this->_doQuery($query, true);
if (PEAR::isError($result)) {
return $result;
}
@@ -385,13 +394,13 @@ class MDB2_Driver_mysql extends MDB2_Driver_Common
'transactions are not supported', __FUNCTION__);
}
$result =& $this->_doQuery('COMMIT', true);
$result = $this->_doQuery('COMMIT', true);
if (PEAR::isError($result)) {
return $result;
}
if (!$this->start_transaction) {
$query = 'SET AUTOCOMMIT = 1';
$result =& $this->_doQuery($query, true);
$result = $this->_doQuery($query, true);
if (PEAR::isError($result)) {
return $result;
}
@@ -431,13 +440,13 @@ class MDB2_Driver_mysql extends MDB2_Driver_Common
}
$query = 'ROLLBACK';
$result =& $this->_doQuery($query, true);
$result = $this->_doQuery($query, true);
if (PEAR::isError($result)) {
return $result;
}
if (!$this->start_transaction) {
$query = 'SET AUTOCOMMIT = 1';
$result =& $this->_doQuery($query, true);
$result = $this->_doQuery($query, true);
if (PEAR::isError($result)) {
return $result;
}
@@ -457,12 +466,16 @@ class MDB2_Driver_mysql extends MDB2_Driver_Common
* READ COMMITTED (prevents dirty reads)
* REPEATABLE READ (prevents nonrepeatable reads)
* SERIALIZABLE (prevents phantom reads)
* @param array some transaction options:
* 'wait' => 'WAIT' | 'NO WAIT'
* 'rw' => 'READ WRITE' | 'READ ONLY'
*
* @return mixed MDB2_OK on success, a MDB2 error on failure
*
* @access public
* @since 2.1.1
*/
static function setTransactionIsolation($isolation, $options = array())
function setTransactionIsolation($isolation, $options = array())
{
$this->debug('Setting transaction isolation level', __FUNCTION__, array('is_manip' => true));
if (!$this->supports('transactions')) {
@@ -501,14 +514,14 @@ class MDB2_Driver_mysql extends MDB2_Driver_Common
}
$params = array();
if ($this->dsn['protocol'] && $this->dsn['protocol'] == 'unix') {
$params[0] = ':' . $this->dsn['socket'];
$unix = ($this->dsn['protocol'] && $this->dsn['protocol'] == 'unix');
if (empty($this->dsn['hostspec'])) {
$this->dsn['hostspec'] = $unix ? '' : 'localhost';
}
if ($this->dsn['hostspec']) {
$params[0] = $this->dsn['hostspec'] . ($this->dsn['port'] ? ':' . $this->dsn['port'] : '');
} else {
$params[0] = $this->dsn['hostspec'] ? $this->dsn['hostspec']
: 'localhost';
if ($this->dsn['port']) {
$params[0].= ':' . $this->dsn['port'];
}
$params[0] = ':' . $this->dsn['socket'];
}
$params[] = $username ? $username : null;
$params[] = $password ? $password : null;
@@ -626,7 +639,7 @@ class MDB2_Driver_mysql extends MDB2_Driver_Common
$client_info = mysql_get_client_info();
if (function_exists('mysql_set_charset') && version_compare($client_info, '5.0.6')) {
if (!$result = mysql_set_charset($charset, $connection)) {
$err =& $this->raiseError(null, null, null,
$err = $this->raiseError(null, null, null,
'Could not set client character set', __FUNCTION__);
return $err;
}
@@ -634,7 +647,7 @@ class MDB2_Driver_mysql extends MDB2_Driver_Common
}
$query = "SET NAMES '".mysql_real_escape_string($charset, $connection)."'";
if (!is_null($collation)) {
$query .= " COLLATE '".mysqli_real_escape_string($connection, $collation)."'";
$query .= " COLLATE '".mysql_real_escape_string($collation, $connection)."'";
}
return $this->_doQuery($query, true, $connection);
}
@@ -709,7 +722,7 @@ class MDB2_Driver_mysql extends MDB2_Driver_Common
// }}}
// {{{ standaloneQuery()
/**
/**
* execute a query as DBA
*
* @param string $query the SQL query
@@ -719,7 +732,7 @@ class MDB2_Driver_mysql extends MDB2_Driver_Common
* @return mixed MDB2_OK on success, a MDB2 error on failure
* @access public
*/
function &standaloneQuery($query, $types = null, $is_manip = false)
function standaloneQuery($query, $types = null, $is_manip = false)
{
$user = $this->options['DBA_username']? $this->options['DBA_username'] : $this->dsn['username'];
$pass = $this->options['DBA_password']? $this->options['DBA_password'] : $this->dsn['password'];
@@ -732,8 +745,8 @@ class MDB2_Driver_mysql extends MDB2_Driver_Common
$limit = $this->limit;
$this->offset = $this->limit = 0;
$query = $this->_modifyQuery($query, $is_manip, $limit, $offset);
$result =& $this->_doQuery($query, $is_manip, $connection, $this->database_name);
$result = $this->_doQuery($query, $is_manip, $connection, $this->database_name);
if (!PEAR::isError($result)) {
$result = $this->_affectedRows($connection, $result);
}
@@ -754,7 +767,7 @@ class MDB2_Driver_mysql extends MDB2_Driver_Common
* @return result or error object
* @access protected
*/
function &_doQuery($query, $is_manip = false, $connection = null, $database_name = null)
function _doQuery($query, $is_manip = false, $connection = null, $database_name = null)
{
$this->last_query = $query;
$result = $this->debug($query, 'query', array('is_manip' => $is_manip, 'when' => 'pre'));
@@ -793,8 +806,8 @@ class MDB2_Driver_mysql extends MDB2_Driver_Common
$function = $this->options['result_buffering']
? 'mysql_query' : 'mysql_unbuffered_query';
$result = @$function($query, $connection);
if (!$result) {
$err =& $this->raiseError(null, null, null,
if (!$result && 0 !== mysql_errno($connection)) {
$err = $this->raiseError(null, null, null,
'Could not execute statement', __FUNCTION__);
return $err;
}
@@ -945,7 +958,7 @@ class MDB2_Driver_mysql extends MDB2_Driver_Common
$this->supported['triggers'] = false;
$this->start_transaction = false;
$this->varchar_max_length = 255;
$server_info = $this->getServerVersion();
if (is_array($server_info)) {
$server_version = $server_info['major'].'.'.$server_info['minor'].'.'.$server_info['patch'];
@@ -983,7 +996,7 @@ class MDB2_Driver_mysql extends MDB2_Driver_Common
// {{{ function _skipUserDefinedVariable($query, $position)
/**
* Utility method, used by prepare() to avoid misinterpreting MySQL user
* Utility method, used by prepare() to avoid misinterpreting MySQL user
* defined variables (SELECT @x:=5) for placeholders.
* Check if the placeholder is a false positive, i.e. if it is an user defined
* variable instead. If so, skip it and advance the position, otherwise
@@ -1032,13 +1045,18 @@ class MDB2_Driver_mysql extends MDB2_Driver_Common
* @access public
* @see bindParam, execute
*/
function &prepare($query, $types = null, $result_types = null, $lobs = array())
function prepare($query, $types = null, $result_types = null, $lobs = array())
{
// connect to get server capabilities (http://pear.php.net/bugs/16147)
$connection = $this->getConnection();
if (PEAR::isError($connection)) {
return $connection;
}
if ($this->options['emulate_prepared']
|| $this->supported['prepared_statements'] !== true
) {
$obj =& parent::prepare($query, $types, $result_types, $lobs);
return $obj;
return parent::prepare($query, $types, $result_types, $lobs);
}
$is_manip = ($result_types === MDB2_PREPARE_MANIP);
$offset = $this->offset;
@@ -1072,7 +1090,7 @@ class MDB2_Driver_mysql extends MDB2_Driver_Common
if (is_null($placeholder_type)) {
$placeholder_type_guess = $query[$p_position];
}
$new_pos = $this->_skipDelimitedStrings($query, $position, $p_position);
if (PEAR::isError($new_pos)) {
return $new_pos;
@@ -1081,7 +1099,7 @@ class MDB2_Driver_mysql extends MDB2_Driver_Common
$position = $new_pos;
continue; //evaluate again starting from the new position
}
//make sure this is not part of an user defined variable
$new_pos = $this->_skipUserDefinedVariable($query, $position);
if ($new_pos != $position) {
@@ -1098,7 +1116,7 @@ class MDB2_Driver_mysql extends MDB2_Driver_Common
$regexp = '/^.{'.($position+1).'}('.$this->options['bindname_format'].').*$/s';
$parameter = preg_replace($regexp, '\\1', $query);
if ($parameter === '') {
$err =& $this->raiseError(MDB2_ERROR_SYNTAX, null, null,
$err = $this->raiseError(MDB2_ERROR_SYNTAX, null, null,
'named parameter name must match "bindname_format" option', __FUNCTION__);
return $err;
}
@@ -1112,15 +1130,12 @@ class MDB2_Driver_mysql extends MDB2_Driver_Common
$position = $p_position;
}
}
$connection = $this->getConnection();
if (PEAR::isError($connection)) {
return $connection;
}
static $prep_statement_counter = 1;
$statement_name = sprintf($this->options['statement_format'], $this->phptype, $prep_statement_counter++ . sha1(microtime() + mt_rand()));
$statement_name = substr(strtolower($statement_name), 0, $this->options['max_identifiers_length']);
$query = "PREPARE $statement_name FROM ".$this->quote($query, 'text');
$statement =& $this->_doQuery($query, true, $connection);
$statement = $this->_doQuery($query, true, $connection);
if (PEAR::isError($statement)) {
return $statement;
}
@@ -1240,7 +1255,7 @@ class MDB2_Driver_mysql extends MDB2_Driver_Common
$table = $this->quoteIdentifier($table, true);
$query = "REPLACE INTO $table ($query) VALUES ($values)";
$result =& $this->_doQuery($query, true, $connection);
$result = $this->_doQuery($query, true, $connection);
if (PEAR::isError($result)) {
return $result;
}
@@ -1268,7 +1283,7 @@ class MDB2_Driver_mysql extends MDB2_Driver_Common
$query = "INSERT INTO $sequence_name ($seqcol_name) VALUES (NULL)";
$this->pushErrorHandling(PEAR_ERROR_RETURN);
$this->expectError(MDB2_ERROR_NOSUCHTABLE);
$result =& $this->_doQuery($query, true);
$result = $this->_doQuery($query, true);
$this->popExpect();
$this->popErrorHandling();
if (PEAR::isError($result)) {
@@ -1287,7 +1302,7 @@ class MDB2_Driver_mysql extends MDB2_Driver_Common
$value = $this->lastInsertID();
if (is_numeric($value)) {
$query = "DELETE FROM $sequence_name WHERE $seqcol_name < $value";
$result =& $this->_doQuery($query, true);
$result = $this->_doQuery($query, true);
if (PEAR::isError($result)) {
$this->warnings[] = 'nextID: could not delete previous sequence table values from '.$seq_name;
}
@@ -1310,7 +1325,8 @@ class MDB2_Driver_mysql extends MDB2_Driver_Common
function lastInsertID($table = null, $field = null)
{
// not using mysql_insert_id() due to http://pear.php.net/bugs/bug.php?id=8051
return $this->queryOne('SELECT LAST_INSERT_ID()', 'integer');
// not casting to integer to handle BIGINT http://pear.php.net/bugs/bug.php?id=17650
return $this->queryOne('SELECT LAST_INSERT_ID()');
}
// }}}
@@ -1352,7 +1368,7 @@ class MDB2_Result_mysql extends MDB2_Result_Common
* @return int data array on success, a MDB2 error on failure
* @access public
*/
function &fetchRow($fetchmode = MDB2_FETCHMODE_DEFAULT, $rownum = null)
function fetchRow($fetchmode = MDB2_FETCHMODE_DEFAULT, $rownum = null)
{
if (!is_null($rownum)) {
$seek = $this->seek($rownum);
@@ -1363,7 +1379,9 @@ class MDB2_Result_mysql extends MDB2_Result_Common
if ($fetchmode == MDB2_FETCHMODE_DEFAULT) {
$fetchmode = $this->db->fetchmode;
}
if ($fetchmode & MDB2_FETCHMODE_ASSOC) {
if ( $fetchmode == MDB2_FETCHMODE_ASSOC
|| $fetchmode == MDB2_FETCHMODE_OBJECT
) {
$row = @mysql_fetch_assoc($this->result);
if (is_array($row)
&& $this->db->options['portability'] & MDB2_PORTABILITY_FIX_CASE
@@ -1376,12 +1394,11 @@ class MDB2_Result_mysql extends MDB2_Result_Common
if (!$row) {
if ($this->result === false) {
$err =& $this->db->raiseError(MDB2_ERROR_NEED_MORE_DATA, null, null,
$err = $this->db->raiseError(MDB2_ERROR_NEED_MORE_DATA, null, null,
'resultset has already been freed', __FUNCTION__);
return $err;
}
$null = null;
return $null;
return null;
}
$mode = $this->db->options['portability'] & MDB2_PORTABILITY_EMPTY_TO_NULL;
$rtrim = false;
@@ -1395,8 +1412,16 @@ class MDB2_Result_mysql extends MDB2_Result_Common
if ($mode) {
$this->db->_fixResultArrayValues($row, $mode);
}
if (!empty($this->types)) {
if ( ( $fetchmode != MDB2_FETCHMODE_ASSOC
&& $fetchmode != MDB2_FETCHMODE_OBJECT)
&& !empty($this->types)
) {
$row = $this->db->datatype->convertResultRow($this->types, $row, $rtrim);
} elseif (($fetchmode == MDB2_FETCHMODE_ASSOC
|| $fetchmode == MDB2_FETCHMODE_OBJECT)
&& !empty($this->types_assoc)
) {
$row = $this->db->datatype->convertResultRow($this->types_assoc, $row, $rtrim);
}
if (!empty($this->values)) {
$this->_assignBindColumns($row);
@@ -1406,7 +1431,8 @@ class MDB2_Result_mysql extends MDB2_Result_Common
if ($object_class == 'stdClass') {
$row = (object) $row;
} else {
$row = new $object_class($row);
$rowObj = new $object_class($row);
$row = $rowObj;
}
}
++$this->rownum;
@@ -1568,6 +1594,8 @@ class MDB2_BufferedResult_mysql extends MDB2_Result_mysql
}
return $rows;
}
// }}}
}
/**
@@ -1591,10 +1619,10 @@ class MDB2_Statement_mysql extends MDB2_Statement_Common
* a MDB2 error on failure
* @access private
*/
function &_execute($result_class = true, $result_wrap_class = false)
function _execute($result_class = true, $result_wrap_class = true)
{
if (is_null($this->statement)) {
$result =& parent::_execute($result_class, $result_wrap_class);
$result = parent::_execute($result_class, $result_wrap_class);
return $result;
}
$this->db->last_query = $this->query;
@@ -1617,6 +1645,7 @@ class MDB2_Statement_mysql extends MDB2_Statement_Common
return $this->db->raiseError(MDB2_ERROR_NOT_FOUND, null, null,
'Unable to bind to missing placeholder: '.$parameter, __FUNCTION__);
}
$close = false;
$value = $this->values[$parameter];
$type = array_key_exists($parameter, $this->types) ? $this->types[$parameter] : null;
if (is_resource($value) || $type == 'clob' || $type == 'blob' && $this->db->options['lob_allow_url_include']) {
@@ -1661,7 +1690,7 @@ class MDB2_Statement_mysql extends MDB2_Statement_Common
return $affected_rows;
}
$result =& $this->db->_wrapResult($result, $this->result_types,
$result = $this->db->_wrapResult($result, $this->result_types,
$result_class, $result_wrap_class, $this->limit, $this->offset);
$this->db->debug($this->query, 'execute', array('is_manip' => $this->is_manip, 'when' => 'post', 'result' => $result));
return $result;
@@ -1697,4 +1726,4 @@ class MDB2_Statement_mysql extends MDB2_Statement_Common
return $result;
}
}
?>
?>
+1700
View File
File diff suppressed because it is too large Load Diff
+132 -68
View File
@@ -43,7 +43,7 @@
// | Author: Paul Cooper <pgc@ucecom.com> |
// +----------------------------------------------------------------------+
//
// $Id: pgsql.php,v 1.203 2008/11/29 14:04:46 afz Exp $
// $Id$
/**
* MDB2 PostGreSQL driver
@@ -236,21 +236,22 @@ class MDB2_Driver_pgsql extends MDB2_Driver_Common
function beginTransaction($savepoint = null)
{
$this->debug('Starting transaction/savepoint', __FUNCTION__, array('is_manip' => true, 'savepoint' => $savepoint));
if (!is_null($savepoint)) {
if (null !== $savepoint) {
if (!$this->in_transaction) {
return $this->raiseError(MDB2_ERROR_INVALID, null, null,
'savepoint cannot be released when changes are auto committed', __FUNCTION__);
}
$query = 'SAVEPOINT '.$savepoint;
return $this->_doQuery($query, true);
} elseif ($this->in_transaction) {
}
if ($this->in_transaction) {
return MDB2_OK; //nothing to do
}
if (!$this->destructor_registered && $this->opened_persistent) {
$this->destructor_registered = true;
register_shutdown_function('MDB2_closeOpenTransactions');
}
$result =& $this->_doQuery('BEGIN', true);
$result = $this->_doQuery('BEGIN', true);
if (PEAR::isError($result)) {
return $result;
}
@@ -279,12 +280,12 @@ class MDB2_Driver_pgsql extends MDB2_Driver_Common
return $this->raiseError(MDB2_ERROR_INVALID, null, null,
'commit/release savepoint cannot be done changes are auto committed', __FUNCTION__);
}
if (!is_null($savepoint)) {
if (null !== $savepoint) {
$query = 'RELEASE SAVEPOINT '.$savepoint;
return $this->_doQuery($query, true);
}
$result =& $this->_doQuery('COMMIT', true);
$result = $this->_doQuery('COMMIT', true);
if (PEAR::isError($result)) {
return $result;
}
@@ -313,13 +314,13 @@ class MDB2_Driver_pgsql extends MDB2_Driver_Common
return $this->raiseError(MDB2_ERROR_INVALID, null, null,
'rollback cannot be done changes are auto committed', __FUNCTION__);
}
if (!is_null($savepoint)) {
if (null !== $savepoint) {
$query = 'ROLLBACK TO SAVEPOINT '.$savepoint;
return $this->_doQuery($query, true);
}
$query = 'ROLLBACK';
$result =& $this->_doQuery($query, true);
$result = $this->_doQuery($query, true);
if (PEAR::isError($result)) {
return $result;
}
@@ -338,12 +339,16 @@ class MDB2_Driver_pgsql extends MDB2_Driver_Common
* READ COMMITTED (prevents dirty reads)
* REPEATABLE READ (prevents nonrepeatable reads)
* SERIALIZABLE (prevents phantom reads)
* @param array some transaction options:
* 'wait' => 'WAIT' | 'NO WAIT'
* 'rw' => 'READ WRITE' | 'READ ONLY'
*
* @return mixed MDB2_OK on success, a MDB2 error on failure
*
* @access public
* @since 2.1.1
*/
static function setTransactionIsolation($isolation, $options = array())
function setTransactionIsolation($isolation, $options = array())
{
$this->debug('Setting transaction isolation level', __FUNCTION__, array('is_manip' => true));
switch ($isolation) {
@@ -376,7 +381,7 @@ class MDB2_Driver_pgsql extends MDB2_Driver_Common
return $this->raiseError(MDB2_ERROR_NOT_FOUND, null, null,
'extension '.$this->phptype.' is not compiled into PHP', __FUNCTION__);
}
if ($database_name == '') {
$database_name = 'template1';
}
@@ -452,6 +457,29 @@ class MDB2_Driver_pgsql extends MDB2_Driver_Common
}
}
// Enable extra compatibility settings on 8.2 and later
if (function_exists('pg_parameter_status')) {
$version = pg_parameter_status($connection, 'server_version');
if ($version == false) {
return $this->raiseError(null, null, null,
'Unable to retrieve server version', __FUNCTION__);
}
$version = explode ('.', $version);
if ( $version['0'] > 8
|| ($version['0'] == 8 && $version['1'] >= 2)
) {
if (!@pg_query($connection, "SET SESSION STANDARD_CONFORMING_STRINGS = OFF")) {
return $this->raiseError(null, null, null,
'Unable to set standard_conforming_strings to off', __FUNCTION__);
}
if (!@pg_query($connection, "SET SESSION ESCAPE_STRING_WARNING = OFF")) {
return $this->raiseError(null, null, null,
'Unable to set escape_string_warning to off', __FUNCTION__);
}
}
}
return $connection;
}
@@ -509,7 +537,7 @@ class MDB2_Driver_pgsql extends MDB2_Driver_Common
*/
function setCharset($charset, $connection = null)
{
if (is_null($connection)) {
if (null === $connection) {
$connection = $this->getConnection();
if (PEAR::isError($connection)) {
return $connection;
@@ -595,7 +623,7 @@ class MDB2_Driver_pgsql extends MDB2_Driver_Common
// }}}
// {{{ standaloneQuery()
/**
/**
* execute a query as DBA
*
* @param string $query the SQL query
@@ -605,7 +633,7 @@ class MDB2_Driver_pgsql extends MDB2_Driver_Common
* @return mixed MDB2_OK on success, a MDB2 error on failure
* @access public
*/
function &standaloneQuery($query, $types = null, $is_manip = false)
function standaloneQuery($query, $types = null, $is_manip = false)
{
$user = $this->options['DBA_username']? $this->options['DBA_username'] : $this->dsn['username'];
$pass = $this->options['DBA_password']? $this->options['DBA_password'] : $this->dsn['password'];
@@ -619,12 +647,12 @@ class MDB2_Driver_pgsql extends MDB2_Driver_Common
$this->offset = $this->limit = 0;
$query = $this->_modifyQuery($query, $is_manip, $limit, $offset);
$result =& $this->_doQuery($query, $is_manip, $connection, $this->database_name);
$result = $this->_doQuery($query, $is_manip, $connection, $this->database_name);
if (!PEAR::isError($result)) {
if ($is_manip) {
$result = $this->_affectedRows($connection, $result);
} else {
$result =& $this->_wrapResult($result, $types, true, false, $limit, $offset);
$result = $this->_wrapResult($result, $types, true, true, $limit, $offset);
}
}
@@ -644,7 +672,7 @@ class MDB2_Driver_pgsql extends MDB2_Driver_Common
* @return result or error object
* @access protected
*/
function &_doQuery($query, $is_manip = false, $connection = null, $database_name = null)
function _doQuery($query, $is_manip = false, $connection = null, $database_name = null)
{
$this->last_query = $query;
$result = $this->debug($query, 'query', array('is_manip' => $is_manip, 'when' => 'pre'));
@@ -659,7 +687,7 @@ class MDB2_Driver_pgsql extends MDB2_Driver_Common
return $result;
}
if (is_null($connection)) {
if (null === $connection) {
$connection = $this->getConnection();
if (PEAR::isError($connection)) {
return $connection;
@@ -669,12 +697,12 @@ class MDB2_Driver_pgsql extends MDB2_Driver_Common
$function = $this->options['multi_query'] ? 'pg_send_query' : 'pg_query';
$result = @$function($connection, $query);
if (!$result) {
$err =& $this->raiseError(null, null, null,
$err = $this->raiseError(null, null, null,
'Could not execute statement', __FUNCTION__);
return $err;
} elseif ($this->options['multi_query']) {
if (!($result = @pg_get_result($connection))) {
$err =& $this->raiseError(null, null, null,
$err = $this->raiseError(null, null, null,
'Could not get the first result from a multi query', __FUNCTION__);
return $err;
}
@@ -697,7 +725,7 @@ class MDB2_Driver_pgsql extends MDB2_Driver_Common
*/
function _affectedRows($connection, $result = null)
{
if (is_null($connection)) {
if (null === $connection) {
$connection = $this->getConnection();
if (PEAR::isError($connection)) {
return $connection;
@@ -736,10 +764,10 @@ class MDB2_Driver_pgsql extends MDB2_Driver_Common
}
return $query;
}
// }}}
// {{{ _modifyManipQuery()
/**
* Changes a manip query string for various DBMS specific reasons
*
@@ -841,11 +869,10 @@ class MDB2_Driver_pgsql extends MDB2_Driver_Common
* @access public
* @see bindParam, execute
*/
function &prepare($query, $types = null, $result_types = null, $lobs = array())
function prepare($query, $types = null, $result_types = null, $lobs = array())
{
if ($this->options['emulate_prepared']) {
$obj =& parent::prepare($query, $types, $result_types, $lobs);
return $obj;
return parent::prepare($query, $types, $result_types, $lobs);
}
$is_manip = ($result_types === MDB2_PREPARE_MANIP);
$offset = $this->offset;
@@ -885,10 +912,10 @@ class MDB2_Driver_pgsql extends MDB2_Driver_Common
} else {
break;
}
if (is_null($placeholder_type)) {
if (null === $placeholder_type) {
$placeholder_type_guess = $query[$p_position];
}
$new_pos = $this->_skipDelimitedStrings($query, $position, $p_position);
if (PEAR::isError($new_pos)) {
return $new_pos;
@@ -899,7 +926,7 @@ class MDB2_Driver_pgsql extends MDB2_Driver_Common
}
if ($query[$position] == $placeholder_type_guess) {
if (is_null($placeholder_type)) {
if (null === $placeholder_type) {
$placeholder_type = $query[$p_position];
$question = $colon = $placeholder_type;
if (!empty($types) && is_array($types)) {
@@ -916,7 +943,7 @@ class MDB2_Driver_pgsql extends MDB2_Driver_Common
$regexp = '/^.{'.($position+1).'}('.$this->options['bindname_format'].').*$/s';
$param = preg_replace($regexp, '\\1', $query);
if ($param === '') {
$err =& $this->raiseError(MDB2_ERROR_SYNTAX, null, null,
$err = $this->raiseError(MDB2_ERROR_SYNTAX, null, null,
'named parameter name must match "bindname_format" option', __FUNCTION__);
return $err;
}
@@ -932,17 +959,18 @@ class MDB2_Driver_pgsql extends MDB2_Driver_Common
$pgtypes[] = 'text';
}
}
if (($key_parameter = array_search($name, $positions))) {
$next_parameter = 1;
foreach ($positions as $key => $value) {
if ($key_parameter == $key) {
break;
}
++$next_parameter;
}
if (($key_parameter = array_search($name, $positions)) !== false) {
//$next_parameter = 1;
$parameter = $key_parameter + 1;
//foreach ($positions as $key => $value) {
// if ($key_parameter == $key) {
// break;
// }
// ++$next_parameter;
//}
} else {
++$parameter;
$next_parameter = $parameter;
//$next_parameter = $parameter;
$positions[] = $name;
}
$query = substr_replace($query, '$'.$parameter, $position, $length);
@@ -958,10 +986,10 @@ class MDB2_Driver_pgsql extends MDB2_Driver_Common
static $prep_statement_counter = 1;
$statement_name = sprintf($this->options['statement_format'], $this->phptype, $prep_statement_counter++ . sha1(microtime() + mt_rand()));
$statement_name = substr(strtolower($statement_name), 0, $this->options['max_identifiers_length']);
if ($pgtypes === false) {
if (false === $pgtypes) {
$result = @pg_prepare($connection, $statement_name, $query);
if (!$result) {
$err =& $this->raiseError(null, null, null,
$err = $this->raiseError(null, null, null,
'Unable to create prepared statement handle', __FUNCTION__);
return $err;
}
@@ -971,7 +999,7 @@ class MDB2_Driver_pgsql extends MDB2_Driver_Common
$types_string = ' ('.implode(', ', $pgtypes).') ';
}
$query = 'PREPARE '.$statement_name.$types_string.' AS '.$query;
$statement =& $this->_doQuery($query, true, $connection);
$statement = $this->_doQuery($query, true, $connection);
if (PEAR::isError($statement)) {
return $statement;
}
@@ -1140,9 +1168,9 @@ class MDB2_Result_pgsql extends MDB2_Result_Common
* @return int data array on success, a MDB2 error on failure
* @access public
*/
function &fetchRow($fetchmode = MDB2_FETCHMODE_DEFAULT, $rownum = null)
function fetchRow($fetchmode = MDB2_FETCHMODE_DEFAULT, $rownum = null)
{
if (!is_null($rownum)) {
if (null !== $rownum) {
$seek = $this->seek($rownum);
if (PEAR::isError($seek)) {
return $seek;
@@ -1151,7 +1179,9 @@ class MDB2_Result_pgsql extends MDB2_Result_Common
if ($fetchmode == MDB2_FETCHMODE_DEFAULT) {
$fetchmode = $this->db->fetchmode;
}
if ($fetchmode & MDB2_FETCHMODE_ASSOC) {
if ( $fetchmode == MDB2_FETCHMODE_ASSOC
|| $fetchmode == MDB2_FETCHMODE_OBJECT
) {
$row = @pg_fetch_array($this->result, null, PGSQL_ASSOC);
if (is_array($row)
&& $this->db->options['portability'] & MDB2_PORTABILITY_FIX_CASE
@@ -1162,13 +1192,12 @@ class MDB2_Result_pgsql extends MDB2_Result_Common
$row = @pg_fetch_row($this->result);
}
if (!$row) {
if ($this->result === false) {
$err =& $this->db->raiseError(MDB2_ERROR_NEED_MORE_DATA, null, null,
if (false === $this->result) {
$err = $this->db->raiseError(MDB2_ERROR_NEED_MORE_DATA, null, null,
'resultset has already been freed', __FUNCTION__);
return $err;
}
$null = null;
return $null;
return null;
}
$mode = $this->db->options['portability'] & MDB2_PORTABILITY_EMPTY_TO_NULL;
$rtrim = false;
@@ -1182,8 +1211,16 @@ class MDB2_Result_pgsql extends MDB2_Result_Common
if ($mode) {
$this->db->_fixResultArrayValues($row, $mode);
}
if (!empty($this->types)) {
if ( ( $fetchmode != MDB2_FETCHMODE_ASSOC
&& $fetchmode != MDB2_FETCHMODE_OBJECT)
&& !empty($this->types)
) {
$row = $this->db->datatype->convertResultRow($this->types, $row, $rtrim);
} elseif (($fetchmode == MDB2_FETCHMODE_ASSOC
|| $fetchmode == MDB2_FETCHMODE_OBJECT)
&& !empty($this->types_assoc)
) {
$row = $this->db->datatype->convertResultRow($this->types_assoc, $row, $rtrim);
}
if (!empty($this->values)) {
$this->_assignBindColumns($row);
@@ -1193,7 +1230,8 @@ class MDB2_Result_pgsql extends MDB2_Result_Common
if ($object_class == 'stdClass') {
$row = (object) $row;
} else {
$row = new $object_class($row);
$rowObj = new $object_class($row);
$row = $rowObj;
}
}
++$this->rownum;
@@ -1242,11 +1280,12 @@ class MDB2_Result_pgsql extends MDB2_Result_Common
function numCols()
{
$cols = @pg_num_fields($this->result);
if (is_null($cols)) {
if ($this->result === false) {
if (null === $cols) {
if (false === $this->result) {
return $this->db->raiseError(MDB2_ERROR_NEED_MORE_DATA, null, null,
'resultset has already been freed', __FUNCTION__);
} elseif (is_null($this->result)) {
}
if (null === $this->result) {
return count($this->types);
}
return $this->db->raiseError(null, null, null,
@@ -1290,7 +1329,7 @@ class MDB2_Result_pgsql extends MDB2_Result_Common
{
if (is_resource($this->result) && $this->db->connection) {
$free = @pg_free_result($this->result);
if ($free === false) {
if (false === $free) {
return $this->db->raiseError(null, null, null,
'Could not free result', __FUNCTION__);
}
@@ -1321,10 +1360,11 @@ class MDB2_BufferedResult_pgsql extends MDB2_Result_pgsql
function seek($rownum = 0)
{
if ($this->rownum != ($rownum - 1) && !@pg_result_seek($this->result, $rownum)) {
if ($this->result === false) {
if (false === $this->result) {
return $this->db->raiseError(MDB2_ERROR_NEED_MORE_DATA, null, null,
'resultset has already been freed', __FUNCTION__);
} elseif (is_null($this->result)) {
}
if (null === $this->result) {
return MDB2_OK;
}
return $this->db->raiseError(MDB2_ERROR_INVALID, null, null,
@@ -1364,11 +1404,12 @@ class MDB2_BufferedResult_pgsql extends MDB2_Result_pgsql
function numRows()
{
$rows = @pg_num_rows($this->result);
if (is_null($rows)) {
if ($this->result === false) {
if (null === $rows) {
if (false === $this->result) {
return $this->db->raiseError(MDB2_ERROR_NEED_MORE_DATA, null, null,
'resultset has already been freed', __FUNCTION__);
} elseif (is_null($this->result)) {
}
if (null === $this->result) {
return 0;
}
return $this->db->raiseError(null, null, null,
@@ -1399,11 +1440,10 @@ class MDB2_Statement_pgsql extends MDB2_Statement_Common
* a MDB2 error on failure
* @access private
*/
function &_execute($result_class = true, $result_wrap_class = false)
function _execute($result_class = true, $result_wrap_class = true)
{
if (is_null($this->statement)) {
$result =& parent::_execute($result_class, $result_wrap_class);
return $result;
if (null === $this->statement) {
return parent::_execute($result_class, $result_wrap_class);
}
$this->db->last_query = $this->query;
$this->db->debug($this->query, 'execute', array('is_manip' => $this->is_manip, 'when' => 'pre', 'parameters' => $this->values));
@@ -1464,7 +1504,7 @@ class MDB2_Statement_pgsql extends MDB2_Statement_Common
if (!$query) {
$result = @pg_execute($connection, $this->statement, $parameters);
if (!$result) {
$err =& $this->db->raiseError(null, null, null,
$err = $this->db->raiseError(null, null, null,
'Unable to execute statement', __FUNCTION__);
return $err;
}
@@ -1480,7 +1520,7 @@ class MDB2_Statement_pgsql extends MDB2_Statement_Common
return $affected_rows;
}
$result =& $this->db->_wrapResult($result, $this->result_types,
$result = $this->db->_wrapResult($result, $this->result_types,
$result_class, $result_wrap_class, $this->limit, $this->offset);
$this->db->debug($this->query, 'execute', array('is_manip' => $this->is_manip, 'when' => 'post', 'result' => $result));
return $result;
@@ -1497,13 +1537,13 @@ class MDB2_Statement_pgsql extends MDB2_Statement_Common
*/
function free()
{
if (is_null($this->positions)) {
if (null === $this->positions) {
return $this->db->raiseError(MDB2_ERROR, null, null,
'Prepared statement has already been freed', __FUNCTION__);
}
$result = MDB2_OK;
if (!is_null($this->statement)) {
if (null !== $this->statement) {
$connection = $this->db->getConnection();
if (PEAR::isError($connection)) {
return $connection;
@@ -1515,5 +1555,29 @@ class MDB2_Statement_pgsql extends MDB2_Statement_Common
parent::free();
return $result;
}
/**
* drop an existing table
*
* @param string $name name of the table that should be dropped
* @return mixed MDB2_OK on success, a MDB2 error on failure
* @access public
*/
function dropTable($name)
{
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
$name = $db->quoteIdentifier($name, true);
$result = $db->exec("DROP TABLE $name");
if (PEAR::isError($result)) {
$result = $db->exec("DROP TABLE $name CASCADE");
}
return $result;
}
}
?>
?>
+58 -42
View File
@@ -43,7 +43,7 @@
// | Author: Lukas Smith <smith@pooteeweet.org> |
// +----------------------------------------------------------------------+
//
// $Id: sqlite.php,v 1.165 2008/11/30 14:28:01 afz Exp $
// $Id$
//
/**
@@ -126,12 +126,12 @@ class MDB2_Driver_sqlite extends MDB2_Driver_Common
}
$native_msg = $this->_lasterror
? html_entity_decode($this->_lasterror) : @sqlite_error_string($native_code);
// PHP 5.2+ prepends the function name to $php_errormsg, so we need
// this hack to work around it, per bug #9599.
$native_msg = preg_replace('/^sqlite[a-z_]+\(\)[^:]*: /', '', $native_msg);
if (is_null($error)) {
if (null === $error) {
static $error_regexps;
if (empty($error_regexps)) {
$error_regexps = array(
@@ -142,6 +142,7 @@ class MDB2_Driver_sqlite extends MDB2_Driver_Common
'/is not unique/' => MDB2_ERROR_CONSTRAINT,
'/columns .* are not unique/i' => MDB2_ERROR_CONSTRAINT,
'/uniqueness constraint failed/' => MDB2_ERROR_CONSTRAINT,
'/violates .*constraint/' => MDB2_ERROR_CONSTRAINT,
'/may not be NULL/' => MDB2_ERROR_CONSTRAINT_NOT_NULL,
'/^no such column:/' => MDB2_ERROR_NOSUCHFIELD,
'/no column named/' => MDB2_ERROR_NOSUCHFIELD,
@@ -194,10 +195,11 @@ class MDB2_Driver_sqlite extends MDB2_Driver_Common
function beginTransaction($savepoint = null)
{
$this->debug('Starting transaction/savepoint', __FUNCTION__, array('is_manip' => true, 'savepoint' => $savepoint));
if (!is_null($savepoint)) {
if (null !== $savepoint) {
return $this->raiseError(MDB2_ERROR_UNSUPPORTED, null, null,
'savepoints are not supported', __FUNCTION__);
} elseif ($this->in_transaction) {
}
if ($this->in_transaction) {
return MDB2_OK; //nothing to do
}
if (!$this->destructor_registered && $this->opened_persistent) {
@@ -205,7 +207,7 @@ class MDB2_Driver_sqlite extends MDB2_Driver_Common
register_shutdown_function('MDB2_closeOpenTransactions');
}
$query = 'BEGIN TRANSACTION '.$this->options['base_transaction_name'];
$result =$this->_doQuery($query, true);
$result = $this->_doQuery($query, true);
if (PEAR::isError($result)) {
return $result;
}
@@ -234,13 +236,13 @@ class MDB2_Driver_sqlite extends MDB2_Driver_Common
return $this->raiseError(MDB2_ERROR_INVALID, null, null,
'commit/release savepoint cannot be done changes are auto committed', __FUNCTION__);
}
if (!is_null($savepoint)) {
if (null !== $savepoint) {
return $this->raiseError(MDB2_ERROR_UNSUPPORTED, null, null,
'savepoints are not supported', __FUNCTION__);
}
$query = 'COMMIT TRANSACTION '.$this->options['base_transaction_name'];
$result =$this->_doQuery($query, true);
$result = $this->_doQuery($query, true);
if (PEAR::isError($result)) {
return $result;
}
@@ -269,13 +271,13 @@ class MDB2_Driver_sqlite extends MDB2_Driver_Common
return $this->raiseError(MDB2_ERROR_INVALID, null, null,
'rollback cannot be done changes are auto committed', __FUNCTION__);
}
if (!is_null($savepoint)) {
if (null !== $savepoint) {
return $this->raiseError(MDB2_ERROR_UNSUPPORTED, null, null,
'savepoints are not supported', __FUNCTION__);
}
$query = 'ROLLBACK TRANSACTION '.$this->options['base_transaction_name'];
$result =$this->_doQuery($query, true);
$result = $this->_doQuery($query, true);
if (PEAR::isError($result)) {
return $result;
}
@@ -294,12 +296,16 @@ class MDB2_Driver_sqlite extends MDB2_Driver_Common
* READ COMMITTED (prevents dirty reads)
* REPEATABLE READ (prevents nonrepeatable reads)
* SERIALIZABLE (prevents phantom reads)
* @param array some transaction options:
* 'wait' => 'WAIT' | 'NO WAIT'
* 'rw' => 'READ WRITE' | 'READ ONLY'
*
* @return mixed MDB2_OK on success, a MDB2 error on failure
*
* @access public
* @since 2.1.1
*/
static function setTransactionIsolation($isolation,$options=array())
function setTransactionIsolation($isolation, $options = array())
{
$this->debug('Setting transaction isolation level', __FUNCTION__, array('is_manip' => true));
switch ($isolation) {
@@ -347,7 +353,6 @@ class MDB2_Driver_sqlite extends MDB2_Driver_Common
**/
function connect()
{
$datadir=OC_Config::getValue( "datadirectory", OC::$SERVERROOT."/data" );
$database_file = $this->_getDatabaseFile($this->database_name);
if (is_resource($this->connection)) {
//if (count(array_diff($this->connected_dsn, $this->dsn)) == 0
@@ -371,9 +376,6 @@ class MDB2_Driver_sqlite extends MDB2_Driver_Common
}
if ($database_file !== ':memory:') {
if(!strpos($database_file,'.db')){
$database_file="$datadir/$database_file.db";
}
if (!file_exists($database_file)) {
if (!touch($database_file)) {
return $this->raiseError(MDB2_ERROR_NOT_FOUND, null, null,
@@ -409,9 +411,7 @@ class MDB2_Driver_sqlite extends MDB2_Driver_Common
$php_errormsg = '';
if (version_compare('5.1.0', PHP_VERSION, '>')) {
@ini_set('track_errors', true);
echo 1;
$connection = @$connect_function($database_file);
echo 2;
@ini_restore('track_errors');
} else {
$connection = @$connect_function($database_file, 0666, $php_errormsg);
@@ -505,7 +505,7 @@ class MDB2_Driver_sqlite extends MDB2_Driver_Common
* @return result or error object
* @access protected
*/
function &_doQuery($query, $is_manip = false, $connection = null, $database_name = null)
function _doQuery($query, $is_manip = false, $connection = null, $database_name = null)
{
$this->last_query = $query;
$result = $this->debug($query, 'query', array('is_manip' => $is_manip, 'when' => 'pre'));
@@ -520,7 +520,7 @@ class MDB2_Driver_sqlite extends MDB2_Driver_Common
return $result;
}
if (is_null($connection)) {
if (null === $connection) {
$connection = $this->getConnection();
if (PEAR::isError($connection)) {
return $connection;
@@ -544,7 +544,11 @@ class MDB2_Driver_sqlite extends MDB2_Driver_Common
$this->_lasterror = $php_errormsg;
if (!$result) {
$err =$this->raiseError(null, null, null,
$code = null;
if (0 === strpos($this->_lasterror, 'no such table')) {
$code = MDB2_ERROR_NOSUCHTABLE;
}
$err = $this->raiseError($code, null, null,
'Could not execute statement', __FUNCTION__);
return $err;
}
@@ -566,7 +570,7 @@ class MDB2_Driver_sqlite extends MDB2_Driver_Common
*/
function _affectedRows($connection, $result = null)
{
if (is_null($connection)) {
if (null === $connection) {
$connection = $this->getConnection();
if (PEAR::isError($connection)) {
return $connection;
@@ -759,7 +763,7 @@ class MDB2_Driver_sqlite extends MDB2_Driver_Common
$table = $this->quoteIdentifier($table, true);
$query = "REPLACE INTO $table ($query) VALUES ($values)";
$result =$this->_doQuery($query, true, $connection);
$result = $this->_doQuery($query, true, $connection);
if (PEAR::isError($result)) {
return $result;
}
@@ -787,7 +791,7 @@ class MDB2_Driver_sqlite extends MDB2_Driver_Common
$query = "INSERT INTO $sequence_name ($seqcol_name) VALUES (NULL)";
$this->pushErrorHandling(PEAR_ERROR_RETURN);
$this->expectError(MDB2_ERROR_NOSUCHTABLE);
$result =$this->_doQuery($query, true);
$result = $this->_doQuery($query, true);
$this->popExpect();
$this->popErrorHandling();
if (PEAR::isError($result)) {
@@ -806,7 +810,7 @@ class MDB2_Driver_sqlite extends MDB2_Driver_Common
$value = $this->lastInsertID();
if (is_numeric($value)) {
$query = "DELETE FROM $sequence_name WHERE $seqcol_name < $value";
$result =$this->_doQuery($query, true);
$result = $this->_doQuery($query, true);
if (PEAR::isError($result)) {
$this->warnings[] = 'nextID: could not delete previous sequence table values from '.$seq_name;
}
@@ -879,9 +883,9 @@ class MDB2_Result_sqlite extends MDB2_Result_Common
* @return int data array on success, a MDB2 error on failure
* @access public
*/
function &fetchRow($fetchmode = MDB2_FETCHMODE_DEFAULT, $rownum = null)
function fetchRow($fetchmode = MDB2_FETCHMODE_DEFAULT, $rownum = null)
{
if (!is_null($rownum)) {
if (null !== $rownum) {
$seek = $this->seek($rownum);
if (PEAR::isError($seek)) {
return $seek;
@@ -890,7 +894,9 @@ class MDB2_Result_sqlite extends MDB2_Result_Common
if ($fetchmode == MDB2_FETCHMODE_DEFAULT) {
$fetchmode = $this->db->fetchmode;
}
if ($fetchmode & MDB2_FETCHMODE_ASSOC) {
if ( $fetchmode == MDB2_FETCHMODE_ASSOC
|| $fetchmode == MDB2_FETCHMODE_OBJECT
) {
$row = @sqlite_fetch_array($this->result, SQLITE_ASSOC);
if (is_array($row)
&& $this->db->options['portability'] & MDB2_PORTABILITY_FIX_CASE
@@ -901,13 +907,12 @@ class MDB2_Result_sqlite extends MDB2_Result_Common
$row = @sqlite_fetch_array($this->result, SQLITE_NUM);
}
if (!$row) {
if ($this->result === false) {
$err =$this->db->raiseError(MDB2_ERROR_NEED_MORE_DATA, null, null,
if (false === $this->result) {
$err = $this->db->raiseError(MDB2_ERROR_NEED_MORE_DATA, null, null,
'resultset has already been freed', __FUNCTION__);
return $err;
}
$null = null;
return $null;
return null;
}
$mode = $this->db->options['portability'] & MDB2_PORTABILITY_EMPTY_TO_NULL;
$rtrim = false;
@@ -921,8 +926,16 @@ class MDB2_Result_sqlite extends MDB2_Result_Common
if ($mode) {
$this->db->_fixResultArrayValues($row, $mode);
}
if (!empty($this->types)) {
if ( ( $fetchmode != MDB2_FETCHMODE_ASSOC
&& $fetchmode != MDB2_FETCHMODE_OBJECT)
&& !empty($this->types)
) {
$row = $this->db->datatype->convertResultRow($this->types, $row, $rtrim);
} elseif (($fetchmode == MDB2_FETCHMODE_ASSOC
|| $fetchmode == MDB2_FETCHMODE_OBJECT)
&& !empty($this->types_assoc)
) {
$row = $this->db->datatype->convertResultRow($this->types_assoc, $row, $rtrim);
}
if (!empty($this->values)) {
$this->_assignBindColumns($row);
@@ -932,7 +945,8 @@ class MDB2_Result_sqlite extends MDB2_Result_Common
if ($object_class == 'stdClass') {
$row = (object) $row;
} else {
$row = new $object_class($row);
$rowObj = new $object_class($row);
$row = $rowObj;
}
}
++$this->rownum;
@@ -981,11 +995,12 @@ class MDB2_Result_sqlite extends MDB2_Result_Common
function numCols()
{
$cols = @sqlite_num_fields($this->result);
if (is_null($cols)) {
if ($this->result === false) {
if (null === $cols) {
if (false === $this->result) {
return $this->db->raiseError(MDB2_ERROR_NEED_MORE_DATA, null, null,
'resultset has already been freed', __FUNCTION__);
} elseif (is_null($this->result)) {
}
if (null === $this->result) {
return count($this->types);
}
return $this->db->raiseError(null, null, null,
@@ -1016,10 +1031,11 @@ class MDB2_BufferedResult_sqlite extends MDB2_Result_sqlite
function seek($rownum = 0)
{
if (!@sqlite_seek($this->result, $rownum)) {
if ($this->result === false) {
if (false === $this->result) {
return $this->db->raiseError(MDB2_ERROR_NEED_MORE_DATA, null, null,
'resultset has already been freed', __FUNCTION__);
} elseif (is_null($this->result)) {
}
if (null === $this->result) {
return MDB2_OK;
}
return $this->db->raiseError(MDB2_ERROR_INVALID, null, null,
@@ -1059,11 +1075,12 @@ class MDB2_BufferedResult_sqlite extends MDB2_Result_sqlite
function numRows()
{
$rows = @sqlite_num_rows($this->result);
if (is_null($rows)) {
if ($this->result === false) {
if (null === $rows) {
if (false === $this->result) {
return $this->db->raiseError(MDB2_ERROR_NEED_MORE_DATA, null, null,
'resultset has already been freed', __FUNCTION__);
} elseif (is_null($this->result)) {
}
if (null === $this->result) {
return 0;
}
return $this->db->raiseError(null, null, null,
@@ -1084,5 +1101,4 @@ class MDB2_Statement_sqlite extends MDB2_Statement_Common
{
}
?>
+23 -21
View File
@@ -42,7 +42,7 @@
// | Author: Lukas Smith <smith@pooteeweet.org> |
// +----------------------------------------------------------------------+
//
// $Id: Extended.php,v 1.60 2007/11/28 19:49:34 quipo Exp $
// $Id$
/**
* @package MDB2
@@ -96,7 +96,7 @@ class MDB2_Extended extends MDB2_Module_Common
if (PEAR::isError($query)) {
return $query;
}
$db =& $this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@@ -134,7 +134,7 @@ class MDB2_Extended extends MDB2_Module_Common
* @see autoPrepare
* @access public
*/
function &autoExecute($table, $fields_values, $mode = MDB2_AUTOQUERY_INSERT,
function autoExecute($table, $fields_values, $mode = MDB2_AUTOQUERY_INSERT,
$where = false, $types = null, $result_class = true, $result_types = MDB2_PREPARE_MANIP)
{
$fields_values = (array)$fields_values;
@@ -153,12 +153,12 @@ class MDB2_Extended extends MDB2_Module_Common
if (empty($params)) {
$query = $this->buildManipSQL($table, $keys, $mode, $where);
$db =& $this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
if ($mode == MDB2_AUTOQUERY_SELECT) {
$result =& $db->query($query, $result_types, $result_class);
$result = $db->query($query, $result_types, $result_class);
} else {
$result = $db->exec($query);
}
@@ -167,7 +167,7 @@ class MDB2_Extended extends MDB2_Module_Common
if (PEAR::isError($stmt)) {
return $stmt;
}
$result =& $stmt->execute($params, $result_class);
$result = $stmt->execute($params, $result_class);
$stmt->free();
}
return $result;
@@ -199,7 +199,7 @@ class MDB2_Extended extends MDB2_Module_Common
*/
function buildManipSQL($table, $table_fields, $mode, $where = false)
{
$db =& $this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@@ -214,7 +214,7 @@ class MDB2_Extended extends MDB2_Module_Common
}
}
if ($where !== false && !is_null($where)) {
if ((false !== $where) && (null !== $where)) {
if (is_array($where)) {
$where = implode(' AND ', $where);
}
@@ -270,10 +270,10 @@ class MDB2_Extended extends MDB2_Module_Common
* @return MDB2_Result|MDB2_Error result set on success, a MDB2 error on failure
* @access public
*/
function &limitQuery($query, $types, $limit, $offset = 0, $result_class = true,
function limitQuery($query, $types, $limit, $offset = 0, $result_class = true,
$result_wrap_class = false)
{
$db =& $this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@@ -282,8 +282,7 @@ class MDB2_Extended extends MDB2_Module_Common
if (PEAR::isError($result)) {
return $result;
}
$result =& $db->query($query, $types, $result_class, $result_wrap_class);
return $result;
return $db->query($query, $types, $result_class, $result_wrap_class);
}
// }}}
@@ -302,7 +301,7 @@ class MDB2_Extended extends MDB2_Module_Common
*/
function execParam($query, $params = array(), $param_types = null)
{
$db =& $this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@@ -346,7 +345,7 @@ class MDB2_Extended extends MDB2_Module_Common
function getOne($query, $type = null, $params = array(),
$param_types = null, $colnum = 0)
{
$db =& $this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@@ -393,7 +392,7 @@ class MDB2_Extended extends MDB2_Module_Common
function getRow($query, $types = null, $params = array(),
$param_types = null, $fetchmode = MDB2_FETCHMODE_DEFAULT)
{
$db =& $this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@@ -439,7 +438,7 @@ class MDB2_Extended extends MDB2_Module_Common
function getCol($query, $type = null, $params = array(),
$param_types = null, $colnum = 0)
{
$db =& $this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@@ -495,7 +494,7 @@ class MDB2_Extended extends MDB2_Module_Common
$param_types = null, $fetchmode = MDB2_FETCHMODE_DEFAULT,
$rekey = false, $force_array = false, $group = false)
{
$db =& $this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@@ -600,7 +599,7 @@ class MDB2_Extended extends MDB2_Module_Common
function getAssoc($query, $types = null, $params = array(), $param_types = null,
$fetchmode = MDB2_FETCHMODE_DEFAULT, $force_array = false, $group = false)
{
$db =& $this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@@ -644,8 +643,11 @@ class MDB2_Extended extends MDB2_Module_Common
* @access public
* @see prepare(), execute()
*/
function executeMultiple(&$stmt, $params = null)
function executeMultiple($stmt, $params = null)
{
if (MDB2::isError($stmt)) {
return $stmt;
}
for ($i = 0, $j = count($params); $i < $j; $i++) {
$result = $stmt->execute($params[$i]);
if (PEAR::isError($result)) {
@@ -672,7 +674,7 @@ class MDB2_Extended extends MDB2_Module_Common
*/
function getBeforeID($table, $field = null, $ondemand = true, $quote = true)
{
$db =& $this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@@ -705,7 +707,7 @@ class MDB2_Extended extends MDB2_Module_Common
*/
function getAfterID($id, $table, $field = null)
{
$db =& $this->getDBInstance();
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
+6 -3
View File
@@ -42,7 +42,7 @@
// | Author: Lukas Smith <smith@pooteeweet.org> |
// +----------------------------------------------------------------------+
//
// $Id: Iterator.php,v 1.22 2006/05/06 14:03:41 lsmith Exp $
// $Id$
/**
* PHP5 Iterator
@@ -54,6 +54,9 @@
class MDB2_Iterator implements Iterator
{
protected $fetchmode;
/**
* @var MDB2_Result_Common
*/
protected $result;
protected $row;
@@ -62,7 +65,7 @@ class MDB2_Iterator implements Iterator
/**
* Constructor
*/
public function __construct($result, $fetchmode = MDB2_FETCHMODE_DEFAULT)
public function __construct(MDB2_Result_Common $result, $fetchmode = MDB2_FETCHMODE_DEFAULT)
{
$this->result = $result;
$this->fetchmode = $fetchmode;
@@ -112,7 +115,7 @@ class MDB2_Iterator implements Iterator
*/
public function current()
{
if (is_null($this->row)) {
if (null === $this->row) {
$row = $this->result->fetchRow($this->fetchmode);
if (PEAR::isError($row)) {
$row = false;
+2 -2
View File
@@ -42,7 +42,7 @@
// | Author: Lukas Smith <smith@pooteeweet.org> |
// +----------------------------------------------------------------------+
//
// $Id: LOB.php,v 1.34 2006/10/25 11:52:21 lsmith Exp $
// $Id$
/**
* @package MDB2
@@ -50,7 +50,7 @@
* @author Lukas Smith <smith@pooteeweet.org>
*/
require_once('MDB2.php');
require_once 'MDB2.php';
/**
* MDB2_LOB: user land stream wrapper implementation for LOB support
+82 -48
View File
@@ -1,8 +1,6 @@
<?php
<?php /* vim: se et ts=4 sw=4 sts=4 fdm=marker tw=80: */
/**
* PHP version 4, 5
*
* Copyright (c) 1998-2008 Manuel Lemos, Tomas V.V.Cox,
* Copyright (c) 1998-2010 Manuel Lemos, Tomas V.V.Cox,
* Stig. S. Bakken, Lukas Smith, Igor Feghali
* All rights reserved.
*
@@ -39,19 +37,18 @@
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* Author: Lukas Smith <smith@pooteeweet.org>
* Author: Igor Feghali <ifeghali@php.net>
* PHP version 5
*
* @category Database
* @package MDB2_Schema
* @author Lukas Smith <smith@pooteeweet.org>
* @author Igor Feghali <ifeghali@php.net>
* @license BSD http://www.opensource.org/licenses/bsd-license.php
* @version CVS: $Id: Schema.php,v 1.132 2009/02/22 21:43:22 ifeghali Exp $
* @version SVN: $Id$
* @link http://pear.php.net/packages/MDB2_Schema
*/
// require_once('MDB2.php');
require_once 'MDB2.php';
define('MDB2_SCHEMA_DUMP_ALL', 0);
define('MDB2_SCHEMA_DUMP_STRUCTURE', 1);
@@ -96,7 +93,7 @@ class MDB2_Schema extends PEAR
'parser' => 'MDB2_Schema_Parser',
'writer' => 'MDB2_Schema_Writer',
'validate' => 'MDB2_Schema_Validate',
'drop_missing_tables' => false
'drop_obsolete_objects' => false
);
// }}}
@@ -237,9 +234,10 @@ class MDB2_Schema extends PEAR
* @access public
* @see MDB2::parseDSN
*/
static function factory(&$db, $options = array())
static function &factory(&$db, $options = array())
{
$obj =new MDB2_Schema();
$obj = new MDB2_Schema();
$result = $obj->connect($db, $options);
if (PEAR::isError($result)) {
return $result;
@@ -280,15 +278,17 @@ class MDB2_Schema extends PEAR
}
}
}
$this->disconnect();
if (!MDB2::isConnection($db)) {
$db =MDB2::factory($db, $db_options);
$db = MDB2::factory($db, $db_options);
}
if (PEAR::isError($db)) {
return $db;
}
$this->db =& $db;
$this->db = $db;
$this->db->loadModule('Datatype');
$this->db->loadModule('Manager');
$this->db->loadModule('Reverse');
@@ -377,7 +377,7 @@ class MDB2_Schema extends PEAR
$dtd_file = $this->options['dtd_file'];
if ($dtd_file) {
include_once 'XML/DTD/XmlValidator.php';
$dtd =new XML_DTD_XmlValidator;
$dtd = new XML_DTD_XmlValidator;
if (!$dtd->isValid($dtd_file, $input_file)) {
return $this->raiseError(MDB2_SCHEMA_ERROR_PARSE, null, null, $dtd->getMessage());
}
@@ -390,7 +390,16 @@ class MDB2_Schema extends PEAR
return $result;
}
$parser =new $class_name($variables, $fail_on_invalid_names, $structure, $this->options['valid_types'], $this->options['force_defaults']);
$max_identifiers_length = null;
if (isset($this->db->options['max_identifiers_length'])) {
$max_identifiers_length = $this->db->options['max_identifiers_length'];
}
$parser = new $class_name($variables, $fail_on_invalid_names, $structure,
$this->options['valid_types'], $this->options['force_defaults'],
$max_identifiers_length
);
$result = $parser->setInputFile($input_file);
if (PEAR::isError($result)) {
return $result;
@@ -425,6 +434,7 @@ class MDB2_Schema extends PEAR
return $this->raiseError(MDB2_SCHEMA_ERROR_INVALID, null, null,
'it was not specified a valid database name');
}
$class_name = $this->options['validate'];
$result = MDB2::loadClass($class_name, $this->db->getOption('debug'));
@@ -432,7 +442,17 @@ class MDB2_Schema extends PEAR
return $result;
}
$val =new $class_name($this->options['fail_on_invalid_names'], $this->options['valid_types'], $this->options['force_defaults']);
$max_identifiers_length = null;
if (isset($this->db->options['max_identifiers_length'])) {
$max_identifiers_length = $this->db->options['max_identifiers_length'];
}
$val = new $class_name(
$this->options['fail_on_invalid_names'],
$this->options['valid_types'],
$this->options['force_defaults'],
$max_identifiers_length
);
$database_definition = array(
'name' => $database,
@@ -466,7 +486,7 @@ class MDB2_Schema extends PEAR
'initialization' => array()
);
$table_definition =& $database_definition['tables'][$table_name];
$table_definition = $database_definition['tables'][$table_name];
foreach ($fields as $field_name) {
$definition = $this->db->reverse->getTableFieldDefinition($table_name, $field_name);
if (PEAR::isError($definition)) {
@@ -624,6 +644,7 @@ class MDB2_Schema extends PEAR
if (PEAR::isError($result)) {
return $result;
}
$database_definition['tables'][$table_name]=$table_definition;
}
@@ -1338,15 +1359,15 @@ class MDB2_Schema extends PEAR
if ($dbExists) {
$this->db->debug('Database already exists: ' . $db_name, __FUNCTION__);
// if (!empty($dbOptions)) {
// $errorcodes = array(MDB2_ERROR_UNSUPPORTED, MDB2_ERROR_NO_PERMISSION);
// $this->db->expectError($errorcodes);
// $result = $this->db->manager->alterDatabase($db_name, $dbOptions);
// $this->db->popExpect();
// if (PEAR::isError($result) && !MDB2::isError($result, $errorcodes)) {
// return $result;
// }
// }
if (!empty($dbOptions)) {
$errorcodes = array(MDB2_ERROR_UNSUPPORTED, MDB2_ERROR_NO_PERMISSION);
$this->db->expectError($errorcodes);
$result = $this->db->manager->alterDatabase($db_name, $dbOptions);
$this->db->popExpect();
if (PEAR::isError($result) && !MDB2::isError($result, $errorcodes)) {
return $result;
}
}
$create = false;
} else {
$this->db->expectError(MDB2_ERROR_UNSUPPORTED);
@@ -1451,16 +1472,17 @@ class MDB2_Schema extends PEAR
$changes['tables'] = MDB2_Schema::arrayMergeClobber($changes['tables'], $change);
}
}
if (!empty($previous_definition['tables'])
&& is_array($previous_definition['tables'])) {
foreach ($previous_definition['tables'] as $table_name => $table) {
if (empty($defined_tables[$table_name])) {
$changes['tables']['remove'][$table_name] = true;
}
}
if (!empty($previous_definition['tables'])
&& is_array($previous_definition['tables'])
) {
foreach ($previous_definition['tables'] as $table_name => $table) {
if (empty($defined_tables[$table_name])) {
$changes['tables']['remove'][$table_name] = true;
}
}
}
if (!empty($current_definition['sequences']) && is_array($current_definition['sequences'])) {
$changes['sequences'] = $defined_sequences = array();
foreach ($current_definition['sequences'] as $sequence_name => $sequence) {
@@ -1480,14 +1502,17 @@ class MDB2_Schema extends PEAR
$changes['sequences'] = MDB2_Schema::arrayMergeClobber($changes['sequences'], $change);
}
}
if (!empty($previous_definition['sequences']) && is_array($previous_definition['sequences'])) {
foreach ($previous_definition['sequences'] as $sequence_name => $sequence) {
if (empty($defined_sequences[$sequence_name])) {
$changes['sequences']['remove'][$sequence_name] = true;
}
}
if (!empty($previous_definition['sequences'])
&& is_array($previous_definition['sequences'])
) {
foreach ($previous_definition['sequences'] as $sequence_name => $sequence) {
if (empty($defined_sequences[$sequence_name])) {
$changes['sequences']['remove'][$sequence_name] = true;
}
}
}
return $changes;
}
@@ -2018,9 +2043,10 @@ class MDB2_Schema extends PEAR
}
}
if ($this->options['drop_missing_tables']
if ($this->options['drop_obsolete_objects']
&& !empty($changes['remove'])
&& is_array($changes['remove'])) {
&& is_array($changes['remove'])
) {
foreach ($changes['remove'] as $table_name => $table) {
$result = $this->db->manager->dropTable($table_name);
if (PEAR::isError($result)) {
@@ -2101,7 +2127,10 @@ class MDB2_Schema extends PEAR
}
}
if (!empty($changes['remove']) && is_array($changes['remove'])) {
if ($this->options['drop_obsolete_objects']
&& !empty($changes['remove'])
&& is_array($changes['remove'])
) {
foreach ($changes['remove'] as $sequence_name => $sequence) {
$result = $this->db->manager->dropSequence($sequence_name);
if (PEAR::isError($result)) {
@@ -2228,7 +2257,7 @@ class MDB2_Schema extends PEAR
}
if (!empty($changes['tables']['remove']) && is_array($changes['tables']['remove'])) {
if ($this->options['drop_missing_tables']) {
if ($this->options['drop_obsolete_objects']) {
foreach ($changes['tables']['remove'] as $table_name => $table) {
$this->db->debug("$table_name:", __FUNCTION__);
$this->db->debug("\tRemoved table '$table_name'", __FUNCTION__);
@@ -2334,9 +2363,15 @@ class MDB2_Schema extends PEAR
}
}
if (!empty($changes['sequences']['remove']) && is_array($changes['sequences']['remove'])) {
foreach ($changes['sequences']['remove'] as $sequence_name => $sequence) {
$this->db->debug("$sequence_name:", __FUNCTION__);
$this->db->debug("\tAdded sequence '$sequence_name'", __FUNCTION__);
if ($this->options['drop_obsolete_objects']) {
foreach ($changes['sequences']['remove'] as $sequence_name => $sequence) {
$this->db->debug("$sequence_name:", __FUNCTION__);
$this->db->debug("\tRemoved sequence '$sequence_name'", __FUNCTION__);
}
} else {
foreach ($changes['sequences']['remove'] as $sequence_name => $sequence) {
$this->db->debug("\tObsolete sequence '$sequence_name' left as is", __FUNCTION__);
}
}
}
if (!empty($changes['sequences']['change']) && is_array($changes['sequences']['change'])) {
@@ -2692,9 +2727,9 @@ class MDB2_Schema extends PEAR
* @access public
* @see PEAR_Error
*/
function raiseError($code = null, $mode = null, $options = null, $userinfo = null,$a=null,$b=null,$c=null)
static function &raiseError($code = null, $mode = null, $options = null, $userinfo = null, $dummy1 = null, $dummy2 = null, $dummy3 = false)
{
$err =PEAR::raiseError(null, $code, $mode, $options,
$err = PEAR::raiseError(null, $code, $mode, $options,
$userinfo, 'MDB2_Schema_Error', true);
return $err;
}
@@ -2760,4 +2795,3 @@ class MDB2_Schema_Error extends PEAR_Error
$mode, $level, $debuginfo);
}
}
?>
+86 -22
View File
@@ -1,8 +1,6 @@
<?php
<?php /* vim: se et ts=4 sw=4 sts=4 fdm=marker tw=80: */
/**
* PHP versions 4 and 5
*
* Copyright (c) 1998-2008 Manuel Lemos, Tomas V.V.Cox,
* Copyright (c) 1998-2010 Manuel Lemos, Tomas V.V.Cox,
* Stig. S. Bakken, Lukas Smith, Igor Feghali
* All rights reserved.
*
@@ -39,23 +37,19 @@
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* Author: Christian Dickmann <dickmann@php.net>
* Author: Igor Feghali <ifeghali@php.net>
*
* $Id: Parser.php,v 1.68 2008/11/30 03:34:00 clockwerx Exp $
* PHP version 5
*
* @category Database
* @package MDB2_Schema
* @author Christian Dickmann <dickmann@php.net>
* @author Igor Feghali <ifeghali@php.net>
* @license BSD http://www.opensource.org/licenses/bsd-license.php
* @version CVS: $Id: Parser.php,v 1.68 2008/11/30 03:34:00 clockwerx Exp $
* @version SVN: $Id$
* @link http://pear.php.net/packages/MDB2_Schema
*/
require_once('XML/Parser.php');
require_once('MDB2/Schema/Validate.php');
require_once 'XML/Parser.php';
require_once 'MDB2/Schema/Validate.php';
/**
* Parses an XML schema file
@@ -114,20 +108,56 @@ class MDB2_Schema_Parser extends XML_Parser
var $val;
/**
* PHP 5 constructor
*
* @param array $variables mixed array with user defined schema
* variables
* @param bool $fail_on_invalid_names array with reserved words per RDBMS
* @param array $structure multi dimensional array with
* database schema and data
* @param array $valid_types information of all valid fields
* types
* @param bool $force_defaults if true sets a default value to
* field when not explicit
* @param int $max_identifiers_length maximum allowed size for entities
* name
*
* @return void
*
* @access public
* @static
*/
function __construct($variables, $fail_on_invalid_names = true,
$structure = false, $valid_types = array(),
$force_defaults = true)
{
$structure = false, $valid_types = array(), $force_defaults = true,
$max_identifiers_length = null
) {
// force ISO-8859-1 due to different defaults for PHP4 and PHP5
// todo: this probably needs to be investigated some more andcleaned up
parent::__construct('ISO-8859-1');
$this->variables = $variables;
$this->structure = $structure;
$this->val =new MDB2_Schema_Validate($fail_on_invalid_names, $valid_types, $force_defaults);
$this->val = new MDB2_Schema_Validate(
$fail_on_invalid_names,
$valid_types,
$force_defaults,
$max_identifiers_length
);
}
function startHandler($xp, $element, $attribs)
/**
* Triggered when reading a XML open tag <element>
*
* @param resource $xp xml parser resource
* @param string $element element name
* @param array $attribs attributes
*
* @return void
* @access private
* @static
*/
function startHandler($xp, $element, &$attribs)
{
if (strtolower($element) == 'variable') {
$this->var_mode = true;
@@ -328,12 +358,21 @@ class MDB2_Schema_Parser extends XML_Parser
'start' => '',
'description' => '',
'comments' => '',
'on' => array('table' => '', 'field' => '')
);
break;
}
}
/**
* Triggered when reading a XML close tag </element>
*
* @param resource $xp xml parser resource
* @param string $element element name
*
* @return void
* @access private
* @static
*/
function endHandler($xp, $element)
{
if (strtolower($element) == 'variable') {
@@ -496,7 +535,21 @@ class MDB2_Schema_Parser extends XML_Parser
$this->element = implode('-', $this->elements);
}
function raiseError($msg = null, $xmlecode = 0, $xp = null, $ecode = MDB2_SCHEMA_ERROR_PARSE,$a=null,$b=null,$c=null)
/**
* Pushes a MDB2_Schema_Error into stack and returns it
*
* @param string $msg textual message
* @param int $xmlecode PHP's XML parser error code
* @param resource $xp xml parser resource
* @param int $ecode MDB2_Schema's error code
*
* @return object
* @access private
* @static
*/
static function &raiseError($msg = null, $xmlecode = 0, $xp = null, $ecode = MDB2_SCHEMA_ERROR_PARSE, $userinfo = null,
$error_class = null,
$skipmsg = false)
{
if (is_null($this->error)) {
$error = '';
@@ -523,11 +576,21 @@ class MDB2_Schema_Parser extends XML_Parser
$error .= "\n";
$this->error =& MDB2_Schema::raiseError($ecode, null, null, $error);
$this->error = MDB2_Schema::raiseError($ecode, null, null, $error);
}
return $this->error;
}
/**
* Triggered when reading data in a XML element (text between tags)
*
* @param resource $xp xml parser resource
* @param string $data text
*
* @return void
* @access private
* @static
*/
function cdataHandler($xp, $data)
{
if ($this->var_mode == true) {
@@ -799,6 +862,9 @@ class MDB2_Schema_Parser extends XML_Parser
case 'database-sequence-comments':
$this->sequence['comments'] .= $data;
break;
case 'database-sequence-on':
$this->sequence['on'] = array('table' => '', 'field' => '');
break;
case 'database-sequence-on-table':
$this->sequence['on']['table'] .= $data;
break;
@@ -808,5 +874,3 @@ class MDB2_Schema_Parser extends XML_Parser
}
}
}
?>
+202 -24
View File
@@ -1,8 +1,6 @@
<?php
<?php /* vim: se et ts=4 sw=4 sts=4 fdm=marker tw=80: */
/**
* PHP versions 4 and 5
*
* Copyright (c) 1998-2008 Manuel Lemos, Tomas V.V.Cox,
* Copyright (c) 1998-2010 Manuel Lemos, Tomas V.V.Cox,
* Stig. S. Bakken, Lukas Smith, Igor Feghali
* All rights reserved.
*
@@ -39,13 +37,13 @@
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* Author: Igor Feghali <ifeghali@php.net>
* PHP version 5
*
* @category Database
* @package MDB2_Schema
* @author Igor Feghali <ifeghali@php.net>
* @license BSD http://www.opensource.org/licenses/bsd-license.php
* @version CVS: $Id: Parser2.php,v 1.12 2008/11/30 03:34:00 clockwerx Exp $
* @version SVN: $Id$
* @link http://pear.php.net/packages/MDB2_Schema
*/
@@ -100,8 +98,30 @@ class MDB2_Schema_Parser2 extends XML_Unserializer
var $init = array();
function __construct($variables, $fail_on_invalid_names = true, $structure = false, $valid_types = array(), $force_defaults = true)
{
/**
* PHP 5 constructor
*
* @param array $variables mixed array with user defined schema
* variables
* @param bool $fail_on_invalid_names array with reserved words per RDBMS
* @param array $structure multi dimensional array with
* database schema and data
* @param array $valid_types information of all valid fields
* types
* @param bool $force_defaults if true sets a default value to
* field when not explicit
* @param int $max_identifiers_length maximum allowed size for entities
* name
*
* @return void
*
* @access public
* @static
*/
function __construct($variables, $fail_on_invalid_names = true,
$structure = false, $valid_types = array(), $force_defaults = true,
$max_identifiers_length = null
) {
// force ISO-8859-1 due to different defaults for PHP4 and PHP5
// todo: this probably needs to be investigated some more and cleaned up
$this->options['encoding'] = 'ISO-8859-1';
@@ -119,15 +139,17 @@ class MDB2_Schema_Parser2 extends XML_Unserializer
$this->variables = $variables;
$this->structure = $structure;
$this->val =& new MDB2_Schema_Validate($fail_on_invalid_names, $valid_types, $force_defaults);
$this->val = new MDB2_Schema_Validate($fail_on_invalid_names, $valid_types, $force_defaults);
parent::XML_Unserializer($this->options);
}
function MDB2_Schema_Parser2($variables, $fail_on_invalid_names = true, $structure = false, $valid_types = array(), $force_defaults = true)
{
$this->__construct($variables, $fail_on_invalid_names, $structure, $valid_types, $force_defaults);
}
/**
* Main method. Parses XML Schema File.
*
* @return bool|error object
*
* @access public
*/
function parse()
{
$result = $this->unserialize($this->filename, true);
@@ -140,18 +162,33 @@ class MDB2_Schema_Parser2 extends XML_Unserializer
}
}
/**
* Do the necessary stuff to set the input XML schema file
*
* @param string $filename full path to schema file
*
* @return boolean MDB2_OK on success
*
* @access public
*/
function setInputFile($filename)
{
$this->filename = $filename;
return MDB2_OK;
}
function renameKey(&$arr, $oKey, $nKey)
{
$arr[$nKey] = &$arr[$oKey];
unset($arr[$oKey]);
}
/**
* Enforce the default values for mandatory keys and ensure everything goes
* always in the same order (simulates the behaviour of the original
* parser). Works at database level.
*
* @param array $database multi dimensional array with database definition
* and data.
*
* @return bool|error MDB2_OK on success or error object
*
* @access private
*/
function fixDatabaseKeys($database)
{
$this->database_definition = array(
@@ -204,6 +241,18 @@ class MDB2_Schema_Parser2 extends XML_Unserializer
return MDB2_OK;
}
/**
* Enforce the default values for mandatory keys and ensure everything goes
* always in the same order (simulates the behaviour of the original
* parser). Works at table level.
*
* @param array $table multi dimensional array with table definition
* and data.
*
* @return bool|error MDB2_OK on success or error object
*
* @access private
*/
function fixTableKeys($table)
{
$this->table = array(
@@ -279,6 +328,17 @@ class MDB2_Schema_Parser2 extends XML_Unserializer
return MDB2_OK;
}
/**
* Enforce the default values for mandatory keys and ensure everything goes
* always in the same order (simulates the behaviour of the original
* parser). Works at table field level.
*
* @param array $field array with table field definition
*
* @return bool|error MDB2_OK on success or error object
*
* @access private
*/
function fixTableFieldKeys($field)
{
$this->field = array();
@@ -328,6 +388,17 @@ class MDB2_Schema_Parser2 extends XML_Unserializer
return MDB2_OK;
}
/**
* Enforce the default values for mandatory keys and ensure everything goes
* always in the same order (simulates the behaviour of the original
* parser). Works at table index level.
*
* @param array $index array with table index definition
*
* @return bool|error MDB2_OK on success or error object
*
* @access private
*/
function fixTableIndexKeys($index)
{
$this->index = array(
@@ -389,6 +460,17 @@ class MDB2_Schema_Parser2 extends XML_Unserializer
return MDB2_OK;
}
/**
* Enforce the default values for mandatory keys and ensure everything goes
* always in the same order (simulates the behaviour of the original
* parser). Works at table constraint level.
*
* @param array $constraint array with table index definition
*
* @return bool|error MDB2_OK on success or error object
*
* @access private
*/
function fixTableConstraintKeys($constraint)
{
$this->constraint = array(
@@ -468,6 +550,18 @@ class MDB2_Schema_Parser2 extends XML_Unserializer
return MDB2_OK;
}
/**
* Enforce the default values for mandatory keys and ensure everything goes
* always in the same order (simulates the behaviour of the original
* parser). Works at table data level.
*
* @param array $element multi dimensional array with query definition
* @param string $type whether its a insert|update|delete query
*
* @return bool|error MDB2_OK on success or error object
*
* @access private
*/
function fixTableInitializationKeys($element, $type = '')
{
if (!empty($element['select']) && is_array($element['select'])) {
@@ -480,6 +574,43 @@ class MDB2_Schema_Parser2 extends XML_Unserializer
$this->table['initialization'][] = array( 'type' => $type, 'data' => $this->init );
}
/**
* Enforce the default values for mandatory keys and ensure everything goes
* always in the same order (simulates the behaviour of the original
* parser). Works deeper at the table initialization level (data). At this
* point we are look at one of the below:
*
* <insert>
* {field}+
* </insert>
*
* <select> (this is a select extracted off a insert-select query)
* <table/>
* {field}+
* <where>
* {expression}
* </where>?
* </select>
*
* <update>
* {field}+
* <where>
* {expression}
* </where>?
* </update>
*
* <delete>
* <where>
* {expression}
* </where>
* </delete>
*
* @param array $element multi dimensional array with query definition
*
* @return bool|error MDB2_OK on success or error object
*
* @access private
*/
function fixTableInitializationDataKeys($element)
{
$this->init = array();
@@ -505,6 +636,22 @@ class MDB2_Schema_Parser2 extends XML_Unserializer
}
}
/**
* Recursively diggs into an "expression" element. According to our
* documentation an "expression" element is of the kind:
*
* <expression>
* <null/> or <value/> or <column/> or {function} or {expression}
* <operator/>
* <null/> or <value/> or <column/> or {function} or {expression}
* </expression>
*
* @param array &$arr reference to current element definition
*
* @return void
*
* @access private
*/
function setExpression(&$arr)
{
$element = each($arr);
@@ -555,6 +702,30 @@ class MDB2_Schema_Parser2 extends XML_Unserializer
}
}
/**
* Enforce the default values for mandatory keys and ensure everything goes
* always in the same order (simulates the behaviour of the original
* parser). Works at database sequences level. A "sequence" element looks
* like:
*
* <sequence>
* <name/>
* <was/>?
* <start/>?
* <description/>?
* <comments/>?
* <on>
* <table/>
* <field/>
* </on>?
* </sequence>
*
* @param array $sequence multi dimensional array with sequence definition
*
* @return bool|error MDB2_OK on success or error object
*
* @access private
*/
function fixSequenceKeys($sequence)
{
$this->sequence = array(
@@ -562,7 +733,6 @@ class MDB2_Schema_Parser2 extends XML_Unserializer
'start' => '',
'description' => '',
'comments' => '',
'on' => array('table' => '', 'field' => '')
);
if (!empty($sequence['name'])) {
@@ -610,15 +780,23 @@ class MDB2_Schema_Parser2 extends XML_Unserializer
return MDB2_OK;
}
/**
* Pushes a MDB2_Schema_Error into stack and returns it
*
* @param string $msg textual message
* @param int $ecode MDB2_Schema's error code
*
* @return object
* @access private
* @static
*/
function &raiseError($msg = null, $ecode = MDB2_SCHEMA_ERROR_PARSE)
{
if (is_null($this->error)) {
$error = 'Parser error: '.$msg."\n";
$this->error =& MDB2_Schema::raiseError($ecode, null, null, $error);
$this->error = MDB2_Schema::raiseError($ecode, null, null, $error);
}
return $this->error;
}
}
?>
+48 -47
View File
@@ -1,49 +1,51 @@
<?php
// {{{ Disclaimer, Licence, copyrights
// +----------------------------------------------------------------------+
// | PHP versions 4 and 5 |
// +----------------------------------------------------------------------+
// | Copyright (c) 1998-2006 Manuel Lemos, Tomas V.V.Cox, |
// | Stig. S. Bakken, Lukas Smith |
// | All rights reserved. |
// +----------------------------------------------------------------------+
// | MDB2 is a merge of PEAR DB and Metabases that provides a unified DB |
// | API as well as database abstraction for PHP applications. |
// | This LICENSE is in the BSD license style. |
// | |
// | Redistribution and use in source and binary forms, with or without |
// | modification, are permitted provided that the following conditions |
// | are met: |
// | |
// | Redistributions of source code must retain the above copyright |
// | notice, this list of conditions and the following disclaimer. |
// | |
// | Redistributions in binary form must reproduce the above copyright |
// | notice, this list of conditions and the following disclaimer in the |
// | documentation and/or other materials provided with the distribution. |
// | |
// | Neither the name of Manuel Lemos, Tomas V.V.Cox, Stig. S. Bakken, |
// | Lukas Smith nor the names of his contributors may be used to endorse |
// | or promote products derived from this software without specific prior|
// | written permission. |
// | |
// | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
// | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
// | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS |
// | FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE |
// | REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, |
// | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, |
// | BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS|
// | OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED |
// | AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
// | LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY|
// | WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
// | POSSIBILITY OF SUCH DAMAGE. |
// +----------------------------------------------------------------------+
// | Author: Lorenzo Alberton <l.alberton@quipo.it> |
// +----------------------------------------------------------------------+
//
// }}}
<?php /* vim: se et ts=4 sw=4 sts=4 fdm=marker tw=80: */
/**
* Copyright (c) 1998-2010 Manuel Lemos, Tomas V.V.Cox,
* Stig. S. Bakken, Lukas Smith, Igor Feghali
* All rights reserved.
*
* MDB2_Schema enables users to maintain RDBMS independant schema files
* in XML that can be used to manipulate both data and database schemas
* This LICENSE is in the BSD license style.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* Neither the name of Manuel Lemos, Tomas V.V.Cox, Stig. S. Bakken,
* Lukas Smith, Igor Feghali nor the names of his contributors may be
* used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* PHP version 5
*
* @category Database
* @package MDB2_Schema
* @author Lorenzo Alberton <l.alberton@quipo.it>
* @license BSD http://www.opensource.org/licenses/bsd-license.php
* @version SVN: $Id$
* @link http://pear.php.net/packages/MDB2_Schema
*/
// {{{ $GLOBALS['_MDB2_Schema_Reserved']['ibase']
/**
* Has a list of reserved words of Interbase/Firebird
@@ -433,4 +435,3 @@ $GLOBALS['_MDB2_Schema_Reserved']['ibase'] = array(
'ZONE',
);
// }}}
?>
+49 -47
View File
@@ -1,48 +1,52 @@
<?php
// {{{ Disclaimer, Licence, copyrights
// +----------------------------------------------------------------------+
// | PHP versions 4 and 5 |
// +----------------------------------------------------------------------+
// | Copyright (c) 1998-2006 Manuel Lemos, Tomas V.V.Cox, |
// | Stig. S. Bakken, Lukas Smith |
// | All rights reserved. |
// +----------------------------------------------------------------------+
// | MDB2 is a merge of PEAR DB and Metabases that provides a unified DB |
// | API as well as database abstraction for PHP applications. |
// | This LICENSE is in the BSD license style. |
// | |
// | Redistribution and use in source and binary forms, with or without |
// | modification, are permitted provided that the following conditions |
// | are met: |
// | |
// | Redistributions of source code must retain the above copyright |
// | notice, this list of conditions and the following disclaimer. |
// | |
// | Redistributions in binary form must reproduce the above copyright |
// | notice, this list of conditions and the following disclaimer in the |
// | documentation and/or other materials provided with the distribution. |
// | |
// | Neither the name of Manuel Lemos, Tomas V.V.Cox, Stig. S. Bakken, |
// | Lukas Smith nor the names of his contributors may be used to endorse |
// | or promote products derived from this software without specific prior|
// | written permission. |
// | |
// | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
// | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
// | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS |
// | FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE |
// | REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, |
// | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, |
// | BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS|
// | OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED |
// | AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
// | LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY|
// | WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
// | POSSIBILITY OF SUCH DAMAGE. |
// +----------------------------------------------------------------------+
// | Author: David Coallier <davidc@php.net> |
// +----------------------------------------------------------------------+
// }}}
<?php /* vim: se et ts=4 sw=4 sts=4 fdm=marker tw=80: */
/**
* Copyright (c) 1998-2010 Manuel Lemos, Tomas V.V.Cox,
* Stig. S. Bakken, Lukas Smith, Igor Feghali
* All rights reserved.
*
* MDB2_Schema enables users to maintain RDBMS independant schema files
* in XML that can be used to manipulate both data and database schemas
* This LICENSE is in the BSD license style.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* Neither the name of Manuel Lemos, Tomas V.V.Cox, Stig. S. Bakken,
* Lukas Smith, Igor Feghali nor the names of his contributors may be
* used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* PHP version 5
*
* @category Database
* @package MDB2_Schema
* @author David Coallier <davidc@php.net>
* @license BSD http://www.opensource.org/licenses/bsd-license.php
* @version SVN: $Id$
* @link http://pear.php.net/packages/MDB2_Schema
*/
// {{{ $GLOBALS['_MDB2_Schema_Reserved']['mssql']
/**
* Has a list of all the reserved words for mssql.
@@ -254,5 +258,3 @@ $GLOBALS['_MDB2_Schema_Reserved']['mssql'] = array(
'SELECT',
);
//}}}
?>
+49 -48
View File
@@ -1,50 +1,52 @@
<?php
// {{{ Disclaimer, Licence, copyrights
// +----------------------------------------------------------------------+
// | PHP versions 4 and 5 |
// +----------------------------------------------------------------------+
// | Copyright (c) 1998-2006 Manuel Lemos, Tomas V.V.Cox, |
// | Stig. S. Bakken, Lukas Smith |
// | All rights reserved. |
// +----------------------------------------------------------------------+
// | MDB2 is a merge of PEAR DB and Metabases that provides a unified DB |
// | API as well as database abstraction for PHP applications. |
// | This LICENSE is in the BSD license style. |
// | |
// | Redistribution and use in source and binary forms, with or without |
// | modification, are permitted provided that the following conditions |
// | are met: |
// | |
// | Redistributions of source code must retain the above copyright |
// | notice, this list of conditions and the following disclaimer. |
// | |
// | Redistributions in binary form must reproduce the above copyright |
// | notice, this list of conditions and the following disclaimer in the |
// | documentation and/or other materials provided with the distribution. |
// | |
// | Neither the name of Manuel Lemos, Tomas V.V.Cox, Stig. S. Bakken, |
// | Lukas Smith nor the names of his contributors may be used to endorse |
// | or promote products derived from this software without specific prior|
// | written permission. |
// | |
// | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
// | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
// | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS |
// | FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE |
// | REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, |
// | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, |
// | BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS|
// | OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED |
// | AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
// | LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY|
// | WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
// | POSSIBILITY OF SUCH DAMAGE. |
// +----------------------------------------------------------------------+
// | Author: David Coallier <davidc@php.net> |
// +----------------------------------------------------------------------+
//
// $Id: mysql.php,v 1.3 2006/03/01 12:16:40 lsmith Exp $
// }}}
<?php /* vim: se et ts=4 sw=4 sts=4 fdm=marker tw=80: */
/**
* Copyright (c) 1998-2010 Manuel Lemos, Tomas V.V.Cox,
* Stig. S. Bakken, Lukas Smith, Igor Feghali
* All rights reserved.
*
* MDB2_Schema enables users to maintain RDBMS independant schema files
* in XML that can be used to manipulate both data and database schemas
* This LICENSE is in the BSD license style.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* Neither the name of Manuel Lemos, Tomas V.V.Cox, Stig. S. Bakken,
* Lukas Smith, Igor Feghali nor the names of his contributors may be
* used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* PHP version 5
*
* @category Database
* @package MDB2_Schema
* @author David Coallier <davidc@php.net>
* @license BSD http://www.opensource.org/licenses/bsd-license.php
* @version SVN: $Id$
* @link http://pear.php.net/packages/MDB2_Schema
*/
// {{{ $GLOBALS['_MDB2_Schema_Reserved']['mysql']
/**
* Has a list of reserved words of mysql
@@ -281,4 +283,3 @@ $GLOBALS['_MDB2_Schema_Reserved']['mysql'] = array(
'ZEROFILL',
);
// }}}
?>
+49 -47
View File
@@ -1,48 +1,52 @@
<?php
// {{{ Disclaimer, Licence, copyrights
// +----------------------------------------------------------------------+
// | PHP versions 4 and 5 |
// +----------------------------------------------------------------------+
// | Copyright (c) 1998-2006 Manuel Lemos, Tomas V.V.Cox, |
// | Stig. S. Bakken, Lukas Smith |
// | All rights reserved. |
// +----------------------------------------------------------------------+
// | MDB2 is a merge of PEAR DB and Metabases that provides a unified DB |
// | API as well as database abstraction for PHP applications. |
// | This LICENSE is in the BSD license style. |
// | |
// | Redistribution and use in source and binary forms, with or without |
// | modification, are permitted provided that the following conditions |
// | are met: |
// | |
// | Redistributions of source code must retain the above copyright |
// | notice, this list of conditions and the following disclaimer. |
// | |
// | Redistributions in binary form must reproduce the above copyright |
// | notice, this list of conditions and the following disclaimer in the |
// | documentation and/or other materials provided with the distribution. |
// | |
// | Neither the name of Manuel Lemos, Tomas V.V.Cox, Stig. S. Bakken, |
// | Lukas Smith nor the names of his contributors may be used to endorse |
// | or promote products derived from this software without specific prior|
// | written permission. |
// | |
// | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
// | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
// | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS |
// | FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE |
// | REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, |
// | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, |
// | BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS|
// | OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED |
// | AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
// | LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY|
// | WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
// | POSSIBILITY OF SUCH DAMAGE. |
// +----------------------------------------------------------------------+
// | Author: David Coallier <davidc@php.net> |
// +----------------------------------------------------------------------+
// }}}
<?php /* vim: se et ts=4 sw=4 sts=4 fdm=marker tw=80: */
/**
* Copyright (c) 1998-2010 Manuel Lemos, Tomas V.V.Cox,
* Stig. S. Bakken, Lukas Smith, Igor Feghali
* All rights reserved.
*
* MDB2_Schema enables users to maintain RDBMS independant schema files
* in XML that can be used to manipulate both data and database schemas
* This LICENSE is in the BSD license style.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* Neither the name of Manuel Lemos, Tomas V.V.Cox, Stig. S. Bakken,
* Lukas Smith, Igor Feghali nor the names of his contributors may be
* used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* PHP version 5
*
* @category Database
* @package MDB2_Schema
* @author David Coallier <davidc@php.net>
* @license BSD http://www.opensource.org/licenses/bsd-license.php
* @version SVN: $Id$
* @link http://pear.php.net/packages/MDB2_Schema
*/
// {{{ $GLOBALS['_MDB2_Schema_Reserved']['oci8']
/**
* Has a list of all the reserved words for oracle.
@@ -167,5 +171,3 @@ $GLOBALS['_MDB2_Schema_Reserved']['oci8'] = array(
'WITH',
);
// }}}
?>
+49 -48
View File
@@ -1,49 +1,52 @@
<?php
// {{{ Disclaimer, Licence, copyrights
// +----------------------------------------------------------------------+
// | PHP versions 4 and 5 |
// +----------------------------------------------------------------------+
// | Copyright (c) 1998-2006 Manuel Lemos, Tomas V.V.Cox, |
// | Stig. S. Bakken, Lukas Smith |
// | All rights reserved. |
// +----------------------------------------------------------------------+
// | MDB2 is a merge of PEAR DB and Metabases that provides a unified DB |
// | API as well as database abstraction for PHP applications. |
// | This LICENSE is in the BSD license style. |
// | |
// | Redistribution and use in source and binary forms, with or without |
// | modification, are permitted provided that the following conditions |
// | are met: |
// | |
// | Redistributions of source code must retain the above copyright |
// | notice, this list of conditions and the following disclaimer. |
// | |
// | Redistributions in binary form must reproduce the above copyright |
// | notice, this list of conditions and the following disclaimer in the |
// | documentation and/or other materials provided with the distribution. |
// | |
// | Neither the name of Manuel Lemos, Tomas V.V.Cox, Stig. S. Bakken, |
// | Lukas Smith nor the names of his contributors may be used to endorse |
// | or promote products derived from this software without specific prior|
// | written permission. |
// | |
// | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
// | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
// | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS |
// | FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE |
// | REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, |
// | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, |
// | BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS|
// | OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED |
// | AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
// | LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY|
// | WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
// | POSSIBILITY OF SUCH DAMAGE. |
// +----------------------------------------------------------------------+
// | Author: Marcelo Santos Araujo <msaraujo@php.net> |
// +----------------------------------------------------------------------+
//
// }}}
<?php /* vim: se et ts=4 sw=4 sts=4 fdm=marker tw=80: */
/**
* Copyright (c) 1998-2010 Manuel Lemos, Tomas V.V.Cox,
* Stig. S. Bakken, Lukas Smith, Igor Feghali
* All rights reserved.
*
* MDB2_Schema enables users to maintain RDBMS independant schema files
* in XML that can be used to manipulate both data and database schemas
* This LICENSE is in the BSD license style.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* Neither the name of Manuel Lemos, Tomas V.V.Cox, Stig. S. Bakken,
* Lukas Smith, Igor Feghali nor the names of his contributors may be
* used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* PHP version 5
*
* @category Database
* @package MDB2_Schema
* @author Marcelo Santos Araujo <msaraujo@php.net>
* @license BSD http://www.opensource.org/licenses/bsd-license.php
* @version SVN: $Id$
* @link http://pear.php.net/packages/MDB2_Schema
*/
// {{{ $GLOBALS['_MDB2_Schema_Reserved']['pgsql']
/**
* Has a list of reserved words of pgsql
@@ -143,5 +146,3 @@ $GLOBALS['_MDB2_Schema_Reserved']['pgsql'] = array(
'WHERE'
);
// }}}
?>
+47 -24
View File
@@ -1,8 +1,6 @@
<?php
<?php /* vim: se et ts=4 sw=4 sts=4 fdm=marker tw=80: */
/**
* PHP versions 4 and 5
*
* Copyright (c) 1998-2008 Manuel Lemos, Tomas V.V.Cox,
* Copyright (c) 1998-2010 Manuel Lemos, Tomas V.V.Cox,
* Stig. S. Bakken, Lukas Smith, Igor Feghali
* All rights reserved.
*
@@ -39,14 +37,13 @@
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* Author: Christian Weiske <cweiske@php.net>
* $Id: Tool.php,v 1.6 2008/12/13 00:26:07 clockwerx Exp $
* PHP version 5
*
* @category Database
* @package MDB2_Schema
* @author Christian Weiske <cweiske@php.net>
* @license BSD http://www.opensource.org/licenses/bsd-license.php
* @version CVS: $Id: Tool.php,v 1.6 2008/12/13 00:26:07 clockwerx Exp $
* @version SVN: $Id$
* @link http://pear.php.net/packages/MDB2_Schema
*/
@@ -152,7 +149,9 @@ class MDB2_Schema_Tool
case '--init':
return 'init';
default:
throw new MDB2_Schema_Tool_ParameterException("Unknown mode \"$arg\"");
throw new MDB2_Schema_Tool_ParameterException(
"Unknown mode \"$arg\""
);
}
}//protected function getAction(&$args)
@@ -179,7 +178,8 @@ class MDB2_Schema_Tool
*/
protected function doHelp()
{
self::toStdErr(<<<EOH
self::toStdErr(
<<<EOH
Usage: mdb2_schematool mode parameters
Works with database schemas
@@ -205,7 +205,8 @@ EOH
*/
protected function doHelpDump()
{
self::toStdErr( <<<EOH
self::toStdErr(
<<<EOH
Usage: mdb2_schematool dump [all|data|schema] [-p] DSN
Dumps a database schema to stdout
@@ -216,7 +217,8 @@ DSN: Data source name in the form of
driver://user:password@host/database
User and password may be omitted.
Using -p reads password from stdin which is more secure than passing it in the parameter.
Using -p reads password from stdin which is more secure than passing it in the
parameter.
EOH
);
@@ -231,7 +233,8 @@ EOH
*/
protected function doHelpInit()
{
self::toStdErr( <<<EOH
self::toStdErr(
<<<EOH
Usage: mdb2_schematool init source [-p] destination
Initializes a database with data
@@ -244,7 +247,8 @@ DSN: Data source name in the form of
driver://user:password@host/database
User and password may be omitted.
Using -p reads password from stdin which is more secure than passing it in the parameter.
Using -p reads password from stdin which is more secure than passing it in the
parameter.
EOH
);
@@ -259,7 +263,8 @@ EOH
*/
protected function doHelpLoad()
{
self::toStdErr( <<<EOH
self::toStdErr(
<<<EOH
Usage: mdb2_schematool load [-p] source [-p] destination
Loads a database schema from source to destination
@@ -272,7 +277,8 @@ DSN: Data source name in the form of
driver://user:password@host/database
User and password may be omitted.
Using -p reads password from stdin which is more secure than passing it in the parameter.
Using -p reads password from stdin which is more secure than passing it in the
parameter.
EOH
);
@@ -334,7 +340,9 @@ EOH
protected function getFileOrDsn(&$args)
{
if (count($args) == 0) {
throw new MDB2_Schema_Tool_ParameterException('File or DSN expected');
throw new MDB2_Schema_Tool_ParameterException(
'File or DSN expected'
);
}
$arg = array_shift($args);
@@ -450,7 +458,8 @@ EOH
list($type, $dsn) = $this->getFileOrDsn($args);
if ($type == 'file') {
throw new MDB2_Schema_Tool_ParameterException(
'Dumping a schema file as a schema file does not make much sense'
'Dumping a schema file as a schema file does not make much ' .
'sense'
);
}
@@ -503,8 +512,14 @@ EOH
$definition = $schemaDest->parseDatabaseDefinitionFile($dsnSource);
$where = 'loading schema file';
} else {
$schemaSource = MDB2_Schema::factory($dsnSource, $this->getSchemaOptions());
$this->throwExceptionOnError($schemaSource, 'connecting to source database');
$schemaSource = MDB2_Schema::factory(
$dsnSource,
$this->getSchemaOptions()
);
$this->throwExceptionOnError(
$schemaSource,
'connecting to source database'
);
$definition = $schemaSource->getDefinitionFromDatabase();
$where = 'loading definition from database';
@@ -514,7 +529,11 @@ EOH
//create destination database from definition
$simulate = false;
$op = $schemaDest->createDatabase($definition, array(), $simulate);
$op = $schemaDest->createDatabase(
$definition,
array(),
$simulate
);
$this->throwExceptionOnError($op, 'creating the database');
}//protected function doLoad($args)
@@ -545,10 +564,16 @@ EOH
}
$schemaDest = MDB2_Schema::factory($dsnDest, $this->getSchemaOptions());
$this->throwExceptionOnError($schemaDest, 'connecting to destination database');
$this->throwExceptionOnError(
$schemaDest,
'connecting to destination database'
);
$definition = $schemaDest->getDefinitionFromDatabase();
$this->throwExceptionOnError($definition, 'loading definition from database');
$this->throwExceptionOnError(
$definition,
'loading definition from database'
);
$op = $schemaDest->writeInitialization($dsnSource, $definition);
$this->throwExceptionOnError($op, 'initializing database');
@@ -556,5 +581,3 @@ EOH
}//class MDB2_Schema_Tool
?>
+59 -4
View File
@@ -1,6 +1,61 @@
<?php
<?php /* vim: se et ts=4 sw=4 sts=4 fdm=marker tw=80: */
/**
* Copyright (c) 1998-2010 Manuel Lemos, Tomas V.V.Cox,
* Stig. S. Bakken, Lukas Smith, Igor Feghali
* All rights reserved.
*
* MDB2_Schema enables users to maintain RDBMS independant schema files
* in XML that can be used to manipulate both data and database schemas
* This LICENSE is in the BSD license style.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* Neither the name of Manuel Lemos, Tomas V.V.Cox, Stig. S. Bakken,
* Lukas Smith, Igor Feghali nor the names of his contributors may be
* used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* PHP version 5
*
* @category Database
* @package MDB2_Schema
* @author Christian Weiske <cweiske@php.net>
* @license BSD http://www.opensource.org/licenses/bsd-license.php
* @version SVN: $Id$
* @link http://pear.php.net/packages/MDB2_Schema
*/
/**
* To be implemented yet
*
* @category Database
* @package MDB2_Schema
* @author Christian Weiske <cweiske@php.net>
* @license BSD http://www.opensource.org/licenses/bsd-license.php
* @link http://pear.php.net/packages/MDB2_Schema
*/
class MDB2_Schema_Tool_ParameterException extends Exception
{}
?>
{
}
+165 -78
View File
@@ -1,8 +1,6 @@
<?php
<?php /* vim: se et ts=4 sw=4 sts=4 fdm=marker tw=80: */
/**
* PHP versions 4 and 5
*
* Copyright (c) 1998-2008 Manuel Lemos, Tomas V.V.Cox,
* Copyright (c) 1998-2010 Manuel Lemos, Tomas V.V.Cox,
* Stig. S. Bakken, Lukas Smith, Igor Feghali
* All rights reserved.
*
@@ -39,15 +37,14 @@
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* Author: Christian Dickmann <dickmann@php.net>
* Author: Igor Feghali <ifeghali@php.net>
* PHP version 5
*
* @category Database
* @package MDB2_Schema
* @author Christian Dickmann <dickmann@php.net>
* @author Igor Feghali <ifeghali@php.net>
* @license BSD http://www.opensource.org/licenses/bsd-license.php
* @version CVS: $Id: Validate.php,v 1.42 2008/11/30 03:34:00 clockwerx Exp $
* @version SVN: $Id$
* @link http://pear.php.net/packages/MDB2_Schema
*/
@@ -70,11 +67,30 @@ class MDB2_Schema_Validate
var $force_defaults = true;
var $max_identifiers_length = null;
// }}}
// {{{ constructor
function __construct($fail_on_invalid_names = true, $valid_types = array(), $force_defaults = true)
{
/**
* PHP 5 constructor
*
* @param bool $fail_on_invalid_names array with reserved words per RDBMS
* @param array $valid_types information of all valid fields
* types
* @param bool $force_defaults if true sets a default value to
* field when not explicit
* @param int $max_identifiers_length maximum allowed size for entities
* name
*
* @return void
*
* @access public
* @static
*/
function __construct($fail_on_invalid_names = true, $valid_types = array(),
$force_defaults = true, $max_identifiers_length = null
) {
if (empty($GLOBALS['_MDB2_Schema_Reserved'])) {
$GLOBALS['_MDB2_Schema_Reserved'] = array();
}
@@ -87,16 +103,27 @@ class MDB2_Schema_Validate
} else {
$this->fail_on_invalid_names = array();
}
$this->valid_types = $valid_types;
$this->force_defaults = $force_defaults;
$this->valid_types = $valid_types;
$this->force_defaults = $force_defaults;
$this->max_identifiers_length = $max_identifiers_length;
}
// }}}
// {{{ raiseError()
/**
* Pushes a MDB2_Schema_Error into stack and returns it
*
* @param int $ecode MDB2_Schema's error code
* @param string $msg textual message
*
* @return object
* @access private
* @static
*/
function &raiseError($ecode, $msg = null)
{
$error =& MDB2_Schema::raiseError($ecode, null, null, $msg);
$error = MDB2_Schema::raiseError($ecode, null, null, $msg);
return $error;
}
@@ -171,27 +198,18 @@ class MDB2_Schema_Validate
*/
function validateTable($tables, &$table, $table_name)
{
/* Have we got a name? */
if (!$table_name) {
return $this->raiseError(MDB2_SCHEMA_ERROR_VALIDATE,
'a table has to have a name');
}
/* Table name duplicated? */
if (is_array($tables) && isset($tables[$table_name])) {
return $this->raiseError(MDB2_SCHEMA_ERROR_VALIDATE,
'table "'.$table_name.'" already exists');
}
/* Table name reserved? */
if (is_array($this->fail_on_invalid_names)) {
$name = strtoupper($table_name);
foreach ($this->fail_on_invalid_names as $rdbms) {
if (in_array($name, $GLOBALS['_MDB2_Schema_Reserved'][$rdbms])) {
return $this->raiseError(MDB2_SCHEMA_ERROR_VALIDATE,
'table name "'.$table_name.'" is a reserved word in: '.$rdbms);
}
}
/**
* Valid name ?
*/
$result = $this->validateIdentifier($table_name, 'table');
if (PEAR::isError($result)) {
return $result;
}
/* Was */
@@ -284,10 +302,12 @@ class MDB2_Schema_Validate
*/
function validateField($fields, &$field, $field_name)
{
/* Have we got a name? */
if (!$field_name) {
return $this->raiseError(MDB2_SCHEMA_ERROR_VALIDATE,
'field name missing');
/**
* Valid name ?
*/
$result = $this->validateIdentifier($field_name, 'field');
if (PEAR::isError($result)) {
return $result;
}
/* Field name duplicated? */
@@ -296,17 +316,6 @@ class MDB2_Schema_Validate
'field "'.$field_name.'" already exists');
}
/* Field name reserverd? */
if (is_array($this->fail_on_invalid_names)) {
$name = strtoupper($field_name);
foreach ($this->fail_on_invalid_names as $rdbms) {
if (in_array($name, $GLOBALS['_MDB2_Schema_Reserved'][$rdbms])) {
return $this->raiseError(MDB2_SCHEMA_ERROR_VALIDATE,
'field name "'.$field_name.'" is a reserved word in: '.$rdbms);
}
}
}
/* Type check */
if (empty($field['type'])) {
return $this->raiseError(MDB2_SCHEMA_ERROR_VALIDATE,
@@ -417,10 +426,14 @@ class MDB2_Schema_Validate
*/
function validateIndex($table_indexes, &$index, $index_name)
{
if (!$index_name) {
return $this->raiseError(MDB2_SCHEMA_ERROR_VALIDATE,
'an index has to have a name');
/**
* Valid name ?
*/
$result = $this->validateIdentifier($index_name, 'index');
if (PEAR::isError($result)) {
return $result;
}
if (is_array($table_indexes) && isset($table_indexes[$index_name])) {
return $this->raiseError(MDB2_SCHEMA_ERROR_VALIDATE,
'index "'.$index_name.'" already exists');
@@ -465,14 +478,18 @@ class MDB2_Schema_Validate
*/
function validateIndexField($index_fields, &$field, $field_name)
{
/**
* Valid name ?
*/
$result = $this->validateIdentifier($field_name, 'index field');
if (PEAR::isError($result)) {
return $result;
}
if (is_array($index_fields) && isset($index_fields[$field_name])) {
return $this->raiseError(MDB2_SCHEMA_ERROR_VALIDATE,
'index field "'.$field_name.'" already exists');
}
if (!$field_name) {
return $this->raiseError(MDB2_SCHEMA_ERROR_VALIDATE,
'the index-field-name is required');
}
if (empty($field['sorting'])) {
$field['sorting'] = 'ascending';
} elseif ($field['sorting'] !== 'ascending' && $field['sorting'] !== 'descending') {
@@ -501,10 +518,14 @@ class MDB2_Schema_Validate
*/
function validateConstraint($table_constraints, &$constraint, $constraint_name)
{
if (!$constraint_name) {
return $this->raiseError(MDB2_SCHEMA_ERROR_VALIDATE,
'a foreign key has to have a name');
/**
* Valid name ?
*/
$result = $this->validateIdentifier($constraint_name, 'foreign key');
if (PEAR::isError($result)) {
return $result;
}
if (is_array($table_constraints) && isset($table_constraints[$constraint_name])) {
return $this->raiseError(MDB2_SCHEMA_ERROR_VALIDATE,
'foreign key "'.$constraint_name.'" already exists');
@@ -550,10 +571,14 @@ class MDB2_Schema_Validate
*/
function validateConstraintField($constraint_fields, $field_name)
{
if (!$field_name) {
return $this->raiseError(MDB2_SCHEMA_ERROR_VALIDATE,
'empty value for foreign-field');
/**
* Valid name ?
*/
$result = $this->validateIdentifier($field_name, 'foreign key field');
if (PEAR::isError($result)) {
return $result;
}
if (is_array($constraint_fields) && isset($constraint_fields[$field_name])) {
return $this->raiseError(MDB2_SCHEMA_ERROR_VALIDATE,
'foreign field "'.$field_name.'" already exists');
@@ -577,10 +602,14 @@ class MDB2_Schema_Validate
*/
function validateConstraintReferencedField($referenced_fields, $field_name)
{
if (!$field_name) {
return $this->raiseError(MDB2_SCHEMA_ERROR_VALIDATE,
'empty value for referenced foreign-field');
/**
* Valid name ?
*/
$result = $this->validateIdentifier($field_name, 'referenced foreign field');
if (PEAR::isError($result)) {
return $result;
}
if (is_array($referenced_fields) && isset($referenced_fields[$field_name])) {
return $this->raiseError(MDB2_SCHEMA_ERROR_VALIDATE,
'foreign field "'.$field_name.'" already referenced');
@@ -607,9 +636,12 @@ class MDB2_Schema_Validate
*/
function validateSequence($sequences, &$sequence, $sequence_name)
{
if (!$sequence_name) {
return $this->raiseError(MDB2_SCHEMA_ERROR_VALIDATE,
'a sequence has to have a name');
/**
* Valid name ?
*/
$result = $this->validateIdentifier($sequence_name, 'sequence');
if (PEAR::isError($result)) {
return $result;
}
if (is_array($sequences) && isset($sequences[$sequence_name])) {
@@ -656,21 +688,17 @@ class MDB2_Schema_Validate
*/
function validateDatabase(&$database)
{
/* Have we got a name? */
if (!is_array($database) || !isset($database['name']) || !$database['name']) {
if (!is_array($database)) {
return $this->raiseError(MDB2_SCHEMA_ERROR_VALIDATE,
'a database has to have a name');
'something wrong went with database definition');
}
/* Database name reserved? */
if (is_array($this->fail_on_invalid_names)) {
$name = strtoupper($database['name']);
foreach ($this->fail_on_invalid_names as $rdbms) {
if (in_array($name, $GLOBALS['_MDB2_Schema_Reserved'][$rdbms])) {
return $this->raiseError(MDB2_SCHEMA_ERROR_VALIDATE,
'database name "'.$database['name'].'" is a reserved word in: '.$rdbms);
}
}
/**
* Valid name ?
*/
$result = $this->validateIdentifier($database['name'], 'database');
if (PEAR::isError($result)) {
return $result;
}
/* Create */
@@ -793,9 +821,12 @@ class MDB2_Schema_Validate
*/
function validateDataField($table_fields, $instruction_fields, &$field)
{
if (!$field['name']) {
return $this->raiseError(MDB2_SCHEMA_ERROR_VALIDATE,
'field-name has to be specified');
/**
* Valid name ?
*/
$result = $this->validateIdentifier($field['name'], 'field');
if (PEAR::isError($result)) {
return $result;
}
if (is_array($instruction_fields) && isset($instruction_fields[$field['name']])) {
@@ -912,6 +943,62 @@ class MDB2_Schema_Validate
}
return MDB2_OK;
}
}
?>
// }}}
// {{{ validateIdentifier()
/**
* Checks whether a given identifier is valid for current driver.
*
* @param string $id identifier to check
* @param string $type whether identifier represents a table name, index, etc.
*
* @return bool|error object
*
* @access public
*/
function validateIdentifier($id, $type)
{
$max_length = $this->max_identifiers_length;
$cur_length = strlen($id);
/**
* Have we got a name?
*/
if (!$id) {
return $this->raiseError(MDB2_SCHEMA_ERROR_VALIDATE,
"a $type has to have a name");
}
/**
* Supported length ?
*/
if ($max_length !== null
&& $cur_length > $max_length
) {
return $this->raiseError(MDB2_SCHEMA_ERROR_VALIDATE,
"$type name '$id' is too long for current driver");
} elseif ($cur_length > 30) {
// FIXME: find a way to issue a warning in MDB2_Schema object
/* $this->warnings[] = "$type name '$id' might not be
portable to other drivers"; */
}
/**
* Reserved ?
*/
if (is_array($this->fail_on_invalid_names)) {
$name = strtoupper($id);
foreach ($this->fail_on_invalid_names as $rdbms) {
if (in_array($name, $GLOBALS['_MDB2_Schema_Reserved'][$rdbms])) {
return $this->raiseError(MDB2_SCHEMA_ERROR_VALIDATE,
"$type name '$id' is a reserved word in: $rdbms");
}
}
}
return MDB2_OK;
}
// }}}
}
+28 -23
View File
@@ -1,8 +1,6 @@
<?php
<?php /* vim: se et ts=4 sw=4 sts=4 fdm=marker tw=80: */
/**
* PHP versions 4 and 5
*
* Copyright (c) 1998-2008 Manuel Lemos, Tomas V.V.Cox,
* Copyright (c) 1998-2010 Manuel Lemos, Tomas V.V.Cox,
* Stig. S. Bakken, Lukas Smith, Igor Feghali
* All rights reserved.
*
@@ -39,15 +37,14 @@
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* Author: Lukas Smith <smith@pooteeweet.org>
* Author: Igor Feghali <ifeghali@php.net>
* PHP version 5
*
* @category Database
* @package MDB2_Schema
* @author Lukas Smith <smith@pooteeweet.org>
* @author Igor Feghali <ifeghali@php.net>
* @license BSD http://www.opensource.org/licenses/bsd-license.php
* @version CVS: $Id: Writer.php,v 1.40 2008/11/30 03:34:00 clockwerx Exp $
* @version SVN: $Id$
* @link http://pear.php.net/packages/MDB2_Schema
*/
@@ -69,16 +66,22 @@ class MDB2_Schema_Writer
// }}}
// {{{ constructor
/**
* PHP 5 constructor
*
* @param array $valid_types information of all valid fields
* types
*
* @return void
*
* @access public
* @static
*/
function __construct($valid_types = array())
{
$this->valid_types = $valid_types;
}
function MDB2_Schema_Writer($valid_types = array())
{
$this->__construct($valid_types);
}
// }}}
// {{{ raiseError()
@@ -87,15 +90,18 @@ class MDB2_Schema_Writer
* callbacks etc. Basically a wrapper for PEAR::raiseError
* without the message string.
*
* @param int|PEAR_Error $code integer error code or and PEAR_Error instance
* @param int $mode error mode, see PEAR_Error docs
* error level (E_USER_NOTICE etc). If error mode is
* PEAR_ERROR_CALLBACK, this is the callback function,
* either as a function name, or as an array of an
* object and method name. For other error modes this
* parameter is ignored.
* @param string $options Extra debug information. Defaults to the last
* query and native error code.
* @param int|PEAR_Error $code integer error code or and PEAR_Error
* instance
* @param int $mode error mode, see PEAR_Error docs error
* level (E_USER_NOTICE etc). If error mode
* is PEAR_ERROR_CALLBACK, this is the
* callback function, either as a function
* name, or as an array of an object and
* method name. For other error modes this
* parameter is ignored.
* @param string $options Extra debug information. Defaults to the
* last query and native error code.
* @param string $userinfo User-friendly error message
*
* @return object a PEAR error object
* @access public
@@ -103,7 +109,7 @@ class MDB2_Schema_Writer
*/
function &raiseError($code = null, $mode = null, $options = null, $userinfo = null)
{
$error =& MDB2_Schema::raiseError($code, $mode, $options, $userinfo);
$error = MDB2_Schema::raiseError($code, $mode, $options, $userinfo);
return $error;
}
@@ -578,4 +584,3 @@ class MDB2_Schema_Writer
// }}}
}
?>
+338
View File
@@ -0,0 +1,338 @@
<?php
/**
* The OS_Guess class
*
* PHP versions 4 and 5
*
* @category pear
* @package PEAR
* @author Stig Bakken <ssb@php.net>
* @author Gregory Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
* @version CVS: $Id: Guess.php 313023 2011-07-06 19:17:11Z dufuz $
* @link http://pear.php.net/package/PEAR
* @since File available since PEAR 0.1
*/
// {{{ uname examples
// php_uname() without args returns the same as 'uname -a', or a PHP-custom
// string for Windows.
// PHP versions prior to 4.3 return the uname of the host where PHP was built,
// as of 4.3 it returns the uname of the host running the PHP code.
//
// PC RedHat Linux 7.1:
// Linux host.example.com 2.4.2-2 #1 Sun Apr 8 20:41:30 EDT 2001 i686 unknown
//
// PC Debian Potato:
// Linux host 2.4.17 #2 SMP Tue Feb 12 15:10:04 CET 2002 i686 unknown
//
// PC FreeBSD 3.3:
// FreeBSD host.example.com 3.3-STABLE FreeBSD 3.3-STABLE #0: Mon Feb 21 00:42:31 CET 2000 root@example.com:/usr/src/sys/compile/CONFIG i386
//
// PC FreeBSD 4.3:
// FreeBSD host.example.com 4.3-RELEASE FreeBSD 4.3-RELEASE #1: Mon Jun 25 11:19:43 EDT 2001 root@example.com:/usr/src/sys/compile/CONFIG i386
//
// PC FreeBSD 4.5:
// FreeBSD host.example.com 4.5-STABLE FreeBSD 4.5-STABLE #0: Wed Feb 6 23:59:23 CET 2002 root@example.com:/usr/src/sys/compile/CONFIG i386
//
// PC FreeBSD 4.5 w/uname from GNU shellutils:
// FreeBSD host.example.com 4.5-STABLE FreeBSD 4.5-STABLE #0: Wed Feb i386 unknown
//
// HP 9000/712 HP-UX 10:
// HP-UX iq B.10.10 A 9000/712 2008429113 two-user license
//
// HP 9000/712 HP-UX 10 w/uname from GNU shellutils:
// HP-UX host B.10.10 A 9000/712 unknown
//
// IBM RS6000/550 AIX 4.3:
// AIX host 3 4 000003531C00
//
// AIX 4.3 w/uname from GNU shellutils:
// AIX host 3 4 000003531C00 unknown
//
// SGI Onyx IRIX 6.5 w/uname from GNU shellutils:
// IRIX64 host 6.5 01091820 IP19 mips
//
// SGI Onyx IRIX 6.5:
// IRIX64 host 6.5 01091820 IP19
//
// SparcStation 20 Solaris 8 w/uname from GNU shellutils:
// SunOS host.example.com 5.8 Generic_108528-12 sun4m sparc
//
// SparcStation 20 Solaris 8:
// SunOS host.example.com 5.8 Generic_108528-12 sun4m sparc SUNW,SPARCstation-20
//
// Mac OS X (Darwin)
// Darwin home-eden.local 7.5.0 Darwin Kernel Version 7.5.0: Thu Aug 5 19:26:16 PDT 2004; root:xnu/xnu-517.7.21.obj~3/RELEASE_PPC Power Macintosh
//
// Mac OS X early versions
//
// }}}
/* TODO:
* - define endianness, to allow matchSignature("bigend") etc.
*/
/**
* Retrieves information about the current operating system
*
* This class uses php_uname() to grok information about the current OS
*
* @category pear
* @package PEAR
* @author Stig Bakken <ssb@php.net>
* @author Gregory Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
* @version Release: 1.9.4
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 0.1
*/
class OS_Guess
{
var $sysname;
var $nodename;
var $cpu;
var $release;
var $extra;
function OS_Guess($uname = null)
{
list($this->sysname,
$this->release,
$this->cpu,
$this->extra,
$this->nodename) = $this->parseSignature($uname);
}
function parseSignature($uname = null)
{
static $sysmap = array(
'HP-UX' => 'hpux',
'IRIX64' => 'irix',
);
static $cpumap = array(
'i586' => 'i386',
'i686' => 'i386',
'ppc' => 'powerpc',
);
if ($uname === null) {
$uname = php_uname();
}
$parts = preg_split('/\s+/', trim($uname));
$n = count($parts);
$release = $machine = $cpu = '';
$sysname = $parts[0];
$nodename = $parts[1];
$cpu = $parts[$n-1];
$extra = '';
if ($cpu == 'unknown') {
$cpu = $parts[$n - 2];
}
switch ($sysname) {
case 'AIX' :
$release = "$parts[3].$parts[2]";
break;
case 'Windows' :
switch ($parts[1]) {
case '95/98':
$release = '9x';
break;
default:
$release = $parts[1];
break;
}
$cpu = 'i386';
break;
case 'Linux' :
$extra = $this->_detectGlibcVersion();
// use only the first two digits from the kernel version
$release = preg_replace('/^([0-9]+\.[0-9]+).*/', '\1', $parts[2]);
break;
case 'Mac' :
$sysname = 'darwin';
$nodename = $parts[2];
$release = $parts[3];
if ($cpu == 'Macintosh') {
if ($parts[$n - 2] == 'Power') {
$cpu = 'powerpc';
}
}
break;
case 'Darwin' :
if ($cpu == 'Macintosh') {
if ($parts[$n - 2] == 'Power') {
$cpu = 'powerpc';
}
}
$release = preg_replace('/^([0-9]+\.[0-9]+).*/', '\1', $parts[2]);
break;
default:
$release = preg_replace('/-.*/', '', $parts[2]);
break;
}
if (isset($sysmap[$sysname])) {
$sysname = $sysmap[$sysname];
} else {
$sysname = strtolower($sysname);
}
if (isset($cpumap[$cpu])) {
$cpu = $cpumap[$cpu];
}
return array($sysname, $release, $cpu, $extra, $nodename);
}
function _detectGlibcVersion()
{
static $glibc = false;
if ($glibc !== false) {
return $glibc; // no need to run this multiple times
}
$major = $minor = 0;
include_once "System.php";
// Use glibc's <features.h> header file to
// get major and minor version number:
if (@file_exists('/usr/include/features.h') &&
@is_readable('/usr/include/features.h')) {
if (!@file_exists('/usr/bin/cpp') || !@is_executable('/usr/bin/cpp')) {
$features_file = fopen('/usr/include/features.h', 'rb');
while (!feof($features_file)) {
$line = fgets($features_file, 8192);
if (!$line || (strpos($line, '#define') === false)) {
continue;
}
if (strpos($line, '__GLIBC__')) {
// major version number #define __GLIBC__ version
$line = preg_split('/\s+/', $line);
$glibc_major = trim($line[2]);
if (isset($glibc_minor)) {
break;
}
continue;
}
if (strpos($line, '__GLIBC_MINOR__')) {
// got the minor version number
// #define __GLIBC_MINOR__ version
$line = preg_split('/\s+/', $line);
$glibc_minor = trim($line[2]);
if (isset($glibc_major)) {
break;
}
continue;
}
}
fclose($features_file);
if (!isset($glibc_major) || !isset($glibc_minor)) {
return $glibc = '';
}
return $glibc = 'glibc' . trim($glibc_major) . "." . trim($glibc_minor) ;
} // no cpp
$tmpfile = System::mktemp("glibctest");
$fp = fopen($tmpfile, "w");
fwrite($fp, "#include <features.h>\n__GLIBC__ __GLIBC_MINOR__\n");
fclose($fp);
$cpp = popen("/usr/bin/cpp $tmpfile", "r");
while ($line = fgets($cpp, 1024)) {
if ($line{0} == '#' || trim($line) == '') {
continue;
}
if (list($major, $minor) = explode(' ', trim($line))) {
break;
}
}
pclose($cpp);
unlink($tmpfile);
} // features.h
if (!($major && $minor) && @is_link('/lib/libc.so.6')) {
// Let's try reading the libc.so.6 symlink
if (preg_match('/^libc-(.*)\.so$/', basename(readlink('/lib/libc.so.6')), $matches)) {
list($major, $minor) = explode('.', $matches[1]);
}
}
if (!($major && $minor)) {
return $glibc = '';
}
return $glibc = "glibc{$major}.{$minor}";
}
function getSignature()
{
if (empty($this->extra)) {
return "{$this->sysname}-{$this->release}-{$this->cpu}";
}
return "{$this->sysname}-{$this->release}-{$this->cpu}-{$this->extra}";
}
function getSysname()
{
return $this->sysname;
}
function getNodename()
{
return $this->nodename;
}
function getCpu()
{
return $this->cpu;
}
function getRelease()
{
return $this->release;
}
function getExtra()
{
return $this->extra;
}
function matchSignature($match)
{
$fragments = is_array($match) ? $match : explode('-', $match);
$n = count($fragments);
$matches = 0;
if ($n > 0) {
$matches += $this->_matchFragment($fragments[0], $this->sysname);
}
if ($n > 1) {
$matches += $this->_matchFragment($fragments[1], $this->release);
}
if ($n > 2) {
$matches += $this->_matchFragment($fragments[2], $this->cpu);
}
if ($n > 3) {
$matches += $this->_matchFragment($fragments[3], $this->extra);
}
return ($matches == $n);
}
function _matchFragment($fragment, $value)
{
if (strcspn($fragment, '*?') < strlen($fragment)) {
$reg = '/^' . str_replace(array('*', '?', '/'), array('.*', '.', '\\/'), $fragment) . '\\z/';
return preg_match($reg, $value);
}
return ($fragment == '*' || !strcasecmp($fragment, $value));
}
}
/*
* Local Variables:
* indent-tabs-mode: nil
* c-basic-offset: 4
* End:
*/
+27
View File
@@ -0,0 +1,27 @@
Copyright (c) 1997-2009,
Stig Bakken <ssb@php.net>,
Gregory Beaver <cellog@php.net>,
Helgi Þormar Þorbjörnsson <helgi@php.net>,
Tomas V.V.Cox <cox@idecnet.com>,
Martin Jansen <mj@php.net>.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+216 -208
View File
@@ -1,26 +1,27 @@
<?php
//
// +--------------------------------------------------------------------+
// | PEAR, the PHP Extension and Application Repository |
// +--------------------------------------------------------------------+
// | Copyright (c) 1997-2004 The PHP Group |
// +--------------------------------------------------------------------+
// | This source file is subject to version 3.0 of the PHP license, |
// | that is bundled with this package in the file LICENSE, and is |
// | available through the world-wide-web at the following url: |
// | http://www.php.net/license/3_0.txt. |
// | If you did not receive a copy of the PHP license and are unable to |
// | obtain it through the world-wide-web, please send a note to |
// | license@php.net so we can mail you a copy immediately. |
// +--------------------------------------------------------------------+
// | Authors: Sterling Hughes <sterling@php.net> |
// | Stig Bakken <ssb@php.net> |
// | Tomas V.V.Cox <cox@idecnet.com> |
// +--------------------------------------------------------------------+
//
// $Id: PEAR.php,v 1.82.2.6 2005/01/01 05:24:51 cellog Exp $
//
/**
* PEAR, the PHP Extension and Application Repository
*
* PEAR class and PEAR_Error class
*
* PHP versions 4 and 5
*
* @category pear
* @package PEAR
* @author Sterling Hughes <sterling@php.net>
* @author Stig Bakken <ssb@php.net>
* @author Tomas V.V.Cox <cox@idecnet.com>
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2010 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
* @version CVS: $Id: PEAR.php 313023 2011-07-06 19:17:11Z dufuz $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 0.1
*/
/**#@+
* ERROR constants
*/
define('PEAR_ERROR_RETURN', 1);
define('PEAR_ERROR_PRINT', 2);
define('PEAR_ERROR_TRIGGER', 4);
@@ -31,6 +32,7 @@ define('PEAR_ERROR_CALLBACK', 16);
* @deprecated
*/
define('PEAR_ERROR_EXCEPTION', 32);
/**#@-*/
define('PEAR_ZE2', (function_exists('version_compare') &&
version_compare(zend_version(), "2-dev", "ge")));
@@ -44,15 +46,6 @@ if (substr(PHP_OS, 0, 3) == 'WIN') {
define('PEAR_OS', 'Unix'); // blatant assumption
}
// instant backwards compatibility
if (!defined('PATH_SEPARATOR')) {
if (OS_WINDOWS) {
define('PATH_SEPARATOR', ';');
} else {
define('PATH_SEPARATOR', ':');
}
}
$GLOBALS['_PEAR_default_error_mode'] = PEAR_ERROR_RETURN;
$GLOBALS['_PEAR_default_error_options'] = E_USER_NOTICE;
$GLOBALS['_PEAR_destructor_object_list'] = array();
@@ -78,14 +71,21 @@ $GLOBALS['_PEAR_error_handler_stack'] = array();
* IMPORTANT! To use the emulated destructors you need to create the
* objects by reference: $obj =& new PEAR_child;
*
* @since PHP 4.0.2
* @author Stig Bakken <ssb@php.net>
* @see http://pear.php.net/manual/
* @category pear
* @package PEAR
* @author Stig Bakken <ssb@php.net>
* @author Tomas V.V. Cox <cox@idecnet.com>
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2006 The PHP Group
* @license http://opensource.org/licenses/bsd-license.php New BSD License
* @version Release: 1.9.4
* @link http://pear.php.net/package/PEAR
* @see PEAR_Error
* @since Class available since PHP 4.0.2
* @link http://pear.php.net/manual/en/core.pear.php#core.pear.pear
*/
class PEAR
{
// {{{ properties
/**
* Whether to enable internal debug messages.
*
@@ -136,10 +136,6 @@ class PEAR
*/
var $_expected_errors = array();
// }}}
// {{{ constructor
/**
* Constructor. Registers this object in
* $_PEAR_destructor_object_list for destructor emulation if a
@@ -156,9 +152,11 @@ class PEAR
if ($this->_debug) {
print "PEAR constructor called, class=$classname\n";
}
if ($error_class !== null) {
$this->_error_class = $error_class;
}
while ($classname && strcasecmp($classname, "pear")) {
$destructor = "_$classname";
if (method_exists($this, $destructor)) {
@@ -175,9 +173,6 @@ class PEAR
}
}
// }}}
// {{{ destructor
/**
* Destructor (the emulated type of...). Does nothing right now,
* but is included for forward compatibility, so subclass
@@ -195,9 +190,6 @@ class PEAR
}
}
// }}}
// {{{ getStaticProperty()
/**
* If you have a class that's mostly/entirely static, and you need static
* properties, you can use this method to simulate them. Eg. in your method(s)
@@ -213,12 +205,17 @@ class PEAR
function &getStaticProperty($class, $var)
{
static $properties;
if (!isset($properties[$class])) {
$properties[$class] = array();
}
if (!array_key_exists($var, $properties[$class])) {
$properties[$class][$var] = null;
}
return $properties[$class][$var];
}
// }}}
// {{{ registerShutdownFunc()
/**
* Use this function to register a shutdown method for static
* classes.
@@ -230,12 +227,15 @@ class PEAR
*/
function registerShutdownFunc($func, $args = array())
{
// if we are called statically, there is a potential
// that no shutdown func is registered. Bug #6445
if (!isset($GLOBALS['_PEAR_SHUTDOWN_REGISTERED'])) {
register_shutdown_function("_PEAR_call_destructors");
$GLOBALS['_PEAR_SHUTDOWN_REGISTERED'] = true;
}
$GLOBALS['_PEAR_shutdown_funcs'][] = array($func, $args);
}
// }}}
// {{{ isError()
/**
* Tell whether a value is a PEAR error.
*
@@ -249,20 +249,18 @@ class PEAR
*/
static function isError($data, $code = null)
{
if ($data instanceof PEAR_Error) {
if (is_null($code)) {
return true;
} elseif (is_string($code)) {
return $data->getMessage() == $code;
} else {
return $data->getCode() == $code;
}
if (!is_a($data, 'PEAR_Error')) {
return false;
}
return false;
}
// }}}
// {{{ setErrorHandling()
if (is_null($code)) {
return true;
} elseif (is_string($code)) {
return $data->getMessage() == $code;
}
return $data->getCode() == $code;
}
/**
* Sets how errors generated by this object should be handled.
@@ -302,10 +300,9 @@ class PEAR
*
* @since PHP 4.0.5
*/
function setErrorHandling($mode = null, $options = null)
{
if (isset($this) && $this instanceof PEAR) {
if (isset($this) && is_a($this, 'PEAR')) {
$setmode = &$this->_default_error_mode;
$setoptions = &$this->_default_error_options;
} else {
@@ -340,9 +337,6 @@ class PEAR
}
}
// }}}
// {{{ expectError()
/**
* This method is used to tell which errors you expect to get.
* Expected errors are always returned with error mode
@@ -365,12 +359,9 @@ class PEAR
} else {
array_push($this->_expected_errors, array($code));
}
return sizeof($this->_expected_errors);
return count($this->_expected_errors);
}
// }}}
// {{{ popExpect()
/**
* This method pops one element off the expected error codes
* stack.
@@ -382,9 +373,6 @@ class PEAR
return array_pop($this->_expected_errors);
}
// }}}
// {{{ _checkDelExpect()
/**
* This method checks unsets an error code if available
*
@@ -396,8 +384,7 @@ class PEAR
function _checkDelExpect($error_code)
{
$deleted = false;
foreach ($this->_expected_errors AS $key => $error_array) {
foreach ($this->_expected_errors as $key => $error_array) {
if (in_array($error_code, $error_array)) {
unset($this->_expected_errors[$key][array_search($error_code, $error_array)]);
$deleted = true;
@@ -408,12 +395,10 @@ class PEAR
unset($this->_expected_errors[$key]);
}
}
return $deleted;
}
// }}}
// {{{ delExpect()
/**
* This method deletes all occurences of the specified element from
* the expected error codes stack.
@@ -426,34 +411,26 @@ class PEAR
function delExpect($error_code)
{
$deleted = false;
if ((is_array($error_code) && (0 != count($error_code)))) {
// $error_code is a non-empty array here;
// we walk through it trying to unset all
// values
foreach($error_code as $key => $error) {
if ($this->_checkDelExpect($error)) {
$deleted = true;
} else {
$deleted = false;
}
// $error_code is a non-empty array here; we walk through it trying
// to unset all values
foreach ($error_code as $key => $error) {
$deleted = $this->_checkDelExpect($error) ? true : false;
}
return $deleted ? true : PEAR::raiseError("The expected error you submitted does not exist"); // IMPROVE ME
} elseif (!empty($error_code)) {
// $error_code comes alone, trying to unset it
if ($this->_checkDelExpect($error_code)) {
return true;
} else {
return PEAR::raiseError("The expected error you submitted does not exist"); // IMPROVE ME
}
} else {
// $error_code is empty
return PEAR::raiseError("The expected error you submitted is empty"); // IMPROVE ME
}
}
// }}}
// {{{ raiseError()
return PEAR::raiseError("The expected error you submitted does not exist"); // IMPROVE ME
}
// $error_code is empty
return PEAR::raiseError("The expected error you submitted is empty"); // IMPROVE ME
}
/**
* This method is a wrapper that returns an instance of the
@@ -492,7 +469,7 @@ class PEAR
* @see PEAR::setErrorHandling
* @since PHP 4.0.5
*/
function raiseError($message = null,
static function &raiseError($message = null,
$code = null,
$mode = null,
$options = null,
@@ -509,13 +486,20 @@ class PEAR
$message = $message->getMessage();
}
if (isset($this) && isset($this->_expected_errors) && sizeof($this->_expected_errors) > 0 && sizeof($exp = end($this->_expected_errors))) {
if (
isset($this) &&
isset($this->_expected_errors) &&
count($this->_expected_errors) > 0 &&
count($exp = end($this->_expected_errors))
) {
if ($exp[0] == "*" ||
(is_int(reset($exp)) && in_array($code, $exp)) ||
(is_string(reset($exp)) && in_array($message, $exp))) {
(is_string(reset($exp)) && in_array($message, $exp))
) {
$mode = PEAR_ERROR_RETURN;
}
}
// No mode given, try global ones
if ($mode === null) {
// Class error handler
@@ -536,38 +520,52 @@ class PEAR
} else {
$ec = 'PEAR_Error';
}
if ($skipmsg) {
return new $ec($code, $mode, $options, $userinfo);
} else {
return new $ec($message, $code, $mode, $options, $userinfo);
}
}
// }}}
// {{{ throwError()
if (intval(PHP_VERSION) < 5) {
// little non-eval hack to fix bug #12147
include 'PEAR/FixPHP5PEARWarnings.php';
return $a;
}
if ($skipmsg) {
$a = new $ec($code, $mode, $options, $userinfo);
} else {
$a = new $ec($message, $code, $mode, $options, $userinfo);
}
return $a;
}
/**
* Simpler form of raiseError with fewer options. In most cases
* message, code and userinfo are enough.
*
* @param string $message
* @param mixed $message a text error message or a PEAR error object
*
* @param int $code a numeric error code (it is up to your class
* to define these if you want to use codes)
*
* @param string $userinfo If you need to pass along for example debug
* information, this parameter is meant for that.
*
* @access public
* @return object a PEAR error object
* @see PEAR::raiseError
*/
function throwError($message = null,
$code = null,
$userinfo = null)
function &throwError($message = null, $code = null, $userinfo = null)
{
if (isset($this) && $this instanceof PEAR) {
return $this->raiseError($message, $code, null, null, $userinfo);
} else {
return PEAR::raiseError($message, $code, null, null, $userinfo);
if (isset($this) && is_a($this, 'PEAR')) {
$a = $this->raiseError($message, $code, null, null, $userinfo);
return $a;
}
$a = PEAR::raiseError($message, $code, null, null, $userinfo);
return $a;
}
// }}}
function staticPushErrorHandling($mode, $options = null)
{
$stack = &$GLOBALS['_PEAR_error_handler_stack'];
$stack = &$GLOBALS['_PEAR_error_handler_stack'];
$def_mode = &$GLOBALS['_PEAR_default_error_mode'];
$def_options = &$GLOBALS['_PEAR_default_error_options'];
$stack[] = array($def_mode, $def_options);
@@ -636,8 +634,6 @@ class PEAR
return true;
}
// {{{ pushErrorHandling()
/**
* Push a new error handler on top of the error handler options stack. With this
* you can easily override the actual error handler for some code and restore
@@ -653,7 +649,7 @@ class PEAR
function pushErrorHandling($mode, $options = null)
{
$stack = &$GLOBALS['_PEAR_error_handler_stack'];
if (isset($this) && $this instanceof PEAR) {
if (isset($this) && is_a($this, 'PEAR')) {
$def_mode = &$this->_default_error_mode;
$def_options = &$this->_default_error_options;
} else {
@@ -662,7 +658,7 @@ class PEAR
}
$stack[] = array($def_mode, $def_options);
if (isset($this) && $this instanceof PEAR) {
if (isset($this) && is_a($this, 'PEAR')) {
$this->setErrorHandling($mode, $options);
} else {
PEAR::setErrorHandling($mode, $options);
@@ -671,9 +667,6 @@ class PEAR
return true;
}
// }}}
// {{{ popErrorHandling()
/**
* Pop the last error handler used
*
@@ -687,7 +680,7 @@ class PEAR
array_pop($stack);
list($mode, $options) = $stack[sizeof($stack) - 1];
array_pop($stack);
if (isset($this) && $this instanceof PEAR) {
if (isset($this) && is_a($this, 'PEAR')) {
$this->setErrorHandling($mode, $options);
} else {
PEAR::setErrorHandling($mode, $options);
@@ -695,9 +688,6 @@ class PEAR
return true;
}
// }}}
// {{{ loadExtension()
/**
* OS independant PHP extension load. Remember to take care
* on the correct extension name for case sensitive OSes.
@@ -705,33 +695,40 @@ class PEAR
* @param string $ext The extension name
* @return bool Success or not on the dl() call
*/
function loadExtension($ext)
static function loadExtension($ext)
{
if (!extension_loaded($ext)) {
// if either returns true dl() will produce a FATAL error, stop that
if ((ini_get('enable_dl') != 1) || (ini_get('safe_mode') == 1)) {
return false;
}
if (OS_WINDOWS) {
$suffix = '.dll';
} elseif (PHP_OS == 'HP-UX') {
$suffix = '.sl';
} elseif (PHP_OS == 'AIX') {
$suffix = '.a';
} elseif (PHP_OS == 'OSX') {
$suffix = '.bundle';
} else {
$suffix = '.so';
}
return @dl('php_'.$ext.$suffix) || @dl($ext.$suffix);
if (extension_loaded($ext)) {
return true;
}
return true;
}
// }}}
// if either returns true dl() will produce a FATAL error, stop that
if (
function_exists('dl') === false ||
ini_get('enable_dl') != 1 ||
ini_get('safe_mode') == 1
) {
return false;
}
if (OS_WINDOWS) {
$suffix = '.dll';
} elseif (PHP_OS == 'HP-UX') {
$suffix = '.sl';
} elseif (PHP_OS == 'AIX') {
$suffix = '.a';
} elseif (PHP_OS == 'OSX') {
$suffix = '.bundle';
} else {
$suffix = '.so';
}
return @dl('php_'.$ext.$suffix) || @dl($ext.$suffix);
}
}
// {{{ _PEAR_call_destructors()
if (PEAR_ZE2) {
include_once 'PEAR5.php';
}
function _PEAR_call_destructors()
{
@@ -740,9 +737,16 @@ function _PEAR_call_destructors()
sizeof($_PEAR_destructor_object_list))
{
reset($_PEAR_destructor_object_list);
if (@PEAR::getStaticProperty('PEAR', 'destructlifo')) {
if (PEAR_ZE2) {
$destructLifoExists = PEAR5::getStaticProperty('PEAR', 'destructlifo');
} else {
$destructLifoExists = PEAR::getStaticProperty('PEAR', 'destructlifo');
}
if ($destructLifoExists) {
$_PEAR_destructor_object_list = array_reverse($_PEAR_destructor_object_list);
}
while (list($k, $objref) = each($_PEAR_destructor_object_list)) {
$classname = get_class($objref);
while ($classname) {
@@ -761,19 +765,36 @@ function _PEAR_call_destructors()
}
// Now call the shutdown functions
if (is_array($GLOBALS['_PEAR_shutdown_funcs']) AND !empty($GLOBALS['_PEAR_shutdown_funcs'])) {
if (
isset($GLOBALS['_PEAR_shutdown_funcs']) &&
is_array($GLOBALS['_PEAR_shutdown_funcs']) &&
!empty($GLOBALS['_PEAR_shutdown_funcs'])
) {
foreach ($GLOBALS['_PEAR_shutdown_funcs'] as $value) {
call_user_func_array($value[0], $value[1]);
}
}
}
// }}}
/**
* Standard PEAR error class for PHP 4
*
* This class is supserseded by {@link PEAR_Exception} in PHP 5
*
* @category pear
* @package PEAR
* @author Stig Bakken <ssb@php.net>
* @author Tomas V.V. Cox <cox@idecnet.com>
* @author Gregory Beaver <cellog@php.net>
* @copyright 1997-2006 The PHP Group
* @license http://opensource.org/licenses/bsd-license.php New BSD License
* @version Release: 1.9.4
* @link http://pear.php.net/manual/en/core.pear.pear-error.php
* @see PEAR::raiseError(), PEAR::throwError()
* @since Class available since PHP 4.0.2
*/
class PEAR_Error
{
// {{{ properties
var $error_message_prefix = '';
var $mode = PEAR_ERROR_RETURN;
var $level = E_USER_NOTICE;
@@ -782,9 +803,6 @@ class PEAR_Error
var $userinfo = '';
var $backtrace = null;
// }}}
// {{{ constructor
/**
* PEAR_Error constructor
*
@@ -815,11 +833,20 @@ class PEAR_Error
$this->code = $code;
$this->mode = $mode;
$this->userinfo = $userinfo;
if (function_exists("debug_backtrace")) {
if (@!PEAR::getStaticProperty('PEAR_Error', 'skiptrace')) {
$this->backtrace = debug_backtrace();
if (PEAR_ZE2) {
$skiptrace = PEAR5::getStaticProperty('PEAR_Error', 'skiptrace');
} else {
$skiptrace = PEAR::getStaticProperty('PEAR_Error', 'skiptrace');
}
if (!$skiptrace) {
$this->backtrace = debug_backtrace();
if (isset($this->backtrace[0]) && isset($this->backtrace[0]['object'])) {
unset($this->backtrace[0]['object']);
}
}
if ($mode & PEAR_ERROR_CALLBACK) {
$this->level = E_USER_NOTICE;
$this->callback = $options;
@@ -827,20 +854,25 @@ class PEAR_Error
if ($options === null) {
$options = E_USER_NOTICE;
}
$this->level = $options;
$this->callback = null;
}
if ($this->mode & PEAR_ERROR_PRINT) {
if (is_null($options) || is_int($options)) {
$format = "%s";
} else {
$format = $options;
}
printf($format, $this->getMessage());
}
if ($this->mode & PEAR_ERROR_TRIGGER) {
trigger_error($this->getMessage(), $this->level);
}
if ($this->mode & PEAR_ERROR_DIE) {
$msg = $this->getMessage();
if (is_null($options) || is_int($options)) {
@@ -853,47 +885,39 @@ class PEAR_Error
}
die(sprintf($format, $msg));
}
if ($this->mode & PEAR_ERROR_CALLBACK) {
if (is_callable($this->callback)) {
call_user_func($this->callback, $this);
}
if ($this->mode & PEAR_ERROR_CALLBACK && is_callable($this->callback)) {
call_user_func($this->callback, $this);
}
if ($this->mode & PEAR_ERROR_EXCEPTION) {
trigger_error("PEAR_ERROR_EXCEPTION is obsolete, use class PEAR_ErrorStack for exceptions", E_USER_WARNING);
eval('$e = new Exception($this->message, $this->code);$e->PEAR_Error = $this;throw($e);');
trigger_error("PEAR_ERROR_EXCEPTION is obsolete, use class PEAR_Exception for exceptions", E_USER_WARNING);
eval('$e = new Exception($this->message, $this->code);throw($e);');
}
}
// }}}
// {{{ getMode()
/**
* Get the error mode from an error object.
*
* @return int error mode
* @access public
*/
function getMode() {
function getMode()
{
return $this->mode;
}
// }}}
// {{{ getCallback()
/**
* Get the callback function/method from an error object.
*
* @return mixed callback function or object/method array
* @access public
*/
function getCallback() {
function getCallback()
{
return $this->callback;
}
// }}}
// {{{ getMessage()
/**
* Get the error message from an error object.
*
@@ -905,10 +929,6 @@ class PEAR_Error
return ($this->error_message_prefix . $this->message);
}
// }}}
// {{{ getCode()
/**
* Get error code from an error object
*
@@ -920,9 +940,6 @@ class PEAR_Error
return $this->code;
}
// }}}
// {{{ getType()
/**
* Get the name of this error/exception.
*
@@ -934,9 +951,6 @@ class PEAR_Error
return get_class($this);
}
// }}}
// {{{ getUserInfo()
/**
* Get additional user-supplied information.
*
@@ -948,9 +962,6 @@ class PEAR_Error
return $this->userinfo;
}
// }}}
// {{{ getDebugInfo()
/**
* Get additional debug information supplied by the application.
*
@@ -962,9 +973,6 @@ class PEAR_Error
return $this->getUserInfo();
}
// }}}
// {{{ getBacktrace()
/**
* Get the call backtrace from where the error was generated.
* Supported with PHP 4.3.0 or newer.
@@ -975,15 +983,15 @@ class PEAR_Error
*/
function getBacktrace($frame = null)
{
if (defined('PEAR_IGNORE_BACKTRACE')) {
return null;
}
if ($frame === null) {
return $this->backtrace;
}
return $this->backtrace[$frame];
}
// }}}
// {{{ addUserInfo()
function addUserInfo($info)
{
if (empty($this->userinfo)) {
@@ -993,8 +1001,10 @@ class PEAR_Error
}
}
// }}}
// {{{ toString()
function __toString()
{
return $this->getMessage();
}
/**
* Make a string representation of this object.
@@ -1002,7 +1012,8 @@ class PEAR_Error
* @return string a string with an object summary
* @access public
*/
function toString() {
function toString()
{
$modes = array();
$levels = array(E_USER_NOTICE => 'notice',
E_USER_WARNING => 'warning',
@@ -1041,8 +1052,6 @@ class PEAR_Error
$this->error_message_prefix,
$this->userinfo);
}
// }}}
}
/*
@@ -1052,4 +1061,3 @@ class PEAR_Error
* c-basic-offset: 4
* End:
*/
?>
+30 -20
View File
@@ -1,29 +1,31 @@
<?php
/**
* Class auto-loader
*
* PHP versions 4
*
* @category pear
* @package PEAR
* @author Stig Bakken <ssb@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
* @version CVS: $Id: Autoloader.php 313023 2011-07-06 19:17:11Z dufuz $
* @link http://pear.php.net/manual/en/core.ppm.php#core.ppm.pear-autoloader
* @since File available since Release 0.1
* @deprecated File deprecated in Release 1.4.0a1
*/
// /* vim: set expandtab tabstop=4 shiftwidth=4: */
// +----------------------------------------------------------------------+
// | PHP Version 5 |
// +----------------------------------------------------------------------+
// | Copyright (c) 1997-2004 The PHP Group |
// +----------------------------------------------------------------------+
// | This source file is subject to version 3.0 of the PHP license, |
// | that is bundled with this package in the file LICENSE, and is |
// | available through the world-wide-web at the following url: |
// | http://www.php.net/license/3_0.txt. |
// | If you did not receive a copy of the PHP license and are unable to |
// | obtain it through the world-wide-web, please send a note to |
// | license@php.net so we can mail you a copy immediately. |
// +----------------------------------------------------------------------+
// | Author: Stig Bakken <ssb@php.net> |
// | |
// +----------------------------------------------------------------------+
//
// $Id: Autoloader.php,v 1.11 2004/02/27 02:21:29 cellog Exp $
if (!extension_loaded("overload")) {
// die hard without ext/overload
die("Rebuild PHP with the `overload' extension to use PEAR_Autoloader");
}
/**
* Include for PEAR_Error and PEAR classes
*/
require_once "PEAR.php";
/**
@@ -38,7 +40,15 @@ require_once "PEAR.php";
* methods, an instance of each class providing separated methods is
* stored and called every time the aggregated method is called.
*
* @author Stig Sæther Bakken <ssb@php.net>
* @category pear
* @package PEAR
* @author Stig Bakken <ssb@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
* @version Release: 1.9.4
* @link http://pear.php.net/manual/en/core.ppm.php#core.ppm.pear-autoloader
* @since File available since Release 0.1
* @deprecated File deprecated in Release 1.4.0a1
*/
class PEAR_Autoloader extends PEAR
{
@@ -134,7 +144,7 @@ class PEAR_Autoloader extends PEAR
$include_file = preg_replace('/[^a-z0-9]/i', '_', $classname);
include_once $include_file;
}
$obj =& new $classname;
$obj = new $classname;
$methods = get_class_methods($classname);
foreach ($methods as $method) {
// don't import priviate methods and constructors
+153 -90
View File
@@ -1,47 +1,60 @@
<?php
//
// +----------------------------------------------------------------------+
// | PHP Version 5 |
// +----------------------------------------------------------------------+
// | Copyright (c) 1997-2004 The PHP Group |
// +----------------------------------------------------------------------+
// | This source file is subject to version 3.0 of the PHP license, |
// | that is bundled with this package in the file LICENSE, and is |
// | available through the world-wide-web at the following url: |
// | http://www.php.net/license/3_0.txt. |
// | If you did not receive a copy of the PHP license and are unable to |
// | obtain it through the world-wide-web, please send a note to |
// | license@php.net so we can mail you a copy immediately. |
// +----------------------------------------------------------------------+
// | Authors: Stig Sæther Bakken <ssb@php.net> |
// +----------------------------------------------------------------------+
//
// $Id: Builder.php,v 1.16.2.3 2005/02/17 17:55:01 cellog Exp $
/**
* PEAR_Builder for building PHP extensions (PECL packages)
*
* PHP versions 4 and 5
*
* @category pear
* @package PEAR
* @author Stig Bakken <ssb@php.net>
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
* @version CVS: $Id: Builder.php 313024 2011-07-06 19:51:24Z dufuz $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 0.1
*
* TODO: log output parameters in PECL command line
* TODO: msdev path in configuration
*/
/**
* Needed for extending PEAR_Builder
*/
require_once 'PEAR/Common.php';
require_once 'PEAR/PackageFile.php';
/**
* Class to handle building (compiling) extensions.
*
* @author Stig Sæther Bakken <ssb@php.net>
* @category pear
* @package PEAR
* @author Stig Bakken <ssb@php.net>
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
* @version Release: 1.9.4
* @link http://pear.php.net/package/PEAR
* @since Class available since PHP 4.0.2
* @see http://pear.php.net/manual/en/core.ppm.pear-builder.php
*/
class PEAR_Builder extends PEAR_Common
{
// {{{ properties
var $php_api_version = 0;
var $zend_module_api_no = 0;
var $zend_extension_api_no = 0;
var $extensions_built = array();
/**
* @var string Used for reporting when it is not possible to pass function
* via extra parameter, e.g. log, msdevCallback
*/
var $current_callback = null;
// used for msdev builds
var $_lastline = null;
var $_firstline = null;
// }}}
// {{{ constructor
/**
* PEAR_Builder constructor.
@@ -56,35 +69,48 @@ class PEAR_Builder extends PEAR_Common
$this->setFrontendObject($ui);
}
// }}}
// {{{ _build_win32()
/**
* Build an extension from source on windows.
* requires msdev
*/
function _build_win32($descfile, $callback = null)
{
if (PEAR::isError($info = $this->infoFromDescriptionFile($descfile))) {
return $info;
if (is_object($descfile)) {
$pkg = $descfile;
$descfile = $pkg->getPackageFile();
} else {
$pf = &new PEAR_PackageFile($this->config, $this->debug);
$pkg = &$pf->fromPackageFile($descfile, PEAR_VALIDATE_NORMAL);
if (PEAR::isError($pkg)) {
return $pkg;
}
}
$dir = dirname($descfile);
$old_cwd = getcwd();
if (!@chdir($dir)) {
if (!file_exists($dir) || !is_dir($dir) || !chdir($dir)) {
return $this->raiseError("could not chdir to $dir");
}
// packages that were in a .tar have the packagefile in this directory
$vdir = $pkg->getPackage() . '-' . $pkg->getVersion();
if (file_exists($dir) && is_dir($vdir)) {
if (!chdir($vdir)) {
return $this->raiseError("could not chdir to " . realpath($vdir));
}
$dir = getcwd();
}
$this->log(2, "building in $dir");
$dsp = $info['package'].'.dsp';
if (!@is_file("$dir/$dsp")) {
$dsp = $pkg->getPackage().'.dsp';
if (!file_exists("$dir/$dsp")) {
return $this->raiseError("The DSP $dsp does not exist.");
}
// XXX TODO: make release build type configurable
$command = 'msdev '.$dsp.' /MAKE "'.$info['package']. ' - Release"';
$command = 'msdev '.$dsp.' /MAKE "'.$pkg->getPackage(). ' - Release"';
$this->current_callback = $callback;
$err = $this->_runCommand($command, array(&$this, 'msdevCallback'));
if (PEAR::isError($err)) {
return $err;
@@ -93,12 +119,12 @@ class PEAR_Builder extends PEAR_Common
// figure out the build platform and type
$platform = 'Win32';
$buildtype = 'Release';
if (preg_match('/.*?'.$info['package'].'\s-\s(\w+)\s(.*?)-+/i',$this->_firstline,$matches)) {
if (preg_match('/.*?'.$pkg->getPackage().'\s-\s(\w+)\s(.*?)-+/i',$this->_firstline,$matches)) {
$platform = $matches[1];
$buildtype = $matches[2];
}
if (preg_match('/(.*)?\s-\s(\d+).*?(\d+)/',$this->_lastline,$matches)) {
if (preg_match('/(.*)?\s-\s(\d+).*?(\d+)/', $this->_lastline, $matches)) {
if ($matches[2]) {
// there were errors in the build
return $this->raiseError("There were errors during compilation.");
@@ -115,18 +141,19 @@ class PEAR_Builder extends PEAR_Common
// this regex depends on the build platform and type having been
// correctly identified above.
$regex ='/.*?!IF\s+"\$\(CFG\)"\s+==\s+("'.
$info['package'].'\s-\s'.
$pkg->getPackage().'\s-\s'.
$platform.'\s'.
$buildtype.'").*?'.
'\/out:"(.*?)"/is';
if ($dsptext && preg_match($regex,$dsptext,$matches)) {
if ($dsptext && preg_match($regex, $dsptext, $matches)) {
// what we get back is a relative path to the output file itself.
$outfile = realpath($matches[2]);
} else {
return $this->raiseError("Could not retrieve output information from $dsp.");
}
if (@copy($outfile, "$dir/$out")) {
// realpath returns false if the file doesn't exist
if ($outfile && copy($outfile, "$dir/$out")) {
$outfile = "$dir/$out";
}
@@ -147,10 +174,9 @@ class PEAR_Builder extends PEAR_Common
if (!$this->_firstline)
$this->_firstline = $data;
$this->_lastline = $data;
call_user_func($this->current_callback, $what, $data);
}
// }}}
// {{{ _harventInstDir
/**
* @param string
* @param string
@@ -191,16 +217,13 @@ class PEAR_Builder extends PEAR_Common
return $ret;
}
// }}}
// {{{ build()
/**
* Build an extension from source. Runs "phpize" in the source
* directory, but compiles in a temporary directory
* (/var/tmp/pear-build-USER/PACKAGE-VERSION).
* (TMPDIR/pear-build-USER/PACKAGE-VERSION).
*
* @param string $descfile path to XML package description file
* @param string|PEAR_PackageFile_v* $descfile path to XML package description file, or
* a PEAR_PackageFile object
*
* @param mixed $callback callback function used to report output,
* see PEAR_Builder::_runCommand for details
@@ -216,48 +239,97 @@ class PEAR_Builder extends PEAR_Common
* @access public
*
* @see PEAR_Builder::_runCommand
* @see PEAR_Common::infoFromDescriptionFile
*/
function build($descfile, $callback = null)
{
if (PEAR_OS == "Windows") {
return $this->_build_win32($descfile,$callback);
if (preg_match('/(\\/|\\\\|^)([^\\/\\\\]+)?php(.+)?$/',
$this->config->get('php_bin'), $matches)) {
if (isset($matches[2]) && strlen($matches[2]) &&
trim($matches[2]) != trim($this->config->get('php_prefix'))) {
$this->log(0, 'WARNING: php_bin ' . $this->config->get('php_bin') .
' appears to have a prefix ' . $matches[2] . ', but' .
' config variable php_prefix does not match');
}
if (isset($matches[3]) && strlen($matches[3]) &&
trim($matches[3]) != trim($this->config->get('php_suffix'))) {
$this->log(0, 'WARNING: php_bin ' . $this->config->get('php_bin') .
' appears to have a suffix ' . $matches[3] . ', but' .
' config variable php_suffix does not match');
}
}
$this->current_callback = $callback;
if (PEAR_OS == "Windows") {
return $this->_build_win32($descfile, $callback);
}
if (PEAR_OS != 'Unix') {
return $this->raiseError("building extensions not supported on this platform");
}
if (PEAR::isError($info = $this->infoFromDescriptionFile($descfile))) {
return $info;
if (is_object($descfile)) {
$pkg = $descfile;
$descfile = $pkg->getPackageFile();
if (is_a($pkg, 'PEAR_PackageFile_v1')) {
$dir = dirname($descfile);
} else {
$dir = $pkg->_config->get('temp_dir') . '/' . $pkg->getName();
// automatically delete at session end
$this->addTempFile($dir);
}
} else {
$pf = &new PEAR_PackageFile($this->config);
$pkg = &$pf->fromPackageFile($descfile, PEAR_VALIDATE_NORMAL);
if (PEAR::isError($pkg)) {
return $pkg;
}
$dir = dirname($descfile);
}
$dir = dirname($descfile);
// Find config. outside of normal path - e.g. config.m4
foreach (array_keys($pkg->getInstallationFileList()) as $item) {
if (stristr(basename($item), 'config.m4') && dirname($item) != '.') {
$dir .= DIRECTORY_SEPARATOR . dirname($item);
break;
}
}
$old_cwd = getcwd();
if (!@chdir($dir)) {
if (!file_exists($dir) || !is_dir($dir) || !chdir($dir)) {
return $this->raiseError("could not chdir to $dir");
}
$vdir = "$info[package]-$info[version]";
$vdir = $pkg->getPackage() . '-' . $pkg->getVersion();
if (is_dir($vdir)) {
chdir($vdir);
}
$dir = getcwd();
$this->log(2, "building in $dir");
$this->current_callback = $callback;
putenv('PATH=' . $this->config->get('bin_dir') . ':' . getenv('PATH'));
$err = $this->_runCommand("phpize", array(&$this, 'phpizeCallback'));
$err = $this->_runCommand($this->config->get('php_prefix')
. "phpize" .
$this->config->get('php_suffix'),
array(&$this, 'phpizeCallback'));
if (PEAR::isError($err)) {
return $err;
}
if (!$err) {
return $this->raiseError("`phpize' failed");
}
// {{{ start of interactive part
$configure_command = "$dir/configure";
if (isset($info['configure_options'])) {
foreach ($info['configure_options'] as $o) {
$configure_options = $pkg->getConfigureOptions();
if ($configure_options) {
foreach ($configure_options as $o) {
$default = array_key_exists('default', $o) ? $o['default'] : null;
list($r) = $this->ui->userDialog('build',
array($o['prompt']),
array('text'),
array(@$o['default']));
array($default));
if (substr($o['name'], 0, 5) == 'with-' &&
($r == 'yes' || $r == 'autodetect')) {
$configure_command .= " --$o[name]";
@@ -269,40 +341,41 @@ class PEAR_Builder extends PEAR_Common
// }}} end of interactive part
// FIXME make configurable
if(!$user=getenv('USER')){
if (!$user=getenv('USER')) {
$user='defaultuser';
}
$build_basedir = "/var/tmp/pear-build-$user";
$build_dir = "$build_basedir/$info[package]-$info[version]";
$inst_dir = "$build_basedir/install-$info[package]-$info[version]";
$tmpdir = $this->config->get('temp_dir');
$build_basedir = System::mktemp(' -t "' . $tmpdir . '" -d "pear-build-' . $user . '"');
$build_dir = "$build_basedir/$vdir";
$inst_dir = "$build_basedir/install-$vdir";
$this->log(1, "building in $build_dir");
if (is_dir($build_dir)) {
System::rm('-rf', $build_dir);
System::rm(array('-rf', $build_dir));
}
if (!System::mkDir(array('-p', $build_dir))) {
return $this->raiseError("could not create build dir: $build_dir");
}
$this->addTempFile($build_dir);
if (!System::mkDir(array('-p', $inst_dir))) {
return $this->raiseError("could not create temporary install dir: $inst_dir");
}
$this->addTempFile($inst_dir);
if (getenv('MAKE')) {
$make_command = getenv('MAKE');
} else {
$make_command = 'make';
}
$make_command = getenv('MAKE') ? getenv('MAKE') : 'make';
$to_run = array(
$configure_command,
$make_command,
"$make_command INSTALL_ROOT=\"$inst_dir\" install",
"find \"$inst_dir\" -ls"
"find \"$inst_dir\" | xargs ls -dils"
);
if (!@chdir($build_dir)) {
if (!file_exists($build_dir) || !is_dir($build_dir) || !chdir($build_dir)) {
return $this->raiseError("could not chdir to $build_dir");
}
putenv('PHP_PEAR_VERSION=@PEAR-VER@');
putenv('PHP_PEAR_VERSION=1.9.4');
foreach ($to_run as $cmd) {
$err = $this->_runCommand($cmd, $callback);
if (PEAR::isError($err)) {
@@ -319,15 +392,14 @@ class PEAR_Builder extends PEAR_Common
return $this->raiseError("no `modules' directory found");
}
$built_files = array();
$prefix = exec("php-config --prefix");
$prefix = exec($this->config->get('php_prefix')
. "php-config" .
$this->config->get('php_suffix') . " --prefix");
$this->_harvestInstDir($prefix, $inst_dir . DIRECTORY_SEPARATOR . $prefix, $built_files);
chdir($old_cwd);
return $built_files;
}
// }}}
// {{{ phpizeCallback()
/**
* Message callback function used when running the "phpize"
* program. Extracts the API numbers used. Ignores other message
@@ -361,9 +433,6 @@ class PEAR_Builder extends PEAR_Common
}
}
// }}}
// {{{ _runCommand()
/**
* Run an external command, using a message callback to report
* output. The command will be run through popen and output is
@@ -383,7 +452,7 @@ class PEAR_Builder extends PEAR_Common
function _runCommand($command, $callback = null)
{
$this->log(1, "running: $command");
$pp = @popen("$command 2>&1", "r");
$pp = popen("$command 2>&1", "r");
if (!$pp) {
return $this->raiseError("failed to run `$command'");
}
@@ -402,13 +471,11 @@ class PEAR_Builder extends PEAR_Common
if ($callback && isset($olddbg)) {
$callback[0]->debug = $olddbg;
}
$exitcode = @pclose($pp);
$exitcode = is_resource($pp) ? pclose($pp) : -1;
return ($exitcode == 0);
}
// }}}
// {{{ log()
function log($level, $msg)
{
if ($this->current_callback) {
@@ -419,8 +486,4 @@ class PEAR_Builder extends PEAR_Common
}
return PEAR_Common::log($level, $msg);
}
// }}}
}
?>
}
+1559
View File
File diff suppressed because it is too large Load Diff
+68
View File
@@ -0,0 +1,68 @@
<?php
/**
* PEAR_ChannelFile_Parser for parsing channel.xml
*
* PHP versions 4 and 5
*
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
* @version CVS: $Id: Parser.php 313023 2011-07-06 19:17:11Z dufuz $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
/**
* base xml parser class
*/
require_once 'PEAR/XMLParser.php';
require_once 'PEAR/ChannelFile.php';
/**
* Parser for channel.xml
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
* @version Release: 1.9.4
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a1
*/
class PEAR_ChannelFile_Parser extends PEAR_XMLParser
{
var $_config;
var $_logger;
var $_registry;
function setConfig(&$c)
{
$this->_config = &$c;
$this->_registry = &$c->getRegistry();
}
function setLogger(&$l)
{
$this->_logger = &$l;
}
function parse($data, $file)
{
if (PEAR::isError($err = parent::parse($data, $file))) {
return $err;
}
$ret = new PEAR_ChannelFile;
$ret->setConfig($this->_config);
if (isset($this->_logger)) {
$ret->setLogger($this->_logger);
}
$ret->fromArray($this->_unserializedData);
// make sure the filelist is in the easy to read format needed
$ret->flattenFilelist();
$ret->setPackagefile($file, $archive);
return $ret;
}
}
+123 -107
View File
@@ -1,25 +1,26 @@
<?php
//
// +----------------------------------------------------------------------+
// | PHP Version 5 |
// +----------------------------------------------------------------------+
// | Copyright (c) 1997-2004 The PHP Group |
// +----------------------------------------------------------------------+
// | This source file is subject to version 3.0 of the PHP license, |
// | that is bundled with this package in the file LICENSE, and is |
// | available through the world-wide-web at the following url: |
// | http://www.php.net/license/3_0.txt. |
// | If you did not receive a copy of the PHP license and are unable to |
// | obtain it through the world-wide-web, please send a note to |
// | license@php.net so we can mail you a copy immediately. |
// +----------------------------------------------------------------------+
// | Author: Stig Bakken <ssb@php.net> |
// +----------------------------------------------------------------------+
//
// $Id: Command.php,v 1.24 2004/05/16 15:43:30 pajoye Exp $
/**
* PEAR_Command, command pattern class
*
* PHP versions 4 and 5
*
* @category pear
* @package PEAR
* @author Stig Bakken <ssb@php.net>
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
* @version CVS: $Id: Command.php 313023 2011-07-06 19:17:11Z dufuz $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 0.1
*/
require_once "PEAR.php";
/**
* Needed for error handling
*/
require_once 'PEAR.php';
require_once 'PEAR/Frontend.php';
require_once 'PEAR/XMLParser.php';
/**
* List of commands and what classes they are implemented in.
@@ -27,6 +28,12 @@ require_once "PEAR.php";
*/
$GLOBALS['_PEAR_Command_commandlist'] = array();
/**
* List of commands and their descriptions
* @var array command => description
*/
$GLOBALS['_PEAR_Command_commanddesc'] = array();
/**
* List of shortcuts to common commands.
* @var array shortcut => command
@@ -39,18 +46,6 @@ $GLOBALS['_PEAR_Command_shortcuts'] = array();
*/
$GLOBALS['_PEAR_Command_objects'] = array();
/**
* Which user interface class is being used.
* @var string class name
*/
$GLOBALS['_PEAR_Command_uiclass'] = 'PEAR_Frontend_CLI';
/**
* Instance of $_PEAR_Command_uiclass.
* @var object
*/
$GLOBALS['_PEAR_Command_uiobject'] = null;
/**
* PEAR command class, a simple factory class for administrative
* commands.
@@ -93,6 +88,15 @@ $GLOBALS['_PEAR_Command_uiobject'] = null;
* - DON'T USE EXIT OR DIE! Always use pear errors. From static
* classes do PEAR::raiseError(), from other classes do
* $this->raiseError().
* @category pear
* @package PEAR
* @author Stig Bakken <ssb@php.net>
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
* @version Release: 1.9.4
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 0.1
*/
class PEAR_Command
{
@@ -109,7 +113,7 @@ class PEAR_Command
* @access public
* @static
*/
function factory($command, &$config)
function &factory($command, &$config)
{
if (empty($GLOBALS['_PEAR_Command_commandlist'])) {
PEAR_Command::registerCommands();
@@ -118,13 +122,35 @@ class PEAR_Command
$command = $GLOBALS['_PEAR_Command_shortcuts'][$command];
}
if (!isset($GLOBALS['_PEAR_Command_commandlist'][$command])) {
return PEAR::raiseError("unknown command `$command'");
$a = PEAR::raiseError("unknown command `$command'");
return $a;
}
$class = $GLOBALS['_PEAR_Command_commandlist'][$command];
if (!class_exists($class)) {
require_once $GLOBALS['_PEAR_Command_objects'][$class];
}
if (!class_exists($class)) {
$a = PEAR::raiseError("unknown command `$command'");
return $a;
}
$ui = PEAR_Command::getFrontendObject();
$obj = new $class($ui, $config);
return $obj;
}
// }}}
// {{{ & getObject()
function &getObject($command)
{
$class = $GLOBALS['_PEAR_Command_commandlist'][$command];
if (!class_exists($class)) {
require_once $GLOBALS['_PEAR_Command_objects'][$class];
}
if (!class_exists($class)) {
return PEAR::raiseError("unknown command `$command'");
}
$ui =& PEAR_Command::getFrontendObject();
$ui = PEAR_Command::getFrontendObject();
$config = &PEAR_Config::singleton();
$obj = &new $class($ui, $config);
return $obj;
}
@@ -135,15 +161,13 @@ class PEAR_Command
/**
* Get instance of frontend object.
*
* @return object
* @return object|PEAR_Error
* @static
*/
function &getFrontendObject()
{
if (empty($GLOBALS['_PEAR_Command_uiobject'])) {
$GLOBALS['_PEAR_Command_uiobject'] = &new $GLOBALS['_PEAR_Command_uiclass'];
}
return $GLOBALS['_PEAR_Command_uiobject'];
$a = &PEAR_Frontend::singleton();
return $a;
}
// }}}
@@ -159,59 +183,13 @@ class PEAR_Command
*/
function &setFrontendClass($uiclass)
{
if (is_object($GLOBALS['_PEAR_Command_uiobject']) &&
is_a($GLOBALS['_PEAR_Command_uiobject'], $uiclass)) {
return $GLOBALS['_PEAR_Command_uiobject'];
}
if (!class_exists($uiclass)) {
$file = str_replace('_', '/', $uiclass) . '.php';
if (PEAR_Command::isIncludeable($file)) {
include_once $file;
}
}
if (class_exists($uiclass)) {
$obj = &new $uiclass;
// quick test to see if this class implements a few of the most
// important frontend methods
if (method_exists($obj, 'userConfirm')) {
$GLOBALS['_PEAR_Command_uiobject'] = &$obj;
$GLOBALS['_PEAR_Command_uiclass'] = $uiclass;
return $obj;
} else {
$err = PEAR::raiseError("not a frontend class: $uiclass");
return $err;
}
}
$err = PEAR::raiseError("no such class: $uiclass");
return $err;
$a = &PEAR_Frontend::setFrontendClass($uiclass);
return $a;
}
// }}}
// {{{ setFrontendType()
// }}}
// {{{ isIncludeable()
/**
* @param string $path relative or absolute include path
* @return boolean
* @static
*/
function isIncludeable($path)
{
if (file_exists($path) && is_readable($path)) {
return true;
}
$ipath = explode(PATH_SEPARATOR, ini_get('include_path'));
foreach ($ipath as $include) {
$test = realpath($include . DIRECTORY_SEPARATOR . $path);
if (file_exists($test) && is_readable($test)) {
return true;
}
}
return false;
}
/**
* Set current frontend.
*
@@ -249,9 +227,13 @@ class PEAR_Command
*/
function registerCommands($merge = false, $dir = null)
{
$parser = new PEAR_XMLParser;
if ($dir === null) {
$dir = dirname(__FILE__) . '/Command';
}
if (!is_dir($dir)) {
return PEAR::raiseError("registerCommands: opendir($dir) '$dir' does not exist or is not a directory");
}
$dp = @opendir($dir);
if (empty($dp)) {
return PEAR::raiseError("registerCommands: opendir($dir) failed");
@@ -259,27 +241,58 @@ class PEAR_Command
if (!$merge) {
$GLOBALS['_PEAR_Command_commandlist'] = array();
}
while ($entry = readdir($dp)) {
if ($entry{0} == '.' || substr($entry, -4) != '.php' || $entry == 'Common.php') {
while ($file = readdir($dp)) {
if ($file{0} == '.' || substr($file, -4) != '.xml') {
continue;
}
$class = "PEAR_Command_".substr($entry, 0, -4);
$file = "$dir/$entry";
include_once $file;
$f = substr($file, 0, -4);
$class = "PEAR_Command_" . $f;
// List of commands
if (empty($GLOBALS['_PEAR_Command_objects'][$class])) {
$GLOBALS['_PEAR_Command_objects'][$class] = &new $class($ui, $config);
$GLOBALS['_PEAR_Command_objects'][$class] = "$dir/" . $f . '.php';
}
$implements = $GLOBALS['_PEAR_Command_objects'][$class]->getCommands();
$parser->parse(file_get_contents("$dir/$file"));
$implements = $parser->getData();
foreach ($implements as $command => $desc) {
if ($command == 'attribs') {
continue;
}
if (isset($GLOBALS['_PEAR_Command_commandlist'][$command])) {
return PEAR::raiseError('Command "' . $command . '" already registered in ' .
'class "' . $GLOBALS['_PEAR_Command_commandlist'][$command] . '"');
}
$GLOBALS['_PEAR_Command_commandlist'][$command] = $class;
$GLOBALS['_PEAR_Command_commanddesc'][$command] = $desc;
}
$shortcuts = $GLOBALS['_PEAR_Command_objects'][$class]->getShortcuts();
foreach ($shortcuts as $shortcut => $command) {
$GLOBALS['_PEAR_Command_shortcuts'][$shortcut] = $command;
$GLOBALS['_PEAR_Command_commanddesc'][$command] = $desc['summary'];
if (isset($desc['shortcut'])) {
$shortcut = $desc['shortcut'];
if (isset($GLOBALS['_PEAR_Command_shortcuts'][$shortcut])) {
return PEAR::raiseError('Command shortcut "' . $shortcut . '" already ' .
'registered to command "' . $command . '" in class "' .
$GLOBALS['_PEAR_Command_commandlist'][$command] . '"');
}
$GLOBALS['_PEAR_Command_shortcuts'][$shortcut] = $command;
}
if (isset($desc['options']) && $desc['options']) {
foreach ($desc['options'] as $oname => $option) {
if (isset($option['shortopt']) && strlen($option['shortopt']) > 1) {
return PEAR::raiseError('Option "' . $oname . '" short option "' .
$option['shortopt'] . '" must be ' .
'only 1 character in Command "' . $command . '" in class "' .
$class . '"');
}
}
}
}
}
ksort($GLOBALS['_PEAR_Command_shortcuts']);
ksort($GLOBALS['_PEAR_Command_commandlist']);
@closedir($dp);
return true;
}
@@ -343,11 +356,13 @@ class PEAR_Command
if (empty($GLOBALS['_PEAR_Command_commandlist'])) {
PEAR_Command::registerCommands();
}
if (isset($GLOBALS['_PEAR_Command_shortcuts'][$command])) {
$command = $GLOBALS['_PEAR_Command_shortcuts'][$command];
}
if (!isset($GLOBALS['_PEAR_Command_commandlist'][$command])) {
return null;
}
$class = $GLOBALS['_PEAR_Command_commandlist'][$command];
$obj = &$GLOBALS['_PEAR_Command_objects'][$class];
$obj = &PEAR_Command::getObject($command);
return $obj->getGetoptArgs($command, $short_args, $long_args);
}
@@ -386,13 +401,14 @@ class PEAR_Command
function getHelp($command)
{
$cmds = PEAR_Command::getCommands();
if (isset($GLOBALS['_PEAR_Command_shortcuts'][$command])) {
$command = $GLOBALS['_PEAR_Command_shortcuts'][$command];
}
if (isset($cmds[$command])) {
$class = $cmds[$command];
return $GLOBALS['_PEAR_Command_objects'][$class]->getHelp($command);
$obj = &PEAR_Command::getObject($command);
return $obj->getHelp($command);
}
return false;
}
// }}}
}
?>
}
+45 -119
View File
@@ -1,43 +1,53 @@
<?php
//
// +----------------------------------------------------------------------+
// | PHP Version 5 |
// +----------------------------------------------------------------------+
// | Copyright (c) 1997-2004 The PHP Group |
// +----------------------------------------------------------------------+
// | This source file is subject to version 3.0 of the PHP license, |
// | that is bundled with this package in the file LICENSE, and is |
// | available through the world-wide-web at the following url: |
// | http://www.php.net/license/3_0.txt. |
// | If you did not receive a copy of the PHP license and are unable to |
// | obtain it through the world-wide-web, please send a note to |
// | license@php.net so we can mail you a copy immediately. |
// +----------------------------------------------------------------------+
// | Author: Stig Bakken <ssb@php.net> |
// +----------------------------------------------------------------------+
//
// $Id: Auth.php,v 1.15 2004/01/08 17:33:13 sniper Exp $
require_once "PEAR/Command/Common.php";
require_once "PEAR/Remote.php";
require_once "PEAR/Config.php";
/**
* PEAR_Command_Auth (login, logout commands)
*
* PHP versions 4 and 5
*
* @category pear
* @package PEAR
* @author Stig Bakken <ssb@php.net>
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
* @version CVS: $Id: Auth.php 313023 2011-07-06 19:17:11Z dufuz $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 0.1
* @deprecated since 1.8.0alpha1
*/
/**
* PEAR commands for managing configuration data.
*
* base class
*/
class PEAR_Command_Auth extends PEAR_Command_Common
{
// {{{ properties
require_once 'PEAR/Command/Channels.php';
/**
* PEAR commands for login/logout
*
* @category pear
* @package PEAR
* @author Stig Bakken <ssb@php.net>
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
* @version Release: 1.9.4
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 0.1
* @deprecated since 1.8.0alpha1
*/
class PEAR_Command_Auth extends PEAR_Command_Channels
{
var $commands = array(
'login' => array(
'summary' => 'Connects and authenticates to remote server',
'summary' => 'Connects and authenticates to remote server [Deprecated in favor of channel-login]',
'shortcut' => 'li',
'function' => 'doLogin',
'options' => array(),
'doc' => '
Log in to the remote server. To use remote functions in the installer
'doc' => '<channel name>
WARNING: This function is deprecated in favor of using channel-login
Log in to a remote channel server. If <channel name> is not supplied,
the default channel is used. To use remote functions in the installer
that require any kind of privileges, you need to log in first. The
username and password you enter here will be stored in your per-user
PEAR configuration (~/.pearrc on Unix-like systems). After logging
@@ -45,11 +55,13 @@ in, your username and password will be sent along in subsequent
operations on the remote server.',
),
'logout' => array(
'summary' => 'Logs out from the remote server',
'summary' => 'Logs out from the remote server [Deprecated in favor of channel-logout]',
'shortcut' => 'lo',
'function' => 'doLogout',
'options' => array(),
'doc' => '
WARNING: This function is deprecated in favor of using channel-logout
Logs out from the remote server. This command does not actually
connect to the remote server, it only deletes the stored username and
password from your user configuration.',
@@ -57,10 +69,6 @@ password from your user configuration.',
);
// }}}
// {{{ constructor
/**
* PEAR_Command_Auth constructor.
*
@@ -68,88 +76,6 @@ password from your user configuration.',
*/
function PEAR_Command_Auth(&$ui, &$config)
{
parent::PEAR_Command_Common($ui, $config);
parent::PEAR_Command_Channels($ui, $config);
}
// }}}
// {{{ doLogin()
/**
* Execute the 'login' command.
*
* @param string $command command name
*
* @param array $options option_name => value
*
* @param array $params list of additional parameters
*
* @return bool TRUE on success, FALSE for unknown commands, or
* a PEAR error on failure
*
* @access public
*/
function doLogin($command, $options, $params)
{
$server = $this->config->get('master_server');
$remote = new PEAR_Remote($this->config);
$username = $this->config->get('username');
if (empty($username)) {
$username = @$_ENV['USER'];
}
$this->ui->outputData("Logging in to $server.", $command);
list($username, $password) = $this->ui->userDialog(
$command,
array('Username', 'Password'),
array('text', 'password'),
array($username, '')
);
$username = trim($username);
$password = trim($password);
$this->config->set('username', $username);
$this->config->set('password', $password);
$remote->expectError(401);
$ok = $remote->call('logintest');
$remote->popExpect();
if ($ok === true) {
$this->ui->outputData("Logged in.", $command);
$this->config->store();
} else {
return $this->raiseError("Login failed!");
}
}
// }}}
// {{{ doLogout()
/**
* Execute the 'logout' command.
*
* @param string $command command name
*
* @param array $options option_name => value
*
* @param array $params list of additional parameters
*
* @return bool TRUE on success, FALSE for unknown commands, or
* a PEAR error on failure
*
* @access public
*/
function doLogout($command, $options, $params)
{
$server = $this->config->get('master_server');
$this->ui->outputData("Logging out from $server.", $command);
$this->config->remove('username');
$this->config->remove('password');
$this->config->store();
}
// }}}
}
?>
}
+30
View File
@@ -0,0 +1,30 @@
<commands version="1.0">
<login>
<summary>Connects and authenticates to remote server [Deprecated in favor of channel-login]</summary>
<function>doLogin</function>
<shortcut>li</shortcut>
<options />
<doc>&lt;channel name&gt;
WARNING: This function is deprecated in favor of using channel-login
Log in to a remote channel server. If &lt;channel name&gt; is not supplied,
the default channel is used. To use remote functions in the installer
that require any kind of privileges, you need to log in first. The
username and password you enter here will be stored in your per-user
PEAR configuration (~/.pearrc on Unix-like systems). After logging
in, your username and password will be sent along in subsequent
operations on the remote server.</doc>
</login>
<logout>
<summary>Logs out from the remote server [Deprecated in favor of channel-logout]</summary>
<function>doLogout</function>
<shortcut>lo</shortcut>
<options />
<doc>
WARNING: This function is deprecated in favor of using channel-logout
Logs out from the remote server. This command does not actually
connect to the remote server, it only deletes the stored username and
password from your user configuration.</doc>
</logout>
</commands>
+34 -38
View File
@@ -1,36 +1,42 @@
<?php
//
// +----------------------------------------------------------------------+
// | PHP Version 5 |
// +----------------------------------------------------------------------+
// | Copyright (c) 1997-2004 The PHP Group |
// +----------------------------------------------------------------------+
// | This source file is subject to version 3.0 of the PHP license, |
// | that is bundled with this package in the file LICENSE, and is |
// | available through the world-wide-web at the following url: |
// | http://www.php.net/license/3_0.txt. |
// | If you did not receive a copy of the PHP license and are unable to |
// | obtain it through the world-wide-web, please send a note to |
// | license@php.net so we can mail you a copy immediately. |
// +----------------------------------------------------------------------+
// | Author: Stig Bakken <ssb@php.net> |
// | Tomas V.V.Cox <cox@idecnet.com> |
// | |
// +----------------------------------------------------------------------+
//
// $Id: Build.php,v 1.9 2004/01/08 17:33:13 sniper Exp $
/**
* PEAR_Command_Auth (build command)
*
* PHP versions 4 and 5
*
* @category pear
* @package PEAR
* @author Stig Bakken <ssb@php.net>
* @author Tomas V.V.Cox <cox@idecnet.com>
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
* @version CVS: $Id: Build.php 313023 2011-07-06 19:17:11Z dufuz $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 0.1
*/
require_once "PEAR/Command/Common.php";
require_once "PEAR/Builder.php";
/**
* base class
*/
require_once 'PEAR/Command/Common.php';
/**
* PEAR commands for building extensions.
*
* @category pear
* @package PEAR
* @author Stig Bakken <ssb@php.net>
* @author Tomas V.V.Cox <cox@idecnet.com>
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
* @version Release: 1.9.4
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 0.1
*/
class PEAR_Command_Build extends PEAR_Command_Common
{
// {{{ properties
var $commands = array(
'build' => array(
'summary' => 'Build an Extension From C Source',
@@ -42,10 +48,6 @@ Builds one or more extensions contained in a package.'
),
);
// }}}
// {{{ constructor
/**
* PEAR_Command_Build constructor.
*
@@ -56,27 +58,23 @@ Builds one or more extensions contained in a package.'
parent::PEAR_Command_Common($ui, $config);
}
// }}}
// {{{ doBuild()
function doBuild($command, $options, $params)
{
require_once 'PEAR/Builder.php';
if (sizeof($params) < 1) {
$params[0] = 'package.xml';
}
$builder = &new PEAR_Builder($this->ui);
$this->debug = $this->config->get('verbose');
$err = $builder->build($params[0], array(&$this, 'buildCallback'));
if (PEAR::isError($err)) {
return $err;
}
return true;
}
// }}}
// {{{ buildCallback()
function buildCallback($what, $data)
{
if (($what == 'cmdoutput' && $this->debug > 1) ||
@@ -84,6 +82,4 @@ Builds one or more extensions contained in a package.'
$this->ui->outputData(rtrim($data), 'build');
}
}
// }}}
}
}
+10
View File
@@ -0,0 +1,10 @@
<commands version="1.0">
<build>
<summary>Build an Extension From C Source</summary>
<function>doBuild</function>
<shortcut>b</shortcut>
<options />
<doc>[package.xml]
Builds one or more extensions contained in a package.</doc>
</build>
</commands>
+883
View File
@@ -0,0 +1,883 @@
<?php
// /* vim: set expandtab tabstop=4 shiftwidth=4: */
/**
* PEAR_Command_Channels (list-channels, update-channels, channel-delete, channel-add,
* channel-update, channel-info, channel-alias, channel-discover commands)
*
* PHP versions 4 and 5
*
* @category pear
* @package PEAR
* @author Stig Bakken <ssb@php.net>
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
* @version CVS: $Id: Channels.php 313023 2011-07-06 19:17:11Z dufuz $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
/**
* base class
*/
require_once 'PEAR/Command/Common.php';
define('PEAR_COMMAND_CHANNELS_CHANNEL_EXISTS', -500);
/**
* PEAR commands for managing channels.
*
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
* @version Release: 1.9.4
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a1
*/
class PEAR_Command_Channels extends PEAR_Command_Common
{
var $commands = array(
'list-channels' => array(
'summary' => 'List Available Channels',
'function' => 'doList',
'shortcut' => 'lc',
'options' => array(),
'doc' => '
List all available channels for installation.
',
),
'update-channels' => array(
'summary' => 'Update the Channel List',
'function' => 'doUpdateAll',
'shortcut' => 'uc',
'options' => array(),
'doc' => '
List all installed packages in all channels.
'
),
'channel-delete' => array(
'summary' => 'Remove a Channel From the List',
'function' => 'doDelete',
'shortcut' => 'cde',
'options' => array(),
'doc' => '<channel name>
Delete a channel from the registry. You may not
remove any channel that has installed packages.
'
),
'channel-add' => array(
'summary' => 'Add a Channel',
'function' => 'doAdd',
'shortcut' => 'ca',
'options' => array(),
'doc' => '<channel.xml>
Add a private channel to the channel list. Note that all
public channels should be synced using "update-channels".
Parameter may be either a local file or remote URL to a
channel.xml.
'
),
'channel-update' => array(
'summary' => 'Update an Existing Channel',
'function' => 'doUpdate',
'shortcut' => 'cu',
'options' => array(
'force' => array(
'shortopt' => 'f',
'doc' => 'will force download of new channel.xml if an existing channel name is used',
),
'channel' => array(
'shortopt' => 'c',
'arg' => 'CHANNEL',
'doc' => 'will force download of new channel.xml if an existing channel name is used',
),
),
'doc' => '[<channel.xml>|<channel name>]
Update a channel in the channel list directly. Note that all
public channels can be synced using "update-channels".
Parameter may be a local or remote channel.xml, or the name of
an existing channel.
'
),
'channel-info' => array(
'summary' => 'Retrieve Information on a Channel',
'function' => 'doInfo',
'shortcut' => 'ci',
'options' => array(),
'doc' => '<package>
List the files in an installed package.
'
),
'channel-alias' => array(
'summary' => 'Specify an alias to a channel name',
'function' => 'doAlias',
'shortcut' => 'cha',
'options' => array(),
'doc' => '<channel> <alias>
Specify a specific alias to use for a channel name.
The alias may not be an existing channel name or
alias.
'
),
'channel-discover' => array(
'summary' => 'Initialize a Channel from its server',
'function' => 'doDiscover',
'shortcut' => 'di',
'options' => array(),
'doc' => '[<channel.xml>|<channel name>]
Initialize a channel from its server and create a local channel.xml.
If <channel name> is in the format "<username>:<password>@<channel>" then
<username> and <password> will be set as the login username/password for
<channel>. Use caution when passing the username/password in this way, as
it may allow other users on your computer to briefly view your username/
password via the system\'s process list.
'
),
'channel-login' => array(
'summary' => 'Connects and authenticates to remote channel server',
'shortcut' => 'cli',
'function' => 'doLogin',
'options' => array(),
'doc' => '<channel name>
Log in to a remote channel server. If <channel name> is not supplied,
the default channel is used. To use remote functions in the installer
that require any kind of privileges, you need to log in first. The
username and password you enter here will be stored in your per-user
PEAR configuration (~/.pearrc on Unix-like systems). After logging
in, your username and password will be sent along in subsequent
operations on the remote server.',
),
'channel-logout' => array(
'summary' => 'Logs out from the remote channel server',
'shortcut' => 'clo',
'function' => 'doLogout',
'options' => array(),
'doc' => '<channel name>
Logs out from a remote channel server. If <channel name> is not supplied,
the default channel is used. This command does not actually connect to the
remote server, it only deletes the stored username and password from your user
configuration.',
),
);
/**
* PEAR_Command_Registry constructor.
*
* @access public
*/
function PEAR_Command_Channels(&$ui, &$config)
{
parent::PEAR_Command_Common($ui, $config);
}
function _sortChannels($a, $b)
{
return strnatcasecmp($a->getName(), $b->getName());
}
function doList($command, $options, $params)
{
$reg = &$this->config->getRegistry();
$registered = $reg->getChannels();
usort($registered, array(&$this, '_sortchannels'));
$i = $j = 0;
$data = array(
'caption' => 'Registered Channels:',
'border' => true,
'headline' => array('Channel', 'Alias', 'Summary')
);
foreach ($registered as $channel) {
$data['data'][] = array($channel->getName(),
$channel->getAlias(),
$channel->getSummary());
}
if (count($registered) === 0) {
$data = '(no registered channels)';
}
$this->ui->outputData($data, $command);
return true;
}
function doUpdateAll($command, $options, $params)
{
$reg = &$this->config->getRegistry();
$channels = $reg->getChannels();
$success = true;
foreach ($channels as $channel) {
if ($channel->getName() != '__uri') {
PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN);
$err = $this->doUpdate('channel-update',
$options,
array($channel->getName()));
if (PEAR::isError($err)) {
$this->ui->outputData($err->getMessage(), $command);
$success = false;
} else {
$success &= $err;
}
}
}
return $success;
}
function doInfo($command, $options, $params)
{
if (count($params) !== 1) {
return $this->raiseError("No channel specified");
}
$reg = &$this->config->getRegistry();
$channel = strtolower($params[0]);
if ($reg->channelExists($channel)) {
$chan = $reg->getChannel($channel);
if (PEAR::isError($chan)) {
return $this->raiseError($chan);
}
} else {
if (strpos($channel, '://')) {
$downloader = &$this->getDownloader();
$tmpdir = $this->config->get('temp_dir');
PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN);
$loc = $downloader->downloadHttp($channel, $this->ui, $tmpdir);
PEAR::staticPopErrorHandling();
if (PEAR::isError($loc)) {
return $this->raiseError('Cannot open "' . $channel .
'" (' . $loc->getMessage() . ')');
} else {
$contents = implode('', file($loc));
}
} else {
if (!file_exists($params[0])) {
return $this->raiseError('Unknown channel "' . $channel . '"');
}
$fp = fopen($params[0], 'r');
if (!$fp) {
return $this->raiseError('Cannot open "' . $params[0] . '"');
}
$contents = '';
while (!feof($fp)) {
$contents .= fread($fp, 1024);
}
fclose($fp);
}
if (!class_exists('PEAR_ChannelFile')) {
require_once 'PEAR/ChannelFile.php';
}
$chan = new PEAR_ChannelFile;
$chan->fromXmlString($contents);
$chan->validate();
if ($errs = $chan->getErrors(true)) {
foreach ($errs as $err) {
$this->ui->outputData($err['level'] . ': ' . $err['message']);
}
return $this->raiseError('Channel file "' . $params[0] . '" is not valid');
}
}
if (!$chan) {
return $this->raiseError('Serious error: Channel "' . $params[0] .
'" has a corrupted registry entry');
}
$channel = $chan->getName();
$caption = 'Channel ' . $channel . ' Information:';
$data1 = array(
'caption' => $caption,
'border' => true);
$data1['data']['server'] = array('Name and Server', $chan->getName());
if ($chan->getAlias() != $chan->getName()) {
$data1['data']['alias'] = array('Alias', $chan->getAlias());
}
$data1['data']['summary'] = array('Summary', $chan->getSummary());
$validate = $chan->getValidationPackage();
$data1['data']['vpackage'] = array('Validation Package Name', $validate['_content']);
$data1['data']['vpackageversion'] =
array('Validation Package Version', $validate['attribs']['version']);
$d = array();
$d['main'] = $data1;
$data['data'] = array();
$data['caption'] = 'Server Capabilities';
$data['headline'] = array('Type', 'Version/REST type', 'Function Name/REST base');
if ($chan->supportsREST()) {
if ($chan->supportsREST()) {
$funcs = $chan->getFunctions('rest');
if (!isset($funcs[0])) {
$funcs = array($funcs);
}
foreach ($funcs as $protocol) {
$data['data'][] = array('rest', $protocol['attribs']['type'],
$protocol['_content']);
}
}
} else {
$data['data'][] = array('No supported protocols');
}
$d['protocols'] = $data;
$data['data'] = array();
$mirrors = $chan->getMirrors();
if ($mirrors) {
$data['caption'] = 'Channel ' . $channel . ' Mirrors:';
unset($data['headline']);
foreach ($mirrors as $mirror) {
$data['data'][] = array($mirror['attribs']['host']);
$d['mirrors'] = $data;
}
foreach ($mirrors as $i => $mirror) {
$data['data'] = array();
$data['caption'] = 'Mirror ' . $mirror['attribs']['host'] . ' Capabilities';
$data['headline'] = array('Type', 'Version/REST type', 'Function Name/REST base');
if ($chan->supportsREST($mirror['attribs']['host'])) {
if ($chan->supportsREST($mirror['attribs']['host'])) {
$funcs = $chan->getFunctions('rest', $mirror['attribs']['host']);
if (!isset($funcs[0])) {
$funcs = array($funcs);
}
foreach ($funcs as $protocol) {
$data['data'][] = array('rest', $protocol['attribs']['type'],
$protocol['_content']);
}
}
} else {
$data['data'][] = array('No supported protocols');
}
$d['mirrorprotocols' . $i] = $data;
}
}
$this->ui->outputData($d, 'channel-info');
}
// }}}
function doDelete($command, $options, $params)
{
if (count($params) !== 1) {
return $this->raiseError('channel-delete: no channel specified');
}
$reg = &$this->config->getRegistry();
if (!$reg->channelExists($params[0])) {
return $this->raiseError('channel-delete: channel "' . $params[0] . '" does not exist');
}
$channel = $reg->channelName($params[0]);
if ($channel == 'pear.php.net') {
return $this->raiseError('Cannot delete the pear.php.net channel');
}
if ($channel == 'pecl.php.net') {
return $this->raiseError('Cannot delete the pecl.php.net channel');
}
if ($channel == 'doc.php.net') {
return $this->raiseError('Cannot delete the doc.php.net channel');
}
if ($channel == '__uri') {
return $this->raiseError('Cannot delete the __uri pseudo-channel');
}
if (PEAR::isError($err = $reg->listPackages($channel))) {
return $err;
}
if (count($err)) {
return $this->raiseError('Channel "' . $channel .
'" has installed packages, cannot delete');
}
if (!$reg->deleteChannel($channel)) {
return $this->raiseError('Channel "' . $channel . '" deletion failed');
} else {
$this->config->deleteChannel($channel);
$this->ui->outputData('Channel "' . $channel . '" deleted', $command);
}
}
function doAdd($command, $options, $params)
{
if (count($params) !== 1) {
return $this->raiseError('channel-add: no channel file specified');
}
if (strpos($params[0], '://')) {
$downloader = &$this->getDownloader();
$tmpdir = $this->config->get('temp_dir');
if (!file_exists($tmpdir)) {
require_once 'System.php';
PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN);
$err = System::mkdir(array('-p', $tmpdir));
PEAR::staticPopErrorHandling();
if (PEAR::isError($err)) {
return $this->raiseError('channel-add: temp_dir does not exist: "' .
$tmpdir .
'" - You can change this location with "pear config-set temp_dir"');
}
}
if (!is_writable($tmpdir)) {
return $this->raiseError('channel-add: temp_dir is not writable: "' .
$tmpdir .
'" - You can change this location with "pear config-set temp_dir"');
}
PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN);
$loc = $downloader->downloadHttp($params[0], $this->ui, $tmpdir, null, false);
PEAR::staticPopErrorHandling();
if (PEAR::isError($loc)) {
return $this->raiseError('channel-add: Cannot open "' . $params[0] .
'" (' . $loc->getMessage() . ')');
}
list($loc, $lastmodified) = $loc;
$contents = implode('', file($loc));
} else {
$lastmodified = $fp = false;
if (file_exists($params[0])) {
$fp = fopen($params[0], 'r');
}
if (!$fp) {
return $this->raiseError('channel-add: cannot open "' . $params[0] . '"');
}
$contents = '';
while (!feof($fp)) {
$contents .= fread($fp, 1024);
}
fclose($fp);
}
if (!class_exists('PEAR_ChannelFile')) {
require_once 'PEAR/ChannelFile.php';
}
$channel = new PEAR_ChannelFile;
PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN);
$result = $channel->fromXmlString($contents);
PEAR::staticPopErrorHandling();
if (!$result) {
$exit = false;
if (count($errors = $channel->getErrors(true))) {
foreach ($errors as $error) {
$this->ui->outputData(ucfirst($error['level'] . ': ' . $error['message']));
if (!$exit) {
$exit = $error['level'] == 'error' ? true : false;
}
}
if ($exit) {
return $this->raiseError('channel-add: invalid channel.xml file');
}
}
}
$reg = &$this->config->getRegistry();
if ($reg->channelExists($channel->getName())) {
return $this->raiseError('channel-add: Channel "' . $channel->getName() .
'" exists, use channel-update to update entry', PEAR_COMMAND_CHANNELS_CHANNEL_EXISTS);
}
$ret = $reg->addChannel($channel, $lastmodified);
if (PEAR::isError($ret)) {
return $ret;
}
if (!$ret) {
return $this->raiseError('channel-add: adding Channel "' . $channel->getName() .
'" to registry failed');
}
$this->config->setChannels($reg->listChannels());
$this->config->writeConfigFile();
$this->ui->outputData('Adding Channel "' . $channel->getName() . '" succeeded', $command);
}
function doUpdate($command, $options, $params)
{
if (count($params) !== 1) {
return $this->raiseError("No channel file specified");
}
$tmpdir = $this->config->get('temp_dir');
if (!file_exists($tmpdir)) {
require_once 'System.php';
PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN);
$err = System::mkdir(array('-p', $tmpdir));
PEAR::staticPopErrorHandling();
if (PEAR::isError($err)) {
return $this->raiseError('channel-add: temp_dir does not exist: "' .
$tmpdir .
'" - You can change this location with "pear config-set temp_dir"');
}
}
if (!is_writable($tmpdir)) {
return $this->raiseError('channel-add: temp_dir is not writable: "' .
$tmpdir .
'" - You can change this location with "pear config-set temp_dir"');
}
$reg = &$this->config->getRegistry();
$lastmodified = false;
if ((!file_exists($params[0]) || is_dir($params[0]))
&& $reg->channelExists(strtolower($params[0]))) {
$c = $reg->getChannel(strtolower($params[0]));
if (PEAR::isError($c)) {
return $this->raiseError($c);
}
$this->ui->outputData("Updating channel \"$params[0]\"", $command);
$dl = &$this->getDownloader(array());
// if force is specified, use a timestamp of "1" to force retrieval
$lastmodified = isset($options['force']) ? false : $c->lastModified();
PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN);
$contents = $dl->downloadHttp('http://' . $c->getName() . '/channel.xml',
$this->ui, $tmpdir, null, $lastmodified);
PEAR::staticPopErrorHandling();
if (PEAR::isError($contents)) {
// Attempt to fall back to https
$this->ui->outputData("Channel \"$params[0]\" is not responding over http://, failed with message: " . $contents->getMessage());
$this->ui->outputData("Trying channel \"$params[0]\" over https:// instead");
PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN);
$contents = $dl->downloadHttp('https://' . $c->getName() . '/channel.xml',
$this->ui, $tmpdir, null, $lastmodified);
PEAR::staticPopErrorHandling();
if (PEAR::isError($contents)) {
return $this->raiseError('Cannot retrieve channel.xml for channel "' .
$c->getName() . '" (' . $contents->getMessage() . ')');
}
}
list($contents, $lastmodified) = $contents;
if (!$contents) {
$this->ui->outputData("Channel \"$params[0]\" is up to date");
return;
}
$contents = implode('', file($contents));
if (!class_exists('PEAR_ChannelFile')) {
require_once 'PEAR/ChannelFile.php';
}
$channel = new PEAR_ChannelFile;
$channel->fromXmlString($contents);
if (!$channel->getErrors()) {
// security check: is the downloaded file for the channel we got it from?
if (strtolower($channel->getName()) != strtolower($c->getName())) {
if (!isset($options['force'])) {
return $this->raiseError('ERROR: downloaded channel definition file' .
' for channel "' . $channel->getName() . '" from channel "' .
strtolower($c->getName()) . '"');
}
$this->ui->log(0, 'WARNING: downloaded channel definition file' .
' for channel "' . $channel->getName() . '" from channel "' .
strtolower($c->getName()) . '"');
}
}
} else {
if (strpos($params[0], '://')) {
$dl = &$this->getDownloader();
PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN);
$loc = $dl->downloadHttp($params[0],
$this->ui, $tmpdir, null, $lastmodified);
PEAR::staticPopErrorHandling();
if (PEAR::isError($loc)) {
return $this->raiseError("Cannot open " . $params[0] .
' (' . $loc->getMessage() . ')');
}
list($loc, $lastmodified) = $loc;
$contents = implode('', file($loc));
} else {
$fp = false;
if (file_exists($params[0])) {
$fp = fopen($params[0], 'r');
}
if (!$fp) {
return $this->raiseError("Cannot open " . $params[0]);
}
$contents = '';
while (!feof($fp)) {
$contents .= fread($fp, 1024);
}
fclose($fp);
}
if (!class_exists('PEAR_ChannelFile')) {
require_once 'PEAR/ChannelFile.php';
}
$channel = new PEAR_ChannelFile;
$channel->fromXmlString($contents);
}
$exit = false;
if (count($errors = $channel->getErrors(true))) {
foreach ($errors as $error) {
$this->ui->outputData(ucfirst($error['level'] . ': ' . $error['message']));
if (!$exit) {
$exit = $error['level'] == 'error' ? true : false;
}
}
if ($exit) {
return $this->raiseError('Invalid channel.xml file');
}
}
if (!$reg->channelExists($channel->getName())) {
return $this->raiseError('Error: Channel "' . $channel->getName() .
'" does not exist, use channel-add to add an entry');
}
$ret = $reg->updateChannel($channel, $lastmodified);
if (PEAR::isError($ret)) {
return $ret;
}
if (!$ret) {
return $this->raiseError('Updating Channel "' . $channel->getName() .
'" in registry failed');
}
$this->config->setChannels($reg->listChannels());
$this->config->writeConfigFile();
$this->ui->outputData('Update of Channel "' . $channel->getName() . '" succeeded');
}
function &getDownloader()
{
if (!class_exists('PEAR_Downloader')) {
require_once 'PEAR/Downloader.php';
}
$a = new PEAR_Downloader($this->ui, array(), $this->config);
return $a;
}
function doAlias($command, $options, $params)
{
if (count($params) === 1) {
return $this->raiseError('No channel alias specified');
}
if (count($params) !== 2 || (!empty($params[1]) && $params[1]{0} == '-')) {
return $this->raiseError(
'Invalid format, correct is: channel-alias channel alias');
}
$reg = &$this->config->getRegistry();
if (!$reg->channelExists($params[0], true)) {
$extra = '';
if ($reg->isAlias($params[0])) {
$extra = ' (use "channel-alias ' . $reg->channelName($params[0]) . ' ' .
strtolower($params[1]) . '")';
}
return $this->raiseError('"' . $params[0] . '" is not a valid channel' . $extra);
}
if ($reg->isAlias($params[1])) {
return $this->raiseError('Channel "' . $reg->channelName($params[1]) . '" is ' .
'already aliased to "' . strtolower($params[1]) . '", cannot re-alias');
}
$chan = &$reg->getChannel($params[0]);
if (PEAR::isError($chan)) {
return $this->raiseError('Corrupt registry? Error retrieving channel "' . $params[0] .
'" information (' . $chan->getMessage() . ')');
}
// make it a local alias
if (!$chan->setAlias(strtolower($params[1]), true)) {
return $this->raiseError('Alias "' . strtolower($params[1]) .
'" is not a valid channel alias');
}
$reg->updateChannel($chan);
$this->ui->outputData('Channel "' . $chan->getName() . '" aliased successfully to "' .
strtolower($params[1]) . '"');
}
/**
* The channel-discover command
*
* @param string $command command name
* @param array $options option_name => value
* @param array $params list of additional parameters.
* $params[0] should contain a string with either:
* - <channel name> or
* - <username>:<password>@<channel name>
* @return null|PEAR_Error
*/
function doDiscover($command, $options, $params)
{
if (count($params) !== 1) {
return $this->raiseError("No channel server specified");
}
// Look for the possible input format "<username>:<password>@<channel>"
if (preg_match('/^(.+):(.+)@(.+)\\z/', $params[0], $matches)) {
$username = $matches[1];
$password = $matches[2];
$channel = $matches[3];
} else {
$channel = $params[0];
}
$reg = &$this->config->getRegistry();
if ($reg->channelExists($channel)) {
if (!$reg->isAlias($channel)) {
return $this->raiseError("Channel \"$channel\" is already initialized", PEAR_COMMAND_CHANNELS_CHANNEL_EXISTS);
}
return $this->raiseError("A channel alias named \"$channel\" " .
'already exists, aliasing channel "' . $reg->channelName($channel)
. '"');
}
$this->pushErrorHandling(PEAR_ERROR_RETURN);
$err = $this->doAdd($command, $options, array('http://' . $channel . '/channel.xml'));
$this->popErrorHandling();
if (PEAR::isError($err)) {
if ($err->getCode() === PEAR_COMMAND_CHANNELS_CHANNEL_EXISTS) {
return $this->raiseError("Discovery of channel \"$channel\" failed (" .
$err->getMessage() . ')');
}
// Attempt fetch via https
$this->ui->outputData("Discovering channel $channel over http:// failed with message: " . $err->getMessage());
$this->ui->outputData("Trying to discover channel $channel over https:// instead");
$this->pushErrorHandling(PEAR_ERROR_RETURN);
$err = $this->doAdd($command, $options, array('https://' . $channel . '/channel.xml'));
$this->popErrorHandling();
if (PEAR::isError($err)) {
return $this->raiseError("Discovery of channel \"$channel\" failed (" .
$err->getMessage() . ')');
}
}
// Store username/password if they were given
// Arguably we should do a logintest on the channel here, but since
// that's awkward on a REST-based channel (even "pear login" doesn't
// do it for those), and XML-RPC is deprecated, it's fairly pointless.
if (isset($username)) {
$this->config->set('username', $username, 'user', $channel);
$this->config->set('password', $password, 'user', $channel);
$this->config->store();
$this->ui->outputData("Stored login for channel \"$channel\" using username \"$username\"", $command);
}
$this->ui->outputData("Discovery of channel \"$channel\" succeeded", $command);
}
/**
* Execute the 'login' command.
*
* @param string $command command name
* @param array $options option_name => value
* @param array $params list of additional parameters
*
* @return bool TRUE on success or
* a PEAR error on failure
*
* @access public
*/
function doLogin($command, $options, $params)
{
$reg = &$this->config->getRegistry();
// If a parameter is supplied, use that as the channel to log in to
$channel = isset($params[0]) ? $params[0] : $this->config->get('default_channel');
$chan = $reg->getChannel($channel);
if (PEAR::isError($chan)) {
return $this->raiseError($chan);
}
$server = $this->config->get('preferred_mirror', null, $channel);
$username = $this->config->get('username', null, $channel);
if (empty($username)) {
$username = isset($_ENV['USER']) ? $_ENV['USER'] : null;
}
$this->ui->outputData("Logging in to $server.", $command);
list($username, $password) = $this->ui->userDialog(
$command,
array('Username', 'Password'),
array('text', 'password'),
array($username, '')
);
$username = trim($username);
$password = trim($password);
$ourfile = $this->config->getConfFile('user');
if (!$ourfile) {
$ourfile = $this->config->getConfFile('system');
}
$this->config->set('username', $username, 'user', $channel);
$this->config->set('password', $password, 'user', $channel);
if ($chan->supportsREST()) {
$ok = true;
}
if ($ok !== true) {
return $this->raiseError('Login failed!');
}
$this->ui->outputData("Logged in.", $command);
// avoid changing any temporary settings changed with -d
$ourconfig = new PEAR_Config($ourfile, $ourfile);
$ourconfig->set('username', $username, 'user', $channel);
$ourconfig->set('password', $password, 'user', $channel);
$ourconfig->store();
return true;
}
/**
* Execute the 'logout' command.
*
* @param string $command command name
* @param array $options option_name => value
* @param array $params list of additional parameters
*
* @return bool TRUE on success or
* a PEAR error on failure
*
* @access public
*/
function doLogout($command, $options, $params)
{
$reg = &$this->config->getRegistry();
// If a parameter is supplied, use that as the channel to log in to
$channel = isset($params[0]) ? $params[0] : $this->config->get('default_channel');
$chan = $reg->getChannel($channel);
if (PEAR::isError($chan)) {
return $this->raiseError($chan);
}
$server = $this->config->get('preferred_mirror', null, $channel);
$this->ui->outputData("Logging out from $server.", $command);
$this->config->remove('username', 'user', $channel);
$this->config->remove('password', 'user', $channel);
$this->config->store();
return true;
}
}
+123
View File
@@ -0,0 +1,123 @@
<commands version="1.0">
<list-channels>
<summary>List Available Channels</summary>
<function>doList</function>
<shortcut>lc</shortcut>
<options />
<doc>
List all available channels for installation.
</doc>
</list-channels>
<update-channels>
<summary>Update the Channel List</summary>
<function>doUpdateAll</function>
<shortcut>uc</shortcut>
<options />
<doc>
List all installed packages in all channels.
</doc>
</update-channels>
<channel-delete>
<summary>Remove a Channel From the List</summary>
<function>doDelete</function>
<shortcut>cde</shortcut>
<options />
<doc>&lt;channel name&gt;
Delete a channel from the registry. You may not
remove any channel that has installed packages.
</doc>
</channel-delete>
<channel-add>
<summary>Add a Channel</summary>
<function>doAdd</function>
<shortcut>ca</shortcut>
<options />
<doc>&lt;channel.xml&gt;
Add a private channel to the channel list. Note that all
public channels should be synced using &quot;update-channels&quot;.
Parameter may be either a local file or remote URL to a
channel.xml.
</doc>
</channel-add>
<channel-update>
<summary>Update an Existing Channel</summary>
<function>doUpdate</function>
<shortcut>cu</shortcut>
<options>
<force>
<shortopt>f</shortopt>
<doc>will force download of new channel.xml if an existing channel name is used</doc>
</force>
<channel>
<shortopt>c</shortopt>
<doc>will force download of new channel.xml if an existing channel name is used</doc>
<arg>CHANNEL</arg>
</channel>
</options>
<doc>[&lt;channel.xml&gt;|&lt;channel name&gt;]
Update a channel in the channel list directly. Note that all
public channels can be synced using &quot;update-channels&quot;.
Parameter may be a local or remote channel.xml, or the name of
an existing channel.
</doc>
</channel-update>
<channel-info>
<summary>Retrieve Information on a Channel</summary>
<function>doInfo</function>
<shortcut>ci</shortcut>
<options />
<doc>&lt;package&gt;
List the files in an installed package.
</doc>
</channel-info>
<channel-alias>
<summary>Specify an alias to a channel name</summary>
<function>doAlias</function>
<shortcut>cha</shortcut>
<options />
<doc>&lt;channel&gt; &lt;alias&gt;
Specify a specific alias to use for a channel name.
The alias may not be an existing channel name or
alias.
</doc>
</channel-alias>
<channel-discover>
<summary>Initialize a Channel from its server</summary>
<function>doDiscover</function>
<shortcut>di</shortcut>
<options />
<doc>[&lt;channel.xml&gt;|&lt;channel name&gt;]
Initialize a channel from its server and create a local channel.xml.
If &lt;channel name&gt; is in the format &quot;&lt;username&gt;:&lt;password&gt;@&lt;channel&gt;&quot; then
&lt;username&gt; and &lt;password&gt; will be set as the login username/password for
&lt;channel&gt;. Use caution when passing the username/password in this way, as
it may allow other users on your computer to briefly view your username/
password via the system&#039;s process list.
</doc>
</channel-discover>
<channel-login>
<summary>Connects and authenticates to remote channel server</summary>
<function>doLogin</function>
<shortcut>cli</shortcut>
<options />
<doc>&lt;channel name&gt;
Log in to a remote channel server. If &lt;channel name&gt; is not supplied,
the default channel is used. To use remote functions in the installer
that require any kind of privileges, you need to log in first. The
username and password you enter here will be stored in your per-user
PEAR configuration (~/.pearrc on Unix-like systems). After logging
in, your username and password will be sent along in subsequent
operations on the remote server.</doc>
</channel-login>
<channel-logout>
<summary>Logs out from the remote channel server</summary>
<function>doLogout</function>
<shortcut>clo</shortcut>
<options />
<doc>&lt;channel name&gt;
Logs out from a remote channel server. If &lt;channel name&gt; is not supplied,
the default channel is used. This command does not actually connect to the
remote server, it only deletes the stored username and password from your user
configuration.</doc>
</channel-logout>
</commands>
+95 -71
View File
@@ -1,36 +1,52 @@
<?php
//
// +----------------------------------------------------------------------+
// | PHP Version 5 |
// +----------------------------------------------------------------------+
// | Copyright (c) 1997-2004 The PHP Group |
// +----------------------------------------------------------------------+
// | This source file is subject to version 3.0 of the PHP license, |
// | that is bundled with this package in the file LICENSE, and is |
// | available through the world-wide-web at the following url: |
// | http://www.php.net/license/3_0.txt. |
// | If you did not receive a copy of the PHP license and are unable to |
// | obtain it through the world-wide-web, please send a note to |
// | license@php.net so we can mail you a copy immediately. |
// +----------------------------------------------------------------------+
// | Author: Stig Sæther Bakken <ssb@php.net> |
// +----------------------------------------------------------------------+
//
// $Id: Common.php,v 1.24 2004/01/08 17:33:13 sniper Exp $
/**
* PEAR_Command_Common base class
*
* PHP versions 4 and 5
*
* @category pear
* @package PEAR
* @author Stig Bakken <ssb@php.net>
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
* @version CVS: $Id: Common.php 313023 2011-07-06 19:17:11Z dufuz $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 0.1
*/
require_once "PEAR.php";
/**
* base class
*/
require_once 'PEAR.php';
/**
* PEAR commands base class
*
* @category pear
* @package PEAR
* @author Stig Bakken <ssb@php.net>
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
* @version Release: 1.9.4
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 0.1
*/
class PEAR_Command_Common extends PEAR
{
// {{{ properties
/**
* PEAR_Config object used to pass user system and configuration
* on when executing commands
*
* @var object
* @var PEAR_Config
*/
var $config;
/**
* @var PEAR_Registry
* @access protected
*/
var $_registry;
/**
* User Interface object, for all interaction with the user.
@@ -50,7 +66,7 @@ class PEAR_Command_Common extends PEAR
var $_deps_type_trans = array(
'pkg' => 'package',
'extension' => 'extension',
'ext' => 'extension',
'php' => 'PHP',
'prog' => 'external program',
'ldlib' => 'external library for linking',
@@ -60,9 +76,6 @@ class PEAR_Command_Common extends PEAR
'sapi' => 'SAPI backend'
);
// }}}
// {{{ constructor
/**
* PEAR_Command_Common constructor.
*
@@ -75,10 +88,6 @@ class PEAR_Command_Common extends PEAR
$this->ui = &$ui;
}
// }}}
// {{{ getCommands()
/**
* Return a list of all the commands defined by this class.
* @return array list of commands
@@ -90,12 +99,10 @@ class PEAR_Command_Common extends PEAR
foreach (array_keys($this->commands) as $command) {
$ret[$command] = $this->commands[$command]['summary'];
}
return $ret;
}
// }}}
// {{{ getShortcuts()
/**
* Return a list of all the command shortcuts defined by this class.
* @return array shortcut => command
@@ -109,28 +116,34 @@ class PEAR_Command_Common extends PEAR
$ret[$this->commands[$command]['shortcut']] = $command;
}
}
return $ret;
}
// }}}
// {{{ getOptions()
function getOptions($command)
{
return @$this->commands[$command]['options'];
}
$shortcuts = $this->getShortcuts();
if (isset($shortcuts[$command])) {
$command = $shortcuts[$command];
}
// }}}
// {{{ getGetoptArgs()
if (isset($this->commands[$command]) &&
isset($this->commands[$command]['options'])) {
return $this->commands[$command]['options'];
}
return null;
}
function getGetoptArgs($command, &$short_args, &$long_args)
{
$short_args = "";
$short_args = '';
$long_args = array();
if (empty($this->commands[$command])) {
if (empty($this->commands[$command]) || empty($this->commands[$command]['options'])) {
return;
}
reset($this->commands[$command]);
reset($this->commands[$command]['options']);
while (list($option, $info) = each($this->commands[$command]['options'])) {
$larg = $sarg = '';
if (isset($info['arg'])) {
@@ -144,15 +157,15 @@ class PEAR_Command_Common extends PEAR
$arg = $info['arg'];
}
}
if (isset($info['shortopt'])) {
$short_args .= $info['shortopt'] . $sarg;
}
$long_args[] = $option . $larg;
}
}
// }}}
// {{{ getHelp()
/**
* Returns the help message for the given command
*
@@ -164,29 +177,38 @@ class PEAR_Command_Common extends PEAR
function getHelp($command)
{
$config = &PEAR_Config::singleton();
$help = @$this->commands[$command]['doc'];
if (!isset($this->commands[$command])) {
return "No such command \"$command\"";
}
$help = null;
if (isset($this->commands[$command]['doc'])) {
$help = $this->commands[$command]['doc'];
}
if (empty($help)) {
// XXX (cox) Fallback to summary if there is no doc (show both?)
if (!$help = @$this->commands[$command]['summary']) {
if (!isset($this->commands[$command]['summary'])) {
return "No help for command \"$command\"";
}
$help = $this->commands[$command]['summary'];
}
if (preg_match_all('/{config\s+([^\}]+)}/e', $help, $matches)) {
foreach($matches[0] as $k => $v) {
$help = preg_replace("/$v/", $config->get($matches[1][$k]), $help);
}
}
return array($help, $this->getHelpArgs($command));
}
// }}}
// {{{ getHelpArgs()
/**
* Returns the help for the accepted arguments of a command
*
* @param string $command
* @return string The help string
*/
* Returns the help for the accepted arguments of a command
*
* @param string $command
* @return string The help string
*/
function getHelpArgs($command)
{
if (isset($this->commands[$command]['options']) &&
@@ -195,7 +217,7 @@ class PEAR_Command_Common extends PEAR
$help = "Options:\n";
foreach ($this->commands[$command]['options'] as $k => $v) {
if (isset($v['arg'])) {
if ($v['arg']{0} == '(') {
if ($v['arg'][0] == '(') {
$arg = substr($v['arg'], 1, -1);
$sapp = " [$arg]";
$lapp = "[=$arg]";
@@ -206,44 +228,46 @@ class PEAR_Command_Common extends PEAR
} else {
$sapp = $lapp = "";
}
if (isset($v['shortopt'])) {
$s = $v['shortopt'];
@$help .= " -$s$sapp, --$k$lapp\n";
$help .= " -$s$sapp, --$k$lapp\n";
} else {
@$help .= " --$k$lapp\n";
$help .= " --$k$lapp\n";
}
$p = " ";
$doc = rtrim(str_replace("\n", "\n$p", $v['doc']));
$help .= " $doc\n";
}
return $help;
}
return null;
}
// }}}
// {{{ run()
function run($command, $options, $params)
{
$func = @$this->commands[$command]['function'];
if (empty($func)) {
if (empty($this->commands[$command]['function'])) {
// look for shortcuts
foreach (array_keys($this->commands) as $cmd) {
if (@$this->commands[$cmd]['shortcut'] == $command) {
$command = $cmd;
$func = @$this->commands[$command]['function'];
if (empty($func)) {
if (isset($this->commands[$cmd]['shortcut']) && $this->commands[$cmd]['shortcut'] == $command) {
if (empty($this->commands[$cmd]['function'])) {
return $this->raiseError("unknown command `$command'");
} else {
$func = $this->commands[$cmd]['function'];
}
$command = $cmd;
//$command = $this->commands[$cmd]['function'];
break;
}
}
} else {
$func = $this->commands[$command]['function'];
}
return $this->$func($command, $options, $params);
}
// }}}
}
?>
}
+266 -77
View File
@@ -1,74 +1,101 @@
<?php
//
// +----------------------------------------------------------------------+
// | PHP Version 5 |
// +----------------------------------------------------------------------+
// | Copyright (c) 1997-2004 The PHP Group |
// +----------------------------------------------------------------------+
// | This source file is subject to version 3.0 of the PHP license, |
// | that is bundled with this package in the file LICENSE, and is |
// | available through the world-wide-web at the following url: |
// | http://www.php.net/license/3_0.txt. |
// | If you did not receive a copy of the PHP license and are unable to |
// | obtain it through the world-wide-web, please send a note to |
// | license@php.net so we can mail you a copy immediately. |
// +----------------------------------------------------------------------+
// | Author: Stig Bakken <ssb@php.net> |
// | Tomas V.V.Cox <cox@idecnet.com> |
// | |
// +----------------------------------------------------------------------+
//
// $Id: Config.php,v 1.27 2004/06/15 16:48:49 pajoye Exp $
/**
* PEAR_Command_Config (config-show, config-get, config-set, config-help, config-create commands)
*
* PHP versions 4 and 5
*
* @category pear
* @package PEAR
* @author Stig Bakken <ssb@php.net>
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
* @version CVS: $Id: Config.php 313024 2011-07-06 19:51:24Z dufuz $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 0.1
*/
require_once "PEAR/Command/Common.php";
require_once "PEAR/Config.php";
/**
* base class
*/
require_once 'PEAR/Command/Common.php';
/**
* PEAR commands for managing configuration data.
*
* @category pear
* @package PEAR
* @author Stig Bakken <ssb@php.net>
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
* @version Release: 1.9.4
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 0.1
*/
class PEAR_Command_Config extends PEAR_Command_Common
{
// {{{ properties
var $commands = array(
'config-show' => array(
'summary' => 'Show All Settings',
'function' => 'doConfigShow',
'shortcut' => 'csh',
'options' => array(),
'doc' => '
'options' => array(
'channel' => array(
'shortopt' => 'c',
'doc' => 'show configuration variables for another channel',
'arg' => 'CHAN',
),
),
'doc' => '[layer]
Displays all configuration values. An optional argument
may be used to tell which configuration layer to display. Valid
configuration layers are "user", "system" and "default".
configuration layers are "user", "system" and "default". To display
configurations for different channels, set the default_channel
configuration variable and run config-show again.
',
),
'config-get' => array(
'summary' => 'Show One Setting',
'function' => 'doConfigGet',
'shortcut' => 'cg',
'options' => array(),
'options' => array(
'channel' => array(
'shortopt' => 'c',
'doc' => 'show configuration variables for another channel',
'arg' => 'CHAN',
),
),
'doc' => '<parameter> [layer]
Displays the value of one configuration parameter. The
first argument is the name of the parameter, an optional second argument
may be used to tell which configuration layer to look in. Valid configuration
layers are "user", "system" and "default". If no layer is specified, a value
will be picked from the first layer that defines the parameter, in the order
just specified.
just specified. The configuration value will be retrieved for the channel
specified by the default_channel configuration variable.
',
),
'config-set' => array(
'summary' => 'Change Setting',
'function' => 'doConfigSet',
'shortcut' => 'cs',
'options' => array(),
'options' => array(
'channel' => array(
'shortopt' => 'c',
'doc' => 'show configuration variables for another channel',
'arg' => 'CHAN',
),
),
'doc' => '<parameter> <value> [layer]
Sets the value of one configuration parameter. The first argument is
the name of the parameter, the second argument is the new value. Some
parameters are subject to validation, and the command will fail with
an error message if the new value does not make sense. An optional
third argument may be used to specify in which layer to set the
configuration parameter. The default layer is "user".
configuration parameter. The default layer is "user". The
configuration value will be set for the current channel, which
is controlled by the default_channel configuration variable.
',
),
'config-help' => array(
@@ -81,11 +108,26 @@ Displays help for a configuration parameter. Without arguments it
displays help for all configuration parameters.
',
),
'config-create' => array(
'summary' => 'Create a Default configuration file',
'function' => 'doConfigCreate',
'shortcut' => 'coc',
'options' => array(
'windows' => array(
'shortopt' => 'w',
'doc' => 'create a config file for a windows install',
),
),
'doc' => '<root path> <filename>
Create a default configuration file with all directory configuration
variables set to subdirectories of <root path>, and save it as <filename>.
This is useful especially for creating a configuration file for a remote
PEAR installation (using the --remoteconfig option of install, upgrade,
and uninstall).
',
),
);
// }}}
// {{{ constructor
/**
* PEAR_Command_Config constructor.
*
@@ -96,94 +138,154 @@ displays help for all configuration parameters.
parent::PEAR_Command_Common($ui, $config);
}
// }}}
// {{{ doConfigShow()
function doConfigShow($command, $options, $params)
{
// $params[0] -> the layer
if ($error = $this->_checkLayer(@$params[0])) {
return $this->raiseError($error);
$layer = null;
if (is_array($params)) {
$layer = isset($params[0]) ? $params[0] : null;
}
// $params[0] -> the layer
if ($error = $this->_checkLayer($layer)) {
return $this->raiseError("config-show:$error");
}
$keys = $this->config->getKeys();
sort($keys);
$data = array('caption' => 'Configuration:');
$channel = isset($options['channel']) ? $options['channel'] :
$this->config->get('default_channel');
$reg = &$this->config->getRegistry();
if (!$reg->channelExists($channel)) {
return $this->raiseError('Channel "' . $channel . '" does not exist');
}
$channel = $reg->channelName($channel);
$data = array('caption' => 'Configuration (channel ' . $channel . '):');
foreach ($keys as $key) {
$type = $this->config->getType($key);
$value = $this->config->get($key, @$params[0]);
$value = $this->config->get($key, $layer, $channel);
if ($type == 'password' && $value) {
$value = '********';
}
if ($value === false) {
$value = 'false';
} elseif ($value === true) {
$value = 'true';
}
$data['data'][$this->config->getGroup($key)][] = array($this->config->getPrompt($key) , $key, $value);
}
foreach ($this->config->getLayers() as $layer) {
$data['data']['Config Files'][] = array(ucfirst($layer) . ' Configuration File', 'Filename' , $this->config->getConfFile($layer));
}
$this->ui->outputData($data, $command);
return true;
}
// }}}
// {{{ doConfigGet()
function doConfigGet($command, $options, $params)
{
// $params[0] -> the parameter
// $params[1] -> the layer
if ($error = $this->_checkLayer(@$params[1])) {
return $this->raiseError($error);
$args_cnt = is_array($params) ? count($params) : 0;
switch ($args_cnt) {
case 1:
$config_key = $params[0];
$layer = null;
break;
case 2:
$config_key = $params[0];
$layer = $params[1];
if ($error = $this->_checkLayer($layer)) {
return $this->raiseError("config-get:$error");
}
break;
case 0:
default:
return $this->raiseError("config-get expects 1 or 2 parameters");
}
if (sizeof($params) < 1 || sizeof($params) > 2) {
return $this->raiseError("config-get expects 1 or 2 parameters");
} elseif (sizeof($params) == 1) {
$this->ui->outputData($this->config->get($params[0]), $command);
} else {
$data = $this->config->get($params[0], $params[1]);
$this->ui->outputData($data, $command);
$reg = &$this->config->getRegistry();
$channel = isset($options['channel']) ? $options['channel'] : $this->config->get('default_channel');
if (!$reg->channelExists($channel)) {
return $this->raiseError('Channel "' . $channel . '" does not exist');
}
$channel = $reg->channelName($channel);
$this->ui->outputData($this->config->get($config_key, $layer, $channel), $command);
return true;
}
// }}}
// {{{ doConfigSet()
function doConfigSet($command, $options, $params)
{
// $param[0] -> a parameter to set
// $param[1] -> the value for the parameter
// $param[2] -> the layer
$failmsg = '';
if (sizeof($params) < 2 || sizeof($params) > 3) {
if (count($params) < 2 || count($params) > 3) {
$failmsg .= "config-set expects 2 or 3 parameters";
return PEAR::raiseError($failmsg);
}
if ($error = $this->_checkLayer(@$params[2])) {
if (isset($params[2]) && ($error = $this->_checkLayer($params[2]))) {
$failmsg .= $error;
return PEAR::raiseError($failmsg);
return PEAR::raiseError("config-set:$failmsg");
}
if (!call_user_func_array(array(&$this->config, 'set'), $params))
{
$failmsg = "config-set (" . implode(", ", $params) . ") failed";
$channel = isset($options['channel']) ? $options['channel'] : $this->config->get('default_channel');
$reg = &$this->config->getRegistry();
if (!$reg->channelExists($channel)) {
return $this->raiseError('Channel "' . $channel . '" does not exist');
}
$channel = $reg->channelName($channel);
if ($params[0] == 'default_channel' && !$reg->channelExists($params[1])) {
return $this->raiseError('Channel "' . $params[1] . '" does not exist');
}
if ($params[0] == 'preferred_mirror'
&& (
!$reg->mirrorExists($channel, $params[1]) &&
(!$reg->channelExists($params[1]) || $channel != $params[1])
)
) {
$msg = 'Channel Mirror "' . $params[1] . '" does not exist';
$msg .= ' in your registry for channel "' . $channel . '".';
$msg .= "\n" . 'Attempt to run "pear channel-update ' . $channel .'"';
$msg .= ' if you believe this mirror should exist as you may';
$msg .= ' have outdated channel information.';
return $this->raiseError($msg);
}
if (count($params) == 2) {
array_push($params, 'user');
$layer = 'user';
} else {
$this->config->store();
$layer = $params[2];
}
array_push($params, $channel);
if (!call_user_func_array(array(&$this->config, 'set'), $params)) {
array_pop($params);
$failmsg = "config-set (" . implode(", ", $params) . ") failed, channel $channel";
} else {
$this->config->store($layer);
}
if ($failmsg) {
return $this->raiseError($failmsg);
}
$this->ui->outputData('config-set succeeded', $command);
return true;
}
// }}}
// {{{ doConfigHelp()
function doConfigHelp($command, $options, $params)
{
if (empty($params)) {
$params = $this->config->getKeys();
}
$data['caption'] = "Config help" . ((count($params) == 1) ? " for $params[0]" : '');
$data['headline'] = array('Name', 'Type', 'Description');
$data['border'] = true;
@@ -194,13 +296,103 @@ displays help for all configuration parameters.
$docs = rtrim($docs) . "\nValid set: " .
implode(' ', $this->config->getSetValues($name));
}
$data['data'][] = array($name, $type, $docs);
}
$this->ui->outputData($data, $command);
}
// }}}
// {{{ _checkLayer()
function doConfigCreate($command, $options, $params)
{
if (count($params) != 2) {
return PEAR::raiseError('config-create: must have 2 parameters, root path and ' .
'filename to save as');
}
$root = $params[0];
// Clean up the DIRECTORY_SEPARATOR mess
$ds2 = DIRECTORY_SEPARATOR . DIRECTORY_SEPARATOR;
$root = preg_replace(array('!\\\\+!', '!/+!', "!$ds2+!"),
array('/', '/', '/'),
$root);
if ($root{0} != '/') {
if (!isset($options['windows'])) {
return PEAR::raiseError('Root directory must be an absolute path beginning ' .
'with "/", was: "' . $root . '"');
}
if (!preg_match('/^[A-Za-z]:/', $root)) {
return PEAR::raiseError('Root directory must be an absolute path beginning ' .
'with "\\" or "C:\\", was: "' . $root . '"');
}
}
$windows = isset($options['windows']);
if ($windows) {
$root = str_replace('/', '\\', $root);
}
if (!file_exists($params[1]) && !@touch($params[1])) {
return PEAR::raiseError('Could not create "' . $params[1] . '"');
}
$params[1] = realpath($params[1]);
$config = &new PEAR_Config($params[1], '#no#system#config#', false, false);
if ($root{strlen($root) - 1} == '/') {
$root = substr($root, 0, strlen($root) - 1);
}
$config->noRegistry();
$config->set('php_dir', $windows ? "$root\\pear\\php" : "$root/pear/php", 'user');
$config->set('data_dir', $windows ? "$root\\pear\\data" : "$root/pear/data");
$config->set('www_dir', $windows ? "$root\\pear\\www" : "$root/pear/www");
$config->set('cfg_dir', $windows ? "$root\\pear\\cfg" : "$root/pear/cfg");
$config->set('ext_dir', $windows ? "$root\\pear\\ext" : "$root/pear/ext");
$config->set('doc_dir', $windows ? "$root\\pear\\docs" : "$root/pear/docs");
$config->set('test_dir', $windows ? "$root\\pear\\tests" : "$root/pear/tests");
$config->set('cache_dir', $windows ? "$root\\pear\\cache" : "$root/pear/cache");
$config->set('download_dir', $windows ? "$root\\pear\\download" : "$root/pear/download");
$config->set('temp_dir', $windows ? "$root\\pear\\temp" : "$root/pear/temp");
$config->set('bin_dir', $windows ? "$root\\pear" : "$root/pear");
$config->writeConfigFile();
$this->_showConfig($config);
$this->ui->outputData('Successfully created default configuration file "' . $params[1] . '"',
$command);
}
function _showConfig(&$config)
{
$params = array('user');
$keys = $config->getKeys();
sort($keys);
$channel = 'pear.php.net';
$data = array('caption' => 'Configuration (channel ' . $channel . '):');
foreach ($keys as $key) {
$type = $config->getType($key);
$value = $config->get($key, 'user', $channel);
if ($type == 'password' && $value) {
$value = '********';
}
if ($value === false) {
$value = 'false';
} elseif ($value === true) {
$value = 'true';
}
$data['data'][$config->getGroup($key)][] =
array($config->getPrompt($key) , $key, $value);
}
foreach ($config->getLayers() as $layer) {
$data['data']['Config Files'][] =
array(ucfirst($layer) . ' Configuration File', 'Filename' ,
$config->getConfFile($layer));
}
$this->ui->outputData($data, 'config-show');
return true;
}
/**
* Checks if a layer is defined or not
@@ -216,10 +408,7 @@ displays help for all configuration parameters.
return " only the layers: \"" . implode('" or "', $layers) . "\" are supported";
}
}
return false;
}
// }}}
}
?>
}
+92
View File
@@ -0,0 +1,92 @@
<commands version="1.0">
<config-show>
<summary>Show All Settings</summary>
<function>doConfigShow</function>
<shortcut>csh</shortcut>
<options>
<channel>
<shortopt>c</shortopt>
<doc>show configuration variables for another channel</doc>
<arg>CHAN</arg>
</channel>
</options>
<doc>[layer]
Displays all configuration values. An optional argument
may be used to tell which configuration layer to display. Valid
configuration layers are &quot;user&quot;, &quot;system&quot; and &quot;default&quot;. To display
configurations for different channels, set the default_channel
configuration variable and run config-show again.
</doc>
</config-show>
<config-get>
<summary>Show One Setting</summary>
<function>doConfigGet</function>
<shortcut>cg</shortcut>
<options>
<channel>
<shortopt>c</shortopt>
<doc>show configuration variables for another channel</doc>
<arg>CHAN</arg>
</channel>
</options>
<doc>&lt;parameter&gt; [layer]
Displays the value of one configuration parameter. The
first argument is the name of the parameter, an optional second argument
may be used to tell which configuration layer to look in. Valid configuration
layers are &quot;user&quot;, &quot;system&quot; and &quot;default&quot;. If no layer is specified, a value
will be picked from the first layer that defines the parameter, in the order
just specified. The configuration value will be retrieved for the channel
specified by the default_channel configuration variable.
</doc>
</config-get>
<config-set>
<summary>Change Setting</summary>
<function>doConfigSet</function>
<shortcut>cs</shortcut>
<options>
<channel>
<shortopt>c</shortopt>
<doc>show configuration variables for another channel</doc>
<arg>CHAN</arg>
</channel>
</options>
<doc>&lt;parameter&gt; &lt;value&gt; [layer]
Sets the value of one configuration parameter. The first argument is
the name of the parameter, the second argument is the new value. Some
parameters are subject to validation, and the command will fail with
an error message if the new value does not make sense. An optional
third argument may be used to specify in which layer to set the
configuration parameter. The default layer is &quot;user&quot;. The
configuration value will be set for the current channel, which
is controlled by the default_channel configuration variable.
</doc>
</config-set>
<config-help>
<summary>Show Information About Setting</summary>
<function>doConfigHelp</function>
<shortcut>ch</shortcut>
<options />
<doc>[parameter]
Displays help for a configuration parameter. Without arguments it
displays help for all configuration parameters.
</doc>
</config-help>
<config-create>
<summary>Create a Default configuration file</summary>
<function>doConfigCreate</function>
<shortcut>coc</shortcut>
<options>
<windows>
<shortopt>w</shortopt>
<doc>create a config file for a windows install</doc>
</windows>
</options>
<doc>&lt;root path&gt; &lt;filename&gt;
Create a default configuration file with all directory configuration
variables set to subdirectories of &lt;root path&gt;, and save it as &lt;filename&gt;.
This is useful especially for creating a configuration file for a remote
PEAR installation (using the --remoteconfig option of install, upgrade,
and uninstall).
</doc>
</config-create>
</commands>
+970 -172
View File
File diff suppressed because it is too large Load Diff
+276
View File
@@ -0,0 +1,276 @@
<commands version="1.0">
<install>
<summary>Install Package</summary>
<function>doInstall</function>
<shortcut>i</shortcut>
<options>
<force>
<shortopt>f</shortopt>
<doc>will overwrite newer installed packages</doc>
</force>
<loose>
<shortopt>l</shortopt>
<doc>do not check for recommended dependency version</doc>
</loose>
<nodeps>
<shortopt>n</shortopt>
<doc>ignore dependencies, install anyway</doc>
</nodeps>
<register-only>
<shortopt>r</shortopt>
<doc>do not install files, only register the package as installed</doc>
</register-only>
<soft>
<shortopt>s</shortopt>
<doc>soft install, fail silently, or upgrade if already installed</doc>
</soft>
<nobuild>
<shortopt>B</shortopt>
<doc>don&#039;t build C extensions</doc>
</nobuild>
<nocompress>
<shortopt>Z</shortopt>
<doc>request uncompressed files when downloading</doc>
</nocompress>
<installroot>
<shortopt>R</shortopt>
<doc>root directory used when installing files (ala PHP&#039;s INSTALL_ROOT), use packagingroot for RPM</doc>
<arg>DIR</arg>
</installroot>
<packagingroot>
<shortopt>P</shortopt>
<doc>root directory used when packaging files, like RPM packaging</doc>
<arg>DIR</arg>
</packagingroot>
<ignore-errors>
<shortopt></shortopt>
<doc>force install even if there were errors</doc>
</ignore-errors>
<alldeps>
<shortopt>a</shortopt>
<doc>install all required and optional dependencies</doc>
</alldeps>
<onlyreqdeps>
<shortopt>o</shortopt>
<doc>install all required dependencies</doc>
</onlyreqdeps>
<offline>
<shortopt>O</shortopt>
<doc>do not attempt to download any urls or contact channels</doc>
</offline>
<pretend>
<shortopt>p</shortopt>
<doc>Only list the packages that would be downloaded</doc>
</pretend>
</options>
<doc>[channel/]&lt;package&gt; ...
Installs one or more PEAR packages. You can specify a package to
install in four ways:
&quot;Package-1.0.tgz&quot; : installs from a local file
&quot;http://example.com/Package-1.0.tgz&quot; : installs from
anywhere on the net.
&quot;package.xml&quot; : installs the package described in
package.xml. Useful for testing, or for wrapping a PEAR package in
another package manager such as RPM.
&quot;Package[-version/state][.tar]&quot; : queries your default channel&#039;s server
({config master_server}) and downloads the newest package with
the preferred quality/state ({config preferred_state}).
To retrieve Package version 1.1, use &quot;Package-1.1,&quot; to retrieve
Package state beta, use &quot;Package-beta.&quot; To retrieve an uncompressed
file, append .tar (make sure there is no file by the same name first)
To download a package from another channel, prefix with the channel name like
&quot;channel/Package&quot;
More than one package may be specified at once. It is ok to mix these
four ways of specifying packages.
</doc>
</install>
<upgrade>
<summary>Upgrade Package</summary>
<function>doInstall</function>
<shortcut>up</shortcut>
<options>
<channel>
<shortopt>c</shortopt>
<doc>upgrade packages from a specific channel</doc>
<arg>CHAN</arg>
</channel>
<force>
<shortopt>f</shortopt>
<doc>overwrite newer installed packages</doc>
</force>
<loose>
<shortopt>l</shortopt>
<doc>do not check for recommended dependency version</doc>
</loose>
<nodeps>
<shortopt>n</shortopt>
<doc>ignore dependencies, upgrade anyway</doc>
</nodeps>
<register-only>
<shortopt>r</shortopt>
<doc>do not install files, only register the package as upgraded</doc>
</register-only>
<nobuild>
<shortopt>B</shortopt>
<doc>don&#039;t build C extensions</doc>
</nobuild>
<nocompress>
<shortopt>Z</shortopt>
<doc>request uncompressed files when downloading</doc>
</nocompress>
<installroot>
<shortopt>R</shortopt>
<doc>root directory used when installing files (ala PHP&#039;s INSTALL_ROOT)</doc>
<arg>DIR</arg>
</installroot>
<ignore-errors>
<shortopt></shortopt>
<doc>force install even if there were errors</doc>
</ignore-errors>
<alldeps>
<shortopt>a</shortopt>
<doc>install all required and optional dependencies</doc>
</alldeps>
<onlyreqdeps>
<shortopt>o</shortopt>
<doc>install all required dependencies</doc>
</onlyreqdeps>
<offline>
<shortopt>O</shortopt>
<doc>do not attempt to download any urls or contact channels</doc>
</offline>
<pretend>
<shortopt>p</shortopt>
<doc>Only list the packages that would be downloaded</doc>
</pretend>
</options>
<doc>&lt;package&gt; ...
Upgrades one or more PEAR packages. See documentation for the
&quot;install&quot; command for ways to specify a package.
When upgrading, your package will be updated if the provided new
package has a higher version number (use the -f option if you need to
upgrade anyway).
More than one package may be specified at once.
</doc>
</upgrade>
<upgrade-all>
<summary>Upgrade All Packages [Deprecated in favor of calling upgrade with no parameters]</summary>
<function>doUpgradeAll</function>
<shortcut>ua</shortcut>
<options>
<channel>
<shortopt>c</shortopt>
<doc>upgrade packages from a specific channel</doc>
<arg>CHAN</arg>
</channel>
<nodeps>
<shortopt>n</shortopt>
<doc>ignore dependencies, upgrade anyway</doc>
</nodeps>
<register-only>
<shortopt>r</shortopt>
<doc>do not install files, only register the package as upgraded</doc>
</register-only>
<nobuild>
<shortopt>B</shortopt>
<doc>don&#039;t build C extensions</doc>
</nobuild>
<nocompress>
<shortopt>Z</shortopt>
<doc>request uncompressed files when downloading</doc>
</nocompress>
<installroot>
<shortopt>R</shortopt>
<doc>root directory used when installing files (ala PHP&#039;s INSTALL_ROOT), use packagingroot for RPM</doc>
<arg>DIR</arg>
</installroot>
<ignore-errors>
<shortopt></shortopt>
<doc>force install even if there were errors</doc>
</ignore-errors>
<loose>
<shortopt></shortopt>
<doc>do not check for recommended dependency version</doc>
</loose>
</options>
<doc>
WARNING: This function is deprecated in favor of using the upgrade command with no params
Upgrades all packages that have a newer release available. Upgrades are
done only if there is a release available of the state specified in
&quot;preferred_state&quot; (currently {config preferred_state}), or a state considered
more stable.
</doc>
</upgrade-all>
<uninstall>
<summary>Un-install Package</summary>
<function>doUninstall</function>
<shortcut>un</shortcut>
<options>
<nodeps>
<shortopt>n</shortopt>
<doc>ignore dependencies, uninstall anyway</doc>
</nodeps>
<register-only>
<shortopt>r</shortopt>
<doc>do not remove files, only register the packages as not installed</doc>
</register-only>
<installroot>
<shortopt>R</shortopt>
<doc>root directory used when installing files (ala PHP&#039;s INSTALL_ROOT)</doc>
<arg>DIR</arg>
</installroot>
<ignore-errors>
<shortopt></shortopt>
<doc>force install even if there were errors</doc>
</ignore-errors>
<offline>
<shortopt>O</shortopt>
<doc>do not attempt to uninstall remotely</doc>
</offline>
</options>
<doc>[channel/]&lt;package&gt; ...
Uninstalls one or more PEAR packages. More than one package may be
specified at once. Prefix with channel name to uninstall from a
channel not in your default channel ({config default_channel})
</doc>
</uninstall>
<bundle>
<summary>Unpacks a Pecl Package</summary>
<function>doBundle</function>
<shortcut>bun</shortcut>
<options>
<destination>
<shortopt>d</shortopt>
<doc>Optional destination directory for unpacking (defaults to current path or &quot;ext&quot; if exists)</doc>
<arg>DIR</arg>
</destination>
<force>
<shortopt>f</shortopt>
<doc>Force the unpacking even if there were errors in the package</doc>
</force>
</options>
<doc>&lt;package&gt;
Unpacks a Pecl Package into the selected location. It will download the
package if needed.
</doc>
</bundle>
<run-scripts>
<summary>Run Post-Install Scripts bundled with a package</summary>
<function>doRunScripts</function>
<shortcut>rs</shortcut>
<options />
<doc>&lt;package&gt;
Run post-installation scripts in package &lt;package&gt;, if any exist.
</doc>
</run-scripts>
</commands>
+87 -49
View File
@@ -1,53 +1,58 @@
<?php
//
// +----------------------------------------------------------------------+
// | PHP Version 5 |
// +----------------------------------------------------------------------+
// | Copyright (c) 1997-2004 The PHP Group |
// +----------------------------------------------------------------------+
// | This source file is subject to version 3.0 of the PHP license, |
// | that is bundled with this package in the file LICENSE, and is |
// | available through the world-wide-web at the following url: |
// | http://www.php.net/license/3_0.txt. |
// | If you did not receive a copy of the PHP license and are unable to |
// | obtain it through the world-wide-web, please send a note to |
// | license@php.net so we can mail you a copy immediately. |
// +----------------------------------------------------------------------+
// | Author: Alexander Merz <alexmerz@php.net> |
// | |
// +----------------------------------------------------------------------+
//
// $Id: Mirror.php,v 1.5 2004/03/18 12:23:57 mj Exp $
/**
* PEAR_Command_Mirror (download-all command)
*
* PHP versions 4 and 5
*
* @category pear
* @package PEAR
* @author Alexander Merz <alexmerz@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
* @version CVS: $Id: Mirror.php 313023 2011-07-06 19:17:11Z dufuz $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.2.0
*/
require_once "PEAR/Command/Common.php";
require_once "PEAR/Command.php";
require_once "PEAR/Remote.php";
require_once "PEAR.php";
/**
* base class
*/
require_once 'PEAR/Command/Common.php';
/**
* PEAR commands for providing file mirrors
*
* @category pear
* @package PEAR
* @author Alexander Merz <alexmerz@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
* @version Release: 1.9.4
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.2.0
*/
class PEAR_Command_Mirror extends PEAR_Command_Common
{
// {{{ properties
var $commands = array(
'download-all' => array(
'summary' => 'Downloads each available package from master_server',
'summary' => 'Downloads each available package from the default channel',
'function' => 'doDownloadAll',
'shortcut' => 'da',
'options' => array(),
'options' => array(
'channel' =>
array(
'shortopt' => 'c',
'doc' => 'specify a channel other than the default channel',
'arg' => 'CHAN',
),
),
'doc' => '
Requests a list of available packages from the package server
(master_server) and downloads them to current working directory'
Requests a list of available packages from the default channel ({config default_channel})
and downloads them to current working directory. Note: only
packages within preferred_state ({config preferred_state}) will be downloaded'
),
);
// }}}
// {{{ constructor
/**
* PEAR_Command_Mirror constructor.
*
@@ -60,9 +65,15 @@ class PEAR_Command_Mirror extends PEAR_Command_Common
parent::PEAR_Command_Common($ui, $config);
}
// }}}
/**
* For unit-testing
*/
function &factory($a)
{
$a = &PEAR_Command::factory($a, $this->config);
return $a;
}
// {{{ doDownloadAll()
/**
* retrieves a list of avaible Packages from master server
* and downloads them
@@ -72,30 +83,57 @@ class PEAR_Command_Mirror extends PEAR_Command_Common
* @param array $options the command options before the command
* @param array $params the stuff after the command name
* @return bool true if succesful
* @throw PEAR_Error
* @throw PEAR_Error
*/
function doDownloadAll($command, $options, $params)
{
$this->config->set("php_dir", ".");
$remote = &new PEAR_Remote($this->config);
$remoteInfo = $remote->call("package.listAll");
$savechannel = $this->config->get('default_channel');
$reg = &$this->config->getRegistry();
$channel = isset($options['channel']) ? $options['channel'] :
$this->config->get('default_channel');
if (!$reg->channelExists($channel)) {
$this->config->set('default_channel', $savechannel);
return $this->raiseError('Channel "' . $channel . '" does not exist');
}
$this->config->set('default_channel', $channel);
$this->ui->outputData('Using Channel ' . $this->config->get('default_channel'));
$chan = $reg->getChannel($channel);
if (PEAR::isError($chan)) {
return $this->raiseError($chan);
}
if ($chan->supportsREST($this->config->get('preferred_mirror')) &&
$base = $chan->getBaseURL('REST1.0', $this->config->get('preferred_mirror'))) {
$rest = &$this->config->getREST('1.0', array());
$remoteInfo = array_flip($rest->listPackages($base, $channel));
}
if (PEAR::isError($remoteInfo)) {
return $remoteInfo;
}
$cmd = &PEAR_Command::factory("download", $this->config);
$cmd = &$this->factory("download");
if (PEAR::isError($cmd)) {
return $cmd;
}
foreach ($remoteInfo as $pkgn => $pkg) {
/**
* Error handling not neccesary, because already done by
* the download command
*/
$cmd->run("download", array(), array($pkgn));
$this->ui->outputData('Using Preferred State of ' .
$this->config->get('preferred_state'));
$this->ui->outputData('Gathering release information, please wait...');
/**
* Error handling not necessary, because already done by
* the download command
*/
PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN);
$err = $cmd->run('download', array('downloadonly' => true), array_keys($remoteInfo));
PEAR::staticPopErrorHandling();
$this->config->set('default_channel', $savechannel);
if (PEAR::isError($err)) {
$this->ui->outputData($err->getMessage());
}
return true;
}
// }}}
}
}
+18
View File
@@ -0,0 +1,18 @@
<commands version="1.0">
<download-all>
<summary>Downloads each available package from the default channel</summary>
<function>doDownloadAll</function>
<shortcut>da</shortcut>
<options>
<channel>
<shortopt>c</shortopt>
<doc>specify a channel other than the default channel</doc>
<arg>CHAN</arg>
</channel>
</options>
<doc>
Requests a list of available packages from the default channel ({config default_channel})
and downloads them to current working directory. Note: only
packages within preferred_state ({config preferred_state}) will be downloaded</doc>
</download-all>
</commands>
+739 -434
View File
File diff suppressed because it is too large Load Diff
+237
View File
@@ -0,0 +1,237 @@
<commands version="1.0">
<package>
<summary>Build Package</summary>
<function>doPackage</function>
<shortcut>p</shortcut>
<options>
<nocompress>
<shortopt>Z</shortopt>
<doc>Do not gzip the package file</doc>
</nocompress>
<showname>
<shortopt>n</shortopt>
<doc>Print the name of the packaged file.</doc>
</showname>
</options>
<doc>[descfile] [descfile2]
Creates a PEAR package from its description file (usually called
package.xml). If a second packagefile is passed in, then
the packager will check to make sure that one is a package.xml
version 1.0, and the other is a package.xml version 2.0. The
package.xml version 1.0 will be saved as &quot;package.xml&quot; in the archive,
and the other as &quot;package2.xml&quot; in the archive&quot;
</doc>
</package>
<package-validate>
<summary>Validate Package Consistency</summary>
<function>doPackageValidate</function>
<shortcut>pv</shortcut>
<options />
<doc>
</doc>
</package-validate>
<cvsdiff>
<summary>Run a &quot;cvs diff&quot; for all files in a package</summary>
<function>doCvsDiff</function>
<shortcut>cd</shortcut>
<options>
<quiet>
<shortopt>q</shortopt>
<doc>Be quiet</doc>
</quiet>
<reallyquiet>
<shortopt>Q</shortopt>
<doc>Be really quiet</doc>
</reallyquiet>
<date>
<shortopt>D</shortopt>
<doc>Diff against revision of DATE</doc>
<arg>DATE</arg>
</date>
<release>
<shortopt>R</shortopt>
<doc>Diff against tag for package release REL</doc>
<arg>REL</arg>
</release>
<revision>
<shortopt>r</shortopt>
<doc>Diff against revision REV</doc>
<arg>REV</arg>
</revision>
<context>
<shortopt>c</shortopt>
<doc>Generate context diff</doc>
</context>
<unified>
<shortopt>u</shortopt>
<doc>Generate unified diff</doc>
</unified>
<ignore-case>
<shortopt>i</shortopt>
<doc>Ignore case, consider upper- and lower-case letters equivalent</doc>
</ignore-case>
<ignore-whitespace>
<shortopt>b</shortopt>
<doc>Ignore changes in amount of white space</doc>
</ignore-whitespace>
<ignore-blank-lines>
<shortopt>B</shortopt>
<doc>Ignore changes that insert or delete blank lines</doc>
</ignore-blank-lines>
<brief>
<shortopt></shortopt>
<doc>Report only whether the files differ, no details</doc>
</brief>
<dry-run>
<shortopt>n</shortopt>
<doc>Don&#039;t do anything, just pretend</doc>
</dry-run>
</options>
<doc>&lt;package.xml&gt;
Compares all the files in a package. Without any options, this
command will compare the current code with the last checked-in code.
Using the -r or -R option you may compare the current code with that
of a specific release.
</doc>
</cvsdiff>
<svntag>
<summary>Set SVN Release Tag</summary>
<function>doSvnTag</function>
<shortcut>sv</shortcut>
<options>
<quiet>
<shortopt>q</shortopt>
<doc>Be quiet</doc>
</quiet>
<slide>
<shortopt>F</shortopt>
<doc>Move (slide) tag if it exists</doc>
</slide>
<delete>
<shortopt>d</shortopt>
<doc>Remove tag</doc>
</delete>
<dry-run>
<shortopt>n</shortopt>
<doc>Don&#039;t do anything, just pretend</doc>
</dry-run>
</options>
<doc>&lt;package.xml&gt; [files...]
Sets a SVN tag on all files in a package. Use this command after you have
packaged a distribution tarball with the &quot;package&quot; command to tag what
revisions of what files were in that release. If need to fix something
after running svntag once, but before the tarball is released to the public,
use the &quot;slide&quot; option to move the release tag.
to include files (such as a second package.xml, or tests not included in the
release), pass them as additional parameters.
</doc>
</svntag>
<cvstag>
<summary>Set CVS Release Tag</summary>
<function>doCvsTag</function>
<shortcut>ct</shortcut>
<options>
<quiet>
<shortopt>q</shortopt>
<doc>Be quiet</doc>
</quiet>
<reallyquiet>
<shortopt>Q</shortopt>
<doc>Be really quiet</doc>
</reallyquiet>
<slide>
<shortopt>F</shortopt>
<doc>Move (slide) tag if it exists</doc>
</slide>
<delete>
<shortopt>d</shortopt>
<doc>Remove tag</doc>
</delete>
<dry-run>
<shortopt>n</shortopt>
<doc>Don&#039;t do anything, just pretend</doc>
</dry-run>
</options>
<doc>&lt;package.xml&gt; [files...]
Sets a CVS tag on all files in a package. Use this command after you have
packaged a distribution tarball with the &quot;package&quot; command to tag what
revisions of what files were in that release. If need to fix something
after running cvstag once, but before the tarball is released to the public,
use the &quot;slide&quot; option to move the release tag.
to include files (such as a second package.xml, or tests not included in the
release), pass them as additional parameters.
</doc>
</cvstag>
<package-dependencies>
<summary>Show package dependencies</summary>
<function>doPackageDependencies</function>
<shortcut>pd</shortcut>
<options />
<doc>&lt;package-file&gt; or &lt;package.xml&gt; or &lt;install-package-name&gt;
List all dependencies the package has.
Can take a tgz / tar file, package.xml or a package name of an installed package.</doc>
</package-dependencies>
<sign>
<summary>Sign a package distribution file</summary>
<function>doSign</function>
<shortcut>si</shortcut>
<options>
<verbose>
<shortopt>v</shortopt>
<doc>Display GnuPG output</doc>
</verbose>
</options>
<doc>&lt;package-file&gt;
Signs a package distribution (.tar or .tgz) file with GnuPG.</doc>
</sign>
<makerpm>
<summary>Builds an RPM spec file from a PEAR package</summary>
<function>doMakeRPM</function>
<shortcut>rpm</shortcut>
<options>
<spec-template>
<shortopt>t</shortopt>
<doc>Use FILE as RPM spec file template</doc>
<arg>FILE</arg>
</spec-template>
<rpm-pkgname>
<shortopt>p</shortopt>
<doc>Use FORMAT as format string for RPM package name, %s is replaced
by the PEAR package name, defaults to &quot;PEAR::%s&quot;.</doc>
<arg>FORMAT</arg>
</rpm-pkgname>
</options>
<doc>&lt;package-file&gt;
Creates an RPM .spec file for wrapping a PEAR package inside an RPM
package. Intended to be used from the SPECS directory, with the PEAR
package tarball in the SOURCES directory:
$ pear makerpm ../SOURCES/Net_Socket-1.0.tgz
Wrote RPM spec file PEAR::Net_Geo-1.0.spec
$ rpm -bb PEAR::Net_Socket-1.0.spec
...
Wrote: /usr/src/redhat/RPMS/i386/PEAR::Net_Socket-1.0-1.i386.rpm
</doc>
</makerpm>
<convert>
<summary>Convert a package.xml 1.0 to package.xml 2.0 format</summary>
<function>doConvert</function>
<shortcut>c2</shortcut>
<options>
<flat>
<shortopt>f</shortopt>
<doc>do not beautify the filelist.</doc>
</flat>
</options>
<doc>[descfile] [descfile2]
Converts a package.xml in 1.0 format into a package.xml
in 2.0 format. The new file will be named package2.xml by default,
and package.xml will be used as the old file by default.
This is not the most intelligent conversion, and should only be
used for automated conversion or learning the format.
</doc>
</convert>
</commands>
+421
View File
@@ -0,0 +1,421 @@
<?php
/**
* PEAR_Command_Pickle (pickle command)
*
* PHP versions 4 and 5
*
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
* @copyright 2005-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
* @version CVS: $Id: Pickle.php 313023 2011-07-06 19:17:11Z dufuz $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.1
*/
/**
* base class
*/
require_once 'PEAR/Command/Common.php';
/**
* PEAR commands for login/logout
*
* @category pear
* @package PEAR
* @author Greg Beaver <cellog@php.net>
* @copyright 2005-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
* @version Release: 1.9.4
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.1
*/
class PEAR_Command_Pickle extends PEAR_Command_Common
{
var $commands = array(
'pickle' => array(
'summary' => 'Build PECL Package',
'function' => 'doPackage',
'shortcut' => 'pi',
'options' => array(
'nocompress' => array(
'shortopt' => 'Z',
'doc' => 'Do not gzip the package file'
),
'showname' => array(
'shortopt' => 'n',
'doc' => 'Print the name of the packaged file.',
),
),
'doc' => '[descfile]
Creates a PECL package from its package2.xml file.
An automatic conversion will be made to a package.xml 1.0 and written out to
disk in the current directory as "package.xml". Note that
only simple package.xml 2.0 will be converted. package.xml 2.0 with:
- dependency types other than required/optional PECL package/ext/php/pearinstaller
- more than one extsrcrelease or zendextsrcrelease
- zendextbinrelease, extbinrelease, phprelease, or bundle release type
- dependency groups
- ignore tags in release filelist
- tasks other than replace
- custom roles
will cause pickle to fail, and output an error message. If your package2.xml
uses any of these features, you are best off using PEAR_PackageFileManager to
generate both package.xml.
'
),
);
/**
* PEAR_Command_Package constructor.
*
* @access public
*/
function PEAR_Command_Pickle(&$ui, &$config)
{
parent::PEAR_Command_Common($ui, $config);
}
/**
* For unit-testing ease
*
* @return PEAR_Packager
*/
function &getPackager()
{
if (!class_exists('PEAR_Packager')) {
require_once 'PEAR/Packager.php';
}
$a = &new PEAR_Packager;
return $a;
}
/**
* For unit-testing ease
*
* @param PEAR_Config $config
* @param bool $debug
* @param string|null $tmpdir
* @return PEAR_PackageFile
*/
function &getPackageFile($config, $debug = false)
{
if (!class_exists('PEAR_Common')) {
require_once 'PEAR/Common.php';
}
if (!class_exists('PEAR_PackageFile')) {
require_once 'PEAR/PackageFile.php';
}
$a = &new PEAR_PackageFile($config, $debug);
$common = new PEAR_Common;
$common->ui = $this->ui;
$a->setLogger($common);
return $a;
}
function doPackage($command, $options, $params)
{
$this->output = '';
$pkginfofile = isset($params[0]) ? $params[0] : 'package2.xml';
$packager = &$this->getPackager();
if (PEAR::isError($err = $this->_convertPackage($pkginfofile))) {
return $err;
}
$compress = empty($options['nocompress']) ? true : false;
$result = $packager->package($pkginfofile, $compress, 'package.xml');
if (PEAR::isError($result)) {
return $this->raiseError($result);
}
// Don't want output, only the package file name just created
if (isset($options['showname'])) {
$this->ui->outputData($result, $command);
}
return true;
}
function _convertPackage($packagexml)
{
$pkg = &$this->getPackageFile($this->config);
$pf2 = &$pkg->fromPackageFile($packagexml, PEAR_VALIDATE_NORMAL);
if (!is_a($pf2, 'PEAR_PackageFile_v2')) {
return $this->raiseError('Cannot process "' .
$packagexml . '", is not a package.xml 2.0');
}
require_once 'PEAR/PackageFile/v1.php';
$pf = new PEAR_PackageFile_v1;
$pf->setConfig($this->config);
if ($pf2->getPackageType() != 'extsrc' && $pf2->getPackageType() != 'zendextsrc') {
return $this->raiseError('Cannot safely convert "' . $packagexml .
'", is not an extension source package. Using a PEAR_PackageFileManager-based ' .
'script is an option');
}
if (is_array($pf2->getUsesRole())) {
return $this->raiseError('Cannot safely convert "' . $packagexml .
'", contains custom roles. Using a PEAR_PackageFileManager-based script or ' .
'the convert command is an option');
}
if (is_array($pf2->getUsesTask())) {
return $this->raiseError('Cannot safely convert "' . $packagexml .
'", contains custom tasks. Using a PEAR_PackageFileManager-based script or ' .
'the convert command is an option');
}
$deps = $pf2->getDependencies();
if (isset($deps['group'])) {
return $this->raiseError('Cannot safely convert "' . $packagexml .
'", contains dependency groups. Using a PEAR_PackageFileManager-based script ' .
'or the convert command is an option');
}
if (isset($deps['required']['subpackage']) ||
isset($deps['optional']['subpackage'])) {
return $this->raiseError('Cannot safely convert "' . $packagexml .
'", contains subpackage dependencies. Using a PEAR_PackageFileManager-based '.
'script is an option');
}
if (isset($deps['required']['os'])) {
return $this->raiseError('Cannot safely convert "' . $packagexml .
'", contains os dependencies. Using a PEAR_PackageFileManager-based '.
'script is an option');
}
if (isset($deps['required']['arch'])) {
return $this->raiseError('Cannot safely convert "' . $packagexml .
'", contains arch dependencies. Using a PEAR_PackageFileManager-based '.
'script is an option');
}
$pf->setPackage($pf2->getPackage());
$pf->setSummary($pf2->getSummary());
$pf->setDescription($pf2->getDescription());
foreach ($pf2->getMaintainers() as $maintainer) {
$pf->addMaintainer($maintainer['role'], $maintainer['handle'],
$maintainer['name'], $maintainer['email']);
}
$pf->setVersion($pf2->getVersion());
$pf->setDate($pf2->getDate());
$pf->setLicense($pf2->getLicense());
$pf->setState($pf2->getState());
$pf->setNotes($pf2->getNotes());
$pf->addPhpDep($deps['required']['php']['min'], 'ge');
if (isset($deps['required']['php']['max'])) {
$pf->addPhpDep($deps['required']['php']['max'], 'le');
}
if (isset($deps['required']['package'])) {
if (!isset($deps['required']['package'][0])) {
$deps['required']['package'] = array($deps['required']['package']);
}
foreach ($deps['required']['package'] as $dep) {
if (!isset($dep['channel'])) {
return $this->raiseError('Cannot safely convert "' . $packagexml . '"' .
' contains uri-based dependency on a package. Using a ' .
'PEAR_PackageFileManager-based script is an option');
}
if ($dep['channel'] != 'pear.php.net'
&& $dep['channel'] != 'pecl.php.net'
&& $dep['channel'] != 'doc.php.net') {
return $this->raiseError('Cannot safely convert "' . $packagexml . '"' .
' contains dependency on a non-standard channel package. Using a ' .
'PEAR_PackageFileManager-based script is an option');
}
if (isset($dep['conflicts'])) {
return $this->raiseError('Cannot safely convert "' . $packagexml . '"' .
' contains conflicts dependency. Using a ' .
'PEAR_PackageFileManager-based script is an option');
}
if (isset($dep['exclude'])) {
$this->ui->outputData('WARNING: exclude tags are ignored in conversion');
}
if (isset($dep['min'])) {
$pf->addPackageDep($dep['name'], $dep['min'], 'ge');
}
if (isset($dep['max'])) {
$pf->addPackageDep($dep['name'], $dep['max'], 'le');
}
}
}
if (isset($deps['required']['extension'])) {
if (!isset($deps['required']['extension'][0])) {
$deps['required']['extension'] = array($deps['required']['extension']);
}
foreach ($deps['required']['extension'] as $dep) {
if (isset($dep['conflicts'])) {
return $this->raiseError('Cannot safely convert "' . $packagexml . '"' .
' contains conflicts dependency. Using a ' .
'PEAR_PackageFileManager-based script is an option');
}
if (isset($dep['exclude'])) {
$this->ui->outputData('WARNING: exclude tags are ignored in conversion');
}
if (isset($dep['min'])) {
$pf->addExtensionDep($dep['name'], $dep['min'], 'ge');
}
if (isset($dep['max'])) {
$pf->addExtensionDep($dep['name'], $dep['max'], 'le');
}
}
}
if (isset($deps['optional']['package'])) {
if (!isset($deps['optional']['package'][0])) {
$deps['optional']['package'] = array($deps['optional']['package']);
}
foreach ($deps['optional']['package'] as $dep) {
if (!isset($dep['channel'])) {
return $this->raiseError('Cannot safely convert "' . $packagexml . '"' .
' contains uri-based dependency on a package. Using a ' .
'PEAR_PackageFileManager-based script is an option');
}
if ($dep['channel'] != 'pear.php.net'
&& $dep['channel'] != 'pecl.php.net'
&& $dep['channel'] != 'doc.php.net') {
return $this->raiseError('Cannot safely convert "' . $packagexml . '"' .
' contains dependency on a non-standard channel package. Using a ' .
'PEAR_PackageFileManager-based script is an option');
}
if (isset($dep['exclude'])) {
$this->ui->outputData('WARNING: exclude tags are ignored in conversion');
}
if (isset($dep['min'])) {
$pf->addPackageDep($dep['name'], $dep['min'], 'ge', 'yes');
}
if (isset($dep['max'])) {
$pf->addPackageDep($dep['name'], $dep['max'], 'le', 'yes');
}
}
}
if (isset($deps['optional']['extension'])) {
if (!isset($deps['optional']['extension'][0])) {
$deps['optional']['extension'] = array($deps['optional']['extension']);
}
foreach ($deps['optional']['extension'] as $dep) {
if (isset($dep['exclude'])) {
$this->ui->outputData('WARNING: exclude tags are ignored in conversion');
}
if (isset($dep['min'])) {
$pf->addExtensionDep($dep['name'], $dep['min'], 'ge', 'yes');
}
if (isset($dep['max'])) {
$pf->addExtensionDep($dep['name'], $dep['max'], 'le', 'yes');
}
}
}
$contents = $pf2->getContents();
$release = $pf2->getReleases();
if (isset($releases[0])) {
return $this->raiseError('Cannot safely process "' . $packagexml . '" contains '
. 'multiple extsrcrelease/zendextsrcrelease tags. Using a PEAR_PackageFileManager-based script ' .
'or the convert command is an option');
}
if ($configoptions = $pf2->getConfigureOptions()) {
foreach ($configoptions as $option) {
$default = isset($option['default']) ? $option['default'] : false;
$pf->addConfigureOption($option['name'], $option['prompt'], $default);
}
}
if (isset($release['filelist']['ignore'])) {
return $this->raiseError('Cannot safely process "' . $packagexml . '" contains '
. 'ignore tags. Using a PEAR_PackageFileManager-based script or the convert' .
' command is an option');
}
if (isset($release['filelist']['install']) &&
!isset($release['filelist']['install'][0])) {
$release['filelist']['install'] = array($release['filelist']['install']);
}
if (isset($contents['dir']['attribs']['baseinstalldir'])) {
$baseinstalldir = $contents['dir']['attribs']['baseinstalldir'];
} else {
$baseinstalldir = false;
}
if (!isset($contents['dir']['file'][0])) {
$contents['dir']['file'] = array($contents['dir']['file']);
}
foreach ($contents['dir']['file'] as $file) {
if ($baseinstalldir && !isset($file['attribs']['baseinstalldir'])) {
$file['attribs']['baseinstalldir'] = $baseinstalldir;
}
$processFile = $file;
unset($processFile['attribs']);
if (count($processFile)) {
foreach ($processFile as $name => $task) {
if ($name != $pf2->getTasksNs() . ':replace') {
return $this->raiseError('Cannot safely process "' . $packagexml .
'" contains tasks other than replace. Using a ' .
'PEAR_PackageFileManager-based script is an option.');
}
$file['attribs']['replace'][] = $task;
}
}
if (!in_array($file['attribs']['role'], PEAR_Common::getFileRoles())) {
return $this->raiseError('Cannot safely convert "' . $packagexml .
'", contains custom roles. Using a PEAR_PackageFileManager-based script ' .
'or the convert command is an option');
}
if (isset($release['filelist']['install'])) {
foreach ($release['filelist']['install'] as $installas) {
if ($installas['attribs']['name'] == $file['attribs']['name']) {
$file['attribs']['install-as'] = $installas['attribs']['as'];
}
}
}
$pf->addFile('/', $file['attribs']['name'], $file['attribs']);
}
if ($pf2->getChangeLog()) {
$this->ui->outputData('WARNING: changelog is not translated to package.xml ' .
'1.0, use PEAR_PackageFileManager-based script if you need changelog-' .
'translation for package.xml 1.0');
}
$gen = &$pf->getDefaultGenerator();
$gen->toPackageFile('.');
}
}
+36
View File
@@ -0,0 +1,36 @@
<commands version="1.0">
<pickle>
<summary>Build PECL Package</summary>
<function>doPackage</function>
<shortcut>pi</shortcut>
<options>
<nocompress>
<shortopt>Z</shortopt>
<doc>Do not gzip the package file</doc>
</nocompress>
<showname>
<shortopt>n</shortopt>
<doc>Print the name of the packaged file.</doc>
</showname>
</options>
<doc>[descfile]
Creates a PECL package from its package2.xml file.
An automatic conversion will be made to a package.xml 1.0 and written out to
disk in the current directory as &quot;package.xml&quot;. Note that
only simple package.xml 2.0 will be converted. package.xml 2.0 with:
- dependency types other than required/optional PECL package/ext/php/pearinstaller
- more than one extsrcrelease or zendextsrcrelease
- zendextbinrelease, extbinrelease, phprelease, or bundle release type
- dependency groups
- ignore tags in release filelist
- tasks other than replace
- custom roles
will cause pickle to fail, and output an error message. If your package2.xml
uses any of these features, you are best off using PEAR_PackageFileManager to
generate both package.xml.
</doc>
</pickle>
</commands>
+912 -118
View File
File diff suppressed because it is too large Load Diff
+58
View File
@@ -0,0 +1,58 @@
<commands version="1.0">
<list>
<summary>List Installed Packages In The Default Channel</summary>
<function>doList</function>
<shortcut>l</shortcut>
<options>
<channel>
<shortopt>c</shortopt>
<doc>list installed packages from this channel</doc>
<arg>CHAN</arg>
</channel>
<allchannels>
<shortopt>a</shortopt>
<doc>list installed packages from all channels</doc>
</allchannels>
<channelinfo>
<shortopt>i</shortopt>
<doc>output fully channel-aware data, even on failure</doc>
</channelinfo>
</options>
<doc>&lt;package&gt;
If invoked without parameters, this command lists the PEAR packages
installed in your php_dir ({config php_dir}). With a parameter, it
lists the files in a package.
</doc>
</list>
<list-files>
<summary>List Files In Installed Package</summary>
<function>doFileList</function>
<shortcut>fl</shortcut>
<options />
<doc>&lt;package&gt;
List the files in an installed package.
</doc>
</list-files>
<shell-test>
<summary>Shell Script Test</summary>
<function>doShellTest</function>
<shortcut>st</shortcut>
<options />
<doc>&lt;package&gt; [[relation] version]
Tests if a package is installed in the system. Will exit(1) if it is not.
&lt;relation&gt; The version comparison operator. One of:
&lt;, lt, &lt;=, le, &gt;, gt, &gt;=, ge, ==, =, eq, !=, &lt;&gt;, ne
&lt;version&gt; The version to compare with
</doc>
</shell-test>
<info>
<summary>Display information about a package</summary>
<function>doInfo</function>
<shortcut>in</shortcut>
<options />
<doc>&lt;package&gt;
Displays information about a package. The package argument may be a
local package file, an URL to a package file, or the name of an
installed package.</doc>
</info>
</commands>
+584 -209
View File
@@ -1,33 +1,42 @@
<?php
// /* vim: set expandtab tabstop=4 shiftwidth=4: */
// +----------------------------------------------------------------------+
// | PHP Version 5 |
// +----------------------------------------------------------------------+
// | Copyright (c) 1997-2004 The PHP Group |
// +----------------------------------------------------------------------+
// | This source file is subject to version 3.0 of the PHP license, |
// | that is bundled with this package in the file LICENSE, and is |
// | available through the world-wide-web at the following url: |
// | http://www.php.net/license/3_0.txt. |
// | If you did not receive a copy of the PHP license and are unable to |
// | obtain it through the world-wide-web, please send a note to |
// | license@php.net so we can mail you a copy immediately. |
// +----------------------------------------------------------------------+
// | Author: Stig Bakken <ssb@php.net> |
// | |
// +----------------------------------------------------------------------+
//
// $Id: Remote.php,v 1.39 2004/04/03 15:56:00 cellog Exp $
/**
* PEAR_Command_Remote (remote-info, list-upgrades, remote-list, search, list-all, download,
* clear-cache commands)
*
* PHP versions 4 and 5
*
* @category pear
* @package PEAR
* @author Stig Bakken <ssb@php.net>
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
* @version CVS: $Id: Remote.php 313023 2011-07-06 19:17:11Z dufuz $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 0.1
*/
/**
* base class
*/
require_once 'PEAR/Command/Common.php';
require_once 'PEAR/Common.php';
require_once 'PEAR/Remote.php';
require_once 'PEAR/Registry.php';
require_once 'PEAR/REST.php';
/**
* PEAR commands for remote server querying
*
* @category pear
* @package PEAR
* @author Stig Bakken <ssb@php.net>
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
* @version Release: 1.9.4
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 0.1
*/
class PEAR_Command_Remote extends PEAR_Command_Common
{
// {{{ command definitions
var $commands = array(
'remote-info' => array(
'summary' => 'Information About Remote Packages',
@@ -41,16 +50,29 @@ Get details on a package from the server.',
'summary' => 'List Available Upgrades',
'function' => 'doListUpgrades',
'shortcut' => 'lu',
'options' => array(),
'doc' => '
'options' => array(
'channelinfo' => array(
'shortopt' => 'i',
'doc' => 'output fully channel-aware data, even on failure',
),
),
'doc' => '[preferred_state]
List releases on the server of packages you have installed where
a newer version is available with the same release state (stable etc.).'
a newer version is available with the same release state (stable etc.)
or the state passed as the second parameter.'
),
'remote-list' => array(
'summary' => 'List Remote Packages',
'function' => 'doRemoteList',
'shortcut' => 'rl',
'options' => array(),
'options' => array(
'channel' =>
array(
'shortopt' => 'c',
'doc' => 'specify a channel other than the default channel',
'arg' => 'CHAN',
)
),
'doc' => '
Lists the packages available on the configured server along with the
latest stable release of each package.',
@@ -59,16 +81,44 @@ latest stable release of each package.',
'summary' => 'Search remote package database',
'function' => 'doSearch',
'shortcut' => 'sp',
'options' => array(),
'doc' => '
Lists all packages which match the search parameters (first param
is package name, second package info)',
'options' => array(
'channel' =>
array(
'shortopt' => 'c',
'doc' => 'specify a channel other than the default channel',
'arg' => 'CHAN',
),
'allchannels' => array(
'shortopt' => 'a',
'doc' => 'search packages from all known channels',
),
'channelinfo' => array(
'shortopt' => 'i',
'doc' => 'output fully channel-aware data, even on failure',
),
),
'doc' => '[packagename] [packageinfo]
Lists all packages which match the search parameters. The first
parameter is a fragment of a packagename. The default channel
will be used unless explicitly overridden. The second parameter
will be used to match any portion of the summary/description',
),
'list-all' => array(
'summary' => 'List All Packages',
'function' => 'doListAll',
'shortcut' => 'la',
'options' => array(),
'options' => array(
'channel' =>
array(
'shortopt' => 'c',
'doc' => 'specify a channel other than the default channel',
'arg' => 'CHAN',
),
'channelinfo' => array(
'shortopt' => 'i',
'doc' => 'output fully channel-aware data, even on failure',
),
),
'doc' => '
Lists the packages available on the configured server along with the
latest stable release of each package.',
@@ -83,26 +133,23 @@ latest stable release of each package.',
'doc' => 'download an uncompressed (.tar) file',
),
),
'doc' => '{package|package-version}
Download a package tarball. The file will be named as suggested by the
'doc' => '<package>...
Download package tarballs. The files will be named as suggested by the
server, for example if you download the DB package and the latest stable
version of DB is 1.2, the downloaded file will be DB-1.2.tgz.',
version of DB is 1.6.5, the downloaded file will be DB-1.6.5.tgz.',
),
'clear-cache' => array(
'summary' => 'Clear XML-RPC Cache',
'summary' => 'Clear Web Services Cache',
'function' => 'doClearCache',
'shortcut' => 'cc',
'options' => array(),
'doc' => '
Clear the XML-RPC cache. See also the cache_ttl configuration
Clear the REST cache. See also the cache_ttl configuration
parameter.
',
),
);
// }}}
// {{{ constructor
/**
* PEAR_Command_Remote constructor.
*
@@ -113,98 +160,216 @@ parameter.
parent::PEAR_Command_Common($ui, $config);
}
// }}}
// {{{ doRemoteInfo()
function _checkChannelForStatus($channel, $chan)
{
if (PEAR::isError($chan)) {
$this->raiseError($chan);
}
if (!is_a($chan, 'PEAR_ChannelFile')) {
return $this->raiseError('Internal corruption error: invalid channel "' .
$channel . '"');
}
$rest = new PEAR_REST($this->config);
PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN);
$mirror = $this->config->get('preferred_mirror', null,
$channel);
$a = $rest->downloadHttp('http://' . $channel .
'/channel.xml', $chan->lastModified());
PEAR::staticPopErrorHandling();
if (!PEAR::isError($a) && $a) {
$this->ui->outputData('WARNING: channel "' . $channel . '" has ' .
'updated its protocols, use "' . PEAR_RUNTYPE . ' channel-update ' . $channel .
'" to update');
}
}
function doRemoteInfo($command, $options, $params)
{
if (sizeof($params) != 1) {
return $this->raiseError("$command expects one param: the remote package name");
}
$r = new PEAR_Remote($this->config);
$info = $r->call('package.info', $params[0]);
$savechannel = $channel = $this->config->get('default_channel');
$reg = &$this->config->getRegistry();
$package = $params[0];
$parsed = $reg->parsePackageName($package, $channel);
if (PEAR::isError($parsed)) {
return $this->raiseError('Invalid package name "' . $package . '"');
}
$channel = $parsed['channel'];
$this->config->set('default_channel', $channel);
$chan = $reg->getChannel($channel);
if (PEAR::isError($e = $this->_checkChannelForStatus($channel, $chan))) {
return $e;
}
$mirror = $this->config->get('preferred_mirror');
if ($chan->supportsREST($mirror) && $base = $chan->getBaseURL('REST1.0', $mirror)) {
$rest = &$this->config->getREST('1.0', array());
$info = $rest->packageInfo($base, $parsed['package'], $channel);
}
if (!isset($info)) {
return $this->raiseError('No supported protocol was found');
}
if (PEAR::isError($info)) {
$this->config->set('default_channel', $savechannel);
return $this->raiseError($info);
}
$reg = new PEAR_Registry($this->config->get('php_dir'));
$installed = $reg->packageInfo($info['name']);
if (!isset($info['name'])) {
return $this->raiseError('No remote package "' . $package . '" was found');
}
$installed = $reg->packageInfo($info['name'], null, $channel);
$info['installed'] = $installed['version'] ? $installed['version'] : '- no -';
if (is_array($info['installed'])) {
$info['installed'] = $info['installed']['release'];
}
$this->ui->outputData($info, $command);
$this->config->set('default_channel', $savechannel);
return true;
}
// }}}
// {{{ doRemoteList()
function doRemoteList($command, $options, $params)
{
$r = new PEAR_Remote($this->config);
$savechannel = $channel = $this->config->get('default_channel');
$reg = &$this->config->getRegistry();
if (isset($options['channel'])) {
$channel = $options['channel'];
if (!$reg->channelExists($channel)) {
return $this->raiseError('Channel "' . $channel . '" does not exist');
}
$this->config->set('default_channel', $channel);
}
$chan = $reg->getChannel($channel);
if (PEAR::isError($e = $this->_checkChannelForStatus($channel, $chan))) {
return $e;
}
$list_options = false;
if ($this->config->get('preferred_state') == 'stable')
if ($this->config->get('preferred_state') == 'stable') {
$list_options = true;
$available = $r->call('package.listAll', $list_options);
}
$available = array();
if ($chan->supportsREST($this->config->get('preferred_mirror')) &&
$base = $chan->getBaseURL('REST1.1', $this->config->get('preferred_mirror'))
) {
// use faster list-all if available
$rest = &$this->config->getREST('1.1', array());
$available = $rest->listAll($base, $list_options, true, false, false, $chan->getName());
} elseif ($chan->supportsREST($this->config->get('preferred_mirror')) &&
$base = $chan->getBaseURL('REST1.0', $this->config->get('preferred_mirror'))) {
$rest = &$this->config->getREST('1.0', array());
$available = $rest->listAll($base, $list_options, true, false, false, $chan->getName());
}
if (PEAR::isError($available)) {
$this->config->set('default_channel', $savechannel);
return $this->raiseError($available);
}
$i = $j = 0;
$data = array(
'caption' => 'Available packages:',
'caption' => 'Channel ' . $channel . ' Available packages:',
'border' => true,
'headline' => array('Package', 'Version'),
'channel' => $channel
);
foreach ($available as $name => $info) {
$data['data'][] = array($name, isset($info['stable']) ? $info['stable'] : '-n/a-');
}
if (count($available)==0) {
$data = '(no packages installed yet)';
if (count($available) == 0) {
$data = '(no packages available yet)';
} else {
foreach ($available as $name => $info) {
$version = (isset($info['stable']) && $info['stable']) ? $info['stable'] : '-n/a-';
$data['data'][] = array($name, $version);
}
}
$this->ui->outputData($data, $command);
$this->config->set('default_channel', $savechannel);
return true;
}
// }}}
// {{{ doListAll()
function doListAll($command, $options, $params)
{
$r = new PEAR_Remote($this->config);
$reg = new PEAR_Registry($this->config->get('php_dir'));
$savechannel = $channel = $this->config->get('default_channel');
$reg = &$this->config->getRegistry();
if (isset($options['channel'])) {
$channel = $options['channel'];
if (!$reg->channelExists($channel)) {
return $this->raiseError("Channel \"$channel\" does not exist");
}
$this->config->set('default_channel', $channel);
}
$list_options = false;
if ($this->config->get('preferred_state') == 'stable')
if ($this->config->get('preferred_state') == 'stable') {
$list_options = true;
$available = $r->call('package.listAll', $list_options);
}
$chan = $reg->getChannel($channel);
if (PEAR::isError($e = $this->_checkChannelForStatus($channel, $chan))) {
return $e;
}
if ($chan->supportsREST($this->config->get('preferred_mirror')) &&
$base = $chan->getBaseURL('REST1.1', $this->config->get('preferred_mirror'))) {
// use faster list-all if available
$rest = &$this->config->getREST('1.1', array());
$available = $rest->listAll($base, $list_options, false, false, false, $chan->getName());
} elseif ($chan->supportsREST($this->config->get('preferred_mirror')) &&
$base = $chan->getBaseURL('REST1.0', $this->config->get('preferred_mirror'))) {
$rest = &$this->config->getREST('1.0', array());
$available = $rest->listAll($base, $list_options, false, false, false, $chan->getName());
}
if (PEAR::isError($available)) {
return $this->raiseError($available);
}
if (!is_array($available)) {
return $this->raiseError('The package list could not be fetched from the remote server. Please try again. (Debug info: "'.$available.'")');
$this->config->set('default_channel', $savechannel);
return $this->raiseError('The package list could not be fetched from the remote server. Please try again. (Debug info: "' . $available->getMessage() . '")');
}
$data = array(
'caption' => 'All packages:',
'caption' => 'All packages [Channel ' . $channel . ']:',
'border' => true,
'headline' => array('Package', 'Latest', 'Local'),
'channel' => $channel,
);
$local_pkgs = $reg->listPackages();
foreach ($available as $name => $info) {
$installed = $reg->packageInfo($name);
$desc = $info['summary'];
if (isset($params[$name]))
$desc .= "\n\n".$info['description'];
if (isset($options['channelinfo'])) {
// add full channelinfo
$data['caption'] = 'Channel ' . $channel . ' All packages:';
$data['headline'] = array('Channel', 'Package', 'Latest', 'Local',
'Description', 'Dependencies');
}
$local_pkgs = $reg->listPackages($channel);
foreach ($available as $name => $info) {
$installed = $reg->packageInfo($name, null, $channel);
if (is_array($installed['version'])) {
$installed['version'] = $installed['version']['release'];
}
$desc = $info['summary'];
if (isset($params[$name])) {
$desc .= "\n\n".$info['description'];
}
if (isset($options['mode']))
{
if ($options['mode'] == 'installed' && !isset($installed['version']))
if ($options['mode'] == 'installed' && !isset($installed['version'])) {
continue;
if ($options['mode'] == 'notinstalled' && isset($installed['version']))
}
if ($options['mode'] == 'notinstalled' && isset($installed['version'])) {
continue;
}
if ($options['mode'] == 'upgrades'
&& (!isset($installed['version']) || $installed['version'] == $info['stable']))
{
&& (!isset($installed['version']) || version_compare($installed['version'],
$info['stable'], '>='))) {
continue;
}
}
@@ -213,112 +378,253 @@ parameter.
unset($local_pkgs[$pos]);
}
$data['data'][$info['category']][] = array(
$name,
@$info['stable'],
@$installed['version'],
@$desc,
@$info['deps'],
if (isset($info['stable']) && !$info['stable']) {
$info['stable'] = null;
}
if (isset($options['channelinfo'])) {
// add full channelinfo
if ($info['stable'] === $info['unstable']) {
$state = $info['state'];
} else {
$state = 'stable';
}
$latest = $info['stable'].' ('.$state.')';
$local = '';
if (isset($installed['version'])) {
$inst_state = $reg->packageInfo($name, 'release_state', $channel);
$local = $installed['version'].' ('.$inst_state.')';
}
$packageinfo = array(
$channel,
$name,
$latest,
$local,
isset($desc) ? $desc : null,
isset($info['deps']) ? $info['deps'] : null,
);
} else {
$packageinfo = array(
$reg->channelAlias($channel) . '/' . $name,
isset($info['stable']) ? $info['stable'] : null,
isset($installed['version']) ? $installed['version'] : null,
isset($desc) ? $desc : null,
isset($info['deps']) ? $info['deps'] : null,
);
}
$data['data'][$info['category']][] = $packageinfo;
}
if (isset($options['mode']) && in_array($options['mode'], array('notinstalled', 'upgrades'))) {
$this->config->set('default_channel', $savechannel);
$this->ui->outputData($data, $command);
return true;
}
foreach ($local_pkgs as $name) {
$info = $reg->packageInfo($name);
$info = &$reg->getPackage($name, $channel);
$data['data']['Local'][] = array(
$info['package'],
$reg->channelAlias($channel) . '/' . $info->getPackage(),
'',
$info['version'],
$info['summary'],
@$info['release_deps']
$info->getVersion(),
$info->getSummary(),
$info->getDeps()
);
}
$this->config->set('default_channel', $savechannel);
$this->ui->outputData($data, $command);
return true;
}
// }}}
// {{{ doSearch()
function doSearch($command, $options, $params)
{
if ((!isset($params[0]) || empty($params[0]))
&& (!isset($params[1]) || empty($params[1])))
{
return $this->raiseError('no valid search string supplied');
};
}
$channelinfo = isset($options['channelinfo']);
$reg = &$this->config->getRegistry();
if (isset($options['allchannels'])) {
// search all channels
unset($options['allchannels']);
$channels = $reg->getChannels();
$errors = array();
PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN);
foreach ($channels as $channel) {
if ($channel->getName() != '__uri') {
$options['channel'] = $channel->getName();
$ret = $this->doSearch($command, $options, $params);
if (PEAR::isError($ret)) {
$errors[] = $ret;
}
}
}
PEAR::staticPopErrorHandling();
if (count($errors) !== 0) {
// for now, only give first error
return PEAR::raiseError($errors[0]);
}
return true;
}
$savechannel = $channel = $this->config->get('default_channel');
$package = strtolower($params[0]);
$summary = isset($params[1]) ? $params[1] : false;
if (isset($options['channel'])) {
$reg = &$this->config->getRegistry();
$channel = $options['channel'];
if (!$reg->channelExists($channel)) {
return $this->raiseError('Channel "' . $channel . '" does not exist');
}
$this->config->set('default_channel', $channel);
}
$chan = $reg->getChannel($channel);
if (PEAR::isError($e = $this->_checkChannelForStatus($channel, $chan))) {
return $e;
}
if ($chan->supportsREST($this->config->get('preferred_mirror')) &&
$base = $chan->getBaseURL('REST1.0', $this->config->get('preferred_mirror'))) {
$rest = &$this->config->getREST('1.0', array());
$available = $rest->listAll($base, false, false, $package, $summary, $chan->getName());
}
$r = new PEAR_Remote($this->config);
$reg = new PEAR_Registry($this->config->get('php_dir'));
$available = $r->call('package.listAll', true, false);
if (PEAR::isError($available)) {
$this->config->set('default_channel', $savechannel);
return $this->raiseError($available);
}
$data = array(
'caption' => 'Matched packages:',
'border' => true,
'headline' => array('Package', 'Stable/(Latest)', 'Local'),
);
if (!$available && !$channelinfo) {
// clean exit when not found, no error !
$data = 'no packages found that match pattern "' . $package . '", for channel '.$channel.'.';
$this->ui->outputData($data);
$this->config->set('default_channel', $channel);
return true;
}
if ($channelinfo) {
$data = array(
'caption' => 'Matched packages, channel ' . $channel . ':',
'border' => true,
'headline' => array('Channel', 'Package', 'Stable/(Latest)', 'Local'),
'channel' => $channel
);
} else {
$data = array(
'caption' => 'Matched packages, channel ' . $channel . ':',
'border' => true,
'headline' => array('Package', 'Stable/(Latest)', 'Local'),
'channel' => $channel
);
}
if (!$available && $channelinfo) {
unset($data['headline']);
$data['data'] = 'No packages found that match pattern "' . $package . '".';
$available = array();
}
foreach ($available as $name => $info) {
$found = (!empty($params[0]) && stristr($name, $params[0]) !== false);
if (!$found && !(isset($params[1]) && !empty($params[1])
&& (stristr($info['summary'], $params[1]) !== false
|| stristr($info['description'], $params[1]) !== false)))
{
continue;
};
$installed = $reg->packageInfo($name);
$installed = $reg->packageInfo($name, null, $channel);
$desc = $info['summary'];
if (isset($params[$name]))
$desc .= "\n\n".$info['description'];
$unstable = '';
if ($info['unstable']) {
$unstable = '/(' . $info['unstable'] . $info['state'] . ')';
}
if (!isset($info['stable']) || !$info['stable']) {
$info['stable'] = 'none';
$version_remote = 'none';
} else {
if ($info['unstable']) {
$version_remote = $info['unstable'];
} else {
$version_remote = $info['stable'];
}
$version_remote .= ' ('.$info['state'].')';
}
$data['data'][$info['category']][] = array(
$name,
$info['stable'] . $unstable,
$installed['version'],
$desc,
$version = is_array($installed['version']) ? $installed['version']['release'] :
$installed['version'];
if ($channelinfo) {
$packageinfo = array(
$channel,
$name,
$version_remote,
$version,
$desc,
);
} else {
$packageinfo = array(
$name,
$version_remote,
$version,
$desc,
);
}
$data['data'][$info['category']][] = $packageinfo;
}
if (!isset($data['data'])) {
return $this->raiseError('no packages found');
}
$this->ui->outputData($data, $command);
$this->config->set('default_channel', $channel);
return true;
}
// }}}
// {{{ doDownload()
function &getDownloader($options)
{
if (!class_exists('PEAR_Downloader')) {
require_once 'PEAR/Downloader.php';
}
$a = &new PEAR_Downloader($this->ui, $options, $this->config);
return $a;
}
function doDownload($command, $options, $params)
{
//$params[0] -> The package to download
if (count($params) != 1) {
return PEAR::raiseError("download expects one argument: the package to download");
// make certain that dependencies are ignored
$options['downloadonly'] = 1;
// eliminate error messages for preferred_state-related errors
/* TODO: Should be an option, but until now download does respect
prefered state */
/* $options['ignorepreferred_state'] = 1; */
// eliminate error messages for preferred_state-related errors
$downloader = &$this->getDownloader($options);
PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN);
$e = $downloader->setDownloadDir(getcwd());
PEAR::staticPopErrorHandling();
if (PEAR::isError($e)) {
return $this->raiseError('Current directory is not writeable, cannot download');
}
$server = $this->config->get('master_server');
if (!ereg('^http://', $params[0])) {
$getoption = isset($options['nocompress'])&&$options['nocompress']==1?'?uncompress=on':'';
$pkgfile = "http://$server/get/$params[0]".$getoption;
} else {
$pkgfile = $params[0];
$errors = array();
$downloaded = array();
$err = $downloader->download($params);
if (PEAR::isError($err)) {
return $err;
}
$this->bytes_downloaded = 0;
$saved = PEAR_Common::downloadHttp($pkgfile, $this->ui, '.',
array(&$this, 'downloadCallback'));
if (PEAR::isError($saved)) {
return $this->raiseError($saved);
$errors = $downloader->getErrorMsgs();
if (count($errors)) {
foreach ($errors as $error) {
if ($error !== null) {
$this->ui->outputData($error);
}
}
return $this->raiseError("$command failed");
}
$fname = basename($saved);
$this->ui->outputData("File $fname downloaded ($this->bytes_downloaded bytes)", $command);
$downloaded = $downloader->getDownloadedPackages();
foreach ($downloaded as $pkg) {
$this->ui->outputData("File $pkg[file] downloaded", $command);
}
return true;
}
@@ -329,107 +635,176 @@ parameter.
}
}
// }}}
// {{{ doListUpgrades()
function doListUpgrades($command, $options, $params)
{
include_once "PEAR/Registry.php";
$remote = new PEAR_Remote($this->config);
if (empty($params[0])) {
$state = $this->config->get('preferred_state');
} else {
$state = $params[0];
require_once 'PEAR/Common.php';
if (isset($params[0]) && !is_array(PEAR_Common::betterStates($params[0]))) {
return $this->raiseError($params[0] . ' is not a valid state (stable/beta/alpha/devel/etc.) try "pear help list-upgrades"');
}
$caption = 'Available Upgrades';
if (empty($state) || $state == 'any') {
$latest = $remote->call("package.listLatestReleases");
} else {
$latest = $remote->call("package.listLatestReleases", $state);
$caption .= ' (' . implode(', ', PEAR_Common::betterStates($state, true)) . ')';
}
$caption .= ':';
if (PEAR::isError($latest)) {
return $latest;
}
$reg = new PEAR_Registry($this->config->get('php_dir'));
$inst = array_flip($reg->listPackages());
$data = array(
'caption' => $caption,
'border' => 1,
'headline' => array('Package', 'Local', 'Remote', 'Size'),
);
foreach ((array)$latest as $pkg => $info) {
$package = strtolower($pkg);
if (!isset($inst[$package])) {
// skip packages we don't have installed
$savechannel = $channel = $this->config->get('default_channel');
$reg = &$this->config->getRegistry();
foreach ($reg->listChannels() as $channel) {
$inst = array_flip($reg->listPackages($channel));
if (!count($inst)) {
continue;
}
extract($info);
$pkginfo = $reg->packageInfo($package);
$inst_version = $pkginfo['version'];
$inst_state = $pkginfo['release_state'];
if (version_compare("$version", "$inst_version", "le")) {
// installed version is up-to-date
if ($channel == '__uri') {
continue;
}
if ($filesize >= 20480) {
$filesize += 1024 - ($filesize % 1024);
$fs = sprintf("%dkB", $filesize / 1024);
} elseif ($filesize > 0) {
$filesize += 103 - ($filesize % 103);
$fs = sprintf("%.1fkB", $filesize / 1024.0);
$this->config->set('default_channel', $channel);
$state = empty($params[0]) ? $this->config->get('preferred_state') : $params[0];
$caption = $channel . ' Available Upgrades';
$chan = $reg->getChannel($channel);
if (PEAR::isError($e = $this->_checkChannelForStatus($channel, $chan))) {
return $e;
}
$latest = array();
$base2 = false;
$preferred_mirror = $this->config->get('preferred_mirror');
if ($chan->supportsREST($preferred_mirror) &&
(
//($base2 = $chan->getBaseURL('REST1.4', $preferred_mirror)) ||
($base = $chan->getBaseURL('REST1.0', $preferred_mirror))
)
) {
if ($base2) {
$rest = &$this->config->getREST('1.4', array());
$base = $base2;
} else {
$rest = &$this->config->getREST('1.0', array());
}
if (empty($state) || $state == 'any') {
$state = false;
} else {
$caption .= ' (' . implode(', ', PEAR_Common::betterStates($state, true)) . ')';
}
PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN);
$latest = $rest->listLatestUpgrades($base, $state, $inst, $channel, $reg);
PEAR::staticPopErrorHandling();
}
if (PEAR::isError($latest)) {
$this->ui->outputData($latest->getMessage());
continue;
}
$caption .= ':';
if (PEAR::isError($latest)) {
$this->config->set('default_channel', $savechannel);
return $latest;
}
$data = array(
'caption' => $caption,
'border' => 1,
'headline' => array('Channel', 'Package', 'Local', 'Remote', 'Size'),
'channel' => $channel
);
foreach ((array)$latest as $pkg => $info) {
$package = strtolower($pkg);
if (!isset($inst[$package])) {
// skip packages we don't have installed
continue;
}
extract($info);
$inst_version = $reg->packageInfo($package, 'version', $channel);
$inst_state = $reg->packageInfo($package, 'release_state', $channel);
if (version_compare("$version", "$inst_version", "le")) {
// installed version is up-to-date
continue;
}
if ($filesize >= 20480) {
$filesize += 1024 - ($filesize % 1024);
$fs = sprintf("%dkB", $filesize / 1024);
} elseif ($filesize > 0) {
$filesize += 103 - ($filesize % 103);
$fs = sprintf("%.1fkB", $filesize / 1024.0);
} else {
$fs = " -"; // XXX center instead
}
$data['data'][] = array($channel, $pkg, "$inst_version ($inst_state)", "$version ($state)", $fs);
}
if (isset($options['channelinfo'])) {
if (empty($data['data'])) {
unset($data['headline']);
if (count($inst) == 0) {
$data['data'] = '(no packages installed)';
} else {
$data['data'] = '(no upgrades available)';
}
}
$this->ui->outputData($data, $command);
} else {
$fs = " -"; // XXX center instead
if (empty($data['data'])) {
$this->ui->outputData('Channel ' . $channel . ': No upgrades available');
} else {
$this->ui->outputData($data, $command);
}
}
$data['data'][] = array($pkg, "$inst_version ($inst_state)", "$version ($state)", $fs);
}
if (empty($data['data'])) {
$this->ui->outputData('No upgrades available');
} else {
$this->ui->outputData($data, $command);
}
$this->config->set('default_channel', $savechannel);
return true;
}
// }}}
// {{{ doClearCache()
function doClearCache($command, $options, $params)
{
$cache_dir = $this->config->get('cache_dir');
$verbose = $this->config->get('verbose');
$verbose = $this->config->get('verbose');
$output = '';
if (!file_exists($cache_dir) || !is_dir($cache_dir)) {
return $this->raiseError("$cache_dir does not exist or is not a directory");
}
if (!($dp = @opendir($cache_dir))) {
return $this->raiseError("opendir($cache_dir) failed: $php_errormsg");
}
if ($verbose >= 1) {
$output .= "reading directory $cache_dir\n";
}
$num = 0;
while ($ent = readdir($dp)) {
if (preg_match('/^xmlrpc_cache_[a-z0-9]{32}$/', $ent)) {
if (preg_match('/rest.cache(file|id)\\z/', $ent)) {
$path = $cache_dir . DIRECTORY_SEPARATOR . $ent;
$ok = @unlink($path);
if (file_exists($path)) {
$ok = @unlink($path);
} else {
$ok = false;
$php_errormsg = '';
}
if ($ok) {
if ($verbose >= 2) {
$output .= "deleted $path\n";
}
$num++;
} elseif ($verbose >= 1) {
$output .= "failed to delete $path\n";
$output .= "failed to delete $path $php_errormsg\n";
}
}
}
closedir($dp);
if ($verbose >= 1) {
$output .= "$num cache entries cleared\n";
}
$this->ui->outputData(rtrim($output), $command);
return $num;
}
// }}}
}
?>
}
+109
View File
@@ -0,0 +1,109 @@
<commands version="1.0">
<remote-info>
<summary>Information About Remote Packages</summary>
<function>doRemoteInfo</function>
<shortcut>ri</shortcut>
<options />
<doc>&lt;package&gt;
Get details on a package from the server.</doc>
</remote-info>
<list-upgrades>
<summary>List Available Upgrades</summary>
<function>doListUpgrades</function>
<shortcut>lu</shortcut>
<options>
<channelinfo>
<shortopt>i</shortopt>
<doc>output fully channel-aware data, even on failure</doc>
</channelinfo>
</options>
<doc>[preferred_state]
List releases on the server of packages you have installed where
a newer version is available with the same release state (stable etc.)
or the state passed as the second parameter.</doc>
</list-upgrades>
<remote-list>
<summary>List Remote Packages</summary>
<function>doRemoteList</function>
<shortcut>rl</shortcut>
<options>
<channel>
<shortopt>c</shortopt>
<doc>specify a channel other than the default channel</doc>
<arg>CHAN</arg>
</channel>
</options>
<doc>
Lists the packages available on the configured server along with the
latest stable release of each package.</doc>
</remote-list>
<search>
<summary>Search remote package database</summary>
<function>doSearch</function>
<shortcut>sp</shortcut>
<options>
<channel>
<shortopt>c</shortopt>
<doc>specify a channel other than the default channel</doc>
<arg>CHAN</arg>
</channel>
<allchannels>
<shortopt>a</shortopt>
<doc>search packages from all known channels</doc>
</allchannels>
<channelinfo>
<shortopt>i</shortopt>
<doc>output fully channel-aware data, even on failure</doc>
</channelinfo>
</options>
<doc>[packagename] [packageinfo]
Lists all packages which match the search parameters. The first
parameter is a fragment of a packagename. The default channel
will be used unless explicitly overridden. The second parameter
will be used to match any portion of the summary/description</doc>
</search>
<list-all>
<summary>List All Packages</summary>
<function>doListAll</function>
<shortcut>la</shortcut>
<options>
<channel>
<shortopt>c</shortopt>
<doc>specify a channel other than the default channel</doc>
<arg>CHAN</arg>
</channel>
<channelinfo>
<shortopt>i</shortopt>
<doc>output fully channel-aware data, even on failure</doc>
</channelinfo>
</options>
<doc>
Lists the packages available on the configured server along with the
latest stable release of each package.</doc>
</list-all>
<download>
<summary>Download Package</summary>
<function>doDownload</function>
<shortcut>d</shortcut>
<options>
<nocompress>
<shortopt>Z</shortopt>
<doc>download an uncompressed (.tar) file</doc>
</nocompress>
</options>
<doc>&lt;package&gt;...
Download package tarballs. The files will be named as suggested by the
server, for example if you download the DB package and the latest stable
version of DB is 1.6.5, the downloaded file will be DB-1.6.5.tgz.</doc>
</download>
<clear-cache>
<summary>Clear Web Services Cache</summary>
<function>doClearCache</function>
<shortcut>cc</shortcut>
<options />
<doc>
Clear the XML-RPC/REST cache. See also the cache_ttl configuration
parameter.
</doc>
</clear-cache>
</commands>
+337
View File
@@ -0,0 +1,337 @@
<?php
/**
* PEAR_Command_Test (run-tests)
*
* PHP versions 4 and 5
*
* @category pear
* @package PEAR
* @author Stig Bakken <ssb@php.net>
* @author Martin Jansen <mj@php.net>
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
* @version CVS: $Id: Test.php 313023 2011-07-06 19:17:11Z dufuz $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 0.1
*/
/**
* base class
*/
require_once 'PEAR/Command/Common.php';
/**
* PEAR commands for login/logout
*
* @category pear
* @package PEAR
* @author Stig Bakken <ssb@php.net>
* @author Martin Jansen <mj@php.net>
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
* @version Release: 1.9.4
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 0.1
*/
class PEAR_Command_Test extends PEAR_Command_Common
{
var $commands = array(
'run-tests' => array(
'summary' => 'Run Regression Tests',
'function' => 'doRunTests',
'shortcut' => 'rt',
'options' => array(
'recur' => array(
'shortopt' => 'r',
'doc' => 'Run tests in child directories, recursively. 4 dirs deep maximum',
),
'ini' => array(
'shortopt' => 'i',
'doc' => 'actual string of settings to pass to php in format " -d setting=blah"',
'arg' => 'SETTINGS'
),
'realtimelog' => array(
'shortopt' => 'l',
'doc' => 'Log test runs/results as they are run',
),
'quiet' => array(
'shortopt' => 'q',
'doc' => 'Only display detail for failed tests',
),
'simple' => array(
'shortopt' => 's',
'doc' => 'Display simple output for all tests',
),
'package' => array(
'shortopt' => 'p',
'doc' => 'Treat parameters as installed packages from which to run tests',
),
'phpunit' => array(
'shortopt' => 'u',
'doc' => 'Search parameters for AllTests.php, and use that to run phpunit-based tests
If none is found, all .phpt tests will be tried instead.',
),
'tapoutput' => array(
'shortopt' => 't',
'doc' => 'Output run-tests.log in TAP-compliant format',
),
'cgi' => array(
'shortopt' => 'c',
'doc' => 'CGI php executable (needed for tests with POST/GET section)',
'arg' => 'PHPCGI',
),
'coverage' => array(
'shortopt' => 'x',
'doc' => 'Generate a code coverage report (requires Xdebug 2.0.0+)',
),
),
'doc' => '[testfile|dir ...]
Run regression tests with PHP\'s regression testing script (run-tests.php).',
),
);
var $output;
/**
* PEAR_Command_Test constructor.
*
* @access public
*/
function PEAR_Command_Test(&$ui, &$config)
{
parent::PEAR_Command_Common($ui, $config);
}
function doRunTests($command, $options, $params)
{
if (isset($options['phpunit']) && isset($options['tapoutput'])) {
return $this->raiseError('ERROR: cannot use both --phpunit and --tapoutput at the same time');
}
require_once 'PEAR/Common.php';
require_once 'System.php';
$log = new PEAR_Common;
$log->ui = &$this->ui; // slightly hacky, but it will work
$tests = array();
$depth = isset($options['recur']) ? 14 : 1;
if (!count($params)) {
$params[] = '.';
}
if (isset($options['package'])) {
$oldparams = $params;
$params = array();
$reg = &$this->config->getRegistry();
foreach ($oldparams as $param) {
$pname = $reg->parsePackageName($param, $this->config->get('default_channel'));
if (PEAR::isError($pname)) {
return $this->raiseError($pname);
}
$package = &$reg->getPackage($pname['package'], $pname['channel']);
if (!$package) {
return PEAR::raiseError('Unknown package "' .
$reg->parsedPackageNameToString($pname) . '"');
}
$filelist = $package->getFilelist();
foreach ($filelist as $name => $atts) {
if (isset($atts['role']) && $atts['role'] != 'test') {
continue;
}
if (isset($options['phpunit']) && preg_match('/AllTests\.php\\z/i', $name)) {
$params[] = $atts['installed_as'];
continue;
} elseif (!preg_match('/\.phpt\\z/', $name)) {
continue;
}
$params[] = $atts['installed_as'];
}
}
}
foreach ($params as $p) {
if (is_dir($p)) {
if (isset($options['phpunit'])) {
$dir = System::find(array($p, '-type', 'f',
'-maxdepth', $depth,
'-name', 'AllTests.php'));
if (count($dir)) {
foreach ($dir as $p) {
$p = realpath($p);
if (!count($tests) ||
(count($tests) && strlen($p) < strlen($tests[0]))) {
// this is in a higher-level directory, use this one instead.
$tests = array($p);
}
}
}
continue;
}
$args = array($p, '-type', 'f', '-name', '*.phpt');
} else {
if (isset($options['phpunit'])) {
if (preg_match('/AllTests\.php\\z/i', $p)) {
$p = realpath($p);
if (!count($tests) ||
(count($tests) && strlen($p) < strlen($tests[0]))) {
// this is in a higher-level directory, use this one instead.
$tests = array($p);
}
}
continue;
}
if (file_exists($p) && preg_match('/\.phpt$/', $p)) {
$tests[] = $p;
continue;
}
if (!preg_match('/\.phpt\\z/', $p)) {
$p .= '.phpt';
}
$args = array(dirname($p), '-type', 'f', '-name', $p);
}
if (!isset($options['recur'])) {
$args[] = '-maxdepth';
$args[] = 1;
}
$dir = System::find($args);
$tests = array_merge($tests, $dir);
}
$ini_settings = '';
if (isset($options['ini'])) {
$ini_settings .= $options['ini'];
}
if (isset($_ENV['TEST_PHP_INCLUDE_PATH'])) {
$ini_settings .= " -d include_path={$_ENV['TEST_PHP_INCLUDE_PATH']}";
}
if ($ini_settings) {
$this->ui->outputData('Using INI settings: "' . $ini_settings . '"');
}
$skipped = $passed = $failed = array();
$tests_count = count($tests);
$this->ui->outputData('Running ' . $tests_count . ' tests', $command);
$start = time();
if (isset($options['realtimelog']) && file_exists('run-tests.log')) {
unlink('run-tests.log');
}
if (isset($options['tapoutput'])) {
$tap = '1..' . $tests_count . "\n";
}
require_once 'PEAR/RunTest.php';
$run = new PEAR_RunTest($log, $options);
$run->tests_count = $tests_count;
if (isset($options['coverage']) && extension_loaded('xdebug')){
$run->xdebug_loaded = true;
} else {
$run->xdebug_loaded = false;
}
$j = $i = 1;
foreach ($tests as $t) {
if (isset($options['realtimelog'])) {
$fp = @fopen('run-tests.log', 'a');
if ($fp) {
fwrite($fp, "Running test [$i / $tests_count] $t...");
fclose($fp);
}
}
PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN);
if (isset($options['phpunit'])) {
$result = $run->runPHPUnit($t, $ini_settings);
} else {
$result = $run->run($t, $ini_settings, $j);
}
PEAR::staticPopErrorHandling();
if (PEAR::isError($result)) {
$this->ui->log($result->getMessage());
continue;
}
if (isset($options['tapoutput'])) {
$tap .= $result[0] . ' ' . $i . $result[1] . "\n";
continue;
}
if (isset($options['realtimelog'])) {
$fp = @fopen('run-tests.log', 'a');
if ($fp) {
fwrite($fp, "$result\n");
fclose($fp);
}
}
if ($result == 'FAILED') {
$failed[] = $t;
}
if ($result == 'PASSED') {
$passed[] = $t;
}
if ($result == 'SKIPPED') {
$skipped[] = $t;
}
$j++;
}
$total = date('i:s', time() - $start);
if (isset($options['tapoutput'])) {
$fp = @fopen('run-tests.log', 'w');
if ($fp) {
fwrite($fp, $tap, strlen($tap));
fclose($fp);
$this->ui->outputData('wrote TAP-format log to "' .realpath('run-tests.log') .
'"', $command);
}
} else {
if (count($failed)) {
$output = "TOTAL TIME: $total\n";
$output .= count($passed) . " PASSED TESTS\n";
$output .= count($skipped) . " SKIPPED TESTS\n";
$output .= count($failed) . " FAILED TESTS:\n";
foreach ($failed as $failure) {
$output .= $failure . "\n";
}
$mode = isset($options['realtimelog']) ? 'a' : 'w';
$fp = @fopen('run-tests.log', $mode);
if ($fp) {
fwrite($fp, $output, strlen($output));
fclose($fp);
$this->ui->outputData('wrote log to "' . realpath('run-tests.log') . '"', $command);
}
} elseif (file_exists('run-tests.log') && !is_dir('run-tests.log')) {
@unlink('run-tests.log');
}
}
$this->ui->outputData('TOTAL TIME: ' . $total);
$this->ui->outputData(count($passed) . ' PASSED TESTS', $command);
$this->ui->outputData(count($skipped) . ' SKIPPED TESTS', $command);
if (count($failed)) {
$this->ui->outputData(count($failed) . ' FAILED TESTS:', $command);
foreach ($failed as $failure) {
$this->ui->outputData($failure, $command);
}
}
return true;
}
}
+54
View File
@@ -0,0 +1,54 @@
<commands version="1.0">
<run-tests>
<summary>Run Regression Tests</summary>
<function>doRunTests</function>
<shortcut>rt</shortcut>
<options>
<recur>
<shortopt>r</shortopt>
<doc>Run tests in child directories, recursively. 4 dirs deep maximum</doc>
</recur>
<ini>
<shortopt>i</shortopt>
<doc>actual string of settings to pass to php in format &quot; -d setting=blah&quot;</doc>
<arg>SETTINGS</arg>
</ini>
<realtimelog>
<shortopt>l</shortopt>
<doc>Log test runs/results as they are run</doc>
</realtimelog>
<quiet>
<shortopt>q</shortopt>
<doc>Only display detail for failed tests</doc>
</quiet>
<simple>
<shortopt>s</shortopt>
<doc>Display simple output for all tests</doc>
</simple>
<package>
<shortopt>p</shortopt>
<doc>Treat parameters as installed packages from which to run tests</doc>
</package>
<phpunit>
<shortopt>u</shortopt>
<doc>Search parameters for AllTests.php, and use that to run phpunit-based tests
If none is found, all .phpt tests will be tried instead.</doc>
</phpunit>
<tapoutput>
<shortopt>t</shortopt>
<doc>Output run-tests.log in TAP-compliant format</doc>
</tapoutput>
<cgi>
<shortopt>c</shortopt>
<doc>CGI php executable (needed for tests with POST/GET section)</doc>
<arg>PHPCGI</arg>
</cgi>
<coverage>
<shortopt>x</shortopt>
<doc>Generate a code coverage report (requires Xdebug 2.0.0+)</doc>
</coverage>
</options>
<doc>[testfile|dir ...]
Run regression tests with PHP&#039;s regression testing script (run-tests.php).</doc>
</run-tests>
</commands>
+354 -1611
View File
File diff suppressed because it is too large Load Diff
+1165 -237
View File
File diff suppressed because it is too large Load Diff
+1358
View File
File diff suppressed because it is too large Load Diff

Some files were not shown because too many files have changed in this diff Show More