diff --git a/ajax/addbook.php b/ajax/addbook.php index 254af1c3..70f47cc8 100755 --- a/ajax/addbook.php +++ b/ajax/addbook.php @@ -13,7 +13,7 @@ $book = array( 'id' => 'new', 'displayname' => '', ); -$tmpl = new OC_Template('contacts', 'part.editaddressbook'); +$tmpl = new OCP\Template('contacts', 'part.editaddressbook'); $tmpl->assign('new', true); $tmpl->assign('addressbook', $book); $tmpl->printPage(); diff --git a/ajax/chooseaddressbook.php b/ajax/chooseaddressbook.php index 2fe55606..9088a4e9 100755 --- a/ajax/chooseaddressbook.php +++ b/ajax/chooseaddressbook.php @@ -10,5 +10,5 @@ OCP\JSON::checkLoggedIn(); OCP\JSON::checkAppEnabled('contacts'); -$output = new OC_TEMPLATE("contacts", "part.chooseaddressbook"); +$output = new OCP\Template("contacts", "part.chooseaddressbook"); $output -> printpage(); diff --git a/ajax/contacts.php b/ajax/contacts.php index 93e618a0..37d396cd 100755 --- a/ajax/contacts.php +++ b/ajax/contacts.php @@ -12,7 +12,7 @@ OCP\JSON::checkAppEnabled('contacts'); $ids = OC_Contacts_Addressbook::activeIds(OCP\USER::getUser()); $contacts = OC_Contacts_VCard::all($ids); -$tmpl = new OC_TEMPLATE("contacts", "part.contacts"); +$tmpl = new OCP\Template("contacts", "part.contacts"); $tmpl->assign('contacts', $contacts); $page = $tmpl->fetchPage(); diff --git a/ajax/createaddressbook.php b/ajax/createaddressbook.php index 772232b6..af7c19ee 100755 --- a/ajax/createaddressbook.php +++ b/ajax/createaddressbook.php @@ -32,7 +32,7 @@ if(!OC_Contacts_Addressbook::setActive($bookid, 1)) { //exit(); } $addressbook = OC_Contacts_App::getAddressbook($bookid); -$tmpl = new OC_Template('contacts', 'part.chooseaddressbook.rowfields'); +$tmpl = new OCP\Template('contacts', 'part.chooseaddressbook.rowfields'); $tmpl->assign('addressbook', $addressbook); OCP\JSON::success(array( 'page' => $tmpl->fetchPage(), diff --git a/ajax/cropphoto.php b/ajax/cropphoto.php index 125dd107..7b286dbd 100755 --- a/ajax/cropphoto.php +++ b/ajax/cropphoto.php @@ -30,7 +30,7 @@ OCP\JSON::checkAppEnabled('contacts'); $tmp_path = $_GET['tmp_path']; $id = $_GET['id']; OCP\Util::writeLog('contacts','ajax/cropphoto.php: tmp_path: '.$tmp_path.', exists: '.file_exists($tmp_path), OCP\Util::DEBUG); -$tmpl = new OC_TEMPLATE("contacts", "part.cropphoto"); +$tmpl = new OCP\Template("contacts", "part.cropphoto"); $tmpl->assign('tmp_path', $tmp_path); $tmpl->assign('id', $id); $page = $tmpl->fetchPage(); diff --git a/ajax/editaddress.php b/ajax/editaddress.php index 4044eb5a..9fb35a0b 100755 --- a/ajax/editaddress.php +++ b/ajax/editaddress.php @@ -15,7 +15,7 @@ $checksum = isset($_GET['checksum'])?$_GET['checksum']:''; $vcard = OC_Contacts_App::getContactVCard($id); $adr_types = OC_Contacts_App::getTypesOfProperty('ADR'); -$tmpl = new OC_TEMPLATE("contacts", "part.edit_address_dialog"); +$tmpl = new OCP\Template("contacts", "part.edit_address_dialog"); if($checksum) { $line = OC_Contacts_App::getPropertyLineByChecksum($vcard, $checksum); $element = $vcard->children[$line]; diff --git a/ajax/editaddressbook.php b/ajax/editaddressbook.php index fe1806a7..7a9b757a 100755 --- a/ajax/editaddressbook.php +++ b/ajax/editaddressbook.php @@ -10,7 +10,7 @@ OCP\JSON::checkLoggedIn(); OCP\JSON::checkAppEnabled('contacts'); $addressbook = OC_Contacts_App::getAddressbook($_GET['bookid']); -$tmpl = new OC_Template("contacts", "part.editaddressbook"); +$tmpl = new OCP\Template("contacts", "part.editaddressbook"); $tmpl->assign('new', false); $tmpl->assign('addressbook', $addressbook); $tmpl->printPage(); diff --git a/ajax/editname.php b/ajax/editname.php index 155bee70..dc64eeb5 100755 --- a/ajax/editname.php +++ b/ajax/editname.php @@ -18,7 +18,7 @@ function debug($msg) { OCP\Util::writeLog('contacts','ajax/editname.php: '.$msg, OCP\Util::DEBUG); } -$tmpl = new OC_TEMPLATE("contacts", "part.edit_name_dialog"); +$tmpl = new OCP\Template("contacts", "part.edit_name_dialog"); $id = isset($_GET['id'])?$_GET['id']:''; debug('id: '.$id); diff --git a/ajax/importaddressbook.php b/ajax/importaddressbook.php index 66cfa4f8..f93bbfa4 100755 --- a/ajax/importaddressbook.php +++ b/ajax/importaddressbook.php @@ -16,7 +16,7 @@ $freeSpace=OC_Filesystem::free_space('/'); $freeSpace=max($freeSpace,0); $maxUploadFilesize = min($maxUploadFilesize ,$freeSpace); -$tmpl = new OC_Template('contacts', 'part.importaddressbook'); +$tmpl = new OCP\Template('contacts', 'part.importaddressbook'); $tmpl->assign('uploadMaxFilesize', $maxUploadFilesize); $tmpl->assign('uploadMaxHumanFilesize', OCP\Util::humanFileSize($maxUploadFilesize)); $tmpl->printpage(); diff --git a/ajax/importdialog.php b/ajax/importdialog.php index 7a564cce..5f8805a6 100755 --- a/ajax/importdialog.php +++ b/ajax/importdialog.php @@ -9,7 +9,7 @@ OCP\JSON::checkLoggedIn(); OCP\App::checkAppEnabled('contacts'); -$tmpl = new OC_Template('contacts', 'part.import'); +$tmpl = new OCP\Template('contacts', 'part.import'); $tmpl->assign('path', $_POST['path']); $tmpl->assign('filename', $_POST['filename']); $tmpl->printpage(); diff --git a/ajax/loadcard.php b/ajax/loadcard.php index 047db4d9..4e6f2206 100755 --- a/ajax/loadcard.php +++ b/ajax/loadcard.php @@ -49,7 +49,7 @@ $adr_types = OC_Contacts_App::getTypesOfProperty('ADR'); $phone_types = OC_Contacts_App::getTypesOfProperty('TEL'); $email_types = OC_Contacts_App::getTypesOfProperty('EMAIL'); -$tmpl = new OC_Template('contacts','part.contact'); +$tmpl = new OCP\Template('contacts','part.contact'); $tmpl->assign('uploadMaxFilesize', $maxUploadFilesize); $tmpl->assign('uploadMaxHumanFilesize', OCP\Util::humanFileSize($maxUploadFilesize)); $tmpl->assign('adr_types',$adr_types); diff --git a/ajax/loadintro.php b/ajax/loadintro.php index 8ad828eb..6e8fcc4b 100755 --- a/ajax/loadintro.php +++ b/ajax/loadintro.php @@ -25,7 +25,7 @@ OCP\JSON::checkLoggedIn(); OCP\JSON::checkAppEnabled('contacts'); -$tmpl = new OC_Template('contacts','part.no_contacts'); +$tmpl = new OCP\Template('contacts','part.no_contacts'); $page = $tmpl->fetchPage(); OCP\JSON::success(array('data' => array( 'page' => $page ))); diff --git a/ajax/loadphoto.php b/ajax/loadphoto.php index 9913fe13..ef429e82 100755 --- a/ajax/loadphoto.php +++ b/ajax/loadphoto.php @@ -53,7 +53,7 @@ foreach($vcard->children as $property){ } } -$tmpl = new OC_TEMPLATE("contacts", "part.contactphoto"); +$tmpl = new OCP\Template("contacts", "part.contactphoto"); $tmpl->assign('id', $id); if($refresh) { $tmpl->assign('refresh', 1); diff --git a/ajax/savecrop.php b/ajax/savecrop.php index 5418e26c..cd470307 100755 --- a/ajax/savecrop.php +++ b/ajax/savecrop.php @@ -101,7 +101,7 @@ if(file_exists($tmp_path)) { } unlink($tmpfname); //$result=array( "status" => "success", 'mime'=>$image->mimeType(), 'tmp'=>$tmp_path); - $tmpl = new OC_TEMPLATE("contacts", "part.contactphoto"); + $tmpl = new OCP\Template("contacts", "part.contactphoto"); $tmpl->assign('tmp_path', $tmpfname); $tmpl->assign('mime', $image->mimeType()); $tmpl->assign('id', $id); diff --git a/ajax/updateaddressbook.php b/ajax/updateaddressbook.php index 13f1c15a..19b5b3bd 100755 --- a/ajax/updateaddressbook.php +++ b/ajax/updateaddressbook.php @@ -35,7 +35,7 @@ if(!OC_Contacts_Addressbook::setActive($bookid, $_POST['active'])) { } $addressbook = OC_Contacts_App::getAddressbook($bookid); -$tmpl = new OC_Template('contacts', 'part.chooseaddressbook.rowfields'); +$tmpl = new OCP\Template('contacts', 'part.chooseaddressbook.rowfields'); $tmpl->assign('addressbook', $addressbook); OCP\JSON::success(array( 'page' => $tmpl->fetchPage(), diff --git a/index.php b/index.php index 69e7d573..74b7c43c 100755 --- a/index.php +++ b/index.php @@ -58,7 +58,7 @@ OCP\Util::addStyle('contacts','jquery.combobox'); OCP\Util::addStyle('contacts','jquery.Jcrop'); OCP\Util::addStyle('contacts','contacts'); -$tmpl = new OC_Template( "contacts", "index", "user" ); +$tmpl = new OCP\Template( "contacts", "index", "user" ); $tmpl->assign('uploadMaxFilesize', $maxUploadFilesize); $tmpl->assign('uploadMaxHumanFilesize', OCP\Util::humanFileSize($maxUploadFilesize)); $tmpl->assign('property_types', $property_types); diff --git a/settings.php b/settings.php old mode 100644 new mode 100755 index b8812882..c88fed0b --- a/settings.php +++ b/settings.php @@ -1,6 +1,6 @@ fetchPage(); ?> diff --git a/templates/part.chooseaddressbook.php b/templates/part.chooseaddressbook.php index 91b2f51c..a0ec053a 100755 --- a/templates/part.chooseaddressbook.php +++ b/templates/part.chooseaddressbook.php @@ -4,7 +4,7 @@ $option_addressbooks = OC_Contacts_Addressbook::all(OCP\USER::getUser()); for($i = 0; $i < count($option_addressbooks); $i++){ echo "