This commit is contained in:
friendica 2013-03-21 02:21:56 -07:00
commit d9492a4a76
10 changed files with 41 additions and 5 deletions

View File

@ -17,7 +17,7 @@ require_once('include/features.php');
define ( 'FRIENDICA_PLATFORM', 'Friendica Red'); define ( 'FRIENDICA_PLATFORM', 'Friendica Red');
define ( 'FRIENDICA_VERSION', trim(file_get_contents('version.inc')) . 'R'); define ( 'FRIENDICA_VERSION', trim(file_get_contents('version.inc')) . 'R');
define ( 'ZOT_REVISION', 1 ); define ( 'ZOT_REVISION', 1 );
define ( 'DB_UPDATE_VERSION', 1036 ); define ( 'DB_UPDATE_VERSION', 1037 );
define ( 'EOL', '<br />' . "\r\n" ); define ( 'EOL', '<br />' . "\r\n" );
define ( 'ATOM_TIME', 'Y-m-d\TH:i:s\Z' ); define ( 'ATOM_TIME', 'Y-m-d\TH:i:s\Z' );

View File

@ -698,6 +698,7 @@ CREATE TABLE IF NOT EXISTS `profile` (
`work` text NOT NULL, `work` text NOT NULL,
`education` text NOT NULL, `education` text NOT NULL,
`contact` text NOT NULL, `contact` text NOT NULL,
`channels` text NOT NULL,
`homepage` char(255) NOT NULL, `homepage` char(255) NOT NULL,
`photo` char(255) NOT NULL, `photo` char(255) NOT NULL,
`thumb` char(255) NOT NULL, `thumb` char(255) NOT NULL,

View File

@ -1,6 +1,6 @@
<?php <?php
define( 'UPDATE_VERSION' , 1036 ); define( 'UPDATE_VERSION' , 1037 );
/** /**
* *
@ -462,3 +462,7 @@ KEY `k` ( `k` )
return UPDATE_SUCCESS; return UPDATE_SUCCESS;
return UPDATE_FAILED; return UPDATE_FAILED;
} }
function update_r1036() {
q("ALTER TABLE `profile` ADD `channels` TEXT NOT NULL AFTER `contact` ");
}

View File

@ -232,6 +232,7 @@ function profiles_post(&$a) {
$about = fix_mce_lf(escape_tags(trim($_POST['about']))); $about = fix_mce_lf(escape_tags(trim($_POST['about'])));
$interest = fix_mce_lf(escape_tags(trim($_POST['interest']))); $interest = fix_mce_lf(escape_tags(trim($_POST['interest'])));
$contact = fix_mce_lf(escape_tags(trim($_POST['contact']))); $contact = fix_mce_lf(escape_tags(trim($_POST['contact'])));
$channels = fix_mce_lf(escape_tags(trim($_POST['channels'])));
$music = fix_mce_lf(escape_tags(trim($_POST['music']))); $music = fix_mce_lf(escape_tags(trim($_POST['music'])));
$book = fix_mce_lf(escape_tags(trim($_POST['book']))); $book = fix_mce_lf(escape_tags(trim($_POST['book'])));
$tv = fix_mce_lf(escape_tags(trim($_POST['tv']))); $tv = fix_mce_lf(escape_tags(trim($_POST['tv'])));
@ -393,6 +394,7 @@ function profiles_post(&$a) {
`about` = '%s', `about` = '%s',
`interest` = '%s', `interest` = '%s',
`contact` = '%s', `contact` = '%s',
`channels` = '%s',
`music` = '%s', `music` = '%s',
`book` = '%s', `book` = '%s',
`tv` = '%s', `tv` = '%s',
@ -426,6 +428,7 @@ function profiles_post(&$a) {
dbesc($about), dbesc($about),
dbesc($interest), dbesc($interest),
dbesc($contact), dbesc($contact),
dbesc($channels),
dbesc($music), dbesc($music),
dbesc($book), dbesc($book),
dbesc($tv), dbesc($tv),
@ -550,6 +553,7 @@ function profiles_content(&$a) {
'$lbl_about' => t('Tell us about yourself...'), '$lbl_about' => t('Tell us about yourself...'),
'$lbl_hobbies' => t('Hobbies/Interests'), '$lbl_hobbies' => t('Hobbies/Interests'),
'$lbl_social' => t('Contact information and Social Networks'), '$lbl_social' => t('Contact information and Social Networks'),
'$lbl_channels' => t('My other channels'),
'$lbl_music' => t('Musical interests'), '$lbl_music' => t('Musical interests'),
'$lbl_book' => t('Books, literature'), '$lbl_book' => t('Books, literature'),
'$lbl_tv' => t('Television'), '$lbl_tv' => t('Television'),
@ -593,7 +597,8 @@ function profiles_content(&$a) {
'$romance' => $r[0]['romance'], '$romance' => $r[0]['romance'],
'$work' => $r[0]['work'], '$work' => $r[0]['work'],
'$education' => $r[0]['education'], '$education' => $r[0]['education'],
'$contact' => $r[0]['contact'] '$contact' => $r[0]['contact'],
'$channels' => $r[0]['channels'],
)); ));
$arr = array('profile' => $r[0], 'entry' => $o); $arr = array('profile' => $r[0], 'entry' => $o);

View File

@ -500,9 +500,10 @@ function settings_post(&$a) {
); );
*/ */
$r = q("update channel set channel_name = '%s', channel_timezone = '%s', channel_max_anon_mail = %d, channel_max_friend_req = %d, channel_expire_days = %d, channel_r_stream = %d, channel_r_profile = %d, channel_r_photos = %d, channel_r_abook = %d, channel_w_stream = %d, channel_w_wall = %d, channel_w_tagwall = %d, channel_w_comment = %d, channel_w_mail = %d, channel_w_photos = %d, channel_w_chat = %d, channel_a_delegate = %d, channel_r_storage = %d, channel_w_storage = %d, channel_r_pages = %d, channel_w_pages = %d where channel_id = %d limit 1", $r = q("update channel set channel_name = '%s', channel_timezone = '%s', channel_notifyflags = %d, channel_max_anon_mail = %d, channel_max_friend_req = %d, channel_expire_days = %d, channel_r_stream = %d, channel_r_profile = %d, channel_r_photos = %d, channel_r_abook = %d, channel_w_stream = %d, channel_w_wall = %d, channel_w_tagwall = %d, channel_w_comment = %d, channel_w_mail = %d, channel_w_photos = %d, channel_w_chat = %d, channel_a_delegate = %d, channel_r_storage = %d, channel_w_storage = %d, channel_r_pages = %d, channel_w_pages = %d where channel_id = %d limit 1",
dbesc($username), dbesc($username),
dbesc($timezone), dbesc($timezone),
intval($notify),
intval($unkmail), intval($unkmail),
intval($maxreq), intval($maxreq),
intval($expire), intval($expire),

View File

@ -2,7 +2,8 @@
// This needs changing now, if we're going for global settings. Admin settings have been removed in preparation, You *should* just be able to remove all // This needs changing now, if we're going for global settings. Admin settings have been removed in preparation, You *should* just be able to remove all
// the get_config bits, though this is untested. // the get_config bits, though this is untested.
// We also need to eventually. Use the page owners settings for everybody - get_pconfig(page_owner()) or whatever that would look like. // We also need to eventually. Use the page owners settings for everybody - get_pconfig(page_owner()) or whatever that would look like.
load_pconfig(local_user(),'redbasic');
$line_height = false; $line_height = false;
$redbasic_font_size = false; $redbasic_font_size = false;
$resolution = false; $resolution = false;

View File

@ -58,6 +58,9 @@
</li> </li>
{{ endif }} {{ endif }}
{{ if $nav.register }}<li id="nav-register-link" class="nav-menu $nav.register.2"><a href="$nav.register.0" title="$nav.register.3" >$nav.register.1</a><li>{{ endif }}
{{ if $nav.messages }} {{ if $nav.messages }}
<li id="nav-mail-link" class="nav-menu $sel.messages"> <li id="nav-mail-link" class="nav-menu $sel.messages">
<a class="$nav.messages.2" href="$nav.messages.0" title="$nav.messages.3" >$nav.messages.1</a> <a class="$nav.messages.2" href="$nav.messages.0" title="$nav.messages.3" >$nav.messages.1</a>

View File

@ -206,6 +206,15 @@ $lbl_social
</div> </div>
<div id="contact-jot-end"></div> <div id="contact-jot-end"></div>
<div id="channels-jot-wrapper" >
<p id="channels-jot-desc" >
$lbl_channels
</p>
<textarea rows="10" cols="72" id="channels-jot-text" name="channels" >$channels</textarea>
</div>
<div id="channels-jot-end"></div>
<div class="profile-edit-submit-wrapper" > <div class="profile-edit-submit-wrapper" >
<input type="submit" name="submit" class="profile-edit-submit-button" value="$submit" /> <input type="submit" name="submit" class="profile-edit-submit-button" value="$submit" />

View File

@ -63,6 +63,9 @@
</li> </li>
{{/if}} {{/if}}
{{if $nav.register}}<li id="nav-register-link" class="nav-menu {{$nav.register.2}}"><a href="{{$nav.register.0}}" title="{{$nav.register.3}}" >{{$nav.register.1}}</a><li>{{/if}}
{{if $nav.messages}} {{if $nav.messages}}
<li id="nav-mail-link" class="nav-menu {{$sel.messages}}"> <li id="nav-mail-link" class="nav-menu {{$sel.messages}}">
<a class="{{$nav.messages.2}}" href="{{$nav.messages.0}}" title="{{$nav.messages.3}}" >{{$nav.messages.1}}</a> <a class="{{$nav.messages.2}}" href="{{$nav.messages.0}}" title="{{$nav.messages.3}}" >{{$nav.messages.1}}</a>

View File

@ -211,6 +211,15 @@
</div> </div>
<div id="contact-jot-end"></div> <div id="contact-jot-end"></div>
<div id="channels-jot-wrapper" >
<p id="channels-jot-desc" >
{{$lbl_channels}}
</p>
<textarea rows="10" cols="72" id="channels-jot-text" name="channels" >{{$channels}}</textarea>
</div>
<div id="channels-jot-end"></div>
<div class="profile-edit-submit-wrapper" > <div class="profile-edit-submit-wrapper" >
<input type="submit" name="submit" class="profile-edit-submit-button" value="{{$submit}}" /> <input type="submit" name="submit" class="profile-edit-submit-button" value="{{$submit}}" />