summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/files_imageviewer/appinfo/app.php6
-rw-r--r--apps/files_publiclink/admin.php16
-rw-r--r--apps/files_publiclink/appinfo/app.php2
-rw-r--r--apps/files_publiclink/get.php24
-rw-r--r--apps/files_publiclink/lib_public.php10
-rw-r--r--apps/media/ajax/api.php18
-rw-r--r--apps/media/ajax/autoupdate.php2
-rw-r--r--apps/media/appinfo/app.php10
-rw-r--r--apps/media/index.php20
-rw-r--r--apps/media/lib_ampache.php6
-rw-r--r--apps/media/lib_collection.php2
-rw-r--r--apps/media/lib_media.php18
-rw-r--r--apps/media/lib_scanner.php14
-rw-r--r--apps/media/settings.php16
-rw-r--r--apps/media/tomahawk.php14
-rw-r--r--apps/user_ldap/appinfo/app.php6
-rw-r--r--apps/user_ldap/settings.php14
-rw-r--r--apps/user_ldap/user_ldap.php14
-rw-r--r--apps/user_openid/appinfo/app.php8
-rw-r--r--apps/user_openid/phpmyid.php4
-rw-r--r--apps/user_openid/settings.php14
-rw-r--r--apps/user_openid/user.php2
-rw-r--r--apps/user_openid/user_openid.php2
23 files changed, 121 insertions, 121 deletions
diff --git a/apps/files_imageviewer/appinfo/app.php b/apps/files_imageviewer/appinfo/app.php
index 50a7253e01b..6d32e2d628e 100644
--- a/apps/files_imageviewer/appinfo/app.php
+++ b/apps/files_imageviewer/appinfo/app.php
@@ -1,8 +1,8 @@
<?php
-if(OC_APP::getCurrentApp()=='files'){
- OC_UTIL::addScript( 'files_imageviewer', 'lightbox' );
- OC_UTIL::addStyle( 'files_imageviewer', 'lightbox' );
+if(OC_App::getCurrentApp()=='files'){
+ OC_Util::addScript( 'files_imageviewer', 'lightbox' );
+ OC_Util::addStyle( 'files_imageviewer', 'lightbox' );
}
?>
diff --git a/apps/files_publiclink/admin.php b/apps/files_publiclink/admin.php
index 9a1a9ce03c2..8187039c3a6 100644
--- a/apps/files_publiclink/admin.php
+++ b/apps/files_publiclink/admin.php
@@ -28,25 +28,25 @@ require_once( 'lib_public.php' );
// Check if we are a user
-if( !OC_USER::isLoggedIn()){
- header( "Location: ".OC_HELPER::linkTo( "index.php" ));
+if( !OC_User::isLoggedIn()){
+ header( "Location: ".OC_Helper::linkTo( "index.php" ));
exit();
}
-OC_APP::setActiveNavigationEntry( "files_publiclink_administration" );
+OC_App::setActiveNavigationEntry( "files_publiclink_administration" );
-OC_UTIL::addStyle( 'files_publiclink', 'admin' );
-OC_UTIL::addScript( 'files_publiclink', 'admin' );
+OC_Util::addStyle( 'files_publiclink', 'admin' );
+OC_Util::addScript( 'files_publiclink', 'admin' );
if(isset($_SERVER['HTTPS'])) {
- $baseUrl= "https://". $_SERVER['SERVER_NAME'] . OC_HELPER::linkTo('files_publiclink','get.php');
+ $baseUrl= "https://". $_SERVER['SERVER_NAME'] . OC_Helper::linkTo('files_publiclink','get.php');
}else{
- $baseUrl= "http://". $_SERVER['SERVER_NAME'] . OC_HELPER::linkTo('files_publiclink','get.php');
+ $baseUrl= "http://". $_SERVER['SERVER_NAME'] . OC_Helper::linkTo('files_publiclink','get.php');
}
// return template
-$tmpl = new OC_TEMPLATE( "files_publiclink", "admin", "admin" );
+$tmpl = new OC_Template( "files_publiclink", "admin", "admin" );
$tmpl->assign( 'links', OC_PublicLink::getLinks());
$tmpl->assign('baseUrl',$baseUrl);
$tmpl->printPage();
diff --git a/apps/files_publiclink/appinfo/app.php b/apps/files_publiclink/appinfo/app.php
index 894327e83d3..314a3bf896a 100644
--- a/apps/files_publiclink/appinfo/app.php
+++ b/apps/files_publiclink/appinfo/app.php
@@ -1,6 +1,6 @@
<?php
-OC_APP::addSettingsPage( array( "id" => "files_publiclink_administration", "order" => 1, "href" => OC_HELPER::linkTo( "files_publiclink", "admin.php" ), "name" => "Public Links", "icon" => OC_HELPER::imagePath( "files_publiclink", "share.png" )));
+OC_App::addSettingsPage( array( "id" => "files_publiclink_administration", "order" => 1, "href" => OC_Helper::linkTo( "files_publiclink", "admin.php" ), "name" => "Public Links", "icon" => OC_Helper::imagePath( "files_publiclink", "share.png" )));
?>
diff --git a/apps/files_publiclink/get.php b/apps/files_publiclink/get.php
index 3bc961bc37d..6bcefc2e4e8 100644
--- a/apps/files_publiclink/get.php
+++ b/apps/files_publiclink/get.php
@@ -18,18 +18,18 @@ if($path!==false){
$subPath='';
}
$path.=$subPath;
- if(!OC_FILESYSTEM::file_exists($path)){
+ if(!OC_Filesystem::file_exists($path)){
header("HTTP/1.0 404 Not Found");
- $tmpl = new OC_TEMPLATE( '', '404', 'guest' );
+ $tmpl = new OC_Template( '', '404', 'guest' );
$tmpl->assign('file',$subPath);
$tmpl->printPage();
exit;
}
- if(OC_FILESYSTEM::is_dir($path)){
+ if(OC_Filesystem::is_dir($path)){
$files = array();
$rootLength=strlen($root);
- foreach( OC_FILES::getdirectorycontent( $path ) as $i ){
- $i['date'] = OC_UTIL::formatDate($i['mtime'] );
+ foreach( OC_Files::getdirectorycontent( $path ) as $i ){
+ $i['date'] = OC_Util::formatDate($i['mtime'] );
$i['directory']=substr($i['directory'],$rootLength);
if($i['directory']=='/'){
$i['directory']='';
@@ -47,36 +47,36 @@ if($path!==false){
}
}
- $breadcrumbNav = new OC_TEMPLATE( "files_publiclink", "breadcrumb", "" );
+ $breadcrumbNav = new OC_Template( "files_publiclink", "breadcrumb", "" );
$breadcrumbNav->assign( "breadcrumb", $breadcrumb );
$breadcrumbNav->assign('token',$token);
- $list = new OC_TEMPLATE( 'files_publiclink', 'files', '' );
+ $list = new OC_Template( 'files_publiclink', 'files', '' );
$list->assign( 'files', $files );
$list->assign('token',$token);
- $tmpl = new OC_TEMPLATE( 'files_publiclink', 'index', 'user' );
+ $tmpl = new OC_Template( 'files_publiclink', 'index', 'user' );
$tmpl->assign('fileList', $list->fetchPage());
$tmpl->assign( "breadcrumb", $breadcrumbNav->fetchPage() );
$tmpl->printPage();
}else{
//get time mimetype and set the headers
- $mimetype=OC_FILESYSTEM::getMimeType($path);
+ $mimetype=OC_Filesystem::getMimeType($path);
header('Content-Transfer-Encoding: binary');
header('Content-Disposition: attachment; filename="'.basename($path).'"');
header('Expires: 0');
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header('Pragma: public');
header('Content-Type: ' . $mimetype);
- header('Content-Length: ' . OC_FILESYSTEM::filesize($path));
+ header('Content-Length: ' . OC_Filesystem::filesize($path));
//download the file
@ob_clean();
- OC_FILESYSTEM::readfile($path);
+ OC_Filesystem::readfile($path);
}
}else{
header("HTTP/1.0 404 Not Found");
- $tmpl = new OC_TEMPLATE( '', '404', 'guest' );
+ $tmpl = new OC_Template( '', '404', 'guest' );
$tmpl->printPage();
die();
}
diff --git a/apps/files_publiclink/lib_public.php b/apps/files_publiclink/lib_public.php
index b4bc86505ae..ff1df130834 100644
--- a/apps/files_publiclink/lib_public.php
+++ b/apps/files_publiclink/lib_public.php
@@ -6,8 +6,8 @@ class OC_PublicLink{
* @param int (optional) expiretime time the link expires, as timestamp
*/
public function __construct($path,$expiretime=0){
- if($path and OC_FILESYSTEM::file_exists($path) and OC_FILESYSTEM::is_readable($path)){
- $user=OC_USER::getUser();
+ if($path and OC_Filesystem::file_exists($path) and OC_Filesystem::is_readable($path)){
+ $user=OC_User::getUser();
$token=sha1("$user-$path-$expiretime");
$query=OC_DB::prepare("INSERT INTO *PREFIX*publiclink VALUES(?,?,?,?)");
$result=$query->execute(array($token,$path,$user,$expiretime));
@@ -38,7 +38,7 @@ class OC_PublicLink{
$user=$data[0]['user'];
//prepare the filesystem
- OC_UTIL::setupFS($user);
+ OC_Util::setupFS($user);
return $path;
}else{
@@ -60,7 +60,7 @@ class OC_PublicLink{
*/
static public function getLinks(){
$query=OC_DB::prepare("SELECT * FROM *PREFIX*publiclink WHERE user=?");
- return $query->execute(array(OC_USER::getUser()))->fetchAll();
+ return $query->execute(array(OC_User::getUser()))->fetchAll();
}
/**
@@ -69,7 +69,7 @@ class OC_PublicLink{
static public function delete($token){
$query=OC_DB::prepare("SELECT user,path FROM *PREFIX*publiclink WHERE token=?");
$result=$query->execute(array($token))->fetchAll();
- if(count($result)>0 and $result[0]['user']==OC_USER::getUser()){
+ if(count($result)>0 and $result[0]['user']==OC_User::getUser()){
$query=OC_DB::prepare("DELETE FROM *PREFIX*publiclink WHERE token=?");
$query->execute(array($token));
}
diff --git a/apps/media/ajax/api.php b/apps/media/ajax/api.php
index 84d5dd17882..225bce7b092 100644
--- a/apps/media/ajax/api.php
+++ b/apps/media/ajax/api.php
@@ -52,16 +52,16 @@ if(!isset($arguments['album'])){
if(!isset($arguments['search'])){
$arguments['search']='';
}
-OC_MEDIA_COLLECTION::$uid=OC_USER::getUser();
+OC_MEDIA_COLLECTION::$uid=OC_User::getUser();
if($arguments['action']){
switch($arguments['action']){
case 'delete':
$path=$arguments['path'];
OC_MEDIA_COLLECTION::deleteSongByPath($path);
- $paths=explode(PATH_SEPARATOR,OC_PREFERENCES::getValue(OC_USER::getUser(),'media','paths',''));
+ $paths=explode(PATH_SEPARATOR,OC_Preferences::getValue(OC_User::getUser(),'media','paths',''));
if(array_search($path,$paths)!==false){
unset($paths[array_search($path,$paths)]);
- OC_PREFERENCES::setValue(OC_USER::getUser(),'media','paths',implode(PATH_SEPARATOR,$paths));
+ OC_Preferences::setValue(OC_User::getUser(),'media','paths',implode(PATH_SEPARATOR,$paths));
}
case 'get_collection':
$artists=OC_MEDIA_COLLECTION::getArtists();
@@ -78,11 +78,11 @@ if($arguments['action']){
case 'scan':
set_time_limit(0); //recursive scan can take a while
$path=$arguments['path'];
- if(OC_FILESYSTEM::is_dir($path)){
- $paths=explode(PATH_SEPARATOR,OC_PREFERENCES::getValue(OC_USER::getUser(),'media','paths',''));
+ if(OC_Filesystem::is_dir($path)){
+ $paths=explode(PATH_SEPARATOR,OC_Preferences::getValue(OC_User::getUser(),'media','paths',''));
if(array_search($path,$paths)===false){
$paths[]=$path;
- OC_PREFERENCES::setValue(OC_USER::getUser(),'media','paths',implode(PATH_SEPARATOR,$paths));
+ OC_Preferences::setValue(OC_User::getUser(),'media','paths',implode(PATH_SEPARATOR,$paths));
}
}
echo OC_MEDIA_SCANNER::scanFolder($path);
@@ -103,7 +103,7 @@ if($arguments['action']){
case 'play':
ob_end_clean();
- $ftype=OC_FILESYSTEM::getMimeType( $arguments['path'] );
+ $ftype=OC_Filesystem::getMimeType( $arguments['path'] );
$songId=OC_MEDIA_COLLECTION::getSongByPath($arguments['path']);
OC_MEDIA_COLLECTION::registerPlay($songId);
@@ -112,9 +112,9 @@ if($arguments['action']){
header('Expires: 0');
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header('Pragma: public');
- header('Content-Length: '.OC_FILESYSTEM::filesize($arguments['path']));
+ header('Content-Length: '.OC_Filesystem::filesize($arguments['path']));
- OC_FILESYSTEM::readfile($arguments['path']);
+ OC_Filesystem::readfile($arguments['path']);
exit;
}
}
diff --git a/apps/media/ajax/autoupdate.php b/apps/media/ajax/autoupdate.php
index 97733398225..ded1fd02bc3 100644
--- a/apps/media/ajax/autoupdate.php
+++ b/apps/media/ajax/autoupdate.php
@@ -33,7 +33,7 @@ error_log($_GET['autoupdate']);
$autoUpdate=(isset($_GET['autoupdate']) and $_GET['autoupdate']=='true');
error_log((integer)$autoUpdate);
-OC_PREFERENCES::setValue(OC_USER::getUser(),'media','autoupdate',(integer)$autoUpdate);
+OC_Preferences::setValue(OC_User::getUser(),'media','autoupdate',(integer)$autoUpdate);
echo json_encode( array( "status" => "success", "data" => $autoUpdate));
?> \ No newline at end of file
diff --git a/apps/media/appinfo/app.php b/apps/media/appinfo/app.php
index a41e228be4a..d75bac031e9 100644
--- a/apps/media/appinfo/app.php
+++ b/apps/media/appinfo/app.php
@@ -22,12 +22,12 @@
require_once('apps/media/lib_media.php');
-if(OC_APP::getCurrentApp()=='files'){
- OC_UTIL::addScript('media','files');
+if(OC_App::getCurrentApp()=='files'){
+ OC_Util::addScript('media','files');
}
-OC_APP::register( array( 'order' => 3, 'id' => 'media', 'name' => 'Media' ));
+OC_App::register( array( 'order' => 3, 'id' => 'media', 'name' => 'Media' ));
-OC_APP::addNavigationEntry( array( 'id' => 'media_index', 'order' => 2, 'href' => OC_HELPER::linkTo( 'media', 'index.php' ), 'icon' => OC_HELPER::imagePath( 'media', 'media.png' ), 'name' => 'Media' ));
-OC_APP::addSettingsPage( array( 'id' => 'media_settings', 'order' => 5, 'href' => OC_HELPER::linkTo( 'media', 'settings.php' ), 'name' => 'Media', 'icon' => OC_HELPER::imagePath( 'media', 'media.png' )));
+OC_App::addNavigationEntry( array( 'id' => 'media_index', 'order' => 2, 'href' => OC_Helper::linkTo( 'media', 'index.php' ), 'icon' => OC_Helper::imagePath( 'media', 'media.png' ), 'name' => 'Media' ));
+OC_App::addSettingsPage( array( 'id' => 'media_settings', 'order' => 5, 'href' => OC_Helper::linkTo( 'media', 'settings.php' ), 'name' => 'Media', 'icon' => OC_Helper::imagePath( 'media', 'media.png' )));
?>
diff --git a/apps/media/index.php b/apps/media/index.php
index fbf1c395d99..152c4583412 100644
--- a/apps/media/index.php
+++ b/apps/media/index.php
@@ -25,25 +25,25 @@
require_once('../../lib/base.php');
// Check if we are a user
-if( !OC_USER::isLoggedIn()){
- header( "Location: ".OC_HELPER::linkTo( '', 'index.php' ));
+if( !OC_User::isLoggedIn()){
+ header( "Location: ".OC_Helper::linkTo( '', 'index.php' ));
exit();
}
require_once('lib_collection.php');
require_once('lib_scanner.php');
-OC_UTIL::addScript('media','player');
-OC_UTIL::addScript('media','music');
-OC_UTIL::addScript('media','jquery.jplayer.min');
-OC_UTIL::addStyle('media','player');
-OC_UTIL::addStyle('media','music');
+OC_Util::addScript('media','player');
+OC_Util::addScript('media','music');
+OC_Util::addScript('media','jquery.jplayer.min');
+OC_Util::addStyle('media','player');
+OC_Util::addStyle('media','music');
-OC_APP::setActiveNavigationEntry( 'media_index' );
+OC_App::setActiveNavigationEntry( 'media_index' );
-$tmpl = new OC_TEMPLATE( 'media', 'music', 'user' );
+$tmpl = new OC_Template( 'media', 'music', 'user' );
-$player = new OC_TEMPLATE( 'media', 'player');
+$player = new OC_Template( 'media', 'player');
$tmpl->assign('player',$player->fetchPage());
$tmpl->printPage();
?>
diff --git a/apps/media/lib_ampache.php b/apps/media/lib_ampache.php
index 3cd9bd4ab26..97dc004e218 100644
--- a/apps/media/lib_ampache.php
+++ b/apps/media/lib_ampache.php
@@ -319,11 +319,11 @@ class OC_MEDIA_AMPACHE{
return;
}
if($song=OC_MEDIA_COLLECTION::getSong($params['song'])){
- OC_UTIL::setupFS($song["song_user"]);
+ OC_Util::setupFS($song["song_user"]);
- header('Content-type: '.OC_FILESYSTEM::getMimeType($song['song_path']));
+ header('Content-type: '.OC_Filesystem::getMimeType($song['song_path']));
header('Content-Length: '.$song['song_size']);
- OC_FILESYSTEM::readfile($song['song_path']);
+ OC_Filesystem::readfile($song['song_path']);
}
}
diff --git a/apps/media/lib_collection.php b/apps/media/lib_collection.php
index 278e450b778..d9f567aa682 100644
--- a/apps/media/lib_collection.php
+++ b/apps/media/lib_collection.php
@@ -125,7 +125,7 @@ class OC_MEDIA_COLLECTION{
}
$query=OC_DB::prepare("SELECT DISTINCT *PREFIX*media_artists.artist_name AS name , *PREFIX*media_artists.artist_id AS id FROM *PREFIX*media_artists
INNER JOIN *PREFIX*media_songs ON *PREFIX*media_artists.artist_id=*PREFIX*media_songs.song_artist WHERE artist_name LIKE ? AND *PREFIX*media_songs.song_user=?");
- $artists=$query->execute(array($search,OC_USER::getUser()))->fetchAll();
+ $artists=$query->execute(array($search,OC_User::getUser()))->fetchAll();
$result=array();
foreach($artists as $artist){
$result[$artist['id']]=array('artist_name'=>$artist['name'],'artist_id'=>$artist['id']);
diff --git a/apps/media/lib_media.php b/apps/media/lib_media.php
index 6fde2ab7487..67d111936f1 100644
--- a/apps/media/lib_media.php
+++ b/apps/media/lib_media.php
@@ -22,20 +22,20 @@
*/
//we need to have the sha256 hash of passwords for ampache
-OC_HOOK::connect('OC_USER','post_login','OC_MEDIA','loginListener');
+OC_Hook::connect('OC_User','post_login','OC_MEDIA','loginListener');
//connect to the filesystem for auto updating if configured
-if(OC_PREFERENCES::getValue(OC_USER::getUser(),'media','autoupdate',false)){
- OC_HOOK::connect('OC_FILESYSTEM','post_write','OC_MEDIA','updateFile');
+if(OC_Preferences::getValue(OC_User::getUser(),'media','autoupdate',false)){
+ OC_Hook::connect('OC_Filesystem','post_write','OC_MEDIA','updateFile');
}
//listen for file deletions to clean the database if a song is deleted
-OC_HOOK::connect('OC_FILESYSTEM','delete','OC_MEDIA','deleteFile');
+OC_Hook::connect('OC_Filesystem','delete','OC_MEDIA','deleteFile');
class OC_MEDIA{
/**
* get the sha256 hash of the password needed for ampache
- * @param array $params, parameters passed from OC_HOOK
+ * @param array $params, parameters passed from OC_Hook
*/
public static function loginListener($params){
if(isset($_POST['user']) and $_POST['password']){
@@ -56,7 +56,7 @@ class OC_MEDIA{
*/
public static function updateFile($params){
$path=$params['path'];
- $folderNames=explode(PATH_SEPARATOR,OC_PREFERENCES::getValue(OC_USER::getUser(),'media','paths',''));
+ $folderNames=explode(PATH_SEPARATOR,OC_Preferences::getValue(OC_User::getUser(),'media','paths',''));
foreach($folderNames as $folder){
if(substr($path,0,strlen($folder))==$folder){
require_once 'lib_scanner.php';
@@ -90,18 +90,18 @@ class OC_MediaSearchProvider extends OC_Search_Provider{
$songs=OC_MEDIA_COLLECTION::getSongs(0,0,$query);
$results=array();
foreach($artists as $artist){
- $results[]=new OC_Search_Result($artist['artist_name'],'',OC_HELPER::linkTo( 'apps/media', 'index.php#artist='.urlencode($artist['artist_name']) ),'Music');
+ $results[]=new OC_Search_Result($artist['artist_name'],'',OC_Helper::linkTo( 'apps/media', 'index.php#artist='.urlencode($artist['artist_name']) ),'Music');
}
foreach($albums as $album){
$artist=urlencode(OC_MEDIA_COLLECTION::getArtistName($album['album_artist']));
- $results[]=new OC_Search_Result($album['album_name'],'',OC_HELPER::linkTo( 'apps/media', 'index.php#artist='.$artist.'&album='.urlencode($album['album_name']) ),'Music');
+ $results[]=new OC_Search_Result($album['album_name'],'',OC_Helper::linkTo( 'apps/media', 'index.php#artist='.$artist.'&album='.urlencode($album['album_name']) ),'Music');
}
foreach($songs as $song){
$minutes=floor($song['song_length']/60);
$secconds=$song['song_length']%60;
$artist=urlencode(OC_MEDIA_COLLECTION::getArtistName($song['song_artist']));
$album=urlencode(OC_MEDIA_COLLECTION::getalbumName($song['song_album']));
- $results[]=new OC_Search_Result($song['song_name'],"$minutes:$secconds",OC_HELPER::linkTo( 'apps/media', 'index.php#artist='.$artist.'&album='.$album.'&song='.urlencode($song['song_name']) ),'Music');
+ $results[]=new OC_Search_Result($song['song_name'],"$minutes:$secconds",OC_Helper::linkTo( 'apps/media', 'index.php#artist='.$artist.'&album='.$album.'&song='.urlencode($song['song_name']) ),'Music');
}
return $results;
}
diff --git a/apps/media/lib_scanner.php b/apps/media/lib_scanner.php
index 6ad04e7a1be..e3cb2f051ce 100644
--- a/apps/media/lib_scanner.php
+++ b/apps/media/lib_scanner.php
@@ -37,15 +37,15 @@ class OC_MEDIA_SCANNER{
* @return int the number of songs found
*/
public static function scanFolder($path){
- if (OC_FILESYSTEM::is_dir($path)) {
+ if (OC_Filesystem::is_dir($path)) {
$songs=0;
- if ($dh = OC_FILESYSTEM::opendir($path)) {
+ if ($dh = OC_Filesystem::opendir($path)) {
while (($filename = readdir($dh)) !== false) {
if($filename<>'.' and $filename<>'..' and substr($filename,0,1)!='.'){
$file=$path.'/'.$filename;
- if(OC_FILESYSTEM::is_dir($file)){
+ if(OC_Filesystem::is_dir($file)){
$songs+=self::scanFolder($file);
- }elseif(OC_FILESYSTEM::is_file($file)){
+ }elseif(OC_Filesystem::is_file($file)){
if(self::scanFile($file)){
$songs++;
}
@@ -53,7 +53,7 @@ class OC_MEDIA_SCANNER{
}
}
}
- }elseif(OC_FILESYSTEM::is_file($path)){
+ }elseif(OC_Filesystem::is_file($path)){
$songs=1;
self::scanFile($path);
}else{
@@ -68,8 +68,8 @@ class OC_MEDIA_SCANNER{
* @return boolean
*/
public static function scanFile($path){
- $file=OC_FILESYSTEM::getLocalFile($path);
- if(substr($path,-3)=='mp3' and OC_HELPER::canExecute("id3info") and OC_HELPER::canExecute("mp3info")){//use the command line tool id3info if possible
+ $file=OC_Filesystem::getLocalFile($path);
+ if(substr($path,-3)=='mp3' and OC_Helper::canExecute("id3info") and OC_Helper::canExecute("mp3info")){//use the command line tool id3info if possible
$output=array();
$size=filesize($file);
$length=0;
diff --git a/apps/media/settings.php b/apps/media/settings.php
index 4bd9acfd80b..0563bc38fb3 100644
--- a/apps/media/settings.php
+++ b/apps/media/settings.php
@@ -24,19 +24,19 @@
require_once('../../lib/base.php');
-if( !OC_USER::isLoggedIn()){
- header( "Location: ".OC_HELPER::linkTo( "index.php" ));
+if( !OC_User::isLoggedIn()){
+ header( "Location: ".OC_Helper::linkTo( "index.php" ));
exit();
}
require( 'lib_collection.php' );
-OC_UTIL::addStyle('media','style');
-OC_UTIL::addScript('media','settings');
+OC_Util::addStyle('media','style');
+OC_Util::addScript('media','settings');
-OC_APP::setActiveNavigationEntry( 'media_settings' );
+OC_App::setActiveNavigationEntry( 'media_settings' );
-$folderNames=explode(PATH_SEPARATOR,OC_PREFERENCES::getValue($_SESSION['user_id'],'media','paths',''));
+$folderNames=explode(PATH_SEPARATOR,OC_Preferences::getValue($_SESSION['user_id'],'media','paths',''));
$folders=array();
foreach($folderNames as $folder){
if($folder){
@@ -44,9 +44,9 @@ foreach($folderNames as $folder){
}
}
-$tmpl = new OC_TEMPLATE( 'media', 'settings', 'admin' );
+$tmpl = new OC_Template( 'media', 'settings', 'admin' );
$tmpl->assign('folders',$folders);
-$tmpl->assign('autoupdate',OC_PREFERENCES::getValue($_SESSION['user_id'],'media','autoupdate',false));
+$tmpl->assign('autoupdate',OC_Preferences::getValue($_SESSION['user_id'],'media','autoupdate',false));
$tmpl->printPage();
?>
diff --git a/apps/media/tomahawk.php b/apps/media/tomahawk.php
index 873a4e2092c..bf0c2c2a756 100644
--- a/apps/media/tomahawk.php
+++ b/apps/media/tomahawk.php
@@ -28,8 +28,8 @@ require_once('lib_collection.php');
$user=isset($_POST['user'])?$_POST['user']:'';
$pass=isset($_POST['pass'])?$_POST['pass']:'';
-if(OC_USER::checkPassword($user,$pass)){
- OC_UTIL::setupFS($user);
+if(OC_User::checkPassword($user,$pass)){
+ OC_Util::setupFS($user);
OC_MEDIA_COLLECTION::$uid=$user;
}else{
exit;
@@ -40,14 +40,14 @@ if(isset($_POST['play']) and $_POST['play']=='true'){
exit;
}
$song=OC_MEDIA_COLLECTION::getSong($_POST['song']);
- $ftype=OC_FILESYSTEM::getMimeType( $song['song_path'] );
+ $ftype=OC_Filesystem::getMimeType( $song['song_path'] );
header('Content-Type:'.$ftype);
header('Expires: 0');
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header('Pragma: public');
- header('Content-Length: '.OC_FILESYSTEM::filesize($song['song_path']));
+ header('Content-Length: '.OC_Filesystem::filesize($song['song_path']));
- OC_FILESYSTEM::readfile($song['song_path']);
+ OC_Filesystem::readfile($song['song_path']);
}
$artist=isset($_POST['artist'])?'%'.$_POST['artist'].'%':'';
@@ -59,7 +59,7 @@ $album=OC_MEDIA_COLLECTION::getAlbumId($album,$artist);
$songs=OC_MEDIA_COLLECTION::getSongs($artist,$album,$song);
-$baseUrl=OC_UTIL::getServerURL().OC_HELPER::linkTo('media','tomahawk.php');
+$baseUrl=OC_Util::getServerURL().OC_Helper::linkTo('media','tomahawk.php');
$results=array();
foreach($songs as $song) {
@@ -68,7 +68,7 @@ foreach($songs as $song) {
'album' => OC_MEDIA_COLLECTION::getAlbumName($song['song_album']),
'track' => $song['song_name'],
'source' => 'ownCloud',
- 'mimetype' => OC_FILESYSTEM::getMimeType($song['song_path']),
+ 'mimetype' => OC_Filesystem::getMimeType($song['song_path']),
'extension' => substr($song['song_path'],strrpos($song['song_path'],'.')),
'url' => $baseUrl.'?play=true&song='.$song['song_id'],
'bitrate' => round($song['song_id']/$song['song_length'],0),
diff --git a/apps/user_ldap/appinfo/app.php b/apps/user_ldap/appinfo/app.php
index 67b61989f7f..7f20372ea8d 100644
--- a/apps/user_ldap/appinfo/app.php
+++ b/apps/user_ldap/appinfo/app.php
@@ -27,13 +27,13 @@ require_once('apps/user_ldap/user_ldap.php');
define("OC_USER_BACKEND_LDAP_DEFAULT_PORT", 389);
// register user backend
-OC_USER::useBackend( "LDAP" );
+OC_User::useBackend( "LDAP" );
// add settings page to navigation
$entry = array(
'id' => "user_ldap_settings",
'order'=>1,
- 'href' => OC_HELPER::linkTo( "user_ldap", "settings.php" ),
+ 'href' => OC_Helper::linkTo( "user_ldap", "settings.php" ),
'name' => 'LDAP'
);
-OC_APP::addNavigationSubEntry( "core_users", $entry);
+OC_App::addNavigationSubEntry( "core_users", $entry);
diff --git a/apps/user_ldap/settings.php b/apps/user_ldap/settings.php
index 8f9d282d2b1..cae3542a65b 100644
--- a/apps/user_ldap/settings.php
+++ b/apps/user_ldap/settings.php
@@ -23,8 +23,8 @@
require_once('../../lib/base.php');
-if( !OC_USER::isLoggedIn() || !OC_GROUP::inGroup( OC_USER::getUser(), 'admin' )){
- header( "Location: ".OC_HELPER::linkTo( "index.php" ));
+if( !OC_User::isLoggedIn() || !OC_Group::inGroup( OC_User::getUser(), 'admin' )){
+ header( "Location: ".OC_Helper::linkTo( "index.php" ));
exit();
}
@@ -32,20 +32,20 @@ $params = array('ldap_host', 'ldap_port', 'ldap_dn', 'ldap_password', 'ldap_base
foreach($params as $param){
if(isset($_POST[$param])){
- OC_APPCONFIG::setValue('user_ldap', $param, $_POST[$param]);
+ OC_Appconfig::setValue('user_ldap', $param, $_POST[$param]);
}
}
-OC_APP::setActiveNavigationEntry( "user_ldap_settings" );
+OC_App::setActiveNavigationEntry( "user_ldap_settings" );
// fill template
-$tmpl = new OC_TEMPLATE( 'user_ldap', 'settings', 'admin' );
+$tmpl = new OC_Template( 'user_ldap', 'settings', 'admin' );
foreach($params as $param){
- $value = OC_APPCONFIG::getValue('user_ldap', $param,'');
+ $value = OC_Appconfig::getValue('user_ldap', $param,'');
$tmpl->assign($param, $value);
}
// ldap_port has a default value
-$tmpl->assign( 'ldap_port', OC_APPCONFIG::getValue('user_ldap', 'ldap_port', OC_USER_BACKEND_LDAP_DEFAULT_PORT));
+$tmpl->assign( 'ldap_port', OC_Appconfig::getValue('user_ldap', 'ldap_port', OC_USER_BACKEND_LDAP_DEFAULT_PORT));
$tmpl->printPage();
diff --git a/apps/user_ldap/user_ldap.php b/apps/user_ldap/user_ldap.php
index a197c0a10e0..54fc51fe0cd 100644
--- a/apps/user_ldap/user_ldap.php
+++ b/apps/user_ldap/user_ldap.php
@@ -21,7 +21,7 @@
*
*/
-class OC_USER_LDAP extends OC_USER_BACKEND {
+class OC_USER_LDAP extends OC_User_Backend {
protected $ds;
protected $configured = false;
@@ -35,12 +35,12 @@ class OC_USER_LDAP extends OC_USER_BACKEND {
protected $ldap_filter;
function __construct() {
- $this->ldap_host = OC_APPCONFIG::getValue('user_ldap', 'ldap_host','');
- $this->ldap_port = OC_APPCONFIG::getValue('user_ldap', 'ldap_port', OC_USER_BACKEND_LDAP_DEFAULT_PORT );
- $this->ldap_dn = OC_APPCONFIG::getValue('user_ldap', 'ldap_dn','');
- $this->ldap_password = OC_APPCONFIG::getValue('user_ldap', 'ldap_password','');
- $this->ldap_base = OC_APPCONFIG::getValue('user_ldap', 'ldap_base','');
- $this->ldap_filter = OC_APPCONFIG::getValue('user_ldap', 'ldap_filter','');
+ $this->ldap_host = OC_Appconfig::getValue('user_ldap', 'ldap_host','');
+ $this->ldap_port = OC_Appconfig::getValue('user_ldap', 'ldap_port', OC_USER_BACKEND_LDAP_DEFAULT_PORT );
+ $this->ldap_dn = OC_Appconfig::getValue('user_ldap', 'ldap_dn','');
+ $this->ldap_password = OC_Appconfig::getValue('user_ldap', 'ldap_password','');
+ $this->ldap_base = OC_Appconfig::getValue('user_ldap', 'ldap_base','');
+ $this->ldap_filter = OC_Appconfig::getValue('user_ldap', 'ldap_filter','');
if( !empty($this->ldap_host)
&& !empty($this->ldap_port)
diff --git a/apps/user_openid/appinfo/app.php b/apps/user_openid/appinfo/app.php
index d6eacfc0a3a..74c13402caf 100644
--- a/apps/user_openid/appinfo/app.php
+++ b/apps/user_openid/appinfo/app.php
@@ -6,15 +6,15 @@ if (!in_array ('curl', get_loaded_extensions())){
}
$urlBase=((isset($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == 'on') ? 'https' : 'http').'://'.$_SERVER['HTTP_HOST'];
-OC_UTIL::addHeader('link',array('rel'=>'openid.server', 'href'=>$urlBase.OC_HELPER::linkTo( "user_openid", "user.php" ).'/'));
-OC_UTIL::addHeader('link',array('rel'=>'openid.delegate', 'href'=>$urlBase.OC_HELPER::linkTo( "user_openid", "user.php" ).'/'));
+OC_Util::addHeader('link',array('rel'=>'openid.server', 'href'=>$urlBase.OC_Helper::linkTo( "user_openid", "user.php" ).'/'));
+OC_Util::addHeader('link',array('rel'=>'openid.delegate', 'href'=>$urlBase.OC_Helper::linkTo( "user_openid", "user.php" ).'/'));
require_once 'apps/user_openid/user_openid.php';
-OC_APP::addSettingsPage( array( "id" => "user_openid_settings", 'order'=>1, "href" => OC_HELPER::linkTo( "user_openid", "settings.php" ), "name" => "OpenID"));
+OC_App::addSettingsPage( array( "id" => "user_openid_settings", 'order'=>1, "href" => OC_Helper::linkTo( "user_openid", "settings.php" ), "name" => "OpenID"));
//active the openid backend
-OC_USER::useBackend('openid');
+OC_User::useBackend('openid');
//check for results from openid requests
if(isset($_GET['openid_mode']) and $_GET['openid_mode'] == 'id_res'){
diff --git a/apps/user_openid/phpmyid.php b/apps/user_openid/phpmyid.php
index 5726ca99948..bcab9e55cbb 100644
--- a/apps/user_openid/phpmyid.php
+++ b/apps/user_openid/phpmyid.php
@@ -205,7 +205,7 @@ function authorize_mode () {
$profile['idp_url']=$IDENTITY;
if (isset($_SERVER['PHP_AUTH_USER']) && $profile['authorized'] === false && $_SERVER['PHP_AUTH_USER']==$USERNAME) {
- if (OC_USER::checkPassword($USERNAME, $_SERVER['PHP_AUTH_PW'])) {// successful login!
+ if (OC_User::checkPassword($USERNAME, $_SERVER['PHP_AUTH_PW'])) {// successful login!
// return to the refresh url if they get in
$_SESSION['openid_auth']=true;
$_SESSION['openid_user']=$USERNAME;
@@ -559,7 +559,7 @@ function logout_mode () {
*/
function no_mode () {
global $USERNAME, $profile;
- $tmpl = new OC_TEMPLATE( 'user_openid', 'nomode', 'guest' );
+ $tmpl = new OC_Template( 'user_openid', 'nomode', 'guest' );
if(substr($profile['req_url'],-1,1)!=='/'){//the identity should always end with a /
$profile['req_url'].='/';
}
diff --git a/apps/user_openid/settings.php b/apps/user_openid/settings.php
index 29c18eaa497..4293a6c8aaf 100644
--- a/apps/user_openid/settings.php
+++ b/apps/user_openid/settings.php
@@ -1,22 +1,22 @@
<?php
require_once('../../lib/base.php');
-if( !OC_USER::isLoggedIn()){
- header( "Location: ".OC_HELPER::linkTo( "index.php" ));
+if( !OC_User::isLoggedIn()){
+ header( "Location: ".OC_Helper::linkTo( "index.php" ));
exit();
}
if(isset($_POST['input_identity'])){
- OC_PREFERENCES::setValue(OC_USER::getUser(),'user_openid','identity',$_POST['input_identity']);
+ OC_Preferences::setValue(OC_User::getUser(),'user_openid','identity',$_POST['input_identity']);
}
-OC_APP::setActiveNavigationEntry( "user_openid_settings" );
+OC_App::setActiveNavigationEntry( "user_openid_settings" );
-$identity=OC_PREFERENCES::getValue(OC_USER::getUser(),'user_openid','identity','');
+$identity=OC_Preferences::getValue(OC_User::getUser(),'user_openid','identity','');
-$tmpl = new OC_TEMPLATE( "user_openid", "settings", "admin");
+$tmpl = new OC_Template( "user_openid", "settings", "admin");
$tmpl->assign('identity',$identity);
-$tmpl->assign('user',OC_USER::getUser());
+$tmpl->assign('user',OC_User::getUser());
$tmpl->printPage();
diff --git a/apps/user_openid/user.php b/apps/user_openid/user.php
index 4b5d13e3398..3743d232b6d 100644
--- a/apps/user_openid/user.php
+++ b/apps/user_openid/user.php
@@ -38,7 +38,7 @@ $RUNTIME_NOAPPS=true;
$RUNTIME_NOAPPS=false;
require_once '../../lib/base.php';
-if(!OC_USER::userExists($USERNAME)){
+if(!OC_User::userExists($USERNAME)){
error_log($USERNAME.' doesn\'t exist');
$USERNAME='';
}
diff --git a/apps/user_openid/user_openid.php b/apps/user_openid/user_openid.php
index c18edccf2db..d9af94dcafa 100644
--- a/apps/user_openid/user_openid.php
+++ b/apps/user_openid/user_openid.php
@@ -26,7 +26,7 @@ require_once('class.openid.v3.php');
/**
* Class for user management in a SQL Database (e.g. MySQL, SQLite)
*/
-class OC_USER_OPENID extends OC_USER_BACKEND {
+class OC_USER_OPENID extends OC_User_Backend {
/**
* @brief Check if the password is correct
* @param $uid The username