Merge branch 'master' into oc_error

This commit is contained in:
Georg Ehrke 2012-05-29 13:16:34 +02:00
commit e0b17a05ff
15 changed files with 16 additions and 38 deletions

View File

@ -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))); $_mdays = range(1, date('t',mktime(0,0,0,$month,1,$year)));
foreach($_mdays as $_mday) foreach($_mdays as $_mday)
@ -621,13 +621,7 @@ class When
if($interval == "month") if($interval == "month")
{ {
$this->try_date->modify('last day of ' . $this->interval . ' ' . $interval);
$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');
}
} }
else else
{ {

View File

@ -8,13 +8,9 @@
OCP\JSON::checkLoggedIn(); OCP\JSON::checkLoggedIn();
OCP\JSON::checkAppEnabled('calendar'); OCP\JSON::checkAppEnabled('calendar');
if(array_key_exists('timezonedetection', $_POST)){ if(array_key_exists('timezonedetection', $_POST) && $_POST['timezonedetection'] == 'on'){
if($_POST['timezonedetection'] == 'on'){
OCP\Config::setUserValue(OCP\USER::getUser(), 'calendar', 'timezonedetection', 'true'); OCP\Config::setUserValue(OCP\USER::getUser(), 'calendar', 'timezonedetection', 'true');
}else{ }else{
OCP\Config::setUserValue(OCP\USER::getUser(), 'calendar', 'timezonedetection', 'false'); OCP\Config::setUserValue(OCP\USER::getUser(), 'calendar', 'timezonedetection', 'false');
} }
OCP\JSON::success(); OCP\JSON::success();
}else{
OCP\JSON::error();
}

View File

@ -207,6 +207,7 @@ Calendar={
}, },
showCalDAVUrl:function(username, calname){ showCalDAVUrl:function(username, calname){
$('#caldav_url').val(totalurl + '/' + username + '/' + calname); $('#caldav_url').val(totalurl + '/' + username + '/' + calname);
$('#caldav_url').val(encodeURI($('#caldav_url').val()));
$('#caldav_url').show(); $('#caldav_url').show();
$("#caldav_url_close").show(); $("#caldav_url_close").show();
}, },

View File

@ -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(?,?,?,?,?,?,?,?)' ); $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)); $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');
} }
/** /**

View File

@ -6,7 +6,7 @@ function ucwords (str) {
String.prototype.strip_tags = function(){ String.prototype.strip_tags = function(){
tags = this; tags = this;
stripped = tags.replace(/[\<\>]/gi, ""); stripped = tags.replace(/<(.|\n)*?>/g, '');
return stripped; return stripped;
}; };
@ -159,7 +159,7 @@ Contacts={
// Name has changed. Update it and reorder. // Name has changed. Update it and reorder.
$('#fn').change(function(){ $('#fn').change(function(){
var name = $('#fn').val(); var name = $('#fn').val().strip_tags();
var item = $('#contacts [data-id="'+Contacts.UI.Card.id+'"]'); var item = $('#contacts [data-id="'+Contacts.UI.Card.id+'"]');
$(item).find('a').html(name); $(item).find('a').html(name);
var added = false; var added = false;

View File

@ -227,7 +227,7 @@ class OC_Contacts_VCard{
$vcard->setString('FN', $fn); $vcard->setString('FN', $fn);
OCP\Util::writeLog('contacts','OC_Contacts_VCard::updateValuesFromAdd. Added missing \'FN\' field: '.$fn,OCP\Util::DEBUG); 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. $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... if(count($slice) < 2) { // If not enought, add one more...
$slice[] = ""; $slice[] = "";

View File

@ -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; ?> <?php endforeach; ?>

View File

@ -1,5 +1,4 @@
<?php <?php
require_once(OC::$APPSROOT . '/apps/files_sharing/lib_share.php');
OCP\JSON::checkAppEnabled('files_sharing'); OCP\JSON::checkAppEnabled('files_sharing');
OCP\JSON::checkLoggedIn(); OCP\JSON::checkLoggedIn();

View File

@ -1,5 +1,4 @@
<?php <?php
require_once(OC::$APPSROOT . '/apps/files_sharing/lib_share.php');
OCP\JSON::checkAppEnabled('files_sharing'); OCP\JSON::checkAppEnabled('files_sharing');
OCP\JSON::checkLoggedIn(); OCP\JSON::checkLoggedIn();

View File

@ -1,5 +1,4 @@
<?php <?php
require_once(OC::$APPSROOT . '/apps/files_sharing/lib_share.php');
OCP\JSON::checkAppEnabled('files_sharing'); OCP\JSON::checkAppEnabled('files_sharing');
OCP\JSON::checkLoggedIn(); OCP\JSON::checkLoggedIn();

View File

@ -1,5 +1,4 @@
<?php <?php
require_once(OC::$APPSROOT . '/apps/files_sharing/lib_share.php');
OCP\JSON::checkAppEnabled('files_sharing'); OCP\JSON::checkAppEnabled('files_sharing');
OCP\JSON::checkLoggedIn(); OCP\JSON::checkLoggedIn();

View File

@ -1,5 +1,4 @@
<?php <?php
require_once(OC::$APPSROOT . '/apps/files_sharing/lib_share.php');
OCP\JSON::checkAppEnabled('files_sharing'); OCP\JSON::checkAppEnabled('files_sharing');
OCP\JSON::checkLoggedIn(); OCP\JSON::checkLoggedIn();

View File

@ -24,8 +24,6 @@
header('Content-type: text/html; charset=UTF-8') ; header('Content-type: text/html; charset=UTF-8') ;
OCP\JSON::checkAppEnabled('media'); 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 error_reporting(E_ALL); //no script error reporting because of getID3

View File

@ -28,9 +28,6 @@
OCP\User::checkLoggedIn(); OCP\User::checkLoggedIn();
OCP\App::checkAppEnabled('media'); 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','player');
OCP\Util::addscript('media','music'); OCP\Util::addscript('media','music');
OCP\Util::addscript('media','playlist'); OCP\Util::addscript('media','playlist');

View File

@ -16,9 +16,6 @@ $state = OCP\Config::getSystemValue('ldapIgnoreNamingRules', 'doCheck');
if($state == 'doCheck'){ if($state == 'doCheck'){
$sqlCleanMap = 'DELETE FROM *PREFIX*ldap_user_mapping'; $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); OCP\Config::setSystemValue('ldapIgnoreNamingRules', true);
$LDAP_USER = new OC_USER_LDAP(); $LDAP_USER = new OC_USER_LDAP();
$users_old = $LDAP_USER->getUsers(); $users_old = $LDAP_USER->getUsers();