Merge remote-tracking branch 'gitorious/master' into routing

Conflicts:
	apps/files/js/fileactions.js
	apps/files_archive/js/archive.js
This commit is contained in:
Bart Visscher 2012-08-28 08:12:08 +02:00
commit cbaf858dea
1321 changed files with 150307 additions and 18291 deletions

499
3rdparty/MDB2/Driver/Datatype/oci8.php vendored Normal file
View File

@ -0,0 +1,499 @@
<?php
// +----------------------------------------------------------------------+
// | PHP versions 4 and 5 |
// +----------------------------------------------------------------------+
// | Copyright (c) 1998-2007 Manuel Lemos, Tomas V.V.Cox, |
// | Stig. S. Bakken, Lukas Smith |
// | All rights reserved. |
// +----------------------------------------------------------------------+
// | MDB2 is a merge of PEAR DB and Metabases that provides a unified DB |
// | API as well as database abstraction for PHP applications. |
// | This LICENSE is in the BSD license style. |
// | |
// | Redistribution and use in source and binary forms, with or without |
// | modification, are permitted provided that the following conditions |
// | are met: |
// | |
// | Redistributions of source code must retain the above copyright |
// | notice, this list of conditions and the following disclaimer. |
// | |
// | Redistributions in binary form must reproduce the above copyright |
// | notice, this list of conditions and the following disclaimer in the |
// | documentation and/or other materials provided with the distribution. |
// | |
// | Neither the name of Manuel Lemos, Tomas V.V.Cox, Stig. S. Bakken, |
// | Lukas Smith nor the names of his contributors may be used to endorse |
// | or promote products derived from this software without specific prior|
// | written permission. |
// | |
// | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
// | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
// | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS |
// | FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE |
// | REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, |
// | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, |
// | BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS|
// | OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED |
// | AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
// | LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY|
// | WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
// | POSSIBILITY OF SUCH DAMAGE. |
// +----------------------------------------------------------------------+
// | Author: Lukas Smith <smith@pooteeweet.org> |
// +----------------------------------------------------------------------+
// $Id: oci8.php 295587 2010-02-28 17:16:38Z quipo $
require_once 'MDB2/Driver/Datatype/Common.php';
/**
* MDB2 OCI8 driver
*
* @package MDB2
* @category Database
* @author Lukas Smith <smith@pooteeweet.org>
*/
class MDB2_Driver_Datatype_oci8 extends MDB2_Driver_Datatype_Common
{
// {{{ _baseConvertResult()
/**
* general type conversion method
*
* @param mixed $value refernce to a value to be converted
* @param string $type specifies which type to convert to
* @param boolean $rtrim [optional] when TRUE [default], apply rtrim() to text
* @return object a MDB2 error on failure
* @access protected
*/
function _baseConvertResult($value, $type, $rtrim = true)
{
if (null === $value) {
return null;
}
switch ($type) {
case 'text':
if (is_object($value) && is_a($value, 'OCI-Lob')) {
//LOB => fetch into variable
$clob = $this->_baseConvertResult($value, 'clob', $rtrim);
if (!PEAR::isError($clob) && is_resource($clob)) {
$clob_value = '';
while (!feof($clob)) {
$clob_value .= fread($clob, 8192);
}
$this->destroyLOB($clob);
}
$value = $clob_value;
}
if ($rtrim) {
$value = rtrim($value);
}
return $value;
case 'date':
return substr($value, 0, strlen('YYYY-MM-DD'));
case 'time':
return substr($value, strlen('YYYY-MM-DD '), strlen('HH:MI:SS'));
}
return parent::_baseConvertResult($value, $type, $rtrim);
}
// }}}
// {{{ getTypeDeclaration()
/**
* Obtain DBMS specific SQL code portion needed to declare an text type
* field to be used in statements like CREATE TABLE.
*
* @param array $field associative array with the name of the properties
* of the field being declared as array indexes. Currently, the types
* of supported field properties are as follows:
*
* length
* Integer value that determines the maximum length of the text
* field. If this argument is missing the field should be
* declared to have the longest length allowed by the DBMS.
*
* default
* Text value to be used as default for this field.
*
* notnull
* Boolean flag that indicates whether this field is constrained
* to not be set to null.
* @return string DBMS specific SQL code portion that should be used to
* declare the specified field.
* @access public
*/
function getTypeDeclaration($field)
{
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
switch ($field['type']) {
case 'text':
$length = !empty($field['length'])
? $field['length'] : $db->options['default_text_field_length'];
$fixed = !empty($field['fixed']) ? $field['fixed'] : false;
return $fixed ? 'CHAR('.$length.')' : 'VARCHAR2('.$length.')';
case 'clob':
return 'CLOB';
case 'blob':
return 'BLOB';
case 'integer':
if (!empty($field['length'])) {
switch((int)$field['length']) {
case 1: $digit = 3; break;
case 2: $digit = 5; break;
case 3: $digit = 8; break;
case 4: $digit = 10; break;
case 5: $digit = 13; break;
case 6: $digit = 15; break;
case 7: $digit = 17; break;
case 8: $digit = 20; break;
default: $digit = 10;
}
return 'NUMBER('.$digit.')';
}
return 'INT';
case 'boolean':
return 'NUMBER(1)';
case 'date':
case 'time':
case 'timestamp':
return 'DATE';
case 'float':
return 'NUMBER';
case 'decimal':
$scale = !empty($field['scale']) ? $field['scale'] : $db->options['decimal_places'];
return 'NUMBER(*,'.$scale.')';
}
}
// }}}
// {{{ _quoteCLOB()
/**
* Convert a text value into a DBMS specific format that is suitable to
* compose query statements.
*
* @param string $value text string value that is intended to be converted.
* @param bool $quote determines if the value should be quoted and escaped
* @param bool $escape_wildcards if to escape escape wildcards
* @return string text string that represents the given argument value in
* a DBMS specific format.
* @access protected
*/
function _quoteCLOB($value, $quote, $escape_wildcards)
{
return 'EMPTY_CLOB()';
}
// }}}
// {{{ _quoteBLOB()
/**
* Convert a text value into a DBMS specific format that is suitable to
* compose query statements.
*
* @param string $value text string value that is intended to be converted.
* @param bool $quote determines if the value should be quoted and escaped
* @param bool $escape_wildcards if to escape escape wildcards
* @return string text string that represents the given argument value in
* a DBMS specific format.
* @access protected
*/
function _quoteBLOB($value, $quote, $escape_wildcards)
{
return 'EMPTY_BLOB()';
}
// }}}
// {{{ _quoteDate()
/**
* Convert a text value into a DBMS specific format that is suitable to
* compose query statements.
*
* @param string $value text string value that is intended to be converted.
* @param bool $quote determines if the value should be quoted and escaped
* @param bool $escape_wildcards if to escape escape wildcards
* @return string text string that represents the given argument value in
* a DBMS specific format.
* @access protected
*/
function _quoteDate($value, $quote, $escape_wildcards)
{
return $this->_quoteText("$value 00:00:00", $quote, $escape_wildcards);
}
// }}}
// {{{ _quoteTimestamp()
/**
* Convert a text value into a DBMS specific format that is suitable to
* compose query statements.
*
* @param string $value text string value that is intended to be converted.
* @param bool $quote determines if the value should be quoted and escaped
* @param bool $escape_wildcards if to escape escape wildcards
* @return string text string that represents the given argument value in
* a DBMS specific format.
* @access protected
*/
//function _quoteTimestamp($value, $quote, $escape_wildcards)
//{
// return $this->_quoteText($value, $quote, $escape_wildcards);
//}
// }}}
// {{{ _quoteTime()
/**
* Convert a text value into a DBMS specific format that is suitable to
* compose query statements.
*
* @param string $value text string value that is intended to be converted.
* @param bool $quote determines if the value should be quoted and escaped
* @param bool $escape_wildcards if to escape escape wildcards
* @return string text string that represents the given argument value in
* a DBMS specific format.
* @access protected
*/
function _quoteTime($value, $quote, $escape_wildcards)
{
return $this->_quoteText("0001-01-01 $value", $quote, $escape_wildcards);
}
// }}}
// {{{ writeLOBToFile()
/**
* retrieve LOB from the database
*
* @param array $lob array
* @param string $file name of the file into which the LOb should be fetched
* @return mixed MDB2_OK on success, a MDB2 error on failure
* @access protected
*/
function writeLOBToFile($lob, $file)
{
if (preg_match('/^(\w+:\/\/)(.*)$/', $file, $match)) {
if ($match[1] == 'file://') {
$file = $match[2];
}
}
$lob_data = stream_get_meta_data($lob);
$lob_index = $lob_data['wrapper_data']->lob_index;
$result = $this->lobs[$lob_index]['resource']->writetofile($file);
$this->lobs[$lob_index]['resource']->seek(0);
if (!$result) {
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
return $db->raiseError(null, null, null,
'Unable to write LOB to file', __FUNCTION__);
}
return MDB2_OK;
}
// }}}
// {{{ _retrieveLOB()
/**
* retrieve LOB from the database
*
* @param array $lob array
* @return mixed MDB2_OK on success, a MDB2 error on failure
* @access protected
*/
function _retrieveLOB(&$lob)
{
if (!is_object($lob['resource'])) {
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
return $db->raiseError(MDB2_ERROR_NOT_FOUND, null, null,
'attemped to retrieve LOB from non existing or NULL column', __FUNCTION__);
}
if (!$lob['loaded']
# && !method_exists($lob['resource'], 'read')
) {
$lob['value'] = $lob['resource']->load();
$lob['resource']->seek(0);
}
$lob['loaded'] = true;
return MDB2_OK;
}
// }}}
// {{{ _readLOB()
/**
* Read data from large object input stream.
*
* @param array $lob array
* @param blob $data reference to a variable that will hold data to be
* read from the large object input stream
* @param int $length integer value that indicates the largest ammount of
* data to be read from the large object input stream.
* @return mixed length on success, a MDB2 error on failure
* @access protected
*/
function _readLOB($lob, $length)
{
if ($lob['loaded']) {
return parent::_readLOB($lob, $length);
}
if (!is_object($lob['resource'])) {
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
return $db->raiseError(MDB2_ERROR_NOT_FOUND, null, null,
'attemped to retrieve LOB from non existing or NULL column', __FUNCTION__);
}
$data = $lob['resource']->read($length);
if (!is_string($data)) {
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
return $db->raiseError(null, null, null,
'Unable to read LOB', __FUNCTION__);
}
return $data;
}
// }}}
// {{{ patternEscapeString()
/**
* build string to define escape pattern string
*
* @access public
*
*
* @return string define escape pattern
*/
function patternEscapeString()
{
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
return " ESCAPE '". $db->string_quoting['escape_pattern'] ."'";
}
// }}}
// {{{ _mapNativeDatatype()
/**
* Maps a native array description of a field to a MDB2 datatype and length
*
* @param array $field native field description
* @return array containing the various possible types, length, sign, fixed
* @access public
*/
function _mapNativeDatatype($field)
{
$db_type = strtolower($field['type']);
$type = array();
$length = $unsigned = $fixed = null;
if (!empty($field['length'])) {
$length = $field['length'];
}
switch ($db_type) {
case 'integer':
case 'pls_integer':
case 'binary_integer':
$type[] = 'integer';
if ($length == '1') {
$type[] = 'boolean';
if (preg_match('/^(is|has)/', $field['name'])) {
$type = array_reverse($type);
}
}
break;
case 'varchar':
case 'varchar2':
case 'nvarchar2':
$fixed = false;
case 'char':
case 'nchar':
$type[] = 'text';
if ($length == '1') {
$type[] = 'boolean';
if (preg_match('/^(is|has)/', $field['name'])) {
$type = array_reverse($type);
}
}
if ($fixed !== false) {
$fixed = true;
}
break;
case 'date':
case 'timestamp':
$type[] = 'timestamp';
$length = null;
break;
case 'float':
$type[] = 'float';
break;
case 'number':
if (!empty($field['scale'])) {
$type[] = 'decimal';
$length = $length.','.$field['scale'];
} else {
$type[] = 'integer';
if ($length == '1') {
$type[] = 'boolean';
if (preg_match('/^(is|has)/', $field['name'])) {
$type = array_reverse($type);
}
}
}
break;
case 'long':
$type[] = 'text';
case 'clob':
case 'nclob':
$type[] = 'clob';
break;
case 'blob':
case 'raw':
case 'long raw':
case 'bfile':
$type[] = 'blob';
$length = null;
break;
case 'rowid':
case 'urowid':
default:
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
return $db->raiseError(MDB2_ERROR_UNSUPPORTED, null, null,
'unknown database attribute type: '.$db_type, __FUNCTION__);
}
if ((int)$length <= 0) {
$length = null;
}
return array($type, $length, $unsigned, $fixed);
}
}
?>

187
3rdparty/MDB2/Driver/Function/oci8.php vendored Normal file
View File

@ -0,0 +1,187 @@
<?php
// +----------------------------------------------------------------------+
// | PHP versions 4 and 5 |
// +----------------------------------------------------------------------+
// | Copyright (c) 1998-2008 Manuel Lemos, Tomas V.V.Cox, |
// | Stig. S. Bakken, Lukas Smith |
// | All rights reserved. |
// +----------------------------------------------------------------------+
// | MDB2 is a merge of PEAR DB and Metabases that provides a unified DB |
// | API as well as database abstraction for PHP applications. |
// | This LICENSE is in the BSD license style. |
// | |
// | Redistribution and use in source and binary forms, with or without |
// | modification, are permitted provided that the following conditions |
// | are met: |
// | |
// | Redistributions of source code must retain the above copyright |
// | notice, this list of conditions and the following disclaimer. |
// | |
// | Redistributions in binary form must reproduce the above copyright |
// | notice, this list of conditions and the following disclaimer in the |
// | documentation and/or other materials provided with the distribution. |
// | |
// | Neither the name of Manuel Lemos, Tomas V.V.Cox, Stig. S. Bakken, |
// | Lukas Smith nor the names of his contributors may be used to endorse |
// | or promote products derived from this software without specific prior|
// | written permission. |
// | |
// | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
// | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
// | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS |
// | FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE |
// | REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, |
// | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, |
// | BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS|
// | OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED |
// | AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
// | LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY|
// | WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
// | POSSIBILITY OF SUCH DAMAGE. |
// +----------------------------------------------------------------------+
// | Author: Lukas Smith <smith@pooteeweet.org> |
// +----------------------------------------------------------------------+
// $Id: oci8.php 295587 2010-02-28 17:16:38Z quipo $
require_once 'MDB2/Driver/Function/Common.php';
/**
* MDB2 oci8 driver for the function modules
*
* @package MDB2
* @category Database
* @author Lukas Smith <smith@pooteeweet.org>
*/
class MDB2_Driver_Function_oci8 extends MDB2_Driver_Function_Common
{
// {{{ executeStoredProc()
/**
* Execute a stored procedure and return any results
*
* @param string $name string that identifies the function to execute
* @param mixed $params array that contains the paramaters to pass the stored proc
* @param mixed $types array that contains the types of the columns in
* the result set
* @param mixed $result_class string which specifies which result class to use
* @param mixed $result_wrap_class string which specifies which class to wrap results in
* @return mixed a result handle or MDB2_OK on success, a MDB2 error on failure
* @access public
*/
function executeStoredProc($name, $params = null, $types = null, $result_class = true, $result_wrap_class = false)
{
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
$query = 'EXEC '.$name;
$query .= $params ? '('.implode(', ', $params).')' : '()';
return $db->query($query, $types, $result_class, $result_wrap_class);
}
// }}}
// {{{ functionTable()
/**
* return string for internal table used when calling only a function
*
* @return string for internal table used when calling only a function
* @access public
*/
function functionTable()
{
return ' FROM dual';
}
// }}}
// {{{ now()
/**
* Return string to call a variable with the current timestamp inside an SQL statement
* There are three special variables for current date and time:
* - CURRENT_TIMESTAMP (date and time, TIMESTAMP type)
* - CURRENT_DATE (date, DATE type)
* - CURRENT_TIME (time, TIME type)
*
* @return string to call a variable with the current timestamp
* @access public
*/
function now($type = 'timestamp')
{
switch ($type) {
case 'date':
case 'time':
case 'timestamp':
default:
return 'TO_CHAR(CURRENT_TIMESTAMP, \'YYYY-MM-DD HH24:MI:SS\')';
}
}
// }}}
// {{{ unixtimestamp()
/**
* return string to call a function to get the unix timestamp from a iso timestamp
*
* @param string $expression
*
* @return string to call a variable with the timestamp
* @access public
*/
function unixtimestamp($expression)
{
$utc_offset = 'CAST(SYS_EXTRACT_UTC(SYSTIMESTAMP) AS DATE) - CAST(SYSTIMESTAMP AS DATE)';
$epoch_date = 'to_date(\'19700101\', \'YYYYMMDD\')';
return '(CAST('.$expression.' AS DATE) - '.$epoch_date.' + '.$utc_offset.') * 86400 seconds';
}
// }}}
// {{{ substring()
/**
* return string to call a function to get a substring inside an SQL statement
*
* @return string to call a function to get a substring
* @access public
*/
function substring($value, $position = 1, $length = null)
{
if (null !== $length) {
return "SUBSTR($value, $position, $length)";
}
return "SUBSTR($value, $position)";
}
// }}}
// {{{ random()
/**
* return string to call a function to get random value inside an SQL statement
*
* @return return string to generate float between 0 and 1
* @access public
*/
function random()
{
return 'dbms_random.value';
}
// }}}}
// {{{ guid()
/**
* Returns global unique identifier
*
* @return string to get global unique identifier
* @access public
*/
function guid()
{
return 'SYS_GUID()';
}
// }}}}
}
?>

1340
3rdparty/MDB2/Driver/Manager/oci8.php vendored Normal file

File diff suppressed because it is too large Load Diff

60
3rdparty/MDB2/Driver/Native/oci8.php vendored Normal file
View File

@ -0,0 +1,60 @@
<?php
// +----------------------------------------------------------------------+
// | PHP versions 4 and 5 |
// +----------------------------------------------------------------------+
// | Copyright (c) 1998-2006 Manuel Lemos, Tomas V.V.Cox, |
// | Stig. S. Bakken, Lukas Smith, Frank M. Kromann |
// | All rights reserved. |
// +----------------------------------------------------------------------+
// | MDB2 is a merge of PEAR DB and Metabases that provides a unified DB |
// | API as well as database abstraction for PHP applications. |
// | This LICENSE is in the BSD license style. |
// | |
// | Redistribution and use in source and binary forms, with or without |
// | modification, are permitted provided that the following conditions |
// | are met: |
// | |
// | Redistributions of source code must retain the above copyright |
// | notice, this list of conditions and the following disclaimer. |
// | |
// | Redistributions in binary form must reproduce the above copyright |
// | notice, this list of conditions and the following disclaimer in the |
// | documentation and/or other materials provided with the distribution. |
// | |
// | Neither the name of Manuel Lemos, Tomas V.V.Cox, Stig. S. Bakken, |
// | Lukas Smith nor the names of his contributors may be used to endorse |
// | or promote products derived from this software without specific prior|
// | written permission. |
// | |
// | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
// | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
// | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS |
// | FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE |
// | REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, |
// | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, |
// | BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS|
// | OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED |
// | AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
// | LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY|
// | WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
// | POSSIBILITY OF SUCH DAMAGE. |
// +----------------------------------------------------------------------+
// | Author: Lukas Smith <smith@pooteeweet.org> |
// +----------------------------------------------------------------------+
//
// $Id: oci8.php 215004 2006-06-18 21:59:05Z lsmith $
//
require_once 'MDB2/Driver/Native/Common.php';
/**
* MDB2 Oracle driver for the native module
*
* @package MDB2
* @category Database
* @author Lukas Smith <smith@dybnet.de>
*/
class MDB2_Driver_Native_oci8 extends MDB2_Driver_Native_Common
{
}
?>

621
3rdparty/MDB2/Driver/Reverse/oci8.php vendored Normal file
View File

@ -0,0 +1,621 @@
<?php
// +----------------------------------------------------------------------+
// | PHP versions 4 and 5 |
// +----------------------------------------------------------------------+
// | Copyright (c) 1998-2007 Manuel Lemos, Tomas V.V.Cox, |
// | Stig. S. Bakken, Lukas Smith, Frank M. Kromann, Lorenzo Alberton |
// | All rights reserved. |
// +----------------------------------------------------------------------+
// | MDB2 is a merge of PEAR DB and Metabases that provides a unified DB |
// | API as well as database abstraction for PHP applications. |
// | This LICENSE is in the BSD license style. |
// | |
// | Redistribution and use in source and binary forms, with or without |
// | modification, are permitted provided that the following conditions |
// | are met: |
// | |
// | Redistributions of source code must retain the above copyright |
// | notice, this list of conditions and the following disclaimer. |
// | |
// | Redistributions in binary form must reproduce the above copyright |
// | notice, this list of conditions and the following disclaimer in the |
// | documentation and/or other materials provided with the distribution. |
// | |
// | Neither the name of Manuel Lemos, Tomas V.V.Cox, Stig. S. Bakken, |
// | Lukas Smith nor the names of his contributors may be used to endorse |
// | or promote products derived from this software without specific prior|
// | written permission. |
// | |
// | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
// | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
// | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS |
// | FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE |
// | REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, |
// | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, |
// | BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS|
// | OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED |
// | AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
// | LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY|
// | WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
// | POSSIBILITY OF SUCH DAMAGE. |
// +----------------------------------------------------------------------+
// | Authors: Lukas Smith <smith@pooteeweet.org> |
// | Lorenzo Alberton <l.alberton@quipo.it> |
// +----------------------------------------------------------------------+
//
// $Id: oci8.php 295587 2010-02-28 17:16:38Z quipo $
//
require_once 'MDB2/Driver/Reverse/Common.php';
/**
* MDB2 Oracle driver for the schema reverse engineering module
*
* @package MDB2
* @category Database
* @author Lukas Smith <smith@dybnet.de>
*/
class MDB2_Driver_Reverse_oci8 extends MDB2_Driver_Reverse_Common
{
// {{{ getTableFieldDefinition()
/**
* Get the structure of a field into an array
*
* @param string $table_name name of table that should be used in method
* @param string $field_name name of field that should be used in method
* @return mixed data array on success, a MDB2 error on failure
* @access public
*/
function getTableFieldDefinition($table_name, $field_name)
{
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
$result = $db->loadModule('Datatype', null, true);
if (PEAR::isError($result)) {
return $result;
}
list($owner, $table) = $this->splitTableSchema($table_name);
if (empty($owner)) {
$owner = $db->dsn['username'];
}
$query = 'SELECT column_name name,
data_type "type",
nullable,
data_default "default",
COALESCE(data_precision, data_length) "length",
data_scale "scale"
FROM all_tab_columns
WHERE (table_name=? OR table_name=?)
AND (owner=? OR owner=?)
AND (column_name=? OR column_name=?)
ORDER BY column_id';
$stmt = $db->prepare($query);
if (PEAR::isError($stmt)) {
return $stmt;
}
$args = array(
$table,
strtoupper($table),
$owner,
strtoupper($owner),
$field_name,
strtoupper($field_name)
);
$result = $stmt->execute($args);
if (PEAR::isError($result)) {
return $result;
}
$column = $result->fetchRow(MDB2_FETCHMODE_ASSOC);
if (PEAR::isError($column)) {
return $column;
}
$stmt->free();
$result->free();
if (empty($column)) {
return $db->raiseError(MDB2_ERROR_NOT_FOUND, null, null,
$field_name . ' is not a column in table ' . $table_name, __FUNCTION__);
}
$column = array_change_key_case($column, CASE_LOWER);
if ($db->options['portability'] & MDB2_PORTABILITY_FIX_CASE) {
if ($db->options['field_case'] == CASE_LOWER) {
$column['name'] = strtolower($column['name']);
} else {
$column['name'] = strtoupper($column['name']);
}
}
$mapped_datatype = $db->datatype->mapNativeDatatype($column);
if (PEAR::isError($mapped_datatype)) {
return $mapped_datatype;
}
list($types, $length, $unsigned, $fixed) = $mapped_datatype;
$notnull = false;
if (!empty($column['nullable']) && $column['nullable'] == 'N') {
$notnull = true;
}
$default = false;
if (array_key_exists('default', $column)) {
$default = $column['default'];
if ($default === 'NULL') {
$default = null;
}
if ((null === $default) && $notnull) {
$default = '';
}
}
$definition[0] = array('notnull' => $notnull, 'nativetype' => $column['type']);
if (null !== $length) {
$definition[0]['length'] = $length;
}
if (null !== $unsigned) {
$definition[0]['unsigned'] = $unsigned;
}
if (null !== $fixed) {
$definition[0]['fixed'] = $fixed;
}
if ($default !== false) {
$definition[0]['default'] = $default;
}
foreach ($types as $key => $type) {
$definition[$key] = $definition[0];
if ($type == 'clob' || $type == 'blob') {
unset($definition[$key]['default']);
}
$definition[$key]['type'] = $type;
$definition[$key]['mdb2type'] = $type;
}
if ($type == 'integer') {
$query= "SELECT trigger_body
FROM all_triggers
WHERE table_name=?
AND triggering_event='INSERT'
AND trigger_type='BEFORE EACH ROW'";
// ^^ pretty reasonable mimic for "auto_increment" in oracle?
$stmt = $db->prepare($query);
if (PEAR::isError($stmt)) {
return $stmt;
}
$result = $stmt->execute(strtoupper($table));
if (PEAR::isError($result)) {
return $result;
}
while ($triggerstr = $result->fetchOne()) {
if (preg_match('/.*SELECT\W+(.+)\.nextval +into +\:NEW\.'.$field_name.' +FROM +dual/im', $triggerstr, $matches)) {
$definition[0]['autoincrement'] = $matches[1];
}
}
$stmt->free();
$result->free();
}
return $definition;
}
// }}}
// {{{ getTableIndexDefinition()
/**
* Get the structure of an index into an array
*
* @param string $table_name name of table that should be used in method
* @param string $index_name name of index that should be used in method
* @return mixed data array on success, a MDB2 error on failure
* @access public
*/
function getTableIndexDefinition($table_name, $index_name)
{
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
list($owner, $table) = $this->splitTableSchema($table_name);
if (empty($owner)) {
$owner = $db->dsn['username'];
}
$query = "SELECT aic.column_name,
aic.column_position,
aic.descend,
aic.table_owner,
alc.constraint_type
FROM all_ind_columns aic
LEFT JOIN all_constraints alc
ON aic.index_name = alc.constraint_name
AND aic.table_name = alc.table_name
AND aic.table_owner = alc.owner
WHERE (aic.table_name=? OR aic.table_name=?)
AND (aic.index_name=? OR aic.index_name=?)
AND (aic.table_owner=? OR aic.table_owner=?)
ORDER BY column_position";
$stmt = $db->prepare($query);
if (PEAR::isError($stmt)) {
return $stmt;
}
$indexnames = array_unique(array($db->getIndexName($index_name), $index_name));
$i = 0;
$row = null;
while ((null === $row) && array_key_exists($i, $indexnames)) {
$args = array(
$table,
strtoupper($table),
$indexnames[$i],
strtoupper($indexnames[$i]),
$owner,
strtoupper($owner)
);
$result = $stmt->execute($args);
if (PEAR::isError($result)) {
return $result;
}
$row = $result->fetchRow(MDB2_FETCHMODE_ASSOC);
if (PEAR::isError($row)) {
return $row;
}
$i++;
}
if (null === $row) {
return $db->raiseError(MDB2_ERROR_NOT_FOUND, null, null,
$index_name. ' is not an index on table '. $table_name, __FUNCTION__);
}
if ($row['constraint_type'] == 'U' || $row['constraint_type'] == 'P') {
return $db->raiseError(MDB2_ERROR_NOT_FOUND, null, null,
$index_name. ' is a constraint, not an index on table '. $table_name, __FUNCTION__);
}
$definition = array();
while (null !== $row) {
$row = array_change_key_case($row, CASE_LOWER);
$column_name = $row['column_name'];
if ($db->options['portability'] & MDB2_PORTABILITY_FIX_CASE) {
if ($db->options['field_case'] == CASE_LOWER) {
$column_name = strtolower($column_name);
} else {
$column_name = strtoupper($column_name);
}
}
$definition['fields'][$column_name] = array(
'position' => (int)$row['column_position'],
);
if (!empty($row['descend'])) {
$definition['fields'][$column_name]['sorting'] =
($row['descend'] == 'ASC' ? 'ascending' : 'descending');
}
$row = $result->fetchRow(MDB2_FETCHMODE_ASSOC);
}
$result->free();
if (empty($definition['fields'])) {
return $db->raiseError(MDB2_ERROR_NOT_FOUND, null, null,
$index_name. ' is not an index on table '. $table_name, __FUNCTION__);
}
return $definition;
}
// }}}
// {{{ getTableConstraintDefinition()
/**
* Get the structure of a constraint into an array
*
* @param string $table_name name of table that should be used in method
* @param string $constraint_name name of constraint that should be used in method
* @return mixed data array on success, a MDB2 error on failure
* @access public
*/
function getTableConstraintDefinition($table_name, $constraint_name)
{
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
list($owner, $table) = $this->splitTableSchema($table_name);
if (empty($owner)) {
$owner = $db->dsn['username'];
}
$query = 'SELECT alc.constraint_name,
CASE alc.constraint_type WHEN \'P\' THEN 1 ELSE 0 END "primary",
CASE alc.constraint_type WHEN \'R\' THEN 1 ELSE 0 END "foreign",
CASE alc.constraint_type WHEN \'U\' THEN 1 ELSE 0 END "unique",
CASE alc.constraint_type WHEN \'C\' THEN 1 ELSE 0 END "check",
alc.DELETE_RULE "ondelete",
\'NO ACTION\' "onupdate",
\'SIMPLE\' "match",
CASE alc.deferrable WHEN \'NOT DEFERRABLE\' THEN 0 ELSE 1 END "deferrable",
CASE alc.deferred WHEN \'IMMEDIATE\' THEN 0 ELSE 1 END "initiallydeferred",
alc.search_condition,
alc.table_name,
cols.column_name,
cols.position,
r_alc.table_name "references_table",
r_cols.column_name "references_field",
r_cols.position "references_field_position"
FROM all_cons_columns cols
LEFT JOIN all_constraints alc
ON alc.constraint_name = cols.constraint_name
AND alc.owner = cols.owner
LEFT JOIN all_constraints r_alc
ON alc.r_constraint_name = r_alc.constraint_name
AND alc.r_owner = r_alc.owner
LEFT JOIN all_cons_columns r_cols
ON r_alc.constraint_name = r_cols.constraint_name
AND r_alc.owner = r_cols.owner
AND cols.position = r_cols.position
WHERE (alc.constraint_name=? OR alc.constraint_name=?)
AND alc.constraint_name = cols.constraint_name
AND (alc.owner=? OR alc.owner=?)';
$tablenames = array();
if (!empty($table)) {
$query.= ' AND (alc.table_name=? OR alc.table_name=?)';
$tablenames = array($table, strtoupper($table));
}
$stmt = $db->prepare($query);
if (PEAR::isError($stmt)) {
return $stmt;
}
$constraintnames = array_unique(array($db->getIndexName($constraint_name), $constraint_name));
$c = 0;
$row = null;
while ((null === $row) && array_key_exists($c, $constraintnames)) {
$args = array(
$constraintnames[$c],
strtoupper($constraintnames[$c]),
$owner,
strtoupper($owner)
);
if (!empty($table)) {
$args = array_merge($args, $tablenames);
}
$result = $stmt->execute($args);
if (PEAR::isError($result)) {
return $result;
}
$row = $result->fetchRow(MDB2_FETCHMODE_ASSOC);
if (PEAR::isError($row)) {
return $row;
}
$c++;
}
$definition = array(
'primary' => (boolean)$row['primary'],
'unique' => (boolean)$row['unique'],
'foreign' => (boolean)$row['foreign'],
'check' => (boolean)$row['check'],
'deferrable' => (boolean)$row['deferrable'],
'initiallydeferred' => (boolean)$row['initiallydeferred'],
'ondelete' => $row['ondelete'],
'onupdate' => $row['onupdate'],
'match' => $row['match'],
);
if ($definition['check']) {
// pattern match constraint for check constraint values into enum-style output:
$enumregex = '/'.$row['column_name'].' in \((.+?)\)/i';
if (preg_match($enumregex, $row['search_condition'], $rangestr)) {
$definition['fields'][$column_name] = array();
$allowed = explode(',', $rangestr[1]);
foreach ($allowed as $val) {
$val = trim($val);
$val = preg_replace('/^\'/', '', $val);
$val = preg_replace('/\'$/', '', $val);
array_push($definition['fields'][$column_name], $val);
}
}
}
while (null !== $row) {
$row = array_change_key_case($row, CASE_LOWER);
$column_name = $row['column_name'];
if ($db->options['portability'] & MDB2_PORTABILITY_FIX_CASE) {
if ($db->options['field_case'] == CASE_LOWER) {
$column_name = strtolower($column_name);
} else {
$column_name = strtoupper($column_name);
}
}
$definition['fields'][$column_name] = array(
'position' => (int)$row['position']
);
if ($row['foreign']) {
$ref_column_name = $row['references_field'];
$ref_table_name = $row['references_table'];
if ($db->options['portability'] & MDB2_PORTABILITY_FIX_CASE) {
if ($db->options['field_case'] == CASE_LOWER) {
$ref_column_name = strtolower($ref_column_name);
$ref_table_name = strtolower($ref_table_name);
} else {
$ref_column_name = strtoupper($ref_column_name);
$ref_table_name = strtoupper($ref_table_name);
}
}
$definition['references']['table'] = $ref_table_name;
$definition['references']['fields'][$ref_column_name] = array(
'position' => (int)$row['references_field_position']
);
}
$lastrow = $row;
$row = $result->fetchRow(MDB2_FETCHMODE_ASSOC);
}
$result->free();
if (empty($definition['fields'])) {
return $db->raiseError(MDB2_ERROR_NOT_FOUND, null, null,
$constraint_name . ' is not a constraint on table '. $table_name, __FUNCTION__);
}
return $definition;
}
// }}}
// {{{ getSequenceDefinition()
/**
* Get the structure of a sequence into an array
*
* @param string $sequence name of sequence that should be used in method
* @return mixed data array on success, a MDB2 error on failure
* @access public
*/
function getSequenceDefinition($sequence)
{
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
$sequence_name = $db->getSequenceName($sequence);
$query = 'SELECT last_number FROM user_sequences';
$query.= ' WHERE sequence_name='.$db->quote($sequence_name, 'text');
$query.= ' OR sequence_name='.$db->quote(strtoupper($sequence_name), 'text');
$start = $db->queryOne($query, 'integer');
if (PEAR::isError($start)) {
return $start;
}
$definition = array();
if ($start != 1) {
$definition = array('start' => $start);
}
return $definition;
}
// }}}
// {{{ getTriggerDefinition()
/**
* Get the structure of a trigger into an array
*
* EXPERIMENTAL
*
* WARNING: this function is experimental and may change the returned value
* at any time until labelled as non-experimental
*
* @param string $trigger name of trigger that should be used in method
* @return mixed data array on success, a MDB2 error on failure
* @access public
*/
function getTriggerDefinition($trigger)
{
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
$query = 'SELECT trigger_name,
table_name,
trigger_body,
trigger_type,
triggering_event trigger_event,
description trigger_comment,
1 trigger_enabled,
when_clause
FROM user_triggers
WHERE trigger_name = \''. strtoupper($trigger).'\'';
$types = array(
'trigger_name' => 'text',
'table_name' => 'text',
'trigger_body' => 'text',
'trigger_type' => 'text',
'trigger_event' => 'text',
'trigger_comment' => 'text',
'trigger_enabled' => 'boolean',
'when_clause' => 'text',
);
$result = $db->queryRow($query, $types, MDB2_FETCHMODE_ASSOC);
if (PEAR::isError($result)) {
return $result;
}
if (!empty($result['trigger_type'])) {
//$result['trigger_type'] = array_shift(explode(' ', $result['trigger_type']));
$result['trigger_type'] = preg_replace('/(\S+).*/', '\\1', $result['trigger_type']);
}
return $result;
}
// }}}
// {{{ tableInfo()
/**
* Returns information about a table or a result set
*
* NOTE: only supports 'table' and 'flags' if <var>$result</var>
* is a table name.
*
* NOTE: flags won't contain index information.
*
* @param object|string $result MDB2_result object from a query or a
* string containing the name of a table.
* While this also accepts a query result
* resource identifier, this behavior is
* deprecated.
* @param int $mode a valid tableInfo mode
*
* @return array an associative array with the information requested.
* A MDB2_Error object on failure.
*
* @see MDB2_Driver_Common::tableInfo()
*/
function tableInfo($result, $mode = null)
{
if (is_string($result)) {
return parent::tableInfo($result, $mode);
}
$db = $this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
$resource = MDB2::isResultCommon($result) ? $result->getResource() : $result;
if (!is_resource($resource)) {
return $db->raiseError(MDB2_ERROR_NEED_MORE_DATA, null, null,
'Could not generate result resource', __FUNCTION__);
}
if ($db->options['portability'] & MDB2_PORTABILITY_FIX_CASE) {
if ($db->options['field_case'] == CASE_LOWER) {
$case_func = 'strtolower';
} else {
$case_func = 'strtoupper';
}
} else {
$case_func = 'strval';
}
$count = @OCINumCols($resource);
$res = array();
if ($mode) {
$res['num_fields'] = $count;
}
$db->loadModule('Datatype', null, true);
for ($i = 0; $i < $count; $i++) {
$column = array(
'table' => '',
'name' => $case_func(@OCIColumnName($resource, $i+1)),
'type' => @OCIColumnType($resource, $i+1),
'length' => @OCIColumnSize($resource, $i+1),
'flags' => '',
);
$res[$i] = $column;
$res[$i]['mdb2type'] = $db->datatype->mapNativeDatatype($res[$i]);
if ($mode & MDB2_TABLEINFO_ORDER) {
$res['order'][$res[$i]['name']] = $i;
}
if ($mode & MDB2_TABLEINFO_ORDERTABLE) {
$res['ordertable'][$res[$i]['table']][$res[$i]['name']] = $i;
}
}
return $res;
}
}
?>

1647
3rdparty/MDB2/Driver/oci8.php vendored Normal file

File diff suppressed because it is too large Load Diff

View File

@ -166,6 +166,8 @@ class smb {
return false;
}elseif(substr($regs[0],0,31)=='NT_STATUS_OBJECT_PATH_NOT_FOUND'){
return false;
}elseif(substr($regs[0],0,29)=='NT_STATUS_FILE_IS_A_DIRECTORY'){
return false;
}
trigger_error($regs[0].' params('.$params.')', E_USER_ERROR);
}

View File

@ -13,6 +13,9 @@ OCP\Util::connectHook(OC_Filesystem::CLASSNAME, OC_Filesystem::signal_write, 'OC
OCP\Util::connectHook(OC_Filesystem::CLASSNAME, OC_Filesystem::signal_read, 'OC_Admin_Audit_Hooks_Handlers', 'read');
OCP\Util::connectHook(OC_Filesystem::CLASSNAME, OC_Filesystem::signal_delete, 'OC_Admin_Audit_Hooks_Handlers', 'delete');
//FIXME OC_Share does no longer exist
/*
OCP\Util::connectHook('OC_Share', 'public', 'OC_Admin_Audit_Hooks_Handlers', 'share_public');
OCP\Util::connectHook('OC_Share', 'public-download', 'OC_Admin_Audit_Hooks_Handlers', 'share_public_download');
OCP\Util::connectHook('OC_Share', 'user', 'OC_Admin_Audit_Hooks_Handlers', 'share_user');
*/

View File

@ -63,7 +63,8 @@ class OC_Admin_Audit_Hooks_Handlers {
$permissions = $params['permissions'];
$with = $params['with'];
$user = OCP\User::getUser();
$rw = $permissions & OC_Share::WRITE ? 'w' : 'o';
//$rw = $permissions & OC_Share::WRITE ? 'w' : 'o'; //FIXME OC_Share no longer exists, hack to check permissions
$rw = $permissions & 1 ? 'w' : 'o';
self::log('Shared "'.$path.'" (r'.$rw.') with user "'.$with.'" by '.$user);
}
static protected function log($msg) {

View File

@ -0,0 +1,14 @@
<?php $TRANSLATIONS = array(
"The php-json module is needed by the many applications for inter communications" => "Modul php-json je třeba pro vzájemnou komunikaci mnoha aplikací",
"The php-curl modude is needed to fetch the page title when adding a bookmarks" => "Modul php-curl je třeba pro zobrazení titulu strany v okamžiku přidání záložky",
"The php-gd module is needed to create thumbnails of your images" => "Modul php-gd je třeba pro tvorbu náhledů Vašich obrázků",
"The php-ldap module is needed connect to your ldap server" => "Modul php-ldap je třeba pro připojení na Váš ldap server",
"The php-zip module is needed download multiple files at once" => "Modul php-zip je třeba pro souběžné stahování souborů",
"The php-mb_multibyte module is needed to manage correctly the encoding." => "Modul php-mb_multibyte je třeba pro správnou funkci kódování.",
"The php-ctype module is needed validate data." => "Modul php-ctype je třeba k ověřování dat.",
"The php-xml module is needed to share files with webdav." => "Modul php-xml je třeba ke sdílení souborů prostřednictvím WebDAV.",
"The allow_url_fopen directive of your php.ini should be set to 1 to retrieve knowledge base from OCS servers" => "Příkaz allow_url_fopen ve Vašem php.ini souboru by měl být nastaven na 1 kvůli získávání informací z OCS serverů",
"The php-pdo module is needed to store owncloud data into a database." => "Modul php-pdo je třeba pro ukládání dat ownCloud do databáze",
"Dependencies status" => "Status závislostí",
"Used by :" => "Používáno:"
);

View File

@ -1,10 +1,10 @@
<?php $TRANSLATIONS = array(
"The php-json module is needed by the many applications for inter communications" => "Das Modul php-json wird von vielen Anwendungen zur internen Kommunikation benötigt.",
"The php-json module is needed by the many applications for inter communications" => "Das Modul php-json wird von vielen Anwendungen zur internen Kommunikation benötigt.",
"The php-curl modude is needed to fetch the page title when adding a bookmarks" => "Das Modul php-curl wird benötigt, um den Titel der Seite für die Lesezeichen hinzuzufügen.",
"The php-gd module is needed to create thumbnails of your images" => "Das Modul php-gd wird für die Erzeugung der Vorschaubilder benötigt.",
"The php-ldap module is needed connect to your ldap server" => "Das Modul php-ldap wird für die Verbindung mit dem LDAP-Server benötigt.",
"The php-gd module is needed to create thumbnails of your images" => "Das Modul php-gd wird für die Erzeugung der Vorschaubilder benötigt.",
"The php-ldap module is needed connect to your ldap server" => "Das Modul php-ldap wird für die Verbindung mit dem LDAP-Server benötigt.",
"The php-zip module is needed download multiple files at once" => "Das Modul php-zip wird für den gleichzeitigen Download mehrerer Dateien benötigt.",
"The php-mb_multibyte module is needed to manage correctly the encoding." => "Das Modul php_mb_multibyte wird benötigt, um das Encoding richtig zu handhaben.",
"The php-mb_multibyte module is needed to manage correctly the encoding." => "Das Modul php_mb_multibyte wird benötigt, um das Encoding richtig zu handhaben.",
"The php-ctype module is needed validate data." => "Das Modul php-ctype wird benötigt, um Daten zu prüfen.",
"The php-xml module is needed to share files with webdav." => "Das Modul php-xml wird benötigt, um Dateien über WebDAV zu teilen.",
"The allow_url_fopen directive of your php.ini should be set to 1 to retrieve knowledge base from OCS servers" => "Die Richtlinie allow_url_fopen in Ihrer php.ini sollte auf 1 gesetzt werden, um die Wissensbasis vom OCS-Server abrufen.",

View File

@ -0,0 +1,4 @@
<?php $TRANSLATIONS = array(
"Dependencies status" => "Κατάσταση εξαρτήσεων",
"Used by :" => "Χρησιμοποιήθηκε από:"
);

View File

@ -0,0 +1,14 @@
<?php $TRANSLATIONS = array(
"The php-json module is needed by the many applications for inter communications" => "La modulo php-json necesas por komuniko inter la multaj aplikaĵoj",
"The php-curl modude is needed to fetch the page title when adding a bookmarks" => "La modulo php-curl necesas por venigi la paĝotitolon dum aldono de legosigno",
"The php-gd module is needed to create thumbnails of your images" => "La modulo php-gd necesas por krei bildetojn.",
"The php-ldap module is needed connect to your ldap server" => "La modulo php-ldap necesas por konekti al via LDAP-servilo.",
"The php-zip module is needed download multiple files at once" => "La modulo php-zip necesas por elŝuti plurajn dosierojn per unu fojo.",
"The php-mb_multibyte module is needed to manage correctly the encoding." => "La modulo php-mb_multibyte necesas por ĝuste administri la kodprezenton.",
"The php-ctype module is needed validate data." => "La modulo php-ctype necesas por validkontroli datumojn.",
"The php-xml module is needed to share files with webdav." => "La modulo php-xml necesas por kunhavigi dosierojn per WebDAV.",
"The allow_url_fopen directive of your php.ini should be set to 1 to retrieve knowledge base from OCS servers" => "La ordono allow_url_fopen de via php.ini devus valori 1 por ricevi scibazon el OCS-serviloj",
"The php-pdo module is needed to store owncloud data into a database." => "La modulo php-pdo necesas por konservi datumojn de ownCloud en datumbazo.",
"Dependencies status" => "Stato de dependoj",
"Used by :" => "Uzata de:"
);

View File

@ -0,0 +1,4 @@
<?php $TRANSLATIONS = array(
"Dependencies status" => "Estado de las dependencias",
"Used by :" => "Usado por:"
);

View File

@ -0,0 +1,14 @@
<?php $TRANSLATIONS = array(
"The php-json module is needed by the many applications for inter communications" => "php-json moodul on vajalik paljude rakenduse poolt omvahelise suhtlemise jaoks",
"The php-curl modude is needed to fetch the page title when adding a bookmarks" => "php-curl moodul on vajalik lehe pealkirja tõmbamiseks järjehoidja lisamisel",
"The php-gd module is needed to create thumbnails of your images" => "php-gd moodul on vajalik sinu piltidest pisipiltide loomiseks",
"The php-ldap module is needed connect to your ldap server" => "php-ldap moodul on vajalik sinu ldap serveriga ühendumiseks",
"The php-zip module is needed download multiple files at once" => "php-zip moodul on vajalik mitme faili korraga alla laadimiseks",
"The php-mb_multibyte module is needed to manage correctly the encoding." => "php-mb_multibyte moodul on vajalik kodeerimise korrektseks haldamiseks.",
"The php-ctype module is needed validate data." => "php-ctype moodul on vajalik andmete kontrollimiseks.",
"The php-xml module is needed to share files with webdav." => "php-xml moodul on vajalik failide jagamiseks webdav-iga.",
"The allow_url_fopen directive of your php.ini should be set to 1 to retrieve knowledge base from OCS servers" => "Sinu php.ini failis oleva direktiivi allow_url_fopen väärtuseks peaks määrama 1, et saaks tõmmata teadmistebaasi OCS-i serveritest",
"The php-pdo module is needed to store owncloud data into a database." => "php-pdo moodul on vajalik owncloudi andmete salvestamiseks andmebaasi.",
"Dependencies status" => "Sõltuvuse staatus",
"Used by :" => "Kasutab :"
);

View File

@ -0,0 +1,9 @@
<?php $TRANSLATIONS = array(
"The php-gd module is needed to create thumbnails of your images" => "php-gd-moduuli vaaditaan, jotta kuvista on mahdollista luoda esikatselukuvia",
"The php-ldap module is needed connect to your ldap server" => "php-ldap-moduuli vaaditaan, jotta yhteys ldap-palvelimeen on mahdollista",
"The php-zip module is needed download multiple files at once" => "php-zip-moduuli vaaditaan, jotta useiden tiedostojen samanaikainen lataus on mahdollista",
"The php-xml module is needed to share files with webdav." => "php-xml-moduuli vaaditaan, jotta tiedostojen jako webdavia käyttäen on mahdollista",
"The php-pdo module is needed to store owncloud data into a database." => "php-pdo-moduuli tarvitaan, jotta ownCloud-tietojen tallennus tietokantaan on mahdollista",
"Dependencies status" => "Riippuvuuksien tila",
"Used by :" => "Käyttökohde:"
);

View File

@ -7,6 +7,7 @@
"The php-mb_multibyte module is needed to manage correctly the encoding." => "Il modulo php-mb_multibyte è richiesto per gestire correttamente la codifica.",
"The php-ctype module is needed validate data." => "Il modulo php-ctype è richiesto per la validazione dei dati.",
"The php-xml module is needed to share files with webdav." => "Il modulo php-xml è richiesto per condividere i file con webdav.",
"The allow_url_fopen directive of your php.ini should be set to 1 to retrieve knowledge base from OCS servers" => "La direttiva allow_url_fopen del tuo php.ini deve essere impostata a 1 per recuperare la base di conoscenza dai server di OCS",
"The php-pdo module is needed to store owncloud data into a database." => "Il modulo php-pdo è richiesto per archiviare i dati di ownCloud in un database.",
"Dependencies status" => "Stato delle dipendenze",
"Used by :" => "Usato da:"

View File

@ -0,0 +1,14 @@
<?php $TRANSLATIONS = array(
"The php-json module is needed by the many applications for inter communications" => "php-jsonモジュールはアプリケーション間の内部通信に必要です",
"The php-curl modude is needed to fetch the page title when adding a bookmarks" => "php-curlモジュールはブックマーク追加時のページタイトル取得に必要です",
"The php-gd module is needed to create thumbnails of your images" => "php-gdモジュールはサムネイル画像の生成に必要です",
"The php-ldap module is needed connect to your ldap server" => "php-ldapモジュールはLDAPサーバへの接続に必要です",
"The php-zip module is needed download multiple files at once" => "php-zipモジュールは複数ファイルの同時ダウンロードに必要です",
"The php-mb_multibyte module is needed to manage correctly the encoding." => "php-mb_multibyteモジュールはエンコードを正しく扱うために必要です",
"The php-ctype module is needed validate data." => "php-ctypeモジュールはデータのバリデーションに必要です",
"The php-xml module is needed to share files with webdav." => "php-xmlモジュールはWebDAVでのファイル共有に必要です",
"The allow_url_fopen directive of your php.ini should be set to 1 to retrieve knowledge base from OCS servers" => "php.iniのallow_url_fopenはOCSサーバから知識ベースを取得するために1に設定しなくてはなりません",
"The php-pdo module is needed to store owncloud data into a database." => "php-pdoモジュールはデータベースにownCloudのデータを格納するために必要です",
"Dependencies status" => "依存関係の状況",
"Used by :" => "利用先 :"
);

View File

@ -0,0 +1,14 @@
<?php $TRANSLATIONS = array(
"The php-json module is needed by the many applications for inter communications" => "Php-json modulis yra reikalingas duomenų keitimuisi tarp programų",
"The php-curl modude is needed to fetch the page title when adding a bookmarks" => "Php-curl modulis automatiškai nuskaito tinklapio pavadinimą kuomet išsaugoma žymelė.",
"The php-gd module is needed to create thumbnails of your images" => "Php-gd modulis yra naudojamas paveikslėlių miniatiūroms kurti.",
"The php-ldap module is needed connect to your ldap server" => "Php-ldap modulis yra reikalingas prisijungimui prie jūsų ldap serverio",
"The php-zip module is needed download multiple files at once" => "Php-zip modulis yra reikalingas kelių failų atsiuntimui iš karto.",
"The php-mb_multibyte module is needed to manage correctly the encoding." => "Php-mb_multibyte modulis yra naudojamas apdoroti įvairius teksto kodavimo formatus.",
"The php-ctype module is needed validate data." => "Php-ctype modulis yra reikalingas duomenų tikrinimui.",
"The php-xml module is needed to share files with webdav." => "Php-xml modulis yra reikalingas failų dalinimuisi naudojant webdav.",
"The allow_url_fopen directive of your php.ini should be set to 1 to retrieve knowledge base from OCS servers" => "allow_url_fopen direktyva turėtų būti nustatyta į \"1\" jei norite automatiškai gauti žinių bazės informaciją iš OCS serverių.",
"The php-pdo module is needed to store owncloud data into a database." => "Php-pdo modulis yra reikalingas duomenų saugojimui į owncloud duomenų bazę.",
"Dependencies status" => "Priklausomybės",
"Used by :" => "Naudojama:"
);

View File

@ -0,0 +1,14 @@
<?php $TRANSLATIONS = array(
"The php-json module is needed by the many applications for inter communications" => "Moduł php-json jest wymagane przez wiele aplikacji do wewnętrznej łączności",
"The php-curl modude is needed to fetch the page title when adding a bookmarks" => "Modude php-curl jest wymagany do pobrania tytułu strony podczas dodawania zakładki",
"The php-gd module is needed to create thumbnails of your images" => "Moduł php-gd jest wymagany do tworzenia miniatury obrazów",
"The php-ldap module is needed connect to your ldap server" => "Moduł php-ldap jest wymagany aby połączyć się z serwerem ldap",
"The php-zip module is needed download multiple files at once" => "Moduł php-zip jest wymagany aby pobrać wiele plików na raz",
"The php-mb_multibyte module is needed to manage correctly the encoding." => "Moduł php-mb_multibyte jest wymagany do poprawnego zarządzania kodowaniem.",
"The php-ctype module is needed validate data." => "Moduł php-ctype jest wymagany do sprawdzania poprawności danych.",
"The php-xml module is needed to share files with webdav." => "Moduł php-xml jest wymagany do udostępniania plików przy użyciu protokołu webdav.",
"The allow_url_fopen directive of your php.ini should be set to 1 to retrieve knowledge base from OCS servers" => "Dyrektywy allow_url_fopen użytkownika php.ini powinna być ustawiona na 1 do pobierania bazy wiedzy z serwerów OCS",
"The php-pdo module is needed to store owncloud data into a database." => "Moduł php-pdo jest wymagany do przechowywania danych owncloud w bazie danych.",
"Dependencies status" => "Stan zależności",
"Used by :" => "Używane przez:"
);

View File

@ -0,0 +1,14 @@
<?php $TRANSLATIONS = array(
"The php-json module is needed by the many applications for inter communications" => "Модуль php-json необходим многим приложениям для внутренних связей",
"The php-curl modude is needed to fetch the page title when adding a bookmarks" => "Модуль php-curl необходим для получения заголовка страницы при добавлении закладок",
"The php-gd module is needed to create thumbnails of your images" => "Модуль php-gd необходим для создания уменьшенной копии для предпросмотра ваших картинок.",
"The php-ldap module is needed connect to your ldap server" => "Модуль php-ldap необходим для соединения с вашим ldap сервером",
"The php-zip module is needed download multiple files at once" => "Модуль php-zip необходим для загрузки нескольких файлов за раз",
"The php-mb_multibyte module is needed to manage correctly the encoding." => "Модуль php-mb_multibyte необходим для корректного управления кодировками.",
"The php-ctype module is needed validate data." => "Модуль php-ctype необходим для проверки данных.",
"The php-xml module is needed to share files with webdav." => "Модуль php-xml необходим для открытия файлов через webdav.",
"The allow_url_fopen directive of your php.ini should be set to 1 to retrieve knowledge base from OCS servers" => "Директива allow_url_fopen в файле php.ini должна быть установлена в 1 для получения базы знаний с серверов OCS",
"The php-pdo module is needed to store owncloud data into a database." => "Модуль php-pdo необходим для хранения данных ownСloud в базе данных.",
"Dependencies status" => "Статус зависимостей",
"Used by :" => "Используется:"
);

View File

@ -0,0 +1,14 @@
<?php $TRANSLATIONS = array(
"The php-json module is needed by the many applications for inter communications" => "Modul php-json je potreben za medsebojno komunikacijo veliko aplikacij.",
"The php-curl modude is needed to fetch the page title when adding a bookmarks" => "Modul php-curl je potreben za pridobivanje naslova strani pri dodajanju zaznamkov.",
"The php-gd module is needed to create thumbnails of your images" => "Modul php-gd je potreben za ustvarjanje sličic za predogled.",
"The php-ldap module is needed connect to your ldap server" => "Modul php-ldap je potreben za povezavo z vašim ldap strežnikom.",
"The php-zip module is needed download multiple files at once" => "Modul php-zip je potreben za prenašanje večih datotek hkrati.",
"The php-mb_multibyte module is needed to manage correctly the encoding." => "Modul php-mb_multibyte je potreben za pravilno upravljanje kodiranja.",
"The php-ctype module is needed validate data." => "Modul php-ctype je potreben za preverjanje veljavnosti podatkov.",
"The php-xml module is needed to share files with webdav." => "Modul php-xml je potreben za izmenjavo datotek preko protokola WebDAV.",
"The allow_url_fopen directive of your php.ini should be set to 1 to retrieve knowledge base from OCS servers" => "Direktiva allow_url_fopen v vaši php.ini datoteki mora biti nastavljena na 1, če želite omogočiti dostop do zbirke znanja na strežnikih OCS.",
"The php-pdo module is needed to store owncloud data into a database." => "Modul php-pdo je potreben za shranjevanje ownCloud podatkov v podatkovno zbirko.",
"Dependencies status" => "Stanje odvisnosti",
"Used by :" => "Uporablja:"
);

View File

@ -1,3 +1,14 @@
<?php $TRANSLATIONS = array(
"The php-json module is needed by the many applications for inter communications" => "โมดูล php-json จำเป็นต้องใช้สำหรับแอพพลิเคชั่นหลายๆตัวเพื่อการเชื่อมต่อสากล",
"The php-curl modude is needed to fetch the page title when adding a bookmarks" => "โมดูล php-curl จำเป็นต้องใช้สำหรับดึงข้อมูลชื่อหัวเว็บเมื่อเพิ่มเข้าไปยังรายการโปรด",
"The php-gd module is needed to create thumbnails of your images" => "โมดูล php-gd จำเป็นต้องใช้สำหรับสร้างรูปภาพขนาดย่อของรูปภาพของคุณ",
"The php-ldap module is needed connect to your ldap server" => "โมดูล php-ldap จำเป็นต้องใช้สำหรับการเชื่อมต่อกับเซิร์ฟเวอร์ ldap ของคุณ",
"The php-zip module is needed download multiple files at once" => "โมดูล php-zip จำเป็นต้องใช้สำหรับดาวน์โหลดไฟล์พร้อมกันหลายๆไฟล์ในครั้งเดียว",
"The php-mb_multibyte module is needed to manage correctly the encoding." => "โมดูล php-mb_multibyte จำเป็นต้องใช้สำหรับการจัดการการแปลงรหัสไฟล์อย่างถูกต้อง",
"The php-ctype module is needed validate data." => "โมดูล php-ctype จำเป็นต้องใช้สำหรับตรวจสอบความถูกต้องของข้อมูล",
"The php-xml module is needed to share files with webdav." => "โมดูล php-xml จำเป็นต้องใช้สำหรับแชร์ไฟล์ด้วย webdav",
"The allow_url_fopen directive of your php.ini should be set to 1 to retrieve knowledge base from OCS servers" => "คำสั่ง allow_url_fopen ที่อยู่ในไฟล์ php.ini ของคุณ ควรกำหนดเป็น 1 เพื่อดึงข้อมูลของฐานความรู้ต่างๆจากเซิร์ฟเวอร์ของ OCS",
"The php-pdo module is needed to store owncloud data into a database." => "โมดูล php-pdo จำเป็นต้องใช้สำหรับจัดเก็บข้อมูลใน owncloud เข้าไปไว้ยังฐานข้อมูล",
"Dependencies status" => "สถานะการอ้างอิง",
"Used by :" => "ใช้งานโดย:"
);

View File

@ -0,0 +1,5 @@
<?php $TRANSLATIONS = array(
"Export this ownCloud instance" => "Export této instance ownCloud",
"This will create a compressed file that contains the data of this owncloud instance.\n Please choose the export type:" => "Bude vytvořen komprimovaný soubor obsahující data této instance ownCloud.⏎ Zvolte typ exportu:",
"Export" => "Export"
);

View File

@ -0,0 +1,4 @@
<?php $TRANSLATIONS = array(
"Export this ownCloud instance" => "Eksporter ownCloud instans",
"Export" => "Eksporter"
);

View File

@ -0,0 +1,4 @@
<?php $TRANSLATIONS = array(
"This will create a compressed file that contains the data of this owncloud instance.\n Please choose the export type:" => "Αυτό θα δημιουργήσει ένα συμπιεσμένο αρχείο που θα περιέχει τα δεδομένα από αυτό το ownCloud.\n Παρακαλώ επιλέξτε τον τύπο εξαγωγής:",
"Export" => "Εξαγωγή"
);

View File

@ -0,0 +1,5 @@
<?php $TRANSLATIONS = array(
"Export this ownCloud instance" => "Malenporti ĉi tiun aperon de ownCloud",
"This will create a compressed file that contains the data of this owncloud instance.\n Please choose the export type:" => "Ĉi tio kreos densigitan dosieron, kiu enhavos la datumojn de ĉi tiu apero de ownCloud.\nBonvolu elekti la tipon de malenportado:",
"Export" => "Malenporti"
);

View File

@ -0,0 +1,5 @@
<?php $TRANSLATIONS = array(
"Export this ownCloud instance" => "Ekspordi see ownCloudi paigaldus",
"This will create a compressed file that contains the data of this owncloud instance.\n Please choose the export type:" => "See loob pakitud faili, milles on sinu owncloudi paigalduse andmed.\n Palun vali eksporditava faili tüüp:",
"Export" => "Ekspordi"
);

View File

@ -0,0 +1,4 @@
<?php $TRANSLATIONS = array(
"Export this ownCloud instance" => "Vie tämä ownCloud-istanssi",
"Export" => "Vie"
);

View File

@ -1,5 +1,5 @@
<?php $TRANSLATIONS = array(
"Export this ownCloud instance" => "Esporta questa istanza di ownClou",
"Export this ownCloud instance" => "Esporta questa istanza di ownCloud",
"This will create a compressed file that contains the data of this owncloud instance.\n Please choose the export type:" => "Questa operazione creerà un file compresso che contiene i dati dell'istanza di ownCloud. Scegli il tipo di esportazione:",
"Export" => "Esporta"
);

View File

@ -0,0 +1,5 @@
<?php $TRANSLATIONS = array(
"Export this ownCloud instance" => "ownCloudをエクスポート",
"This will create a compressed file that contains the data of this owncloud instance.\n Please choose the export type:" => "このownCloudのデータを含む圧縮ファイルを生成します。\nエクスポートの種類を選択してください:",
"Export" => "エクスポート"
);

View File

@ -0,0 +1,5 @@
<?php $TRANSLATIONS = array(
"Export this ownCloud instance" => "Eksportuoti šią ownCloud instaliaciją",
"This will create a compressed file that contains the data of this owncloud instance.\n Please choose the export type:" => "Bus sukurtas archyvas su visais owncloud duomenimis ir failais.\n Pasirinkite eksportavimo tipą:",
"Export" => "Eksportuoti"
);

View File

@ -0,0 +1,5 @@
<?php $TRANSLATIONS = array(
"Export this ownCloud instance" => "Eksporter denne ownCloud forekomsten",
"This will create a compressed file that contains the data of this owncloud instance.\n Please choose the export type:" => "Dette vil opprette en komprimert fil som inneholder dataene fra denne ownCloud forekomsten.⏎ Vennligst velg eksporttype:",
"Export" => "Eksport"
);

View File

@ -0,0 +1,5 @@
<?php $TRANSLATIONS = array(
"Export this ownCloud instance" => "Exporteer deze ownCloud instantie",
"This will create a compressed file that contains the data of this owncloud instance.\n Please choose the export type:" => "Dit maakt een gecomprimeerd bestand, met de inhoud van deze ownCloud instantie. Kies het export type:",
"Export" => "Exporteer"
);

View File

@ -0,0 +1,5 @@
<?php $TRANSLATIONS = array(
"Export this ownCloud instance" => "Экспортировать этот экземпляр ownCloud",
"This will create a compressed file that contains the data of this owncloud instance.\n Please choose the export type:" => "Будет создан сжатый файл, содержащий данные этого экземпляра owncloud.\n Выберите тип экспорта:",
"Export" => "Экспорт"
);

View File

@ -0,0 +1,5 @@
<?php $TRANSLATIONS = array(
"Export this ownCloud instance" => "Izvozi to ownCloud namestitev",
"This will create a compressed file that contains the data of this owncloud instance.\n Please choose the export type:" => "Ustvarjena bo stisnjena datoteka s podatki te ownCloud namestitve.\n Prosimo, če izberete vrsto izvoza:",
"Export" => "Izvozi"
);

View File

@ -21,6 +21,11 @@
*
*/
//no apps or filesystem
$RUNTIME_NOSETUPFS=true;
// Check if we are a user
OCP\JSON::checkLoggedIn();
OCP\JSON::callCheck();

View File

@ -26,6 +26,7 @@ OCP\JSON::checkLoggedIn();
OCP\JSON::callCheck();
OCP\JSON::checkAppEnabled('bookmarks');
OCP\JSON::callCheck();
$id = $_POST['id'];
if (!OC_Bookmarks_Bookmarks::deleteUrl($id)){

View File

@ -32,6 +32,8 @@ if( $CONFIG_DBTYPE == 'sqlite' or $CONFIG_DBTYPE == 'sqlite3' ){
$_ut = "strftime('%s','now')";
} elseif($CONFIG_DBTYPE == 'pgsql') {
$_ut = 'date_part(\'epoch\',now())::integer';
} elseif($CONFIG_DBTYPE == 'oci') {
$_ut = '(oracletime - to_date(\'19700101\',\'YYYYMMDD\')) * 86400';
} else {
$_ut = "UNIX_TIMESTAMP()";
}
@ -39,12 +41,13 @@ if( $CONFIG_DBTYPE == 'sqlite' or $CONFIG_DBTYPE == 'sqlite3' ){
$bookmark_id = (int)$_POST["id"];
$user_id = OCP\USER::getUser();
$query = OCP\DB::prepare("
UPDATE *PREFIX*bookmarks
SET url = ?, title =?, lastmodified = $_ut
WHERE id = ?
AND user_id = ?
");
//TODO check using CURRENT_TIMESTAMP? prepare already does magic when using now()
$query = OCP\DB::prepare('
UPDATE `*PREFIX*bookmarks`
SET `url` = ?, `title` = ?, `lastmodified` = '.$_ut.'
WHERE `id` = ?
AND `user_id` = ?
');
$params=array(
htmlspecialchars_decode($_POST["url"]),
@ -59,18 +62,22 @@ $result = $query->execute($params);
if ($result->numRows() == 0) exit();
# Remove old tags and insert new ones.
$query = OCP\DB::prepare("
DELETE FROM *PREFIX*bookmarks_tags
WHERE bookmark_id = $bookmark_id
");
$query = OCP\DB::prepare('
DELETE FROM `*PREFIX*bookmarks_tags`
WHERE `bookmark_id` = ?
');
$query->execute();
$params=array(
$bookmark_id
);
$query = OCP\DB::prepare("
INSERT INTO *PREFIX*bookmarks_tags
(bookmark_id, tag)
$query->execute($params);
$query = OCP\DB::prepare('
INSERT INTO `*PREFIX*bookmarks_tags`
(`bookmark_id`, `tag`)
VALUES (?, ?)
");
');
$tags = explode(' ', urldecode($_POST["tags"]));
foreach ($tags as $tag) {

View File

@ -25,12 +25,12 @@
OCP\JSON::checkLoggedIn();
OCP\JSON::checkAppEnabled('bookmarks');
$query = OCP\DB::prepare("
UPDATE *PREFIX*bookmarks
SET clickcount = clickcount + 1
WHERE user_id = ?
AND url LIKE ?
");
$query = OCP\DB::prepare('
UPDATE `*PREFIX*bookmarks`
SET `clickcount` = `clickcount` + 1
WHERE `user_id` = ?
AND `url` LIKE ?
');
$params=array(OCP\USER::getUser(), htmlspecialchars_decode($_POST["url"]));
$bookmarks = $query->execute($params);

View File

@ -109,4 +109,4 @@
</declaration>
</table>
</database>

View File

@ -35,24 +35,24 @@ class OC_Migration_Provider_Bookmarks extends OC_Migration_Provider{
switch( $this->appinfo->version ){
default:
// All versions of the app have had the same db structure, so all can use the same import function
$query = $this->content->prepare( "SELECT * FROM bookmarks WHERE user_id LIKE ?" );
$query = $this->content->prepare( "SELECT * FROM `bookmarks` WHERE `user_id` LIKE ?" );
$results = $query->execute( array( $this->olduid ) );
$idmap = array();
while( $row = $results->fetchRow() ){
// Import each bookmark, saving its id into the map
$bookmarkquery = OCP\DB::prepare( "INSERT INTO *PREFIX*bookmarks(url, title, user_id, public, added, lastmodified) VALUES (?, ?, ?, ?, ?, ?)" );
$bookmarkquery->execute( array( $row['url'], $row['title'], $this->uid, $row['public'], $row['added'], $row['lastmodified'] ) );
$query = OCP\DB::prepare( "INSERT INTO `*PREFIX*bookmarks`(`url`, `title`, `user_id`, `public`, `added`, `lastmodified`) VALUES (?, ?, ?, ?, ?, ?)" );
$query->execute( array( $row['url'], $row['title'], $this->uid, $row['public'], $row['added'], $row['lastmodified'] ) );
// Map the id
$idmap[$row['id']] = OCP\DB::insertid();
}
// Now tags
foreach($idmap as $oldid => $newid){
$query = $this->content->prepare( "SELECT * FROM bookmarks_tags WHERE bookmark_id LIKE ?" );
$query = $this->content->prepare( "SELECT * FROM `bookmarks_tags` WHERE `bookmark_id` LIKE ?" );
$results = $query->execute( array( $oldid ) );
while( $row = $results->fetchRow() ){
// Import the tags for this bookmark, using the new bookmark id
$tagquery = OCP\DB::prepare( "INSERT INTO *PREFIX*bookmarks_tags(bookmark_id, tag) VALUES (?, ?)" );
$tagquery->execute( array( $newid, $row['tag'] ) );
$query = OCP\DB::prepare( "INSERT INTO `*PREFIX*bookmarks_tags`(`bookmark_id`, `tag`) VALUES (?, ?)" );
$query->execute( array( $newid, $row['tag'] ) );
}
}
// All done!

View File

@ -83,8 +83,8 @@ function addBookmark($url, $title, $tags='') {
//FIXME: Detect when user adds a known URL
$query = OCP\DB::prepare("
INSERT INTO *PREFIX*bookmarks
(url, title, user_id, public, added, lastmodified)
INSERT INTO `*PREFIX*bookmarks`
(`url`, `title`, `user_id`, `public`, `added`, `lastmodified`)
VALUES (?, ?, ?, 0, $_ut, $_ut)
");
@ -110,8 +110,8 @@ function addBookmark($url, $title, $tags='') {
if($b_id !== false) {
$query = OCP\DB::prepare("
INSERT INTO *PREFIX*bookmarks_tags
(bookmark_id, tag)
INSERT INTO `*PREFIX*bookmarks_tags`
(`bookmark_id`, `tag`)
VALUES (?, ?)
");
@ -127,4 +127,4 @@ function addBookmark($url, $title, $tags='') {
return $b_id;
}
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 496 B

After

Width:  |  Height:  |  Size: 398 B

View File

@ -0,0 +1,12 @@
<?php $TRANSLATIONS = array(
"Bookmarks" => "Záložky",
"unnamed" => "nepojmenovaný",
"Drag this to your browser bookmarks and click it, when you want to bookmark a webpage quickly:" => "Přetáhněte do Vašeho prohlížeče a kliněte, pokud si přejete rychle uložit stranu do záložek:",
"Read later" => "Přečíst později",
"Address" => "Adresa",
"Title" => "Název",
"Tags" => "Tagy",
"Save bookmark" => "Uložit záložku",
"You have no bookmarks" => "Nemáte žádné záložky",
"Bookmarklet <br />" => "Záložky <br />"
);

View File

@ -1,12 +1,12 @@
<?php $TRANSLATIONS = array(
"Bookmarks" => "Lesezeichen",
"unnamed" => "unbenannt",
"Drag this to your browser bookmarks and click it, when you want to bookmark a webpage quickly:" => "Ziehe dies zu deinen Browser-Lesezeichen und klicke es, wenn du eine Website schnell den Lesezeichen hinzufügen willst.",
"Drag this to your browser bookmarks and click it, when you want to bookmark a webpage quickly:" => "Ziehen Sie dies zu Ihren Browser-Lesezeichen und klicken Sie darauf, wenn Sie eine Website schnell den Lesezeichen hinzufügen wollen.",
"Read later" => "Später lesen",
"Address" => "Adresse",
"Title" => "Title",
"Title" => "Titel",
"Tags" => "Tags",
"Save bookmark" => "Lesezeichen speichern",
"You have no bookmarks" => "Du hast keine Lesezeichen",
"You have no bookmarks" => "Sie haben keine Lesezeichen",
"Bookmarklet <br />" => "Bookmarklet <br />"
);

View File

@ -0,0 +1,8 @@
<?php $TRANSLATIONS = array(
"Bookmarks" => "نشانک‌ها",
"unnamed" => "بدون‌نام",
"Address" => "آدرس",
"Title" => "عنوان",
"Save bookmark" => "ذخیره نشانک",
"You have no bookmarks" => "شما هیچ نشانکی ندارید"
);

View File

@ -0,0 +1,3 @@
<?php $TRANSLATIONS = array(
"unnamed" => "be pavadinimo"
);

View File

@ -0,0 +1,11 @@
<?php $TRANSLATIONS = array(
"Bookmarks" => "Bokmerker",
"unnamed" => "uten navn",
"Drag this to your browser bookmarks and click it, when you want to bookmark a webpage quickly:" => "Dra denne over din nettlesers bokmerker og klikk den, hvis du ønsker å hurtig legge til bokmerke for en nettside",
"Read later" => "Les senere",
"Address" => "Adresse",
"Title" => "Tittel",
"Tags" => "Etikett",
"Save bookmark" => "Lagre bokmerke",
"You have no bookmarks" => "Du har ingen bokmerker"
);

View File

@ -0,0 +1,11 @@
<?php $TRANSLATIONS = array(
"Bookmarks" => "Bladwijzers",
"unnamed" => "geen naam",
"Drag this to your browser bookmarks and click it, when you want to bookmark a webpage quickly:" => "Sleep dit naar uw browser bladwijzers en klik erop, wanneer u een webpagina snel wilt voorzien van een bladwijzer:",
"Read later" => "Lees later",
"Address" => "Adres",
"Title" => "Titel",
"Tags" => "Tags",
"Save bookmark" => "Bewaar bookmark",
"You have no bookmarks" => "U heeft geen bookmarks"
);

View File

@ -0,0 +1,11 @@
<?php $TRANSLATIONS = array(
"Bookmarks" => "Закладки",
"unnamed" => "без имени",
"Read later" => "Прочитать позже",
"Address" => "Адрес",
"Title" => "Заголовок",
"Tags" => "Метки",
"Save bookmark" => "Сохранить закладки",
"You have no bookmarks" => "У вас нет закладок",
"Bookmarklet <br />" => "Букмарклет <br />"
);

View File

@ -0,0 +1,12 @@
<?php $TRANSLATIONS = array(
"Bookmarks" => "书签",
"unnamed" => "未命名",
"Drag this to your browser bookmarks and click it, when you want to bookmark a webpage quickly:" => "拖曳此处到您的浏览器书签处,点击可以将网页快速添加到书签中。",
"Read later" => "稍后阅读",
"Address" => "地址",
"Title" => "标题",
"Tags" => "标签",
"Save bookmark" => "保存书签",
"You have no bookmarks" => "您暂无书签",
"Bookmarklet <br />" => "书签应用"
);

View File

@ -71,16 +71,15 @@ class OC_Bookmarks_Bookmarks{
if($CONFIG_DBTYPE == 'pgsql' ){
$query = OCP\DB::prepare('
SELECT id, url, title, '.($filterTagOnly?'':'url || title ||').' array_to_string(array_agg(tag), \' \') as tags
FROM *PREFIX*bookmarks
LEFT JOIN *PREFIX*bookmarks_tags ON *PREFIX*bookmarks.id = *PREFIX*bookmarks_tags.bookmark_id
SELECT `id`, `url`, `title`, '.($filterTagOnly?'':'`url` || `title` ||').' array_to_string(array_agg(`tag`), \' \') as `tags`
FROM `*PREFIX*bookmarks`
LEFT JOIN `*PREFIX*bookmarks_tags` ON `*PREFIX*bookmarks`.`id` = `*PREFIX*bookmarks_tags`.`bookmark_id`
WHERE
*PREFIX*bookmarks.user_id = ?
GROUP BY id, url, title
`*PREFIX*bookmarks`.`user_id` = ?
GROUP BY `id`, `url`, `title`
'.$sqlFilterTag.'
ORDER BY *PREFIX*bookmarks.'.$sqlSortColumn.' DESC
LIMIT 10
OFFSET '. $offset);
ORDER BY `*PREFIX*bookmarks`.`'.$sqlSortColumn.'` DESC',
10,$offset);
} else {
if( $CONFIG_DBTYPE == 'sqlite' or $CONFIG_DBTYPE == 'sqlite3' )
$concatFunction = '(url || title || ';
@ -88,26 +87,26 @@ class OC_Bookmarks_Bookmarks{
$concatFunction = 'Concat(Concat( url, title), ';
$query = OCP\DB::prepare('
SELECT id, url, title, '
SELECT `id`, `url`, `title`, '
.($filterTagOnly?'':$concatFunction).
'CASE WHEN *PREFIX*bookmarks.id = *PREFIX*bookmarks_tags.bookmark_id
THEN GROUP_CONCAT( tag ' .$_gc_separator. ' )
'CASE WHEN `*PREFIX*bookmarks`.`id` = `*PREFIX*bookmarks_tags`.`bookmark_id`
THEN GROUP_CONCAT( `tag` ' .$_gc_separator. ' )
ELSE \' \'
END '
.($filterTagOnly?'':')').'
AS tags
FROM *PREFIX*bookmarks
LEFT JOIN *PREFIX*bookmarks_tags ON 1=1
WHERE (*PREFIX*bookmarks.id = *PREFIX*bookmarks_tags.bookmark_id
OR *PREFIX*bookmarks.id NOT IN (
SELECT *PREFIX*bookmarks_tags.bookmark_id FROM *PREFIX*bookmarks_tags
AS `tags`
FROM `*PREFIX*bookmarks`
LEFT JOIN `*PREFIX*bookmarks_tags` ON 1=1
WHERE (`*PREFIX*bookmarks`.`id` = `*PREFIX*bookmarks_tags`.`bookmark_id`
OR `*PREFIX*bookmarks`.`id` NOT IN (
SELECT `*PREFIX*bookmarks_tags`.`bookmark_id` FROM `*PREFIX*bookmarks_tags`
)
)
AND *PREFIX*bookmarks.user_id = ?
GROUP BY url
AND `*PREFIX*bookmarks`.`user_id` = ?
GROUP BY `url`
'.$sqlFilterTag.'
ORDER BY *PREFIX*bookmarks.'.$sqlSortColumn.' DESC
LIMIT '.$offset.', 10');
ORDER BY `*PREFIX*bookmarks`.`'.$sqlSortColumn.'` DESC',
10, $offset);
}
$bookmarks = $query->execute($params)->fetchAll();
@ -119,9 +118,9 @@ class OC_Bookmarks_Bookmarks{
$user = OCP\USER::getUser();
$query = OCP\DB::prepare("
SELECT id FROM *PREFIX*bookmarks
WHERE id = ?
AND user_id = ?
SELECT `id` FROM `*PREFIX*bookmarks`
WHERE `id` = ?
AND `user_id` = ?
");
$result = $query->execute(array($id, $user));
@ -131,18 +130,18 @@ class OC_Bookmarks_Bookmarks{
}
$query = OCP\DB::prepare("
DELETE FROM *PREFIX*bookmarks
WHERE id = $id
DELETE FROM `*PREFIX*bookmarks`
WHERE `id` = $id
");
$result = $query->execute();
$query = OCP\DB::prepare("
DELETE FROM *PREFIX*bookmarks_tags
WHERE bookmark_id = $id
DELETE FROM `*PREFIX*bookmarks_tags`
WHERE `bookmark_id` = $id
");
$result = $query->execute();
return true;
}
}
}

View File

@ -9,6 +9,7 @@
OCP\JSON::checkLoggedIn();
OCP\JSON::checkAppEnabled('calendar');
OCP\JSON::callCheck();
$calendarcolor_options = OC_Calendar_Calendar::getCalendarColorOptions();
$calendar = OC_Calendar_App::getCalendar($_GET['calendarid'], true);

View File

@ -14,7 +14,7 @@ switch($view){
case 'list':
break;
default:
OCP\JSON::error(array('message'=>'unexspected parameter: ' . $view));
OCP\JSON::error(array('message'=>'unexpected parameter: ' . $view));
exit;
}
OCP\Config::setUserValue(OCP\USER::getUser(), 'calendar', 'currentview', $view);

View File

@ -269,4 +269,4 @@ if($repeat['repeat'] != 'doesnotrepeat'){
$tmpl->assign('repeat_date', '');
$tmpl->assign('repeat_year', 'bydate');
}
$tmpl->printpage();
$tmpl->printpage();

View File

@ -4,12 +4,18 @@ OC::$CLASSPATH['OC_Calendar_App'] = 'apps/calendar/lib/app.php';
OC::$CLASSPATH['OC_Calendar_Calendar'] = 'apps/calendar/lib/calendar.php';
OC::$CLASSPATH['OC_Calendar_Object'] = 'apps/calendar/lib/object.php';
OC::$CLASSPATH['OC_Calendar_Hooks'] = 'apps/calendar/lib/hooks.php';
OC::$CLASSPATH['OC_Connector_Sabre_CalDAV'] = 'apps/calendar/lib/connector_sabre.php';
OC::$CLASSPATH['OC_Connector_Sabre_CalDAV'] = 'apps/calendar/lib/sabre/backend.php';
OC::$CLASSPATH['OC_Connector_Sabre_CalDAV_CalendarRoot'] = 'apps/calendar/lib/sabre/calendarroot.php';
OC::$CLASSPATH['OC_Connector_Sabre_CalDAV_UserCalendars'] = 'apps/calendar/lib/sabre/usercalendars.php';
OC::$CLASSPATH['OC_Connector_Sabre_CalDAV_Calendar'] = 'apps/calendar/lib/sabre/calendar.php';
OC::$CLASSPATH['OC_Connector_Sabre_CalDAV_CalendarObject'] = 'apps/calendar/lib/sabre/object.php';
OC::$CLASSPATH['OC_Calendar_Repeat'] = 'apps/calendar/lib/repeat.php';
OC::$CLASSPATH['OC_Calendar_Share'] = 'apps/calendar/lib/share.php';
OC::$CLASSPATH['OC_Search_Provider_Calendar'] = 'apps/calendar/lib/search.php';
OC::$CLASSPATH['OC_Calendar_Export'] = 'apps/calendar/lib/export.php';
OC::$CLASSPATH['OC_Calendar_Import'] = 'apps/calendar/lib/import.php';
OC::$CLASSPATH['OC_Share_Backend_Calendar'] = 'apps/calendar/lib/share/calendar.php';
OC::$CLASSPATH['OC_Share_Backend_Event'] = 'apps/calendar/lib/share/event.php';
//General Hooks
OCP\Util::connectHook('OC_User', 'post_createUser', 'OC_Calendar_Hooks', 'createUser');
OCP\Util::connectHook('OC_User', 'post_deleteUser', 'OC_Calendar_Hooks', 'deleteUser');
@ -34,3 +40,5 @@ OCP\App::addNavigationEntry( array(
'icon' => OCP\Util::imagePath( 'calendar', 'icon.svg' ),
'name' => $l->t('Calendar')));
OC_Search::registerProvider('OC_Search_Provider_Calendar');
OCP\Share::registerBackend('calendar', 'OC_Share_Backend_Calendar');
OCP\Share::registerBackend('event', 'OC_Share_Backend_Event');

View File

@ -43,14 +43,14 @@
<field>
<name>startdate</name>
<type>timestamp</type>
<default>0000-00-00 00:00:00</default>
<default>CURRENT_TIMESTAMP</default>
<notnull>false</notnull>
</field>
<field>
<name>enddate</name>
<type>timestamp</type>
<default>0000-00-00 00:00:00</default>
<default>CURRENT_TIMESTAMP</default>
<notnull>false</notnull>
</field>
@ -72,7 +72,7 @@
<field>
<name>calendardata</name>
<type>clob</type>
<type>text</type>
<notnull>false</notnull>
</field>
@ -172,7 +172,7 @@
<field>
<name>timezone</name>
<type>clob</type>
<type>text</type>
<notnull>false</notnull>
</field>

View File

@ -21,15 +21,15 @@ $principalBackend = new OC_Connector_Sabre_Principal();
$caldavBackend = new OC_Connector_Sabre_CalDAV();
// Root nodes
$Sabre_CalDAV_Principal_Collection = new Sabre_CalDAV_Principal_Collection($principalBackend);
$Sabre_CalDAV_Principal_Collection = new Sabre_CalDAV_Principal_Collection($principalBackend);
$Sabre_CalDAV_Principal_Collection->disableListing = true; // Disable listening
$Sabre_CalDAV_CalendarRootNode = new Sabre_CalDAV_CalendarRootNode($principalBackend, $caldavBackend);
$Sabre_CalDAV_CalendarRootNode->disableListing = true; // Disable listening
$calendarRoot = new OC_Connector_Sabre_CalDAV_CalendarRoot($principalBackend, $caldavBackend);
$calendarRoot->disableListing = true; // Disable listening
$nodes = array(
$Sabre_CalDAV_Principal_Collection,
$Sabre_CalDAV_CalendarRootNode,
$nodes = array(
$Sabre_CalDAV_Principal_Collection,
$calendarRoot,
);
// Fire up server

View File

@ -2,7 +2,7 @@
$installedVersion=OCP\Config::getAppValue('calendar', 'installed_version');
if (version_compare($installedVersion, '0.2.1', '<')) {
$stmt = OCP\DB::prepare( 'SELECT id, calendarcolor FROM *PREFIX*calendar_calendars WHERE calendarcolor IS NOT NULL' );
$stmt = OCP\DB::prepare( 'SELECT `id`, `calendarcolor` FROM `*PREFIX*calendar_calendars` WHERE `calendarcolor` IS NOT NULL' );
$result = $stmt->execute();
while( $row = $result->fetchRow()) {
$id = $row['id'];
@ -11,7 +11,7 @@ if (version_compare($installedVersion, '0.2.1', '<')) {
continue;
}
$color = '#' .$color;
$stmt = OCP\DB::prepare( 'UPDATE *PREFIX*calendar_calendars SET calendarcolor=? WHERE id=?' );
$stmt = OCP\DB::prepare( 'UPDATE `*PREFIX*calendar_calendars` SET `calendarcolor`=? WHERE `id`=?' );
$r = $stmt->execute(array($color,$id));
}
}

View File

@ -11,4 +11,4 @@
#calendar_import_mergewarning{clear: both;}
#calendar_import_defaultcolors{clear:both;margin: 0 auto;text-align: center;}
.calendar_import_warning{border-color: #fc3333;}
.calendar-colorpicker-color{display:inline-block;width:20px;height:5px;margin: 0 auto;cursor:pointer;border:2px solid transparent;}
.calendar-colorpicker-color{display:inline-block;width:20px;height:5px;margin: 0 auto;cursor:pointer;border:2px solid transparent;margin-top: 5px;}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 423 B

After

Width:  |  Height:  |  Size: 360 B

View File

@ -173,7 +173,7 @@ Calendar_Import={
}
$(document).ready(function(){
if(typeof FileActions !== 'undefined'){
FileActions.register('text/calendar','importCalendar', '', Calendar_Import.Dialog.open);
FileActions.register('text/calendar','importCalendar', FileActions.PERMISSION_READ, '', Calendar_Import.Dialog.open);
FileActions.setDefault('text/calendar','importCalendar');
};
});

View File

@ -1,9 +1,19 @@
<?php $TRANSLATIONS = array(
"Not all calendars are completely cached" => "ليس جميع الجداول الزمنيه محفوضه مؤقة",
"Everything seems to be completely cached" => "كل شيء محفوض مؤقة",
"No calendars found." => "لم يتم العثور على جدول الزمني",
"No events found." => "لم يتم العثور على احداث",
"Wrong calendar" => "جدول زمني خاطئ",
"New Timezone:" => "التوقيت الجديد",
"Timezone changed" => "تم تغيير المنطقة الزمنية",
"Invalid request" => "طلب غير مفهوم",
"Calendar" => "الجدول الزمني",
"ddd" => "ddd",
"ddd M/d" => "ddd M/d",
"dddd M/d" => "ddd M/d",
"MMMM yyyy" => "ddd M/d",
"MMM d[ yyyy]{ '&#8212;'[ MMM] d yyyy}" => "MMM d[ yyyy]{ '&#8212;'[ MMM] d yyyy}",
"dddd, MMM d, yyyy" => "dddd, MMM d, yyyy",
"Birthday" => "عيد ميلاد",
"Business" => "عمل",
"Call" => "إتصال",
@ -19,6 +29,8 @@
"Projects" => "مشاريع",
"Questions" => "اسئلة",
"Work" => "العمل",
"by" => "من قبل",
"unnamed" => "غير مسمى",
"New Calendar" => "جدول زمني جديد",
"Does not repeat" => "لا يعاد",
"Daily" => "يومي",
@ -64,6 +76,18 @@
"by day and month" => "حسب اليوم و الشهر",
"Date" => "تاريخ",
"Cal." => "تقويم",
"Sun." => "أحد",
"Mon." => "أثن.",
"Tue." => "ثلا.",
"Wed." => "أرب.",
"Thu." => "خمي.",
"Fri." => "جمع.",
"Sat." => "سبت",
"Jan." => "ك2",
"Feb." => "شبا.",
"Mar." => "آذا.",
"Apr." => "نيس.",
"May." => "أيا.",
"All day" => "كل النهار",
"Missing fields" => "خانات خالية من المعلومات",
"Title" => "عنوان",
@ -77,10 +101,15 @@
"Month" => "شهر",
"List" => "قائمة",
"Today" => "اليوم",
"Your calendars" => "جداولك الزمنيه",
"CalDav Link" => "وصلة CalDav",
"Shared calendars" => "جداول زمنيه مشتركه",
"No shared calendars" => "لا يوجد جداول زمنيه مشتركه",
"Share Calendar" => "شارك الجدول الزمني",
"Download" => "تحميل",
"Edit" => "تعديل",
"Delete" => "حذف",
"shared with you by" => "مشاركه من قبل",
"New calendar" => "جدول زمني جديد",
"Edit calendar" => "عادل الجدول الزمني",
"Displayname" => "الاسم المرئي",
@ -91,8 +120,15 @@
"Cancel" => "إلغاء",
"Edit an event" => "عادل حدث",
"Export" => "تصدير المعلومات",
"Eventinfo" => "تفاصيل الحدث",
"Repeating" => "يعاد",
"Alarm" => "تنبيه",
"Attendees" => "الحضور",
"Share" => "شارك",
"Title of the Event" => "عنوان الحدث",
"Category" => "فئة",
"Separate categories with commas" => "افصل الفئات بالفواصل",
"Edit categories" => "عدل الفئات",
"All Day Event" => "حدث في يوم كامل",
"From" => "من",
"To" => "إلى",
@ -119,7 +155,17 @@
"Import" => "إدخال",
"Close Dialog" => "أغلق الحوار",
"Create a new event" => "إضافة حدث جديد",
"View an event" => "شاهد الحدث",
"No categories selected" => "لم يتم اختيار الفئات",
"of" => "من",
"at" => "في",
"Timezone" => "المنطقة الزمنية",
"24h" => "24 ساعة",
"12h" => "12 ساعة"
"12h" => "12 ساعة",
"Users" => "المستخدمين",
"select users" => "اختر المستخدمين",
"Editable" => "يمكن تعديله",
"Groups" => "مجموعات",
"select groups" => "اختر المجموعات",
"make public" => "حدث عام"
);

View File

@ -1,7 +1,13 @@
<?php $TRANSLATIONS = array(
"Not all calendars are completely cached" => "V paměti nejsou uloženy kompletně všechny kalendáře",
"Everything seems to be completely cached" => "Zdá se, že vše je kompletně uloženo v paměti",
"No calendars found." => "Žádné kalendáře nenalezeny.",
"No events found." => "Žádné události nenalezeny.",
"Wrong calendar" => "Nesprávný kalendář",
"The file contained either no events or all events are already saved in your calendar." => "Soubor, obsahující všechny záznamy nebo je prázdný, je již uložen ve Vašem kalendáři.",
"events has been saved in the new calendar" => "Záznam byl uložen v novém kalendáři",
"Import failed" => "Import selhal",
"events has been saved in your calendar" => "záznamů bylo uloženo ve Vašem kalendáři",
"New Timezone:" => "Nová časová zóna:",
"Timezone changed" => "Časová zóna byla změněna",
"Invalid request" => "Chybný požadavek",
@ -27,6 +33,7 @@
"Projects" => "Projekty",
"Questions" => "Dotazy",
"Work" => "Pracovní",
"by" => "od",
"unnamed" => "nepojmenováno",
"New Calendar" => "Nový kalendář",
"Does not repeat" => "Neopakuje se",
@ -73,6 +80,25 @@
"by day and month" => "podle dne a měsíce",
"Date" => "Datum",
"Cal." => "Kal.",
"Sun." => "Ne",
"Mon." => "Po",
"Tue." => "Út",
"Wed." => "St",
"Thu." => "Čt",
"Fri." => "",
"Sat." => "So",
"Jan." => "Ne",
"Feb." => "únor",
"Mar." => "březen",
"Apr." => "duben",
"May." => "květen",
"Jun." => "červen",
"Jul." => "červenec",
"Aug." => "srpen",
"Sep." => "září",
"Oct." => "říjen",
"Nov." => "listopad",
"Dec." => "prosinec",
"All day" => "Celý den",
"Missing fields" => "Chybějící pole",
"Title" => "Název",
@ -86,6 +112,7 @@
"Month" => "měsíc",
"List" => "Seznam",
"Today" => "dnes",
"Settings" => "Nastavení",
"Your calendars" => "Vaše kalendáře",
"CalDav Link" => "CalDav odkaz",
"Shared calendars" => "Sdílené kalendáře",
@ -136,7 +163,10 @@
"occurrences" => "výskyty",
"create a new calendar" => "vytvořit nový kalendář",
"Import a calendar file" => "Importovat soubor kalendáře",
"Please choose a calendar" => "Vyberte prosím kalendář",
"Name of new calendar" => "Název nového kalendáře",
"Take an available name!" => "Použijte volné jméno!",
"A Calendar with this name already exists. If you continue anyhow, these calendars will be merged." => "Kalendář s trímto názvem již existuje. Pokud název použijete, stejnojmenné kalendáře budou sloučeny.",
"Import" => "Import",
"Close Dialog" => "Zavřít dialog",
"Create a new event" => "Vytvořit novou událost",
@ -144,9 +174,21 @@
"No categories selected" => "Žádné kategorie nevybrány",
"of" => "z",
"at" => "v",
"General" => "Hlavní",
"Timezone" => "Časové pásmo",
"Update timezone automatically" => "Obnovit auronaricky časovou zónu.",
"Time format" => "Formát času",
"24h" => "24h",
"12h" => "12h",
"Start week on" => "Týden začína v",
"Cache" => "Paměť",
"Clear cache for repeating events" => "Vymazat paměť pro opakuijísí se záznamy",
"URLs" => "URLs",
"Calendar CalDAV syncing addresses" => "Kalendář CalDAV synchronizuje adresy",
"more info" => "podrobnosti",
"Primary address (Kontact et al)" => "Primární adresa (veřejná)",
"iOS/OS X" => "iOS/OS X",
"Read only iCalendar link(s)" => "Odkaz(y) kalendáře pouze pro čtení",
"Users" => "Uživatelé",
"select users" => "vybrat uživatele",
"Editable" => "Upravovatelné",

View File

@ -1,7 +1,12 @@
<?php $TRANSLATIONS = array(
"Not all calendars are completely cached" => "Ikke alle kalendere er fuldstændig cached",
"No calendars found." => "Der blev ikke fundet nogen kalendere.",
"No events found." => "Der blev ikke fundet nogen begivenheder.",
"Wrong calendar" => "Forkert kalender",
"The file contained either no events or all events are already saved in your calendar." => "Filen indeholdt enten ingen begivenheder eller alle begivenheder er allerede gemt i din kalender.",
"events has been saved in the new calendar" => "begivenheder er gemt i den nye kalender",
"Import failed" => "import mislykkedes",
"events has been saved in your calendar" => "begivenheder er gemt i din kalender",
"New Timezone:" => "Ny tidszone:",
"Timezone changed" => "Tidszone ændret",
"Invalid request" => "Ugyldig forespørgsel",
@ -106,6 +111,7 @@
"Month" => "Måned",
"List" => "Liste",
"Today" => "I dag",
"Settings" => "Indstillinger",
"Your calendars" => "Dine kalendere",
"CalDav Link" => "CalDav-link",
"Shared calendars" => "Delte kalendere",
@ -158,14 +164,19 @@
"Import a calendar file" => "Importer en kalenderfil",
"Please choose a calendar" => "Vælg en kalender",
"Name of new calendar" => "Navn på ny kalender",
"A Calendar with this name already exists. If you continue anyhow, these calendars will be merged." => "En kalender med dette navn findes allerede. Hvis du fortsætter alligevel, vil disse kalendere blive sammenlagt.",
"Import" => "Importer",
"Importing calendar" => "Importerer kalender",
"Calendar imported successfully" => "Kalender importeret korrekt",
"Close Dialog" => "Luk dialog",
"Create a new event" => "Opret en ny begivenhed",
"View an event" => "Vis en begivenhed",
"No categories selected" => "Ingen categorier valgt",
"of" => "fra",
"at" => "kl.",
"General" => "Generel",
"Timezone" => "Tidszone",
"Update timezone automatically" => "Opdater tidszone automatisk",
"24h" => "24T",
"12h" => "12T",
"more info" => "flere oplysninger",

View File

@ -1,10 +1,10 @@
<?php $TRANSLATIONS = array(
"Not all calendars are completely cached" => "Noch sind nicht alle Kalender zwischengespeichert.",
"Everything seems to be completely cached" => "Es sieht so aus, als wäre alles vollständig zwischengespeichert.",
"No calendars found." => "Keine Kalender gefunden",
"No events found." => "Keine Termine gefunden",
"No calendars found." => "Keine Kalender gefunden.",
"No events found." => "Keine Termine gefunden.",
"Wrong calendar" => "Falscher Kalender",
"The file contained either no events or all events are already saved in your calendar." => "Entweder enthielt die Datei keine Termine oder alle Termine waren schon im Kalender gespeichert.",
"The file contained either no events or all events are already saved in your calendar." => "Entweder enthielt die Datei keine Termine oder alle Termine waren bereits im Kalender gespeichert.",
"events has been saved in the new calendar" => "Der Termin wurde im neuen Kalender gespeichert.",
"Import failed" => "Import fehlgeschlagen",
"events has been saved in your calendar" => "Der Termin wurde im Kalender gespeichert.",
@ -115,7 +115,7 @@
"Settings" => "Einstellungen",
"Your calendars" => "Deine Kalender",
"CalDav Link" => "CalDAV-Link",
"Shared calendars" => "geteilte Kalender",
"Shared calendars" => "Geteilte Kalender",
"No shared calendars" => "Keine geteilten Kalender",
"Share Calendar" => "Kalender teilen",
"Download" => "Herunterladen",
@ -162,24 +162,27 @@
"End" => "Ende",
"occurrences" => "Termine",
"create a new calendar" => "Neuen Kalender anlegen",
"Import a calendar file" => "Kalenderdatei Importieren",
"Import a calendar file" => "Kalenderdatei importieren",
"Please choose a calendar" => "Wählen Sie bitte einen Kalender.",
"Name of new calendar" => "Kalendername",
"Take an available name!" => "Wählen Sie einen verfügbaren Namen.",
"A Calendar with this name already exists. If you continue anyhow, these calendars will be merged." => "Ein Kalender mit diesem Namen existiert schon. Sollten Sie fortfahren, werden die beiden Kalender zusammengeführt.",
"A Calendar with this name already exists. If you continue anyhow, these calendars will be merged." => "Ein Kalender mit diesem Namen existiert bereits. Sollten Sie fortfahren, werden die beiden Kalender zusammengeführt.",
"Import" => "Importieren",
"Importing calendar" => "Kalender wird importiert.",
"Calendar imported successfully" => "Kalender erfolgreich importiert",
"Close Dialog" => "Dialog schließen",
"Create a new event" => "Neues Ereignis",
"View an event" => "Termin öffnen",
"No categories selected" => "Keine Kategorie ausgewählt",
"Select category" => "Kategorie auswählen",
"of" => "von",
"at" => "um",
"General" => "Allgemein",
"Timezone" => "Zeitzone",
"Update timezone automatically" => "Zeitzone automatisch aktualisieren",
"Time format" => "Zeitformat",
"24h" => "24h",
"12h" => "12h",
"24h" => "24 Stunden",
"12h" => "12 Stunden",
"Start week on" => "Erster Wochentag",
"Cache" => "Zwischenspeicher",
"Clear cache for repeating events" => "Lösche den Zwischenspeicher für wiederholende Veranstaltungen",

View File

@ -8,7 +8,7 @@
"events has been saved in the new calendar" => "okazaĵoj estas konservitaj en la nova kalendaro",
"Import failed" => "Enporto malsukcesis",
"events has been saved in your calendar" => "okazaĵoj estas konservitaj en via kalendaro",
"New Timezone:" => "Nova horzono:",
"New Timezone:" => "Nova horozono:",
"Timezone changed" => "La horozono estas ŝanĝita",
"Invalid request" => "Nevalida peto",
"Calendar" => "Kalendaro",
@ -112,6 +112,7 @@
"Month" => "Monato",
"List" => "Listo",
"Today" => "Hodiaŭ",
"Settings" => "Agordo",
"Your calendars" => "Viaj kalendaroj",
"CalDav Link" => "CalDav-a ligilo",
"Shared calendars" => "Kunhavigitaj kalendaroj",
@ -173,11 +174,16 @@
"No categories selected" => "Neniu kategorio elektita",
"of" => "de",
"at" => "ĉe",
"General" => "Ĝenerala",
"Timezone" => "Horozono",
"Update timezone automatically" => "Aŭtomate ĝisdatigi la horozonon",
"Time format" => "Horoformo",
"24h" => "24h",
"12h" => "12h",
"Start week on" => "Komenci semajnon je",
"Cache" => "Kaŝmemoro",
"Clear cache for repeating events" => "Forviŝi kaŝmemoron por ripeto de okazaĵoj",
"URLs" => "URL-oj",
"Calendar CalDAV syncing addresses" => "sinkronigaj adresoj por CalDAV-kalendaroj",
"more info" => "pli da informo",
"Primary address (Kontact et al)" => "Ĉefa adreso (Kontact kaj aliaj)",

View File

@ -87,6 +87,7 @@
"Month" => "Kuukausi",
"List" => "Lista",
"Today" => "Tänään",
"Settings" => "Asetukset",
"Your calendars" => "Omat kalenterisi",
"CalDav Link" => "CalDav-linkki",
"Shared calendars" => "Jaetut kalenterit",
@ -139,10 +140,15 @@
"Create a new event" => "Luo uusi tapahtuma",
"View an event" => "Avaa tapahtuma",
"No categories selected" => "Luokkia ei ole valittu",
"General" => "Yleiset",
"Timezone" => "Aikavyöhyke",
"Update timezone automatically" => "Päivitä aikavyöhykkeet automaattisesti",
"Time format" => "Ajan näyttömuoto",
"24h" => "24 tuntia",
"12h" => "12 tuntia",
"Start week on" => "Viikon alkamispäivä",
"Calendar CalDAV syncing addresses" => "Kalenterin CalDAV-synkronointiosoitteet",
"Primary address (Kontact et al)" => "Ensisijainen osoite (Kontact ja muut vastaavat)",
"iOS/OS X" => "iOS/OS X",
"Users" => "Käyttäjät",
"select users" => "valitse käyttäjät",

View File

@ -86,6 +86,9 @@
"Month" => "Mes",
"List" => "Lista",
"Today" => "Hoxe",
"Calendars" => "Calendarios",
"There was a fail, while parsing the file." => "Produciuse un erro ao procesar o ficheiro",
"Choose active calendars" => "Escolla os calendarios activos",
"Your calendars" => "Os seus calendarios",
"CalDav Link" => "Ligazón CalDav",
"Shared calendars" => "Calendarios compartidos",
@ -136,8 +139,12 @@
"occurrences" => "acontecementos",
"create a new calendar" => "crear un novo calendario",
"Import a calendar file" => "Importar un ficheiro de calendario",
"Please choose the calendar" => "Por favor, seleccione o calendario",
"create a new calendar" => "crear un novo calendario",
"Name of new calendar" => "Nome do novo calendario",
"Import" => "Importar",
"Importing calendar" => "Importar calendario",
"Calendar imported successfully" => "Calendario importado correctamente",
"Close Dialog" => "Pechar diálogo",
"Create a new event" => "Crear un novo evento",
"View an event" => "Ver un evento",
@ -145,6 +152,8 @@
"of" => "de",
"at" => "a",
"Timezone" => "Fuso horario",
"Check always for changes of the timezone" => "Comprobar sempre cambios de fuso horario",
"Timeformat" => "Formato de hora",
"24h" => "24h",
"12h" => "12h",
"Users" => "Usuarios",

View File

@ -136,6 +136,7 @@
"of" => "od",
"at" => "na",
"Timezone" => "Vremenska zona",
"Timeformat" => "Format vremena",
"24h" => "24h",
"12h" => "12h",
"Users" => "Korisnici",

View File

@ -33,6 +33,7 @@
"Projects" => "プロジェクト",
"Questions" => "質問事項",
"Work" => "週の始まり",
"by" => "による",
"unnamed" => "無名",
"New Calendar" => "新しくカレンダーを作成",
"Does not repeat" => "繰り返さない",
@ -99,6 +100,7 @@
"Nov." => "11月",
"Dec." => "12月",
"All day" => "終日",
"New Calendar" => "新しくカレンダーを作成する",
"Missing fields" => "項目がありません",
"Title" => "タイトル",
"From Date" => "開始日",
@ -109,8 +111,9 @@
"There was a database fail" => "データベースのエラーがありました",
"Week" => "",
"Month" => "",
"List" => "リスト",
"List" => "予定リスト",
"Today" => "今日",
"Settings" => "設定",
"Your calendars" => "あなたのカレンダー",
"CalDav Link" => "CalDavへのリンク",
"Shared calendars" => "共有カレンダー",
@ -172,11 +175,16 @@
"No categories selected" => "カテゴリが選択されていません",
"of" => "of",
"at" => "at",
"General" => "一般",
"Timezone" => "タイムゾーン",
"Update timezone automatically" => "自動的にタイムゾーンを更新",
"Time format" => "時刻の表示形式",
"24h" => "24h",
"12h" => "12h",
"Start week on" => "1週間の初めの曜日",
"Cache" => "キャッシュ",
"Clear cache for repeating events" => "イベントを繰り返すためにキャッシュをクリアしてください",
"Clear cache for repeating events" => "繰り返しイベントのキャッシュをクリア",
"URLs" => "URL",
"Calendar CalDAV syncing addresses" => "CalDAVカレンダーの同期用アドレス",
"more info" => "さらに",
"Primary address (Kontact et al)" => "プライマリアドレス(コンタクト等)",

View File

@ -111,13 +111,19 @@
"Interval" => "Intervall",
"End" => "Enn",
"occurrences" => "Virkommes",
"create a new calendar" => "E neie Kalenner uleeën",
"Import a calendar file" => "E Kalenner Fichier importéieren",
"Please choose the calendar" => "Wiel den Kalenner aus",
"create a new calendar" => "E neie Kalenner uleeën",
"Name of new calendar" => "Numm vum neie Kalenner",
"Import" => "Import",
"Importing calendar" => "Importéiert Kalenner",
"Calendar imported successfully" => "Kalenner erfollegräich importéiert",
"Close Dialog" => "Dialog zoumaachen",
"Create a new event" => "En Evenement maachen",
"Select category" => "Kategorie auswielen",
"Timezone" => "Zäitzon",
"Timeformat" => "Zäit Format",
"24h" => "24h",
"12h" => "12h"
"12h" => "12h",
"Calendar CalDAV syncing address:" => "CalDAV Kalenner Synchronisatioun's Adress:"
);

View File

@ -113,13 +113,19 @@
"End" => "Pabaiga",
"create a new calendar" => "sukurti naują kalendorių",
"Import a calendar file" => "Importuoti kalendoriaus failą",
"Please choose the calendar" => "Pasirinkite kalendorių",
"create a new calendar" => "sukurti naują kalendorių",
"Name of new calendar" => "Naujo kalendoriaus pavadinimas",
"Import" => "Importuoti",
"Importing calendar" => "Importuojamas kalendorius",
"Calendar imported successfully" => "Kalendorius sėkmingai importuotas",
"Close Dialog" => "Uždaryti",
"Create a new event" => "Sukurti naują įvykį",
"View an event" => "Peržiūrėti įvykį",
"No categories selected" => "Nepasirinktos jokios katagorijos",
"Timezone" => "Laiko juosta",
"Check always for changes of the timezone" => "Visada tikrinti laiko zonos pasikeitimus",
"Timeformat" => "Laiko formatas",
"24h" => "24val",
"12h" => "12val",
"Users" => "Vartotojai",

View File

@ -67,6 +67,7 @@
"Date" => "Dato",
"Cal." => "Kal.",
"All day" => "Hele dagen ",
"New Calendar" => "Ny kalender",
"Missing fields" => "Manglende felt",
"Title" => "Tittel",
"From Date" => "Fra dato",
@ -79,6 +80,9 @@
"Month" => "ned",
"List" => "Liste",
"Today" => "I dag",
"Calendars" => "Kalendre",
"There was a fail, while parsing the file." => "Det oppstod en feil under åpningen av filen.",
"Choose active calendars" => "Velg en aktiv kalender",
"Your calendars" => "Dine kalendere",
"CalDav Link" => "CalDav-lenke",
"Shared calendars" => "Delte kalendere",
@ -129,15 +133,24 @@
"occurrences" => "forekomster",
"create a new calendar" => "Lag en ny kalender",
"Import a calendar file" => "Importer en kalenderfil",
"Please choose the calendar" => "Vennligst velg kalenderen",
"create a new calendar" => "Lag en ny kalender",
"Name of new calendar" => "Navn på ny kalender:",
"Import" => "Importer",
"Importing calendar" => "Importerer kalender",
"Calendar imported successfully" => "Kalenderen ble importert uten feil",
"Close Dialog" => "Lukk dialog",
"Create a new event" => "Opprett en ny hendelse",
"View an event" => "Se på hendelse",
"No categories selected" => "Ingen kategorier valgt",
"Select category" => "Velg kategori",
"Timezone" => "Tidssone",
"Check always for changes of the timezone" => "Se alltid etter endringer i tidssone",
"Timeformat" => "Tidsformat:",
"24h" => "24 t",
"12h" => "12 t",
"First day of the week" => "Ukens første dag",
"Calendar CalDAV syncing address:" => "Kalender CalDAV synkroniseringsadresse",
"Users" => "Brukere",
"select users" => "valgte brukere",
"Editable" => "Redigerbar",

View File

@ -1,7 +1,13 @@
<?php $TRANSLATIONS = array(
"Not all calendars are completely cached" => "Niet alle agenda's zijn volledig gecached",
"Everything seems to be completely cached" => "Alles lijkt volledig gecached te zijn",
"No calendars found." => "Geen kalenders gevonden.",
"No events found." => "Geen gebeurtenissen gevonden.",
"Wrong calendar" => "Verkeerde kalender",
"The file contained either no events or all events are already saved in your calendar." => "Het bestand bevat geen gebeurtenissen of alle gebeurtenissen worden al in uw agenda bewaard.",
"events has been saved in the new calendar" => "De gebeurtenissen worden in de nieuwe agenda bewaard",
"Import failed" => "import is gefaald",
"events has been saved in your calendar" => "de gebeurtenissen zijn in uw agenda opgeslagen ",
"New Timezone:" => "Nieuwe tijdszone:",
"Timezone changed" => "Tijdzone is veranderd",
"Invalid request" => "Ongeldige aanvraag",
@ -27,6 +33,7 @@
"Projects" => "Projecten",
"Questions" => "Vragen",
"Work" => "Werk",
"by" => "door",
"unnamed" => "onbekend",
"New Calendar" => "Nieuwe Kalender",
"Does not repeat" => "Wordt niet herhaald",
@ -73,6 +80,25 @@
"by day and month" => "per dag en maand",
"Date" => "Datum",
"Cal." => "Cal.",
"Sun." => "Zon.",
"Mon." => "Maa.",
"Tue." => "Din.",
"Wed." => "Woe.",
"Thu." => "Don.",
"Fri." => "Vrij.",
"Sat." => "Zat.",
"Jan." => "Jan.",
"Feb." => "Feb.",
"Mar." => "Maa.",
"Apr." => "Apr.",
"May." => "Mei.",
"Jun." => "Jun.",
"Jul." => "Jul.",
"Aug." => "Aug.",
"Sep." => "Sep.",
"Oct." => "Okt.",
"Nov." => "Nov.",
"Dec." => "Dec.",
"All day" => "Hele dag",
"Missing fields" => "missende velden",
"Title" => "Titel",
@ -86,6 +112,7 @@
"Month" => "Maand",
"List" => "Lijst",
"Today" => "Vandaag",
"Settings" => "Instellingen",
"Your calendars" => "Je kalenders",
"CalDav Link" => "CalDav Link",
"Shared calendars" => "Gedeelde kalenders",
@ -136,7 +163,10 @@
"occurrences" => "gebeurtenissen",
"create a new calendar" => "Maak een nieuw agenda",
"Import a calendar file" => "Importeer een agenda bestand",
"Please choose a calendar" => "Kies een agenda",
"Name of new calendar" => "Naam van de nieuwe agenda",
"Take an available name!" => "Kies een beschikbare naam!",
"A Calendar with this name already exists. If you continue anyhow, these calendars will be merged." => "Een agenda met deze naam bestaat al. Als u doorgaat, worden deze agenda's samengevoegd",
"Import" => "Importeer",
"Close Dialog" => "Sluit venster",
"Create a new event" => "Maak een nieuwe afspraak",
@ -144,9 +174,21 @@
"No categories selected" => "Geen categorieën geselecteerd",
"of" => "van",
"at" => "op",
"General" => "Algemeen",
"Timezone" => "Tijdzone",
"Update timezone automatically" => "Werk de tijdzone automatisch bij",
"Time format" => "Tijd formaat",
"24h" => "24uur",
"12h" => "12uur",
"Start week on" => "Begin de week op",
"Cache" => "Cache",
"Clear cache for repeating events" => "Leeg cache voor repeterende gebeurtenissen",
"URLs" => "URLs",
"Calendar CalDAV syncing addresses" => "Agenda CalDAV synchronisatie adres",
"more info" => "meer informatie",
"Primary address (Kontact et al)" => "Primary adres (voor Kontact en dergelijke)",
"iOS/OS X" => "iOS/OS X",
"Read only iCalendar link(s)" => "Alleen lezen iCalendar link(en)",
"Users" => "Gebruikers",
"select users" => "kies gebruikers",
"Editable" => "Te wijzigen",

View File

@ -161,6 +161,8 @@
"Please choose a calendar" => "Proszę wybierz kalendarz",
"Name of new calendar" => "Nazwa kalendarza",
"Import" => "Import",
"Importing calendar" => "Importuje kalendarz",
"Calendar imported successfully" => "Zaimportowano kalendarz",
"Close Dialog" => "Zamknij okno",
"Create a new event" => "Tworzenie nowego wydarzenia",
"View an event" => "Zobacz wydarzenie",
@ -168,6 +170,8 @@
"of" => "z",
"at" => "w",
"Timezone" => "Strefa czasowa",
"Check always for changes of the timezone" => "Zawsze sprawdzaj zmiany strefy czasowej",
"Timeformat" => "Format czasu",
"24h" => "24h",
"12h" => "12h",
"more info" => "więcej informacji",

View File

@ -1,7 +1,13 @@
<?php $TRANSLATIONS = array(
"Not all calendars are completely cached" => "Nem todos os calendários estão completamente pré-carregados",
"Everything seems to be completely cached" => "Parece que tudo está completamente pré-carregado",
"No calendars found." => "Nenhum calendário encontrado.",
"No events found." => "Nenhum evento encontrado.",
"Wrong calendar" => "Calendário errado",
"The file contained either no events or all events are already saved in your calendar." => "O ficheiro não continha nenhuns eventos ou então todos os eventos já estavam carregados no seu calendário",
"events has been saved in the new calendar" => "Os eventos foram guardados no novo calendário",
"Import failed" => "Falha na importação",
"events has been saved in your calendar" => "Os eventos foram guardados no seu calendário",
"New Timezone:" => "Nova zona horária",
"Timezone changed" => "Zona horária alterada",
"Invalid request" => "Pedido inválido",
@ -27,6 +33,7 @@
"Projects" => "Projetos",
"Questions" => "Perguntas",
"Work" => "Trabalho",
"by" => "por",
"unnamed" => "não definido",
"New Calendar" => "Novo calendário",
"Does not repeat" => "Não repete",
@ -73,6 +80,25 @@
"by day and month" => "por dia e mês",
"Date" => "Data",
"Cal." => "Cal.",
"Sun." => "Dom.",
"Mon." => "Seg.",
"Tue." => "ter.",
"Wed." => "Qua.",
"Thu." => "Qui.",
"Fri." => "Sex.",
"Sat." => "Sáb.",
"Jan." => "Jan.",
"Feb." => "Fev,",
"Mar." => "Mar.",
"Apr." => "Abr.",
"May." => "Mai.",
"Jun." => "Jun.",
"Jul." => "Jul.",
"Aug." => "Ago.",
"Sep." => "Set.",
"Oct." => "Out.",
"Nov." => "Nov.",
"Dec." => "Dez.",
"All day" => "Todo o dia",
"Missing fields" => "Falta campos",
"Title" => "Título",
@ -86,6 +112,7 @@
"Month" => "Mês",
"List" => "Lista",
"Today" => "Hoje",
"Settings" => "Configurações",
"Your calendars" => "Os seus calendários",
"CalDav Link" => "Endereço CalDav",
"Shared calendars" => "Calendários partilhados",
@ -136,17 +163,34 @@
"occurrences" => "ocorrências",
"create a new calendar" => "criar novo calendário",
"Import a calendar file" => "Importar um ficheiro de calendário",
"Please choose a calendar" => "Escolha um calendário por favor",
"Name of new calendar" => "Nome do novo calendário",
"Take an available name!" => "Escolha um nome disponível!",
"A Calendar with this name already exists. If you continue anyhow, these calendars will be merged." => "Já existe um Calendário com esse nome. Se mesmo assim continuar, esses calendários serão fundidos.",
"Import" => "Importar",
"Importing calendar" => "A importar calendário",
"Calendar imported successfully" => "Calendário importado com sucesso",
"Close Dialog" => "Fechar diálogo",
"Create a new event" => "Criar novo evento",
"View an event" => "Ver um evento",
"No categories selected" => "Nenhuma categoria seleccionada",
"of" => "de",
"at" => "em",
"General" => "Geral",
"Timezone" => "Zona horária",
"Update timezone automatically" => "Actualizar automaticamente o fuso horário",
"Time format" => "Formato da hora",
"24h" => "24h",
"12h" => "12h",
"Start week on" => "Começar semana em",
"Cache" => "Memória de pré-carregamento",
"Clear cache for repeating events" => "Limpar a memória de pré carregamento para eventos recorrentes",
"URLs" => "Endereço(s) web",
"Calendar CalDAV syncing addresses" => "Endereços de sincronização de calendários CalDAV",
"more info" => "mais informação",
"Primary address (Kontact et al)" => "Endereço principal (contactos et al.)",
"iOS/OS X" => "iOS/OS X",
"Read only iCalendar link(s)" => "Ligaç(ão/ões) só de leitura do iCalendar",
"Users" => "Utilizadores",
"select users" => "Selecione utilizadores",
"Editable" => "Editavel",

View File

@ -131,8 +131,12 @@
"occurrences" => "repetiții",
"create a new calendar" => "crează un calendar nou",
"Import a calendar file" => "Importă un calendar",
"Please choose the calendar" => "Alegeți calendarul",
"create a new calendar" => "crează un calendar nou",
"Name of new calendar" => "Numele noului calendar",
"Import" => "Importă",
"Importing calendar" => "Importă calendar",
"Calendar imported successfully" => "Calendarul a fost importat cu succes",
"Close Dialog" => "Închide",
"Create a new event" => "Crează un eveniment nou",
"View an event" => "Vizualizează un eveniment",
@ -140,6 +144,8 @@
"of" => "din",
"at" => "la",
"Timezone" => "Fus orar",
"Check always for changes of the timezone" => "Verifică mereu pentru schimbări ale fusului orar",
"Timeformat" => "Forma de afișare a orei",
"24h" => "24h",
"12h" => "12h",
"Users" => "Utilizatori",

View File

@ -22,7 +22,7 @@
"Business" => "Бизнес",
"Call" => "Звонить",
"Clients" => "Клиенты",
"Deliverer" => "Доставщик",
"Deliverer" => "Посыльный",
"Holidays" => "Праздники",
"Ideas" => "Идеи",
"Journey" => "Поездка",
@ -33,6 +33,7 @@
"Projects" => "Проекты",
"Questions" => "Вопросы",
"Work" => "Работа",
"by" => "до свидания",
"unnamed" => "без имени",
"New Calendar" => "Новый Календарь",
"Does not repeat" => "Не повторяется",
@ -111,15 +112,16 @@
"Month" => "Месяц",
"List" => "Список",
"Today" => "Сегодня",
"Settings" => "Параметры",
"Your calendars" => "Ваши календари",
"CalDav Link" => "Ссылка для CalDav",
"Shared calendars" => "Общие календари",
"No shared calendars" => "Нет общих календарей",
"Share Calendar" => "Сделать календарь общим",
"Shared calendars" => "Опубликованные",
"No shared calendars" => "Нет опубликованных календарей",
"Share Calendar" => "Опубликовать",
"Download" => "Скачать",
"Edit" => "Редактировать",
"Delete" => "Удалить",
"shared with you by" => "с вами поделился",
"shared with you by" => "опубликовал для вас",
"New calendar" => "Новый календарь",
"Edit calendar" => "Редактировать календарь",
"Displayname" => "Отображаемое имя",
@ -134,7 +136,7 @@
"Repeating" => "Повторение",
"Alarm" => "Сигнал",
"Attendees" => "Участники",
"Share" => "Поделиться",
"Share" => "Опубликовать",
"Title of the Event" => "Название событие",
"Category" => "Категория",
"Separate categories with commas" => "Разделяйте категории запятыми",
@ -163,17 +165,32 @@
"Import a calendar file" => "Импортировать календарь из файла",
"Please choose a calendar" => "Пожалуйста, выберите календарь",
"Name of new calendar" => "Название нового календаря",
"Take an available name!" => "Возьмите разрешенное имя!",
"A Calendar with this name already exists. If you continue anyhow, these calendars will be merged." => "Календарь с таким именем уже существует. Если вы продолжите, одноименный календарь будет удален.",
"Import" => "Импортировать",
"Importing calendar" => "Импортируется календарь",
"Calendar imported successfully" => "Календарь успешно импортирован",
"Close Dialog" => "Закрыть Сообщение",
"Create a new event" => "Создать новое событие",
"View an event" => "Показать событие",
"No categories selected" => "Категории не выбраны",
"of" => "из",
"at" => "на",
"General" => "Основные",
"Timezone" => "Часовой пояс",
"Update timezone automatically" => "Автоматическое обновление временной зоны",
"Time format" => "Формат времени",
"24h" => "24ч",
"12h" => "12ч",
"Start week on" => "Начало недели",
"Cache" => "Кэш",
"Clear cache for repeating events" => "Очистить кэш повторяющихся событий",
"URLs" => "URLs",
"Calendar CalDAV syncing addresses" => "Адрес синхронизации CalDAV",
"more info" => "подробнее",
"Primary address (Kontact et al)" => "Основной адрес (Контакта)",
"iOS/OS X" => "iOS/OS X",
"Read only iCalendar link(s)" => "Читать только ссылки iCalendar",
"Users" => "Пользователи",
"select users" => "выбрать пользователей",
"Editable" => "Редактируемо",

View File

@ -1,7 +1,13 @@
<?php $TRANSLATIONS = array(
"Not all calendars are completely cached" => "Vsi koledarji niso povsem predpomnjeni",
"Everything seems to be completely cached" => "Izgleda, da je vse v predpomnilniku",
"No calendars found." => "Ni bilo najdenih koledarjev.",
"No events found." => "Ni bilo najdenih dogodkov.",
"Wrong calendar" => "Napačen koledar",
"The file contained either no events or all events are already saved in your calendar." => "Datoteka ni vsebovala dogodkov ali pa so vsi dogodki že shranjeni v koledarju.",
"events has been saved in the new calendar" => "dogodki so bili shranjeni v nov koledar",
"Import failed" => "Uvoz je spodletel",
"events has been saved in your calendar" => "dogodki so bili shranjeni v vaš koledar",
"New Timezone:" => "Nov časovni pas:",
"Timezone changed" => "Časovni pas je bil spremenjen",
"Invalid request" => "Neveljaven zahtevek",
@ -27,6 +33,7 @@
"Projects" => "Projekt",
"Questions" => "Vprašanja",
"Work" => "Delo",
"by" => "od",
"unnamed" => "neimenovan",
"New Calendar" => "Nov koledar",
"Does not repeat" => "Se ne ponavlja",
@ -73,6 +80,25 @@
"by day and month" => "po dnevu in mesecu",
"Date" => "Datum",
"Cal." => "Kol.",
"Sun." => "ned.",
"Mon." => "pon.",
"Tue." => "tor.",
"Wed." => "sre.",
"Thu." => "čet.",
"Fri." => "pet.",
"Sat." => "sob.",
"Jan." => "jan.",
"Feb." => "feb.",
"Mar." => "mar.",
"Apr." => "apr.",
"May." => "maj",
"Jun." => "jun.",
"Jul." => "jul.",
"Aug." => "avg.",
"Sep." => "sep.",
"Oct." => "okt.",
"Nov." => "nov.",
"Dec." => "dec.",
"All day" => "Cel dan",
"Missing fields" => "Mankajoča polja",
"Title" => "Naslov",
@ -86,6 +112,7 @@
"Month" => "Mesec",
"List" => "Seznam",
"Today" => "Danes",
"Settings" => "Nastavitve",
"Your calendars" => "Vaši koledarji",
"CalDav Link" => "CalDav povezava",
"Shared calendars" => "Koledarji v souporabi",
@ -136,7 +163,10 @@
"occurrences" => "ponovitev",
"create a new calendar" => "Ustvari nov koledar",
"Import a calendar file" => "Uvozi datoteko koledarja",
"Please choose a calendar" => "Prosimo, če izberete koledar",
"Name of new calendar" => "Ime novega koledarja",
"Take an available name!" => "Izberite prosto ime!",
"A Calendar with this name already exists. If you continue anyhow, these calendars will be merged." => "Koledar s tem imenom že obstaja. Če nadaljujete, bosta koledarja združena.",
"Import" => "Uvozi",
"Close Dialog" => "Zapri dialog",
"Create a new event" => "Ustvari nov dogodek",
@ -144,9 +174,21 @@
"No categories selected" => "Nobena kategorija ni izbrana",
"of" => "od",
"at" => "pri",
"General" => "Splošno",
"Timezone" => "Časovni pas",
"Update timezone automatically" => "Samodejno posodobi časovni pas",
"Time format" => "Oblika zapisa časa",
"24h" => "24ur",
"12h" => "12ur",
"Start week on" => "Začni teden z",
"Cache" => "Predpomnilnik",
"Clear cache for repeating events" => "Počisti predpomnilnik za ponavljajoče dogodke",
"URLs" => "URLji",
"Calendar CalDAV syncing addresses" => "CalDAV naslov za usklajevanje koledarjev",
"more info" => "dodatne informacije",
"Primary address (Kontact et al)" => "Glavni naslov (Kontakt et al)",
"iOS/OS X" => "iOS/OS X",
"Read only iCalendar link(s)" => "iCalendar povezava/e samo za branje",
"Users" => "Uporabniki",
"select users" => "izberite uporabnike",
"Editable" => "Možno urejanje",

View File

@ -167,6 +167,8 @@
"Take an available name!" => "Ta ett ledigt namn!",
"A Calendar with this name already exists. If you continue anyhow, these calendars will be merged." => "En kalender med detta namn finns redan. Om du fortsätter ändå så kommer dessa kalendrar att slås samman.",
"Import" => "Importera",
"Importing calendar" => "Importerar kalender",
"Calendar imported successfully" => "Kalender importerades utan problem",
"Close Dialog" => "Stäng ",
"Create a new event" => "Skapa en ny händelse",
"View an event" => "Visa en händelse",
@ -174,6 +176,8 @@
"of" => "av",
"at" => "",
"Timezone" => "Tidszon",
"Check always for changes of the timezone" => "Kontrollera alltid ändringar i tidszon.",
"Timeformat" => "Tidsformat",
"24h" => "24h",
"12h" => "12h",
"Cache" => "Cache",

View File

@ -82,6 +82,9 @@
"Month" => "",
"List" => "列表",
"Today" => "今天",
"Calendars" => "日历",
"There was a fail, while parsing the file." => "解析文件失败",
"Choose active calendars" => "选择活动日历",
"Your calendars" => "您的日历",
"CalDav Link" => "CalDav 链接",
"Shared calendars" => "共享的日历",
@ -132,8 +135,12 @@
"occurrences" => "",
"create a new calendar" => "创建新日历",
"Import a calendar file" => "导入日历文件",
"Please choose the calendar" => "请选择日历",
"create a new calendar" => "创建新日历",
"Name of new calendar" => "新日历名称",
"Import" => "导入",
"Importing calendar" => "导入日历",
"Calendar imported successfully" => "导入日历成功",
"Close Dialog" => "关闭对话框",
"Create a new event" => "创建新事件",
"View an event" => "查看事件",
@ -141,8 +148,12 @@
"of" => "",
"at" => "",
"Timezone" => "时区",
"Check always for changes of the timezone" => "选中则总是按照时区变化",
"Timeformat" => "时间格式",
"24h" => "24小时",
"12h" => "12小时",
"First day of the week" => "每周的第一天",
"Calendar CalDAV syncing address:" => "日历CalDAV 同步地址:",
"Users" => "用户",
"select users" => "选中用户",
"Editable" => "可编辑",

View File

@ -131,8 +131,12 @@
"occurrences" => "事件",
"create a new calendar" => "建立新日曆",
"Import a calendar file" => "匯入日曆檔案",
"Please choose the calendar" => "請選擇日曆",
"create a new calendar" => "建立新日曆",
"Name of new calendar" => "新日曆名稱",
"Import" => "匯入",
"Importing calendar" => "匯入日曆",
"Calendar imported successfully" => "已成功匯入日曆",
"Close Dialog" => "關閉對話",
"Create a new event" => "建立一個新事件",
"View an event" => "觀看一個活動",
@ -140,8 +144,11 @@
"of" => "",
"at" => "",
"Timezone" => "時區",
"Check always for changes of the timezone" => "總是檢查是否變更了時區",
"Timeformat" => "日期格式",
"24h" => "24小時制",
"12h" => "12小時制",
"Calendar CalDAV syncing address:" => "CalDAV 的日曆同步地址:",
"Users" => "使用者",
"select users" => "選擇使用者",
"Editable" => "可編輯",

View File

@ -38,11 +38,11 @@ class OC_Calendar_Calendar{
public static function allCalendars($uid, $active=false){
$values = array($uid);
$active_where = '';
if ($active){
$active_where = ' AND active = ?';
if (!is_null($active) && $active){
$active_where = ' AND `active` = ?';
$values[] = $active;
}
$stmt = OCP\DB::prepare( 'SELECT * FROM *PREFIX*calendar_calendars WHERE userid = ?' . $active_where );
$stmt = OCP\DB::prepare( 'SELECT * FROM `*PREFIX*calendar_calendars` WHERE `userid` = ?' . $active_where );
$result = $stmt->execute($values);
$calendars = array();
@ -69,7 +69,7 @@ class OC_Calendar_Calendar{
* @return associative array
*/
public static function find($id){
$stmt = OCP\DB::prepare( 'SELECT * FROM *PREFIX*calendar_calendars WHERE id = ?' );
$stmt = OCP\DB::prepare( 'SELECT * FROM `*PREFIX*calendar_calendars` WHERE `id` = ?' );
$result = $stmt->execute(array($id));
return $result->fetchRow();
@ -94,7 +94,7 @@ class OC_Calendar_Calendar{
$uri = self::createURI($name, $uris );
$stmt = OCP\DB::prepare( 'INSERT INTO *PREFIX*calendar_calendars (userid,displayname,uri,ctag,calendarorder,calendarcolor,timezone,components) VALUES(?,?,?,?,?,?,?,?)' );
$stmt = OCP\DB::prepare( 'INSERT INTO `*PREFIX*calendar_calendars` (`userid`,`displayname`,`uri`,`ctag`,`calendarorder`,`calendarcolor`,`timezone`,`components`) VALUES(?,?,?,?,?,?,?,?)' );
$result = $stmt->execute(array($userid,$name,$uri,1,$order,$color,$timezone,$components));
$insertid = OCP\DB::insertid('*PREFIX*calendar_calendars');
@ -117,7 +117,7 @@ class OC_Calendar_Calendar{
public static function addCalendarFromDAVData($principaluri,$uri,$name,$components,$timezone,$order,$color){
$userid = self::extractUserID($principaluri);
$stmt = OCP\DB::prepare( 'INSERT INTO *PREFIX*calendar_calendars (userid,displayname,uri,ctag,calendarorder,calendarcolor,timezone,components) VALUES(?,?,?,?,?,?,?,?)' );
$stmt = OCP\DB::prepare( 'INSERT INTO `*PREFIX*calendar_calendars` (`userid`,`displayname`,`uri`,`ctag`,`calendarorder`,`calendarcolor`,`timezone`,`components`) VALUES(?,?,?,?,?,?,?,?)' );
$result = $stmt->execute(array($userid,$name,$uri,1,$order,$color,$timezone,$components));
$insertid = OCP\DB::insertid('*PREFIX*calendar_calendars');
@ -149,7 +149,7 @@ class OC_Calendar_Calendar{
if(is_null($order)) $order = $calendar['calendarorder'];
if(is_null($color)) $color = $calendar['calendarcolor'];
$stmt = OCP\DB::prepare( 'UPDATE *PREFIX*calendar_calendars SET displayname=?,calendarorder=?,calendarcolor=?,timezone=?,components=?,ctag=ctag+1 WHERE id=?' );
$stmt = OCP\DB::prepare( 'UPDATE `*PREFIX*calendar_calendars` SET `displayname`=?,`calendarorder`=?,`calendarcolor`=?,`timezone`=?,`components`=?,`ctag`=`ctag`+1 WHERE `id`=?' );
$result = $stmt->execute(array($name,$order,$color,$timezone,$components,$id));
OCP\Util::emitHook('OC_Calendar', 'editCalendar', $id);
@ -163,7 +163,7 @@ class OC_Calendar_Calendar{
* @return boolean
*/
public static function setCalendarActive($id,$active){
$stmt = OCP\DB::prepare( 'UPDATE *PREFIX*calendar_calendars SET active = ? WHERE id = ?' );
$stmt = OCP\DB::prepare( 'UPDATE `*PREFIX*calendar_calendars` SET `active` = ? WHERE `id` = ?' );
$stmt->execute(array($active, $id));
return true;
@ -175,7 +175,7 @@ class OC_Calendar_Calendar{
* @return boolean
*/
public static function touchCalendar($id){
$stmt = OCP\DB::prepare( 'UPDATE *PREFIX*calendar_calendars SET ctag = ctag + 1 WHERE id = ?' );
$stmt = OCP\DB::prepare( 'UPDATE `*PREFIX*calendar_calendars` SET `ctag` = `ctag` + 1 WHERE `id` = ?' );
$stmt->execute(array($id));
return true;
@ -187,10 +187,10 @@ class OC_Calendar_Calendar{
* @return boolean
*/
public static function deleteCalendar($id){
$stmt = OCP\DB::prepare( 'DELETE FROM *PREFIX*calendar_calendars WHERE id = ?' );
$stmt = OCP\DB::prepare( 'DELETE FROM `*PREFIX*calendar_calendars` WHERE `id` = ?' );
$stmt->execute(array($id));
$stmt = OCP\DB::prepare( 'DELETE FROM *PREFIX*calendar_objects WHERE calendarid = ?' );
$stmt = OCP\DB::prepare( 'DELETE FROM `*PREFIX*calendar_objects` WHERE `calendarid` = ?' );
$stmt->execute(array($id));
OCP\Util::emitHook('OC_Calendar', 'deleteCalendar', $id);
@ -208,7 +208,7 @@ class OC_Calendar_Calendar{
* @return boolean
*/
public static function mergeCalendar($id1, $id2){
$stmt = OCP\DB::prepare('UPDATE *PREFIX*calendar_objects SET calendarid = ? WHERE calendarid = ?');
$stmt = OCP\DB::prepare('UPDATE `*PREFIX*calendar_objects` SET `calendarid` = ? WHERE `calendarid` = ?');
$stmt->execute(array($id1, $id2));
self::touchCalendar($id1);
self::deleteCalendar($id2);

View File

@ -273,8 +273,10 @@ class OC_Calendar_Import{
*/
private function isDuplicate($insertid){
$newobject = OC_Calendar_Object::find($insertid);
$stmt = OCP\DB::prepare('SELECT COUNT(*) as count FROM *PREFIX*calendar_objects WHERE objecttype=? AND startdate=? AND enddate=? AND repeating=? AND summary=? AND calendardata=?');
$result = $stmt->execute(array($newobject['objecttype'],$newobject['startdate'],$newobject['enddate'],$newobject['repeating'],$newobject['summary'],$newobject['calendardata']));
$stmt = OCP\DB::prepare('SELECT COUNT(*) AS `count` FROM `*PREFIX*calendar_objects`
INNER JOIN `*PREFIX*calendar_calendars` ON `calendarid`=`*PREFIX*calendar_calendars`.`id`
WHERE `objecttype`=? AND `startdate`=? AND `enddate`=? AND `repeating`=? AND `summary`=? AND `calendardata`=? AND `userid` = ?');
$result = $stmt->execute(array($newobject['objecttype'],$newobject['startdate'],$newobject['enddate'],$newobject['repeating'],$newobject['summary'],$newobject['calendardata'], $this->userid));
$result = $result->fetchRow();
if($result['count'] >= 2){
return true;

View File

@ -40,7 +40,7 @@ class OC_Calendar_Object{
* ['calendardata']
*/
public static function all($id){
$stmt = OCP\DB::prepare( 'SELECT * FROM *PREFIX*calendar_objects WHERE calendarid = ?' );
$stmt = OCP\DB::prepare( 'SELECT * FROM `*PREFIX*calendar_objects` WHERE `calendarid` = ?' );
$result = $stmt->execute(array($id));
$calendarobjects = array();
@ -62,10 +62,10 @@ class OC_Calendar_Object{
* in ['calendardata']
*/
public static function allInPeriod($id, $start, $end){
$stmt = OCP\DB::prepare( 'SELECT * FROM *PREFIX*calendar_objects WHERE calendarid = ?'
.' AND ((startdate >= ? AND startdate <= ? AND repeating = 0)'
.' OR (enddate >= ? AND enddate <= ? AND repeating = 0)'
.' OR (startdate <= ? AND repeating = 1))' );
$stmt = OCP\DB::prepare( 'SELECT * FROM `*PREFIX*calendar_objects` WHERE `calendarid` = ?'
.' AND ((`startdate` >= ? AND `startdate` <= ? AND `repeating` = 0)'
.' OR (`enddate` >= ? AND `enddate` <= ? AND `repeating` = 0)'
.' OR (`startdate` <= ? AND `repeating` = 1))' );
$start = self::getUTCforMDB($start);
$end = self::getUTCforMDB($end);
$result = $stmt->execute(array($id,
@ -87,7 +87,7 @@ class OC_Calendar_Object{
* @return associative array
*/
public static function find($id){
$stmt = OCP\DB::prepare( 'SELECT * FROM *PREFIX*calendar_objects WHERE id = ?' );
$stmt = OCP\DB::prepare( 'SELECT * FROM `*PREFIX*calendar_objects` WHERE `id` = ?' );
$result = $stmt->execute(array($id));
return $result->fetchRow();
@ -100,7 +100,7 @@ class OC_Calendar_Object{
* @return associative array
*/
public static function findWhereDAVDataIs($cid,$uri){
$stmt = OCP\DB::prepare( 'SELECT * FROM *PREFIX*calendar_objects WHERE calendarid = ? AND uri = ?' );
$stmt = OCP\DB::prepare( 'SELECT * FROM `*PREFIX*calendar_objects` WHERE `calendarid` = ? AND `uri` = ?' );
$result = $stmt->execute(array($cid,$uri));
return $result->fetchRow();
@ -124,7 +124,7 @@ class OC_Calendar_Object{
$uri = 'owncloud-'.md5($data.rand().time()).'.ics';
$stmt = OCP\DB::prepare( 'INSERT INTO *PREFIX*calendar_objects (calendarid,objecttype,startdate,enddate,repeating,summary,calendardata,uri,lastmodified) VALUES(?,?,?,?,?,?,?,?,?)' );
$stmt = OCP\DB::prepare( 'INSERT INTO `*PREFIX*calendar_objects` (`calendarid`,`objecttype`,`startdate`,`enddate`,`repeating`,`summary`,`calendardata`,`uri`,`lastmodified`) VALUES(?,?,?,?,?,?,?,?,?)' );
$stmt->execute(array($id,$type,$startdate,$enddate,$repeating,$summary,$data,$uri,time()));
$object_id = OCP\DB::insertid('*PREFIX*calendar_objects');
@ -144,7 +144,7 @@ class OC_Calendar_Object{
$object = OC_VObject::parse($data);
list($type,$startdate,$enddate,$summary,$repeating,$uid) = self::extractData($object);
$stmt = OCP\DB::prepare( 'INSERT INTO *PREFIX*calendar_objects (calendarid,objecttype,startdate,enddate,repeating,summary,calendardata,uri,lastmodified) VALUES(?,?,?,?,?,?,?,?,?)' );
$stmt = OCP\DB::prepare( 'INSERT INTO `*PREFIX*calendar_objects` (`calendarid`,`objecttype`,`startdate`,`enddate`,`repeating`,`summary`,`calendardata`,`uri`,`lastmodified`) VALUES(?,?,?,?,?,?,?,?,?)' );
$stmt->execute(array($id,$type,$startdate,$enddate,$repeating,$summary,$data,$uri,time()));
$object_id = OCP\DB::insertid('*PREFIX*calendar_objects');
@ -166,7 +166,7 @@ class OC_Calendar_Object{
OC_Calendar_App::loadCategoriesFromVCalendar($object);
list($type,$startdate,$enddate,$summary,$repeating,$uid) = self::extractData($object);
$stmt = OCP\DB::prepare( 'UPDATE *PREFIX*calendar_objects SET objecttype=?,startdate=?,enddate=?,repeating=?,summary=?,calendardata=?, lastmodified = ? WHERE id = ?' );
$stmt = OCP\DB::prepare( 'UPDATE `*PREFIX*calendar_objects` SET `objecttype`=?,`startdate`=?,`enddate`=?,`repeating`=?,`summary`=?,`calendardata`=?,`lastmodified`= ? WHERE `id` = ?' );
$stmt->execute(array($type,$startdate,$enddate,$repeating,$summary,$data,time(),$id));
OC_Calendar_Calendar::touchCalendar($oldobject['calendarid']);
@ -188,7 +188,7 @@ class OC_Calendar_Object{
$object = OC_VObject::parse($data);
list($type,$startdate,$enddate,$summary,$repeating,$uid) = self::extractData($object);
$stmt = OCP\DB::prepare( 'UPDATE *PREFIX*calendar_objects SET objecttype=?,startdate=?,enddate=?,repeating=?,summary=?,calendardata=?, lastmodified = ? WHERE id = ?' );
$stmt = OCP\DB::prepare( 'UPDATE `*PREFIX*calendar_objects` SET `objecttype`=?,`startdate`=?,`enddate`=?,`repeating`=?,`summary`=?,`calendardata`=?,`lastmodified`= ? WHERE `id` = ?' );
$stmt->execute(array($type,$startdate,$enddate,$repeating,$summary,$data,time(),$oldobject['id']));
OC_Calendar_Calendar::touchCalendar($oldobject['calendarid']);
@ -204,7 +204,7 @@ class OC_Calendar_Object{
*/
public static function delete($id){
$oldobject = self::find($id);
$stmt = OCP\DB::prepare( 'DELETE FROM *PREFIX*calendar_objects WHERE id = ?' );
$stmt = OCP\DB::prepare( 'DELETE FROM `*PREFIX*calendar_objects` WHERE `id` = ?' );
$stmt->execute(array($id));
OC_Calendar_Calendar::touchCalendar($oldobject['calendarid']);
OCP\Util::emitHook('OC_Calendar', 'deleteEvent', $id);
@ -220,7 +220,7 @@ class OC_Calendar_Object{
*/
public static function deleteFromDAVData($cid,$uri){
$oldobject = self::findWhereDAVDataIs($cid, $uri);
$stmt = OCP\DB::prepare( 'DELETE FROM *PREFIX*calendar_objects WHERE calendarid = ? AND uri=?' );
$stmt = OCP\DB::prepare( 'DELETE FROM `*PREFIX*calendar_objects` WHERE `calendarid`= ? AND `uri`=?' );
$stmt->execute(array($cid,$uri));
OC_Calendar_Calendar::touchCalendar($cid);
OCP\Util::emitHook('OC_Calendar', 'deleteEvent', $oldobject['id']);
@ -229,7 +229,7 @@ class OC_Calendar_Object{
}
public static function moveToCalendar($id, $calendarid){
$stmt = OCP\DB::prepare( 'UPDATE *PREFIX*calendar_objects SET calendarid=? WHERE id = ?' );
$stmt = OCP\DB::prepare( 'UPDATE `*PREFIX*calendar_objects` SET `calendarid`=? WHERE `id`=?' );
$stmt->execute(array($calendarid,$id));
OC_Calendar_Calendar::touchCalendar($id);
@ -869,7 +869,7 @@ class OC_Calendar_Object{
$vevent->setString('DESCRIPTION', $description);
$vevent->setString('CATEGORIES', $categories);
/**if($repeat == "true"){
/*if($repeat == "true"){
$vevent->RRULE = $repeat;
}*/

View File

@ -16,7 +16,7 @@ class OC_Calendar_Repeat{
* @return (array)
*/
public static function get($id){
$stmt = OCP\DB::prepare('SELECT * FROM *PREFIX*calendar_repeat WHERE eventid = ?');
$stmt = OCP\DB::prepare('SELECT * FROM `*PREFIX*calendar_repeat` WHERE `eventid` = ?');
$result = $stmt->execute(array($id));
$return = array();
while($row = $result->fetchRow()){
@ -32,9 +32,9 @@ class OC_Calendar_Repeat{
* @return (array)
*/
public static function get_inperiod($id, $from, $until){
$stmt = OCP\DB::prepare( 'SELECT * FROM *PREFIX*calendar_repeat WHERE eventid = ?'
.' AND ((startdate >= ? AND startdate <= ?)'
.' OR (enddate >= ? AND enddate <= ?))');
$stmt = OCP\DB::prepare( 'SELECT * FROM `*PREFIX*calendar_repeat` WHERE `eventid` = ?'
.' AND ((`startdate` >= ? AND `startdate` <= ?)'
.' OR (`enddate` >= ? AND `enddate` <= ?))');
$result = $stmt->execute(array($id,
OC_Calendar_Object::getUTCforMDB($from), OC_Calendar_Object::getUTCforMDB($until),
OC_Calendar_Object::getUTCforMDB($from), OC_Calendar_Object::getUTCforMDB($until)));
@ -50,7 +50,7 @@ class OC_Calendar_Repeat{
* @return (array)
*/
public static function getCalendar($id){
$stmt = OCP\DB::prepare('SELECT * FROM *PREFIX*calendar_repeat WHERE calid = ?');
$stmt = OCP\DB::prepare('SELECT * FROM `*PREFIX*calendar_repeat` WHERE `calid` = ?');
$result = $stmt->execute(array($id));
$return = array();
while($row = $result->fetchRow()){
@ -66,9 +66,9 @@ class OC_Calendar_Repeat{
* @return (array)
*/
public static function getCalendar_inperiod($id, $from, $until){
$stmt = OCP\DB::prepare( 'SELECT * FROM *PREFIX*calendar_repeat WHERE calid = ?'
.' AND ((startdate >= ? AND startdate <= ?)'
.' OR (enddate >= ? AND enddate <= ?))');
$stmt = OCP\DB::prepare( 'SELECT * FROM `*PREFIX*calendar_repeat` WHERE `calid` = ?'
.' AND ((`startdate` >= ? AND `startdate` <= ?)'
.' OR (`enddate` >= ? AND `enddate` <= ?))');
$result = $stmt->execute(array($id,
$from, $until,
$from, $until));
@ -99,7 +99,7 @@ class OC_Calendar_Repeat{
continue;
}
$startenddate = OC_Calendar_Object::generateStartEndDate($vevent->DTSTART, OC_Calendar_Object::getDTEndFromVEvent($vevent), ($vevent->DTSTART->getDateType() == Sabre_VObject_Element_DateTime::DATE)?true:false, 'UTC');
$stmt = OCP\DB::prepare('INSERT INTO *PREFIX*calendar_repeat (eventid,calid,startdate,enddate) VALUES(?,?,?,?)');
$stmt = OCP\DB::prepare('INSERT INTO `*PREFIX*calendar_repeat` (`eventid`,`calid`,`startdate`,`enddate`) VALUES(?,?,?,?)');
$stmt->execute(array($id,OC_Calendar_Object::getCalendarid($id),$startenddate['start'],$startenddate['end']));
}
return true;
@ -189,7 +189,7 @@ class OC_Calendar_Repeat{
* @return (bool)
*/
public static function clean($id){
$stmt = OCP\DB::prepare('DELETE FROM *PREFIX*calendar_repeat WHERE eventid = ?');
$stmt = OCP\DB::prepare('DELETE FROM `*PREFIX*calendar_repeat` WHERE `eventid` = ?');
$stmt->execute(array($id));
}
/**
@ -198,7 +198,7 @@ class OC_Calendar_Repeat{
* @return (bool)
*/
public static function cleanCalendar($id){
$stmt = OCP\DB::prepare('DELETE FROM *PREFIX*calendar_repeat WHERE calid = ?');
$stmt = OCP\DB::prepare('DELETE FROM `*PREFIX*calendar_repeat` WHERE `calid` = ?');
$stmt->execute(array($id));
}
}

View File

@ -0,0 +1,127 @@
<?php
/**
* ownCloud - OC_Connector_Sabre_Sabre_CalDAV_Calendar
*
* @author Thomas Tanghus
* @copyright 2012 Thomas Tanghus (thomas@tanghus.net)
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
* License as published by the Free Software Foundation; either
* version 3 of the License, or any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
*
* You should have received a copy of the GNU Affero General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*
*/
/**
* This class overrides Sabre_CalDAV_Calendar::getACL() to return read/write
* permissions based on user and shared state and it overrides
* Sabre_CalDAV_Calendar::getChild() and Sabre_CalDAV_Calendar::getChildren()
* to instantiate OC_Connector_Sabre_CalDAV_CalendarObjects.
*/
class OC_Connector_Sabre_CalDAV_Calendar extends Sabre_CalDAV_Calendar {
/**
* 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() {
$readprincipal = $this->getOwner();
$writeprincipal = $this->getOwner();
$uid = OC_Calendar_Calendar::extractUserID($this->getOwner());
if($uid != OCP\USER::getUser()) {
$sharedCalendar = OCP\Share::getItemSharedWithBySource('calendar', $this->$calendarInfo['id']);
if ($sharedCalendar && ($sharedCalendar['permissions'] & OCP\Share::PERMISSION_READ)) {
$readprincipal = 'principals/' . OCP\USER::getUser();
}
if ($sharedCalendar && ($sharedCalendar['permissions'] & OCP\Share::PERMISSION_UPDATE)) {
$writeprincipal = 'principals/' . OCP\USER::getUser();
}
}
return array(
array(
'privilege' => '{DAV:}read',
'principal' => $readprincipal,
'protected' => true,
),
array(
'privilege' => '{DAV:}write',
'principal' => $writeprincipal,
'protected' => true,
),
array(
'privilege' => '{DAV:}read',
'principal' => $readprincipal . '/calendar-proxy-write',
'protected' => true,
),
array(
'privilege' => '{DAV:}write',
'principal' => $writeprincipal . '/calendar-proxy-write',
'protected' => true,
),
array(
'privilege' => '{DAV:}read',
'principal' => $readprincipal . '/calendar-proxy-read',
'protected' => true,
),
array(
'privilege' => '{' . Sabre_CalDAV_Plugin::NS_CALDAV . '}read-free-busy',
'principal' => '{DAV:}authenticated',
'protected' => true,
),
);
}
/**
* Returns a calendar object
*
* The contained calendar objects are for example Events or Todo's.
*
* @param string $name
* @return Sabre_DAV_ICalendarObject
*/
public function getChild($name) {
$obj = $this->caldavBackend->getCalendarObject($this->calendarInfo['id'],$name);
if (!$obj) throw new Sabre_DAV_Exception_NotFound('Calendar object not found');
return new OC_Connector_Sabre_CalDAV_CalendarObject($this->caldavBackend,$this->calendarInfo,$obj);
}
/**
* Returns the full list of calendar objects
*
* @return array
*/
public function getChildren() {
$objs = $this->caldavBackend->getCalendarObjects($this->calendarInfo['id']);
$children = array();
foreach($objs as $obj) {
$children[] = new OC_Connector_Sabre_CalDAV_CalendarObject($this->caldavBackend,$this->calendarInfo,$obj);
}
return $children;
}
}

View File

@ -0,0 +1,45 @@
<?php
/**
* ownCloud - OC_Connector_Sabre_CalDAV_CalendarRoot
*
* @author Thomas Tanghus
* @copyright 2012 Thomas Tanghus (thomas@tanghus.net)
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
* License as published by the Free Software Foundation; either
* version 3 of the License, or any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
*
* You should have received a copy of the GNU Affero General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*
*/
/**
* This class overrides Sabre_CalDAV_CalendarRootNode::getChildForPrincipal()
* to instantiate OC_Connector_Sabre_CalDAV_UserCalendars.
*/
class OC_Connector_Sabre_CalDAV_CalendarRoot extends Sabre_CalDAV_CalendarRootNode {
/**
* This method returns a node for a principal.
*
* The passed array contains principal information, and is guaranteed to
* at least contain a uri item. Other properties may or may not be
* supplied by the authentication backend.
*
* @param array $principal
* @return Sabre_DAV_INode
*/
public function getChildForPrincipal(array $principal) {
return new OC_Connector_Sabre_CalDAV_UserCalendars($this->principalBackend, $this->caldavBackend, $principal['uri']);
}
}

View File

@ -0,0 +1,87 @@
<?php
/**
* ownCloud - OC_Connector_Sabre_CalDAV_CalendarObject
*
* @author Thomas Tanghus
* @copyright 2012 Thomas Tanghus (thomas@tanghus.net)
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
* License as published by the Free Software Foundation; either
* version 3 of the License, or any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
*
* You should have received a copy of the GNU Affero General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*
*/
/**
* This class overrides Sabre_CalDAV_CalendarObject::getACL()
* to return read/write permissions based on user and shared state.
*/
class OC_Connector_Sabre_CalDAV_CalendarObject extends Sabre_CalDAV_CalendarObject {
/**
* 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() {
$readprincipal = $this->getOwner();
$writeprincipal = $this->getOwner();
$uid = OC_Calendar_Calendar::extractUserID($this->getOwner());
if($uid != OCP\USER::getUser()) {
$sharedCalendar = OCP\Share::getItemSharedWithBySource('calendar', $this->$calendarInfo['id']);
if ($sharedCalendar && ($sharedCalendar['permissions'] & OCP\Share::PERMISSION_READ)) {
$readprincipal = 'principals/' . OCP\USER::getUser();
}
if ($sharedCalendar && ($sharedCalendar['permissions'] & OCP\Share::PERMISSION_UPDATE)) {
$writeprincipal = 'principals/' . OCP\USER::getUser();
}
}
return array(
array(
'privilege' => '{DAV:}read',
'principal' => $readprincipal,
'protected' => true,
),
array(
'privilege' => '{DAV:}write',
'principal' => $writeprincipal,
'protected' => true,
),
array(
'privilege' => '{DAV:}read',
'principal' => $readprincipal . '/calendar-proxy-write',
'protected' => true,
),
array(
'privilege' => '{DAV:}write',
'principal' => $writeprincipal . '/calendar-proxy-write',
'protected' => true,
),
array(
'privilege' => '{DAV:}read',
'principal' => $readprincipal . '/calendar-proxy-read',
'protected' => true,
),
);
}
}

View File

@ -0,0 +1,46 @@
<?php
/**
* ownCloud - OC_Connector_Sabre_CalDAV_UserCalendars
*
* @author Thomas Tanghus
* @copyright 2012 Thomas Tanghus (thomas@tanghus.net)
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
* License as published by the Free Software Foundation; either
* version 3 of the License, or any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
*
* You should have received a copy of the GNU Affero General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*
*/
/**
* This class overrides Sabre_CalDAV_UserCalendars::getChildren()
* to instantiate OC_Connector_Sabre_CalDAV_Calendars.
*/
class OC_Connector_Sabre_CalDAV_UserCalendars extends Sabre_CalDAV_UserCalendars {
/**
* Returns a list of calendars
*
* @return array
*/
public function getChildren() {
$calendars = $this->caldavBackend->getCalendarsForUser($this->principalInfo['uri']);
$objs = array();
foreach($calendars as $calendar) {
$objs[] = new OC_Connector_Sabre_CalDAV_Calendar($this->principalBackend, $this->caldavBackend, $calendar);
}
$objs[] = new Sabre_CalDAV_Schedule_Outbox($this->principalInfo['uri']);
return $objs;
}
}

View File

@ -18,19 +18,16 @@ class OC_Calendar_Share{
* @return: array $return - information about calendars
*/
public static function allSharedwithuser($userid, $type, $active=null, $permission=null){
$group_where = self::group_sql(OC_Group::getUserGroups($userid));
$permission_where = self::permission_sql($permission);
if($type == self::CALENDAR){
$active_where = self::active_sql($active);
}else{
$active_where = '';
}
$stmt = OCP\DB::prepare("SELECT * FROM *PREFIX*calendar_share_" . $type . " WHERE ((share = ? AND sharetype = 'user') " . $group_where . ") AND owner <> ? " . $permission_where . " " . $active_where);
$result = $stmt->execute(array($userid, $userid));
$return = array();
while( $row = $result->fetchRow()){
$return[] = $row;
$format = OC_Share_Backend_Calendar::FORMAT_CALENDAR;
if ($type == self::EVENT) {
$format = OC_Share_Backend_Event::FORMAT_EVENT;
}
$return = OCP\Share::getItemsSharedWith($type,
$format,
array(
'active' => $active,
'permissions' => $permission,
));
return $return;
}
/**
@ -40,7 +37,7 @@ class OC_Calendar_Share{
* @return: array $users - information about users a calendar / event is shared with
*/
public static function allUsersSharedwith($id, $type){
$stmt = OCP\DB::prepare('SELECT * FROM *PREFIX*calendar_share_' . $type . ' WHERE ' . $type . 'id = ? ORDER BY share');
$stmt = OCP\DB::prepare('SELECT * FROM `*PREFIX*calendar_share_' . $type . '` WHERE `' . $type . 'id` = ? ORDER BY `share`');
$result = $stmt->execute(array($id));
$users = array();
while( $row = $result->fetchRow()){
@ -72,7 +69,7 @@ class OC_Calendar_Share{
if($sharetype == 'public'){
$share = self::generate_token($id, $type);
}
$stmt = OCP\DB::prepare('INSERT INTO *PREFIX*calendar_share_' . $type . ' (owner,share,sharetype,' . $type . 'id,permissions' . (($type == self::CALENDAR)?', active':'') . ') VALUES(?,?,?,?,0' . (($type == self::CALENDAR)?', 1':'') . ')' );
$stmt = OCP\DB::prepare('INSERT INTO `*PREFIX*calendar_share_' . $type . '` (`owner`,`share`,`sharetype`,`' . $type . 'id`,`permissions`' . (($type == self::CALENDAR)?',`active`':'') . ') VALUES(?,?,?,?,0' . (($type == self::CALENDAR)?', 1':'') . ')' );
$result = $stmt->execute(array($owner,$share,$sharetype,$id));
if($sharetype == 'public'){
return $share;
@ -90,7 +87,7 @@ class OC_Calendar_Share{
* @return boolean
*/
public static function unshare($owner, $share, $sharetype, $id, $type){
$stmt = OCP\DB::prepare('DELETE FROM *PREFIX*calendar_share_' . $type . ' WHERE owner = ? ' . (($sharetype != 'public')?'AND share = ?':'') . ' AND sharetype = ? AND ' . $type . 'id = ?');
$stmt = OCP\DB::prepare('DELETE FROM `*PREFIX*calendar_share_' . $type . '` WHERE `owner` = ? ' . (($sharetype != 'public')?'AND `share` = ?':'') . ' AND `sharetype` = ? AND `' . $type . 'id` = ?');
if($sharetype != 'public'){
$stmt->execute(array($owner,$share,$sharetype,$id));
}else{
@ -111,7 +108,7 @@ class OC_Calendar_Share{
if($sharetype == 'public' && $permission == 1){
$permission = 0;
}
$stmt = OCP\DB::prepare('UPDATE *PREFIX*calendar_share_' . $type . ' SET permissions = ? WHERE share = ? AND sharetype = ? AND ' . $type . 'id = ?');
$stmt = OCP\DB::prepare('UPDATE `*PREFIX*calendar_share_' . $type . '` SET `permissions` = ? WHERE `share` = ? AND `sharetype` = ? AND `' . $type . 'id` = ?');
$stmt->execute(array($permission, $share, $sharetype, $id));
return true;
}
@ -148,7 +145,7 @@ class OC_Calendar_Share{
* @return boolean
*/
public static function is_already_shared($owner, $share, $sharetype, $id, $type){
$stmt = OCP\DB::prepare('SELECT * FROM *PREFIX*calendar_share_' . $type . ' WHERE owner = ? AND share = ? AND sharetype = ? AND ' . $type . 'id = ?');
$stmt = OCP\DB::prepare('SELECT * FROM `*PREFIX*calendar_share_' . $type . '` WHERE `owner` = ? AND `share` = ? AND `sharetype` = ? AND `' . $type . 'id` = ?');
$result = $stmt->execute(array($owner, $share, $sharetype, $id));
if($result->numRows() > 0){
return true;
@ -160,7 +157,7 @@ class OC_Calendar_Share{
$i = 0;
foreach($groups as $group){
$group_where .= ' OR ';
$group_where .= " (share = '" . $group . "' AND sharetype = 'group') ";
$group_where .= ' (`share` = \'' . $group . '\' AND `sharetype` = \'group\') ';
$i++;
}
return $group_where;
@ -168,7 +165,7 @@ class OC_Calendar_Share{
private static function permission_sql($permission = null){
$permission_where = '';
if(!is_null($permission)){
$permission_where = ' AND permissions = ';
$permission_where = ' AND `permissions` = ';
$permission_where .= ($permission=='rw')?"'1'":"'0'";
}
return $permission_where;
@ -176,7 +173,7 @@ class OC_Calendar_Share{
private static function active_sql($active = null){
$active_where = '';
if(!is_null($active)){
$active_where = 'AND active = ';
$active_where = 'AND `active` = ';
$active_where .= (!is_null($active) && $active)?'1':'0';
}
return $active_where;
@ -191,7 +188,7 @@ class OC_Calendar_Share{
public static function is_editing_allowed($share, $id, $type){
$group_where = self::group_sql(OC_Group::getUserGroups($share));
$permission_where = self::permission_sql('rw');
$stmt = OCP\DB::prepare("SELECT * FROM *PREFIX*calendar_share_" . $type . " WHERE ((share = ? AND sharetype = 'user') " . $group_where . ") " . $permission_where);
$stmt = OCP\DB::prepare('SELECT * FROM `*PREFIX*calendar_share_' . $type . '` WHERE ((`share` = ? AND `sharetype` = \'user\') ' . $group_where . ') ' . $permission_where);
$result = $stmt->execute(array($share));
if($result->numRows() == 1){
return true;
@ -211,7 +208,7 @@ class OC_Calendar_Share{
*/
public static function check_access($share, $id, $type){
$group_where = self::group_sql(OC_Group::getUserGroups($share));
$stmt = OCP\DB::prepare("SELECT * FROM *PREFIX*calendar_share_" . $type . " WHERE (" . $type . "id = ? AND (share = ? AND sharetype = 'user') " . $group_where . ")");
$stmt = OCP\DB::prepare('SELECT * FROM `*PREFIX*calendar_share_' . $type . '` WHERE (`' . $type . 'id` = ? AND (`share` = ? AND `sharetype` = \'user\') ' . $group_where . ')');
$result = $stmt->execute(array($id,$share));
$rows = $result->numRows();
if($rows > 0){
@ -229,9 +226,9 @@ class OC_Calendar_Share{
* @return: mixed - bool if false, array with type and id if true
*/
public static function getElementByToken($token){
$stmt_calendar = OCP\DB::prepare("SELECT * FROM *PREFIX*calendar_share_" . OC_Calendar_Share::CALENDAR . " WHERE sharetype = 'public' AND share = ?");
$stmt_calendar = OCP\DB::prepare('SELECT * FROM `*PREFIX*calendar_share_' . OC_Calendar_Share::CALENDAR . '` WHERE `sharetype` = \'public\' AND `share` = ?');
$result_calendar = $stmt_calendar->execute(array($token));
$stmt_event = OCP\DB::prepare("SELECT * FROM *PREFIX*calendar_share_" . OC_Calendar_Share::EVENT . " WHERE sharetype = 'public' AND share = ?");
$stmt_event = OCP\DB::prepare('SELECT * FROM `*PREFIX*calendar_share_' . OC_Calendar_Share::EVENT . '` WHERE `sharetype` = \'public\' AND `share` = ?');
$result_event = $stmt_event->execute(array($token));
$return = array();
if($result_calendar->numRows() == 0 && $result_event->numRows() == 0){
@ -253,7 +250,7 @@ class OC_Calendar_Share{
* @param string
*/
public static function set_active($share, $id, $active){
$stmt = OCP\DB::prepare("UPDATE *PREFIX*calendar_share_calendar SET active = ? WHERE share = ? AND sharetype = 'user' AND calendarid = ?");
$stmt = OCP\DB::prepare("UPDATE `*PREFIX*calendar_share_calendar` SET `active` = ? WHERE `share` = ? AND `sharetype` = 'user' AND `calendarid` = ?");
$stmt->execute(array($active, $share, $id));
}
@ -263,13 +260,13 @@ class OC_Calendar_Share{
* @return boolean
*/
public static function post_userdelete($userid){
$stmt = OCP\DB::prepare('DELETE FROM *PREFIX*calendar_share_calendar WHERE owner = ?');
$stmt = OCP\DB::prepare('DELETE FROM `*PREFIX*calendar_share_calendar` WHERE `owner` = ?');
$stmt->execute(array($userid));
$stmt = OCP\DB::prepare('DELETE FROM *PREFIX*calendar_share_event WHERE owner = ?');
$stmt = OCP\DB::prepare('DELETE FROM `*PREFIX*calendar_share_event` WHERE `owner` = ?');
$stmt->execute(array($userid));
$stmt = OCP\DB::prepare("DELETE FROM *PREFIX*calendar_share_calendar WHERE share = ? AND sharetype = 'user'");
$stmt = OCP\DB::prepare("DELETE FROM `*PREFIX*calendar_share_calendar` WHERE `share` = ? AND `sharetype` = 'user'");
$stmt->execute(array($userid));
$stmt = OCP\DB::prepare("DELETE FROM *PREFIX*calendar_share_event WHERE share = ? AND sharetype = 'user'");
$stmt = OCP\DB::prepare("DELETE FROM `*PREFIX*calendar_share_event` WHERE `share` = ? AND `sharetype` = 'user'");
$stmt->execute(array($userid));
return true;
}
@ -280,7 +277,7 @@ class OC_Calendar_Share{
* @return boolean
*/
public static function post_caldelete($calid){
$stmt = OCP\DB::prepare('DELETE FROM *PREFIX*calendar_share_calendar WHERE calendarid = ?');
$stmt = OCP\DB::prepare('DELETE FROM `*PREFIX*calendar_share_calendar` WHERE `calendarid` = ?');
$stmt->execute(array($calid));
return true;
}
@ -291,7 +288,7 @@ class OC_Calendar_Share{
* @return boolean
*/
public static function post_eventdelete($eventid){
$stmt = OCP\DB::prepare('DELETE FROM *PREFIX*calendar_share_event WHERE eventid = ?');
$stmt = OCP\DB::prepare('DELETE FROM `*PREFIX*calendar_share_event` WHERE `eventid` = ?');
$stmt->execute(array($eventid));
return true;
}

View File

@ -0,0 +1,111 @@
<?php
/**
* ownCloud
*
* @author Michael Gapczynski
* @copyright 2012 Michael Gapczynski mtgap@owncloud.com
* Copyright (c) 2012 Bart Visscher <bartv@thisnet.nl>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
* License as published by the Free Software Foundation; either
* version 3 of the License, or any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
*
* You should have received a copy of the GNU Affero General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
class OC_Share_Backend_Calendar implements OCP\Share_Backend_Collection {
const FORMAT_CALENDAR = 1;
/**
* @brief Get the source of the item to be stored in the database
* @param string Item
* @param string Owner of the item
* @return mixed|array|false Source
*
* Return an array if the item is file dependent, the array needs two keys: 'item' and 'file'
* Return false if the item does not exist for the user
*
* The formatItems() function will translate the source returned back into the item
*/
public function isValidSource($itemSource, $uidOwner) {
$calendar = OC_Calendar_App::getCalendar( $itemSource );
if ($calendar || $calendar['userid'] != $uidOwner) {
return false;
}
return true;
}
/**
* @brief Get a unique name of the item for the specified user
* @param string Item
* @param string|false User the item is being shared with
* @param array|null List of similar item names already existing as shared items
* @return string Target name
*
* This function needs to verify that the user does not already have an item with this name.
* If it does generate a new name e.g. name_#
*/
public function generateTarget($itemSource, $shareWith, $exclude = null) {
$calendar = OC_Calendar_App::getCalendar( $itemSource );
$user_calendars = array();
foreach(OC_Contacts_Addressbook::all($uid) as $user_calendar) {
$user_calendars[] = $user_calendar['displayname'];
}
$name = $calendar['userid']."'s ".$calendar['displayname'];
$suffix = '';
while (in_array($name.$suffix, $user_calendars)) {
$suffix++;
}
return $name.$suffix;
}
/**
* @brief Converts the shared item sources back into the item in the specified format
* @param array Shared items
* @param int Format
* @return ?
*
* The items array is a 3-dimensional array with the item_source as the first key and the share id as the second key to an array with the share info.
* The key/value pairs included in the share info depend on the function originally called:
* If called by getItem(s)Shared: id, item_type, item, item_source, share_type, share_with, permissions, stime, file_source
* If called by getItem(s)SharedWith: id, item_type, item, item_source, item_target, share_type, share_with, permissions, stime, file_source, file_target
* This function allows the backend to control the output of shared items with custom formats.
* It is only called through calls to the public getItem(s)Shared(With) functions.
*/
public function formatItems($items, $format, $parameters = null) {
$calendars = array();
if ($format == self::FORMAT_CALENDAR) {
foreach ($items as $item) {
$calendar = OC_Calendar_App::getCalendar($item['item_source'], false);
// TODO: really check $parameters['permissions'] == 'rw'/'r'
if ($parameters['permissions'] == 'rw') {
continue; // TODO
}
$calendar['displaynamename'] = $item['item_target'];
$calendar['calendarid'] = $calendar['id'];
$calendar['owner'] = $calendar['userid'];
$calendars[] = $calendar;
}
}
return $calendars;
}
public function getChildren($itemSource) {
$query = OCP\DB::prepare('SELECT `id` FROM `*PREFIX*calendar_objects` WHERE `calendarid` = ?');
$result = $query->execute(array($itemSource));
$sources = array();
while ($object = $result->fetchRow()) {
$sources[] = $object['id'];
}
return $sources;
}
}

View File

@ -0,0 +1,40 @@
<?php
/**
* Copyright (c) 2012 Bart Visscher <bartv@thisnet.nl>
* This file is licensed under the Affero General Public License version 3 or
* later.
* See the COPYING-README file.
*/
class OC_Share_Backend_Event implements OCP\Share_Backend {
const FORMAT_EVENT = 0;
private static $event;
public function isValidSource($itemSource, $uidOwner) {
self::$event = OC_Calendar_Object::find($itemSource);
if (self::$event) {
return true;
}
return false;
}
public function generateTarget($itemSource, $shareWith, $exclude = null) {
// TODO Get default calendar and check for conflicts
return self::$event['summary'];
}
public function formatItems($items, $format, $parameters = null) {
$events = array();
if ($format == self::FORMAT_EVENT) {
foreach ($items as $item) {
$event = OC_Calendar_Object::find($item['item_source']);
$event['summary'] = $item['item_target'];
$events[] = $event;
}
}
return $events;
}
}

View File

@ -0,0 +1,44 @@
<?php
/**
* ownCloud
*
* @author Michael Gapczynski
* @copyright 2012 Michael Gapczynski mtgap@owncloud.com
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
* License as published by the Free Software Foundation; either
* version 3 of the License, or any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
*
* You should have received a copy of the GNU Affero General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
class OC_Share_Backend_Calendar extends OCP\Share_Backend {
public function getSource($item, $uid) {
$query = OCP\DB::prepare('SELECT `id` FROM `*PREFIX*calendar_calendars` WHERE `userid` = ? AND `displayname` = ?',1);
return $query->execute(array($uid, $item))->fetchAll();
}
public function generateTarget($item, $uid) {
}
public function getItems($sources) {
}
}
class OC_Share_Backend_Event extends OCP\Share_Backend {
}
?>

View File

@ -5,7 +5,7 @@
<label for="active_<?php echo $_['calendar']['id'] ?>"><?php echo $_['calendar']['displayname'] ?></label>
</td>
<td width="20px">
<a href="#" onclick="Calendar.UI.Share.dropdown('<?php echo OCP\USER::getUser() ?>', <?php echo $_['calendar']['id'] ?>);" title="<?php echo $l->t('Share Calendar') ?>" class="action"><img class="svg action" src="<?php echo (!$_['shared']) ? OCP\Util::imagePath('core', 'actions/share.svg') : OCP\Util::imagePath('core', 'actions/shared.svg') ?>"></a>
<a href="#" class="share" data-item-type="calendar" data-item="<?php echo $_['calendar']['id']; ?>" title="<?php echo $l->t('Share Calendar') ?>" class="action"><img class="svg action" src="<?php echo (!$_['shared']) ? OCP\Util::imagePath('core', 'actions/share.svg') : OCP\Util::imagePath('core', 'actions/shared.svg') ?>"></a>
</td>
<td width="20px">
<a href="#" onclick="Calendar.UI.showCalDAVUrl('<?php echo OCP\USER::getUser() ?>', '<?php echo rawurlencode(html_entity_decode($_['calendar']['uri'], ENT_QUOTES, 'UTF-8')) ?>');" title="<?php echo $l->t('CalDav Link') ?>" class="action"><img class="svg action" src="<?php echo OCP\Util::imagePath('core', 'actions/public.svg') ?>"></a>

View File

@ -1,4 +1,4 @@
<?php
echo '<td width="20px"><input id="active_' . $_['share']['owner'] . '_' . $_['share']['calendar']['id'] . '" type="checkbox" onClick="Calendar.UI.Share.activation(this,\'' . $_['share']['owner'] . '\',' . $_['share']['calendar']['id'] . ')"' . ($_['share']['active'] ? ' checked="checked"' : '') . '></td>';
echo '<td><label for="active_' . $_['share']['owner'] . '_' . $_['share']['calendar']['id'] . '">' . $_['share']['calendar']['displayname'] . '</label></td>';
echo '<td><label for="active_' . $_['share']['owner'] . '_' . $_['share']['calendar']['id'] . '">' . htmlspecialchars($_['share']['calendar']['displayname']) . '</label></td>';
echo '<td style="font-style: italic;">' . $l->t('shared with you by') . ' ' . $_['share']['owner'] . '</td>';

View File

@ -108,7 +108,17 @@ switch($name) {
$value = strtolower($value);
break;
case 'TEL':
case 'ADR': // should I delete the property if empty or throw an error?
case 'ADR':
break;
case 'IMPP':
if(is_null($parameters) || !isset($parameters['X-SERVICE-TYPE'])) {
bailOut(OC_Contacts_App::$l10n->t('Missing IM parameter.'));
}
$impp = OC_Contacts_App::getIMOptions($parameters['X-SERVICE-TYPE']);
if(is_null($impp)) {
bailOut(OC_Contacts_App::$l10n->t('Unknown IM: '.$parameters['X-SERVICE-TYPE']));
}
$value = $impp['protocol'] . ':' . $value;
break;
}
@ -126,22 +136,28 @@ $line = count($vcard->children) - 1;
// Apparently Sabre_VObject_Parameter doesn't do well with
// multiple values or I don't know how to do it. Tanghus.
foreach ($parameters as $key=>$element) {
if(is_array($element) && strtoupper($key) == 'TYPE') {
if(is_array($element) /*&& strtoupper($key) == 'TYPE'*/) {
// NOTE: Maybe this doesn't only apply for TYPE?
// And it probably shouldn't be done here anyways :-/
foreach($element as $e) {
if($e != '' && !is_null($e)) {
$vcard->children[$line]->parameters[] = new Sabre_VObject_Parameter($key, $e);
if(trim($e)) {
$vcard->children[$line]->parameters[] = new Sabre_VObject_Parameter($key, $e);
}
}
}
} else {
if(trim($element)) {
$vcard->children[$line]->parameters[] = new Sabre_VObject_Parameter($key, $element);
}
}
}
$checksum = md5($vcard->children[$line]->serialize());
if(!OC_Contacts_VCard::edit($id, $vcard)) {
bailOut($l10n->t('Error adding contact property: '.$name));
try {
OC_Contacts_VCard::edit($id, $vcard);
} catch(Exception $e) {
bailOut($e->getMessage());
}
OCP\JSON::success(array(

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