aboutsummaryrefslogtreecommitdiffstats
path: root/boot.php
diff options
context:
space:
mode:
Diffstat (limited to 'boot.php')
-rw-r--r--boot.php32
1 files changed, 24 insertions, 8 deletions
diff --git a/boot.php b/boot.php
index ab738e213..cddba996c 100644
--- a/boot.php
+++ b/boot.php
@@ -1,15 +1,26 @@
<?php
set_time_limit(0);
+ini_set('pcre.backtrack_limit', 250000);
-define ( 'FRIENDIKA_VERSION', '2.1.955' );
+define ( 'FRIENDIKA_VERSION', '2.1.969' );
define ( 'DFRN_PROTOCOL_VERSION', '2.21' );
-define ( 'DB_UPDATE_VERSION', 1053 );
+define ( 'DB_UPDATE_VERSION', 1054 );
define ( 'EOL', "<br />\r\n" );
define ( 'ATOM_TIME', 'Y-m-d\TH:i:s\Z' );
define ( 'DOWN_ARROW', '&#x21e9;' );
-
+
+/**
+ *
+ * Image storage quality. Lower numbers save space at cost of image detail.
+ * For ease of upgrade, please do not change here. Change jpeg quality with
+ * set_config('system','jpeg_quality',n) in .htconfig.php
+ * where n is netween 1 and 100, and with very poor results below about 50
+ *
+ */
+
+define ( 'JPEG_QUALITY', 100 );
/**
* SSL redirection policies
@@ -845,8 +856,10 @@ function login($register = false) {
$tpl = load_view_file("view/login.tpl");
}
-
- $o = replace_macros($tpl,array(
+
+ $o = '<script type="text/javascript"> $(document).ready(function() { $("#login-name").focus();} );</script>';
+
+ $o .= replace_macros($tpl,array(
'$logout' => t('Logout'),
'$register_html' => $register_html,
'$classname' => $classname,
@@ -1218,6 +1231,7 @@ function set_config($family,$key,$value) {
global $a;
if(get_config($family,$key,true) === false) {
+ $a->config[$family][$key] = $value;
$ret = q("INSERT INTO `config` ( `cat`, `k`, `v` ) VALUES ( '%s', '%s', '%s' ) ",
dbesc($family),
dbesc($key),
@@ -1312,6 +1326,7 @@ function set_pconfig($uid,$family,$key,$value) {
global $a;
if(get_pconfig($uid,$family,$key,true) === false) {
+ $a->config[$uid][$family][$key] = $value;
$ret = q("INSERT INTO `pconfig` ( `uid`, `cat`, `k`, `v` ) VALUES ( %d, '%s', '%s', '%s' ) ",
intval($uid),
dbesc($family),
@@ -2125,7 +2140,7 @@ function smilies($s) {
$a = get_app();
return str_replace(
- array( '&lt;3', '&lt;/3', '&lt;\\3', ':-)', ';-)', ':-(', ':(', ':-P', ':-"', ':-x', ':-X', ':-D', '8-|', '8-O'),
+ array( '&lt;3', '&lt;/3', '&lt;\\3', ':-)', ';-)', ':-(', ':(', ':-P', ':P', ':-"', ':-x', ':-X', ':-D', '8-|', '8-O'),
array(
'<img src="' . $a->get_baseurl() . '/images/smiley-heart.gif" alt="<3" />',
'<img src="' . $a->get_baseurl() . '/images/smiley-brokenheart.gif" alt="</3" />',
@@ -2135,6 +2150,7 @@ function smilies($s) {
'<img src="' . $a->get_baseurl() . '/images/smiley-frown.gif" alt=":-(" />',
'<img src="' . $a->get_baseurl() . '/images/smiley-frown.gif" alt=":(" />',
'<img src="' . $a->get_baseurl() . '/images/smiley-tongue-out.gif" alt=":-P" />',
+ '<img src="' . $a->get_baseurl() . '/images/smiley-tongue-out.gif" alt=":P" />',
'<img src="' . $a->get_baseurl() . '/images/smiley-kiss.gif" alt=":-\"" />',
'<img src="' . $a->get_baseurl() . '/images/smiley-kiss.gif" alt=":-x" />',
'<img src="' . $a->get_baseurl() . '/images/smiley-kiss.gif" alt=":-X" />',
@@ -2513,7 +2529,7 @@ function current_theme(){
$a = get_app();
$system_theme = ((isset($a->config['system']['theme'])) ? $a->config['system']['theme'] : '');
- $theme_name = ((x($_SESSION,'theme')) ? $_SESSION['theme'] : $system_theme);
+ $theme_name = ((is_array($_SESSION) && x($_SESSION,'theme')) ? $_SESSION['theme'] : $system_theme);
if($theme_name && file_exists('view/theme/' . $theme_name . '/style.css'))
return($theme_name);
@@ -2628,7 +2644,7 @@ if(! function_exists('get_plink')) {
function get_plink($item) {
$a = get_app();
$plink = (((x($item,'plink')) && (! $item['private'])) ? '<div class="wall-item-links-wrapper"><a href="'
- . $item['plink'] . '" title="' . t('link to source') . '" target="external-link" ><img src="' . $a->get_baseurl() . '/images/remote-link.gif" alt="' . t('link to source') . '" /></a></div>' : '');
+ . $item['plink'] . '" title="' . t('link to source') . '" target="external-link" class="icon remote-link"></a></div>' : '');
return $plink;
}}