diff options
author | friendica <info@friendica.com> | 2013-03-06 15:13:54 -0800 |
---|---|---|
committer | friendica <info@friendica.com> | 2013-03-06 15:13:54 -0800 |
commit | c5d0da43e57cf812dd3a88b04740728f7ae65523 (patch) | |
tree | 451edffe9046b558cfeff238f218574a5385e9fd | |
parent | 5754d18286b4fbeeea362eea2d95296c83c59a11 (diff) | |
download | volse-hubzilla-c5d0da43e57cf812dd3a88b04740728f7ae65523.tar.gz volse-hubzilla-c5d0da43e57cf812dd3a88b04740728f7ae65523.tar.bz2 volse-hubzilla-c5d0da43e57cf812dd3a88b04740728f7ae65523.zip |
tweaky tweak, plus add share tracking db, and don't show acl for guest postings, and experiment with compressing pcss on the fly
-rw-r--r-- | boot.php | 4 | ||||
-rw-r--r-- | include/conversation.php | 1 | ||||
-rw-r--r-- | install/database.sql | 49 | ||||
-rw-r--r-- | install/update.php | 25 | ||||
-rw-r--r-- | mod/channel.php | 1 | ||||
-rw-r--r-- | view/theme/redbasic/css/style.css | 4 | ||||
-rw-r--r-- | view/theme/redbasic/php/style.php | 11 | ||||
-rw-r--r-- | view/tpl/jot.tpl | 2 | ||||
-rw-r--r-- | view/tpl/smarty3/jot.tpl | 2 | ||||
-rw-r--r-- | view/tpl/smarty3/suggest_friends.tpl | 2 | ||||
-rw-r--r-- | view/tpl/suggest_friends.tpl | 2 |
11 files changed, 58 insertions, 45 deletions
@@ -17,7 +17,7 @@ require_once('include/features.php'); define ( 'FRIENDICA_PLATFORM', 'Friendica Red'); define ( 'FRIENDICA_VERSION', trim(file_get_contents('version.inc')) . 'R'); define ( 'ZOT_REVISION', 1 ); -define ( 'DB_UPDATE_VERSION', 1033 ); +define ( 'DB_UPDATE_VERSION', 1034 ); define ( 'EOL', '<br />' . "\r\n" ); define ( 'ATOM_TIME', 'Y-m-d\TH:i:s\Z' ); @@ -1828,7 +1828,7 @@ function load_contact_links($uid) { if(! $uid || x($a->contacts,'empty')) return; - logger('load_contact_links'); +// logger('load_contact_links'); $r = q("SELECT abook_id, abook_flags, abook_my_perms, abook_their_perms, xchan_hash, xchan_photo_m, xchan_name, xchan_url from abook left join xchan on abook_xchan = xchan_hash where abook_channel = %d and not (abook_flags & %d) ", intval($uid), diff --git a/include/conversation.php b/include/conversation.php index 0d539c2e2..06bc7ff70 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -993,6 +993,7 @@ function status_editor($a,$x,$popup=false) { '$emtitle' => t('Example: bob@example.com, mary@example.com'), '$lockstate' => $x['lockstate'], '$acl' => $x['acl'], + '$showacl' => ((array_key_exists('showacl',$x)) ? $x['showacl'] : 'yes'), '$bang' => $x['bang'], '$profile_uid' => $x['profile_uid'], '$preview' => ((feature_enabled($x['profile_uid'],'preview')) ? t('Preview') : ''), diff --git a/install/database.sql b/install/database.sql index 0262bce63..24b5a550a 100644 --- a/install/database.sql +++ b/install/database.sql @@ -309,7 +309,6 @@ CREATE TABLE IF NOT EXISTS `fserver` ( `key` text NOT NULL, PRIMARY KEY (`id`), KEY `server` (`server`), - KEY `server_2` (`server`), KEY `posturl` (`posturl`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; @@ -326,43 +325,6 @@ CREATE TABLE IF NOT EXISTS `fsuggest` ( PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -CREATE TABLE IF NOT EXISTS `gcign` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `uid` int(11) NOT NULL, - `gcid` int(11) NOT NULL, - PRIMARY KEY (`id`), - KEY `uid` (`uid`), - KEY `gcid` (`gcid`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `gcontact` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `name` char(255) NOT NULL, - `url` char(255) NOT NULL, - `nurl` char(255) NOT NULL, - `photo` char(255) NOT NULL, - `connect` char(255) NOT NULL, - PRIMARY KEY (`id`), - KEY `nurl` (`nurl`), - KEY `name` (`name`), - KEY `url` (`url`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `glink` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `cid` int(11) NOT NULL, - `uid` int(11) NOT NULL, - `gcid` int(11) NOT NULL, - `zcid` int(11) NOT NULL, - `updated` datetime NOT NULL, - PRIMARY KEY (`id`), - KEY `cid` (`cid`), - KEY `uid` (`uid`), - KEY `gcid` (`gcid`), - KEY `zcid` (`zcid`), - KEY `updated` (`updated`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; - CREATE TABLE IF NOT EXISTS `group` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `hash` char(255) NOT NULL DEFAULT '', @@ -811,6 +773,17 @@ CREATE TABLE IF NOT EXISTS `session` ( KEY `expire` (`expire`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; +CREATE TABLE IF NOT EXISTS `shares` ( + `share_id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `share_type` int(11) NOT NULL DEFAULT '0', + `share_target` int(10) unsigned NOT NULL DEFAULT '0', + `share_xchan` char(255) NOT NULL DEFAULT '', + PRIMARY KEY (`share_id`), + KEY `share_type` (`share_type`), + KEY `share_target` (`share_target`), + KEY `share_xchan` (`share_xchan`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + CREATE TABLE IF NOT EXISTS `site` ( `site_url` char(255) NOT NULL, `site_flags` int(11) NOT NULL DEFAULT '0', diff --git a/install/update.php b/install/update.php index afb4b08b9..2d06e406a 100644 --- a/install/update.php +++ b/install/update.php @@ -1,6 +1,6 @@ <?php -define( 'UPDATE_VERSION' , 1033 ); +define( 'UPDATE_VERSION' , 1034 ); /** * @@ -410,3 +410,26 @@ KEY `xchan` (`xchan`) return UPDATE_SUCCESS; return UPDATE_FAILED; } + +function update_r1033() { + $r = q("CREATE TABLE if not exists `shares` ( +`share_id` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY , +`share_type` INT NOT NULL DEFAULT '0', +`share_target` INT UNSIGNED NOT NULL DEFAULT '0', +`share_xchan` CHAR( 255 ) NOT NULL DEFAULT '', +KEY `share_type` (`share_type`), +KEY `share_target` (`share_target`), +KEY `share_xchan` (`share_xchan`) +) ENGINE = MYISAM DEFAULT CHARSET = utf8"); + + // if these fail don't bother reporting it + + q("drop table gcign"); + q("drop table gcontact"); + q("drop table glink"); + + if($r) + return UPDATE_SUCCESS; + return UPDATE_FAILED; +} + diff --git a/mod/channel.php b/mod/channel.php index 0a49b41eb..10bd0417f 100644 --- a/mod/channel.php +++ b/mod/channel.php @@ -124,6 +124,7 @@ function channel_content(&$a, $update = 0, $load = false) { 'nickname' => $a->profile['channel_address'], 'lockstate' => (((strlen($a->profile['channel_allow_cid'])) || (strlen($a->profile['channel_allow_gid'])) || (strlen($a->profile['channel_deny_cid'])) || (strlen($a->profile['channel_deny_gid']))) ? 'lock' : 'unlock'), 'acl' => (($is_owner) ? populate_acl($channel, false) : ''), + 'showacl' => (($is_owner) ? 'yes' : ''), 'bang' => '', 'visitor' => (($is_owner || $observer) ? 'block' : 'none'), 'profile_uid' => $a->profile['profile_uid'] diff --git a/view/theme/redbasic/css/style.css b/view/theme/redbasic/css/style.css index 94d52e995..d6a9cb800 100644 --- a/view/theme/redbasic/css/style.css +++ b/view/theme/redbasic/css/style.css @@ -3775,4 +3775,6 @@ ul.menu-popup { .contact-block-content { margin-top: 8px; -}
\ No newline at end of file +} + +.profile-match-connect { margin-top: 5px; }
\ No newline at end of file diff --git a/view/theme/redbasic/php/style.php b/view/theme/redbasic/php/style.php index 2b1d68519..bae202c7a 100644 --- a/view/theme/redbasic/php/style.php +++ b/view/theme/redbasic/php/style.php @@ -51,7 +51,16 @@ $nav_bg_2 = "2e2f2e";} if(file_exists('view/theme/' . current_theme() . '/css/style.css')) { - echo file_get_contents('view/theme/' . current_theme() . '/css/style.css'); + $x = file_get_contents('view/theme/' . current_theme() . '/css/style.css'); + if(get_config('system','pcss_compress')) { + // this shaves off about 10%, probably not enough to worry about right now. + logger('pcss compress: original size: ' . strlen($x), LOGGER_DEBUG); + $x = str_replace(array("\r","\t"," "),array("",' ',' '),$x); + $x = preg_replace('/(\n[ ]+?)/s',"\n",$x); + $x = str_replace("\n","",$x); + logger('pcss compress: final size: ' . strlen($x), LOGGER_DEBUG); + } + echo $x; } echo "\r\n"; diff --git a/view/tpl/jot.tpl b/view/tpl/jot.tpl index 6de2ef97e..84b6df679 100644 --- a/view/tpl/jot.tpl +++ b/view/tpl/jot.tpl @@ -53,9 +53,11 @@ <a id="profile-nolocation" class="icon noglobe" title="$noloc" onclick="jotClearLocation();return false;"></a> </div> + {{ if $showacl }} <div id="profile-jot-perms" class="profile-jot-perms" style="display: $pvisit;" > <a href="#profile-jot-acl-wrapper" id="jot-perms-icon" class="icon $lockstate" title="$permset" ></a>$bang </div> + {{ endif }} {{ if $preview }}<span onclick="preview_post();" id="jot-preview-link" class="fakelink">$preview</span>{{ endif }} diff --git a/view/tpl/smarty3/jot.tpl b/view/tpl/smarty3/jot.tpl index 9ce34ee2f..2def156b2 100644 --- a/view/tpl/smarty3/jot.tpl +++ b/view/tpl/smarty3/jot.tpl @@ -58,9 +58,11 @@ <a id="profile-nolocation" class="icon noglobe" title="{{$noloc}}" onclick="jotClearLocation();return false;"></a> </div> + {{if $showacl}} <div id="profile-jot-perms" class="profile-jot-perms" style="display: {{$pvisit}};" > <a href="#profile-jot-acl-wrapper" id="jot-perms-icon" class="icon {{$lockstate}}" title="{{$permset}}" ></a>{{$bang}} </div> + {{/if}} {{if $preview}}<span onclick="preview_post();" id="jot-preview-link" class="fakelink">{{$preview}}</span>{{/if}} diff --git a/view/tpl/smarty3/suggest_friends.tpl b/view/tpl/smarty3/suggest_friends.tpl index 060db0005..f7c030919 100644 --- a/view/tpl/smarty3/suggest_friends.tpl +++ b/view/tpl/smarty3/suggest_friends.tpl @@ -4,7 +4,7 @@ * *}} <div class="profile-match-wrapper"> - <a href="{{$ignlnk}}" title="{{$ignore}}" class="icon drophide profile-match-ignore" onmouseout="imgdull(this);" onmouseover="imgbright(this);" onclick="return confirmDelete();" ></a> + <a href="{{$ignlnk}}" title="{{$ignore}}" class="icon drophide smalldrop profile-match-ignore" onmouseout="imgdull(this);" onmouseover="imgbright(this);" onclick="return confirmDelete();" ></a> <div class="profile-match-photo"> <a href="{{$url}}"> <img src="{{$photo}}" alt="{{$name}}" width="80" height="80" title="{{$name}} [{{$url}}]" /> diff --git a/view/tpl/suggest_friends.tpl b/view/tpl/suggest_friends.tpl index e97b5e8cc..d8913c91c 100644 --- a/view/tpl/suggest_friends.tpl +++ b/view/tpl/suggest_friends.tpl @@ -1,5 +1,5 @@ <div class="profile-match-wrapper"> - <a href="$ignlnk" title="$ignore" class="icon drophide profile-match-ignore" onmouseout="imgdull(this);" onmouseover="imgbright(this);" onclick="return confirmDelete();" ></a> + <a href="$ignlnk" title="$ignore" class="icon drophide smalldrop profile-match-ignore" onmouseout="imgdull(this);" onmouseover="imgbright(this);" onclick="return confirmDelete();" ></a> <div class="profile-match-photo"> <a href="$url"> <img src="$photo" alt="$name" width="80" height="80" title="$name [$url]" /> |