$versions = new OCA_Versions\Storage();
// roll back to old version if button clicked
- if( isset( $_GET['revert'] ) ) {
+ if( isset( $_GET['revert'] ) ) {
if( $versions->rollback( $path, $_GET['revert'] ) ) {
}
// show the history only if there is something to show
- if( OCA_Versions\Storage::isversioned( $path ) ) {
+ if( OCA_Versions\Storage::isversioned( $path ) ) {
$count = 999; //show the newest revisions
$versions = OCA_Versions\Storage::getVersions( $path, $count);
);
}
$res = $query->execute(array($dn))->fetchOne();
- if($res) {
+ if($res) {
return $res;
}
return false;
}
$this->ldapConnectionRes = ldap_connect($this->config['ldapHost'], $this->config['ldapPort']);
if(ldap_set_option($this->ldapConnectionRes, LDAP_OPT_PROTOCOL_VERSION, 3)) {
- if(ldap_set_option($this->ldapConnectionRes, LDAP_OPT_REFERRALS, 0)) {
- if($this->config['ldapTLS']) {
- ldap_start_tls($this->ldapConnectionRes);
- }
+ if(ldap_set_option($this->ldapConnectionRes, LDAP_OPT_REFERRALS, 0)) {
+ if($this->config['ldapTLS']) {
+ ldap_start_tls($this->ldapConnectionRes);
}
+ }
}
return $this->bind();
if($_POST) {
- if(isset($_POST['webdav_url'])) {
- OC_CONFIG::setValue('user_webdavauth_url', strip_tags($_POST['webdav_url']));
- }
+ if(isset($_POST['webdav_url'])) {
+ OC_CONFIG::setValue('user_webdavauth_url', strip_tags($_POST['webdav_url']));
+ }
}
// fill template
* http://www.sqlite.org/lang_createtable.html
* http://docs.oracle.com/cd/B19306_01/server.102/b14200/functions037.htm
*/
- if( $CONFIG_DBTYPE == 'pgsql' ) { //mysql support it too but sqlite doesn't
- $content = str_replace( '<default>0000-00-00 00:00:00</default>', '<default>CURRENT_TIMESTAMP</default>', $content );
- }
+ if( $CONFIG_DBTYPE == 'pgsql' ) { //mysql support it too but sqlite doesn't
+ $content = str_replace( '<default>0000-00-00 00:00:00</default>', '<default>CURRENT_TIMESTAMP</default>', $content );
+ }
file_put_contents( $file2, $content );
* @param otional $path string path to zip output folder
* @return false on error, path to zip on success
*/
- public static function export( $uid=null, $type='user', $path=null ) {
+ public static function export( $uid=null, $type='user', $path=null ) {
$datadir = OC_Config::getValue( 'datadirectory' );
// Validate export type
$types = array( 'user', 'instance', 'system', 'userfiles' );
* @returns string of the KB server
* This function returns the url of the OCS knowledge base server. It´s possible to set it in the config file or it will fallback to the default
*/
- private static function getKBURL() {
- $url = OC_Config::getValue('knowledgebaseurl', 'http://api.apps.owncloud.com/v1');
- return($url);
- }
+ private static function getKBURL() {
+ $url = OC_Config::getValue('knowledgebaseurl', 'http://api.apps.owncloud.com/v1');
+ return($url);
+ }
/**
* @brief Get the content of an OCS url call.
switch($encoding) {
case 'ISO-8859-1' :
- $path_info = utf8_encode($path_info);
+ $path_info = utf8_encode($path_info);
}
// end copy
* @param $web base for path
* @param $file the filename
*/
- static public function appendIfExist(&$files, $root, $webroot, $file) {
- if (is_file($root.'/'.$file)) {
+ static public function appendIfExist(&$files, $root, $webroot, $file) {
+ if (is_file($root.'/'.$file)) {
$files[] = array($root, $webroot, $file);
return true;
- }
- return false;
- }
+ }
+ return false;
+ }
static public function findStylesheetFiles($styles) {
// Read the selected theme from the config file
)
);
$xml=@file_get_contents($url, 0, $ctx);
- if($xml==false) {
- return array();
- }
- $data=@simplexml_load_string($xml);
+ if($xml==false) {
+ return array();
+ }
+ $data=@simplexml_load_string($xml);
$tmp=array();
- $tmp['version'] = $data->version;
- $tmp['versionstring'] = $data->versionstring;
- $tmp['url'] = $data->url;
- $tmp['web'] = $data->web;
+ $tmp['version'] = $data->version;
+ $tmp['versionstring'] = $data->versionstring;
+ $tmp['url'] = $data->url;
+ $tmp['web'] = $data->web;
- return $tmp;
+ return $tmp;
}
public static function ShowUpdatingHint() {
/**
* Check if the ownCloud server can connect to the internet
*/
- public static function isinternetconnectionworking() {
+ public static function isinternetconnectionworking() {
// try to connect to owncloud.org to see if http connections to the internet are possible.
$connected = @fsockopen("www.owncloud.org", 80);
* If not, file_get_element is used.
*/
- public static function getUrlContent($url){
+ public static function getUrlContent($url){
- if (function_exists('curl_init')) {
-
- $curl = curl_init();
-
- curl_setopt($curl, CURLOPT_HEADER, 0);
- curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
- curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 10);
- curl_setopt($curl, CURLOPT_URL, $url);
- curl_setopt($curl, CURLOPT_USERAGENT, "ownCloud Server Crawler");
- $data = curl_exec($curl);
- curl_close($curl);
-
- } else {
-
- $ctx = stream_context_create(
- array(
- 'http' => array(
- 'timeout' => 10
- )
- )
- );
- $data=@file_get_contents($url, 0, $ctx);
-
- }
-
- return $data;
- }
+ if (function_exists('curl_init')) {
+
+ $curl = curl_init();
+
+ curl_setopt($curl, CURLOPT_HEADER, 0);
+ curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
+ curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 10);
+ curl_setopt($curl, CURLOPT_URL, $url);
+ curl_setopt($curl, CURLOPT_USERAGENT, "ownCloud Server Crawler");
+ $data = curl_exec($curl);
+ curl_close($curl);
+
+ } else {
+
+ $ctx = stream_context_create(
+ array(
+ 'http' => array(
+ 'timeout' => 10
+ )
+ )
+ );
+ $data=@file_get_contents($url, 0, $ctx);
+
+ }
+
+ return $data;
+ }
}