Merge branch 'master' into sabredav_1.6

This commit is contained in:
Georg Ehrke 2012-04-22 13:20:50 +02:00
commit e888f4d9bc
20 changed files with 578 additions and 46 deletions

View File

@ -6,9 +6,9 @@
</p>
<h3>What would you like to export?</h3>
<p>
<input type="radio" name="export_type" value="instance" /> ownCloud instance (suitable for import )<br />
<input type="radio" name="export_type" value="system" /> ownCloud system files<br />
<input type="radio" name="export_type" value="userfiles" /> Just user files<br />
<input type="radio" name="export_type" value="instance" style="width:20px;" /> ownCloud instance (suitable for import )<br />
<input type="radio" name="export_type" value="system" style="width:20px;" /> ownCloud system files<br />
<input type="radio" name="export_type" value="userfiles" style="width:20px;" /> Just user files<br />
<input type="submit" name="admin_export" value="<?php echo $l->t('Export'); ?>" />
</fieldset>
</form>

View File

@ -3,6 +3,6 @@
function createBookmarklet() {
$l = OC_L10N::get('bookmarks');
echo '<small>' . $l->t('Drag this to your browser bookmarks and click it, when you want to bookmark a webpage quickly:') . '</small>'
. '<a class="bookmarklet" href="javascript:(function(){var a=window,b=document,c=encodeURIComponent,d=a.open(\'' . OC_Helper::linkToAbsolute('bookmarks', 'addBm.php') . '?output=popup&url=\'+c(b.location),\'bkmk_popup\',\'left=\'+((a.screenX||a.screenLeft)+10)+\',top=\'+((a.screenY||a.screenTop)+10)+\',height=230px,width=230px,resizable=1,alwaysRaised=1\');a.setTimeout(function(){d.focus()},300);})();">'
. '<a class="button bookmarklet" href="javascript:(function(){var a=window,b=document,c=encodeURIComponent,d=a.open(\'' . OC_Helper::linkToAbsolute('bookmarks', 'addBm.php') . '?output=popup&url=\'+c(b.location),\'bkmk_popup\',\'left=\'+((a.screenX||a.screenLeft)+10)+\',top=\'+((a.screenY||a.screenTop)+10)+\',height=230px,width=230px,resizable=1,alwaysRaised=1\');a.setTimeout(function(){d.focus()},300);})();">'
. $l->t('Read later') . '</a>';
}

View File

@ -7,8 +7,8 @@ echo 'Calendar.UI.Share.idtype = "event";' . "\n" . 'Calendar.UI.Share.currentid
<ul>
<li><a href="#tabs-1"><?php echo $l->t('Eventinfo'); ?></a></li>
<li><a href="#tabs-2"><?php echo $l->t('Repeating'); ?></a></li>
<li><a href="#tabs-3"><?php echo $l->t('Alarm'); ?></a></li>
<li><a href="#tabs-4"><?php echo $l->t('Attendees'); ?></a></li>
<!--<li><a href="#tabs-3"><?php echo $l->t('Alarm'); ?></a></li>
<li><a href="#tabs-4"><?php echo $l->t('Attendees'); ?></a></li>-->
<?php if($_['access'] == 'owner') { ?>
<li><a href="#tabs-5"><?php echo $l->t('Share'); ?></a></li>
<?php } ?>
@ -243,8 +243,8 @@ echo 'Calendar.UI.Share.idtype = "event";' . "\n" . 'Calendar.UI.Share.currentid
<?php echo $l->t('Summary'); ?>:<span id="repeatsummary"></span>
</div>
</div>
<div id="tabs-3">//Alarm</div>
<div id="tabs-4">//Attendees</div>
<!--<div id="tabs-3">//Alarm</div>
<div id="tabs-4">//Attendees</div>-->
<?php if($_['access'] == 'owner') { ?>
<div id="tabs-5">
<?php echo $this->inc('share.dropdown'); ?>

View File

@ -2,8 +2,8 @@
<ul>
<li><a href="#tabs-1"><?php echo $l->t('Eventinfo'); ?></a></li>
<li><a href="#tabs-2"><?php echo $l->t('Repeating'); ?></a></li>
<li><a href="#tabs-3"><?php echo $l->t('Alarm'); ?></a></li>
<li><a href="#tabs-4"><?php echo $l->t('Attendees'); ?></a></li>
<!--<li><a href="#tabs-3"><?php echo $l->t('Alarm'); ?></a></li>
<li><a href="#tabs-4"><?php echo $l->t('Attendees'); ?></a></li>-->
</ul>
<div id="tabs-1">
<table width="100%">
@ -241,7 +241,7 @@
<?php echo $l->t('Summary'); ?>:<span id="repeatsummary"></span>
</div>
</div>
<div id="tabs-3">//Alarm</div>
<div id="tabs-4">//Attendees</div>
<!--<div id="tabs-3">//Alarm</div>
<div id="tabs-4">//Attendees</div>-->
</div>

View File

@ -9,7 +9,7 @@
?>
<form id="calendar">
<fieldset class="personalblock">
<strong><?php echo $l->t('Calendar'); ?></strong>
<legend><?php echo $l->t('Calendar'); ?></legend>
<table class="nostyle">
<tr><td><label for="timezone" class="bold"><?php echo $l->t('Timezone');?></label></td><td><select style="display: none;" id="timezone" name="timezone">
<?php
@ -47,6 +47,6 @@
</table>
<?php echo $l->t('Calendar CalDAV syncing address:');?>
<?php echo OC_Helper::linkToAbsolute('calendar', 'caldav.php'); ?><br />
<code><?php echo OC_Helper::linkToAbsolute('calendar', 'caldav.php'); ?></code><br />
</fieldset>
</form>

View File

@ -44,19 +44,15 @@ function bailOut($msg) {
$image = null;
$x1 = (isset($_POST['x1']) && $_POST['x1']) ? $_POST['x1'] : -1;
$x1 = (isset($_POST['x1']) && $_POST['x1']) ? $_POST['x1'] : 0;
//$x2 = isset($_POST['x2']) ? $_POST['x2'] : -1;
$y1 = (isset($_POST['y1']) && $_POST['y1']) ? $_POST['y1'] : -1;
$y1 = (isset($_POST['y1']) && $_POST['y1']) ? $_POST['y1'] : 0;
//$y2 = isset($_POST['y2']) ? $_POST['y2'] : -1;
$w = (isset($_POST['w']) && $_POST['w']) ? $_POST['w'] : -1;
$h = (isset($_POST['h']) && $_POST['h']) ? $_POST['h'] : -1;
$tmp_path = isset($_POST['tmp_path']) ? $_POST['tmp_path'] : '';
$id = isset($_POST['id']) ? $_POST['id'] : '';
if(in_array(-1, array($x1, $y1, $w, $h))) {
bailOut('Wrong crop dimensions: '.implode(', ', array($x1, $y1, $w, $h)));
}
if($tmp_path == '') {
bailOut('Missing path to temporary file.');
}
@ -70,6 +66,9 @@ OC_Log::write('contacts','savecrop.php: files: '.$tmp_path.' exists: '.file_exi
if(file_exists($tmp_path)) {
$image = new OC_Image();
if($image->loadFromFile($tmp_path)) {
$w = ($w != -1 ? $w : $image->width());
$h = ($h != -1 ? $h : $image->height());
OC_Log::write('contacts','savecrop.php, x: '.$x1.' y: '.$y1.' w: '.$w.' h: '.$h, OC_Log::DEBUG);
if($image->crop($x1, $y1, $w, $h)) {
if($image->resize(200)) {
$tmpfname = tempnam("/tmp", "occCropped"); // create a new file because of caching issues.
@ -81,7 +80,7 @@ if(file_exists($tmp_path)) {
bailOut('Error getting contact object.');
}
if($card->__isset('PHOTO')) {
OC_Log::write('contacts','savecrop.php: files: PHOTO property exists.', OC_Log::DEBUG);
OC_Log::write('contacts','savecrop.php: PHOTO property exists.', OC_Log::DEBUG);
$property = $card->__get('PHOTO');
if(!$property) {
unlink($tmpfname);

View File

@ -1,10 +1,14 @@
/*dl > dt {
font-weight: bold;
}*/
#contacts { padding-left:2px; padding-top: 5px; background: #fff; }
#leftcontent { top: 3.5em !important; }
#rightcontent { top: 3.5em !important; padding-top: 5px; }
#contacts { background: #fff; width: 20em; top: 3.7em; bottom:3em; position: fixed; overflow: auto; }
#bottomcontrols { padding: 0; bottom:0px; height:2.8em; width: 20em; margin:0; background:#eee; border-top:1px solid #ccc; position:fixed; -moz-box-shadow: 0 0 0 #000, -3px 0 7px #000; -webkit-box-shadow: 0 0 0 #000, -3px 0 7px #000; box-shadow: 0 0 0 #000, -3px 0 7px #000;}
#contacts_newcontact { float: left; margin: 0.2em 0 0 1em; }
#chooseaddressbook { float: right; margin: 0.2em 1em 0 0; }
#leftcontent a { height: 23px; display: block; margin: 0 0 0 0; padding: 0 0 0 25px; }
#chooseaddressbook {margin-right: 170px; float: right;}
#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; }
@ -13,7 +17,6 @@
#contacts_propertymenu li a { padding: 3px; display: block }
#contacts_propertymenu li:hover { background-color: #1d2d44; }
#contacts_propertymenu li a:hover { color: #fff }
#actionbar { height: 30px; width: 200px; position: fixed; right: 0px; top: 75px; margin: 0 0 0 0; padding: 0 0 0 0; z-index: 1000; }
#card { width: auto;/*max-width: 70em; border: thin solid lightgray; display: block;*/ }
#firstrun { width: 100%; position: absolute; top: 5em; left: 0; text-align: center; font-weight:bold; font-size:1.5em; color:#777; }
#firstrun #selections { font-size:0.8em; margin: 2em auto auto auto; clear: both; }
@ -21,7 +24,8 @@
#card input[type="text"].contacts_property,input[type="email"].contacts_property { width: 14em; float: left; }
.categories { float: left; width: 16em; }
#card input[type="text"],input[type="email"],input[type="tel"],input[type="date"], select, textarea { background-color: #fefefe; border: 0 !important; -webkit-appearance:none !important; -moz-appearance:none !important; -webkit-box-sizing:none !important; -moz-box-sizing:none !important; box-sizing:none !important; -moz-box-shadow: none; -webkit-box-shadow: none; box-shadow: none; -moz-border-radius: 0px; -webkit-border-radius: 0px; border-radius: 0px; float: left; }
#card input[type="text"]:hover, input[type="text"]:focus, input[type="text"]:active,input[type="email"]:hover,input[type="tel"]:hover,input[type="date"]:hover,input[type="date"],input[type="date"]:hover,input[type="date"]:active,input[type="date"]:active,input[type="date"]:active,input[type="email"]:active,input[type="tel"]:active, select:hover, select:focus, select:active, textarea:focus, textarea:hover { border: 0 !important; -webkit-appearance:textfield; -moz-appearance:textfield; -webkit-box-sizing:content-box; -moz-box-sizing:content-box; box-sizing:content-box; background:#fff; color:#333; border:1px solid #ddd; -moz-box-shadow:0 1px 1px #fff, 0 2px 0 #bbb inset; -webkit-box-shadow:0 1px 1px #fff, 0 1px 0 #bbb inset; box-shadow:0 1px 1px #fff, 0 1px 0 #bbb inset; -moz-border-radius:.5em; -webkit-border-radius:.5em; border-radius:.5em; outline:none; float: left; }
#card input[type="text"]:hover, input[type="text"]:focus, input[type="text"]:active,input[type="email"]:hover,input[type="tel"]:hover,input[type="date"]:hover,input[type="date"],input[type="date"]:hover,input[type="date"]:active,input[type="date"]:active,input[type="date"]:active,input[type="email"]:active,input[type="tel"]:active, select:hover, select:focus, select:active { border: 0 !important; -webkit-appearance:textfield; -moz-appearance:textfield; -webkit-box-sizing:content-box; -moz-box-sizing:content-box; box-sizing:content-box; background:#fff; color:#333; border:1px solid #ddd; -moz-box-shadow:0 1px 1px #fff, 0 2px 0 #bbb inset; -webkit-box-shadow:0 1px 1px #fff, 0 1px 0 #bbb inset; box-shadow:0 1px 1px #fff, 0 1px 0 #bbb inset; -moz-border-radius:.5em; -webkit-border-radius:.5em; border-radius:.5em; outline:none; float: left; }
textarea:focus, textarea:hover { background:#fff; color:#333; border:1px solid #ddd; -moz-box-shadow:0 1px 1px #fff, 0 2px 0 #bbb inset; -webkit-box-shadow:0 1px 1px #fff, 0 1px 0 #bbb inset; box-shadow:0 1px 1px #fff, 0 1px 0 #bbb inset; -moz-border-radius:.5em; -webkit-border-radius:.5em; border-radius:.5em; outline:none; float: left; }
input[type="text"]:invalid,input[type="email"]:invalid,input[type="tel"]:invalid,input[type="date"]:invalid, textarea:invalid { color: #bbb !important; }
textarea { min-height: 4em; }
dl.form { width: 100%; float: left; clear: right; margin: 0; padding: 0; }

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 47 KiB

View File

@ -387,10 +387,11 @@ Contacts={
$('#note').data('checksum', this.data.NOTE[0]['checksum']);
$('#note').find('textarea').val(this.data.NOTE[0]['value']);
$('#note').show();
$('#contacts_propertymenu a[data-type="NOTE"]').parent().hide();
} else {
$('#note').data('checksum', '');
$('#note').find('textarea').val('');
//$('#note').hide();
$('#note').hide();
}
},
loadSingleProperties:function() {
@ -536,7 +537,7 @@ Contacts={
},*/
editNew:function(){ // add a new contact
this.id = ''; this.fn = ''; this.fullname = ''; this.givname = ''; this.famname = ''; this.addname = ''; this.honpre = ''; this.honsuf = '';
Contacts.UI.Card.add(';;;;', '', '', true);
Contacts.UI.Card.add(t('contacts', 'Contact')+';'+t('contacts', 'New')+';;;', t('contacts', 'New Contact'), '', true);
/*$.getJSON(OC.filePath('contacts', 'ajax', 'newcontact.php'),{},function(jsondata){
if(jsondata.status == 'success'){
id = '';
@ -1403,6 +1404,14 @@ $(document).ready(function(){
Contacts.UI.Card.saveProperty(this);
});
$('#fn').blur(function(){
if($('#fn').val() == '') {
OC.dialogs.alert(t('contacts','The name field cannot be empty. Please enter a name for this contact.'), t('contacts','Name is empty'), function() { $('#fn').focus(); });
$('#fn').focus();
return false;
}
});
// Name has changed. Update it and reorder.
$('#fn').live('change',function(){
var name = $('#fn').val();
@ -1429,19 +1438,19 @@ $(document).ready(function(){
$('#file_upload_start').live('change',function(){
Contacts.UI.Card.uploadPhoto(this.files);
});
$('#contacts_details_photo').bind('dragover',function(event){
$('#contacts_details_photo_wrapper').bind('dragover',function(event){
console.log('dragover');
$(event.target).css('background-color','red');
event.stopPropagation();
event.preventDefault();
});
$('#contacts_details_photo').bind('dragleave',function(event){
$('#contacts_details_photo_wrapper').bind('dragleave',function(event){
console.log('dragleave');
$(event.target).css('background-color','white');
//event.stopPropagation();
//event.preventDefault();
});
$('#contacts_details_photo').bind('drop',function(event){
$('#contacts_details_photo_wrapper').bind('drop',function(event){
event.stopPropagation();
event.preventDefault();
console.log('drop');

View File

@ -31,7 +31,9 @@
} else {
self.element.val(tmp);
}
self.element.trigger('change'); // Changes wasn't saved when only using the dropdown.
if(self.element.val().trim() != '') {
self.element.trigger('change'); // Changes wasn't saved when only using the dropdown.
}
});
this.element.bind( "keydown", function( event ) {
if ( event.keyCode === $.ui.keyCode.TAB &&

View File

@ -3,17 +3,23 @@
var categories = <?php echo json_encode($_['categories']); ?>;
var lang = '<?php echo OC_Preferences::getValue(OC_User::getUser(), 'core', 'lang', 'en'); ?>';
</script>
<div id="controls">
<!-- div id="controls">
<form>
<input type="button" id="contacts_newcontact" value="<?php echo $l->t('Add Contact'); ?>">
<input type="button" id="chooseaddressbook" value="<?php echo $l->t('Addressbooks'); ?>">
</form>
</div>
</div -->
<div id="leftcontent" class="leftcontent">
<ul id="contacts">
<?php echo $this->inc("part.contacts"); ?>
</ul>
</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'); ?>" />
</form>
</div>
<div id="rightcontent" class="rightcontent" data-id="<?php echo $_['id']; ?>">
<?php
if ($_['id']){

View File

@ -1,7 +1,7 @@
<form id="contacts">
<fieldset class="personalblock">
<strong><?php echo $l->t('Contacts'); ?></strong><br />
<?php echo $l->t('CardDAV syncing addresses:'); ?>
<legend><?php echo $l->t('Contacts'); ?></legend>
<?php echo $l->t('CardDAV syncing addresses'); ?> (<a href="http://owncloud.org/synchronisation/" target="_blank"><?php echo $l->t('more info'); ?></a>)
<dl>
<dt><?php echo $l->t('Primary address (Kontact et al)'); ?></dt>
<dd><code><?php echo OC_Helper::linkToAbsolute('contacts', 'carddav.php'); ?>/</code></dd>

View File

@ -2,6 +2,6 @@
<fieldset class="personalblock">
<strong>Media</strong><br />
Ampache address:
<?php echo OC_Helper::linkToAbsolute('media', ''); ?><br />
<code><?php echo OC_Helper::linkToAbsolute('media', ''); ?></code><br />
</fieldset>
</form>

View File

@ -1,6 +1,6 @@
<fieldset class="personalblock">
<?php
echo '<img src="/apps/remoteStorage/remoteStorage.png" style="width:16px"> '
echo '<img src="../apps/remoteStorage/remoteStorage.png" style="width:16px"> '
.'<strong>'.$l->t('remoteStorage').'</strong> user address: '
.OC_User::getUser().'@'.$_SERVER['SERVER_NAME']
.' (<a href="http://unhosted.org/">more info</a>)';

View File

@ -6,7 +6,7 @@
<?php } ?>
<legend><strong><?php echo $l->t('Import user account');?></strong></legend>
</p>
<p><input type="file" id="owncloud_import" name="owncloud_import"><label for="owncloud_import"><?php echo $l->t('ownCloud User Zip');?></label>
<p><input type="file" id="owncloud_import" name="owncloud_import" style="width:180px;"><label for="owncloud_import"> <?php echo $l->t('ownCloud User Zip');?></label>
</p>
<input type="submit" name="user_import" value="<?php echo $l->t('Import'); ?>" />
</fieldset>

View File

@ -24,6 +24,10 @@ $CONFIG = array(
"mail_smtpauth" => "false",
"mail_smtpname" => "",
"mail_smtppassword" => "",
"appcodechecker" => "",
"log_type" => "",
"logfile" => "",
"loglevel" => "",
// "datadirectory" => ""
);
?>

View File

@ -121,6 +121,8 @@ tbody tr:hover, tr:active { background-color:#f8f8f8; }
#body-settings .personalblock#quota { position:relative; padding:0; }
#body-settings #controls+.helpblock { position:relative; margin-top: 3em; }
.personalblock > legend { margin-top:2em; }
.personalblock > legend, th, dt, label { font-weight: bold; }
code { font-family: "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", monospace; }
#quota div, div.jp-play-bar, div.jp-seek-bar { padding:0; background:#e6e6e6; font-weight:normal; white-space:nowrap; -moz-border-radius-bottomleft:.4em; -webkit-border-bottom-left-radius:.4em; border-bottom-left-radius:.4em; -moz-border-radius-topleft:.4em; -webkit-border-top-left-radius:.4em; border-top-left-radius:.4em; }
#quotatext {padding: .6em 1em;}

View File

@ -7,9 +7,13 @@
<label for="maxUploadSize"><?php echo $l->t( 'Maximum upload size' ); ?> </label><input name='maxUploadSize' id="maxUploadSize" value='<?php echo $_['uploadMaxFilesize'] ?>'/>(<?php echo $l->t('max. possible: '); echo $_['maxPossibleUploadSize'] ?>)<br/>
<?php endif;?>
<input type="checkbox" name="allowZipDownload" id="allowZipDownload" value="1" title="<?php echo $l->t( 'Needed for multi-file and folder downloads.' ); ?>"<?php if ($_['allowZipDownload']) echo ' checked="checked"'; ?> /> <label for="allowZipDownload"><?php echo $l->t( 'Enable ZIP-download' ); ?></label> <br/>
<fieldset class="personalblock">
<label for="maxZipInputSize"><?php echo $l->t( 'Maximum input size for ZIP files:' ); ?> </label><input name="maxZipInputSize" id="maxZipInputSize" value='<?php echo $_['maxZipInputSize'] ?>' title="<?php echo $l->t( '0 is unlimited' ); ?>"<?php if (!$_['allowZipDownload']) echo ' disabled="disabled"'; ?> /><br/>
</fieldset>
<input name="maxZipInputSize" id="maxZipInputSize" style="width:180px;" value='<?php echo $_['maxZipInputSize'] ?>' title="<?php echo $l->t( '0 is unlimited' ); ?>"<?php if (!$_['allowZipDownload']) echo ' disabled="disabled"'; ?> />
<label for="maxZipInputSize"><?php echo $l->t( 'Maximum input size for ZIP files' ); ?> </label><br />
<input type="submit" name="submitFilesAdminSettings" id="submitFilesAdminSettings" value="Save"/>
</fieldset>
</form>

View File

@ -47,6 +47,7 @@ class OC_Installer{
* This function works as follows
* -# fetching the file
* -# unzipping it
* -# check the code
* -# installing the database at appinfo/database.xml
* -# including appinfo/install.php
* -# setting the installed version
@ -91,6 +92,7 @@ class OC_Installer{
//extract the archive in a temporary folder
$extractDir=OC_Helper::tmpFolder();
OC_Helper::rmdirr($extractDir);
mkdir($extractDir);
if($archive=OC_Archive::open($path)){
$archive->extract($extractDir);
@ -102,7 +104,7 @@ class OC_Installer{
}
return false;
}
//load the info.xml file of the app
if(!is_file($extractDir.'/appinfo/info.xml')){
//try to find it in a subdir
@ -125,6 +127,12 @@ class OC_Installer{
}
$info=OC_App::getAppInfo($extractDir.'/appinfo/info.xml',true);
$basedir=OC::$APPSROOT.'/apps/'.$info['id'];
// check the code for not allowed calls
if(!OC_Installer::checkCode($info['id'],$extractDir)){
OC_Helper::rmdirr($extractDir);
return false;
}
//check if an app with the same id is already installed
if(self::isInstalled( $info['id'] )){
@ -151,8 +159,8 @@ class OC_Installer{
}
//copy the app to the correct place
if(!mkdir($basedir)){
OC_Log::write('core','Can\'t create app folder ('.$basedir.')',OC_Log::ERROR);
if(@!mkdir($basedir)){
OC_Log::write('core','Can\'t create app folder. Please fix permissions. ('.$basedir.')',OC_Log::ERROR);
OC_Helper::rmdirr($extractDir);
if($data['source']=='http'){
unlink($path);
@ -300,4 +308,49 @@ class OC_Installer{
OC_Appconfig::setValue($app,'installed_version',OC_App::getAppVersion($app));
return $info;
}
/**
* check the code of an app with some static code checks
* @param string $folder the folder of the app to check
* @returns true for app is o.k. and false for app is not o.k.
*/
public static function checkCode($appname,$folder){
$blacklist=array(
'fopen(',
'eval('
// more evil pattern will go here later
// will will also check if an app is using private api once the public api is in place
);
// is the code checker enabled?
if(OC_Config::getValue('appcodechecker', false)){
// check if grep is installed
$grep = exec('which grep');
if($grep=='') {
OC_Log::write('core','grep not installed. So checking the code of the app "'.$appname.'" was not possible',OC_Log::ERROR);
return true;
}
// iterate the bad patterns
foreach($blacklist as $bl) {
$cmd = 'grep -ri '.escapeshellarg($bl).' '.$folder.'';
$result = exec($cmd);
// bad pattern found
if($result<>'') {
OC_Log::write('core','App "'.$appname.'" is using a not allowed call "'.$bl.'". Installation refused.',OC_Log::ERROR);
return false;
}
}
return true;
}else{
return true;
}
}
}

View File

@ -47,7 +47,7 @@
<p class="personalblock">
<strong>WebDAV</strong>
<?php echo OC_Helper::linkToAbsolute('files', 'webdav.php'); ?><br />
<code><?php echo OC_Helper::linkToAbsolute('files', 'webdav.php'); ?></code><br />
<em><?php echo $l->t('use this address to connect to your ownCloud in your file manager');?></em>
</p>