And some more places

This commit is contained in:
Michael 2017-11-07 22:15:59 +00:00
parent 5a6fa4ae87
commit 76f73c7236
4 changed files with 49 additions and 56 deletions

View file

@ -2021,22 +2021,16 @@ function item_expire($uid, $days, $network = "", $force = false) {
return; return;
} }
$expire_items = PConfig::get($uid, 'expire', 'items'); $expire_items = PConfig::get($uid, 'expire', 'items', 1);
$expire_items = (($expire_items === false) ? 1 : intval($expire_items)); // default if not set: 1
// Forcing expiring of items - but not notes and marked items // Forcing expiring of items - but not notes and marked items
if ($force) { if ($force) {
$expire_items = true; $expire_items = true;
} }
$expire_notes = PConfig::get($uid, 'expire', 'notes'); $expire_notes = PConfig::get($uid, 'expire', 'notes', 1);
$expire_notes = (($expire_notes === false) ? 1 : intval($expire_notes)); // default if not set: 1 $expire_starred = PConfig::get($uid, 'expire', 'starred', 1);
$expire_photos = PConfig::get($uid, 'expire', 'photos', 0);
$expire_starred = PConfig::get($uid, 'expire', 'starred');
$expire_starred = (($expire_starred === false) ? 1 : intval($expire_starred)); // default if not set: 1
$expire_photos = PConfig::get($uid, 'expire', 'photos');
$expire_photos = (($expire_photos === false) ? 0 : intval($expire_photos)); // default if not set: 0
logger('User '.$uid.': expire: # items=' . count($r). "; expire items: $expire_items, expire notes: $expire_notes, expire starred: $expire_starred, expire photos: $expire_photos"); logger('User '.$uid.': expire: # items=' . count($r). "; expire items: $expire_items, expire notes: $expire_notes, expire starred: $expire_starred, expire photos: $expire_photos");

View file

@ -84,11 +84,8 @@ function group_content(App $a) {
// Switch to text mode interface if we have more than 'n' contacts or group members // Switch to text mode interface if we have more than 'n' contacts or group members
$switchtotext = PConfig::get(local_user(), 'system', 'groupedit_image_limit'); $switchtotext = PConfig::get(local_user(), 'system', 'groupedit_image_limit');
if ($switchtotext === false) { if (is_null($switchtotext)) {
$switchtotext = Config::get('system', 'groupedit_image_limit'); $switchtotext = Config::get('system', 'groupedit_image_limit', 400);
}
if ($switchtotext === false) {
$switchtotext = 400;
} }
$tpl = get_markup_template('group_edit.tpl'); $tpl = get_markup_template('group_edit.tpl');

View file

@ -34,11 +34,9 @@ function profperm_content(App $a) {
// Switch to text mod interface if we have more than 'n' contacts or group members // Switch to text mod interface if we have more than 'n' contacts or group members
$switchtotext = PConfig::get(local_user(),'system','groupedit_image_limit'); $switchtotext = PConfig::get(local_user(),'system','groupedit_image_limit');
if($switchtotext === false) if (is_null($switchtotext)) {
$switchtotext = Config::get('system','groupedit_image_limit'); $switchtotext = Config::get('system','groupedit_image_limit', 400);
if($switchtotext === false) }
$switchtotext = 400;
if(($a->argc > 2) && intval($a->argv[1]) && intval($a->argv[2])) { if(($a->argc > 2) && intval($a->argv[1]) && intval($a->argv[2])) {
$r = q("SELECT `id` FROM `contact` WHERE `blocked` = 0 AND `pending` = 0 AND `self` = 0 $r = q("SELECT `id` FROM `contact` WHERE `blocked` = 0 AND `pending` = 0 AND `self` = 0

View file

@ -5,27 +5,30 @@
$uid = get_theme_uid(); $uid = get_theme_uid();
$color=false; $color = false;
$quattro_align=false; $quattro_align = false;
$site_color = Config::get("quattro","color"); $site_color = Config::get("quattro", "color", "dark);
$site_quattro_align = Config::get("quattro", "align" ); $site_quattro_align = Config::get("quattro", "align", false);
if ($uid) { if ($uid) {
$color = PConfig::get( $uid, "quattro","color"); $color = PConfig::get($uid, "quattro", "color");
$quattro_align = PConfig::get( $uid, 'quattro', 'align' ); $quattro_align = PConfig::get($uid, 'quattro', 'align');
} }
if ($color===false) $color=$site_color; if ($color === false) {
if ($color===false) $color="dark"; $color = $site_color;
if ($quattro_align===false) $quattro_align=$site_quattro_align; }
if ($quattro_align === false) {
$quattro_align = $site_quattro_align;
}
if (file_exists("$THEMEPATH/$color/style.css")){ if (file_exists("$THEMEPATH/$color/style.css")){
echo file_get_contents("$THEMEPATH/$color/style.css"); echo file_get_contents("$THEMEPATH/$color/style.css");
} }
if($quattro_align=="center"){ if ($quattro_align == "center"){
echo " echo "
html { width: 100%; margin:0px; padding:0px; } html { width: 100%; margin:0px; padding:0px; }
body { body {
@ -35,27 +38,28 @@
"; ";
} }
$textarea_font_size = false; $textarea_font_size = false;
$post_font_size = false; $post_font_size = false;
$site_textarea_font_size = Config::get("quattro","tfs");
$site_post_font_size = Config::get("quattro","pfs");
if ($site_textarea_font_size===false) $site_textarea_font_size="20";
if ($site_post_font_size===false) $site_post_font_size="12";
if ($uid) {
$textarea_font_size = PConfig::get( $uid, "quattro","tfs");
$post_font_size = PConfig::get( $uid, "quattro","pfs");
}
if ($textarea_font_size===false) $textarea_font_size = $site_textarea_font_size;
if ($post_font_size===false) $post_font_size = $site_post_font_size;
echo " $site_textarea_font_size = Config::get("quattro", "tfs", "20");
textarea { font-size: ${textarea_font_size}px; } $site_post_font_size = Config::get("quattro", "pfs", "12");
.wall-item-comment-wrapper .comment-edit-text-full { font-size: ${textarea_font_size}px; }
#jot .profile-jot-text:focus { font-size: ${textarea_font_size}px; } if ($uid) {
.wall-item-container .wall-item-content { font-size: ${post_font_size}px; } $textarea_font_size = PConfig::get($uid, "quattro", "tfs", false);
"; $post_font_size = PConfig::get($uid, "quattro", "pfs", false);
}
if ($textarea_font_size === false) {
$textarea_font_size = $site_textarea_font_size;
}
if ($post_font_size === false) {
$post_font_size = $site_post_font_size;
}
echo "
textarea { font-size: ${textarea_font_size}px; }
.wall-item-comment-wrapper .comment-edit-text-full { font-size: ${textarea_font_size}px; }
#jot .profile-jot-text:focus { font-size: ${textarea_font_size}px; }
.wall-item-container .wall-item-content { font-size: ${post_font_size}px; }
";