Commit 716cb8db by Scott

Merge branch 'pr/38' into dev

Closes #38
parents 584e4c9e 8c7ee30b
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
} }
function qa_send_notification($userid, $email, $handle, $subject, $body, $subs) function qa_send_notification($userid, $email, $handle, $subject, $body, $subs, $html = false)
/* /*
Send email to person with $userid and/or $email and/or $handle (null/invalid values are ignored or retrieved from Send email to person with $userid and/or $email and/or $handle (null/invalid values are ignored or retrieved from
user database as appropriate). Email uses $subject and $body, after substituting each key in $subs with its user database as appropriate). Email uses $subject and $body, after substituting each key in $subs with its
...@@ -77,7 +77,12 @@ ...@@ -77,7 +77,12 @@
} else { } else {
$useraccount=qa_db_select_with_pending( $useraccount=qa_db_select_with_pending(
qa_db_user_account_selectspec($userid, true) array(
'columns' => array('email', 'handle'),
'source' => '^users WHERE userid = #',
'arguments' => array($userid),
'single' => true,
)
); );
if ($needhandle) if ($needhandle)
...@@ -103,7 +108,7 @@ ...@@ -103,7 +108,7 @@
'toname' => $handle, 'toname' => $handle,
'subject' => strtr($subject, $subs), 'subject' => strtr($subject, $subs),
'body' => (empty($handle) ? '' : qa_lang_sub('emails/to_handle_prefix', $handle)).strtr($body, $subs), 'body' => (empty($handle) ? '' : qa_lang_sub('emails/to_handle_prefix', $handle)).strtr($body, $subs),
'html' => false, 'html' => $html,
)); ));
} else } else
...@@ -157,4 +162,4 @@ ...@@ -157,4 +162,4 @@
/* /*
Omit PHP closing tag to help avoid accidental output Omit PHP closing tag to help avoid accidental output
*/ */
\ No newline at end of file
...@@ -149,7 +149,7 @@ ...@@ -149,7 +149,7 @@
$favoritenonqs=qa_db_get_pending_result('favoritenonqs', qa_db_user_favorite_non_qs_selectspec($loginuserid)); $favoritenonqs=qa_db_get_pending_result('favoritenonqs', qa_db_user_favorite_non_qs_selectspec($loginuserid));
foreach ($favoritenonqs as $favorite) foreach ($favoritenonqs as $favorite) {
switch ($favorite['type']) { switch ($favorite['type']) {
case QA_ENTITY_USER: case QA_ENTITY_USER:
$qa_favorite_non_qs_map['user'][$favorite['userid']]=true; $qa_favorite_non_qs_map['user'][$favorite['userid']]=true;
...@@ -163,6 +163,7 @@ ...@@ -163,6 +163,7 @@
$qa_favorite_non_qs_map['category'][$favorite['categorybackpath']]=true; $qa_favorite_non_qs_map['category'][$favorite['categorybackpath']]=true;
break; break;
} }
}
} }
} }
...@@ -1493,82 +1494,86 @@ ...@@ -1493,82 +1494,86 @@
(or null for no maximum) and $excludecategoryid to a category that should not be included. (or null for no maximum) and $excludecategoryid to a category that should not be included.
*/ */
{ {
$pathcategories=qa_category_path($navcategories, $categoryid); $pathcategories = qa_category_path($navcategories, $categoryid);
$startpath=''; $startpath = '';
foreach ($pathcategories as $category) foreach ($pathcategories as $category)
$startpath.='/'.$category['categoryid']; $startpath .= '/' . $category['categoryid'];
if (!isset($maxdepth)) if (isset($maxdepth))
$maxdepth=QA_CATEGORY_DEPTH; $maxdepth = min(QA_CATEGORY_DEPTH, $maxdepth);
$maxdepth=min(QA_CATEGORY_DEPTH, $maxdepth); else
$maxdepth = QA_CATEGORY_DEPTH;
$qa_content['script_rel'][]='qa-content/qa-ask.js?'.QA_VERSION; $qa_content['script_rel'][] = 'qa-content/qa-ask.js?' . QA_VERSION;
$qa_content['script_onloads'][]='qa_category_select('.qa_js($fieldname).', '.qa_js($startpath).');'; $qa_content['script_onloads'][] = sprintf('qa_category_select(%s, %s);', qa_js($fieldname), qa_js($startpath));
$qa_content['script_var']['qa_cat_exclude']=$excludecategoryid; $qa_content['script_var'] = array(
$qa_content['script_var']['qa_cat_allownone']=(int)$allownone; 'qa_cat_exclude' => $excludecategoryid,
$qa_content['script_var']['qa_cat_allownosub']=(int)$allownosub; 'qa_cat_allownone' => (int) $allownone,
$qa_content['script_var']['qa_cat_maxdepth']=$maxdepth; 'qa_cat_allownosub' => (int) $allownosub,
'qa_cat_maxdepth' => $maxdepth,
);
$field['type']='select'; $field['type'] = 'select';
$field['tags']='name="'.$fieldname.'_0" id="'.$fieldname.'_0" onchange="qa_category_select('.qa_js($fieldname).');"'; $field['tags'] = sprintf('name="%s_0" id="%s_0" onchange="qa_category_select(%s);"', $fieldname, $fieldname, qa_js($fieldname));
$field['options']=array(); $field['options'] = array();
// create the menu that will be shown if Javascript is disabled // create the menu that will be shown if Javascript is disabled
if ($allownone) if ($allownone)
$field['options']['']=qa_lang_html('main/no_category'); // this is also copied to first menu created by Javascript $field['options'][''] = qa_lang_html('main/no_category'); // this is also copied to first menu created by Javascript
$keycategoryids=array(); $keycategoryids = array();
if ($allownosub) { if ($allownosub) {
$category=@$navcategories[$categoryid]; $category = @$navcategories[$categoryid];
$upcategory=$category;
while (true) { // first get supercategories
$upcategory=@$navcategories[$upcategory['parentid']];
if (!isset($upcategory)) $upcategory = @$navcategories[$category['parentid']]; // first get supercategories
break; while (isset($upcategory)) {
$keycategoryids[$upcategory['categoryid']] = true;
$keycategoryids[$upcategory['categoryid']]=true; $upcategory = @$navcategories[$upcategory['parentid']];
} }
$keycategoryids=array_reverse($keycategoryids, true); $keycategoryids = array_reverse($keycategoryids, true);
$depth=count($keycategoryids); // number of levels above $depth = count($keycategoryids); // number of levels above
if (isset($category)) { if (isset($category)) {
$depth++; // to count category itself $depth++; // to count category itself
foreach ($navcategories as $navcategory) // now get siblings and self foreach ($navcategories as $navcategory) // now get siblings and self
if (!strcmp($navcategory['parentid'], $category['parentid'])) if (!strcmp($navcategory['parentid'], $category['parentid']))
$keycategoryids[$navcategory['categoryid']]=true; $keycategoryids[$navcategory['categoryid']] = true;
} }
if ($depth<$maxdepth) if ($depth < $maxdepth)
foreach ($navcategories as $navcategory) // now get children, if not too deep foreach ($navcategories as $navcategory) // now get children, if not too deep
if (!strcmp($navcategory['parentid'], $categoryid)) if (!strcmp($navcategory['parentid'], $categoryid))
$keycategoryids[$navcategory['categoryid']]=true; $keycategoryids[$navcategory['categoryid']] = true;
} else { } else {
$haschildren=false; $haschildren = false;
foreach ($navcategories as $navcategory) // check if it has any children foreach ($navcategories as $navcategory) // check if it has any children
if (!strcmp($navcategory['parentid'], $categoryid)) if (!strcmp($navcategory['parentid'], $categoryid)) {
$haschildren=true; $haschildren = true;
break;
}
if (!$haschildren) if (!$haschildren)
$keycategoryids[$categoryid]=true; // show this category if it has no children $keycategoryids[$categoryid] = true; // show this category if it has no children
} }
foreach ($keycategoryids as $keycategoryid => $dummy) foreach ($keycategoryids as $keycategoryid => $dummy)
if (strcmp($keycategoryid, $excludecategoryid)) if (strcmp($keycategoryid, $excludecategoryid))
$field['options'][$keycategoryid]=qa_category_path_html($navcategories, $keycategoryid); $field['options'][$keycategoryid] = qa_category_path_html($navcategories, $keycategoryid);
$field['value']=@$field['options'][$categoryid]; $field['value'] = @$field['options'][$categoryid];
$field['note']='<div id="'.$fieldname.'_note"><noscript style="color:red;">'.qa_lang_html('question/category_js_note').'</noscript></div>'; $field['note'] =
'<div id="' . $fieldname . '_note">' .
'<noscript style="color:red;">' . qa_lang_html('question/category_js_note') . '</noscript>' .
'</div>';
} }
......
...@@ -390,19 +390,19 @@ ...@@ -390,19 +390,19 @@
break; break;
case 'show_custom_sidebar': case 'show_custom_sidebar':
$value=strlen(qa_opt('custom_sidebar')) ? true : false; $value = strlen(qa_opt('custom_sidebar')) > 0;
break; break;
case 'show_custom_header': case 'show_custom_header':
$value=strlen(qa_opt('custom_header')) ? true : false; $value = strlen(qa_opt('custom_header')) > 0;
break; break;
case 'show_custom_footer': case 'show_custom_footer':
$value=strlen(qa_opt('custom_footer')) ? true : false; $value = strlen(qa_opt('custom_footer')) > 0;
break; break;
case 'show_custom_in_head': case 'show_custom_in_head':
$value=strlen(qa_opt('custom_in_head')) ? true : false; $value = strlen(qa_opt('custom_in_head')) > 0;
break; break;
case 'custom_sidebar': case 'custom_sidebar':
......
...@@ -54,11 +54,11 @@ ...@@ -54,11 +54,11 @@
{ {
qa_post_unindex($oldquestion['postid']); qa_post_unindex($oldquestion['postid']);
$wasqueued=($oldquestion['type']=='Q_QUEUED'); $wasqueued = ($oldquestion['type'] == 'Q_QUEUED');
$titlechanged=strcmp($oldquestion['title'], $title) ? true : false; $titlechanged = strcmp($oldquestion['title'], $title) !== 0;
$contentchanged=strcmp($oldquestion['content'], $content) || strcmp($oldquestion['format'], $format); $contentchanged = strcmp($oldquestion['content'], $content) !== 0 || strcmp($oldquestion['format'], $format) !== 0;
$tagschanged=strcmp($oldquestion['tags'], $tagstring) ? true : false; $tagschanged = strcmp($oldquestion['tags'], $tagstring) !== 0;
$setupdated=($titlechanged || $contentchanged || $tagschanged) && (!$wasqueued) && !$silent; $setupdated = ($titlechanged || $contentchanged || $tagschanged) && (!$wasqueued) && !$silent;
qa_db_post_set_content($oldquestion['postid'], $title, $content, $format, $tagstring, $notify, qa_db_post_set_content($oldquestion['postid'], $title, $content, $format, $tagstring, $notify,
$setupdated ? $userid : null, $setupdated ? qa_remote_ip_address() : null, $setupdated ? $userid : null, $setupdated ? qa_remote_ip_address() : null,
...@@ -72,18 +72,19 @@ ...@@ -72,18 +72,19 @@
if ($setupdated && $remoderate) { if ($setupdated && $remoderate) {
require_once QA_INCLUDE_DIR.'qa-app-posts.php'; require_once QA_INCLUDE_DIR.'qa-app-posts.php';
$answers=qa_post_get_question_answers($oldquestion['postid']); $answers = qa_post_get_question_answers($oldquestion['postid']);
$commentsfollows=qa_post_get_question_commentsfollows($oldquestion['postid']); $commentsfollows = qa_post_get_question_commentsfollows($oldquestion['postid']);
$closepost=qa_post_get_question_closepost($oldquestion['postid']); $closepost = qa_post_get_question_closepost($oldquestion['postid']);
foreach ($answers as $answer) foreach ($answers as $answer)
qa_post_unindex($answer['postid']); qa_post_unindex($answer['postid']);
foreach ($commentsfollows as $comment) foreach ($commentsfollows as $comment) {
if ($comment['basetype']=='C') if ($comment['basetype'] == 'C')
qa_post_unindex($comment['postid']); qa_post_unindex($comment['postid']);
}
if (@$closepost['parentid']==$oldquestion['postid']) if (@$closepost['parentid'] == $oldquestion['postid'])
qa_post_unindex($closepost['postid']); qa_post_unindex($closepost['postid']);
qa_db_post_set_type($oldquestion['postid'], 'Q_QUEUED'); qa_db_post_set_type($oldquestion['postid'], 'Q_QUEUED');
...@@ -94,7 +95,8 @@ ...@@ -94,7 +95,8 @@
if ($oldquestion['flagcount']) if ($oldquestion['flagcount'])
qa_db_flaggedcount_update(); qa_db_flaggedcount_update();
} elseif ($oldquestion['type']=='Q') { // not hidden or queued }
else if ($oldquestion['type'] == 'Q') { // not hidden or queued
qa_post_index($oldquestion['postid'], 'Q', $oldquestion['postid'], $oldquestion['parentid'], $title, $content, $format, $text, $tagstring, $oldquestion['categoryid']); qa_post_index($oldquestion['postid'], 'Q', $oldquestion['postid'], $oldquestion['parentid'], $title, $content, $format, $text, $tagstring, $oldquestion['categoryid']);
} }
......
...@@ -102,7 +102,7 @@ ...@@ -102,7 +102,7 @@
if (isset($userid) && isset($categoryid)) { if (isset($userid) && isset($categoryid)) {
$favoritemap=qa_get_favorite_non_qs_map(); $favoritemap=qa_get_favorite_non_qs_map();
$categoryisfavorite=@$favoritemap['category'][$navcategories[$categoryid]['backpath']] ? true : false; $categoryisfavorite = @$favoritemap['category'][$navcategories[$categoryid]['backpath']];
$qa_content['favorite']=qa_favorite_form(QA_ENTITY_CATEGORY, $categoryid, $categoryisfavorite, $qa_content['favorite']=qa_favorite_form(QA_ENTITY_CATEGORY, $categoryid, $categoryisfavorite,
qa_lang_sub($categoryisfavorite ? 'main/remove_x_favorites' : 'main/add_category_x_favorites', $navcategories[$categoryid]['title'])); qa_lang_sub($categoryisfavorite ? 'main/remove_x_favorites' : 'main/add_category_x_favorites', $navcategories[$categoryid]['title']));
......
...@@ -220,7 +220,7 @@ ...@@ -220,7 +220,7 @@
Return whether there are any blobs whose content has been stored as a file on disk Return whether there are any blobs whose content has been stored as a file on disk
*/ */
{ {
return count(qa_db_read_all_values(qa_db_query_sub('SELECT blobid FROM ^blobs WHERE content IS NULL LIMIT 1'))) ? true : false; return qa_db_read_one_value(qa_db_query_sub('SELECT blobid FROM ^blobs WHERE content IS NULL LIMIT 1'), true) != null;
} }
...@@ -229,7 +229,7 @@ ...@@ -229,7 +229,7 @@
Return whether there are any blobs whose content has been stored in the database Return whether there are any blobs whose content has been stored in the database
*/ */
{ {
return count(qa_db_read_all_values(qa_db_query_sub('SELECT blobid FROM ^blobs WHERE content IS NOT NULL LIMIT 1'))) ? true : false; return qa_db_read_one_value(qa_db_query_sub('SELECT blobid FROM ^blobs WHERE content IS NOT NULL LIMIT 1'), true) != null;
} }
...@@ -603,4 +603,4 @@ ...@@ -603,4 +603,4 @@
/* /*
Omit PHP closing tag to help avoid accidental output Omit PHP closing tag to help avoid accidental output
*/ */
\ No newline at end of file
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
$doconfirms=qa_opt('confirm_user_emails') && ($useraccount['level']<QA_USER_LEVEL_EXPERT); $doconfirms=qa_opt('confirm_user_emails') && ($useraccount['level']<QA_USER_LEVEL_EXPERT);
$isconfirmed=($useraccount['flags'] & QA_USER_FLAGS_EMAIL_CONFIRMED) ? true : false; $isconfirmed=($useraccount['flags'] & QA_USER_FLAGS_EMAIL_CONFIRMED) ? true : false;
$haspassword=isset($useraccount['passsalt']) && isset($useraccount['passcheck']); $haspassword=isset($useraccount['passsalt']) && isset($useraccount['passcheck']);
$isblocked=qa_user_permit_error() ? true : false; $isblocked = qa_user_permit_error() !== false;
// Process profile if saved // Process profile if saved
...@@ -439,4 +439,4 @@ ...@@ -439,4 +439,4 @@
/* /*
Omit PHP closing tag to help avoid accidental output Omit PHP closing tag to help avoid accidental output
*/ */
\ No newline at end of file
...@@ -110,9 +110,9 @@ ...@@ -110,9 +110,9 @@
$userlevel=qa_user_level_for_categories($categoryids); $userlevel=qa_user_level_for_categories($categoryids);
$in['name']=qa_post_text('name'); $in['name']=qa_post_text('name');
$in['notify']=qa_post_text('notify') ? true : false; $in['notify'] = strlen(qa_post_text('notify')) > 0;
$in['email']=qa_post_text('email'); $in['email']=qa_post_text('email');
$in['queued']=qa_user_moderation_reason($userlevel) ? true : false; $in['queued'] = qa_user_moderation_reason($userlevel) !== false;
qa_get_post_content('editor', 'content', $in['editor'], $in['content'], $in['format'], $in['text']); qa_get_post_content('editor', 'content', $in['editor'], $in['content'], $in['format'], $in['text']);
......
...@@ -75,7 +75,7 @@ ...@@ -75,7 +75,7 @@
if (strtolower(qa_db_calc_passcheck($inpassword, $userinfo['passsalt'])) == strtolower($userinfo['passcheck'])) { // login and redirect if (strtolower(qa_db_calc_passcheck($inpassword, $userinfo['passsalt'])) == strtolower($userinfo['passcheck'])) { // login and redirect
require_once QA_INCLUDE_DIR.'qa-app-users.php'; require_once QA_INCLUDE_DIR.'qa-app-users.php';
qa_set_logged_in_user($inuserid, $userinfo['handle'], $inremember ? true : false); qa_set_logged_in_user($inuserid, $userinfo['handle'], !empty($inremember));
$topath=qa_get('to'); $topath=qa_get('to');
...@@ -143,7 +143,7 @@ ...@@ -143,7 +143,7 @@
'type' => 'checkbox', 'type' => 'checkbox',
'label' => qa_lang_html('users/remember_label'), 'label' => qa_lang_html('users/remember_label'),
'tags' => 'name="remember"', 'tags' => 'name="remember"',
'value' => @$inremember ? true : false, 'value' => !empty(@$inremember),
), ),
), ),
......
...@@ -450,7 +450,7 @@ ...@@ -450,7 +450,7 @@
if ($question['isbyuser']) { if ($question['isbyuser']) {
$in['name']=qa_post_text('q_name'); $in['name']=qa_post_text('q_name');
$in['notify']=qa_post_text('q_notify') ? true : false; $in['notify'] = !empty(qa_post_text('q_notify'));
$in['email']=qa_post_text('q_email'); $in['email']=qa_post_text('q_email');
} }
...@@ -781,7 +781,7 @@ ...@@ -781,7 +781,7 @@
if ($answer['isbyuser']) { if ($answer['isbyuser']) {
$in['name']=qa_post_text($prefix.'name'); $in['name']=qa_post_text($prefix.'name');
$in['notify']=qa_post_text($prefix.'notify') ? true : false; $in['notify'] = !empty(qa_post_text($prefix.'notify'));
$in['email']=qa_post_text($prefix.'email'); $in['email']=qa_post_text($prefix.'email');
} }
...@@ -982,7 +982,7 @@ ...@@ -982,7 +982,7 @@
if ($comment['isbyuser']) { if ($comment['isbyuser']) {
$in['name']=qa_post_text($prefix.'name'); $in['name']=qa_post_text($prefix.'name');
$in['notify']=qa_post_text($prefix.'notify') ? true : false; $in['notify'] = !empty(qa_post_text($prefix.'notify'));
$in['email']=qa_post_text($prefix.'email'); $in['email']=qa_post_text($prefix.'email');
} }
......
...@@ -324,9 +324,9 @@ ...@@ -324,9 +324,9 @@
{ {
$in=array( $in=array(
'name' => qa_post_text('a_name'), 'name' => qa_post_text('a_name'),
'notify' => qa_post_text('a_notify') ? true : false, 'notify' => !empty(qa_post_text('a_notify')),
'email' => qa_post_text('a_email'), 'email' => qa_post_text('a_email'),
'queued' => qa_user_moderation_reason(qa_user_level_for_post($question)) ? true : false, 'queued' => qa_user_moderation_reason(qa_user_level_for_post($question)) !== false,
); );
qa_get_post_content('a_editor', 'a_content', $in['editor'], $in['content'], $in['format'], $in['text']); qa_get_post_content('a_editor', 'a_content', $in['editor'], $in['content'], $in['format'], $in['text']);
...@@ -386,9 +386,9 @@ ...@@ -386,9 +386,9 @@
$in=array( $in=array(
'name' => qa_post_text($prefix.'name'), 'name' => qa_post_text($prefix.'name'),
'notify' => qa_post_text($prefix.'notify') ? true : false, 'notify' => !empty(qa_post_text($prefix.'notify')),
'email' => qa_post_text($prefix.'email'), 'email' => qa_post_text($prefix.'email'),
'queued' => qa_user_moderation_reason(qa_user_level_for_post($parent)) ? true : false, 'queued' => qa_user_moderation_reason(qa_user_level_for_post($parent)) !== false,
); );
qa_get_post_content($prefix.'editor', $prefix.'content', $in['editor'], $in['content'], $in['format'], $in['text']); qa_get_post_content($prefix.'editor', $prefix.'content', $in['editor'], $in['content'], $in['format'], $in['text']);
...@@ -443,9 +443,9 @@ ...@@ -443,9 +443,9 @@
'content' => $post['content'], 'content' => $post['content'],
'format' => $post['format'], 'format' => $post['format'],
'text' => qa_viewer_text($post['content'], $post['format']), 'text' => qa_viewer_text($post['content'], $post['format']),
'notify' => isset($post['notify']) ? true : false, 'notify' => isset($post['notify']),
'email' => qa_email_validate($post['notify']) ? $post['notify'] : null, 'email' => qa_email_validate($post['notify']) ? $post['notify'] : null,
'queued' => qa_user_moderation_reason(qa_user_level_for_post($post)) ? true : false, 'queued' => qa_user_moderation_reason(qa_user_level_for_post($post)) !== false,
); );
if ($post['basetype']=='Q') { if ($post['basetype']=='Q') {
......
...@@ -435,7 +435,7 @@ ...@@ -435,7 +435,7 @@
// Category-specific levels // Category-specific levels
if (qa_using_categories()) { if (qa_using_categories()) {
$catleveladd=qa_get('catleveladd') ? true : false; $catleveladd = strlen(qa_get('catleveladd')) > 0;
if ((!$catleveladd) && !count($userlevels)) if ((!$catleveladd) && !count($userlevels))
$qa_content['form_profile']['fields']['level']['suffix']=strtr(qa_lang_html('users/category_level_add'), array( $qa_content['form_profile']['fields']['level']['suffix']=strtr(qa_lang_html('users/category_level_add'), array(
...@@ -545,10 +545,10 @@ ...@@ -545,10 +545,10 @@
// Show email address only if we're an administrator // Show email address only if we're an administrator
if (($loginlevel>=QA_USER_LEVEL_ADMIN) && !qa_user_permit_error()) { if (($loginlevel >= QA_USER_LEVEL_ADMIN) && !qa_user_permit_error()) {
$doconfirms=qa_opt('confirm_user_emails') && ($useraccount['level']<QA_USER_LEVEL_EXPERT); $doconfirms = qa_opt('confirm_user_emails') && ($useraccount['level']<QA_USER_LEVEL_EXPERT);
$isconfirmed=($useraccount['flags'] & QA_USER_FLAGS_EMAIL_CONFIRMED) ? true : false; $isconfirmed = ($useraccount['flags'] & QA_USER_FLAGS_EMAIL_CONFIRMED) > 0;
$htmlemail=qa_html(isset($inemail) ? $inemail : $useraccount['email']); $htmlemail = qa_html(isset($inemail) ? $inemail : $useraccount['email']);
$qa_content['form_profile']['fields']['email']=array( $qa_content['form_profile']['fields']['email']=array(
'type' => $userediting ? 'text' : 'static', 'type' => $userediting ? 'text' : 'static',
...@@ -610,7 +610,7 @@ ...@@ -610,7 +610,7 @@
if (!isset($value)) if (!isset($value))
$value=@$userprofile[$userfield['title']]; $value=@$userprofile[$userfield['title']];
$valuehtml=qa_html($value, (($userfield['flags'] & QA_FIELD_FLAGS_MULTI_LINE) && !$fieldsediting) ? true : false); $valuehtml=qa_html($value, (($userfield['flags'] & QA_FIELD_FLAGS_MULTI_LINE) && !$fieldsediting));
} }
$label=trim(qa_user_userfield_label($userfield), ':'); $label=trim(qa_user_userfield_label($userfield), ':');
......
...@@ -646,7 +646,7 @@ ...@@ -646,7 +646,7 @@
{ {
if (qa_to_override(__FUNCTION__)) { $args=func_get_args(); return qa_call_override(__FUNCTION__, $args); } if (qa_to_override(__FUNCTION__)) { $args=func_get_args(); return qa_call_override(__FUNCTION__, $args); }
return preg_match("/^[\-\!\#\$\%\&\'\*\+\/\=\?\_\`\{\|\}\~a-zA-Z0-9\.\^]+\@[a-zA-Z0-9\-]+\.[a-zA-Z0-9\.\-]+$/", $email) ? true : false; return preg_match("/^[\-\!\#\$\%\&\'\*\+\/\=\?\_\`\{\|\}\~a-zA-Z0-9\.\^]+\@[a-zA-Z0-9\-]+\.[a-zA-Z0-9\.\-]+$/", $email) === 1;
} }
......
...@@ -109,6 +109,10 @@ form, fieldset { ...@@ -109,6 +109,10 @@ form, fieldset {
border: none; border: none;
} }
input[type="text"].qa-search-field {
padding: 4px 5px;
}
input[type="text"], input[type="password"], textarea, select, checkbox, radio { input[type="text"], input[type="password"], textarea, select, checkbox, radio {
border: 1px solid #ddd; border: 1px solid #ddd;
padding: 5px; padding: 5px;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment