Merge branch 'master' into calendar_export

This commit is contained in:
Georg Ehrke 2012-06-23 19:54:12 +02:00
commit 17e289aef2
15 changed files with 57 additions and 48 deletions

View File

@ -14,7 +14,7 @@
} }
.jcrop-vline, .jcrop-hline { .jcrop-vline, .jcrop-hline {
background: white url('%webroot%/apps/contacts/img/Jcrop.gif') top left repeat; background: white url('%appswebroot%/contacts/img/Jcrop.gif') top left repeat;
font-size: 0px; font-size: 0px;
position: absolute; position: absolute;
} }

View File

@ -2,13 +2,10 @@
position: fixed; position: fixed;
display: block; display: block;
top: 6.8em; top: 6.8em;
left: 13.5em; left: 12.5em;
z-index: 20;
} }
#editor_save{ #editor_save{
margin-left: 7px; margin-left: 7px;
float: left; float: left;
} }
#saving_icon{
margin-top: 3px;
float: left;
}

View File

@ -1,6 +1,6 @@
<?php <?php
require_once('apps/files_versions/versions.php'); require_once('files_versions/versions.php');
OCP\App::registerAdmin('files_versions', 'settings'); OCP\App::registerAdmin('files_versions', 'settings');
OCP\App::registerPersonal('files_versions','settings-personal'); OCP\App::registerPersonal('files_versions','settings-personal');
@ -8,4 +8,4 @@ OCP\App::registerPersonal('files_versions','settings-personal');
OCP\Util::addscript('files_versions', 'versions'); OCP\Util::addscript('files_versions', 'versions');
// Listen to write signals // Listen to write signals
OCP\Util::connectHook('OC_Filesystem', 'post_write', "OCA_Versions\Storage", "write_hook"); OCP\Util::connectHook('OC_Filesystem', 'post_write', "OCA_Versions\Storage", "write_hook");

View File

@ -21,13 +21,13 @@
* *
*/ */
OC::$CLASSPATH['OC_Gallery_Album'] = 'apps/gallery/lib/album.php'; OC::$CLASSPATH['OC_Gallery_Album'] = 'gallery/lib/album.php';
OC::$CLASSPATH['OC_Gallery_Photo'] = 'apps/gallery/lib/photo.php'; OC::$CLASSPATH['OC_Gallery_Photo'] = 'gallery/lib/photo.php';
OC::$CLASSPATH['OC_Gallery_Scanner'] = 'apps/gallery/lib/scanner.php'; OC::$CLASSPATH['OC_Gallery_Scanner'] = 'gallery/lib/scanner.php';
OC::$CLASSPATH['OC_Gallery_Sharing'] = 'apps/gallery/lib/sharing.php'; OC::$CLASSPATH['OC_Gallery_Sharing'] = 'gallery/lib/sharing.php';
OC::$CLASSPATH['OC_Gallery_Hooks_Handlers'] = 'apps/gallery/lib/hooks_handlers.php'; OC::$CLASSPATH['OC_Gallery_Hooks_Handlers'] = 'gallery/lib/hooks_handlers.php';
OC::$CLASSPATH['Pictures_Managers'] = 'apps/gallery/lib/managers.php'; OC::$CLASSPATH['Pictures_Managers'] = 'gallery/lib/managers.php';
OC::$CLASSPATH['Pictures_Tiles'] = 'apps/gallery/lib/tiles.php'; OC::$CLASSPATH['Pictures_Tiles'] = 'gallery/lib/tiles.php';
$l = OC_L10N::get('gallery'); $l = OC_L10N::get('gallery');
@ -52,4 +52,4 @@ class OC_GallerySearchProvider extends OC_Search_Provider{
//OC_Search::registerProvider('OC_GallerySearchProvider'); //OC_Search::registerProvider('OC_GallerySearchProvider');
require_once('apps/gallery/lib/hooks_handlers.php'); require_once('gallery/lib/hooks_handlers.php');

View File

@ -31,7 +31,7 @@ OCP\Util::addStyle('files', 'files');
OCP\Util::addStyle('gallery', 'styles'); OCP\Util::addStyle('gallery', 'styles');
OCP\Util::addScript('gallery', 'pictures'); OCP\Util::addScript('gallery', 'pictures');
include('apps/gallery/lib/tiles.php'); include('gallery/lib/tiles.php');
$root = !empty($_GET['root']) ? $_GET['root'] : '/'; $root = !empty($_GET['root']) ? $_GET['root'] : '/';
$images = \OC_FileCache::searchByMime('image', null, '/'.\OCP\USER::getUser().'/files'.$root); $images = \OC_FileCache::searchByMime('image', null, '/'.\OCP\USER::getUser().'/files'.$root);

View File

@ -60,7 +60,7 @@ function deplode(element) {
} }
function openNewGal(album_name) { function openNewGal(album_name) {
root = root + album_name + "/"; root = root + decodeURIComponent(album_name) + "/";
var url = window.location.toString().replace(window.location.search, ''); var url = window.location.toString().replace(window.location.search, '');
url = url + "?app=gallery&root="+encodeURIComponent(root); url = url + "?app=gallery&root="+encodeURIComponent(root);

View File

@ -168,7 +168,7 @@ class TileStack extends TileBase {
} }
public function getOnClickAction() { public function getOnClickAction() {
return 'javascript:openNewGal(\''.\OCP\Util::sanitizeHTML($this->stack_name).'\');'; return 'javascript:openNewGal(\''.rawurlencode($this->stack_name).'\');';
} }
private $tiles_array; private $tiles_array;

View File

@ -22,9 +22,9 @@
$l=OC_L10N::get('media'); $l=OC_L10N::get('media');
require_once('apps/media/lib_media.php'); require_once('media/lib_media.php');
require_once('apps/media/lib_collection.php'); require_once('media/lib_collection.php');
require_once('apps/media/lib_scanner.php'); require_once('media/lib_scanner.php');
OCP\Util::addscript('media','loader'); OCP\Util::addscript('media','loader');
OCP\App::registerPersonal('media','settings'); OCP\App::registerPersonal('media','settings');

View File

@ -471,11 +471,22 @@ class OC_LDAP {
if(!is_null($attr) && !is_array($attr)) { if(!is_null($attr) && !is_array($attr)) {
$attr = array(strtolower($attr)); $attr = array(strtolower($attr));
} }
$sr = @ldap_search(self::getConnectionResource(), $base, $filter, $attr);
$findings = @ldap_get_entries(self::getConnectionResource(), $sr ); // See if we have a resource
// if we're here, probably no connection ressource is returned. $link_resource = self::getConnectionResource();
// to make ownCloud behave nicely, we simply give back an empty array. if($link_resource)
if(is_null($findings)) { {
$sr = ldap_search($link_resource, $base, $filter, $attr);
$findings = ldap_get_entries($link_resource, $sr );
// if we're here, probably no connection resource is returned.
// to make ownCloud behave nicely, we simply give back an empty array.
if(is_null($findings)) {
return array();
}
} else
{
// Seems like we didn't find any resource.
// Return an empty array just like before.
return array(); return array();
} }

View File

@ -492,21 +492,21 @@ class OC_App{
* register a settings form to be shown * register a settings form to be shown
*/ */
public static function registerSettings($app,$page){ public static function registerSettings($app,$page){
self::$settingsForms[]='apps/'.$app.'/'.$page.'.php'; self::$settingsForms[]= $app.'/'.$page.'.php';
} }
/** /**
* register an admin form to be shown * register an admin form to be shown
*/ */
public static function registerAdmin($app,$page){ public static function registerAdmin($app,$page){
self::$adminForms[]='apps/'.$app.'/'.$page.'.php'; self::$adminForms[]= $app.'/'.$page.'.php';
} }
/** /**
* register a personal form to be shown * register a personal form to be shown
*/ */
public static function registerPersonal($app,$page){ public static function registerPersonal($app,$page){
self::$personalForms[]='apps/'.$app.'/'.$page.'.php'; self::$personalForms[]= $app.'/'.$page.'.php';
} }
/** /**

View File

@ -157,7 +157,7 @@ class OC_Config{
// Create a php file ... // Create a php file ...
$content = "<?php\n\$CONFIG = "; $content = "<?php\n\$CONFIG = ";
$content .= var_export(self::$cache, true); $content .= var_export(self::$cache, true);
$content .= ";\n?>\n"; $content .= ";\n";
$filename = OC::$SERVERROOT."/config/config.php"; $filename = OC::$SERVERROOT."/config/config.php";
// Write the file // Write the file

View File

@ -526,7 +526,7 @@ class OC_DB {
self::removeDBStructure( OC::$SERVERROOT . '/db_structure.xml' ); self::removeDBStructure( OC::$SERVERROOT . '/db_structure.xml' );
foreach($apps as $app){ foreach($apps as $app){
$path = OC::$SERVERROOT.'/apps/'.$app.'/appinfo/database.xml'; $path = self::getAppPath($app).'/appinfo/database.xml';
if(file_exists($path)){ if(file_exists($path)){
self::removeDBStructure( $path ); self::removeDBStructure( $path );
} }

View File

@ -287,22 +287,23 @@ class OC_Installer{
*/ */
public static function installShippedApps(){ public static function installShippedApps(){
foreach(OC::$APPSROOTS as $app_dir) { foreach(OC::$APPSROOTS as $app_dir) {
$dir = opendir( $app_dir['path'] ); if($dir = opendir( $app_dir['path'] )){
while( false !== ( $filename = readdir( $dir ))){ while( false !== ( $filename = readdir( $dir ))){
if( substr( $filename, 0, 1 ) != '.' and is_dir($app_dir['path']."/$filename") ){ if( substr( $filename, 0, 1 ) != '.' and is_dir($app_dir['path']."/$filename") ){
if( file_exists( $app_dir['path']."/$filename/appinfo/app.php" )){ if( file_exists( $app_dir['path']."/$filename/appinfo/app.php" )){
if(!OC_Installer::isInstalled($filename)){ if(!OC_Installer::isInstalled($filename)){
$info=OC_App::getAppInfo($filename); $info=OC_App::getAppInfo($filename);
$enabled = isset($info['default_enable']); $enabled = isset($info['default_enable']);
if( $enabled ){ if( $enabled ){
OC_Installer::installShippedApp($filename); OC_Installer::installShippedApp($filename);
OC_Appconfig::setValue($filename,'enabled','yes'); OC_Appconfig::setValue($filename,'enabled','yes');
}
} }
} }
} }
} }
closedir( $dir );
} }
closedir( $dir );
} }
} }

View File

@ -64,7 +64,7 @@ class OC_Migrate{
$apps = OC_App::getAllApps(); $apps = OC_App::getAllApps();
foreach($apps as $app){ foreach($apps as $app){
$path = OC::$SERVERROOT . '/apps/' . $app . '/appinfo/migrate.php'; $path = self::getAppPath($app) . '/appinfo/migrate.php';
if( file_exists( $path ) ){ if( file_exists( $path ) ){
include( $path ); include( $path );
} }
@ -398,7 +398,7 @@ class OC_Migrate{
if( OC_App::isEnabled( $provider->getID() ) ){ if( OC_App::isEnabled( $provider->getID() ) ){
$success = true; $success = true;
// Does this app use the database? // Does this app use the database?
if( file_exists( OC::$SERVERROOT.'/apps/'.$provider->getID().'/appinfo/database.xml' ) ){ if( file_exists( self::getAppPath($provider->getID()).'/appinfo/database.xml' ) ){
// Create some app tables // Create some app tables
$tables = self::createAppTables( $provider->getID() ); $tables = self::createAppTables( $provider->getID() );
if( is_array( $tables ) ){ if( is_array( $tables ) ){
@ -539,7 +539,7 @@ class OC_Migrate{
} }
// There is a database.xml file // There is a database.xml file
$content = file_get_contents( OC::$SERVERROOT . '/apps/' . $appid . '/appinfo/database.xml' ); $content = file_get_contents(self::getAppPath($appid) . '/appinfo/database.xml' );
$file2 = 'static://db_scheme'; $file2 = 'static://db_scheme';
// TODO get the relative path to migration.db from the data dir // TODO get the relative path to migration.db from the data dir
@ -608,7 +608,7 @@ class OC_Migrate{
static public function getApps(){ static public function getApps(){
$allapps = OC_App::getAllApps(); $allapps = OC_App::getAllApps();
foreach($allapps as $app){ foreach($allapps as $app){
$path = OC::$SERVERROOT . '/apps/' . $app . '/lib/migrate.php'; $path = self::getAppPath($app) . '/lib/migrate.php';
if( file_exists( $path ) ){ if( file_exists( $path ) ){
$supportsmigration[] = $app; $supportsmigration[] = $app;
} }

View File

@ -17,7 +17,7 @@ class OC_Minimizer_CSS extends OC_Minimizer
$in_root = false; $in_root = false;
foreach(OC::$APPSROOTS as $app_root) { foreach(OC::$APPSROOTS as $app_root) {
if(strpos($file, $app_root['path']) === 0) { if(strpos($file, $app_root['path']) === 0) {
$in_root = $webroot.$app_root['url']; $in_root = rtrim($webroot.$app_root['url'], '/');
break; break;
} }
} }