summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Gapczynski <GapczynskiM@gmail.com>2011-08-07 15:56:26 -0400
committerMichael Gapczynski <GapczynskiM@gmail.com>2011-08-07 15:56:26 -0400
commit1aa89b7cbb051875ffa577a6a89e9cf9bb6eafee (patch)
treeb4923b27fc550d37eeb609db02ef6d20a508ab30
parent5d521d7c7c8f8e796a3ddc81e1e4430238ba5451 (diff)
parent3e8ae8636cad91877c727c7b1ea77436816e7c3d (diff)
downloadnextcloud-server-1aa89b7cbb051875ffa577a6a89e9cf9bb6eafee.tar.gz
nextcloud-server-1aa89b7cbb051875ffa577a6a89e9cf9bb6eafee.zip
Merge branch 'master' into sharing
Conflicts: files/css/files.css lib/base.php
-rw-r--r--3rdparty/COPYING-PHP (renamed from 3dparty/COPYING-PHP)0
-rw-r--r--3rdparty/COPYING-README (renamed from 3dparty/COPYING-README)0
-rw-r--r--3rdparty/Console/Getopt.php (renamed from 3dparty/Console/Getopt.php)0
-rw-r--r--3rdparty/Crypt_Blowfish/Blowfish.php317
-rw-r--r--3rdparty/Crypt_Blowfish/Blowfish/DefaultKey.php327
-rw-r--r--3rdparty/MDB2.php (renamed from 3dparty/MDB2.php)0
-rw-r--r--3rdparty/MDB2/Date.php (renamed from 3dparty/MDB2/Date.php)0
-rw-r--r--3rdparty/MDB2/Driver/Datatype/Common.php (renamed from 3dparty/MDB2/Driver/Datatype/Common.php)0
-rw-r--r--3rdparty/MDB2/Driver/Datatype/mysql.php (renamed from 3dparty/MDB2/Driver/Datatype/mysql.php)0
-rw-r--r--3rdparty/MDB2/Driver/Datatype/pgsql.php (renamed from 3dparty/MDB2/Driver/Datatype/pgsql.php)0
-rw-r--r--3rdparty/MDB2/Driver/Datatype/sqlite.php (renamed from 3dparty/MDB2/Driver/Datatype/sqlite.php)0
-rw-r--r--3rdparty/MDB2/Driver/Function/Common.php (renamed from 3dparty/MDB2/Driver/Function/Common.php)0
-rw-r--r--3rdparty/MDB2/Driver/Function/mysql.php (renamed from 3dparty/MDB2/Driver/Function/mysql.php)0
-rw-r--r--3rdparty/MDB2/Driver/Function/pgsql.php (renamed from 3dparty/MDB2/Driver/Function/pgsql.php)0
-rw-r--r--3rdparty/MDB2/Driver/Function/sqlite.php (renamed from 3dparty/MDB2/Driver/Function/sqlite.php)0
-rw-r--r--3rdparty/MDB2/Driver/Manager/Common.php (renamed from 3dparty/MDB2/Driver/Manager/Common.php)0
-rw-r--r--3rdparty/MDB2/Driver/Manager/mysql.php (renamed from 3dparty/MDB2/Driver/Manager/mysql.php)0
-rw-r--r--3rdparty/MDB2/Driver/Manager/pgsql.php (renamed from 3dparty/MDB2/Driver/Manager/pgsql.php)0
-rw-r--r--3rdparty/MDB2/Driver/Manager/sqlite.php (renamed from 3dparty/MDB2/Driver/Manager/sqlite.php)0
-rw-r--r--3rdparty/MDB2/Driver/Native/Common.php (renamed from 3dparty/MDB2/Driver/Native/Common.php)0
-rw-r--r--3rdparty/MDB2/Driver/Native/mysql.php (renamed from 3dparty/MDB2/Driver/Native/mysql.php)0
-rw-r--r--3rdparty/MDB2/Driver/Native/pgsql.php (renamed from 3dparty/MDB2/Driver/Native/pgsql.php)0
-rw-r--r--3rdparty/MDB2/Driver/Native/sqlite.php (renamed from 3dparty/MDB2/Driver/Native/sqlite.php)0
-rw-r--r--3rdparty/MDB2/Driver/Reverse/Common.php (renamed from 3dparty/MDB2/Driver/Reverse/Common.php)0
-rw-r--r--3rdparty/MDB2/Driver/Reverse/mysql.php (renamed from 3dparty/MDB2/Driver/Reverse/mysql.php)0
-rw-r--r--3rdparty/MDB2/Driver/Reverse/pgsql.php (renamed from 3dparty/MDB2/Driver/Reverse/pgsql.php)0
-rw-r--r--3rdparty/MDB2/Driver/Reverse/sqlite.php (renamed from 3dparty/MDB2/Driver/Reverse/sqlite.php)0
-rw-r--r--3rdparty/MDB2/Driver/mysql.php (renamed from 3dparty/MDB2/Driver/mysql.php)0
-rw-r--r--3rdparty/MDB2/Driver/pgsql.php (renamed from 3dparty/MDB2/Driver/pgsql.php)0
-rw-r--r--3rdparty/MDB2/Driver/sqlite.php (renamed from 3dparty/MDB2/Driver/sqlite.php)0
-rw-r--r--3rdparty/MDB2/Extended.php (renamed from 3dparty/MDB2/Extended.php)0
-rw-r--r--3rdparty/MDB2/Iterator.php (renamed from 3dparty/MDB2/Iterator.php)0
-rw-r--r--3rdparty/MDB2/LOB.php (renamed from 3dparty/MDB2/LOB.php)0
-rw-r--r--3rdparty/MDB2/Schema.php (renamed from 3dparty/MDB2/Schema.php)0
-rw-r--r--3rdparty/MDB2/Schema/Parser.php (renamed from 3dparty/MDB2/Schema/Parser.php)0
-rw-r--r--3rdparty/MDB2/Schema/Parser2.php (renamed from 3dparty/MDB2/Schema/Parser2.php)0
-rw-r--r--3rdparty/MDB2/Schema/Reserved/ibase.php (renamed from 3dparty/MDB2/Schema/Reserved/ibase.php)0
-rw-r--r--3rdparty/MDB2/Schema/Reserved/mssql.php (renamed from 3dparty/MDB2/Schema/Reserved/mssql.php)0
-rw-r--r--3rdparty/MDB2/Schema/Reserved/mysql.php (renamed from 3dparty/MDB2/Schema/Reserved/mysql.php)0
-rw-r--r--3rdparty/MDB2/Schema/Reserved/oci8.php (renamed from 3dparty/MDB2/Schema/Reserved/oci8.php)0
-rw-r--r--3rdparty/MDB2/Schema/Reserved/pgsql.php (renamed from 3dparty/MDB2/Schema/Reserved/pgsql.php)0
-rw-r--r--3rdparty/MDB2/Schema/Tool.php (renamed from 3dparty/MDB2/Schema/Tool.php)0
-rw-r--r--3rdparty/MDB2/Schema/Tool/ParameterException.php (renamed from 3dparty/MDB2/Schema/Tool/ParameterException.php)0
-rw-r--r--3rdparty/MDB2/Schema/Validate.php (renamed from 3dparty/MDB2/Schema/Validate.php)0
-rw-r--r--3rdparty/MDB2/Schema/Writer.php (renamed from 3dparty/MDB2/Schema/Writer.php)0
-rw-r--r--3rdparty/PEAR.php (renamed from 3dparty/PEAR.php)0
-rw-r--r--3rdparty/PEAR/Autoloader.php (renamed from 3dparty/PEAR/Autoloader.php)0
-rw-r--r--3rdparty/PEAR/Builder.php (renamed from 3dparty/PEAR/Builder.php)0
-rw-r--r--3rdparty/PEAR/Command.php (renamed from 3dparty/PEAR/Command.php)0
-rw-r--r--3rdparty/PEAR/Command/Auth.php (renamed from 3dparty/PEAR/Command/Auth.php)0
-rw-r--r--3rdparty/PEAR/Command/Build.php (renamed from 3dparty/PEAR/Command/Build.php)0
-rw-r--r--3rdparty/PEAR/Command/Common.php (renamed from 3dparty/PEAR/Command/Common.php)0
-rw-r--r--3rdparty/PEAR/Command/Config.php (renamed from 3dparty/PEAR/Command/Config.php)0
-rw-r--r--3rdparty/PEAR/Command/Install.php (renamed from 3dparty/PEAR/Command/Install.php)0
-rw-r--r--3rdparty/PEAR/Command/Mirror.php (renamed from 3dparty/PEAR/Command/Mirror.php)0
-rw-r--r--3rdparty/PEAR/Command/Package.php (renamed from 3dparty/PEAR/Command/Package.php)0
-rw-r--r--3rdparty/PEAR/Command/Registry.php (renamed from 3dparty/PEAR/Command/Registry.php)0
-rw-r--r--3rdparty/PEAR/Command/Remote.php (renamed from 3dparty/PEAR/Command/Remote.php)0
-rw-r--r--3rdparty/PEAR/Common.php (renamed from 3dparty/PEAR/Common.php)0
-rw-r--r--3rdparty/PEAR/Config.php (renamed from 3dparty/PEAR/Config.php)0
-rw-r--r--3rdparty/PEAR/Dependency.php (renamed from 3dparty/PEAR/Dependency.php)0
-rw-r--r--3rdparty/PEAR/Downloader.php (renamed from 3dparty/PEAR/Downloader.php)0
-rw-r--r--3rdparty/PEAR/ErrorStack.php (renamed from 3dparty/PEAR/ErrorStack.php)0
-rw-r--r--3rdparty/PEAR/Exception.php (renamed from 3dparty/PEAR/Exception.php)0
-rw-r--r--3rdparty/PEAR/Frontend/CLI.php (renamed from 3dparty/PEAR/Frontend/CLI.php)0
-rw-r--r--3rdparty/PEAR/Installer.php (renamed from 3dparty/PEAR/Installer.php)0
-rw-r--r--3rdparty/PEAR/Packager.php (renamed from 3dparty/PEAR/Packager.php)0
-rw-r--r--3rdparty/PEAR/Registry.php (renamed from 3dparty/PEAR/Registry.php)0
-rw-r--r--3rdparty/PEAR/Remote.php (renamed from 3dparty/PEAR/Remote.php)0
-rw-r--r--3rdparty/PEAR/RunTest.php (renamed from 3dparty/PEAR/RunTest.php)0
-rw-r--r--3rdparty/Sabre.includes.php (renamed from 3dparty/Sabre.includes.php)1
-rw-r--r--3rdparty/Sabre/CalDAV/Backend/Abstract.php (renamed from 3dparty/Sabre/CalDAV/Backend/Abstract.php)0
-rw-r--r--3rdparty/Sabre/CalDAV/Backend/PDO.php (renamed from 3dparty/Sabre/CalDAV/Backend/PDO.php)0
-rw-r--r--3rdparty/Sabre/CalDAV/Calendar.php (renamed from 3dparty/Sabre/CalDAV/Calendar.php)7
-rw-r--r--3rdparty/Sabre/CalDAV/CalendarObject.php (renamed from 3dparty/Sabre/CalDAV/CalendarObject.php)7
-rw-r--r--3rdparty/Sabre/CalDAV/CalendarRootNode.php (renamed from 3dparty/Sabre/CalDAV/CalendarRootNode.php)7
-rw-r--r--3rdparty/Sabre/CalDAV/Exception/InvalidICalendarObject.php (renamed from 3dparty/Sabre/CalDAV/Exception/InvalidICalendarObject.php)0
-rw-r--r--3rdparty/Sabre/CalDAV/ICSExportPlugin.php (renamed from 3dparty/Sabre/CalDAV/ICSExportPlugin.php)0
-rw-r--r--3rdparty/Sabre/CalDAV/ICalendarUtil.php (renamed from 3dparty/Sabre/CalDAV/ICalendarUtil.php)8
-rw-r--r--3rdparty/Sabre/CalDAV/Plugin.php (renamed from 3dparty/Sabre/CalDAV/Plugin.php)0
-rw-r--r--3rdparty/Sabre/CalDAV/Principal/Collection.php (renamed from 3dparty/Sabre/CalDAV/Principal/Collection.php)0
-rw-r--r--3rdparty/Sabre/CalDAV/Principal/ProxyRead.php (renamed from 3dparty/Sabre/CalDAV/Principal/ProxyRead.php)0
-rw-r--r--3rdparty/Sabre/CalDAV/Principal/ProxyWrite.php (renamed from 3dparty/Sabre/CalDAV/Principal/ProxyWrite.php)0
-rw-r--r--3rdparty/Sabre/CalDAV/Principal/User.php (renamed from 3dparty/Sabre/CalDAV/Principal/User.php)0
-rw-r--r--3rdparty/Sabre/CalDAV/Property/SupportedCalendarComponentSet.php (renamed from 3dparty/Sabre/CalDAV/Property/SupportedCalendarComponentSet.php)0
-rw-r--r--3rdparty/Sabre/CalDAV/Property/SupportedCalendarData.php (renamed from 3dparty/Sabre/CalDAV/Property/SupportedCalendarData.php)0
-rw-r--r--3rdparty/Sabre/CalDAV/Property/SupportedCollationSet.php (renamed from 3dparty/Sabre/CalDAV/Property/SupportedCollationSet.php)0
-rw-r--r--3rdparty/Sabre/CalDAV/Server.php (renamed from 3dparty/Sabre/CalDAV/Server.php)0
-rw-r--r--3rdparty/Sabre/CalDAV/UserCalendars.php (renamed from 3dparty/Sabre/CalDAV/UserCalendars.php)0
-rw-r--r--3rdparty/Sabre/CalDAV/Version.php (renamed from 3dparty/Sabre/CalDAV/Version.php)0
-rw-r--r--3rdparty/Sabre/CalDAV/XMLUtil.php (renamed from 3dparty/Sabre/CalDAV/XMLUtil.php)0
-rw-r--r--3rdparty/Sabre/CardDAV/AddressBook.php (renamed from 3dparty/Sabre/CardDAV/AddressBook.php)76
-rw-r--r--3rdparty/Sabre/CardDAV/AddressBookQueryParser.php (renamed from 3dparty/Sabre/CardDAV/AddressBookQueryParser.php)0
-rw-r--r--3rdparty/Sabre/CardDAV/AddressBookRoot.php (renamed from 3dparty/Sabre/CardDAV/AddressBookRoot.php)12
-rw-r--r--3rdparty/Sabre/CardDAV/Backend/Abstract.php (renamed from 3dparty/Sabre/CardDAV/Backend/Abstract.php)0
-rw-r--r--3rdparty/Sabre/CardDAV/Backend/PDO.php (renamed from 3dparty/Sabre/CardDAV/Backend/PDO.php)40
-rw-r--r--3rdparty/Sabre/CardDAV/Card.php (renamed from 3dparty/Sabre/CardDAV/Card.php)72
-rw-r--r--3rdparty/Sabre/CardDAV/IAddressBook.php (renamed from 3dparty/Sabre/CardDAV/IAddressBook.php)0
-rw-r--r--3rdparty/Sabre/CardDAV/ICard.php (renamed from 3dparty/Sabre/CardDAV/ICard.php)0
-rw-r--r--3rdparty/Sabre/CardDAV/IDirectory.php (renamed from 3dparty/Sabre/CardDAV/IDirectory.php)0
-rw-r--r--3rdparty/Sabre/CardDAV/Plugin.php (renamed from 3dparty/Sabre/CardDAV/Plugin.php)4
-rw-r--r--3rdparty/Sabre/CardDAV/UserAddressBooks.php (renamed from 3dparty/Sabre/CardDAV/UserAddressBooks.php)73
-rw-r--r--3rdparty/Sabre/CardDAV/Version.php (renamed from 3dparty/Sabre/CardDAV/Version.php)0
-rw-r--r--3rdparty/Sabre/DAV/Auth/Backend/AbstractBasic.php (renamed from 3dparty/Sabre/DAV/Auth/Backend/AbstractBasic.php)0
-rw-r--r--3rdparty/Sabre/DAV/Auth/Backend/AbstractDigest.php (renamed from 3dparty/Sabre/DAV/Auth/Backend/AbstractDigest.php)0
-rw-r--r--3rdparty/Sabre/DAV/Auth/Backend/Apache.php (renamed from 3dparty/Sabre/DAV/Auth/Backend/Apache.php)0
-rw-r--r--3rdparty/Sabre/DAV/Auth/Backend/File.php (renamed from 3dparty/Sabre/DAV/Auth/Backend/File.php)0
-rw-r--r--3rdparty/Sabre/DAV/Auth/Backend/PDO.php (renamed from 3dparty/Sabre/DAV/Auth/Backend/PDO.php)0
-rw-r--r--3rdparty/Sabre/DAV/Auth/IBackend.php (renamed from 3dparty/Sabre/DAV/Auth/IBackend.php)0
-rw-r--r--3rdparty/Sabre/DAV/Auth/Plugin.php (renamed from 3dparty/Sabre/DAV/Auth/Plugin.php)0
-rw-r--r--3rdparty/Sabre/DAV/Browser/GuessContentType.php (renamed from 3dparty/Sabre/DAV/Browser/GuessContentType.php)0
-rw-r--r--3rdparty/Sabre/DAV/Browser/MapGetToPropFind.php (renamed from 3dparty/Sabre/DAV/Browser/MapGetToPropFind.php)0
-rw-r--r--3rdparty/Sabre/DAV/Browser/Plugin.php (renamed from 3dparty/Sabre/DAV/Browser/Plugin.php)0
-rw-r--r--3rdparty/Sabre/DAV/Client.php (renamed from 3dparty/Sabre/DAV/Client.php)0
-rw-r--r--3rdparty/Sabre/DAV/Collection.php (renamed from 3dparty/Sabre/DAV/Directory.php)6
-rw-r--r--3rdparty/Sabre/DAV/Directory.php (renamed from 3dparty/Sabre.autoload.php)9
-rw-r--r--3rdparty/Sabre/DAV/Exception.php (renamed from 3dparty/Sabre/DAV/Exception.php)0
-rw-r--r--3rdparty/Sabre/DAV/Exception/BadRequest.php (renamed from 3dparty/Sabre/DAV/Exception/BadRequest.php)0
-rw-r--r--3rdparty/Sabre/DAV/Exception/Conflict.php (renamed from 3dparty/Sabre/DAV/Exception/Conflict.php)0
-rw-r--r--3rdparty/Sabre/DAV/Exception/ConflictingLock.php (renamed from 3dparty/Sabre/DAV/Exception/ConflictingLock.php)0
-rw-r--r--3rdparty/Sabre/DAV/Exception/FileNotFound.php (renamed from 3dparty/Sabre/DAV/Exception/FileNotFound.php)0
-rw-r--r--3rdparty/Sabre/DAV/Exception/Forbidden.php (renamed from 3dparty/Sabre/DAV/Exception/Forbidden.php)0
-rw-r--r--3rdparty/Sabre/DAV/Exception/InsufficientStorage.php (renamed from 3dparty/Sabre/DAV/Exception/InsufficientStorage.php)0
-rw-r--r--3rdparty/Sabre/DAV/Exception/InvalidResourceType.php (renamed from 3dparty/Sabre/DAV/Exception/InvalidResourceType.php)0
-rw-r--r--3rdparty/Sabre/DAV/Exception/LockTokenMatchesRequestUri.php (renamed from 3dparty/Sabre/DAV/Exception/LockTokenMatchesRequestUri.php)0
-rw-r--r--3rdparty/Sabre/DAV/Exception/Locked.php (renamed from 3dparty/Sabre/DAV/Exception/Locked.php)0
-rw-r--r--3rdparty/Sabre/DAV/Exception/MethodNotAllowed.php (renamed from 3dparty/Sabre/DAV/Exception/MethodNotAllowed.php)0
-rw-r--r--3rdparty/Sabre/DAV/Exception/NotAuthenticated.php (renamed from 3dparty/Sabre/DAV/Exception/NotAuthenticated.php)0
-rw-r--r--3rdparty/Sabre/DAV/Exception/NotImplemented.php (renamed from 3dparty/Sabre/DAV/Exception/NotImplemented.php)0
-rw-r--r--3rdparty/Sabre/DAV/Exception/PreconditionFailed.php (renamed from 3dparty/Sabre/DAV/Exception/PreconditionFailed.php)0
-rw-r--r--3rdparty/Sabre/DAV/Exception/ReportNotImplemented.php (renamed from 3dparty/Sabre/DAV/Exception/ReportNotImplemented.php)0
-rw-r--r--3rdparty/Sabre/DAV/Exception/RequestedRangeNotSatisfiable.php (renamed from 3dparty/Sabre/DAV/Exception/RequestedRangeNotSatisfiable.php)0
-rw-r--r--3rdparty/Sabre/DAV/Exception/UnsupportedMediaType.php (renamed from 3dparty/Sabre/DAV/Exception/UnsupportedMediaType.php)0
-rw-r--r--3rdparty/Sabre/DAV/FS/Directory.php (renamed from 3dparty/Sabre/DAV/FS/Directory.php)0
-rw-r--r--3rdparty/Sabre/DAV/FS/File.php (renamed from 3dparty/Sabre/DAV/FS/File.php)0
-rw-r--r--3rdparty/Sabre/DAV/FS/Node.php (renamed from 3dparty/Sabre/DAV/FS/Node.php)0
-rw-r--r--3rdparty/Sabre/DAV/FSExt/Directory.php (renamed from 3dparty/Sabre/DAV/FSExt/Directory.php)0
-rw-r--r--3rdparty/Sabre/DAV/FSExt/File.php (renamed from 3dparty/Sabre/DAV/FSExt/File.php)0
-rw-r--r--3rdparty/Sabre/DAV/FSExt/Node.php (renamed from 3dparty/Sabre/DAV/FSExt/Node.php)0
-rw-r--r--3rdparty/Sabre/DAV/File.php (renamed from 3dparty/Sabre/DAV/File.php)0
-rw-r--r--3rdparty/Sabre/DAV/ICollection.php (renamed from 3dparty/Sabre/DAV/ICollection.php)0
-rw-r--r--3rdparty/Sabre/DAV/IExtendedCollection.php (renamed from 3dparty/Sabre/DAV/IExtendedCollection.php)0
-rw-r--r--3rdparty/Sabre/DAV/IFile.php (renamed from 3dparty/Sabre/DAV/IFile.php)0
-rw-r--r--3rdparty/Sabre/DAV/ILockable.php (renamed from 3dparty/Sabre/DAV/ILockable.php)0
-rw-r--r--3rdparty/Sabre/DAV/INode.php (renamed from 3dparty/Sabre/DAV/INode.php)0
-rw-r--r--3rdparty/Sabre/DAV/IProperties.php (renamed from 3dparty/Sabre/DAV/IProperties.php)0
-rw-r--r--3rdparty/Sabre/DAV/IQuota.php (renamed from 3dparty/Sabre/DAV/IQuota.php)0
-rw-r--r--3rdparty/Sabre/DAV/Locks/Backend/Abstract.php (renamed from 3dparty/Sabre/DAV/Locks/Backend/Abstract.php)0
-rw-r--r--3rdparty/Sabre/DAV/Locks/Backend/FS.php (renamed from 3dparty/Sabre/DAV/Locks/Backend/FS.php)0
-rw-r--r--3rdparty/Sabre/DAV/Locks/Backend/File.php (renamed from 3dparty/Sabre/DAV/Locks/Backend/File.php)0
-rw-r--r--3rdparty/Sabre/DAV/Locks/Backend/PDO.php (renamed from 3dparty/Sabre/DAV/Locks/Backend/PDO.php)0
-rw-r--r--3rdparty/Sabre/DAV/Locks/LockInfo.php (renamed from 3dparty/Sabre/DAV/Locks/LockInfo.php)0
-rw-r--r--3rdparty/Sabre/DAV/Locks/Plugin.php (renamed from 3dparty/Sabre/DAV/Locks/Plugin.php)0
-rw-r--r--3rdparty/Sabre/DAV/Mount/Plugin.php (renamed from 3dparty/Sabre/DAV/Mount/Plugin.php)0
-rw-r--r--3rdparty/Sabre/DAV/Node.php (renamed from 3dparty/Sabre/DAV/Node.php)0
-rw-r--r--3rdparty/Sabre/DAV/ObjectTree.php (renamed from 3dparty/Sabre/DAV/ObjectTree.php)1
-rw-r--r--3rdparty/Sabre/DAV/Property.php (renamed from 3dparty/Sabre/DAV/Property.php)0
-rw-r--r--3rdparty/Sabre/DAV/Property/GetLastModified.php (renamed from 3dparty/Sabre/DAV/Property/GetLastModified.php)0
-rw-r--r--3rdparty/Sabre/DAV/Property/Href.php (renamed from 3dparty/Sabre/DAV/Property/Href.php)0
-rw-r--r--3rdparty/Sabre/DAV/Property/HrefList.php (renamed from 3dparty/Sabre/DAV/Property/HrefList.php)0
-rw-r--r--3rdparty/Sabre/DAV/Property/IHref.php (renamed from 3dparty/Sabre/DAV/Property/IHref.php)0
-rw-r--r--3rdparty/Sabre/DAV/Property/LockDiscovery.php (renamed from 3dparty/Sabre/DAV/Property/LockDiscovery.php)0
-rw-r--r--3rdparty/Sabre/DAV/Property/ResourceType.php (renamed from 3dparty/Sabre/DAV/Property/ResourceType.php)0
-rw-r--r--3rdparty/Sabre/DAV/Property/Response.php (renamed from 3dparty/Sabre/DAV/Property/Response.php)0
-rw-r--r--3rdparty/Sabre/DAV/Property/ResponseList.php (renamed from 3dparty/Sabre/DAV/Property/ResponseList.php)0
-rw-r--r--3rdparty/Sabre/DAV/Property/SupportedLock.php (renamed from 3dparty/Sabre/DAV/Property/SupportedLock.php)0
-rw-r--r--3rdparty/Sabre/DAV/Property/SupportedReportSet.php (renamed from 3dparty/Sabre/DAV/Property/SupportedReportSet.php)0
-rw-r--r--3rdparty/Sabre/DAV/Server.php (renamed from 3dparty/Sabre/DAV/Server.php)18
-rw-r--r--3rdparty/Sabre/DAV/ServerPlugin.php (renamed from 3dparty/Sabre/DAV/ServerPlugin.php)0
-rw-r--r--3rdparty/Sabre/DAV/SimpleCollection.php (renamed from 3dparty/Sabre/DAV/SimpleDirectory.php)6
-rw-r--r--3rdparty/Sabre/DAV/SimpleDirectory.php21
-rw-r--r--3rdparty/Sabre/DAV/StringUtil.php (renamed from 3dparty/Sabre/DAV/StringUtil.php)0
-rw-r--r--3rdparty/Sabre/DAV/TemporaryFileFilterPlugin.php (renamed from 3dparty/Sabre/DAV/TemporaryFileFilterPlugin.php)0
-rw-r--r--3rdparty/Sabre/DAV/Tree.php (renamed from 3dparty/Sabre/DAV/Tree.php)0
-rw-r--r--3rdparty/Sabre/DAV/Tree/Filesystem.php (renamed from 3dparty/Sabre/DAV/Tree/Filesystem.php)0
-rw-r--r--3rdparty/Sabre/DAV/URLUtil.php (renamed from 3dparty/Sabre/DAV/URLUtil.php)0
-rw-r--r--3rdparty/Sabre/DAV/UUIDUtil.php (renamed from 3dparty/Sabre/DAV/UUIDUtil.php)0
-rw-r--r--3rdparty/Sabre/DAV/Version.php (renamed from 3dparty/Sabre/DAV/Version.php)0
-rw-r--r--3rdparty/Sabre/DAV/XMLUtil.php (renamed from 3dparty/Sabre/DAV/XMLUtil.php)0
-rw-r--r--3rdparty/Sabre/DAVACL/AbstractPrincipalCollection.php (renamed from 3dparty/Sabre/DAVACL/AbstractPrincipalCollection.php)2
-rw-r--r--3rdparty/Sabre/DAVACL/Exception/AceConflict.php (renamed from 3dparty/Sabre/DAVACL/Exception/AceConflict.php)0
-rw-r--r--3rdparty/Sabre/DAVACL/Exception/NeedPrivileges.php (renamed from 3dparty/Sabre/DAVACL/Exception/NeedPrivileges.php)0
-rw-r--r--3rdparty/Sabre/DAVACL/Exception/NoAbstract.php (renamed from 3dparty/Sabre/DAVACL/Exception/NoAbstract.php)0
-rw-r--r--3rdparty/Sabre/DAVACL/Exception/NotRecognizedPrincipal.php (renamed from 3dparty/Sabre/DAVACL/Exception/NotRecognizedPrincipal.php)0
-rw-r--r--3rdparty/Sabre/DAVACL/Exception/NotSupportedPrivilege.php (renamed from 3dparty/Sabre/DAVACL/Exception/NotSupportedPrivilege.php)0
-rw-r--r--3rdparty/Sabre/DAVACL/IACL.php (renamed from 3dparty/Sabre/DAVACL/IACL.php)0
-rw-r--r--3rdparty/Sabre/DAVACL/IPrincipal.php (renamed from 3dparty/Sabre/DAVACL/IPrincipal.php)0
-rw-r--r--3rdparty/Sabre/DAVACL/IPrincipalBackend.php (renamed from 3dparty/Sabre/DAVACL/IPrincipalBackend.php)0
-rw-r--r--3rdparty/Sabre/DAVACL/Plugin.php (renamed from 3dparty/Sabre/DAVACL/Plugin.php)0
-rw-r--r--3rdparty/Sabre/DAVACL/Principal.php (renamed from 3dparty/Sabre/DAVACL/Principal.php)0
-rw-r--r--3rdparty/Sabre/DAVACL/PrincipalBackend/PDO.php (renamed from 3dparty/Sabre/DAVACL/PrincipalBackend/PDO.php)0
-rw-r--r--3rdparty/Sabre/DAVACL/PrincipalCollection.php (renamed from 3dparty/Sabre/DAVACL/PrincipalCollection.php)0
-rw-r--r--3rdparty/Sabre/DAVACL/Property/Acl.php (renamed from 3dparty/Sabre/DAVACL/Property/Acl.php)0
-rw-r--r--3rdparty/Sabre/DAVACL/Property/CurrentUserPrivilegeSet.php (renamed from 3dparty/Sabre/DAVACL/Property/CurrentUserPrivilegeSet.php)0
-rw-r--r--3rdparty/Sabre/DAVACL/Property/Principal.php (renamed from 3dparty/Sabre/DAVACL/Property/Principal.php)0
-rw-r--r--3rdparty/Sabre/DAVACL/Property/SupportedPrivilegeSet.php (renamed from 3dparty/Sabre/DAVACL/Property/SupportedPrivilegeSet.php)0
-rw-r--r--3rdparty/Sabre/DAVACL/Version.php (renamed from 3dparty/Sabre/DAVACL/Version.php)0
-rw-r--r--3rdparty/Sabre/HTTP/AWSAuth.php (renamed from 3dparty/Sabre/HTTP/AWSAuth.php)0
-rw-r--r--3rdparty/Sabre/HTTP/AbstractAuth.php (renamed from 3dparty/Sabre/HTTP/AbstractAuth.php)0
-rw-r--r--3rdparty/Sabre/HTTP/BasicAuth.php (renamed from 3dparty/Sabre/HTTP/BasicAuth.php)0
-rw-r--r--3rdparty/Sabre/HTTP/DigestAuth.php (renamed from 3dparty/Sabre/HTTP/DigestAuth.php)0
-rw-r--r--3rdparty/Sabre/HTTP/Request.php (renamed from 3dparty/Sabre/HTTP/Request.php)0
-rw-r--r--3rdparty/Sabre/HTTP/Response.php (renamed from 3dparty/Sabre/HTTP/Response.php)0
-rw-r--r--3rdparty/Sabre/HTTP/Util.php (renamed from 3dparty/Sabre/HTTP/Util.php)0
-rw-r--r--3rdparty/Sabre/HTTP/Version.php (renamed from 3dparty/Sabre/HTTP/Version.php)0
-rw-r--r--3rdparty/Sabre/VObject/Component.php (renamed from 3dparty/Sabre/VObject/Component.php)0
-rw-r--r--3rdparty/Sabre/VObject/Element.php (renamed from 3dparty/Sabre/VObject/Element.php)0
-rw-r--r--3rdparty/Sabre/VObject/Element/DateTime.php (renamed from 3dparty/Sabre/VObject/Element/DateTime.php)0
-rw-r--r--3rdparty/Sabre/VObject/Element/MultiDateTime.php (renamed from 3dparty/Sabre/VObject/Element/MultiDateTime.php)0
-rw-r--r--3rdparty/Sabre/VObject/ElementList.php (renamed from 3dparty/Sabre/VObject/ElementList.php)0
-rw-r--r--3rdparty/Sabre/VObject/Node.php (renamed from 3dparty/Sabre/VObject/Node.php)0
-rw-r--r--3rdparty/Sabre/VObject/Parameter.php (renamed from 3dparty/Sabre/VObject/Parameter.php)0
-rw-r--r--3rdparty/Sabre/VObject/ParseException.php (renamed from 3dparty/Sabre/VObject/ParseException.php)0
-rw-r--r--3rdparty/Sabre/VObject/Property.php (renamed from 3dparty/Sabre/VObject/Property.php)0
-rw-r--r--3rdparty/Sabre/VObject/Reader.php (renamed from 3dparty/Sabre/VObject/Reader.php)12
-rw-r--r--3rdparty/Sabre/VObject/Version.php (renamed from 3dparty/Sabre/VObject/Version.php)0
-rw-r--r--3rdparty/Sabre/VObject/includes.php (renamed from 3dparty/Sabre/VObject/includes.php)0
-rw-r--r--3rdparty/Sabre/autoload.php (renamed from 3dparty/Sabre/autoload.php)0
-rw-r--r--3rdparty/System.php (renamed from 3dparty/System.php)0
-rw-r--r--3rdparty/XML/Parser.php (renamed from 3dparty/XML/Parser.php)0
-rw-r--r--3rdparty/XML/RPC.php (renamed from 3dparty/XML/RPC.php)0
-rw-r--r--3rdparty/XML/RPC/Server.php (renamed from 3dparty/XML/RPC/Server.php)0
-rw-r--r--AUTHORS20
-rw-r--r--COPYING-README12
-rw-r--r--README20
-rw-r--r--admin/templates/app.php9
-rw-r--r--admin/templates/apps.php8
-rw-r--r--admin/templates/appsinst.php11
-rw-r--r--apps/contacts/appinfo/app.php18
-rw-r--r--apps/contacts/appinfo/database.xml129
-rw-r--r--apps/contacts/appinfo/info.xml9
-rw-r--r--apps/contacts/carddav.php28
-rw-r--r--apps/contacts/css/styles.css1
-rw-r--r--apps/contacts/details.php57
-rw-r--r--apps/contacts/img/icon.pngbin0 -> 741 bytes
-rw-r--r--apps/contacts/index.php77
-rw-r--r--apps/contacts/js/interface.js19
-rw-r--r--apps/contacts/lib/addressbook.php287
-rw-r--r--apps/contacts/lib/connector_sabre.php186
-rw-r--r--apps/contacts/photo.php85
-rw-r--r--apps/contacts/templates/_contacts.php3
-rw-r--r--apps/contacts/templates/_details.php4
-rw-r--r--apps/contacts/templates/index.php24
-rw-r--r--apps/contacts/temporaryupdate.php13
-rw-r--r--apps/files_publiclink/appinfo/app.php2
-rw-r--r--apps/files_publiclink/get.php2
-rw-r--r--apps/files_textviewer/appinfo/app.php5
-rw-r--r--apps/files_textviewer/appinfo/info.xml9
-rw-r--r--apps/files_textviewer/css/style.css38
-rw-r--r--apps/files_textviewer/css/syntaxhighlighter/shCore.css226
-rw-r--r--apps/files_textviewer/css/syntaxhighlighter/shCoreDefault.css328
-rw-r--r--apps/files_textviewer/css/syntaxhighlighter/shCoreDjango.css331
-rw-r--r--apps/files_textviewer/css/syntaxhighlighter/shCoreEclipse.css339
-rw-r--r--apps/files_textviewer/css/syntaxhighlighter/shCoreEmacs.css324
-rw-r--r--apps/files_textviewer/css/syntaxhighlighter/shCoreFadeToGrey.css328
-rw-r--r--apps/files_textviewer/css/syntaxhighlighter/shCoreMDUltra.css324
-rw-r--r--apps/files_textviewer/css/syntaxhighlighter/shCoreMidnight.css324
-rw-r--r--apps/files_textviewer/css/syntaxhighlighter/shCoreRDark.css324
-rw-r--r--apps/files_textviewer/css/syntaxhighlighter/shThemeDefault.css117
-rw-r--r--apps/files_textviewer/css/syntaxhighlighter/shThemeDjango.css120
-rw-r--r--apps/files_textviewer/css/syntaxhighlighter/shThemeEclipse.css128
-rw-r--r--apps/files_textviewer/css/syntaxhighlighter/shThemeEmacs.css113
-rw-r--r--apps/files_textviewer/css/syntaxhighlighter/shThemeFadeToGrey.css117
-rw-r--r--apps/files_textviewer/css/syntaxhighlighter/shThemeMDUltra.css113
-rw-r--r--apps/files_textviewer/css/syntaxhighlighter/shThemeMidnight.css113
-rw-r--r--apps/files_textviewer/css/syntaxhighlighter/shThemeRDark.css113
-rw-r--r--apps/files_textviewer/js/syntaxhighlighter/LGPL-LICENSE165
-rw-r--r--apps/files_textviewer/js/syntaxhighlighter/MIT-LICENSE20
-rw-r--r--apps/files_textviewer/js/syntaxhighlighter/shAutoloader.js17
-rw-r--r--apps/files_textviewer/js/syntaxhighlighter/shBrushAS3.js59
-rw-r--r--apps/files_textviewer/js/syntaxhighlighter/shBrushAppleScript.js75
-rw-r--r--apps/files_textviewer/js/syntaxhighlighter/shBrushBash.js59
-rw-r--r--apps/files_textviewer/js/syntaxhighlighter/shBrushCSharp.js65
-rw-r--r--apps/files_textviewer/js/syntaxhighlighter/shBrushColdFusion.js100
-rw-r--r--apps/files_textviewer/js/syntaxhighlighter/shBrushCpp.js97
-rw-r--r--apps/files_textviewer/js/syntaxhighlighter/shBrushCss.js91
-rw-r--r--apps/files_textviewer/js/syntaxhighlighter/shBrushDelphi.js55
-rw-r--r--apps/files_textviewer/js/syntaxhighlighter/shBrushDiff.js41
-rw-r--r--apps/files_textviewer/js/syntaxhighlighter/shBrushErlang.js52
-rw-r--r--apps/files_textviewer/js/syntaxhighlighter/shBrushGroovy.js67
-rw-r--r--apps/files_textviewer/js/syntaxhighlighter/shBrushJScript.js52
-rw-r--r--apps/files_textviewer/js/syntaxhighlighter/shBrushJava.js57
-rw-r--r--apps/files_textviewer/js/syntaxhighlighter/shBrushJavaFX.js58
-rw-r--r--apps/files_textviewer/js/syntaxhighlighter/shBrushPerl.js72
-rw-r--r--apps/files_textviewer/js/syntaxhighlighter/shBrushPhp.js88
-rw-r--r--apps/files_textviewer/js/syntaxhighlighter/shBrushPlain.js33
-rw-r--r--apps/files_textviewer/js/syntaxhighlighter/shBrushPowerShell.js74
-rw-r--r--apps/files_textviewer/js/syntaxhighlighter/shBrushPython.js64
-rw-r--r--apps/files_textviewer/js/syntaxhighlighter/shBrushRuby.js55
-rw-r--r--apps/files_textviewer/js/syntaxhighlighter/shBrushSass.js94
-rw-r--r--apps/files_textviewer/js/syntaxhighlighter/shBrushScala.js51
-rw-r--r--apps/files_textviewer/js/syntaxhighlighter/shBrushSql.js66
-rw-r--r--apps/files_textviewer/js/syntaxhighlighter/shBrushVb.js56
-rw-r--r--apps/files_textviewer/js/syntaxhighlighter/shBrushXml.js69
-rw-r--r--apps/files_textviewer/js/syntaxhighlighter/shCore.js17
-rw-r--r--apps/files_textviewer/js/syntaxhighlighter/shLegacy.js17
-rw-r--r--apps/files_textviewer/js/textviewer.js131
-rw-r--r--apps/media/ajax/api.php78
-rw-r--r--apps/media/appinfo/app.php7
-rw-r--r--apps/media/index.php1
-rw-r--r--apps/media/js/collection.js42
-rw-r--r--apps/media/js/loader.js (renamed from apps/media/js/files.js)17
-rw-r--r--apps/media/js/music.js20
-rw-r--r--apps/media/js/player.js88
-rw-r--r--apps/media/js/playlist.js1
-rw-r--r--apps/media/js/scanner.js78
-rw-r--r--apps/media/lib_collection.php46
-rw-r--r--apps/media/lib_scanner.php66
-rw-r--r--apps/media/settings.php52
-rw-r--r--apps/media/templates/collection.php9
-rw-r--r--apps/user_openid/appinfo/app.php16
-rw-r--r--apps/user_openid/phpmyid.php10
-rw-r--r--apps/user_openid/settings.php23
-rw-r--r--apps/user_openid/templates/settings.php7
-rw-r--r--core/css/styles.css29
-rw-r--r--core/img/body_background.jpgbin305 -> 0 bytes
-rw-r--r--core/js/js.js65
-rw-r--r--core/js/setup.js14
-rw-r--r--core/templates/installation.php24
-rw-r--r--core/templates/layout.admin.php3
-rw-r--r--core/templates/layout.guest.php4
-rw-r--r--core/templates/layout.user.php9
-rw-r--r--core/templates/part.searchbox.php2
-rw-r--r--db_structure.xml96
-rw-r--r--files/css/files.css23
-rw-r--r--files/js/fileactions.js24
-rw-r--r--files/js/filelist.js69
-rw-r--r--files/js/files.js51
-rw-r--r--files/templates/index.php1
-rw-r--r--files/templates/part.list.php4
-rw-r--r--files/webdav.php23
-rw-r--r--help/templates/index.php5
-rw-r--r--index.php6
-rw-r--r--lib/base.php80
-rw-r--r--lib/connector/sabre/principal.php181
-rwxr-xr-xlib/crypt.php62
-rw-r--r--lib/db.php39
-rwxr-xr-xlib/helper.php2
-rw-r--r--lib/log.php4
-rw-r--r--lib/ocs.php2
-rw-r--r--lib/search/provider/file.php9
-rw-r--r--lib/setup.php102
-rw-r--r--lib/template.php33
-rw-r--r--lib/util.php16
-rw-r--r--log/appinfo/app.php4
-rw-r--r--log/index.php3
-rw-r--r--log/templates/index.php5
-rw-r--r--search/css/results.css18
-rw-r--r--search/css/search.css17
-rw-r--r--settings/ajax/openid.php26
-rw-r--r--settings/index.php5
-rw-r--r--settings/js/main.js13
-rw-r--r--settings/templates/index.php11
353 files changed, 9074 insertions, 472 deletions
diff --git a/3dparty/COPYING-PHP b/3rdparty/COPYING-PHP
index 3cc8b777b77..3cc8b777b77 100644
--- a/3dparty/COPYING-PHP
+++ b/3rdparty/COPYING-PHP
diff --git a/3dparty/COPYING-README b/3rdparty/COPYING-README
index 2450ef15813..2450ef15813 100644
--- a/3dparty/COPYING-README
+++ b/3rdparty/COPYING-README
diff --git a/3dparty/Console/Getopt.php b/3rdparty/Console/Getopt.php
index aec980b34d5..aec980b34d5 100644
--- a/3dparty/Console/Getopt.php
+++ b/3rdparty/Console/Getopt.php
diff --git a/3rdparty/Crypt_Blowfish/Blowfish.php b/3rdparty/Crypt_Blowfish/Blowfish.php
new file mode 100644
index 00000000000..a7b8948f043
--- /dev/null
+++ b/3rdparty/Crypt_Blowfish/Blowfish.php
@@ -0,0 +1,317 @@
+<?php
+/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
+
+/**
+ * Crypt_Blowfish allows for encryption and decryption on the fly using
+ * the Blowfish algorithm. Crypt_Blowfish does not require the mcrypt
+ * PHP extension, it uses only PHP.
+ * Crypt_Blowfish support encryption/decryption with or without a secret key.
+ *
+ *
+ * PHP versions 4 and 5
+ *
+ * LICENSE: This source file is subject to version 3.0 of the PHP license
+ * that is available through the world-wide-web at the following URI:
+ * 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 web, please
+ * send a note to license@php.net so we can mail you a copy immediately.
+ *
+ * @category Encryption
+ * @package Crypt_Blowfish
+ * @author Matthew Fonda <mfonda@php.net>
+ * @copyright 2005 Matthew Fonda
+ * @license http://www.php.net/license/3_0.txt PHP License 3.0
+ * @version CVS: $Id: Blowfish.php,v 1.81 2005/05/30 18:40:36 mfonda Exp $
+ * @link http://pear.php.net/package/Crypt_Blowfish
+ */
+
+
+require_once 'PEAR.php';
+
+
+/**
+ *
+ * Example usage:
+ * $bf = new Crypt_Blowfish('some secret key!');
+ * $encrypted = $bf->encrypt('this is some example plain text');
+ * $plaintext = $bf->decrypt($encrypted);
+ * echo "plain text: $plaintext";
+ *
+ *
+ * @category Encryption
+ * @package Crypt_Blowfish
+ * @author Matthew Fonda <mfonda@php.net>
+ * @copyright 2005 Matthew Fonda
+ * @license http://www.php.net/license/3_0.txt PHP License 3.0
+ * @link http://pear.php.net/package/Crypt_Blowfish
+ * @version @package_version@
+ * @access public
+ */
+class Crypt_Blowfish
+{
+ /**
+ * P-Array contains 18 32-bit subkeys
+ *
+ * @var array
+ * @access private
+ */
+ var $_P = array();
+
+
+ /**
+ * Array of four S-Blocks each containing 256 32-bit entries
+ *
+ * @var array
+ * @access private
+ */
+ var $_S = array();
+
+ /**
+ * Mcrypt td resource
+ *
+ * @var resource
+ * @access private
+ */
+ var $_td = null;
+
+ /**
+ * Initialization vector
+ *
+ * @var string
+ * @access private
+ */
+ var $_iv = null;
+
+
+ /**
+ * Crypt_Blowfish Constructor
+ * Initializes the Crypt_Blowfish object, and gives a sets
+ * the secret key
+ *
+ * @param string $key
+ * @access public
+ */
+ function Crypt_Blowfish($key)
+ {
+ if (extension_loaded('mcrypt')) {
+ $this->_td = mcrypt_module_open(MCRYPT_BLOWFISH, '', 'ecb', '');
+ $this->_iv = mcrypt_create_iv(8, MCRYPT_RAND);
+ }
+ $this->setKey($key);
+ }
+
+ /**
+ * Deprecated isReady method
+ *
+ * @return bool
+ * @access public
+ * @deprecated
+ */
+ function isReady()
+ {
+ return true;
+ }
+
+ /**
+ * Deprecated init method - init is now a private
+ * method and has been replaced with _init
+ *
+ * @return bool
+ * @access public
+ * @deprecated
+ * @see Crypt_Blowfish::_init()
+ */
+ function init()
+ {
+ $this->_init();
+ }
+
+ /**
+ * Initializes the Crypt_Blowfish object
+ *
+ * @access private
+ */
+ function _init()
+ {
+ $defaults = new Crypt_Blowfish_DefaultKey();
+ $this->_P = $defaults->P;
+ $this->_S = $defaults->S;
+ }
+
+ /**
+ * Enciphers a single 64 bit block
+ *
+ * @param int &$Xl
+ * @param int &$Xr
+ * @access private
+ */
+ function _encipher(&$Xl, &$Xr)
+ {
+ for ($i = 0; $i < 16; $i++) {
+ $temp = $Xl ^ $this->_P[$i];
+ $Xl = ((($this->_S[0][($temp>>24) & 255] +
+ $this->_S[1][($temp>>16) & 255]) ^
+ $this->_S[2][($temp>>8) & 255]) +
+ $this->_S[3][$temp & 255]) ^ $Xr;
+ $Xr = $temp;
+ }
+ $Xr = $Xl ^ $this->_P[16];
+ $Xl = $temp ^ $this->_P[17];
+ }
+
+
+ /**
+ * Deciphers a single 64 bit block
+ *
+ * @param int &$Xl
+ * @param int &$Xr
+ * @access private
+ */
+ function _decipher(&$Xl, &$Xr)
+ {
+ for ($i = 17; $i > 1; $i--) {
+ $temp = $Xl ^ $this->_P[$i];
+ $Xl = ((($this->_S[0][($temp>>24) & 255] +
+ $this->_S[1][($temp>>16) & 255]) ^
+ $this->_S[2][($temp>>8) & 255]) +
+ $this->_S[3][$temp & 255]) ^ $Xr;
+ $Xr = $temp;
+ }
+ $Xr = $Xl ^ $this->_P[1];
+ $Xl = $temp ^ $this->_P[0];
+ }
+
+
+ /**
+ * Encrypts a string
+ *
+ * @param string $plainText
+ * @return string Returns cipher text on success, PEAR_Error on failure
+ * @access public
+ */
+ function encrypt($plainText)
+ {
+ if (!is_string($plainText)) {
+ PEAR::raiseError('Plain text must be a string', 0, PEAR_ERROR_DIE);
+ }
+
+ if (extension_loaded('mcrypt')) {
+ return mcrypt_generic($this->_td, $plainText);
+ }
+
+ $cipherText = '';
+ $len = strlen($plainText);
+ $plainText .= str_repeat(chr(0),(8 - ($len%8))%8);
+ for ($i = 0; $i < $len; $i += 8) {
+ list(,$Xl,$Xr) = unpack("N2",substr($plainText,$i,8));
+ $this->_encipher($Xl, $Xr);
+ $cipherText .= pack("N2", $Xl, $Xr);
+ }
+ return $cipherText;
+ }
+
+
+ /**
+ * Decrypts an encrypted string
+ *
+ * @param string $cipherText
+ * @return string Returns plain text on success, PEAR_Error on failure
+ * @access public
+ */
+ function decrypt($cipherText)
+ {
+ if (!is_string($cipherText)) {
+ PEAR::raiseError('Chiper text must be a string', 1, PEAR_ERROR_DIE);
+ }
+
+ if (extension_loaded('mcrypt')) {
+ return mdecrypt_generic($this->_td, $cipherText);
+ }
+
+ $plainText = '';
+ $len = strlen($cipherText);
+ $cipherText .= str_repeat(chr(0),(8 - ($len%8))%8);
+ for ($i = 0; $i < $len; $i += 8) {
+ list(,$Xl,$Xr) = unpack("N2",substr($cipherText,$i,8));
+ $this->_decipher($Xl, $Xr);
+ $plainText .= pack("N2", $Xl, $Xr);
+ }
+ return $plainText;
+ }
+
+
+ /**
+ * Sets the secret key
+ * The key must be non-zero, and less than or equal to
+ * 56 characters in length.
+ *
+ * @param string $key
+ * @return bool Returns true on success, PEAR_Error on failure
+ * @access public
+ */
+ function setKey($key)
+ {
+ if (!is_string($key)) {
+ PEAR::raiseError('Key must be a string', 2, PEAR_ERROR_DIE);
+ }
+
+ $len = strlen($key);
+
+ if ($len > 56 || $len == 0) {
+ PEAR::raiseError('Key must be less than 56 characters and non-zero. Supplied key length: ' . $len, 3, PEAR_ERROR_DIE);
+ }
+
+ if (extension_loaded('mcrypt')) {
+ mcrypt_generic_init($this->_td, $key, $this->_iv);
+ return true;
+ }
+
+ require_once 'Blowfish/DefaultKey.php';
+ $this->_init();
+
+ $k = 0;
+ $data = 0;
+ $datal = 0;
+ $datar = 0;
+
+ for ($i = 0; $i < 18; $i++) {
+ $data = 0;
+ for ($j = 4; $j > 0; $j--) {
+ $data = $data << 8 | ord($key{$k});
+ $k = ($k+1) % $len;
+ }
+ $this->_P[$i] ^= $data;
+ }
+
+ for ($i = 0; $i <= 16; $i += 2) {
+ $this->_encipher($datal, $datar);
+ $this->_P[$i] = $datal;
+ $this->_P[$i+1] = $datar;
+ }
+ for ($i = 0; $i < 256; $i += 2) {
+ $this->_encipher($datal, $datar);
+ $this->_S[0][$i] = $datal;
+ $this->_S[0][$i+1] = $datar;
+ }
+ for ($i = 0; $i < 256; $i += 2) {
+ $this->_encipher($datal, $datar);
+ $this->_S[1][$i] = $datal;
+ $this->_S[1][$i+1] = $datar;
+ }
+ for ($i = 0; $i < 256; $i += 2) {
+ $this->_encipher($datal, $datar);
+ $this->_S[2][$i] = $datal;
+ $this->_S[2][$i+1] = $datar;
+ }
+ for ($i = 0; $i < 256; $i += 2) {
+ $this->_encipher($datal, $datar);
+ $this->_S[3][$i] = $datal;
+ $this->_S[3][$i+1] = $datar;
+ }
+
+ return true;
+ }
+
+}
+
+?>
diff --git a/3rdparty/Crypt_Blowfish/Blowfish/DefaultKey.php b/3rdparty/Crypt_Blowfish/Blowfish/DefaultKey.php
new file mode 100644
index 00000000000..2ff8ac788a6
--- /dev/null
+++ b/3rdparty/Crypt_Blowfish/Blowfish/DefaultKey.php
@@ -0,0 +1,327 @@
+<?php
+/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
+
+/**
+ * Crypt_Blowfish allows for encryption and decryption on the fly using
+ * the Blowfish algorithm. Crypt_Blowfish does not require the mcrypt
+ * PHP extension, it uses only PHP.
+ * Crypt_Blowfish support encryption/decryption with or without a secret key.
+ *
+ *
+ * PHP versions 4 and 5
+ *
+ * LICENSE: This source file is subject to version 3.0 of the PHP license
+ * that is available through the world-wide-web at the following URI:
+ * 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 web, please
+ * send a note to license@php.net so we can mail you a copy immediately.
+ *
+ * @category Encryption
+ * @package Crypt_Blowfish
+ * @author Matthew Fonda <mfonda@php.net>
+ * @copyright 2005 Matthew Fonda
+ * @license http://www.php.net/license/3_0.txt PHP License 3.0
+ * @version CVS: $Id: DefaultKey.php,v 1.81 2005/05/30 18:40:37 mfonda Exp $
+ * @link http://pear.php.net/package/Crypt_Blowfish
+ */
+
+
+/**
+ * Class containing default key
+ *
+ * @category Encryption
+ * @package Crypt_Blowfish
+ * @author Matthew Fonda <mfonda@php.net>
+ * @copyright 2005 Matthew Fonda
+ * @license http://www.php.net/license/3_0.txt PHP License 3.0
+ * @link http://pear.php.net/package/Crypt_Blowfish
+ * @version @package_version@
+ * @access public
+ */
+class Crypt_Blowfish_DefaultKey
+{
+ var $P = array();
+
+ var $S = array();
+
+ function Crypt_Blowfish_DefaultKey()
+ {
+ $this->P = array(
+ 0x243F6A88, 0x85A308D3, 0x13198A2E, 0x03707344,
+ 0xA4093822, 0x299F31D0, 0x082EFA98, 0xEC4E6C89,
+ 0x452821E6, 0x38D01377, 0xBE5466CF, 0x34E90C6C,
+ 0xC0AC29B7, 0xC97C50DD, 0x3F84D5B5, 0xB5470917,
+ 0x9216D5D9, 0x8979FB1B
+ );
+
+ $this->S = array(
+ array(
+ 0xD1310BA6, 0x98DFB5AC, 0x2FFD72DB, 0xD01ADFB7,
+ 0xB8E1AFED, 0x6A267E96, 0xBA7C9045, 0xF12C7F99,
+ 0x24A19947, 0xB3916CF7, 0x0801F2E2, 0x858EFC16,
+ 0x636920D8, 0x71574E69, 0xA458FEA3, 0xF4933D7E,
+ 0x0D95748F, 0x728EB658, 0x718BCD58, 0x82154AEE,
+ 0x7B54A41D, 0xC25A59B5, 0x9C30D539, 0x2AF26013,
+ 0xC5D1B023, 0x286085F0, 0xCA417918, 0xB8DB38EF,
+ 0x8E79DCB0, 0x603A180E, 0x6C9E0E8B, 0xB01E8A3E,
+ 0xD71577C1, 0xBD314B27, 0x78AF2FDA, 0x55605C60,
+ 0xE65525F3, 0xAA55AB94, 0x57489862, 0x63E81440,
+ 0x55CA396A, 0x2AAB10B6, 0xB4CC5C34, 0x1141E8CE,
+ 0xA15486AF, 0x7C72E993, 0xB3EE1411, 0x636FBC2A,
+ 0x2BA9C55D, 0x741831F6, 0xCE5C3E16, 0x9B87931E,
+ 0xAFD6BA33, 0x6C24CF5C, 0x7A325381, 0x28958677,
+ 0x3B8F4898, 0x6B4BB9AF, 0xC4BFE81B, 0x66282193,
+ 0x61D809CC, 0xFB21A991, 0x487CAC60, 0x5DEC8032,
+ 0xEF845D5D, 0xE98575B1, 0xDC262302, 0xEB651B88,
+ 0x23893E81, 0xD396ACC5, 0x0F6D6FF3, 0x83F44239,
+ 0x2E0B4482, 0xA4842004, 0x69C8F04A, 0x9E1F9B5E,
+ 0x21C66842, 0xF6E96C9A, 0x670C9C61, 0xABD388F0,
+ 0x6A51A0D2, 0xD8542F68, 0x960FA728, 0xAB5133A3,
+ 0x6EEF0B6C, 0x137A3BE4, 0xBA3BF050, 0x7EFB2A98,
+ 0xA1F1651D, 0x39AF0176, 0x66CA593E, 0x82430E88,
+ 0x8CEE8619, 0x456F9FB4, 0x7D84A5C3, 0x3B8B5EBE,
+ 0xE06F75D8, 0x85C12073, 0x401A449F, 0x56C16AA6,
+ 0x4ED3AA62, 0x363F7706, 0x1BFEDF72, 0x429B023D,
+ 0x37D0D724, 0xD00A1248, 0xDB0FEAD3, 0x49F1C09B,
+ 0x075372C9, 0x80991B7B, 0x25D479D8, 0xF6E8DEF7,
+ 0xE3FE501A, 0xB6794C3B, 0x976CE0BD, 0x04C006BA,
+ 0xC1A94FB6, 0x409F60C4, 0x5E5C9EC2, 0x196A2463,
+ 0x68FB6FAF, 0x3E6C53B5, 0x1339B2EB, 0x3B52EC6F,
+ 0x6DFC511F, 0x9B30952C, 0xCC814544, 0xAF5EBD09,
+ 0xBEE3D004, 0xDE334AFD, 0x660F2807, 0x192E4BB3,
+ 0xC0CBA857, 0x45C8740F, 0xD20B5F39, 0xB9D3FBDB,
+ 0x5579C0BD, 0x1A60320A, 0xD6A100C6, 0x402C7279,
+ 0x679F25FE, 0xFB1FA3CC, 0x8EA5E9F8, 0xDB3222F8,
+ 0x3C7516DF, 0xFD616B15, 0x2F501EC8, 0xAD0552AB,
+ 0x323DB5FA, 0xFD238760, 0x53317B48, 0x3E00DF82,
+ 0x9E5C57BB, 0xCA6F8CA0, 0x1A87562E, 0xDF1769DB,
+ 0xD542A8F6, 0x287EFFC3, 0xAC6732C6, 0x8C4F5573,
+ 0x695B27B0, 0xBBCA58C8, 0xE1FFA35D, 0xB8F011A0,
+ 0x10FA3D98, 0xFD2183B8, 0x4AFCB56C, 0x2DD1D35B,
+ 0x9A53E479, 0xB6F84565, 0xD28E49BC, 0x4BFB9790,
+ 0xE1DDF2DA, 0xA4CB7E33, 0x62FB1341, 0xCEE4C6E8,
+ 0xEF20CADA, 0x36774C01, 0xD07E9EFE, 0x2BF11FB4,
+ 0x95DBDA4D, 0xAE909198, 0xEAAD8E71, 0x6B93D5A0,
+ 0xD08ED1D0, 0xAFC725E0, 0x8E3C5B2F, 0x8E7594B7,
+ 0x8FF6E2FB, 0xF2122B64, 0x8888B812, 0x900DF01C,
+ 0x4FAD5EA0, 0x688FC31C, 0xD1CFF191, 0xB3A8C1AD,
+ 0x2F2F2218, 0xBE0E1777, 0xEA752DFE, 0x8B021FA1,
+ 0xE5A0CC0F, 0xB56F74E8, 0x18ACF3D6, 0xCE89E299,
+ 0xB4A84FE0, 0xFD13E0B7, 0x7CC43B81, 0xD2ADA8D9,
+ 0x165FA266, 0x80957705, 0x93CC7314, 0x211A1477,
+ 0xE6AD2065, 0x77B5FA86, 0xC75442F5, 0xFB9D35CF,
+ 0xEBCDAF0C, 0x7B3E89A0, 0xD6411BD3, 0xAE1E7E49,
+ 0x00250E2D, 0x2071B35E, 0x226800BB, 0x57B8E0AF,
+ 0x2464369B, 0xF009B91E, 0x5563911D, 0x59DFA6AA,
+ 0x78C14389, 0xD95A537F, 0x207D5BA2, 0x02E5B9C5,
+ 0x83260376, 0x6295CFA9, 0x11C81968, 0x4E734A41,
+ 0xB3472DCA, 0x7B14A94A, 0x1B510052, 0x9A532915,
+ 0xD60F573F, 0xBC9BC6E4, 0x2B60A476, 0x81E67400,
+ 0x08BA6FB5, 0x571BE91F, 0xF296EC6B, 0x2A0DD915,
+ 0xB6636521, 0xE7B9F9B6, 0xFF34052E, 0xC5855664,
+ 0x53B02D5D, 0xA99F8FA1, 0x08BA4799, 0x6E85076A
+ ),
+ array(
+ 0x4B7A70E9, 0xB5B32944, 0xDB75092E, 0xC4192623,
+ 0xAD6EA6B0, 0x49A7DF7D, 0x9CEE60B8, 0x8FEDB266,
+ 0xECAA8C71, 0x699A17FF, 0x5664526C, 0xC2B19EE1,
+ 0x193602A5, 0x75094C29, 0xA0591340, 0xE4183A3E,
+ 0x3F54989A, 0x5B429D65, 0x6B8FE4D6, 0x99F73FD6,
+ 0xA1D29C07, 0xEFE830F5, 0x4D2D38E6, 0xF0255DC1,
+ 0x4CDD2086, 0x8470EB26, 0x6382E9C6, 0x021ECC5E,
+ 0x09686B3F, 0x3EBAEFC9, 0x3C971814, 0x6B6A70A1,
+ 0x687F3584, 0x52A0E286, 0xB79C5305, 0xAA500737,
+ 0x3E07841C, 0x7FDEAE5C, 0x8E7D44EC, 0x5716F2B8,
+ 0xB03ADA37, 0xF0500C0D, 0xF01C1F04, 0x0200B3FF,
+ 0xAE0CF51A, 0x3CB574B2, 0x25837A58, 0xDC0921BD,
+ 0xD19113F9, 0x7CA92FF6, 0x94324773, 0x22F54701,
+ 0x3AE5E581, 0x37C2DADC, 0xC8B57634, 0x9AF3DDA7,
+ 0xA9446146, 0x0FD0030E, 0xECC8C73E, 0xA4751E41,
+ 0xE238CD99, 0x3BEA0E2F, 0x3280BBA1, 0x183EB331,
+ 0x4E548B38, 0x4F6DB908, 0x6F420D03, 0xF60A04BF,
+ 0x2CB81290, 0x24977C79, 0x5679B072, 0xBCAF89AF,
+ 0xDE9A771F, 0xD9930810, 0xB38BAE12, 0xDCCF3F2E,
+ 0x5512721F, 0x2E6B7124, 0x501ADDE6, 0x9F84CD87,
+ 0x7A584718, 0x7408DA17, 0xBC9F9ABC, 0xE94B7D8C,
+ 0xEC7AEC3A, 0xDB851DFA, 0x63094366, 0xC464C3D2,
+ 0xEF1C1847, 0x3215D908, 0xDD433B37, 0x24C2BA16,
+ 0x12A14D43, 0x2A65C451, 0x50940002, 0x133AE4DD,
+ 0x71DFF89E, 0x10314E55, 0x81AC77D6, 0x5F11199B,
+ 0x043556F1, 0xD7A3C76B, 0x3C11183B, 0x5924A509,
+ 0xF28FE6ED, 0x97F1FBFA, 0x9EBABF2C, 0x1E153C6E,
+ 0x86E34570, 0xEAE96FB1, 0x860E5E0A, 0x5A3E2AB3,
+ 0x771FE71C, 0x4E3D06FA, 0x2965DCB9, 0x99E71D0F,
+ 0x803E89D6, 0x5266C825, 0x2E4CC978, 0x9C10B36A,
+ 0xC6150EBA, 0x94E2EA78, 0xA5FC3C53, 0x1E0A2DF4,
+ 0xF2F74EA7, 0x361D2B3D, 0x1939260F, 0x19C27960,
+ 0x5223A708, 0xF71312B6, 0xEBADFE6E, 0xEAC31F66,
+ 0xE3BC4595, 0xA67BC883, 0xB17F37D1, 0x018CFF28,
+ 0xC332DDEF, 0xBE6C5AA5, 0x65582185, 0x68AB9802,
+ 0xEECEA50F, 0xDB2F953B, 0x2AEF7DAD, 0x5B6E2F84,
+ 0x1521B628, 0x29076170, 0xECDD4775, 0x619F1510,
+ 0x13CCA830, 0xEB61BD96, 0x0334FE1E, 0xAA0363CF,
+ 0xB5735C90, 0x4C70A239, 0xD59E9E0B, 0xCBAADE14,
+ 0xEECC86BC, 0x60622CA7, 0x9CAB5CAB, 0xB2F3846E,
+ 0x648B1EAF, 0x19BDF0CA, 0xA02369B9, 0x655ABB50,
+ 0x40685A32, 0x3C2AB4B3, 0x319EE9D5, 0xC021B8F7,
+ 0x9B540B19, 0x875FA099, 0x95F7997E, 0x623D7DA8,
+ 0xF837889A, 0x97E32D77, 0x11ED935F, 0x16681281,
+ 0x0E358829, 0xC7E61FD6, 0x96DEDFA1, 0x7858BA99,
+ 0x57F584A5, 0x1B227263, 0x9B83C3FF, 0x1AC24696,
+ 0xCDB30AEB, 0x532E3054, 0x8FD948E4, 0x6DBC3128,
+ 0x58EBF2EF, 0x34C6FFEA, 0xFE28ED61, 0xEE7C3C73,
+ 0x5D4A14D9, 0xE864B7E3, 0x42105D14, 0x203E13E0,
+ 0x45EEE2B6, 0xA3AAABEA, 0xDB6C4F15, 0xFACB4FD0,
+ 0xC742F442, 0xEF6ABBB5, 0x654F3B1D, 0x41CD2105,
+ 0xD81E799E, 0x86854DC7, 0xE44B476A, 0x3D816250,
+ 0xCF62A1F2, 0x5B8D2646, 0xFC8883A0, 0xC1C7B6A3,
+ 0x7F1524C3, 0x69CB7492, 0x47848A0B, 0x5692B285,
+ 0x095BBF00, 0xAD19489D, 0x1462B174, 0x23820E00,
+ 0x58428D2A, 0x0C55F5EA, 0x1DADF43E, 0x233F7061,
+ 0x3372F092, 0x8D937E41, 0xD65FECF1, 0x6C223BDB,
+ 0x7CDE3759, 0xCBEE7460, 0x4085F2A7, 0xCE77326E,
+ 0xA6078084, 0x19F8509E, 0xE8EFD855, 0x61D99735,
+ 0xA969A7AA, 0xC50C06C2, 0x5A04ABFC, 0x800BCADC,
+ 0x9E447A2E, 0xC3453484, 0xFDD56705, 0x0E1E9EC9,
+ 0xDB73DBD3, 0x105588CD, 0x675FDA79, 0xE3674340,
+ 0xC5C43465, 0x713E38D8, 0x3D28F89E, 0xF16DFF20,
+ 0x153E21E7, 0x8FB03D4A, 0xE6E39F2B, 0xDB83ADF7
+ ),
+ array(
+ 0xE93D5A68, 0x948140F7, 0xF64C261C, 0x94692934,
+ 0x411520F7, 0x7602D4F7, 0xBCF46B2E, 0xD4A20068,
+ 0xD4082471, 0x3320F46A, 0x43B7D4B7, 0x500061AF,
+ 0x1E39F62E, 0x97244546, 0x14214F74, 0xBF8B8840,
+ 0x4D95FC1D, 0x96B591AF, 0x70F4DDD3, 0x66A02F45,
+ 0xBFBC09EC, 0x03BD9785, 0x7FAC6DD0, 0x31CB8504,
+ 0x96EB27B3, 0x55FD3941, 0xDA2547E6, 0xABCA0A9A,
+ 0x28507825, 0x530429F4, 0x0A2C86DA, 0xE9B66DFB,
+ 0x68DC1462, 0xD7486900, 0x680EC0A4, 0x27A18DEE,
+ 0x4F3FFEA2, 0xE887AD8C, 0xB58CE006, 0x7AF4D6B6,
+ 0xAACE1E7C, 0xD3375FEC, 0xCE78A399, 0x406B2A42,
+ 0x20FE9E35, 0xD9F385B9, 0xEE39D7AB, 0x3B124E8B,
+ 0x1DC9FAF7, 0x4B6D1856, 0x26A36631, 0xEAE397B2,
+ 0x3A6EFA74, 0xDD5B4332, 0x6841E7F7, 0xCA7820FB,
+ 0xFB0AF54E, 0xD8FEB397, 0x454056AC, 0xBA489527,
+ 0x55533A3A, 0x20838D87, 0xFE6BA9B7, 0xD096954B,
+ 0x55A867BC, 0xA1159A58, 0xCCA92963, 0x99E1DB33,
+ 0xA62A4A56, 0x3F3125F9, 0x5EF47E1C, 0x9029317C,
+ 0xFDF8E802, 0x04272F70, 0x80BB155C, 0x05282CE3,
+ 0x95C11548, 0xE4C66D22, 0x48C1133F, 0xC70F86DC,
+ 0x07F9C9EE, 0x41041F0F, 0x404779A4, 0x5D886E17,
+ 0x325F51EB, 0xD59BC0D1, 0xF2BCC18F, 0x41113564,
+ 0x257B7834, 0x602A9C60, 0xDFF8E8A3, 0x1F636C1B,
+ 0x0E12B4C2, 0x02E1329E, 0xAF664FD1, 0xCAD18115,
+ 0x6B2395E0, 0x333E92E1, 0x3B240B62, 0xEEBEB922,
+ 0x85B2A20E, 0xE6BA0D99, 0xDE720C8C, 0x2DA2F728,
+ 0xD0127845, 0x95B794FD, 0x647D0862, 0xE7CCF5F0,
+ 0x5449A36F, 0x877D48FA, 0xC39DFD27, 0xF33E8D1E,
+ 0x0A476341, 0x992EFF74, 0x3A6F6EAB, 0xF4F8FD37,
+ 0xA812DC60, 0xA1EBDDF8, 0x991BE14C, 0xDB6E6B0D,
+ 0xC67B5510, 0x6D672C37, 0x2765D43B, 0xDCD0E804,
+ 0xF1290DC7, 0xCC00FFA3, 0xB5390F92, 0x690FED0B,
+ 0x667B9FFB, 0xCEDB7D9C, 0xA091CF0B, 0xD9155EA3,
+ 0xBB132F88, 0x515BAD24, 0x7B9479BF, 0x763BD6EB,
+ 0x37392EB3, 0xCC115979, 0x8026E297, 0xF42E312D,
+ 0x6842ADA7, 0xC66A2B3B, 0x12754CCC, 0x782EF11C,
+ 0x6A124237, 0xB79251E7, 0x06A1BBE6, 0x4BFB6350,
+ 0x1A6B1018, 0x11CAEDFA, 0x3D25BDD8, 0xE2E1C3C9,
+ 0x44421659, 0x0A121386, 0xD90CEC6E, 0xD5ABEA2A,
+ 0x64AF674E, 0xDA86A85F, 0xBEBFE988, 0x64E4C3FE,
+ 0x9DBC8057, 0xF0F7C086, 0x60787BF8, 0x6003604D,
+ 0xD1FD8346, 0xF6381FB0, 0x7745AE04, 0xD736FCCC,
+ 0x83426B33, 0xF01EAB71, 0xB0804187, 0x3C005E5F,
+ 0x77A057BE, 0xBDE8AE24, 0x55464299, 0xBF582E61,
+ 0x4E58F48F, 0xF2DDFDA2, 0xF474EF38, 0x8789BDC2,
+ 0x5366F9C3, 0xC8B38E74, 0xB475F255, 0x46FCD9B9,
+ 0x7AEB2661, 0x8B1DDF84, 0x846A0E79, 0x915F95E2,
+ 0x466E598E, 0x20B45770, 0x8CD55591, 0xC902DE4C,
+ 0xB90BACE1, 0xBB8205D0, 0x11A86248, 0x7574A99E,
+ 0xB77F19B6, 0xE0A9DC09, 0x662D09A1, 0xC4324633,
+ 0xE85A1F02, 0x09F0BE8C, 0x4A99A025, 0x1D6EFE10,
+ 0x1AB93D1D, 0x0BA5A4DF, 0xA186F20F, 0x2868F169,
+ 0xDCB7DA83, 0x573906FE, 0xA1E2CE9B, 0x4FCD7F52,
+ 0x50115E01, 0xA70683FA, 0xA002B5C4, 0x0DE6D027,
+ 0x9AF88C27, 0x773F8641, 0xC3604C06, 0x61A806B5,
+ 0xF0177A28, 0xC0F586E0, 0x006058AA, 0x30DC7D62,
+ 0x11E69ED7, 0x2338EA63, 0x53C2DD94, 0xC2C21634,
+ 0xBBCBEE56, 0x90BCB6DE, 0xEBFC7DA1, 0xCE591D76,
+ 0x6F05E409, 0x4B7C0188, 0x39720A3D, 0x7C927C24,
+ 0x86E3725F, 0x724D9DB9, 0x1AC15BB4, 0xD39EB8FC,
+ 0xED545578, 0x08FCA5B5, 0xD83D7CD3, 0x4DAD0FC4,
+ 0x1E50EF5E, 0xB161E6F8, 0xA28514D9, 0x6C51133C,
+ 0x6FD5C7E7, 0x56E14EC4, 0x362ABFCE, 0xDDC6C837,
+ 0xD79A3234, 0x92638212, 0x670EFA8E, 0x406000E0
+ ),
+ array(
+ 0x3A39CE37, 0xD3FAF5CF, 0xABC27737, 0x5AC52D1B,
+ 0x5CB0679E, 0x4FA33742, 0xD3822740, 0x99BC9BBE,
+ 0xD5118E9D, 0xBF0F7315, 0xD62D1C7E, 0xC700C47B,
+ 0xB78C1B6B, 0x21A19045, 0xB26EB1BE, 0x6A366EB4,
+ 0x5748AB2F, 0xBC946E79, 0xC6A376D2, 0x6549C2C8,
+ 0x530FF8EE, 0x468DDE7D, 0xD5730A1D, 0x4CD04DC6,
+ 0x2939BBDB, 0xA9BA4650, 0xAC9526E8, 0xBE5EE304,
+ 0xA1FAD5F0, 0x6A2D519A, 0x63EF8CE2, 0x9A86EE22,
+ 0xC089C2B8, 0x43242EF6, 0xA51E03AA, 0x9CF2D0A4,
+ 0x83C061BA, 0x9BE96A4D, 0x8FE51550, 0xBA645BD6,
+ 0x2826A2F9, 0xA73A3AE1, 0x4BA99586, 0xEF5562E9,
+ 0xC72FEFD3, 0xF752F7DA, 0x3F046F69, 0x77FA0A59,
+ 0x80E4A915, 0x87B08601, 0x9B09E6AD, 0x3B3EE593,
+ 0xE990FD5A, 0x9E34D797, 0x2CF0B7D9, 0x022B8B51,
+ 0x96D5AC3A, 0x017DA67D, 0xD1CF3ED6, 0x7C7D2D28,
+ 0x1F9F25CF, 0xADF2B89B, 0x5AD6B472, 0x5A88F54C,
+ 0xE029AC71, 0xE019A5E6, 0x47B0ACFD, 0xED93FA9B,
+ 0xE8D3C48D, 0x283B57CC, 0xF8D56629, 0x79132E28,
+ 0x785F0191, 0xED756055, 0xF7960E44, 0xE3D35E8C,
+ 0x15056DD4, 0x88F46DBA, 0x03A16125, 0x0564F0BD,
+ 0xC3EB9E15, 0x3C9057A2, 0x97271AEC, 0xA93A072A,
+ 0x1B3F6D9B, 0x1E6321F5, 0xF59C66FB, 0x26DCF319,
+ 0x7533D928, 0xB155FDF5, 0x03563482, 0x8ABA3CBB,
+ 0x28517711, 0xC20AD9F8, 0xABCC5167, 0xCCAD925F,
+ 0x4DE81751, 0x3830DC8E, 0x379D5862, 0x9320F991,
+ 0xEA7A90C2, 0xFB3E7BCE, 0x5121CE64, 0x774FBE32,
+ 0xA8B6E37E, 0xC3293D46, 0x48DE5369, 0x6413E680,
+ 0xA2AE0810, 0xDD6DB224, 0x69852DFD, 0x09072166,
+ 0xB39A460A, 0x6445C0DD, 0x586CDECF, 0x1C20C8AE,
+ 0x5BBEF7DD, 0x1B588D40, 0xCCD2017F, 0x6BB4E3BB,
+ 0xDDA26A7E, 0x3A59FF45, 0x3E350A44, 0xBCB4CDD5,
+ 0x72EACEA8, 0xFA6484BB, 0x8D6612AE, 0xBF3C6F47,
+ 0xD29BE463, 0x542F5D9E, 0xAEC2771B, 0xF64E6370,
+ 0x740E0D8D, 0xE75B1357, 0xF8721671, 0xAF537D5D,
+ 0x4040CB08, 0x4EB4E2CC, 0x34D2466A, 0x0115AF84,
+ 0xE1B00428, 0x95983A1D, 0x06B89FB4, 0xCE6EA048,
+ 0x6F3F3B82, 0x3520AB82, 0x011A1D4B, 0x277227F8,
+ 0x611560B1, 0xE7933FDC, 0xBB3A792B, 0x344525BD,
+ 0xA08839E1, 0x51CE794B, 0x2F32C9B7, 0xA01FBAC9,
+ 0xE01CC87E, 0xBCC7D1F6, 0xCF0111C3, 0xA1E8AAC7,
+ 0x1A908749, 0xD44FBD9A, 0xD0DADECB, 0xD50ADA38,
+ 0x0339C32A, 0xC6913667, 0x8DF9317C, 0xE0B12B4F,
+ 0xF79E59B7, 0x43F5BB3A, 0xF2D519FF, 0x27D9459C,
+ 0xBF97222C, 0x15E6FC2A, 0x0F91FC71, 0x9B941525,
+ 0xFAE59361, 0xCEB69CEB, 0xC2A86459, 0x12BAA8D1,
+ 0xB6C1075E, 0xE3056A0C, 0x10D25065, 0xCB03A442,
+ 0xE0EC6E0E, 0x1698DB3B, 0x4C98A0BE, 0x3278E964,
+ 0x9F1F9532, 0xE0D392DF, 0xD3A0342B, 0x8971F21E,
+ 0x1B0A7441, 0x4BA3348C, 0xC5BE7120, 0xC37632D8,
+ 0xDF359F8D, 0x9B992F2E, 0xE60B6F47, 0x0FE3F11D,
+ 0xE54CDA54, 0x1EDAD891, 0xCE6279CF, 0xCD3E7E6F,
+ 0x1618B166, 0xFD2C1D05, 0x848FD2C5, 0xF6FB2299,
+ 0xF523F357, 0xA6327623, 0x93A83531, 0x56CCCD02,
+ 0xACF08162, 0x5A75EBB5, 0x6E163697, 0x88D273CC,
+ 0xDE966292, 0x81B949D0, 0x4C50901B, 0x71C65614,
+ 0xE6C6C7BD, 0x327A140A, 0x45E1D006, 0xC3F27B9A,
+ 0xC9AA53FD, 0x62A80F00, 0xBB25BFE2, 0x35BDD2F6,
+ 0x71126905, 0xB2040222, 0xB6CBCF7C, 0xCD769C2B,
+ 0x53113EC0, 0x1640E3D3, 0x38ABBD60, 0x2547ADF0,
+ 0xBA38209C, 0xF746CE76, 0x77AFA1C5, 0x20756060,
+ 0x85CBFE4E, 0x8AE88DD8, 0x7AAAF9B0, 0x4CF9AA7E,
+ 0x1948C25C, 0x02FB8A8C, 0x01C36AE4, 0xD6EBE1F9,
+ 0x90D4F869, 0xA65CDEA0, 0x3F09252D, 0xC208E69F,
+ 0xB74E6132, 0xCE77E25B, 0x578FDFE3, 0x3AC372E6
+ )
+ );
+ }
+
+}
+
+?>
diff --git a/3dparty/MDB2.php b/3rdparty/MDB2.php
index fbc7107914e..fbc7107914e 100644
--- a/3dparty/MDB2.php
+++ b/3rdparty/MDB2.php
diff --git a/3dparty/MDB2/Date.php b/3rdparty/MDB2/Date.php
index ce846543a50..ce846543a50 100644
--- a/3dparty/MDB2/Date.php
+++ b/3rdparty/MDB2/Date.php
diff --git a/3dparty/MDB2/Driver/Datatype/Common.php b/3rdparty/MDB2/Driver/Datatype/Common.php
index 85a74f64fca..85a74f64fca 100644
--- a/3dparty/MDB2/Driver/Datatype/Common.php
+++ b/3rdparty/MDB2/Driver/Datatype/Common.php
diff --git a/3dparty/MDB2/Driver/Datatype/mysql.php b/3rdparty/MDB2/Driver/Datatype/mysql.php
index 93dd40524e6..93dd40524e6 100644
--- a/3dparty/MDB2/Driver/Datatype/mysql.php
+++ b/3rdparty/MDB2/Driver/Datatype/mysql.php
diff --git a/3dparty/MDB2/Driver/Datatype/pgsql.php b/3rdparty/MDB2/Driver/Datatype/pgsql.php
index e72aa743b73..e72aa743b73 100644
--- a/3dparty/MDB2/Driver/Datatype/pgsql.php
+++ b/3rdparty/MDB2/Driver/Datatype/pgsql.php
diff --git a/3dparty/MDB2/Driver/Datatype/sqlite.php b/3rdparty/MDB2/Driver/Datatype/sqlite.php
index 9e57e7e5678..9e57e7e5678 100644
--- a/3dparty/MDB2/Driver/Datatype/sqlite.php
+++ b/3rdparty/MDB2/Driver/Datatype/sqlite.php
diff --git a/3dparty/MDB2/Driver/Function/Common.php b/3rdparty/MDB2/Driver/Function/Common.php
index 731f06882ce..731f06882ce 100644
--- a/3dparty/MDB2/Driver/Function/Common.php
+++ b/3rdparty/MDB2/Driver/Function/Common.php
diff --git a/3dparty/MDB2/Driver/Function/mysql.php b/3rdparty/MDB2/Driver/Function/mysql.php
index 44183c3aa06..44183c3aa06 100644
--- a/3dparty/MDB2/Driver/Function/mysql.php
+++ b/3rdparty/MDB2/Driver/Function/mysql.php
diff --git a/3dparty/MDB2/Driver/Function/pgsql.php b/3rdparty/MDB2/Driver/Function/pgsql.php
index 173bfc91494..173bfc91494 100644
--- a/3dparty/MDB2/Driver/Function/pgsql.php
+++ b/3rdparty/MDB2/Driver/Function/pgsql.php
diff --git a/3dparty/MDB2/Driver/Function/sqlite.php b/3rdparty/MDB2/Driver/Function/sqlite.php
index 8a5b7ec8fad..8a5b7ec8fad 100644
--- a/3dparty/MDB2/Driver/Function/sqlite.php
+++ b/3rdparty/MDB2/Driver/Function/sqlite.php
diff --git a/3dparty/MDB2/Driver/Manager/Common.php b/3rdparty/MDB2/Driver/Manager/Common.php
index 9e16749bffc..9e16749bffc 100644
--- a/3dparty/MDB2/Driver/Manager/Common.php
+++ b/3rdparty/MDB2/Driver/Manager/Common.php
diff --git a/3dparty/MDB2/Driver/Manager/mysql.php b/3rdparty/MDB2/Driver/Manager/mysql.php
index 099ed48a84f..099ed48a84f 100644
--- a/3dparty/MDB2/Driver/Manager/mysql.php
+++ b/3rdparty/MDB2/Driver/Manager/mysql.php
diff --git a/3dparty/MDB2/Driver/Manager/pgsql.php b/3rdparty/MDB2/Driver/Manager/pgsql.php
index 490f697aa5b..490f697aa5b 100644
--- a/3dparty/MDB2/Driver/Manager/pgsql.php
+++ b/3rdparty/MDB2/Driver/Manager/pgsql.php
diff --git a/3dparty/MDB2/Driver/Manager/sqlite.php b/3rdparty/MDB2/Driver/Manager/sqlite.php
index 64019669645..64019669645 100644
--- a/3dparty/MDB2/Driver/Manager/sqlite.php
+++ b/3rdparty/MDB2/Driver/Manager/sqlite.php
diff --git a/3dparty/MDB2/Driver/Native/Common.php b/3rdparty/MDB2/Driver/Native/Common.php
index c01caa35b71..c01caa35b71 100644
--- a/3dparty/MDB2/Driver/Native/Common.php
+++ b/3rdparty/MDB2/Driver/Native/Common.php
diff --git a/3dparty/MDB2/Driver/Native/mysql.php b/3rdparty/MDB2/Driver/Native/mysql.php
index 90ff068e6ff..90ff068e6ff 100644
--- a/3dparty/MDB2/Driver/Native/mysql.php
+++ b/3rdparty/MDB2/Driver/Native/mysql.php
diff --git a/3dparty/MDB2/Driver/Native/pgsql.php b/3rdparty/MDB2/Driver/Native/pgsql.php
index acab8389c89..acab8389c89 100644
--- a/3dparty/MDB2/Driver/Native/pgsql.php
+++ b/3rdparty/MDB2/Driver/Native/pgsql.php
diff --git a/3dparty/MDB2/Driver/Native/sqlite.php b/3rdparty/MDB2/Driver/Native/sqlite.php
index 0213293a50a..0213293a50a 100644
--- a/3dparty/MDB2/Driver/Native/sqlite.php
+++ b/3rdparty/MDB2/Driver/Native/sqlite.php
diff --git a/3dparty/MDB2/Driver/Reverse/Common.php b/3rdparty/MDB2/Driver/Reverse/Common.php
index c78d84f760a..c78d84f760a 100644
--- a/3dparty/MDB2/Driver/Reverse/Common.php
+++ b/3rdparty/MDB2/Driver/Reverse/Common.php
diff --git a/3dparty/MDB2/Driver/Reverse/mysql.php b/3rdparty/MDB2/Driver/Reverse/mysql.php
index 6e366c22a5e..6e366c22a5e 100644
--- a/3dparty/MDB2/Driver/Reverse/mysql.php
+++ b/3rdparty/MDB2/Driver/Reverse/mysql.php
diff --git a/3dparty/MDB2/Driver/Reverse/pgsql.php b/3rdparty/MDB2/Driver/Reverse/pgsql.php
index 649c1cad9ee..649c1cad9ee 100644
--- a/3dparty/MDB2/Driver/Reverse/pgsql.php
+++ b/3rdparty/MDB2/Driver/Reverse/pgsql.php
diff --git a/3dparty/MDB2/Driver/Reverse/sqlite.php b/3rdparty/MDB2/Driver/Reverse/sqlite.php
index 60c686c418a..60c686c418a 100644
--- a/3dparty/MDB2/Driver/Reverse/sqlite.php
+++ b/3rdparty/MDB2/Driver/Reverse/sqlite.php
diff --git a/3dparty/MDB2/Driver/mysql.php b/3rdparty/MDB2/Driver/mysql.php
index b9b46c0d762..b9b46c0d762 100644
--- a/3dparty/MDB2/Driver/mysql.php
+++ b/3rdparty/MDB2/Driver/mysql.php
diff --git a/3dparty/MDB2/Driver/pgsql.php b/3rdparty/MDB2/Driver/pgsql.php
index 6108f18dec1..6108f18dec1 100644
--- a/3dparty/MDB2/Driver/pgsql.php
+++ b/3rdparty/MDB2/Driver/pgsql.php
diff --git a/3dparty/MDB2/Driver/sqlite.php b/3rdparty/MDB2/Driver/sqlite.php
index 63db241b863..63db241b863 100644
--- a/3dparty/MDB2/Driver/sqlite.php
+++ b/3rdparty/MDB2/Driver/sqlite.php
diff --git a/3dparty/MDB2/Extended.php b/3rdparty/MDB2/Extended.php
index 864ab923543..864ab923543 100644
--- a/3dparty/MDB2/Extended.php
+++ b/3rdparty/MDB2/Extended.php
diff --git a/3dparty/MDB2/Iterator.php b/3rdparty/MDB2/Iterator.php
index ca5e7b69c27..ca5e7b69c27 100644
--- a/3dparty/MDB2/Iterator.php
+++ b/3rdparty/MDB2/Iterator.php
diff --git a/3dparty/MDB2/LOB.php b/3rdparty/MDB2/LOB.php
index ae67224020e..ae67224020e 100644
--- a/3dparty/MDB2/LOB.php
+++ b/3rdparty/MDB2/LOB.php
diff --git a/3dparty/MDB2/Schema.php b/3rdparty/MDB2/Schema.php
index 25818460a62..25818460a62 100644
--- a/3dparty/MDB2/Schema.php
+++ b/3rdparty/MDB2/Schema.php
diff --git a/3dparty/MDB2/Schema/Parser.php b/3rdparty/MDB2/Schema/Parser.php
index b740ef55fa8..b740ef55fa8 100644
--- a/3dparty/MDB2/Schema/Parser.php
+++ b/3rdparty/MDB2/Schema/Parser.php
diff --git a/3dparty/MDB2/Schema/Parser2.php b/3rdparty/MDB2/Schema/Parser2.php
index 01318473fdd..01318473fdd 100644
--- a/3dparty/MDB2/Schema/Parser2.php
+++ b/3rdparty/MDB2/Schema/Parser2.php
diff --git a/3dparty/MDB2/Schema/Reserved/ibase.php b/3rdparty/MDB2/Schema/Reserved/ibase.php
index b208abc83a3..b208abc83a3 100644
--- a/3dparty/MDB2/Schema/Reserved/ibase.php
+++ b/3rdparty/MDB2/Schema/Reserved/ibase.php
diff --git a/3dparty/MDB2/Schema/Reserved/mssql.php b/3rdparty/MDB2/Schema/Reserved/mssql.php
index 74ac6885780..74ac6885780 100644
--- a/3dparty/MDB2/Schema/Reserved/mssql.php
+++ b/3rdparty/MDB2/Schema/Reserved/mssql.php
diff --git a/3dparty/MDB2/Schema/Reserved/mysql.php b/3rdparty/MDB2/Schema/Reserved/mysql.php
index 4f0575e0bb1..4f0575e0bb1 100644
--- a/3dparty/MDB2/Schema/Reserved/mysql.php
+++ b/3rdparty/MDB2/Schema/Reserved/mysql.php
diff --git a/3dparty/MDB2/Schema/Reserved/oci8.php b/3rdparty/MDB2/Schema/Reserved/oci8.php
index 57fe12ddcab..57fe12ddcab 100644
--- a/3dparty/MDB2/Schema/Reserved/oci8.php
+++ b/3rdparty/MDB2/Schema/Reserved/oci8.php
diff --git a/3dparty/MDB2/Schema/Reserved/pgsql.php b/3rdparty/MDB2/Schema/Reserved/pgsql.php
index d358e9c12f0..d358e9c12f0 100644
--- a/3dparty/MDB2/Schema/Reserved/pgsql.php
+++ b/3rdparty/MDB2/Schema/Reserved/pgsql.php
diff --git a/3dparty/MDB2/Schema/Tool.php b/3rdparty/MDB2/Schema/Tool.php
index 9689a0f6d73..9689a0f6d73 100644
--- a/3dparty/MDB2/Schema/Tool.php
+++ b/3rdparty/MDB2/Schema/Tool.php
diff --git a/3dparty/MDB2/Schema/Tool/ParameterException.php b/3rdparty/MDB2/Schema/Tool/ParameterException.php
index fab1e03e250..fab1e03e250 100644
--- a/3dparty/MDB2/Schema/Tool/ParameterException.php
+++ b/3rdparty/MDB2/Schema/Tool/ParameterException.php
diff --git a/3dparty/MDB2/Schema/Validate.php b/3rdparty/MDB2/Schema/Validate.php
index 217cf51b959..217cf51b959 100644
--- a/3dparty/MDB2/Schema/Validate.php
+++ b/3rdparty/MDB2/Schema/Validate.php
diff --git a/3dparty/MDB2/Schema/Writer.php b/3rdparty/MDB2/Schema/Writer.php
index 5ae4918dc1d..5ae4918dc1d 100644
--- a/3dparty/MDB2/Schema/Writer.php
+++ b/3rdparty/MDB2/Schema/Writer.php
diff --git a/3dparty/PEAR.php b/3rdparty/PEAR.php
index f832c0d4916..f832c0d4916 100644
--- a/3dparty/PEAR.php
+++ b/3rdparty/PEAR.php
diff --git a/3dparty/PEAR/Autoloader.php b/3rdparty/PEAR/Autoloader.php
index de0278d6191..de0278d6191 100644
--- a/3dparty/PEAR/Autoloader.php
+++ b/3rdparty/PEAR/Autoloader.php
diff --git a/3dparty/PEAR/Builder.php b/3rdparty/PEAR/Builder.php
index 4f6cc135d1e..4f6cc135d1e 100644
--- a/3dparty/PEAR/Builder.php
+++ b/3rdparty/PEAR/Builder.php
diff --git a/3dparty/PEAR/Command.php b/3rdparty/PEAR/Command.php
index 2ea68743d20..2ea68743d20 100644
--- a/3dparty/PEAR/Command.php
+++ b/3rdparty/PEAR/Command.php
diff --git a/3dparty/PEAR/Command/Auth.php b/3rdparty/PEAR/Command/Auth.php
index 0b9d3d3965d..0b9d3d3965d 100644
--- a/3dparty/PEAR/Command/Auth.php
+++ b/3rdparty/PEAR/Command/Auth.php
diff --git a/3dparty/PEAR/Command/Build.php b/3rdparty/PEAR/Command/Build.php
index 2ecbbc92f5f..2ecbbc92f5f 100644
--- a/3dparty/PEAR/Command/Build.php
+++ b/3rdparty/PEAR/Command/Build.php
diff --git a/3dparty/PEAR/Command/Common.php b/3rdparty/PEAR/Command/Common.php
index c6ace694caf..c6ace694caf 100644
--- a/3dparty/PEAR/Command/Common.php
+++ b/3rdparty/PEAR/Command/Common.php
diff --git a/3dparty/PEAR/Command/Config.php b/3rdparty/PEAR/Command/Config.php
index 474a2345170..474a2345170 100644
--- a/3dparty/PEAR/Command/Config.php
+++ b/3rdparty/PEAR/Command/Config.php
diff --git a/3dparty/PEAR/Command/Install.php b/3rdparty/PEAR/Command/Install.php
index dce52f017e2..dce52f017e2 100644
--- a/3dparty/PEAR/Command/Install.php
+++ b/3rdparty/PEAR/Command/Install.php
diff --git a/3dparty/PEAR/Command/Mirror.php b/3rdparty/PEAR/Command/Mirror.php
index bf56c3db640..bf56c3db640 100644
--- a/3dparty/PEAR/Command/Mirror.php
+++ b/3rdparty/PEAR/Command/Mirror.php
diff --git a/3dparty/PEAR/Command/Package.php b/3rdparty/PEAR/Command/Package.php
index aca87111118..aca87111118 100644
--- a/3dparty/PEAR/Command/Package.php
+++ b/3rdparty/PEAR/Command/Package.php
diff --git a/3dparty/PEAR/Command/Registry.php b/3rdparty/PEAR/Command/Registry.php
index 62cb4b00e28..62cb4b00e28 100644
--- a/3dparty/PEAR/Command/Registry.php
+++ b/3rdparty/PEAR/Command/Registry.php
diff --git a/3dparty/PEAR/Command/Remote.php b/3rdparty/PEAR/Command/Remote.php
index bbd16093f5d..bbd16093f5d 100644
--- a/3dparty/PEAR/Command/Remote.php
+++ b/3rdparty/PEAR/Command/Remote.php
diff --git a/3dparty/PEAR/Common.php b/3rdparty/PEAR/Common.php
index fba53a37799..fba53a37799 100644
--- a/3dparty/PEAR/Common.php
+++ b/3rdparty/PEAR/Common.php
diff --git a/3dparty/PEAR/Config.php b/3rdparty/PEAR/Config.php
index ba641735250..ba641735250 100644
--- a/3dparty/PEAR/Config.php
+++ b/3rdparty/PEAR/Config.php
diff --git a/3dparty/PEAR/Dependency.php b/3rdparty/PEAR/Dependency.php
index 705167aa70f..705167aa70f 100644
--- a/3dparty/PEAR/Dependency.php
+++ b/3rdparty/PEAR/Dependency.php
diff --git a/3dparty/PEAR/Downloader.php b/3rdparty/PEAR/Downloader.php
index 5e16dc5ffb1..5e16dc5ffb1 100644
--- a/3dparty/PEAR/Downloader.php
+++ b/3rdparty/PEAR/Downloader.php
diff --git a/3dparty/PEAR/ErrorStack.php b/3rdparty/PEAR/ErrorStack.php
index da52f08d345..da52f08d345 100644
--- a/3dparty/PEAR/ErrorStack.php
+++ b/3rdparty/PEAR/ErrorStack.php
diff --git a/3dparty/PEAR/Exception.php b/3rdparty/PEAR/Exception.php
index c735c16b398..c735c16b398 100644
--- a/3dparty/PEAR/Exception.php
+++ b/3rdparty/PEAR/Exception.php
diff --git a/3dparty/PEAR/Frontend/CLI.php b/3rdparty/PEAR/Frontend/CLI.php
index 832ddf09b3f..832ddf09b3f 100644
--- a/3dparty/PEAR/Frontend/CLI.php
+++ b/3rdparty/PEAR/Frontend/CLI.php
diff --git a/3dparty/PEAR/Installer.php b/3rdparty/PEAR/Installer.php
index 31e2cff81ee..31e2cff81ee 100644
--- a/3dparty/PEAR/Installer.php
+++ b/3rdparty/PEAR/Installer.php
diff --git a/3dparty/PEAR/Packager.php b/3rdparty/PEAR/Packager.php
index 3ed209be8b2..3ed209be8b2 100644
--- a/3dparty/PEAR/Packager.php
+++ b/3rdparty/PEAR/Packager.php
diff --git a/3dparty/PEAR/Registry.php b/3rdparty/PEAR/Registry.php
index f2510a38f15..f2510a38f15 100644
--- a/3dparty/PEAR/Registry.php
+++ b/3rdparty/PEAR/Registry.php
diff --git a/3dparty/PEAR/Remote.php b/3rdparty/PEAR/Remote.php
index 7b1e314f903..7b1e314f903 100644
--- a/3dparty/PEAR/Remote.php
+++ b/3rdparty/PEAR/Remote.php
diff --git a/3dparty/PEAR/RunTest.php b/3rdparty/PEAR/RunTest.php
index 1aa02aab9df..1aa02aab9df 100644
--- a/3dparty/PEAR/RunTest.php
+++ b/3rdparty/PEAR/RunTest.php
diff --git a/3dparty/Sabre.includes.php b/3rdparty/Sabre.includes.php
index 6b179e34fd8..9d389288c78 100644
--- a/3dparty/Sabre.includes.php
+++ b/3rdparty/Sabre.includes.php
@@ -74,6 +74,7 @@ include 'Sabre/DAV/File.php';
include 'Sabre/DAV/Directory.php';
/* Utilities */
+include 'Sabre/DAV/SimpleCollection.php';
include 'Sabre/DAV/SimpleDirectory.php';
include 'Sabre/DAV/XMLUtil.php';
include 'Sabre/DAV/URLUtil.php';
diff --git a/3dparty/Sabre/CalDAV/Backend/Abstract.php b/3rdparty/Sabre/CalDAV/Backend/Abstract.php
index 7ac282f44a0..7ac282f44a0 100644
--- a/3dparty/Sabre/CalDAV/Backend/Abstract.php
+++ b/3rdparty/Sabre/CalDAV/Backend/Abstract.php
diff --git a/3dparty/Sabre/CalDAV/Backend/PDO.php b/3rdparty/Sabre/CalDAV/Backend/PDO.php
index d1785bb8f8f..d1785bb8f8f 100644
--- a/3dparty/Sabre/CalDAV/Backend/PDO.php
+++ b/3rdparty/Sabre/CalDAV/Backend/PDO.php
diff --git a/3dparty/Sabre/CalDAV/Calendar.php b/3rdparty/Sabre/CalDAV/Calendar.php
index 010554b6d92..a50aef12b4f 100644
--- a/3dparty/Sabre/CalDAV/Calendar.php
+++ b/3rdparty/Sabre/CalDAV/Calendar.php
@@ -179,7 +179,12 @@ class Sabre_CalDAV_Calendar implements Sabre_DAV_ICollection, Sabre_DAV_IPropert
$calendarData = stream_get_contents($calendarData);
- $supportedComponents = $this->calendarInfo['{' . Sabre_CalDAV_Plugin::NS_CALDAV . '}supported-calendar-component-set']->getValue();
+ $supportedComponents = $this->calendarInfo['{' . Sabre_CalDAV_Plugin::NS_CALDAV . '}supported-calendar-component-set'];
+ if ($supportedComponents) {
+ $supportedComponents = $supportedComponents->getValue();
+ } else {
+ $supportedComponents = null;
+ }
Sabre_CalDAV_ICalendarUtil::validateICalendarObject($calendarData, $supportedComponents);
$this->caldavBackend->createCalendarObject($this->calendarInfo['id'],$name,$calendarData);
diff --git a/3dparty/Sabre/CalDAV/CalendarObject.php b/3rdparty/Sabre/CalDAV/CalendarObject.php
index efec35dccad..b5c4e49b838 100644
--- a/3dparty/Sabre/CalDAV/CalendarObject.php
+++ b/3rdparty/Sabre/CalDAV/CalendarObject.php
@@ -93,7 +93,12 @@ class Sabre_CalDAV_CalendarObject extends Sabre_DAV_File implements Sabre_DAVACL
if (is_resource($calendarData))
$calendarData = stream_get_contents($calendarData);
- $supportedComponents = $this->calendarInfo['{' . Sabre_CalDAV_Plugin::NS_CALDAV . '}supported-calendar-component-set']->getValue();
+ $supportedComponents = $this->calendarInfo['{' . Sabre_CalDAV_Plugin::NS_CALDAV . '}supported-calendar-component-set'];
+ if ($supportedComponents) {
+ $supportedComponents = $supportedComponents->getValue();
+ } else {
+ $supportedComponents = null;
+ }
Sabre_CalDAV_ICalendarUtil::validateICalendarObject($calendarData, $supportedComponents);
$this->caldavBackend->updateCalendarObject($this->calendarInfo['id'],$this->objectData['uri'],$calendarData);
diff --git a/3dparty/Sabre/CalDAV/CalendarRootNode.php b/3rdparty/Sabre/CalDAV/CalendarRootNode.php
index 5c9b37e7d5d..69669a9d7fd 100644
--- a/3dparty/Sabre/CalDAV/CalendarRootNode.php
+++ b/3rdparty/Sabre/CalDAV/CalendarRootNode.php
@@ -25,8 +25,15 @@ class Sabre_CalDAV_CalendarRootNode extends Sabre_DAVACL_AbstractPrincipalCollec
*
* This constructor needs both an authentication and a caldav backend.
*
+ * By default this class will show a list of calendar collections for
+ * principals in the 'principals' collection. If your main principals are
+ * actually located in a different path, use the $principalPrefix argument
+ * to override this.
+ *
+ *
* @param Sabre_DAVACL_IPrincipalBackend $principalBackend
* @param Sabre_CalDAV_Backend_Abstract $caldavBackend
+ * @param string $principalPrefix
*/
public function __construct(Sabre_DAVACL_IPrincipalBackend $principalBackend,Sabre_CalDAV_Backend_Abstract $caldavBackend, $principalPrefix = 'principals') {
diff --git a/3dparty/Sabre/CalDAV/Exception/InvalidICalendarObject.php b/3rdparty/Sabre/CalDAV/Exception/InvalidICalendarObject.php
index 656b7286a66..656b7286a66 100644
--- a/3dparty/Sabre/CalDAV/Exception/InvalidICalendarObject.php
+++ b/3rdparty/Sabre/CalDAV/Exception/InvalidICalendarObject.php
diff --git a/3dparty/Sabre/CalDAV/ICSExportPlugin.php b/3rdparty/Sabre/CalDAV/ICSExportPlugin.php
index 4e2c6eb93d2..4e2c6eb93d2 100644
--- a/3dparty/Sabre/CalDAV/ICSExportPlugin.php
+++ b/3rdparty/Sabre/CalDAV/ICSExportPlugin.php
diff --git a/3dparty/Sabre/CalDAV/ICalendarUtil.php b/3rdparty/Sabre/CalDAV/ICalendarUtil.php
index fbfef397ac6..699abfdd6f5 100644
--- a/3dparty/Sabre/CalDAV/ICalendarUtil.php
+++ b/3rdparty/Sabre/CalDAV/ICalendarUtil.php
@@ -20,12 +20,12 @@ class Sabre_CalDAV_ICalendarUtil {
*
* This method makes sure this ICalendar object is properly formatted.
* If we can't parse it, we'll throw exceptions.
- *
+ *
* @param string $icalData
* @param array $allowedComponents
* @return bool
*/
- static function validateICalendarObject($icalData, array $allowedComponents) {
+ static function validateICalendarObject($icalData, array $allowedComponents = null) {
$xcal = simplexml_load_string(self::toXCal($icalData));
if (!$xcal) throw new Sabre_CalDAV_Exception_InvalidICalendarObject('Invalid calendarobject format');
@@ -44,7 +44,9 @@ class Sabre_CalDAV_ICalendarUtil {
throw new Sabre_CalDAV_Exception_InvalidICalendarObject('One VEVENT, VTODO, VJOURNAL or VFREEBUSY must be specified. 0 found.');
}
$component = $componentsFound[0];
-
+
+ if (is_null($allowedComponents)) return true;
+
// Check if the component is allowed
$name = $component->getName();
if (!in_array(strtoupper($name),$allowedComponents)) {
diff --git a/3dparty/Sabre/CalDAV/Plugin.php b/3rdparty/Sabre/CalDAV/Plugin.php
index 640595e74ba..640595e74ba 100644
--- a/3dparty/Sabre/CalDAV/Plugin.php
+++ b/3rdparty/Sabre/CalDAV/Plugin.php
diff --git a/3dparty/Sabre/CalDAV/Principal/Collection.php b/3rdparty/Sabre/CalDAV/Principal/Collection.php
index 13435b2448e..13435b2448e 100644
--- a/3dparty/Sabre/CalDAV/Principal/Collection.php
+++ b/3rdparty/Sabre/CalDAV/Principal/Collection.php
diff --git a/3dparty/Sabre/CalDAV/Principal/ProxyRead.php b/3rdparty/Sabre/CalDAV/Principal/ProxyRead.php
index f531d85d1ff..f531d85d1ff 100644
--- a/3dparty/Sabre/CalDAV/Principal/ProxyRead.php
+++ b/3rdparty/Sabre/CalDAV/Principal/ProxyRead.php
diff --git a/3dparty/Sabre/CalDAV/Principal/ProxyWrite.php b/3rdparty/Sabre/CalDAV/Principal/ProxyWrite.php
index 4d8face2060..4d8face2060 100644
--- a/3dparty/Sabre/CalDAV/Principal/ProxyWrite.php
+++ b/3rdparty/Sabre/CalDAV/Principal/ProxyWrite.php
diff --git a/3dparty/Sabre/CalDAV/Principal/User.php b/3rdparty/Sabre/CalDAV/Principal/User.php
index 034629b89b3..034629b89b3 100644
--- a/3dparty/Sabre/CalDAV/Principal/User.php
+++ b/3rdparty/Sabre/CalDAV/Principal/User.php
diff --git a/3dparty/Sabre/CalDAV/Property/SupportedCalendarComponentSet.php b/3rdparty/Sabre/CalDAV/Property/SupportedCalendarComponentSet.php
index 1bbaca6b8a7..1bbaca6b8a7 100644
--- a/3dparty/Sabre/CalDAV/Property/SupportedCalendarComponentSet.php
+++ b/3rdparty/Sabre/CalDAV/Property/SupportedCalendarComponentSet.php
diff --git a/3dparty/Sabre/CalDAV/Property/SupportedCalendarData.php b/3rdparty/Sabre/CalDAV/Property/SupportedCalendarData.php
index 5010ee6d525..5010ee6d525 100644
--- a/3dparty/Sabre/CalDAV/Property/SupportedCalendarData.php
+++ b/3rdparty/Sabre/CalDAV/Property/SupportedCalendarData.php
diff --git a/3dparty/Sabre/CalDAV/Property/SupportedCollationSet.php b/3rdparty/Sabre/CalDAV/Property/SupportedCollationSet.php
index e585e9db3d8..e585e9db3d8 100644
--- a/3dparty/Sabre/CalDAV/Property/SupportedCollationSet.php
+++ b/3rdparty/Sabre/CalDAV/Property/SupportedCollationSet.php
diff --git a/3dparty/Sabre/CalDAV/Server.php b/3rdparty/Sabre/CalDAV/Server.php
index 969d69c6279..969d69c6279 100644
--- a/3dparty/Sabre/CalDAV/Server.php
+++ b/3rdparty/Sabre/CalDAV/Server.php
diff --git a/3dparty/Sabre/CalDAV/UserCalendars.php b/3rdparty/Sabre/CalDAV/UserCalendars.php
index f52d65e9a73..f52d65e9a73 100644
--- a/3dparty/Sabre/CalDAV/UserCalendars.php
+++ b/3rdparty/Sabre/CalDAV/UserCalendars.php
diff --git a/3dparty/Sabre/CalDAV/Version.php b/3rdparty/Sabre/CalDAV/Version.php
index 5ecc0cebb37..5ecc0cebb37 100644
--- a/3dparty/Sabre/CalDAV/Version.php
+++ b/3rdparty/Sabre/CalDAV/Version.php
diff --git a/3dparty/Sabre/CalDAV/XMLUtil.php b/3rdparty/Sabre/CalDAV/XMLUtil.php
index bf349a36aae..bf349a36aae 100644
--- a/3dparty/Sabre/CalDAV/XMLUtil.php
+++ b/3rdparty/Sabre/CalDAV/XMLUtil.php
diff --git a/3dparty/Sabre/CardDAV/AddressBook.php b/3rdparty/Sabre/CardDAV/AddressBook.php
index a4d2d0c4783..04e4c227b86 100644
--- a/3dparty/Sabre/CardDAV/AddressBook.php
+++ b/3rdparty/Sabre/CardDAV/AddressBook.php
@@ -15,7 +15,7 @@
*
* The AddressBook can contain multiple vcards
*/
-class Sabre_CardDAV_AddressBook extends Sabre_DAV_Directory implements Sabre_CardDAV_IAddressBook, Sabre_DAV_IProperties {
+class Sabre_CardDAV_AddressBook extends Sabre_DAV_Collection implements Sabre_CardDAV_IAddressBook, Sabre_DAV_IProperties, Sabre_DAVACL_IACL {
/**
* This is an array with addressbook information
@@ -129,8 +129,7 @@ class Sabre_CardDAV_AddressBook extends Sabre_DAV_Directory implements Sabre_Car
}
/**
- * Renames the addressbook. Note that most calendars use the
- * {DAV:}displayname to display a name to display a name.
+ * Renames the addressbook
*
* @param string $newName
* @return void
@@ -221,5 +220,76 @@ class Sabre_CardDAV_AddressBook extends Sabre_DAV_Directory implements Sabre_Car
}
+ /**
+ * Returns the owner principal
+ *
+ * This must be a url to a principal, or null if there's no owner
+ *
+ * @return string|null
+ */
+ public function getOwner() {
+
+ return $this->addressBookInfo['principaluri'];
+
+ }
+
+ /**
+ * Returns a group principal
+ *
+ * This must be a url to a principal, or null if there's no owner
+ *
+ * @return string|null
+ */
+ public function getGroup() {
+
+ return null;
+
+ }
+
+ /**
+ * Returns a list of ACE's for this node.
+ *
+ * Each ACE has the following properties:
+ * * 'privilege', a string such as {DAV:}read or {DAV:}write. These are
+ * currently the only supported privileges
+ * * 'principal', a url to the principal who owns the node
+ * * 'protected' (optional), indicating that this ACE is not allowed to
+ * be updated.
+ *
+ * @return array
+ */
+ public function getACL() {
+
+ return array(
+ array(
+ 'privilege' => '{DAV:}read',
+ 'principal' => $this->addressBookInfo['principaluri'],
+ 'protected' => true,
+ ),
+ array(
+ 'privilege' => '{DAV:}write',
+ 'principal' => $this->addressBookInfo['principaluri'],
+ 'protected' => true,
+ ),
+
+ );
+
+ }
+
+ /**
+ * Updates the ACL
+ *
+ * This method will receive a list of new ACE's.
+ *
+ * @param array $acl
+ * @return void
+ */
+ public function setACL(array $acl) {
+
+ throw new Sabre_DAV_Exception_MethodNotAllowed('Changing ACL is not yet supported');
+
+ }
+
+
}
diff --git a/3dparty/Sabre/CardDAV/AddressBookQueryParser.php b/3rdparty/Sabre/CardDAV/AddressBookQueryParser.php
index 08adc3b8157..08adc3b8157 100644
--- a/3dparty/Sabre/CardDAV/AddressBookQueryParser.php
+++ b/3rdparty/Sabre/CardDAV/AddressBookQueryParser.php
diff --git a/3dparty/Sabre/CardDAV/AddressBookRoot.php b/3rdparty/Sabre/CardDAV/AddressBookRoot.php
index 88c8ed2e061..1a80efba35e 100644
--- a/3dparty/Sabre/CardDAV/AddressBookRoot.php
+++ b/3rdparty/Sabre/CardDAV/AddressBookRoot.php
@@ -32,13 +32,19 @@ class Sabre_CardDAV_AddressBookRoot extends Sabre_DAVACL_AbstractPrincipalCollec
*
* This constructor needs both a principal and a carddav backend.
*
+ * By default this class will show a list of addressbook collections for
+ * principals in the 'principals' collection. If your main principals are
+ * actually located in a different path, use the $principalPrefix argument
+ * to override this.
+ *
* @param Sabre_DAVACL_IPrincipalBackend $principalBackend
- * @param Sabre_CardDAV_Backend_Abstract $carddavBackend
+ * @param Sabre_CardDAV_Backend_Abstract $carddavBackend
+ * @param string $principalPrefix
*/
- public function __construct(Sabre_DAVACL_IPrincipalBackend $principalBackend,Sabre_CardDAV_Backend_Abstract $carddavBackend) {
+ public function __construct(Sabre_DAVACL_IPrincipalBackend $principalBackend,Sabre_CardDAV_Backend_Abstract $carddavBackend, $principalPrefix = 'principals') {
$this->carddavBackend = $carddavBackend;
- parent::__construct($principalBackend);
+ parent::__construct($principalBackend, $principalPrefix);
}
diff --git a/3dparty/Sabre/CardDAV/Backend/Abstract.php b/3rdparty/Sabre/CardDAV/Backend/Abstract.php
index f6d10291ca6..f6d10291ca6 100644
--- a/3dparty/Sabre/CardDAV/Backend/Abstract.php
+++ b/3rdparty/Sabre/CardDAV/Backend/Abstract.php
diff --git a/3dparty/Sabre/CardDAV/Backend/PDO.php b/3rdparty/Sabre/CardDAV/Backend/PDO.php
index e7cd4ecd4df..63a74745aac 100644
--- a/3dparty/Sabre/CardDAV/Backend/PDO.php
+++ b/3rdparty/Sabre/CardDAV/Backend/PDO.php
@@ -23,13 +23,25 @@ class Sabre_CardDAV_Backend_PDO extends Sabre_CardDAV_Backend_Abstract {
protected $pdo;
/**
+ * The PDO table name used to store addressbooks
+ */
+ protected $addressBooksTableName;
+
+ /**
+ * The PDO table name used to store cards
+ */
+ protected $cardsTableName;
+
+ /**
* Sets up the object
*
* @param PDO $pdo
*/
- public function __construct(PDO $pdo) {
+ public function __construct(PDO $pdo, $addressBooksTableName = 'addressbooks', $cardsTableName = 'cards') {
$this->pdo = $pdo;
+ $this->addressBooksTableName = $addressBooksTableName;
+ $this->cardsTableName = $cardsTableName;
}
@@ -41,7 +53,7 @@ class Sabre_CardDAV_Backend_PDO extends Sabre_CardDAV_Backend_Abstract {
*/
public function getAddressBooksForUser($principalUri) {
- $stmt = $this->pdo->prepare('SELECT id, uri, displayname, principaluri, description, ctag FROM addressbooks WHERE principaluri = ?');
+ $stmt = $this->pdo->prepare('SELECT id, uri, displayname, principaluri, description, ctag FROM `'.$this->addressBooksTableName.'` WHERE principaluri = ?');
$result = $stmt->execute(array($principalUri));
$addressBooks = array();
@@ -101,7 +113,7 @@ class Sabre_CardDAV_Backend_PDO extends Sabre_CardDAV_Backend_Abstract {
return false;
}
- $query = 'UPDATE addressbooks SET ctag = ctag + 1 ';
+ $query = 'UPDATE `' . $this->addressBooksTableName . '` SET ctag = ctag + 1 ';
foreach($updates as $key=>$value) {
$query.=', `' . $key . '` = :' . $key . ' ';
}
@@ -148,7 +160,7 @@ class Sabre_CardDAV_Backend_PDO extends Sabre_CardDAV_Backend_Abstract {
}
- $query = 'INSERT INTO addressbooks (uri, displayname, description, principaluri, ctag) VALUES (:uri, :displayname, :description, :principaluri, 1)';
+ $query = 'INSERT INTO `' . $this->addressBooksTableName . '` (uri, displayname, description, principaluri, ctag) VALUES (:uri, :displayname, :description, :principaluri, 1)';
$stmt = $this->pdo->prepare($query);
$stmt->execute($values);
@@ -162,10 +174,10 @@ class Sabre_CardDAV_Backend_PDO extends Sabre_CardDAV_Backend_Abstract {
*/
public function deleteAddressBook($addressBookId) {
- $stmt = $this->pdo->prepare('DELETE FROM cards WHERE addressbookid = ?');
+ $stmt = $this->pdo->prepare('DELETE FROM `' . $this->cardsTableName . '` WHERE addressbookid = ?');
$stmt->execute(array($addressBookId));
- $stmt = $this->pdo->prepare('DELETE FROM addressbooks WHERE id = ?');
+ $stmt = $this->pdo->prepare('DELETE FROM `' . $this->addressBooksTableName . '` WHERE id = ?');
$stmt->execute(array($addressBookId));
}
@@ -178,7 +190,7 @@ class Sabre_CardDAV_Backend_PDO extends Sabre_CardDAV_Backend_Abstract {
*/
public function getCards($addressbookId) {
- $stmt = $this->pdo->prepare('SELECT id, carddata, uri, lastmodified FROM cards WHERE addressbookid = ?');
+ $stmt = $this->pdo->prepare('SELECT id, carddata, uri, lastmodified FROM `' . $this->cardsTableName . '` WHERE addressbookid = ?');
$stmt->execute(array($addressbookId));
return $stmt->fetchAll(PDO::FETCH_ASSOC);
@@ -194,7 +206,7 @@ class Sabre_CardDAV_Backend_PDO extends Sabre_CardDAV_Backend_Abstract {
*/
public function getCard($addressBookId, $cardUri) {
- $stmt = $this->pdo->prepare('SELECT id, carddata, uri, lastmodified FROM cards WHERE addressbookid = ? AND uri = ? LIMIT 1');
+ $stmt = $this->pdo->prepare('SELECT id, carddata, uri, lastmodified FROM `' . $this->cardsTableName . '` WHERE addressbookid = ? AND uri = ? LIMIT 1');
$stmt->execute(array($addressBookId, $cardUri));
$result = $stmt->fetchAll(PDO::FETCH_ASSOC);
@@ -213,11 +225,11 @@ class Sabre_CardDAV_Backend_PDO extends Sabre_CardDAV_Backend_Abstract {
*/
public function createCard($addressBookId, $cardUri, $cardData) {
- $stmt = $this->pdo->prepare('INSERT INTO cards (carddata, uri, lastmodified, addressbookid) VALUES (?, ?, ?, ?)');
+ $stmt = $this->pdo->prepare('INSERT INTO `' . $this->cardsTableName . '` (carddata, uri, lastmodified, addressbookid) VALUES (?, ?, ?, ?)');
$result = $stmt->execute(array($cardData, $cardUri, time(), $addressBookId));
- $stmt2 = $this->pdo->prepare('UPDATE addressbooks SET ctag = ctag + 1 WHERE id = ?');
+ $stmt2 = $this->pdo->prepare('UPDATE `' . $this->addressBooksTableName . '` SET ctag = ctag + 1 WHERE id = ?');
$stmt2->execute(array($addressBookId));
return $result;
@@ -234,10 +246,10 @@ class Sabre_CardDAV_Backend_PDO extends Sabre_CardDAV_Backend_Abstract {
*/
public function updateCard($addressBookId, $cardUri, $cardData) {
- $stmt = $this->pdo->prepare('UPDATE cards SET carddata = ?, lastmodified = ? WHERE uri = ? AND addressbookid =?');
+ $stmt = $this->pdo->prepare('UPDATE `' . $this->cardsTableName . '` SET carddata = ?, lastmodified = ? WHERE uri = ? AND addressbookid =?');
$result = $stmt->execute(array($cardData, time(), $cardUri, $addressBookId));
- $stmt2 = $this->pdo->prepare('UPDATE addressbooks SET ctag = ctag + 1 WHERE id = ?');
+ $stmt2 = $this->pdo->prepare('UPDATE `' . $this->addressBooksTableName . '` SET ctag = ctag + 1 WHERE id = ?');
$stmt2->execute(array($addressBookId));
return $stmt->rowCount()===1;
@@ -253,10 +265,10 @@ class Sabre_CardDAV_Backend_PDO extends Sabre_CardDAV_Backend_Abstract {
*/
public function deleteCard($addressBookId, $cardUri) {
- $stmt = $this->pdo->prepare('DELETE FROM cards WHERE addressbookid = ? AND uri = ?');
+ $stmt = $this->pdo->prepare('DELETE FROM `' . $this->cardsTableName . '` WHERE addressbookid = ? AND uri = ?');
$stmt->execute(array($addressBookId, $cardUri));
- $stmt2 = $this->pdo->prepare('UPDATE addressbooks SET ctag = ctag + 1 WHERE id = ?');
+ $stmt2 = $this->pdo->prepare('UPDATE `' . $this->addressBooksTableName . '` SET ctag = ctag + 1 WHERE id = ?');
$stmt2->execute(array($addressBookId));
return $stmt->rowCount()===1;
diff --git a/3dparty/Sabre/CardDAV/Card.php b/3rdparty/Sabre/CardDAV/Card.php
index a12e6d3914b..98189aa9fd8 100644
--- a/3dparty/Sabre/CardDAV/Card.php
+++ b/3rdparty/Sabre/CardDAV/Card.php
@@ -13,7 +13,7 @@
/**
* The Card object represents a single Card from an addressbook
*/
-class Sabre_CardDAV_Card extends Sabre_DAV_File implements Sabre_CardDAV_ICard {
+class Sabre_CardDAV_Card extends Sabre_DAV_File implements Sabre_CardDAV_ICard, Sabre_DAVACL_IACL {
/**
* CardDAV backend
@@ -147,5 +147,75 @@ class Sabre_CardDAV_Card extends Sabre_DAV_File implements Sabre_CardDAV_ICard {
return strlen($this->cardData['carddata']);
}
+
+ /**
+ * Returns the owner principal
+ *
+ * This must be a url to a principal, or null if there's no owner
+ *
+ * @return string|null
+ */
+ public function getOwner() {
+
+ return $this->addressBookInfo['principaluri'];
+
+ }
+
+ /**
+ * Returns a group principal
+ *
+ * This must be a url to a principal, or null if there's no owner
+ *
+ * @return string|null
+ */
+ public function getGroup() {
+
+ return null;
+
+ }
+
+ /**
+ * Returns a list of ACE's for this node.
+ *
+ * Each ACE has the following properties:
+ * * 'privilege', a string such as {DAV:}read or {DAV:}write. These are
+ * currently the only supported privileges
+ * * 'principal', a url to the principal who owns the node
+ * * 'protected' (optional), indicating that this ACE is not allowed to
+ * be updated.
+ *
+ * @return array
+ */
+ public function getACL() {
+
+ return array(
+ array(
+ 'privilege' => '{DAV:}read',
+ 'principal' => $this->addressBookInfo['principaluri'],
+ 'protected' => true,
+ ),
+ array(
+ 'privilege' => '{DAV:}write',
+ 'principal' => $this->addressBookInfo['principaluri'],
+ 'protected' => true,
+ ),
+ );
+
+ }
+
+ /**
+ * Updates the ACL
+ *
+ * This method will receive a list of new ACE's.
+ *
+ * @param array $acl
+ * @return void
+ */
+ public function setACL(array $acl) {
+
+ throw new Sabre_DAV_Exception_MethodNotAllowed('Changing ACL is not yet supported');
+
+ }
+
}
diff --git a/3dparty/Sabre/CardDAV/IAddressBook.php b/3rdparty/Sabre/CardDAV/IAddressBook.php
index a0dffb30aea..a0dffb30aea 100644
--- a/3dparty/Sabre/CardDAV/IAddressBook.php
+++ b/3rdparty/Sabre/CardDAV/IAddressBook.php
diff --git a/3dparty/Sabre/CardDAV/ICard.php b/3rdparty/Sabre/CardDAV/ICard.php
index 8f9bb097b56..8f9bb097b56 100644
--- a/3dparty/Sabre/CardDAV/ICard.php
+++ b/3rdparty/Sabre/CardDAV/ICard.php
diff --git a/3dparty/Sabre/CardDAV/IDirectory.php b/3rdparty/Sabre/CardDAV/IDirectory.php
index e0d0797d285..e0d0797d285 100644
--- a/3dparty/Sabre/CardDAV/IDirectory.php
+++ b/3rdparty/Sabre/CardDAV/IDirectory.php
diff --git a/3dparty/Sabre/CardDAV/Plugin.php b/3rdparty/Sabre/CardDAV/Plugin.php
index 16fadc526e4..a96f9aaebb6 100644
--- a/3dparty/Sabre/CardDAV/Plugin.php
+++ b/3rdparty/Sabre/CardDAV/Plugin.php
@@ -391,7 +391,7 @@ class Sabre_CardDAV_Plugin extends Sabre_DAV_ServerPlugin {
foreach($vProperties as $vProperty) {
// If we got all the way here, we'll need to validate the
// text-match filter.
- $success = Sabre_DAV_StringUtil::textMatch($vProperty[$filter['name']]->value, $filter['text-match']['value'], $filter['text-match']['collation'], $filter['text-match']['matchType']);
+ $success = Sabre_DAV_StringUtil::textMatch($vProperty[$filter['name']]->value, $filter['text-match']['value'], $filter['text-match']['collation'], $filter['text-match']['match-type']);
if ($success) break;
}
if ($filter['text-match']['negate-condition']) {
@@ -434,7 +434,7 @@ class Sabre_CardDAV_Plugin extends Sabre_DAV_ServerPlugin {
$success = false;
foreach($texts as $haystack) {
- $success = Sabre_DAV_StringUtil::textMatch($haystack, $filter['value'], $filter['collation'], $filter['matchType']);
+ $success = Sabre_DAV_StringUtil::textMatch($haystack, $filter['value'], $filter['collation'], $filter['match-type']);
// Breaking on the first match
if ($success) break;
diff --git a/3dparty/Sabre/CardDAV/UserAddressBooks.php b/3rdparty/Sabre/CardDAV/UserAddressBooks.php
index 186bf016a1e..564ecd701f0 100644
--- a/3dparty/Sabre/CardDAV/UserAddressBooks.php
+++ b/3rdparty/Sabre/CardDAV/UserAddressBooks.php
@@ -13,7 +13,7 @@
/**
* The UserAddressBooks collection contains a list of addressbooks associated with a user
*/
-class Sabre_CardDAV_UserAddressBooks extends Sabre_DAV_Directory implements Sabre_DAV_IExtendedCollection {
+class Sabre_CardDAV_UserAddressBooks extends Sabre_DAV_Collection implements Sabre_DAV_IExtendedCollection, Sabre_DAVACL_IACL {
/**
* Principal uri
@@ -168,4 +168,75 @@ class Sabre_CardDAV_UserAddressBooks extends Sabre_DAV_Directory implements Sabr
}
+ /**
+ * Returns the owner principal
+ *
+ * This must be a url to a principal, or null if there's no owner
+ *
+ * @return string|null
+ */
+ public function getOwner() {
+
+ return $this->principalUri;
+
+ }
+
+ /**
+ * Returns a group principal
+ *
+ * This must be a url to a principal, or null if there's no owner
+ *
+ * @return string|null
+ */
+ public function getGroup() {
+
+ return null;
+
+ }
+
+ /**
+ * Returns a list of ACE's for this node.
+ *
+ * Each ACE has the following properties:
+ * * 'privilege', a string such as {DAV:}read or {DAV:}write. These are
+ * currently the only supported privileges
+ * * 'principal', a url to the principal who owns the node
+ * * 'protected' (optional), indicating that this ACE is not allowed to
+ * be updated.
+ *
+ * @return array
+ */
+ public function getACL() {
+
+ return array(
+ array(
+ 'privilege' => '{DAV:}read',
+ 'principal' => $this->principalUri,
+ 'protected' => true,
+ ),
+ array(
+ 'privilege' => '{DAV:}write',
+ 'principal' => $this->principalUri,
+ 'protected' => true,
+ ),
+
+ );
+
+ }
+
+ /**
+ * Updates the ACL
+ *
+ * This method will receive a list of new ACE's.
+ *
+ * @param array $acl
+ * @return void
+ */
+ public function setACL(array $acl) {
+
+ throw new Sabre_DAV_Exception_MethodNotAllowed('Changing ACL is not yet supported');
+
+ }
+
+
}
diff --git a/3dparty/Sabre/CardDAV/Version.php b/3rdparty/Sabre/CardDAV/Version.php
index 8961027fc89..8961027fc89 100644
--- a/3dparty/Sabre/CardDAV/Version.php
+++ b/3rdparty/Sabre/CardDAV/Version.php
diff --git a/3dparty/Sabre/DAV/Auth/Backend/AbstractBasic.php b/3rdparty/Sabre/DAV/Auth/Backend/AbstractBasic.php
index 11bab8c7af7..11bab8c7af7 100644
--- a/3dparty/Sabre/DAV/Auth/Backend/AbstractBasic.php
+++ b/3rdparty/Sabre/DAV/Auth/Backend/AbstractBasic.php
diff --git a/3dparty/Sabre/DAV/Auth/Backend/AbstractDigest.php b/3rdparty/Sabre/DAV/Auth/Backend/AbstractDigest.php
index 5bdc72753ec..5bdc72753ec 100644
--- a/3dparty/Sabre/DAV/Auth/Backend/AbstractDigest.php
+++ b/3rdparty/Sabre/DAV/Auth/Backend/AbstractDigest.php
diff --git a/3dparty/Sabre/DAV/Auth/Backend/Apache.php b/3rdparty/Sabre/DAV/Auth/Backend/Apache.php
index 6bcd76bdcb0..6bcd76bdcb0 100644
--- a/3dparty/Sabre/DAV/Auth/Backend/Apache.php
+++ b/3rdparty/Sabre/DAV/Auth/Backend/Apache.php
diff --git a/3dparty/Sabre/DAV/Auth/Backend/File.php b/3rdparty/Sabre/DAV/Auth/Backend/File.php
index db1f04c4772..db1f04c4772 100644
--- a/3dparty/Sabre/DAV/Auth/Backend/File.php
+++ b/3rdparty/Sabre/DAV/Auth/Backend/File.php
diff --git a/3dparty/Sabre/DAV/Auth/Backend/PDO.php b/3rdparty/Sabre/DAV/Auth/Backend/PDO.php
index 0301503601e..0301503601e 100644
--- a/3dparty/Sabre/DAV/Auth/Backend/PDO.php
+++ b/3rdparty/Sabre/DAV/Auth/Backend/PDO.php
diff --git a/3dparty/Sabre/DAV/Auth/IBackend.php b/3rdparty/Sabre/DAV/Auth/IBackend.php
index 1f67af4c2d9..1f67af4c2d9 100644
--- a/3dparty/Sabre/DAV/Auth/IBackend.php
+++ b/3rdparty/Sabre/DAV/Auth/IBackend.php
diff --git a/3dparty/Sabre/DAV/Auth/Plugin.php b/3rdparty/Sabre/DAV/Auth/Plugin.php
index f3718fcf469..f3718fcf469 100644
--- a/3dparty/Sabre/DAV/Auth/Plugin.php
+++ b/3rdparty/Sabre/DAV/Auth/Plugin.php
diff --git a/3dparty/Sabre/DAV/Browser/GuessContentType.php b/3rdparty/Sabre/DAV/Browser/GuessContentType.php
index 8b55ec3ad9f..8b55ec3ad9f 100644
--- a/3dparty/Sabre/DAV/Browser/GuessContentType.php
+++ b/3rdparty/Sabre/DAV/Browser/GuessContentType.php
diff --git a/3dparty/Sabre/DAV/Browser/MapGetToPropFind.php b/3rdparty/Sabre/DAV/Browser/MapGetToPropFind.php
index a66b57a3a90..a66b57a3a90 100644
--- a/3dparty/Sabre/DAV/Browser/MapGetToPropFind.php
+++ b/3rdparty/Sabre/DAV/Browser/MapGetToPropFind.php
diff --git a/3dparty/Sabre/DAV/Browser/Plugin.php b/3rdparty/Sabre/DAV/Browser/Plugin.php
index 81a90558f93..81a90558f93 100644
--- a/3dparty/Sabre/DAV/Browser/Plugin.php
+++ b/3rdparty/Sabre/DAV/Browser/Plugin.php
diff --git a/3dparty/Sabre/DAV/Client.php b/3rdparty/Sabre/DAV/Client.php
index fc6a6fff083..fc6a6fff083 100644
--- a/3dparty/Sabre/DAV/Client.php
+++ b/3rdparty/Sabre/DAV/Client.php
diff --git a/3dparty/Sabre/DAV/Directory.php b/3rdparty/Sabre/DAV/Collection.php
index 14d7f2cb679..9da04c12792 100644
--- a/3dparty/Sabre/DAV/Directory.php
+++ b/3rdparty/Sabre/DAV/Collection.php
@@ -1,9 +1,9 @@
<?php
/**
- * Directory class
+ * Collection class
*
- * This is a helper class, that should aid in getting directory classes setup.
+ * This is a helper class, that should aid in getting collections classes setup.
* Most of its methods are implemented, and throw permission denied exceptions
*
* @package Sabre
@@ -12,7 +12,7 @@
* @author Evert Pot (http://www.rooftopsolutions.nl/)
* @license http://code.google.com/p/sabredav/wiki/License Modified BSD License
*/
-abstract class Sabre_DAV_Directory extends Sabre_DAV_Node implements Sabre_DAV_ICollection {
+abstract class Sabre_DAV_Collection extends Sabre_DAV_Node implements Sabre_DAV_ICollection {
/**
* Returns a child object, by its name.
diff --git a/3dparty/Sabre.autoload.php b/3rdparty/Sabre/DAV/Directory.php
index 0e5601d895b..86af4827b3e 100644
--- a/3dparty/Sabre.autoload.php
+++ b/3rdparty/Sabre/DAV/Directory.php
@@ -1,16 +1,17 @@
<?php
/**
- * SabreDAV's PHP autoloader
+ * Directory class
*
- * Warning: this file is deprecated. Please use Sabre/autoload.php instead.
+ * This class is now deprecated in favor of the Sabre_DAV_Collection class.
*
* @package Sabre
* @subpackage DAV
+ * @deprecated Use Sabre_DAV_Collection instead
* @copyright Copyright (C) 2007-2011 Rooftop Solutions. All rights reserved.
* @author Evert Pot (http://www.rooftopsolutions.nl/)
- * @deprecated
* @license http://code.google.com/p/sabredav/wiki/License Modified BSD License
*/
+abstract class Sabre_DAV_Directory extends Sabre_DAV_Collection {
+}
-include dirname(__FILE__) . '/Sabre/autoload.php';
diff --git a/3dparty/Sabre/DAV/Exception.php b/3rdparty/Sabre/DAV/Exception.php
index 61f8b87c0a6..61f8b87c0a6 100644
--- a/3dparty/Sabre/DAV/Exception.php
+++ b/3rdparty/Sabre/DAV/Exception.php
diff --git a/3dparty/Sabre/DAV/Exception/BadRequest.php b/3rdparty/Sabre/DAV/Exception/BadRequest.php
index 7025bb10317..7025bb10317 100644
--- a/3dparty/Sabre/DAV/Exception/BadRequest.php
+++ b/3rdparty/Sabre/DAV/Exception/BadRequest.php
diff --git a/3dparty/Sabre/DAV/Exception/Conflict.php b/3rdparty/Sabre/DAV/Exception/Conflict.php
index 7eaa08178ae..7eaa08178ae 100644
--- a/3dparty/Sabre/DAV/Exception/Conflict.php
+++ b/3rdparty/Sabre/DAV/Exception/Conflict.php
diff --git a/3dparty/Sabre/DAV/Exception/ConflictingLock.php b/3rdparty/Sabre/DAV/Exception/ConflictingLock.php
index 279f63dfde7..279f63dfde7 100644
--- a/3dparty/Sabre/DAV/Exception/ConflictingLock.php
+++ b/3rdparty/Sabre/DAV/Exception/ConflictingLock.php
diff --git a/3dparty/Sabre/DAV/Exception/FileNotFound.php b/3rdparty/Sabre/DAV/Exception/FileNotFound.php
index b20e4a2fb3f..b20e4a2fb3f 100644
--- a/3dparty/Sabre/DAV/Exception/FileNotFound.php
+++ b/3rdparty/Sabre/DAV/Exception/FileNotFound.php
diff --git a/3dparty/Sabre/DAV/Exception/Forbidden.php b/3rdparty/Sabre/DAV/Exception/Forbidden.php
index 167f3c2760a..167f3c2760a 100644
--- a/3dparty/Sabre/DAV/Exception/Forbidden.php
+++ b/3rdparty/Sabre/DAV/Exception/Forbidden.php
diff --git a/3dparty/Sabre/DAV/Exception/InsufficientStorage.php b/3rdparty/Sabre/DAV/Exception/InsufficientStorage.php
index 15007cdd352..15007cdd352 100644
--- a/3dparty/Sabre/DAV/Exception/InsufficientStorage.php
+++ b/3rdparty/Sabre/DAV/Exception/InsufficientStorage.php
diff --git a/3dparty/Sabre/DAV/Exception/InvalidResourceType.php b/3rdparty/Sabre/DAV/Exception/InvalidResourceType.php
index f06810a25ef..f06810a25ef 100644
--- a/3dparty/Sabre/DAV/Exception/InvalidResourceType.php
+++ b/3rdparty/Sabre/DAV/Exception/InvalidResourceType.php
diff --git a/3dparty/Sabre/DAV/Exception/LockTokenMatchesRequestUri.php b/3rdparty/Sabre/DAV/Exception/LockTokenMatchesRequestUri.php
index 47032cffc75..47032cffc75 100644
--- a/3dparty/Sabre/DAV/Exception/LockTokenMatchesRequestUri.php
+++ b/3rdparty/Sabre/DAV/Exception/LockTokenMatchesRequestUri.php
diff --git a/3dparty/Sabre/DAV/Exception/Locked.php b/3rdparty/Sabre/DAV/Exception/Locked.php
index b4bb2e0378c..b4bb2e0378c 100644
--- a/3dparty/Sabre/DAV/Exception/Locked.php
+++ b/3rdparty/Sabre/DAV/Exception/Locked.php
diff --git a/3dparty/Sabre/DAV/Exception/MethodNotAllowed.php b/3rdparty/Sabre/DAV/Exception/MethodNotAllowed.php
index 02c145ffeb6..02c145ffeb6 100644
--- a/3dparty/Sabre/DAV/Exception/MethodNotAllowed.php
+++ b/3rdparty/Sabre/DAV/Exception/MethodNotAllowed.php
diff --git a/3dparty/Sabre/DAV/Exception/NotAuthenticated.php b/3rdparty/Sabre/DAV/Exception/NotAuthenticated.php
index 1faffddfa00..1faffddfa00 100644
--- a/3dparty/Sabre/DAV/Exception/NotAuthenticated.php
+++ b/3rdparty/Sabre/DAV/Exception/NotAuthenticated.php
diff --git a/3dparty/Sabre/DAV/Exception/NotImplemented.php b/3rdparty/Sabre/DAV/Exception/NotImplemented.php
index cd7f609b09d..cd7f609b09d 100644
--- a/3dparty/Sabre/DAV/Exception/NotImplemented.php
+++ b/3rdparty/Sabre/DAV/Exception/NotImplemented.php
diff --git a/3dparty/Sabre/DAV/Exception/PreconditionFailed.php b/3rdparty/Sabre/DAV/Exception/PreconditionFailed.php
index ebcb9f5b9ac..ebcb9f5b9ac 100644
--- a/3dparty/Sabre/DAV/Exception/PreconditionFailed.php
+++ b/3rdparty/Sabre/DAV/Exception/PreconditionFailed.php
diff --git a/3dparty/Sabre/DAV/Exception/ReportNotImplemented.php b/3rdparty/Sabre/DAV/Exception/ReportNotImplemented.php
index e4ed601b16c..e4ed601b16c 100644
--- a/3dparty/Sabre/DAV/Exception/ReportNotImplemented.php
+++ b/3rdparty/Sabre/DAV/Exception/ReportNotImplemented.php
diff --git a/3dparty/Sabre/DAV/Exception/RequestedRangeNotSatisfiable.php b/3rdparty/Sabre/DAV/Exception/RequestedRangeNotSatisfiable.php
index 37abbd729d1..37abbd729d1 100644
--- a/3dparty/Sabre/DAV/Exception/RequestedRangeNotSatisfiable.php
+++ b/3rdparty/Sabre/DAV/Exception/RequestedRangeNotSatisfiable.php
diff --git a/3dparty/Sabre/DAV/Exception/UnsupportedMediaType.php b/3rdparty/Sabre/DAV/Exception/UnsupportedMediaType.php
index 4c37d8997cf..4c37d8997cf 100644
--- a/3dparty/Sabre/DAV/Exception/UnsupportedMediaType.php
+++ b/3rdparty/Sabre/DAV/Exception/UnsupportedMediaType.php
diff --git a/3dparty/Sabre/DAV/FS/Directory.php b/3rdparty/Sabre/DAV/FS/Directory.php
index ebd6a6c505e..ebd6a6c505e 100644
--- a/3dparty/Sabre/DAV/FS/Directory.php
+++ b/3rdparty/Sabre/DAV/FS/Directory.php
diff --git a/3dparty/Sabre/DAV/FS/File.php b/3rdparty/Sabre/DAV/FS/File.php
index 262187d7e8a..262187d7e8a 100644
--- a/3dparty/Sabre/DAV/FS/File.php
+++ b/3rdparty/Sabre/DAV/FS/File.php
diff --git a/3dparty/Sabre/DAV/FS/Node.php b/3rdparty/Sabre/DAV/FS/Node.php
index b8d7bcfe846..b8d7bcfe846 100644
--- a/3dparty/Sabre/DAV/FS/Node.php
+++ b/3rdparty/Sabre/DAV/FS/Node.php
diff --git a/3dparty/Sabre/DAV/FSExt/Directory.php b/3rdparty/Sabre/DAV/FSExt/Directory.php
index c43d4385ac7..c43d4385ac7 100644
--- a/3dparty/Sabre/DAV/FSExt/Directory.php
+++ b/3rdparty/Sabre/DAV/FSExt/Directory.php
diff --git a/3dparty/Sabre/DAV/FSExt/File.php b/3rdparty/Sabre/DAV/FSExt/File.php
index 7a8e7a11f21..7a8e7a11f21 100644
--- a/3dparty/Sabre/DAV/FSExt/File.php
+++ b/3rdparty/Sabre/DAV/FSExt/File.php
diff --git a/3dparty/Sabre/DAV/FSExt/Node.php b/3rdparty/Sabre/DAV/FSExt/Node.php
index 9e36222bfd3..9e36222bfd3 100644
--- a/3dparty/Sabre/DAV/FSExt/Node.php
+++ b/3rdparty/Sabre/DAV/FSExt/Node.php
diff --git a/3dparty/Sabre/DAV/File.php b/3rdparty/Sabre/DAV/File.php
index b74bd9525b3..b74bd9525b3 100644
--- a/3dparty/Sabre/DAV/File.php
+++ b/3rdparty/Sabre/DAV/File.php
diff --git a/3dparty/Sabre/DAV/ICollection.php b/3rdparty/Sabre/DAV/ICollection.php
index 0667d88899d..0667d88899d 100644
--- a/3dparty/Sabre/DAV/ICollection.php
+++ b/3rdparty/Sabre/DAV/ICollection.php
diff --git a/3dparty/Sabre/DAV/IExtendedCollection.php b/3rdparty/Sabre/DAV/IExtendedCollection.php
index b8db1ab2f26..b8db1ab2f26 100644
--- a/3dparty/Sabre/DAV/IExtendedCollection.php
+++ b/3rdparty/Sabre/DAV/IExtendedCollection.php
diff --git a/3dparty/Sabre/DAV/IFile.php b/3rdparty/Sabre/DAV/IFile.php
index 446ec86187b..446ec86187b 100644
--- a/3dparty/Sabre/DAV/IFile.php
+++ b/3rdparty/Sabre/DAV/IFile.php
diff --git a/3dparty/Sabre/DAV/ILockable.php b/3rdparty/Sabre/DAV/ILockable.php
index f9fb3a70251..f9fb3a70251 100644
--- a/3dparty/Sabre/DAV/ILockable.php
+++ b/3rdparty/Sabre/DAV/ILockable.php
diff --git a/3dparty/Sabre/DAV/INode.php b/3rdparty/Sabre/DAV/INode.php
index c0b96bf5377..c0b96bf5377 100644
--- a/3dparty/Sabre/DAV/INode.php
+++ b/3rdparty/Sabre/DAV/INode.php
diff --git a/3dparty/Sabre/DAV/IProperties.php b/3rdparty/Sabre/DAV/IProperties.php
index af17cad24af..af17cad24af 100644
--- a/3dparty/Sabre/DAV/IProperties.php
+++ b/3rdparty/Sabre/DAV/IProperties.php
diff --git a/3dparty/Sabre/DAV/IQuota.php b/3rdparty/Sabre/DAV/IQuota.php
index 8ff1a4597f8..8ff1a4597f8 100644
--- a/3dparty/Sabre/DAV/IQuota.php
+++ b/3rdparty/Sabre/DAV/IQuota.php
diff --git a/3dparty/Sabre/DAV/Locks/Backend/Abstract.php b/3rdparty/Sabre/DAV/Locks/Backend/Abstract.php
index b09f93ddac7..b09f93ddac7 100644
--- a/3dparty/Sabre/DAV/Locks/Backend/Abstract.php
+++ b/3rdparty/Sabre/DAV/Locks/Backend/Abstract.php
diff --git a/3dparty/Sabre/DAV/Locks/Backend/FS.php b/3rdparty/Sabre/DAV/Locks/Backend/FS.php
index 8653f55b1c6..8653f55b1c6 100644
--- a/3dparty/Sabre/DAV/Locks/Backend/FS.php
+++ b/3rdparty/Sabre/DAV/Locks/Backend/FS.php
diff --git a/3dparty/Sabre/DAV/Locks/Backend/File.php b/3rdparty/Sabre/DAV/Locks/Backend/File.php
index f65b20c4306..f65b20c4306 100644
--- a/3dparty/Sabre/DAV/Locks/Backend/File.php
+++ b/3rdparty/Sabre/DAV/Locks/Backend/File.php
diff --git a/3dparty/Sabre/DAV/Locks/Backend/PDO.php b/3rdparty/Sabre/DAV/Locks/Backend/PDO.php
index c3923af19d3..c3923af19d3 100644
--- a/3dparty/Sabre/DAV/Locks/Backend/PDO.php
+++ b/3rdparty/Sabre/DAV/Locks/Backend/PDO.php
diff --git a/3dparty/Sabre/DAV/Locks/LockInfo.php b/3rdparty/Sabre/DAV/Locks/LockInfo.php
index 6a064466f40..6a064466f40 100644
--- a/3dparty/Sabre/DAV/Locks/LockInfo.php
+++ b/3rdparty/Sabre/DAV/Locks/LockInfo.php
diff --git a/3dparty/Sabre/DAV/Locks/Plugin.php b/3rdparty/Sabre/DAV/Locks/Plugin.php
index 461e2847e0a..461e2847e0a 100644
--- a/3dparty/Sabre/DAV/Locks/Plugin.php
+++ b/3rdparty/Sabre/DAV/Locks/Plugin.php
diff --git a/3dparty/Sabre/DAV/Mount/Plugin.php b/3rdparty/Sabre/DAV/Mount/Plugin.php
index f93a1aa25a1..f93a1aa25a1 100644
--- a/3dparty/Sabre/DAV/Mount/Plugin.php
+++ b/3rdparty/Sabre/DAV/Mount/Plugin.php
diff --git a/3dparty/Sabre/DAV/Node.php b/3rdparty/Sabre/DAV/Node.php
index 0510df5fdf2..0510df5fdf2 100644
--- a/3dparty/Sabre/DAV/Node.php
+++ b/3rdparty/Sabre/DAV/Node.php
diff --git a/3dparty/Sabre/DAV/ObjectTree.php b/3rdparty/Sabre/DAV/ObjectTree.php
index 1319c7daefa..f12a3683705 100644
--- a/3dparty/Sabre/DAV/ObjectTree.php
+++ b/3rdparty/Sabre/DAV/ObjectTree.php
@@ -89,6 +89,7 @@ class Sabre_DAV_ObjectTree extends Sabre_DAV_Tree {
list($parent, $base) = Sabre_DAV_URLUtil::splitPath($path);
$parentNode = $this->getNodeForPath($parent);
+ if (!$parentNode instanceof Sabre_DAV_ICollection) return false;
return $parentNode->childExists($base);
} catch (Sabre_DAV_Exception_FileNotFound $e) {
diff --git a/3dparty/Sabre/DAV/Property.php b/3rdparty/Sabre/DAV/Property.php
index 577535b0127..577535b0127 100644
--- a/3dparty/Sabre/DAV/Property.php
+++ b/3rdparty/Sabre/DAV/Property.php
diff --git a/3dparty/Sabre/DAV/Property/GetLastModified.php b/3rdparty/Sabre/DAV/Property/GetLastModified.php
index 4a812629971..4a812629971 100644
--- a/3dparty/Sabre/DAV/Property/GetLastModified.php
+++ b/3rdparty/Sabre/DAV/Property/GetLastModified.php
diff --git a/3dparty/Sabre/DAV/Property/Href.php b/3rdparty/Sabre/DAV/Property/Href.php
index 3294ff2ac68..3294ff2ac68 100644
--- a/3dparty/Sabre/DAV/Property/Href.php
+++ b/3rdparty/Sabre/DAV/Property/Href.php
diff --git a/3dparty/Sabre/DAV/Property/HrefList.php b/3rdparty/Sabre/DAV/Property/HrefList.php
index 76a5512901c..76a5512901c 100644
--- a/3dparty/Sabre/DAV/Property/HrefList.php
+++ b/3rdparty/Sabre/DAV/Property/HrefList.php
diff --git a/3dparty/Sabre/DAV/Property/IHref.php b/3rdparty/Sabre/DAV/Property/IHref.php
index 29d76a44fcd..29d76a44fcd 100644
--- a/3dparty/Sabre/DAV/Property/IHref.php
+++ b/3rdparty/Sabre/DAV/Property/IHref.php
diff --git a/3dparty/Sabre/DAV/Property/LockDiscovery.php b/3rdparty/Sabre/DAV/Property/LockDiscovery.php
index 05c7470b4ed..05c7470b4ed 100644
--- a/3dparty/Sabre/DAV/Property/LockDiscovery.php
+++ b/3rdparty/Sabre/DAV/Property/LockDiscovery.php
diff --git a/3dparty/Sabre/DAV/Property/ResourceType.php b/3rdparty/Sabre/DAV/Property/ResourceType.php
index 2c606c22d60..2c606c22d60 100644
--- a/3dparty/Sabre/DAV/Property/ResourceType.php
+++ b/3rdparty/Sabre/DAV/Property/ResourceType.php
diff --git a/3dparty/Sabre/DAV/Property/Response.php b/3rdparty/Sabre/DAV/Property/Response.php
index 7d3a2db0387..7d3a2db0387 100644
--- a/3dparty/Sabre/DAV/Property/Response.php
+++ b/3rdparty/Sabre/DAV/Property/Response.php
diff --git a/3dparty/Sabre/DAV/Property/ResponseList.php b/3rdparty/Sabre/DAV/Property/ResponseList.php
index cd70b12861d..cd70b12861d 100644
--- a/3dparty/Sabre/DAV/Property/ResponseList.php
+++ b/3rdparty/Sabre/DAV/Property/ResponseList.php
diff --git a/3dparty/Sabre/DAV/Property/SupportedLock.php b/3rdparty/Sabre/DAV/Property/SupportedLock.php
index 01e63f58d9d..01e63f58d9d 100644
--- a/3dparty/Sabre/DAV/Property/SupportedLock.php
+++ b/3rdparty/Sabre/DAV/Property/SupportedLock.php
diff --git a/3dparty/Sabre/DAV/Property/SupportedReportSet.php b/3rdparty/Sabre/DAV/Property/SupportedReportSet.php
index acd9219c0f7..acd9219c0f7 100644
--- a/3dparty/Sabre/DAV/Property/SupportedReportSet.php
+++ b/3rdparty/Sabre/DAV/Property/SupportedReportSet.php
diff --git a/3dparty/Sabre/DAV/Server.php b/3rdparty/Sabre/DAV/Server.php
index e912dea0f1d..e5e9e482fee 100644
--- a/3dparty/Sabre/DAV/Server.php
+++ b/3rdparty/Sabre/DAV/Server.php
@@ -150,7 +150,7 @@ class Sabre_DAV_Server {
* use it as the directory tree. If a Sabre_DAV_INode is passed, it
* will create a Sabre_DAV_ObjectTree and use the node as the root.
*
- * If nothing is passed, a Sabre_DAV_SimpleDirectory is created in
+ * If nothing is passed, a Sabre_DAV_SimpleCollection is created in
* a Sabre_DAV_ObjectTree.
*
* If an array is passed, we automatically create a root node, and use
@@ -175,11 +175,11 @@ class Sabre_DAV_Server {
}
}
- $root = new Sabre_DAV_SimpleDirectory('root', $treeOrNode);
+ $root = new Sabre_DAV_SimpleCollection('root', $treeOrNode);
$this->tree = new Sabre_DAV_ObjectTree($root);
} elseif (is_null($treeOrNode)) {
- $root = new Sabre_DAV_SimpleDirectory('root');
+ $root = new Sabre_DAV_SimpleCollection('root');
$this->tree = new Sabre_DAV_ObjectTree($root);
} else {
throw new Sabre_DAV_Exception('Invalid argument passed to constructor. Argument must either be an instance of Sabre_DAV_Tree, Sabre_DAV_INode, an array or null');
@@ -1397,18 +1397,6 @@ class Sabre_DAV_Server {
}
/**
- * This method is invoked by sub-systems creating a new directory.
- *
- * @param string $uri
- * @return void
- */
- public function createDirectory($uri) {
-
- $this->createCollection($uri,array('{DAV:}collection'),array());
-
- }
-
- /**
* Use this method to create a new collection
*
* The {DAV:}resourcetype is specified using the resourceType array.
diff --git a/3dparty/Sabre/DAV/ServerPlugin.php b/3rdparty/Sabre/DAV/ServerPlugin.php
index 6909f600c21..6909f600c21 100644
--- a/3dparty/Sabre/DAV/ServerPlugin.php
+++ b/3rdparty/Sabre/DAV/ServerPlugin.php
diff --git a/3dparty/Sabre/DAV/SimpleDirectory.php b/3rdparty/Sabre/DAV/SimpleCollection.php
index 8c79962a95f..223d05fed55 100644
--- a/3dparty/Sabre/DAV/SimpleDirectory.php
+++ b/3rdparty/Sabre/DAV/SimpleCollection.php
@@ -1,9 +1,9 @@
<?php
/**
- * SimpleDirectory
+ * SimpleCollection
*
- * The SimpleDirectory is used to quickly setup static directory structures.
+ * The SimpleCollection is used to quickly setup static directory structures.
* Just create the object with a proper name, and add children to use it.
*
* @package Sabre
@@ -12,7 +12,7 @@
* @author Evert Pot (http://www.rooftopsolutions.nl/)
* @license http://code.google.com/p/sabredav/wiki/License Modified BSD License
*/
-class Sabre_DAV_SimpleDirectory extends Sabre_DAV_Directory {
+class Sabre_DAV_SimpleCollection extends Sabre_DAV_Collection {
/**
* List of childnodes
diff --git a/3rdparty/Sabre/DAV/SimpleDirectory.php b/3rdparty/Sabre/DAV/SimpleDirectory.php
new file mode 100644
index 00000000000..516a3aa907c
--- /dev/null
+++ b/3rdparty/Sabre/DAV/SimpleDirectory.php
@@ -0,0 +1,21 @@
+<?php
+
+/**
+ * SimpleDirectory
+ *
+ * The SimpleDirectory is used to quickly setup static directory structures.
+ * Just create the object with a proper name, and add children to use it.
+ *
+ * This class is now deprecated, use Sabre_DAV_SimpleCollection instead.
+ *
+ * @package Sabre
+ * @subpackage DAV
+ * @deprecated Use Sabre_DAV_SimpleCollection instead.
+ * @copyright Copyright (C) 2007-2011 Rooftop Solutions. All rights reserved.
+ * @author Evert Pot (http://www.rooftopsolutions.nl/)
+ * @license http://code.google.com/p/sabredav/wiki/License Modified BSD License
+ */
+class Sabre_DAV_SimpleDirectory extends Sabre_DAV_SimpleCollection {
+
+}
+
diff --git a/3dparty/Sabre/DAV/StringUtil.php b/3rdparty/Sabre/DAV/StringUtil.php
index b0b708f8e0f..b0b708f8e0f 100644
--- a/3dparty/Sabre/DAV/StringUtil.php
+++ b/3rdparty/Sabre/DAV/StringUtil.php
diff --git a/3dparty/Sabre/DAV/TemporaryFileFilterPlugin.php b/3rdparty/Sabre/DAV/TemporaryFileFilterPlugin.php
index e8276af5613..e8276af5613 100644
--- a/3dparty/Sabre/DAV/TemporaryFileFilterPlugin.php
+++ b/3rdparty/Sabre/DAV/TemporaryFileFilterPlugin.php
diff --git a/3dparty/Sabre/DAV/Tree.php b/3rdparty/Sabre/DAV/Tree.php
index 98e6f62c9e5..98e6f62c9e5 100644
--- a/3dparty/Sabre/DAV/Tree.php
+++ b/3rdparty/Sabre/DAV/Tree.php
diff --git a/3dparty/Sabre/DAV/Tree/Filesystem.php b/3rdparty/Sabre/DAV/Tree/Filesystem.php
index 5c611047e07..5c611047e07 100644
--- a/3dparty/Sabre/DAV/Tree/Filesystem.php
+++ b/3rdparty/Sabre/DAV/Tree/Filesystem.php
diff --git a/3dparty/Sabre/DAV/URLUtil.php b/3rdparty/Sabre/DAV/URLUtil.php
index 1502e4dd2ce..1502e4dd2ce 100644
--- a/3dparty/Sabre/DAV/URLUtil.php
+++ b/3rdparty/Sabre/DAV/URLUtil.php
diff --git a/3dparty/Sabre/DAV/UUIDUtil.php b/3rdparty/Sabre/DAV/UUIDUtil.php
index e42a536ad8a..e42a536ad8a 100644
--- a/3dparty/Sabre/DAV/UUIDUtil.php
+++ b/3rdparty/Sabre/DAV/UUIDUtil.php
diff --git a/3dparty/Sabre/DAV/Version.php b/3rdparty/Sabre/DAV/Version.php
index c93d793ab67..c93d793ab67 100644
--- a/3dparty/Sabre/DAV/Version.php
+++ b/3rdparty/Sabre/DAV/Version.php
diff --git a/3dparty/Sabre/DAV/XMLUtil.php b/3rdparty/Sabre/DAV/XMLUtil.php
index bd05be4b229..bd05be4b229 100644
--- a/3dparty/Sabre/DAV/XMLUtil.php
+++ b/3rdparty/Sabre/DAV/XMLUtil.php
diff --git a/3dparty/Sabre/DAVACL/AbstractPrincipalCollection.php b/3rdparty/Sabre/DAVACL/AbstractPrincipalCollection.php
index 7d120feb2bf..a361e054610 100644
--- a/3dparty/Sabre/DAVACL/AbstractPrincipalCollection.php
+++ b/3rdparty/Sabre/DAVACL/AbstractPrincipalCollection.php
@@ -14,7 +14,7 @@
* @author Evert Pot (http://www.rooftopsolutions.nl/)
* @license http://code.google.com/p/sabredav/wiki/License Modified BSD License
*/
-abstract class Sabre_DAVACL_AbstractPrincipalCollection extends Sabre_DAV_Directory {
+abstract class Sabre_DAVACL_AbstractPrincipalCollection extends Sabre_DAV_Collection {
/**
* Node or 'directory' name.
diff --git a/3dparty/Sabre/DAVACL/Exception/AceConflict.php b/3rdparty/Sabre/DAVACL/Exception/AceConflict.php
index d10aeb4345c..d10aeb4345c 100644
--- a/3dparty/Sabre/DAVACL/Exception/AceConflict.php
+++ b/3rdparty/Sabre/DAVACL/Exception/AceConflict.php
diff --git a/3dparty/Sabre/DAVACL/Exception/NeedPrivileges.php b/3rdparty/Sabre/DAVACL/Exception/NeedPrivileges.php
index 640ab8efff4..640ab8efff4 100644
--- a/3dparty/Sabre/DAVACL/Exception/NeedPrivileges.php
+++ b/3rdparty/Sabre/DAVACL/Exception/NeedPrivileges.php
diff --git a/3dparty/Sabre/DAVACL/Exception/NoAbstract.php b/3rdparty/Sabre/DAVACL/Exception/NoAbstract.php
index 60f49ebff4a..60f49ebff4a 100644
--- a/3dparty/Sabre/DAVACL/Exception/NoAbstract.php
+++ b/3rdparty/Sabre/DAVACL/Exception/NoAbstract.php
diff --git a/3dparty/Sabre/DAVACL/Exception/NotRecognizedPrincipal.php b/3rdparty/Sabre/DAVACL/Exception/NotRecognizedPrincipal.php
index e056dc9e4f7..e056dc9e4f7 100644
--- a/3dparty/Sabre/DAVACL/Exception/NotRecognizedPrincipal.php
+++ b/3rdparty/Sabre/DAVACL/Exception/NotRecognizedPrincipal.php
diff --git a/3dparty/Sabre/DAVACL/Exception/NotSupportedPrivilege.php b/3rdparty/Sabre/DAVACL/Exception/NotSupportedPrivilege.php
index 27db7cdd7dd..27db7cdd7dd 100644
--- a/3dparty/Sabre/DAVACL/Exception/NotSupportedPrivilege.php
+++ b/3rdparty/Sabre/DAVACL/Exception/NotSupportedPrivilege.php
diff --git a/3dparty/Sabre/DAVACL/IACL.php b/3rdparty/Sabre/DAVACL/IACL.php
index 506be4248d7..506be4248d7 100644
--- a/3dparty/Sabre/DAVACL/IACL.php
+++ b/3rdparty/Sabre/DAVACL/IACL.php
diff --git a/3dparty/Sabre/DAVACL/IPrincipal.php b/3rdparty/Sabre/DAVACL/IPrincipal.php
index 7868811db76..7868811db76 100644
--- a/3dparty/Sabre/DAVACL/IPrincipal.php
+++ b/3rdparty/Sabre/DAVACL/IPrincipal.php
diff --git a/3dparty/Sabre/DAVACL/IPrincipalBackend.php b/3rdparty/Sabre/DAVACL/IPrincipalBackend.php
index 8899f6f80df..8899f6f80df 100644
--- a/3dparty/Sabre/DAVACL/IPrincipalBackend.php
+++ b/3rdparty/Sabre/DAVACL/IPrincipalBackend.php
diff --git a/3dparty/Sabre/DAVACL/Plugin.php b/3rdparty/Sabre/DAVACL/Plugin.php
index b964bdb5dec..b964bdb5dec 100644
--- a/3dparty/Sabre/DAVACL/Plugin.php
+++ b/3rdparty/Sabre/DAVACL/Plugin.php
diff --git a/3dparty/Sabre/DAVACL/Principal.php b/3rdparty/Sabre/DAVACL/Principal.php
index 158b271058c..158b271058c 100644
--- a/3dparty/Sabre/DAVACL/Principal.php
+++ b/3rdparty/Sabre/DAVACL/Principal.php
diff --git a/3dparty/Sabre/DAVACL/PrincipalBackend/PDO.php b/3rdparty/Sabre/DAVACL/PrincipalBackend/PDO.php
index 55bd1903c9b..55bd1903c9b 100644
--- a/3dparty/Sabre/DAVACL/PrincipalBackend/PDO.php
+++ b/3rdparty/Sabre/DAVACL/PrincipalBackend/PDO.php
diff --git a/3dparty/Sabre/DAVACL/PrincipalCollection.php b/3rdparty/Sabre/DAVACL/PrincipalCollection.php
index 3cc0ae84621..3cc0ae84621 100644
--- a/3dparty/Sabre/DAVACL/PrincipalCollection.php
+++ b/3rdparty/Sabre/DAVACL/PrincipalCollection.php
diff --git a/3dparty/Sabre/DAVACL/Property/Acl.php b/3rdparty/Sabre/DAVACL/Property/Acl.php
index e41e7411310..e41e7411310 100644
--- a/3dparty/Sabre/DAVACL/Property/Acl.php
+++ b/3rdparty/Sabre/DAVACL/Property/Acl.php
diff --git a/3dparty/Sabre/DAVACL/Property/CurrentUserPrivilegeSet.php b/3rdparty/Sabre/DAVACL/Property/CurrentUserPrivilegeSet.php
index 72274597b31..72274597b31 100644
--- a/3dparty/Sabre/DAVACL/Property/CurrentUserPrivilegeSet.php
+++ b/3rdparty/Sabre/DAVACL/Property/CurrentUserPrivilegeSet.php
diff --git a/3dparty/Sabre/DAVACL/Property/Principal.php b/3rdparty/Sabre/DAVACL/Property/Principal.php
index dad9a3550fb..dad9a3550fb 100644
--- a/3dparty/Sabre/DAVACL/Property/Principal.php
+++ b/3rdparty/Sabre/DAVACL/Property/Principal.php
diff --git a/3dparty/Sabre/DAVACL/Property/SupportedPrivilegeSet.php b/3rdparty/Sabre/DAVACL/Property/SupportedPrivilegeSet.php
index 93c3895035d..93c3895035d 100644
--- a/3dparty/Sabre/DAVACL/Property/SupportedPrivilegeSet.php
+++ b/3rdparty/Sabre/DAVACL/Property/SupportedPrivilegeSet.php
diff --git a/3dparty/Sabre/DAVACL/Version.php b/3rdparty/Sabre/DAVACL/Version.php
index a705507486c..a705507486c 100644
--- a/3dparty/Sabre/DAVACL/Version.php
+++ b/3rdparty/Sabre/DAVACL/Version.php
diff --git a/3dparty/Sabre/HTTP/AWSAuth.php b/3rdparty/Sabre/HTTP/AWSAuth.php
index 5e4668cd94d..5e4668cd94d 100644
--- a/3dparty/Sabre/HTTP/AWSAuth.php
+++ b/3rdparty/Sabre/HTTP/AWSAuth.php
diff --git a/3dparty/Sabre/HTTP/AbstractAuth.php b/3rdparty/Sabre/HTTP/AbstractAuth.php
index eb528f6fdee..eb528f6fdee 100644
--- a/3dparty/Sabre/HTTP/AbstractAuth.php
+++ b/3rdparty/Sabre/HTTP/AbstractAuth.php
diff --git a/3dparty/Sabre/HTTP/BasicAuth.php b/3rdparty/Sabre/HTTP/BasicAuth.php
index 35c22d22dc3..35c22d22dc3 100644
--- a/3dparty/Sabre/HTTP/BasicAuth.php
+++ b/3rdparty/Sabre/HTTP/BasicAuth.php
diff --git a/3dparty/Sabre/HTTP/DigestAuth.php b/3rdparty/Sabre/HTTP/DigestAuth.php
index 5e755929571..5e755929571 100644
--- a/3dparty/Sabre/HTTP/DigestAuth.php
+++ b/3rdparty/Sabre/HTTP/DigestAuth.php
diff --git a/3dparty/Sabre/HTTP/Request.php b/3rdparty/Sabre/HTTP/Request.php
index 95a64171aab..95a64171aab 100644
--- a/3dparty/Sabre/HTTP/Request.php
+++ b/3rdparty/Sabre/HTTP/Request.php
diff --git a/3dparty/Sabre/HTTP/Response.php b/3rdparty/Sabre/HTTP/Response.php
index c8c77251a17..c8c77251a17 100644
--- a/3dparty/Sabre/HTTP/Response.php
+++ b/3rdparty/Sabre/HTTP/Response.php
diff --git a/3dparty/Sabre/HTTP/Util.php b/3rdparty/Sabre/HTTP/Util.php
index 8a6bd7df487..8a6bd7df487 100644
--- a/3dparty/Sabre/HTTP/Util.php
+++ b/3rdparty/Sabre/HTTP/Util.php
diff --git a/3dparty/Sabre/HTTP/Version.php b/3rdparty/Sabre/HTTP/Version.php
index f8d1bb75429..f8d1bb75429 100644
--- a/3dparty/Sabre/HTTP/Version.php
+++ b/3rdparty/Sabre/HTTP/Version.php
diff --git a/3dparty/Sabre/VObject/Component.php b/3rdparty/Sabre/VObject/Component.php
index 3d5a3d75635..3d5a3d75635 100644
--- a/3dparty/Sabre/VObject/Component.php
+++ b/3rdparty/Sabre/VObject/Component.php
diff --git a/3dparty/Sabre/VObject/Element.php b/3rdparty/Sabre/VObject/Element.php
index 8d2b0aaacd1..8d2b0aaacd1 100644
--- a/3dparty/Sabre/VObject/Element.php
+++ b/3rdparty/Sabre/VObject/Element.php
diff --git a/3dparty/Sabre/VObject/Element/DateTime.php b/3rdparty/Sabre/VObject/Element/DateTime.php
index 63af858dd68..63af858dd68 100644
--- a/3dparty/Sabre/VObject/Element/DateTime.php
+++ b/3rdparty/Sabre/VObject/Element/DateTime.php
diff --git a/3dparty/Sabre/VObject/Element/MultiDateTime.php b/3rdparty/Sabre/VObject/Element/MultiDateTime.php
index 07f7e82c346..07f7e82c346 100644
--- a/3dparty/Sabre/VObject/Element/MultiDateTime.php
+++ b/3rdparty/Sabre/VObject/Element/MultiDateTime.php
diff --git a/3dparty/Sabre/VObject/ElementList.php b/3rdparty/Sabre/VObject/ElementList.php
index 9922cd587bc..9922cd587bc 100644
--- a/3dparty/Sabre/VObject/ElementList.php
+++ b/3rdparty/Sabre/VObject/ElementList.php
diff --git a/3dparty/Sabre/VObject/Node.php b/3rdparty/Sabre/VObject/Node.php
index efc7f76da79..efc7f76da79 100644
--- a/3dparty/Sabre/VObject/Node.php
+++ b/3rdparty/Sabre/VObject/Node.php
diff --git a/3dparty/Sabre/VObject/Parameter.php b/3rdparty/Sabre/VObject/Parameter.php
index 9ebab6ec69b..9ebab6ec69b 100644
--- a/3dparty/Sabre/VObject/Parameter.php
+++ b/3rdparty/Sabre/VObject/Parameter.php
diff --git a/3dparty/Sabre/VObject/ParseException.php b/3rdparty/Sabre/VObject/ParseException.php
index ed4ef2e8592..ed4ef2e8592 100644
--- a/3dparty/Sabre/VObject/ParseException.php
+++ b/3rdparty/Sabre/VObject/ParseException.php
diff --git a/3dparty/Sabre/VObject/Property.php b/3rdparty/Sabre/VObject/Property.php
index 201e6356ad6..201e6356ad6 100644
--- a/3dparty/Sabre/VObject/Property.php
+++ b/3rdparty/Sabre/VObject/Property.php
diff --git a/3dparty/Sabre/VObject/Reader.php b/3rdparty/Sabre/VObject/Reader.php
index a1d47d41bb8..9c20e33cea0 100644
--- a/3dparty/Sabre/VObject/Reader.php
+++ b/3rdparty/Sabre/VObject/Reader.php
@@ -168,16 +168,20 @@ class Sabre_VObject_Reader {
$paramValue = '(?P<paramValue>[^\"^;]*|"[^"]*")';
- $regex = "/(?<=^|;)(?P<paramName>$token)=$paramValue(?=$|;)/i";
+ $regex = "/(?<=^|;)(?P<paramName>$token)(=$paramValue(?=$|;))?/i";
preg_match_all($regex, $parameters, $matches, PREG_SET_ORDER);
$params = array();
foreach($matches as $match) {
- $value = $match['paramValue'];
+ $value = isset($match['paramValue'])?$match['paramValue']:null;
- // Stripping quotes, if needed
- if ($value[0] === '"') $value = substr($value,1,strlen($value)-2);
+ if (isset($value[0])) {
+ // Stripping quotes, if needed
+ if ($value[0] === '"') $value = substr($value,1,strlen($value)-2);
+ } else {
+ $value = '';
+ }
$params[] = new Sabre_VObject_Parameter($match['paramName'], stripcslashes($value));
diff --git a/3dparty/Sabre/VObject/Version.php b/3rdparty/Sabre/VObject/Version.php
index 8c3fe67b1f4..8c3fe67b1f4 100644
--- a/3dparty/Sabre/VObject/Version.php
+++ b/3rdparty/Sabre/VObject/Version.php
diff --git a/3dparty/Sabre/VObject/includes.php b/3rdparty/Sabre/VObject/includes.php
index f21010fb275..f21010fb275 100644
--- a/3dparty/Sabre/VObject/includes.php
+++ b/3rdparty/Sabre/VObject/includes.php
diff --git a/3dparty/Sabre/autoload.php b/3rdparty/Sabre/autoload.php
index 0649df655b0..0649df655b0 100644
--- a/3dparty/Sabre/autoload.php
+++ b/3rdparty/Sabre/autoload.php
diff --git a/3dparty/System.php b/3rdparty/System.php
index 97de96b14ca..97de96b14ca 100644
--- a/3dparty/System.php
+++ b/3rdparty/System.php
diff --git a/3dparty/XML/Parser.php b/3rdparty/XML/Parser.php
index 38b4f8fe8a6..38b4f8fe8a6 100644
--- a/3dparty/XML/Parser.php
+++ b/3rdparty/XML/Parser.php
diff --git a/3dparty/XML/RPC.php b/3rdparty/XML/RPC.php
index 2cdb44f4aea..2cdb44f4aea 100644
--- a/3dparty/XML/RPC.php
+++ b/3rdparty/XML/RPC.php
diff --git a/3dparty/XML/RPC/Server.php b/3rdparty/XML/RPC/Server.php
index 5c5c04b1f7a..5c5c04b1f7a 100644
--- a/3dparty/XML/RPC/Server.php
+++ b/3rdparty/XML/RPC/Server.php
diff --git a/AUTHORS b/AUTHORS
new file mode 100644
index 00000000000..5f992b932ef
--- /dev/null
+++ b/AUTHORS
@@ -0,0 +1,20 @@
+ownCloud is written by:
+ Frank Karlitschek
+ Robin Appelman
+ Jakob Sack
+ Jan-Christoph Borchardt
+ Michael Gapczynski
+ François Kubler
+ Kunal Ghosh
+ Antonio José Gallo Sánchez
+ Arthur Schiwon
+ Kamil Domański
+ Aldo Giambelluca
+ Dominik Schmidt
+ …
+
+With help from many libraries and frameworks including:
+ Open Collaboration Services
+ SabreDAV
+ jQuery
+ …
diff --git a/COPYING-README b/COPYING-README
index 54b959eb016..5f00323b719 100644
--- a/COPYING-README
+++ b/COPYING-README
@@ -1,5 +1,9 @@
-Files in OwnCloud may be copied under the terms of the GNU Affero
-General Public Licence as published by the Free Software Foundation;
-either version 3 of the License, or any later version unless noted otherwise.
+Files in ownCloud are licensed under the Affero General Public License version 3,
+the text of which can be found in COPYING-AGPL, or any later version of the AGPL,
+unless otherwise noted.
-Files in inc/ are PHP or other licences as noted.
+Components of ownCloud, including jQuery, are licensed under the MIT/X11 license.
+All unmodified files from these and other sources retain their original copyright
+and license notices: see the relevant individual files.
+
+Attribution information for ownCloud is contained in the AUTHORS file.
diff --git a/README b/README
index ea591935ffe..18b817ad346 100644
--- a/README
+++ b/README
@@ -1,16 +1,12 @@
-ownCloud
-========
-An open personal cloud server which runs on your personal server.
-It enables you to access your data from all of your devices.
-ownCloud makes sharing data with other people possible.
-It supports automatic backups, versioning and encryption.
+ownCloud is a personal cloud which runs on your own server.
+It is alpha software in development and should be treated accordingly.
-Installation instructions are in the docs directory.
-docs/INSTALL
-
-For more information visit:
http://owncloud.org
-The source code is available at:
-projects.kde.org/projects/playground/www/owncloud
+Installation instructions: http://owncloud.org/index.php/Installation
+Source code: http://projects.kde.org/owncloud
+Mailing list: https://mail.kde.org/mailman/listinfo/owncloud
+IRC channel: http://webchat.freenode.net/?channels=#owncloud
+Diaspora: https://joindiaspora.com/u/owncloud
+Identi.ca: http://identi.ca/owncloud
diff --git a/admin/templates/app.php b/admin/templates/app.php
index c8989e323ce..06896121d09 100644
--- a/admin/templates/app.php
+++ b/admin/templates/app.php
@@ -1,9 +1,4 @@
-<?php
-/*
- * Template for Apps
- */
-$app=$_['app'];
-?>
+<?php $app=$_['app']; ?>
<h1><?php echo $app["name"]; ?></h1>
<?php echo('<span class="type">'.$app['typename'].'</span>'); ?><br />
<span class="date"><?php echo $l->l('datetime', $app["changed"]); ?></span><br />
@@ -21,7 +16,7 @@ $app=$_['app'];
<br />
<?php echo('<a class="description" target="_blank" href="'.$app["detailpage"].'">'.$l->t( 'read more' ).'</a><br />'); ?>
</td>
- <td width="1" valign="top"><a class="prettybutton" href=""><?php echo $l->t( 'INSTALL' ); ?></a></td>
+ <td width="1" valign="top"><a class="prettybutton" href=""><?php echo $l->t( 'Install' ); ?></a></td>
</tr>
</table>
diff --git a/admin/templates/apps.php b/admin/templates/apps.php
index 50dd497c333..732326f659a 100644
--- a/admin/templates/apps.php
+++ b/admin/templates/apps.php
@@ -1,11 +1,3 @@
-<?php
-/*
- * Template for Apps
- */
-?>
-<h1><?php echo $l->t( 'Apps Repository' ); ?></h1>
-
-
<table cellspacing="0">
<thead>
<tr>
diff --git a/admin/templates/appsinst.php b/admin/templates/appsinst.php
index 0e97df6add8..d1adb5f45a1 100644
--- a/admin/templates/appsinst.php
+++ b/admin/templates/appsinst.php
@@ -1,10 +1,3 @@
-<?php
-/*
- * Template for Installed Apps
- */
-?>
-<h1><?php echo $l->t( 'Installed Applications' ); ?></h1>
-
<table>
<thead>
<tr>
@@ -20,8 +13,8 @@
<td class="name" width="200"><?php echo($app['name']); ?></td>
<td class="version"><?php echo($app['version']); ?></td>
<td><?php echo($app['author']); ?></td>
- <td><input x-use="appenablebutton" type='button' value='<?php echo $l->t( $app['enabled'] ? 'enabled' : 'disabled' ); ?>' class='appbutton prettybutton <?php echo( $app['enabled'] ? 'enabled' : 'disabled' ); ?>'/></td>
+ <td><input x-use="appenablebutton" type="button" value="<?php echo $l->t( $app['enabled'] ? 'enabled' : 'disabled' ); ?>" class="appbutton prettybutton <?php echo( $app['enabled'] ? 'enabled' : 'disabled' ); ?>" /></td>
</tr>
<?php endforeach; ?>
</tbody>
-</table> \ No newline at end of file
+</table>
diff --git a/apps/contacts/appinfo/app.php b/apps/contacts/appinfo/app.php
new file mode 100644
index 00000000000..7ff47265256
--- /dev/null
+++ b/apps/contacts/appinfo/app.php
@@ -0,0 +1,18 @@
+<?php
+
+OC::$CLASSPATH['OC_Contacts_Addressbook'] = 'apps/contacts/lib/addressbook.php';
+OC::$CLASSPATH['OC_Connector_Sabre_CardDAV'] = 'apps/contacts/lib/connector_sabre.php';
+
+OC_App::register( array(
+ 'order' => 10,
+ 'id' => 'contacts',
+ 'name' => 'Contacts' ));
+
+OC_App::addNavigationEntry( array(
+ 'id' => 'contacts_index',
+ 'order' => 10,
+ 'href' => OC_Helper::linkTo( 'contacts', 'index.php' ),
+ 'icon' => OC_Helper::imagePath( 'contacts', 'icon.png' ),
+ 'name' => 'Contacts' ));
+
+?>
diff --git a/apps/contacts/appinfo/database.xml b/apps/contacts/appinfo/database.xml
new file mode 100644
index 00000000000..7c8268d71f5
--- /dev/null
+++ b/apps/contacts/appinfo/database.xml
@@ -0,0 +1,129 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<database>
+
+ <name>*dbname*</name>
+ <create>true</create>
+ <overwrite>false</overwrite>
+
+ <charset>utf8</charset>
+
+ <table>
+
+ <name>*dbprefix*contacts_addressbooks</name>
+
+ <declaration>
+
+ <field>
+ <name>id</name>
+ <type>integer</type>
+ <default>0</default>
+ <notnull>true</notnull>
+ <autoincrement>1</autoincrement>
+ <unsigned>true</unsigned>
+ <length>4</length>
+ </field>
+
+ <field>
+ <name>userid</name>
+ <type>text</type>
+ <default></default>
+ <notnull>true</notnull>
+ <length>255</length>
+ </field>
+
+ <field>
+ <name>displayname</name>
+ <type>text</type>
+ <default></default>
+ <notnull>false</notnull>
+ <length>255</length>
+ </field>
+
+ <field>
+ <name>uri</name>
+ <type>text</type>
+ <default></default>
+ <notnull>false</notnull>
+ <length>100</length>
+ </field>
+
+ <field>
+ <name>description</name>
+ <type>clob</type>
+ <notnull>false</notnull>
+ </field>
+
+ <field>
+ <name>ctag</name>
+ <type>integer</type>
+ <default>1</default>
+ <notnull>true</notnull>
+ <unsigned>true</unsigned>
+ <length>4</length>
+ </field>
+
+ </declaration>
+
+ </table>
+
+ <table>
+
+ <name>*dbprefix*contacts_cards</name>
+
+ <declaration>
+
+ <field>
+ <name>id</name>
+ <type>integer</type>
+ <default>0</default>
+ <notnull>true</notnull>
+ <autoincrement>1</autoincrement>
+ <unsigned>true</unsigned>
+ <length>4</length>
+ </field>
+
+ <field>
+ <name>addressbookid</name>
+ <type>integer</type>
+ <default></default>
+ <notnull>true</notnull>
+ <unsigned>true</unsigned>
+ <length>4</length>
+ </field>
+
+ <field>
+ <name>fullname</name>
+ <type>text</type>
+ <default></default>
+ <notnull>false</notnull>
+ <length>255</length>
+ </field>
+
+ <field>
+ <name>carddata</name>
+ <type>clob</type>
+ <notnull>false</notnull>
+ </field>
+
+ <field>
+ <name>uri</name>
+ <type>text</type>
+ <default></default>
+ <notnull>false</notnull>
+ <length>100</length>
+ </field>
+
+ <field>
+ <name>lastmodified</name>
+ <type>integer</type>
+ <default></default>
+ <notnull>false</notnull>
+ <unsigned>true</unsigned>
+ <length>4</length>
+ </field>
+
+ </declaration>
+
+ </table>
+
+</database>
diff --git a/apps/contacts/appinfo/info.xml b/apps/contacts/appinfo/info.xml
new file mode 100644
index 00000000000..93463b9cf09
--- /dev/null
+++ b/apps/contacts/appinfo/info.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0"?>
+<info>
+ <id>contacts</id>
+ <name>Contacts</name>
+ <version>0.1</version>
+ <licence>AGPL</licence>
+ <author>Jakob Sack</author>
+ <require>2</require>
+</info>
diff --git a/apps/contacts/carddav.php b/apps/contacts/carddav.php
new file mode 100644
index 00000000000..ae2c5b97363
--- /dev/null
+++ b/apps/contacts/carddav.php
@@ -0,0 +1,28 @@
+<?php
+
+// Do not load FS ...
+$RUNTIME_NOSETUPFS = true;
+
+require_once('../../lib/base.php');
+
+// Backends
+$authBackend = new OC_Connector_Sabre_Auth();
+$principalBackend = new OC_Connector_Sabre_Principal();
+$carddavBackend = new OC_Connector_Sabre_CardDAV();
+
+// Root nodes
+$nodes = array(
+ new Sabre_DAVACL_PrincipalCollection($principalBackend),
+ new Sabre_CardDAV_AddressBookRoot($principalBackend, $carddavBackend),
+);
+
+// Fire up server
+$server = new Sabre_DAV_Server($nodes);
+$server->setBaseUri($WEBROOT.'/apps/contacts/carddav.php');
+// Add plugins
+$server->addPlugin(new Sabre_DAV_Auth_Plugin($authBackend,'ownCloud'));
+$server->addPlugin(new Sabre_CardDAV_Plugin());
+$server->addPlugin(new Sabre_DAVACL_Plugin());
+
+// And off we go!
+$server->exec();
diff --git a/apps/contacts/css/styles.css b/apps/contacts/css/styles.css
new file mode 100644
index 00000000000..8d1c8b69c3f
--- /dev/null
+++ b/apps/contacts/css/styles.css
@@ -0,0 +1 @@
+
diff --git a/apps/contacts/details.php b/apps/contacts/details.php
new file mode 100644
index 00000000000..7ab1b64de24
--- /dev/null
+++ b/apps/contacts/details.php
@@ -0,0 +1,57 @@
+<?php
+/**
+ * ownCloud - Addressbook
+ *
+ * @author Jakob Sack
+ * @copyright 2011 Jakob Sack mail@jakobsack.de
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU AFFERO GENERAL PUBLIC LICENSE for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+// Init owncloud
+require_once('../../lib/base.php');
+
+$id = $_GET['id'];
+
+$l10n = new OC_L10N('contacts');
+
+// Check if we are a user
+if( !OC_User::isLoggedIn()){
+ echo $l10n->t('You need to log in!');
+ exit();
+}
+
+
+$card = OC_Contacts_Addressbook::findCard( $id );
+if( $card === false ){
+ echo json_encode( array( 'status' => 'error', 'data' => array( 'message' => $l10n->t('Can not find Contact!'))));
+ exit();
+}
+
+$addressbook = OC_Contacts_Addressbook::findAddressbook( $card['addressbookid'] );
+if( $addressbook === false || $addressbook['userid'] != OC_USER::getUser()){
+ echo json_encode( array( 'status' => 'error', 'data' => array( 'message' => $l10n->t('This is not your contact!'))));
+ exit();
+}
+
+$vcard = Sabre_VObject_Reader::read($card['carddata']);
+$details = OC_Contacts_Addressbook::structureContact($vcard);
+
+$tmpl = new OC_Template('contacts','_details');
+$tmpl->assign('details',$details);
+$tmpl->assign('id',$id);
+$page = $tmpl->fetchPage();
+
+echo json_encode( array( 'status' => 'success', 'data' => array( 'page' => $page )));
diff --git a/apps/contacts/img/icon.png b/apps/contacts/img/icon.png
new file mode 100644
index 00000000000..ea2ed9e3335
--- /dev/null
+++ b/apps/contacts/img/icon.png
Binary files differ
diff --git a/apps/contacts/index.php b/apps/contacts/index.php
new file mode 100644
index 00000000000..1e01b1c9fbd
--- /dev/null
+++ b/apps/contacts/index.php
@@ -0,0 +1,77 @@
+<?php
+/**
+ * ownCloud - Addressbook
+ *
+ * @author Jakob Sack
+ * @copyright 2011 Jakob Sack mail@jakobsack.de
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU AFFERO GENERAL PUBLIC LICENSE for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+function contacts_namesort($a,$b){
+ return strcmp($a['name'],$b['name']);
+}
+
+// Init owncloud
+require_once('../../lib/base.php');
+
+// Check if we are a user
+if( !OC_User::isLoggedIn()){
+ header( 'Location: '.OC_Helper::linkTo( '', 'index.php' ));
+ exit();
+}
+
+// Check if the user has an addressbook
+$addressbooks = OC_Contacts_Addressbook::allAddressbooks(OC_User::getUser());
+if( count($addressbooks) == 0){
+ OC_Contacts_Addressbook::addAddressbook(OC_User::getUser(),'default','Default Address Book');
+}
+
+// Load the files we need
+OC_App::setActiveNavigationEntry( 'contacts_index' );
+
+// Load a specific user?
+$id = isset( $_GET['id'] ) ? $_GET['id'] : null;
+
+// sort addressbooks (use contactsort)
+usort($addressbooks,'contacts_namesort');
+// Addressbooks to load
+$openaddressbooks = explode(';',OC_Preferences::getValue(OC_User::getUser(),'contacts','openaddressbooks',null));
+
+$contacts = array();
+foreach( $openaddressbooks as $addressbook ){
+ $addressbookcontacts = OC_Contacts_Addressbook::allCards($addressbook);
+ foreach( $addressbookcontacts as $contact ){
+ $contacts[] = array( 'name' => $contact['fullname'], 'id' => $contact['id'] );
+ }
+}
+
+
+usort($contacts,'contacts_namesort');
+$details = array();
+
+if( !is_null($id) || count($contacts)){
+ $contact = OC_Contacts_Addressbook::findCard(is_null($id)?$contacts[0]['id']:$id);
+ $vcard = Sabre_VObject_Reader::read($contact['carddata']);
+ $details = OC_Contacts_Addressbook::structureContact($vcard);
+}
+
+// Process the template
+$tmpl = new OC_Template( 'contacts', 'index', 'user' );
+$tmpl->assign('addressbooks', $addressbooks);
+$tmpl->assign('contacts', $contacts);
+$tmpl->assign('details', $details );
+$tmpl->assign('id',$id);
+$tmpl->printPage();
diff --git a/apps/contacts/js/interface.js b/apps/contacts/js/interface.js
new file mode 100644
index 00000000000..6af160b3927
--- /dev/null
+++ b/apps/contacts/js/interface.js
@@ -0,0 +1,19 @@
+$(document).ready(function(){
+ $('.contacts_contacts').find('li').live('click',function(){
+ var id = $(this).attr('x-id');
+ $.getJSON('details.php',{'id':id},function(jsondata){
+ if(jsondata.status == 'success'){
+ $('.contacts_details').html(jsondata.data.page);
+ }
+ else{
+ alert(jsondata.data.message);
+ }
+ });
+ return false;
+ });
+
+ $('.contacts_addressbooksexpander').click(function(){
+ $('.contacts_addressbooksdetails').toggle();
+ return false;
+ });
+});
diff --git a/apps/contacts/lib/addressbook.php b/apps/contacts/lib/addressbook.php
new file mode 100644
index 00000000000..c0f26c7df55
--- /dev/null
+++ b/apps/contacts/lib/addressbook.php
@@ -0,0 +1,287 @@
+<?php
+/**
+ * ownCloud - Addressbook
+ *
+ * @author Jakob Sack
+ * @copyright 2011 Jakob Sack mail@jakobsack.de
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU AFFERO GENERAL PUBLIC LICENSE for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+/*
+ *
+ * The following SQL statement is just a help for developers and will not be
+ * executed!
+ *
+ * CREATE TABLE contacts_addressbooks (
+ * id INT(11) UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT,
+ * userid VARCHAR(255) NOT NULL,
+ * displayname VARCHAR(255),
+ * uri VARCHAR(100),
+ * description TEXT,
+ * ctag INT(11) UNSIGNED NOT NULL DEFAULT '1'
+ * );
+ *
+ * CREATE TABLE contacts_cards (
+ * id INT(11) UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT,
+ * addressbookid INT(11) UNSIGNED NOT NULL,
+ * fullname VARCHAR(255),
+ * carddata TEXT,
+ * uri VARCHAR(100),
+ * lastmodified INT(11) UNSIGNED
+ * );
+ */
+
+/**
+ * This class manages our addressbooks.
+ */
+class OC_Contacts_Addressbook{
+ public static function allAddressbooks($uid){
+ $stmt = OC_DB::prepare( 'SELECT * FROM *PREFIX*contacts_addressbooks WHERE userid = ?' );
+ $result = $stmt->execute(array($uid));
+
+ $addressbooks = array();
+ while( $row = $result->fetchRow()){
+ $addressbooks[] = $row;
+ }
+
+ return $addressbooks;
+ }
+
+ public static function allAddressbooksWherePrincipalURIIs($principaluri){
+ $uid = self::extractUserID($principaluri);
+ return self::allAddressbooks($uid);
+ }
+
+ public static function findAddressbook($id){
+ $stmt = OC_DB::prepare( 'SELECT * FROM *PREFIX*contacts_addressbooks WHERE id = ?' );
+ $result = $stmt->execute(array($id));
+
+ return $result->fetchRow();
+ }
+
+ public static function addAddressbook($userid,$name,$description){
+ $all = self::allAddressbooks($userid);
+ $uris = array();
+ foreach($all as $i){
+ $uris[] = $i['uri'];
+ }
+
+ $uri = self::createURI('name', $uris );
+
+ $stmt = OC_DB::prepare( 'INSERT INTO *PREFIX*contacts_addressbooks (userid,displayname,uri,description,ctag) VALUES(?,?,?,?,?)' );
+ $result = $stmt->execute(array($userid,$name,$uri,$description,1));
+
+ return OC_DB::insertid();
+ }
+
+ public static function addAddressbookFromDAVData($principaluri,$uri,$name,$description){
+ $userid = self::extractUserID($principaluri);
+
+ $stmt = OC_DB::prepare( 'INSERT INTO *PREFIX*contacts_addressbooks (userid,displayname,uri,description,ctag) VALUES(?,?,?,?,?)' );
+ $result = $stmt->execute(array($userid,$name,$uri,$description,1));
+
+ return OC_DB::insertid();
+ }
+
+ public static function editAddressbook($id,$name,$description){
+ // Need these ones for checking uri
+ $addressbook = self::find($id);
+
+ if(is_null($name)){
+ $name = $addressbook['name'];
+ }
+ if(is_null($description)){
+ $description = $addressbook['description'];
+ }
+
+ $stmt = OC_DB::prepare( 'UPDATE *PREFIX*contacts_addressbooks SET displayname=?,description=?, ctag=ctag+1 WHERE id=?' );
+ $result = $stmt->execute(array($name,$description,$id));
+
+ return true;
+ }
+
+ public static function touchAddressbook($id){
+ $stmt = OC_DB::prepare( 'UPDATE *PREFIX*contacts_addressbooks SET ctag = ctag + 1 WHERE id = ?' );
+ $stmt->execute(array($id));
+
+ return true;
+ }
+
+ public static function deleteAddressbook($id){
+ $stmt = OC_DB::prepare( 'DELETE FROM *PREFIX*contacts_cards WHERE id = ?' );
+ $stmt->execute(array($id));
+
+ $stmt = OC_DB::prepare( 'DELETE FROM *PREFIX*contacts_addressbooks WHERE addressbookid = ?' );
+ $stmt->execute(array($id));
+
+ return true;
+ }
+
+ public static function allCards($id){
+ $stmt = OC_DB::prepare( 'SELECT * FROM *PREFIX*contacts_cards WHERE addressbookid = ?' );
+ $result = $stmt->execute(array($id));
+
+ $addressbooks = array();
+ while( $row = $result->fetchRow()){
+ $addressbooks[] = $row;
+ }
+
+ return $addressbooks;
+ }
+
+ public static function findCard($id){
+ $stmt = OC_DB::prepare( 'SELECT * FROM *PREFIX*contacts_cards WHERE id = ?' );
+ $result = $stmt->execute(array($id));
+
+ return $result->fetchRow();
+ }
+
+ public static function findCardWhereDAVDataIs($aid,$uri){
+ $stmt = OC_DB::prepare( 'SELECT * FROM *PREFIX*contacts_cards WHERE addressbookid = ? AND uri = ?' );
+ $result = $stmt->execute(array($aid,$uri));
+
+ return $result->fetchRow();
+ }
+
+ public static function addCard($id,$data){
+ $fn = null;
+ $uri = null;
+ $card = Sabre_VObject_Reader::read($data);
+ foreach($card->children as $property){
+ if($property->name == 'FN'){
+ $fn = $property->value;
+ }
+ elseif(is_null($uri) && $property->name == 'UID' ){
+ $uri = $property->value.'.vcf';
+ }
+ }
+ $uri = self::createUID().'.vcf';
+
+ $stmt = OC_DB::prepare( 'INSERT INTO *PREFIX*contacts_cards (addressbookid,fullname,carddata,uri,lastmodified) VALUES(?,?,?,?,?)' );
+ $result = $stmt->execute(array($id,$fn,$data,$uri,time()));
+
+ self::touch($id);
+
+ return OC_DB::insertid;
+ }
+
+ public static function addCardFromDAVData($id,$uri,$data){
+ $fn = null;
+ $card = Sabre_VObject_Reader::read($data);
+ foreach($card->children as $property){
+ if($property->name == 'FN'){
+ $fn = $property->value;
+ }
+ }
+
+ $stmt = OC_DB::prepare( 'INSERT INTO *PREFIX*contacts_cards (addressbookid,fullname,carddata,uri,lastmodified) VALUES(?,?,?,?,?)' );
+ $result = $stmt->execute(array($id,$fn,$data,$uri,time()));
+
+ self::touch($id);
+
+ return OC_DB::insertid;
+ }
+
+ public static function editCard($id, $data){
+ $oldcard = self::findCard($id,$aid,$uri);
+ $fn = null;
+ $card = Sabre_VObject_Reader::read($data);
+ foreach($card->children as $property){
+ if($property->name == 'FN'){
+ $fn = $property->value;
+ }
+ }
+
+ $stmt = OC_DB::prepare( 'UPDATE *PREFIX*contacts_cards SET fullname = ?,carddata = ?, lastmodified = ? WHERE id = ?' );
+ $result = $stmt->execute(array($fn,$data,time(),$id));
+
+ self::touch($oldcard['addressbookid']);
+
+ return true;
+ }
+
+ public static function editCardFromDAVData($aid,$uri,$data){
+ $oldcard = self::findCardWhereDAVDataIs($aid,$uri);
+
+ $fn = null;
+ $card = Sabre_VObject_Reader::read($data);
+ foreach($card->children as $property){
+ if($property->name == 'FN'){
+ $fn = $property->value;
+ }
+ }
+
+ $stmt = OC_DB::prepare( 'UPDATE *PREFIX*contacts_cards SET fullname = ?,carddata = ?, lastmodified = ? WHERE id = ?' );
+ $result = $stmt->execute(array($fn,$data,time(),$oldcard['id']));
+
+ self::touch($oldcard['addressbookid']);
+
+ return true;
+ }
+
+ public static function deleteCard($id){
+ $stmt = OC_DB::prepare( 'DELETE FROM *PREFIX*contacts_addressbooks WHERE id = ?' );
+ $stmt->execute(array($id));
+
+ return true;
+ }
+
+ public static function deleteCardFromDAVData($aid,$uri){
+ $stmt = OC_DB::prepare( 'DELETE FROM *PREFIX*contacts_addressbooks WHERE addressbookid = ? AND uri=?' );
+ $stmt->execute(array($aid,$uri));
+
+ return true;
+ }
+
+ public static function createURI($name,$existing){
+ $name = strtolower($name);
+ $newname = $name;
+ $i = 1;
+ while(in_array($newname,$existing)){
+ $newname = $name.$i;
+ $i = $i + 1;
+ }
+ return $newname;
+ }
+
+ public static function createUID(){
+ return substr(md5(rand().time()),0,10);
+ }
+
+ public static function extractUserID($principaluri){
+ list($prefix,$userid) = Sabre_DAV_URLUtil::splitPath($principaluri);
+ return $userid;
+ }
+
+ public static function structureContact($object){
+ $details = array();
+ foreach($object->children as $property){
+ $temp = array(
+ 'name' => $property->name,
+ 'value' => ($property->name == 'PHOTO' || $property->name == 'LOGO' ? null : $property->value ),
+ 'parameters' => array());
+ foreach($property->parameters as $parameter){
+ $temp['parameters'][] = array( 'name' => $parameter->name, 'value' => $parameter->value);
+ }
+ if(array_key_exists($property->name,$details)){
+ $details[$property->name][] = $temp;
+ }
+ else{
+ $details[$property->name] = array($temp);
+ }
+ }
+ return $details;
+ }
+}
diff --git a/apps/contacts/lib/connector_sabre.php b/apps/contacts/lib/connector_sabre.php
new file mode 100644
index 00000000000..98e2598b3a7
--- /dev/null
+++ b/apps/contacts/lib/connector_sabre.php
@@ -0,0 +1,186 @@
+<?php
+
+/**
+ * PDO CardDAV backend
+ *
+ * @package Sabre
+ * @subpackage CardDAV
+ * @copyright Copyright (C) 2007-2011 Rooftop Solutions. All rights reserved.
+ * @author Evert Pot (http://www.rooftopsolutions.nl/)
+ * @license http://code.google.com/p/sabredav/wiki/License Modified BSD License
+ */
+
+/**
+ * This CardDAV backend uses PDO to store addressbooks
+ */
+class OC_Connector_Sabre_CardDAV extends Sabre_CardDAV_Backend_Abstract {
+ /**
+ * Returns the list of addressbooks for a specific user.
+ *
+ * @param string $principaluri
+ * @return array
+ */
+ public function getAddressBooksForUser($principaluri) {
+ $data = OC_Contacts_Addressbook::allAddressbooksWherePrincipalURIIs($principaluri);
+ $addressbooks = array();
+
+ foreach($data as $i) {
+ $addressbooks[] = array(
+ 'id' => $i['id'],
+ 'uri' => $i['uri'],
+ 'principaluri' => 'principals/'.$i['userid'],
+ '{DAV:}displayname' => $i['displayname'],
+ '{' . Sabre_CardDAV_Plugin::NS_CARDDAV . '}addressbook-description' => $i['description'],
+ '{http://calendarserver.org/ns/}getctag' => $i['ctag'],
+ );
+ }
+
+ return $addressbooks;
+ }
+
+
+ /**
+ * Updates an addressbook's properties
+ *
+ * See Sabre_DAV_IProperties for a description of the mutations array, as
+ * well as the return value.
+ *
+ * @param mixed $addressbookid
+ * @param array $mutations
+ * @see Sabre_DAV_IProperties::updateProperties
+ * @return bool|array
+ */
+ public function updateAddressBook($addressbookid, array $mutations) {
+ $name = null;
+ $description = null;
+
+ foreach($mutations as $property=>$newvalue) {
+ switch($property) {
+ case '{DAV:}displayname' :
+ $name = $newvalue;
+ break;
+ case '{' . Sabre_CardDAV_Plugin::NS_CARDDAV . '}addressbook-description' :
+ $description = $newvalue;
+ break;
+ default :
+ // If any unsupported values were being updated, we must
+ // let the entire request fail.
+ return false;
+ }
+ }
+
+ OC_Contacts_Addressbook::editAddressbook($addressbookid,$name,$description);
+
+ return true;
+
+ }
+
+ /**
+ * Creates a new address book
+ *
+ * @param string $principaluri
+ * @param string $url Just the 'basename' of the url.
+ * @param array $properties
+ * @return void
+ */
+ public function createAddressBook($principaluri, $url, array $properties) {
+
+ $displayname = null;
+ $description = null;
+
+ foreach($properties as $property=>$newvalue) {
+
+ switch($property) {
+ case '{DAV:}displayname' :
+ $displayname = $newvalue;
+ break;
+ case '{' . Sabre_CardDAV_Plugin::NS_CARDDAV . '}addressbook-description' :
+ $description = $newvalue;
+ break;
+ default :
+ throw new Sabre_DAV_Exception_BadRequest('Unknown property: ' . $property);
+ }
+
+ }
+
+ OC_Contacts_Addressbook::addAddressbookFromDAVData($principaluri,$url,$name,$description);
+ }
+
+ /**
+ * Deletes an entire addressbook and all its contents
+ *
+ * @param int $addressbookid
+ * @return void
+ */
+ public function deleteAddressBook($addressbookid) {
+ OC_Contacts_Addressbook::deleteAddressbook($addressbookid);
+ }
+
+ /**
+ * Returns all cards for a specific addressbook id.
+ *
+ * @param mixed $addressbookid
+ * @return array
+ */
+ public function getCards($addressbookid) {
+ $data = OC_Contacts_Addressbook::allCards($addressbookid);
+ $cards = array();
+ foreach($data as $i){
+ $cards[] = array(
+ 'id' => $i['id'],
+ 'carddata' => $i['carddata'],
+ 'uri' => $i['uri'],
+ 'lastmodified' => $i['lastmodified'] );
+ }
+
+ return $cards;
+ }
+
+ /**
+ * Returns a specfic card
+ *
+ * @param mixed $addressbookid
+ * @param string $carduri
+ * @return array
+ */
+ public function getCard($addressbookid, $carduri) {
+ return OC_Contacts_Addressbook::findCardWhereDAVDataIs($addressbookid,$carduri);
+
+ }
+
+ /**
+ * Creates a new card
+ *
+ * @param mixed $addressbookid
+ * @param string $carduri
+ * @param string $carddata
+ * @return bool
+ */
+ public function createCard($addressbookid, $carduri, $carddata) {
+ OC_Contacts_Addressbook::addCardFromDAVData($addressbookid, $carduri, $carddata);
+ return true;
+ }
+
+ /**
+ * Updates a card
+ *
+ * @param mixed $addressbookid
+ * @param string $carduri
+ * @param string $carddata
+ * @return bool
+ */
+ public function updateCard($addressbookid, $carduri, $carddata) {
+ return OC_Contacts_Addressbook::editCardFromDAVData($addressbookid, $carduri, $carddata);
+ }
+
+ /**
+ * Deletes a card
+ *
+ * @param mixed $addressbookid
+ * @param string $carduri
+ * @return bool
+ */
+ public function deleteCard($addressbookid, $carduri) {
+ return OC_Contacts_Addressbook::deleteCardFromDAVData($addressbookid, $carduri);
+ }
+}
diff --git a/apps/contacts/photo.php b/apps/contacts/photo.php
new file mode 100644
index 00000000000..62386421cdc
--- /dev/null
+++ b/apps/contacts/photo.php
@@ -0,0 +1,85 @@
+<?php
+/**
+ * ownCloud - Addressbook
+ *
+ * @author Jakob Sack
+ * @copyright 2011 Jakob Sack mail@jakobsack.de
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU AFFERO GENERAL PUBLIC LICENSE for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+// Init owncloud
+require_once('../../lib/base.php');
+
+$id = $_GET['id'];
+
+$l10n = new OC_L10N('contacts');
+
+// Check if we are a user
+if( !OC_User::isLoggedIn()){
+ echo $l10n->t('You need to log in!');
+ exit();
+}
+
+
+$card = OC_Contacts_Addressbook::findCard( $id );
+if( $card === false ){
+ echo $l10n->t('Can not find Contact!');
+ exit();
+}
+
+$addressbook = OC_Contacts_Addressbook::findAddressbook( $card['addressbookid'] );
+if( $addressbook === false || $addressbook['userid'] != OC_USER::getUser()){
+ echo $l10n->t('This is not your contact!');
+ exit();
+}
+
+$content = Sabre_VObject_Reader::read($card['carddata']);
+
+// Photo :-)
+foreach($content->children as $child){
+ if($child->name == 'PHOTO'){
+ $mime = 'image/jpeg';
+ foreach($child->parameters as $parameter){
+ if( $parameter->name == 'TYPE' ){
+ $mime = $parameter->value;
+ }
+ }
+ $photo = base64_decode($child->value);
+ header('Content-Type: '.$mime);
+ header('Content-Length: ' . strlen($photo));
+ echo $photo;
+ exit();
+ }
+}
+// Logo :-/
+foreach($content->children as $child){
+ if($child->name == 'PHOTO'){
+ $mime = 'image/jpeg';
+ foreach($child->parameters as $parameter){
+ if($parameter->name == 'TYPE'){
+ $mime = $parameter->value;
+ }
+ }
+ $photo = base64_decode($child->value());
+ header('Content-Type: '.$mime);
+ header('Content-Length: ' . strlen($photo));
+ echo $photo;
+ exit();
+ }
+}
+
+// Not found :-(
+echo $l10n->t('This card does not contain photo data!');
diff --git a/apps/contacts/templates/_contacts.php b/apps/contacts/templates/_contacts.php
new file mode 100644
index 00000000000..bf633b79b04
--- /dev/null
+++ b/apps/contacts/templates/_contacts.php
@@ -0,0 +1,3 @@
+<?php foreach( $_['contacts'] as $contact ): ?>
+ <li x-id="<?php echo $contact['id']; ?>"><a href="index.php?id=<?php echo $contact['id']; ?>"><?php echo $contact['name']; ?></a></li>
+<?php endforeach; ?>
diff --git a/apps/contacts/templates/_details.php b/apps/contacts/templates/_details.php
new file mode 100644
index 00000000000..e27b17ef2eb
--- /dev/null
+++ b/apps/contacts/templates/_details.php
@@ -0,0 +1,4 @@
+Name <?php echo $_['details']['FN'][0]['value']; ?>
+<?php if(array_key_exists('PHOTO',$_['details'])): ?>
+ <img src="photo.php?id=<?php echo $_['id']; ?>">
+<?php endif; ?> \ No newline at end of file
diff --git a/apps/contacts/templates/index.php b/apps/contacts/templates/index.php
new file mode 100644
index 00000000000..ca189cb4c8a
--- /dev/null
+++ b/apps/contacts/templates/index.php
@@ -0,0 +1,24 @@
+<?php // Include Style and Script
+OC_Util::addScript('contacts','interface');
+OC_Util::addStyle('contacts','styles');
+?>
+
+<div class="contacts_addressbooks">
+ <div class="contacts_addressbooksexpander">
+ Addressbooks
+ </div>
+ <div class="contacts_addressbooksdetails" style="display:none;">
+ <?php foreach($_['addressbooks'] as $addressbook): ?>
+ <?php echo $addressbook['displayname']; ?>: <?php echo $addressbook['description']; ?><br>
+ <?php endforeach; ?>
+ <br>To use this addressbook, use .../apps/contacts/carddav.php/addressbooks/USERNAME/addressbookname.php
+ </div>
+</div>
+<div class="contacts_contacts leftcontent">
+ <ul>
+ <?php echo $this->inc("_contacts"); ?>
+ </ul>
+</div>
+<div class="contacts_details rightcontent">
+ <?php echo $this->inc("_details"); ?>
+</div>
diff --git a/apps/contacts/temporaryupdate.php b/apps/contacts/temporaryupdate.php
new file mode 100644
index 00000000000..bb5ff7604f3
--- /dev/null
+++ b/apps/contacts/temporaryupdate.php
@@ -0,0 +1,13 @@
+<?php
+// Init owncloud
+require_once('../../lib/base.php');
+$connector = new OC_Connector_Sabre_Principal;
+$users = OC_User::getUsers();
+
+foreach($users as $user){
+ $foo = $connector->getPrincipalByPath('principals/'.$user);
+ if(!isset($foo)){
+ OC_Connector_Sabre_Principal::addPrincipal(array('uid'=>$user));
+ }
+}
+echo "done"; \ No newline at end of file
diff --git a/apps/files_publiclink/appinfo/app.php b/apps/files_publiclink/appinfo/app.php
index 28a398f7278..17646b3e5b5 100644
--- a/apps/files_publiclink/appinfo/app.php
+++ b/apps/files_publiclink/appinfo/app.php
@@ -1,6 +1,6 @@
<?php
-OC_App::addNavigationSubEntry('files_index', array( "id" => "files_publiclink_administration", "order" => 1, "href" => OC_Helper::linkTo( "files_publiclink", "admin.php" ), "name" => "Public Links", "icon" => OC_Helper::imagePath( "files_publiclink", "share.png" )));
+OC_App::addNavigationSubEntry('files_index', array( "id" => "files_publiclink_administration", "order" => 1, "href" => OC_Helper::linkTo( "files_publiclink", "admin.php" ), "name" => "Public Links"));
?>
diff --git a/apps/files_publiclink/get.php b/apps/files_publiclink/get.php
index 6bcefc2e4e8..2e1ba4bf363 100644
--- a/apps/files_publiclink/get.php
+++ b/apps/files_publiclink/get.php
@@ -63,10 +63,10 @@ if($path!==false){
//get time mimetype and set the headers
$mimetype=OC_Filesystem::getMimeType($path);
header('Content-Transfer-Encoding: binary');
- header('Content-Disposition: attachment; filename="'.basename($path).'"');
header('Expires: 0');
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header('Pragma: public');
+ header('Content-Disposition: filename="'.basename($path).'"');
header('Content-Type: ' . $mimetype);
header('Content-Length: ' . OC_Filesystem::filesize($path));
diff --git a/apps/files_textviewer/appinfo/app.php b/apps/files_textviewer/appinfo/app.php
new file mode 100644
index 00000000000..7cf1905a530
--- /dev/null
+++ b/apps/files_textviewer/appinfo/app.php
@@ -0,0 +1,5 @@
+<?php
+//load the required js file
+OC_UTIL::addScript('files_textviewer','textviewer');
+
+?>
diff --git a/apps/files_textviewer/appinfo/info.xml b/apps/files_textviewer/appinfo/info.xml
new file mode 100644
index 00000000000..112a416c357
--- /dev/null
+++ b/apps/files_textviewer/appinfo/info.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0"?>
+<info>
+ <id>files_textviewer</id>
+ <name>Text viewer</name>
+ <version>0.3</version>
+ <licence>AGPL</licence>
+ <author>Icewind</author>
+ <require>2</require>
+</info>
diff --git a/apps/files_textviewer/css/style.css b/apps/files_textviewer/css/style.css
new file mode 100644
index 00000000000..b70fc0e572c
--- /dev/null
+++ b/apps/files_textviewer/css/style.css
@@ -0,0 +1,38 @@
+#textframe{
+ position:fixed;
+ top:0px;
+ left:0px;
+ height:100%;
+ width:100%;
+ background:rgb(20,20,20);
+ background:rgba(20,20,20,0.9);
+ text-align:center;
+ z-index:100;
+}
+
+#textframe>div{
+ vertical-align:middle;
+ text-align:left;
+ height:auto;
+ max-height:90%;
+ max-width:90%;
+ margin:20px;
+ margin-left:auto;
+ margin-right:auto;
+ margin-bottom:10px;
+ padding:0px;
+ border: black solid 3px;
+ background:black;
+ color:white;
+ overflow:auto;
+}
+
+#textframe>div>div>div{
+ margin:0px !important;
+ top:0px !important;
+ height:100% !important;
+}
+
+#textframe>div div,#textframe>div td{
+ overflow:hidden !important;
+}
diff --git a/apps/files_textviewer/css/syntaxhighlighter/shCore.css b/apps/files_textviewer/css/syntaxhighlighter/shCore.css
new file mode 100644
index 00000000000..34f6864a155
--- /dev/null
+++ b/apps/files_textviewer/css/syntaxhighlighter/shCore.css
@@ -0,0 +1,226 @@
+/**
+ * SyntaxHighlighter
+ * http://alexgorbatchev.com/SyntaxHighlighter
+ *
+ * SyntaxHighlighter is donationware. If you are using it, please donate.
+ * http://alexgorbatchev.com/SyntaxHighlighter/donate.html
+ *
+ * @version
+ * 3.0.83 (July 02 2010)
+ *
+ * @copyright
+ * Copyright (C) 2004-2010 Alex Gorbatchev.
+ *
+ * @license
+ * Dual licensed under the MIT and GPL licenses.
+ */
+.syntaxhighlighter a,
+.syntaxhighlighter div,
+.syntaxhighlighter code,
+.syntaxhighlighter table,
+.syntaxhighlighter table td,
+.syntaxhighlighter table tr,
+.syntaxhighlighter table tbody,
+.syntaxhighlighter table thead,
+.syntaxhighlighter table caption,
+.syntaxhighlighter textarea {
+ -moz-border-radius: 0 0 0 0 !important;
+ -webkit-border-radius: 0 0 0 0 !important;
+ background: none !important;
+ border: 0 !important;
+ bottom: auto !important;
+ float: none !important;
+ height: auto !important;
+ left: auto !important;
+ line-height: 1.1em !important;
+ margin: 0 !important;
+ outline: 0 !important;
+ overflow: visible !important;
+ padding: 0 !important;
+ position: static !important;
+ right: auto !important;
+ text-align: left !important;
+ top: auto !important;
+ vertical-align: baseline !important;
+ width: auto !important;
+ box-sizing: content-box !important;
+ font-family: "Consolas", "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important;
+ font-weight: normal !important;
+ font-style: normal !important;
+ font-size: 1em !important;
+ min-height: inherit !important;
+ min-height: auto !important;
+}
+
+.syntaxhighlighter {
+ width: 100% !important;
+ margin: 1em 0 1em 0 !important;
+ position: relative !important;
+ overflow: auto !important;
+ font-size: 1em !important;
+}
+.syntaxhighlighter.source {
+ overflow: hidden !important;
+}
+.syntaxhighlighter .bold {
+ font-weight: bold !important;
+}
+.syntaxhighlighter .italic {
+ font-style: italic !important;
+}
+.syntaxhighlighter .line {
+ white-space: pre !important;
+}
+.syntaxhighlighter table {
+ width: 100% !important;
+}
+.syntaxhighlighter table caption {
+ text-align: left !important;
+ padding: .5em 0 0.5em 1em !important;
+}
+.syntaxhighlighter table td.code {
+ width: 100% !important;
+}
+.syntaxhighlighter table td.code .container {
+ position: relative !important;
+}
+.syntaxhighlighter table td.code .container textarea {
+ box-sizing: border-box !important;
+ position: absolute !important;
+ left: 0 !important;
+ top: 0 !important;
+ width: 100% !important;
+ height: 100% !important;
+ border: none !important;
+ background: white !important;
+ padding-left: 1em !important;
+ overflow: hidden !important;
+ white-space: pre !important;
+}
+.syntaxhighlighter table td.gutter .line {
+ text-align: right !important;
+ padding: 0 0.5em 0 1em !important;
+}
+.syntaxhighlighter table td.code .line {
+ padding: 0 1em !important;
+}
+.syntaxhighlighter.nogutter td.code .container textarea, .syntaxhighlighter.nogutter td.code .line {
+ padding-left: 0em !important;
+}
+.syntaxhighlighter.show {
+ display: block !important;
+}
+.syntaxhighlighter.collapsed table {
+ display: none !important;
+}
+.syntaxhighlighter.collapsed .toolbar {
+ padding: 0.1em 0.8em 0em 0.8em !important;
+ font-size: 1em !important;
+ position: static !important;
+ width: auto !important;
+ height: auto !important;
+}
+.syntaxhighlighter.collapsed .toolbar span {
+ display: inline !important;
+ margin-right: 1em !important;
+}
+.syntaxhighlighter.collapsed .toolbar span a {
+ padding: 0 !important;
+ display: none !important;
+}
+.syntaxhighlighter.collapsed .toolbar span a.expandSource {
+ display: inline !important;
+}
+.syntaxhighlighter .toolbar {
+ position: absolute !important;
+ right: 1px !important;
+ top: 1px !important;
+ width: 11px !important;
+ height: 11px !important;
+ font-size: 10px !important;
+ z-index: 10 !important;
+}
+.syntaxhighlighter .toolbar span.title {
+ display: inline !important;
+}
+.syntaxhighlighter .toolbar a {
+ display: block !important;
+ text-align: center !important;
+ text-decoration: none !important;
+ padding-top: 1px !important;
+}
+.syntaxhighlighter .toolbar a.expandSource {
+ display: none !important;
+}
+.syntaxhighlighter.ie {
+ font-size: .9em !important;
+ padding: 1px 0 1px 0 !important;
+}
+.syntaxhighlighter.ie .toolbar {
+ line-height: 8px !important;
+}
+.syntaxhighlighter.ie .toolbar a {
+ padding-top: 0px !important;
+}
+.syntaxhighlighter.printing .line.alt1 .content,
+.syntaxhighlighter.printing .line.alt2 .content,
+.syntaxhighlighter.printing .line.highlighted .number,
+.syntaxhighlighter.printing .line.highlighted.alt1 .content,
+.syntaxhighlighter.printing .line.highlighted.alt2 .content {
+ background: none !important;
+}
+.syntaxhighlighter.printing .line .number {
+ color: #bbbbbb !important;
+}
+.syntaxhighlighter.printing .line .content {
+ color: black !important;
+}
+.syntaxhighlighter.printing .toolbar {
+ display: none !important;
+}
+.syntaxhighlighter.printing a {
+ text-decoration: none !important;
+}
+.syntaxhighlighter.printing .plain, .syntaxhighlighter.printing .plain a {
+ color: black !important;
+}
+.syntaxhighlighter.printing .comments, .syntaxhighlighter.printing .comments a {
+ color: #008200 !important;
+}
+.syntaxhighlighter.printing .string, .syntaxhighlighter.printing .string a {
+ color: blue !important;
+}
+.syntaxhighlighter.printing .keyword {
+ color: #006699 !important;
+ font-weight: bold !important;
+}
+.syntaxhighlighter.printing .preprocessor {
+ color: gray !important;
+}
+.syntaxhighlighter.printing .variable {
+ color: #aa7700 !important;
+}
+.syntaxhighlighter.printing .value {
+ color: #009900 !important;
+}
+.syntaxhighlighter.printing .functions {
+ color: #ff1493 !important;
+}
+.syntaxhighlighter.printing .constants {
+ color: #0066cc !important;
+}
+.syntaxhighlighter.printing .script {
+ font-weight: bold !important;
+}
+.syntaxhighlighter.printing .color1, .syntaxhighlighter.printing .color1 a {
+ color: gray !important;
+}
+.syntaxhighlighter.printing .color2, .syntaxhighlighter.printing .color2 a {
+ color: #ff1493 !important;
+}
+.syntaxhighlighter.printing .color3, .syntaxhighlighter.printing .color3 a {
+ color: red !important;
+}
+.syntaxhighlighter.printing .break, .syntaxhighlighter.printing .break a {
+ color: black !important;
+}
diff --git a/apps/files_textviewer/css/syntaxhighlighter/shCoreDefault.css b/apps/files_textviewer/css/syntaxhighlighter/shCoreDefault.css
new file mode 100644
index 00000000000..08f9e10e4ea
--- /dev/null
+++ b/apps/files_textviewer/css/syntaxhighlighter/shCoreDefault.css
@@ -0,0 +1,328 @@
+/**
+ * SyntaxHighlighter
+ * http://alexgorbatchev.com/SyntaxHighlighter
+ *
+ * SyntaxHighlighter is donationware. If you are using it, please donate.
+ * http://alexgorbatchev.com/SyntaxHighlighter/donate.html
+ *
+ * @version
+ * 3.0.83 (July 02 2010)
+ *
+ * @copyright
+ * Copyright (C) 2004-2010 Alex Gorbatchev.
+ *
+ * @license
+ * Dual licensed under the MIT and GPL licenses.
+ */
+.syntaxhighlighter a,
+.syntaxhighlighter div,
+.syntaxhighlighter code,
+.syntaxhighlighter table,
+.syntaxhighlighter table td,
+.syntaxhighlighter table tr,
+.syntaxhighlighter table tbody,
+.syntaxhighlighter table thead,
+.syntaxhighlighter table caption,
+.syntaxhighlighter textarea {
+ -moz-border-radius: 0 0 0 0 !important;
+ -webkit-border-radius: 0 0 0 0 !important;
+ background: none !important;
+ border: 0 !important;
+ bottom: auto !important;
+ float: none !important;
+ height: auto !important;
+ left: auto !important;
+ line-height: 1.1em !important;
+ margin: 0 !important;
+ outline: 0 !important;
+ overflow: visible !important;
+ padding: 0 !important;
+ position: static !important;
+ right: auto !important;
+ text-align: left !important;
+ top: auto !important;
+ vertical-align: baseline !important;
+ width: auto !important;
+ box-sizing: content-box !important;
+ font-family: "Consolas", "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important;
+ font-weight: normal !important;
+ font-style: normal !important;
+ font-size: 1em !important;
+ min-height: inherit !important;
+ min-height: auto !important;
+}
+
+.syntaxhighlighter {
+ width: 100% !important;
+ margin: 1em 0 1em 0 !important;
+ position: relative !important;
+ overflow: auto !important;
+ font-size: 1em !important;
+}
+.syntaxhighlighter.source {
+ overflow: hidden !important;
+}
+.syntaxhighlighter .bold {
+ font-weight: bold !important;
+}
+.syntaxhighlighter .italic {
+ font-style: italic !important;
+}
+.syntaxhighlighter .line {
+ white-space: pre !important;
+}
+.syntaxhighlighter table {
+ width: 100% !important;
+}
+.syntaxhighlighter table caption {
+ text-align: left !important;
+ padding: .5em 0 0.5em 1em !important;
+}
+.syntaxhighlighter table td.code {
+ width: 100% !important;
+}
+.syntaxhighlighter table td.code .container {
+ position: relative !important;
+}
+.syntaxhighlighter table td.code .container textarea {
+ box-sizing: border-box !important;
+ position: absolute !important;
+ left: 0 !important;
+ top: 0 !important;
+ width: 100% !important;
+ height: 100% !important;
+ border: none !important;
+ background: white !important;
+ padding-left: 1em !important;
+ overflow: hidden !important;
+ white-space: pre !important;
+}
+.syntaxhighlighter table td.gutter .line {
+ text-align: right !important;
+ padding: 0 0.5em 0 1em !important;
+}
+.syntaxhighlighter table td.code .line {
+ padding: 0 1em !important;
+}
+.syntaxhighlighter.nogutter td.code .container textarea, .syntaxhighlighter.nogutter td.code .line {
+ padding-left: 0em !important;
+}
+.syntaxhighlighter.show {
+ display: block !important;
+}
+.syntaxhighlighter.collapsed table {
+ display: none !important;
+}
+.syntaxhighlighter.collapsed .toolbar {
+ padding: 0.1em 0.8em 0em 0.8em !important;
+ font-size: 1em !important;
+ position: static !important;
+ width: auto !important;
+ height: auto !important;
+}
+.syntaxhighlighter.collapsed .toolbar span {
+ display: inline !important;
+ margin-right: 1em !important;
+}
+.syntaxhighlighter.collapsed .toolbar span a {
+ padding: 0 !important;
+ display: none !important;
+}
+.syntaxhighlighter.collapsed .toolbar span a.expandSource {
+ display: inline !important;
+}
+.syntaxhighlighter .toolbar {
+ position: absolute !important;
+ right: 1px !important;
+ top: 1px !important;
+ width: 11px !important;
+ height: 11px !important;
+ font-size: 10px !important;
+ z-index: 10 !important;
+}
+.syntaxhighlighter .toolbar span.title {
+ display: inline !important;
+}
+.syntaxhighlighter .toolbar a {
+ display: block !important;
+ text-align: center !important;
+ text-decoration: none !important;
+ padding-top: 1px !important;
+}
+.syntaxhighlighter .toolbar a.expandSource {
+ display: none !important;
+}
+.syntaxhighlighter.ie {
+ font-size: .9em !important;
+ padding: 1px 0 1px 0 !important;
+}
+.syntaxhighlighter.ie .toolbar {
+ line-height: 8px !important;
+}
+.syntaxhighlighter.ie .toolbar a {
+ padding-top: 0px !important;
+}
+.syntaxhighlighter.printing .line.alt1 .content,
+.syntaxhighlighter.printing .line.alt2 .content,
+.syntaxhighlighter.printing .line.highlighted .number,
+.syntaxhighlighter.printing .line.highlighted.alt1 .content,
+.syntaxhighlighter.printing .line.highlighted.alt2 .content {
+ background: none !important;
+}
+.syntaxhighlighter.printing .line .number {
+ color: #bbbbbb !important;
+}
+.syntaxhighlighter.printing .line .content {
+ color: black !important;
+}
+.syntaxhighlighter.printing .toolbar {
+ display: none !important;
+}
+.syntaxhighlighter.printing a {
+ text-decoration: none !important;
+}
+.syntaxhighlighter.printing .plain, .syntaxhighlighter.printing .plain a {
+ color: black !important;
+}
+.syntaxhighlighter.printing .comments, .syntaxhighlighter.printing .comments a {
+ color: #008200 !important;
+}
+.syntaxhighlighter.printing .string, .syntaxhighlighter.printing .string a {
+ color: blue !important;
+}
+.syntaxhighlighter.printing .keyword {
+ color: #006699 !important;
+ font-weight: bold !important;
+}
+.syntaxhighlighter.printing .preprocessor {
+ color: gray !important;
+}
+.syntaxhighlighter.printing .variable {
+ color: #aa7700 !important;
+}
+.syntaxhighlighter.printing .value {
+ color: #009900 !important;
+}
+.syntaxhighlighter.printing .functions {
+ color: #ff1493 !important;
+}
+.syntaxhighlighter.printing .constants {
+ color: #0066cc !important;
+}
+.syntaxhighlighter.printing .script {
+ font-weight: bold !important;
+}
+.syntaxhighlighter.printing .color1, .syntaxhighlighter.printing .color1 a {
+ color: gray !important;
+}
+.syntaxhighlighter.printing .color2, .syntaxhighlighter.printing .color2 a {
+ color: #ff1493 !important;
+}
+.syntaxhighlighter.printing .color3, .syntaxhighlighter.printing .color3 a {
+ color: red !important;
+}
+.syntaxhighlighter.printing .break, .syntaxhighlighter.printing .break a {
+ color: black !important;
+}
+
+.syntaxhighlighter {
+ background-color: white !important;
+}
+.syntaxhighlighter .line.alt1 {
+ background-color: white !important;
+}
+.syntaxhighlighter .line.alt2 {
+ background-color: white !important;
+}
+.syntaxhighlighter .line.highlighted.alt1, .syntaxhighlighter .line.highlighted.alt2 {
+ background-color: #e0e0e0 !important;
+}
+.syntaxhighlighter .line.highlighted.number {
+ color: black !important;
+}
+.syntaxhighlighter table caption {
+ color: black !important;
+}
+.syntaxhighlighter .gutter {
+ color: #afafaf !important;
+}
+.syntaxhighlighter .gutter .line {
+ border-right: 3px solid #6ce26c !important;
+}
+.syntaxhighlighter .gutter .line.highlighted {
+ background-color: #6ce26c !important;
+ color: white !important;
+}
+.syntaxhighlighter.printing .line .content {
+ border: none !important;
+}
+.syntaxhighlighter.collapsed {
+ overflow: visible !important;
+}
+.syntaxhighlighter.collapsed .toolbar {
+ color: blue !important;
+ background: white !important;
+ border: 1px solid #6ce26c !important;
+}
+.syntaxhighlighter.collapsed .toolbar a {
+ color: blue !important;
+}
+.syntaxhighlighter.collapsed .toolbar a:hover {
+ color: red !important;
+}
+.syntaxhighlighter .toolbar {
+ color: white !important;
+ background: #6ce26c !important;
+ border: none !important;
+}
+.syntaxhighlighter .toolbar a {
+ color: white !important;
+}
+.syntaxhighlighter .toolbar a:hover {
+ color: black !important;
+}
+.syntaxhighlighter .plain, .syntaxhighlighter .plain a {
+ color: black !important;
+}
+.syntaxhighlighter .comments, .syntaxhighlighter .comments a {
+ color: #008200 !important;
+}
+.syntaxhighlighter .string, .syntaxhighlighter .string a {
+ color: blue !important;
+}
+.syntaxhighlighter .keyword {
+ color: #006699 !important;
+}
+.syntaxhighlighter .preprocessor {
+ color: gray !important;
+}
+.syntaxhighlighter .variable {
+ color: #aa7700 !important;
+}
+.syntaxhighlighter .value {
+ color: #009900 !important;
+}
+.syntaxhighlighter .functions {
+ color: #ff1493 !important;
+}
+.syntaxhighlighter .constants {
+ color: #0066cc !important;
+}
+.syntaxhighlighter .script {
+ font-weight: bold !important;
+ color: #006699 !important;
+ background-color: none !important;
+}
+.syntaxhighlighter .color1, .syntaxhighlighter .color1 a {
+ color: gray !important;
+}
+.syntaxhighlighter .color2, .syntaxhighlighter .color2 a {
+ color: #ff1493 !important;
+}
+.syntaxhighlighter .color3, .syntaxhighlighter .color3 a {
+ color: red !important;
+}
+
+.syntaxhighlighter .keyword {
+ font-weight: bold !important;
+}
diff --git a/apps/files_textviewer/css/syntaxhighlighter/shCoreDjango.css b/apps/files_textviewer/css/syntaxhighlighter/shCoreDjango.css
new file mode 100644
index 00000000000..1db1f70cb0d
--- /dev/null
+++ b/apps/files_textviewer/css/syntaxhighlighter/shCoreDjango.css
@@ -0,0 +1,331 @@
+/**
+ * SyntaxHighlighter
+ * http://alexgorbatchev.com/SyntaxHighlighter
+ *
+ * SyntaxHighlighter is donationware. If you are using it, please donate.
+ * http://alexgorbatchev.com/SyntaxHighlighter/donate.html
+ *
+ * @version
+ * 3.0.83 (July 02 2010)
+ *
+ * @copyright
+ * Copyright (C) 2004-2010 Alex Gorbatchev.
+ *
+ * @license
+ * Dual licensed under the MIT and GPL licenses.
+ */
+.syntaxhighlighter a,
+.syntaxhighlighter div,
+.syntaxhighlighter code,
+.syntaxhighlighter table,
+.syntaxhighlighter table td,
+.syntaxhighlighter table tr,
+.syntaxhighlighter table tbody,
+.syntaxhighlighter table thead,
+.syntaxhighlighter table caption,
+.syntaxhighlighter textarea {
+ -moz-border-radius: 0 0 0 0 !important;
+ -webkit-border-radius: 0 0 0 0 !important;
+ background: none !important;
+ border: 0 !important;
+ bottom: auto !important;
+ float: none !important;
+ height: auto !important;
+ left: auto !important;
+ line-height: 1.1em !important;
+ margin: 0 !important;
+ outline: 0 !important;
+ overflow: visible !important;
+ padding: 0 !important;
+ position: static !important;
+ right: auto !important;
+ text-align: left !important;
+ top: auto !important;
+ vertical-align: baseline !important;
+ width: auto !important;
+ box-sizing: content-box !important;
+ font-family: "Consolas", "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important;
+ font-weight: normal !important;
+ font-style: normal !important;
+ font-size: 1em !important;
+ min-height: inherit !important;
+ min-height: auto !important;
+}
+
+.syntaxhighlighter {
+ width: 100% !important;
+ margin: 1em 0 1em 0 !important;
+ position: relative !important;
+ overflow: auto !important;
+ font-size: 1em !important;
+}
+.syntaxhighlighter.source {
+ overflow: hidden !important;
+}
+.syntaxhighlighter .bold {
+ font-weight: bold !important;
+}
+.syntaxhighlighter .italic {
+ font-style: italic !important;
+}
+.syntaxhighlighter .line {
+ white-space: pre !important;
+}
+.syntaxhighlighter table {
+ width: 100% !important;
+}
+.syntaxhighlighter table caption {
+ text-align: left !important;
+ padding: .5em 0 0.5em 1em !important;
+}
+.syntaxhighlighter table td.code {
+ width: 100% !important;
+}
+.syntaxhighlighter table td.code .container {
+ position: relative !important;
+}
+.syntaxhighlighter table td.code .container textarea {
+ box-sizing: border-box !important;
+ position: absolute !important;
+ left: 0 !important;
+ top: 0 !important;
+ width: 100% !important;
+ height: 100% !important;
+ border: none !important;
+ background: white !important;
+ padding-left: 1em !important;
+ overflow: hidden !important;
+ white-space: pre !important;
+}
+.syntaxhighlighter table td.gutter .line {
+ text-align: right !important;
+ padding: 0 0.5em 0 1em !important;
+}
+.syntaxhighlighter table td.code .line {
+ padding: 0 1em !important;
+}
+.syntaxhighlighter.nogutter td.code .container textarea, .syntaxhighlighter.nogutter td.code .line {
+ padding-left: 0em !important;
+}
+.syntaxhighlighter.show {
+ display: block !important;
+}
+.syntaxhighlighter.collapsed table {
+ display: none !important;
+}
+.syntaxhighlighter.collapsed .toolbar {
+ padding: 0.1em 0.8em 0em 0.8em !important;
+ font-size: 1em !important;
+ position: static !important;
+ width: auto !important;
+ height: auto !important;
+}
+.syntaxhighlighter.collapsed .toolbar span {
+ display: inline !important;
+ margin-right: 1em !important;
+}
+.syntaxhighlighter.collapsed .toolbar span a {
+ padding: 0 !important;
+ display: none !important;
+}
+.syntaxhighlighter.collapsed .toolbar span a.expandSource {
+ display: inline !important;
+}
+.syntaxhighlighter .toolbar {
+ position: absolute !important;
+ right: 1px !important;
+ top: 1px !important;
+ width: 11px !important;
+ height: 11px !important;
+ font-size: 10px !important;
+ z-index: 10 !important;
+}
+.syntaxhighlighter .toolbar span.title {
+ display: inline !important;
+}
+.syntaxhighlighter .toolbar a {
+ display: block !important;
+ text-align: center !important;
+ text-decoration: none !important;
+ padding-top: 1px !important;
+}
+.syntaxhighlighter .toolbar a.expandSource {
+ display: none !important;
+}
+.syntaxhighlighter.ie {
+ font-size: .9em !important;
+ padding: 1px 0 1px 0 !important;
+}
+.syntaxhighlighter.ie .toolbar {
+ line-height: 8px !important;
+}
+.syntaxhighlighter.ie .toolbar a {
+ padding-top: 0px !important;
+}
+.syntaxhighlighter.printing .line.alt1 .content,
+.syntaxhighlighter.printing .line.alt2 .content,
+.syntaxhighlighter.printing .line.highlighted .number,
+.syntaxhighlighter.printing .line.highlighted.alt1 .content,
+.syntaxhighlighter.printing .line.highlighted.alt2 .content {
+ background: none !important;
+}
+.syntaxhighlighter.printing .line .number {
+ color: #bbbbbb !important;
+}
+.syntaxhighlighter.printing .line .content {
+ color: black !important;
+}
+.syntaxhighlighter.printing .toolbar {
+ display: none !important;
+}
+.syntaxhighlighter.printing a {
+ text-decoration: none !important;
+}
+.syntaxhighlighter.printing .plain, .syntaxhighlighter.printing .plain a {
+ color: black !important;
+}
+.syntaxhighlighter.printing .comments, .syntaxhighlighter.printing .comments a {
+ color: #008200 !important;
+}
+.syntaxhighlighter.printing .string, .syntaxhighlighter.printing .string a {
+ color: blue !important;
+}
+.syntaxhighlighter.printing .keyword {
+ color: #006699 !important;
+ font-weight: bold !important;
+}
+.syntaxhighlighter.printing .preprocessor {
+ color: gray !important;
+}
+.syntaxhighlighter.printing .variable {
+ color: #aa7700 !important;
+}
+.syntaxhighlighter.printing .value {
+ color: #009900 !important;
+}
+.syntaxhighlighter.printing .functions {
+ color: #ff1493 !important;
+}
+.syntaxhighlighter.printing .constants {
+ color: #0066cc !important;
+}
+.syntaxhighlighter.printing .script {
+ font-weight: bold !important;
+}
+.syntaxhighlighter.printing .color1, .syntaxhighlighter.printing .color1 a {
+ color: gray !important;
+}
+.syntaxhighlighter.printing .color2, .syntaxhighlighter.printing .color2 a {
+ color: #ff1493 !important;
+}
+.syntaxhighlighter.printing .color3, .syntaxhighlighter.printing .color3 a {
+ color: red !important;
+}
+.syntaxhighlighter.printing .break, .syntaxhighlighter.printing .break a {
+ color: black !important;
+}
+
+.syntaxhighlighter {
+ background-color: #0a2b1d !important;
+}
+.syntaxhighlighter .line.alt1 {
+ background-color: #0a2b1d !important;
+}
+.syntaxhighlighter .line.alt2 {
+ background-color: #0a2b1d !important;
+}
+.syntaxhighlighter .line.highlighted.alt1, .syntaxhighlighter .line.highlighted.alt2 {
+ background-color: #233729 !important;
+}
+.syntaxhighlighter .line.highlighted.number {
+ color: white !important;
+}
+.syntaxhighlighter table caption {
+ color: #f8f8f8 !important;
+}
+.syntaxhighlighter .gutter {
+ color: #497958 !important;
+}
+.syntaxhighlighter .gutter .line {
+ border-right: 3px solid #41a83e !important;
+}
+.syntaxhighlighter .gutter .line.highlighted {
+ background-color: #41a83e !important;
+ color: #0a2b1d !important;
+}
+.syntaxhighlighter.printing .line .content {
+ border: none !important;
+}
+.syntaxhighlighter.collapsed {
+ overflow: visible !important;
+}
+.syntaxhighlighter.collapsed .toolbar {
+ color: #96dd3b !important;
+ background: black !important;
+ border: 1px solid #41a83e !important;
+}
+.syntaxhighlighter.collapsed .toolbar a {
+ color: #96dd3b !important;
+}
+.syntaxhighlighter.collapsed .toolbar a:hover {
+ color: white !important;
+}
+.syntaxhighlighter .toolbar {
+ color: white !important;
+ background: #41a83e !important;
+ border: none !important;
+}
+.syntaxhighlighter .toolbar a {
+ color: white !important;
+}
+.syntaxhighlighter .toolbar a:hover {
+ color: #ffe862 !important;
+}
+.syntaxhighlighter .plain, .syntaxhighlighter .plain a {
+ color: #f8f8f8 !important;
+}
+.syntaxhighlighter .comments, .syntaxhighlighter .comments a {
+ color: #336442 !important;
+}
+.syntaxhighlighter .string, .syntaxhighlighter .string a {
+ color: #9df39f !important;
+}
+.syntaxhighlighter .keyword {
+ color: #96dd3b !important;
+}
+.syntaxhighlighter .preprocessor {
+ color: #91bb9e !important;
+}
+.syntaxhighlighter .variable {
+ color: #ffaa3e !important;
+}
+.syntaxhighlighter .value {
+ color: #f7e741 !important;
+}
+.syntaxhighlighter .functions {
+ color: #ffaa3e !important;
+}
+.syntaxhighlighter .constants {
+ color: #e0e8ff !important;
+}
+.syntaxhighlighter .script {
+ font-weight: bold !important;
+ color: #96dd3b !important;
+ background-color: none !important;
+}
+.syntaxhighlighter .color1, .syntaxhighlighter .color1 a {
+ color: #eb939a !important;
+}
+.syntaxhighlighter .color2, .syntaxhighlighter .color2 a {
+ color: #91bb9e !important;
+}
+.syntaxhighlighter .color3, .syntaxhighlighter .color3 a {
+ color: #edef7d !important;
+}
+
+.syntaxhighlighter .comments {
+ font-style: italic !important;
+}
+.syntaxhighlighter .keyword {
+ font-weight: bold !important;
+}
diff --git a/apps/files_textviewer/css/syntaxhighlighter/shCoreEclipse.css b/apps/files_textviewer/css/syntaxhighlighter/shCoreEclipse.css
new file mode 100644
index 00000000000..a45de9fd8e3
--- /dev/null
+++ b/apps/files_textviewer/css/syntaxhighlighter/shCoreEclipse.css
@@ -0,0 +1,339 @@
+/**
+ * SyntaxHighlighter
+ * http://alexgorbatchev.com/SyntaxHighlighter
+ *
+ * SyntaxHighlighter is donationware. If you are using it, please donate.
+ * http://alexgorbatchev.com/SyntaxHighlighter/donate.html
+ *
+ * @version
+ * 3.0.83 (July 02 2010)
+ *
+ * @copyright
+ * Copyright (C) 2004-2010 Alex Gorbatchev.
+ *
+ * @license
+ * Dual licensed under the MIT and GPL licenses.
+ */
+.syntaxhighlighter a,
+.syntaxhighlighter div,
+.syntaxhighlighter code,
+.syntaxhighlighter table,
+.syntaxhighlighter table td,
+.syntaxhighlighter table tr,
+.syntaxhighlighter table tbody,
+.syntaxhighlighter table thead,
+.syntaxhighlighter table caption,
+.syntaxhighlighter textarea {
+ -moz-border-radius: 0 0 0 0 !important;
+ -webkit-border-radius: 0 0 0 0 !important;
+ background: none !important;
+ border: 0 !important;
+ bottom: auto !important;
+ float: none !important;
+ height: auto !important;
+ left: auto !important;
+ line-height: 1.1em !important;
+ margin: 0 !important;
+ outline: 0 !important;
+ overflow: visible !important;
+ padding: 0 !important;
+ position: static !important;
+ right: auto !important;
+ text-align: left !important;
+ top: auto !important;
+ vertical-align: baseline !important;
+ width: auto !important;
+ box-sizing: content-box !important;
+ font-family: "Consolas", "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important;
+ font-weight: normal !important;
+ font-style: normal !important;
+ font-size: 1em !important;
+ min-height: inherit !important;
+ min-height: auto !important;
+}
+
+.syntaxhighlighter {
+ width: 100% !important;
+ margin: 1em 0 1em 0 !important;
+ position: relative !important;
+ overflow: auto !important;
+ font-size: 1em !important;
+}
+.syntaxhighlighter.source {
+ overflow: hidden !important;
+}
+.syntaxhighlighter .bold {
+ font-weight: bold !important;
+}
+.syntaxhighlighter .italic {
+ font-style: italic !important;
+}
+.syntaxhighlighter .line {
+ white-space: pre !important;
+}
+.syntaxhighlighter table {
+ width: 100% !important;
+}
+.syntaxhighlighter table caption {
+ text-align: left !important;
+ padding: .5em 0 0.5em 1em !important;
+}
+.syntaxhighlighter table td.code {
+ width: 100% !important;
+}
+.syntaxhighlighter table td.code .container {
+ position: relative !important;
+}
+.syntaxhighlighter table td.code .container textarea {
+ box-sizing: border-box !important;
+ position: absolute !important;
+ left: 0 !important;
+ top: 0 !important;
+ width: 100% !important;
+ height: 100% !important;
+ border: none !important;
+ background: white !important;
+ padding-left: 1em !important;
+ overflow: hidden !important;
+ white-space: pre !important;
+}
+.syntaxhighlighter table td.gutter .line {
+ text-align: right !important;
+ padding: 0 0.5em 0 1em !important;
+}
+.syntaxhighlighter table td.code .line {
+ padding: 0 1em !important;
+}
+.syntaxhighlighter.nogutter td.code .container textarea, .syntaxhighlighter.nogutter td.code .line {
+ padding-left: 0em !important;
+}
+.syntaxhighlighter.show {
+ display: block !important;
+}
+.syntaxhighlighter.collapsed table {
+ display: none !important;
+}
+.syntaxhighlighter.collapsed .toolbar {
+ padding: 0.1em 0.8em 0em 0.8em !important;
+ font-size: 1em !important;
+ position: static !important;
+ width: auto !important;
+ height: auto !important;
+}
+.syntaxhighlighter.collapsed .toolbar span {
+ display: inline !important;
+ margin-right: 1em !important;
+}
+.syntaxhighlighter.collapsed .toolbar span a {
+ padding: 0 !important;
+ display: none !important;
+}
+.syntaxhighlighter.collapsed .toolbar span a.expandSource {
+ display: inline !important;
+}
+.syntaxhighlighter .toolbar {
+ position: absolute !important;
+ right: 1px !important;
+ top: 1px !important;
+ width: 11px !important;
+ height: 11px !important;
+ font-size: 10px !important;
+ z-index: 10 !important;
+}
+.syntaxhighlighter .toolbar span.title {
+ display: inline !important;
+}
+.syntaxhighlighter .toolbar a {
+ display: block !important;
+ text-align: center !important;
+ text-decoration: none !important;
+ padding-top: 1px !important;
+}
+.syntaxhighlighter .toolbar a.expandSource {
+ display: none !important;
+}
+.syntaxhighlighter.ie {
+ font-size: .9em !important;
+ padding: 1px 0 1px 0 !important;
+}
+.syntaxhighlighter.ie .toolbar {
+ line-height: 8px !important;
+}
+.syntaxhighlighter.ie .toolbar a {
+ padding-top: 0px !important;
+}
+.syntaxhighlighter.printing .line.alt1 .content,
+.syntaxhighlighter.printing .line.alt2 .content,
+.syntaxhighlighter.printing .line.highlighted .number,
+.syntaxhighlighter.printing .line.highlighted.alt1 .content,
+.syntaxhighlighter.printing .line.highlighted.alt2 .content {
+ background: none !important;
+}
+.syntaxhighlighter.printing .line .number {
+ color: #bbbbbb !important;
+}
+.syntaxhighlighter.printing .line .content {
+ color: black !important;
+}
+.syntaxhighlighter.printing .toolbar {
+ display: none !important;
+}
+.syntaxhighlighter.printing a {
+ text-decoration: none !important;
+}
+.syntaxhighlighter.printing .plain, .syntaxhighlighter.printing .plain a {
+ color: black !important;
+}
+.syntaxhighlighter.printing .comments, .syntaxhighlighter.printing .comments a {
+ color: #008200 !important;
+}
+.syntaxhighlighter.printing .string, .syntaxhighlighter.printing .string a {
+ color: blue !important;
+}
+.syntaxhighlighter.printing .keyword {
+ color: #006699 !important;
+ font-weight: bold !important;
+}
+.syntaxhighlighter.printing .preprocessor {
+ color: gray !important;
+}
+.syntaxhighlighter.printing .variable {
+ color: #aa7700 !important;
+}
+.syntaxhighlighter.printing .value {
+ color: #009900 !important;
+}
+.syntaxhighlighter.printing .functions {
+ color: #ff1493 !important;
+}
+.syntaxhighlighter.printing .constants {
+ color: #0066cc !important;
+}
+.syntaxhighlighter.printing .script {
+ font-weight: bold !important;
+}
+.syntaxhighlighter.printing .color1, .syntaxhighlighter.printing .color1 a {
+ color: gray !important;
+}
+.syntaxhighlighter.printing .color2, .syntaxhighlighter.printing .color2 a {
+ color: #ff1493 !important;
+}
+.syntaxhighlighter.printing .color3, .syntaxhighlighter.printing .color3 a {
+ color: red !important;
+}
+.syntaxhighlighter.printing .break, .syntaxhighlighter.printing .break a {
+ color: black !important;
+}
+
+.syntaxhighlighter {
+ background-color: white !important;
+}
+.syntaxhighlighter .line.alt1 {
+ background-color: white !important;
+}
+.syntaxhighlighter .line.alt2 {
+ background-color: white !important;
+}
+.syntaxhighlighter .line.highlighted.alt1, .syntaxhighlighter .line.highlighted.alt2 {
+ background-color: #c3defe !important;
+}
+.syntaxhighlighter .line.highlighted.number {
+ color: white !important;
+}
+.syntaxhighlighter table caption {
+ color: black !important;
+}
+.syntaxhighlighter .gutter {
+ color: #787878 !important;
+}
+.syntaxhighlighter .gutter .line {
+ border-right: 3px solid #d4d0c8 !important;
+}
+.syntaxhighlighter .gutter .line.highlighted {
+ background-color: #d4d0c8 !important;
+ color: white !important;
+}
+.syntaxhighlighter.printing .line .content {
+ border: none !important;
+}
+.syntaxhighlighter.collapsed {
+ overflow: visible !important;
+}
+.syntaxhighlighter.collapsed .toolbar {
+ color: #3f5fbf !important;
+ background: white !important;
+ border: 1px solid #d4d0c8 !important;
+}
+.syntaxhighlighter.collapsed .toolbar a {
+ color: #3f5fbf !important;
+}
+.syntaxhighlighter.collapsed .toolbar a:hover {
+ color: #aa7700 !important;
+}
+.syntaxhighlighter .toolbar {
+ color: #a0a0a0 !important;
+ background: #d4d0c8 !important;
+ border: none !important;
+}
+.syntaxhighlighter .toolbar a {
+ color: #a0a0a0 !important;
+}
+.syntaxhighlighter .toolbar a:hover {
+ color: red !important;
+}
+.syntaxhighlighter .plain, .syntaxhighlighter .plain a {
+ color: black !important;
+}
+.syntaxhighlighter .comments, .syntaxhighlighter .comments a {
+ color: #3f5fbf !important;
+}
+.syntaxhighlighter .string, .syntaxhighlighter .string a {
+ color: #2a00ff !important;
+}
+.syntaxhighlighter .keyword {
+ color: #7f0055 !important;
+}
+.syntaxhighlighter .preprocessor {
+ color: #646464 !important;
+}
+.syntaxhighlighter .variable {
+ color: #aa7700 !important;
+}
+.syntaxhighlighter .value {
+ color: #009900 !important;
+}
+.syntaxhighlighter .functions {
+ color: #ff1493 !important;
+}
+.syntaxhighlighter .constants {
+ color: #0066cc !important;
+}
+.syntaxhighlighter .script {
+ font-weight: bold !important;
+ color: #7f0055 !important;
+ background-color: none !important;
+}
+.syntaxhighlighter .color1, .syntaxhighlighter .color1 a {
+ color: gray !important;
+}
+.syntaxhighlighter .color2, .syntaxhighlighter .color2 a {
+ color: #ff1493 !important;
+}
+.syntaxhighlighter .color3, .syntaxhighlighter .color3 a {
+ color: red !important;
+}
+
+.syntaxhighlighter .keyword {
+ font-weight: bold !important;
+}
+.syntaxhighlighter .xml .keyword {
+ color: #3f7f7f !important;
+ font-weight: normal !important;
+}
+.syntaxhighlighter .xml .color1, .syntaxhighlighter .xml .color1 a {
+ color: #7f007f !important;
+}
+.syntaxhighlighter .xml .string {
+ font-style: italic !important;
+ color: #2a00ff !important;
+}
diff --git a/apps/files_textviewer/css/syntaxhighlighter/shCoreEmacs.css b/apps/files_textviewer/css/syntaxhighlighter/shCoreEmacs.css
new file mode 100644
index 00000000000..706c77a0a85
--- /dev/null
+++ b/apps/files_textviewer/css/syntaxhighlighter/shCoreEmacs.css
@@ -0,0 +1,324 @@
+/**
+ * SyntaxHighlighter
+ * http://alexgorbatchev.com/SyntaxHighlighter
+ *
+ * SyntaxHighlighter is donationware. If you are using it, please donate.
+ * http://alexgorbatchev.com/SyntaxHighlighter/donate.html
+ *
+ * @version
+ * 3.0.83 (July 02 2010)
+ *
+ * @copyright
+ * Copyright (C) 2004-2010 Alex Gorbatchev.
+ *
+ * @license
+ * Dual licensed under the MIT and GPL licenses.
+ */
+.syntaxhighlighter a,
+.syntaxhighlighter div,
+.syntaxhighlighter code,
+.syntaxhighlighter table,
+.syntaxhighlighter table td,
+.syntaxhighlighter table tr,
+.syntaxhighlighter table tbody,
+.syntaxhighlighter table thead,
+.syntaxhighlighter table caption,
+.syntaxhighlighter textarea {
+ -moz-border-radius: 0 0 0 0 !important;
+ -webkit-border-radius: 0 0 0 0 !important;
+ background: none !important;
+ border: 0 !important;
+ bottom: auto !important;
+ float: none !important;
+ height: auto !important;
+ left: auto !important;
+ line-height: 1.1em !important;
+ margin: 0 !important;
+ outline: 0 !important;
+ overflow: visible !important;
+ padding: 0 !important;
+ position: static !important;
+ right: auto !important;
+ text-align: left !important;
+ top: auto !important;
+ vertical-align: baseline !important;
+ width: auto !important;
+ box-sizing: content-box !important;
+ font-family: "Consolas", "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important;
+ font-weight: normal !important;
+ font-style: normal !important;
+ font-size: 1em !important;
+ min-height: inherit !important;
+ min-height: auto !important;
+}
+
+.syntaxhighlighter {
+ width: 100% !important;
+ margin: 1em 0 1em 0 !important;
+ position: relative !important;
+ overflow: auto !important;
+ font-size: 1em !important;
+}
+.syntaxhighlighter.source {
+ overflow: hidden !important;
+}
+.syntaxhighlighter .bold {
+ font-weight: bold !important;
+}
+.syntaxhighlighter .italic {
+ font-style: italic !important;
+}
+.syntaxhighlighter .line {
+ white-space: pre !important;
+}
+.syntaxhighlighter table {
+ width: 100% !important;
+}
+.syntaxhighlighter table caption {
+ text-align: left !important;
+ padding: .5em 0 0.5em 1em !important;
+}
+.syntaxhighlighter table td.code {
+ width: 100% !important;
+}
+.syntaxhighlighter table td.code .container {
+ position: relative !important;
+}
+.syntaxhighlighter table td.code .container textarea {
+ box-sizing: border-box !important;
+ position: absolute !important;
+ left: 0 !important;
+ top: 0 !important;
+ width: 100% !important;
+ height: 100% !important;
+ border: none !important;
+ background: white !important;
+ padding-left: 1em !important;
+ overflow: hidden !important;
+ white-space: pre !important;
+}
+.syntaxhighlighter table td.gutter .line {
+ text-align: right !important;
+ padding: 0 0.5em 0 1em !important;
+}
+.syntaxhighlighter table td.code .line {
+ padding: 0 1em !important;
+}
+.syntaxhighlighter.nogutter td.code .container textarea, .syntaxhighlighter.nogutter td.code .line {
+ padding-left: 0em !important;
+}
+.syntaxhighlighter.show {
+ display: block !important;
+}
+.syntaxhighlighter.collapsed table {
+ display: none !important;
+}
+.syntaxhighlighter.collapsed .toolbar {
+ padding: 0.1em 0.8em 0em 0.8em !important;
+ font-size: 1em !important;
+ position: static !important;
+ width: auto !important;
+ height: auto !important;
+}
+.syntaxhighlighter.collapsed .toolbar span {
+ display: inline !important;
+ margin-right: 1em !important;
+}
+.syntaxhighlighter.collapsed .toolbar span a {
+ padding: 0 !important;
+ display: none !important;
+}
+.syntaxhighlighter.collapsed .toolbar span a.expandSource {
+ display: inline !important;
+}
+.syntaxhighlighter .toolbar {
+ position: absolute !important;
+ right: 1px !important;
+ top: 1px !important;
+ width: 11px !important;
+ height: 11px !important;
+ font-size: 10px !important;
+ z-index: 10 !important;
+}
+.syntaxhighlighter .toolbar span.title {
+ display: inline !important;
+}
+.syntaxhighlighter .toolbar a {
+ display: block !important;
+ text-align: center !important;
+ text-decoration: none !important;
+ padding-top: 1px !important;
+}
+.syntaxhighlighter .toolbar a.expandSource {
+ display: none !important;
+}
+.syntaxhighlighter.ie {
+ font-size: .9em !important;
+ padding: 1px 0 1px 0 !important;
+}
+.syntaxhighlighter.ie .toolbar {
+ line-height: 8px !important;
+}
+.syntaxhighlighter.ie .toolbar a {
+ padding-top: 0px !important;
+}
+.syntaxhighlighter.printing .line.alt1 .content,
+.syntaxhighlighter.printing .line.alt2 .content,
+.syntaxhighlighter.printing .line.highlighted .number,
+.syntaxhighlighter.printing .line.highlighted.alt1 .content,
+.syntaxhighlighter.printing .line.highlighted.alt2 .content {
+ background: none !important;
+}
+.syntaxhighlighter.printing .line .number {
+ color: #bbbbbb !important;
+}
+.syntaxhighlighter.printing .line .content {
+ color: black !important;
+}
+.syntaxhighlighter.printing .toolbar {
+ display: none !important;
+}
+.syntaxhighlighter.printing a {
+ text-decoration: none !important;
+}
+.syntaxhighlighter.printing .plain, .syntaxhighlighter.printing .plain a {
+ color: black !important;
+}
+.syntaxhighlighter.printing .comments, .syntaxhighlighter.printing .comments a {
+ color: #008200 !important;
+}
+.syntaxhighlighter.printing .string, .syntaxhighlighter.printing .string a {
+ color: blue !important;
+}
+.syntaxhighlighter.printing .keyword {
+ color: #006699 !important;
+ font-weight: bold !important;
+}
+.syntaxhighlighter.printing .preprocessor {
+ color: gray !important;
+}
+.syntaxhighlighter.printing .variable {
+ color: #aa7700 !important;
+}
+.syntaxhighlighter.printing .value {
+ color: #009900 !important;
+}
+.syntaxhighlighter.printing .functions {
+ color: #ff1493 !important;
+}
+.syntaxhighlighter.printing .constants {
+ color: #0066cc !important;
+}
+.syntaxhighlighter.printing .script {
+ font-weight: bold !important;
+}
+.syntaxhighlighter.printing .color1, .syntaxhighlighter.printing .color1 a {
+ color: gray !important;
+}
+.syntaxhighlighter.printing .color2, .syntaxhighlighter.printing .color2 a {
+ color: #ff1493 !important;
+}
+.syntaxhighlighter.printing .color3, .syntaxhighlighter.printing .color3 a {
+ color: red !important;
+}
+.syntaxhighlighter.printing .break, .syntaxhighlighter.printing .break a {
+ color: black !important;
+}
+
+.syntaxhighlighter {
+ background-color: black !important;
+}
+.syntaxhighlighter .line.alt1 {
+ background-color: black !important;
+}
+.syntaxhighlighter .line.alt2 {
+ background-color: black !important;
+}
+.syntaxhighlighter .line.highlighted.alt1, .syntaxhighlighter .line.highlighted.alt2 {
+ background-color: #2a3133 !important;
+}
+.syntaxhighlighter .line.highlighted.number {
+ color: white !important;
+}
+.syntaxhighlighter table caption {
+ color: #d3d3d3 !important;
+}
+.syntaxhighlighter .gutter {
+ color: #d3d3d3 !important;
+}
+.syntaxhighlighter .gutter .line {
+ border-right: 3px solid #990000 !important;
+}
+.syntaxhighlighter .gutter .line.highlighted {
+ background-color: #990000 !important;
+ color: black !important;
+}
+.syntaxhighlighter.printing .line .content {
+ border: none !important;
+}
+.syntaxhighlighter.collapsed {
+ overflow: visible !important;
+}
+.syntaxhighlighter.collapsed .toolbar {
+ color: #ebdb8d !important;
+ background: black !important;
+ border: 1px solid #990000 !important;
+}
+.syntaxhighlighter.collapsed .toolbar a {
+ color: #ebdb8d !important;
+}
+.syntaxhighlighter.collapsed .toolbar a:hover {
+ color: #ff7d27 !important;
+}
+.syntaxhighlighter .toolbar {
+ color: white !important;
+ background: #990000 !important;
+ border: none !important;
+}
+.syntaxhighlighter .toolbar a {
+ color: white !important;
+}
+.syntaxhighlighter .toolbar a:hover {
+ color: #9ccff4 !important;
+}
+.syntaxhighlighter .plain, .syntaxhighlighter .plain a {
+ color: #d3d3d3 !important;
+}
+.syntaxhighlighter .comments, .syntaxhighlighter .comments a {
+ color: #ff7d27 !important;
+}
+.syntaxhighlighter .string, .syntaxhighlighter .string a {
+ color: #ff9e7b !important;
+}
+.syntaxhighlighter .keyword {
+ color: aqua !important;
+}
+.syntaxhighlighter .preprocessor {
+ color: #aec4de !important;
+}
+.syntaxhighlighter .variable {
+ color: #ffaa3e !important;
+}
+.syntaxhighlighter .value {
+ color: #009900 !important;
+}
+.syntaxhighlighter .functions {
+ color: #81cef9 !important;
+}
+.syntaxhighlighter .constants {
+ color: #ff9e7b !important;
+}
+.syntaxhighlighter .script {
+ font-weight: bold !important;
+ color: aqua !important;
+ background-color: none !important;
+}
+.syntaxhighlighter .color1, .syntaxhighlighter .color1 a {
+ color: #ebdb8d !important;
+}
+.syntaxhighlighter .color2, .syntaxhighlighter .color2 a {
+ color: #ff7d27 !important;
+}
+.syntaxhighlighter .color3, .syntaxhighlighter .color3 a {
+ color: #aec4de !important;
+}
diff --git a/apps/files_textviewer/css/syntaxhighlighter/shCoreFadeToGrey.css b/apps/files_textviewer/css/syntaxhighlighter/shCoreFadeToGrey.css
new file mode 100644
index 00000000000..6101eba51f0
--- /dev/null
+++ b/apps/files_textviewer/css/syntaxhighlighter/shCoreFadeToGrey.css
@@ -0,0 +1,328 @@
+/**
+ * SyntaxHighlighter
+ * http://alexgorbatchev.com/SyntaxHighlighter
+ *
+ * SyntaxHighlighter is donationware. If you are using it, please donate.
+ * http://alexgorbatchev.com/SyntaxHighlighter/donate.html
+ *
+ * @version
+ * 3.0.83 (July 02 2010)
+ *
+ * @copyright
+ * Copyright (C) 2004-2010 Alex Gorbatchev.
+ *
+ * @license
+ * Dual licensed under the MIT and GPL licenses.
+ */
+.syntaxhighlighter a,
+.syntaxhighlighter div,
+.syntaxhighlighter code,
+.syntaxhighlighter table,
+.syntaxhighlighter table td,
+.syntaxhighlighter table tr,
+.syntaxhighlighter table tbody,
+.syntaxhighlighter table thead,
+.syntaxhighlighter table caption,
+.syntaxhighlighter textarea {
+ -moz-border-radius: 0 0 0 0 !important;
+ -webkit-border-radius: 0 0 0 0 !important;
+ background: none !important;
+ border: 0 !important;
+ bottom: auto !important;
+ float: none !important;
+ height: auto !important;
+ left: auto !important;
+ line-height: 1.1em !important;
+ margin: 0 !important;
+ outline: 0 !important;
+ overflow: visible !important;
+ padding: 0 !important;
+ position: static !important;
+ right: auto !important;
+ text-align: left !important;
+ top: auto !important;
+ vertical-align: baseline !important;
+ width: auto !important;
+ box-sizing: content-box !important;
+ font-family: "Consolas", "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important;
+ font-weight: normal !important;
+ font-style: normal !important;
+ font-size: 1em !important;
+ min-height: inherit !important;
+ min-height: auto !important;
+}
+
+.syntaxhighlighter {
+ width: 100% !important;
+ margin: 1em 0 1em 0 !important;
+ position: relative !important;
+ overflow: auto !important;
+ font-size: 1em !important;
+}
+.syntaxhighlighter.source {
+ overflow: hidden !important;
+}
+.syntaxhighlighter .bold {
+ font-weight: bold !important;
+}
+.syntaxhighlighter .italic {
+ font-style: italic !important;
+}
+.syntaxhighlighter .line {
+ white-space: pre !important;
+}
+.syntaxhighlighter table {
+ width: 100% !important;
+}
+.syntaxhighlighter table caption {
+ text-align: left !important;
+ padding: .5em 0 0.5em 1em !important;
+}
+.syntaxhighlighter table td.code {
+ width: 100% !important;
+}
+.syntaxhighlighter table td.code .container {
+ position: relative !important;
+}
+.syntaxhighlighter table td.code .container textarea {
+ box-sizing: border-box !important;
+ position: absolute !important;
+ left: 0 !important;
+ top: 0 !important;
+ width: 100% !important;
+ height: 100% !important;
+ border: none !important;
+ background: white !important;
+ padding-left: 1em !important;
+ overflow: hidden !important;
+ white-space: pre !important;
+}
+.syntaxhighlighter table td.gutter .line {
+ text-align: right !important;
+ padding: 0 0.5em 0 1em !important;
+}
+.syntaxhighlighter table td.code .line {
+ padding: 0 1em !important;
+}
+.syntaxhighlighter.nogutter td.code .container textarea, .syntaxhighlighter.nogutter td.code .line {
+ padding-left: 0em !important;
+}
+.syntaxhighlighter.show {
+ display: block !important;
+}
+.syntaxhighlighter.collapsed table {
+ display: none !important;
+}
+.syntaxhighlighter.collapsed .toolbar {
+ padding: 0.1em 0.8em 0em 0.8em !important;
+ font-size: 1em !important;
+ position: static !important;
+ width: auto !important;
+ height: auto !important;
+}
+.syntaxhighlighter.collapsed .toolbar span {
+ display: inline !important;
+ margin-right: 1em !important;
+}
+.syntaxhighlighter.collapsed .toolbar span a {
+ padding: 0 !important;
+ display: none !important;
+}
+.syntaxhighlighter.collapsed .toolbar span a.expandSource {
+ display: inline !important;
+}
+.syntaxhighlighter .toolbar {
+ position: absolute !important;
+ right: 1px !important;
+ top: 1px !important;
+ width: 11px !important;
+ height: 11px !important;
+ font-size: 10px !important;
+ z-index: 10 !important;
+}
+.syntaxhighlighter .toolbar span.title {
+ display: inline !important;
+}
+.syntaxhighlighter .toolbar a {
+ display: block !important;
+ text-align: center !important;
+ text-decoration: none !important;
+ padding-top: 1px !important;
+}
+.syntaxhighlighter .toolbar a.expandSource {
+ display: none !important;
+}
+.syntaxhighlighter.ie {
+ font-size: .9em !important;
+ padding: 1px 0 1px 0 !important;
+}
+.syntaxhighlighter.ie .toolbar {
+ line-height: 8px !important;
+}
+.syntaxhighlighter.ie .toolbar a {
+ padding-top: 0px !important;
+}
+.syntaxhighlighter.printing .line.alt1 .content,
+.syntaxhighlighter.printing .line.alt2 .content,
+.syntaxhighlighter.printing .line.highlighted .number,
+.syntaxhighlighter.printing .line.highlighted.alt1 .content,
+.syntaxhighlighter.printing .line.highlighted.alt2 .content {
+ background: none !important;
+}
+.syntaxhighlighter.printing .line .number {
+ color: #bbbbbb !important;
+}
+.syntaxhighlighter.printing .line .content {
+ color: black !important;
+}
+.syntaxhighlighter.printing .toolbar {
+ display: none !important;
+}
+.syntaxhighlighter.printing a {
+ text-decoration: none !important;
+}
+.syntaxhighlighter.printing .plain, .syntaxhighlighter.printing .plain a {
+ color: black !important;
+}
+.syntaxhighlighter.printing .comments, .syntaxhighlighter.printing .comments a {
+ color: #008200 !important;
+}
+.syntaxhighlighter.printing .string, .syntaxhighlighter.printing .string a {
+ color: blue !important;
+}
+.syntaxhighlighter.printing .keyword {
+ color: #006699 !important;
+ font-weight: bold !important;
+}
+.syntaxhighlighter.printing .preprocessor {
+ color: gray !important;
+}
+.syntaxhighlighter.printing .variable {
+ color: #aa7700 !important;
+}
+.syntaxhighlighter.printing .value {
+ color: #009900 !important;
+}
+.syntaxhighlighter.printing .functions {
+ color: #ff1493 !important;
+}
+.syntaxhighlighter.printing .constants {
+ color: #0066cc !important;
+}
+.syntaxhighlighter.printing .script {
+ font-weight: bold !important;
+}
+.syntaxhighlighter.printing .color1, .syntaxhighlighter.printing .color1 a {
+ color: gray !important;
+}
+.syntaxhighlighter.printing .color2, .syntaxhighlighter.printing .color2 a {
+ color: #ff1493 !important;
+}
+.syntaxhighlighter.printing .color3, .syntaxhighlighter.printing .color3 a {
+ color: red !important;
+}
+.syntaxhighlighter.printing .break, .syntaxhighlighter.printing .break a {
+ color: black !important;
+}
+
+.syntaxhighlighter {
+ background-color: #121212 !important;
+}
+.syntaxhighlighter .line.alt1 {
+ background-color: #121212 !important;
+}
+.syntaxhighlighter .line.alt2 {
+ background-color: #121212 !important;
+}
+.syntaxhighlighter .line.highlighted.alt1, .syntaxhighlighter .line.highlighted.alt2 {
+ background-color: #2c2c29 !important;
+}
+.syntaxhighlighter .line.highlighted.number {
+ color: white !important;
+}
+.syntaxhighlighter table caption {
+ color: white !important;
+}
+.syntaxhighlighter .gutter {
+ color: #afafaf !important;
+}
+.syntaxhighlighter .gutter .line {
+ border-right: 3px solid #3185b9 !important;
+}
+.syntaxhighlighter .gutter .line.highlighted {
+ background-color: #3185b9 !important;
+ color: #121212 !important;
+}
+.syntaxhighlighter.printing .line .content {
+ border: none !important;
+}
+.syntaxhighlighter.collapsed {
+ overflow: visible !important;
+}
+.syntaxhighlighter.collapsed .toolbar {
+ color: #3185b9 !important;
+ background: black !important;
+ border: 1px solid #3185b9 !important;
+}
+.syntaxhighlighter.collapsed .toolbar a {
+ color: #3185b9 !important;
+}
+.syntaxhighlighter.collapsed .toolbar a:hover {
+ color: #d01d33 !important;
+}
+.syntaxhighlighter .toolbar {
+ color: white !important;
+ background: #3185b9 !important;
+ border: none !important;
+}
+.syntaxhighlighter .toolbar a {
+ color: white !important;
+}
+.syntaxhighlighter .toolbar a:hover {
+ color: #96daff !important;
+}
+.syntaxhighlighter .plain, .syntaxhighlighter .plain a {
+ color: white !important;
+}
+.syntaxhighlighter .comments, .syntaxhighlighter .comments a {
+ color: #696854 !important;
+}
+.syntaxhighlighter .string, .syntaxhighlighter .string a {
+ color: #e3e658 !important;
+}
+.syntaxhighlighter .keyword {
+ color: #d01d33 !important;
+}
+.syntaxhighlighter .preprocessor {
+ color: #435a5f !important;
+}
+.syntaxhighlighter .variable {
+ color: #898989 !important;
+}
+.syntaxhighlighter .value {
+ color: #009900 !important;
+}
+.syntaxhighlighter .functions {
+ color: #aaaaaa !important;
+}
+.syntaxhighlighter .constants {
+ color: #96daff !important;
+}
+.syntaxhighlighter .script {
+ font-weight: bold !important;
+ color: #d01d33 !important;
+ background-color: none !important;
+}
+.syntaxhighlighter .color1, .syntaxhighlighter .color1 a {
+ color: #ffc074 !important;
+}
+.syntaxhighlighter .color2, .syntaxhighlighter .color2 a {
+ color: #4a8cdb !important;
+}
+.syntaxhighlighter .color3, .syntaxhighlighter .color3 a {
+ color: #96daff !important;
+}
+
+.syntaxhighlighter .functions {
+ font-weight: bold !important;
+}
diff --git a/apps/files_textviewer/css/syntaxhighlighter/shCoreMDUltra.css b/apps/files_textviewer/css/syntaxhighlighter/shCoreMDUltra.css
new file mode 100644
index 00000000000..2923ce7367b
--- /dev/null
+++ b/apps/files_textviewer/css/syntaxhighlighter/shCoreMDUltra.css
@@ -0,0 +1,324 @@
+/**
+ * SyntaxHighlighter
+ * http://alexgorbatchev.com/SyntaxHighlighter
+ *
+ * SyntaxHighlighter is donationware. If you are using it, please donate.
+ * http://alexgorbatchev.com/SyntaxHighlighter/donate.html
+ *
+ * @version
+ * 3.0.83 (July 02 2010)
+ *
+ * @copyright
+ * Copyright (C) 2004-2010 Alex Gorbatchev.
+ *
+ * @license
+ * Dual licensed under the MIT and GPL licenses.
+ */
+.syntaxhighlighter a,
+.syntaxhighlighter div,
+.syntaxhighlighter code,
+.syntaxhighlighter table,
+.syntaxhighlighter table td,
+.syntaxhighlighter table tr,
+.syntaxhighlighter table tbody,
+.syntaxhighlighter table thead,
+.syntaxhighlighter table caption,
+.syntaxhighlighter textarea {
+ -moz-border-radius: 0 0 0 0 !important;
+ -webkit-border-radius: 0 0 0 0 !important;
+ background: none !important;
+ border: 0 !important;
+ bottom: auto !important;
+ float: none !important;
+ height: auto !important;
+ left: auto !important;
+ line-height: 1.1em !important;
+ margin: 0 !important;
+ outline: 0 !important;
+ overflow: visible !important;
+ padding: 0 !important;
+ position: static !important;
+ right: auto !important;
+ text-align: left !important;
+ top: auto !important;
+ vertical-align: baseline !important;
+ width: auto !important;
+ box-sizing: content-box !important;
+ font-family: "Consolas", "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important;
+ font-weight: normal !important;
+ font-style: normal !important;
+ font-size: 1em !important;
+ min-height: inherit !important;
+ min-height: auto !important;
+}
+
+.syntaxhighlighter {
+ width: 100% !important;
+ margin: 1em 0 1em 0 !important;
+ position: relative !important;
+ overflow: auto !important;
+ font-size: 1em !important;
+}
+.syntaxhighlighter.source {
+ overflow: hidden !important;
+}
+.syntaxhighlighter .bold {
+ font-weight: bold !important;
+}
+.syntaxhighlighter .italic {
+ font-style: italic !important;
+}
+.syntaxhighlighter .line {
+ white-space: pre !important;
+}
+.syntaxhighlighter table {
+ width: 100% !important;
+}
+.syntaxhighlighter table caption {
+ text-align: left !important;
+ padding: .5em 0 0.5em 1em !important;
+}
+.syntaxhighlighter table td.code {
+ width: 100% !important;
+}
+.syntaxhighlighter table td.code .container {
+ position: relative !important;
+}
+.syntaxhighlighter table td.code .container textarea {
+ box-sizing: border-box !important;
+ position: absolute !important;
+ left: 0 !important;
+ top: 0 !important;
+ width: 100% !important;
+ height: 100% !important;
+ border: none !important;
+ background: white !important;
+ padding-left: 1em !important;
+ overflow: hidden !important;
+ white-space: pre !important;
+}
+.syntaxhighlighter table td.gutter .line {
+ text-align: right !important;
+ padding: 0 0.5em 0 1em !important;
+}
+.syntaxhighlighter table td.code .line {
+ padding: 0 1em !important;
+}
+.syntaxhighlighter.nogutter td.code .container textarea, .syntaxhighlighter.nogutter td.code .line {
+ padding-left: 0em !important;
+}
+.syntaxhighlighter.show {
+ display: block !important;
+}
+.syntaxhighlighter.collapsed table {
+ display: none !important;
+}
+.syntaxhighlighter.collapsed .toolbar {
+ padding: 0.1em 0.8em 0em 0.8em !important;
+ font-size: 1em !important;
+ position: static !important;
+ width: auto !important;
+ height: auto !important;
+}
+.syntaxhighlighter.collapsed .toolbar span {
+ display: inline !important;
+ margin-right: 1em !important;
+}
+.syntaxhighlighter.collapsed .toolbar span a {
+ padding: 0 !important;
+ display: none !important;
+}
+.syntaxhighlighter.collapsed .toolbar span a.expandSource {
+ display: inline !important;
+}
+.syntaxhighlighter .toolbar {
+ position: absolute !important;
+ right: 1px !important;
+ top: 1px !important;
+ width: 11px !important;
+ height: 11px !important;
+ font-size: 10px !important;
+ z-index: 10 !important;
+}
+.syntaxhighlighter .toolbar span.title {
+ display: inline !important;
+}
+.syntaxhighlighter .toolbar a {
+ display: block !important;
+ text-align: center !important;
+ text-decoration: none !important;
+ padding-top: 1px !important;
+}
+.syntaxhighlighter .toolbar a.expandSource {
+ display: none !important;
+}
+.syntaxhighlighter.ie {
+ font-size: .9em !important;
+ padding: 1px 0 1px 0 !important;
+}
+.syntaxhighlighter.ie .toolbar {
+ line-height: 8px !important;
+}
+.syntaxhighlighter.ie .toolbar a {
+ padding-top: 0px !important;
+}
+.syntaxhighlighter.printing .line.alt1 .content,
+.syntaxhighlighter.printing .line.alt2 .content,
+.syntaxhighlighter.printing .line.highlighted .number,
+.syntaxhighlighter.printing .line.highlighted.alt1 .content,
+.syntaxhighlighter.printing .line.highlighted.alt2 .content {
+ background: none !important;
+}
+.syntaxhighlighter.printing .line .number {
+ color: #bbbbbb !important;
+}
+.syntaxhighlighter.printing .line .content {
+ color: black !important;
+}
+.syntaxhighlighter.printing .toolbar {
+ display: none !important;
+}
+.syntaxhighlighter.printing a {
+ text-decoration: none !important;
+}
+.syntaxhighlighter.printing .plain, .syntaxhighlighter.printing .plain a {
+ color: black !important;
+}
+.syntaxhighlighter.printing .comments, .syntaxhighlighter.printing .comments a {
+ color: #008200 !important;
+}
+.syntaxhighlighter.printing .string, .syntaxhighlighter.printing .string a {
+ color: blue !important;
+}
+.syntaxhighlighter.printing .keyword {
+ color: #006699 !important;
+ font-weight: bold !important;
+}
+.syntaxhighlighter.printing .preprocessor {
+ color: gray !important;
+}
+.syntaxhighlighter.printing .variable {
+ color: #aa7700 !important;
+}
+.syntaxhighlighter.printing .value {
+ color: #009900 !important;
+}
+.syntaxhighlighter.printing .functions {
+ color: #ff1493 !important;
+}
+.syntaxhighlighter.printing .constants {
+ color: #0066cc !important;
+}
+.syntaxhighlighter.printing .script {
+ font-weight: bold !important;
+}
+.syntaxhighlighter.printing .color1, .syntaxhighlighter.printing .color1 a {
+ color: gray !important;
+}
+.syntaxhighlighter.printing .color2, .syntaxhighlighter.printing .color2 a {
+ color: #ff1493 !important;
+}
+.syntaxhighlighter.printing .color3, .syntaxhighlighter.printing .color3 a {
+ color: red !important;
+}
+.syntaxhighlighter.printing .break, .syntaxhighlighter.printing .break a {
+ color: black !important;
+}
+
+.syntaxhighlighter {
+ background-color: #222222 !important;
+}
+.syntaxhighlighter .line.alt1 {
+ background-color: #222222 !important;
+}
+.syntaxhighlighter .line.alt2 {
+ background-color: #222222 !important;
+}
+.syntaxhighlighter .line.highlighted.alt1, .syntaxhighlighter .line.highlighted.alt2 {
+ background-color: #253e5a !important;
+}
+.syntaxhighlighter .line.highlighted.number {
+ color: white !important;
+}
+.syntaxhighlighter table caption {
+ color: lime !important;
+}
+.syntaxhighlighter .gutter {
+ color: #38566f !important;
+}
+.syntaxhighlighter .gutter .line {
+ border-right: 3px solid #435a5f !important;
+}
+.syntaxhighlighter .gutter .line.highlighted {
+ background-color: #435a5f !important;
+ color: #222222 !important;
+}
+.syntaxhighlighter.printing .line .content {
+ border: none !important;
+}
+.syntaxhighlighter.collapsed {
+ overflow: visible !important;
+}
+.syntaxhighlighter.collapsed .toolbar {
+ color: #428bdd !important;
+ background: black !important;
+ border: 1px solid #435a5f !important;
+}
+.syntaxhighlighter.collapsed .toolbar a {
+ color: #428bdd !important;
+}
+.syntaxhighlighter.collapsed .toolbar a:hover {
+ color: lime !important;
+}
+.syntaxhighlighter .toolbar {
+ color: #aaaaff !important;
+ background: #435a5f !important;
+ border: none !important;
+}
+.syntaxhighlighter .toolbar a {
+ color: #aaaaff !important;
+}
+.syntaxhighlighter .toolbar a:hover {
+ color: #9ccff4 !important;
+}
+.syntaxhighlighter .plain, .syntaxhighlighter .plain a {
+ color: lime !important;
+}
+.syntaxhighlighter .comments, .syntaxhighlighter .comments a {
+ color: #428bdd !important;
+}
+.syntaxhighlighter .string, .syntaxhighlighter .string a {
+ color: lime !important;
+}
+.syntaxhighlighter .keyword {
+ color: #aaaaff !important;
+}
+.syntaxhighlighter .preprocessor {
+ color: #8aa6c1 !important;
+}
+.syntaxhighlighter .variable {
+ color: aqua !important;
+}
+.syntaxhighlighter .value {
+ color: #f7e741 !important;
+}
+.syntaxhighlighter .functions {
+ color: #ff8000 !important;
+}
+.syntaxhighlighter .constants {
+ color: yellow !important;
+}
+.syntaxhighlighter .script {
+ font-weight: bold !important;
+ color: #aaaaff !important;
+ background-color: none !important;
+}
+.syntaxhighlighter .color1, .syntaxhighlighter .color1 a {
+ color: red !important;
+}
+.syntaxhighlighter .color2, .syntaxhighlighter .color2 a {
+ color: yellow !important;
+}
+.syntaxhighlighter .color3, .syntaxhighlighter .color3 a {
+ color: #ffaa3e !important;
+}
diff --git a/apps/files_textviewer/css/syntaxhighlighter/shCoreMidnight.css b/apps/files_textviewer/css/syntaxhighlighter/shCoreMidnight.css
new file mode 100644
index 00000000000..e3733eed566
--- /dev/null
+++ b/apps/files_textviewer/css/syntaxhighlighter/shCoreMidnight.css
@@ -0,0 +1,324 @@
+/**
+ * SyntaxHighlighter
+ * http://alexgorbatchev.com/SyntaxHighlighter
+ *
+ * SyntaxHighlighter is donationware. If you are using it, please donate.
+ * http://alexgorbatchev.com/SyntaxHighlighter/donate.html
+ *
+ * @version
+ * 3.0.83 (July 02 2010)
+ *
+ * @copyright
+ * Copyright (C) 2004-2010 Alex Gorbatchev.
+ *
+ * @license
+ * Dual licensed under the MIT and GPL licenses.
+ */
+.syntaxhighlighter a,
+.syntaxhighlighter div,
+.syntaxhighlighter code,
+.syntaxhighlighter table,
+.syntaxhighlighter table td,
+.syntaxhighlighter table tr,
+.syntaxhighlighter table tbody,
+.syntaxhighlighter table thead,
+.syntaxhighlighter table caption,
+.syntaxhighlighter textarea {
+ -moz-border-radius: 0 0 0 0 !important;
+ -webkit-border-radius: 0 0 0 0 !important;
+ background: none !important;
+ border: 0 !important;
+ bottom: auto !important;
+ float: none !important;
+ height: auto !important;
+ left: auto !important;
+ line-height: 1.1em !important;
+ margin: 0 !important;
+ outline: 0 !important;
+ overflow: visible !important;
+ padding: 0 !important;
+ position: static !important;
+ right: auto !important;
+ text-align: left !important;
+ top: auto !important;
+ vertical-align: baseline !important;
+ width: auto !important;
+ box-sizing: content-box !important;
+ font-family: "Consolas", "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important;
+ font-weight: normal !important;
+ font-style: normal !important;
+ font-size: 1em !important;
+ min-height: inherit !important;
+ min-height: auto !important;
+}
+
+.syntaxhighlighter {
+ width: 100% !important;
+ margin: 1em 0 1em 0 !important;
+ position: relative !important;
+ overflow: auto !important;
+ font-size: 1em !important;
+}
+.syntaxhighlighter.source {
+ overflow: hidden !important;
+}
+.syntaxhighlighter .bold {
+ font-weight: bold !important;
+}
+.syntaxhighlighter .italic {
+ font-style: italic !important;
+}
+.syntaxhighlighter .line {
+ white-space: pre !important;
+}
+.syntaxhighlighter table {
+ width: 100% !important;
+}
+.syntaxhighlighter table caption {
+ text-align: left !important;
+ padding: .5em 0 0.5em 1em !important;
+}
+.syntaxhighlighter table td.code {
+ width: 100% !important;
+}
+.syntaxhighlighter table td.code .container {
+ position: relative !important;
+}
+.syntaxhighlighter table td.code .container textarea {
+ box-sizing: border-box !important;
+ position: absolute !important;
+ left: 0 !important;
+ top: 0 !important;
+ width: 100% !important;
+ height: 100% !important;
+ border: none !important;
+ background: white !important;
+ padding-left: 1em !important;
+ overflow: hidden !important;
+ white-space: pre !important;
+}
+.syntaxhighlighter table td.gutter .line {
+ text-align: right !important;
+ padding: 0 0.5em 0 1em !important;
+}
+.syntaxhighlighter table td.code .line {
+ padding: 0 1em !important;
+}
+.syntaxhighlighter.nogutter td.code .container textarea, .syntaxhighlighter.nogutter td.code .line {
+ padding-left: 0em !important;
+}
+.syntaxhighlighter.show {
+ display: block !important;
+}
+.syntaxhighlighter.collapsed table {
+ display: none !important;
+}
+.syntaxhighlighter.collapsed .toolbar {
+ padding: 0.1em 0.8em 0em 0.8em !important;
+ font-size: 1em !important;
+ position: static !important;
+ width: auto !important;
+ height: auto !important;
+}
+.syntaxhighlighter.collapsed .toolbar span {
+ display: inline !important;
+ margin-right: 1em !important;
+}
+.syntaxhighlighter.collapsed .toolbar span a {
+ padding: 0 !important;
+ display: none !important;
+}
+.syntaxhighlighter.collapsed .toolbar span a.expandSource {
+ display: inline !important;
+}
+.syntaxhighlighter .toolbar {
+ position: absolute !important;
+ right: 1px !important;
+ top: 1px !important;
+ width: 11px !important;
+ height: 11px !important;
+ font-size: 10px !important;
+ z-index: 10 !important;
+}
+.syntaxhighlighter .toolbar span.title {
+ display: inline !important;
+}
+.syntaxhighlighter .toolbar a {
+ display: block !important;
+ text-align: center !important;
+ text-decoration: none !important;
+ padding-top: 1px !important;
+}
+.syntaxhighlighter .toolbar a.expandSource {
+ display: none !important;
+}
+.syntaxhighlighter.ie {
+ font-size: .9em !important;
+ padding: 1px 0 1px 0 !important;
+}
+.syntaxhighlighter.ie .toolbar {
+ line-height: 8px !important;
+}
+.syntaxhighlighter.ie .toolbar a {
+ padding-top: 0px !important;
+}
+.syntaxhighlighter.printing .line.alt1 .content,
+.syntaxhighlighter.printing .line.alt2 .content,
+.syntaxhighlighter.printing .line.highlighted .number,
+.syntaxhighlighter.printing .line.highlighted.alt1 .content,
+.syntaxhighlighter.printing .line.highlighted.alt2 .content {
+ background: none !important;
+}
+.syntaxhighlighter.printing .line .number {
+ color: #bbbbbb !important;
+}
+.syntaxhighlighter.printing .line .content {
+ color: black !important;
+}
+.syntaxhighlighter.printing .toolbar {
+ display: none !important;
+}
+.syntaxhighlighter.printing a {
+ text-decoration: none !important;
+}
+.syntaxhighlighter.printing .plain, .syntaxhighlighter.printing .plain a {
+ color: black !important;
+}
+.syntaxhighlighter.printing .comments, .syntaxhighlighter.printing .comments a {
+ color: #008200 !important;
+}
+.syntaxhighlighter.printing .string, .syntaxhighlighter.printing .string a {
+ color: blue !important;
+}
+.syntaxhighlighter.printing .keyword {
+ color: #006699 !important;
+ font-weight: bold !important;
+}
+.syntaxhighlighter.printing .preprocessor {
+ color: gray !important;
+}
+.syntaxhighlighter.printing .variable {
+ color: #aa7700 !important;
+}
+.syntaxhighlighter.printing .value {
+ color: #009900 !important;
+}
+.syntaxhighlighter.printing .functions {
+ color: #ff1493 !important;
+}
+.syntaxhighlighter.printing .constants {
+ color: #0066cc !important;
+}
+.syntaxhighlighter.printing .script {
+ font-weight: bold !important;
+}
+.syntaxhighlighter.printing .color1, .syntaxhighlighter.printing .color1 a {
+ color: gray !important;
+}
+.syntaxhighlighter.printing .color2, .syntaxhighlighter.printing .color2 a {
+ color: #ff1493 !important;
+}
+.syntaxhighlighter.printing .color3, .syntaxhighlighter.printing .color3 a {
+ color: red !important;
+}
+.syntaxhighlighter.printing .break, .syntaxhighlighter.printing .break a {
+ color: black !important;
+}
+
+.syntaxhighlighter {
+ background-color: #0f192a !important;
+}
+.syntaxhighlighter .line.alt1 {
+ background-color: #0f192a !important;
+}
+.syntaxhighlighter .line.alt2 {
+ background-color: #0f192a !important;
+}
+.syntaxhighlighter .line.highlighted.alt1, .syntaxhighlighter .line.highlighted.alt2 {
+ background-color: #253e5a !important;
+}
+.syntaxhighlighter .line.highlighted.number {
+ color: #38566f !important;
+}
+.syntaxhighlighter table caption {
+ color: #d1edff !important;
+}
+.syntaxhighlighter .gutter {
+ color: #afafaf !important;
+}
+.syntaxhighlighter .gutter .line {
+ border-right: 3px solid #435a5f !important;
+}
+.syntaxhighlighter .gutter .line.highlighted {
+ background-color: #435a5f !important;
+ color: #0f192a !important;
+}
+.syntaxhighlighter.printing .line .content {
+ border: none !important;
+}
+.syntaxhighlighter.collapsed {
+ overflow: visible !important;
+}
+.syntaxhighlighter.collapsed .toolbar {
+ color: #428bdd !important;
+ background: black !important;
+ border: 1px solid #435a5f !important;
+}
+.syntaxhighlighter.collapsed .toolbar a {
+ color: #428bdd !important;
+}
+.syntaxhighlighter.collapsed .toolbar a:hover {
+ color: #1dc116 !important;
+}
+.syntaxhighlighter .toolbar {
+ color: #d1edff !important;
+ background: #435a5f !important;
+ border: none !important;
+}
+.syntaxhighlighter .toolbar a {
+ color: #d1edff !important;
+}
+.syntaxhighlighter .toolbar a:hover {
+ color: #8aa6c1 !important;
+}
+.syntaxhighlighter .plain, .syntaxhighlighter .plain a {
+ color: #d1edff !important;
+}
+.syntaxhighlighter .comments, .syntaxhighlighter .comments a {
+ color: #428bdd !important;
+}
+.syntaxhighlighter .string, .syntaxhighlighter .string a {
+ color: #1dc116 !important;
+}
+.syntaxhighlighter .keyword {
+ color: #b43d3d !important;
+}
+.syntaxhighlighter .preprocessor {
+ color: #8aa6c1 !important;
+}
+.syntaxhighlighter .variable {
+ color: #ffaa3e !important;
+}
+.syntaxhighlighter .value {
+ color: #f7e741 !important;
+}
+.syntaxhighlighter .functions {
+ color: #ffaa3e !important;
+}
+.syntaxhighlighter .constants {
+ color: #e0e8ff !important;
+}
+.syntaxhighlighter .script {
+ font-weight: bold !important;
+ color: #b43d3d !important;
+ background-color: none !important;
+}
+.syntaxhighlighter .color1, .syntaxhighlighter .color1 a {
+ color: #f8bb00 !important;
+}
+.syntaxhighlighter .color2, .syntaxhighlighter .color2 a {
+ color: white !important;
+}
+.syntaxhighlighter .color3, .syntaxhighlighter .color3 a {
+ color: #ffaa3e !important;
+}
diff --git a/apps/files_textviewer/css/syntaxhighlighter/shCoreRDark.css b/apps/files_textviewer/css/syntaxhighlighter/shCoreRDark.css
new file mode 100644
index 00000000000..d09368384da
--- /dev/null
+++ b/apps/files_textviewer/css/syntaxhighlighter/shCoreRDark.css
@@ -0,0 +1,324 @@
+/**
+ * SyntaxHighlighter
+ * http://alexgorbatchev.com/SyntaxHighlighter
+ *
+ * SyntaxHighlighter is donationware. If you are using it, please donate.
+ * http://alexgorbatchev.com/SyntaxHighlighter/donate.html
+ *
+ * @version
+ * 3.0.83 (July 02 2010)
+ *
+ * @copyright
+ * Copyright (C) 2004-2010 Alex Gorbatchev.
+ *
+ * @license
+ * Dual licensed under the MIT and GPL licenses.
+ */
+.syntaxhighlighter a,
+.syntaxhighlighter div,
+.syntaxhighlighter code,
+.syntaxhighlighter table,
+.syntaxhighlighter table td,
+.syntaxhighlighter table tr,
+.syntaxhighlighter table tbody,
+.syntaxhighlighter table thead,
+.syntaxhighlighter table caption,
+.syntaxhighlighter textarea {
+ -moz-border-radius: 0 0 0 0 !important;
+ -webkit-border-radius: 0 0 0 0 !important;
+ background: none !important;
+ border: 0 !important;
+ bottom: auto !important;
+ float: none !important;
+ height: auto !important;
+ left: auto !important;
+ line-height: 1.1em !important;
+ margin: 0 !important;
+ outline: 0 !important;
+ overflow: visible !important;
+ padding: 0 !important;
+ position: static !important;
+ right: auto !important;
+ text-align: left !important;
+ top: auto !important;
+ vertical-align: baseline !important;
+ width: auto !important;
+ box-sizing: content-box !important;
+ font-family: "Consolas", "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important;
+ font-weight: normal !important;
+ font-style: normal !important;
+ font-size: 1em !important;
+ min-height: inherit !important;
+ min-height: auto !important;
+}
+
+.syntaxhighlighter {
+ width: 100% !important;
+ margin: 1em 0 1em 0 !important;
+ position: relative !important;
+ overflow: auto !important;
+ font-size: 1em !important;
+}
+.syntaxhighlighter.source {
+ overflow: hidden !important;
+}
+.syntaxhighlighter .bold {
+ font-weight: bold !important;
+}
+.syntaxhighlighter .italic {
+ font-style: italic !important;
+}
+.syntaxhighlighter .line {
+ white-space: pre !important;
+}
+.syntaxhighlighter table {
+ width: 100% !important;
+}
+.syntaxhighlighter table caption {
+ text-align: left !important;
+ padding: .5em 0 0.5em 1em !important;
+}
+.syntaxhighlighter table td.code {
+ width: 100% !important;
+}
+.syntaxhighlighter table td.code .container {
+ position: relative !important;
+}
+.syntaxhighlighter table td.code .container textarea {
+ box-sizing: border-box !important;
+ position: absolute !important;
+ left: 0 !important;
+ top: 0 !important;
+ width: 100% !important;
+ height: 100% !important;
+ border: none !important;
+ background: white !important;
+ padding-left: 1em !important;
+ overflow: hidden !important;
+ white-space: pre !important;
+}
+.syntaxhighlighter table td.gutter .line {
+ text-align: right !important;
+ padding: 0 0.5em 0 1em !important;
+}
+.syntaxhighlighter table td.code .line {
+ padding: 0 1em !important;
+}
+.syntaxhighlighter.nogutter td.code .container textarea, .syntaxhighlighter.nogutter td.code .line {
+ padding-left: 0em !important;
+}
+.syntaxhighlighter.show {
+ display: block !important;
+}
+.syntaxhighlighter.collapsed table {
+ display: none !important;
+}
+.syntaxhighlighter.collapsed .toolbar {
+ padding: 0.1em 0.8em 0em 0.8em !important;
+ font-size: 1em !important;
+ position: static !important;
+ width: auto !important;
+ height: auto !important;
+}
+.syntaxhighlighter.collapsed .toolbar span {
+ display: inline !important;
+ margin-right: 1em !important;
+}
+.syntaxhighlighter.collapsed .toolbar span a {
+ padding: 0 !important;
+ display: none !important;
+}
+.syntaxhighlighter.collapsed .toolbar span a.expandSource {
+ display: inline !important;
+}
+.syntaxhighlighter .toolbar {
+ position: absolute !important;
+ right: 1px !important;
+ top: 1px !important;
+ width: 11px !important;
+ height: 11px !important;
+ font-size: 10px !important;
+ z-index: 10 !important;
+}
+.syntaxhighlighter .toolbar span.title {
+ display: inline !important;
+}
+.syntaxhighlighter .toolbar a {
+ display: block !important;
+ text-align: center !important;
+ text-decoration: none !important;
+ padding-top: 1px !important;
+}
+.syntaxhighlighter .toolbar a.expandSource {
+ display: none !important;
+}
+.syntaxhighlighter.ie {
+ font-size: .9em !important;
+ padding: 1px 0 1px 0 !important;
+}
+.syntaxhighlighter.ie .toolbar {
+ line-height: 8px !important;
+}
+.syntaxhighlighter.ie .toolbar a {
+ padding-top: 0px !important;
+}
+.syntaxhighlighter.printing .line.alt1 .content,
+.syntaxhighlighter.printing .line.alt2 .content,
+.syntaxhighlighter.printing .line.highlighted .number,
+.syntaxhighlighter.printing .line.highlighted.alt1 .content,
+.syntaxhighlighter.printing .line.highlighted.alt2 .content {
+ background: none !important;
+}
+.syntaxhighlighter.printing .line .number {
+ color: #bbbbbb !important;
+}
+.syntaxhighlighter.printing .line .content {
+ color: black !important;
+}
+.syntaxhighlighter.printing .toolbar {
+ display: none !important;
+}
+.syntaxhighlighter.printing a {
+ text-decoration: none !important;
+}
+.syntaxhighlighter.printing .plain, .syntaxhighlighter.printing .plain a {
+ color: black !important;
+}
+.syntaxhighlighter.printing .comments, .syntaxhighlighter.printing .comments a {
+ color: #008200 !important;
+}
+.syntaxhighlighter.printing .string, .syntaxhighlighter.printing .string a {
+ color: blue !important;
+}
+.syntaxhighlighter.printing .keyword {
+ color: #006699 !important;
+ font-weight: bold !important;
+}
+.syntaxhighlighter.printing .preprocessor {
+ color: gray !important;
+}
+.syntaxhighlighter.printing .variable {
+ color: #aa7700 !important;
+}
+.syntaxhighlighter.printing .value {
+ color: #009900 !important;
+}
+.syntaxhighlighter.printing .functions {
+ color: #ff1493 !important;
+}
+.syntaxhighlighter.printing .constants {
+ color: #0066cc !important;
+}
+.syntaxhighlighter.printing .script {
+ font-weight: bold !important;
+}
+.syntaxhighlighter.printing .color1, .syntaxhighlighter.printing .color1 a {
+ color: gray !important;
+}
+.syntaxhighlighter.printing .color2, .syntaxhighlighter.printing .color2 a {
+ color: #ff1493 !important;
+}
+.syntaxhighlighter.printing .color3, .syntaxhighlighter.printing .color3 a {
+ color: red !important;
+}
+.syntaxhighlighter.printing .break, .syntaxhighlighter.printing .break a {
+ color: black !important;
+}
+
+.syntaxhighlighter {
+ background-color: #1b2426 !important;
+}
+.syntaxhighlighter .line.alt1 {
+ background-color: #1b2426 !important;
+}
+.syntaxhighlighter .line.alt2 {
+ background-color: #1b2426 !important;
+}
+.syntaxhighlighter .line.highlighted.alt1, .syntaxhighlighter .line.highlighted.alt2 {
+ background-color: #323e41 !important;
+}
+.syntaxhighlighter .line.highlighted.number {
+ color: #b9bdb6 !important;
+}
+.syntaxhighlighter table caption {
+ color: #b9bdb6 !important;
+}
+.syntaxhighlighter .gutter {
+ color: #afafaf !important;
+}
+.syntaxhighlighter .gutter .line {
+ border-right: 3px solid #435a5f !important;
+}
+.syntaxhighlighter .gutter .line.highlighted {
+ background-color: #435a5f !important;
+ color: #1b2426 !important;
+}
+.syntaxhighlighter.printing .line .content {
+ border: none !important;
+}
+.syntaxhighlighter.collapsed {
+ overflow: visible !important;
+}
+.syntaxhighlighter.collapsed .toolbar {
+ color: #5ba1cf !important;
+ background: black !important;
+ border: 1px solid #435a5f !important;
+}
+.syntaxhighlighter.collapsed .toolbar a {
+ color: #5ba1cf !important;
+}
+.syntaxhighlighter.collapsed .toolbar a:hover {
+ color: #5ce638 !important;
+}
+.syntaxhighlighter .toolbar {
+ color: white !important;
+ background: #435a5f !important;
+ border: none !important;
+}
+.syntaxhighlighter .toolbar a {
+ color: white !important;
+}
+.syntaxhighlighter .toolbar a:hover {
+ color: #e0e8ff !important;
+}
+.syntaxhighlighter .plain, .syntaxhighlighter .plain a {
+ color: #b9bdb6 !important;
+}
+.syntaxhighlighter .comments, .syntaxhighlighter .comments a {
+ color: #878a85 !important;
+}
+.syntaxhighlighter .string, .syntaxhighlighter .string a {
+ color: #5ce638 !important;
+}
+.syntaxhighlighter .keyword {
+ color: #5ba1cf !important;
+}
+.syntaxhighlighter .preprocessor {
+ color: #435a5f !important;
+}
+.syntaxhighlighter .variable {
+ color: #ffaa3e !important;
+}
+.syntaxhighlighter .value {
+ color: #009900 !important;
+}
+.syntaxhighlighter .functions {
+ color: #ffaa3e !important;
+}
+.syntaxhighlighter .constants {
+ color: #e0e8ff !important;
+}
+.syntaxhighlighter .script {
+ font-weight: bold !important;
+ color: #5ba1cf !important;
+ background-color: none !important;
+}
+.syntaxhighlighter .color1, .syntaxhighlighter .color1 a {
+ color: #e0e8ff !important;
+}
+.syntaxhighlighter .color2, .syntaxhighlighter .color2 a {
+ color: white !important;
+}
+.syntaxhighlighter .color3, .syntaxhighlighter .color3 a {
+ color: #ffaa3e !important;
+}
diff --git a/apps/files_textviewer/css/syntaxhighlighter/shThemeDefault.css b/apps/files_textviewer/css/syntaxhighlighter/shThemeDefault.css
new file mode 100644
index 00000000000..136541172dc
--- /dev/null
+++ b/apps/files_textviewer/css/syntaxhighlighter/shThemeDefault.css
@@ -0,0 +1,117 @@
+/**
+ * SyntaxHighlighter
+ * http://alexgorbatchev.com/SyntaxHighlighter
+ *
+ * SyntaxHighlighter is donationware. If you are using it, please donate.
+ * http://alexgorbatchev.com/SyntaxHighlighter/donate.html
+ *
+ * @version
+ * 3.0.83 (July 02 2010)
+ *
+ * @copyright
+ * Copyright (C) 2004-2010 Alex Gorbatchev.
+ *
+ * @license
+ * Dual licensed under the MIT and GPL licenses.
+ */
+.syntaxhighlighter {
+ background-color: white !important;
+}
+.syntaxhighlighter .line.alt1 {
+ background-color: white !important;
+}
+.syntaxhighlighter .line.alt2 {
+ background-color: white !important;
+}
+.syntaxhighlighter .line.highlighted.alt1, .syntaxhighlighter .line.highlighted.alt2 {
+ background-color: #e0e0e0 !important;
+}
+.syntaxhighlighter .line.highlighted.number {
+ color: black !important;
+}
+.syntaxhighlighter table caption {
+ color: black !important;
+}
+.syntaxhighlighter .gutter {
+ color: #afafaf !important;
+}
+.syntaxhighlighter .gutter .line {
+ border-right: 3px solid #6ce26c !important;
+}
+.syntaxhighlighter .gutter .line.highlighted {
+ background-color: #6ce26c !important;
+ color: white !important;
+}
+.syntaxhighlighter.printing .line .content {
+ border: none !important;
+}
+.syntaxhighlighter.collapsed {
+ overflow: visible !important;
+}
+.syntaxhighlighter.collapsed .toolbar {
+ color: blue !important;
+ background: white !important;
+ border: 1px solid #6ce26c !important;
+}
+.syntaxhighlighter.collapsed .toolbar a {
+ color: blue !important;
+}
+.syntaxhighlighter.collapsed .toolbar a:hover {
+ color: red !important;
+}
+.syntaxhighlighter .toolbar {
+ color: white !important;
+ background: #6ce26c !important;
+ border: none !important;
+}
+.syntaxhighlighter .toolbar a {
+ color: white !important;
+}
+.syntaxhighlighter .toolbar a:hover {
+ color: black !important;
+}
+.syntaxhighlighter .plain, .syntaxhighlighter .plain a {
+ color: black !important;
+}
+.syntaxhighlighter .comments, .syntaxhighlighter .comments a {
+ color: #008200 !important;
+}
+.syntaxhighlighter .string, .syntaxhighlighter .string a {
+ color: blue !important;
+}
+.syntaxhighlighter .keyword {
+ color: #006699 !important;
+}
+.syntaxhighlighter .preprocessor {
+ color: gray !important;
+}
+.syntaxhighlighter .variable {
+ color: #aa7700 !important;
+}
+.syntaxhighlighter .value {
+ color: #009900 !important;
+}
+.syntaxhighlighter .functions {
+ color: #ff1493 !important;
+}
+.syntaxhighlighter .constants {
+ color: #0066cc !important;
+}
+.syntaxhighlighter .script {
+ font-weight: bold !important;
+ color: #006699 !important;
+ background-color: none !important;
+}
+.syntaxhighlighter .color1, .syntaxhighlighter .color1 a {
+ color: gray !important;
+}
+.syntaxhighlighter .color2, .syntaxhighlighter .color2 a {
+ color: #ff1493 !important;
+}
+.syntaxhighlighter .color3, .syntaxhighlighter .color3 a {
+ color: red !important;
+}
+
+.syntaxhighlighter .keyword {
+ font-weight: bold !important;
+}
diff --git a/apps/files_textviewer/css/syntaxhighlighter/shThemeDjango.css b/apps/files_textviewer/css/syntaxhighlighter/shThemeDjango.css
new file mode 100644
index 00000000000..d8b4313433d
--- /dev/null
+++ b/apps/files_textviewer/css/syntaxhighlighter/shThemeDjango.css
@@ -0,0 +1,120 @@
+/**
+ * SyntaxHighlighter
+ * http://alexgorbatchev.com/SyntaxHighlighter
+ *
+ * SyntaxHighlighter is donationware. If you are using it, please donate.
+ * http://alexgorbatchev.com/SyntaxHighlighter/donate.html
+ *
+ * @version
+ * 3.0.83 (July 02 2010)
+ *
+ * @copyright
+ * Copyright (C) 2004-2010 Alex Gorbatchev.
+ *
+ * @license
+ * Dual licensed under the MIT and GPL licenses.
+ */
+.syntaxhighlighter {
+ background-color: #0a2b1d !important;
+}
+.syntaxhighlighter .line.alt1 {
+ background-color: #0a2b1d !important;
+}
+.syntaxhighlighter .line.alt2 {
+ background-color: #0a2b1d !important;
+}
+.syntaxhighlighter .line.highlighted.alt1, .syntaxhighlighter .line.highlighted.alt2 {
+ background-color: #233729 !important;
+}
+.syntaxhighlighter .line.highlighted.number {
+ color: white !important;
+}
+.syntaxhighlighter table caption {
+ color: #f8f8f8 !important;
+}
+.syntaxhighlighter .gutter {
+ color: #497958 !important;
+}
+.syntaxhighlighter .gutter .line {
+ border-right: 3px solid #41a83e !important;
+}
+.syntaxhighlighter .gutter .line.highlighted {
+ background-color: #41a83e !important;
+ color: #0a2b1d !important;
+}
+.syntaxhighlighter.printing .line .content {
+ border: none !important;
+}
+.syntaxhighlighter.collapsed {
+ overflow: visible !important;
+}
+.syntaxhighlighter.collapsed .toolbar {
+ color: #96dd3b !important;
+ background: black !important;
+ border: 1px solid #41a83e !important;
+}
+.syntaxhighlighter.collapsed .toolbar a {
+ color: #96dd3b !important;
+}
+.syntaxhighlighter.collapsed .toolbar a:hover {
+ color: white !important;
+}
+.syntaxhighlighter .toolbar {
+ color: white !important;
+ background: #41a83e !important;
+ border: none !important;
+}
+.syntaxhighlighter .toolbar a {
+ color: white !important;
+}
+.syntaxhighlighter .toolbar a:hover {
+ color: #ffe862 !important;
+}
+.syntaxhighlighter .plain, .syntaxhighlighter .plain a {
+ color: #f8f8f8 !important;
+}
+.syntaxhighlighter .comments, .syntaxhighlighter .comments a {
+ color: #336442 !important;
+}
+.syntaxhighlighter .string, .syntaxhighlighter .string a {
+ color: #9df39f !important;
+}
+.syntaxhighlighter .keyword {
+ color: #96dd3b !important;
+}
+.syntaxhighlighter .preprocessor {
+ color: #91bb9e !important;
+}
+.syntaxhighlighter .variable {
+ color: #ffaa3e !important;
+}
+.syntaxhighlighter .value {
+ color: #f7e741 !important;
+}
+.syntaxhighlighter .functions {
+ color: #ffaa3e !important;
+}
+.syntaxhighlighter .constants {
+ color: #e0e8ff !important;
+}
+.syntaxhighlighter .script {
+ font-weight: bold !important;
+ color: #96dd3b !important;
+ background-color: none !important;
+}
+.syntaxhighlighter .color1, .syntaxhighlighter .color1 a {
+ color: #eb939a !important;
+}
+.syntaxhighlighter .color2, .syntaxhighlighter .color2 a {
+ color: #91bb9e !important;
+}
+.syntaxhighlighter .color3, .syntaxhighlighter .color3 a {
+ color: #edef7d !important;
+}
+
+.syntaxhighlighter .comments {
+ font-style: italic !important;
+}
+.syntaxhighlighter .keyword {
+ font-weight: bold !important;
+}
diff --git a/apps/files_textviewer/css/syntaxhighlighter/shThemeEclipse.css b/apps/files_textviewer/css/syntaxhighlighter/shThemeEclipse.css
new file mode 100644
index 00000000000..77377d95334
--- /dev/null
+++ b/apps/files_textviewer/css/syntaxhighlighter/shThemeEclipse.css
@@ -0,0 +1,128 @@
+/**
+ * SyntaxHighlighter
+ * http://alexgorbatchev.com/SyntaxHighlighter
+ *
+ * SyntaxHighlighter is donationware. If you are using it, please donate.
+ * http://alexgorbatchev.com/SyntaxHighlighter/donate.html
+ *
+ * @version
+ * 3.0.83 (July 02 2010)
+ *
+ * @copyright
+ * Copyright (C) 2004-2010 Alex Gorbatchev.
+ *
+ * @license
+ * Dual licensed under the MIT and GPL licenses.
+ */
+.syntaxhighlighter {
+ background-color: white !important;
+}
+.syntaxhighlighter .line.alt1 {
+ background-color: white !important;
+}
+.syntaxhighlighter .line.alt2 {
+ background-color: white !important;
+}
+.syntaxhighlighter .line.highlighted.alt1, .syntaxhighlighter .line.highlighted.alt2 {
+ background-color: #c3defe !important;
+}
+.syntaxhighlighter .line.highlighted.number {
+ color: white !important;
+}
+.syntaxhighlighter table caption {
+ color: black !important;
+}
+.syntaxhighlighter .gutter {
+ color: #787878 !important;
+}
+.syntaxhighlighter .gutter .line {
+ border-right: 3px solid #d4d0c8 !important;
+}
+.syntaxhighlighter .gutter .line.highlighted {
+ background-color: #d4d0c8 !important;
+ color: white !important;
+}
+.syntaxhighlighter.printing .line .content {
+ border: none !important;
+}
+.syntaxhighlighter.collapsed {
+ overflow: visible !important;
+}
+.syntaxhighlighter.collapsed .toolbar {
+ color: #3f5fbf !important;
+ background: white !important;
+ border: 1px solid #d4d0c8 !important;
+}
+.syntaxhighlighter.collapsed .toolbar a {
+ color: #3f5fbf !important;
+}
+.syntaxhighlighter.collapsed .toolbar a:hover {
+ color: #aa7700 !important;
+}
+.syntaxhighlighter .toolbar {
+ color: #a0a0a0 !important;
+ background: #d4d0c8 !important;
+ border: none !important;
+}
+.syntaxhighlighter .toolbar a {
+ color: #a0a0a0 !important;
+}
+.syntaxhighlighter .toolbar a:hover {
+ color: red !important;
+}
+.syntaxhighlighter .plain, .syntaxhighlighter .plain a {
+ color: black !important;
+}
+.syntaxhighlighter .comments, .syntaxhighlighter .comments a {
+ color: #3f5fbf !important;
+}
+.syntaxhighlighter .string, .syntaxhighlighter .string a {
+ color: #2a00ff !important;
+}
+.syntaxhighlighter .keyword {
+ color: #7f0055 !important;
+}
+.syntaxhighlighter .preprocessor {
+ color: #646464 !important;
+}
+.syntaxhighlighter .variable {
+ color: #aa7700 !important;
+}
+.syntaxhighlighter .value {
+ color: #009900 !important;
+}
+.syntaxhighlighter .functions {
+ color: #ff1493 !important;
+}
+.syntaxhighlighter .constants {
+ color: #0066cc !important;
+}
+.syntaxhighlighter .script {
+ font-weight: bold !important;
+ color: #7f0055 !important;
+ background-color: none !important;
+}
+.syntaxhighlighter .color1, .syntaxhighlighter .color1 a {
+ color: gray !important;
+}
+.syntaxhighlighter .color2, .syntaxhighlighter .color2 a {
+ color: #ff1493 !important;
+}
+.syntaxhighlighter .color3, .syntaxhighlighter .color3 a {
+ color: red !important;
+}
+
+.syntaxhighlighter .keyword {
+ font-weight: bold !important;
+}
+.syntaxhighlighter .xml .keyword {
+ color: #3f7f7f !important;
+ font-weight: normal !important;
+}
+.syntaxhighlighter .xml .color1, .syntaxhighlighter .xml .color1 a {
+ color: #7f007f !important;
+}
+.syntaxhighlighter .xml .string {
+ font-style: italic !important;
+ color: #2a00ff !important;
+}
diff --git a/apps/files_textviewer/css/syntaxhighlighter/shThemeEmacs.css b/apps/files_textviewer/css/syntaxhighlighter/shThemeEmacs.css
new file mode 100644
index 00000000000..dae5053fea8
--- /dev/null
+++ b/apps/files_textviewer/css/syntaxhighlighter/shThemeEmacs.css
@@ -0,0 +1,113 @@
+/**
+ * SyntaxHighlighter
+ * http://alexgorbatchev.com/SyntaxHighlighter
+ *
+ * SyntaxHighlighter is donationware. If you are using it, please donate.
+ * http://alexgorbatchev.com/SyntaxHighlighter/donate.html
+ *
+ * @version
+ * 3.0.83 (July 02 2010)
+ *
+ * @copyright
+ * Copyright (C) 2004-2010 Alex Gorbatchev.
+ *
+ * @license
+ * Dual licensed under the MIT and GPL licenses.
+ */
+.syntaxhighlighter {
+ background-color: black !important;
+}
+.syntaxhighlighter .line.alt1 {
+ background-color: black !important;
+}
+.syntaxhighlighter .line.alt2 {
+ background-color: black !important;
+}
+.syntaxhighlighter .line.highlighted.alt1, .syntaxhighlighter .line.highlighted.alt2 {
+ background-color: #2a3133 !important;
+}
+.syntaxhighlighter .line.highlighted.number {
+ color: white !important;
+}
+.syntaxhighlighter table caption {
+ color: #d3d3d3 !important;
+}
+.syntaxhighlighter .gutter {
+ color: #d3d3d3 !important;
+}
+.syntaxhighlighter .gutter .line {
+ border-right: 3px solid #990000 !important;
+}
+.syntaxhighlighter .gutter .line.highlighted {
+ background-color: #990000 !important;
+ color: black !important;
+}
+.syntaxhighlighter.printing .line .content {
+ border: none !important;
+}
+.syntaxhighlighter.collapsed {
+ overflow: visible !important;
+}
+.syntaxhighlighter.collapsed .toolbar {
+ color: #ebdb8d !important;
+ background: black !important;
+ border: 1px solid #990000 !important;
+}
+.syntaxhighlighter.collapsed .toolbar a {
+ color: #ebdb8d !important;
+}
+.syntaxhighlighter.collapsed .toolbar a:hover {
+ color: #ff7d27 !important;
+}
+.syntaxhighlighter .toolbar {
+ color: white !important;
+ background: #990000 !important;
+ border: none !important;
+}
+.syntaxhighlighter .toolbar a {
+ color: white !important;
+}
+.syntaxhighlighter .toolbar a:hover {
+ color: #9ccff4 !important;
+}
+.syntaxhighlighter .plain, .syntaxhighlighter .plain a {
+ color: #d3d3d3 !important;
+}
+.syntaxhighlighter .comments, .syntaxhighlighter .comments a {
+ color: #ff7d27 !important;
+}
+.syntaxhighlighter .string, .syntaxhighlighter .string a {
+ color: #ff9e7b !important;
+}
+.syntaxhighlighter .keyword {
+ color: aqua !important;
+}
+.syntaxhighlighter .preprocessor {
+ color: #aec4de !important;
+}
+.syntaxhighlighter .variable {
+ color: #ffaa3e !important;
+}
+.syntaxhighlighter .value {
+ color: #009900 !important;
+}
+.syntaxhighlighter .functions {
+ color: #81cef9 !important;
+}
+.syntaxhighlighter .constants {
+ color: #ff9e7b !important;
+}
+.syntaxhighlighter .script {
+ font-weight: bold !important;
+ color: aqua !important;
+ background-color: none !important;
+}
+.syntaxhighlighter .color1, .syntaxhighlighter .color1 a {
+ color: #ebdb8d !important;
+}
+.syntaxhighlighter .color2, .syntaxhighlighter .color2 a {
+ color: #ff7d27 !important;
+}
+.syntaxhighlighter .color3, .syntaxhighlighter .color3 a {
+ color: #aec4de !important;
+}
diff --git a/apps/files_textviewer/css/syntaxhighlighter/shThemeFadeToGrey.css b/apps/files_textviewer/css/syntaxhighlighter/shThemeFadeToGrey.css
new file mode 100644
index 00000000000..8fbd871fb5b
--- /dev/null
+++ b/apps/files_textviewer/css/syntaxhighlighter/shThemeFadeToGrey.css
@@ -0,0 +1,117 @@
+/**
+ * SyntaxHighlighter
+ * http://alexgorbatchev.com/SyntaxHighlighter
+ *
+ * SyntaxHighlighter is donationware. If you are using it, please donate.
+ * http://alexgorbatchev.com/SyntaxHighlighter/donate.html
+ *
+ * @version
+ * 3.0.83 (July 02 2010)
+ *
+ * @copyright
+ * Copyright (C) 2004-2010 Alex Gorbatchev.
+ *
+ * @license
+ * Dual licensed under the MIT and GPL licenses.
+ */
+.syntaxhighlighter {
+ background-color: #121212 !important;
+}
+.syntaxhighlighter .line.alt1 {
+ background-color: #121212 !important;
+}
+.syntaxhighlighter .line.alt2 {
+ background-color: #121212 !important;
+}
+.syntaxhighlighter .line.highlighted.alt1, .syntaxhighlighter .line.highlighted.alt2 {
+ background-color: #2c2c29 !important;
+}
+.syntaxhighlighter .line.highlighted.number {
+ color: white !important;
+}
+.syntaxhighlighter table caption {
+ color: white !important;
+}
+.syntaxhighlighter .gutter {
+ color: #afafaf !important;
+}
+.syntaxhighlighter .gutter .line {
+ border-right: 3px solid #3185b9 !important;
+}
+.syntaxhighlighter .gutter .line.highlighted {
+ background-color: #3185b9 !important;
+ color: #121212 !important;
+}
+.syntaxhighlighter.printing .line .content {
+ border: none !important;
+}
+.syntaxhighlighter.collapsed {
+ overflow: visible !important;
+}
+.syntaxhighlighter.collapsed .toolbar {
+ color: #3185b9 !important;
+ background: black !important;
+ border: 1px solid #3185b9 !important;
+}
+.syntaxhighlighter.collapsed .toolbar a {
+ color: #3185b9 !important;
+}
+.syntaxhighlighter.collapsed .toolbar a:hover {
+ color: #d01d33 !important;
+}
+.syntaxhighlighter .toolbar {
+ color: white !important;
+ background: #3185b9 !important;
+ border: none !important;
+}
+.syntaxhighlighter .toolbar a {
+ color: white !important;
+}
+.syntaxhighlighter .toolbar a:hover {
+ color: #96daff !important;
+}
+.syntaxhighlighter .plain, .syntaxhighlighter .plain a {
+ color: white !important;
+}
+.syntaxhighlighter .comments, .syntaxhighlighter .comments a {
+ color: #696854 !important;
+}
+.syntaxhighlighter .string, .syntaxhighlighter .string a {
+ color: #e3e658 !important;
+}
+.syntaxhighlighter .keyword {
+ color: #d01d33 !important;
+}
+.syntaxhighlighter .preprocessor {
+ color: #435a5f !important;
+}
+.syntaxhighlighter .variable {
+ color: #898989 !important;
+}
+.syntaxhighlighter .value {
+ color: #009900 !important;
+}
+.syntaxhighlighter .functions {
+ color: #aaaaaa !important;
+}
+.syntaxhighlighter .constants {
+ color: #96daff !important;
+}
+.syntaxhighlighter .script {
+ font-weight: bold !important;
+ color: #d01d33 !important;
+ background-color: none !important;
+}
+.syntaxhighlighter .color1, .syntaxhighlighter .color1 a {
+ color: #ffc074 !important;
+}
+.syntaxhighlighter .color2, .syntaxhighlighter .color2 a {
+ color: #4a8cdb !important;
+}
+.syntaxhighlighter .color3, .syntaxhighlighter .color3 a {
+ color: #96daff !important;
+}
+
+.syntaxhighlighter .functions {
+ font-weight: bold !important;
+}
diff --git a/apps/files_textviewer/css/syntaxhighlighter/shThemeMDUltra.css b/apps/files_textviewer/css/syntaxhighlighter/shThemeMDUltra.css
new file mode 100644
index 00000000000..f4db39cd839
--- /dev/null
+++ b/apps/files_textviewer/css/syntaxhighlighter/shThemeMDUltra.css
@@ -0,0 +1,113 @@
+/**
+ * SyntaxHighlighter
+ * http://alexgorbatchev.com/SyntaxHighlighter
+ *
+ * SyntaxHighlighter is donationware. If you are using it, please donate.
+ * http://alexgorbatchev.com/SyntaxHighlighter/donate.html
+ *
+ * @version
+ * 3.0.83 (July 02 2010)
+ *
+ * @copyright
+ * Copyright (C) 2004-2010 Alex Gorbatchev.
+ *
+ * @license
+ * Dual licensed under the MIT and GPL licenses.
+ */
+.syntaxhighlighter {
+ background-color: #222222 !important;
+}
+.syntaxhighlighter .line.alt1 {
+ background-color: #222222 !important;
+}
+.syntaxhighlighter .line.alt2 {
+ background-color: #222222 !important;
+}
+.syntaxhighlighter .line.highlighted.alt1, .syntaxhighlighter .line.highlighted.alt2 {
+ background-color: #253e5a !important;
+}
+.syntaxhighlighter .line.highlighted.number {
+ color: white !important;
+}
+.syntaxhighlighter table caption {
+ color: lime !important;
+}
+.syntaxhighlighter .gutter {
+ color: #38566f !important;
+}
+.syntaxhighlighter .gutter .line {
+ border-right: 3px solid #435a5f !important;
+}
+.syntaxhighlighter .gutter .line.highlighted {
+ background-color: #435a5f !important;
+ color: #222222 !important;
+}
+.syntaxhighlighter.printing .line .content {
+ border: none !important;
+}
+.syntaxhighlighter.collapsed {
+ overflow: visible !important;
+}
+.syntaxhighlighter.collapsed .toolbar {
+ color: #428bdd !important;
+ background: black !important;
+ border: 1px solid #435a5f !important;
+}
+.syntaxhighlighter.collapsed .toolbar a {
+ color: #428bdd !important;
+}
+.syntaxhighlighter.collapsed .toolbar a:hover {
+ color: lime !important;
+}
+.syntaxhighlighter .toolbar {
+ color: #aaaaff !important;
+ background: #435a5f !important;
+ border: none !important;
+}
+.syntaxhighlighter .toolbar a {
+ color: #aaaaff !important;
+}
+.syntaxhighlighter .toolbar a:hover {
+ color: #9ccff4 !important;
+}
+.syntaxhighlighter .plain, .syntaxhighlighter .plain a {
+ color: lime !important;
+}
+.syntaxhighlighter .comments, .syntaxhighlighter .comments a {
+ color: #428bdd !important;
+}
+.syntaxhighlighter .string, .syntaxhighlighter .string a {
+ color: lime !important;
+}
+.syntaxhighlighter .keyword {
+ color: #aaaaff !important;
+}
+.syntaxhighlighter .preprocessor {
+ color: #8aa6c1 !important;
+}
+.syntaxhighlighter .variable {
+ color: aqua !important;
+}
+.syntaxhighlighter .value {
+ color: #f7e741 !important;
+}
+.syntaxhighlighter .functions {
+ color: #ff8000 !important;
+}
+.syntaxhighlighter .constants {
+ color: yellow !important;
+}
+.syntaxhighlighter .script {
+ font-weight: bold !important;
+ color: #aaaaff !important;
+ background-color: none !important;
+}
+.syntaxhighlighter .color1, .syntaxhighlighter .color1 a {
+ color: red !important;
+}
+.syntaxhighlighter .color2, .syntaxhighlighter .color2 a {
+ color: yellow !important;
+}
+.syntaxhighlighter .color3, .syntaxhighlighter .color3 a {
+ color: #ffaa3e !important;
+}
diff --git a/apps/files_textviewer/css/syntaxhighlighter/shThemeMidnight.css b/apps/files_textviewer/css/syntaxhighlighter/shThemeMidnight.css
new file mode 100644
index 00000000000..c49563cc9db
--- /dev/null
+++ b/apps/files_textviewer/css/syntaxhighlighter/shThemeMidnight.css
@@ -0,0 +1,113 @@
+/**
+ * SyntaxHighlighter
+ * http://alexgorbatchev.com/SyntaxHighlighter
+ *
+ * SyntaxHighlighter is donationware. If you are using it, please donate.
+ * http://alexgorbatchev.com/SyntaxHighlighter/donate.html
+ *
+ * @version
+ * 3.0.83 (July 02 2010)
+ *
+ * @copyright
+ * Copyright (C) 2004-2010 Alex Gorbatchev.
+ *
+ * @license
+ * Dual licensed under the MIT and GPL licenses.
+ */
+.syntaxhighlighter {
+ background-color: #0f192a !important;
+}
+.syntaxhighlighter .line.alt1 {
+ background-color: #0f192a !important;
+}
+.syntaxhighlighter .line.alt2 {
+ background-color: #0f192a !important;
+}
+.syntaxhighlighter .line.highlighted.alt1, .syntaxhighlighter .line.highlighted.alt2 {
+ background-color: #253e5a !important;
+}
+.syntaxhighlighter .line.highlighted.number {
+ color: #38566f !important;
+}
+.syntaxhighlighter table caption {
+ color: #d1edff !important;
+}
+.syntaxhighlighter .gutter {
+ color: #afafaf !important;
+}
+.syntaxhighlighter .gutter .line {
+ border-right: 3px solid #435a5f !important;
+}
+.syntaxhighlighter .gutter .line.highlighted {
+ background-color: #435a5f !important;
+ color: #0f192a !important;
+}
+.syntaxhighlighter.printing .line .content {
+ border: none !important;
+}
+.syntaxhighlighter.collapsed {
+ overflow: visible !important;
+}
+.syntaxhighlighter.collapsed .toolbar {
+ color: #428bdd !important;
+ background: black !important;
+ border: 1px solid #435a5f !important;
+}
+.syntaxhighlighter.collapsed .toolbar a {
+ color: #428bdd !important;
+}
+.syntaxhighlighter.collapsed .toolbar a:hover {
+ color: #1dc116 !important;
+}
+.syntaxhighlighter .toolbar {
+ color: #d1edff !important;
+ background: #435a5f !important;
+ border: none !important;
+}
+.syntaxhighlighter .toolbar a {
+ color: #d1edff !important;
+}
+.syntaxhighlighter .toolbar a:hover {
+ color: #8aa6c1 !important;
+}
+.syntaxhighlighter .plain, .syntaxhighlighter .plain a {
+ color: #d1edff !important;
+}
+.syntaxhighlighter .comments, .syntaxhighlighter .comments a {
+ color: #428bdd !important;
+}
+.syntaxhighlighter .string, .syntaxhighlighter .string a {
+ color: #1dc116 !important;
+}
+.syntaxhighlighter .keyword {
+ color: #b43d3d !important;
+}
+.syntaxhighlighter .preprocessor {
+ color: #8aa6c1 !important;
+}
+.syntaxhighlighter .variable {
+ color: #ffaa3e !important;
+}
+.syntaxhighlighter .value {
+ color: #f7e741 !important;
+}
+.syntaxhighlighter .functions {
+ color: #ffaa3e !important;
+}
+.syntaxhighlighter .constants {
+ color: #e0e8ff !important;
+}
+.syntaxhighlighter .script {
+ font-weight: bold !important;
+ color: #b43d3d !important;
+ background-color: none !important;
+}
+.syntaxhighlighter .color1, .syntaxhighlighter .color1 a {
+ color: #f8bb00 !important;
+}
+.syntaxhighlighter .color2, .syntaxhighlighter .color2 a {
+ color: white !important;
+}
+.syntaxhighlighter .color3, .syntaxhighlighter .color3 a {
+ color: #ffaa3e !important;
+}
diff --git a/apps/files_textviewer/css/syntaxhighlighter/shThemeRDark.css b/apps/files_textviewer/css/syntaxhighlighter/shThemeRDark.css
new file mode 100644
index 00000000000..6305a10e4eb
--- /dev/null
+++ b/apps/files_textviewer/css/syntaxhighlighter/shThemeRDark.css
@@ -0,0 +1,113 @@
+/**
+ * SyntaxHighlighter
+ * http://alexgorbatchev.com/SyntaxHighlighter
+ *
+ * SyntaxHighlighter is donationware. If you are using it, please donate.
+ * http://alexgorbatchev.com/SyntaxHighlighter/donate.html
+ *
+ * @version
+ * 3.0.83 (July 02 2010)
+ *
+ * @copyright
+ * Copyright (C) 2004-2010 Alex Gorbatchev.
+ *
+ * @license
+ * Dual licensed under the MIT and GPL licenses.
+ */
+.syntaxhighlighter {
+ background-color: #1b2426 !important;
+}
+.syntaxhighlighter .line.alt1 {
+ background-color: #1b2426 !important;
+}
+.syntaxhighlighter .line.alt2 {
+ background-color: #1b2426 !important;
+}
+.syntaxhighlighter .line.highlighted.alt1, .syntaxhighlighter .line.highlighted.alt2 {
+ background-color: #323e41 !important;
+}
+.syntaxhighlighter .line.highlighted.number {
+ color: #b9bdb6 !important;
+}
+.syntaxhighlighter table caption {
+ color: #b9bdb6 !important;
+}
+.syntaxhighlighter .gutter {
+ color: #afafaf !important;
+}
+.syntaxhighlighter .gutter .line {
+ border-right: 3px solid #435a5f !important;
+}
+.syntaxhighlighter .gutter .line.highlighted {
+ background-color: #435a5f !important;
+ color: #1b2426 !important;
+}
+.syntaxhighlighter.printing .line .content {
+ border: none !important;
+}
+.syntaxhighlighter.collapsed {
+ overflow: visible !important;
+}
+.syntaxhighlighter.collapsed .toolbar {
+ color: #5ba1cf !important;
+ background: black !important;
+ border: 1px solid #435a5f !important;
+}
+.syntaxhighlighter.collapsed .toolbar a {
+ color: #5ba1cf !important;
+}
+.syntaxhighlighter.collapsed .toolbar a:hover {
+ color: #5ce638 !important;
+}
+.syntaxhighlighter .toolbar {
+ color: white !important;
+ background: #435a5f !important;
+ border: none !important;
+}
+.syntaxhighlighter .toolbar a {
+ color: white !important;
+}
+.syntaxhighlighter .toolbar a:hover {
+ color: #e0e8ff !important;
+}
+.syntaxhighlighter .plain, .syntaxhighlighter .plain a {
+ color: #b9bdb6 !important;
+}
+.syntaxhighlighter .comments, .syntaxhighlighter .comments a {
+ color: #878a85 !important;
+}
+.syntaxhighlighter .string, .syntaxhighlighter .string a {
+ color: #5ce638 !important;
+}
+.syntaxhighlighter .keyword {
+ color: #5ba1cf !important;
+}
+.syntaxhighlighter .preprocessor {
+ color: #435a5f !important;
+}
+.syntaxhighlighter .variable {
+ color: #ffaa3e !important;
+}
+.syntaxhighlighter .value {
+ color: #009900 !important;
+}
+.syntaxhighlighter .functions {
+ color: #ffaa3e !important;
+}
+.syntaxhighlighter .constants {
+ color: #e0e8ff !important;
+}
+.syntaxhighlighter .script {
+ font-weight: bold !important;
+ color: #5ba1cf !important;
+ background-color: none !important;
+}
+.syntaxhighlighter .color1, .syntaxhighlighter .color1 a {
+ color: #e0e8ff !important;
+}
+.syntaxhighlighter .color2, .syntaxhighlighter .color2 a {
+ color: white !important;
+}
+.syntaxhighlighter .color3, .syntaxhighlighter .color3 a {
+ color: #ffaa3e !important;
+}
diff --git a/apps/files_textviewer/js/syntaxhighlighter/LGPL-LICENSE b/apps/files_textviewer/js/syntaxhighlighter/LGPL-LICENSE
new file mode 100644
index 00000000000..3f9959fc566
--- /dev/null
+++ b/apps/files_textviewer/js/syntaxhighlighter/LGPL-LICENSE
@@ -0,0 +1,165 @@
+ GNU LESSER GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+
+ This version of the GNU Lesser General Public License incorporates
+the terms and conditions of version 3 of the GNU General Public
+License, supplemented by the additional permissions listed below.
+
+ 0. Additional Definitions.
+
+ As used herein, "this License" refers to version 3 of the GNU Lesser
+General Public License, and the "GNU GPL" refers to version 3 of the GNU
+General Public License.
+
+ "The Library" refers to a covered work governed by this License,
+other than an Application or a Combined Work as defined below.
+
+ An "Application" is any work that makes use of an interface provided
+by the Library, but which is not otherwise based on the Library.
+Defining a subclass of a class defined by the Library is deemed a mode
+of using an interface provided by the Library.
+
+ A "Combined Work" is a work produced by combining or linking an
+Application with the Library. The particular version of the Library
+with which the Combined Work was made is also called the "Linked
+Version".
+
+ The "Minimal Corresponding Source" for a Combined Work means the
+Corresponding Source for the Combined Work, excluding any source code
+for portions of the Combined Work that, considered in isolation, are
+based on the Application, and not on the Linked Version.
+
+ The "Corresponding Application Code" for a Combined Work means the
+object code and/or source code for the Application, including any data
+and utility programs needed for reproducing the Combined Work from the
+Application, but excluding the System Libraries of the Combined Work.
+
+ 1. Exception to Section 3 of the GNU GPL.
+
+ You may convey a covered work under sections 3 and 4 of this License
+without being bound by section 3 of the GNU GPL.
+
+ 2. Conveying Modified Versions.
+
+ If you modify a copy of the Library, and, in your modifications, a
+facility refers to a function or data to be supplied by an Application
+that uses the facility (other than as an argument passed when the
+facility is invoked), then you may convey a copy of the modified
+version:
+
+ a) under this License, provided that you make a good faith effort to
+ ensure that, in the event an Application does not supply the
+ function or data, the facility still operates, and performs
+ whatever part of its purpose remains meaningful, or
+
+ b) under the GNU GPL, with none of the additional permissions of
+ this License applicable to that copy.
+
+ 3. Object Code Incorporating Material from Library Header Files.
+
+ The object code form of an Application may incorporate material from
+a header file that is part of the Library. You may convey such object
+code under terms of your choice, provided that, if the incorporated
+material is not limited to numerical parameters, data structure
+layouts and accessors, or small macros, inline functions and templates
+(ten or fewer lines in length), you do both of the following:
+
+ a) Give prominent notice with each copy of the object code that the
+ Library is used in it and that the Library and its use are
+ covered by this License.
+
+ b) Accompany the object code with a copy of the GNU GPL and this license
+ document.
+
+ 4. Combined Works.
+
+ You may convey a Combined Work under terms of your choice that,
+taken together, effectively do not restrict modification of the
+portions of the Library contained in the Combined Work and reverse
+engineering for debugging such modifications, if you also do each of
+the following:
+
+ a) Give prominent notice with each copy of the Combined Work that
+ the Library is used in it and that the Library and its use are
+ covered by this License.
+
+ b) Accompany the Combined Work with a copy of the GNU GPL and this license
+ document.
+
+ c) For a Combined Work that displays copyright notices during
+ execution, include the copyright notice for the Library among
+ these notices, as well as a reference directing the user to the
+ copies of the GNU GPL and this license document.
+
+ d) Do one of the following:
+
+ 0) Convey the Minimal Corresponding Source under the terms of this
+ License, and the Corresponding Application Code in a form
+ suitable for, and under terms that permit, the user to
+ recombine or relink the Application with a modified version of
+ the Linked Version to produce a modified Combined Work, in the
+ manner specified by section 6 of the GNU GPL for conveying
+ Corresponding Source.
+
+ 1) Use a suitable shared library mechanism for linking with the
+ Library. A suitable mechanism is one that (a) uses at run time
+ a copy of the Library already present on the user's computer
+ system, and (b) will operate properly with a modified version
+ of the Library that is interface-compatible with the Linked
+ Version.
+
+ e) Provide Installation Information, but only if you would otherwise
+ be required to provide such information under section 6 of the
+ GNU GPL, and only to the extent that such information is
+ necessary to install and execute a modified version of the
+ Combined Work produced by recombining or relinking the
+ Application with a modified version of the Linked Version. (If
+ you use option 4d0, the Installation Information must accompany
+ the Minimal Corresponding Source and Corresponding Application
+ Code. If you use option 4d1, you must provide the Installation
+ Information in the manner specified by section 6 of the GNU GPL
+ for conveying Corresponding Source.)
+
+ 5. Combined Libraries.
+
+ You may place library facilities that are a work based on the
+Library side by side in a single library together with other library
+facilities that are not Applications and are not covered by this
+License, and convey such a combined library under terms of your
+choice, if you do both of the following:
+
+ a) Accompany the combined library with a copy of the same work based
+ on the Library, uncombined with any other library facilities,
+ conveyed under the terms of this License.
+
+ b) Give prominent notice with the combined library that part of it
+ is a work based on the Library, and explaining where to find the
+ accompanying uncombined form of the same work.
+
+ 6. Revised Versions of the GNU Lesser General Public License.
+
+ The Free Software Foundation may publish revised and/or new versions
+of the GNU Lesser General Public License from time to time. Such new
+versions will be similar in spirit to the present version, but may
+differ in detail to address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Library as you received it specifies that a certain numbered version
+of the GNU Lesser General Public License "or any later version"
+applies to it, you have the option of following the terms and
+conditions either of that published version or of any later version
+published by the Free Software Foundation. If the Library as you
+received it does not specify a version number of the GNU Lesser
+General Public License, you may choose any version of the GNU Lesser
+General Public License ever published by the Free Software Foundation.
+
+ If the Library as you received it specifies that a proxy can decide
+whether future versions of the GNU Lesser General Public License shall
+apply, that proxy's public statement of acceptance of any version is
+permanent authorization for you to choose that version for the
+Library. \ No newline at end of file
diff --git a/apps/files_textviewer/js/syntaxhighlighter/MIT-LICENSE b/apps/files_textviewer/js/syntaxhighlighter/MIT-LICENSE
new file mode 100644
index 00000000000..e7c70ba14a4
--- /dev/null
+++ b/apps/files_textviewer/js/syntaxhighlighter/MIT-LICENSE
@@ -0,0 +1,20 @@
+Copyright (c) 2003, 2004 Jim Weirich
+
+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.
diff --git a/apps/files_textviewer/js/syntaxhighlighter/shAutoloader.js b/apps/files_textviewer/js/syntaxhighlighter/shAutoloader.js
new file mode 100644
index 00000000000..4e29bddecbb
--- /dev/null
+++ b/apps/files_textviewer/js/syntaxhighlighter/shAutoloader.js
@@ -0,0 +1,17 @@
+/**
+ * SyntaxHighlighter
+ * http://alexgorbatchev.com/SyntaxHighlighter
+ *
+ * SyntaxHighlighter is donationware. If you are using it, please donate.
+ * http://alexgorbatchev.com/SyntaxHighlighter/donate.html
+ *
+ * @version
+ * 3.0.83 (July 02 2010)
+ *
+ * @copyright
+ * Copyright (C) 2004-2010 Alex Gorbatchev.
+ *
+ * @license
+ * Dual licensed under the MIT and GPL licenses.
+ */
+eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('(2(){1 h=5;h.I=2(){2 n(c,a){4(1 d=0;d<c.9;d++)i[c[d]]=a}2 o(c){1 a=r.H("J"),d=3;a.K=c;a.M="L/t";a.G="t";a.u=a.v=2(){6(!d&&(!8.7||8.7=="F"||8.7=="z")){d=q;e[c]=q;a:{4(1 p y e)6(e[p]==3)B a;j&&5.C(k)}a.u=a.v=x;a.D.O(a)}};r.N.R(a)}1 f=Q,l=h.P(),i={},e={},j=3,k=x,b;5.T=2(c){k=c;j=q};4(b=0;b<f.9;b++){1 m=f[b].w?f[b]:f[b].S(/\\s+/),g=m.w();n(m,g)}4(b=0;b<l.9;b++)6(g=i[l[b].E.A]){e[g]=3;o(g)}}})();',56,56,'|var|function|false|for|SyntaxHighlighter|if|readyState|this|length|||||||||||||||||true|document||javascript|onload|onreadystatechange|pop|null|in|complete|brush|break|highlight|parentNode|params|loaded|language|createElement|autoloader|script|src|text|type|body|removeChild|findElements|arguments|appendChild|split|all'.split('|'),0,{}))
diff --git a/apps/files_textviewer/js/syntaxhighlighter/shBrushAS3.js b/apps/files_textviewer/js/syntaxhighlighter/shBrushAS3.js
new file mode 100644
index 00000000000..8aa3ed2732a
--- /dev/null
+++ b/apps/files_textviewer/js/syntaxhighlighter/shBrushAS3.js
@@ -0,0 +1,59 @@
+/**
+ * SyntaxHighlighter
+ * http://alexgorbatchev.com/SyntaxHighlighter
+ *
+ * SyntaxHighlighter is donationware. If you are using it, please donate.
+ * http://alexgorbatchev.com/SyntaxHighlighter/donate.html
+ *
+ * @version
+ * 3.0.83 (July 02 2010)
+ *
+ * @copyright
+ * Copyright (C) 2004-2010 Alex Gorbatchev.
+ *
+ * @license
+ * Dual licensed under the MIT and GPL licenses.
+ */
+;(function()
+{
+ // CommonJS
+ typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null;
+
+ function Brush()
+ {
+ // Created by Peter Atoria @ http://iAtoria.com
+
+ var inits = 'class interface function package';
+
+ var keywords = '-Infinity ...rest Array as AS3 Boolean break case catch const continue Date decodeURI ' +
+ 'decodeURIComponent default delete do dynamic each else encodeURI encodeURIComponent escape ' +
+ 'extends false final finally flash_proxy for get if implements import in include Infinity ' +
+ 'instanceof int internal is isFinite isNaN isXMLName label namespace NaN native new null ' +
+ 'Null Number Object object_proxy override parseFloat parseInt private protected public ' +
+ 'return set static String super switch this throw true try typeof uint undefined unescape ' +
+ 'use void while with'
+ ;
+
+ this.regexList = [
+ { regex: SyntaxHighlighter.regexLib.singleLineCComments, css: 'comments' }, // one line comments
+ { regex: SyntaxHighlighter.regexLib.multiLineCComments, css: 'comments' }, // multiline comments
+ { regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, // double quoted strings
+ { regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // single quoted strings
+ { regex: /\b([\d]+(\.[\d]+)?|0x[a-f0-9]+)\b/gi, css: 'value' }, // numbers
+ { regex: new RegExp(this.getKeywords(inits), 'gm'), css: 'color3' }, // initializations
+ { regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' }, // keywords
+ { regex: new RegExp('var', 'gm'), css: 'variable' }, // variable
+ { regex: new RegExp('trace', 'gm'), css: 'color1' } // trace
+ ];
+
+ this.forHtmlScript(SyntaxHighlighter.regexLib.scriptScriptTags);
+ };
+
+ Brush.prototype = new SyntaxHighlighter.Highlighter();
+ Brush.aliases = ['actionscript3', 'as3'];
+
+ SyntaxHighlighter.brushes.AS3 = Brush;
+
+ // CommonJS
+ typeof(exports) != 'undefined' ? exports.Brush = Brush : null;
+})();
diff --git a/apps/files_textviewer/js/syntaxhighlighter/shBrushAppleScript.js b/apps/files_textviewer/js/syntaxhighlighter/shBrushAppleScript.js
new file mode 100644
index 00000000000..d40bbd7dd26
--- /dev/null
+++ b/apps/files_textviewer/js/syntaxhighlighter/shBrushAppleScript.js
@@ -0,0 +1,75 @@
+/**
+ * SyntaxHighlighter
+ * http://alexgorbatchev.com/SyntaxHighlighter
+ *
+ * SyntaxHighlighter is donationware. If you are using it, please donate.
+ * http://alexgorbatchev.com/SyntaxHighlighter/donate.html
+ *
+ * @version
+ * 3.0.83 (July 02 2010)
+ *
+ * @copyright
+ * Copyright (C) 2004-2010 Alex Gorbatchev.
+ *
+ * @license
+ * Dual licensed under the MIT and GPL licenses.
+ */
+;(function()
+{
+ // CommonJS
+ typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null;
+
+ function Brush()
+ {
+ // AppleScript brush by David Chambers
+ // http://davidchambersdesign.com/
+ var keywords = 'after before beginning continue copy each end every from return get global in local named of set some that the then times to where whose with without';
+ var ordinals = 'first second third fourth fifth sixth seventh eighth ninth tenth last front back middle';
+ var specials = 'activate add alias AppleScript ask attachment boolean class constant delete duplicate empty exists false id integer list make message modal modified new no paragraph pi properties quit real record remove rest result reveal reverse run running save string true word yes';
+
+ this.regexList = [
+
+ { regex: /(--|#).*$/gm,
+ css: 'comments' },
+
+ { regex: /\(\*(?:[\s\S]*?\(\*[\s\S]*?\*\))*[\s\S]*?\*\)/gm, // support nested comments
+ css: 'comments' },
+
+ { regex: /"[\s\S]*?"/gm,
+ css: 'string' },
+
+ { regex: /(?:,|:|¬|'s\b|\(|\)|\{|\}|«|\b\w*»)/g,
+ css: 'color1' },
+
+ { regex: /(-)?(\d)+(\.(\d)?)?(E\+(\d)+)?/g, // numbers
+ css: 'color1' },
+
+ { regex: /(?:&(amp;|gt;|lt;)?|=|� |>|<|≥|>=|≤|<=|\*|\+|-|\/|÷|\^)/g,
+ css: 'color2' },
+
+ { regex: /\b(?:and|as|div|mod|not|or|return(?!\s&)(ing)?|equals|(is(n't| not)? )?equal( to)?|does(n't| not) equal|(is(n't| not)? )?(greater|less) than( or equal( to)?)?|(comes|does(n't| not) come) (after|before)|is(n't| not)?( in)? (back|front) of|is(n't| not)? behind|is(n't| not)?( (in|contained by))?|does(n't| not) contain|contain(s)?|(start|begin|end)(s)? with|((but|end) )?(consider|ignor)ing|prop(erty)?|(a )?ref(erence)?( to)?|repeat (until|while|with)|((end|exit) )?repeat|((else|end) )?if|else|(end )?(script|tell|try)|(on )?error|(put )?into|(of )?(it|me)|its|my|with (timeout( of)?|transaction)|end (timeout|transaction))\b/g,
+ css: 'keyword' },
+
+ { regex: /\b\d+(st|nd|rd|th)\b/g, // ordinals
+ css: 'keyword' },
+
+ { regex: /\b(?:about|above|against|around|at|below|beneath|beside|between|by|(apart|aside) from|(instead|out) of|into|on(to)?|over|since|thr(ough|u)|under)\b/g,
+ css: 'color3' },
+
+ { regex: /\b(?:adding folder items to|after receiving|choose( ((remote )?application|color|folder|from list|URL))?|clipboard info|set the clipboard to|(the )?clipboard|entire contents|display(ing| (alert|dialog|mode))?|document( (edited|file|nib name))?|file( (name|type))?|(info )?for|giving up after|(name )?extension|quoted form|return(ed)?|second(?! item)(s)?|list (disks|folder)|text item(s| delimiters)?|(Unicode )?text|(disk )?item(s)?|((current|list) )?view|((container|key) )?window|with (data|icon( (caution|note|stop))?|parameter(s)?|prompt|properties|seed|title)|case|diacriticals|hyphens|numeric strings|punctuation|white space|folder creation|application(s( folder)?| (processes|scripts position|support))?|((desktop )?(pictures )?|(documents|downloads|favorites|home|keychain|library|movies|music|public|scripts|sites|system|users|utilities|workflows) )folder|desktop|Folder Action scripts|font(s| panel)?|help|internet plugins|modem scripts|(system )?preferences|printer descriptions|scripting (additions|components)|shared (documents|libraries)|startup (disk|items)|temporary items|trash|on server|in AppleTalk zone|((as|long|short) )?user name|user (ID|locale)|(with )?password|in (bundle( with identifier)?|directory)|(close|open for) access|read|write( permission)?|(g|s)et eof|using( delimiters)?|starting at|default (answer|button|color|country code|entr(y|ies)|identifiers|items|name|location|script editor)|hidden( answer)?|open(ed| (location|untitled))?|error (handling|reporting)|(do( shell)?|load|run|store) script|administrator privileges|altering line endings|get volume settings|(alert|boot|input|mount|output|set) volume|output muted|(fax|random )?number|round(ing)?|up|down|toward zero|to nearest|as taught in school|system (attribute|info)|((AppleScript( Studio)?|system) )?version|(home )?directory|(IPv4|primary Ethernet) address|CPU (type|speed)|physical memory|time (stamp|to GMT)|replacing|ASCII (character|number)|localized string|from table|offset|summarize|beep|delay|say|(empty|multiple) selections allowed|(of|preferred) type|invisibles|showing( package contents)?|editable URL|(File|FTP|News|Media|Web) [Ss]ervers|Telnet hosts|Directory services|Remote applications|waiting until completion|saving( (in|to))?|path (for|to( (((current|frontmost) )?application|resource))?)|POSIX (file|path)|(background|RGB) color|(OK|cancel) button name|cancel button|button(s)?|cubic ((centi)?met(re|er)s|yards|feet|inches)|square ((kilo)?met(re|er)s|miles|yards|feet)|(centi|kilo)?met(re|er)s|miles|yards|feet|inches|lit(re|er)s|gallons|quarts|(kilo)?grams|ounces|pounds|degrees (Celsius|Fahrenheit|Kelvin)|print( (dialog|settings))?|clos(e(able)?|ing)|(de)?miniaturized|miniaturizable|zoom(ed|able)|attribute run|action (method|property|title)|phone|email|((start|end)ing|home) page|((birth|creation|current|custom|modification) )?date|((((phonetic )?(first|last|middle))|computer|host|maiden|related) |nick)?name|aim|icq|jabber|msn|yahoo|address(es)?|save addressbook|should enable action|city|country( code)?|formatte(r|d address)|(palette )?label|state|street|zip|AIM [Hh]andle(s)?|my card|select(ion| all)?|unsaved|(alpha )?value|entr(y|ies)|group|(ICQ|Jabber|MSN) handle|person|people|company|department|icon image|job title|note|organization|suffix|vcard|url|copies|collating|pages (across|down)|request print time|target( printer)?|((GUI Scripting|Script menu) )?enabled|show Computer scripts|(de)?activated|awake from nib|became (key|main)|call method|of (class|object)|center|clicked toolbar item|closed|for document|exposed|(can )?hide|idle|keyboard (down|up)|event( (number|type))?|launch(ed)?|load (image|movie|nib|sound)|owner|log|mouse (down|dragged|entered|exited|moved|up)|move|column|localization|resource|script|register|drag (info|types)|resigned (active|key|main)|resiz(e(d)?|able)|right mouse (down|dragged|up)|scroll wheel|(at )?index|should (close|open( untitled)?|quit( after last window closed)?|zoom)|((proposed|screen) )?bounds|show(n)?|behind|in front of|size (mode|to fit)|update(d| toolbar item)?|was (hidden|miniaturized)|will (become active|close|finish launching|hide|miniaturize|move|open|quit|(resign )?active|((maximum|minimum|proposed) )?size|show|zoom)|bundle|data source|movie|pasteboard|sound|tool(bar| tip)|(color|open|save) panel|coordinate system|frontmost|main( (bundle|menu|window))?|((services|(excluded from )?windows) )?menu|((executable|frameworks|resource|scripts|shared (frameworks|support)) )?path|(selected item )?identifier|data|content(s| view)?|character(s)?|click count|(command|control|option|shift) key down|context|delta (x|y|z)|key( code)?|location|pressure|unmodified characters|types|(first )?responder|playing|(allowed|selectable) identifiers|allows customization|(auto saves )?configuration|visible|image( name)?|menu form representation|tag|user(-| )defaults|associated file name|(auto|needs) display|current field editor|floating|has (resize indicator|shadow)|hides when deactivated|level|minimized (image|title)|opaque|position|release when closed|sheet|title(d)?)\b/g,
+ css: 'color3' },
+
+ { regex: new RegExp(this.getKeywords(specials), 'gm'), css: 'color3' },
+ { regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' },
+ { regex: new RegExp(this.getKeywords(ordinals), 'gm'), css: 'keyword' }
+ ];
+ };
+
+ Brush.prototype = new SyntaxHighlighter.Highlighter();
+ Brush.aliases = ['applescript'];
+
+ SyntaxHighlighter.brushes.AppleScript = Brush;
+
+ // CommonJS
+ typeof(exports) != 'undefined' ? exports.Brush = Brush : null;
+})();
diff --git a/apps/files_textviewer/js/syntaxhighlighter/shBrushBash.js b/apps/files_textviewer/js/syntaxhighlighter/shBrushBash.js
new file mode 100644
index 00000000000..8c296969ff4
--- /dev/null
+++ b/apps/files_textviewer/js/syntaxhighlighter/shBrushBash.js
@@ -0,0 +1,59 @@
+/**
+ * SyntaxHighlighter
+ * http://alexgorbatchev.com/SyntaxHighlighter
+ *
+ * SyntaxHighlighter is donationware. If you are using it, please donate.
+ * http://alexgorbatchev.com/SyntaxHighlighter/donate.html
+ *
+ * @version
+ * 3.0.83 (July 02 2010)
+ *
+ * @copyright
+ * Copyright (C) 2004-2010 Alex Gorbatchev.
+ *
+ * @license
+ * Dual licensed under the MIT and GPL licenses.
+ */
+;(function()
+{
+ // CommonJS
+ typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null;
+
+ function Brush()
+ {
+ var keywords = 'if fi then elif else for do done until while break continue case function return in eq ne ge le';
+ var commands = 'alias apropos awk basename bash bc bg builtin bzip2 cal cat cd cfdisk chgrp chmod chown chroot' +
+ 'cksum clear cmp comm command cp cron crontab csplit cut date dc dd ddrescue declare df ' +
+ 'diff diff3 dig dir dircolors dirname dirs du echo egrep eject enable env ethtool eval ' +
+ 'exec exit expand export expr false fdformat fdisk fg fgrep file find fmt fold format ' +
+ 'free fsck ftp gawk getopts grep groups gzip hash head history hostname id ifconfig ' +
+ 'import install join kill less let ln local locate logname logout look lpc lpr lprint ' +
+ 'lprintd lprintq lprm ls lsof make man mkdir mkfifo mkisofs mknod more mount mtools ' +
+ 'mv netstat nice nl nohup nslookup open op passwd paste pathchk ping popd pr printcap ' +
+ 'printenv printf ps pushd pwd quota quotacheck quotactl ram rcp read readonly renice ' +
+ 'remsync rm rmdir rsync screen scp sdiff sed select seq set sftp shift shopt shutdown ' +
+ 'sleep sort source split ssh strace su sudo sum symlink sync tail tar tee test time ' +
+ 'times touch top traceroute trap tr true tsort tty type ulimit umask umount unalias ' +
+ 'uname unexpand uniq units unset unshar useradd usermod users uuencode uudecode v vdir ' +
+ 'vi watch wc whereis which who whoami Wget xargs yes'
+ ;
+
+ this.regexList = [
+ { regex: /^#!.*$/gm, css: 'preprocessor bold' },
+ { regex: /\/[\w-\/]+/gm, css: 'plain' },
+ { regex: SyntaxHighlighter.regexLib.singleLinePerlComments, css: 'comments' }, // one line comments
+ { regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, // double quoted strings
+ { regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // single quoted strings
+ { regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' }, // keywords
+ { regex: new RegExp(this.getKeywords(commands), 'gm'), css: 'functions' } // commands
+ ];
+ }
+
+ Brush.prototype = new SyntaxHighlighter.Highlighter();
+ Brush.aliases = ['bash', 'shell'];
+
+ SyntaxHighlighter.brushes.Bash = Brush;
+
+ // CommonJS
+ typeof(exports) != 'undefined' ? exports.Brush = Brush : null;
+})();
diff --git a/apps/files_textviewer/js/syntaxhighlighter/shBrushCSharp.js b/apps/files_textviewer/js/syntaxhighlighter/shBrushCSharp.js
new file mode 100644
index 00000000000..079214efe11
--- /dev/null
+++ b/apps/files_textviewer/js/syntaxhighlighter/shBrushCSharp.js
@@ -0,0 +1,65 @@
+/**
+ * SyntaxHighlighter
+ * http://alexgorbatchev.com/SyntaxHighlighter
+ *
+ * SyntaxHighlighter is donationware. If you are using it, please donate.
+ * http://alexgorbatchev.com/SyntaxHighlighter/donate.html
+ *
+ * @version
+ * 3.0.83 (July 02 2010)
+ *
+ * @copyright
+ * Copyright (C) 2004-2010 Alex Gorbatchev.
+ *
+ * @license
+ * Dual licensed under the MIT and GPL licenses.
+ */
+;(function()
+{
+ // CommonJS
+ typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null;
+
+ function Brush()
+ {
+ var keywords = 'abstract as base bool break byte case catch char checked class const ' +
+ 'continue decimal default delegate do double else enum event explicit ' +
+ 'extern false finally fixed float for foreach get goto if implicit in int ' +
+ 'interface internal is lock long namespace new null object operator out ' +
+ 'override params private protected public readonly ref return sbyte sealed set ' +
+ 'short sizeof stackalloc static string struct switch this throw true try ' +
+ 'typeof uint ulong unchecked unsafe ushort using virtual void while';
+
+ function fixComments(match, regexInfo)
+ {
+ var css = (match[0].indexOf("///") == 0)
+ ? 'color1'
+ : 'comments'
+ ;
+
+ return [new SyntaxHighlighter.Match(match[0], match.index, css)];
+ }
+
+ this.regexList = [
+ { regex: SyntaxHighlighter.regexLib.singleLineCComments, func : fixComments }, // one line comments
+ { regex: SyntaxHighlighter.regexLib.multiLineCComments, css: 'comments' }, // multiline comments
+ { regex: /@"(?:[^"]|"")*"/g, css: 'string' }, // @-quoted strings
+ { regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, // strings
+ { regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // strings
+ { regex: /^\s*#.*/gm, css: 'preprocessor' }, // preprocessor tags like #region and #endregion
+ { regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' }, // c# keyword
+ { regex: /\bpartial(?=\s+(?:class|interface|struct)\b)/g, css: 'keyword' }, // contextual keyword: 'partial'
+ { regex: /\byield(?=\s+(?:return|break)\b)/g, css: 'keyword' } // contextual keyword: 'yield'
+ ];
+
+ this.forHtmlScript(SyntaxHighlighter.regexLib.aspScriptTags);
+ };
+
+ Brush.prototype = new SyntaxHighlighter.Highlighter();
+ Brush.aliases = ['c#', 'c-sharp', 'csharp'];
+
+ SyntaxHighlighter.brushes.CSharp = Brush;
+
+ // CommonJS
+ typeof(exports) != 'undefined' ? exports.Brush = Brush : null;
+})();
+
diff --git a/apps/files_textviewer/js/syntaxhighlighter/shBrushColdFusion.js b/apps/files_textviewer/js/syntaxhighlighter/shBrushColdFusion.js
new file mode 100644
index 00000000000..627dbb9b76e
--- /dev/null
+++ b/apps/files_textviewer/js/syntaxhighlighter/shBrushColdFusion.js
@@ -0,0 +1,100 @@
+/**
+ * SyntaxHighlighter
+ * http://alexgorbatchev.com/SyntaxHighlighter
+ *
+ * SyntaxHighlighter is donationware. If you are using it, please donate.
+ * http://alexgorbatchev.com/SyntaxHighlighter/donate.html
+ *
+ * @version
+ * 3.0.83 (July 02 2010)
+ *
+ * @copyright
+ * Copyright (C) 2004-2010 Alex Gorbatchev.
+ *
+ * @license
+ * Dual licensed under the MIT and GPL licenses.
+ */
+;(function()
+{
+ // CommonJS
+ typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null;
+
+ function Brush()
+ {
+ // Contributed by Jen
+ // http://www.jensbits.com/2009/05/14/coldfusion-brush-for-syntaxhighlighter-plus
+
+ var funcs = 'Abs ACos AddSOAPRequestHeader AddSOAPResponseHeader AjaxLink AjaxOnLoad ArrayAppend ArrayAvg ArrayClear ArrayDeleteAt ' +
+ 'ArrayInsertAt ArrayIsDefined ArrayIsEmpty ArrayLen ArrayMax ArrayMin ArraySet ArraySort ArraySum ArraySwap ArrayToList ' +
+ 'Asc ASin Atn BinaryDecode BinaryEncode BitAnd BitMaskClear BitMaskRead BitMaskSet BitNot BitOr BitSHLN BitSHRN BitXor ' +
+ 'Ceiling CharsetDecode CharsetEncode Chr CJustify Compare CompareNoCase Cos CreateDate CreateDateTime CreateObject ' +
+ 'CreateODBCDate CreateODBCDateTime CreateODBCTime CreateTime CreateTimeSpan CreateUUID DateAdd DateCompare DateConvert ' +
+ 'DateDiff DateFormat DatePart Day DayOfWeek DayOfWeekAsString DayOfYear DaysInMonth DaysInYear DE DecimalFormat DecrementValue ' +
+ 'Decrypt DecryptBinary DeleteClientVariable DeserializeJSON DirectoryExists DollarFormat DotNetToCFType Duplicate Encrypt ' +
+ 'EncryptBinary Evaluate Exp ExpandPath FileClose FileCopy FileDelete FileExists FileIsEOF FileMove FileOpen FileRead ' +
+ 'FileReadBinary FileReadLine FileSetAccessMode FileSetAttribute FileSetLastModified FileWrite Find FindNoCase FindOneOf ' +
+ 'FirstDayOfMonth Fix FormatBaseN GenerateSecretKey GetAuthUser GetBaseTagData GetBaseTagList GetBaseTemplatePath ' +
+ 'GetClientVariablesList GetComponentMetaData GetContextRoot GetCurrentTemplatePath GetDirectoryFromPath GetEncoding ' +
+ 'GetException GetFileFromPath GetFileInfo GetFunctionList GetGatewayHelper GetHttpRequestData GetHttpTimeString ' +
+ 'GetK2ServerDocCount GetK2ServerDocCountLimit GetLocale GetLocaleDisplayName GetLocalHostIP GetMetaData GetMetricData ' +
+ 'GetPageContext GetPrinterInfo GetProfileSections GetProfileString GetReadableImageFormats GetSOAPRequest GetSOAPRequestHeader ' +
+ 'GetSOAPResponse GetSOAPResponseHeader GetTempDirectory GetTempFile GetTemplatePath GetTickCount GetTimeZoneInfo GetToken ' +
+ 'GetUserRoles GetWriteableImageFormats Hash Hour HTMLCodeFormat HTMLEditFormat IIf ImageAddBorder ImageBlur ImageClearRect ' +
+ 'ImageCopy ImageCrop ImageDrawArc ImageDrawBeveledRect ImageDrawCubicCurve ImageDrawLine ImageDrawLines ImageDrawOval ' +
+ 'ImageDrawPoint ImageDrawQuadraticCurve ImageDrawRect ImageDrawRoundRect ImageDrawText ImageFlip ImageGetBlob ImageGetBufferedImage ' +
+ 'ImageGetEXIFTag ImageGetHeight ImageGetIPTCTag ImageGetWidth ImageGrayscale ImageInfo ImageNegative ImageNew ImageOverlay ImagePaste ' +
+ 'ImageRead ImageReadBase64 ImageResize ImageRotate ImageRotateDrawingAxis ImageScaleToFit ImageSetAntialiasing ImageSetBackgroundColor ' +
+ 'ImageSetDrawingColor ImageSetDrawingStroke ImageSetDrawingTransparency ImageSharpen ImageShear ImageShearDrawingAxis ImageTranslate ' +
+ 'ImageTranslateDrawingAxis ImageWrite ImageWriteBase64 ImageXORDrawingMode IncrementValue InputBaseN Insert Int IsArray IsBinary ' +
+ 'IsBoolean IsCustomFunction IsDate IsDDX IsDebugMode IsDefined IsImage IsImageFile IsInstanceOf IsJSON IsLeapYear IsLocalHost ' +
+ 'IsNumeric IsNumericDate IsObject IsPDFFile IsPDFObject IsQuery IsSimpleValue IsSOAPRequest IsStruct IsUserInAnyRole IsUserInRole ' +
+ 'IsUserLoggedIn IsValid IsWDDX IsXML IsXmlAttribute IsXmlDoc IsXmlElem IsXmlNode IsXmlRoot JavaCast JSStringFormat LCase Left Len ' +
+ 'ListAppend ListChangeDelims ListContains ListContainsNoCase ListDeleteAt ListFind ListFindNoCase ListFirst ListGetAt ListInsertAt ' +
+ 'ListLast ListLen ListPrepend ListQualify ListRest ListSetAt ListSort ListToArray ListValueCount ListValueCountNoCase LJustify Log ' +
+ 'Log10 LSCurrencyFormat LSDateFormat LSEuroCurrencyFormat LSIsCurrency LSIsDate LSIsNumeric LSNumberFormat LSParseCurrency LSParseDateTime ' +
+ 'LSParseEuroCurrency LSParseNumber LSTimeFormat LTrim Max Mid Min Minute Month MonthAsString Now NumberFormat ParagraphFormat ParseDateTime ' +
+ 'Pi PrecisionEvaluate PreserveSingleQuotes Quarter QueryAddColumn QueryAddRow QueryConvertForGrid QueryNew QuerySetCell QuotedValueList Rand ' +
+ 'Randomize RandRange REFind REFindNoCase ReleaseComObject REMatch REMatchNoCase RemoveChars RepeatString Replace ReplaceList ReplaceNoCase ' +
+ 'REReplace REReplaceNoCase Reverse Right RJustify Round RTrim Second SendGatewayMessage SerializeJSON SetEncoding SetLocale SetProfileString ' +
+ 'SetVariable Sgn Sin Sleep SpanExcluding SpanIncluding Sqr StripCR StructAppend StructClear StructCopy StructCount StructDelete StructFind ' +
+ 'StructFindKey StructFindValue StructGet StructInsert StructIsEmpty StructKeyArray StructKeyExists StructKeyList StructKeyList StructNew ' +
+ 'StructSort StructUpdate Tan TimeFormat ToBase64 ToBinary ToScript ToString Trim UCase URLDecode URLEncodedFormat URLSessionFormat Val ' +
+ 'ValueList VerifyClient Week Wrap Wrap WriteOutput XmlChildPos XmlElemNew XmlFormat XmlGetNodeType XmlNew XmlParse XmlSearch XmlTransform ' +
+ 'XmlValidate Year YesNoFormat';
+
+ var keywords = 'cfabort cfajaximport cfajaxproxy cfapplet cfapplication cfargument cfassociate cfbreak cfcache cfcalendar ' +
+ 'cfcase cfcatch cfchart cfchartdata cfchartseries cfcol cfcollection cfcomponent cfcontent cfcookie cfdbinfo ' +
+ 'cfdefaultcase cfdirectory cfdiv cfdocument cfdocumentitem cfdocumentsection cfdump cfelse cfelseif cferror ' +
+ 'cfexchangecalendar cfexchangeconnection cfexchangecontact cfexchangefilter cfexchangemail cfexchangetask ' +
+ 'cfexecute cfexit cffeed cffile cfflush cfform cfformgroup cfformitem cfftp cffunction cfgrid cfgridcolumn ' +
+ 'cfgridrow cfgridupdate cfheader cfhtmlhead cfhttp cfhttpparam cfif cfimage cfimport cfinclude cfindex ' +
+ 'cfinput cfinsert cfinterface cfinvoke cfinvokeargument cflayout cflayoutarea cfldap cflocation cflock cflog ' +
+ 'cflogin cfloginuser cflogout cfloop cfmail cfmailparam cfmailpart cfmenu cfmenuitem cfmodule cfNTauthenticate ' +
+ 'cfobject cfobjectcache cfoutput cfparam cfpdf cfpdfform cfpdfformparam cfpdfparam cfpdfsubform cfpod cfpop ' +
+ 'cfpresentation cfpresentationslide cfpresenter cfprint cfprocessingdirective cfprocparam cfprocresult ' +
+ 'cfproperty cfquery cfqueryparam cfregistry cfreport cfreportparam cfrethrow cfreturn cfsavecontent cfschedule ' +
+ 'cfscript cfsearch cfselect cfset cfsetting cfsilent cfslider cfsprydataset cfstoredproc cfswitch cftable ' +
+ 'cftextarea cfthread cfthrow cftimer cftooltip cftrace cftransaction cftree cftreeitem cftry cfupdate cfwddx ' +
+ 'cfwindow cfxml cfzip cfzipparam';
+
+ var operators = 'all and any between cross in join like not null or outer some';
+
+ this.regexList = [
+ { regex: new RegExp('--(.*)$', 'gm'), css: 'comments' }, // one line and multiline comments
+ { regex: SyntaxHighlighter.regexLib.xmlComments, css: 'comments' }, // single quoted strings
+ { regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, // double quoted strings
+ { regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // single quoted strings
+ { regex: new RegExp(this.getKeywords(funcs), 'gmi'), css: 'functions' }, // functions
+ { regex: new RegExp(this.getKeywords(operators), 'gmi'), css: 'color1' }, // operators and such
+ { regex: new RegExp(this.getKeywords(keywords), 'gmi'), css: 'keyword' } // keyword
+ ];
+ }
+
+ Brush.prototype = new SyntaxHighlighter.Highlighter();
+ Brush.aliases = ['coldfusion','cf'];
+
+ SyntaxHighlighter.brushes.ColdFusion = Brush;
+
+ // CommonJS
+ typeof(exports) != 'undefined' ? exports.Brush = Brush : null;
+})();
diff --git a/apps/files_textviewer/js/syntaxhighlighter/shBrushCpp.js b/apps/files_textviewer/js/syntaxhighlighter/shBrushCpp.js
new file mode 100644
index 00000000000..9f70d3aed60
--- /dev/null
+++ b/apps/files_textviewer/js/syntaxhighlighter/shBrushCpp.js
@@ -0,0 +1,97 @@
+/**
+ * SyntaxHighlighter
+ * http://alexgorbatchev.com/SyntaxHighlighter
+ *
+ * SyntaxHighlighter is donationware. If you are using it, please donate.
+ * http://alexgorbatchev.com/SyntaxHighlighter/donate.html
+ *
+ * @version
+ * 3.0.83 (July 02 2010)
+ *
+ * @copyright
+ * Copyright (C) 2004-2010 Alex Gorbatchev.
+ *
+ * @license
+ * Dual licensed under the MIT and GPL licenses.
+ */
+;(function()
+{
+ // CommonJS
+ typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null;
+
+ function Brush()
+ {
+ // Copyright 2006 Shin, YoungJin
+
+ var datatypes = 'ATOM BOOL BOOLEAN BYTE CHAR COLORREF DWORD DWORDLONG DWORD_PTR ' +
+ 'DWORD32 DWORD64 FLOAT HACCEL HALF_PTR HANDLE HBITMAP HBRUSH ' +
+ 'HCOLORSPACE HCONV HCONVLIST HCURSOR HDC HDDEDATA HDESK HDROP HDWP ' +
+ 'HENHMETAFILE HFILE HFONT HGDIOBJ HGLOBAL HHOOK HICON HINSTANCE HKEY ' +
+ 'HKL HLOCAL HMENU HMETAFILE HMODULE HMONITOR HPALETTE HPEN HRESULT ' +
+ 'HRGN HRSRC HSZ HWINSTA HWND INT INT_PTR INT32 INT64 LANGID LCID LCTYPE ' +
+ 'LGRPID LONG LONGLONG LONG_PTR LONG32 LONG64 LPARAM LPBOOL LPBYTE LPCOLORREF ' +
+ 'LPCSTR LPCTSTR LPCVOID LPCWSTR LPDWORD LPHANDLE LPINT LPLONG LPSTR LPTSTR ' +
+ 'LPVOID LPWORD LPWSTR LRESULT PBOOL PBOOLEAN PBYTE PCHAR PCSTR PCTSTR PCWSTR ' +
+ 'PDWORDLONG PDWORD_PTR PDWORD32 PDWORD64 PFLOAT PHALF_PTR PHANDLE PHKEY PINT ' +
+ 'PINT_PTR PINT32 PINT64 PLCID PLONG PLONGLONG PLONG_PTR PLONG32 PLONG64 POINTER_32 ' +
+ 'POINTER_64 PSHORT PSIZE_T PSSIZE_T PSTR PTBYTE PTCHAR PTSTR PUCHAR PUHALF_PTR ' +
+ 'PUINT PUINT_PTR PUINT32 PUINT64 PULONG PULONGLONG PULONG_PTR PULONG32 PULONG64 ' +
+ 'PUSHORT PVOID PWCHAR PWORD PWSTR SC_HANDLE SC_LOCK SERVICE_STATUS_HANDLE SHORT ' +
+ 'SIZE_T SSIZE_T TBYTE TCHAR UCHAR UHALF_PTR UINT UINT_PTR UINT32 UINT64 ULONG ' +
+ 'ULONGLONG ULONG_PTR ULONG32 ULONG64 USHORT USN VOID WCHAR WORD WPARAM WPARAM WPARAM ' +
+ 'char bool short int __int32 __int64 __int8 __int16 long float double __wchar_t ' +
+ 'clock_t _complex _dev_t _diskfree_t div_t ldiv_t _exception _EXCEPTION_POINTERS ' +
+ 'FILE _finddata_t _finddatai64_t _wfinddata_t _wfinddatai64_t __finddata64_t ' +
+ '__wfinddata64_t _FPIEEE_RECORD fpos_t _HEAPINFO _HFILE lconv intptr_t ' +
+ 'jmp_buf mbstate_t _off_t _onexit_t _PNH ptrdiff_t _purecall_handler ' +
+ 'sig_atomic_t size_t _stat __stat64 _stati64 terminate_function ' +
+ 'time_t __time64_t _timeb __timeb64 tm uintptr_t _utimbuf ' +
+ 'va_list wchar_t wctrans_t wctype_t wint_t signed';
+
+ var keywords = 'break case catch class const __finally __exception __try ' +
+ 'const_cast continue private public protected __declspec ' +
+ 'default delete deprecated dllexport dllimport do dynamic_cast ' +
+ 'else enum explicit extern if for friend goto inline ' +
+ 'mutable naked namespace new noinline noreturn nothrow ' +
+ 'register reinterpret_cast return selectany ' +
+ 'sizeof static static_cast struct switch template this ' +
+ 'thread throw true false try typedef typeid typename union ' +
+ 'using uuid virtual void volatile whcar_t while';
+
+ var functions = 'assert isalnum isalpha iscntrl isdigit isgraph islower isprint' +
+ 'ispunct isspace isupper isxdigit tolower toupper errno localeconv ' +
+ 'setlocale acos asin atan atan2 ceil cos cosh exp fabs floor fmod ' +
+ 'frexp ldexp log log10 modf pow sin sinh sqrt tan tanh jmp_buf ' +
+ 'longjmp setjmp raise signal sig_atomic_t va_arg va_end va_start ' +
+ 'clearerr fclose feof ferror fflush fgetc fgetpos fgets fopen ' +
+ 'fprintf fputc fputs fread freopen fscanf fseek fsetpos ftell ' +
+ 'fwrite getc getchar gets perror printf putc putchar puts remove ' +
+ 'rename rewind scanf setbuf setvbuf sprintf sscanf tmpfile tmpnam ' +
+ 'ungetc vfprintf vprintf vsprintf abort abs atexit atof atoi atol ' +
+ 'bsearch calloc div exit free getenv labs ldiv malloc mblen mbstowcs ' +
+ 'mbtowc qsort rand realloc srand strtod strtol strtoul system ' +
+ 'wcstombs wctomb memchr memcmp memcpy memmove memset strcat strchr ' +
+ 'strcmp strcoll strcpy strcspn strerror strlen strncat strncmp ' +
+ 'strncpy strpbrk strrchr strspn strstr strtok strxfrm asctime ' +
+ 'clock ctime difftime gmtime localtime mktime strftime time';
+
+ this.regexList = [
+ { regex: SyntaxHighlighter.regexLib.singleLineCComments, css: 'comments' }, // one line comments
+ { regex: SyntaxHighlighter.regexLib.multiLineCComments, css: 'comments' }, // multiline comments
+ { regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, // strings
+ { regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // strings
+ { regex: /^ *#.*/gm, css: 'preprocessor' },
+ { regex: new RegExp(this.getKeywords(datatypes), 'gm'), css: 'color1 bold' },
+ { regex: new RegExp(this.getKeywords(functions), 'gm'), css: 'functions bold' },
+ { regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword bold' }
+ ];
+ };
+
+ Brush.prototype = new SyntaxHighlighter.Highlighter();
+ Brush.aliases = ['cpp', 'c'];
+
+ SyntaxHighlighter.brushes.Cpp = Brush;
+
+ // CommonJS
+ typeof(exports) != 'undefined' ? exports.Brush = Brush : null;
+})();
diff --git a/apps/files_textviewer/js/syntaxhighlighter/shBrushCss.js b/apps/files_textviewer/js/syntaxhighlighter/shBrushCss.js
new file mode 100644
index 00000000000..4297a9a6486
--- /dev/null
+++ b/apps/files_textviewer/js/syntaxhighlighter/shBrushCss.js
@@ -0,0 +1,91 @@
+/**
+ * SyntaxHighlighter
+ * http://alexgorbatchev.com/SyntaxHighlighter
+ *
+ * SyntaxHighlighter is donationware. If you are using it, please donate.
+ * http://alexgorbatchev.com/SyntaxHighlighter/donate.html
+ *
+ * @version
+ * 3.0.83 (July 02 2010)
+ *
+ * @copyright
+ * Copyright (C) 2004-2010 Alex Gorbatchev.
+ *
+ * @license
+ * Dual licensed under the MIT and GPL licenses.
+ */
+;(function()
+{
+ // CommonJS
+ typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null;
+
+ function Brush()
+ {
+ function getKeywordsCSS(str)
+ {
+ return '\\b([a-z_]|)' + str.replace(/ /g, '(?=:)\\b|\\b([a-z_\\*]|\\*|)') + '(?=:)\\b';
+ };
+
+ function getValuesCSS(str)
+ {
+ return '\\b' + str.replace(/ /g, '(?!-)(?!:)\\b|\\b()') + '\:\\b';
+ };
+
+ var keywords = 'ascent azimuth background-attachment background-color background-image background-position ' +
+ 'background-repeat background baseline bbox border-collapse border-color border-spacing border-style border-top ' +
+ 'border-right border-bottom border-left border-top-color border-right-color border-bottom-color border-left-color ' +
+ 'border-top-style border-right-style border-bottom-style border-left-style border-top-width border-right-width ' +
+ 'border-bottom-width border-left-width border-width border bottom cap-height caption-side centerline clear clip color ' +
+ 'content counter-increment counter-reset cue-after cue-before cue cursor definition-src descent direction display ' +
+ 'elevation empty-cells float font-size-adjust font-family font-size font-stretch font-style font-variant font-weight font ' +
+ 'height left letter-spacing line-height list-style-image list-style-position list-style-type list-style margin-top ' +
+ 'margin-right margin-bottom margin-left margin marker-offset marks mathline max-height max-width min-height min-width orphans ' +
+ 'outline-color outline-style outline-width outline overflow padding-top padding-right padding-bottom padding-left padding page ' +
+ 'page-break-after page-break-before page-break-inside pause pause-after pause-before pitch pitch-range play-during position ' +
+ 'quotes right richness size slope src speak-header speak-numeral speak-punctuation speak speech-rate stemh stemv stress ' +
+ 'table-layout text-align top text-decoration text-indent text-shadow text-transform unicode-bidi unicode-range units-per-em ' +
+ 'vertical-align visibility voice-family volume white-space widows width widths word-spacing x-height z-index';
+
+ var values = 'above absolute all always aqua armenian attr aural auto avoid baseline behind below bidi-override black blink block blue bold bolder '+
+ 'both bottom braille capitalize caption center center-left center-right circle close-quote code collapse compact condensed '+
+ 'continuous counter counters crop cross crosshair cursive dashed decimal decimal-leading-zero default digits disc dotted double '+
+ 'embed embossed e-resize expanded extra-condensed extra-expanded fantasy far-left far-right fast faster fixed format fuchsia '+
+ 'gray green groove handheld hebrew help hidden hide high higher icon inline-table inline inset inside invert italic '+
+ 'justify landscape large larger left-side left leftwards level lighter lime line-through list-item local loud lower-alpha '+
+ 'lowercase lower-greek lower-latin lower-roman lower low ltr marker maroon medium message-box middle mix move narrower '+
+ 'navy ne-resize no-close-quote none no-open-quote no-repeat normal nowrap n-resize nw-resize oblique olive once open-quote outset '+
+ 'outside overline pointer portrait pre print projection purple red relative repeat repeat-x repeat-y rgb ridge right right-side '+
+ 'rightwards rtl run-in screen scroll semi-condensed semi-expanded separate se-resize show silent silver slower slow '+
+ 'small small-caps small-caption smaller soft solid speech spell-out square s-resize static status-bar sub super sw-resize '+
+ 'table-caption table-cell table-column table-column-group table-footer-group table-header-group table-row table-row-group teal '+
+ 'text-bottom text-top thick thin top transparent tty tv ultra-condensed ultra-expanded underline upper-alpha uppercase upper-latin '+
+ 'upper-roman url visible wait white wider w-resize x-fast x-high x-large x-loud x-low x-slow x-small x-soft xx-large xx-small yellow';
+
+ var fonts = '[mM]onospace [tT]ahoma [vV]erdana [aA]rial [hH]elvetica [sS]ans-serif [sS]erif [cC]ourier mono sans serif';
+
+ this.regexList = [
+ { regex: SyntaxHighlighter.regexLib.multiLineCComments, css: 'comments' }, // multiline comments
+ { regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, // double quoted strings
+ { regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // single quoted strings
+ { regex: /\#[a-fA-F0-9]{3,6}/g, css: 'value' }, // html colors
+ { regex: /(-?\d+)(\.\d+)?(px|em|pt|\:|\%|)/g, css: 'value' }, // sizes
+ { regex: /!important/g, css: 'color3' }, // !important
+ { regex: new RegExp(getKeywordsCSS(keywords), 'gm'), css: 'keyword' }, // keywords
+ { regex: new RegExp(getValuesCSS(values), 'g'), css: 'value' }, // values
+ { regex: new RegExp(this.getKeywords(fonts), 'g'), css: 'color1' } // fonts
+ ];
+
+ this.forHtmlScript({
+ left: /(&lt;|<)\s*style.*?(&gt;|>)/gi,
+ right: /(&lt;|<)\/\s*style\s*(&gt;|>)/gi
+ });
+ };
+
+ Brush.prototype = new SyntaxHighlighter.Highlighter();
+ Brush.aliases = ['css'];
+
+ SyntaxHighlighter.brushes.CSS = Brush;
+
+ // CommonJS
+ typeof(exports) != 'undefined' ? exports.Brush = Brush : null;
+})();
diff --git a/apps/files_textviewer/js/syntaxhighlighter/shBrushDelphi.js b/apps/files_textviewer/js/syntaxhighlighter/shBrushDelphi.js
new file mode 100644
index 00000000000..e1060d44688
--- /dev/null
+++ b/apps/files_textviewer/js/syntaxhighlighter/shBrushDelphi.js
@@ -0,0 +1,55 @@
+/**
+ * SyntaxHighlighter
+ * http://alexgorbatchev.com/SyntaxHighlighter
+ *
+ * SyntaxHighlighter is donationware. If you are using it, please donate.
+ * http://alexgorbatchev.com/SyntaxHighlighter/donate.html
+ *
+ * @version
+ * 3.0.83 (July 02 2010)
+ *
+ * @copyright
+ * Copyright (C) 2004-2010 Alex Gorbatchev.
+ *
+ * @license
+ * Dual licensed under the MIT and GPL licenses.
+ */
+;(function()
+{
+ // CommonJS
+ typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null;
+
+ function Brush()
+ {
+ var keywords = 'abs addr and ansichar ansistring array as asm begin boolean byte cardinal ' +
+ 'case char class comp const constructor currency destructor div do double ' +
+ 'downto else end except exports extended false file finalization finally ' +
+ 'for function goto if implementation in inherited int64 initialization ' +
+ 'integer interface is label library longint longword mod nil not object ' +
+ 'of on or packed pansichar pansistring pchar pcurrency pdatetime pextended ' +
+ 'pint64 pointer private procedure program property pshortstring pstring ' +
+ 'pvariant pwidechar pwidestring protected public published raise real real48 ' +
+ 'record repeat set shl shortint shortstring shr single smallint string then ' +
+ 'threadvar to true try type unit until uses val var varirnt while widechar ' +
+ 'widestring with word write writeln xor';
+
+ this.regexList = [
+ { regex: /\(\*[\s\S]*?\*\)/gm, css: 'comments' }, // multiline comments (* *)
+ { regex: /{(?!\$)[\s\S]*?}/gm, css: 'comments' }, // multiline comments { }
+ { regex: SyntaxHighlighter.regexLib.singleLineCComments, css: 'comments' }, // one line
+ { regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // strings
+ { regex: /\{\$[a-zA-Z]+ .+\}/g, css: 'color1' }, // compiler Directives and Region tags
+ { regex: /\b[\d\.]+\b/g, css: 'value' }, // numbers 12345
+ { regex: /\$[a-zA-Z0-9]+\b/g, css: 'value' }, // numbers $F5D3
+ { regex: new RegExp(this.getKeywords(keywords), 'gmi'), css: 'keyword' } // keyword
+ ];
+ };
+
+ Brush.prototype = new SyntaxHighlighter.Highlighter();
+ Brush.aliases = ['delphi', 'pascal', 'pas'];
+
+ SyntaxHighlighter.brushes.Delphi = Brush;
+
+ // CommonJS
+ typeof(exports) != 'undefined' ? exports.Brush = Brush : null;
+})();
diff --git a/apps/files_textviewer/js/syntaxhighlighter/shBrushDiff.js b/apps/files_textviewer/js/syntaxhighlighter/shBrushDiff.js
new file mode 100644
index 00000000000..e9b14fc580a
--- /dev/null
+++ b/apps/files_textviewer/js/syntaxhighlighter/shBrushDiff.js
@@ -0,0 +1,41 @@
+/**
+ * SyntaxHighlighter
+ * http://alexgorbatchev.com/SyntaxHighlighter
+ *
+ * SyntaxHighlighter is donationware. If you are using it, please donate.
+ * http://alexgorbatchev.com/SyntaxHighlighter/donate.html
+ *
+ * @version
+ * 3.0.83 (July 02 2010)
+ *
+ * @copyright
+ * Copyright (C) 2004-2010 Alex Gorbatchev.
+ *
+ * @license
+ * Dual licensed under the MIT and GPL licenses.
+ */
+;(function()
+{
+ // CommonJS
+ typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null;
+
+ function Brush()
+ {
+ this.regexList = [
+ { regex: /^\+\+\+.*$/gm, css: 'color2' },
+ { regex: /^\-\-\-.*$/gm, css: 'color2' },
+ { regex: /^\s.*$/gm, css: 'color1' },
+ { regex: /^@@.*@@$/gm, css: 'variable' },
+ { regex: /^\+[^\+]{1}.*$/gm, css: 'string' },
+ { regex: /^\-[^\-]{1}.*$/gm, css: 'comments' }
+ ];
+ };
+
+ Brush.prototype = new SyntaxHighlighter.Highlighter();
+ Brush.aliases = ['diff', 'patch'];
+
+ SyntaxHighlighter.brushes.Diff = Brush;
+
+ // CommonJS
+ typeof(exports) != 'undefined' ? exports.Brush = Brush : null;
+})();
diff --git a/apps/files_textviewer/js/syntaxhighlighter/shBrushErlang.js b/apps/files_textviewer/js/syntaxhighlighter/shBrushErlang.js
new file mode 100644
index 00000000000..6ba7d9da871
--- /dev/null
+++ b/apps/files_textviewer/js/syntaxhighlighter/shBrushErlang.js
@@ -0,0 +1,52 @@
+/**
+ * SyntaxHighlighter
+ * http://alexgorbatchev.com/SyntaxHighlighter
+ *
+ * SyntaxHighlighter is donationware. If you are using it, please donate.
+ * http://alexgorbatchev.com/SyntaxHighlighter/donate.html
+ *
+ * @version
+ * 3.0.83 (July 02 2010)
+ *
+ * @copyright
+ * Copyright (C) 2004-2010 Alex Gorbatchev.
+ *
+ * @license
+ * Dual licensed under the MIT and GPL licenses.
+ */
+;(function()
+{
+ // CommonJS
+ typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null;
+
+ function Brush()
+ {
+ // Contributed by Jean-Lou Dupont
+ // http://jldupont.blogspot.com/2009/06/erlang-syntax-highlighter.html
+
+ // According to: http://erlang.org/doc/reference_manual/introduction.html#1.5
+ var keywords = 'after and andalso band begin bnot bor bsl bsr bxor '+
+ 'case catch cond div end fun if let not of or orelse '+
+ 'query receive rem try when xor'+
+ // additional
+ ' module export import define';
+
+ this.regexList = [
+ { regex: new RegExp("[A-Z][A-Za-z0-9_]+", 'g'), css: 'constants' },
+ { regex: new RegExp("\\%.+", 'gm'), css: 'comments' },
+ { regex: new RegExp("\\?[A-Za-z0-9_]+", 'g'), css: 'preprocessor' },
+ { regex: new RegExp("[a-z0-9_]+:[a-z0-9_]+", 'g'), css: 'functions' },
+ { regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' },
+ { regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' },
+ { regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' }
+ ];
+ };
+
+ Brush.prototype = new SyntaxHighlighter.Highlighter();
+ Brush.aliases = ['erl', 'erlang'];
+
+ SyntaxHighlighter.brushes.Erland = Brush;
+
+ // CommonJS
+ typeof(exports) != 'undefined' ? exports.Brush = Brush : null;
+})();
diff --git a/apps/files_textviewer/js/syntaxhighlighter/shBrushGroovy.js b/apps/files_textviewer/js/syntaxhighlighter/shBrushGroovy.js
new file mode 100644
index 00000000000..6ec5c18521a
--- /dev/null
+++ b/apps/files_textviewer/js/syntaxhighlighter/shBrushGroovy.js
@@ -0,0 +1,67 @@
+/**
+ * SyntaxHighlighter
+ * http://alexgorbatchev.com/SyntaxHighlighter
+ *
+ * SyntaxHighlighter is donationware. If you are using it, please donate.
+ * http://alexgorbatchev.com/SyntaxHighlighter/donate.html
+ *
+ * @version
+ * 3.0.83 (July 02 2010)
+ *
+ * @copyright
+ * Copyright (C) 2004-2010 Alex Gorbatchev.
+ *
+ * @license
+ * Dual licensed under the MIT and GPL licenses.
+ */
+;(function()
+{
+ // CommonJS
+ typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null;
+
+ function Brush()
+ {
+ // Contributed by Andres Almiray
+ // http://jroller.com/aalmiray/entry/nice_source_code_syntax_highlighter
+
+ var keywords = 'as assert break case catch class continue def default do else extends finally ' +
+ 'if in implements import instanceof interface new package property return switch ' +
+ 'throw throws try while public protected private static';
+ var types = 'void boolean byte char short int long float double';
+ var constants = 'null';
+ var methods = 'allProperties count get size '+
+ 'collect each eachProperty eachPropertyName eachWithIndex find findAll ' +
+ 'findIndexOf grep inject max min reverseEach sort ' +
+ 'asImmutable asSynchronized flatten intersect join pop reverse subMap toList ' +
+ 'padRight padLeft contains eachMatch toCharacter toLong toUrl tokenize ' +
+ 'eachFile eachFileRecurse eachB yte eachLine readBytes readLine getText ' +
+ 'splitEachLine withReader append encodeBase64 decodeBase64 filterLine ' +
+ 'transformChar transformLine withOutputStream withPrintWriter withStream ' +
+ 'withStreams withWriter withWriterAppend write writeLine '+
+ 'dump inspect invokeMethod print println step times upto use waitForOrKill '+
+ 'getText';
+
+ this.regexList = [
+ { regex: SyntaxHighlighter.regexLib.singleLineCComments, css: 'comments' }, // one line comments
+ { regex: SyntaxHighlighter.regexLib.multiLineCComments, css: 'comments' }, // multiline comments
+ { regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, // strings
+ { regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // strings
+ { regex: /""".*"""/g, css: 'string' }, // GStrings
+ { regex: new RegExp('\\b([\\d]+(\\.[\\d]+)?|0x[a-f0-9]+)\\b', 'gi'), css: 'value' }, // numbers
+ { regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' }, // goovy keyword
+ { regex: new RegExp(this.getKeywords(types), 'gm'), css: 'color1' }, // goovy/java type
+ { regex: new RegExp(this.getKeywords(constants), 'gm'), css: 'constants' }, // constants
+ { regex: new RegExp(this.getKeywords(methods), 'gm'), css: 'functions' } // methods
+ ];
+
+ this.forHtmlScript(SyntaxHighlighter.regexLib.aspScriptTags);
+ }
+
+ Brush.prototype = new SyntaxHighlighter.Highlighter();
+ Brush.aliases = ['groovy'];
+
+ SyntaxHighlighter.brushes.Groovy = Brush;
+
+ // CommonJS
+ typeof(exports) != 'undefined' ? exports.Brush = Brush : null;
+})();
diff --git a/apps/files_textviewer/js/syntaxhighlighter/shBrushJScript.js b/apps/files_textviewer/js/syntaxhighlighter/shBrushJScript.js
new file mode 100644
index 00000000000..ff98daba16e
--- /dev/null
+++ b/apps/files_textviewer/js/syntaxhighlighter/shBrushJScript.js
@@ -0,0 +1,52 @@
+/**
+ * SyntaxHighlighter
+ * http://alexgorbatchev.com/SyntaxHighlighter
+ *
+ * SyntaxHighlighter is donationware. If you are using it, please donate.
+ * http://alexgorbatchev.com/SyntaxHighlighter/donate.html
+ *
+ * @version
+ * 3.0.83 (July 02 2010)
+ *
+ * @copyright
+ * Copyright (C) 2004-2010 Alex Gorbatchev.
+ *
+ * @license
+ * Dual licensed under the MIT and GPL licenses.
+ */
+;(function()
+{
+ // CommonJS
+ typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null;
+
+ function Brush()
+ {
+ var keywords = 'break case catch continue ' +
+ 'default delete do else false ' +
+ 'for function if in instanceof ' +
+ 'new null return super switch ' +
+ 'this throw true try typeof var while with'
+ ;
+
+ var r = SyntaxHighlighter.regexLib;
+
+ this.regexList = [
+ { regex: r.multiLineDoubleQuotedString, css: 'string' }, // double quoted strings
+ { regex: r.multiLineSingleQuotedString, css: 'string' }, // single quoted strings
+ { regex: r.singleLineCComments, css: 'comments' }, // one line comments
+ { regex: r.multiLineCComments, css: 'comments' }, // multiline comments
+ { regex: /\s*#.*/gm, css: 'preprocessor' }, // preprocessor tags like #region and #endregion
+ { regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' } // keywords
+ ];
+
+ this.forHtmlScript(r.scriptScriptTags);
+ };
+
+ Brush.prototype = new SyntaxHighlighter.Highlighter();
+ Brush.aliases = ['js', 'jscript', 'javascript'];
+
+ SyntaxHighlighter.brushes.JScript = Brush;
+
+ // CommonJS
+ typeof(exports) != 'undefined' ? exports.Brush = Brush : null;
+})();
diff --git a/apps/files_textviewer/js/syntaxhighlighter/shBrushJava.js b/apps/files_textviewer/js/syntaxhighlighter/shBrushJava.js
new file mode 100644
index 00000000000..d692fd63828
--- /dev/null
+++ b/apps/files_textviewer/js/syntaxhighlighter/shBrushJava.js
@@ -0,0 +1,57 @@
+/**
+ * SyntaxHighlighter
+ * http://alexgorbatchev.com/SyntaxHighlighter
+ *
+ * SyntaxHighlighter is donationware. If you are using it, please donate.
+ * http://alexgorbatchev.com/SyntaxHighlighter/donate.html
+ *
+ * @version
+ * 3.0.83 (July 02 2010)
+ *
+ * @copyright
+ * Copyright (C) 2004-2010 Alex Gorbatchev.
+ *
+ * @license
+ * Dual licensed under the MIT and GPL licenses.
+ */
+;(function()
+{
+ // CommonJS
+ typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null;
+
+ function Brush()
+ {
+ var keywords = 'abstract assert boolean break byte case catch char class const ' +
+ 'continue default do double else enum extends ' +
+ 'false final finally float for goto if implements import ' +
+ 'instanceof int interface long native new null ' +
+ 'package private protected public return ' +
+ 'short static strictfp super switch synchronized this throw throws true ' +
+ 'transient try void volatile while';
+
+ this.regexList = [
+ { regex: SyntaxHighlighter.regexLib.singleLineCComments, css: 'comments' }, // one line comments
+ { regex: /\/\*([^\*][\s\S]*)?\*\//gm, css: 'comments' }, // multiline comments
+ { regex: /\/\*(?!\*\/)\*[\s\S]*?\*\//gm, css: 'preprocessor' }, // documentation comments
+ { regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, // strings
+ { regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // strings
+ { regex: /\b([\d]+(\.[\d]+)?|0x[a-f0-9]+)\b/gi, css: 'value' }, // numbers
+ { regex: /(?!\@interface\b)\@[\$\w]+\b/g, css: 'color1' }, // annotation @anno
+ { regex: /\@interface\b/g, css: 'color2' }, // @interface keyword
+ { regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' } // java keyword
+ ];
+
+ this.forHtmlScript({
+ left : /(&lt;|<)%[@!=]?/g,
+ right : /%(&gt;|>)/g
+ });
+ };
+
+ Brush.prototype = new SyntaxHighlighter.Highlighter();
+ Brush.aliases = ['java'];
+
+ SyntaxHighlighter.brushes.Java = Brush;
+
+ // CommonJS
+ typeof(exports) != 'undefined' ? exports.Brush = Brush : null;
+})();
diff --git a/apps/files_textviewer/js/syntaxhighlighter/shBrushJavaFX.js b/apps/files_textviewer/js/syntaxhighlighter/shBrushJavaFX.js
new file mode 100644
index 00000000000..1a150a6ad33
--- /dev/null
+++ b/apps/files_textviewer/js/syntaxhighlighter/shBrushJavaFX.js
@@ -0,0 +1,58 @@
+/**
+ * SyntaxHighlighter
+ * http://alexgorbatchev.com/SyntaxHighlighter
+ *
+ * SyntaxHighlighter is donationware. If you are using it, please donate.
+ * http://alexgorbatchev.com/SyntaxHighlighter/donate.html
+ *
+ * @version
+ * 3.0.83 (July 02 2010)
+ *
+ * @copyright
+ * Copyright (C) 2004-2010 Alex Gorbatchev.
+ *
+ * @license
+ * Dual licensed under the MIT and GPL licenses.
+ */
+;(function()
+{
+ // CommonJS
+ typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null;
+
+ function Brush()
+ {
+ // Contributed by Patrick Webster
+ // http://patrickwebster.blogspot.com/2009/04/javafx-brush-for-syntaxhighlighter.html
+ var datatypes = 'Boolean Byte Character Double Duration '
+ + 'Float Integer Long Number Short String Void'
+ ;
+
+ var keywords = 'abstract after and as assert at before bind bound break catch class '
+ + 'continue def delete else exclusive extends false finally first for from '
+ + 'function if import in indexof init insert instanceof into inverse last '
+ + 'lazy mixin mod nativearray new not null on or override package postinit '
+ + 'protected public public-init public-read replace return reverse sizeof '
+ + 'step super then this throw true try tween typeof var where while with '
+ + 'attribute let private readonly static trigger'
+ ;
+
+ this.regexList = [
+ { regex: SyntaxHighlighter.regexLib.singleLineCComments, css: 'comments' },
+ { regex: SyntaxHighlighter.regexLib.multiLineCComments, css: 'comments' },
+ { regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' },
+ { regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' },
+ { regex: /(-?\.?)(\b(\d*\.?\d+|\d+\.?\d*)(e[+-]?\d+)?|0x[a-f\d]+)\b\.?/gi, css: 'color2' }, // numbers
+ { regex: new RegExp(this.getKeywords(datatypes), 'gm'), css: 'variable' }, // datatypes
+ { regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' }
+ ];
+ this.forHtmlScript(SyntaxHighlighter.regexLib.aspScriptTags);
+ };
+
+ Brush.prototype = new SyntaxHighlighter.Highlighter();
+ Brush.aliases = ['jfx', 'javafx'];
+
+ SyntaxHighlighter.brushes.JavaFX = Brush;
+
+ // CommonJS
+ typeof(exports) != 'undefined' ? exports.Brush = Brush : null;
+})();
diff --git a/apps/files_textviewer/js/syntaxhighlighter/shBrushPerl.js b/apps/files_textviewer/js/syntaxhighlighter/shBrushPerl.js
new file mode 100644
index 00000000000..d94a2e0ec52
--- /dev/null
+++ b/apps/files_textviewer/js/syntaxhighlighter/shBrushPerl.js
@@ -0,0 +1,72 @@
+/**
+ * SyntaxHighlighter
+ * http://alexgorbatchev.com/SyntaxHighlighter
+ *
+ * SyntaxHighlighter is donationware. If you are using it, please donate.
+ * http://alexgorbatchev.com/SyntaxHighlighter/donate.html
+ *
+ * @version
+ * 3.0.83 (July 02 2010)
+ *
+ * @copyright
+ * Copyright (C) 2004-2010 Alex Gorbatchev.
+ *
+ * @license
+ * Dual licensed under the MIT and GPL licenses.
+ */
+;(function()
+{
+ // CommonJS
+ typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null;
+
+ function Brush()
+ {
+ // Contributed by David Simmons-Duffin and Marty Kube
+
+ var funcs =
+ 'abs accept alarm atan2 bind binmode chdir chmod chomp chop chown chr ' +
+ 'chroot close closedir connect cos crypt defined delete each endgrent ' +
+ 'endhostent endnetent endprotoent endpwent endservent eof exec exists ' +
+ 'exp fcntl fileno flock fork format formline getc getgrent getgrgid ' +
+ 'getgrnam gethostbyaddr gethostbyname gethostent getlogin getnetbyaddr ' +
+ 'getnetbyname getnetent getpeername getpgrp getppid getpriority ' +
+ 'getprotobyname getprotobynumber getprotoent getpwent getpwnam getpwuid ' +
+ 'getservbyname getservbyport getservent getsockname getsockopt glob ' +
+ 'gmtime grep hex index int ioctl join keys kill lc lcfirst length link ' +
+ 'listen localtime lock log lstat map mkdir msgctl msgget msgrcv msgsnd ' +
+ 'oct open opendir ord pack pipe pop pos print printf prototype push ' +
+ 'quotemeta rand read readdir readline readlink readpipe recv rename ' +
+ 'reset reverse rewinddir rindex rmdir scalar seek seekdir select semctl ' +
+ 'semget semop send setgrent sethostent setnetent setpgrp setpriority ' +
+ 'setprotoent setpwent setservent setsockopt shift shmctl shmget shmread ' +
+ 'shmwrite shutdown sin sleep socket socketpair sort splice split sprintf ' +
+ 'sqrt srand stat study substr symlink syscall sysopen sysread sysseek ' +
+ 'system syswrite tell telldir time times tr truncate uc ucfirst umask ' +
+ 'undef unlink unpack unshift utime values vec wait waitpid warn write';
+
+ var keywords =
+ 'bless caller continue dbmclose dbmopen die do dump else elsif eval exit ' +
+ 'for foreach goto if import last local my next no our package redo ref ' +
+ 'require return sub tie tied unless untie until use wantarray while';
+
+ this.regexList = [
+ { regex: new RegExp('#[^!].*$', 'gm'), css: 'comments' },
+ { regex: new RegExp('^\\s*#!.*$', 'gm'), css: 'preprocessor' }, // shebang
+ { regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' },
+ { regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' },
+ { regex: new RegExp('(\\$|@|%)\\w+', 'g'), css: 'variable' },
+ { regex: new RegExp(this.getKeywords(funcs), 'gmi'), css: 'functions' },
+ { regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' }
+ ];
+
+ this.forHtmlScript(SyntaxHighlighter.regexLib.phpScriptTags);
+ }
+
+ Brush.prototype = new SyntaxHighlighter.Highlighter();
+ Brush.aliases = ['perl', 'Perl', 'pl'];
+
+ SyntaxHighlighter.brushes.Perl = Brush;
+
+ // CommonJS
+ typeof(exports) != 'undefined' ? exports.Brush = Brush : null;
+})();
diff --git a/apps/files_textviewer/js/syntaxhighlighter/shBrushPhp.js b/apps/files_textviewer/js/syntaxhighlighter/shBrushPhp.js
new file mode 100644
index 00000000000..95e6e4325bb
--- /dev/null
+++ b/apps/files_textviewer/js/syntaxhighlighter/shBrushPhp.js
@@ -0,0 +1,88 @@
+/**
+ * SyntaxHighlighter
+ * http://alexgorbatchev.com/SyntaxHighlighter
+ *
+ * SyntaxHighlighter is donationware. If you are using it, please donate.
+ * http://alexgorbatchev.com/SyntaxHighlighter/donate.html
+ *
+ * @version
+ * 3.0.83 (July 02 2010)
+ *
+ * @copyright
+ * Copyright (C) 2004-2010 Alex Gorbatchev.
+ *
+ * @license
+ * Dual licensed under the MIT and GPL licenses.
+ */
+;(function()
+{
+ // CommonJS
+ typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null;
+
+ function Brush()
+ {
+ var funcs = 'abs acos acosh addcslashes addslashes ' +
+ 'array_change_key_case array_chunk array_combine array_count_values array_diff '+
+ 'array_diff_assoc array_diff_key array_diff_uassoc array_diff_ukey array_fill '+
+ 'array_filter array_flip array_intersect array_intersect_assoc array_intersect_key '+
+ 'array_intersect_uassoc array_intersect_ukey array_key_exists array_keys array_map '+
+ 'array_merge array_merge_recursive array_multisort array_pad array_pop array_product '+
+ 'array_push array_rand array_reduce array_reverse array_search array_shift '+
+ 'array_slice array_splice array_sum array_udiff array_udiff_assoc '+
+ 'array_udiff_uassoc array_uintersect array_uintersect_assoc '+
+ 'array_uintersect_uassoc array_unique array_unshift array_values array_walk '+
+ 'array_walk_recursive atan atan2 atanh base64_decode base64_encode base_convert '+
+ 'basename bcadd bccomp bcdiv bcmod bcmul bindec bindtextdomain bzclose bzcompress '+
+ 'bzdecompress bzerrno bzerror bzerrstr bzflush bzopen bzread bzwrite ceil chdir '+
+ 'checkdate checkdnsrr chgrp chmod chop chown chr chroot chunk_split class_exists '+
+ 'closedir closelog copy cos cosh count count_chars date decbin dechex decoct '+
+ 'deg2rad delete ebcdic2ascii echo empty end ereg ereg_replace eregi eregi_replace error_log '+
+ 'error_reporting escapeshellarg escapeshellcmd eval exec exit exp explode extension_loaded '+
+ 'feof fflush fgetc fgetcsv fgets fgetss file_exists file_get_contents file_put_contents '+
+ 'fileatime filectime filegroup fileinode filemtime fileowner fileperms filesize filetype '+
+ 'floatval flock floor flush fmod fnmatch fopen fpassthru fprintf fputcsv fputs fread fscanf '+
+ 'fseek fsockopen fstat ftell ftok getallheaders getcwd getdate getenv gethostbyaddr gethostbyname '+
+ 'gethostbynamel getimagesize getlastmod getmxrr getmygid getmyinode getmypid getmyuid getopt '+
+ 'getprotobyname getprotobynumber getrandmax getrusage getservbyname getservbyport gettext '+
+ 'gettimeofday gettype glob gmdate gmmktime ini_alter ini_get ini_get_all ini_restore ini_set '+
+ 'interface_exists intval ip2long is_a is_array is_bool is_callable is_dir is_double '+
+ 'is_executable is_file is_finite is_float is_infinite is_int is_integer is_link is_long '+
+ 'is_nan is_null is_numeric is_object is_readable is_real is_resource is_scalar is_soap_fault '+
+ 'is_string is_subclass_of is_uploaded_file is_writable is_writeable mkdir mktime nl2br '+
+ 'parse_ini_file parse_str parse_url passthru pathinfo print readlink realpath rewind rewinddir rmdir '+
+ 'round str_ireplace str_pad str_repeat str_replace str_rot13 str_shuffle str_split '+
+ 'str_word_count strcasecmp strchr strcmp strcoll strcspn strftime strip_tags stripcslashes '+
+ 'stripos stripslashes stristr strlen strnatcasecmp strnatcmp strncasecmp strncmp strpbrk '+
+ 'strpos strptime strrchr strrev strripos strrpos strspn strstr strtok strtolower strtotime '+
+ 'strtoupper strtr strval substr substr_compare';
+
+ var keywords = 'abstract and array as break case catch cfunction class clone const continue declare default die do ' +
+ 'else elseif enddeclare endfor endforeach endif endswitch endwhile extends final for foreach ' +
+ 'function include include_once global goto if implements interface instanceof namespace new ' +
+ 'old_function or private protected public return require require_once static switch ' +
+ 'throw try use var while xor ';
+
+ var constants = '__FILE__ __LINE__ __METHOD__ __FUNCTION__ __CLASS__';
+
+ this.regexList = [
+ { regex: SyntaxHighlighter.regexLib.singleLineCComments, css: 'comments' }, // one line comments
+ { regex: SyntaxHighlighter.regexLib.multiLineCComments, css: 'comments' }, // multiline comments
+ { regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, // double quoted strings
+ { regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // single quoted strings
+ { regex: /\$\w+/g, css: 'variable' }, // variables
+ { regex: new RegExp(this.getKeywords(funcs), 'gmi'), css: 'functions' }, // common functions
+ { regex: new RegExp(this.getKeywords(constants), 'gmi'), css: 'constants' }, // constants
+ { regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' } // keyword
+ ];
+
+ this.forHtmlScript(SyntaxHighlighter.regexLib.phpScriptTags);
+ };
+
+ Brush.prototype = new SyntaxHighlighter.Highlighter();
+ Brush.aliases = ['php'];
+
+ SyntaxHighlighter.brushes.Php = Brush;
+
+ // CommonJS
+ typeof(exports) != 'undefined' ? exports.Brush = Brush : null;
+})();
diff --git a/apps/files_textviewer/js/syntaxhighlighter/shBrushPlain.js b/apps/files_textviewer/js/syntaxhighlighter/shBrushPlain.js
new file mode 100644
index 00000000000..9f7d9e90c32
--- /dev/null
+++ b/apps/files_textviewer/js/syntaxhighlighter/shBrushPlain.js
@@ -0,0 +1,33 @@
+/**
+ * SyntaxHighlighter
+ * http://alexgorbatchev.com/SyntaxHighlighter
+ *
+ * SyntaxHighlighter is donationware. If you are using it, please donate.
+ * http://alexgorbatchev.com/SyntaxHighlighter/donate.html
+ *
+ * @version
+ * 3.0.83 (July 02 2010)
+ *
+ * @copyright
+ * Copyright (C) 2004-2010 Alex Gorbatchev.
+ *
+ * @license
+ * Dual licensed under the MIT and GPL licenses.
+ */
+;(function()
+{
+ // CommonJS
+ typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null;
+
+ function Brush()
+ {
+ };
+
+ Brush.prototype = new SyntaxHighlighter.Highlighter();
+ Brush.aliases = ['text', 'plain'];
+
+ SyntaxHighlighter.brushes.Plain = Brush;
+
+ // CommonJS
+ typeof(exports) != 'undefined' ? exports.Brush = Brush : null;
+})();
diff --git a/apps/files_textviewer/js/syntaxhighlighter/shBrushPowerShell.js b/apps/files_textviewer/js/syntaxhighlighter/shBrushPowerShell.js
new file mode 100644
index 00000000000..0be17529689
--- /dev/null
+++ b/apps/files_textviewer/js/syntaxhighlighter/shBrushPowerShell.js
@@ -0,0 +1,74 @@
+/**
+ * SyntaxHighlighter
+ * http://alexgorbatchev.com/SyntaxHighlighter
+ *
+ * SyntaxHighlighter is donationware. If you are using it, please donate.
+ * http://alexgorbatchev.com/SyntaxHighlighter/donate.html
+ *
+ * @version
+ * 3.0.83 (July 02 2010)
+ *
+ * @copyright
+ * Copyright (C) 2004-2010 Alex Gorbatchev.
+ *
+ * @license
+ * Dual licensed under the MIT and GPL licenses.
+ */
+;(function()
+{
+ // CommonJS
+ typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null;
+
+ function Brush()
+ {
+ // Contributes by B.v.Zanten, Getronics
+ // http://confluence.atlassian.com/display/CONFEXT/New+Code+Macro
+
+ var keywords = 'Add-Content Add-History Add-Member Add-PSSnapin Clear(-Content)? Clear-Item ' +
+ 'Clear-ItemProperty Clear-Variable Compare-Object ConvertFrom-SecureString Convert-Path ' +
+ 'ConvertTo-Html ConvertTo-SecureString Copy(-Item)? Copy-ItemProperty Export-Alias ' +
+ 'Export-Clixml Export-Console Export-Csv ForEach(-Object)? Format-Custom Format-List ' +
+ 'Format-Table Format-Wide Get-Acl Get-Alias Get-AuthenticodeSignature Get-ChildItem Get-Command ' +
+ 'Get-Content Get-Credential Get-Culture Get-Date Get-EventLog Get-ExecutionPolicy ' +
+ 'Get-Help Get-History Get-Host Get-Item Get-ItemProperty Get-Location Get-Member ' +
+ 'Get-PfxCertificate Get-Process Get-PSDrive Get-PSProvider Get-PSSnapin Get-Service ' +
+ 'Get-TraceSource Get-UICulture Get-Unique Get-Variable Get-WmiObject Group-Object ' +
+ 'Import-Alias Import-Clixml Import-Csv Invoke-Expression Invoke-History Invoke-Item ' +
+ 'Join-Path Measure-Command Measure-Object Move(-Item)? Move-ItemProperty New-Alias ' +
+ 'New-Item New-ItemProperty New-Object New-PSDrive New-Service New-TimeSpan ' +
+ 'New-Variable Out-Default Out-File Out-Host Out-Null Out-Printer Out-String Pop-Location ' +
+ 'Push-Location Read-Host Remove-Item Remove-ItemProperty Remove-PSDrive Remove-PSSnapin ' +
+ 'Remove-Variable Rename-Item Rename-ItemProperty Resolve-Path Restart-Service Resume-Service ' +
+ 'Select-Object Select-String Set-Acl Set-Alias Set-AuthenticodeSignature Set-Content ' +
+ 'Set-Date Set-ExecutionPolicy Set-Item Set-ItemProperty Set-Location Set-PSDebug ' +
+ 'Set-Service Set-TraceSource Set(-Variable)? Sort-Object Split-Path Start-Service ' +
+ 'Start-Sleep Start-Transcript Stop-Process Stop-Service Stop-Transcript Suspend-Service ' +
+ 'Tee-Object Test-Path Trace-Command Update-FormatData Update-TypeData Where(-Object)? ' +
+ 'Write-Debug Write-Error Write(-Host)? Write-Output Write-Progress Write-Verbose Write-Warning';
+ var alias = 'ac asnp clc cli clp clv cpi cpp cvpa diff epal epcsv fc fl ' +
+ 'ft fw gal gc gci gcm gdr ghy gi gl gm gp gps group gsv ' +
+ 'gsnp gu gv gwmi iex ihy ii ipal ipcsv mi mp nal ndr ni nv oh rdr ' +
+ 'ri rni rnp rp rsnp rv rvpa sal sasv sc select si sl sleep sort sp ' +
+ 'spps spsv sv tee cat cd cp h history kill lp ls ' +
+ 'mount mv popd ps pushd pwd r rm rmdir echo cls chdir del dir ' +
+ 'erase rd ren type % \\?';
+
+ this.regexList = [
+ { regex: /#.*$/gm, css: 'comments' }, // one line comments
+ { regex: /\$[a-zA-Z0-9]+\b/g, css: 'value' }, // variables $Computer1
+ { regex: /\-[a-zA-Z]+\b/g, css: 'keyword' }, // Operators -not -and -eq
+ { regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, // strings
+ { regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // strings
+ { regex: new RegExp(this.getKeywords(keywords), 'gmi'), css: 'keyword' },
+ { regex: new RegExp(this.getKeywords(alias), 'gmi'), css: 'keyword' }
+ ];
+ };
+
+ Brush.prototype = new SyntaxHighlighter.Highlighter();
+ Brush.aliases = ['powershell', 'ps'];
+
+ SyntaxHighlighter.brushes.PowerShell = Brush;
+
+ // CommonJS
+ typeof(exports) != 'undefined' ? exports.Brush = Brush : null;
+})();
diff --git a/apps/files_textviewer/js/syntaxhighlighter/shBrushPython.js b/apps/files_textviewer/js/syntaxhighlighter/shBrushPython.js
new file mode 100644
index 00000000000..ce77462975f
--- /dev/null
+++ b/apps/files_textviewer/js/syntaxhighlighter/shBrushPython.js
@@ -0,0 +1,64 @@
+/**
+ * SyntaxHighlighter
+ * http://alexgorbatchev.com/SyntaxHighlighter
+ *
+ * SyntaxHighlighter is donationware. If you are using it, please donate.
+ * http://alexgorbatchev.com/SyntaxHighlighter/donate.html
+ *
+ * @version
+ * 3.0.83 (July 02 2010)
+ *
+ * @copyright
+ * Copyright (C) 2004-2010 Alex Gorbatchev.
+ *
+ * @license
+ * Dual licensed under the MIT and GPL licenses.
+ */
+;(function()
+{
+ // CommonJS
+ typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null;
+
+ function Brush()
+ {
+ // Contributed by Gheorghe Milas and Ahmad Sherif
+
+ var keywords = 'and assert break class continue def del elif else ' +
+ 'except exec finally for from global if import in is ' +
+ 'lambda not or pass print raise return try yield while';
+
+ var funcs = '__import__ abs all any apply basestring bin bool buffer callable ' +
+ 'chr classmethod cmp coerce compile complex delattr dict dir ' +
+ 'divmod enumerate eval execfile file filter float format frozenset ' +
+ 'getattr globals hasattr hash help hex id input int intern ' +
+ 'isinstance issubclass iter len list locals long map max min next ' +
+ 'object oct open ord pow print property range raw_input reduce ' +
+ 'reload repr reversed round set setattr slice sorted staticmethod ' +
+ 'str sum super tuple type type unichr unicode vars xrange zip';
+
+ var special = 'None True False self cls class_';
+
+ this.regexList = [
+ { regex: SyntaxHighlighter.regexLib.singleLinePerlComments, css: 'comments' },
+ { regex: /^\s*@\w+/gm, css: 'decorator' },
+ { regex: /(['\"]{3})([^\1])*?\1/gm, css: 'comments' },
+ { regex: /"(?!")(?:\.|\\\"|[^\""\n])*"/gm, css: 'string' },
+ { regex: /'(?!')(?:\.|(\\\')|[^\''\n])*'/gm, css: 'string' },
+ { regex: /\+|\-|\*|\/|\%|=|==/gm, css: 'keyword' },
+ { regex: /\b\d+\.?\w*/g, css: 'value' },
+ { regex: new RegExp(this.getKeywords(funcs), 'gmi'), css: 'functions' },
+ { regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' },
+ { regex: new RegExp(this.getKeywords(special), 'gm'), css: 'color1' }
+ ];
+
+ this.forHtmlScript(SyntaxHighlighter.regexLib.aspScriptTags);
+ };
+
+ Brush.prototype = new SyntaxHighlighter.Highlighter();
+ Brush.aliases = ['py', 'python'];
+
+ SyntaxHighlighter.brushes.Python = Brush;
+
+ // CommonJS
+ typeof(exports) != 'undefined' ? exports.Brush = Brush : null;
+})();
diff --git a/apps/files_textviewer/js/syntaxhighlighter/shBrushRuby.js b/apps/files_textviewer/js/syntaxhighlighter/shBrushRuby.js
new file mode 100644
index 00000000000..ff82130a7af
--- /dev/null
+++ b/apps/files_textviewer/js/syntaxhighlighter/shBrushRuby.js
@@ -0,0 +1,55 @@
+/**
+ * SyntaxHighlighter
+ * http://alexgorbatchev.com/SyntaxHighlighter
+ *
+ * SyntaxHighlighter is donationware. If you are using it, please donate.
+ * http://alexgorbatchev.com/SyntaxHighlighter/donate.html
+ *
+ * @version
+ * 3.0.83 (July 02 2010)
+ *
+ * @copyright
+ * Copyright (C) 2004-2010 Alex Gorbatchev.
+ *
+ * @license
+ * Dual licensed under the MIT and GPL licenses.
+ */
+;(function()
+{
+ // CommonJS
+ typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null;
+
+ function Brush()
+ {
+ // Contributed by Erik Peterson.
+
+ var keywords = 'alias and BEGIN begin break case class def define_method defined do each else elsif ' +
+ 'END end ensure false for if in module new next nil not or raise redo rescue retry return ' +
+ 'self super then throw true undef unless until when while yield';
+
+ var builtins = 'Array Bignum Binding Class Continuation Dir Exception FalseClass File::Stat File Fixnum Fload ' +
+ 'Hash Integer IO MatchData Method Module NilClass Numeric Object Proc Range Regexp String Struct::TMS Symbol ' +
+ 'ThreadGroup Thread Time TrueClass';
+
+ this.regexList = [
+ { regex: SyntaxHighlighter.regexLib.singleLinePerlComments, css: 'comments' }, // one line comments
+ { regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, // double quoted strings
+ { regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // single quoted strings
+ { regex: /\b[A-Z0-9_]+\b/g, css: 'constants' }, // constants
+ { regex: /:[a-z][A-Za-z0-9_]*/g, css: 'color2' }, // symbols
+ { regex: /(\$|@@|@)\w+/g, css: 'variable bold' }, // $global, @instance, and @@class variables
+ { regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' }, // keywords
+ { regex: new RegExp(this.getKeywords(builtins), 'gm'), css: 'color1' } // builtins
+ ];
+
+ this.forHtmlScript(SyntaxHighlighter.regexLib.aspScriptTags);
+ };
+
+ Brush.prototype = new SyntaxHighlighter.Highlighter();
+ Brush.aliases = ['ruby', 'rails', 'ror', 'rb'];
+
+ SyntaxHighlighter.brushes.Ruby = Brush;
+
+ // CommonJS
+ typeof(exports) != 'undefined' ? exports.Brush = Brush : null;
+})();
diff --git a/apps/files_textviewer/js/syntaxhighlighter/shBrushSass.js b/apps/files_textviewer/js/syntaxhighlighter/shBrushSass.js
new file mode 100644
index 00000000000..aa04da0996b
--- /dev/null
+++ b/apps/files_textviewer/js/syntaxhighlighter/shBrushSass.js
@@ -0,0 +1,94 @@
+/**
+ * SyntaxHighlighter
+ * http://alexgorbatchev.com/SyntaxHighlighter
+ *
+ * SyntaxHighlighter is donationware. If you are using it, please donate.
+ * http://alexgorbatchev.com/SyntaxHighlighter/donate.html
+ *
+ * @version
+ * 3.0.83 (July 02 2010)
+ *
+ * @copyright
+ * Copyright (C) 2004-2010 Alex Gorbatchev.
+ *
+ * @license
+ * Dual licensed under the MIT and GPL licenses.
+ */
+;(function()
+{
+ // CommonJS
+ typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null;
+
+ function Brush()
+ {
+ function getKeywordsCSS(str)
+ {
+ return '\\b([a-z_]|)' + str.replace(/ /g, '(?=:)\\b|\\b([a-z_\\*]|\\*|)') + '(?=:)\\b';
+ };
+
+ function getValuesCSS(str)
+ {
+ return '\\b' + str.replace(/ /g, '(?!-)(?!:)\\b|\\b()') + '\:\\b';
+ };
+
+ var keywords = 'ascent azimuth background-attachment background-color background-image background-position ' +
+ 'background-repeat background baseline bbox border-collapse border-color border-spacing border-style border-top ' +
+ 'border-right border-bottom border-left border-top-color border-right-color border-bottom-color border-left-color ' +
+ 'border-top-style border-right-style border-bottom-style border-left-style border-top-width border-right-width ' +
+ 'border-bottom-width border-left-width border-width border bottom cap-height caption-side centerline clear clip color ' +
+ 'content counter-increment counter-reset cue-after cue-before cue cursor definition-src descent direction display ' +
+ 'elevation empty-cells float font-size-adjust font-family font-size font-stretch font-style font-variant font-weight font ' +
+ 'height left letter-spacing line-height list-style-image list-style-position list-style-type list-style margin-top ' +
+ 'margin-right margin-bottom margin-left margin marker-offset marks mathline max-height max-width min-height min-width orphans ' +
+ 'outline-color outline-style outline-width outline overflow padding-top padding-right padding-bottom padding-left padding page ' +
+ 'page-break-after page-break-before page-break-inside pause pause-after pause-before pitch pitch-range play-during position ' +
+ 'quotes right richness size slope src speak-header speak-numeral speak-punctuation speak speech-rate stemh stemv stress ' +
+ 'table-layout text-align top text-decoration text-indent text-shadow text-transform unicode-bidi unicode-range units-per-em ' +
+ 'vertical-align visibility voice-family volume white-space widows width widths word-spacing x-height z-index';
+
+ var values = 'above absolute all always aqua armenian attr aural auto avoid baseline behind below bidi-override black blink block blue bold bolder '+
+ 'both bottom braille capitalize caption center center-left center-right circle close-quote code collapse compact condensed '+
+ 'continuous counter counters crop cross crosshair cursive dashed decimal decimal-leading-zero digits disc dotted double '+
+ 'embed embossed e-resize expanded extra-condensed extra-expanded fantasy far-left far-right fast faster fixed format fuchsia '+
+ 'gray green groove handheld hebrew help hidden hide high higher icon inline-table inline inset inside invert italic '+
+ 'justify landscape large larger left-side left leftwards level lighter lime line-through list-item local loud lower-alpha '+
+ 'lowercase lower-greek lower-latin lower-roman lower low ltr marker maroon medium message-box middle mix move narrower '+
+ 'navy ne-resize no-close-quote none no-open-quote no-repeat normal nowrap n-resize nw-resize oblique olive once open-quote outset '+
+ 'outside overline pointer portrait pre print projection purple red relative repeat repeat-x repeat-y rgb ridge right right-side '+
+ 'rightwards rtl run-in screen scroll semi-condensed semi-expanded separate se-resize show silent silver slower slow '+
+ 'small small-caps small-caption smaller soft solid speech spell-out square s-resize static status-bar sub super sw-resize '+
+ 'table-caption table-cell table-column table-column-group table-footer-group table-header-group table-row table-row-group teal '+
+ 'text-bottom text-top thick thin top transparent tty tv ultra-condensed ultra-expanded underline upper-alpha uppercase upper-latin '+
+ 'upper-roman url visible wait white wider w-resize x-fast x-high x-large x-loud x-low x-slow x-small x-soft xx-large xx-small yellow';
+
+ var fonts = '[mM]onospace [tT]ahoma [vV]erdana [aA]rial [hH]elvetica [sS]ans-serif [sS]erif [cC]ourier mono sans serif';
+
+ var statements = '!important !default';
+ var preprocessor = '@import @extend @debug @warn @if @for @while @mixin @include';
+
+ var r = SyntaxHighlighter.regexLib;
+
+ this.regexList = [
+ { regex: r.multiLineCComments, css: 'comments' }, // multiline comments
+ { regex: r.singleLineCComments, css: 'comments' }, // singleline comments
+ { regex: r.doubleQuotedString, css: 'string' }, // double quoted strings
+ { regex: r.singleQuotedString, css: 'string' }, // single quoted strings
+ { regex: /\#[a-fA-F0-9]{3,6}/g, css: 'value' }, // html colors
+ { regex: /\b(-?\d+)(\.\d+)?(px|em|pt|\:|\%|)\b/g, css: 'value' }, // sizes
+ { regex: /\$\w+/g, css: 'variable' }, // variables
+ { regex: new RegExp(this.getKeywords(statements), 'g'), css: 'color3' }, // statements
+ { regex: new RegExp(this.getKeywords(preprocessor), 'g'), css: 'preprocessor' }, // preprocessor
+ { regex: new RegExp(getKeywordsCSS(keywords), 'gm'), css: 'keyword' }, // keywords
+ { regex: new RegExp(getValuesCSS(values), 'g'), css: 'value' }, // values
+ { regex: new RegExp(this.getKeywords(fonts), 'g'), css: 'color1' } // fonts
+ ];
+ };
+
+ Brush.prototype = new SyntaxHighlighter.Highlighter();
+ Brush.aliases = ['sass', 'scss'];
+
+ SyntaxHighlighter.brushes.Sass = Brush;
+
+ // CommonJS
+ typeof(exports) != 'undefined' ? exports.Brush = Brush : null;
+})();
diff --git a/apps/files_textviewer/js/syntaxhighlighter/shBrushScala.js b/apps/files_textviewer/js/syntaxhighlighter/shBrushScala.js
new file mode 100644
index 00000000000..4b0b6f04d29
--- /dev/null
+++ b/apps/files_textviewer/js/syntaxhighlighter/shBrushScala.js
@@ -0,0 +1,51 @@
+/**
+ * SyntaxHighlighter
+ * http://alexgorbatchev.com/SyntaxHighlighter
+ *
+ * SyntaxHighlighter is donationware. If you are using it, please donate.
+ * http://alexgorbatchev.com/SyntaxHighlighter/donate.html
+ *
+ * @version
+ * 3.0.83 (July 02 2010)
+ *
+ * @copyright
+ * Copyright (C) 2004-2010 Alex Gorbatchev.
+ *
+ * @license
+ * Dual licensed under the MIT and GPL licenses.
+ */
+;(function()
+{
+ // CommonJS
+ typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null;
+
+ function Brush()
+ {
+ // Contributed by Yegor Jbanov and David Bernard.
+
+ var keywords = 'val sealed case def true trait implicit forSome import match object null finally super ' +
+ 'override try lazy for var catch throw type extends class while with new final yield abstract ' +
+ 'else do if return protected private this package false';
+
+ var keyops = '[_:=><%#@]+';
+
+ this.regexList = [
+ { regex: SyntaxHighlighter.regexLib.singleLineCComments, css: 'comments' }, // one line comments
+ { regex: SyntaxHighlighter.regexLib.multiLineCComments, css: 'comments' }, // multiline comments
+ { regex: SyntaxHighlighter.regexLib.multiLineSingleQuotedString, css: 'string' }, // multi-line strings
+ { regex: SyntaxHighlighter.regexLib.multiLineDoubleQuotedString, css: 'string' }, // double-quoted string
+ { regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // strings
+ { regex: /0x[a-f0-9]+|\d+(\.\d+)?/gi, css: 'value' }, // numbers
+ { regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' }, // keywords
+ { regex: new RegExp(keyops, 'gm'), css: 'keyword' } // scala keyword
+ ];
+ }
+
+ Brush.prototype = new SyntaxHighlighter.Highlighter();
+ Brush.aliases = ['scala'];
+
+ SyntaxHighlighter.brushes.Scala = Brush;
+
+ // CommonJS
+ typeof(exports) != 'undefined' ? exports.Brush = Brush : null;
+})();
diff --git a/apps/files_textviewer/js/syntaxhighlighter/shBrushSql.js b/apps/files_textviewer/js/syntaxhighlighter/shBrushSql.js
new file mode 100644
index 00000000000..5c2cd8806ff
--- /dev/null
+++ b/apps/files_textviewer/js/syntaxhighlighter/shBrushSql.js
@@ -0,0 +1,66 @@
+/**
+ * SyntaxHighlighter
+ * http://alexgorbatchev.com/SyntaxHighlighter
+ *
+ * SyntaxHighlighter is donationware. If you are using it, please donate.
+ * http://alexgorbatchev.com/SyntaxHighlighter/donate.html
+ *
+ * @version
+ * 3.0.83 (July 02 2010)
+ *
+ * @copyright
+ * Copyright (C) 2004-2010 Alex Gorbatchev.
+ *
+ * @license
+ * Dual licensed under the MIT and GPL licenses.
+ */
+;(function()
+{
+ // CommonJS
+ typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null;
+
+ function Brush()
+ {
+ var funcs = 'abs avg case cast coalesce convert count current_timestamp ' +
+ 'current_user day isnull left lower month nullif replace right ' +
+ 'session_user space substring sum system_user upper user year';
+
+ var keywords = 'absolute action add after alter as asc at authorization begin bigint ' +
+ 'binary bit by cascade char character check checkpoint close collate ' +
+ 'column commit committed connect connection constraint contains continue ' +
+ 'create cube current current_date current_time cursor database date ' +
+ 'deallocate dec decimal declare default delete desc distinct double drop ' +
+ 'dynamic else end end-exec escape except exec execute false fetch first ' +
+ 'float for force foreign forward free from full function global goto grant ' +
+ 'group grouping having hour ignore index inner insensitive insert instead ' +
+ 'int integer intersect into is isolation key last level load local max min ' +
+ 'minute modify move name national nchar next no numeric of off on only ' +
+ 'open option order out output partial password precision prepare primary ' +
+ 'prior privileges procedure public read real references relative repeatable ' +
+ 'restrict return returns revoke rollback rollup rows rule schema scroll ' +
+ 'second section select sequence serializable set size smallint static ' +
+ 'statistics table temp temporary then time timestamp to top transaction ' +
+ 'translation trigger true truncate uncommitted union unique update values ' +
+ 'varchar varying view when where with work';
+
+ var operators = 'all and any between cross in join like not null or outer some';
+
+ this.regexList = [
+ { regex: /--(.*)$/gm, css: 'comments' }, // one line and multiline comments
+ { regex: SyntaxHighlighter.regexLib.multiLineDoubleQuotedString, css: 'string' }, // double quoted strings
+ { regex: SyntaxHighlighter.regexLib.multiLineSingleQuotedString, css: 'string' }, // single quoted strings
+ { regex: new RegExp(this.getKeywords(funcs), 'gmi'), css: 'color2' }, // functions
+ { regex: new RegExp(this.getKeywords(operators), 'gmi'), css: 'color1' }, // operators and such
+ { regex: new RegExp(this.getKeywords(keywords), 'gmi'), css: 'keyword' } // keyword
+ ];
+ };
+
+ Brush.prototype = new SyntaxHighlighter.Highlighter();
+ Brush.aliases = ['sql'];
+
+ SyntaxHighlighter.brushes.Sql = Brush;
+
+ // CommonJS
+ typeof(exports) != 'undefined' ? exports.Brush = Brush : null;
+})();
+
diff --git a/apps/files_textviewer/js/syntaxhighlighter/shBrushVb.js b/apps/files_textviewer/js/syntaxhighlighter/shBrushVb.js
new file mode 100644
index 00000000000..be845dc0b30
--- /dev/null
+++ b/apps/files_textviewer/js/syntaxhighlighter/shBrushVb.js
@@ -0,0 +1,56 @@
+/**
+ * SyntaxHighlighter
+ * http://alexgorbatchev.com/SyntaxHighlighter
+ *
+ * SyntaxHighlighter is donationware. If you are using it, please donate.
+ * http://alexgorbatchev.com/SyntaxHighlighter/donate.html
+ *
+ * @version
+ * 3.0.83 (July 02 2010)
+ *
+ * @copyright
+ * Copyright (C) 2004-2010 Alex Gorbatchev.
+ *
+ * @license
+ * Dual licensed under the MIT and GPL licenses.
+ */
+;(function()
+{
+ // CommonJS
+ typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null;
+
+ function Brush()
+ {
+ var keywords = 'AddHandler AddressOf AndAlso Alias And Ansi As Assembly Auto ' +
+ 'Boolean ByRef Byte ByVal Call Case Catch CBool CByte CChar CDate ' +
+ 'CDec CDbl Char CInt Class CLng CObj Const CShort CSng CStr CType ' +
+ 'Date Decimal Declare Default Delegate Dim DirectCast Do Double Each ' +
+ 'Else ElseIf End Enum Erase Error Event Exit False Finally For Friend ' +
+ 'Function Get GetType GoSub GoTo Handles If Implements Imports In ' +
+ 'Inherits Integer Interface Is Let Lib Like Long Loop Me Mod Module ' +
+ 'MustInherit MustOverride MyBase MyClass Namespace New Next Not Nothing ' +
+ 'NotInheritable NotOverridable Object On Option Optional Or OrElse ' +
+ 'Overloads Overridable Overrides ParamArray Preserve Private Property ' +
+ 'Protected Public RaiseEvent ReadOnly ReDim REM RemoveHandler Resume ' +
+ 'Return Select Set Shadows Shared Short Single Static Step Stop String ' +
+ 'Structure Sub SyncLock Then Throw To True Try TypeOf Unicode Until ' +
+ 'Variant When While With WithEvents WriteOnly Xor';
+
+ this.regexList = [
+ { regex: /'.*$/gm, css: 'comments' }, // one line comments
+ { regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, // strings
+ { regex: /^\s*#.*$/gm, css: 'preprocessor' }, // preprocessor tags like #region and #endregion
+ { regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' } // vb keyword
+ ];
+
+ this.forHtmlScript(SyntaxHighlighter.regexLib.aspScriptTags);
+ };
+
+ Brush.prototype = new SyntaxHighlighter.Highlighter();
+ Brush.aliases = ['vb', 'vbnet'];
+
+ SyntaxHighlighter.brushes.Vb = Brush;
+
+ // CommonJS
+ typeof(exports) != 'undefined' ? exports.Brush = Brush : null;
+})();
diff --git a/apps/files_textviewer/js/syntaxhighlighter/shBrushXml.js b/apps/files_textviewer/js/syntaxhighlighter/shBrushXml.js
new file mode 100644
index 00000000000..69d9fd0b1f4
--- /dev/null
+++ b/apps/files_textviewer/js/syntaxhighlighter/shBrushXml.js
@@ -0,0 +1,69 @@
+/**
+ * SyntaxHighlighter
+ * http://alexgorbatchev.com/SyntaxHighlighter
+ *
+ * SyntaxHighlighter is donationware. If you are using it, please donate.
+ * http://alexgorbatchev.com/SyntaxHighlighter/donate.html
+ *
+ * @version
+ * 3.0.83 (July 02 2010)
+ *
+ * @copyright
+ * Copyright (C) 2004-2010 Alex Gorbatchev.
+ *
+ * @license
+ * Dual licensed under the MIT and GPL licenses.
+ */
+;(function()
+{
+ // CommonJS
+ typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null;
+
+ function Brush()
+ {
+ function process(match, regexInfo)
+ {
+ var constructor = SyntaxHighlighter.Match,
+ code = match[0],
+ tag = new XRegExp('(&lt;|<)[\\s\\/\\?]*(?<name>[:\\w-\\.]+)', 'xg').exec(code),
+ result = []
+ ;
+
+ if (match.attributes != null)
+ {
+ var attributes,
+ regex = new XRegExp('(?<name> [\\w:\\-\\.]+)' +
+ '\\s*=\\s*' +
+ '(?<value> ".*?"|\'.*?\'|\\w+)',
+ 'xg');
+
+ while ((attributes = regex.exec(code)) != null)
+ {
+ result.push(new constructor(attributes.name, match.index + attributes.index, 'color1'));
+ result.push(new constructor(attributes.value, match.index + attributes.index + attributes[0].indexOf(attributes.value), 'string'));
+ }
+ }
+
+ if (tag != null)
+ result.push(
+ new constructor(tag.name, match.index + tag[0].indexOf(tag.name), 'keyword')
+ );
+
+ return result;
+ }
+
+ this.regexList = [
+ { regex: new XRegExp('(\\&lt;|<)\\!\\[[\\w\\s]*?\\[(.|\\s)*?\\]\\](\\&gt;|>)', 'gm'), css: 'color2' }, // <![ ... [ ... ]]>
+ { regex: SyntaxHighlighter.regexLib.xmlComments, css: 'comments' }, // <!-- ... -->
+ { regex: new XRegExp('(&lt;|<)[\\s\\/\\?]*(\\w+)(?<attributes>.*?)[\\s\\/\\?]*(&gt;|>)', 'sg'), func: process }
+ ];
+ };
+
+ Brush.prototype = new SyntaxHighlighter.Highlighter();
+ Brush.aliases = ['xml', 'xhtml', 'xslt', 'html'];
+
+ SyntaxHighlighter.brushes.Xml = Brush;
+
+ // CommonJS
+ typeof(exports) != 'undefined' ? exports.Brush = Brush : null;
+})();
diff --git a/apps/files_textviewer/js/syntaxhighlighter/shCore.js b/apps/files_textviewer/js/syntaxhighlighter/shCore.js
new file mode 100644
index 00000000000..b47b6454721
--- /dev/null
+++ b/apps/files_textviewer/js/syntaxhighlighter/shCore.js
@@ -0,0 +1,17 @@
+/**
+ * SyntaxHighlighter
+ * http://alexgorbatchev.com/SyntaxHighlighter
+ *
+ * SyntaxHighlighter is donationware. If you are using it, please donate.
+ * http://alexgorbatchev.com/SyntaxHighlighter/donate.html
+ *
+ * @version
+ * 3.0.83 (July 02 2010)
+ *
+ * @copyright
+ * Copyright (C) 2004-2010 Alex Gorbatchev.
+ *
+ * @license
+ * Dual licensed under the MIT and GPL licenses.
+ */
+eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('K M;I(M)1S 2U("2a\'t 4k M 4K 2g 3l 4G 4H");(6(){6 r(f,e){I(!M.1R(f))1S 3m("3s 15 4R");K a=f.1w;f=M(f.1m,t(f)+(e||""));I(a)f.1w={1m:a.1m,19:a.19?a.19.1a(0):N};H f}6 t(f){H(f.1J?"g":"")+(f.4s?"i":"")+(f.4p?"m":"")+(f.4v?"x":"")+(f.3n?"y":"")}6 B(f,e,a,b){K c=u.L,d,h,g;v=R;5K{O(;c--;){g=u[c];I(a&g.3r&&(!g.2p||g.2p.W(b))){g.2q.12=e;I((h=g.2q.X(f))&&h.P===e){d={3k:g.2b.W(b,h,a),1C:h};1N}}}}5v(i){1S i}5q{v=11}H d}6 p(f,e,a){I(3b.Z.1i)H f.1i(e,a);O(a=a||0;a<f.L;a++)I(f[a]===e)H a;H-1}M=6(f,e){K a=[],b=M.1B,c=0,d,h;I(M.1R(f)){I(e!==1d)1S 3m("2a\'t 5r 5I 5F 5B 5C 15 5E 5p");H r(f)}I(v)1S 2U("2a\'t W 3l M 59 5m 5g 5x 5i");e=e||"";O(d={2N:11,19:[],2K:6(g){H e.1i(g)>-1},3d:6(g){e+=g}};c<f.L;)I(h=B(f,c,b,d)){a.U(h.3k);c+=h.1C[0].L||1}Y I(h=n.X.W(z[b],f.1a(c))){a.U(h[0]);c+=h[0].L}Y{h=f.3a(c);I(h==="[")b=M.2I;Y I(h==="]")b=M.1B;a.U(h);c++}a=15(a.1K(""),n.Q.W(e,w,""));a.1w={1m:f,19:d.2N?d.19:N};H a};M.3v="1.5.0";M.2I=1;M.1B=2;K C=/\\$(?:(\\d\\d?|[$&`\'])|{([$\\w]+)})/g,w=/[^5h]+|([\\s\\S])(?=[\\s\\S]*\\1)/g,A=/^(?:[?*+]|{\\d+(?:,\\d*)?})\\??/,v=11,u=[],n={X:15.Z.X,1A:15.Z.1A,1C:1r.Z.1C,Q:1r.Z.Q,1e:1r.Z.1e},x=n.X.W(/()??/,"")[1]===1d,D=6(){K f=/^/g;n.1A.W(f,"");H!f.12}(),y=6(){K f=/x/g;n.Q.W("x",f,"");H!f.12}(),E=15.Z.3n!==1d,z={};z[M.2I]=/^(?:\\\\(?:[0-3][0-7]{0,2}|[4-7][0-7]?|x[\\29-26-f]{2}|u[\\29-26-f]{4}|c[A-3o-z]|[\\s\\S]))/;z[M.1B]=/^(?:\\\\(?:0(?:[0-3][0-7]{0,2}|[4-7][0-7]?)?|[1-9]\\d*|x[\\29-26-f]{2}|u[\\29-26-f]{4}|c[A-3o-z]|[\\s\\S])|\\(\\?[:=!]|[?*+]\\?|{\\d+(?:,\\d*)?}\\??)/;M.1h=6(f,e,a,b){u.U({2q:r(f,"g"+(E?"y":"")),2b:e,3r:a||M.1B,2p:b||N})};M.2n=6(f,e){K a=f+"/"+(e||"");H M.2n[a]||(M.2n[a]=M(f,e))};M.3c=6(f){H r(f,"g")};M.5l=6(f){H f.Q(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g,"\\\\$&")};M.5e=6(f,e,a,b){e=r(e,"g"+(b&&E?"y":""));e.12=a=a||0;f=e.X(f);H b?f&&f.P===a?f:N:f};M.3q=6(){M.1h=6(){1S 2U("2a\'t 55 1h 54 3q")}};M.1R=6(f){H 53.Z.1q.W(f)==="[2m 15]"};M.3p=6(f,e,a,b){O(K c=r(e,"g"),d=-1,h;h=c.X(f);){a.W(b,h,++d,f,c);c.12===h.P&&c.12++}I(e.1J)e.12=0};M.57=6(f,e){H 6 a(b,c){K d=e[c].1I?e[c]:{1I:e[c]},h=r(d.1I,"g"),g=[],i;O(i=0;i<b.L;i++)M.3p(b[i],h,6(k){g.U(d.3j?k[d.3j]||"":k[0])});H c===e.L-1||!g.L?g:a(g,c+1)}([f],0)};15.Z.1p=6(f,e){H J.X(e[0])};15.Z.W=6(f,e){H J.X(e)};15.Z.X=6(f){K e=n.X.1p(J,14),a;I(e){I(!x&&e.L>1&&p(e,"")>-1){a=15(J.1m,n.Q.W(t(J),"g",""));n.Q.W(f.1a(e.P),a,6(){O(K c=1;c<14.L-2;c++)I(14[c]===1d)e[c]=1d})}I(J.1w&&J.1w.19)O(K b=1;b<e.L;b++)I(a=J.1w.19[b-1])e[a]=e[b];!D&&J.1J&&!e[0].L&&J.12>e.P&&J.12--}H e};I(!D)15.Z.1A=6(f){(f=n.X.W(J,f))&&J.1J&&!f[0].L&&J.12>f.P&&J.12--;H!!f};1r.Z.1C=6(f){M.1R(f)||(f=15(f));I(f.1J){K e=n.1C.1p(J,14);f.12=0;H e}H f.X(J)};1r.Z.Q=6(f,e){K a=M.1R(f),b,c;I(a&&1j e.58()==="3f"&&e.1i("${")===-1&&y)H n.Q.1p(J,14);I(a){I(f.1w)b=f.1w.19}Y f+="";I(1j e==="6")c=n.Q.W(J,f,6(){I(b){14[0]=1f 1r(14[0]);O(K d=0;d<b.L;d++)I(b[d])14[0][b[d]]=14[d+1]}I(a&&f.1J)f.12=14[14.L-2]+14[0].L;H e.1p(N,14)});Y{c=J+"";c=n.Q.W(c,f,6(){K d=14;H n.Q.W(e,C,6(h,g,i){I(g)5b(g){24"$":H"$";24"&":H d[0];24"`":H d[d.L-1].1a(0,d[d.L-2]);24"\'":H d[d.L-1].1a(d[d.L-2]+d[0].L);5a:i="";g=+g;I(!g)H h;O(;g>d.L-3;){i=1r.Z.1a.W(g,-1)+i;g=1Q.3i(g/10)}H(g?d[g]||"":"$")+i}Y{g=+i;I(g<=d.L-3)H d[g];g=b?p(b,i):-1;H g>-1?d[g+1]:h}})})}I(a&&f.1J)f.12=0;H c};1r.Z.1e=6(f,e){I(!M.1R(f))H n.1e.1p(J,14);K a=J+"",b=[],c=0,d,h;I(e===1d||+e<0)e=5D;Y{e=1Q.3i(+e);I(!e)H[]}O(f=M.3c(f);d=f.X(a);){I(f.12>c){b.U(a.1a(c,d.P));d.L>1&&d.P<a.L&&3b.Z.U.1p(b,d.1a(1));h=d[0].L;c=f.12;I(b.L>=e)1N}f.12===d.P&&f.12++}I(c===a.L){I(!n.1A.W(f,"")||h)b.U("")}Y b.U(a.1a(c));H b.L>e?b.1a(0,e):b};M.1h(/\\(\\?#[^)]*\\)/,6(f){H n.1A.W(A,f.2S.1a(f.P+f[0].L))?"":"(?:)"});M.1h(/\\((?!\\?)/,6(){J.19.U(N);H"("});M.1h(/\\(\\?<([$\\w]+)>/,6(f){J.19.U(f[1]);J.2N=R;H"("});M.1h(/\\\\k<([\\w$]+)>/,6(f){K e=p(J.19,f[1]);H e>-1?"\\\\"+(e+1)+(3R(f.2S.3a(f.P+f[0].L))?"":"(?:)"):f[0]});M.1h(/\\[\\^?]/,6(f){H f[0]==="[]"?"\\\\b\\\\B":"[\\\\s\\\\S]"});M.1h(/^\\(\\?([5A]+)\\)/,6(f){J.3d(f[1]);H""});M.1h(/(?:\\s+|#.*)+/,6(f){H n.1A.W(A,f.2S.1a(f.P+f[0].L))?"":"(?:)"},M.1B,6(){H J.2K("x")});M.1h(/\\./,6(){H"[\\\\s\\\\S]"},M.1B,6(){H J.2K("s")})})();1j 2e!="1d"&&(2e.M=M);K 1v=6(){6 r(a,b){a.1l.1i(b)!=-1||(a.1l+=" "+b)}6 t(a){H a.1i("3e")==0?a:"3e"+a}6 B(a){H e.1Y.2A[t(a)]}6 p(a,b,c){I(a==N)H N;K d=c!=R?a.3G:[a.2G],h={"#":"1c",".":"1l"}[b.1o(0,1)]||"3h",g,i;g=h!="3h"?b.1o(1):b.5u();I((a[h]||"").1i(g)!=-1)H a;O(a=0;d&&a<d.L&&i==N;a++)i=p(d[a],b,c);H i}6 C(a,b){K c={},d;O(d 2g a)c[d]=a[d];O(d 2g b)c[d]=b[d];H c}6 w(a,b,c,d){6 h(g){g=g||1P.5y;I(!g.1F){g.1F=g.52;g.3N=6(){J.5w=11}}c.W(d||1P,g)}a.3g?a.3g("4U"+b,h):a.4y(b,h,11)}6 A(a,b){K c=e.1Y.2j,d=N;I(c==N){c={};O(K h 2g e.1U){K g=e.1U[h];d=g.4x;I(d!=N){g.1V=h.4w();O(g=0;g<d.L;g++)c[d[g]]=h}}e.1Y.2j=c}d=e.1U[c[a]];d==N&&b!=11&&1P.1X(e.13.1x.1X+(e.13.1x.3E+a));H d}6 v(a,b){O(K c=a.1e("\\n"),d=0;d<c.L;d++)c[d]=b(c[d],d);H c.1K("\\n")}6 u(a,b){I(a==N||a.L==0||a=="\\n")H a;a=a.Q(/</g,"&1y;");a=a.Q(/ {2,}/g,6(c){O(K d="",h=0;h<c.L-1;h++)d+=e.13.1W;H d+" "});I(b!=N)a=v(a,6(c){I(c.L==0)H"";K d="";c=c.Q(/^(&2s;| )+/,6(h){d=h;H""});I(c.L==0)H d;H d+\'<17 1g="\'+b+\'">\'+c+"</17>"});H a}6 n(a,b){a.1e("\\n");O(K c="",d=0;d<50;d++)c+=" ";H a=v(a,6(h){I(h.1i("\\t")==-1)H h;O(K g=0;(g=h.1i("\\t"))!=-1;)h=h.1o(0,g)+c.1o(0,b-g%b)+h.1o(g+1,h.L);H h})}6 x(a){H a.Q(/^\\s+|\\s+$/g,"")}6 D(a,b){I(a.P<b.P)H-1;Y I(a.P>b.P)H 1;Y I(a.L<b.L)H-1;Y I(a.L>b.L)H 1;H 0}6 y(a,b){6 c(k){H k[0]}O(K d=N,h=[],g=b.2D?b.2D:c;(d=b.1I.X(a))!=N;){K i=g(d,b);I(1j i=="3f")i=[1f e.2L(i,d.P,b.23)];h=h.1O(i)}H h}6 E(a){K b=/(.*)((&1G;|&1y;).*)/;H a.Q(e.3A.3M,6(c){K d="",h=N;I(h=b.X(c)){c=h[1];d=h[2]}H\'<a 2h="\'+c+\'">\'+c+"</a>"+d})}6 z(){O(K a=1E.36("1k"),b=[],c=0;c<a.L;c++)a[c].3s=="20"&&b.U(a[c]);H b}6 f(a){a=a.1F;K b=p(a,".20",R);a=p(a,".3O",R);K c=1E.4i("3t");I(!(!a||!b||p(a,"3t"))){B(b.1c);r(b,"1m");O(K d=a.3G,h=[],g=0;g<d.L;g++)h.U(d[g].4z||d[g].4A);h=h.1K("\\r");c.39(1E.4D(h));a.39(c);c.2C();c.4C();w(c,"4u",6(){c.2G.4E(c);b.1l=b.1l.Q("1m","")})}}I(1j 3F!="1d"&&1j M=="1d")M=3F("M").M;K e={2v:{"1g-27":"","2i-1s":1,"2z-1s-2t":11,1M:N,1t:N,"42-45":R,"43-22":4,1u:R,16:R,"3V-17":R,2l:11,"41-40":R,2k:11,"1z-1k":11},13:{1W:"&2s;",2M:R,46:11,44:11,34:"4n",1x:{21:"4o 1m",2P:"?",1X:"1v\\n\\n",3E:"4r\'t 4t 1D O: ",4g:"4m 4B\'t 51 O 1z-1k 4F: ",37:\'<!4T 1z 4S "-//4V//3H 4W 1.0 4Z//4Y" "1Z://2y.3L.3K/4X/3I/3H/3I-4P.4J"><1z 4I="1Z://2y.3L.3K/4L/5L"><3J><4N 1Z-4M="5G-5M" 6K="2O/1z; 6J=6I-8" /><1t>6L 1v</1t></3J><3B 1L="25-6M:6Q,6P,6O,6N-6F;6y-2f:#6x;2f:#6w;25-22:6v;2O-3D:3C;"><T 1L="2O-3D:3C;3w-32:1.6z;"><T 1L="25-22:6A-6E;">1v</T><T 1L="25-22:.6C;3w-6B:6R;"><T>3v 3.0.76 (72 73 3x)</T><T><a 2h="1Z://3u.2w/1v" 1F="38" 1L="2f:#3y">1Z://3u.2w/1v</a></T><T>70 17 6U 71.</T><T>6T 6X-3x 6Y 6D.</T></T><T>6t 61 60 J 1k, 5Z <a 2h="6u://2y.62.2w/63-66/65?64=5X-5W&5P=5O" 1L="2f:#3y">5R</a> 5V <2R/>5U 5T 5S!</T></T></3B></1z>\'}},1Y:{2j:N,2A:{}},1U:{},3A:{6n:/\\/\\*[\\s\\S]*?\\*\\//2c,6m:/\\/\\/.*$/2c,6l:/#.*$/2c,6k:/"([^\\\\"\\n]|\\\\.)*"/g,6o:/\'([^\\\\\'\\n]|\\\\.)*\'/g,6p:1f M(\'"([^\\\\\\\\"]|\\\\\\\\.)*"\',"3z"),6s:1f M("\'([^\\\\\\\\\']|\\\\\\\\.)*\'","3z"),6q:/(&1y;|<)!--[\\s\\S]*?--(&1G;|>)/2c,3M:/\\w+:\\/\\/[\\w-.\\/?%&=:@;]*/g,6a:{18:/(&1y;|<)\\?=?/g,1b:/\\?(&1G;|>)/g},69:{18:/(&1y;|<)%=?/g,1b:/%(&1G;|>)/g},6d:{18:/(&1y;|<)\\s*1k.*?(&1G;|>)/2T,1b:/(&1y;|<)\\/\\s*1k\\s*(&1G;|>)/2T}},16:{1H:6(a){6 b(i,k){H e.16.2o(i,k,e.13.1x[k])}O(K c=\'<T 1g="16">\',d=e.16.2x,h=d.2X,g=0;g<h.L;g++)c+=(d[h[g]].1H||b)(a,h[g]);c+="</T>";H c},2o:6(a,b,c){H\'<2W><a 2h="#" 1g="6e 6h\'+b+" "+b+\'">\'+c+"</a></2W>"},2b:6(a){K b=a.1F,c=b.1l||"";b=B(p(b,".20",R).1c);K d=6(h){H(h=15(h+"6f(\\\\w+)").X(c))?h[1]:N}("6g");b&&d&&e.16.2x[d].2B(b);a.3N()},2x:{2X:["21","2P"],21:{1H:6(a){I(a.V("2l")!=R)H"";K b=a.V("1t");H e.16.2o(a,"21",b?b:e.13.1x.21)},2B:6(a){a=1E.6j(t(a.1c));a.1l=a.1l.Q("47","")}},2P:{2B:6(){K a="68=0";a+=", 18="+(31.30-33)/2+", 32="+(31.2Z-2Y)/2+", 30=33, 2Z=2Y";a=a.Q(/^,/,"");a=1P.6Z("","38",a);a.2C();K b=a.1E;b.6W(e.13.1x.37);b.6V();a.2C()}}}},35:6(a,b){K c;I(b)c=[b];Y{c=1E.36(e.13.34);O(K d=[],h=0;h<c.L;h++)d.U(c[h]);c=d}c=c;d=[];I(e.13.2M)c=c.1O(z());I(c.L===0)H d;O(h=0;h<c.L;h++){O(K g=c[h],i=a,k=c[h].1l,j=3W 0,l={},m=1f M("^\\\\[(?<2V>(.*?))\\\\]$"),s=1f M("(?<27>[\\\\w-]+)\\\\s*:\\\\s*(?<1T>[\\\\w-%#]+|\\\\[.*?\\\\]|\\".*?\\"|\'.*?\')\\\\s*;?","g");(j=s.X(k))!=N;){K o=j.1T.Q(/^[\'"]|[\'"]$/g,"");I(o!=N&&m.1A(o)){o=m.X(o);o=o.2V.L>0?o.2V.1e(/\\s*,\\s*/):[]}l[j.27]=o}g={1F:g,1n:C(i,l)};g.1n.1D!=N&&d.U(g)}H d},1M:6(a,b){K c=J.35(a,b),d=N,h=e.13;I(c.L!==0)O(K g=0;g<c.L;g++){b=c[g];K i=b.1F,k=b.1n,j=k.1D,l;I(j!=N){I(k["1z-1k"]=="R"||e.2v["1z-1k"]==R){d=1f e.4l(j);j="4O"}Y I(d=A(j))d=1f d;Y 6H;l=i.3X;I(h.2M){l=l;K m=x(l),s=11;I(m.1i("<![6G[")==0){m=m.4h(9);s=R}K o=m.L;I(m.1i("]]\\>")==o-3){m=m.4h(0,o-3);s=R}l=s?m:l}I((i.1t||"")!="")k.1t=i.1t;k.1D=j;d.2Q(k);b=d.2F(l);I((i.1c||"")!="")b.1c=i.1c;i.2G.74(b,i)}}},2E:6(a){w(1P,"4k",6(){e.1M(a)})}};e.2E=e.2E;e.1M=e.1M;e.2L=6(a,b,c){J.1T=a;J.P=b;J.L=a.L;J.23=c;J.1V=N};e.2L.Z.1q=6(){H J.1T};e.4l=6(a){6 b(j,l){O(K m=0;m<j.L;m++)j[m].P+=l}K c=A(a),d,h=1f e.1U.5Y,g=J,i="2F 1H 2Q".1e(" ");I(c!=N){d=1f c;O(K k=0;k<i.L;k++)(6(){K j=i[k];g[j]=6(){H h[j].1p(h,14)}})();d.28==N?1P.1X(e.13.1x.1X+(e.13.1x.4g+a)):h.2J.U({1I:d.28.17,2D:6(j){O(K l=j.17,m=[],s=d.2J,o=j.P+j.18.L,F=d.28,q,G=0;G<s.L;G++){q=y(l,s[G]);b(q,o);m=m.1O(q)}I(F.18!=N&&j.18!=N){q=y(j.18,F.18);b(q,j.P);m=m.1O(q)}I(F.1b!=N&&j.1b!=N){q=y(j.1b,F.1b);b(q,j.P+j[0].5Q(j.1b));m=m.1O(q)}O(j=0;j<m.L;j++)m[j].1V=c.1V;H m}})}};e.4j=6(){};e.4j.Z={V:6(a,b){K c=J.1n[a];c=c==N?b:c;K d={"R":R,"11":11}[c];H d==N?c:d},3Y:6(a){H 1E.4i(a)},4c:6(a,b){K c=[];I(a!=N)O(K d=0;d<a.L;d++)I(1j a[d]=="2m")c=c.1O(y(b,a[d]));H J.4e(c.6b(D))},4e:6(a){O(K b=0;b<a.L;b++)I(a[b]!==N)O(K c=a[b],d=c.P+c.L,h=b+1;h<a.L&&a[b]!==N;h++){K g=a[h];I(g!==N)I(g.P>d)1N;Y I(g.P==c.P&&g.L>c.L)a[b]=N;Y I(g.P>=c.P&&g.P<d)a[h]=N}H a},4d:6(a){K b=[],c=2u(J.V("2i-1s"));v(a,6(d,h){b.U(h+c)});H b},3U:6(a){K b=J.V("1M",[]);I(1j b!="2m"&&b.U==N)b=[b];a:{a=a.1q();K c=3W 0;O(c=c=1Q.6c(c||0,0);c<b.L;c++)I(b[c]==a){b=c;1N a}b=-1}H b!=-1},2r:6(a,b,c){a=["1s","6i"+b,"P"+a,"6r"+(b%2==0?1:2).1q()];J.3U(b)&&a.U("67");b==0&&a.U("1N");H\'<T 1g="\'+a.1K(" ")+\'">\'+c+"</T>"},3Q:6(a,b){K c="",d=a.1e("\\n").L,h=2u(J.V("2i-1s")),g=J.V("2z-1s-2t");I(g==R)g=(h+d-1).1q().L;Y I(3R(g)==R)g=0;O(K i=0;i<d;i++){K k=b?b[i]:h+i,j;I(k==0)j=e.13.1W;Y{j=g;O(K l=k.1q();l.L<j;)l="0"+l;j=l}a=j;c+=J.2r(i,k,a)}H c},49:6(a,b){a=x(a);K c=a.1e("\\n");J.V("2z-1s-2t");K d=2u(J.V("2i-1s"));a="";O(K h=J.V("1D"),g=0;g<c.L;g++){K i=c[g],k=/^(&2s;|\\s)+/.X(i),j=N,l=b?b[g]:d+g;I(k!=N){j=k[0].1q();i=i.1o(j.L);j=j.Q(" ",e.13.1W)}i=x(i);I(i.L==0)i=e.13.1W;a+=J.2r(g,l,(j!=N?\'<17 1g="\'+h+\' 5N">\'+j+"</17>":"")+i)}H a},4f:6(a){H a?"<4a>"+a+"</4a>":""},4b:6(a,b){6 c(l){H(l=l?l.1V||g:g)?l+" ":""}O(K d=0,h="",g=J.V("1D",""),i=0;i<b.L;i++){K k=b[i],j;I(!(k===N||k.L===0)){j=c(k);h+=u(a.1o(d,k.P-d),j+"48")+u(k.1T,j+k.23);d=k.P+k.L+(k.75||0)}}h+=u(a.1o(d),c()+"48");H h},1H:6(a){K b="",c=["20"],d;I(J.V("2k")==R)J.1n.16=J.1n.1u=11;1l="20";J.V("2l")==R&&c.U("47");I((1u=J.V("1u"))==11)c.U("6S");c.U(J.V("1g-27"));c.U(J.V("1D"));a=a.Q(/^[ ]*[\\n]+|[\\n]*[ ]*$/g,"").Q(/\\r/g," ");b=J.V("43-22");I(J.V("42-45")==R)a=n(a,b);Y{O(K h="",g=0;g<b;g++)h+=" ";a=a.Q(/\\t/g,h)}a=a;a:{b=a=a;h=/<2R\\s*\\/?>|&1y;2R\\s*\\/?&1G;/2T;I(e.13.46==R)b=b.Q(h,"\\n");I(e.13.44==R)b=b.Q(h,"");b=b.1e("\\n");h=/^\\s*/;g=4Q;O(K i=0;i<b.L&&g>0;i++){K k=b[i];I(x(k).L!=0){k=h.X(k);I(k==N){a=a;1N a}g=1Q.4q(k[0].L,g)}}I(g>0)O(i=0;i<b.L;i++)b[i]=b[i].1o(g);a=b.1K("\\n")}I(1u)d=J.4d(a);b=J.4c(J.2J,a);b=J.4b(a,b);b=J.49(b,d);I(J.V("41-40"))b=E(b);1j 2H!="1d"&&2H.3S&&2H.3S.1C(/5s/)&&c.U("5t");H b=\'<T 1c="\'+t(J.1c)+\'" 1g="\'+c.1K(" ")+\'">\'+(J.V("16")?e.16.1H(J):"")+\'<3Z 5z="0" 5H="0" 5J="0">\'+J.4f(J.V("1t"))+"<3T><3P>"+(1u?\'<2d 1g="1u">\'+J.3Q(a)+"</2d>":"")+\'<2d 1g="17"><T 1g="3O">\'+b+"</T></2d></3P></3T></3Z></T>"},2F:6(a){I(a===N)a="";J.17=a;K b=J.3Y("T");b.3X=J.1H(a);J.V("16")&&w(p(b,".16"),"5c",e.16.2b);J.V("3V-17")&&w(p(b,".17"),"56",f);H b},2Q:6(a){J.1c=""+1Q.5d(1Q.5n()*5k).1q();e.1Y.2A[t(J.1c)]=J;J.1n=C(e.2v,a||{});I(J.V("2k")==R)J.1n.16=J.1n.1u=11},5j:6(a){a=a.Q(/^\\s+|\\s+$/g,"").Q(/\\s+/g,"|");H"\\\\b(?:"+a+")\\\\b"},5f:6(a){J.28={18:{1I:a.18,23:"1k"},1b:{1I:a.1b,23:"1k"},17:1f M("(?<18>"+a.18.1m+")(?<17>.*?)(?<1b>"+a.1b.1m+")","5o")}}};H e}();1j 2e!="1d"&&(2e.1v=1v);',62,441,'||||||function|||||||||||||||||||||||||||||||||||||return|if|this|var|length|XRegExp|null|for|index|replace|true||div|push|getParam|call|exec|else|prototype||false|lastIndex|config|arguments|RegExp|toolbar|code|left|captureNames|slice|right|id|undefined|split|new|class|addToken|indexOf|typeof|script|className|source|params|substr|apply|toString|String|line|title|gutter|SyntaxHighlighter|_xregexp|strings|lt|html|test|OUTSIDE_CLASS|match|brush|document|target|gt|getHtml|regex|global|join|style|highlight|break|concat|window|Math|isRegExp|throw|value|brushes|brushName|space|alert|vars|http|syntaxhighlighter|expandSource|size|css|case|font|Fa|name|htmlScript|dA|can|handler|gm|td|exports|color|in|href|first|discoveredBrushes|light|collapse|object|cache|getButtonHtml|trigger|pattern|getLineHtml|nbsp|numbers|parseInt|defaults|com|items|www|pad|highlighters|execute|focus|func|all|getDiv|parentNode|navigator|INSIDE_CLASS|regexList|hasFlag|Match|useScriptTags|hasNamedCapture|text|help|init|br|input|gi|Error|values|span|list|250|height|width|screen|top|500|tagName|findElements|getElementsByTagName|aboutDialog|_blank|appendChild|charAt|Array|copyAsGlobal|setFlag|highlighter_|string|attachEvent|nodeName|floor|backref|output|the|TypeError|sticky|Za|iterate|freezeTokens|scope|type|textarea|alexgorbatchev|version|margin|2010|005896|gs|regexLib|body|center|align|noBrush|require|childNodes|DTD|xhtml1|head|org|w3|url|preventDefault|container|tr|getLineNumbersHtml|isNaN|userAgent|tbody|isLineHighlighted|quick|void|innerHTML|create|table|links|auto|smart|tab|stripBrs|tabs|bloggerMode|collapsed|plain|getCodeLinesHtml|caption|getMatchesHtml|findMatches|figureOutLineNumbers|removeNestedMatches|getTitleHtml|brushNotHtmlScript|substring|createElement|Highlighter|load|HtmlScript|Brush|pre|expand|multiline|min|Can|ignoreCase|find|blur|extended|toLowerCase|aliases|addEventListener|innerText|textContent|wasn|select|createTextNode|removeChild|option|same|frame|xmlns|dtd|twice|1999|equiv|meta|htmlscript|transitional|1E3|expected|PUBLIC|DOCTYPE|on|W3C|XHTML|TR|EN|Transitional||configured|srcElement|Object|after|run|dblclick|matchChain|valueOf|constructor|default|switch|click|round|execAt|forHtmlScript|token|gimy|functions|getKeywords|1E6|escape|within|random|sgi|another|finally|supply|MSIE|ie|toUpperCase|catch|returnValue|definition|event|border|imsx|constructing|one|Infinity|from|when|Content|cellpadding|flags|cellspacing|try|xhtml|Type|spaces|2930402|hosted_button_id|lastIndexOf|donate|active|development|keep|to|xclick|_s|Xml|please|like|you|paypal|cgi|cmd|webscr|bin|highlighted|scrollbars|aspScriptTags|phpScriptTags|sort|max|scriptScriptTags|toolbar_item|_|command|command_|number|getElementById|doubleQuotedString|singleLinePerlComments|singleLineCComments|multiLineCComments|singleQuotedString|multiLineDoubleQuotedString|xmlComments|alt|multiLineSingleQuotedString|If|https|1em|000|fff|background|5em|xx|bottom|75em|Gorbatchev|large|serif|CDATA|continue|utf|charset|content|About|family|sans|Helvetica|Arial|Geneva|3em|nogutter|Copyright|syntax|close|write|2004|Alex|open|JavaScript|highlighter|July|02|replaceChild|offset|83'.split('|'),0,{}))
diff --git a/apps/files_textviewer/js/syntaxhighlighter/shLegacy.js b/apps/files_textviewer/js/syntaxhighlighter/shLegacy.js
new file mode 100644
index 00000000000..6d9fd4d19f6
--- /dev/null
+++ b/apps/files_textviewer/js/syntaxhighlighter/shLegacy.js
@@ -0,0 +1,17 @@
+/**
+ * SyntaxHighlighter
+ * http://alexgorbatchev.com/SyntaxHighlighter
+ *
+ * SyntaxHighlighter is donationware. If you are using it, please donate.
+ * http://alexgorbatchev.com/SyntaxHighlighter/donate.html
+ *
+ * @version
+ * 3.0.83 (July 02 2010)
+ *
+ * @copyright
+ * Copyright (C) 2004-2010 Alex Gorbatchev.
+ *
+ * @license
+ * Dual licensed under the MIT and GPL licenses.
+ */
+eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('3 u={8:{}};u.8={A:4(c,k,l,m,n,o){4 d(a,b){2 a!=1?a:b}4 f(a){2 a!=1?a.E():1}c=c.I(":");3 g=c[0],e={};t={"r":K};M=1;5=8.5;9(3 j R c)e[c[j]]="r";k=f(d(k,5.C));l=f(d(l,5.D));m=f(d(m,5.s));o=f(d(o,5.Q));n=f(d(n,5["x-y"]));2{P:g,C:d(t[e.O],k),D:d(t[e.N],l),s:d({"r":r}[e.s],m),"x-y":d(4(a,b){9(3 h=T S("^"+b+"\\\\[(?<q>\\\\w+)\\\\]$","U"),i=1,p=0;p<a.7;p++)6((i=h.J(a[p]))!=1)2 i.q;2 1}(c,"G"),n)}},F:4(c,k,l,m,n,o){4 d(){9(3 a=H,b=0;b<a.7;b++)6(a[b]!==1){6(z a[b]=="L"&&a[b]!="")2 a[b]+"";6(z a[b]=="X"&&a[b].q!="")2 a[b].q+""}2 1}4 f(a,b,h){h=12.13(h);9(3 i=0;i<h.7;i++)h[i].V("15")==b&&a.Y(h[i])}3 g=[];f(g,c,"Z");f(g,c,"W");6(g.7!==0)9(c=0;c<g.7;c++){3 e=g[c],j=d(e.B["14"],e.10,e.B.v,e.v);6(j!==1){j=u.8.A(j,k,l,m,n,o);8.11(j,e)}}}};',62,68,'|null|return|var|function|defaults|if|length|SyntaxHighlighter|for|||||||||||||||||value|true|collapse|reverse|dp|language||first|line|typeof|parseParams|attributes|gutter|toolbar|toString|HighlightAll|firstline|arguments|split|exec|false|string|result|nocontrols|nogutter|brush|ruler|in|XRegExp|new|gi|getAttribute|textarea|object|push|pre|className|highlight|document|getElementsByTagName|class|name'.split('|'),0,{}))
diff --git a/apps/files_textviewer/js/textviewer.js b/apps/files_textviewer/js/textviewer.js
new file mode 100644
index 00000000000..b1a564df9bb
--- /dev/null
+++ b/apps/files_textviewer/js/textviewer.js
@@ -0,0 +1,131 @@
+TextViewer=new Object();
+
+TextViewer.type='';
+TextViewer.types={
+ 'ac3':'shBrushAS3',
+ 'applescript':'shBrushAppleScript',
+ 'bash':'shBrushBash',
+ 'sh':'shBrushBash',
+ 'csharp':'shBrushCSharp',
+ 'coldfusion':'shBrushColdFusion',
+ 'cpp':'shBrushCpp',
+ 'css':'shBrushCss',
+ 'delphi':'shBrushDelphi',
+ 'diff':'shBrushDiff',
+ 'erlang':'shBrushErlang',
+ 'groovy':'shBrushGroovy',
+ 'javascript':'shBrushJScript',
+ 'js':'shBrushJScript',
+ 'java':'shBrushJava',
+ 'javafx':'shBrushJavaFX',
+ 'perl':'shBrushPerl',
+ 'php':'shBrushPhp',
+ 'plain':'shBrushPlain',
+ 'powershell':'shBrushPowerShell',
+ 'python':'shBrushPython',
+ 'py':'shBrushPython',
+ 'ruby':'shBrushRuby',
+ 'sass':'shBrushSass',
+ 'scala':'shBrushScala',
+ 'sql':'shBrushSql',
+ 'vb':'shBrushVb',
+ 'xml':'shBrushXml',
+}
+
+TextViewer.load=function(ready){
+ if(!TextViewer.load.done){
+ OC.addStyle('files_textviewer','syntaxhighlighter/shCoreDefault');
+ OC.addStyle('files_textviewer','syntaxhighlighter/shCore');
+ OC.addStyle('files_textviewer','syntaxhighlighter/shThemeDefault');
+ OC.addStyle('files_textviewer','style');
+ OC.addScript('files_textviewer','syntaxhighlighter/shCore',function(){
+ if(ready){
+ ready();
+ }
+ });
+ }else if(ready){
+ ready();
+ }
+}
+TextViewer.load.done=false;
+
+TextViewer.showText=function(dir,file){
+ var type;
+ var parts=file.split('.');
+ var ext=parts[parts.length-1];
+ if(TextViewer.types[ext]){
+ type=ext;
+ }else{
+ type='plain';
+ }
+ TextViewer.type=type;
+ var div=$('<div id="textframe" class="center"></div>');
+ div.click(TextViewer.hideText);
+ TextViewer.textFrame=$('<div></div>');
+ TextViewer.textFrame.click(function(event){
+ event.stopPropagation();
+ });
+ TextViewer.textFrame.pre=$('<pre></pre>');
+ div.append(TextViewer.textFrame);
+ TextViewer.textFrame.append(TextViewer.textFrame.pre);
+ $('body').append(div);
+ TextViewer.loadHighlighter(function(){
+ $.ajax({
+ url: OC.filePath('files','ajax','download.php')+'?files='+encodeURIComponent(file)+'&dir='+encodeURIComponent(dir),
+ complete: function(text){
+ TextViewer.textFrame.pre.text(text.responseText);
+ TextViewer.textFrame.pre.attr('class','brush: '+TextViewer.type+';');
+ SyntaxHighlighter.highlight(null,TextViewer.textFrame.pre[0]);
+ }
+ });
+ });
+}
+
+TextViewer.hideText=function(){
+ $('#textframe').remove();
+}
+
+TextViewer.loadedTypes=new Array();
+TextViewer.loadHighlighter=function(ready){
+ TextViewer.load(function(){
+ TextViewer.type=(TextViewer.types[TextViewer.type])?TextViewer.type:'plain';
+ if(!TextViewer.loadedTypes[TextViewer.type]){
+ OC.addScript('files_textviewer','syntaxhighlighter/'+TextViewer.types[TextViewer.type],function(){
+ TextViewer.loadedTypes[TextViewer.type]=true;
+ SyntaxHighlighter.vars.discoveredBrushes=null; //force the highlighter to refresh it's cache
+ if(ready){
+ ready();
+ }
+ });
+ }else{
+ if(ready){
+ ready();
+ };
+ }
+ });
+}
+
+$(document).ready(function() {
+ if(typeof FileActions!=='undefined'){
+ FileActions.register('text','View','',function(filename){
+ TextViewer.showText($('#dir').val(),filename);
+ });
+ FileActions.setDefault('text','View');
+ FileActions.register('application/xml','View','',function(filename){
+ TextViewer.showText($('#dir').val(),filename);
+ });
+ FileActions.setDefault('application/xml','View');
+ }
+ OC.search.customResults.Text=function(row,item){
+ var text=item.link.substr(item.link.indexOf('file=')+5);
+ var a=row.find('a');
+ a.data('file',text);
+ a.attr('href','#');
+ a.click(function(){
+ var file=$(this).data('file');
+ var text=file.split('/').pop();
+ var dir=file.substr(0,file.length-file.length-1);
+ TextViewer.showText(dir,text);
+ });
+ }
+});
diff --git a/apps/media/ajax/api.php b/apps/media/ajax/api.php
index b86c69d0beb..46f18b848e6 100644
--- a/apps/media/ajax/api.php
+++ b/apps/media/ajax/api.php
@@ -56,6 +56,7 @@ OC_MEDIA_COLLECTION::$uid=OC_User::getUser();
if($arguments['action']){
switch($arguments['action']){
case 'delete':
+ unset($_SESSION['collection']);
$path=$arguments['path'];
OC_MEDIA_COLLECTION::deleteSongByPath($path);
$paths=explode(PATH_SEPARATOR,OC_Preferences::getValue(OC_User::getUser(),'media','paths',''));
@@ -64,30 +65,30 @@ if($arguments['action']){
OC_Preferences::setValue(OC_User::getUser(),'media','paths',implode(PATH_SEPARATOR,$paths));
}
case 'get_collection':
- $artists=OC_MEDIA_COLLECTION::getArtists();
- foreach($artists as &$artist){
- $artist['albums']=OC_MEDIA_COLLECTION::getAlbums($artist['artist_id']);
- foreach($artist['albums'] as &$album){
- $album['songs']=OC_MEDIA_COLLECTION::getSongs($artist['artist_id'],$album['album_id']);
+ if(!isset($_SESSION['collection'])){
+ $artists=OC_MEDIA_COLLECTION::getArtists();
+ foreach($artists as &$artist){
+ $artist['albums']=OC_MEDIA_COLLECTION::getAlbums($artist['artist_id']);
+ foreach($artist['albums'] as &$album){
+ $album['songs']=OC_MEDIA_COLLECTION::getSongs($artist['artist_id'],$album['album_id']);
+ }
}
+
+ $_SESSION['collection']=json_encode($artists);
}
-
- echo json_encode($artists);
+ echo $_SESSION['collection'];
break;
case 'scan':
+ unset($_SESSION['collection']);
+ OC_DB::beginTransaction();
set_time_limit(0); //recursive scan can take a while
$path=$arguments['path'];
- if(OC_Filesystem::is_dir($path)){
- $paths=explode(PATH_SEPARATOR,OC_Preferences::getValue(OC_User::getUser(),'media','paths',''));
- if(array_search($path,$paths)===false){
- $paths[]=$path;
- OC_Preferences::setValue(OC_User::getUser(),'media','paths',implode(PATH_SEPARATOR,$paths));
- }
- }
echo OC_MEDIA_SCANNER::scanFolder($path);
+ OC_DB::commit();
flush();
break;
case 'scanFile':
+ unset($_SESSION['collection']);
echo (OC_MEDIA_SCANNER::scanFile($arguments['path']))?'true':'false';
break;
case 'get_artists':
@@ -99,6 +100,21 @@ if($arguments['action']){
case 'get_songs':
echo json_encode(OC_MEDIA_COLLECTION::getSongs($arguments['artist'],$arguments['album'],$arguments['search']));
break;
+ case 'get_path_info':
+ if(OC_Filesystem::file_exists($arguments['path'])){
+ $songId=OC_MEDIA_COLLECTION::getSongByPath($arguments['path']);
+ if($songId==0){
+ unset($_SESSION['collection']);
+ $songId= OC_MEDIA_SCANNER::scanFile($arguments['path']);
+ }
+ if($songId>0){
+ $song=OC_MEDIA_COLLECTION::getSong($songId);
+ $song['artist']=OC_MEDIA_COLLECTION::getArtistName($song['song_artist']);
+ $song['album']=OC_MEDIA_COLLECTION::getAlbumName($song['song_album']);
+ echo json_encode($song);
+ }
+ }
+ break;
case 'play':
ob_end_clean();
@@ -108,14 +124,46 @@ if($arguments['action']){
OC_MEDIA_COLLECTION::registerPlay($songId);
header('Content-Type:'.$ftype);
+ // calc an offset of 24 hours
+ $offset = 3600 * 24;
+ // calc the string in GMT not localtime and add the offset
+ $expire = "Expires: " . gmdate("D, d M Y H:i:s", time() + $offset) . " GMT";
+ //output the HTTP header
+ Header($expire);
header('Expires: 0');
- header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
+ header('Cache-Control: max-age=3600, must-revalidate');
header('Pragma: public');
+ header('Accept-Ranges: bytes');
header('Content-Length: '.OC_Filesystem::filesize($arguments['path']));
+ $gmt_mtime = gmdate('D, d M Y H:i:s', OC_Filesystem::filemtime($arguments['path']) ) . ' GMT';
+ header("Last-Modified: " . $gmt_mtime );
OC_Filesystem::readfile($arguments['path']);
exit;
+ case 'find_music':
+ echo json_encode(findMusic());
+ exit;
+ }
+}
+
+function findMusic($path='/'){
+ $music=array();
+ $dh=OC_Filesystem::opendir($path);
+ if($dh){
+ while($filename=readdir($dh)){
+ if($filename[0]!='.'){
+ $file=$path.'/'.$filename;
+ if(OC_Filesystem::is_dir($file)){
+ $music=array_merge($music,findMusic($file));
+ }else{
+ if(OC_MEDIA_SCANNER::isMusic($filename)){
+ $music[]=$file;
+ }
+ }
+ }
+ }
}
+ return $music;
}
?> \ No newline at end of file
diff --git a/apps/media/appinfo/app.php b/apps/media/appinfo/app.php
index b29b842d23a..4cdb36d4504 100644
--- a/apps/media/appinfo/app.php
+++ b/apps/media/appinfo/app.php
@@ -22,14 +22,11 @@
require_once('apps/media/lib_media.php');
-if(OC_App::getCurrentApp()=='files'){
- OC_Util::addScript('media','files');
-}
+OC_Util::addScript('media','loader');
OC_App::register( array( 'order' => 3, 'id' => 'media', 'name' => 'Media' ));
-OC_App::addNavigationEntry( array( 'id' => 'media_index', 'order' => 2, 'href' => OC_Helper::linkTo( 'media', 'index.php' ), 'icon' => OC_Helper::imagePath( 'media', 'media.png' ), 'name' => 'Media' ));
-OC_App::addSettingsPage( array( 'id' => 'media_settings', 'order' => 5, 'href' => OC_Helper::linkTo( 'media', 'settings.php' ), 'name' => 'Media', 'icon' => OC_Helper::imagePath( 'media', 'media.png' )));
+OC_App::addNavigationEntry( array( 'id' => 'media_index', 'order' => 2, 'href' => OC_Helper::linkTo( 'media', 'index.php' ), 'icon' => OC_Helper::imagePath( 'media', 'media.png' ), 'name' => 'Music' ));
// add subnavigations
$entry = array(
diff --git a/apps/media/index.php b/apps/media/index.php
index 43423d27de6..a7128aaad42 100644
--- a/apps/media/index.php
+++ b/apps/media/index.php
@@ -37,6 +37,7 @@ OC_Util::addScript('media','player');
OC_Util::addScript('media','music');
OC_Util::addScript('media','playlist');
OC_Util::addScript('media','collection');
+OC_Util::addScript('media','scanner');
OC_Util::addScript('media','jquery.jplayer.min');
OC_Util::addStyle('media','player');
OC_Util::addStyle('media','music');
diff --git a/apps/media/js/collection.js b/apps/media/js/collection.js
index 95e5293ea48..520ce7d1129 100644
--- a/apps/media/js/collection.js
+++ b/apps/media/js/collection.js
@@ -32,6 +32,10 @@ Collection={
for(var i=0;i<Collection.loadedListeners.length;i++){
Collection.loadedListeners[i]();
}
+ if(collection.length==0){
+ $('#scan input.start').val('Scan Collection');
+ $('#plugins a[href="#collection"]').trigger('click');
+ }
}
});
@@ -159,6 +163,35 @@ Collection={
}
}
}
+ },
+ addSong:function(song){
+ var artist=false
+ var album=false;
+ for(var i=0;i<Collection.artists.length;i++){
+ if(Collection.artists[i].artist_id==song.song_artist){
+ artist=Collection.artists[i];
+ for(var j=0;j<artist.albums.length;j++){
+ if(artist.albums[j].album_id==song.song_album){
+ album=artist.albums[j];
+ break;
+ }
+ }
+ break;
+ }
+ }
+ if(!artist){
+ artist={artist_id:song.song_artist,artist_name:song.artist,albums:[]};
+ Collection.artists.push(artist);
+ if(!Collection.parent || Collection.parent.is(":visible")){
+ Collection.display();
+ }
+
+ }
+ if(!album){
+ album={album_id:song.song_album,album_name:song.album,album_artist:song.song_artist,songs:[]};
+ artist.albums.push(album)
+ }
+ album.songs.push(song)
}
}
@@ -173,4 +206,13 @@ $(document).ready(function(){
$(this).parent().toggleClass('active');
Collection.showSongs($(this).parent());
});
+ Collection.parent.hide();
+ $('#scan input.start').click(function(){
+ $('#scan input.start').hide();
+ $('#scan input.stop').show();
+ $('#scan input.stop').click(function(){
+ Scanner.toggle();
+ });
+ Scanner.scanCollection();
+ });
});
diff --git a/apps/media/js/files.js b/apps/media/js/loader.js
index 307c6012a26..b7ef2fb7be4 100644
--- a/apps/media/js/files.js
+++ b/apps/media/js/loader.js
@@ -43,8 +43,17 @@ $(document).ready(function() {
// FileActions.register('audio','Add to playlist','',addAudio);
// FileActions.register('application/ogg','Add to playlist','',addAudio);
- FileActions.register('audio','Play','',playAudio);
- FileActions.register('application/ogg','','Play',playAudio);
- FileActions.setDefault('audio','Play');
- FileActions.setDefault('application/ogg','Play');
+ if(typeof FileActions!=='undefined'){
+ FileActions.register('audio','Play','',playAudio);
+ FileActions.register('application/ogg','','Play',playAudio);
+ FileActions.setDefault('audio','Play');
+ FileActions.setDefault('application/ogg','Play');
+ }
+ if(typeof PlayList==='undefined'){
+ if(typeof localStorage !== 'undefined' && localStorage){
+ if(localStorage.hasOwnProperty(oc_current_user+'oc_playlist_items') && localStorage.getItem(oc_current_user+'oc_playlist_items')!='[]' && localStorage.getItem(oc_current_user+'oc_playlist_active')!='true'){
+ loadPlayer();
+ }
+ }
+ }
}); \ No newline at end of file
diff --git a/apps/media/js/music.js b/apps/media/js/music.js
index 5b77194ebc4..4e11b2951be 100644
--- a/apps/media/js/music.js
+++ b/apps/media/js/music.js
@@ -1,27 +1,29 @@
$(document).ready(function(){
//load the collection
- $('#plugins a[href="#collection"]').click(function(){
- $('#plugins li.subentry a.active').removeClass('active');
+ $('#navigation a[href="#collection"]').click(function(){
+ $('#navigation li.subentry a.active').removeClass('active');
$(this).addClass('active');
PlayList.hide();
Collection.display();
});
- $('#plugins a[href="#playlist"]').click(function(){
- $('#plugins li.subentry a.active').removeClass('active');
+ $('#navigation a[href="#playlist"]').click(function(){
+ $('#navigation li.subentry a.active').removeClass('active');
$(this).addClass('active');
PlayList.render();
Collection.hide();
});
var tab=window.location.href.slice(window.location.href.indexOf('#') + 1);
- if(tab=='collection'){
- $('#plugins a[href="#collection"]').trigger('click');
- }
+ PlayList.init('mp3',function(){
+ if(tab=='collection'){
+ $('#navigation a[href="#collection"]').trigger('click');
+ }
+ });
OC.search.customResults.Music=function(row,item){
var parts=item.link.substr(item.link.indexOf('#')+1).split('&');
var data={};
for(var i=0;i<parts.length;i++){
var itemParts=parts[i].split('=');
- data[itemParts[0]]=decodeURIComponent(itemParts[1]).replace(/\+/g,' ');
+ data[itemParts[0]]=itemParts[1].replace(/\+/g,' ');
}
var media=Collection.find(data.artist,data.album,data.song);
var a=row.find('a');
@@ -52,7 +54,7 @@ function getUrlVars(){
{
hash = hashes[i].split('=');
vars.push(hash[0]);
- vars[hash[0]] = decodeURIComponent(hash[1]).replace(/\+/g,' ');
+ vars[hash[0]] = hash[1].replace(/\+/g,' ');
}
return vars;
}
diff --git a/apps/media/js/player.js b/apps/media/js/player.js
index ebb8044598c..4e1cc3cd754 100644
--- a/apps/media/js/player.js
+++ b/apps/media/js/player.js
@@ -3,6 +3,8 @@ var PlayList={
current:-1,
items:[],
player:null,
+ volume:0.8,
+ active:false,
next:function(){
var next=PlayList.current+1;
if(next>=PlayList.items.length){
@@ -19,7 +21,7 @@ var PlayList={
PlayList.play(next);
PlayList.render();
},
- play:function(index){
+ play:function(index,time,ready){
if(index==null){
index=PlayList.current;
}
@@ -28,14 +30,29 @@ var PlayList={
if(PlayList.player){
if(PlayList.player.data('jPlayer').options.supplied!=PlayList.items[index].type){//the the audio type changes we need to reinitialize jplayer
PlayList.player.jPlayer("destroy");
- PlayList.init(PlayList.items[index].type,PlayList.play);
+ PlayList.init(PlayList.items[index].type,function(){PlayList.play(null,time,eady)});
}else{
PlayList.player.jPlayer("setMedia", PlayList.items[PlayList.current]);
PlayList.items[index].playcount++;
- PlayList.player.jPlayer("play");
- if(Collection){
+ PlayList.player.jPlayer("play",time);
+ if(index>0){
+ var previous=index-1;
+ }else{
+ var previous=PlayList.items.length-1;
+ }
+ if(index+1<PlayList.items.length){
+ var next=index+1;
+ }else{
+ var next=0;
+ }
+ $('.jp-next').attr('title',PlayList.items[next].name);
+ $('.jp-previous').attr('title',PlayList.items[previous].name);
+ if (typeof Collection !== 'undefined') {
Collection.registerPlay();
}
+ if(ready){
+ ready();
+ }
}
}else{
PlayList.init(PlayList.items[index].type,PlayList.play);
@@ -60,12 +77,20 @@ var PlayList={
}
$(PlayList.player).jPlayer({
ended:PlayList.next,
+ pause:function(){
+ localStorage.setItem(oc_current_user+'oc_playlist_playing','false');
+ },
+ play:function(){
+ localStorage.setItem(oc_current_user+'oc_playlist_playing','true');
+ },
supplied:type,
ready:function(){
+ PlayList.load();
if(ready){
ready();
}
},
+ volume:PlayList.volume,
cssSelectorAncestor:'#jp-interface',
swfPath:OC.linkTo('media','js'),
});
@@ -96,7 +121,12 @@ var PlayList={
},
addFile:function(path){
var type=musicTypeFromFile(path);
- var item={name:'unknown',artist:'unknown',album:'unknwon',type:type};//todo get song data
+ var item={name:'unknown',artist:'unknown',album:'unknwon',type:type};
+ $.getJSON(OC.filePath('media','ajax','api.php')+'?action=get_path_info&path='+encodeURIComponent(path),function(song){
+ item.name=song.song_name;
+ item.artist=song.artist;
+ item.album=song.album;
+ });
item[type]=PlayList.urlBase+encodeURIComponent(path);
PlayList.items.push(item);
},
@@ -111,5 +141,53 @@ var PlayList={
}else{
return !PlayList.player.data("jPlayer").status.paused;
}
+ },
+ save:function(){
+ if(typeof localStorage !== 'undefined' && localStorage){
+ localStorage.setItem(oc_current_user+'oc_playlist_items',JSON.stringify(PlayList.items));
+ localStorage.setItem(oc_current_user+'oc_playlist_current',PlayList.current);
+ var time=Math.round(PlayList.player.data('jPlayer').status.currentTime);
+ localStorage.setItem(oc_current_user+'oc_playlist_time',time);
+ var volume=PlayList.player.data('jPlayer').options.volume*100;
+ localStorage.setItem(oc_current_user+'oc_playlist_volume',volume);
+ if(PlayList.active){
+ localStorage.setItem(oc_current_user+'oc_playlist_active','false');
+ }
+ }
+ },
+ load:function(){
+ if(typeof localStorage !== 'undefined' && localStorage){
+ PlayList.active=true;
+ localStorage.setItem(oc_current_user+'oc_playlist_active','true');
+ if(localStorage.hasOwnProperty(oc_current_user+'oc_playlist_items')){
+ PlayList.items=JSON.parse(localStorage.getItem(oc_current_user+'oc_playlist_items'));
+ if(PlayList.items.length>0){
+ PlayList.current=parseInt(localStorage.getItem(oc_current_user+'oc_playlist_current'));
+ var time=parseInt(localStorage.getItem(oc_current_user+'oc_playlist_time'));
+ if(localStorage.hasOwnProperty(oc_current_user+'oc_playlist_volume')){
+ var volume=localStorage.getItem(oc_current_user+'oc_playlist_volume');
+ PlayList.volume=volume/100;
+ $('.jp-volume-bar-value').css('width',volume+'%');
+ if(PlayList.player.data('jPlayer')){
+ PlayList.player.jPlayer("option",'volume',volume/100);
+ }
+ }
+ if(JSON.parse(localStorage.getItem(oc_current_user+'oc_playlist_playing'))){
+ PlayList.play(null,time);
+ }else{
+ PlayList.play(null,time,function(){
+ PlayList.player.jPlayer("pause");
+ });
+ }
+ PlayList.render();
+ }
+ }
+ }
}
}
+
+$(document).ready(function(){
+ $(window).bind('beforeunload', function (){
+ PlayList.save();
+ });
+})
diff --git a/apps/media/js/playlist.js b/apps/media/js/playlist.js
index 54fe5b792e7..a15c34f93f9 100644
--- a/apps/media/js/playlist.js
+++ b/apps/media/js/playlist.js
@@ -135,6 +135,7 @@ function procesSelection(){
});
PlayList.items=PlayList.items.filter(function(item){return item!==null});
PlayList.render();
+ PlayList.save();
procesSelection();
});
}
diff --git a/apps/media/js/scanner.js b/apps/media/js/scanner.js
new file mode 100644
index 00000000000..165f86d05f5
--- /dev/null
+++ b/apps/media/js/scanner.js
@@ -0,0 +1,78 @@
+Scanner={
+ songsFound:0,
+ songsScanned:0,
+ songsChecked:0,
+ startTime:null,
+ endTime:null,
+ stopScanning:false,
+ currentIndex:-1,
+ songs:[],
+ findSongs:function(ready){
+ $.getJSON(OC.linkTo('media','ajax/api.php')+'?action=find_music',function(songs){
+ Scanner.songsFound=songs.length;
+ Scanner.currentIndex=-1
+ if(ready){
+ ready(songs)
+ }
+ });
+ },
+ scanFile:function(path,ready){
+ path=encodeURIComponent(path);
+ $.getJSON(OC.linkTo('media','ajax/api.php')+'?action=get_path_info&path='+path,function(song){
+ Scanner.songsChecked++;
+ if(ready){
+ ready(song);
+ }
+ if(song){//do this after the ready call so we dont hold up the next ajax call
+ var artistId=song.song_artist;
+ Scanner.songsScanned++;
+ $('#scan span.songCount').text(Scanner.songsScanned);
+ var progress=(Scanner.songsChecked/Scanner.songsFound)*100;
+ $('#scanprogressbar').progressbar('value',progress)
+ Collection.addSong(song);
+ }
+ });
+ },
+ scanCollection:function(ready){
+ $('#scanprogressbar').progressbar({
+ value:0,
+ });
+ Scanner.songsChecked=0;
+ Scanner.songsScanned=0;
+ Scanner.startTime=new Date().getTime()/1000;
+ Scanner.findSongs(function(songs){
+ Scanner.songs=songs;
+ Scanner.start();
+ });
+ },
+ stop:function(){
+ Scanner.stopScanning=true;
+ },
+ start:function(ready){
+ Scanner.stopScanning=false;
+ $('#scancount').show();
+ var scanSong=function(){
+ Scanner.currentIndex++;
+ if(!Scanner.stopScanning && Scanner.currentIndex<Scanner.songs.length){
+ Scanner.scanFile(Scanner.songs[Scanner.currentIndex],scanSong)
+ }else{
+ Scanner.endTime=new Date().getTime()/1000;
+ if(ready){
+ ready();
+ }
+ }
+ }
+ scanSong();
+ scanSong();
+ },
+ toggle:function(){
+ if(Scanner.stopScanning){
+ Scanner.start();
+ $('#scan input.stop').val('Pause');
+ }else{
+ Scanner.stop();
+ $('#scan input.stop').val('Resume');
+ }
+ }
+
+}
diff --git a/apps/media/lib_collection.php b/apps/media/lib_collection.php
index 5a16aaee848..4721202690c 100644
--- a/apps/media/lib_collection.php
+++ b/apps/media/lib_collection.php
@@ -28,6 +28,7 @@ class OC_MEDIA_COLLECTION{
private static $artistIdCache=array();
private static $albumIdCache=array();
private static $songIdCache=array();
+ private static $queries=array();
/**
* get the id of an artist (case-insensitive)
@@ -123,14 +124,9 @@ class OC_MEDIA_COLLECTION{
if(!$exact and $search!='%'){
$search="%$search%";
}
- $query=OC_DB::prepare("SELECT DISTINCT *PREFIX*media_artists.artist_name AS name , *PREFIX*media_artists.artist_id AS id FROM *PREFIX*media_artists
+ $query=OC_DB::prepare("SELECT DISTINCT *PREFIX*media_artists.artist_name AS artist_name , *PREFIX*media_artists.artist_id AS artist_id FROM *PREFIX*media_artists
INNER JOIN *PREFIX*media_songs ON *PREFIX*media_artists.artist_id=*PREFIX*media_songs.song_artist WHERE artist_name LIKE ? AND *PREFIX*media_songs.song_user=?");
- $artists=$query->execute(array($search,OC_User::getUser()))->fetchAll();
- $result=array();
- foreach($artists as $artist){
- $result[]=array('artist_name'=>$artist['name'],'artist_id'=>$artist['id']);
- }
- return $result;
+ return $query->execute(array($search,OC_User::getUser()))->fetchAll();
}
/**
@@ -148,7 +144,7 @@ class OC_MEDIA_COLLECTION{
if($artistId!=0){
return $artistId;
}else{
- $query=OC_DB::prepare("INSERT INTO `*PREFIX*media_artists` (`artist_id` ,`artist_name`) VALUES (NULL , ?)");
+ $query=OC_DB::prepare("INSERT INTO `*PREFIX*media_artists` (`artist_id` ,`artist_name`) VALUES (NULL , ?)");
$result=$query->execute(array($name));
return self::getArtistId($name);;
}
@@ -161,28 +157,22 @@ class OC_MEDIA_COLLECTION{
* @return array the list of albums found
*/
static public function getAlbums($artist=0,$search='%',$exact=false){
- $cmd="SELECT * FROM *PREFIX*media_albums WHERE 1=1 ";
- $params=array();
+ $cmd="SELECT DISTINCT *PREFIX*media_albums.album_name AS album_name , *PREFIX*media_albums.album_artist AS album_artist , *PREFIX*media_albums.album_id AS album_id
+ FROM *PREFIX*media_albums INNER JOIN *PREFIX*media_songs ON *PREFIX*media_albums.album_id=*PREFIX*media_songs.song_album WHERE *PREFIX*media_songs.song_user=? ";
+ $params=array(OC_User::getUser());
if($artist!=0){
- $cmd.="AND album_artist = ? ";
+ $cmd.="AND *PREFIX*media_albums.album_artist = ? ";
array_push($params,$artist);
}
if($search!='%'){
- $cmd.="AND album_name LIKE ? ";
+ $cmd.="AND *PREFIX*media_albums.album_name LIKE ? ";
if(!$exact){
$search="%$search%";
}
array_push($params,$search);
}
$query=OC_DB::prepare($cmd);
- $albums=$query->execute($params)->fetchAll();
- $result=array();
- foreach($albums as $album){
- if(count(self::getSongs($album['album_artist'],$album['album_id']))){
- $result[]=$album;
- }
- }
- return $result;
+ return $query->execute($params)->fetchAll();
}
/**
@@ -242,12 +232,7 @@ class OC_MEDIA_COLLECTION{
$searchString='';
}
$query=OC_DB::prepare("SELECT * FROM *PREFIX*media_songs WHERE song_user=? $artistString $albumString $searchString");
- $songs=$query->execute($params)->fetchAll();
- if(is_array($songs)){
- return $songs;
- }else{
- return array();
- }
+ return $query->execute($params)->fetchAll();
}
/**
@@ -270,8 +255,13 @@ class OC_MEDIA_COLLECTION{
if($songId!=0){
return $songId;
}else{
- $query=OC_DB::prepare("INSERT INTO `*PREFIX*media_songs` (`song_id` ,`song_name` ,`song_artist` ,`song_album` ,`song_path` ,`song_user`,`song_length`,`song_track`,`song_size`,`song_playcount`,`song_lastplayed`)
- VALUES (NULL , ?, ?, ?, ?,?,?,?,?,0,0)");
+ if(!isset(self::$queries['addsong'])){
+ $query=OC_DB::prepare("INSERT INTO `*PREFIX*media_songs` (`song_name` ,`song_artist` ,`song_album` ,`song_path` ,`song_user`,`song_length`,`song_track`,`song_size`,`song_playcount`,`song_lastplayed`)
+ VALUES (?, ?, ?, ?,?,?,?,?,0,0)");
+ self::$queries['addsong']=$query;
+ }else{
+ $query=self::$queries['addsong'];
+ }
$query->execute(array($name,$artist,$album,$path,$uid,$length,$track,$size));
$songId=OC_DB::insertid();
// self::setLastUpdated();
diff --git a/apps/media/lib_scanner.php b/apps/media/lib_scanner.php
index e3cb2f051ce..c774c3c9fdb 100644
--- a/apps/media/lib_scanner.php
+++ b/apps/media/lib_scanner.php
@@ -30,6 +30,7 @@ class OC_MEDIA_SCANNER{
//these are used to store which artists and albums we found, it can save a lot of addArtist/addAlbum calls
static private $artists=array();
static private $albums=array();//stored as "$artist/$album" to allow albums with the same name from different artists
+ static private $useMp3Info=null;
/**
* scan a folder for music
@@ -46,7 +47,8 @@ class OC_MEDIA_SCANNER{
if(OC_Filesystem::is_dir($file)){
$songs+=self::scanFolder($file);
}elseif(OC_Filesystem::is_file($file)){
- if(self::scanFile($file)){
+ $data=self::scanFile($file);
+ if($data){
$songs++;
}
}
@@ -68,45 +70,27 @@ class OC_MEDIA_SCANNER{
* @return boolean
*/
public static function scanFile($path){
+ if(is_null(self::$useMp3Info)){
+ self::$useMp3Info=OC_Helper::canExecute("mp3info");
+ }
$file=OC_Filesystem::getLocalFile($path);
- if(substr($path,-3)=='mp3' and OC_Helper::canExecute("id3info") and OC_Helper::canExecute("mp3info")){//use the command line tool id3info if possible
+ if(substr($path,-3)=='mp3' and self::$useMp3Info){//use the command line tool id3info if possible
$output=array();
$size=filesize($file);
- $length=0;
- $title='unknown';
- $album='unknown';
- $artist='unknown';
- $track=0;
- exec('id3info "'.$file.'"',$output);
- $data=array();
- foreach($output as $line) {
- switch(substr($line,0,3)){
- case '***'://comments
- break;
- case '==='://tag information
- $key=substr($line,4,4);
- $value=substr($line,strpos($line,':')+2);
- switch(strtolower($key)){
- case 'tit1':
- case 'tit2':
- $title=$value;
- break;
- case 'tpe1':
- case 'tpe2':
- $artist=$value;
- break;
- case 'talb':
- $album=$value;
- break;
- case 'trck':
- $track=$value;
- break;
- }
- break;
- }
+ exec('mp3info -p "%a\n%l\n%t\n%n\n%S" "'.$file.'"',$output);
+ if(count($output)>4){
+ $artist=$output[0];
+ $album=$output[1];
+ $title=$output[2];
+ $track=$output[3];
+ $length=$output[4];
+ }else{
+ return; //invalid mp3 file
}
- $length=exec('mp3info -p "%S" "'.$file.'"');
}else{
+ if(!self::isMusic($path)){
+ return;
+ }
if(!self::$getID3){
self::$getID3=@new getID3();
}
@@ -154,6 +138,16 @@ class OC_MEDIA_SCANNER{
$albumId=self::$albums[$artist.'/'.$album];
}
$songId=OC_MEDIA_COLLECTION::addSong($title,$path,$artistId,$albumId,$length,$track,$size);
- return !($title=='unkown' && $artist=='unkown' && $album=='unkown');
+ return (!($title=='unkown' && $artist=='unkown' && $album=='unkown'))?$songId:0;
+ }
+
+ /**
+ * quick check if a song is a music file by checking the extention, not as good as a proper mimetype check but way faster
+ * @param string $filename
+ * @return bool
+ */
+ public static function isMusic($filename){
+ $ext=substr($filename,strrpos($filename,'.')+1);
+ return $ext=='mp3' || $ext=='flac' || $ext=='m4a' || $ext=='ogg' || $ext=='oga';
}
} \ No newline at end of file
diff --git a/apps/media/settings.php b/apps/media/settings.php
deleted file mode 100644
index 0563bc38fb3..00000000000
--- a/apps/media/settings.php
+++ /dev/null
@@ -1,52 +0,0 @@
-<?php
-
-/**
-* ownCloud - media plugin
-*
-* @author Robin Appelman
-* @copyright 2010 Robin Appelman icewind1991@gmail.com
-*
-* This library is free software; you can redistribute it and/or
-* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
-* License as published by the Free Software Foundation; either
-* version 3 of the License, or any later version.
-*
-* This library is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this library. If not, see <http://www.gnu.org/licenses/>.
-*
-*/
-
-
-require_once('../../lib/base.php');
-
-if( !OC_User::isLoggedIn()){
- header( "Location: ".OC_Helper::linkTo( "index.php" ));
- exit();
-}
-
-require( 'lib_collection.php' );
-
-OC_Util::addStyle('media','style');
-OC_Util::addScript('media','settings');
-
-OC_App::setActiveNavigationEntry( 'media_settings' );
-
-$folderNames=explode(PATH_SEPARATOR,OC_Preferences::getValue($_SESSION['user_id'],'media','paths',''));
-$folders=array();
-foreach($folderNames as $folder){
- if($folder){
- $folders[]=array('name'=>$folder,'songs'=>OC_MEDIA_COLLECTION::getSongCountByPath($folder));
- }
-}
-
-$tmpl = new OC_Template( 'media', 'settings', 'admin' );
-$tmpl->assign('folders',$folders);
-$tmpl->assign('autoupdate',OC_Preferences::getValue($_SESSION['user_id'],'media','autoupdate',false));
-$tmpl->printPage();
-?>
-
diff --git a/apps/media/templates/collection.php b/apps/media/templates/collection.php
index e2c256a6480..f47cba24868 100644
--- a/apps/media/templates/collection.php
+++ b/apps/media/templates/collection.php
@@ -1,3 +1,9 @@
+<div id='scan'>
+ <p id='scancount' style='display:none'><span class='songCount'>0</span> Songs scanned</p>
+ <div id="scanprogressbar"></div>
+ <input type='button' class='start' value='Recan Collection'></input>
+ <input type='button' class='stop' style='display:none' value='Pause'></input>
+</div>
<ul id='collection'>
<li class='artist'>
<img src="<?php echo image_path('files','loading.gif') ?>" alt='loading'/>Loading Collection...
@@ -7,4 +13,5 @@
<button class='add'>Add</button>
<button class='play'>Play</button>
</li>
-</ul> \ No newline at end of file
+</ul>
+
diff --git a/apps/user_openid/appinfo/app.php b/apps/user_openid/appinfo/app.php
index 74c13402caf..93b178ac706 100644
--- a/apps/user_openid/appinfo/app.php
+++ b/apps/user_openid/appinfo/app.php
@@ -6,12 +6,20 @@ if (!in_array ('curl', get_loaded_extensions())){
}
$urlBase=((isset($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == 'on') ? 'https' : 'http').'://'.$_SERVER['HTTP_HOST'];
-OC_Util::addHeader('link',array('rel'=>'openid.server', 'href'=>$urlBase.OC_Helper::linkTo( "user_openid", "user.php" ).'/'));
-OC_Util::addHeader('link',array('rel'=>'openid.delegate', 'href'=>$urlBase.OC_Helper::linkTo( "user_openid", "user.php" ).'/'));
-require_once 'apps/user_openid/user_openid.php';
+$userName='';
+if(strpos($_SERVER["REQUEST_URI"],'?') and !strpos($_SERVER["REQUEST_URI"],'=')){
+ if(strpos($_SERVER["REQUEST_URI"],'/?')){
+ $userName=substr($_SERVER["REQUEST_URI"],strpos($_SERVER["REQUEST_URI"],'/?')+2);
+ }elseif(strpos($_SERVER["REQUEST_URI"],'.php?')){
+ $userName=substr($_SERVER["REQUEST_URI"],strpos($_SERVER["REQUEST_URI"],'.php?')+5);
+ }
+}
-OC_App::addSettingsPage( array( "id" => "user_openid_settings", 'order'=>1, "href" => OC_Helper::linkTo( "user_openid", "settings.php" ), "name" => "OpenID"));
+OC_Util::addHeader('link',array('rel'=>'openid.server', 'href'=>$urlBase.OC_Helper::linkTo( "user_openid", "user.php" ).'/'.$userName));
+OC_Util::addHeader('link',array('rel'=>'openid.delegate', 'href'=>$urlBase.OC_Helper::linkTo( "user_openid", "user.php" ).'/'.$userName));
+
+require_once 'apps/user_openid/user_openid.php';
//active the openid backend
OC_User::useBackend('openid');
diff --git a/apps/user_openid/phpmyid.php b/apps/user_openid/phpmyid.php
index bcab9e55cbb..24fab44ca7a 100644
--- a/apps/user_openid/phpmyid.php
+++ b/apps/user_openid/phpmyid.php
@@ -1646,12 +1646,12 @@ $profile['req_url'] = sprintf("%s://%s%s",
// $port,//host already includes the path
$_SERVER["REQUEST_URI"]);
-$fullId='user.php/'.$USERNAME.'/';
-$incompleteId='user.php/';
+// $fullId='user.php/'.$USERNAME.'/';
+// $incompleteId='user.php/';
-if(!strpos($profile['req_url'],$fullId)){
- $profile['req_url']=str_replace($incompleteId,$fullId,$profile['req_url']);
-}
+// if(!strpos($profile['req_url'],$fullId)){
+// $profile['req_url']=str_replace($incompleteId,$fullId,$profile['req_url']);
+// }
// error_log('inc id: '.$fullId);
// error_log('req url: '.$profile['req_url']);
diff --git a/apps/user_openid/settings.php b/apps/user_openid/settings.php
deleted file mode 100644
index 4293a6c8aaf..00000000000
--- a/apps/user_openid/settings.php
+++ /dev/null
@@ -1,23 +0,0 @@
-<?php
-
-require_once('../../lib/base.php');
-if( !OC_User::isLoggedIn()){
- header( "Location: ".OC_Helper::linkTo( "index.php" ));
- exit();
-}
-
-if(isset($_POST['input_identity'])){
- OC_Preferences::setValue(OC_User::getUser(),'user_openid','identity',$_POST['input_identity']);
-}
-
-OC_App::setActiveNavigationEntry( "user_openid_settings" );
-
-$identity=OC_Preferences::getValue(OC_User::getUser(),'user_openid','identity','');
-
-$tmpl = new OC_Template( "user_openid", "settings", "admin");
-$tmpl->assign('identity',$identity);
-$tmpl->assign('user',OC_User::getUser());
-
-$tmpl->printPage();
-
-?>
diff --git a/apps/user_openid/templates/settings.php b/apps/user_openid/templates/settings.php
deleted file mode 100644
index 7a1b530fbca..00000000000
--- a/apps/user_openid/templates/settings.php
+++ /dev/null
@@ -1,7 +0,0 @@
-<form id="identity" action='#' method='post'>
- <fieldset>
- <legend><?php echo $l->t( 'OpenID identity' );?></legend>
- <label for='input_identity'>OpenID identity for <b><?php echo $_['user'];?></b></label><br/>
- <input name='input_identity' id='input_identity' value="<?php echo $_['identity'];?>"/><input type='submit' value='Save'/>
- </fieldset>
-</form>
diff --git a/core/css/styles.css b/core/css/styles.css
index eb6b04d28df..e83f0634993 100644
--- a/core/css/styles.css
+++ b/core/css/styles.css
@@ -1,13 +1,13 @@
* { margin:0; padding:0; border:0; cursor:default; }
-body { background:#fefefe url('../img/body_background.jpg') repeat-y left top; font:normal 80%/1.6em "Lucida Grande", Arial, Verdana, sans-serif; color:#000; }
-#header { position:fixed; top:0; z-index:100; width:100%; height:2.5em; padding:0.5em 1.5em; background:#1d2d44; -moz-box-shadow:0 0 10px #000, inset 0 -2px 10px #222; -webkit-box-shadow:0 0 10px #000, inset 0 -2px 10px #222; box-shadow:0 0 10px #000, inset 0 -2px 10px #222; }
+body { background:#fefefe; font:normal 80%/1.6em "Lucida Grande", Arial, Verdana, sans-serif; color:#000; }
+#header { position:fixed; top:0; z-index:100; width:100%; height:2.5em; padding:.5em; background:#1d2d44; -moz-box-shadow:0 0 10px #000, inset 0 -2px 10px #222; -webkit-box-shadow:0 0 10px #000, inset 0 -2px 10px #222; box-shadow:0 0 10px #000, inset 0 -2px 10px #222; }
#body-settings #header { background:#313131; }
#owncloud { float:left; }
h1 { margin:1em 3em 1em 0; border-bottom:1px solid #666; text-transform:uppercase; font-weight:normal; font-style:italic; color:#666; }
p.center { text-align:center; }
a { color:#000; text-decoration:none; outline:0; }
table { white-space:nowrap; }
-input, select { background:#fff; color:#333; }
+input, select { background:#fff; color:#333; outline:0; }
a, a img, a strong, a span, input, button, select, li { cursor:pointer; }
input[type="text"], input[type="password"] { cursor:text; }
@@ -18,8 +18,7 @@ form p.form_footer { margin:1em 0 0 0; text-align:right; }
form label { cursor:pointer; }
form input { padding:0.2em; border:1px solid #ddd; font-size:1.2em; }
form input[type="submit"] { padding:0.1em 1em; border:1px solid #999; font-weight:bold; font-size:0.9em; cursor:pointer; }
-form input[type="submit"]:hover, form input[type="submit"]:focus { border:1px solid #999; background-color:#999; outline:0; }
-form input[type="submit"]:active { outline:0; }
+form input[type="submit"]:hover, form input[type="submit"]:focus { border:1px solid #999; background-color:#999; }
form input[type="button"], form input[type="text"] { font-size:0.9em; }
fieldset { padding:1em; background-color:#f7f7f7; border:1px solid #ddd; max-width:600px; margin:2em 2em 2em 3em; }
legend { padding:0.5em; font-size:1.2em; }
@@ -72,7 +71,7 @@ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#35537a', end
.prettybutton:hover, .prettybutton:focus { background-color:#ccc; outline:0; }
/* META NAVIGATION (Settings, Log out) ---------------------------------------------------------------- */
-#metanav { float:right; position:relative; top:0.5em; right:2.5em; list-style:none; margin:0; padding:0; }
+#metanav { float:right; position:relative; top:.5em; right:1em; list-style:none; margin:0; padding:0; }
#metanav li { display:inline; }
#metanav li a { margin:.2em; padding:.7em; }
#metanav li a:hover, #metanav li a:focus { background:rgba(0,0,0,.5); -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px; box-shadow:#555 0 1px 0; -moz-box-shadow:#555 0 1px 0; -webkit-box-shadow:#555 0 1px 0; }
@@ -83,17 +82,17 @@ form.searchbox { display:inline; position:fixed; top:.9em; right:9em; margin:0;
input[type="search"] { font-size:1em; padding-left:2em; background:#eee url('../img/actions/search.png') .5em center no-repeat; }
/* NAVIGATION ------------------------------------------------------------- */
-#plugins { position:fixed; top:3.5em; float:left; width:15.7em; padding:0; z-index:50; }
-#plugins ul { list-style-type:none; border-top:1px solid #ccc; }
-#plugins a { display:block; padding:0.5em 0.5em 0.5em 3em; background-position:1.5em center; background-repeat:no-repeat; border-bottom:1px solid #ddd; border-top:1px solid #fff; text-decoration:none; font-size:1.2em; color:#666; }
-#plugins a.active, #plugins a:hover, #plugins a:focus, #plugins a.selected { background-color:#ccc; border-top:1px solid #ccc; border-bottom:1px solid #ccc; color:#000; outline:0; }
-#plugins a:active { outline:0; }
-#plugins .subentry { background-color:#ddd; border-top:1px solid #aaa; color:#000; outline:0; }
-#plugins .subentry.active { background-color:#bbb; border-top:1px solid #aaa; color:#000; outline:0; }
-#plugins li.subentry a { padding-left:3.7em; font-size:1em; }
+#navigation { position:fixed; top:3.5em; float:left; width:12.5em; padding:0; z-index:50; height:100%; background:#eee; border-right: 1px #ccc solid; -moz-box-shadow: -3px 0 7px #000; -webkit-box-shadow: -3px 0 7px #000; box-shadow: -3px 0 7px #000; } }
+#navigation ul { list-style-type:none; border-top:1px solid #ccc; }
+#navigation a { display:block; padding:.5em .5em .5em 2.5em; background-position:1em center; background-repeat:no-repeat; border-bottom:1px solid #ddd; border-top:1px solid #fff; text-decoration:none; font-size:1.2em; color:#666; }
+#navigation a.active, #navigation a:hover, #navigation a:focus, #navigation a.selected { background-color:#ccc; border-top:1px solid #c8c8c8; border-bottom:1px solid #ccc; color:#000; }
+#navigation .subentry { background-color:#ddd; border-top:1px solid #aaa; color:#555; }
+#navigation .subentry.active { background-color:#bbb; border-top:1px solid #888; border-bottom:1px solid #bbb; }
+#navigation .subentry a { padding-left:3.1em; font-size:1em; }
/* CONTENT ------------------------------------------------------------------ */
-#content { margin:3.5em 0 0 15.7em; }
+#content { margin:3.5em 0 0 12.5em; }
+#body-settings #content { padding:1em; }
/* USER SETTINGS ------------------------------------------------------------ */
#quota_indicator { margin:0 4em 1em 0; padding:0; border:1px solid #ddd; border-radius:10px; -webkit-border-radius:10px; -moz-border-radius:10px; }
diff --git a/core/img/body_background.jpg b/core/img/body_background.jpg
deleted file mode 100644
index c3d0102f711..00000000000
--- a/core/img/body_background.jpg
+++ /dev/null
Binary files differ
diff --git a/core/js/js.js b/core/js/js.js
index a83d6abb6a5..00618cb30cf 100644
--- a/core/js/js.js
+++ b/core/js/js.js
@@ -1,3 +1,9 @@
+/**
+ * translate a string
+ * @param app the id of the app for which to translate the string
+ * @param text the string to translate
+ * @return string
+ */
function t(app,text){
if( !( app in t.cache )){
@@ -22,9 +28,22 @@ t.cache={};
OC={
webroot:oc_webroot,
coreApps:['files','admin','log','search','settings','core'],
+ /**
+ * get an absolute url to a file in an appen
+ * @param app the id of the app the file belongs to
+ * @param file the file path relative to the app folder
+ * @return string
+ */
linkTo:function(app,file){
return OC.filePath(app,'',file);
},
+ /**
+ * get the absolute url for a file in an app
+ * @param app the id of the app
+ * @param type the type of the file to link to (e.g. css,img,ajax.template)
+ * @param file the filename
+ * @return string
+ */
filePath:function(app,type,file){
var isCore=OC.coreApps.indexOf(app)!=-1;
app+='/';
@@ -39,12 +58,28 @@ OC={
link+=file;
return link;
},
+ /**
+ * get the absolute path to an image file
+ * @param app the app id to which the image belongs
+ * @param file the name of the image file
+ * @return string
+ *
+ * if no extention is given for the image, it will automatically decide between .png and .svg based on what the browser supports
+ */
imagePath:function(app,file){
if(file.indexOf('.')==-1){//if no extention is given, use png or svg depending on browser support
file+=(SVGSupport())?'.svg':'.png'
}
return OC.filePath(app,'img',file);
},
+ /**
+ * load a script for the server and load it
+ * @param app the app id to which the script belongs
+ * @param script the filename of the script
+ * @param ready event handeler to be called when the script is loaded
+ *
+ * if the script is already loaded, the event handeler will be called directly
+ */
addScript:function(app,script,ready){
var path=OC.filePath(app,'js',script+'.js');
if(OC.addStyle.loaded.indexOf(path)==-1){
@@ -60,6 +95,11 @@ OC={
}
}
},
+ /**
+ * load a css file and load it
+ * @param app the app id to which the css style belongs
+ * @param style the filename of the css file
+ */
addStyle:function(app,style){
var path=OC.filePath(app,'css',style+'.css');
if(OC.addScript.loaded.indexOf(path)==-1){
@@ -68,6 +108,10 @@ OC={
$('head').append(style);
}
},
+ /**
+ * do a search query and display the results
+ * @param query the search query
+ */
search:function(query){
if(query){
OC.addStyle('search','results');
@@ -85,6 +129,9 @@ OC.search.lastResults={};
OC.addStyle.loaded=[];
OC.addScript.loaded=[];
+/**
+ * implement Array.filter for browsers without native support
+ */
if (!Array.prototype.filter) {
Array.prototype.filter = function(fun /*, thisp*/) {
var len = this.length >>> 0;
@@ -103,6 +150,9 @@ if (!Array.prototype.filter) {
return res;
}
}
+/**
+ * implement Array.indexOf for browsers without native support
+ */
if (!Array.prototype.indexOf){
Array.prototype.indexOf = function(elt /*, from*/)
{
@@ -125,10 +175,25 @@ if (!Array.prototype.indexOf){
};
}
+/**
+ * check if the browser support svg images
+ */
function SVGSupport() {
return document.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1") || document.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#Shape", "1.0");
}
+/**
+ * prototypal inharitence functions
+ *
+ * usage:
+ * MySubObject=object(MyObject)
+ */
+function object(o) {
+ function F() {}
+ F.prototype = o;
+ return new F();
+}
+
$(document).ready(function(){
if(!SVGSupport()){//replace all svg images with png images for browser that dont support svg
$('img.svg').each(function(index,element){
diff --git a/core/js/setup.js b/core/js/setup.js
index b4616b8b14c..3025a511c61 100644
--- a/core/js/setup.js
+++ b/core/js/setup.js
@@ -1,8 +1,13 @@
$(document).ready(function() {
// Hide the MySQL config div if needed :
- if(!$('#mysql').is(':checked') && $('#hasSQLite').val()=='true') {
+ if(!$('#mysql').is(':checked')) {
$('#use_mysql').hide();
}
+
+ // Hide the PostgreSQL config div if needed:
+ if(!$('#pgsql').is(':checked')) {
+ $('#use_postgresql').hide();
+ }
$('#datadirField').hide(250);
if($('#hasSQLite').val()=='true'){
@@ -11,10 +16,17 @@ $(document).ready(function() {
$('#sqlite').click(function() {
$('#use_mysql').slideUp(250);
+ $('#use_postgresql').slideUp(250);
});
$('#mysql').click(function() {
$('#use_mysql').slideDown(250);
+ $('#use_postgresql').slideUp(250);
+ });
+
+ $('#pgsql').click(function() {
+ $('#use_postgresql').slideDown(250);
+ $('#use_mysql').slideUp(250);
});
$('#showAdvanced').click(function() {
diff --git a/core/templates/installation.php b/core/templates/installation.php
index 8b36d14bbf5..e2392778bed 100644
--- a/core/templates/installation.php
+++ b/core/templates/installation.php
@@ -39,7 +39,7 @@
<legend><?php echo $l->t( 'Configure the database.' ); ?></legend>
<?php if($_['hasSQLite']): ?>
<input type='hidden' id='hasSQLite' value='true'/>
- <?php if(!$_['hasMySQL']): ?>
+ <?php if(!$_['hasMySQL'] and !$_['hasPostgreSQL']): ?>
<p><?php echo $l->t( 'SQLite will be used for the database. You have nothing to do.' ); ?></p>
<input type="hidden" id="dbtype" name="dbtype" value="sqlite" />
<?php else: ?>
@@ -49,11 +49,11 @@
<?php if($_['hasMySQL']): ?>
<input type='hidden' id='hasMySQL' value='true'/>
- <?php if(!$_['hasSQLite']): ?>
+ <?php if(!$_['hasSQLite'] and !$_['hasPostgreSQL']): ?>
<p><?php echo $l->t( 'MySQL will be used for the database.' ); ?></p>
<input type="hidden" id="dbtype" name="dbtype" value="mysql" />
<?php else: ?>
- <p><label class="mysql" for="mysql">MySQL </label><input type="radio" name="dbtype" value='mysql' id="mysql" <?php OC_Helper::init_radio('dbtype', 'mysql', 'sqlite'); ?>/></p>
+ <p><label class="mysql" for="mysql">MySQL </label><input type="radio" name="dbtype" value='mysql' id="mysql" <?php OC_Helper::init_radio('dbtype','pgsql', 'mysql', 'sqlite'); ?>/></p>
<?php endif; ?>
<div id="use_mysql">
<p><label for="dbuser"><?php echo $l->t( 'MySQL username:' ); ?></label><input type="text" name="dbuser" id="dbuser" value="<?php print OC_Helper::init_var('dbuser'); ?>" /></p>
@@ -64,6 +64,24 @@
</div>
<?php endif; ?>
+
+ <?php if($_['hasPostgreSQL']): ?>
+ <input type='hidden' id='hasPostgreSQL' value='true'/>
+ <?php if(!$_['hasSQLite'] and !$_['hasSQLite']): ?>
+ <p><?php echo $l->t( 'PostgreSQL will be used for the database.' ); ?></p>
+ <input type="hidden" id="dbtype" name="dbtype" value="pgsql" />
+ <?php else: ?>
+ <p><label class="pgsql" for="pgsql">PostgreSQL </label><input type="radio" name="dbtype" value='pgsql' id="pgsql" <?php OC_Helper::init_radio('dbtype','pgsql', 'mysql', 'sqlite'); ?>/></p>
+ <?php endif; ?>
+ <div id="use_postgresql">
+ <p><label for="pg_dbuser"><?php echo $l->t( 'PostgreSQL username:' ); ?></label><input type="text" name="pg_dbuser" id="pg_dbuser" value="<?php print OC_Helper::init_var('dbuser'); ?>" /></p>
+ <p><label for="pg_dbpass"><?php echo $l->t( 'PostgreSQL password:' ); ?></label><input type="password" name="pg_dbpass" id="pg_dbpass" value="<?php print OC_Helper::init_var('dbpass'); ?>" /></p>
+ <p><label for="pg_dbname"><?php echo $l->t( 'Database name:' ); ?></label><input type="text" name="pg_dbname" id="pg_dbname" value="<?php print OC_Helper::init_var('dbname'); ?>" /></p>
+ <p><label for="pg_dbhost"><?php echo $l->t( 'Host:' ); ?></label><input type="text" name="pg_dbhost" id="pg_dbhost" value="<?php print OC_Helper::init_var('dbhost', 'localhost'); ?>" /></p>
+ <p><label for="pg_dbtableprefix"><?php echo $l->t( 'Table prefix:' ); ?></label><input type="text" name="pg_dbtableprefix" id="pg_dbtableprefix" value="<?php print OC_Helper::init_var('dbtableprefix', 'oc_'); ?>" /></p>
+
+ </div>
+ <?php endif; ?>
</fieldset>
<p class="submit"><input type="submit" value="<?php echo $l->t( 'Finish setup' ); ?>" /></p>
diff --git a/core/templates/layout.admin.php b/core/templates/layout.admin.php
index 3aac4c98ac5..d70c54f7b15 100644
--- a/core/templates/layout.admin.php
+++ b/core/templates/layout.admin.php
@@ -9,6 +9,7 @@
<?php endforeach; ?>
<script type="text/javascript">
var oc_webroot = '<?php global $WEBROOT; echo $WEBROOT; ?>';
+ var oc_current_user = '<?php echo OC_User::getUser() ?>';
// </script>
<?php foreach($_['jsfiles'] as $jsfile): ?>
<script type="text/javascript" src="<?php echo $jsfile; ?>"></script>
@@ -36,7 +37,7 @@
</div>
<div id="main">
- <div id="plugins">
+ <div id="navigation">
<ul>
<?php foreach($_['settingsnavigation'] as $entry):?>
<li><a style="background-image:url(<?php echo $entry['icon']; ?>)" href="<?php echo $entry['href']; ?>" title="" <?php if( $entry["active"] ): ?> class="active"<?php endif; ?>><?php echo $entry['name'] ?></a></li>
diff --git a/core/templates/layout.guest.php b/core/templates/layout.guest.php
index 5655a64d8da..0b6189ef1c9 100644
--- a/core/templates/layout.guest.php
+++ b/core/templates/layout.guest.php
@@ -4,13 +4,13 @@
<title>ownCloud</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="shortcut icon" href="<?php echo image_path('', 'favicon.png'); ?>" /><link rel="apple-touch-icon-precomposed" href="<?php echo image_path('', 'favicon-touch.png'); ?>" />
- <?php foreach($_['cssfiles'] as $cssfile): ?>
+ <?php if(isset($_['cssfiles'])) foreach($_['cssfiles'] as $cssfile): ?>
<link rel="stylesheet" href="<?php echo $cssfile; ?>" type="text/css" media="screen" />
<?php endforeach; ?>
<script type="text/javascript">
var oc_webroot = '<?php global $WEBROOT; echo $WEBROOT; ?>';
// </script>
- <?php foreach($_['jsfiles'] as $jsfile): ?>
+ <?php if(isset($_['jsfiles'])) foreach($_['jsfiles'] as $jsfile): ?>
<script type="text/javascript" src="<?php echo $jsfile; ?>"></script>
<?php endforeach; ?>
diff --git a/core/templates/layout.user.php b/core/templates/layout.user.php
index 1de0ccf80c1..a8dff9ff3d4 100644
--- a/core/templates/layout.user.php
+++ b/core/templates/layout.user.php
@@ -9,6 +9,7 @@
<?php endforeach; ?>
<script type="text/javascript">
var oc_webroot = '<?php global $WEBROOT; echo $WEBROOT; ?>';
+ var oc_current_user = '<?php echo OC_User::getUser() ?>';
// </script>
<?php foreach($_['jsfiles'] as $jsfile): ?>
<script type="text/javascript" src="<?php echo $jsfile; ?>"></script>
@@ -37,10 +38,7 @@
</div>
<div id="main">
- <div id="content">
- <?php echo $_['content']; ?>
- </div>
- <div id="plugins">
+ <div id="navigation">
<ul>
<?php foreach($_['navigation'] as $entry): ?>
<li><a style="background-image:url(<?php echo $entry['icon']; ?>)" href="<?php echo $entry['href']; ?>" title="" <?php if( $entry['active'] ): ?> class="active"<?php endif; ?>><?php echo $entry['name']; ?></a>
@@ -55,6 +53,9 @@
<?php endforeach; ?>
</ul>
</div>
+ <div id="content">
+ <?php echo $_['content']; ?>
+ </div>
</div>
</body>
</html>
diff --git a/core/templates/part.searchbox.php b/core/templates/part.searchbox.php
index 49b44c718ec..f5a62de2c8b 100644
--- a/core/templates/part.searchbox.php
+++ b/core/templates/part.searchbox.php
@@ -1,3 +1,3 @@
<form class="searchbox" action="#" method="post">
- <input id='searchbox' type="search" name="query" value="<?php if(isset($_POST['query'])){echo $_POST['query'];};?>" class="prettybutton" />
+ <input id='searchbox' type="search" name="query" value="<?php if(isset($_POST['query'])){echo $_POST['query'];};?>" class="prettybutton" autocomplete="off" />
</form>
diff --git a/db_structure.xml b/db_structure.xml
index c24c2c669ac..ddb8c44d19d 100644
--- a/db_structure.xml
+++ b/db_structure.xml
@@ -312,6 +312,102 @@
<table>
+ <name>*dbprefix*principalgroups</name>
+
+ <declaration>
+
+ <field>
+ <name>id</name>
+ <type>integer</type>
+ <default>0</default>
+ <notnull>true</notnull>
+ <autoincrement>1</autoincrement>
+ <unsigned>true</unsigned>
+ <length>4</length>
+ </field>
+
+ <field>
+ <name>principal_id</name>
+ <type>integer</type>
+ <default></default>
+ <notnull>true</notnull>
+ <unsigned>true</unsigned>
+ <length>4</length>
+ </field>
+
+ <field>
+ <name>member_id</name>
+ <type>integer</type>
+ <default></default>
+ <notnull>true</notnull>
+ <unsigned>true</unsigned>
+ <length>4</length>
+ </field>
+
+ <index>
+ <name>principals_members_index</name>
+ <unique>true</unique>
+ <field>
+ <name>principal_id</name>
+ <sorting>ascending</sorting>
+ </field>
+ <field>
+ <name>member_id</name>
+ <sorting>ascending</sorting>
+ </field>
+ </index>
+
+ </declaration>
+
+ </table>
+
+ <table>
+
+ <name>*dbprefix*principals</name>
+
+ <declaration>
+
+ <field>
+ <name>id</name>
+ <type>integer</type>
+ <default>0</default>
+ <notnull>true</notnull>
+ <autoincrement>1</autoincrement>
+ <unsigned>true</unsigned>
+ <length>4</length>
+ </field>
+
+ <field>
+ <name>uri</name>
+ <type>text</type>
+ <default></default>
+ <notnull>false</notnull>
+ <length>255</length>
+ </field>
+
+ <field>
+ <name>displayname</name>
+ <type>text</type>
+ <default></default>
+ <notnull>false</notnull>
+ <length>255</length>
+ </field>
+
+ <index>
+ <name>uri</name>
+ <unique>true</unique>
+ <field>
+ <name>uri</name>
+ <sorting>ascending</sorting>
+ </field>
+ </index>
+
+ </declaration>
+
+ </table>
+
+ <table>
+
<name>*dbprefix*properties</name>
<declaration>
diff --git a/files/css/files.css b/files/css/files.css
index d852106d09b..b01d52b43be 100644
--- a/files/css/files.css
+++ b/files/css/files.css
@@ -8,8 +8,8 @@
.file_upload_filename { background-image:url("../img/file.png"); font-weight:bold; }.file_upload_start { opacity:0;filter:alpha(opacity = 0); }
input.highlight{ background-color:#ffc100; border:#dda600 1px solid; }
-#file_newfolder_name { background-image:url("../img/folder.png"); font-weight:bold; width:11em; }
-.file_upload_start, .file_upload_filename { position:absolute; top:0px; left:0px; width:11em; font-size:0.9em; }
+#file_newfolder_name { background-image:url("../img/folder.png"); font-weight:bold; width:12em; }
+.file_upload_start, .file_upload_filename { position:absolute; top:0px; left:0px; width:12em; font-size:0.9em; }
.file_upload_wrapper { position:relative; top:-1.2em; left:-2em; display:-moz-inline-box; /* fallback for older firefox versions*/ display:inline-block; width:12em; }
#file_newfolder_submit, #file_upload_submit { width:3em; }
.file_upload_target { display:none; }
@@ -21,26 +21,30 @@ tbody tr:hover, tbody tr:active, tbody tr.selected { background-color:#eee; heig
tbody a { color:#000; }
span.extention, td.date { color:#999; }
div.crumb { float:left; display:block; background:no-repeat right 0; padding:8px 1.5em 0 1em; height:28px; /*36-8*/ }
+div.crumb:first-child { padding-left:1.5em; }
div.crumb:last-child { font-weight:bold; }
table tr.mouseOver td { background-color:#eee; }
table th { height:2em; padding:0 .5em; color:#999; }
table th .name { float:left; margin-left:.5em; }
table th.multiselect { background:#ddd; color:#000; font-weight:bold; }
table th, table td { border-bottom:1px solid #ddd; text-align:left; font-weight:normal; }
-table td { border-bottom:1px solid #eee; font-style:normal; }
+table td { border-bottom:1px solid #eee; font-style:normal; background-position:1em .5em; background-repeat:no-repeat; }
table th#headerSize, table td.filesize { width:5em; padding:0 1em; text-align:right; }
table th#headerDate, table td.date { width:11em; padding:0 .1em 0 1em; text-align:left; }
table td.selection, table th.selection, table td.fileaction { width:2em; text-align:center; }
-table td.filename a.name { display:block; background-image:url('../img/file.png'); height:1.5em; vertical-align:middle; }
+table td.filename a.name { display:block; height:1.5em; vertical-align:middle; margin-left:3em; }
table tr[data-type="dir"] td.filename a.name {font-weight:bold; }
table td.filename a.name input, table td.filename a.name form { width:100%; cursor:text }
-table td.filename a, table td.login, table td.logout, table td.download, table td.upload, table td.create, table td.delete { padding:.2em .5em .5em 3em; background-position:1em .5em; background-repeat:no-repeat; }
+table td.filename a, table td.login, table td.logout, table td.download, table td.upload, table td.create, table td.delete { padding:.2em .5em .5em 0; }
table td.filename .nametext, .modified { float:left; padding:.3em 0; }
-table td.filename .nametext { width:80%; }
+table td.filename .nametext { width:60%; }
table td.filename form { float:left; font-size:.85em; }
+/* #fileList tr.selected td.filename a, #fileList tr:hover td.filename a { background-image:none !important } */
+table thead.fixed tr{position:fixed; top:6.4em;z-index:100;}
+table thead.fixed {height:2em}
#fileList tr td.filename>input[type=checkbox]:first-child { display:none; float:left; margin:.7em 0 0 1em; /* bigger clickable area doesn’t work in FF width:2.8em; height:2.4em;*/ }
#fileList tr td.filename>input[type=checkbox]:checked:first-child, #fileList tr:hover td.filename>input[type=checkbox]:first-child { display:inline; }
-#fileList tr.selected td.filename a, #fileList tr:hover td.filename a { background-image:none !important }
+#fileList tr.selected td.filename , #fileList tr:hover td.filename { background-image:none !important }
#select_all { float:left; margin:0.2em; margin-left:0.6em; }
#uploadsize-message,#delete-confirm { display:none; }
.selectedActions a, a.file_action { float:right; display:inline; margin:0 .5em; padding:.3em .3em 0 .3em !important; }
@@ -48,4 +52,7 @@ table td.filename form { float:left; font-size:.85em; }
.selectedActions a:hover, a.file_action:hover { background:#fff; -moz-box-shadow:0 0 10px #fff; -webkit-box-shadow:0 0 10px #fff; box-shadow:0 0 10px #fff; -moz-border-radius:10px; -webkit-border-radius:10px; border-radius:10px; }
/* add breadcrumb divider to the File item in navigation panel */
-#plugins>ul>li:first-child { background-position:15.7em 0px; background-repeat:no-repeat; background-image:url("/owncloud/core/img/breadcrumb-divider-start.png"); width:15.7em; padding-right:11px; }
+#navigation>ul>li:first-child { background:url('../../core/img/breadcrumb-divider-start.png') no-repeat 12.5em 0px; width:12.5em; padding-right:1em; }
+#notification{ z-index:150; background-color:#fc4; border:0; padding:0 .7em .3em; display:block; position:fixed; left:50%; top:0;
+-moz-border-radius-bottomleft:1em; -webkit-border-bottom-left-radius:1em; border-bottom-left-radius:1em;
+-moz-border-radius-bottomright:1em; -webkit-border-bottom-right-radius:1em; border-bottom-right-radius:1em; }
diff --git a/files/js/fileactions.js b/files/js/fileactions.js
index 359e54dda3c..a8de2f9977b 100644
--- a/files/js/fileactions.js
+++ b/files/js/fileactions.js
@@ -118,29 +118,7 @@ FileActions.register('all','Download',OC.imagePath('core','actions/download'),fu
});
FileActions.register('all','Delete',OC.imagePath('core','actions/delete'),function(filename){
- $( "#delete-confirm" ).dialog({
- resizable: false,
- height:200,
- title:"Delete "+filename,
- modal: true,
- buttons: {
- "Delete": function() {
- $( this ).dialog( "close" );
- $.ajax({
- url: 'ajax/delete.php',
- data: "dir="+encodeURIComponent($('#dir').val())+"&file="+encodeURIComponent(filename),
- complete: function(data){
- boolOperationFinished(data, function(){
- FileList.remove(filename);
- });
- }
- });
- },
- Cancel: function() {
- $( this ).dialog( "close" );
- }
- }
- });
+ FileList.delete(filename);
});
FileActions.register('all','Rename',OC.imagePath('core','actions/rename'),function(filename){
diff --git a/files/js/filelist.js b/files/js/filelist.js
index 3f9b3984465..8fd3bceafb1 100644
--- a/files/js/filelist.js
+++ b/files/js/filelist.js
@@ -12,8 +12,8 @@ FileList={
var basename=name;
var extention=false;
}
- html+='<td class="filename"><input type="checkbox" />';
- html+='<a class="name" style="background-image:url('+img+')" href="download.php?file='+$('#dir').val()+'/'+name+'"><span class="nametext">'+basename
+ html+='<td class="filename" style="background-image:url('+img+')"><input type="checkbox" />';
+ html+='<a class="name" href="download.php?file='+$('#dir').val()+'/'+name+'"><span class="nametext">'+basename
if(extention){
html+='<span class="extention">'+extention+'</span>';
}
@@ -38,7 +38,7 @@ FileList={
},
addDir:function(name,size,lastModified){
var html='<tr data-file="'+name+'" data-type="dir" data-size="'+size+'">';
- html+='<td class="filename"><input type="checkbox" /><a class="name" style="background-image:url(img/folder.png)" href="index.php?dir='+$('#dir').val()+'/'+name+'">'+name+'</a></td>';
+ html+='<td class="filename" style="background-image:url(img/folder.png)"><input type="checkbox" /><a class="name" href="index.php?dir='+$('#dir').val()+'/'+name+'">'+name+'</a></td>';
if(size!='Pending'){
simpleSize=simpleFileSize(size);
}else{
@@ -103,7 +103,7 @@ FileList={
loadingDone:function(name){
$('tr[data-file="'+name+'"]').data('loading',false);
var mime=$('tr[data-file="'+name+'"]').data('mime');
- $('tr[data-file="'+name+'"] td.filename a').attr('style','background-image:url('+getMimeIcon(mime)+')');
+ $('tr[data-file="'+name+'"] td.filename').attr('style','background-image:url('+getMimeIcon(mime)+')');
$('tr[data-file="'+name+'"] td.filename').draggable(dragOptions);
},
isLoading:function(name){
@@ -149,5 +149,66 @@ FileList={
input.blur(function(){
form.trigger('submit');
});
+ },
+ delete:function(files){
+ if(FileList.deleteFiles){//finish any ongoing deletes first
+ FileList.finishDelete(function(){
+ FileList.delete(files);
+ });
+ return;
+ }
+ if(files.substr){
+ files=[files];
+ }
+ $.each(files,function(index,file){
+ $('tr[data-file="'+file+'"]').hide();
+ $('tr[data-file="'+file+'"]').find('input[type="checkbox"]').removeAttr('checked');
+ $('tr[data-file="'+file+'"]').removeClass('selected');
+ });
+ procesSelection();
+ FileList.deleteCanceled=false;
+ FileList.deleteFiles=files;
+ $('#notification').text('undo deletion');
+ $('#notification').fadeIn();
+ },
+ finishDelete:function(ready,sync){
+ if(!FileList.deleteCanceled && FileList.deleteFiles){
+ var fileNames=FileList.deleteFiles.join(';');
+ $.ajax({
+ url: 'ajax/delete.php',
+ async:!sync,
+ data: "dir="+$('#dir').val()+"&files="+encodeURIComponent(fileNames),
+ complete: function(data){
+ boolOperationFinished(data, function(){
+ $('#notification').fadeOut();
+ $.each(FileList.deleteFiles,function(index,file){
+// alert(file);
+ FileList.remove(file);
+ });
+ FileList.deleteCanceled=true;
+ FileList.deleteFiles=null;
+ if(ready){
+ ready();
+ }
+ });
+ }
+ });
+ }
}
}
+
+$(document).ready(function(){
+ $('#notification').hide();
+ $('#notification').click(function(){
+ FileList.deleteCanceled=true;
+ $('#notification').fadeOut();
+ $.each(FileList.deleteFiles,function(index,file){
+ $('tr[data-file="'+file+'"]').show();
+// alert(file);
+ });
+ FileList.deleteFiles=null;
+ });
+ $(window).bind('beforeunload', function (){
+ FileList.finishDelete(null,true);
+ });
+});
diff --git a/files/js/files.js b/files/js/files.js
index 3d3d8ca49fd..49e7cecd090 100644
--- a/files/js/files.js
+++ b/files/js/files.js
@@ -92,43 +92,9 @@ $(document).ready(function() {
});
$('.delete').click(function(event) {
- var fileNames=getSelectedFiles('name');
- var files=fileNames.join(';');
- var lastFileName=fileNames.pop();
- if(fileNames.length>0){
- fileNames=fileNames.join(', ')+' and '+lastFileName;
- }else{
- fileNames=lastFileName;
- }
-
- $( "#delete-confirm" ).dialog({
- resizable: false,
- height:200,
- modal: true,
- title:"Delete "+fileNames,
- buttons: {
- "Delete": function() {
- $( this ).dialog( "close" );
- $.ajax({
- url: 'ajax/delete.php',
- data: "dir="+$('#dir').val()+"&files="+encodeURIComponent(files),
- complete: function(data){
- boolOperationFinished(data, function(){
- var files=getSelectedFiles('name');
- for(var i=0;i<files.length;i++){
- FileList.remove(files[i]);
- }
- procesSelection();
- });
- }
- });
- },
- Cancel: function() {
- $( this ).dialog( "close" );
- }
- }
- });
-
+ var files=getSelectedFiles('name');
+ event.preventDefault();
+ FileList.delete(files);
return false;
});
@@ -344,7 +310,18 @@ function procesSelection(){
$('#modified').text('Modified');
$('th').removeClass('multiselect');
$('.selectedActions').hide();
+ $('thead').removeClass('fixed');
+ $('#headerName').css('width','auto');
+ $('#headerSize').css('width','auto');
+ $('#headerDate').css('width','auto');
+ $('table').css('padding-top','0');
}else{
+ var width={name:$('#headerName').css('width'),size:$('#headerSize').css('width'),date:$('#headerDate').css('width')};
+ $('thead').addClass('fixed');
+ $('#headerName').css('width',width.name);
+ $('#headerSize').css('width',width.size);
+ $('#headerDate').css('width',width.date);
+ $('table').css('padding-top','2em');
$('.selectedActions').show();
var totalSize=0;
for(var i=0;i<selectedFiles.length;i++){
diff --git a/files/templates/index.php b/files/templates/index.php
index 304ef4fe9aa..25c2d4cd9c6 100644
--- a/files/templates/index.php
+++ b/files/templates/index.php
@@ -20,6 +20,7 @@
<div id="file_action_panel">
</div>
</div>
+<div id='notification'></div>
<table cellspacing="0">
<thead>
diff --git a/files/templates/part.list.php b/files/templates/part.list.php
index 93ed70990b7..5051c19949a 100644
--- a/files/templates/part.list.php
+++ b/files/templates/part.list.php
@@ -7,9 +7,9 @@
$relative_date_color = round((time()-$file['mtime'])/60/60/24*14); // the older the file, the brighter the shade of grey; days*14
if($relative_date_color>200) $relative_date_color = 200; ?>
<tr data-file="<?php echo $file['name'];?>" data-type="<?php echo ($file['type'] == 'dir')?'dir':'file'?>" data-mime="<?php echo $file['mime']?>" data-size='<?php echo $file['size'];?>'>
- <td class="filename">
+ <td class="filename" style="background-image:url(<?php if($file['type'] == 'dir') echo mimetype_icon('dir'); else echo mimetype_icon($file['mime']); ?>)">
<input type="checkbox" />
- <a class="name" style="background-image:url(<?php if($file['type'] == 'dir') echo mimetype_icon('dir'); else echo mimetype_icon($file['mime']); ?>)" href="<?php if($file['type'] == 'dir') echo link_to('files', 'index.php?dir='.$file['directory'].'/'.$file['name']); else echo link_to('files', 'download.php?file='.$file['directory'].'/'.$file['name']); ?>" title="">
+ <a class="name" href="<?php if($file['type'] == 'dir') echo link_to('files', 'index.php?dir='.$file['directory'].'/'.$file['name']); else echo link_to('files', 'download.php?file='.$file['directory'].'/'.$file['name']); ?>" title="">
<span class="nametext">
<?php if($file['type'] == 'dir'):?>
<?php echo htmlspecialchars($file['name']);?>
diff --git a/files/webdav.php b/files/webdav.php
index a59dee70c2e..b1d242b2cc9 100644
--- a/files/webdav.php
+++ b/files/webdav.php
@@ -27,26 +27,21 @@
$RUNTIME_NOSETUPFS = true;
require_once('../lib/base.php');
-require_once('Sabre/autoload.php');
+
+// Backends
+$authBackend = new OC_Connector_Sabre_Auth();
+$lockBackend = new OC_Connector_Sabre_Locks();
// Create ownCloud Dir
$publicDir = new OC_Connector_Sabre_Directory('');
-$server = new Sabre_DAV_Server($publicDir);
-// Path to our script
+// Fire up server
+$server = new Sabre_DAV_Server($publicDir);
$server->setBaseUri($WEBROOT.'/files/webdav.php');
-// Auth backend
-$authBackend = new OC_Connector_Sabre_Auth();
-$authPlugin = new Sabre_DAV_Auth_Plugin($authBackend,'ownCloud');
-$server->addPlugin($authPlugin);
-
-// Also make sure there is a 'data' directory, writable by the server. This directory is used to store information about locks
-$lockBackend = new OC_Connector_Sabre_Locks();
-$lockPlugin = new Sabre_DAV_Locks_Plugin($lockBackend);
-$server->addPlugin($lockPlugin);
+// Load plugins
+$server->addPlugin(new Sabre_DAV_Auth_Plugin($authBackend,'ownCloud'));
+$server->addPlugin(new Sabre_DAV_Locks_Plugin($lockBackend));
// And off we go!
$server->exec();
-
-?>
diff --git a/help/templates/index.php b/help/templates/index.php
index f239de217d0..82ab224d49e 100644
--- a/help/templates/index.php
+++ b/help/templates/index.php
@@ -1,6 +1,3 @@
-
-<h1><?php echo $l->t( 'Questions and Answers' ); ?></h1>
-
<?php if(is_null($_["kbe"])):?>
Can't connect to Q&amp;A database
<?php else:?>
@@ -21,7 +18,7 @@
$pageNavi=OC_Util::getPageNavi($_['pagecount'],$_['page'],$url);
$pageNavi->printPage();
?>
- <a target="_blank" class="prettybutton" href="http://apps.owncloud.com/knowledgebase/editquestion.php?action=new"><?php echo $l->t( 'ASK A QUESTION' ); ?></a>
+ <a target="_blank" class="prettybutton" href="http://apps.owncloud.com/knowledgebase/editquestion.php?action=new"><?php echo $l->t( 'Ask a question' ); ?></a>
<?php endif;?>
diff --git a/index.php b/index.php
index 46dc990af68..4520f40107e 100644
--- a/index.php
+++ b/index.php
@@ -38,6 +38,12 @@ if(count($errors) > 0) {
// Setup required :
elseif($not_installed OR $install_called) {
require_once('setup.php');
+ exit();
+}
+
+if($_SERVER['REQUEST_METHOD']=='PROPFIND'){//handle webdav
+ header('location: '.OC_Helper::linkTo('files','webdav.php'));
+ exit();
}
// Someone is logged in :
diff --git a/lib/base.php b/lib/base.php
index b2cbde5679c..51dee60d672 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -20,13 +20,56 @@
*
*/
-// Get rid of this stupid require_once OC_...
-function OC_autoload($className) {
- if(strpos($className,'OC_')===0) {
- require_once strtolower(str_replace('_','/',substr($className,3)) . '.php');
+/**
+ * Class that is a namespace for all global OC variables
+ * No, we can not put this class in its own file because it is used by
+ * OC_autoload!
+ */
+class OC{
+ /**
+ * Assoziative array for autoloading. classname => filename
+ */
+ public static $CLASSPATH = array();
+ /**
+ * $_SERVER['DOCUMENTROOT'] but without symlinks
+ */
+ public static $DOCUMENTROOT = '';
+ /**
+ * The installation path for owncloud on the server (e.g. /srv/http/owncloud)
+ */
+ public static $SERVERROOT = '';
+ /**
+ * the current request path relative to the owncloud root (e.g. files/index.php)
+ */
+ public static $SUBURI = '';
+ /**
+ * the owncloud root path for http requests (e.g. owncloud/)
+ */
+ public static $WEBROOT = '';
+ /**
+ * the folder that stores that data files for the filesystem of the user (e.g. /srv/http/owncloud/data/myusername/files)
+ */
+ public static $CONFIG_DATADIRECTORY = '';
+ /**
+ * the folder that stores the data for the root filesystem (e.g. /srv/http/owncloud/data)
+ */
+ public static $CONFIG_DATADIRECTORY_ROOT = '';
+
+ /**
+ * SPL autoload
+ */
+ public static function autoload($className){
+ if(array_key_exists($className,OC::$CLASSPATH)){
+ require_once OC::$CLASSPATH[$className];
+ }
+ elseif(strpos($className,'OC_')===0){
+ require_once strtolower(str_replace('_','/',substr($className,3)) . '.php');
+ }
}
}
-spl_autoload_register('OC_autoload');
+
+// this requires all our OC_* classes
+spl_autoload_register(array('OC','autoload'));
// set some stuff
//ob_start();
@@ -38,9 +81,8 @@ ini_set('session.cookie_httponly','1;');
session_start();
// calculate the documentroot
-$SERVERROOT=substr(__FILE__,0,-13);
$DOCUMENTROOT=realpath($_SERVER['DOCUMENT_ROOT']);
-$SERVERROOT=str_replace("\\",'/',$SERVERROOT);
+$SERVERROOT=str_replace("\\",'/',substr(__FILE__,0,-13));
$SUBURI=substr(realpath($_SERVER["SCRIPT_FILENAME"]),strlen($SERVERROOT));
$scriptName=$_SERVER["SCRIPT_NAME"];
if(substr($scriptName,-1)=='/'){
@@ -55,7 +97,10 @@ if($WEBROOT!='' and $WEBROOT[0]!=='/'){
}
// set the right include path
-set_include_path($SERVERROOT.'/lib'.PATH_SEPARATOR.$SERVERROOT.'/config'.PATH_SEPARATOR.$SERVERROOT.'/3dparty'.PATH_SEPARATOR.get_include_path().PATH_SEPARATOR.$SERVERROOT);
+set_include_path($SERVERROOT.'/lib'.PATH_SEPARATOR.$SERVERROOT.'/config'.PATH_SEPARATOR.$SERVERROOT.'/3rdparty'.PATH_SEPARATOR.get_include_path().PATH_SEPARATOR.$SERVERROOT);
+
+//Some libs we really depend on
+require_once('Sabre/autoload.php');
// define runtime variables - unless this already has been done
if( !isset( $RUNTIME_NOSETUPFS )){
@@ -80,7 +125,9 @@ if( OC_Config::getValue( "forcessl", false )){
}
}
-$error=(count(OC_Util::checkServer())>0);
+$errors=OC_Util::checkServer();
+$error=(count($errors)>0);
+
// User and Groups
if( !OC_Config::getValue( "installed", false )){
@@ -113,6 +160,21 @@ if(!$error and !$RUNTIME_NOSETUPFS ){
OC_Util::setupFS();
}
+// Last part: connect some hooks
+OC_HOOK::connect('OC_User', 'post_createUser', 'OC_Connector_Sabre_Principal', 'addPrincipal');
+OC_HOOK::connect('OC_User', 'post_deleteUser', 'OC_Connector_Sabre_Principal', 'deletePrincipal');
+
+
+
+if($error) {
+ $tmpl = new OC_Template( '', 'error', 'guest' );
+ $tmpl->assign('errors',$errors);
+ $tmpl->printPage();
+ exit;
+}
+
+
+
// FROM Connect.php
function OC_CONNECT_TEST($path,$user,$password){
diff --git a/lib/connector/sabre/principal.php b/lib/connector/sabre/principal.php
new file mode 100644
index 00000000000..9c386f85e15
--- /dev/null
+++ b/lib/connector/sabre/principal.php
@@ -0,0 +1,181 @@
+<?php
+
+class OC_Connector_Sabre_Principal implements Sabre_DAVACL_IPrincipalBackend {
+ /**
+ * TODO: write doc
+ */
+ public static function addPrincipal($params){
+ // Add the user
+ $uri = 'principals/'.$params['uid'];
+ $displayname = $params['uid'];
+ $query = OC_DB::prepare('INSERT INTO *PREFIX*principals (uri,displayname) VALUES(?,?)');
+ $query->execute(array($uri,$displayname));
+
+ // Add calendar and addressbook read and write support (sharing calendars)
+ $uri = 'principals/'.$params['uid'].'/calendar-proxy-read';
+ $displayname = null;
+ $query->execute(array($uri,$displayname));
+ $uri = 'principals/'.$params['uid'].'/calendar-proxy-write';
+ $query->execute(array($uri,$displayname));
+ $uri = 'principals/'.$params['uid'].'/addressbook-proxy-read';
+ $query->execute(array($uri,$displayname));
+ $uri = 'principals/'.$params['uid'].'/addressbook-proxy-write';
+ $query->execute(array($uri,$displayname));
+
+ return true;
+ }
+
+ /**
+ * TODO: write doc
+ */
+ public static function deletePrincipal($params){
+ $query = OC_DB::prepare('SELECT * FROM *PREFIX*principals');
+ $result = $query->execute();
+
+ $deleteprincipal = OC_DB::prepare('DELETE FROM *PREFIX*principals WHERE id = ?');
+ $deletegroup = OC_DB::prepare('DELETE FROM *PREFIX*principalgroups WHERE principal_id = ? OR member_id = ?');
+ // We have to delete the principals and relations! Principals include
+ while($row = $result->fetchRow()){
+ // Checking if the principal is in the prefix
+ $array = explode('/',$row['uri']);
+ if ($array[1] != $params['uid']) continue;
+ $deleteprincipal->execute(array($row['id']));
+ $deletegroup->execute(array($row['id'],$row['id']));
+ }
+ return true;
+ }
+ /**
+ * Returns a list of principals based on a prefix.
+ *
+ * This prefix will often contain something like 'principals'. You are only
+ * expected to return principals that are in this base path.
+ *
+ * You are expected to return at least a 'uri' for every user, you can
+ * return any additional properties if you wish so. Common properties are:
+ * {DAV:}displayname
+ *
+ * @param string $prefixPath
+ * @return array
+ */
+ public function getPrincipalsByPrefix( $prefixPath ){
+ $query = OC_DB::prepare('SELECT * FROM *PREFIX*principals');
+ $result = $query->execute();
+
+ $principals = array();
+
+ while($row = $result->fetchRow()){
+ // Checking if the principal is in the prefix
+ list($rowPrefix) = Sabre_DAV_URLUtil::splitPath($row['uri']);
+ if ($rowPrefix !== $prefixPath) continue;
+
+ $principals[] = array(
+ 'uri' => $row['uri'],
+ '{DAV:}displayname' => $row['displayname']?$row['displayname']:basename($row['uri'])
+ );
+
+ }
+
+ return $principals;
+ }
+
+ /**
+ * Returns a specific principal, specified by it's path.
+ * The returned structure should be the exact same as from
+ * getPrincipalsByPrefix.
+ *
+ * @param string $path
+ * @return array
+ */
+ public function getPrincipalByPath($path) {
+ $query = OC_DB::prepare('SELECT * FROM *PREFIX*principals WHERE uri=?');
+ $result = $query->execute(array($path));
+
+ $users = array();
+
+ $row = $result->fetchRow();
+ if (!$row) return;
+
+ return array(
+ 'id' => $row['id'],
+ 'uri' => $row['uri'],
+ '{DAV:}displayname' => $row['displayname']?$row['displayname']:basename($row['uri'])
+ );
+
+ }
+
+ /**
+ * Returns the list of members for a group-principal
+ *
+ * @param string $principal
+ * @return array
+ */
+ public function getGroupMemberSet($principal) {
+ $principal = $this->getPrincipalByPath($principal);
+ if (!$principal) throw new Sabre_DAV_Exception('Principal not found');
+
+ $query = OC_DB::prepare('SELECT principals.uri as uri FROM *PREFIX*principalgroups AS groupmembers LEFT JOIN *PREFIX*principals AS principals ON groupmembers.member_id = principals.id WHERE groupmembers.principal_id = ?');
+ $result = $query->execute(array($principal['id']));
+
+ $return = array();
+ while ($row = $result->fetchRow()){
+ $return[] = $row['uri'];
+ }
+ return $return;
+ }
+
+ /**
+ * Returns the list of groups a principal is a member of
+ *
+ * @param string $principal
+ * @return array
+ */
+ public function getGroupMembership($principal) {
+ $principal = $this->getPrincipalByPath($principal);
+ if (!$principal) throw new Sabre_DAV_Exception('Principal not found');
+
+ $query = OC_DB::prepare('SELECT principals.uri as uri FROM *PREFIX*principalgroups AS groupmembers LEFT JOIN *PREFIX*principals AS principals ON groupmembers.member_id = principals.id WHERE groupmembers.member_id = ?');
+ $result = $query->execute(array($principal['id']));
+
+ $return = array();
+ while ($row = $result->fetchRow()){
+ $return[] = $row['uri'];
+ }
+ return $return;
+ }
+
+ /**
+ * Updates the list of group members for a group principal.
+ *
+ * The principals should be passed as a list of uri's.
+ *
+ * @param string $principal
+ * @param array $members
+ * @return void
+ */
+ public function setGroupMemberSet($principal, array $members) {
+ $query = OC_DB::prepare('SELECT id, uri FROM *PREFIX*principals WHERE uri IN (? '.str_repeat(', ?', count($members)).')');
+ $result = $query->execute(array_merge(array($principal), $members));
+
+ $memberIds = array();
+ $principalId = null;
+
+ while($row = $$result->fetchRow()) {
+ if ($row['uri'] == $principal) {
+ $principalId = $row['id'];
+ }
+ else{
+ $memberIds[] = $row['id'];
+ }
+ }
+ if (!$principalId) throw new Sabre_DAV_Exception('Principal not found');
+
+ // Wiping out old members
+ $query = OC_DB::prepare('DELETE FROM *PREFIX*principalgroups WHERE principal_id = ?');
+ $query->execute(array($principalID));
+
+ $query = OC_DB::prepare('INSERT INTO *PREFIX*principalgroups (principal_id, member_id) VALUES (?, ?);');
+ foreach($memberIds as $memberId) {
+ $query->execute(array($principalId, $memberId));
+ }
+ }
+}
diff --git a/lib/crypt.php b/lib/crypt.php
new file mode 100755
index 00000000000..baa433f9dcc
--- /dev/null
+++ b/lib/crypt.php
@@ -0,0 +1,62 @@
+<?php
+/**
+ * ownCloud
+ *
+ * @author Frank Karlitschek
+ * @author Jakob Sack
+ * @copyright 2010 Frank Karlitschek karlitschek@kde.org
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU AFFERO GENERAL PUBLIC LICENSE for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+require_once('Crypt_Blowfish/Blowfish.php');
+
+/**
+ * This class is for crypting and decrypting
+ */
+class OC_Crypt {
+
+ /**
+ * @brief encrypts an content
+ * @param $content the cleartext message you want to encrypt
+ * @param $key the encryption key
+ * @returns encrypted content
+ *
+ * This function encrypts an content
+ */
+ public static function encrypt( $content, $key) {
+ $bf = new Crypt_Blowfish($key);
+ return($bf->encrypt($contents));
+ }
+
+
+ /**
+ * @brief decryption of an content
+ * @param $content the cleartext message you want to decrypt
+ * @param $key the encryption key
+ * @returns cleartext content
+ *
+ * This function decrypts an content
+ */
+ public static function decrypt( $content, $key) {
+ $bf = new Crypt_Blowfish($key);
+ return($bf->encrypt($contents));
+ }
+
+
+
+
+
+}
diff --git a/lib/db.php b/lib/db.php
index 858db09b764..76d3fe5efcb 100644
--- a/lib/db.php
+++ b/lib/db.php
@@ -237,6 +237,7 @@ class OC_DB {
public static function createDbFromStructure( $file ){
$CONFIG_DBNAME = OC_Config::getValue( "dbname", "owncloud" );
$CONFIG_DBTABLEPREFIX = OC_Config::getValue( "dbtableprefix", "oc_" );
+ $CONFIG_DBTYPE = OC_Config::getValue( "dbtype", "sqlite" );
self::connectScheme();
@@ -247,6 +248,9 @@ class OC_DB {
$file2 = tempnam( sys_get_temp_dir(), 'oc_db_scheme_' );
$content = str_replace( '*dbname*', $CONFIG_DBNAME, $content );
$content = str_replace( '*dbprefix*', $CONFIG_DBTABLEPREFIX, $content );
+ if( $CONFIG_DBTYPE == 'pgsql' ){ //mysql support it too but sqlite don't
+ $content = str_replace( '<default>0000-00-00 00:00:00</default>', '<default>CURRENT_TIMESTAMP</default>', $content );
+ }
file_put_contents( $file2, $content );
// Try to create tables
@@ -361,4 +365,39 @@ class OC_DB {
self::dropTable($name);
}
}
+
+ /**
+ * Start a transaction or set a savepoint.
+ * @param string $savePoint (optional) name of the savepoint to set
+ */
+ public static function beginTransaction($savePoint=''){
+ self::connect();
+ if (!self::$DBConnection->supports('transactions')) {
+ return false;
+ }
+ if($savePoint && !self::$DBConnection->supports('savepoints')){
+ return false;
+ }
+ if($savePoint){
+ self::$DBConnection->beginTransaction($savePoint);
+ }else{
+ self::$DBConnection->beginTransaction();
+ }
+ }
+
+ /**
+ * Commit the database changes done during a transaction that is in progress or release a savepoint.
+ * @param string $savePoint (optional) name of the savepoint to commit
+ */
+ public static function commit($savePoint=''){
+ self::connect();
+ if(!self::$DBConnection->inTransaction()){
+ return false;
+ }
+ if($savePoint){
+ self::$DBConnection->commit($savePoint);
+ }else{
+ self::$DBConnection->commit();
+ }
+ }
}
diff --git a/lib/helper.php b/lib/helper.php
index 5dc3dd44a15..fa5163ac266 100755
--- a/lib/helper.php
+++ b/lib/helper.php
@@ -204,7 +204,7 @@ class OC_Helper {
}
}
closedir($dh);
- if(chmod($path, $filemode))
+ if(@chmod($path, $filemode))
return TRUE;
else
return FALSE;
diff --git a/lib/log.php b/lib/log.php
index d51b2ef0785..1ed8e0e33c2 100644
--- a/lib/log.php
+++ b/lib/log.php
@@ -51,7 +51,7 @@ class OC_Log {
* This function adds another entry to the log database
*/
public static function add( $appid, $subject, $predicate, $object = ' ' ){
- $query=OC_DB::prepare("INSERT INTO `*PREFIX*log`(moment,appid,user,action,info) VALUES(NOW(),?,?,?,?)");
+ $query=OC_DB::prepare("INSERT INTO `*PREFIX*log`(moment,appid,`user`,action,info) VALUES(NOW(),?,?,?,?)");
$result=$query->execute(array($appid,$subject,$predicate,$object));
// Die if we have an error
if( PEAR::isError($result)) {
@@ -90,7 +90,7 @@ class OC_Log {
array_push($params,$filter('until'));
}
if(isset($filter['user'])){
- $queryString.='AND user=? ';
+ $queryString.='AND `user`=? ';
array_push($params,$filter('user'));
}
if(isset($filter['app'])){
diff --git a/lib/ocs.php b/lib/ocs.php
index 8c7556a173b..bcacfe704c0 100644
--- a/lib/ocs.php
+++ b/lib/ocs.php
@@ -407,7 +407,7 @@ class OC_OCS {
$entry=$result->fetchRow();
$totalcount=$entry['co'];
- $query=OC_DB::prepare('select id,timestamp,user,type,message from *PREFIX*log order by timestamp desc limit ?,?');
+ $query=OC_DB::prepare('select id,timestamp,`user`,type,message from *PREFIX*log order by timestamp desc limit ?,?');
$result = $query->execute(array(($page*$pagesize),$pagesize))->fetchAll();
$itemscount=count($result);
diff --git a/lib/search/provider/file.php b/lib/search/provider/file.php
index f3d235abdce..5fd35fa3e52 100644
--- a/lib/search/provider/file.php
+++ b/lib/search/provider/file.php
@@ -13,11 +13,18 @@ class OC_Search_Provider_File extends OC_Search_Provider{
switch($mimeBase){
case 'audio':
break;
+ case 'text':
+ $results[]=new OC_Search_Result(basename($file),'',OC_Helper::linkTo( 'files', 'download.php?file='.$file ),'Text');
+ break;
case 'image':
$results[]=new OC_Search_Result(basename($file),'',OC_Helper::linkTo( 'files', 'download.php?file='.$file ),'Images');
break;
default:
- $results[]=new OC_Search_Result(basename($file),'',OC_Helper::linkTo( 'files', 'download.php?file='.$file ),'Files');
+ if($mime=='application/xml'){
+ $results[]=new OC_Search_Result(basename($file),'',OC_Helper::linkTo( 'files', 'download.php?file='.$file ),'Text');
+ }else{
+ $results[]=new OC_Search_Result(basename($file),'',OC_Helper::linkTo( 'files', 'download.php?file='.$file ),'Files');
+ }
}
}
}
diff --git a/lib/setup.php b/lib/setup.php
index 41cfa1750ab..f87581d7582 100644
--- a/lib/setup.php
+++ b/lib/setup.php
@@ -2,10 +2,12 @@
$hasSQLite = (is_callable('sqlite_open') or class_exists('SQLite3'));
$hasMySQL = is_callable('mysql_connect');
+$hasPostgreSQL = is_callable('pg_connect');
$datadir = OC_Config::getValue('datadir', $SERVERROOT.'/data');
$opts = array(
'hasSQLite' => $hasSQLite,
'hasMySQL' => $hasMySQL,
+ 'hasPostgreSQL' => $hasPostgreSQL,
'directory' => $datadir,
'errors' => array(),
);
@@ -43,6 +45,7 @@ class OC_Setup {
if(empty($options['directory'])) {
$error[] = 'STEP 2 : data directory path is not set.';
}
+
if($dbtype=='mysql') { //mysql needs more config options
if(empty($options['dbuser'])) {
$error[] = 'STEP 3 : MySQL database user is not set.';
@@ -61,6 +64,24 @@ class OC_Setup {
}
}
+ if($dbtype=='pgsql') { //postgresql needs more config options
+ if(empty($options['pg_dbuser'])) {
+ $error[] = 'STEP 3 : PostgreSQL database user is not set.';
+ }
+ if(empty($options['pg_dbpass'])) {
+ $error[] = 'STEP 3 : PostgreSQL database password is not set.';
+ }
+ if(empty($options['pg_dbname'])) {
+ $error[] = 'STEP 3 : PostgreSQL database name is not set.';
+ }
+ if(empty($options['pg_dbhost'])) {
+ $error[] = 'STEP 3 : PostgreSQL database host is not set.';
+ }
+ if(!isset($options['pg_dbtableprefix'])) {
+ $error[] = 'STEP 3 : PostgreSQL database table prefix is not set.';
+ }
+ }
+
if(count($error) == 0) { //no errors, good
$username = htmlspecialchars_decode($options['adminlogin']);
$password = htmlspecialchars_decode($options['adminpass']);
@@ -99,7 +120,7 @@ class OC_Setup {
//use the admin login data for the new database user
//add prefix to the mysql user name to prevent collissions
- $dbusername='oc_mysql_'.$username;
+ $dbusername=substr('oc_mysql_'.$username,0,16);
//hash the password so we don't need to store the admin config in the config file
$dbpassword=md5(time().$password);
@@ -128,6 +149,62 @@ class OC_Setup {
mysql_close($connection);
}
}
+ elseif($dbtype == 'pgsql') {
+ $dbuser = $options['pg_dbuser'];
+ $dbpass = $options['pg_dbpass'];
+ $dbname = $options['pg_dbname'];
+ $dbhost = $options['pg_dbhost'];
+ $dbtableprefix = $options['pg_dbtableprefix'];
+ OC_CONFIG::setValue('dbname', $dbname);
+ OC_CONFIG::setValue('dbhost', $dbhost);
+ OC_CONFIG::setValue('dbtableprefix', $dbtableprefix);
+
+ //check if the database user has admin right
+ $connection_string = "host=$dbhost dbname=postgres user=$dbuser password=$dbpass";
+ $connection = @pg_connect($connection_string);
+ if(!$connection) {
+ $error[] = array(
+ 'error' => 'postgresql username and/or password not valid',
+ 'hint' => 'you need to enter either an existing account, or the administrative account if you wish to create a new user for ownCloud'
+ );
+ }
+ else {
+ //check for roles creation rights in postgresql
+ $query="SELECT 1 FROM pg_roles WHERE rolcreaterole=TRUE AND rolname='$dbuser'";
+ $result = pg_query($connection, $query);
+ if($result and pg_num_rows($result) > 0) {
+ //use the admin login data for the new database user
+
+ //add prefix to the postgresql user name to prevent collissions
+ $dbusername='oc_'.$username;
+ //hash the password so we don't need to store the admin config in the config file
+ $dbpassword=md5(time().$password);
+
+ self::pg_createDBUser($dbusername, $dbpassword, $connection);
+
+ OC_CONFIG::setValue('dbuser', $dbusername);
+ OC_CONFIG::setValue('dbpassword', $dbpassword);
+
+ //create the database
+ self::pg_createDatabase($dbname, $dbusername, $connection);
+ }
+ else {
+ OC_CONFIG::setValue('dbuser', $dbuser);
+ OC_CONFIG::setValue('dbpassword', $dbpass);
+
+ //create the database
+ self::pg_createDatabase($dbname, $dbuser, $connection);
+ }
+
+ //fill the database if needed
+ $query="SELECT * FROM {$dbtableprefix}users";
+ $result = pg_query($connection, $query);
+ if(!$result) {
+ OC_DB::createDbFromStructure('db_structure.xml');
+ }
+ pg_close($connection);
+ }
+ }
else {
//delete the old sqlite database first, might cause infinte loops otherwise
if(file_exists("$datadir/owncloud.db")){
@@ -179,6 +256,29 @@ class OC_Setup {
$result = mysql_query($query, $connection);
}
+ public static function pg_createDatabase($name,$user,$connection) {
+ //we cant user OC_BD functions here because we need to connect as the administrative user.
+ $query = "CREATE DATABASE $name OWNER $user";
+ $result = pg_query($connection, $query);
+ if(!$result) {
+ $entry='DB Error: "'.pg_last_error($connection).'"<br />';
+ $entry.='Offending command was: '.$query.'<br />';
+ echo($entry);
+ }
+ $query = "REVOKE ALL PRIVILEGES ON DATABASE $name FROM PUBLIC";
+ $result = pg_query($connection, $query);
+ }
+
+ private static function pg_createDBUser($name,$password,$connection) {
+ $query = "CREATE USER $name CREATEDB PASSWORD '$password';";
+ $result = pg_query($connection, $query);
+ if(!$result) {
+ $entry='DB Error: "'.pg_last_error($connection).'"<br />';
+ $entry.='Offending command was: '.$query.'<br />';
+ echo($entry);
+ }
+ }
+
/**
* create .htaccess files for apache hosts
*/
diff --git a/lib/template.php b/lib/template.php
index fe173f609b2..124343bd85b 100644
--- a/lib/template.php
+++ b/lib/template.php
@@ -82,19 +82,19 @@ function relative_modified_date($timestamp) {
$diffdays = round($diffhours/24);
$diffmonths = round($diffdays/31);
$diffyears = round($diffdays/365);
+
if($timediff < 60) { return 'seconds ago'; }
else if($timediff < 120) { return '1 minute ago'; }
else if($timediff < 3600) { return $diffminutes.' minutes ago'; }
//else if($timediff < 7200) { return '1 hour ago'; }
//else if($timediff < 86400) { return $diffhours.' hours ago'; }
- else if($timediff < 86400) { return 'today'; }
- else if($timediff < 172800) { return 'yesterday'; }
+ else if((date('G')-$diffhours) > 0) { return 'today'; }
+ else if((date('G')-$diffhours) > -24) { return 'yesterday'; }
else if($timediff < 2678400) { return $diffdays.' days ago'; }
else if($timediff < 5184000) { return 'last month'; }
- //else if($timediff < 31556926) { return $diffmonths.' months ago'; }
- else if($timediff < 31556926) { return 'months ago'; }
+ else if((date('n')-$diffmonths) > 0) { return 'months ago'; }
else if($timediff < 63113852) { return 'last year'; }
- else { return $diffyears.' years ago'; }
+ else { return 'years ago'; }
}
@@ -139,12 +139,14 @@ class OC_Template{
}
// Templates have the ending .php
+ $path = $template;
$template .= "$name.php";
// Set the private data
$this->renderas = $renderas;
$this->application = $app;
$this->template = $template;
+ $this->path = $path;
$this->vars = array();
$this->l10n = new OC_L10N($app);
}
@@ -321,6 +323,27 @@ class OC_Template{
}
/**
+ * @brief Include template
+ * @returns returns content of included template
+ *
+ * Includes another template. use <?php echo $this->inc('template'); ?> to
+ * do this.
+ */
+ public function inc( $file ){
+ // $_ erstellen
+ $_ = $this->vars;
+
+ // Einbinden
+ ob_start();
+ include( $this->path.$file.'.php' );
+ $data = ob_get_contents();
+ ob_end_clean();
+
+ // Daten zurückgeben
+ return $data;
+ }
+
+ /**
* @brief Shortcut to print a simple page for users
* @param $application The application we render the template for
* @param $name Name of the template
diff --git a/lib/util.php b/lib/util.php
index 3e2e4fa34e4..10cd320977a 100644
--- a/lib/util.php
+++ b/lib/util.php
@@ -25,7 +25,13 @@ class OC_Util {
// Create root dir
if(!is_dir($CONFIG_DATADIRECTORY_ROOT)){
- @mkdir($CONFIG_DATADIRECTORY_ROOT) or die("Can't create data directory ($CONFIG_DATADIRECTORY_ROOT), you can usually fix this by setting the owner of '$SERVERROOT' to the user that the web server uses (www-data for debian/ubuntu)");
+ $success=@mkdir($CONFIG_DATADIRECTORY_ROOT);
+ if(!$success) {
+ $tmpl = new OC_Template( '', 'error', 'guest' );
+ $tmpl->assign('errors',array(1=>array('error'=>"Can't create data directory ($CONFIG_DATADIRECTORY_ROOT)",'hint'=>"You can usually fix this by setting the owner of '$SERVERROOT' to the user that the web server uses (".exec('whoami').")")));
+ $tmpl->printPage();
+ exit;
+ }
}
// If we are not forced to load a specific user we load the one that is logged in
@@ -214,21 +220,21 @@ class OC_Util {
//check for correct file permissions
if(!stristr(PHP_OS, 'WIN')){
- $prems=substr(decoct(fileperms($CONFIG_DATADIRECTORY_ROOT)),-3);
+ $prems=substr(decoct(@fileperms($CONFIG_DATADIRECTORY_ROOT)),-3);
if(substr($prems,-1)!='0'){
OC_Helper::chmodr($CONFIG_DATADIRECTORY_ROOT,0770);
clearstatcache();
- $prems=substr(decoct(fileperms($CONFIG_DATADIRECTORY_ROOT)),-3);
+ $prems=substr(decoct(@fileperms($CONFIG_DATADIRECTORY_ROOT)),-3);
if(substr($prems,2,1)!='0'){
$errors[]=array('error'=>'Data directory ('.$CONFIG_DATADIRECTORY_ROOT.') is readable from the web<br/>','hint'=>$permissionsHint);
}
}
if( OC_Config::getValue( "enablebackup", false )){
- $prems=substr(decoct(fileperms($CONFIG_BACKUPDIRECTORY)),-3);
+ $prems=substr(decoct(@fileperms($CONFIG_BACKUPDIRECTORY)),-3);
if(substr($prems,-1)!='0'){
OC_Helper::chmodr($CONFIG_BACKUPDIRECTORY,0770);
clearstatcache();
- $prems=substr(decoct(fileperms($CONFIG_BACKUPDIRECTORY)),-3);
+ $prems=substr(decoct(@fileperms($CONFIG_BACKUPDIRECTORY)),-3);
if(substr($prems,2,1)!='0'){
$errors[]=array('error'=>'Data directory ('.$CONFIG_BACKUPDIRECTORY.') is readable from the web<br/>','hint'=>$permissionsHint);
}
diff --git a/log/appinfo/app.php b/log/appinfo/app.php
index f3ef650704d..a3aa19d528d 100644
--- a/log/appinfo/app.php
+++ b/log/appinfo/app.php
@@ -1,6 +1,6 @@
-<?php
+<?php /*
OC_App::register( array( "order" => 1, "id" => "log", "name" => "Log" ));
OC_App::addSettingsPage( array( "id" => "log", "order" => 999, "href" => OC_Helper::linkTo( "log", "index.php" ), "name" => "Log", "icon" => OC_Helper::imagePath( "log", "logs.png" )));
-?>
+*/ ?>
diff --git a/log/index.php b/log/index.php
index e201411e483..a4fbc364703 100644
--- a/log/index.php
+++ b/log/index.php
@@ -22,6 +22,7 @@
*/
//require_once('../../config/config.php');
+/*
require_once('../lib/base.php');
if( !OC_User::isLoggedIn()){
@@ -103,4 +104,4 @@ $tmpl->assign( 'size', $pageSize );
$tmpl->assign( 'showActions', $showActions );
$tmpl->printPage();
-?>
+*/ ?>
diff --git a/log/templates/index.php b/log/templates/index.php
index 2756332f519..863ac73fdbb 100644
--- a/log/templates/index.php
+++ b/log/templates/index.php
@@ -1,4 +1,4 @@
-<div class="controls">
+<?php /*<div class="controls">
<form id="logs_options" method='post'>
<p>
<span><?php echo $l->t( 'Filter:' ); ?></span>
@@ -50,5 +50,4 @@
</p>
</form>
</div>
-
-
+*/ ?>
diff --git a/search/css/results.css b/search/css/results.css
index e61bf419b35..c3147451e4a 100644
--- a/search/css/results.css
+++ b/search/css/results.css
@@ -1,9 +1,9 @@
-#searchresults { position:fixed; top:3.3em; right:0; z-index:50; background-color:white; border:1px solid black; margin-bottom:3em; overflow:auto; max-height:80%; width:40em; }
-#searchresults table{ width:100%; table-layout:fixed; top:1em;border-spacing:0}
-#searchresults td{padding-right:0.3em;padding-left:0.3em;vertical-align:top}
-#searchresults td.result div.text{padding-left:1em;}
-#searchresults div.text,div.name{width:30em; white-space:normal}
-#searchresults td.result{width:30em;}
-#searchresults td.result *{cursor:pointer}
-#searchresults td.type{width:7em;text-align:right; border-right:1px solid #aaa;border-bottom:none}
-#searchresults tr.current{background-color:#ddd}
+#searchresults { list-style:none; position:fixed; top:3.5em; right:0; z-index:100; background-color:#fff; overflow:hidden; text-overflow:ellipsis; max-height:80%; width:26.5em; padding-bottom:1em; -moz-box-shadow:0 0 10px #000; -webkit-box-shadow:0 0 10px #000; box-shadow:0 0 10px #000; -moz-border-radius-bottomleft:1em; -webkit-border-bottom-left-radius:1em; border-bottom-left-radius:1em; }
+#searchresults li.resultHeader { font-size:1.2em; font-weight:bold; border-bottom:solid 1px #CCC; padding:.2em; background-color:#eee; }
+#searchresults li.result { margin-left:2em; }
+#searchresults table { width:100%; table-layout:fixed; top:0; border-spacing:0; }
+#searchresults td { padding:0 .3em; vertical-align:top; }
+#searchresults td.result div.text { padding-left:1em; white-space:nowrap; }
+#searchresults td.result * { cursor:pointer; }
+#searchresults td.type { width:3.5em; text-align:right; border-right:1px solid #aaa; border-bottom:none; font-weight:bold; }
+#searchresults tr.current { background-color:#ddd; }
diff --git a/search/css/search.css b/search/css/search.css
deleted file mode 100644
index df0712be03f..00000000000
--- a/search/css/search.css
+++ /dev/null
@@ -1,17 +0,0 @@
-#searchresults{
- margin: 2em;
- list-style:none;
- border: solid 1px #CCC;
-}
-
-#searchresults li.resultHeader{
- font-size:1.2em;
- font-weight:bold;
- border-bottom: solid 1px #CCC;
- padding:0.2em;
- background-color:#eee;
-}
-
-#searchresults li.result{
- margin-left:2em;
-} \ No newline at end of file
diff --git a/settings/ajax/openid.php b/settings/ajax/openid.php
new file mode 100644
index 00000000000..021fe35d8ec
--- /dev/null
+++ b/settings/ajax/openid.php
@@ -0,0 +1,26 @@
+<?php
+
+// Init owncloud
+require_once('../../lib/base.php');
+
+$l=new OC_L10N('settings');
+
+// We send json data
+header( "Content-Type: application/jsonrequest" );
+
+// Check if we are a user
+if( !OC_User::isLoggedIn()){
+ echo json_encode( array( "status" => "error", "data" => array( "message" => $l->t("Authentication error") )));
+ exit();
+}
+
+// Get data
+if( isset( $_POST['identity'] ) ){
+ $identity=$_POST['identity'];
+ OC_Preferences::setValue(OC_User::getUser(),'user_openid','identity',$identity);
+ echo json_encode( array( "status" => "success", "data" => array( "message" => $l->t("OpenID Changed") )));
+}else{
+ echo json_encode( array( "status" => "error", "data" => array( "message" => $l->t("Invalid request") )));
+}
+
+?>
diff --git a/settings/index.php b/settings/index.php
index a37ae7e6ea2..8b970a13c58 100644
--- a/settings/index.php
+++ b/settings/index.php
@@ -29,6 +29,11 @@ $tmpl->assign('usage',OC_Helper::humanFileSize($used));
$tmpl->assign('total_space',OC_Helper::humanFileSize($total));
$tmpl->assign('usage_relative',$relative);
$tmpl->assign('languages',$languages);
+$tmpl->assign('hasopenid',OC_App::isEnabled( 'user_openid' ));
+if(OC_App::isEnabled( 'user_openid' )){
+ $identity=OC_Preferences::getValue(OC_User::getUser(),'user_openid','identity','');
+ $tmpl->assign('identity',$identity);
+}
$tmpl->printPage();
?>
diff --git a/settings/js/main.js b/settings/js/main.js
index 010225bcb27..e6ca30d0ce4 100644
--- a/settings/js/main.js
+++ b/settings/js/main.js
@@ -18,7 +18,18 @@ $(document).ready(function(){
});
return false;
});
-
+
+ $('#openidform').submit(function(event){
+ event.preventDefault();
+ var post = $( "#openidform" ).serialize();
+ $.post( 'ajax/openid.php', post, function(data){
+ if( data.status == "success" ){
+ }else{
+ alert('error while setting OpenID');
+ }
+ });
+ });
+
$("#languageinput").change( function(){
// Serialize the data
var post = $( "#languageinput" ).serialize();
diff --git a/settings/templates/index.php b/settings/templates/index.php
index 761289acefa..819b71c8943 100644
--- a/settings/templates/index.php
+++ b/settings/templates/index.php
@@ -29,6 +29,17 @@
</fieldset>
</form>
+<?php if($_['hasopenid']):?>
+ <form id="openidform">
+ <fieldset>
+ <legend><?php echo $l->t( 'OpenID' );?></legend>
+ <p>OpenID identity for <b><?php echo OC_User::getUser();?></b></p>
+ <p><input name='identity' id='identity' value='<?php echo $_['identity']; ?>'></input></p>
+ <p><input type='submit' value='Save'></input></p>
+ </fieldset>
+ </form>
+<?php endif;?>
+
<form id="languageform">
<fieldset>
<legend><?php echo $l->t( 'Language' );?></legend>