Merge branch 'master' of gitorious.org:owncloud/owncloud into ace-editor

This commit is contained in:
Tom Needham 2011-10-07 17:02:56 +01:00
commit 65a491eabd
61 changed files with 804 additions and 146 deletions

5
.gitignore vendored
View File

@ -32,4 +32,7 @@ RCS/*
# netbeans
nbproject
.DS_Store
# geany
*.geany
.DS_Store

View File

@ -2,13 +2,14 @@ Files in ownCloud are licensed under the Affero General Public License version 3
the text of which can be found in COPYING-AGPL, or any later version of the AGPL,
unless otherwise noted.
Components of ownCloud:
* jQuery is dual licensed under MIT and GPL
* HTTP is three clause BSD license
* MDB2 uses a custom license in the BSD style
* User is AGPL
* XML/RPC is both MIT and PHP license
Licensing of components:
* jQuery: MIT / GPL
* HTTP: 3 clause BSD
* MDB2: BSD style custom
* User: AGPL
* XML/RPC: MIT / PHP
* Silk icons: Creative Commons Attribution
All unmodified files from these and other sources retain their original copyright
and license notices: see the relevant individual files.
Attribution information for ownCloud is contained in the AUTHORS file.
Attribution information for ownCloud is contained in the AUTHORS file.

View File

@ -28,43 +28,674 @@ $select_year = $_GET["year"];
$user_timezone = OC_Preferences::getValue(OC_USER::getUser(), "calendar", "timezone", "Europe/London");
foreach($events as $event)
{
if ($select_year != substr($event['startdate'], 0, 4))
if($select_year != substr($event['startdate'], 0, 4) && $event["repeating"] == false)
continue;
$object = Sabre_VObject_Reader::read($event['calendardata']);
$vevent = $object->VEVENT;
$dtstart = $vevent->DTSTART;
$dtend = OC_Calendar_Object::getDTEndFromVEvent($vevent);
$start_dt = $dtstart->getDateTime();
$start_dt->setTimezone(new DateTimeZone($user_timezone));
$end_dt = $dtend->getDateTime();
$end_dt->setTimezone(new DateTimeZone($user_timezone));
$year = $start_dt->format('Y');
$month = $start_dt->format('n') - 1; // return is 0 based
$day = $start_dt->format('j');
$hour = $start_dt->format('G');
if ($dtstart->getDateType() == Sabre_VObject_Element_DateTime::DATE) {
$hour = 'allday';
}
if($select_year == substr($event['startdate'], 0, 4) && $event["repeating"] == false){
$object = Sabre_VObject_Reader::read($event['calendardata']);
$vevent = $object->VEVENT;
$dtstart = $vevent->DTSTART;
$dtend = OC_Calendar_Object::getDTEndFromVEvent($vevent);
$start_dt = $dtstart->getDateTime();
$start_dt->setTimezone(new DateTimeZone($user_timezone));
$end_dt = $dtend->getDateTime();
$end_dt->setTimezone(new DateTimeZone($user_timezone));
$year = $start_dt->format('Y');
$month = $start_dt->format('n') - 1; // return is 0 based
$day = $start_dt->format('j');
$hour = $start_dt->format('G');
if ($dtstart->getDateType() == Sabre_VObject_Element_DateTime::DATE) {
$hour = 'allday';
}
$return_event = array();
foreach(array('id', 'calendarid', 'objecttype', 'repeating') as $prop)
{
$return_event[$prop] = $event[$prop];
$return_event = array();
foreach(array('id', 'calendarid', 'objecttype', 'repeating') as $prop)
{
$return_event[$prop] = $event[$prop];
}
$return_event['startdate'] = explode('|', $start_dt->format('Y|m|d|H|i'));
$return_event['enddate'] = explode('|', $end_dt->format('Y|m|d|H|i'));
$return_event['description'] = $event['summary'];
if ($hour == 'allday')
{
$return_event['allday'] = true;
}
if (isset($return[$year][$month][$day][$hour]))
{
$return[$year][$month][$day][$hour][] = $return_event;
}
else
{
$return[$year][$month][$day][$hour] = array(1 => $return_event);
}
}
$return_event['startdate'] = explode('|', $start_dt->format('Y|m|d|H|i'));
$return_event['enddate'] = explode('|', $end_dt->format('Y|m|d|H|i'));
$return_event['description'] = $event['summary'];
if ($hour == 'allday')
{
$return_event['allday'] = true;
}
if (isset($return[$year][$month][$day][$hour]))
{
$return[$year][$month][$day][$hour][] = $return_event;
}
else
{
$return[$year][$month][$day][$hour] = array(1 => $return_event);
if($event["repeating"] == 1){
$object = Sabre_VObject_Reader::read($event['calendardata']);
$vevent = $object->VEVENT;
//echo substr_count($event["calendardata"], "EXDATE");
$numofelements = substr_count($vevent->RRULE, ";");
$properties = array("FREQ"=>"false", "UNTIL"=>"false", "COUNT"=>"false", "INTERVAL"=>"false", "BYDAY"=>"false", "BYMONTHDAY"=>"false", "BYWEEKNO"=>"false", "BYMONTH"=>"false", "BYYEARDAY"=>"false", "BYSETPOS"=>"false");
$exruleproperties = array("FREQ"=>"false", "UNTIL"=>"false", "COUNT"=>"false", "INTERVAL"=>"false", "BYDAY"=>"false", "BYMONTHDAY"=>"false", "BYWEEKNO"=>"false", "BYMONTH"=>"false", "BYYEARDAY"=>"false", "BYSETPOS"=>"false");
$byday = array("MO"=>"false", "TU"=>"false", "WE"=>"false", "TH"=>"false", "FR"=>"false", "SA"=>"false", "SU"=>"false");
if($numofelements != 0){
$rrule = explode(";", $vevent->RRULE);
for($i = 0;$i <= $numofelements;$i++){
$rule = explode("=", $rrule[$i]);
$property = $rule[0];
$value = $rule[1];
$properties[$property] = $value;
}
if($properties["BYDAY"] != "false"){
$numofdays = substr_count($properties["BYDAY"], ",");
if($numofdays == 0){
if(strlen($properties["BYDAY"]) != 2){
$lenght = strlen($properties["BYDAY"]);
switch($lenght){
case "3":
$properties["BYSETPOS"] = substr($properties["BYDAY"],0,1);
$properties["BYDAY"] = substr($properties["BYDAY"],1,2);
break;
case "4":
$properties["BYSETPOS"] = substr($properties["BYDAY"],0,2);
$properties["BYDAY"] = substr($properties["BYDAY"],2,2);
break;
case "5":
$properties["BYSETPOS"] = substr($properties["BYDAY"],0,3);
$properties["BYDAY"] = substr($properties["BYDAY"],3,2);
break;
case "6":
$properties["BYSETPOS"] = substr($properties["BYDAY"],0,4);
$properties["BYDAY"] = substr($properties["BYDAY"],4,2);
break;
}
}
$byday[$properties["BYDAY"]] = true;
}else{
$days = explode(",", $properties["BYDAY"]);
for($i = 0;$i <= $numofdays;$i++){
$day = $days[$i];
$byday[$day] = true;
}
}
}
}else{
$rule = explode("=", $vevent->RRULE);
$properties[$rule[0]] = $rule[1];
}
if($properties["INTERVAL"] == "false"){
$properties["INTERVAL"] = 1;
}
$count = 0; //counts all loops
$countedoutputs = 0; //counts only the outputs
$countchecker = true;
$dtstart = $vevent->DTSTART;
$dtend = OC_Calendar_Object::getDTEndFromVEvent($vevent);
$start_dt = $dtstart->getDateTime();
$start_dt->setTimezone(new DateTimeZone($user_timezone));
$end_dt = $dtend->getDateTime();
$end_dt->setTimezone(new DateTimeZone($user_timezone));
$firststart_year = $start_dt->format('Y');
$firststart_month = $start_dt->format('n');
$firststart_day = $start_dt->format('j');
$hour = $start_dt->format('G');
$interval = 0;
if($properties["UNTIL"] != "false"){
$until = $properties["UNTIL"];
$until_year = substr($until, 0, 4);
$until_month = substr($until, 4, 2);
$until_day = substr($until, 6, 2);
}
//print_r($properties);
//print_r($byday);
if($properties["FREQ"] == "DAILY"){
if($properties["BYDAY"] == "false"){
$byday = array("MO"=>"1", "TU"=>"1", "WE"=>"1", "TH"=>"1", "FR"=>"1", "SA"=>"1", "SU"=>"1");
}
while(date("Y", mktime(0,0,0, $firststart_month, $firststart_day, $firststart_year) + ($count * 1 * 86400 * $interval)) <= $select_year && $countchecker == true){
if($byday[strtoupper(substr(date("D", mktime(0,0,0, $firststart_month, $firststart_day, $firststart_year) + ($count * 1 * 86400 * $interval)), 0, 2))] == "1"){
$newunixtime = mktime(0,0,0, $firststart_month, $firststart_day, $firststart_year) + ($count * 1 * 86400 * $interval);
$year = date("Y", $newunixtime);
$month = date("n", $newunixtime) - 1; // return is 0 based
$day = date("j", $newunixtime);
if($properties["UNTIL"] != "false"){
if($year >= $until_year && $month + 1 >= $until_month && $day > $until_day){
break;
}
}
if ($dtstart->getDateType() == Sabre_VObject_Element_DateTime::DATE) {
$hour = 'allday';
}
$return_event = array();
foreach(array('id', 'calendarid', 'objecttype', 'repeating') as $prop){
$return_event[$prop] = $event[$prop];
}
$return_event['startdate'] = explode('|', $start_dt->format('Y|m|d|H|i'));
$return_event['enddate'] = explode('|', $end_dt->format('Y|m|d|H|i'));
$return_event['description'] = $event['summary'];
$interval = $properties["INTERVAL"];
$countedoutputs++;
if($properties["COUNT"] != "false"){
if($countedoutputs == $properties["COUNT"]){
$countchecker = false;
}
}
if ($hour == 'allday'){
$return_event['allday'] = true;
}
if (isset($return[$year][$month][$day][$hour])){
$return[$year][$month][$day][$hour][] = $return_event;
}else{
$return[$year][$month][$day][$hour] = array(1 => $return_event);
}
}
$count++;
}
}
if($properties["FREQ"] == "WEEKLY"){
if($properties["BYDAY"] == "false"){
$byday[strtoupper(substr(date("D", mktime(0,0,0, $firststart_month, $firststart_day, $firststart_year)), 0, 2))] = "1";
}
while(date("Y", mktime(0,0,0, $firststart_month, $firststart_day, $firststart_year) + ($count * 1 * 86400 * $interval)) <= $select_year && $countchecker == true){
if($byday[strtoupper(substr(date("D", mktime(0,0,0, $firststart_month, $firststart_day, $firststart_year) + ($count * 1 * 86400 * $interval)), 0, 2))] == "1"){
$newunixtime = mktime(0,0,0, $firststart_month, $firststart_day, $firststart_year) + ($count * 1 * 86400 * $interval);
$year = date("Y", $newunixtime);
$month = date("n", $newunixtime) - 1; // return is 0 based
$day = date("j", $newunixtime);
if($properties["UNTIL"] != "false"){
if($year >= $until_year && $month + 1 >= $until_month && $day > $until_day){
break;
}
}
if ($dtstart->getDateType() == Sabre_VObject_Element_DateTime::DATE) {
$hour = 'allday';
}
$return_event = array();
foreach(array('id', 'calendarid', 'objecttype', 'repeating') as $prop){
$return_event[$prop] = $event[$prop];
}
$return_event['startdate'] = explode('|', $start_dt->format('Y|m|d|H|i'));
$return_event['enddate'] = explode('|', $end_dt->format('Y|m|d|H|i'));
$return_event['description'] = $event['summary'];
$interval = $properties["INTERVAL"];
$countedoutputs++;
if($properties["COUNT"] != "false"){
if($countedoutputs == $properties["COUNT"]){
$countchecker = false;
}
}
if ($hour == 'allday'){
$return_event['allday'] = true;
}
if (isset($return[$year][$month][$day][$hour])){
$return[$year][$month][$day][$hour][] = $return_event;
}else{
$return[$year][$month][$day][$hour] = array(1 => $return_event);
}
}
$count++;
}
}
if($properties["FREQ"] == "MONTHLY"){
if(substr_count($properties["BYMONTHDAY"], ",") != 0){
$numofBYMONTHDAY = substr_count($properties["BYMONTHDAY"], ",");
if($numofBYMONTHDAY == 0){
$BYMONTHDAY = array();
$BYMONTHDAY[0] = $properties["BYMONTHDAY"];
}else{
$BYMONTHDAY = explode(",", $properties["BYMONTHDAY"]);
}
while(date("Y", mktime(0,0,0, $firststart_month + ($count * $interval), $properties["BYMONTHDAY"], $firststart_year)) <= $select_year && $countchecker == true){
for($i = 0;$i <= $numofBYMONTHDAY;$i++){
$newunixtime = mktime(0,0,0, $firststart_month + ($count * $interval), $BYMONTHDAY[$i], $firststart_year);
$year = date("Y", $newunixtime);
$month = date("n", $newunixtime) - 1; // return is 0 based
$day = date("j", $newunixtime);
if($properties["UNTIL"] != "false"){
if($year >= $until_year && $month + 1 >= $until_month && $day > $until_day){
break;
}
}
if ($dtstart->getDateType() == Sabre_VObject_Element_DateTime::DATE) {
$hour = 'allday';
}
$return_event = array();
foreach(array('id', 'calendarid', 'objecttype', 'repeating') as $prop){
$return_event[$prop] = $event[$prop];
}
$return_event['startdate'] = explode('|', $start_dt->format('Y|m|d|H|i'));
$return_event['enddate'] = explode('|', $end_dt->format('Y|m|d|H|i'));
$return_event['description'] = $event['summary'];
$interval = $properties["INTERVAL"];
$countedoutputs++;
if($properties["COUNT"] != "false"){
if($countedoutputs == $properties["COUNT"]){
$countchecker = false;
}
}
if ($hour == 'allday'){
$return_event['allday'] = true;
}
if (isset($return[$year][$month][$day][$hour])){
$return[$year][$month][$day][$hour][] = $return_event;
}else{
$return[$year][$month][$day][$hour] = array(1 => $return_event);
}
}
$count++;
}
}
//if($properties["BYMONTHDAY"] != "false"){
if($properties["BYSETPOS"] == "false"){
while(date("Y", mktime(0,0,0, $firststart_month + ($count * $interval), $properties["BYMONTHDAY"], $firststart_year)) <= $select_year && $countchecker == true){
$newunixtime = mktime(0,0,0, $firststart_month + ($count * $interval), $properties["BYMONTHDAY"], $firststart_year);
$year = date("Y", $newunixtime);
$month = date("n", $newunixtime) - 1; // return is 0 based
$day = date("j", $newunixtime);
if($properties["UNTIL"] != "false"){
if($year >= $until_year && $month + 1 >= $until_month && $day > $until_day){
break;
}
}
if ($dtstart->getDateType() == Sabre_VObject_Element_DateTime::DATE) {
$hour = 'allday';
}
$return_event = array();
foreach(array('id', 'calendarid', 'objecttype', 'repeating') as $prop){
$return_event[$prop] = $event[$prop];
}
$return_event['startdate'] = explode('|', $start_dt->format('Y|m|d|H|i'));
$return_event['enddate'] = explode('|', $end_dt->format('Y|m|d|H|i'));
$return_event['description'] = $event['summary'];
$interval = $properties["INTERVAL"];
$countedoutputs++;
if($properties["COUNT"] != "false"){
if($countedoutputs == $properties["COUNT"]){
$countchecker = false;
}
}
if ($hour == 'allday'){
$return_event['allday'] = true;
}
if (isset($return[$year][$month][$day][$hour])){
$return[$year][$month][$day][$hour][] = $return_event;
}else{
$return[$year][$month][$day][$hour] = array(1 => $return_event);
}
$count++;
}
}else{
if(!is_nan($properties["BYSETPOS"]) && $properties["BYSETPOS"] >= 1){
while(date("Y", mktime(0,0,0, $firststart_month + ($count * $interval), $firststart_day, $firststart_year)) <= $select_year && $countchecker == true){
$lastdayofmonth = date("t", mktime(0,0,0, $firststart_month + ($count * $interval), $firststart_day, $firststart_year));
$matches = 0;
$matchedday = "";
for($i = 1;$i <= $lastdayofmonth;$i++){
$thisday = date("j", mktime(0,0,0, $firststart_month + ($count * $interval), $i, $firststart_year));
$thisdayname = strtoupper(substr(date("D", mktime(0,0,0, $firststart_month + ($count * $interval), $i, $firststart_year)),0,2));
//echo $thisdayname . " " . $thisday . "\n";
if($byday[$thisdayname] == 1){
$matches++;
}
if($matches == $properties["BYSETPOS"]){
$matchedday = $thisday;
$i = 32;
}
}
$newunixtime = mktime(0,0,0, $firststart_month + ($count * $interval), $firststart_day, $firststart_year);
$year = date("Y", $newunixtime);
$month = date("n", $newunixtime) - 1; // return is 0 based
$day = $matchedday;
if($properties["UNTIL"] != "false"){
if($year >= $until_year && $month + 1 >= $until_month && $day > $until_day){
break;
}
}
if ($dtstart->getDateType() == Sabre_VObject_Element_DateTime::DATE) {
$hour = 'allday';
}
$return_event = array();
foreach(array('id', 'calendarid', 'objecttype', 'repeating') as $prop){
$return_event[$prop] = $event[$prop];
}
$return_event['startdate'] = explode('|', $start_dt->format('Y|m|d|H|i'));
$return_event['enddate'] = explode('|', $end_dt->format('Y|m|d|H|i'));
$return_event['description'] = $event['summary'];
$interval = $properties["INTERVAL"];
$countedoutputs++;
if($properties["COUNT"] != "false"){
if($countedoutputs == $properties["COUNT"]){
$countchecker = false;
}
}
if ($hour == 'allday'){
$return_event['allday'] = true;
}
if (isset($return[$year][$month][$day][$hour])){
$return[$year][$month][$day][$hour][] = $return_event;
}else{
$return[$year][$month][$day][$hour] = array(1 => $return_event);
}
$count++;
}
}elseif(!is_nan($properties["BYSETPOS"]) && $properties["BYSETPOS"] <= -1){
while(date("Y", mktime(0,0,0, $firststart_month + ($count * $interval), $firststart_day, $firststart_year)) <= $select_year && $countchecker == true){
$lastdayofmonth = date("t", mktime(0,0,0, $firststart_month + ($count * $interval), 1, $firststart_year));
$matches = 0;
$matchedday = "";
for($i = $lastdayofmonth;$i >= 1;$i--){
$thisday = date("j", mktime(0,0,0, $firststart_month + ($count * $interval), $i, $firststart_year));
$thisdayname = strtoupper(substr(date("D", mktime(0,0,0, $firststart_month + ($count * $interval), $i, $firststart_year)),0,2));
//echo $thisdayname . " " . $thisday . "\n";
if($byday[$thisdayname] == 1){
$matches++;
}
if($matches == $properties["BYSETPOS"]){
$matchedday = $thisday;
$i = 0;
}
}
$newunixtime = mktime(0,0,0, $firststart_month + ($count * $interval), $firststart_day, $firststart_year);
$year = date("Y", $newunixtime);
$month = date("n", $newunixtime) - 1; // return is 0 based
$day = $matchedday;
if($properties["UNTIL"] != "false"){
if($year >= $until_year && $month + 1 >= $until_month && $day > $until_day){
break;
}
}
if ($dtstart->getDateType() == Sabre_VObject_Element_DateTime::DATE) {
$hour = 'allday';
}
$return_event = array();
foreach(array('id', 'calendarid', 'objecttype', 'repeating') as $prop){
$return_event[$prop] = $event[$prop];
}
$return_event['startdate'] = explode('|', $start_dt->format('Y|m|d|H|i'));
$return_event['enddate'] = explode('|', $end_dt->format('Y|m|d|H|i'));
$return_event['description'] = $event['summary'];
$interval = $properties["INTERVAL"];
$countedoutputs++;
if($properties["COUNT"] != "false"){
if($countedoutputs == $properties["COUNT"]){
$countchecker = false;
}
}
if ($hour == 'allday'){
$return_event['allday'] = true;
}
if (isset($return[$year][$month][$day][$hour])){
$return[$year][$month][$day][$hour][] = $return_event;
}else{
$return[$year][$month][$day][$hour] = array(1 => $return_event);
}
$count++;
}
//}
}
}
if(strlen($properties["BYDAY"]) == 2){
while(date("Y", mktime(0,0,0, $firststart_month + ($count * $interval), $firststart_day, $firststart_year)) <= $select_year && $countchecker == true){
if($byday[strtoupper(substr(date("D", mktime(0,0,0, $firststart_month + ($count * $interval), $firststart_day, $firststart_year)), 0, 2))] == "1"){
$newunixtime = mktime(0,0,0, $firststart_month + ($count * $interval), $firststart_day, $firststart_year);
$year = date("Y", $newunixtime);
$month = date("n", $newunixtime) - 1; // return is 0 based
$day = date("j", $newunixtime);
if($properties["UNTIL"] != "false"){
if($year >= $until_year && $month + 1 >= $until_month && $day > $until_day){
break;
}
}
if ($dtstart->getDateType() == Sabre_VObject_Element_DateTime::DATE) {
$hour = 'allday';
}
$return_event = array();
foreach(array('id', 'calendarid', 'objecttype', 'repeating') as $prop){
$return_event[$prop] = $event[$prop];
}
$return_event['startdate'] = explode('|', $start_dt->format('Y|m|d|H|i'));
$return_event['enddate'] = explode('|', $end_dt->format('Y|m|d|H|i'));
$return_event['description'] = $event['summary'];
$interval = $properties["INTERVAL"];
$countedoutputs++;
if($properties["COUNT"] != "false"){
if($countedoutputs == $properties["COUNT"]){
$countchecker = false;
}
}
if ($hour == 'allday'){
$return_event['allday'] = true;
}
if (isset($return[$year][$month][$day][$hour])){
$return[$year][$month][$day][$hour][] = $return_event;
}else{
$return[$year][$month][$day][$hour] = array(1 => $return_event);
}
}
$count++;
}
}else{
while(date("Y", mktime(0,0,0, 0, 0, $firststart_year + ($count * $interval))) <= $select_year && $countchecker == true){
$newunixtime = mktime(0,0,0, $properties["BYMONTH"], $properties["BYMONTHDAY"], $firststart_year + ($count * $interval));
$year = date("Y", $newunixtime);
$month = $month - 1; // return is 0 based
$day = $dateofweekone;
if($properties["UNTIL"] != "false"){
if($year >= $until_year && $month + 1 >= $until_month && $day > $until_day){
break;
}
}
if ($dtstart->getDateType() == Sabre_VObject_Element_DateTime::DATE) {
$hour = 'allday';
}
$return_event = array();
foreach(array('id', 'calendarid', 'objecttype', 'repeating') as $prop){
$return_event[$prop] = $event[$prop];
}
$return_event['startdate'] = explode('|', $start_dt->format('Y|m|d|H|i'));
$return_event['enddate'] = explode('|', $end_dt->format('Y|m|d|H|i'));
$return_event['description'] = $event['summary'];
$interval = $properties["INTERVAL"];
$countedoutputs++;
if($properties["COUNT"] != "false"){
if($countedoutputs == $properties["COUNT"]){
$countchecker = false;
}
}
if ($hour == 'allday'){
$return_event['allday'] = true;
}
if (isset($return[$year][$month][$day][$hour])){
$return[$year][$month][$day][$hour][] = $return_event;
}else{
$return[$year][$month][$day][$hour] = array(1 => $return_event);
}
$count++;
}
}
}
if($properties["FREQ"] == "YEARLY"){
if($properties["BYMONTH"] != "false"){
if($properties["BYMONTHDAY"] == false){
$properties["BYMONTHDAY"] = date("j", mktime(0,0,0, $firststart_month, $firststart_day, $firststart_year));
}
if($properties["BYDAY"] == "false"){
while(date("Y", mktime(0,0,0, $properties["BYMONTH"], $properties["BYMONTHDAY"], $firststart_year + ($count * $interval))) <= $select_year && $countchecker == true){
$newunixtime = mktime(0,0,0, $properties["BYMONTH"], $properties["BYMONTHDAY"], $firststart_year + ($count * $interval));
$year = date("Y", $newunixtime);
$month = date("n", $newunixtime) - 1; // return is 0 based
$day = date("j", $newunixtime);
if($properties["UNTIL"] != "false"){
if($year >= $until_year && $month + 1 >= $until_month && $day > $until_day){
break;
}
}
if ($dtstart->getDateType() == Sabre_VObject_Element_DateTime::DATE) {
$hour = 'allday';
}
$return_event = array();
foreach(array('id', 'calendarid', 'objecttype', 'repeating') as $prop){
$return_event[$prop] = $event[$prop];
}
$return_event['startdate'] = explode('|', $start_dt->format('Y|m|d|H|i'));
$return_event['enddate'] = explode('|', $end_dt->format('Y|m|d|H|i'));
$return_event['description'] = $event['summary'];
$interval = $properties["INTERVAL"];
$countedoutputs++;
if($properties["COUNT"] != "false"){
if($countedoutputs == $properties["COUNT"]){
$countchecker = false;
}
}
if ($hour == 'allday'){
$return_event['allday'] = true;
}
if (isset($return[$year][$month][$day][$hour])){
$return[$year][$month][$day][$hour][] = $return_event;
}else{
$return[$year][$month][$day][$hour] = array(1 => $return_event);
}
$count++;
}
}
if(strlen($properties["BYDAY"]) == 2){
while(date("Y", mktime(0,0,0, $properties["BYMONTH"], $properties["BYMONTHDAY"], $firststart_year + ($count * $interval))) <= $select_year && $countchecker == true){
$newunixtime = mktime(0,0,0, $properties["BYMONTH"], $properties["BYMONTHDAY"], $firststart_year + ($count * $interval));
$year = date("Y", $newunixtime);
$month = date("n", $newunixtime) - 1; // return is 0 based
$day = date("j", $newunixtime);
if($properties["UNTIL"] != "false"){
if($year >= $until_year && $month + 1 >= $until_month && $day > $until_day){
break;
}
}
if ($dtstart->getDateType() == Sabre_VObject_Element_DateTime::DATE) {
$hour = 'allday';
}
$return_event = array();
foreach(array('id', 'calendarid', 'objecttype', 'repeating') as $prop){
$return_event[$prop] = $event[$prop];
}
$return_event['startdate'] = explode('|', $start_dt->format('Y|m|d|H|i'));
$return_event['enddate'] = explode('|', $end_dt->format('Y|m|d|H|i'));
$return_event['description'] = $event['summary'];
$interval = $properties["INTERVAL"];
$countedoutputs++;
if($properties["COUNT"] != "false"){
if($countedoutputs == $properties["COUNT"]){
$countchecker = false;
}
}
if ($hour == 'allday'){
$return_event['allday'] = true;
}
if (isset($return[$year][$month][$day][$hour])){
$return[$year][$month][$day][$hour][] = $return_event;
}else{
$return[$year][$month][$day][$hour] = array(1 => $return_event);
}
$count++;
}
}else{
$number = substr($properties["BYDAY"],0,1);
$weekday = substr($properties["BYDAY"],1,2);
$month = $properties["BYMONTH"];
$dateofweekone = "";
for($i = 0; $i <= 7;$i++){
if(strtoupper(substr(date("D", mktime(0,0,0, $properties["BYMONTH"], $i, $select_year)), 0, 2)) == $weekday){
$dateofweekone = date("j", mktime(0,0,0, $properties["BYMONTH"], $i, $select_year));
$i = 8;
}
}
if($number != 1){
$dateofweekone = $dateofweekone + (7 * ($number - 1));
}
while(date("Y", mktime(0,0,0, 0, 0, $firststart_year + ($count * $interval))) <= $select_year && $countchecker == true){
$newunixtime = mktime(0,0,0, $properties["BYMONTH"], $properties["BYMONTHDAY"], $firststart_year + ($count * $interval));
$year = date("Y", $newunixtime);
$month = $month - 1; // return is 0 based
$day = $dateofweekone;
if($properties["UNTIL"] != "false"){
if($year >= $until_year && $month + 1 >= $until_month && $day > $until_day){
break;
}
}
if ($dtstart->getDateType() == Sabre_VObject_Element_DateTime::DATE) {
$hour = 'allday';
}
$return_event = array();
foreach(array('id', 'calendarid', 'objecttype', 'repeating') as $prop){
$return_event[$prop] = $event[$prop];
}
$return_event['startdate'] = explode('|', $start_dt->format('Y|m|d|H|i'));
$return_event['enddate'] = explode('|', $end_dt->format('Y|m|d|H|i'));
$return_event['description'] = $event['summary'];
$interval = $properties["INTERVAL"];
$countedoutputs++;
if($properties["COUNT"] != "false"){
if($countedoutputs == $properties["COUNT"]){
$countchecker = false;
}
}
if ($hour == 'allday'){
$return_event['allday'] = true;
}
if (isset($return[$year][$month][$day][$hour])){
$return[$year][$month][$day][$hour][] = $return_event;
}else{
$return[$year][$month][$day][$hour] = array(1 => $return_event);
}
$count++;
}
}
}elseif($properties["BYYEARDAY"] != false){
$numofyeardays = substr_count($properties["BYYEARDAY"], ",");
if($numofyeardays == 0){
$yeardays = array();
$yeardays[0] = $properties["BYYEARDAY"];
}else{
$yeardays = explode(",", $properties["BYYEARDAY"]);
}
while(date("Y", mktime(0,0,0, 0, 0, $firststart_year + ($count * $interval)) + ($yeardays[$numofyeardays]-1) * 86400) <= $select_year && $countchecker == true){
for($i = 0;$i <= $numofyeardays;$i++){
$newunixtime = mktime(0,0,0, 1, 1, $firststart_year + ($count * $interval)) + ($yeardays[$i] -1) * 86400;
$year = date("Y", $newunixtime);
$month = date("n", $newunixtime) - 1; // return is 0 based
$day = date("j", $newunixtime);
if($properties["UNTIL"] != "false"){
if($year >= $until_year && $month + 1 >= $until_month && $day > $until_day){
break;
}
}
if ($dtstart->getDateType() == Sabre_VObject_Element_DateTime::DATE) {
$hour = 'allday';
}
$return_event = array();
foreach(array('id', 'calendarid', 'objecttype', 'repeating') as $prop){
$return_event[$prop] = $event[$prop];
}
$return_event['startdate'] = explode('|', $start_dt->format('Y|m|d|H|i'));
$return_event['enddate'] = explode('|', $end_dt->format('Y|m|d|H|i'));
$return_event['description'] = $event['summary'];
$interval = $properties["INTERVAL"];
$countedoutputs++;
if($properties["COUNT"] != "false"){
if($countedoutputs == $properties["COUNT"]){
$countchecker = false;
}
}
if ($hour == 'allday'){
$return_event['allday'] = true;
}
if (isset($return[$year][$month][$day][$hour])){
$return[$year][$month][$day][$hour][] = $return_event;
}else{
$return[$year][$month][$day][$hour] = array(1 => $return_event);
}
}
$count++;
}
}
}
}
}
OC_JSON::encodedPrint($return);

View File

@ -5,7 +5,7 @@
* See the COPYING-README file.
*/
#view {margin-left: 10px; float: left; font-size: 12px;}
#view { float: left; font-size: 12px; height: 100%;}
#datecontrol {text-align: center;}
#datecontrol_left{font-size: 12px;}
#datecontrol_right{font-size: 12px;}
@ -17,7 +17,6 @@
#editentry_dialog {display: none;}
#parsingfail_dialog{display: none;}
#view {margin-left: 10px; float: left; font-size: 12px; height: 100%;}
#calendar_holder {height: 100%; width: 100%;}
#onedayview, #oneweekview, #fourweeksview, #onemonthview, #listview {display: none; position: absolute;bottom: 0; right: 0; left: 160px; top: 80px;}
#onedayview table {margin: 0; padding: 0; width: 100%; height: 100%; border-spacing:1px; background: #EEEEEE;}
@ -59,5 +58,5 @@ color:#A9A9A9;
select#category{width:140px;}
button.category{margin:0 3px;}
.calendar-colorpicker-color{display:inline-block;width:20px;height:20px;margin-right:2px;cursor:pointer;}
.calendar-colorpicker-color.active{background-image:url("../../../core/img/jquery-ui/ui-icons_222222_256x240.png");background-position:-62px -143px;}
.calendar-colorpicker-color{display:inline-block;width:20px;height:20px;margin-right:2px;cursor:pointer;border:2px solid transparent;}
.calendar-colorpicker-color.active{border:2px solid black;}

View File

@ -491,8 +491,6 @@ Calendar={
// based on jquery-colorpicker at jquery.webspirited.com
var obj = $('.colorpicker', container);
var picker = $('<div class="calendar-colorpicker"></div>');
var size = 20;
//build an array of colors
var colors = {};
$(obj).children('option').each(function(i, elm) {
@ -501,7 +499,7 @@ Calendar={
colors[i].label = $(elm).text();
});
for (var i in colors) {
picker.append('<span class="calendar-colorpicker-color ' + (colors[i].color == $(obj).children(":selected").val() ? ' active' : '') + '" rel="' + colors[i].label + '" style="background-color: #' + colors[i].color + '; width: ' + size + 'px; height: ' + size + 'px;"></span>');
picker.append('<span class="calendar-colorpicker-color ' + (colors[i].color == $(obj).children(":selected").val() ? ' active' : '') + '" rel="' + colors[i].label + '" style="background-color: #' + colors[i].color + ';"></span>');
}
picker.delegate(".calendar-colorpicker-color", "click", function() {
$(obj).val($(this).attr('rel'));

View File

@ -11,34 +11,36 @@ OC_UTIL::addStyle('', 'jquery.multiselect');
?>
<form id="calendar">
<fieldset class="personalblock">
<table class="nostyle">
<tr><td><label for="timezone" class="bold"><?php echo $l->t('Timezone');?></label></td><td><select style="display: none;" id="timezone" name="timezone">
<table class="nostyle">
<tr><td><label for="timezone" class="bold"><?php echo $l->t('Timezone');?></label></td><td><select style="display: none;" id="timezone" name="timezone">
<?php
$continent = '';
foreach($_['timezones'] as $timezone):
if ( preg_match( '/^(America|Antartica|Arctic|Asia|Atlantic|Europe|Indian|Pacific)\//', $timezone ) ):
$ex=explode('/', $timezone, 2);//obtain continent,city
if ($continent!=$ex[0]):
if ($continent!="") echo '</optgroup>';
echo '<optgroup label="'.$ex[0].'">';
endif;
$city=$ex[1];
$continent=$ex[0];
echo '<option value="'.$timezone.'"'.($_['timezone'] == $timezone?' selected="selected"':'').'>'.$city.'</option>';
endif;
$continent = '';
foreach($_['timezones'] as $timezone):
$ex=explode('/', $timezone, 2);//obtain continent,city
if (!isset($ex[1])) {
$ex[1] = $ex[0];
$ex[0] = "Other";
}
if ($continent!=$ex[0]):
if ($continent!="") echo '</optgroup>';
echo '<optgroup label="'.$ex[0].'">';
endif;
$city=strtr($ex[1], '_', ' ');
$continent=$ex[0];
echo '<option value="'.$timezone.'"'.($_['timezone'] == $timezone?' selected="selected"':'').'>'.$city.'</option>';
endforeach;?>
</select></td></tr>
</select></td></tr>
<tr><td><label for="timeformat" class="bold"><?php echo $l->t('Timeformat');?></label></td><td>
<select style="display: none;" id="timeformat" title="<?php echo "timeformat"; ?>" name="timeformat">
<option value="24" id="24h"><?php echo $l->t("24h"); ?></option>
<option value="ampm" id="ampm"><?php echo $l->t("12h"); ?></option>
</select>
</td></tr>
<tr><td><label for="timeformat" class="bold"><?php echo $l->t('Timeformat');?></label></td><td>
<select style="display: none;" id="timeformat" title="<?php echo "timeformat"; ?>" name="timeformat">
<option value="24" id="24h"><?php echo $l->t("24h"); ?></option>
<option value="ampm" id="ampm"><?php echo $l->t("12h"); ?></option>
</select>
</td></tr>
</table>
</table>
<?php echo $l->t('Calendar CalDAV syncing address:');?>
<?php echo OC_Helper::linkTo('apps/calendar', 'caldav.php', null, true); ?><br />
<?php echo $l->t('Calendar CalDAV syncing address:');?>
<?php echo OC_Helper::linkTo('apps/calendar', 'caldav.php', null, true); ?><br />
</fieldset>
</form>

View File

@ -30,8 +30,9 @@ if ($source !== false) {
foreach (OC_Files::getdirectorycontent($source) as $i) {
$i['date'] = OC_Util::formatDate($i['mtime'] );
if ($i['type'] == 'file') {
$i['extention'] = substr($i['name'], strrpos($i['name'], "."));
$i['basename'] = substr($i['name'], 0, strrpos($i['name'], "."));
$fileinfo = pathinfo($i['name']);
$i['basename'] = $fileinfo['filename'];
$i['extention'] = isset($fileinfo['extension']) ? ('.'.$fileinfo['extension']) : '';
}
$i['directory'] = substr($i['directory'], $rootLength);
if ($i['directory'] == "/") {
@ -70,7 +71,7 @@ if ($source !== false) {
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Pragma: public");
header("Content-Disposition: filename=".basename($source));
header('Content-Disposition: filename="'.basename($source).'"');
header("Content-Type: " . $mimetype);
header("Content-Length: " . OC_Filesystem::filesize($source));
//download the file

View File

@ -1,5 +1,7 @@
<?php
require_once('../../../lib/base.php');
OC_JSON::checkLoggedIn();
OC_JSON::checkAppEnabled('gallery');
function CroppedThumbnail($imgSrc,$thumbnail_width,$thumbnail_height) { //$imgSrc is a FILE - Returns an image resource.
//getting the image dimensions
@ -36,11 +38,6 @@ function CroppedThumbnail($imgSrc,$thumbnail_width,$thumbnail_height) { //$imgSr
return $thumb;
}
// Check if we are a user
if( !OC_User::isLoggedIn()){
echo json_encode( array( 'status' => 'error', 'data' => array( 'message' => 'You need to log in.')));
exit();
}
$box_size = 200;
$album_name = $_GET['album'];
$x = $_GET['x'];

View File

@ -1,14 +1,11 @@
<?php
require_once('../../../lib/base.php');
if( !OC_User::isLoggedIn()){
echo json_encode( array( 'status' => 'error', 'data' => array( 'message' => 'You need to log in.')));
exit();
}
OC_JSON::checkLoggedIn();
OC_JSON::checkAppEnabled('gallery');
$stmt = OC_DB::prepare('INSERT INTO *PREFIX*gallery_albums ("uid_owner", "album_name") VALUES ("'.OC_User::getUser().'", "'.$_GET['album_name'].'")');
$stmt->execute(array());
echo json_encode(array( 'status' => 'success', 'name' => $_GET['album_name']));
OC_JSON::success(array('name' => $_GET['album_name']));
?>

View File

@ -1,10 +1,7 @@
<?php
require_once('../../../lib/base.php');
if (!OC_User::IsLoggedIn()) {
echo json_encode(array('status' => 'error', 'message' => 'You need to log in'));
exit();
}
OC_JSON::checkLoggedIn();
OC_JSON::checkAppEnabled('gallery');
$a = array();
$stmt = OC_DB::prepare('SELECT * FROM *PREFIX*gallery_albums WHERE `uid_owner` = ?');
@ -17,6 +14,6 @@ while ($r = $result->fetchRow()) {
$a[] = array('name' => $album_name, 'numOfItems' => min($tmp_res->numRows(), 10));
}
echo json_encode(array('status'=>'success', 'albums'=>$a));
OC_JSON::success(array('albums'=>$a));
?>

View File

@ -1,5 +1,7 @@
<?php
require_once('../../../lib/base.php');
OC_JSON::checkLoggedIn();
OC_JSON::checkAppEnabled('gallery');
function CroppedThumbnail($imgSrc,$thumbnail_width,$thumbnail_height, $tgtImg, $shift) {
//getting the image dimensions
@ -38,11 +40,6 @@ function CroppedThumbnail($imgSrc,$thumbnail_width,$thumbnail_height, $tgtImg, $
imagedestroy($myImage);
}
// Check if we are a user
if( !OC_User::isLoggedIn()){
echo json_encode( array( 'status' => 'error', 'data' => array( 'message' => 'You need to log in.')));
exit();
}
$box_size = 200;
$album_name= $_GET['album_name'];
@ -61,6 +58,12 @@ while (($i = $result->fetchRow()) && $counter < $numOfItems) {
header('Content-Type: image/png');
$offset = 3600 * 24;
// calc the string in GMT not localtime and add the offset
header("Expires: " . gmdate("D, d M Y H:i:s", time() + $offset) . " GMT");
header('Cache-Control: max-age=3600, must-revalidate');
header('Pragma: public');
imagepng($targetImg);
imagedestroy($targetImg);
?>

View File

@ -1,14 +1,11 @@
<?php
require_once('../../../lib/base.php');
OC_JSON::checkLoggedIn();
OC_JSON::checkAppEnabled('gallery');
require_once('../lib_scanner.php');
if (!OC_User::IsLoggedIn()) {
echo json_encode(array('status' => 'error', 'message' => 'You need to log in'));
exit();
}
echo json_encode(array( 'status' => 'success', 'albums' => OC_GALLERY_SCANNER::scan('')));
//echo json_encode(array('status' => 'success', 'albums' => array(array('name' => 'test', 'imagesCount' => 1, 'images' => array('dupa')))));
OC_JSON::success(array('albums' => OC_GALLERY_SCANNER::scan('')));
//OC_JSON::success(array('albums' => array(array('name' => 'test', 'imagesCount' => 1, 'images' => array('dupa')))));
?>

View File

@ -1,5 +1,7 @@
<?php
require_once('../../../lib/base.php');
OC_JSON::checkLoggedIn();
OC_JSON::checkAppEnabled('gallery');
function CroppedThumbnail($imgSrc,$thumbnail_width,$thumbnail_height) { //$imgSrc is a FILE - Returns an image resource.
//getting the image dimensions
@ -40,11 +42,6 @@ function CroppedThumbnail($imgSrc,$thumbnail_width,$thumbnail_height) { //$imgSr
return $thumb;
}
// Check if we are a user
if( !OC_User::isLoggedIn()){
echo json_encode( array( 'status' => 'error', 'data' => array( 'message' => 'You need to log in.')));
exit();
}
$box_size = 200;
$img = $_GET['img'];

View File

@ -8,7 +8,7 @@ OC_App::addNavigationEntry( array(
'id' => 'gallery_index',
'order' => 20,
'href' => OC_Helper::linkTo('gallery', 'index.php'),
'icon' => OC_Helper::linkTo('', 'core/img/filetypes/image.png'),
'icon' => OC_Helper::imagePath('core', 'places/picture.svg'),
'name' => 'Gallery'));
class OC_GallerySearchProvider extends OC_Search_Provider{
@ -17,7 +17,7 @@ OC_App::addNavigationEntry( array(
$result = $stmt->execute(array(OC_User::getUser(),'%'.$query.'%'));
$results=array();
while($row=$result->fetchRow()){
$results[]=new OC_Search_Result($row['album_name'],'',OC_Helper::linkTo( 'apps/gallery', 'index.php?view='.$row['album_name']),'Galleries');
$results[]=new OC_Search_Result($row['album_name'],'',OC_Helper::linkTo('apps/gallery', 'index.php?view='.$row['album_name']),'Galleries');
}
return $results;
}

View File

@ -2,6 +2,7 @@
require_once('../../lib/base.php');
OC_Util::checkLoggedIn();
OC_Util::checkAppEnabled('gallery');
OC_App::setActiveNavigationEntry( 'gallery_index' );

View File

@ -42,7 +42,7 @@ class OC_GALLERY_SCANNER {
$stmt = OC_DB::prepare('SELECT * FROM *PREFIX*gallery_photos WHERE `album_id` = ? AND `file_path` = ?');
$result = $stmt->execute(array($albumId, $img));
if ($result->numRows() == 0) {
$stmt = OC_DB::prepare('INSERT OR REPLACE INTO *PREFIX*gallery_photos (`album_id`, `file_path`) VALUES (?, ?)');
$stmt = OC_DB::prepare('REPLACE INTO *PREFIX*gallery_photos (`album_id`, `file_path`) VALUES (?, ?)');
$stmt->execute(array($albumId, $img));
}
}

View File

@ -29,5 +29,5 @@ OC_APP::registerPersonal('media','settings');
OC_App::register( array( 'order' => 3, 'id' => 'media', 'name' => 'Media' ));
OC_App::addNavigationEntry( array( 'id' => 'media_index', 'order' => 2, 'href' => OC_Helper::linkTo( 'media', 'index.php' ), 'icon' => OC_Helper::imagePath( 'core', 'filetypes/audio.svg' ), 'name' => $l->t('Music') ));
OC_App::addNavigationEntry(array('id' => 'media_index', 'order' => 2, 'href' => OC_Helper::linkTo('media', 'index.php'), 'icon' => OC_Helper::imagePath('core', 'places/music.svg'), 'name' => $l->t('Music')));
?>

View File

@ -1,6 +1,6 @@
#controls ul.jp-controls { padding:0; }
#controls ul.jp-controls li { display:inline; }
#controls ul.jp-controls li a { position:absolute; padding:.8em 1em; }
#controls ul.jp-controls li a { position:absolute; padding:.8em 1em .8em 0; }
a.jp-play, a.jp-pause { left:2.5em; }
a.jp-pause { display:none; }
a.jp-next { left:5em; }
@ -39,7 +39,7 @@ tr.album td.artist { padding-left:1em; }
tr.song td.artist { padding-left:2em; }
.add {margin: 0 0.5em 0 0; }
#scan { position:absolute; right:13em; top:0em; }
#scan { position:absolute; right:13.5em; top:0em; }
#scan .start { position:relative; display:inline; float:right; }
#scan .stop { position:relative; display:inline; float:right; }
#scan #scanprogressbar { position:relative; display:inline-block; width:10em; height:1.5em; top:.4em; }

View File

@ -7,5 +7,4 @@
<licence>AGPL</licence>
<author>Robin Appelman</author>
<require>2</require>
<default_enable/>
</info>

View File

@ -50,7 +50,7 @@ input[type="submit"].enabled { background:#66f866; border:1px solid #5e5; -moz-b
input[type="submit"].highlight{ background:#ffc100; border:1px solid #db0; text-shadow:#ffeedd 0 1px 0; -moz-box-shadow:0 1px 1px #f8f8f8, 0 1px 1px #ffeedd inset; -webkit-box-shadow:0 1px 1px #f8f8f8, 0 1px 1px #ffeedd inset; box-shadow:0 1px 1px #f8f8f8, 0 1px 1px #ffeedd inset; }
/* CONTENT ------------------------------------------------------------------ */
#controls { width:100%; top:3.5em; height:2.8em; margin:0; background:#f7f7f7; border-bottom:1px solid #eee; position:fixed; z-index:50; -moz-box-shadow:0 -3px 7px #000; -webkit-box-shadow:0 -3px 7px #000; box-shadow:0 -3px 7px #000; }
#controls { padding: 0 0.5em; width:100%; top:3.5em; height:2.8em; margin:0; background:#f7f7f7; border-bottom:1px solid #eee; position:fixed; z-index:50; -moz-box-shadow:0 -3px 7px #000; -webkit-box-shadow:0 -3px 7px #000; box-shadow:0 -3px 7px #000; }
#controls .button { display:inline-block; }
#content { margin:3.5em 0 0 12.5em; }
#leftcontent, .leftcontent { position:fixed; overflow: auto; top:6.4em; width:20em; background:#f8f8f8; border-right:1px solid #ddd; }
@ -117,7 +117,7 @@ tbody tr:hover, tr:active { background-color:#f8f8f8; }
#quotatext {padding: .6em 1em;}
div.jp-play-bar, div.jp-seek-bar { padding:0; }
.pager { list-style:none; float:right; display:inline; margin:.7em 12.7em 0 0; }
.pager { list-style:none; float:right; display:inline; margin:.7em 13em 0 0; }
.pager li { display:inline-block; }
li.error { width:640px; margin:4em auto; padding:1em 1em 1em 4em; background:#ffe .8em .8em no-repeat; border:1px solid #ccc; -moz-border-radius:10px; -webkit-border-radius:10px; border-radius:10px; }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 561 B

After

Width:  |  Height:  |  Size: 385 B

BIN
core/img/filetypes/c.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 587 B

BIN
core/img/filetypes/code.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 603 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 621 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 700 B

BIN
core/img/filetypes/css.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 524 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 390 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 391 B

After

Width:  |  Height:  |  Size: 294 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 582 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 537 B

BIN
core/img/filetypes/font.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 813 B

BIN
core/img/filetypes/h.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 603 B

BIN
core/img/filetypes/html.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 578 B

BIN
core/img/filetypes/ical.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 675 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 307 B

After

Width:  |  Height:  |  Size: 606 B

BIN
core/img/filetypes/link.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 923 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 452 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 566 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 519 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 342 B

BIN
core/img/filetypes/pdf.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 591 B

BIN
core/img/filetypes/php.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 538 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 519 B

View File

@ -0,0 +1,22 @@
Silk icon set 1.3
_________________________________________
Mark James
http://www.famfamfam.com/lab/icons/silk/
_________________________________________
This work is licensed under a
Creative Commons Attribution 2.5 License.
[ http://creativecommons.org/licenses/by/2.5/ ]
This means you may use it for any purpose,
and make any changes you like.
All I ask is that you include a link back
to this page in your credits.
Are you using this icon set? Send me an email
(including a link or picture if available) to
mjames@gmail.com
Any other questions about this icon set please
contact mjames@gmail.com

BIN
core/img/filetypes/rss.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 691 B

BIN
core/img/filetypes/ruby.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 626 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 859 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 566 B

BIN
core/img/filetypes/svg.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 481 B

BIN
core/img/filetypes/text.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 342 B

BIN
core/img/filetypes/vcf.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 533 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 653 B

BIN
core/img/filetypes/x-.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 555 B

BIN
core/img/places/file.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 391 B

View File

Before

Width:  |  Height:  |  Size: 58 KiB

After

Width:  |  Height:  |  Size: 58 KiB

BIN
core/img/places/music.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 561 B

View File

Before

Width:  |  Height:  |  Size: 51 KiB

After

Width:  |  Height:  |  Size: 51 KiB

BIN
core/img/places/picture.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 307 B

View File

Before

Width:  |  Height:  |  Size: 52 KiB

After

Width:  |  Height:  |  Size: 52 KiB

View File

@ -10,7 +10,7 @@
.file_upload_form, #file_newfolder_form { display:inline; float: left;}
#fileSelector, #file_upload_submit, #file_newfolder_submit { display:none; }
.file_upload_wrapper, #file_newfolder_name { background-repeat:no-repeat; background-position:.5em .5em; padding-left:2em; }
.file_upload_wrapper { font-weight:bold; display:-moz-inline-box; /* fallback for older firefox versions*/ display:inline-block; padding-left:0; overflow:hidden; position:relative; margin:.1em 1em;}
.file_upload_wrapper { font-weight:bold; display:-moz-inline-box; /* fallback for older firefox versions*/ display:inline-block; padding-left:0; overflow:hidden; position:relative; margin:.1em 1em .1em 0em;}
.file_upload_wrapper .file_upload_button_wrapper { position:absolute; top:0; left:0; width:100%; height:100%; cursor:pointer; z-index:1000; }
#file_newfolder_name { background-image:url('../../core/img/places/folder.svg'); font-weight:normal; width:7em; }

View File

@ -200,23 +200,36 @@ class OC_App{
*/
public static function getSettingsNavigation(){
$l=new OC_L10N('core');
$admin=array(
array( "id" => "core_users", "order" => 2, "href" => OC_Helper::linkTo( "settings", "users.php" ), "name" => $l->t("Users"), "icon" => OC_Helper::imagePath( "settings", "users.svg" )),
array( "id" => "core_apps", "order" => 3, "href" => OC_Helper::linkTo( "settings", "apps.php?installed" ), "name" => $l->t("Apps"), "icon" => OC_Helper::imagePath( "settings", "apps.svg" )),
);
$settings=array(
array( "id" => "help", "order" => 1000, "href" => OC_Helper::linkTo( "settings", "help.php" ), "name" => $l->t("Help"), "icon" => OC_Helper::imagePath( "settings", "help.svg" )),
array( "id" => "personal", "order" => 1, "href" => OC_Helper::linkTo( "settings", "personal.php" ), "name" => $l->t("Personal"), "icon" => OC_Helper::imagePath( "settings", "personal.svg" ))
);
if(count(self::$settingsForms)>0){
$settings[]=array( "id" => "settings", "order" => 1000, "href" => OC_Helper::linkTo( "settings", "settings.php" ), "name" => $l->t("Settings"), "icon" => OC_Helper::imagePath( "settings", "settings.svg" ));
}
if(count(self::$adminForms)>0){
$admin[]=array( "id" => "admin", "order" => 1000, "href" => OC_Helper::linkTo( "settings", "admin.php" ), "name" => $l->t("Admin"), "icon" => OC_Helper::imagePath( "settings", "admin.svg" ));
}
if( OC_Group::inGroup( $_SESSION["user_id"], "admin" )){
$settings=array_merge($admin,$settings);
}
// by default, settings only contain the help menu
$settings = array(
array( "id" => "help", "order" => 1000, "href" => OC_Helper::linkTo( "settings", "help.php" ), "name" => $l->t("Help"), "icon" => OC_Helper::imagePath( "settings", "help.svg" ))
);
// if the user is logged-in
if (OC_User::isLoggedIn()) {
// personal menu
$settings[] = array( "id" => "personal", "order" => 1, "href" => OC_Helper::linkTo( "settings", "personal.php" ), "name" => $l->t("Personal"), "icon" => OC_Helper::imagePath( "settings", "personal.svg" ));
// if there're some settings forms
if(!empty(self::$settingsForms))
// settings menu
$settings[]=array( "id" => "settings", "order" => 1000, "href" => OC_Helper::linkTo( "settings", "settings.php" ), "name" => $l->t("Settings"), "icon" => OC_Helper::imagePath( "settings", "settings.svg" ));
// if the user is an admin
if(OC_Group::inGroup( $_SESSION["user_id"], "admin" )) {
// admin users menu
$settings[] = array( "id" => "core_users", "order" => 2, "href" => OC_Helper::linkTo( "settings", "users.php" ), "name" => $l->t("Users"), "icon" => OC_Helper::imagePath( "settings", "users.svg" ));
// admin apps menu
$settings[] = array( "id" => "core_apps", "order" => 3, "href" => OC_Helper::linkTo( "settings", "apps.php?installed" ), "name" => $l->t("Apps"), "icon" => OC_Helper::imagePath( "settings", "apps.svg" ));
// if there're some admin forms
if(!empty(self::$adminForms))
// admins menu
$settings[]=array( "id" => "admin", "order" => 1000, "href" => OC_Helper::linkTo( "settings", "admin.php" ), "name" => $l->t("Admin"), "icon" => OC_Helper::imagePath( "settings", "admin.svg" ));
}
}
$navigation = self::proceedNavigation($settings);
return $navigation;
}
@ -237,7 +250,7 @@ class OC_App{
return $list;
}
/**
* @brief Read app metadata from the info.xml file
* @param string $appid id of the app or the path of the info.xml file
@ -261,7 +274,7 @@ class OC_App{
}
return $data;
}
/**
* @brief Returns the navigation
* @returns associative array
@ -277,7 +290,7 @@ class OC_App{
$navigation = self::proceedNavigation( self::$navigation );
return $navigation;
}
/**
* get the id of loaded app
* @return string
@ -292,8 +305,8 @@ class OC_App{
return $topFolder;
}
}
/**
* get the forms for either settings, admin or personal
*/
@ -315,28 +328,28 @@ class OC_App{
}
return $forms;
}
/**
* register a settings form to be shown
*/
public static function registerSettings($app,$page){
self::$settingsForms[]='apps/'.$app.'/'.$page.'.php';
}
/**
* register an admin form to be shown
*/
public static function registerAdmin($app,$page){
self::$adminForms[]='apps/'.$app.'/'.$page.'.php';
}
/**
* register a personal form to be shown
*/
public static function registerPersonal($app,$page){
self::$personalForms[]='apps/'.$app.'/'.$page.'.php';
}
/**
* get a list of all apps in the apps folder
*/