diff options
author | Bart Visscher <bartv@thisnet.nl> | 2012-08-15 18:13:08 +0200 |
---|---|---|
committer | Bart Visscher <bartv@thisnet.nl> | 2012-08-15 18:16:06 +0200 |
commit | ddfb9de14747b363bfcb70df00cea34b47abc0a3 (patch) | |
tree | 2c692e9b452ce1152764b991fbf160d2d5e9bc7d /apps | |
parent | 63af75586b53391670c2ccfb48d19f4b6950cab0 (diff) | |
download | nextcloud-server-ddfb9de14747b363bfcb70df00cea34b47abc0a3.tar.gz nextcloud-server-ddfb9de14747b363bfcb70df00cea34b47abc0a3.zip |
Fix linkTo calls for new routing
Diffstat (limited to 'apps')
-rw-r--r-- | apps/contacts/js/contacts.js | 2 | ||||
-rw-r--r-- | apps/contacts/lib/search.php | 2 | ||||
-rw-r--r-- | apps/files/index.php | 4 | ||||
-rw-r--r-- | apps/files/js/fileactions.js | 2 | ||||
-rw-r--r-- | apps/files/js/filelist.js | 2 | ||||
-rw-r--r-- | apps/files_archive/js/archive.js | 4 | ||||
-rw-r--r-- | apps/gallery/lib/tiles.php | 4 | ||||
-rw-r--r-- | apps/gallery/templates/index.php | 2 |
8 files changed, 11 insertions, 11 deletions
diff --git a/apps/contacts/js/contacts.js b/apps/contacts/js/contacts.js index 35637de050d..2e62b5cf135 100644 --- a/apps/contacts/js/contacts.js +++ b/apps/contacts/js/contacts.js @@ -1477,7 +1477,7 @@ OC.Contacts={ } var contact = params.data ? $('<li data-id="'+params.data.id+'" data-bookid="'+params.data.addressbookid - + '" role="button"><a href="'+OC.linkTo('contacts', 'index.php')+'&id=' + + '" role="button"><a href="'+OC.linkTo('contacts', 'index.php')+'?id=' + params.data.id+'" style="background: url('+OC.filePath('contacts', '', 'thumbnail.php') + '?id='+params.data.id+') no-repeat scroll 0% 0% transparent;">' + params.data.displayname+'</a></li>') diff --git a/apps/contacts/lib/search.php b/apps/contacts/lib/search.php index 53aa2b48496..c86bc12c5b6 100644 --- a/apps/contacts/lib/search.php +++ b/apps/contacts/lib/search.php @@ -11,7 +11,7 @@ class OC_Search_Provider_Contacts extends OC_Search_Provider{ $vcards = OC_Contacts_VCard::all($addressbook['id']); foreach($vcards as $vcard){ if(substr_count(strtolower($vcard['fullname']), strtolower($query)) > 0) { - $link = OCP\Util::linkTo('contacts', 'index.php').'&id='.urlencode($vcard['id']); + $link = OCP\Util::linkTo('contacts', 'index.php').'?id='.urlencode($vcard['id']); $results[]=new OC_Search_Result($vcard['fullname'], '', $link, (string)$l->t('Contact'));//$name,$text,$link,$type } } diff --git a/apps/files/index.php b/apps/files/index.php index 79bed8e357e..ffe9493272b 100644 --- a/apps/files/index.php +++ b/apps/files/index.php @@ -75,11 +75,11 @@ foreach( explode( '/', $dir ) as $i ){ // make breadcrumb und filelist markup $list = new OCP\Template( 'files', 'part.list', '' ); $list->assign( 'files', $files, false ); -$list->assign( 'baseURL', OCP\Util::linkTo('files', 'index.php').'&dir=', false); +$list->assign( 'baseURL', OCP\Util::linkTo('files', 'index.php').'?dir=', false); $list->assign( 'downloadURL', OCP\Util::linkTo('files', 'download.php').'?file=', false); $breadcrumbNav = new OCP\Template( 'files', 'part.breadcrumb', '' ); $breadcrumbNav->assign( 'breadcrumb', $breadcrumb, false ); -$breadcrumbNav->assign( 'baseURL', OCP\Util::linkTo('files', 'index.php').'&dir=', false); +$breadcrumbNav->assign( 'baseURL', OCP\Util::linkTo('files', 'index.php').'?dir=', false); $upload_max_filesize = OCP\Util::computerFileSize(ini_get('upload_max_filesize')); $post_max_size = OCP\Util::computerFileSize(ini_get('post_max_size')); diff --git a/apps/files/js/fileactions.js b/apps/files/js/fileactions.js index b6f4d0b0896..cecfddbf1cf 100644 --- a/apps/files/js/fileactions.js +++ b/apps/files/js/fileactions.js @@ -168,7 +168,7 @@ FileActions.register('all','Rename',function(){return OC.imagePath('core','actio }); FileActions.register('dir','Open','',function(filename){ - window.location=OC.linkTo('files', 'index.php') + '&dir='+encodeURIComponent($('#dir').val()).replace(/%2F/g, '/')+'/'+encodeURIComponent(filename); + window.location=OC.linkTo('files', 'index.php') + '?dir='+encodeURIComponent($('#dir').val()).replace(/%2F/g, '/')+'/'+encodeURIComponent(filename); }); FileActions.setDefault('dir','Open'); diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js index a414c5f8303..0bfc810baf2 100644 --- a/apps/files/js/filelist.js +++ b/apps/files/js/filelist.js @@ -41,7 +41,7 @@ FileList={ html = $('<tr></tr>').attr({ "data-type": "dir", "data-size": size, "data-file": name}); td = $('<td></td>').attr({"class": "filename", "style": 'background-image:url('+OC.imagePath('core', 'filetypes/folder.png')+')' }); td.append('<input type="checkbox" />'); - var link_elem = $('<a></a>').attr({ "class": "name", "href": OC.linkTo('files', 'index.php')+"&dir="+ encodeURIComponent($('#dir').val()+'/'+name).replace(/%2F/g, '/') }); + var link_elem = $('<a></a>').attr({ "class": "name", "href": OC.linkTo('files', 'index.php')+"?dir="+ encodeURIComponent($('#dir').val()+'/'+name).replace(/%2F/g, '/') }); link_elem.append($('<span></span>').addClass('nametext').text(name)); link_elem.append($('<span></span>').attr({'class': 'uploadtext', 'currentUploads': 0})); td.append(link_elem); diff --git a/apps/files_archive/js/archive.js b/apps/files_archive/js/archive.js index 9fb9853e299..48ec031be62 100644 --- a/apps/files_archive/js/archive.js +++ b/apps/files_archive/js/archive.js @@ -8,11 +8,11 @@ $(document).ready(function() { if(typeof FileActions!=='undefined'){ FileActions.register('application/zip','Open','',function(filename){ - window.location=OC.linkTo('files', 'index.php')+'&dir='+encodeURIComponent($('#dir').val()).replace(/%2F/g, '/')+'/'+encodeURIComponent(filename); + window.location=OC.linkTo('files', 'index.php')+'?dir='+encodeURIComponent($('#dir').val()).replace(/%2F/g, '/')+'/'+encodeURIComponent(filename); }); FileActions.setDefault('application/zip','Open'); FileActions.register('application/x-gzip','Open','',function(filename){ - window.location=OC.linkTo('files', 'index.php')+'&dir='+encodeURIComponent($('#dir').val()).replace(/%2F/g, '/')+'/'+encodeURIComponent(filename); + window.location=OC.linkTo('files', 'index.php')+'?dir='+encodeURIComponent($('#dir').val()).replace(/%2F/g, '/')+'/'+encodeURIComponent(filename); }); FileActions.setDefault('application/x-gzip','Open'); } diff --git a/apps/gallery/lib/tiles.php b/apps/gallery/lib/tiles.php index e36d26d3191..3903d2dde73 100644 --- a/apps/gallery/lib/tiles.php +++ b/apps/gallery/lib/tiles.php @@ -95,11 +95,11 @@ class TileSingle extends TileBase { public function get($extra = '') { // !HACK! file path needs to be encoded twice because files app decode twice url, so any special chars like + or & in filename // !HACK! will result in failing of opening them - return '<a rel="images" title="'.htmlentities(basename($this->getPath())).'" href="'.\OCP\Util::linkTo('gallery','ajax/viewImage.php').'?img='.urlencode(urlencode($this->getPath())).'"><img rel="images" src="'.\OCP\Util::linkTo('gallery', 'ajax/thumbnail.php').'&filepath='.urlencode($this->getPath()).'" '.$extra.'></a>'; + return '<a rel="images" title="'.htmlentities(basename($this->getPath())).'" href="'.\OCP\Util::linkTo('gallery','ajax/viewImage.php').'?img='.urlencode(urlencode($this->getPath())).'"><img rel="images" src="'.\OCP\Util::linkTo('gallery', 'ajax/thumbnail.php').'?filepath='.urlencode($this->getPath()).'" '.$extra.'></a>'; } public function getMiniatureSrc() { - return \OCP\Util::linkTo('gallery', 'ajax/thumbnail.php').'&filepath='.urlencode($this->getPath()); + return \OCP\Util::linkTo('gallery', 'ajax/thumbnail.php').'?filepath='.urlencode($this->getPath()); } public function getPath() { diff --git a/apps/gallery/templates/index.php b/apps/gallery/templates/index.php index b2efd5342ff..b0f22036032 100644 --- a/apps/gallery/templates/index.php +++ b/apps/gallery/templates/index.php @@ -18,7 +18,7 @@ $(document).ready(function() { for ($i = 0; $i < count($paths); $i++) { $path .= urlencode($paths[$i]).'/'; $classess = 'crumb'.($i == count($paths)-1?' last':''); - echo '<div class="'.$classess.'" style="background-image:url(\''.\OCP\image_path('core','breadcrumb.png').'\')"><a href="'.\OCP\Util::linkTo('gallery', 'index.php').'&root='.$path.'">'.OCP\Util::sanitizeHTML($paths[$i]).'</a></div>'; + echo '<div class="'.$classess.'" style="background-image:url(\''.\OCP\image_path('core','breadcrumb.png').'\')"><a href="'.\OCP\Util::linkTo('gallery', 'index.php').'?root='.$path.'">'.OCP\Util::sanitizeHTML($paths[$i]).'</a></div>'; } } |