summaryrefslogtreecommitdiffstats
path: root/apps/contacts
diff options
context:
space:
mode:
Diffstat (limited to 'apps/contacts')
-rw-r--r--apps/contacts/ajax/activation.php2
-rw-r--r--apps/contacts/ajax/addbook.php2
-rw-r--r--apps/contacts/ajax/addcontact.php2
-rw-r--r--apps/contacts/ajax/addproperty.php2
-rw-r--r--apps/contacts/ajax/categories/categoriesfor.php2
-rw-r--r--apps/contacts/ajax/categories/delete.php2
-rw-r--r--apps/contacts/ajax/categories/list.php2
-rw-r--r--apps/contacts/ajax/categories/rescan.php2
-rw-r--r--apps/contacts/ajax/chooseaddressbook.php2
-rw-r--r--apps/contacts/ajax/contactdetails.php2
-rw-r--r--apps/contacts/ajax/contacts.php2
-rw-r--r--apps/contacts/ajax/createaddressbook.php2
-rw-r--r--apps/contacts/ajax/cropphoto.php2
-rw-r--r--apps/contacts/ajax/deletebook.php2
-rw-r--r--apps/contacts/ajax/deletecard.php2
-rw-r--r--apps/contacts/ajax/deleteproperty.php2
-rw-r--r--apps/contacts/ajax/editaddress.php2
-rw-r--r--apps/contacts/ajax/editaddressbook.php2
-rw-r--r--apps/contacts/ajax/editname.php2
-rw-r--r--apps/contacts/ajax/getdetails.php2
-rw-r--r--apps/contacts/ajax/importdialog.php2
-rw-r--r--apps/contacts/ajax/loadcard.php2
-rw-r--r--apps/contacts/ajax/loadintro.php2
-rw-r--r--apps/contacts/ajax/loadphoto.php2
-rw-r--r--apps/contacts/ajax/newcontact.php2
-rw-r--r--apps/contacts/ajax/savecrop.php2
-rw-r--r--apps/contacts/ajax/saveproperty.php2
-rw-r--r--apps/contacts/ajax/updateaddressbook.php2
-rw-r--r--apps/contacts/ajax/uploadphoto.php2
-rw-r--r--apps/contacts/carddav.php2
-rw-r--r--apps/contacts/css/contacts.css23
-rw-r--r--apps/contacts/dynphoto.php2
-rw-r--r--apps/contacts/export.php2
-rw-r--r--apps/contacts/import.php2
-rw-r--r--apps/contacts/index.php2
-rw-r--r--apps/contacts/js/contacts.js8
-rw-r--r--apps/contacts/photo.php2
-rw-r--r--apps/contacts/templates/index.php4
-rw-r--r--apps/contacts/thumbnail.php2
39 files changed, 53 insertions, 54 deletions
diff --git a/apps/contacts/ajax/activation.php b/apps/contacts/ajax/activation.php
index d69e3dba3f8..06d1a7e24fc 100644
--- a/apps/contacts/ajax/activation.php
+++ b/apps/contacts/ajax/activation.php
@@ -7,7 +7,7 @@
* See the COPYING-README file.
*/
-require_once ("../../../lib/base.php");
+
OC_JSON::checkLoggedIn();
OC_JSON::checkAppEnabled('contacts');
diff --git a/apps/contacts/ajax/addbook.php b/apps/contacts/ajax/addbook.php
index f5852183cc3..f466d57e12e 100644
--- a/apps/contacts/ajax/addbook.php
+++ b/apps/contacts/ajax/addbook.php
@@ -6,7 +6,7 @@
* See the COPYING-README file.
*/
-require_once('../../../lib/base.php');
+
OC_JSON::checkLoggedIn();
OC_JSON::checkAppEnabled('contacts');
$book = array(
diff --git a/apps/contacts/ajax/addcontact.php b/apps/contacts/ajax/addcontact.php
index 68da54655ae..152277181bb 100644
--- a/apps/contacts/ajax/addcontact.php
+++ b/apps/contacts/ajax/addcontact.php
@@ -21,7 +21,7 @@
*/
// Init owncloud
-require_once('../../../lib/base.php');
+
function bailOut($msg) {
OC_JSON::error(array('data' => array('message' => $msg)));
OC_Log::write('contacts','ajax/addcontact.php: '.$msg, OC_Log::DEBUG);
diff --git a/apps/contacts/ajax/addproperty.php b/apps/contacts/ajax/addproperty.php
index d2c0291e8c6..9a5e59692d6 100644
--- a/apps/contacts/ajax/addproperty.php
+++ b/apps/contacts/ajax/addproperty.php
@@ -21,7 +21,7 @@
*/
// Init owncloud
-require_once('../../../lib/base.php');
+
// Check if we are a user
OC_JSON::checkLoggedIn();
diff --git a/apps/contacts/ajax/categories/categoriesfor.php b/apps/contacts/ajax/categories/categoriesfor.php
index c02c37914a2..39a7758c8fb 100644
--- a/apps/contacts/ajax/categories/categoriesfor.php
+++ b/apps/contacts/ajax/categories/categoriesfor.php
@@ -6,7 +6,7 @@
* See the COPYING-README file.
*/
-require_once('../../../../lib/base.php');
+
OC_JSON::checkLoggedIn();
OC_JSON::checkAppEnabled('contacts');
diff --git a/apps/contacts/ajax/categories/delete.php b/apps/contacts/ajax/categories/delete.php
index 3ba5aa16068..3cc2dea6638 100644
--- a/apps/contacts/ajax/categories/delete.php
+++ b/apps/contacts/ajax/categories/delete.php
@@ -6,7 +6,7 @@
* See the COPYING-README file.
*/
-require_once('../../../../lib/base.php');
+
OC_JSON::checkLoggedIn();
OC_JSON::checkAppEnabled('contacts');
diff --git a/apps/contacts/ajax/categories/list.php b/apps/contacts/ajax/categories/list.php
index 64d74c82e69..98c1c705180 100644
--- a/apps/contacts/ajax/categories/list.php
+++ b/apps/contacts/ajax/categories/list.php
@@ -6,7 +6,7 @@
* See the COPYING-README file.
*/
-require_once('../../../../lib/base.php');
+
OC_JSON::checkLoggedIn();
OC_JSON::checkAppEnabled('contacts');
diff --git a/apps/contacts/ajax/categories/rescan.php b/apps/contacts/ajax/categories/rescan.php
index 5f1057bab44..09208c3f685 100644
--- a/apps/contacts/ajax/categories/rescan.php
+++ b/apps/contacts/ajax/categories/rescan.php
@@ -6,7 +6,7 @@
* See the COPYING-README file.
*/
-require_once('../../../../lib/base.php');
+
OC_JSON::checkLoggedIn();
OC_JSON::checkAppEnabled('contacts');
diff --git a/apps/contacts/ajax/chooseaddressbook.php b/apps/contacts/ajax/chooseaddressbook.php
index d6080791299..b47c872e9aa 100644
--- a/apps/contacts/ajax/chooseaddressbook.php
+++ b/apps/contacts/ajax/chooseaddressbook.php
@@ -6,7 +6,7 @@
* See the COPYING-README file.
*/
-require_once('../../../lib/base.php');
+
OC_JSON::checkLoggedIn();
OC_JSON::checkAppEnabled('contacts');
diff --git a/apps/contacts/ajax/contactdetails.php b/apps/contacts/ajax/contactdetails.php
index 03895c862aa..13c3f80c3b5 100644
--- a/apps/contacts/ajax/contactdetails.php
+++ b/apps/contacts/ajax/contactdetails.php
@@ -21,7 +21,7 @@
*/
// Init owncloud
-require_once('../../../lib/base.php');
+
function bailOut($msg) {
OC_JSON::error(array('data' => array('message' => $msg)));
OC_Log::write('contacts','ajax/contactdetails.php: '.$msg, OC_Log::DEBUG);
diff --git a/apps/contacts/ajax/contacts.php b/apps/contacts/ajax/contacts.php
index cf86764105f..3e75e4c80e3 100644
--- a/apps/contacts/ajax/contacts.php
+++ b/apps/contacts/ajax/contacts.php
@@ -6,7 +6,7 @@
* See the COPYING-README file.
*/
-require_once('../../../lib/base.php');
+
OC_JSON::checkLoggedIn();
OC_JSON::checkAppEnabled('contacts');
diff --git a/apps/contacts/ajax/createaddressbook.php b/apps/contacts/ajax/createaddressbook.php
index 28944fe864c..5cdb9b49ef8 100644
--- a/apps/contacts/ajax/createaddressbook.php
+++ b/apps/contacts/ajax/createaddressbook.php
@@ -6,7 +6,7 @@
* later.
* See the COPYING-README file.
*/
-require_once('../../../lib/base.php');
+
// Check if we are a user
OC_JSON::checkLoggedIn();
diff --git a/apps/contacts/ajax/cropphoto.php b/apps/contacts/ajax/cropphoto.php
index 878fb5610c6..96e66ffb69c 100644
--- a/apps/contacts/ajax/cropphoto.php
+++ b/apps/contacts/ajax/cropphoto.php
@@ -21,7 +21,7 @@
*/
// Init owncloud
-require_once('../../../lib/base.php');
+
// Check if we are a user
OC_JSON::checkLoggedIn();
diff --git a/apps/contacts/ajax/deletebook.php b/apps/contacts/ajax/deletebook.php
index 46d8deb4868..b80df526f95 100644
--- a/apps/contacts/ajax/deletebook.php
+++ b/apps/contacts/ajax/deletebook.php
@@ -21,7 +21,7 @@
*/
// Init owncloud
-require_once('../../../lib/base.php');
+
// Check if we are a user
OC_JSON::checkLoggedIn();
diff --git a/apps/contacts/ajax/deletecard.php b/apps/contacts/ajax/deletecard.php
index 5675aef5f15..98cdb85f0fc 100644
--- a/apps/contacts/ajax/deletecard.php
+++ b/apps/contacts/ajax/deletecard.php
@@ -26,7 +26,7 @@ function bailOut($msg) {
}
// Init owncloud
-require_once('../../../lib/base.php');
+
// Check if we are a user
OC_JSON::checkLoggedIn();
diff --git a/apps/contacts/ajax/deleteproperty.php b/apps/contacts/ajax/deleteproperty.php
index ab0958cac58..73786cb10cf 100644
--- a/apps/contacts/ajax/deleteproperty.php
+++ b/apps/contacts/ajax/deleteproperty.php
@@ -21,7 +21,7 @@
*/
// Init owncloud
-require_once('../../../lib/base.php');
+
// Check if we are a user
OC_JSON::checkLoggedIn();
diff --git a/apps/contacts/ajax/editaddress.php b/apps/contacts/ajax/editaddress.php
index 4e6456f6045..73f34ef5c6c 100644
--- a/apps/contacts/ajax/editaddress.php
+++ b/apps/contacts/ajax/editaddress.php
@@ -6,7 +6,7 @@
* See the COPYING-README file.
*/
-require_once('../../../lib/base.php');
+
OC_JSON::checkLoggedIn();
OC_JSON::checkAppEnabled('contacts');
diff --git a/apps/contacts/ajax/editaddressbook.php b/apps/contacts/ajax/editaddressbook.php
index a6262f39b23..ef797778d95 100644
--- a/apps/contacts/ajax/editaddressbook.php
+++ b/apps/contacts/ajax/editaddressbook.php
@@ -6,7 +6,7 @@
* See the COPYING-README file.
*/
-require_once('../../../lib/base.php');
+
OC_JSON::checkLoggedIn();
OC_JSON::checkAppEnabled('contacts');
$addressbook = OC_Contacts_App::getAddressbook($_GET['bookid']);
diff --git a/apps/contacts/ajax/editname.php b/apps/contacts/ajax/editname.php
index 31bdd125675..9e4d6814620 100644
--- a/apps/contacts/ajax/editname.php
+++ b/apps/contacts/ajax/editname.php
@@ -6,7 +6,7 @@
* See the COPYING-README file.
*/
-require_once('../../../lib/base.php');
+
OC_JSON::checkLoggedIn();
OC_JSON::checkAppEnabled('contacts');
function bailOut($msg) {
diff --git a/apps/contacts/ajax/getdetails.php b/apps/contacts/ajax/getdetails.php
index 4819916f4c3..aac69f4c52e 100644
--- a/apps/contacts/ajax/getdetails.php
+++ b/apps/contacts/ajax/getdetails.php
@@ -21,7 +21,7 @@
*/
// Init owncloud
-require_once('../../../lib/base.php');
+
// Check if we are a user
OC_JSON::checkLoggedIn();
diff --git a/apps/contacts/ajax/importdialog.php b/apps/contacts/ajax/importdialog.php
index 280e462f662..cde6bb2f5c4 100644
--- a/apps/contacts/ajax/importdialog.php
+++ b/apps/contacts/ajax/importdialog.php
@@ -6,7 +6,7 @@
* See the COPYING-README file.
*/
-require_once('../../../lib/base.php');
+
OC_JSON::checkLoggedIn();
OC_Util::checkAppEnabled('contacts');
$tmpl = new OC_Template('contacts', 'part.import');
diff --git a/apps/contacts/ajax/loadcard.php b/apps/contacts/ajax/loadcard.php
index 037fe2a6df2..4b2a65db911 100644
--- a/apps/contacts/ajax/loadcard.php
+++ b/apps/contacts/ajax/loadcard.php
@@ -21,7 +21,7 @@
*/
// Init owncloud
-require_once('../../../lib/base.php');
+
function bailOut($msg) {
OC_JSON::error(array('data' => array('message' => $msg)));
OC_Log::write('contacts','ajax/loadcard.php: '.$msg, OC_Log::DEBUG);
diff --git a/apps/contacts/ajax/loadintro.php b/apps/contacts/ajax/loadintro.php
index 8e5673655a1..7185c5cbe0a 100644
--- a/apps/contacts/ajax/loadintro.php
+++ b/apps/contacts/ajax/loadintro.php
@@ -21,7 +21,7 @@
*/
// Init owncloud
-require_once('../../../lib/base.php');
+
function bailOut($msg) {
OC_JSON::error(array('data' => array('message' => $msg)));
OC_Log::write('contacts','ajax/loadintro.php: '.$msg, OC_Log::DEBUG);
diff --git a/apps/contacts/ajax/loadphoto.php b/apps/contacts/ajax/loadphoto.php
index 2f95cdc9328..c076d97a7c2 100644
--- a/apps/contacts/ajax/loadphoto.php
+++ b/apps/contacts/ajax/loadphoto.php
@@ -20,7 +20,7 @@
*
*/
// Init owncloud
-require_once('../../../lib/base.php');
+
// Check if we are a user
OC_JSON::checkLoggedIn();
OC_JSON::checkAppEnabled('contacts');
diff --git a/apps/contacts/ajax/newcontact.php b/apps/contacts/ajax/newcontact.php
index fcfd12ca80d..36c37e039e9 100644
--- a/apps/contacts/ajax/newcontact.php
+++ b/apps/contacts/ajax/newcontact.php
@@ -21,7 +21,7 @@
*/
// Init owncloud
-require_once('../../../lib/base.php');
+
function bailOut($msg) {
OC_JSON::error(array('data' => array('message' => $msg)));
OC_Log::write('contacts','ajax/newcontact.php: '.$msg, OC_Log::DEBUG);
diff --git a/apps/contacts/ajax/savecrop.php b/apps/contacts/ajax/savecrop.php
index d003834ef8c..c1a0e2b0583 100644
--- a/apps/contacts/ajax/savecrop.php
+++ b/apps/contacts/ajax/savecrop.php
@@ -22,7 +22,7 @@
* Remember to delete tmp file at some point.
*/
// Init owncloud
-require_once('../../../lib/base.php');
+
OC_Log::write('contacts','ajax/savecrop.php: Huzzah!!!', OC_Log::DEBUG);
// Check if we are a user
diff --git a/apps/contacts/ajax/saveproperty.php b/apps/contacts/ajax/saveproperty.php
index 99d55e7927a..e459ed733d8 100644
--- a/apps/contacts/ajax/saveproperty.php
+++ b/apps/contacts/ajax/saveproperty.php
@@ -21,7 +21,7 @@
*/
// Init owncloud
-require_once('../../../lib/base.php');
+
// Check if we are a user
OC_JSON::checkLoggedIn();
diff --git a/apps/contacts/ajax/updateaddressbook.php b/apps/contacts/ajax/updateaddressbook.php
index 211df84b1d1..06028db479a 100644
--- a/apps/contacts/ajax/updateaddressbook.php
+++ b/apps/contacts/ajax/updateaddressbook.php
@@ -6,7 +6,7 @@
* See the COPYING-README file.
*/
-require_once('../../../lib/base.php');
+
// Check if we are a user
OC_JSON::checkLoggedIn();
diff --git a/apps/contacts/ajax/uploadphoto.php b/apps/contacts/ajax/uploadphoto.php
index 15d4718241e..082776f7f27 100644
--- a/apps/contacts/ajax/uploadphoto.php
+++ b/apps/contacts/ajax/uploadphoto.php
@@ -20,7 +20,7 @@
*
*/
// Init owncloud
-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/carddav.php b/apps/contacts/carddav.php
index 654aeb66a72..1a11ccdb3f7 100644
--- a/apps/contacts/carddav.php
+++ b/apps/contacts/carddav.php
@@ -22,8 +22,8 @@
// Do not load FS ...
$RUNTIME_NOSETUPFS = true;
+require_once('../inc.php');
-require_once('../../lib/base.php');
OC_Util::checkAppEnabled('contacts');
// Backends
diff --git a/apps/contacts/css/contacts.css b/apps/contacts/css/contacts.css
index ae96c5e4e9f..e3d2cfbdd66 100644
--- a/apps/contacts/css/contacts.css
+++ b/apps/contacts/css/contacts.css
@@ -11,7 +11,7 @@
#actionbar { height: 30px; width: 60px; position: fixed; right: 0px; top: 4em; margin: 0 0 0 0; padding: 0 0 0 0; z-index: 1000; }
#contacts_deletecard {position:absolute;top:15px;right:25px;}
#contacts_downloadcard {position:absolute;top:15px;right:50px;}
-#contacts_propertymenu_button { position:absolute;top:15px;right:150px; background:url('../../../core/img/actions/add.svg') no-repeat center; }
+#contacts_propertymenu_button { position:absolute;top:15px;right:150px; background:url('%webroot%/core/img/actions/add.svg') no-repeat center; }
#contacts_propertymenu { background-color: #fff; position:absolute;top:40px;right:150px; overflow:hidden; text-overflow:ellipsis; /*border: thin solid #1d2d44;*/ -moz-box-shadow:0 0 10px #000; -webkit-box-shadow:0 0 10px #000; box-shadow:0 0 10px #000; -moz-border-radius:0.5em; -webkit-border-radius:0.5em; border-radius:0.5em; -moz-border-radius:0.5em; -webkit-border-radius:0.5em; border-radius:0.5em; }
#contacts_propertymenu li { display: block; font-weight: bold; height: 20px; width: 100px; }
#contacts_propertymenu li a { padding: 3px; display: block }
@@ -35,20 +35,20 @@ dl.form { width: 100%; float: left; clear: right; margin: 0; padding: 0; }
#address.form dl { min-width: 10em; }
.droptarget { margin: 0.5em; padding: 0.5em; border: thin solid #ccc; -moz-border-radius:.3em; -webkit-border-radius:.3em; border-radius:.3em; }
.droppable { margin: 0.5em; padding: 0.5em; border: thin dashed #333; -moz-border-radius:.3em; -webkit-border-radius:.3em; border-radius:.3em; }
-.loading { background: url('../../../core/img/loading.gif') no-repeat center !important; /*cursor: progress; */ cursor: wait; }
-.ui-autocomplete-loading { background: url('../../../core/img/loading.gif') right center no-repeat; }
+.loading { background: url('%webroot%/core/img/loading.gif') no-repeat center !important; /*cursor: progress; */ cursor: wait; }
+.ui-autocomplete-loading { background: url('%webroot%/core/img/loading.gif') right center no-repeat; }
.float { float: left; }
.listactions { height: 1em; width:60px; float: left; clear: right; }
.add,.edit,.delete,.mail, .globe, .upload, .cloud { cursor: pointer; width: 20px; height: 20px; margin: 0; float: left; position:relative; opacity: 0.1; }
.add:hover,.edit:hover,.delete:hover,.mail:hover, .globe:hover, .upload:hover, .cloud:hover { opacity: 1.0 }
-.add { background:url('../../../core/img/actions/add.svg') no-repeat center; clear: both; }
-.delete { background:url('../../../core/img/actions/delete.svg') no-repeat center; }
-.edit { background:url('../../../core/img/actions/rename.svg') no-repeat center; }
-.mail { background:url('../../../core/img/actions/mail.svg') no-repeat center; }
-.upload { background:url('../../../core/img/actions/upload.svg') no-repeat center; }
-.cloud { background:url('../../../core/img/places/picture.svg') no-repeat center; }
+.add { background:url('%webroot%/core/img/actions/add.svg') no-repeat center; clear: both; }
+.delete { background:url('%webroot%/core/img/actions/delete.svg') no-repeat center; }
+.edit { background:url('%webroot%/core/img/actions/rename.svg') no-repeat center; }
+.mail { background:url('%webroot%/core/img/actions/mail.svg') no-repeat center; }
+.upload { background:url('%webroot%/core/img/actions/upload.svg') no-repeat center; }
+.cloud { background:url('%webroot%/core/img/places/picture.svg') no-repeat center; }
/*.globe { background:url('../img/globe.svg') no-repeat center; }*/
-.globe { background:url('../../../core/img/actions/public.svg') no-repeat center; }
+.globe { background:url('%webroot%/core/img/actions/public.svg') no-repeat center; }
.transparent{ opacity: 0.6; }
#edit_name_dialog { padding:0; }
#edit_name_dialog > input { width: 15em; }
@@ -65,7 +65,7 @@ dl.form { width: 100%; float: left; clear: right; margin: 0; padding: 0; }
.contactpart legend { width:auto; padding:.3em; border:1px solid #ddd; font-weight:bold; cursor:pointer; background:#f8f8f8; color:#555; text-shadow:#fff 0 1px 0; -moz-box-shadow:0 1px 1px #fff, 0 1px 1px #fff inset; -webkit-box-shadow:0 1px 1px #fff, 0 1px 1px #fff inset; -moz-border-radius:.5em; -webkit-border-radius:.5em; border-radius:.5em; }
#cropbox { margin: auto; }
-#contacts_details_photo { border-radius: 0.5em; border: thin solid #bbb; margin: 0.3em; background: url(../../../core/img/loading.gif) no-repeat center center; display: block; -moz-box-shadow: 0 1px 3px #777; -webkit-box-shadow: 0 1px 3px #777; box-shadow: 0 1px 3px #777; }
+#contacts_details_photo { border-radius: 0.5em; border: thin solid #bbb; margin: 0.3em; background: url('%webroot%/core/img/loading.gif') no-repeat center center; display: block; -moz-box-shadow: 0 1px 3px #777; -webkit-box-shadow: 0 1px 3px #777; box-shadow: 0 1px 3px #777; }
#contacts_details_photo:hover { background: #fff; cursor: default; }
#phototools { position:absolute; margin: 5px 0 0 10px; width:auto; height:22px; padding:0px; background-color:#fff; list-style-type:none; border-radius: 0.5em; -moz-box-shadow: 0 1px 3px #777; -webkit-box-shadow: 0 1px 3px #777; box-shadow: 0 1px 3px #777; }
#phototools li { display: inline; }
@@ -101,4 +101,3 @@ input[type="checkbox"] { width: 20px; height: 20px; vertical-align: bottom; }
.propertylist li > select { float: left; max-width: 8em; }
.typelist { float: left; max-width: 10em; } /* for multiselect */
.addresslist { clear: both; }
-
diff --git a/apps/contacts/dynphoto.php b/apps/contacts/dynphoto.php
index 2beac15e143..c1646e483de 100644
--- a/apps/contacts/dynphoto.php
+++ b/apps/contacts/dynphoto.php
@@ -21,7 +21,7 @@
*/
// Init owncloud
-require_once('../../lib/base.php');
+
$tmp_path = $_GET['tmp_path'];
$maxsize = isset($_GET['maxsize']) ? $_GET['maxsize'] : -1;
header("Cache-Control: no-cache, no-store, must-revalidate");
diff --git a/apps/contacts/export.php b/apps/contacts/export.php
index fb3e0a41ae7..95d02a9afd4 100644
--- a/apps/contacts/export.php
+++ b/apps/contacts/export.php
@@ -6,7 +6,7 @@
* See the COPYING-README file.
*/
-require_once ("../../lib/base.php");
+
OC_Util::checkLoggedIn();
OC_Util::checkAppEnabled('contacts');
$bookid = isset($_GET['bookid']) ? $_GET['bookid'] : NULL;
diff --git a/apps/contacts/import.php b/apps/contacts/import.php
index 45f1b0c53dc..8e0a427399b 100644
--- a/apps/contacts/import.php
+++ b/apps/contacts/import.php
@@ -7,7 +7,7 @@
*/
//check for addressbooks rights or create new one
ob_start();
-require_once ('../../lib/base.php');
+
OC_JSON::checkLoggedIn();
OC_Util::checkAppEnabled('contacts');
$nl = "\n";
diff --git a/apps/contacts/index.php b/apps/contacts/index.php
index 4039b8afd3d..d5545e76197 100644
--- a/apps/contacts/index.php
+++ b/apps/contacts/index.php
@@ -6,7 +6,7 @@
* later.
* See the COPYING-README file.
*/
-require_once('../../lib/base.php');
+
// Check if we are a user
OC_Util::checkLoggedIn();
diff --git a/apps/contacts/js/contacts.js b/apps/contacts/js/contacts.js
index e649e1744c3..edb7da70407 100644
--- a/apps/contacts/js/contacts.js
+++ b/apps/contacts/js/contacts.js
@@ -302,7 +302,7 @@ Contacts={
Contacts.UI.loadHandlers();
Contacts.UI.Card.loadContact(jsondata.data);
$('#leftcontent .active').removeClass('active');
- var item = '<li data-id="'+jsondata.data.id+'" class="active"><a href="index.php?id='+jsondata.data.id+'" style="background: url(thumbnail.php?id='+jsondata.data.id+') no-repeat scroll 0% 0% transparent;">'+Contacts.UI.Card.fn+'</a></li>';
+ var item = '<li data-id="'+jsondata.data.id+'" class="active"><a href="index.php?id='+jsondata.data.id+'" style="background: url('+OC.filePath('contacts', '', 'thumbnail.php')+'?id='+jsondata.data.id+') no-repeat scroll 0% 0% transparent;">'+Contacts.UI.Card.fn+'</a></li>';
var added = false;
$('#leftcontent ul li').each(function(){
if ($(this).text().toLowerCase() > Contacts.UI.Card.fn.toLowerCase()) {
@@ -1528,12 +1528,12 @@ Contacts={
lazyupdate:function(){
$('#contacts li').live('inview', function(){
if (!$(this).find('a').attr('style')) {
- $(this).find('a').css('background','url(thumbnail.php?id='+$(this).data('id')+') no-repeat');
+ $(this).find('a').css('background','url('+OC.filePath('contacts', '', 'thumbnail.php')+'?id='+$(this).data('id')+') no-repeat');
}
});
},
refreshThumbnail:function(id){
- $('#contacts [data-id="'+id+'"]').find('a').css('background','url(thumbnail.php?id='+id+'&refresh=1'+Math.random()+') no-repeat');
+ $('#contacts [data-id="'+id+'"]').find('a').css('background','url('+OC.filePath('contacts', '', 'thumbnail.php')+'?id='+id+'&refresh=1'+Math.random()+') no-repeat');
}
}
}
@@ -1592,7 +1592,7 @@ $(document).ready(function(){
// whole part of element is visible
if (!$(this).find('a').attr('style')) {
//alert($(this).data('id') + ' has background: ' + $(this).attr('style'));
- $(this).find('a').css('background','url(thumbnail.php?id='+$(this).data('id')+') no-repeat');
+ $(this).find('a').css('background','url('+OC.filePath('contacts', '', 'thumbnail.php')+'?id='+$(this).data('id')+') no-repeat');
}/* else {
alert($(this).data('id') + ' has style ' + $(this).attr('style').match('url'));
}*/
diff --git a/apps/contacts/photo.php b/apps/contacts/photo.php
index 117d0a9808f..c19ccccbc7f 100644
--- a/apps/contacts/photo.php
+++ b/apps/contacts/photo.php
@@ -9,7 +9,7 @@
*/
// Init owncloud
-require_once('../../lib/base.php');
+
OC_Util::checkLoggedIn();
OC_Util::checkAppEnabled('contacts');
diff --git a/apps/contacts/templates/index.php b/apps/contacts/templates/index.php
index 256d10afc07..d7aabbe76a5 100644
--- a/apps/contacts/templates/index.php
+++ b/apps/contacts/templates/index.php
@@ -16,8 +16,8 @@
</div>
<div id="bottomcontrols">
<form>
- <img class="svg" id="contacts_newcontact" src="img/contact-new.svg" alt="<?php echo $l->t('Add Contact'); ?>" title="<?php echo $l->t('Add Contact'); ?>" />
- <img class="svg" id="chooseaddressbook" src="../../core/img/actions/settings.svg" alt="<?php echo $l->t('Addressbooks'); ?>" title="<?php echo $l->t('Addressbooks'); ?>" />
+ <img class="svg" id="contacts_newcontact" src="<?php echo OC_Helper::linkTo('contacts', 'img/contact-new.svg'); ?>" alt="<?php echo $l->t('Add Contact'); ?>" title="<?php echo $l->t('Add Contact'); ?>" />
+ <img class="svg" id="chooseaddressbook" src="core/img/actions/settings.svg" alt="<?php echo $l->t('Addressbooks'); ?>" title="<?php echo $l->t('Addressbooks'); ?>" />
</form>
</div>
<div id="rightcontent" class="rightcontent" data-id="<?php echo $_['id']; ?>">
diff --git a/apps/contacts/thumbnail.php b/apps/contacts/thumbnail.php
index 28b8eba22c9..13f16954caf 100644
--- a/apps/contacts/thumbnail.php
+++ b/apps/contacts/thumbnail.php
@@ -21,7 +21,7 @@
*/
// Init owncloud
-require_once('../../lib/base.php');
+
OC_JSON::checkLoggedIn();
//OC_Util::checkLoggedIn();
OC_Util::checkAppEnabled('contacts');