Merge branch 'master' into calendar_repeat
This commit is contained in:
commit
a56f2dbce7
|
@ -586,7 +586,7 @@ class When
|
|||
}
|
||||
}
|
||||
}
|
||||
elseif($this->gobyday && $interval == "month")
|
||||
elseif($this->gobyday || $interval == "month")
|
||||
{
|
||||
$_mdays = range(1, date('t',mktime(0,0,0,$month,1,$year)));
|
||||
foreach($_mdays as $_mday)
|
||||
|
@ -621,13 +621,7 @@ class When
|
|||
|
||||
if($interval == "month")
|
||||
{
|
||||
|
||||
$this->try_date->modify('first day of next month');
|
||||
if((int) date('t', $this->try_date->format('U')) > (int) $this->start_date->format('j')){
|
||||
$this->try_date->modify('+' . (int) $this->start_date->format('j') - 1 . ' day');
|
||||
}else{
|
||||
$this->try_date->modify('+' . (int) date('t', $this->try_date->format('U')) - 1 . ' day');
|
||||
}
|
||||
$this->try_date->modify('last day of ' . $this->interval . ' ' . $interval);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -8,13 +8,9 @@
|
|||
|
||||
OCP\JSON::checkLoggedIn();
|
||||
OCP\JSON::checkAppEnabled('calendar');
|
||||
if(array_key_exists('timezonedetection', $_POST)){
|
||||
if($_POST['timezonedetection'] == 'on'){
|
||||
OCP\Config::setUserValue(OCP\USER::getUser(), 'calendar', 'timezonedetection', 'true');
|
||||
}else{
|
||||
OCP\Config::setUserValue(OCP\USER::getUser(), 'calendar', 'timezonedetection', 'false');
|
||||
}
|
||||
OCP\JSON::success();
|
||||
if(array_key_exists('timezonedetection', $_POST) && $_POST['timezonedetection'] == 'on'){
|
||||
OCP\Config::setUserValue(OCP\USER::getUser(), 'calendar', 'timezonedetection', 'true');
|
||||
}else{
|
||||
OCP\JSON::error();
|
||||
}
|
||||
OCP\Config::setUserValue(OCP\USER::getUser(), 'calendar', 'timezonedetection', 'false');
|
||||
}
|
||||
OCP\JSON::success();
|
|
@ -207,6 +207,7 @@ Calendar={
|
|||
},
|
||||
showCalDAVUrl:function(username, calname){
|
||||
$('#caldav_url').val(totalurl + '/' + username + '/' + calname);
|
||||
$('#caldav_url').val(encodeURI($('#caldav_url').val()));
|
||||
$('#caldav_url').show();
|
||||
$("#caldav_url_close").show();
|
||||
},
|
||||
|
|
|
@ -109,7 +109,7 @@ class OC_Calendar_Calendar{
|
|||
$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));
|
||||
|
||||
return OCP\DB::insertid('*PREFIX*calendar_calendar');
|
||||
return OCP\DB::insertid('*PREFIX*calendar_calendars');
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -6,7 +6,7 @@ function ucwords (str) {
|
|||
|
||||
String.prototype.strip_tags = function(){
|
||||
tags = this;
|
||||
stripped = tags.replace(/[\<\>]/gi, "");
|
||||
stripped = tags.replace(/<(.|\n)*?>/g, '');
|
||||
return stripped;
|
||||
};
|
||||
|
||||
|
@ -159,7 +159,7 @@ Contacts={
|
|||
|
||||
// Name has changed. Update it and reorder.
|
||||
$('#fn').change(function(){
|
||||
var name = $('#fn').val();
|
||||
var name = $('#fn').val().strip_tags();
|
||||
var item = $('#contacts [data-id="'+Contacts.UI.Card.id+'"]');
|
||||
$(item).find('a').html(name);
|
||||
var added = false;
|
||||
|
|
|
@ -227,7 +227,7 @@ class OC_Contacts_VCard{
|
|||
$vcard->setString('FN', $fn);
|
||||
OCP\Util::writeLog('contacts','OC_Contacts_VCard::updateValuesFromAdd. Added missing \'FN\' field: '.$fn,OCP\Util::DEBUG);
|
||||
}
|
||||
if(!$n || $n = ';;;;'){ // Fix missing 'N' field. Ugly hack ahead ;-)
|
||||
if(!$n || $n == ';;;;'){ // Fix missing 'N' field. Ugly hack ahead ;-)
|
||||
$slice = array_reverse(array_slice(explode(' ', $fn), 0, 2)); // Take 2 first name parts of 'FN' and reverse.
|
||||
if(count($slice) < 2) { // If not enought, add one more...
|
||||
$slice[] = "";
|
||||
|
|
|
@ -8,5 +8,5 @@
|
|||
}
|
||||
}
|
||||
?>
|
||||
<li role="button" book-id="<?php echo $contact['addressbookid']; ?>" data-id="<?php echo $contact['id']; ?>"><a href="index.php?id=<?php echo $contact['id']; ?>"><?php echo $display; ?></a></li>
|
||||
<li role="button" book-id="<?php echo $contact['addressbookid']; ?>" data-id="<?php echo $contact['id']; ?>"><a href="index.php?id=<?php echo $contact['id']; ?>"><?php echo htmlspecialchars($display); ?></a></li>
|
||||
<?php endforeach; ?>
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
<?php
|
||||
require_once(OC::$APPSROOT . '/apps/files_sharing/lib_share.php');
|
||||
|
||||
OCP\JSON::checkAppEnabled('files_sharing');
|
||||
OCP\JSON::checkLoggedIn();
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
<?php
|
||||
require_once(OC::$APPSROOT . '/apps/files_sharing/lib_share.php');
|
||||
|
||||
OCP\JSON::checkAppEnabled('files_sharing');
|
||||
OCP\JSON::checkLoggedIn();
|
||||
|
@ -22,4 +21,4 @@ if ($rows = OC_Share::getMySharedItems()) {
|
|||
|
||||
OCP\JSON::success(array('data' => $items));
|
||||
|
||||
?>
|
||||
?>
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
<?php
|
||||
require_once(OC::$APPSROOT . '/apps/files_sharing/lib_share.php');
|
||||
|
||||
OCP\JSON::checkAppEnabled('files_sharing');
|
||||
OCP\JSON::checkLoggedIn();
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
<?php
|
||||
require_once(OC::$APPSROOT . '/apps/files_sharing/lib_share.php');
|
||||
|
||||
OCP\JSON::checkAppEnabled('files_sharing');
|
||||
OCP\JSON::checkLoggedIn();
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
<?php
|
||||
require_once(OC::$APPSROOT . '/apps/files_sharing/lib_share.php');
|
||||
|
||||
OCP\JSON::checkAppEnabled('files_sharing');
|
||||
OCP\JSON::checkLoggedIn();
|
||||
|
|
|
@ -24,8 +24,6 @@
|
|||
header('Content-type: text/html; charset=UTF-8') ;
|
||||
|
||||
OCP\JSON::checkAppEnabled('media');
|
||||
require_once(OC::$APPSROOT . '/apps/media/lib_collection.php');
|
||||
require_once(OC::$APPSROOT . '/apps/media/lib_scanner.php');
|
||||
|
||||
error_reporting(E_ALL); //no script error reporting because of getID3
|
||||
|
||||
|
@ -126,4 +124,4 @@ if($arguments['action']){
|
|||
exit;
|
||||
}
|
||||
}
|
||||
?>
|
||||
?>
|
||||
|
|
|
@ -28,9 +28,6 @@
|
|||
OCP\User::checkLoggedIn();
|
||||
OCP\App::checkAppEnabled('media');
|
||||
|
||||
require_once(OC::$APPSROOT . '/apps/media/lib_collection.php');
|
||||
require_once(OC::$APPSROOT . '/apps/media/lib_scanner.php');
|
||||
|
||||
OCP\Util::addscript('media','player');
|
||||
OCP\Util::addscript('media','music');
|
||||
OCP\Util::addscript('media','playlist');
|
||||
|
|
|
@ -16,9 +16,6 @@ $state = OCP\Config::getSystemValue('ldapIgnoreNamingRules', 'doCheck');
|
|||
if($state == 'doCheck'){
|
||||
$sqlCleanMap = 'DELETE FROM *PREFIX*ldap_user_mapping';
|
||||
|
||||
require_once(OC::$APPSROOT.'/apps/user_ldap/lib_ldap.php');
|
||||
require_once(OC::$APPSROOT.'/apps/user_ldap/user_ldap.php');
|
||||
|
||||
OCP\Config::setSystemValue('ldapIgnoreNamingRules', true);
|
||||
$LDAP_USER = new OC_USER_LDAP();
|
||||
$users_old = $LDAP_USER->getUsers();
|
||||
|
@ -33,4 +30,4 @@ if($state == 'doCheck'){
|
|||
//we don't need to check Groups, because they were not supported in 3'
|
||||
OCP\Config::setSystemValue('ldapIgnoreNamingRules', true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue