diff --git a/3dparty/COPYING-PHP b/3rdparty/COPYING-PHP similarity index 100% rename from 3dparty/COPYING-PHP rename to 3rdparty/COPYING-PHP diff --git a/3dparty/COPYING-README b/3rdparty/COPYING-README similarity index 100% rename from 3dparty/COPYING-README rename to 3rdparty/COPYING-README diff --git a/3dparty/Console/Getopt.php b/3rdparty/Console/Getopt.php similarity index 100% rename from 3dparty/Console/Getopt.php rename to 3rdparty/Console/Getopt.php diff --git a/3rdparty/Crypt_Blowfish/Blowfish.php b/3rdparty/Crypt_Blowfish/Blowfish.php new file mode 100644 index 0000000000..a7b8948f04 --- /dev/null +++ b/3rdparty/Crypt_Blowfish/Blowfish.php @@ -0,0 +1,317 @@ + + * @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 + * @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 0000000000..2ff8ac788a --- /dev/null +++ b/3rdparty/Crypt_Blowfish/Blowfish/DefaultKey.php @@ -0,0 +1,327 @@ + + * @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 + * @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 similarity index 100% rename from 3dparty/MDB2.php rename to 3rdparty/MDB2.php diff --git a/3dparty/MDB2/Date.php b/3rdparty/MDB2/Date.php similarity index 100% rename from 3dparty/MDB2/Date.php rename to 3rdparty/MDB2/Date.php diff --git a/3dparty/MDB2/Driver/Datatype/Common.php b/3rdparty/MDB2/Driver/Datatype/Common.php similarity index 100% rename from 3dparty/MDB2/Driver/Datatype/Common.php rename to 3rdparty/MDB2/Driver/Datatype/Common.php diff --git a/3dparty/MDB2/Driver/Datatype/mysql.php b/3rdparty/MDB2/Driver/Datatype/mysql.php similarity index 100% rename from 3dparty/MDB2/Driver/Datatype/mysql.php rename to 3rdparty/MDB2/Driver/Datatype/mysql.php diff --git a/3dparty/MDB2/Driver/Datatype/pgsql.php b/3rdparty/MDB2/Driver/Datatype/pgsql.php similarity index 100% rename from 3dparty/MDB2/Driver/Datatype/pgsql.php rename to 3rdparty/MDB2/Driver/Datatype/pgsql.php diff --git a/3dparty/MDB2/Driver/Datatype/sqlite.php b/3rdparty/MDB2/Driver/Datatype/sqlite.php similarity index 100% rename from 3dparty/MDB2/Driver/Datatype/sqlite.php rename to 3rdparty/MDB2/Driver/Datatype/sqlite.php diff --git a/3dparty/MDB2/Driver/Function/Common.php b/3rdparty/MDB2/Driver/Function/Common.php similarity index 100% rename from 3dparty/MDB2/Driver/Function/Common.php rename to 3rdparty/MDB2/Driver/Function/Common.php diff --git a/3dparty/MDB2/Driver/Function/mysql.php b/3rdparty/MDB2/Driver/Function/mysql.php similarity index 100% rename from 3dparty/MDB2/Driver/Function/mysql.php rename to 3rdparty/MDB2/Driver/Function/mysql.php diff --git a/3dparty/MDB2/Driver/Function/pgsql.php b/3rdparty/MDB2/Driver/Function/pgsql.php similarity index 100% rename from 3dparty/MDB2/Driver/Function/pgsql.php rename to 3rdparty/MDB2/Driver/Function/pgsql.php diff --git a/3dparty/MDB2/Driver/Function/sqlite.php b/3rdparty/MDB2/Driver/Function/sqlite.php similarity index 100% rename from 3dparty/MDB2/Driver/Function/sqlite.php rename to 3rdparty/MDB2/Driver/Function/sqlite.php diff --git a/3dparty/MDB2/Driver/Manager/Common.php b/3rdparty/MDB2/Driver/Manager/Common.php similarity index 100% rename from 3dparty/MDB2/Driver/Manager/Common.php rename to 3rdparty/MDB2/Driver/Manager/Common.php diff --git a/3dparty/MDB2/Driver/Manager/mysql.php b/3rdparty/MDB2/Driver/Manager/mysql.php similarity index 100% rename from 3dparty/MDB2/Driver/Manager/mysql.php rename to 3rdparty/MDB2/Driver/Manager/mysql.php diff --git a/3dparty/MDB2/Driver/Manager/pgsql.php b/3rdparty/MDB2/Driver/Manager/pgsql.php similarity index 100% rename from 3dparty/MDB2/Driver/Manager/pgsql.php rename to 3rdparty/MDB2/Driver/Manager/pgsql.php diff --git a/3dparty/MDB2/Driver/Manager/sqlite.php b/3rdparty/MDB2/Driver/Manager/sqlite.php similarity index 100% rename from 3dparty/MDB2/Driver/Manager/sqlite.php rename to 3rdparty/MDB2/Driver/Manager/sqlite.php diff --git a/3dparty/MDB2/Driver/Native/Common.php b/3rdparty/MDB2/Driver/Native/Common.php similarity index 100% rename from 3dparty/MDB2/Driver/Native/Common.php rename to 3rdparty/MDB2/Driver/Native/Common.php diff --git a/3dparty/MDB2/Driver/Native/mysql.php b/3rdparty/MDB2/Driver/Native/mysql.php similarity index 100% rename from 3dparty/MDB2/Driver/Native/mysql.php rename to 3rdparty/MDB2/Driver/Native/mysql.php diff --git a/3dparty/MDB2/Driver/Native/pgsql.php b/3rdparty/MDB2/Driver/Native/pgsql.php similarity index 100% rename from 3dparty/MDB2/Driver/Native/pgsql.php rename to 3rdparty/MDB2/Driver/Native/pgsql.php diff --git a/3dparty/MDB2/Driver/Native/sqlite.php b/3rdparty/MDB2/Driver/Native/sqlite.php similarity index 100% rename from 3dparty/MDB2/Driver/Native/sqlite.php rename to 3rdparty/MDB2/Driver/Native/sqlite.php diff --git a/3dparty/MDB2/Driver/Reverse/Common.php b/3rdparty/MDB2/Driver/Reverse/Common.php similarity index 100% rename from 3dparty/MDB2/Driver/Reverse/Common.php rename to 3rdparty/MDB2/Driver/Reverse/Common.php diff --git a/3dparty/MDB2/Driver/Reverse/mysql.php b/3rdparty/MDB2/Driver/Reverse/mysql.php similarity index 100% rename from 3dparty/MDB2/Driver/Reverse/mysql.php rename to 3rdparty/MDB2/Driver/Reverse/mysql.php diff --git a/3dparty/MDB2/Driver/Reverse/pgsql.php b/3rdparty/MDB2/Driver/Reverse/pgsql.php similarity index 100% rename from 3dparty/MDB2/Driver/Reverse/pgsql.php rename to 3rdparty/MDB2/Driver/Reverse/pgsql.php diff --git a/3dparty/MDB2/Driver/Reverse/sqlite.php b/3rdparty/MDB2/Driver/Reverse/sqlite.php similarity index 100% rename from 3dparty/MDB2/Driver/Reverse/sqlite.php rename to 3rdparty/MDB2/Driver/Reverse/sqlite.php diff --git a/3dparty/MDB2/Driver/mysql.php b/3rdparty/MDB2/Driver/mysql.php similarity index 100% rename from 3dparty/MDB2/Driver/mysql.php rename to 3rdparty/MDB2/Driver/mysql.php diff --git a/3dparty/MDB2/Driver/pgsql.php b/3rdparty/MDB2/Driver/pgsql.php similarity index 100% rename from 3dparty/MDB2/Driver/pgsql.php rename to 3rdparty/MDB2/Driver/pgsql.php diff --git a/3dparty/MDB2/Driver/sqlite.php b/3rdparty/MDB2/Driver/sqlite.php similarity index 100% rename from 3dparty/MDB2/Driver/sqlite.php rename to 3rdparty/MDB2/Driver/sqlite.php diff --git a/3dparty/MDB2/Extended.php b/3rdparty/MDB2/Extended.php similarity index 100% rename from 3dparty/MDB2/Extended.php rename to 3rdparty/MDB2/Extended.php diff --git a/3dparty/MDB2/Iterator.php b/3rdparty/MDB2/Iterator.php similarity index 100% rename from 3dparty/MDB2/Iterator.php rename to 3rdparty/MDB2/Iterator.php diff --git a/3dparty/MDB2/LOB.php b/3rdparty/MDB2/LOB.php similarity index 100% rename from 3dparty/MDB2/LOB.php rename to 3rdparty/MDB2/LOB.php diff --git a/3dparty/MDB2/Schema.php b/3rdparty/MDB2/Schema.php similarity index 100% rename from 3dparty/MDB2/Schema.php rename to 3rdparty/MDB2/Schema.php diff --git a/3dparty/MDB2/Schema/Parser.php b/3rdparty/MDB2/Schema/Parser.php similarity index 100% rename from 3dparty/MDB2/Schema/Parser.php rename to 3rdparty/MDB2/Schema/Parser.php diff --git a/3dparty/MDB2/Schema/Parser2.php b/3rdparty/MDB2/Schema/Parser2.php similarity index 100% rename from 3dparty/MDB2/Schema/Parser2.php rename to 3rdparty/MDB2/Schema/Parser2.php diff --git a/3dparty/MDB2/Schema/Reserved/ibase.php b/3rdparty/MDB2/Schema/Reserved/ibase.php similarity index 100% rename from 3dparty/MDB2/Schema/Reserved/ibase.php rename to 3rdparty/MDB2/Schema/Reserved/ibase.php diff --git a/3dparty/MDB2/Schema/Reserved/mssql.php b/3rdparty/MDB2/Schema/Reserved/mssql.php similarity index 100% rename from 3dparty/MDB2/Schema/Reserved/mssql.php rename to 3rdparty/MDB2/Schema/Reserved/mssql.php diff --git a/3dparty/MDB2/Schema/Reserved/mysql.php b/3rdparty/MDB2/Schema/Reserved/mysql.php similarity index 100% rename from 3dparty/MDB2/Schema/Reserved/mysql.php rename to 3rdparty/MDB2/Schema/Reserved/mysql.php diff --git a/3dparty/MDB2/Schema/Reserved/oci8.php b/3rdparty/MDB2/Schema/Reserved/oci8.php similarity index 100% rename from 3dparty/MDB2/Schema/Reserved/oci8.php rename to 3rdparty/MDB2/Schema/Reserved/oci8.php diff --git a/3dparty/MDB2/Schema/Reserved/pgsql.php b/3rdparty/MDB2/Schema/Reserved/pgsql.php similarity index 100% rename from 3dparty/MDB2/Schema/Reserved/pgsql.php rename to 3rdparty/MDB2/Schema/Reserved/pgsql.php diff --git a/3dparty/MDB2/Schema/Tool.php b/3rdparty/MDB2/Schema/Tool.php similarity index 100% rename from 3dparty/MDB2/Schema/Tool.php rename to 3rdparty/MDB2/Schema/Tool.php diff --git a/3dparty/MDB2/Schema/Tool/ParameterException.php b/3rdparty/MDB2/Schema/Tool/ParameterException.php similarity index 100% rename from 3dparty/MDB2/Schema/Tool/ParameterException.php rename to 3rdparty/MDB2/Schema/Tool/ParameterException.php diff --git a/3dparty/MDB2/Schema/Validate.php b/3rdparty/MDB2/Schema/Validate.php similarity index 100% rename from 3dparty/MDB2/Schema/Validate.php rename to 3rdparty/MDB2/Schema/Validate.php diff --git a/3dparty/MDB2/Schema/Writer.php b/3rdparty/MDB2/Schema/Writer.php similarity index 100% rename from 3dparty/MDB2/Schema/Writer.php rename to 3rdparty/MDB2/Schema/Writer.php diff --git a/3dparty/PEAR.php b/3rdparty/PEAR.php similarity index 100% rename from 3dparty/PEAR.php rename to 3rdparty/PEAR.php diff --git a/3dparty/PEAR/Autoloader.php b/3rdparty/PEAR/Autoloader.php similarity index 100% rename from 3dparty/PEAR/Autoloader.php rename to 3rdparty/PEAR/Autoloader.php diff --git a/3dparty/PEAR/Builder.php b/3rdparty/PEAR/Builder.php similarity index 100% rename from 3dparty/PEAR/Builder.php rename to 3rdparty/PEAR/Builder.php diff --git a/3dparty/PEAR/Command.php b/3rdparty/PEAR/Command.php similarity index 100% rename from 3dparty/PEAR/Command.php rename to 3rdparty/PEAR/Command.php diff --git a/3dparty/PEAR/Command/Auth.php b/3rdparty/PEAR/Command/Auth.php similarity index 100% rename from 3dparty/PEAR/Command/Auth.php rename to 3rdparty/PEAR/Command/Auth.php diff --git a/3dparty/PEAR/Command/Build.php b/3rdparty/PEAR/Command/Build.php similarity index 100% rename from 3dparty/PEAR/Command/Build.php rename to 3rdparty/PEAR/Command/Build.php diff --git a/3dparty/PEAR/Command/Common.php b/3rdparty/PEAR/Command/Common.php similarity index 100% rename from 3dparty/PEAR/Command/Common.php rename to 3rdparty/PEAR/Command/Common.php diff --git a/3dparty/PEAR/Command/Config.php b/3rdparty/PEAR/Command/Config.php similarity index 100% rename from 3dparty/PEAR/Command/Config.php rename to 3rdparty/PEAR/Command/Config.php diff --git a/3dparty/PEAR/Command/Install.php b/3rdparty/PEAR/Command/Install.php similarity index 100% rename from 3dparty/PEAR/Command/Install.php rename to 3rdparty/PEAR/Command/Install.php diff --git a/3dparty/PEAR/Command/Mirror.php b/3rdparty/PEAR/Command/Mirror.php similarity index 100% rename from 3dparty/PEAR/Command/Mirror.php rename to 3rdparty/PEAR/Command/Mirror.php diff --git a/3dparty/PEAR/Command/Package.php b/3rdparty/PEAR/Command/Package.php similarity index 100% rename from 3dparty/PEAR/Command/Package.php rename to 3rdparty/PEAR/Command/Package.php diff --git a/3dparty/PEAR/Command/Registry.php b/3rdparty/PEAR/Command/Registry.php similarity index 100% rename from 3dparty/PEAR/Command/Registry.php rename to 3rdparty/PEAR/Command/Registry.php diff --git a/3dparty/PEAR/Command/Remote.php b/3rdparty/PEAR/Command/Remote.php similarity index 100% rename from 3dparty/PEAR/Command/Remote.php rename to 3rdparty/PEAR/Command/Remote.php diff --git a/3dparty/PEAR/Common.php b/3rdparty/PEAR/Common.php similarity index 100% rename from 3dparty/PEAR/Common.php rename to 3rdparty/PEAR/Common.php diff --git a/3dparty/PEAR/Config.php b/3rdparty/PEAR/Config.php similarity index 100% rename from 3dparty/PEAR/Config.php rename to 3rdparty/PEAR/Config.php diff --git a/3dparty/PEAR/Dependency.php b/3rdparty/PEAR/Dependency.php similarity index 100% rename from 3dparty/PEAR/Dependency.php rename to 3rdparty/PEAR/Dependency.php diff --git a/3dparty/PEAR/Downloader.php b/3rdparty/PEAR/Downloader.php similarity index 100% rename from 3dparty/PEAR/Downloader.php rename to 3rdparty/PEAR/Downloader.php diff --git a/3dparty/PEAR/ErrorStack.php b/3rdparty/PEAR/ErrorStack.php similarity index 100% rename from 3dparty/PEAR/ErrorStack.php rename to 3rdparty/PEAR/ErrorStack.php diff --git a/3dparty/PEAR/Exception.php b/3rdparty/PEAR/Exception.php similarity index 100% rename from 3dparty/PEAR/Exception.php rename to 3rdparty/PEAR/Exception.php diff --git a/3dparty/PEAR/Frontend/CLI.php b/3rdparty/PEAR/Frontend/CLI.php similarity index 100% rename from 3dparty/PEAR/Frontend/CLI.php rename to 3rdparty/PEAR/Frontend/CLI.php diff --git a/3dparty/PEAR/Installer.php b/3rdparty/PEAR/Installer.php similarity index 100% rename from 3dparty/PEAR/Installer.php rename to 3rdparty/PEAR/Installer.php diff --git a/3dparty/PEAR/Packager.php b/3rdparty/PEAR/Packager.php similarity index 100% rename from 3dparty/PEAR/Packager.php rename to 3rdparty/PEAR/Packager.php diff --git a/3dparty/PEAR/Registry.php b/3rdparty/PEAR/Registry.php similarity index 100% rename from 3dparty/PEAR/Registry.php rename to 3rdparty/PEAR/Registry.php diff --git a/3dparty/PEAR/Remote.php b/3rdparty/PEAR/Remote.php similarity index 100% rename from 3dparty/PEAR/Remote.php rename to 3rdparty/PEAR/Remote.php diff --git a/3dparty/PEAR/RunTest.php b/3rdparty/PEAR/RunTest.php similarity index 100% rename from 3dparty/PEAR/RunTest.php rename to 3rdparty/PEAR/RunTest.php diff --git a/3dparty/Sabre.includes.php b/3rdparty/Sabre.includes.php similarity index 98% rename from 3dparty/Sabre.includes.php rename to 3rdparty/Sabre.includes.php index 6b179e34fd..9d389288c7 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 similarity index 100% rename from 3dparty/Sabre/CalDAV/Backend/Abstract.php rename to 3rdparty/Sabre/CalDAV/Backend/Abstract.php diff --git a/3dparty/Sabre/CalDAV/Backend/PDO.php b/3rdparty/Sabre/CalDAV/Backend/PDO.php similarity index 100% rename from 3dparty/Sabre/CalDAV/Backend/PDO.php rename to 3rdparty/Sabre/CalDAV/Backend/PDO.php diff --git a/3dparty/Sabre/CalDAV/Calendar.php b/3rdparty/Sabre/CalDAV/Calendar.php similarity index 97% rename from 3dparty/Sabre/CalDAV/Calendar.php rename to 3rdparty/Sabre/CalDAV/Calendar.php index 010554b6d9..a50aef12b4 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 similarity index 96% rename from 3dparty/Sabre/CalDAV/CalendarObject.php rename to 3rdparty/Sabre/CalDAV/CalendarObject.php index efec35dcca..b5c4e49b83 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 similarity index 86% rename from 3dparty/Sabre/CalDAV/CalendarRootNode.php rename to 3rdparty/Sabre/CalDAV/CalendarRootNode.php index 5c9b37e7d5..69669a9d7f 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 similarity index 100% rename from 3dparty/Sabre/CalDAV/Exception/InvalidICalendarObject.php rename to 3rdparty/Sabre/CalDAV/Exception/InvalidICalendarObject.php diff --git a/3dparty/Sabre/CalDAV/ICSExportPlugin.php b/3rdparty/Sabre/CalDAV/ICSExportPlugin.php similarity index 100% rename from 3dparty/Sabre/CalDAV/ICSExportPlugin.php rename to 3rdparty/Sabre/CalDAV/ICSExportPlugin.php diff --git a/3dparty/Sabre/CalDAV/ICalendarUtil.php b/3rdparty/Sabre/CalDAV/ICalendarUtil.php similarity index 98% rename from 3dparty/Sabre/CalDAV/ICalendarUtil.php rename to 3rdparty/Sabre/CalDAV/ICalendarUtil.php index fbfef397ac..699abfdd6f 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 similarity index 100% rename from 3dparty/Sabre/CalDAV/Plugin.php rename to 3rdparty/Sabre/CalDAV/Plugin.php diff --git a/3dparty/Sabre/CalDAV/Principal/Collection.php b/3rdparty/Sabre/CalDAV/Principal/Collection.php similarity index 100% rename from 3dparty/Sabre/CalDAV/Principal/Collection.php rename to 3rdparty/Sabre/CalDAV/Principal/Collection.php diff --git a/3dparty/Sabre/CalDAV/Principal/ProxyRead.php b/3rdparty/Sabre/CalDAV/Principal/ProxyRead.php similarity index 100% rename from 3dparty/Sabre/CalDAV/Principal/ProxyRead.php rename to 3rdparty/Sabre/CalDAV/Principal/ProxyRead.php diff --git a/3dparty/Sabre/CalDAV/Principal/ProxyWrite.php b/3rdparty/Sabre/CalDAV/Principal/ProxyWrite.php similarity index 100% rename from 3dparty/Sabre/CalDAV/Principal/ProxyWrite.php rename to 3rdparty/Sabre/CalDAV/Principal/ProxyWrite.php diff --git a/3dparty/Sabre/CalDAV/Principal/User.php b/3rdparty/Sabre/CalDAV/Principal/User.php similarity index 100% rename from 3dparty/Sabre/CalDAV/Principal/User.php rename to 3rdparty/Sabre/CalDAV/Principal/User.php diff --git a/3dparty/Sabre/CalDAV/Property/SupportedCalendarComponentSet.php b/3rdparty/Sabre/CalDAV/Property/SupportedCalendarComponentSet.php similarity index 100% rename from 3dparty/Sabre/CalDAV/Property/SupportedCalendarComponentSet.php rename to 3rdparty/Sabre/CalDAV/Property/SupportedCalendarComponentSet.php diff --git a/3dparty/Sabre/CalDAV/Property/SupportedCalendarData.php b/3rdparty/Sabre/CalDAV/Property/SupportedCalendarData.php similarity index 100% rename from 3dparty/Sabre/CalDAV/Property/SupportedCalendarData.php rename to 3rdparty/Sabre/CalDAV/Property/SupportedCalendarData.php diff --git a/3dparty/Sabre/CalDAV/Property/SupportedCollationSet.php b/3rdparty/Sabre/CalDAV/Property/SupportedCollationSet.php similarity index 100% rename from 3dparty/Sabre/CalDAV/Property/SupportedCollationSet.php rename to 3rdparty/Sabre/CalDAV/Property/SupportedCollationSet.php diff --git a/3dparty/Sabre/CalDAV/Server.php b/3rdparty/Sabre/CalDAV/Server.php similarity index 100% rename from 3dparty/Sabre/CalDAV/Server.php rename to 3rdparty/Sabre/CalDAV/Server.php diff --git a/3dparty/Sabre/CalDAV/UserCalendars.php b/3rdparty/Sabre/CalDAV/UserCalendars.php similarity index 100% rename from 3dparty/Sabre/CalDAV/UserCalendars.php rename to 3rdparty/Sabre/CalDAV/UserCalendars.php diff --git a/3dparty/Sabre/CalDAV/Version.php b/3rdparty/Sabre/CalDAV/Version.php similarity index 100% rename from 3dparty/Sabre/CalDAV/Version.php rename to 3rdparty/Sabre/CalDAV/Version.php diff --git a/3dparty/Sabre/CalDAV/XMLUtil.php b/3rdparty/Sabre/CalDAV/XMLUtil.php similarity index 100% rename from 3dparty/Sabre/CalDAV/XMLUtil.php rename to 3rdparty/Sabre/CalDAV/XMLUtil.php diff --git a/3dparty/Sabre/CardDAV/AddressBook.php b/3rdparty/Sabre/CardDAV/AddressBook.php similarity index 74% rename from 3dparty/Sabre/CardDAV/AddressBook.php rename to 3rdparty/Sabre/CardDAV/AddressBook.php index a4d2d0c478..04e4c227b8 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 similarity index 100% rename from 3dparty/Sabre/CardDAV/AddressBookQueryParser.php rename to 3rdparty/Sabre/CardDAV/AddressBookQueryParser.php diff --git a/3dparty/Sabre/CardDAV/AddressBookRoot.php b/3rdparty/Sabre/CardDAV/AddressBookRoot.php similarity index 76% rename from 3dparty/Sabre/CardDAV/AddressBookRoot.php rename to 3rdparty/Sabre/CardDAV/AddressBookRoot.php index 88c8ed2e06..1a80efba35 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 similarity index 100% rename from 3dparty/Sabre/CardDAV/Backend/Abstract.php rename to 3rdparty/Sabre/CardDAV/Backend/Abstract.php diff --git a/3dparty/Sabre/CardDAV/Backend/PDO.php b/3rdparty/Sabre/CardDAV/Backend/PDO.php similarity index 76% rename from 3dparty/Sabre/CardDAV/Backend/PDO.php rename to 3rdparty/Sabre/CardDAV/Backend/PDO.php index e7cd4ecd4d..63a74745aa 100644 --- a/3dparty/Sabre/CardDAV/Backend/PDO.php +++ b/3rdparty/Sabre/CardDAV/Backend/PDO.php @@ -22,14 +22,26 @@ 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 similarity index 64% rename from 3dparty/Sabre/CardDAV/Card.php rename to 3rdparty/Sabre/CardDAV/Card.php index a12e6d3914..98189aa9fd 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 similarity index 100% rename from 3dparty/Sabre/CardDAV/IAddressBook.php rename to 3rdparty/Sabre/CardDAV/IAddressBook.php diff --git a/3dparty/Sabre/CardDAV/ICard.php b/3rdparty/Sabre/CardDAV/ICard.php similarity index 100% rename from 3dparty/Sabre/CardDAV/ICard.php rename to 3rdparty/Sabre/CardDAV/ICard.php diff --git a/3dparty/Sabre/CardDAV/IDirectory.php b/3rdparty/Sabre/CardDAV/IDirectory.php similarity index 100% rename from 3dparty/Sabre/CardDAV/IDirectory.php rename to 3rdparty/Sabre/CardDAV/IDirectory.php diff --git a/3dparty/Sabre/CardDAV/Plugin.php b/3rdparty/Sabre/CardDAV/Plugin.php similarity index 99% rename from 3dparty/Sabre/CardDAV/Plugin.php rename to 3rdparty/Sabre/CardDAV/Plugin.php index 16fadc526e..a96f9aaebb 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 similarity index 69% rename from 3dparty/Sabre/CardDAV/UserAddressBooks.php rename to 3rdparty/Sabre/CardDAV/UserAddressBooks.php index 186bf016a1..564ecd701f 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 similarity index 100% rename from 3dparty/Sabre/CardDAV/Version.php rename to 3rdparty/Sabre/CardDAV/Version.php diff --git a/3dparty/Sabre/DAV/Auth/Backend/AbstractBasic.php b/3rdparty/Sabre/DAV/Auth/Backend/AbstractBasic.php similarity index 100% rename from 3dparty/Sabre/DAV/Auth/Backend/AbstractBasic.php rename to 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 similarity index 100% rename from 3dparty/Sabre/DAV/Auth/Backend/AbstractDigest.php rename to 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 similarity index 100% rename from 3dparty/Sabre/DAV/Auth/Backend/Apache.php rename to 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 similarity index 100% rename from 3dparty/Sabre/DAV/Auth/Backend/File.php rename to 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 similarity index 100% rename from 3dparty/Sabre/DAV/Auth/Backend/PDO.php rename to 3rdparty/Sabre/DAV/Auth/Backend/PDO.php diff --git a/3dparty/Sabre/DAV/Auth/IBackend.php b/3rdparty/Sabre/DAV/Auth/IBackend.php similarity index 100% rename from 3dparty/Sabre/DAV/Auth/IBackend.php rename to 3rdparty/Sabre/DAV/Auth/IBackend.php diff --git a/3dparty/Sabre/DAV/Auth/Plugin.php b/3rdparty/Sabre/DAV/Auth/Plugin.php similarity index 100% rename from 3dparty/Sabre/DAV/Auth/Plugin.php rename to 3rdparty/Sabre/DAV/Auth/Plugin.php diff --git a/3dparty/Sabre/DAV/Browser/GuessContentType.php b/3rdparty/Sabre/DAV/Browser/GuessContentType.php similarity index 100% rename from 3dparty/Sabre/DAV/Browser/GuessContentType.php rename to 3rdparty/Sabre/DAV/Browser/GuessContentType.php diff --git a/3dparty/Sabre/DAV/Browser/MapGetToPropFind.php b/3rdparty/Sabre/DAV/Browser/MapGetToPropFind.php similarity index 100% rename from 3dparty/Sabre/DAV/Browser/MapGetToPropFind.php rename to 3rdparty/Sabre/DAV/Browser/MapGetToPropFind.php diff --git a/3dparty/Sabre/DAV/Browser/Plugin.php b/3rdparty/Sabre/DAV/Browser/Plugin.php similarity index 100% rename from 3dparty/Sabre/DAV/Browser/Plugin.php rename to 3rdparty/Sabre/DAV/Browser/Plugin.php diff --git a/3dparty/Sabre/DAV/Client.php b/3rdparty/Sabre/DAV/Client.php similarity index 100% rename from 3dparty/Sabre/DAV/Client.php rename to 3rdparty/Sabre/DAV/Client.php diff --git a/3dparty/Sabre/DAV/Directory.php b/3rdparty/Sabre/DAV/Collection.php similarity index 91% rename from 3dparty/Sabre/DAV/Directory.php rename to 3rdparty/Sabre/DAV/Collection.php index 14d7f2cb67..9da04c1279 100644 --- a/3dparty/Sabre/DAV/Directory.php +++ b/3rdparty/Sabre/DAV/Collection.php @@ -1,9 +1,9 @@ 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 similarity index 100% rename from 3dparty/Sabre/DAV/Property.php rename to 3rdparty/Sabre/DAV/Property.php diff --git a/3dparty/Sabre/DAV/Property/GetLastModified.php b/3rdparty/Sabre/DAV/Property/GetLastModified.php similarity index 100% rename from 3dparty/Sabre/DAV/Property/GetLastModified.php rename to 3rdparty/Sabre/DAV/Property/GetLastModified.php diff --git a/3dparty/Sabre/DAV/Property/Href.php b/3rdparty/Sabre/DAV/Property/Href.php similarity index 100% rename from 3dparty/Sabre/DAV/Property/Href.php rename to 3rdparty/Sabre/DAV/Property/Href.php diff --git a/3dparty/Sabre/DAV/Property/HrefList.php b/3rdparty/Sabre/DAV/Property/HrefList.php similarity index 100% rename from 3dparty/Sabre/DAV/Property/HrefList.php rename to 3rdparty/Sabre/DAV/Property/HrefList.php diff --git a/3dparty/Sabre/DAV/Property/IHref.php b/3rdparty/Sabre/DAV/Property/IHref.php similarity index 100% rename from 3dparty/Sabre/DAV/Property/IHref.php rename to 3rdparty/Sabre/DAV/Property/IHref.php diff --git a/3dparty/Sabre/DAV/Property/LockDiscovery.php b/3rdparty/Sabre/DAV/Property/LockDiscovery.php similarity index 100% rename from 3dparty/Sabre/DAV/Property/LockDiscovery.php rename to 3rdparty/Sabre/DAV/Property/LockDiscovery.php diff --git a/3dparty/Sabre/DAV/Property/ResourceType.php b/3rdparty/Sabre/DAV/Property/ResourceType.php similarity index 100% rename from 3dparty/Sabre/DAV/Property/ResourceType.php rename to 3rdparty/Sabre/DAV/Property/ResourceType.php diff --git a/3dparty/Sabre/DAV/Property/Response.php b/3rdparty/Sabre/DAV/Property/Response.php similarity index 100% rename from 3dparty/Sabre/DAV/Property/Response.php rename to 3rdparty/Sabre/DAV/Property/Response.php diff --git a/3dparty/Sabre/DAV/Property/ResponseList.php b/3rdparty/Sabre/DAV/Property/ResponseList.php similarity index 100% rename from 3dparty/Sabre/DAV/Property/ResponseList.php rename to 3rdparty/Sabre/DAV/Property/ResponseList.php diff --git a/3dparty/Sabre/DAV/Property/SupportedLock.php b/3rdparty/Sabre/DAV/Property/SupportedLock.php similarity index 100% rename from 3dparty/Sabre/DAV/Property/SupportedLock.php rename to 3rdparty/Sabre/DAV/Property/SupportedLock.php diff --git a/3dparty/Sabre/DAV/Property/SupportedReportSet.php b/3rdparty/Sabre/DAV/Property/SupportedReportSet.php similarity index 100% rename from 3dparty/Sabre/DAV/Property/SupportedReportSet.php rename to 3rdparty/Sabre/DAV/Property/SupportedReportSet.php diff --git a/3dparty/Sabre/DAV/Server.php b/3rdparty/Sabre/DAV/Server.php similarity index 99% rename from 3dparty/Sabre/DAV/Server.php rename to 3rdparty/Sabre/DAV/Server.php index e912dea0f1..e5e9e482fe 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'); @@ -1396,18 +1396,6 @@ class Sabre_DAV_Server { $this->broadcastEvent('afterBind',array($uri)); } - /** - * 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 * diff --git a/3dparty/Sabre/DAV/ServerPlugin.php b/3rdparty/Sabre/DAV/ServerPlugin.php similarity index 100% rename from 3dparty/Sabre/DAV/ServerPlugin.php rename to 3rdparty/Sabre/DAV/ServerPlugin.php diff --git a/3dparty/Sabre/DAV/SimpleDirectory.php b/3rdparty/Sabre/DAV/SimpleCollection.php similarity index 93% rename from 3dparty/Sabre/DAV/SimpleDirectory.php rename to 3rdparty/Sabre/DAV/SimpleCollection.php index 8c79962a95..223d05fed5 100644 --- a/3dparty/Sabre/DAV/SimpleDirectory.php +++ b/3rdparty/Sabre/DAV/SimpleCollection.php @@ -1,9 +1,9 @@ [^\"^;]*|"[^"]*")'; - $regex = "/(?<=^|;)(?P$token)=$paramValue(?=$|;)/i"; + $regex = "/(?<=^|;)(?P$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 similarity index 100% rename from 3dparty/Sabre/VObject/Version.php rename to 3rdparty/Sabre/VObject/Version.php diff --git a/3dparty/Sabre/VObject/includes.php b/3rdparty/Sabre/VObject/includes.php similarity index 100% rename from 3dparty/Sabre/VObject/includes.php rename to 3rdparty/Sabre/VObject/includes.php diff --git a/3dparty/Sabre/autoload.php b/3rdparty/Sabre/autoload.php similarity index 100% rename from 3dparty/Sabre/autoload.php rename to 3rdparty/Sabre/autoload.php diff --git a/3dparty/System.php b/3rdparty/System.php similarity index 100% rename from 3dparty/System.php rename to 3rdparty/System.php diff --git a/3dparty/XML/Parser.php b/3rdparty/XML/Parser.php similarity index 100% rename from 3dparty/XML/Parser.php rename to 3rdparty/XML/Parser.php diff --git a/3dparty/XML/RPC.php b/3rdparty/XML/RPC.php similarity index 100% rename from 3dparty/XML/RPC.php rename to 3rdparty/XML/RPC.php diff --git a/3dparty/XML/RPC/Server.php b/3rdparty/XML/RPC/Server.php similarity index 100% rename from 3dparty/XML/RPC/Server.php rename to 3rdparty/XML/RPC/Server.php diff --git a/AUTHORS b/AUTHORS new file mode 100644 index 0000000000..5f992b932e --- /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 54b959eb01..5f00323b71 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 ea591935ff..18b817ad34 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 c8989e323c..06896121d0 100644 --- a/admin/templates/app.php +++ b/admin/templates/app.php @@ -1,9 +1,4 @@ - +

'.$app['typename'].''); ?>
l('datetime', $app["changed"]); ?>
@@ -21,7 +16,7 @@ $app=$_['app'];
'.$l->t( 'read more' ).'
'); ?> - t( 'INSTALL' ); ?> + t( 'Install' ); ?> diff --git a/admin/templates/apps.php b/admin/templates/apps.php index 50dd497c33..732326f659 100644 --- a/admin/templates/apps.php +++ b/admin/templates/apps.php @@ -1,11 +1,3 @@ - -

t( 'Apps Repository' ); ?>

- - diff --git a/admin/templates/appsinst.php b/admin/templates/appsinst.php index 0e97df6add..d1adb5f45a 100644 --- a/admin/templates/appsinst.php +++ b/admin/templates/appsinst.php @@ -1,10 +1,3 @@ - -

t( 'Installed Applications' ); ?>

-
@@ -20,8 +13,8 @@ - + -
' class='appbutton prettybutton '/>
\ No newline at end of file + diff --git a/apps/contacts/appinfo/app.php b/apps/contacts/appinfo/app.php new file mode 100644 index 0000000000..7ff4726525 --- /dev/null +++ b/apps/contacts/appinfo/app.php @@ -0,0 +1,18 @@ + 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 0000000000..7c8268d71f --- /dev/null +++ b/apps/contacts/appinfo/database.xml @@ -0,0 +1,129 @@ + + + + *dbname* + true + false + + utf8 + + + + *dbprefix*contacts_addressbooks + + + + + id + integer + 0 + true + 1 + true + 4 + + + + userid + text + + true + 255 + + + + displayname + text + + false + 255 + + + + uri + text + + false + 100 + + + + description + clob + false + + + + ctag + integer + 1 + true + true + 4 + + + + +
+ + + + *dbprefix*contacts_cards + + + + + id + integer + 0 + true + 1 + true + 4 + + + + addressbookid + integer + + true + true + 4 + + + + fullname + text + + false + 255 + + + + carddata + clob + false + + + + uri + text + + false + 100 + + + + lastmodified + integer + + false + true + 4 + + + + +
+ +
diff --git a/apps/contacts/appinfo/info.xml b/apps/contacts/appinfo/info.xml new file mode 100644 index 0000000000..93463b9cf0 --- /dev/null +++ b/apps/contacts/appinfo/info.xml @@ -0,0 +1,9 @@ + + + contacts + Contacts + 0.1 + AGPL + Jakob Sack + 2 + diff --git a/apps/contacts/carddav.php b/apps/contacts/carddav.php new file mode 100644 index 0000000000..ae2c5b9736 --- /dev/null +++ b/apps/contacts/carddav.php @@ -0,0 +1,28 @@ +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 0000000000..8d1c8b69c3 --- /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 0000000000..7ab1b64de2 --- /dev/null +++ b/apps/contacts/details.php @@ -0,0 +1,57 @@ +. + * + */ + +// 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 0000000000..ea2ed9e333 Binary files /dev/null and b/apps/contacts/img/icon.png differ diff --git a/apps/contacts/index.php b/apps/contacts/index.php new file mode 100644 index 0000000000..1e01b1c9fb --- /dev/null +++ b/apps/contacts/index.php @@ -0,0 +1,77 @@ +. + * + */ + +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 0000000000..6af160b392 --- /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 0000000000..c0f26c7df5 --- /dev/null +++ b/apps/contacts/lib/addressbook.php @@ -0,0 +1,287 @@ +. + * + */ +/* + * + * 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 0000000000..98e2598b3a --- /dev/null +++ b/apps/contacts/lib/connector_sabre.php @@ -0,0 +1,186 @@ + $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 0000000000..62386421cd --- /dev/null +++ b/apps/contacts/photo.php @@ -0,0 +1,85 @@ +. + * + */ + +// 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 0000000000..bf633b79b0 --- /dev/null +++ b/apps/contacts/templates/_contacts.php @@ -0,0 +1,3 @@ + +
  • + diff --git a/apps/contacts/templates/_details.php b/apps/contacts/templates/_details.php new file mode 100644 index 0000000000..e27b17ef2e --- /dev/null +++ b/apps/contacts/templates/_details.php @@ -0,0 +1,4 @@ +Name + + + \ 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 0000000000..ca189cb4c8 --- /dev/null +++ b/apps/contacts/templates/index.php @@ -0,0 +1,24 @@ + + +
    +
    + Addressbooks +
    + +
    +
    +
      + inc("_contacts"); ?> +
    +
    +
    + inc("_details"); ?> +
    diff --git a/apps/contacts/temporaryupdate.php b/apps/contacts/temporaryupdate.php new file mode 100644 index 0000000000..bb5ff7604f --- /dev/null +++ b/apps/contacts/temporaryupdate.php @@ -0,0 +1,13 @@ +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 28a398f727..17646b3e5b 100644 --- a/apps/files_publiclink/appinfo/app.php +++ b/apps/files_publiclink/appinfo/app.php @@ -1,6 +1,6 @@ "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 6bcefc2e4e..2e1ba4bf36 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 0000000000..7cf1905a53 --- /dev/null +++ b/apps/files_textviewer/appinfo/app.php @@ -0,0 +1,5 @@ + diff --git a/apps/files_textviewer/appinfo/info.xml b/apps/files_textviewer/appinfo/info.xml new file mode 100644 index 0000000000..112a416c35 --- /dev/null +++ b/apps/files_textviewer/appinfo/info.xml @@ -0,0 +1,9 @@ + + + files_textviewer + Text viewer + 0.3 + AGPL + Icewind + 2 + diff --git a/apps/files_textviewer/css/style.css b/apps/files_textviewer/css/style.css new file mode 100644 index 0000000000..b70fc0e572 --- /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 0000000000..34f6864a15 --- /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 0000000000..08f9e10e4e --- /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 0000000000..1db1f70cb0 --- /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 0000000000..a45de9fd8e --- /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 0000000000..706c77a0a8 --- /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 0000000000..6101eba51f --- /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 0000000000..2923ce7367 --- /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 0000000000..e3733eed56 --- /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 0000000000..d09368384d --- /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 0000000000..136541172d --- /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 0000000000..d8b4313433 --- /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 0000000000..77377d9533 --- /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 0000000000..dae5053fea --- /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 0000000000..8fbd871fb5 --- /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 0000000000..f4db39cd83 --- /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 0000000000..c49563cc9d --- /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 0000000000..6305a10e4e --- /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 0000000000..3f9959fc56 --- /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. + 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 0000000000..e7c70ba14a --- /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 0000000000..4e29bddecb --- /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(c35?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|<|≥|>=|≤|<=|\*|\+|-|\/|÷|\^)/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 0000000000..8c296969ff --- /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 0000000000..079214efe1 --- /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 0000000000..627dbb9b76 --- /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 0000000000..9f70d3aed6 --- /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 0000000000..4297a9a648 --- /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: /(<|<)\s*style.*?(>|>)/gi, + right: /(<|<)\/\s*style\s*(>|>)/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 0000000000..e1060d4468 --- /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 0000000000..e9b14fc580 --- /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 0000000000..6ba7d9da87 --- /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 0000000000..6ec5c18521 --- /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 0000000000..ff98daba16 --- /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 0000000000..d692fd6382 --- /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 : /(<|<)%[@!=]?/g, + right : /%(>|>)/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 0000000000..1a150a6ad3 --- /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 0000000000..d94a2e0ec5 --- /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 0000000000..95e6e4325b --- /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 0000000000..9f7d9e90c3 --- /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 0000000000..0be1752968 --- /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 0000000000..ce77462975 --- /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 0000000000..ff82130a7a --- /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 0000000000..aa04da0996 --- /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 0000000000..4b0b6f04d2 --- /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 0000000000..5c2cd8806f --- /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 0000000000..be845dc0b3 --- /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 0000000000..69d9fd0b1f --- /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('(<|<)[\\s\\/\\?]*(?[:\\w-\\.]+)', 'xg').exec(code), + result = [] + ; + + if (match.attributes != null) + { + var attributes, + regex = new XRegExp('(? [\\w:\\-\\.]+)' + + '\\s*=\\s*' + + '(? ".*?"|\'.*?\'|\\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('(\\<|<)\\!\\[[\\w\\s]*?\\[(.|\\s)*?\\]\\](\\>|>)', 'gm'), css: 'color2' }, // + { regex: SyntaxHighlighter.regexLib.xmlComments, css: 'comments' }, // + { regex: new XRegExp('(<|<)[\\s\\/\\?]*(\\w+)(?.*?)[\\s\\/\\?]*(>|>)', '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 0000000000..b47b645472 --- /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(c35?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-1},3d:6(g){e+=g}};c1&&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;be.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;dd.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=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\'+c+""});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.Pb.P)H 1;Y I(a.Lb.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\'\'+c+""+d})}6 z(){O(K a=1E.36("1k"),b=[],c=0;c<1z 4I="1Z://2y.3L.3K/4L/5L"><3J><4N 1Z-4M="5G-5M" 6K="2O/1z; 6J=6I-8" /><1t>6L 1v<3B 1L="25-6M:6Q,6P,6O,6N-6F;6y-2f:#6x;2f:#6w;25-22:6v;2O-3D:3C;">1v3v 3.0.76 (72 73 3x)1Z://3u.2w/1v70 17 6U 71.6T 6X-3x 6Y 6D.6t 61 60 J 1k, 5Z 5R 5V <2R/>5U 5T 5S!\'}},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=\'\',d=e.16.2x,h=d.2X,g=0;g";H c},2o:6(a,b,c){H\'<2W>\'+c+""},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(.*?))\\\\]$"),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")==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;md)1N;Y I(g.P==c.P&&g.L>c.L)a[b]=N;Y I(g.P>=c.P&&g.P\'+c+""},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\'+j+"":"")+i)}H a},4f:6(a){H a?"<4a>"+a+"":""},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|&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;i0;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\'+(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 1g="17">\'+b+""},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 0000000000..6d9fd4d19f --- /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(c35?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+"\\\\[(?\\\\w+)\\\\]$","U"),i=1,p=0;p'); + div.click(TextViewer.hideText); + TextViewer.textFrame=$('
    '); + TextViewer.textFrame.click(function(event){ + event.stopPropagation(); + }); + TextViewer.textFrame.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 b86c69d0be..46f18b848e 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 b29b842d23..4cdb36d450 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 43423d27de..a7128aaad4 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 95e5293ea4..520ce7d112 100644
    --- a/apps/media/js/collection.js
    +++ b/apps/media/js/collection.js
    @@ -32,6 +32,10 @@ Collection={
     					for(var i=0;i=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+10){
    +					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 54fe5b792e..a15c34f93f 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 0000000000..165f86d05f
    --- /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.currentIndexexecute(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 e3cb2f051c..c774c3c9fd 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 0563bc38fb..0000000000
    --- a/apps/media/settings.php
    +++ /dev/null
    @@ -1,52 +0,0 @@
    -.
    -*
    -*/
    -
    -
    -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 e2c256a648..f47cba2486 100644
    --- a/apps/media/templates/collection.php
    +++ b/apps/media/templates/collection.php
    @@ -1,3 +1,9 @@
    +
    + +
    + + +
    • loadingLoading Collection... @@ -7,4 +13,5 @@
    • -
    \ No newline at end of file + + diff --git a/apps/user_openid/appinfo/app.php b/apps/user_openid/appinfo/app.php index 74c13402ca..93b178ac70 100644 --- a/apps/user_openid/appinfo/app.php +++ b/apps/user_openid/appinfo/app.php @@ -6,13 +6,21 @@ 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" ).'/')); + +$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_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'; -OC_App::addSettingsPage( array( "id" => "user_openid_settings", 'order'=>1, "href" => OC_Helper::linkTo( "user_openid", "settings.php" ), "name" => "OpenID")); - //active the openid backend OC_User::useBackend('openid'); diff --git a/apps/user_openid/phpmyid.php b/apps/user_openid/phpmyid.php index bcab9e55cb..24fab44ca7 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 4293a6c8aa..0000000000 --- a/apps/user_openid/settings.php +++ /dev/null @@ -1,23 +0,0 @@ -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 7a1b530fbc..0000000000 --- a/apps/user_openid/templates/settings.php +++ /dev/null @@ -1,7 +0,0 @@ -
    -
    - t( 'OpenID identity' );?> -
    - -
    -
    diff --git a/core/css/styles.css b/core/css/styles.css index eb6b04d28d..e83f063499 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 c3d0102f71..0000000000 Binary files a/core/img/body_background.jpg and /dev/null differ diff --git a/core/js/js.js b/core/js/js.js index a83d6abb6a..00618cb30c 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 b4616b8b14..3025a511c6 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 8b36d14bbf..e2392778be 100644 --- a/core/templates/installation.php +++ b/core/templates/installation.php @@ -39,7 +39,7 @@ t( 'Configure the database.' ); ?> - +

    t( 'SQLite will be used for the database. You have nothing to do.' ); ?>

    @@ -49,11 +49,11 @@ - +

    t( 'MySQL will be used for the database.' ); ?>

    -

    />

    +

    />

    @@ -64,6 +64,24 @@
    + + + + +

    t( 'PostgreSQL will be used for the database.' ); ?>

    + + +

    />

    + +
    +

    +

    +

    +

    +

    + +
    +

    diff --git a/core/templates/layout.admin.php b/core/templates/layout.admin.php index 3aac4c98ac..d70c54f7b1 100644 --- a/core/templates/layout.admin.php +++ b/core/templates/layout.admin.php @@ -9,6 +9,7 @@ @@ -36,7 +37,7 @@
    -
    +
    -
    - -
    -
    + +
    + +
    diff --git a/core/templates/part.searchbox.php b/core/templates/part.searchbox.php index 49b44c718e..f5a62de2c8 100644 --- a/core/templates/part.searchbox.php +++ b/core/templates/part.searchbox.php @@ -1,3 +1,3 @@ diff --git a/db_structure.xml b/db_structure.xml index c24c2c669a..ddb8c44d19 100644 --- a/db_structure.xml +++ b/db_structure.xml @@ -310,6 +310,102 @@ + + + *dbprefix*principalgroups + + + + + id + integer + 0 + true + 1 + true + 4 + + + + principal_id + integer + + true + true + 4 + + + + member_id + integer + + true + true + 4 + + + + principals_members_index + true + + principal_id + ascending + + + member_id + ascending + + + + + +
    + + + + *dbprefix*principals + + + + + id + integer + 0 + true + 1 + true + 4 + + + + uri + text + + false + 255 + + + + displayname + text + + false + 255 + + + + uri + true + + uri + ascending + + + + + +
    + *dbprefix*properties diff --git a/files/css/files.css b/files/css/files.css index d852106d09..b01d52b43b 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 359e54dda3..a8de2f9977 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 3f9b398446..8fd3bceafb 100644 --- a/files/js/filelist.js +++ b/files/js/filelist.js @@ -12,8 +12,8 @@ FileList={ var basename=name; var extention=false; } - html+=''; - html+=''; + html+=''; 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 3d3d8ca49f..49e7cecd09 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 +
    '; - html+=''+basename + html+=''; + html+=''+basename if(extention){ html+=''+extention+''; } @@ -38,7 +38,7 @@ FileList={ }, addDir:function(name,size,lastModified){ var html='
    '+name+''+name+'
    diff --git a/files/templates/part.list.php b/files/templates/part.list.php index 93ed70990b..5051c19949 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; ?> '> -
    + - + diff --git a/files/webdav.php b/files/webdav.php index a59dee70c2..b1d242b2cc 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 f239de217d..82ab224d49 100644 --- a/help/templates/index.php +++ b/help/templates/index.php @@ -1,6 +1,3 @@ - -

    t( 'Questions and Answers' ); ?>

    - Can't connect to Q&A database @@ -21,7 +18,7 @@ $pageNavi=OC_Util::getPageNavi($_['pagecount'],$_['page'],$url); $pageNavi->printPage(); ?> -
    t( 'ASK A QUESTION' ); ?> + t( 'Ask a question' ); ?> diff --git a/index.php b/index.php index 46dc990af6..4520f40107 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 b2cbde5679..51dee60d67 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 0000000000..9c386f85e1 --- /dev/null +++ b/lib/connector/sabre/principal.php @@ -0,0 +1,181 @@ +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 0000000000..baa433f9dc --- /dev/null +++ b/lib/crypt.php @@ -0,0 +1,62 @@ +. + * + */ + +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 858db09b76..76d3fe5efc 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( '0000-00-00 00:00:00', 'CURRENT_TIMESTAMP', $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 5dc3dd44a1..fa5163ac26 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 d51b2ef078..1ed8e0e33c 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 8c7556a173..bcacfe704c 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 f3d235abdc..5fd35fa3e5 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 41cfa1750a..f87581d758 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).'"
    '; + $entry.='Offending command was: '.$query.'
    '; + 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).'"
    '; + $entry.='Offending command was: '.$query.'
    '; + echo($entry); + } + } + /** * create .htaccess files for apache hosts */ diff --git a/lib/template.php b/lib/template.php index fe173f609b..124343bd85 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); } @@ -320,6 +322,27 @@ class OC_Template{ return $data; } + /** + * @brief Include template + * @returns returns content of included template + * + * Includes another template. use 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 diff --git a/lib/util.php b/lib/util.php index 3e2e4fa34e..10cd320977 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
    ','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
    ','hint'=>$permissionsHint); } diff --git a/log/appinfo/app.php b/log/appinfo/app.php index f3ef650704..a3aa19d528 100644 --- a/log/appinfo/app.php +++ b/log/appinfo/app.php @@ -1,6 +1,6 @@ - 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 e201411e48..a4fbc36470 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 2756332f51..863ac73fdb 100644 --- a/log/templates/index.php +++ b/log/templates/index.php @@ -1,4 +1,4 @@ -
    +

    t( 'Filter:' ); ?> @@ -50,5 +50,4 @@

    - - +*/ ?> diff --git a/search/css/results.css b/search/css/results.css index e61bf419b3..c3147451e4 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 df0712be03..0000000000 --- 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 0000000000..021fe35d8e --- /dev/null +++ b/settings/ajax/openid.php @@ -0,0 +1,26 @@ + "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 a37ae7e6ea..8b970a13c5 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 010225bcb2..e6ca30d0ce 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 761289acef..819b71c894 100644 --- a/settings/templates/index.php +++ b/settings/templates/index.php @@ -29,6 +29,17 @@ + +
    +
    + t( 'OpenID' );?> +

    OpenID identity for

    +

    '>

    +

    +
    +
    + +
    t( 'Language' );?>