diff options
-rw-r--r-- | apps/contacts/ajax/currentphoto.php | 2 | ||||
-rw-r--r-- | apps/contacts/ajax/oc_photo.php | 8 | ||||
-rw-r--r-- | apps/contacts/js/contacts.js | 3 | ||||
-rw-r--r-- | apps/contacts/templates/part.contact.php | 2 | ||||
-rw-r--r-- | apps/contacts/templates/part.importaddressbook.php | 2 | ||||
-rw-r--r-- | apps/files/ajax/rawlist.php | 2 | ||||
-rw-r--r-- | core/js/oc-dialogs.js | 2 |
7 files changed, 12 insertions, 9 deletions
diff --git a/apps/contacts/ajax/currentphoto.php b/apps/contacts/ajax/currentphoto.php index 15cb6c7a083..171f5c34785 100644 --- a/apps/contacts/ajax/currentphoto.php +++ b/apps/contacts/ajax/currentphoto.php @@ -20,7 +20,7 @@ * */ // Init owncloud -require_once('../../../lib/base.php'); +//require_once('../../../lib/base.php'); // Check if we are a user // Firefox and Konqueror tries to download application/json for me. --Arthur diff --git a/apps/contacts/ajax/oc_photo.php b/apps/contacts/ajax/oc_photo.php index 14d77ea50b7..e46441c4821 100644 --- a/apps/contacts/ajax/oc_photo.php +++ b/apps/contacts/ajax/oc_photo.php @@ -20,7 +20,7 @@ * */ // Init owncloud -require_once('../../../lib/base.php'); +require_once('lib/base.php'); // Check if we are a user // Firefox and Konqueror tries to download application/json for me. --Arthur @@ -36,11 +36,11 @@ function debug($msg) { OC_Log::write('contacts','ajax/oc_photo.php: '.$msg, OC_Log::DEBUG); } -if (!isset($_GET['id'])) { +if(!isset($_GET['id'])) { bailOut(OC_Contacts_App::$l10n->t('No contact ID was submitted.')); } -if (!isset($_GET['path'])) { +if(!isset($_GET['path'])) { bailOut(OC_Contacts_App::$l10n->t('No photo path was submitted.')); } @@ -66,7 +66,7 @@ if(!$image->fixOrientation()) { // No fatal error so we don't bail out. debug('Couldn\'t save correct image orientation: '.$tmpfname); } if($image->save($tmpfname)) { - OC_JSON::success(array('data' => array('mime'=>$_SERVER['CONTENT_TYPE'], 'name'=>$fn, 'id'=>$id, 'tmp'=>$tmpfname))); + OC_JSON::success(array('data' => array('id'=>$_GET['id'], 'tmp'=>$tmpfname))); exit(); } else { bailOut('Couldn\'t save temporary image: '.$tmpfname); diff --git a/apps/contacts/js/contacts.js b/apps/contacts/js/contacts.js index 7333b0e8d42..ba8e08fd875 100644 --- a/apps/contacts/js/contacts.js +++ b/apps/contacts/js/contacts.js @@ -1066,6 +1066,9 @@ Contacts={ }, loadPhotoHandlers:function(){ $('#phototools li a').tipsy(); + $('#phototools li a').click(function() { + $(this).tipsy('hide'); + }); $('#contacts_details_photo_wrapper').hover( function () { $('#phototools').slideDown(200); diff --git a/apps/contacts/templates/part.contact.php b/apps/contacts/templates/part.contact.php index a35d38e8867..bbe20143325 100644 --- a/apps/contacts/templates/part.contact.php +++ b/apps/contacts/templates/part.contact.php @@ -23,7 +23,7 @@ $id = isset($_['id']) ? $_['id'] : ''; <div id="contact_photo" class="contactsection"> - <form class="float" id="file_upload_form" action="ajax/uploadphoto.php" method="post" enctype="multipart/form-data" target="file_upload_target"> + <form class="float" id="file_upload_form" action="<?php echo OC_Helper::linkTo('contacts', 'ajax/uploadphoto.php'); ?>" method="post" enctype="multipart/form-data" target="file_upload_target"> <div class="tip propertycontainer" id="contacts_details_photo_wrapper" title="<?php echo $l->t('Click or drop to upload picture'); ?> (max <?php echo $_['uploadMaxHumanFilesize']; ?>)" data-element="PHOTO"> <!-- img style="padding: 1em;" id="contacts_details_photo" alt="Profile picture" src="photo.php?id=<?php echo $_['id']; ?>" / --> <progress id="contacts_details_photo_progress" style="display:none;" value="0" max="100">0 %</progress> diff --git a/apps/contacts/templates/part.importaddressbook.php b/apps/contacts/templates/part.importaddressbook.php index 3efb90cd220..2db23368866 100644 --- a/apps/contacts/templates/part.importaddressbook.php +++ b/apps/contacts/templates/part.importaddressbook.php @@ -22,7 +22,7 @@ </td> </tr> </table> -<form id="import_upload_form" action="ajax/uploadimport.php" method="post" enctype="multipart/form-data" target="import_upload_target"> +<form id="import_upload_form" action="<?php echo OC_Helper::linkTo('contacts', 'ajax/uploadimport.php'); ?>" method="post" enctype="multipart/form-data" target="import_upload_target"> <input type="hidden" name="MAX_FILE_SIZE" value="<?php echo $_['uploadMaxFilesize'] ?>" id="max_upload"> <input id="import_upload_start" type="file" accept="text/*" name="importfile" /> <input id="close_button" style="float: left;" type="button" onclick="Contacts.UI.Addressbooks.cancel(this);" value="<?php echo $l->t("Cancel"); ?>"> diff --git a/apps/files/ajax/rawlist.php b/apps/files/ajax/rawlist.php index 8f1990d1b8f..0b37b93674f 100644 --- a/apps/files/ajax/rawlist.php +++ b/apps/files/ajax/rawlist.php @@ -5,7 +5,7 @@ $RUNTIME_APPTYPES=array('filesystem'); // Init owncloud -require_once('../../lib/template.php'); +require_once('lib/template.php'); OC_JSON::checkLoggedIn(); diff --git a/core/js/oc-dialogs.js b/core/js/oc-dialogs.js index 6a3dac02ea7..7e41c1a7a59 100644 --- a/core/js/oc-dialogs.js +++ b/core/js/oc-dialogs.js @@ -240,6 +240,6 @@ OCdialogs = { var newval = parseInt($(dcid + ' #dirtree option:last').val())+1; $(dcid + ' #dirtree').append('<option selected="selected" value="'+newval+'">'+name+'</option>'); $(dcid + ' .filepicker_loader').css('visibility', 'visible'); - $.getJSON(OC.webroot+'/files/ajax/rawlist.php', {dir: p, mimetype: $(dcid).data('mimetype')}, function(r){OC.dialogs.fillFilePicker(r, dcid)}); + $.getJSON(OC.filePath('files', 'ajax', 'rawlist.php'), {dir: p, mimetype: $(dcid).data('mimetype')}, function(r){OC.dialogs.fillFilePicker(r, dcid)}); } }; |