diff --git a/apps/contacts/templates/part.addcardform.php b/apps/contacts/templates/part.addcardform.php
index c7d668fae58..8e482cc4eba 100644
--- a/apps/contacts/templates/part.addcardform.php
+++ b/apps/contacts/templates/part.addcardform.php
@@ -1,51 +1,111 @@
-
diff --git a/apps/contacts/templates/part.addpropertyform.php b/apps/contacts/templates/part.addpropertyform.php
deleted file mode 100644
index 885330e5778..00000000000
--- a/apps/contacts/templates/part.addpropertyform.php
+++ /dev/null
@@ -1,44 +0,0 @@
-
-
diff --git a/apps/contacts/templates/part.details.php b/apps/contacts/templates/part.details.php
index 438f84d45d4..e9fa8356e8b 100644
--- a/apps/contacts/templates/part.details.php
+++ b/apps/contacts/templates/part.details.php
@@ -1,16 +1,12 @@
-
-
+
+
+
+
+
diff --git a/apps/contacts/templates/part.property.php b/apps/contacts/templates/part.property.php
index 31fb187a0d3..4bc3a4d85f8 100644
--- a/apps/contacts/templates/part.property.php
+++ b/apps/contacts/templates/part.property.php
@@ -1,72 +1,66 @@
-
-
- |
-
-
-
- |
-
- t('Birthday'); ?> |
-
- l('date',new DateTime($_['property']['value'])); ?>
+
+
+ t('Birthday'); ?>
+
+ l('date',new DateTime($_['property']['value'])); ?>
- |
+
- t('Organization'); ?> |
-
+ t('Organization'); ?>
+
- |
+
- t('Email'); ?> |
-
+ t('Email'); ?>
+
- |
+
- t('Phone'); ?> |
-
+ t('Phone'); ?>
+
- ()
+ (t(ucwords(str_replace('cell','mobile',strtolower($_['property']['parameters']['TYPE'])))); ?>)
- |
+
-
+
t('Address'); ?>
- ()
+ (t(ucwords($_['property']['parameters']['TYPE'])); ?>)
- |
-
+
+
- t('PO Box'); ?>
+
- t('Extended'); ?>
+
- t('Street'); ?>
+
- t('City'); ?>
+
- t('Region'); ?>
+
- t('Zipcode'); ?>
+
- t('Country'); ?>
+
- |
+
-
+
diff --git a/apps/contacts/templates/part.setpropertyform.php b/apps/contacts/templates/part.setpropertyform.php
index 69c789795e5..eb8a67a8aa5 100644
--- a/apps/contacts/templates/part.setpropertyform.php
+++ b/apps/contacts/templates/part.setpropertyform.php
@@ -1,18 +1,49 @@
-
+
+
+
diff --git a/apps/contacts/templates/settings.php b/apps/contacts/templates/settings.php
index f5c37c5a044..d9130625200 100644
--- a/apps/contacts/templates/settings.php
+++ b/apps/contacts/templates/settings.php
@@ -1,7 +1,7 @@
diff --git a/apps/external/ajax/seturls.php b/apps/external/ajax/seturls.php
new file mode 100644
index 00000000000..c8e97754544
--- /dev/null
+++ b/apps/external/ajax/seturls.php
@@ -0,0 +1,24 @@
+
+ * This file is licensed under the Affero General Public License version 3 or later.
+ * See the COPYING-README file.
+ */
+
+require_once('../../../lib/base.php');
+OC_Util::checkAdminUser();
+
+if(isset($_POST['s1name'])) OC_Config::setValue( 'external-site1name', $_POST['s1name'] );
+if(isset($_POST['s1url'])) OC_Config::setValue( 'external-site1url', $_POST['s1url'] );
+if(isset($_POST['s2name'])) OC_Config::setValue( 'external-site2name', $_POST['s2name'] );
+if(isset($_POST['s2url'])) OC_Config::setValue( 'external-site2url', $_POST['s2url'] );
+if(isset($_POST['s3name'])) OC_Config::setValue( 'external-site3name', $_POST['s3name'] );
+if(isset($_POST['s3url'])) OC_Config::setValue( 'external-site3url', $_POST['s3url'] );
+if(isset($_POST['s4name'])) OC_Config::setValue( 'external-site4name', $_POST['s4name'] );
+if(isset($_POST['s4url'])) OC_Config::setValue( 'external-site4url', $_POST['s4url'] );
+if(isset($_POST['s5name'])) OC_Config::setValue( 'external-site5name', $_POST['s5name'] );
+if(isset($_POST['s5url'])) OC_Config::setValue( 'external-site5url', $_POST['s5url'] );
+
+echo 'true';
+
+?>
diff --git a/apps/external/appinfo/app.php b/apps/external/appinfo/app.php
new file mode 100644
index 00000000000..df14954d86f
--- /dev/null
+++ b/apps/external/appinfo/app.php
@@ -0,0 +1,37 @@
+.
+*
+*/
+
+OC_APP::registerAdmin('external','settings');
+
+OC_App::register( array( 'order' => 70, 'id' => 'external', 'name' => 'External' ));
+
+if(OC_Config::getValue( "external-site1name", '' )<>'') OC_App::addNavigationEntry( array( 'id' => 'external_index1', 'order' => 80, 'href' => OC_Helper::linkTo( 'external', 'index.php' ).'?id=1', 'icon' => OC_Helper::imagePath( 'external', 'external.png' ), 'name' => OC_Config::getValue( "external-site1name", '' )));
+
+if(OC_Config::getValue( "external-site2name", '' )<>'') OC_App::addNavigationEntry( array( 'id' => 'external_index2', 'order' => 80, 'href' => OC_Helper::linkTo( 'external', 'index.php' ).'?id=2', 'icon' => OC_Helper::imagePath( 'external', 'external.png' ), 'name' => OC_Config::getValue( "external-site2name", '' )));
+
+if(OC_Config::getValue( "external-site3name", '' )<>'') OC_App::addNavigationEntry( array( 'id' => 'external_index3', 'order' => 80, 'href' => OC_Helper::linkTo( 'external', 'index.php' ).'?id=3', 'icon' => OC_Helper::imagePath( 'external', 'external.png' ), 'name' => OC_Config::getValue( "external-site3name", '' )));
+
+if(OC_Config::getValue( "external-site4name", '' )<>'') OC_App::addNavigationEntry( array( 'id' => 'external_index4', 'order' => 80, 'href' => OC_Helper::linkTo( 'external', 'index.php' ).'?id=4', 'icon' => OC_Helper::imagePath( 'external', 'external.png' ), 'name' => OC_Config::getValue( "external-site4name", '' )));
+
+if(OC_Config::getValue( "external-site5name", '' )<>'') OC_App::addNavigationEntry( array( 'id' => 'external_index5', 'order' => 80, 'href' => OC_Helper::linkTo( 'external', 'index.php' ).'?id=5', 'icon' => OC_Helper::imagePath( 'external', 'external.png' ), 'name' => OC_Config::getValue( "external-site5name", '' )));
+
diff --git a/apps/external/appinfo/info.xml b/apps/external/appinfo/info.xml
new file mode 100644
index 00000000000..05f5709916d
--- /dev/null
+++ b/apps/external/appinfo/info.xml
@@ -0,0 +1,10 @@
+
+
+ external
+ External
+ Show external Application in the ownCloud menu
+ 1.0
+ AGPL
+ Frank Karlitschek
+ 2
+
diff --git a/apps/external/img/external.png b/apps/external/img/external.png
new file mode 100644
index 00000000000..75d1366326b
Binary files /dev/null and b/apps/external/img/external.png differ
diff --git a/apps/external/img/external.svg b/apps/external/img/external.svg
new file mode 100644
index 00000000000..b47305fbd08
--- /dev/null
+++ b/apps/external/img/external.svg
@@ -0,0 +1,292 @@
+
+
+
+
diff --git a/apps/external/index.php b/apps/external/index.php
new file mode 100644
index 00000000000..116e16d9096
--- /dev/null
+++ b/apps/external/index.php
@@ -0,0 +1,47 @@
+.
+*
+*/
+
+require_once('../../lib/base.php');
+
+// Check if we are a user
+if( !OC_User::isLoggedIn()){
+ header( "Location: ".OC_Helper::linkTo( '', 'index.php' ));
+ exit();
+}
+
+
+if(isset($_GET['id'])){
+
+ $id=$_GET['id'];
+ $id = (int) $id;
+
+ $url=OC_Config::getValue( "external-site".$id."url", '' );
+ OC_App::setActiveNavigationEntry( 'external_index'.$id );
+
+ $tmpl = new OC_Template( 'external', 'frame', 'user' );
+ $tmpl->assign('url',$url);
+ $tmpl->printPage();
+
+}
+
+?>
diff --git a/apps/external/js/admin.js b/apps/external/js/admin.js
new file mode 100644
index 00000000000..6b9b6c67737
--- /dev/null
+++ b/apps/external/js/admin.js
@@ -0,0 +1,68 @@
+$(document).ready(function(){
+
+
+
+ $('#s1name').blur(function(event){
+ event.preventDefault();
+ var post = $( "#s1name" ).serialize();
+ $.post( OC.filePath('external','ajax','seturls.php') , post, function(data){ OC.msg.finishedSaving('#s1name .msg', data); });
+ });
+
+ $('#s2name').blur(function(event){
+ event.preventDefault();
+ var post = $( "#s2name" ).serialize();
+ $.post( OC.filePath('external','ajax','seturls.php') , post, function(data){ OC.msg.finishedSaving('#s2name .msg', data); });
+ });
+
+ $('#s3name').blur(function(event){
+ event.preventDefault();
+ var post = $( "#s3name" ).serialize();
+ $.post( OC.filePath('external','ajax','seturls.php') , post, function(data){ OC.msg.finishedSaving('#s3name .msg', data); });
+ });
+
+ $('#s4name').blur(function(event){
+ event.preventDefault();
+ var post = $( "#s4name" ).serialize();
+ $.post( OC.filePath('external','ajax','seturls.php') , post, function(data){ OC.msg.finishedSaving('#s4name .msg', data); });
+ });
+
+ $('#s5name').blur(function(event){
+ event.preventDefault();
+ var post = $( "#s5name" ).serialize();
+ $.post( OC.filePath('external','ajax','seturls.php') , post, function(data){ OC.msg.finishedSaving('#s5name .msg', data); });
+ });
+
+ $('#s1url').blur(function(event){
+ event.preventDefault();
+ var post = $( "#s1url" ).serialize();
+ $.post( OC.filePath('external','ajax','seturls.php') , post, function(data){ OC.msg.finishedSaving('#s1url .msg', data); });
+ });
+
+ $('#s2url').blur(function(event){
+ event.preventDefault();
+ var post = $( "#s2url" ).serialize();
+ $.post( OC.filePath('external','ajax','seturls.php') , post, function(data){ OC.msg.finishedSaving('#s2url .msg', data); });
+ });
+
+ $('#s3url').blur(function(event){
+ event.preventDefault();
+ var post = $( "#s3url" ).serialize();
+ $.post( OC.filePath('external','ajax','seturls.php') , post, function(data){ OC.msg.finishedSaving('#s3url .msg', data); });
+ });
+
+ $('#s4url').blur(function(event){
+ event.preventDefault();
+ var post = $( "#s4url" ).serialize();
+ $.post( OC.filePath('external','ajax','seturls.php') , post, function(data){ OC.msg.finishedSaving('#s4url .msg', data); });
+ });
+
+ $('#s5url').blur(function(event){
+ event.preventDefault();
+ var post = $( "#s5url" ).serialize();
+ $.post( OC.filePath('external','ajax','seturls.php') , post, function(data){ OC.msg.finishedSaving('#s5url .msg', data); });
+ });
+
+
+});
+
+
diff --git a/apps/external/settings.php b/apps/external/settings.php
new file mode 100644
index 00000000000..ad33c16e1bf
--- /dev/null
+++ b/apps/external/settings.php
@@ -0,0 +1,22 @@
+assign('s1name',OC_Config::getValue( "external-site1name", '' ));
+ $tmpl->assign('s2name',OC_Config::getValue( "external-site2name", '' ));
+ $tmpl->assign('s3name',OC_Config::getValue( "external-site3name", '' ));
+ $tmpl->assign('s4name',OC_Config::getValue( "external-site4name", '' ));
+ $tmpl->assign('s5name',OC_Config::getValue( "external-site5name", '' ));
+
+ $tmpl->assign('s1url',OC_Config::getValue( "external-site1url", '' ));
+ $tmpl->assign('s2url',OC_Config::getValue( "external-site2url", '' ));
+ $tmpl->assign('s3url',OC_Config::getValue( "external-site3url", '' ));
+ $tmpl->assign('s4url',OC_Config::getValue( "external-site4url", '' ));
+ $tmpl->assign('s5url',OC_Config::getValue( "external-site5url", '' ));
+
+return $tmpl->fetchPage();
+?>
diff --git a/apps/external/templates/frame.php b/apps/external/templates/frame.php
new file mode 100644
index 00000000000..38b4008353d
--- /dev/null
+++ b/apps/external/templates/frame.php
@@ -0,0 +1,26 @@
+
+
+
+
+
+
+
+
diff --git a/apps/external/templates/settings.php b/apps/external/templates/settings.php
new file mode 100644
index 00000000000..a72327d35c8
--- /dev/null
+++ b/apps/external/templates/settings.php
@@ -0,0 +1,23 @@
+
diff --git a/apps/files_imageviewer/appinfo/app.php b/apps/files_imageviewer/appinfo/app.php
index 3dfbb76ceb0..0f77076b79b 100644
--- a/apps/files_imageviewer/appinfo/app.php
+++ b/apps/files_imageviewer/appinfo/app.php
@@ -1,6 +1,8 @@
diff --git a/apps/files_imageviewer/css/jquery.fancybox-1.3.4.css b/apps/files_imageviewer/css/jquery.fancybox-1.3.4.css
new file mode 100644
index 00000000000..030497750b2
--- /dev/null
+++ b/apps/files_imageviewer/css/jquery.fancybox-1.3.4.css
@@ -0,0 +1,359 @@
+/*
+ * FancyBox - jQuery Plugin
+ * Simple and fancy lightbox alternative
+ *
+ * Examples and documentation at: http://fancybox.net
+ *
+ * Copyright (c) 2008 - 2010 Janis Skarnelis
+ * That said, it is hardly a one-person project. Many people have submitted bugs, code, and offered their advice freely. Their support is greatly appreciated.
+ *
+ * Version: 1.3.4 (11/11/2010)
+ * Requires: jQuery v1.3+
+ *
+ * Dual licensed under the MIT and GPL licenses:
+ * http://www.opensource.org/licenses/mit-license.php
+ * http://www.gnu.org/licenses/gpl.html
+ */
+
+#fancybox-loading {
+ position: fixed;
+ top: 50%;
+ left: 50%;
+ width: 40px;
+ height: 40px;
+ margin-top: -20px;
+ margin-left: -20px;
+ cursor: pointer;
+ overflow: hidden;
+ z-index: 1104;
+ display: none;
+}
+
+#fancybox-loading div {
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 40px;
+ height: 480px;
+ background-image: url('../img/fancybox/fancybox.png');
+}
+
+#fancybox-overlay {
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 100%;
+ z-index: 1100;
+ display: none;
+}
+
+#fancybox-tmp {
+ padding: 0;
+ margin: 0;
+ border: 0;
+ overflow: auto;
+ display: none;
+}
+
+#fancybox-wrap {
+ position: absolute;
+ top: 0;
+ left: 0;
+ padding: 20px;
+ z-index: 1101;
+ outline: none;
+ display: none;
+}
+
+#fancybox-outer {
+ position: relative;
+ width: 100%;
+ height: 100%;
+ background: #fff;
+}
+
+#fancybox-content {
+ width: 0;
+ height: 0;
+ padding: 0;
+ outline: none;
+ position: relative;
+ overflow: hidden;
+ z-index: 1102;
+ border: 0px solid #fff;
+}
+
+#fancybox-hide-sel-frame {
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+ background: transparent;
+ z-index: 1101;
+}
+
+#fancybox-close {
+ position: absolute;
+ top: -15px;
+ right: -15px;
+ width: 30px;
+ height: 30px;
+ background: transparent url('../img/fancybox.png') -40px 0px;
+ cursor: pointer;
+ z-index: 1103;
+ display: none;
+}
+
+#fancybox-error {
+ color: #444;
+ font: normal 12px/20px Arial;
+ padding: 14px;
+ margin: 0;
+}
+
+#fancybox-img {
+ width: 100%;
+ height: 100%;
+ padding: 0;
+ margin: 0;
+ border: none;
+ outline: none;
+ line-height: 0;
+ vertical-align: top;
+}
+
+#fancybox-frame {
+ width: 100%;
+ height: 100%;
+ border: none;
+ display: block;
+}
+
+#fancybox-left, #fancybox-right {
+ position: absolute;
+ bottom: 0px;
+ height: 100%;
+ width: 35%;
+ cursor: pointer;
+ outline: none;
+ background: transparent url('../img/blank.gif');
+ z-index: 1102;
+ display: none;
+}
+
+#fancybox-left {
+ left: 0px;
+}
+
+#fancybox-right {
+ right: 0px;
+}
+
+#fancybox-left-ico, #fancybox-right-ico {
+ position: absolute;
+ top: 50%;
+ left: -9999px;
+ width: 30px;
+ height: 30px;
+ margin-top: -15px;
+ cursor: pointer;
+ z-index: 1102;
+ display: block;
+}
+
+#fancybox-left-ico {
+ background-image: url('../img/fancybox.png');
+ background-position: -40px -30px;
+}
+
+#fancybox-right-ico {
+ background-image: url('../img/fancybox.png');
+ background-position: -40px -60px;
+}
+
+#fancybox-left:hover, #fancybox-right:hover {
+ visibility: visible; /* IE6 */
+}
+
+#fancybox-left:hover span {
+ left: 20px;
+}
+
+#fancybox-right:hover span {
+ left: auto;
+ right: 20px;
+}
+
+.fancybox-bg {
+ position: absolute;
+ padding: 0;
+ margin: 0;
+ border: 0;
+ width: 20px;
+ height: 20px;
+ z-index: 1001;
+}
+
+#fancybox-bg-n {
+ top: -20px;
+ left: 0;
+ width: 100%;
+ background-image: url('../img/fancybox-x.png');
+}
+
+#fancybox-bg-ne {
+ top: -20px;
+ right: -20px;
+ background-image: url('../img/fancybox.png');
+ background-position: -40px -162px;
+}
+
+#fancybox-bg-e {
+ top: 0;
+ right: -20px;
+ height: 100%;
+ background-image: url('../img/fancybox-y.png');
+ background-position: -20px 0px;
+}
+
+#fancybox-bg-se {
+ bottom: -20px;
+ right: -20px;
+ background-image: url('../img/fancybox.png');
+ background-position: -40px -182px;
+}
+
+#fancybox-bg-s {
+ bottom: -20px;
+ left: 0;
+ width: 100%;
+ background-image: url('../img/fancybox-x.png');
+ background-position: 0px -20px;
+}
+
+#fancybox-bg-sw {
+ bottom: -20px;
+ left: -20px;
+ background-image: url('../img/fancybox.png');
+ background-position: -40px -142px;
+}
+
+#fancybox-bg-w {
+ top: 0;
+ left: -20px;
+ height: 100%;
+ background-image: url('../img/fancybox-y.png');
+}
+
+#fancybox-bg-nw {
+ top: -20px;
+ left: -20px;
+ background-image: url('../img/fancybox.png');
+ background-position: -40px -122px;
+}
+
+#fancybox-title {
+ font-family: Helvetica;
+ font-size: 12px;
+ z-index: 1102;
+}
+
+.fancybox-title-inside {
+ padding-bottom: 10px;
+ text-align: center;
+ color: #333;
+ background: #fff;
+ position: relative;
+}
+
+.fancybox-title-outside {
+ padding-top: 10px;
+ color: #fff;
+}
+
+.fancybox-title-over {
+ position: absolute;
+ bottom: 0;
+ left: 0;
+ color: #FFF;
+ text-align: left;
+}
+
+#fancybox-title-over {
+ padding: 10px;
+ background-image: url('../img/fancybox/fancy_title_over.png');
+ display: block;
+}
+
+.fancybox-title-float {
+ position: absolute;
+ left: 0;
+ bottom: -20px;
+ height: 32px;
+}
+
+#fancybox-title-float-wrap {
+ border: none;
+ border-collapse: collapse;
+ width: auto;
+}
+
+#fancybox-title-float-wrap td {
+ border: none;
+ white-space: nowrap;
+}
+
+#fancybox-title-float-left {
+ padding: 0 0 0 15px;
+ background: url('../img/fancybox/fancybox.png') -40px -90px no-repeat;
+}
+
+#fancybox-title-float-main {
+ color: #FFF;
+ line-height: 29px;
+ font-weight: bold;
+ padding: 0 0 3px 0;
+ background: url('../img/fancybox/fancybox-x.png') 0px -40px;
+}
+
+#fancybox-title-float-right {
+ padding: 0 0 0 15px;
+ background: url('../img/fancybox/fancybox.png') -55px -90px no-repeat;
+}
+
+/* IE6 */
+
+.fancybox-ie6 #fancybox-close { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_close.png', sizingMethod='scale'); }
+
+.fancybox-ie6 #fancybox-left-ico { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_nav_left.png', sizingMethod='scale'); }
+.fancybox-ie6 #fancybox-right-ico { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_nav_right.png', sizingMethod='scale'); }
+
+.fancybox-ie6 #fancybox-title-over { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_title_over.png', sizingMethod='scale'); zoom: 1; }
+.fancybox-ie6 #fancybox-title-float-left { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_title_left.png', sizingMethod='scale'); }
+.fancybox-ie6 #fancybox-title-float-main { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_title_main.png', sizingMethod='scale'); }
+.fancybox-ie6 #fancybox-title-float-right { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_title_right.png', sizingMethod='scale'); }
+
+.fancybox-ie6 #fancybox-bg-w, .fancybox-ie6 #fancybox-bg-e, .fancybox-ie6 #fancybox-left, .fancybox-ie6 #fancybox-right, #fancybox-hide-sel-frame {
+ height: expression(this.parentNode.clientHeight + "px");
+}
+
+#fancybox-loading.fancybox-ie6 {
+ position: absolute; margin-top: 0;
+ top: expression( (-20 + (document.documentElement.clientHeight ? document.documentElement.clientHeight/2 : document.body.clientHeight/2 ) + ( ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop )) + 'px');
+}
+
+#fancybox-loading.fancybox-ie6 div { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_loading.png', sizingMethod='scale'); }
+
+/* IE6, IE7, IE8 */
+
+.fancybox-ie .fancybox-bg { background: transparent !important; }
+
+.fancybox-ie #fancybox-bg-n { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_n.png', sizingMethod='scale'); }
+.fancybox-ie #fancybox-bg-ne { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_ne.png', sizingMethod='scale'); }
+.fancybox-ie #fancybox-bg-e { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_e.png', sizingMethod='scale'); }
+.fancybox-ie #fancybox-bg-se { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_se.png', sizingMethod='scale'); }
+.fancybox-ie #fancybox-bg-s { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_s.png', sizingMethod='scale'); }
+.fancybox-ie #fancybox-bg-sw { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_sw.png', sizingMethod='scale'); }
+.fancybox-ie #fancybox-bg-w { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_w.png', sizingMethod='scale'); }
+.fancybox-ie #fancybox-bg-nw { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_nw.png', sizingMethod='scale'); }
diff --git a/apps/files_imageviewer/css/lightbox.css b/apps/files_imageviewer/css/lightbox.css
deleted file mode 100644
index d96dd051b1e..00000000000
--- a/apps/files_imageviewer/css/lightbox.css
+++ /dev/null
@@ -1,32 +0,0 @@
-#lightbox_overlay{
- position:fixed;
- display:none;
- height:100%;
- width:100%;
- top:0px;
- left:0px;
- opacity:0.5;
- filter: alpha(opacity = 50);
- background-color:black;
- z-index:9999;
-}
-
-#lightbox{
- position:fixed;
- display:none;
- max-height:90%;
- max-width:90%;
- top:10px;
- margin-left:auto;
- margin-right:auto;
- z-index:9999;
-}
-
-#lightbox_loader{
- text-align:center;
- position:fixed;
- top: 40%;
- left: 50%;
- color:white;
-}
-#lightbox_loader img { margin-right: 1em;}
\ No newline at end of file
diff --git a/apps/files_imageviewer/img/blank.gif b/apps/files_imageviewer/img/blank.gif
new file mode 100644
index 00000000000..35d42e808f0
Binary files /dev/null and b/apps/files_imageviewer/img/blank.gif differ
diff --git a/apps/files_imageviewer/img/fancy_close.png b/apps/files_imageviewer/img/fancy_close.png
new file mode 100644
index 00000000000..07035307ad4
Binary files /dev/null and b/apps/files_imageviewer/img/fancy_close.png differ
diff --git a/apps/files_imageviewer/img/fancy_loading.png b/apps/files_imageviewer/img/fancy_loading.png
new file mode 100644
index 00000000000..2503017960b
Binary files /dev/null and b/apps/files_imageviewer/img/fancy_loading.png differ
diff --git a/apps/files_imageviewer/img/fancy_nav_left.png b/apps/files_imageviewer/img/fancy_nav_left.png
new file mode 100644
index 00000000000..ebaa6a4fd34
Binary files /dev/null and b/apps/files_imageviewer/img/fancy_nav_left.png differ
diff --git a/apps/files_imageviewer/img/fancy_nav_right.png b/apps/files_imageviewer/img/fancy_nav_right.png
new file mode 100644
index 00000000000..873294e969d
Binary files /dev/null and b/apps/files_imageviewer/img/fancy_nav_right.png differ
diff --git a/apps/files_imageviewer/img/fancy_shadow_e.png b/apps/files_imageviewer/img/fancy_shadow_e.png
new file mode 100644
index 00000000000..2eda0893649
Binary files /dev/null and b/apps/files_imageviewer/img/fancy_shadow_e.png differ
diff --git a/apps/files_imageviewer/img/fancy_shadow_n.png b/apps/files_imageviewer/img/fancy_shadow_n.png
new file mode 100644
index 00000000000..69aa10e233b
Binary files /dev/null and b/apps/files_imageviewer/img/fancy_shadow_n.png differ
diff --git a/apps/files_imageviewer/img/fancy_shadow_ne.png b/apps/files_imageviewer/img/fancy_shadow_ne.png
new file mode 100644
index 00000000000..79f6980a3ba
Binary files /dev/null and b/apps/files_imageviewer/img/fancy_shadow_ne.png differ
diff --git a/apps/files_imageviewer/img/fancy_shadow_nw.png b/apps/files_imageviewer/img/fancy_shadow_nw.png
new file mode 100644
index 00000000000..7182cd938ae
Binary files /dev/null and b/apps/files_imageviewer/img/fancy_shadow_nw.png differ
diff --git a/apps/files_imageviewer/img/fancy_shadow_s.png b/apps/files_imageviewer/img/fancy_shadow_s.png
new file mode 100644
index 00000000000..d8858bfb78e
Binary files /dev/null and b/apps/files_imageviewer/img/fancy_shadow_s.png differ
diff --git a/apps/files_imageviewer/img/fancy_shadow_se.png b/apps/files_imageviewer/img/fancy_shadow_se.png
new file mode 100644
index 00000000000..541e3ffd3e8
Binary files /dev/null and b/apps/files_imageviewer/img/fancy_shadow_se.png differ
diff --git a/apps/files_imageviewer/img/fancy_shadow_sw.png b/apps/files_imageviewer/img/fancy_shadow_sw.png
new file mode 100644
index 00000000000..b451689fa7b
Binary files /dev/null and b/apps/files_imageviewer/img/fancy_shadow_sw.png differ
diff --git a/apps/files_imageviewer/img/fancy_shadow_w.png b/apps/files_imageviewer/img/fancy_shadow_w.png
new file mode 100644
index 00000000000..8a4e4a887f1
Binary files /dev/null and b/apps/files_imageviewer/img/fancy_shadow_w.png differ
diff --git a/apps/files_imageviewer/img/fancy_title_left.png b/apps/files_imageviewer/img/fancy_title_left.png
new file mode 100644
index 00000000000..6049223d1ec
Binary files /dev/null and b/apps/files_imageviewer/img/fancy_title_left.png differ
diff --git a/apps/files_imageviewer/img/fancy_title_main.png b/apps/files_imageviewer/img/fancy_title_main.png
new file mode 100644
index 00000000000..8044271f29b
Binary files /dev/null and b/apps/files_imageviewer/img/fancy_title_main.png differ
diff --git a/apps/files_imageviewer/img/fancy_title_over.png b/apps/files_imageviewer/img/fancy_title_over.png
new file mode 100644
index 00000000000..d9f458f4bb8
Binary files /dev/null and b/apps/files_imageviewer/img/fancy_title_over.png differ
diff --git a/apps/files_imageviewer/img/fancy_title_right.png b/apps/files_imageviewer/img/fancy_title_right.png
new file mode 100644
index 00000000000..e36d9db2a7c
Binary files /dev/null and b/apps/files_imageviewer/img/fancy_title_right.png differ
diff --git a/apps/files_imageviewer/img/fancybox-x.png b/apps/files_imageviewer/img/fancybox-x.png
new file mode 100644
index 00000000000..c2130f8698f
Binary files /dev/null and b/apps/files_imageviewer/img/fancybox-x.png differ
diff --git a/apps/files_imageviewer/img/fancybox-y.png b/apps/files_imageviewer/img/fancybox-y.png
new file mode 100644
index 00000000000..7ef399b9908
Binary files /dev/null and b/apps/files_imageviewer/img/fancybox-y.png differ
diff --git a/apps/files_imageviewer/img/fancybox.png b/apps/files_imageviewer/img/fancybox.png
new file mode 100644
index 00000000000..65e14f68fd8
Binary files /dev/null and b/apps/files_imageviewer/img/fancybox.png differ
diff --git a/apps/files_imageviewer/js/jquery.fancybox-1.3.4.pack.js b/apps/files_imageviewer/js/jquery.fancybox-1.3.4.pack.js
new file mode 100644
index 00000000000..1373ed0838b
--- /dev/null
+++ b/apps/files_imageviewer/js/jquery.fancybox-1.3.4.pack.js
@@ -0,0 +1,46 @@
+/*
+ * FancyBox - jQuery Plugin
+ * Simple and fancy lightbox alternative
+ *
+ * Examples and documentation at: http://fancybox.net
+ *
+ * Copyright (c) 2008 - 2010 Janis Skarnelis
+ * That said, it is hardly a one-person project. Many people have submitted bugs, code, and offered their advice freely. Their support is greatly appreciated.
+ *
+ * Version: 1.3.4 (11/11/2010)
+ * Requires: jQuery v1.3+
+ *
+ * Dual licensed under the MIT and GPL licenses:
+ * http://www.opensource.org/licenses/mit-license.php
+ * http://www.gnu.org/licenses/gpl.html
+ */
+
+;(function(b){var m,t,u,f,D,j,E,n,z,A,q=0,e={},o=[],p=0,d={},l=[],G=null,v=new Image,J=/\.(jpg|gif|png|bmp|jpeg)(.*)?$/i,W=/[^\.]\.(swf)\s*$/i,K,L=1,y=0,s="",r,i,h=false,B=b.extend(b("
")[0],{prop:0}),M=b.browser.msie&&b.browser.version<7&&!window.XMLHttpRequest,N=function(){t.hide();v.onerror=v.onload=null;G&&G.abort();m.empty()},O=function(){if(false===e.onError(o,q,e)){t.hide();h=false}else{e.titleShow=false;e.width="auto";e.height="auto";m.html('
The requested content cannot be loaded.
Please try again later.
');
+F()}},I=function(){var a=o[q],c,g,k,C,P,w;N();e=b.extend({},b.fn.fancybox.defaults,typeof b(a).data("fancybox")=="undefined"?e:b(a).data("fancybox"));w=e.onStart(o,q,e);if(w===false)h=false;else{if(typeof w=="object")e=b.extend(e,w);k=e.title||(a.nodeName?b(a).attr("title"):a.title)||"";if(a.nodeName&&!e.orig)e.orig=b(a).children("img:first").length?b(a).children("img:first"):b(a);if(k===""&&e.orig&&e.titleFromAlt)k=e.orig.attr("alt");c=e.href||(a.nodeName?b(a).attr("href"):a.href)||null;if(/^(?:javascript)/i.test(c)||
+c=="#")c=null;if(e.type){g=e.type;if(!c)c=e.content}else if(e.content)g="html";else if(c)g=c.match(J)?"image":c.match(W)?"swf":b(a).hasClass("iframe")?"iframe":c.indexOf("#")===0?"inline":"ajax";if(g){if(g=="inline"){a=c.substr(c.indexOf("#"));g=b(a).length>0?"inline":"ajax"}e.type=g;e.href=c;e.title=k;if(e.autoDimensions)if(e.type=="html"||e.type=="inline"||e.type=="ajax"){e.width="auto";e.height="auto"}else e.autoDimensions=false;if(e.modal){e.overlayShow=true;e.hideOnOverlayClick=false;e.hideOnContentClick=
+false;e.enableEscapeButton=false;e.showCloseButton=false}e.padding=parseInt(e.padding,10);e.margin=parseInt(e.margin,10);m.css("padding",e.padding+e.margin);b(".fancybox-inline-tmp").unbind("fancybox-cancel").bind("fancybox-change",function(){b(this).replaceWith(j.children())});switch(g){case "html":m.html(e.content);F();break;case "inline":if(b(a).parent().is("#fancybox-content")===true){h=false;break}b('
').hide().insertBefore(b(a)).bind("fancybox-cleanup",function(){b(this).replaceWith(j.children())}).bind("fancybox-cancel",
+function(){b(this).replaceWith(m.children())});b(a).appendTo(m);F();break;case "image":h=false;b.fancybox.showActivity();v=new Image;v.onerror=function(){O()};v.onload=function(){h=true;v.onerror=v.onload=null;e.width=v.width;e.height=v.height;b("
![]()
").attr({id:"fancybox-img",src:v.src,alt:e.title}).appendTo(m);Q()};v.src=c;break;case "swf":e.scrolling="no";C='
";m.html(C);F();break;case "ajax":h=false;b.fancybox.showActivity();e.ajax.win=e.ajax.success;G=b.ajax(b.extend({},e.ajax,{url:c,data:e.ajax.data||{},error:function(x){x.status>0&&O()},success:function(x,H,R){if((typeof R=="object"?R:G).status==200){if(typeof e.ajax.win==
+"function"){w=e.ajax.win(c,x,H,R);if(w===false){t.hide();return}else if(typeof w=="string"||typeof w=="object")x=w}m.html(x);F()}}}));break;case "iframe":Q()}}else O()}},F=function(){var a=e.width,c=e.height;a=a.toString().indexOf("%")>-1?parseInt((b(window).width()-e.margin*2)*parseFloat(a)/100,10)+"px":a=="auto"?"auto":a+"px";c=c.toString().indexOf("%")>-1?parseInt((b(window).height()-e.margin*2)*parseFloat(c)/100,10)+"px":c=="auto"?"auto":c+"px";m.wrapInner('
');e.width=m.width();e.height=m.height();Q()},Q=function(){var a,c;t.hide();if(f.is(":visible")&&false===d.onCleanup(l,p,d)){b.event.trigger("fancybox-cancel");h=false}else{h=true;b(j.add(u)).unbind();b(window).unbind("resize.fb scroll.fb");b(document).unbind("keydown.fb");f.is(":visible")&&d.titlePosition!=="outside"&&f.css("height",f.height());l=o;p=q;d=e;if(d.overlayShow){u.css({"background-color":d.overlayColor,
+opacity:d.overlayOpacity,cursor:d.hideOnOverlayClick?"pointer":"auto",height:b(document).height()});if(!u.is(":visible")){M&&b("select:not(#fancybox-tmp select)").filter(function(){return this.style.visibility!=="hidden"}).css({visibility:"hidden"}).one("fancybox-cleanup",function(){this.style.visibility="inherit"});u.show()}}else u.hide();i=X();s=d.title||"";y=0;n.empty().removeAttr("style").removeClass();if(d.titleShow!==false){if(b.isFunction(d.titleFormat))a=d.titleFormat(s,l,p,d);else a=s&&s.length?
+d.titlePosition=="float"?'
':'
'+s+"
":false;s=a;if(!(!s||s==="")){n.addClass("fancybox-title-"+d.titlePosition).html(s).appendTo("body").show();switch(d.titlePosition){case "inside":n.css({width:i.width-d.padding*2,marginLeft:d.padding,marginRight:d.padding});
+y=n.outerHeight(true);n.appendTo(D);i.height+=y;break;case "over":n.css({marginLeft:d.padding,width:i.width-d.padding*2,bottom:d.padding}).appendTo(D);break;case "float":n.css("left",parseInt((n.width()-i.width-40)/2,10)*-1).appendTo(f);break;default:n.css({width:i.width-d.padding*2,paddingLeft:d.padding,paddingRight:d.padding}).appendTo(f)}}}n.hide();if(f.is(":visible")){b(E.add(z).add(A)).hide();a=f.position();r={top:a.top,left:a.left,width:f.width(),height:f.height()};c=r.width==i.width&&r.height==
+i.height;j.fadeTo(d.changeFade,0.3,function(){var g=function(){j.html(m.contents()).fadeTo(d.changeFade,1,S)};b.event.trigger("fancybox-change");j.empty().removeAttr("filter").css({"border-width":d.padding,width:i.width-d.padding*2,height:e.autoDimensions?"auto":i.height-y-d.padding*2});if(c)g();else{B.prop=0;b(B).animate({prop:1},{duration:d.changeSpeed,easing:d.easingChange,step:T,complete:g})}})}else{f.removeAttr("style");j.css("border-width",d.padding);if(d.transitionIn=="elastic"){r=V();j.html(m.contents());
+f.show();if(d.opacity)i.opacity=0;B.prop=0;b(B).animate({prop:1},{duration:d.speedIn,easing:d.easingIn,step:T,complete:S})}else{d.titlePosition=="inside"&&y>0&&n.show();j.css({width:i.width-d.padding*2,height:e.autoDimensions?"auto":i.height-y-d.padding*2}).html(m.contents());f.css(i).fadeIn(d.transitionIn=="none"?0:d.speedIn,S)}}}},Y=function(){if(d.enableEscapeButton||d.enableKeyboardNav)b(document).bind("keydown.fb",function(a){if(a.keyCode==27&&d.enableEscapeButton){a.preventDefault();b.fancybox.close()}else if((a.keyCode==
+37||a.keyCode==39)&&d.enableKeyboardNav&&a.target.tagName!=="INPUT"&&a.target.tagName!=="TEXTAREA"&&a.target.tagName!=="SELECT"){a.preventDefault();b.fancybox[a.keyCode==37?"prev":"next"]()}});if(d.showNavArrows){if(d.cyclic&&l.length>1||p!==0)z.show();if(d.cyclic&&l.length>1||p!=l.length-1)A.show()}else{z.hide();A.hide()}},S=function(){if(!b.support.opacity){j.get(0).style.removeAttribute("filter");f.get(0).style.removeAttribute("filter")}e.autoDimensions&&j.css("height","auto");f.css("height","auto");
+s&&s.length&&n.show();d.showCloseButton&&E.show();Y();d.hideOnContentClick&&j.bind("click",b.fancybox.close);d.hideOnOverlayClick&&u.bind("click",b.fancybox.close);b(window).bind("resize.fb",b.fancybox.resize);d.centerOnScroll&&b(window).bind("scroll.fb",b.fancybox.center);if(d.type=="iframe")b('
').appendTo(j);
+f.show();h=false;b.fancybox.center();d.onComplete(l,p,d);var a,c;if(l.length-1>p){a=l[p+1].href;if(typeof a!=="undefined"&&a.match(J)){c=new Image;c.src=a}}if(p>0){a=l[p-1].href;if(typeof a!=="undefined"&&a.match(J)){c=new Image;c.src=a}}},T=function(a){var c={width:parseInt(r.width+(i.width-r.width)*a,10),height:parseInt(r.height+(i.height-r.height)*a,10),top:parseInt(r.top+(i.top-r.top)*a,10),left:parseInt(r.left+(i.left-r.left)*a,10)};if(typeof i.opacity!=="undefined")c.opacity=a<0.5?0.5:a;f.css(c);
+j.css({width:c.width-d.padding*2,height:c.height-y*a-d.padding*2})},U=function(){return[b(window).width()-d.margin*2,b(window).height()-d.margin*2,b(document).scrollLeft()+d.margin,b(document).scrollTop()+d.margin]},X=function(){var a=U(),c={},g=d.autoScale,k=d.padding*2;c.width=d.width.toString().indexOf("%")>-1?parseInt(a[0]*parseFloat(d.width)/100,10):d.width+k;c.height=d.height.toString().indexOf("%")>-1?parseInt(a[1]*parseFloat(d.height)/100,10):d.height+k;if(g&&(c.width>a[0]||c.height>a[1]))if(e.type==
+"image"||e.type=="swf"){g=d.width/d.height;if(c.width>a[0]){c.width=a[0];c.height=parseInt((c.width-k)/g+k,10)}if(c.height>a[1]){c.height=a[1];c.width=parseInt((c.height-k)*g+k,10)}}else{c.width=Math.min(c.width,a[0]);c.height=Math.min(c.height,a[1])}c.top=parseInt(Math.max(a[3]-20,a[3]+(a[1]-c.height-40)*0.5),10);c.left=parseInt(Math.max(a[2]-20,a[2]+(a[0]-c.width-40)*0.5),10);return c},V=function(){var a=e.orig?b(e.orig):false,c={};if(a&&a.length){c=a.offset();c.top+=parseInt(a.css("paddingTop"),
+10)||0;c.left+=parseInt(a.css("paddingLeft"),10)||0;c.top+=parseInt(a.css("border-top-width"),10)||0;c.left+=parseInt(a.css("border-left-width"),10)||0;c.width=a.width();c.height=a.height();c={width:c.width+d.padding*2,height:c.height+d.padding*2,top:c.top-d.padding-20,left:c.left-d.padding-20}}else{a=U();c={width:d.padding*2,height:d.padding*2,top:parseInt(a[3]+a[1]*0.5,10),left:parseInt(a[2]+a[0]*0.5,10)}}return c},Z=function(){if(t.is(":visible")){b("div",t).css("top",L*-40+"px");L=(L+1)%12}else clearInterval(K)};
+b.fn.fancybox=function(a){if(!b(this).length)return this;b(this).data("fancybox",b.extend({},a,b.metadata?b(this).metadata():{})).unbind("click.fb").bind("click.fb",function(c){c.preventDefault();if(!h){h=true;b(this).blur();o=[];q=0;c=b(this).attr("rel")||"";if(!c||c==""||c==="nofollow")o.push(this);else{o=b("a[rel="+c+"], area[rel="+c+"]");q=o.index(this)}I()}});return this};b.fancybox=function(a,c){var g;if(!h){h=true;g=typeof c!=="undefined"?c:{};o=[];q=parseInt(g.index,10)||0;if(b.isArray(a)){for(var k=
+0,C=a.length;k
o.length||q<0)q=0;I()}};b.fancybox.showActivity=function(){clearInterval(K);t.show();K=setInterval(Z,66)};b.fancybox.hideActivity=function(){t.hide()};b.fancybox.next=function(){return b.fancybox.pos(p+
+1)};b.fancybox.prev=function(){return b.fancybox.pos(p-1)};b.fancybox.pos=function(a){if(!h){a=parseInt(a);o=l;if(a>-1&&a1){q=a>=l.length?0:l.length-1;I()}}};b.fancybox.cancel=function(){if(!h){h=true;b.event.trigger("fancybox-cancel");N();e.onCancel(o,q,e);h=false}};b.fancybox.close=function(){function a(){u.fadeOut("fast");n.empty().hide();f.hide();b.event.trigger("fancybox-cleanup");j.empty();d.onClosed(l,p,d);l=e=[];p=q=0;d=e={};h=false}if(!(h||f.is(":hidden"))){h=
+true;if(d&&false===d.onCleanup(l,p,d))h=false;else{N();b(E.add(z).add(A)).hide();b(j.add(u)).unbind();b(window).unbind("resize.fb scroll.fb");b(document).unbind("keydown.fb");j.find("iframe").attr("src",M&&/^https/i.test(window.location.href||"")?"javascript:void(false)":"about:blank");d.titlePosition!=="inside"&&n.empty();f.stop();if(d.transitionOut=="elastic"){r=V();var c=f.position();i={top:c.top,left:c.left,width:f.width(),height:f.height()};if(d.opacity)i.opacity=1;n.empty().hide();B.prop=1;
+b(B).animate({prop:0},{duration:d.speedOut,easing:d.easingOut,step:T,complete:a})}else f.fadeOut(d.transitionOut=="none"?0:d.speedOut,a)}}};b.fancybox.resize=function(){u.is(":visible")&&u.css("height",b(document).height());b.fancybox.center(true)};b.fancybox.center=function(a){var c,g;if(!h){g=a===true?1:0;c=U();!g&&(f.width()>c[0]||f.height()>c[1])||f.stop().animate({top:parseInt(Math.max(c[3]-20,c[3]+(c[1]-j.height()-40)*0.5-d.padding)),left:parseInt(Math.max(c[2]-20,c[2]+(c[0]-j.width()-40)*0.5-
+d.padding))},typeof a=="number"?a:200)}};b.fancybox.init=function(){if(!b("#fancybox-wrap").length){b("body").append(m=b(''),t=b(''),u=b(''),f=b(''));D=b('').append('').appendTo(f);
+D.append(j=b(''),E=b(''),n=b(''),z=b(''),A=b(''));E.click(b.fancybox.close);t.click(b.fancybox.cancel);z.click(function(a){a.preventDefault();b.fancybox.prev()});A.click(function(a){a.preventDefault();b.fancybox.next()});
+b.fn.mousewheel&&f.bind("mousewheel.fb",function(a,c){if(h)a.preventDefault();else if(b(a.target).get(0).clientHeight==0||b(a.target).get(0).scrollHeight===b(a.target).get(0).clientHeight){a.preventDefault();b.fancybox[c>0?"prev":"next"]()}});b.support.opacity||f.addClass("fancybox-ie");if(M){t.addClass("fancybox-ie6");f.addClass("fancybox-ie6");b('').prependTo(D)}}};
+b.fn.fancybox.defaults={padding:10,margin:40,opacity:false,modal:false,cyclic:false,scrolling:"auto",width:560,height:340,autoScale:true,autoDimensions:true,centerOnScroll:false,ajax:{},swf:{wmode:"transparent"},hideOnOverlayClick:true,hideOnContentClick:false,overlayShow:true,overlayOpacity:0.7,overlayColor:"#777",titleShow:true,titlePosition:"float",titleFormat:null,titleFromAlt:false,transitionIn:"fade",transitionOut:"fade",speedIn:300,speedOut:300,changeSpeed:300,changeFade:"fast",easingIn:"swing",
+easingOut:"swing",showCloseButton:true,showNavArrows:true,enableEscapeButton:true,enableKeyboardNav:true,onStart:function(){},onCancel:function(){},onComplete:function(){},onCleanup:function(){},onClosed:function(){},onError:function(){}};b(document).ready(function(){b.fancybox.init()})})(jQuery);
\ No newline at end of file
diff --git a/apps/files_imageviewer/js/jquery.mousewheel-3.0.4.pack.js b/apps/files_imageviewer/js/jquery.mousewheel-3.0.4.pack.js
new file mode 100644
index 00000000000..cb66588e29c
--- /dev/null
+++ b/apps/files_imageviewer/js/jquery.mousewheel-3.0.4.pack.js
@@ -0,0 +1,14 @@
+/*! Copyright (c) 2010 Brandon Aaron (http://brandonaaron.net)
+* Licensed under the MIT License (LICENSE.txt).
+*
+* Thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers.
+* Thanks to: Mathias Bank(http://www.mathias-bank.de) for a scope bug fix.
+* Thanks to: Seamus Leahy for adding deltaX and deltaY
+*
+* Version: 3.0.4
+*
+* Requires: 1.2.2+
+*/
+
+(function(d){function g(a){var b=a||window.event,i=[].slice.call(arguments,1),c=0,h=0,e=0;a=d.event.fix(b);a.type="mousewheel";if(a.wheelDelta)c=a.wheelDelta/120;if(a.detail)c=-a.detail/3;e=c;if(b.axis!==undefined&&b.axis===b.HORIZONTAL_AXIS){e=0;h=-1*c}if(b.wheelDeltaY!==undefined)e=b.wheelDeltaY/120;if(b.wheelDeltaX!==undefined)h=-1*b.wheelDeltaX/120;i.unshift(a,c,h,e);return d.event.handle.apply(this,i)}var f=["DOMMouseScroll","mousewheel"];d.event.special.mousewheel={setup:function(){if(this.addEventListener)for(var a=
+f.length;a;)this.addEventListener(f[--a],g,false);else this.onmousewheel=g},teardown:function(){if(this.removeEventListener)for(var a=f.length;a;)this.removeEventListener(f[--a],g,false);else this.onmousewheel=null}};d.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})})(jQuery);
\ No newline at end of file
diff --git a/apps/files_imageviewer/js/lightbox.js b/apps/files_imageviewer/js/lightbox.js
index 4f079b6d8af..94743aa85e0 100644
--- a/apps/files_imageviewer/js/lightbox.js
+++ b/apps/files_imageviewer/js/lightbox.js
@@ -1,18 +1,4 @@
-
-var lightBoxShown=false;
$(document).ready(function() {
- images={};//image cache
- loading_str = t('files_imageviewer','Loading');
- var overlay=$('');
- overlay.find('#lightbox_loader img')
- .attr('src',OC.imagePath('core', 'loading-dark.gif'))
- .attr('alt',loading_str)
- .after(loading_str);
- $( 'body' ).append(overlay);
- var container=$('');
- $( 'body' ).append(container);
- $( '#lightbox_overlay' ).click(hideLightbox);
- $( '#lightbox' ).click(hideLightbox);
if(typeof FileActions!=='undefined'){
FileActions.register('image','View','',function(filename){
viewImage($('#dir').val(),filename);
@@ -22,7 +8,6 @@ $(document).ready(function() {
OC.search.customResults.Images=function(row,item){
var image=item.link.substr(item.link.indexOf('file=')+5);
var a=row.find('a');
- var container=$('');
a.attr('href','#');
a.click(function(){
var file=image.split('/').pop();
@@ -32,52 +17,11 @@ $(document).ready(function() {
}
});
-function viewImage(dir,file){
+function viewImage(dir, file) {
var location=OC.filePath('files','ajax','download.php')+'?files='+file+'&dir='+dir;
- var overlay=$('#lightbox_overlay');
- var container=$('#lightbox');
- overlay.show();
- if(!images[location]){
- var img = new Image();
- img.onload = function(){
- images[location]=img;
- if($('#lightbox_overlay').is(':visible'))
- showLightbox(container,img);
- }
- img.src = location;
- }else{
- showLightbox(container,images[location]);
- }
+ $.fancybox({
+ "href": location,
+ "title": file,
+ "titlePosition": "inside"
+ });
}
-
-function showLightbox(container,img){
- var maxWidth = $( window ).width() - 50;
- var maxHeight = $( window ).height() - 50;
- if( img.width > maxWidth || img.height > maxHeight ) { // One of these is larger than the window
- var ratio = img.width / img.height;
- if( img.height >= maxHeight ) {
- img.height = maxHeight;
- img.width = maxHeight * ratio;
- } else {
- img.width = maxWidth;
- img.height = maxWidth / ratio;
- }
- }
- container.empty();
- container.append(img);
- container.css('top',Math.round( ($( window ).height() - img.height)/2));
- container.css('left',Math.round( ($( window ).width() - img.width)/2));
- $('#lightbox').show();
- setTimeout(function(){
- lightBoxShown=true;
- },100);
-}
-
-function hideLightbox(event){
- if(event){
- event.stopPropagation();
- $('#lightbox_overlay').hide();
- $('#lightbox').hide();
- lightBoxShown=false;
- }
-}
\ No newline at end of file
diff --git a/apps/files_sharing/ajax/getitem.php b/apps/files_sharing/ajax/getitem.php
index 8d51c146523..075ec043eac 100644
--- a/apps/files_sharing/ajax/getitem.php
+++ b/apps/files_sharing/ajax/getitem.php
@@ -33,5 +33,3 @@ while ($source != "" && $source != "/" && $source != "." && $source != $userDire
if (!empty($users)) {
OC_JSON::encodedPrint($users);
}
-
-?>
diff --git a/apps/files_sharing/ajax/share.php b/apps/files_sharing/ajax/share.php
index 6a2b45b3a7d..d1f50994317 100644
--- a/apps/files_sharing/ajax/share.php
+++ b/apps/files_sharing/ajax/share.php
@@ -15,6 +15,7 @@ foreach ($sources as $source) {
$source = $userDirectory.$source;
// If the file doesn't exist, it may be shared with the current user
} else if (!$source = OC_Share::getSource($userDirectory.$source)) {
+ OC_Log::write('files_sharing',"Shared file doesn't exists :".$source,OC_Log::ERROR);
echo "false";
}
try {
@@ -23,6 +24,7 @@ foreach ($sources as $source) {
echo $shared->getToken();
}
} catch (Exception $exception) {
+ OC_Log::write('files_sharing',"Unexpected Error : ".$exception->getMessage(),OC_Log::ERROR);
echo "false";
}
}
diff --git a/apps/files_sharing/js/share.js b/apps/files_sharing/js/share.js
index aaffc3824ea..c0fc91e92ad 100644
--- a/apps/files_sharing/js/share.js
+++ b/apps/files_sharing/js/share.js
@@ -1,8 +1,11 @@
$(document).ready(function() {
+ var shared_status = {};
if (typeof FileActions !== 'undefined') {
FileActions.register('all', 'Share', function(filename) {
var icon;
var file = $('#dir').val()+'/'+filename;
+ if(shared_status[file])
+ return shared_status[file].icon;
$.ajax({
type: 'GET',
url: OC.linkTo('files_sharing', 'ajax/getitem.php'),
@@ -20,6 +23,7 @@ $(document).ready(function() {
} else {
icon = OC.imagePath('core', 'actions/share');
}
+ shared_status[file]= { timestamp: new Date().getTime(), icon: icon };
}
});
return icon;
@@ -54,6 +58,7 @@ $(document).ready(function() {
$(this).click(function(event) {
if (!($(event.target).hasClass('drop')) && $(event.target).parents().index($('#dropdown')) == -1) {
if ($('#dropdown').is(':visible')) {
+ delete shared_status[$('#dropdown').data('file')]; //Remove File from icon cache
$('#dropdown').hide('blind', function() {
$('#dropdown').remove();
$('tr').removeClass('mouseOver');
diff --git a/apps/files_sharing/lib_share.php b/apps/files_sharing/lib_share.php
index 978847f4a8f..cde33fd1dc5 100644
--- a/apps/files_sharing/lib_share.php
+++ b/apps/files_sharing/lib_share.php
@@ -60,7 +60,7 @@ class OC_Share {
foreach ($uid_shared_with as $uid) {
// Check if this item is already shared with the user
$checkSource = OC_DB::prepare("SELECT source FROM *PREFIX*sharing WHERE source = ? AND uid_shared_with ".self::getUsersAndGroups($uid));
- $resultCheckSource = $checkSource->execute(array($source, $uid))->fetchAll();
+ $resultCheckSource = $checkSource->execute(array($source))->fetchAll();
// TODO Check if the source is inside a folder
if (count($resultCheckSource) > 0 && !isset($gid)) {
throw new Exception("This item is already shared with ".$uid);
@@ -282,6 +282,7 @@ class OC_Share {
return $result[0]['permissions'];
}
} else {
+ OC_Log::write('files_sharing',"Not existing parent folder : ".$target,OC_Log::ERROR);
return false;
}
}
diff --git a/apps/files_sharing/sharedstorage.php b/apps/files_sharing/sharedstorage.php
index 53f25b60e91..faf4e68d9b1 100644
--- a/apps/files_sharing/sharedstorage.php
+++ b/apps/files_sharing/sharedstorage.php
@@ -22,6 +22,11 @@
require_once( 'lib_share.php' );
+if (!OC_Filesystem::is_dir('/Shared')) {
+ OC_Filesystem::mkdir('/Shared');
+}
+OC_Filesystem::mount('shared',array('datadir'=>'/'.OC_User::getUser().'/files/Shared'),'/'.OC_User::getUser().'/files/Shared/');
+
/**
* Convert target path to source path and pass the function call to the correct storage provider
*/
@@ -32,13 +37,6 @@ class OC_Filestorage_Shared extends OC_Filestorage {
public function __construct($arguments) {
$this->datadir = $arguments['datadir'];
- if (OC_Share::getItemsInFolder($this->datadir)) {
- if (!OC_Filesystem::is_dir($this->datadir)) {
- OC_Filesystem::mkdir($this->datadir);
- }
- } else if (OC_Filesystem::is_dir($this->datadir)) {
- OC_Filesystem::rmdir($this->datadir);
- }
$this->datadir .= "/";
}
diff --git a/apps/files_texteditor/js/editor.js b/apps/files_texteditor/js/editor.js
index f7b924d494d..a0629aa8c4e 100644
--- a/apps/files_texteditor/js/editor.js
+++ b/apps/files_texteditor/js/editor.js
@@ -73,11 +73,7 @@ function bindControlEvents(){
function editorIsShown(){
// Not working as intended. Always returns true.
- if(window.aceEditor){
- return true;
- } else {
- return false;
- }
+ return is_editor_shown;
}
function updateSessionFileHash(path){
@@ -174,6 +170,7 @@ function showFileEditor(dir,filename){
}
// End ajax
});
+ is_editor_shown = true;
}
}
@@ -194,12 +191,13 @@ function hideFileEditor(){
$('.actions,#file_access_panel').fadeIn('slow');
$('table').fadeIn('slow');
});
+ is_editor_shown = false;
}
$(window).resize(function() {
setEditorSize();
});
-
+var is_editor_shown = false;
$(document).ready(function(){
if(typeof FileActions!=='undefined'){
FileActions.register('text','Edit','',function(filename){
diff --git a/apps/gallery/ajax/getCovers.php b/apps/gallery/ajax/getCovers.php
index d84bf2a7903..b9c7558a53c 100644
--- a/apps/gallery/ajax/getCovers.php
+++ b/apps/gallery/ajax/getCovers.php
@@ -18,6 +18,7 @@ function CroppedThumbnail($imgSrc,$thumbnail_width,$thumbnail_height, $tgtImg, $
default:
exit();
}
+ if(!$myImage) exit();
$ratio_orig = $width_orig/$height_orig;
if ($thumbnail_width/$thumbnail_height > $ratio_orig) {
@@ -52,8 +53,11 @@ $targetImg = imagecreatetruecolor($numOfItems*$box_size, $box_size);
$counter = 0;
while (($i = $result->fetchRow()) && $counter < $numOfItems) {
$imagePath = OC::$CONFIG_DATADIRECTORY . $i['file_path'];
- CroppedThumbnail($imagePath, $box_size, $box_size, $targetImg, $counter*$box_size);
- $counter++;
+ if(file_exists($imagePath))
+ {
+ CroppedThumbnail($imagePath, $box_size, $box_size, $targetImg, $counter*$box_size);
+ $counter++;
+ }
}
header('Content-Type: image/png');
diff --git a/apps/gallery/ajax/thumbnail.php b/apps/gallery/ajax/thumbnail.php
index f24782390f6..a1416452932 100644
--- a/apps/gallery/ajax/thumbnail.php
+++ b/apps/gallery/ajax/thumbnail.php
@@ -5,6 +5,9 @@ OC_JSON::checkAppEnabled('gallery');
function CroppedThumbnail($imgSrc,$thumbnail_width,$thumbnail_height) { //$imgSrc is a FILE - Returns an image resource.
//getting the image dimensions
+ if(! function_exists('imagecreatefromjpeg'))
+ OC_Log::write('gallery','GD module not installed',OC_Log::ERROR);
+
list($width_orig, $height_orig) = getimagesize($imgSrc);
switch (strtolower(substr($imgSrc, strrpos($imgSrc, '.')+1))) {
case "jpeg":
@@ -18,6 +21,7 @@ function CroppedThumbnail($imgSrc,$thumbnail_width,$thumbnail_height) { //$imgSr
default:
exit();
}
+ if(!$myImage) exit();
$ratio_orig = $width_orig/$height_orig;
if ($thumbnail_width/$thumbnail_height > $ratio_orig) {
@@ -47,9 +51,10 @@ $img = $_GET['img'];
$tmp = OC::$CONFIG_DATADIRECTORY . $img;
-header('Content-Type: image/png');
-$image = CroppedThumbnail($tmp, $box_size, $box_size);
-
-imagepng($image);
-imagedestroy($image);
-?>
+if(file_exists($tmp))
+{
+ header('Content-Type: image/png');
+ $image = CroppedThumbnail($tmp, $box_size, $box_size);
+ imagepng($image);
+ imagedestroy($image);
+}
\ No newline at end of file
diff --git a/apps/gallery/lib_scanner.php b/apps/gallery/lib_scanner.php
index 30a86b7405d..871c1c38c5f 100644
--- a/apps/gallery/lib_scanner.php
+++ b/apps/gallery/lib_scanner.php
@@ -39,7 +39,7 @@ class OC_GALLERY_SCANNER {
$stmt = OC_DB::prepare('SELECT * FROM *PREFIX*gallery_albums WHERE `uid_owner` = ? AND `album_name` = ?');
$result = $stmt->execute(array(OC_User::getUser(), $current_album['name']));
if ($result->numRows() == 0 && count($current_album['images'])) {
- $stmt = OC_DB::prepare('REPLACE INTO *PREFIX*gallery_albums (`uid_owner`, `album_name`) VALUES (?, ?)');
+ $stmt = OC_DB::prepare('INSERT INTO *PREFIX*gallery_albums (`uid_owner`, `album_name`) VALUES (?, ?)');
$stmt->execute(array(OC_User::getUser(), $current_album['name']));
}
$stmt = OC_DB::prepare('SELECT * FROM *PREFIX*gallery_albums WHERE `uid_owner` = ? AND `album_name` = ?');
@@ -50,7 +50,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('REPLACE INTO *PREFIX*gallery_photos (`album_id`, `file_path`) VALUES (?, ?)');
+ $stmt = OC_DB::prepare('INSERT INTO *PREFIX*gallery_photos (`album_id`, `file_path`) VALUES (?, ?)');
$stmt->execute(array($albumId, $img));
}
}
diff --git a/apps/gallery/templates/view_album.php b/apps/gallery/templates/view_album.php
index ea2969e0110..230e2a5c21d 100644
--- a/apps/gallery/templates/view_album.php
+++ b/apps/gallery/templates/view_album.php
@@ -1,9 +1,17 @@
+
@@ -12,7 +20,7 @@ OC_Util::addStyle( 'files_imageviewer', 'lightbox' );
-

+

diff --git a/apps/media/ajax/api.php b/apps/media/ajax/api.php
index 29f61a2207f..93298c82c55 100644
--- a/apps/media/ajax/api.php
+++ b/apps/media/ajax/api.php
@@ -106,7 +106,7 @@ if($arguments['action']){
}
break;
case 'play':
- ob_end_clean();
+ @ob_end_clean();
$ftype=OC_Filesystem::getMimeType( $arguments['path'] );
diff --git a/apps/media/ajax/autoupdate.php b/apps/media/ajax/autoupdate.php
index ff0923ca032..a78b5e25dd1 100644
--- a/apps/media/ajax/autoupdate.php
+++ b/apps/media/ajax/autoupdate.php
@@ -30,9 +30,7 @@ $RUNTIME_NOSETUPFS=true;
require_once('../../../lib/base.php');
OC_JSON::checkAppEnabled('media');
-if(defined("DEBUG") && DEBUG) {error_log($_GET['autoupdate']);}
$autoUpdate=(isset($_GET['autoupdate']) and $_GET['autoupdate']=='true');
-if(defined("DEBUG") && DEBUG) {error_log((integer)$autoUpdate);}
OC_Preferences::setValue(OC_User::getUser(),'media','autoupdate',(integer)$autoUpdate);
diff --git a/apps/media/css/player.css b/apps/media/css/player.css
index c4a098543d1..0f29748f351 100644
--- a/apps/media/css/player.css
+++ b/apps/media/css/player.css
@@ -1,7 +1,7 @@
#playercontrols{
display:inline;
margin-left:1em;
- width:7em;
+ width:4em;
height:1em;
position:fixed;
top:auto;
diff --git a/apps/media/getID3/getid3/extension.cache.dbm.php b/apps/media/getID3/getid3/extension.cache.dbm.php
index 051bb1f0d7a..c18b52d5dca 100644
--- a/apps/media/getID3/getid3/extension.cache.dbm.php
+++ b/apps/media/getID3/getid3/extension.cache.dbm.php
@@ -90,7 +90,7 @@ class getID3_cached_dbm extends getID3
ob_start(); // nasty, buy the only way to check...
phpinfo();
$contents = ob_get_contents();
- ob_end_clean();
+ @ob_end_clean();
if (!strstr($contents, $cache_type)) {
die('PHP is not compiled --with '.$cache_type.' support, required to use DBM style cache.');
}
diff --git a/apps/media/getID3/getid3/module.graphic.jpg.php b/apps/media/getID3/getid3/module.graphic.jpg.php
index 0c2db92e636..cd5e986543c 100644
--- a/apps/media/getID3/getid3/module.graphic.jpg.php
+++ b/apps/media/getID3/getid3/module.graphic.jpg.php
@@ -62,7 +62,7 @@ class getid3_jpg
$ThisFileInfo['warning'][] = strip_tags($errors);
unset($ThisFileInfo['jpg']['exif']);
}
- ob_end_clean();
+ @ob_end_clean();
} else {
diff --git a/apps/media/getID3/getid3/write.id3v2.php b/apps/media/getID3/getid3/write.id3v2.php
index 9447486e845..32546d18af9 100644
--- a/apps/media/getID3/getid3/write.id3v2.php
+++ b/apps/media/getID3/getid3/write.id3v2.php
@@ -68,7 +68,7 @@ class getid3_write_id3v2
} else {
$this->errors[] = 'Could not open '.$this->filename.' mode "r+b" - '.strip_tags(ob_get_contents());
}
- ob_end_clean();
+ @ob_end_clean();
} else {
@@ -80,7 +80,7 @@ class getid3_write_id3v2
} else {
$this->errors[] = 'Could not open '.$this->filename.' mode "wb" - '.strip_tags(ob_get_contents());
}
- ob_end_clean();
+ @ob_end_clean();
}
@@ -106,7 +106,7 @@ class getid3_write_id3v2
fclose($fp_source);
copy($tempfilename, $this->filename);
unlink($tempfilename);
- ob_end_clean();
+ @ob_end_clean();
return true;
} else {
@@ -121,7 +121,7 @@ class getid3_write_id3v2
$this->errors[] = 'Could not open '.$this->filename.' mode "rb" - '.strip_tags(ob_get_contents());
}
- ob_end_clean();
+ @ob_end_clean();
}
return false;
diff --git a/apps/media/getID3/getid3/write.real.php b/apps/media/getID3/getid3/write.real.php
index 1e0240ccf32..14e775812fc 100644
--- a/apps/media/getID3/getid3/write.real.php
+++ b/apps/media/getID3/getid3/write.real.php
@@ -118,7 +118,7 @@ class getid3_write_real
$this->errors[] = 'Could not open '.$tempfilename.' mode "wb" - '.strip_tags(ob_get_contents());
}
- ob_end_clean();
+ @ob_end_clean();
}
fclose($fp_source);
return false;
@@ -275,7 +275,7 @@ class getid3_write_real
$this->errors[] = 'Could not open '.$tempfilename.' mode "wb" - '.strip_tags(ob_get_contents());
}
- ob_end_clean();
+ @ob_end_clean();
}
fclose($fp_source);
return false;
diff --git a/apps/media/js/collection.js b/apps/media/js/collection.js
index 29ba45919cf..576f567faef 100644
--- a/apps/media/js/collection.js
+++ b/apps/media/js/collection.js
@@ -26,11 +26,17 @@ Collection={
}
for(var i=0;i
');
foreach($artists as $artist){
self::printArtist($artist);
diff --git a/apps/media/lib_collection.php b/apps/media/lib_collection.php
index 82c4afedd0a..571cb7e6850 100644
--- a/apps/media/lib_collection.php
+++ b/apps/media/lib_collection.php
@@ -43,7 +43,7 @@ class OC_MEDIA_COLLECTION{
if(isset(self::$artistIdCache[$name])){
return self::$artistIdCache[$name];
}else{
- $query=OC_DB::prepare("SELECT artist_id FROM *PREFIX*media_artists WHERE artist_name LIKE ?");
+ $query=OC_DB::prepare("SELECT artist_id FROM *PREFIX*media_artists WHERE lower(artist_name) LIKE ?");
$artists=$query->execute(array($name))->fetchAll();
if(is_array($artists) and isset($artists[0])){
self::$artistIdCache[$name]=$artists[0]['artist_id'];
@@ -71,7 +71,7 @@ class OC_MEDIA_COLLECTION{
if(isset(self::$albumIdCache[$artistId][$name])){
return self::$albumIdCache[$artistId][$name];
}else{
- $query=OC_DB::prepare("SELECT album_id FROM *PREFIX*media_albums WHERE album_name LIKE ? AND album_artist=?");
+ $query=OC_DB::prepare("SELECT album_id FROM *PREFIX*media_albums WHERE lower(album_name) LIKE ? AND album_artist=?");
$albums=$query->execute(array($name,$artistId))->fetchAll();
if(is_array($albums) and isset($albums[0])){
self::$albumIdCache[$artistId][$name]=$albums[0]['album_id'];
@@ -146,7 +146,7 @@ class OC_MEDIA_COLLECTION{
if($artistId!=0){
return $artistId;
}else{
- $query=OC_DB::prepare("INSERT INTO `*PREFIX*media_artists` (`artist_id` ,`artist_name`) VALUES (NULL , ?)");
+ $query=OC_DB::prepare("INSERT INTO `*PREFIX*media_artists` (`artist_name`) VALUES (?)");
$result=$query->execute(array($name));
return self::getArtistId($name);;
}
@@ -193,7 +193,7 @@ class OC_MEDIA_COLLECTION{
if($albumId!=0){
return $albumId;
}else{
- $query=OC_DB::prepare("INSERT INTO `*PREFIX*media_albums` (`album_id` ,`album_name` ,`album_artist`) VALUES (NULL , ?, ?)");
+ $query=OC_DB::prepare("INSERT INTO `*PREFIX*media_albums` (`album_name` ,`album_artist`) VALUES ( ?, ?)");
$query->execute(array($name,$artist));
return self::getAlbumId($name,$artist);
}
diff --git a/apps/media/lib_media.php b/apps/media/lib_media.php
index 7a666be8c27..485d616e1aa 100644
--- a/apps/media/lib_media.php
+++ b/apps/media/lib_media.php
@@ -40,7 +40,6 @@ class OC_MEDIA{
*/
public static function loginListener($params){
if(isset($_POST['user']) and $_POST['password']){
- if(defined("DEBUG") && DEBUG) {error_log('postlogin');}
$name=$_POST['user'];
$query=OC_DB::prepare("SELECT user_id from *PREFIX*media_users WHERE user_id LIKE ?");
$uid=$query->execute(array($name))->fetchAll();
@@ -64,7 +63,6 @@ class OC_MEDIA{
$path=substr($path,1);
}
$path='/'.$path;
- error_log("$path was updated");
OC_MEDIA_SCANNER::scanFile($path);
}
diff --git a/apps/media/lib_scanner.php b/apps/media/lib_scanner.php
index 9bf9397b19a..ef63cea45df 100644
--- a/apps/media/lib_scanner.php
+++ b/apps/media/lib_scanner.php
@@ -97,25 +97,25 @@ class OC_MEDIA_SCANNER{
$data=@self::$getID3->analyze($file);
getid3_lib::CopyTagsToComments($data);
if(!isset($data['comments'])){
- if(defined("DEBUG") && DEBUG) {error_log("error reading id3 tags in '$file'");}
+ OC_Log::write('media',"error reading id3 tags in '$file'",OC_Log::WARN);
return;
}
if(!isset($data['comments']['artist'])){
- if(defined("DEBUG") && DEBUG) {error_log("error reading artist tag in '$file'");}
+ OC_Log::write('media',"error reading artist tag in '$file'",OC_Log::WARN);
$artist='unknown';
}else{
$artist=stripslashes($data['comments']['artist'][0]);
$artist=utf8_encode($artist);
}
if(!isset($data['comments']['album'])){
- if(defined("DEBUG") && DEBUG) {error_log("error reading album tag in '$file'");}
+ OC_Log::write('media',"error reading album tag in '$file'",OC_Log::WARN);
$album='unknown';
}else{
$album=stripslashes($data['comments']['album'][0]);
$album=utf8_encode($album);
}
if(!isset($data['comments']['title'])){
- if(defined("DEBUG") && DEBUG) {error_log("error reading title tag in '$file'");}
+ OC_Log::write('media',"error reading title tag in '$file'",OC_Log::WARN);
$title='unknown';
}else{
$title=stripslashes($data['comments']['title'][0]);
diff --git a/apps/media/server/xml.server.php b/apps/media/server/xml.server.php
index 44a16793bf2..7e320a7f595 100644
--- a/apps/media/server/xml.server.php
+++ b/apps/media/server/xml.server.php
@@ -35,9 +35,9 @@ if(!isset($_POST['action']) and isset($_GET['action'])){
foreach($arguments as &$argument){
$argument=stripslashes($argument);
}
-ob_clean();
+@ob_clean();
if(isset($arguments['action'])){
- if(defined("DEBUG") && DEBUG) {error_log($arguments['action']);}
+ OC_Log::write('media','ampache '.$arguments['action'].' request', OC_Log::DEBUG);
switch($arguments['action']){
case 'url_to_song':
OC_MEDIA_AMPACHE::url_to_song($arguments);
diff --git a/apps/remoteStorage/lib_remoteStorage.php b/apps/remoteStorage/lib_remoteStorage.php
index 5677ab3c6e0..f10a72870a4 100644
--- a/apps/remoteStorage/lib_remoteStorage.php
+++ b/apps/remoteStorage/lib_remoteStorage.php
@@ -7,7 +7,7 @@ class OC_remoteStorage {
if( PEAR::isError($result)) {
$entry = 'DB Error: "'.$result->getMessage().'"
';
$entry .= 'Offending command was: '.$result->getDebugInfo().'
';
- if(defined("DEBUG") && DEBUG) {error_log( $entry );}
+ OC_Log::write('removeStorage',$entry,OC_Log::ERROR);
die( $entry );
}
$ret = array();
@@ -24,7 +24,7 @@ class OC_remoteStorage {
if( PEAR::isError($result)) {
$entry = 'DB Error: "'.$result->getMessage().'"
';
$entry .= 'Offending command was: '.$result->getDebugInfo().'
';
- if(defined("DEBUG") && DEBUG) {error_log( $entry );}
+ OC_Log::write('removeStorage',$entry,OC_Log::ERROR);
die( $entry );
}
$ret = array();
@@ -45,7 +45,7 @@ class OC_remoteStorage {
if( PEAR::isError($result)) {
$entry = 'DB Error: "'.$result->getMessage().'"
';
$entry .= 'Offending command was: '.$result->getDebugInfo().'
';
- if(defined("DEBUG") && DEBUG) {error_log( $entry );}
+ OC_Log::write('removeStorage',$entry,OC_Log::ERROR);
die( $entry );
}
}
@@ -56,7 +56,7 @@ class OC_remoteStorage {
if( PEAR::isError($result)) {
$entry = 'DB Error: "'.$result->getMessage().'"
';
$entry .= 'Offending command was: '.$result->getDebugInfo().'
';
- if(defined("DEBUG") && DEBUG) {error_log( $entry );}
+ OC_Log::write('removeStorage',$entry,OC_Log::ERROR);
die( $entry );
}
}
diff --git a/apps/user_openid/appinfo/app.php b/apps/user_openid/appinfo/app.php
index 546f9f4565a..912019a9700 100644
--- a/apps/user_openid/appinfo/app.php
+++ b/apps/user_openid/appinfo/app.php
@@ -26,14 +26,14 @@ OC_User::useBackend('openid');
//check for results from openid requests
if(isset($_GET['openid_mode']) and $_GET['openid_mode'] == 'id_res'){
- if(defined("DEBUG") && DEBUG) {error_log('openid retured');}
+ OC_Log::write('user_openid','openid retured',OC_Log::DEBUG);
$openid = new SimpleOpenID;
$openid->SetIdentity($_GET['openid_identity']);
$openid_validation_result = $openid->ValidateWithServer();
if ($openid_validation_result == true){ // OK HERE KEY IS VALID
- if(defined("DEBUG") && DEBUG) {error_log('auth sucessfull');}
+ OC_Log::write('user_openid','auth sucessfull',OC_Log::DEBUG);
$identity=$openid->GetIdentity();
- if(defined("DEBUG") && DEBUG) {error_log("auth as $identity");}
+ OC_Log::write('user_openid','auth as '.$identity,OC_Log::DEBUG);
$user=OC_USER_OPENID::findUserForIdentity($identity);
if($user){
$_SESSION['user_id']=$user;
@@ -41,13 +41,13 @@ if(isset($_GET['openid_mode']) and $_GET['openid_mode'] == 'id_res'){
}
}else if($openid->IsError() == true){ // ON THE WAY, WE GOT SOME ERROR
$error = $openid->GetError();
- if(defined("DEBUG") && DEBUG) {error_log("ERROR CODE: " . $error['code']);}
- if(defined("DEBUG") && DEBUG) {error_log("ERROR DESCRIPTION: " . $error['description']);}
+ OC_Log::write('user_openid','ERROR CODE: '. $error['code'],OC_Log::ERROR);
+ OC_Log::write('user_openid','ERROR DESCRIPTION: '. $error['description'],OC_Log::ERROR);
}else{ // Signature Verification Failed
- if(defined("DEBUG") && DEBUG) {error_log("INVALID AUTHORIZATION");}
+ OC_Log::write('user_openid','INVALID AUTHORIZATION',OC_Log::ERROR);
}
}else if (isset($_GET['openid_mode']) and $_GET['openid_mode'] == 'cancel'){ // User Canceled your Request
- if(defined("DEBUG") && DEBUG) {error_log("USER CANCELED REQUEST");}
+ OC_Log::write('user_openid','USER CANCELED REQUEST',OC_Log::DEBUG);
return false;
}
diff --git a/apps/user_openid/phpmyid.php b/apps/user_openid/phpmyid.php
index 5009fa410aa..ef01e7a046d 100644
--- a/apps/user_openid/phpmyid.php
+++ b/apps/user_openid/phpmyid.php
@@ -603,7 +603,7 @@ function test_mode () {
$res['gmp'] = 'pass - n/a';
}
- // sys_get_temp_dir
+ // get_temp_dir
$res['logfile'] = is_writable($profile['logfile'])
? 'pass' : "warn - log is not writable";
@@ -1053,8 +1053,6 @@ function debug ($x, $m = null) {
} else {
$x .= "\n";
}
-
- if(defined("DEBUG") && DEBUG) {error_log($x . "\n", 3, $profile['logfile']);}
}
@@ -1375,33 +1373,6 @@ function str_diff_at ($a, $b) {
return $n;
}
-
-if (! function_exists('sys_get_temp_dir') && ini_get('open_basedir') == false) {
-/**
- * Create function if missing
- * @return string
- */
-function sys_get_temp_dir () {
- $keys = array('TMP', 'TMPDIR', 'TEMP');
- foreach ($keys as $key) {
- if (isset($_ENV[$key]) && is_dir($_ENV[$key]) && is_writable($_ENV[$key]))
- return realpath($_ENV[$key]);
- }
-
- $tmp = tempnam(false, null);
- if (file_exists($tmp)) {
- $dir = realpath(dirname($tmp));
- unlink($tmp);
- return realpath($dir);
- }
-
- return realpath(dirname(__FILE__));
-}} elseif (! function_exists('sys_get_temp_dir')) {
-function sys_get_temp_dir () {
- return realpath(dirname(__FILE__));
-}}
-
-
/**
* Determine if a child URL actually decends from the parent, and that the
* parent is a good URL.
@@ -1513,7 +1484,6 @@ function wrap_html ( $message ) {