From 3bf33782a601cd0c55ac08f2cb18521e2fb18e4b Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 20 Dec 2012 20:58:09 +0100 Subject: [PATCH] Error need to suppress .bak files --- .../js/widget.full.js.bak | 376 ------------------ .../lib/widgethelper.php.bak | 255 ------------ .../apps/files_sharing_widget/public.php.bak | 277 ------------- .../templates/settings.php.bak | 67 ---- 4 files changed, 975 deletions(-) delete mode 100644 oc454/apps/files_sharing_widget/js/widget.full.js.bak delete mode 100644 oc454/apps/files_sharing_widget/lib/widgethelper.php.bak delete mode 100644 oc454/apps/files_sharing_widget/public.php.bak delete mode 100644 oc454/apps/files_sharing_widget/templates/settings.php.bak diff --git a/oc454/apps/files_sharing_widget/js/widget.full.js.bak b/oc454/apps/files_sharing_widget/js/widget.full.js.bak deleted file mode 100644 index f9b77c3..0000000 --- a/oc454/apps/files_sharing_widget/js/widget.full.js.bak +++ /dev/null @@ -1,376 +0,0 @@ -/** - * ownCloud - Picture Widget - * - * @author Sebastian Doell - * @copyright 2012 Sebastian Doell - * - * - */ -(function() { - - var jQuery; - - if (window.jQuery === undefined || window.jQuery.fn.jquery !== "1.8.2") { - var script_tag = document.createElement("script"); - script_tag.setAttribute("type", "text/javascript"); - script_tag.setAttribute("src",ownWidgetOptions.path + ownWidgetOptions.appspath+ "/files_sharing_widget/js/jquery-pack.min.js"); - if (script_tag.readyState) { - - script_tag.onreadystatechange = function() { - if (this.readyState == "complete" || this.readyState == "loaded") { - scriptLoadHandler(); - } - } - } else { - script_tag.onload = scriptLoadHandler; - } - (document.getElementsByTagName("head")[0] || document.documentElement).appendChild(script_tag); - } else { - jQuery = window.jQuery; - main(); - } - - /******** Called once jQuery has loaded ******/ - function scriptLoadHandler() { - // Restore $ and window.jQuery to their previous values and store the - // new jQuery in our local jQuery variable - jQuery = window.jQuery.noConflict(true); - // Call our main function - main(); - } - - - function rawurlencode(str) { - str = (str + "").toString(); - return encodeURIComponent(str).replace(/!/g, "%21").replace(/'/g, "%27").replace(/\(/g, "%28").replace(/\)/g, "%29").replace(/\*/g, "%2A"); - } - - function main() { - jQuery(document).ready(function($) { - // if($.browser.msie && $.browser.version<9){ - //widgetContainer.css('opacity',0.3); - // } - OwnWidget.init(ownWidgetOptions); - }); - } - -var OwnWidget={ - - init:function(options){ - var defaults={ - crypt:'', - path:'', - appspath:'apps', - display:'', - fbAppid:'', - modal:true, - cssAddWidget:{'width':1000,'height':560}, - cssAddButton:{'top':20,'left':20}, - buttonlabel:'Fotogalerie' - } - this.options=jQuery.extend(true,defaults,options); - this.loadCssFile(); - this.imageSlide = []; - this.loadPage=''; - this.widgetContainer=jQuery("#ownWidget-container"); - this.firstShow=true; - if(this.options.fbAppid!=''){ - this.loginToFacebookApp(); - } - - if (this.options.display == "hidden") { - this.createShowButton(); - } else { - this.showWidget(); - } - this.initSupersized() - }, - - loadCssFile:function(){ - if(jQuery('#ownWidgetCss').length<1){ - jQuery("", {id:'ownWidgetCss',rel : "stylesheet",type : "text/css",href :this.options.path + this.options.appspath+ "/files_sharing_widget/css/widget.css"}).appendTo("head"); - } - }, - - createShowButton:function () { - self=this; - this.widgetContainer.hide(); - if (this.options.modal) { - this.overlay = jQuery('
').appendTo("body"); - } - this.addWidgetControls(); - var DisplayButton = jQuery('
' + this.options.buttonlabel + "
"); - DisplayButton.css(this.options.cssAddButton); - DisplayButton.appendTo("body"); - DisplayButton.click(function() { - if (self.options.modal) { - self.overlay.height(jQuery(window).height()); - self.overlay.width(jQuery(window).width()); - self.overlay.animate({ - opacity : 0.5 - }, 500, function() { - self.loadData(); - }); - } else { - self.loadData(); - } - }); - }, - - showWidget: function (){ - - this.widgetContainer.hide(); - this.addWidgetControls(); - this.loadData(); - - }, - - addWidgetControls:function() { - var self=this; - if (this.options.display == "hidden") { - var CloseButton = jQuery('
X
'); - this.widgetContainer.prepend(CloseButton); - } - this.widgetContainer.prepend('
'); - var wHeader = jQuery('
Slideshow
'); - this.widgetContainer.prepend(wHeader); - - jQuery("#SlideShowButton").click(function() { - self.widgetContainer.animate({ - opacity : "toggle" - }, 500, function() { - jQuery("body").append("
"); - jQuery("#supersized-loader").remove(); - jQuery("#supersized").remove(); - jQuery("#supersized-holder").append("
"); - jQuery("#supersized").show(); - jQuery("#slideshow-content").animate({opacity : "toggle"}); - jQuery("a[rel=fancyArea]").each(function(i, el) { - self.imageSlide.push({ - image : el.href, - title : el.title.replace(//, ">"), - thumb : el.children[0].src - }); - }); - self.loadSupersized(); - }); - }); - jQuery("#SlideShowButton").hide(); - if (this.options.display == "hidden") { - CloseButton.click(function() { - self.widgetContainer.animate({ - opacity : "toggle" - }, 500, function() { - if (self.options.modal) { - self.overlay.height(0); - self.overlay.width(0); - } - self.firstShow = true; - self.widgetContainer.hide(); - }); - }); - } - }, - initMovingBox:function(){ - - var self=this; - var h=this.widgetContainer.height() - 80; - - if(jQuery('#albumPics').length > 0) var h=this.widgetContainer.height() -210; - - jQuery("#ownWidget-slider").movingBoxes({ - reducedSize : 1, - startPanel : 1, - hashTags : false, - speed : 700, - fixedHeight : true, - wrap : false, - buildNav : true, - navFormatter : function() { - return "●" - }, - preinit:function(){ - self.widgetContainer.prepend('
 
'); - jQuery("#ownWidget-output").hide(); - jQuery(".mb-wrapper").css({height : h}); - }, - initialized:function(e, slider, tar){ - jQuery(".mb-scroll").height(h-20); - jQuery("#ownWidget-slider").height(h-20); - jQuery("#ownWidget-Loader").remove(); - jQuery("#ownWidget-output").show(); - - } - }); - }, - - loadData:function() { - var self = this; - jQuery.ajax({ - dataType : "jsonp", - jsonp : "jsonp_callback", - url : self.options.path + "widget.php?iToken=" + rawurlencode(self.options.crypt) + self.loadPage, - - success : function(data) { - - jQuery("#ownWidget-output").html(""); - jQuery("#ownWidget-output").html(data.databack); - jQuery("#ownWidget-header").html(data.nav + " " + data.folder); - - - if (jQuery("#loginForm").length > 0) { - jQuery("#loginForm #iSubmit").click(function(event) { - event.preventDefault(); - self.loadPage = "&password=" + jQuery("#password").val(); - self.loadData(); - }); - } - jQuery("#ownWidget-header .loadAlbum").each(function(i, el) { - jQuery(el).click(function() { - if (jQuery(el).attr("title") == "") { - self.loadPage = ""; - } else { - self.loadPage = "&path=/" + jQuery(el).attr("title"); - } - self.loadData(); - }) - }); - - if (self.firstShow) { - - self.widgetContainer.css(self.options.cssAddWidget); - - if (!self.options.cssAddWidget.top && !self.options.cssAddWidget.left) { - self.widgetContainer.css({ - top : (jQuery(window).height() / 2) - (self.widgetContainer.height() / 2), - left : (jQuery(window).width() / 2) - (self.widgetContainer.width() / 2) - }); - } - - self.widgetContainer.show(); - - self.firstShow = false; - } - - if (jQuery("#ownWidget-slider").length > 0) { - - jQuery("#ownWidget-slider").css({width : self.widgetContainer.width() - 12}); - jQuery("#ownWidget-slider > div").css({width : self.widgetContainer.width() - 15 }); - - if (jQuery("#ownWidget-slider > div").length > 1) { - self.initMovingBox(); - } else { - if (jQuery("#ownWidget-slider").html() == "") { - jQuery("#ownWidget-slider").html("
No images found!
"); - jQuery("#SlideShowButton").hide(); - } - } - } - - if (jQuery("a[rel=fancyArea]").length > 0) { - jQuery("a[rel=fancyArea]").fancybox({ - transitionIn : "elastic", - transitionOut : "elastic", - speedIn : 600, - speedOut : 200, - titlePosition : "over", - titleFormat : function(x, w, u, v) { - return 'Image ' + (u + 1) + " / " + w.length + " " + x + "" - } - }); - jQuery("#SlideShowButton").show(); - } - - } - }); - }, - loadSuperSizedTheme:function() { - jQuery.supersized.themeVars = { - progress_delay : false, - thumb_page : false, - thumb_interval : false, - image_path : this.options.path + this.options.appspath+ "/files_sharing_widget/img/", - play_button : "#pauseplay", - next_slide : "#nextslide", - prev_slide : "#prevslide", - next_thumb : "#nextthumb", - prev_thumb : "#prevthumb", - slide_caption : "#slidecaption", - slide_current : ".slidenumber", - slide_total : ".totalslides", - slide_list : "#slide-list", - thumb_tray : "#thumb-tray", - thumb_list : "#thumb-list", - thumb_forward : "#thumb-forward", - thumb_back : "#thumb-back", - tray_arrow : "#tray-arrow", - tray_button : "#tray-button", - progress_bar : "#progress-bar" - } - }, - initSupersized:function() { - var self=this; - var htmlString = ''; - jQuery(htmlString).appendTo("body"); - jQuery("#closeSlideShow").click(function() { - if (jQuery.supersized.vars.slideshow_interval) { - clearInterval(jQuery.supersized.vars.slideshow_interval); - } - self.imageSlide = []; - jQuery("#supersized-holder").remove(); - jQuery("#slideshow-content").animate({opacity : "toggle"}); - jQuery("#thumb-list").remove(); - self.widgetContainer.animate({opacity : "toggle"}); - }); - }, - - loadSupersized:function() { - this.loadSuperSizedTheme(); - jQuery.supersized({ - slideshow : 1, - autoplay : 0, - start_slide : 1, - stop_loop : 0, - random : 0, - slide_interval : 3000, - transition : 6, - transition_speed : 1000, - new_window : 1, - pause_hover : 0, - keyboard_nav : 1, - performance : 1, - image_protect : 1, - min_width : 0, - min_height : 0, - vertical_center : 1, - horizontal_center : 1, - fit_always : 0, - fit_portrait : 1, - fit_landscape : 0, - slide_links : false, - new_window : false, - thumb_links : 1, - thumbnail_navigation : 0, - slides : this.imageSlide, - progress_bar : 1, - mouse_scrub : 0 - }); - }, - loginToFacebookApp:function(){ - jQuery('body').append('
'); - jQuery.getScript(document.location.protocol + '//connect.facebook.net/de_DE/all.js'); - window.fbAsyncInit = function() { - FB.init({appId:this.options.fbAppid, status: true, cookie: true, xfbml: true}); - }; - - } - - - - - -} - -})(); - - diff --git a/oc454/apps/files_sharing_widget/lib/widgethelper.php.bak b/oc454/apps/files_sharing_widget/lib/widgethelper.php.bak deleted file mode 100644 index 553372d..0000000 --- a/oc454/apps/files_sharing_widget/lib/widgethelper.php.bak +++ /dev/null @@ -1,255 +0,0 @@ - - * - * - */ - - -class OC_Widget_Helper { - -/** - * @brief Creates an absolute url for widget use - * @param string $service id - * @return string the url - * - * Returns a absolute url to the given service. - */ - public static function linkToWidget($service, $add_slash = false) { - return OC_Helper::linkToAbsolute( '', 'widget.php') . '?action=' . $service . (($add_slash && $service[strlen($service)-1]!='/')?'/':''); - } - - - /** - * @make temp Thumbs - * @param string path - * @param int thumgheight - *@return Thumb - */ - public static function txtWaterMark($imgSrc,$height,$txt){ - $white = imagecolorallocate($imgSrc, 255, 255, 255); - $font_path = OC_App::getAppPath('files_sharing_widget')."/font/MonospaceTypewriter.ttf"; - //print $font_path; - if(is_file($font_path)){ - imagettftext($imgSrc,10, 0, 10, ($height-10), $white, $font_path, $txt); - } - } - - public static function makeThumb($path,$imgHeight=150,$bWatermark=true,$sWatermarkTxt='(c) zeus-cloud') { - $img = $path; - - - $image = new \OC_Image(); - $image -> loadFromFile(OC_Filesystem::getLocalFile($img)); - if (!$image -> valid()) - return false; - $image -> fixOrientation(); - - $ret = $image -> preciseResize(floor(($imgHeight * $image -> width()) / $image -> height()), $imgHeight); - if($bWatermark) OC_Widget_Helper::txtWaterMark($image ->resource(),$imgHeight,$sWatermarkTxt); - if ($image) { - OCP\Response::enableCaching(3600 * 24); - // 24 hour - $image -> show(); - } - } - - - public static function makeNormPic($path,$bWatermark=true,$sWatermarkTxt='(c) zeus-cloud') { - $img = $path; - - $image = new \OC_Image(); - $image -> loadFromFile(OC_Filesystem::getLocalFile($img)); - if (!$image -> valid()) return false; - $image -> fixOrientation(); - $ret = $image -> preciseResize($image -> width(), $image -> height()); - if($bWatermark) OC_Widget_Helper::txtWaterMark($image ->resource(),$image -> height(),$sWatermarkTxt); - if ($image) { - OCP\Response::enableCaching(3600 * 24); - // 24 hour - $image -> show(); - } - } - - /** - * @load Template for real view - * @param int width of the widget - * @param int height of the widget - * @return return the template - * - */ - public static function getRelativeAppWebPath() { - - foreach(OC::$APPSROOTS as $dir) { - if(file_exists($dir['path'].'/files_sharing_widget')) { - return $dir['url']; - } - } - return false; - } - - public static function loadTemplateReal($WIDTH="770",$HEIGHT="570",$TITLE='Zeus-Cloud Picture Widget') { - - $getRelativeAppsPath=OC_Widget_Helper::getRelativeAppWebPath(); - if(strripos(OC::$WEBROOT,'/')) $getRelativeAppsPath=substr($getRelativeAppsPath,1,strlen($getRelativeAppsPath)-1); - - $tpl="\n\n\n".htmlentities(utf8_decode($TITLE))." - \n - \n - \n - \n - \n - \n\n - \n - \n - \n
- \n - \n"; - - return $tpl; - - } - - /** - * @encrypt string - * @param string Value to encrypt - * @param string Secret KEy - * @return enctrypted string - * - */ - - public static function encrypt($sValue, $sSecretKey) { - return rtrim( - base64_encode( - mcrypt_encrypt( - MCRYPT_RIJNDAEL_256, - $sSecretKey, $sValue, - MCRYPT_MODE_ECB, - mcrypt_create_iv( - mcrypt_get_iv_size( - MCRYPT_RIJNDAEL_256, - MCRYPT_MODE_ECB - ), - MCRYPT_RAND) - ) - ) - ,"\0\3"); - } - - - /** - * @get Count Pics of Directory and one image for Preview - * @param int ID of the Directory - * - * @return the Count of images and one path to a pic - * - */ - public static function getCountPicsDirectory($ID){ - $SQL="SELECT path, COUNT(*) AS ANZAHLPICS FROM *PREFIX*fscache WHERE parent='".intval($ID)."' AND mimepart='image' ORDER BY mtime DESC"; - //print $SQL; - $stmt = OCP\DB::prepare($SQL); - $result = $stmt -> execute(); - $sData=$result->fetchRow(); - if($sData['ANZAHLPICS']) return $sData; - else return "0"; - } - - - /** - * @returns an Overview of all Shares - * - * @param string Secret KEy - * @return array of all shares - * - */ - public static function getAllSharesUser($SECRET){ - - // USER = 0; GROUP = 1;LINK = 3; - // link = parent.location.protocol+'//'+location.host+OC.linkTo('', 'public.php')+'?service=files&'+$('tr[data-id='+String(itemSource)+']').attr('data-type')+'='+file; - $SQLMORE=''; - if(OCP\Config::getSystemValue('version')>='4.90.5'){ - $SQLMORE=",s.token "; - } - - $SQL="SELECT s.id,s.share_with,s.file_target,.s.item_type,s.share_type,s.expiration,s.uid_owner, f.path $SQLMORE FROM *PREFIX*share s - LEFT JOIN *PREFIX*fscache f ON s.item_source=f.id - WHERE s.uid_owner='".\OC_User::getUser()."' "; - $stmt = \OCP\DB::prepare( $SQL); - $result = $stmt->execute(); - $shareInfo =''; - $output=false; - while( $row = $result->fetchRow()){ - $shareInfo[] = $row; - - } - if($shareInfo!=''){ - $tz=\OC_Calendar_App::getTimezone(); - foreach($shareInfo as $share){ - $itemTypeChoose='file'; - if($share['item_type']=='folder') $itemTypeChoose='dir'; - $expDate = new \DateTime($share['expiration'], new \DateTimeZone($tz)); - $EXPDATE=$expDate->format('d.m.Y H:i'); - - if($share['share_type']==0){ - $output[]=array( - 'id'=>$share['id'], - 'shareType'=>'User', - 'shareName'=>$share['share_with'], - 'link'=>'#', - 'name'=>$share['file_target'], - 'date'=>$EXPDATE, - 'iToken'=>'' - ); - } - if($share['share_type']==1){ - $output[]=array( - 'id'=>$share['id'], - 'shareType'=>'Gruppe', - 'shareName'=>$share['share_with'], - 'link'=>'#', - 'name'=>$share['file_target'], - 'date'=>$EXPDATE, - 'iToken'=>'' - ); - } - if($share['share_type']==3){ - $addPassImg=''; - $tokenLink='&'.$itemTypeChoose.'='.$share['path']; - if($SQLMORE!='') $tokenLink='&t='.$share['token']; - if($share['share_with']!='') $addPassImg=' [Password]'; - $output[]=array( - 'id'=>$share['id'], - 'shareType'=>'Link', - 'shareName'=>'Guest'.$addPassImg, - 'link'=> \OC_Helper::linkToPublic('files').$tokenLink, - 'name'=>$share['file_target'], - 'date'=>$EXPDATE, - 'iToken'=>rawurlencode(self::encrypt($share['path'],$SECRET)) - ); - } - } - - } - return $output; - - } - - /** - * @delete Shares - * - * @param int Id of the shared folder or file - * - * - */ - - public static function delShare($ID) { - $SQL = "DELETE FROM *PREFIX*share WHERE id='".intval($ID)."' LIMIT 1"; - $stmt = OCP\DB::prepare($SQL); - $result = $stmt -> execute(); - - } - -} \ No newline at end of file diff --git a/oc454/apps/files_sharing_widget/public.php.bak b/oc454/apps/files_sharing_widget/public.php.bak deleted file mode 100644 index 7949632..0000000 --- a/oc454/apps/files_sharing_widget/public.php.bak +++ /dev/null @@ -1,277 +0,0 @@ - - * - * - */ -OC::$CLASSPATH['OC_Share_Backend_File'] = "files_sharing/lib/share/file.php"; -OC::$CLASSPATH['OC_Share_Backend_Folder'] = 'files_sharing/lib/share/folder.php'; -OC::$CLASSPATH['OC_Filestorage_Shared'] = "files_sharing/lib/sharedstorage.php"; -OCP\Util::connectHook('OC_Filesystem', 'setup', 'OC_Filestorage_Shared', 'setup'); -OCP\Share::registerBackend('file', 'OC_Share_Backend_File'); -OCP\Share::registerBackend('folder', 'OC_Share_Backend_Folder', 'file'); - -$bReal=false; -if (isset($_GET['action']) && $_GET['action']=='real') { - $bReal=true; -} - -if (isset($_GET['file']) || isset($_GET['dir'])) { - - if (isset($_GET['dir'])) { - $type = 'folder'; - $type1 = 'dir'; - $path = $_GET['dir']; - if (strlen($path) > 1 and substr($path, -1, 1) === '/') { - $path = substr($path, 0, -1); - } - $baseDir = $path; - $dir = $baseDir; - - } else { - $type = 'file'; - $type1 = 'file'; - $path = $_GET['file']; - if (strlen($path) > 1 and substr($path, -1, 1) === '/') { - $path = substr($path, 0, -1); - } - } - - $uidOwner = substr($path, 1, strpos($path, '/', 1) - 1); - - if (OCP\User::userExists($uidOwner)) { - OC_Util::setupFS($uidOwner); - $fileSource = OC_Filecache::getId($path, ''); - if ($fileSource != -1 && ($linkItem = OCP\Share::getItemSharedWithByLink($type, $fileSource, $uidOwner))) { - $passwordProtect=false; - - $Param=OC_Preferences::getValue($uidOwner, 'files_sharing_widget', 'parameter',''); - if($Param) $ObjParamter=json_decode($Param,true); - else{ - $ObjParamter['maxpicsperpage']=10; - $ObjParamter['imgheight']=150; - $ObjParamter['width']=750; - $ObjParamter['height']=550; - $ObjParamter['watermark']=1; - $ObjParamter['watermarktxt']=''; - $ObjParamter['title']=''; - } - if(!isset($ObjParamter['watermarktxt'])) { - $ObjParamter['watermark']=0; - $ObjParamter['watermarktxt']=''; - } - if(!isset($ObjParamter['title'])) $ObjParamter['title']=''; - - - - if (isset($linkItem['share_with'])) { - // Check password - $passwordProtect=true; - if (isset($_GET['password'])) { - - $password = $_GET['password']; - $storedHash = $linkItem['share_with']; - $forcePortable = (CRYPT_BLOWFISH != 1); - $hasher = new PasswordHash(8, $forcePortable); - if (!($hasher->CheckPassword($password.OC_Config::getValue('passwordsalt', ''), $storedHash))) { - $passwordProtect=true; - - } else { - // Save item id in session for future requests - $_SESSION['public_link_authenticated'] = $linkItem['id']; - $passwordProtect=false; - } - // Check if item id is set in session - } else if (!isset($_SESSION['public_link_authenticated']) || $_SESSION['public_link_authenticated'] !== $linkItem['id']) { - $passwordProtect=true; - - } - - if(isset($_SESSION['public_link_authenticated']) && $_SESSION['public_link_authenticated']==$linkItem['id']){ - $passwordProtect=false; - } - } - - - - $path = $linkItem['path']; - - - if (isset($_GET['path'])) { - $path .= $_GET['path']; - $dir .= $_GET['path']; - - } - // Download the file - if (isset($_GET['action']) && $_GET['action']=='norm') { - if (isset($_GET['dir'])) { - if (isset($_GET['path']) && $_GET['path'] != '') {// download a file from a shared directory - //OC_Files::get('', $path, $_SERVER['REQUEST_METHOD'] == 'HEAD' ? true : false); - OC_Widget_Helper::makeNormPic($path,$ObjParamter['watermark'],$ObjParamter['watermarktxt']); - } - } - - } else if (isset($_GET['action']) && $_GET['action']=='thumb') { - - if (isset($_GET['dir'])) { - if (isset($_GET['path']) && $_GET['path'] != '') { - OC_Widget_Helper::makeThumb($path,$ObjParamter['imgheight'],$ObjParamter['watermark'],$ObjParamter['watermarktxt']); - } - } - }else{ - - - if (!$passwordProtect && OC_Filesystem::is_dir($path)) { - - $dataOutput = '
'; - $dataFolder=''; - //$dataOutput='
    - //
  • '; - //$files = array(); - $rootLength = strlen($baseDir) + 1; - $counter = 0; - $maxNeben = $ObjParamter['maxpicsperpage']; - if ($maxNeben) - $maxNeben = ((int)$maxNeben - 1); - if (!$maxNeben) $maxNeben = 5; - - $mySecret=OCP\Config::getSystemValue('secretword'); - if($mySecret=='') $mySecret='mySecretWord'; - $thumbSize=$ObjParamter['imgheight']; - - //$aFilesArray=[]; - - foreach (OC_Files::getDirectoryContent($path) as $i) { - $i['date'] = OCP\Util::formatDate($i['mtime']); - - $i['directory'] = '/'.substr('/'.$uidOwner.'/files'.$i['directory'], $rootLength); - if ($i['directory'] == '/') { - $i['directory'] = ''; - } - - if ($i['type'] == 'file' && stristr($i['mimetype'], 'image')) { - if ($counter == 0) { - $dataOutput .= '
    '; - } - $fileinfo = pathinfo($i['name']); - //$i['path']=$uidOwner.'/files'.$path; - $i['basename'] = $fileinfo['filename']; - $i['extension'] = isset($fileinfo['extension']) ? ('.' . $fileinfo['extension']) : ''; - - - - $SHOWURL = OC_Widget_Helper::linkToWidget('norm') . '&path='.$i['directory'].'/' . $i['basename'] . $i['extension'].'&iToken='.rawurlencode($_GET['iToken']); - - $SHOWThumb = OC_Widget_Helper::linkToWidget('thumb') . '&path='.$i['directory'].'/' . $i['basename'] . $i['extension'].'&iToken='.rawurlencode($_GET['iToken']); - - $dataOutput .=''; - - if ($counter == $maxNeben) { - $dataOutput .= '
    '; - $counter = -1; - } - - $counter++; - } - - if ($i['type'] == 'dir'){ - - $AlbumData=OC_Widget_Helper::getCountPicsDirectory($i['id']); - $ouputAlbumThumb='
     
    '.$i['name'].' ('.$AlbumData['ANZAHLPICS'].')
    '; - if($AlbumData['path']){ - $relPath=substr($AlbumData['path'], $rootLength); - - $ShowAlbumThumb = OC_Widget_Helper::linkToWidget('thumb') . '&path=/'.$relPath.'&iToken='.rawurlencode($_GET['iToken']); - $ouputAlbumThumb='

    '.$i['name'].' ('.$AlbumData['ANZAHLPICS'].')
    '; - } - - $dataFolder.= ''.$ouputAlbumThumb.' '; - } - - $i['permissions'] = OCP\Share::PERMISSION_READ; - - } - if($dataFolder=='') $dataFolder=''; - else $dataFolder='
    '.$dataFolder.'
    '; - - // Make breadcrumb - //$breadcrumb = array(); - $breadCrumbOutput=''; - $pathtohere = ''; - $count = 1; - foreach (explode('/', $dir) as $i) { - if ($i != '') { - if ($i != $baseDir) { - $pathtohere .= '/'.$i; - } - if ( strlen($pathtohere) < strlen($_GET['dir'])) { - continue; - } - $outputDir=str_replace($_GET['dir'], "", $pathtohere, $count); - $outputName=$i; - if($outputDir=='') $outputName='Home'; - - $breadCrumbOutput.='» '.$outputName.' '; - - } - - } - - - if (($counter - 1) != $maxNeben) { - $dataOutput .= '
'; - } - //$dataOutput.=''; - $dataOutput .= ''; - - if($bReal==false){ - $aBack = array('databack' => $dataOutput,'folder'=>$dataFolder,'nav'=>$breadCrumbOutput, 'success' => 1); - $data = json_encode($aBack); - echo $_GET['jsonp_callback'] . '(' . $data . ');'; - }else{ - echo OC_Widget_Helper::loadTemplateReal($ObjParamter['width'],$ObjParamter['height'],$ObjParamter['title']); - - } - }else{ - if($passwordProtect ){ - $dataFolder=''; - $breadCrumbOutput='Password'; - $dataOutput='
- Password: - - -
-
'; - } - - if($bReal==false){ - $aBack = array('databack' => $dataOutput,'folder'=>$dataFolder,'nav'=>$breadCrumbOutput, 'success' => 1); - $data = json_encode($aBack); - echo $_GET['jsonp_callback'] . '(' . $data . ');'; - }else{ - echo OC_Widget_Helper::loadTemplateReal($ObjParamter['width'],$ObjParamter['height'],$ObjParamter['title']); - - } - - } - } - } else { - $dataFolder=''; - - $breadCrumbOutput='Share Pics'; - $dataOutput = '» No Shared Files available!'; - if($bReal==false){ - $aBack = array('databack' => $dataOutput,'folder'=>$dataFolder,'nav'=>$breadCrumbOutput, 'success' => 1); - $data = json_encode($aBack); - echo $_GET['jsonp_callback'] . '(' . $data . ');'; - }else{ - echo OC_Widget_Helper::loadTemplateReal($ObjParamter['width'],$ObjParamter['height'],$ObjParamter['title']); - } - } - } - - -} diff --git a/oc454/apps/files_sharing_widget/templates/settings.php.bak b/oc454/apps/files_sharing_widget/templates/settings.php.bak deleted file mode 100644 index 7a23100..0000000 --- a/oc454/apps/files_sharing_widget/templates/settings.php.bak +++ /dev/null @@ -1,67 +0,0 @@ - - * - * - */ -?> -
- Geteilte Dateien und Ordner -
    -
  • - ShareType - Shared With - Share Item - Expiration Date - Picture Widget Token
    -
  • - -
  • - - - - - - -
  • - -

-Configurationparameters:
-
-
-
- px
- px
-
-
- - -
-

-Use as Widget: (For Integration Homepage, Facebook)
- - -
- - -