define ( 'FRIENDICA_PLATFORM', 'Friendica');
define ( 'FRIENDICA_CODENAME', 'Lily of the valley');
-define ( 'FRIENDICA_VERSION', '3.4.1' );
+define ( 'FRIENDICA_VERSION', '3.4.2' );
define ( 'DFRN_PROTOCOL_VERSION', '2.23' );
define ( 'DB_UPDATE_VERSION', 1189 );
define ( 'EOL', "<br />\r\n" );
public $videoheight = 350;
public $force_max_items = 0;
public $theme_thread_allow = true;
+ public $theme_events_in_profile = true;
// An array for all theme-controllable parameters
// Mostly unimplemented yet. Only options 'stylesheet' and
if ($temppath != "") {
$lockpath = $temppath."/lock";
- mkdir($lockpath);
+
+ if (!is_dir($lockpath))
+ mkdir($lockpath);
+ elseif (!is_writable($lockpath))
+ $lockpath = $temppath;
if (is_dir($lockpath) AND is_writable($lockpath)) {
set_config("system", "lockpath", $lockpath);
return($size[2]);
}
}
+
+function validate_include(&$file) {
+ $orig_file = $file;
+
+ $file = realpath($file);
+
+ if (strpos($file, getcwd()) !== 0)
+ return false;
+
+ $file = str_replace(getcwd()."/", "", $file, $count);
+ if ($count != 1)
+ return false;
+
+ if ($orig_file !== $file)
+ return false;
+
+ $valid = false;
+ if (strpos($file, "include/") === 0)
+ $valid = true;
+
+ if (strpos($file, "addon/") === 0)
+ $valid = true;
+
+ if (!$valid)
+ return false;
+
+ return true;
+}