[ljcom] r10330: LJSUP-7488 (Remove singles feature)

Mar 30, 2011 12:36


Committer: ailyinLJSUP-7488 (Remove singles feature)
U trunk/bin/maint/stats-local.pl
U trunk/bin/upgrading/be.dat
U trunk/bin/upgrading/de.dat
U trunk/bin/upgrading/en_LJ.dat
U trunk/bin/upgrading/es.dat
U trunk/bin/upgrading/fi.dat
U trunk/bin/upgrading/fr.dat
U trunk/bin/upgrading/gr.dat
U trunk/bin/upgrading/is.dat
U trunk/bin/upgrading/it.dat
U trunk/bin/upgrading/nb.dat
U trunk/bin/upgrading/nl.dat
U trunk/bin/upgrading/pl.dat
U trunk/bin/upgrading/pt.dat
U trunk/bin/upgrading/ru.dat
U trunk/bin/upgrading/sv.dat
U trunk/bin/upgrading/uk.dat
U trunk/cgi-bin/crumbs-local.pl
U trunk/htdocs/error-page.bml
U trunk/htdocs/error-page.bml.text
U trunk/htdocs/singles/index.bml
D trunk/htdocs/singles/mod.bml
D trunk/htdocs/singles/search.bml

Modified: trunk/bin/maint/stats-local.pl
===================================================================
--- trunk/bin/maint/stats-local.pl 2011-03-30 10:59:37 UTC (rev 10329)
+++ trunk/bin/maint/stats-local.pl 2011-03-30 12:36:30 UTC (rev 10330)
@@ -8,20 +8,13 @@
{
my @which = @_;

- unless (@which) { @which = qw(singles); }
+ unless (@which) { @which = qw( ); }
my %do = map { $_, 1, } @which;

my %to_pop;

LJ::load_props("user");

- if ($do{'singles'}) {
- my $dbr = LJ::get_db_reader();
- my $propid = $dbr->selectrow_array("SELECT upropid FROM userproplist WHERE name='single_status'");
- my $ct = $dbr->selectrow_array("SELECT COUNT(*) FROM userprop WHERE upropid=$propid");
- $to_pop{'singles'}->{'total'} = $ct;
- }
-
# copied from stats.pl:
my $dbh = LJ::get_db_writer();
foreach my $cat (keys %to_pop)

Modified: trunk/bin/upgrading/be.dat
===================================================================
--- trunk/bin/upgrading/be.dat 2011-03-30 10:59:37 UTC (rev 10329)
+++ trunk/bin/upgrading/be.dat 2011-03-30 12:36:30 UTC (rev 10330)
@@ -9802,8 +9802,6 @@

/site/index.bml.userlinks.fun.meme=Напамінкі

-/site/index.bml.userlinks.fun.singles=Знаёмствы
-
/site/index.bml.userlinks.fun.song=Песьня пра [[sitename]]

/site/index.bml.userlinks.header=Спасылкі для карыстальнікаў
@@ -12890,12 +12888,6 @@

crumb.shopitem=Асобнік з крамы падарункаў

-crumb.singles=Адзінокія Жывога Журналу
-
-crumb.singlesopts=Мадыфікаваньне даступнасьці
-
-crumb.singlessearch=Пошук адзінокіх
-
crumb.sitemap=Мапа сайту

crumb.siteopts=Опцыі прагляду

Modified: trunk/bin/upgrading/de.dat
===================================================================
--- trunk/bin/upgrading/de.dat 2011-03-30 10:59:37 UTC (rev 10329)
+++ trunk/bin/upgrading/de.dat 2011-03-30 12:36:30 UTC (rev 10330)
@@ -10286,8 +10286,6 @@

/site/index.bml.userlinks.fun.meme=Meme-Nachverfolgen

-/site/index.bml.userlinks.fun.singles=Singel
-
/site/index.bml.userlinks.fun.song=[[sitename]] … Der Song!

/site/index.bml.userlinks.header=Links für Benutzer
@@ -14021,12 +14019,6 @@

crumb.shopitem=Artikel im Geschenkladen

-crumb.singles=LiveJournal-Singles
-
-crumb.singlesopts=Verfügbarkeit bearbeiten
-
-crumb.singlessearch=Suche nach Singles
-
crumb.sitemap=Sitemap

crumb.siteopts=Web-Einstellungen

Modified: trunk/bin/upgrading/en_LJ.dat
===================================================================
--- trunk/bin/upgrading/en_LJ.dat 2011-03-30 10:59:37 UTC (rev 10329)
+++ trunk/bin/upgrading/en_LJ.dat 2011-03-30 12:36:30 UTC (rev 10330)
@@ -1407,12 +1407,6 @@

crumb.shopitem=Gift Shop Item

-crumb.singles=LiveJournal Singles
-
-crumb.singlesopts=Modify Availability
-
-crumb.singlessearch=Search for Singles
-
crumb.sitemap=Site Map

crumb.sizechart=Sizing Chart

Modified: trunk/bin/upgrading/es.dat
===================================================================
--- trunk/bin/upgrading/es.dat 2011-03-30 10:59:37 UTC (rev 10329)
+++ trunk/bin/upgrading/es.dat 2011-03-30 12:36:30 UTC (rev 10330)
@@ -9758,8 +9758,6 @@

/site/index.bml.userlinks.fun.meme=Rastreador de meme

-/site/index.bml.userlinks.fun.singles=Solteros
-
/site/index.bml.userlinks.fun.song=[[user]] … ¡La canción!

/site/index.bml.userlinks.header=Enlaces de usuario
@@ -13099,12 +13097,6 @@

crumb.shopitem=Producto de tienda de regalos

-crumb.singles=Solteros en LiveJournal
-
-crumb.singlesopts=Modificar Disponibilidad
-
-crumb.singlessearch=Buscar solteros
-
crumb.sitemap=Mapa del sitio

crumb.siteopts=Opciones de navegación

Modified: trunk/bin/upgrading/fi.dat
===================================================================
--- trunk/bin/upgrading/fi.dat 2011-03-30 10:59:37 UTC (rev 10329)
+++ trunk/bin/upgrading/fi.dat 2011-03-30 12:36:30 UTC (rev 10330)
@@ -13339,8 +13339,6 @@

/site/index.bml.userlinks.fun.meme=Meme-seurain

-/site/index.bml.userlinks.fun.singles=Sinkut
-
/site/index.bml.userlinks.fun.song=[[sitename]] … laulu!

/site/index.bml.userlinks.header=Käyttäjälinkit
@@ -18146,12 +18144,6 @@

crumb.shopitem=Lahjakaupan tuote

-crumb.singles=LiveJournalin sinkut
-
-crumb.singlesopts=Muuta saatavuutta
-
-crumb.singlessearch=Etsi sinkkuja
-
crumb.sitemap=Sivukartta

crumb.siteopts=Käyttöasetukset

Modified: trunk/bin/upgrading/fr.dat
===================================================================
--- trunk/bin/upgrading/fr.dat 2011-03-30 10:59:37 UTC (rev 10329)
+++ trunk/bin/upgrading/fr.dat 2011-03-30 12:36:30 UTC (rev 10330)
@@ -13254,8 +13254,6 @@

/site/index.bml.userlinks.fun.meme=Pisteur de meme

-/site/index.bml.userlinks.fun.singles=Célibataires
-
/site/index.bml.userlinks.fun.song=[[sitename]] … la chanson !

/site/index.bml.userlinks.header=Liens utilisateurs
@@ -18034,12 +18032,6 @@

crumb.shopitem=Article de la boutique cadeau

-crumb.singles=Les célibataires de LiveJournal
-
-crumb.singlesopts=Modifier la disponibilité
-
-crumb.singlessearch=Recherchez des célibataires
-
crumb.sitemap=Plan du site

crumb.siteopts=Préférences du navigateur

Modified: trunk/bin/upgrading/gr.dat
===================================================================
--- trunk/bin/upgrading/gr.dat 2011-03-30 10:59:37 UTC (rev 10329)
+++ trunk/bin/upgrading/gr.dat 2011-03-30 12:36:30 UTC (rev 10330)
@@ -3400,8 +3400,6 @@

/site/index.bml.userlinks.fun.header=Διασκεδαστικά Πράγματα:

-/site/index.bml.userlinks.fun.singles=Εργένηδες
-
/site/index.bml.userlinks.fun.song=[[sitename]] … Το Τραγούδι!

/site/index.bml.userlinks.header=Συνδεσμοι Χρήστη

Modified: trunk/bin/upgrading/is.dat
===================================================================
--- trunk/bin/upgrading/is.dat 2011-03-30 10:59:37 UTC (rev 10329)
+++ trunk/bin/upgrading/is.dat 2011-03-30 12:36:30 UTC (rev 10330)
@@ -4469,8 +4469,6 @@

/site/index.bml.userlinks.fun.meme=Rakning míma

-/site/index.bml.userlinks.fun.singles=Fólk á lausu
-
/site/index.bml.userlinks.fun.song=[[sitename]] … Lagið!

/site/index.bml.userlinks.header=Tenglar fyrir notendur
@@ -6711,12 +6709,6 @@

crumb.shopitem=Gjafaverslunarvara

-crumb.singles=LiveJournal notendur á lausu
-
-crumb.singlesopts=Breyta hjúskaparstöðu
-
-crumb.singlessearch=Leita að fólki á lausu
-
crumb.sitemap=Veftré

crumb.siteopts=Val um ásýnd

Modified: trunk/bin/upgrading/it.dat
===================================================================
--- trunk/bin/upgrading/it.dat 2011-03-30 10:59:37 UTC (rev 10329)
+++ trunk/bin/upgrading/it.dat 2011-03-30 12:36:30 UTC (rev 10330)
@@ -11410,12 +11410,6 @@

crumb.shopitem=Articolo del Gift Shop

-crumb.singles=Single di LiveJournal
-
-crumb.singlesopts=Modifica la disponibilità
-
-crumb.singlessearch=Cerca Singles
-
crumb.sitemap=Mappa del Sito

crumb.siteopts=Preferenze di Navigazione

Modified: trunk/bin/upgrading/nb.dat
===================================================================
--- trunk/bin/upgrading/nb.dat 2011-03-30 10:59:37 UTC (rev 10329)
+++ trunk/bin/upgrading/nb.dat 2011-03-30 12:36:30 UTC (rev 10330)
@@ -7897,12 +7897,6 @@

crumb.shopitem=Gavebutikkvare

-crumb.singles=LiveJournal single
-
-crumb.singlesopts=Endre tilgjengelighet
-
-crumb.singlessearch=Søk etter single
-
crumb.sitemap=Sidekart

crumb.siteopts=Visningsinnstillinger

Modified: trunk/bin/upgrading/nl.dat
===================================================================
--- trunk/bin/upgrading/nl.dat 2011-03-30 10:59:37 UTC (rev 10329)
+++ trunk/bin/upgrading/nl.dat 2011-03-30 12:36:30 UTC (rev 10330)
@@ -8307,8 +8307,6 @@

/site/index.bml.userlinks.fun.header=Leuk Spul

-/site/index.bml.userlinks.fun.singles=Vrijgezellen
-
/site/index.bml.userlinks.header=Gebruikerslinks

/site/index.bml.userlinks.international.header=Internationaal:
@@ -10952,12 +10950,6 @@

crumb.shop=Cadeauwinkel

-crumb.singles=LiveJournal Vrijgezellen
-
-crumb.singlesopts=Beschikbaarheid Aanpassen
-
-crumb.singlessearch=Zoek naar Vrijgezellen
-
crumb.stats=Statistieken

crumb.store=LiveJournal Winkel

Modified: trunk/bin/upgrading/pl.dat
===================================================================
--- trunk/bin/upgrading/pl.dat 2011-03-30 10:59:37 UTC (rev 10329)
+++ trunk/bin/upgrading/pl.dat 2011-03-30 12:36:30 UTC (rev 10330)
@@ -9113,8 +9113,6 @@

/site/index.bml.userlinks.fun.meme=Wyszukiwarka wspomnień

-/site/index.bml.userlinks.fun.singles=Samotni
-
/site/index.bml.userlinks.fun.song=[[sitename]] … Piosenka!

/site/index.bml.userlinks.header=Łącza użytkownika
@@ -12384,12 +12382,6 @@

crumb.shopitem=Przedmiot ze Sklepiku

-crumb.singles=Swatka LiveJournal
-
-crumb.singlesopts=Zmień Dostępność
-
-crumb.singlessearch=Szukaj w Swatce
-
crumb.sitemap=Mapa Strony

crumb.siteopts=Preferencje

Modified: trunk/bin/upgrading/pt.dat
===================================================================
--- trunk/bin/upgrading/pt.dat 2011-03-30 10:59:37 UTC (rev 10329)
+++ trunk/bin/upgrading/pt.dat 2011-03-30 12:36:30 UTC (rev 10330)
@@ -3451,12 +3451,6 @@

crumb.setpgpkey=Chave Pública

-crumb.singles=Solteiros do LiveJournal
-
-crumb.singlesopts=Modificar Disponibilidades.
-
-crumb.singlessearch=Procurar por Solteiros
-
crumb.sitemap=Mapa do Site

crumb.siteopts=Verificar Preferências

Modified: trunk/bin/upgrading/ru.dat
===================================================================
--- trunk/bin/upgrading/ru.dat 2011-03-30 10:59:37 UTC (rev 10329)
+++ trunk/bin/upgrading/ru.dat 2011-03-30 12:36:30 UTC (rev 10330)
@@ -13109,8 +13109,6 @@

/site/index.bml.userlinks.fun.meme=Узелки на заметку

-/site/index.bml.userlinks.fun.singles=Служба знакомств
-
/site/index.bml.userlinks.fun.song=Песня о ЖЖ

/site/index.bml.userlinks.header=Ссылки для пользователей
@@ -17988,12 +17986,6 @@

crumb.shopitem=Товар из Магазина

-crumb.singles=Одиночки Живого Журнала
-
-crumb.singlesopts=Изменить доступность
-
-crumb.singlessearch=Поиск своей половинки
-
crumb.sitemap=Карта сайта

crumb.siteopts=Настройки сайта

Modified: trunk/bin/upgrading/sv.dat
===================================================================
--- trunk/bin/upgrading/sv.dat 2011-03-30 10:59:37 UTC (rev 10329)
+++ trunk/bin/upgrading/sv.dat 2011-03-30 12:36:30 UTC (rev 10330)
@@ -5289,8 +5289,6 @@

crumb.shop=Presentaffär

-crumb.singlessearch=Söka singles
-
crumb.sitemap=Sajtkarta

crumb.siteopts=Bläddringsinställningar

Modified: trunk/bin/upgrading/uk.dat
===================================================================
--- trunk/bin/upgrading/uk.dat 2011-03-30 10:59:37 UTC (rev 10329)
+++ trunk/bin/upgrading/uk.dat 2011-03-30 12:36:30 UTC (rev 10330)
@@ -13344,8 +13344,6 @@

/site/index.bml.userlinks.fun.meme=Вузлик на пам'ять

-/site/index.bml.userlinks.fun.singles=Служба знайомств
-
/site/index.bml.userlinks.fun.song=Пісня про … [[sitename]]!

/site/index.bml.userlinks.header=Посилання для користувачів
@@ -18252,12 +18250,6 @@

crumb.shopitem=Окремий товар

-crumb.singles=Знайомства на LiveJournal
-
-crumb.singlesopts=Змінити доступність
-
-crumb.singlessearch=Шукати знайомства
-
crumb.sitemap=Мапа сайту

crumb.siteopts=Параметри перегляду

Modified: trunk/cgi-bin/crumbs-local.pl
===================================================================
--- trunk/cgi-bin/crumbs-local.pl 2011-03-30 10:59:37 UTC (rev 10329)
+++ trunk/cgi-bin/crumbs-local.pl 2011-03-30 12:36:30 UTC (rev 10330)
@@ -52,9 +52,6 @@
'securelogin' => ['Login', '/login.bml', 'ljhome'],
'securemanage' => ['Manage Accounts', "$LJ::SITEROOT/manage/", 'ljhome'],
'securepaidstatus' => ['Account Status', "$LJ::SITEROOT/manage/payments", 'securemanage'],
- 'singles' => ['LiveJournal Singles', '/singles/', 'home'],
- 'singlesopts' => ['Modify Availability', '/singles/mod.bml', 'singles'],
- 'singlessearch' => ['Search for Singles', '/singles/search.bml', 'singles'],
'sitemap' => ['Site Map', '/site/', 'home'],
'sizechart' => ['Sizing Chart', '/shop/sizechart.bml', 'shop'],
'sponsordetails' => ['Details', '', 'choosesponsor'],

Modified: trunk/htdocs/error-page.bml
===================================================================
--- trunk/htdocs/error-page.bml 2011-03-30 10:59:37 UTC (rev 10329)
+++ trunk/htdocs/error-page.bml 2011-03-30 12:36:30 UTC (rev 10330)
@@ -19,6 +19,8 @@
## private => private (just me)
## members => only for community members

+BML::set_language_scope('/error-page.bml');
+
my $main_req = LJ::Request->prev();
die "INITIAL" if LJ::Request->is_initial_req();

@@ -133,6 +135,13 @@
#push @links, LJ::Lang::ml('.errorpage.private.link.lastentries', { aopts => "href='".$user->journal_base."'" }) if $user;
push @links, LJ::Lang::ml('.errorpage.not_found.link.site_map', { aopts => "href='$LJ::SITEROOT/site/'" });
$ad_html = LJ::get_ads( { location => 'error_page.private', journalu => $remote } );
+} elsif ( $error_type eq 'discontinued' ) {
+ $frank_img = "/frank-404.png";
+ $title = LJ::Lang::ml('.errorpage.discontinued.title');
+ $description = LJ::Lang::ml('.errorpage.discontinued.description');
+ push @links, LJ::Lang::ml('.errorpage.link.go_home', { aopts => "href='$LJ::SITEROOT'" });
+ push @links, LJ::Lang::ml('.errorpage.not_found.link.faq', { aopts => "href='$LJ::SITEROOT/support/faq.bml'" });
+ push @links, LJ::Lang::ml('.errorpage.not_found.link.site_map', { aopts => "href='$LJ::SITEROOT/site/'" });
} else {
$frank_img = "/frank-404.png";
$title = LJ::Lang::ml('.errorpage.unhandled.title');

Modified: trunk/htdocs/error-page.bml.text
===================================================================
--- trunk/htdocs/error-page.bml.text 2011-03-30 10:59:37 UTC (rev 10329)
+++ trunk/htdocs/error-page.bml.text 2011-03-30 12:36:30 UTC (rev 10330)
@@ -1,69 +1,72 @@
+.errorpage.advanced_search.button=Search
+
.errorpage.advanced_search.label=Advanced Search

-.errorpage.advanced_search.button=Search
+.errorpage.baduser.description=The username [[username]] is not currently registered.

-.errorpage.not_found.title=The page was not found
+.errorpage.baduser.link.faq=FAQ

-.errorpage.not_found.description=You may have followed a broken link or typed the address incorrectly. Some page addresses are case sensitive.
+.errorpage.baduser.title=Unknown User

-.errorpage.unhandled.title=Unhandled error
+.errorpage.deleted.description.alien=This journal has been deleted. After period of 30 days from the deletion time all content of your journal will be deleted from LiveJournal server. If you're interested in renaming your account to this username, set up your notifications to be notified when the account is purged

-.errorpage.unhandled.description=Unhandled error description
+.errorpage.deleted.description.owner=Your journal has been deleted. You have a period of [[ndays]] days to undelete the journal. After this time all content of your journal will be deleted from LiveJournal server.

-.errorpage.links=Use links for more options:
+.errorpage.deleted.link.faq=Learn about deleting account.

-.errorpage.link.go_home=Go home
+.errorpage.deleted.title=Deleted Account

-.errorpage.not_found.link.faq=FAQ
+.errorpage.discontinued.description=We've discontinued this service due to lack of use. We're sorry for the inconvenience.

-.errorpage.not_found.link.site_map=Site map
+.errorpage.discontinued.title=Service discontinued

-.errorpage.not_found.link.lj_status=Also you can check LiveJournal's current status
+.errorpage.expunged.description=This journal has been deleted and purged. You can rename your account with this username.

-.errorpage.baduser.title=Unknown User
+.errorpage.expunged.link.faq=Learn about permanent deletion journal.

-.errorpage.baduser.description=The username [[username]] is not currently registered.
+.errorpage.expunged.title=Purged Account

-.errorpage.baduser.link.faq=FAQ
+.errorpage.link.go_home=Go home

-.errorpage.not_found.link.site_map=Site map
+.errorpage.links=Use links for more options:

-.errorpage.recent_entries=Recent Entries of this journal
+.errorpage.not_found.description=You may have followed a broken link or typed the address incorrectly. Some page addresses are case sensitive.

-.errorpage.suspended.title=Suspended Journal
+.errorpage.not_found.link.faq=FAQ

-.errorpage.suspended.description.owner=Your journal has been suspended, all posts of this journal are not available for reading.
+.errorpage.not_found.link.lj_status=Also you can check LiveJournal's current status

-.errorpage.suspended.description.alien=This journal has been suspended, all posts of this journal are not available for reading. For confidentiality reasons we can not discuss the reasons for which the account was frozen, with someone else other than the account holder.
+.errorpage.not_found.link.site_map=Site map

-.errorpage.suspend.link.faq=Learn about suspended journals
+.errorpage.not_found.link.site_map=Site map

-.errorpage.suspended_post.title=Suspended Entry
+.errorpage.not_found.title=The page was not found

-.errorpage.suspended_post.description.alien=This entry has been suspended and not available for reading. For confidentiality reasons we can not discuss the reasons for which the entry was frozen, with someone else other than the account holder.
+.errorpage.private.description=You have ho access to this entry.

-.errorpage.suspend_post.link.faq=Learn about suspended journals
+.errorpage.private.link.faq=Learn about Security entries

-.errorpage.deleted.title=Deleted Account
+.errorpage.private.link.lastentries=Read resent entries

-.errorpage.deleted.description.owner=Your journal has been deleted. You have a period of [[ndays]] days to undelete the journal. After this time all content of your journal will be deleted from LiveJournal server.
+.errorpage.private.title=Access is closed!

-.errorpage.deleted.description.alien=This journal has been deleted. After period of 30 days from the deletion time all content of your journal will be deleted from LiveJournal server. If you're interested in renaming your account to this username, set up your notifications to be notified when the account is purged
+.errorpage.recent_entries=Recent Entries of this journal

-.errorpage.deleted.link.faq=Learn about deleting account.
+.errorpage.suspended.description.alien=This journal has been suspended, all posts of this journal are not available for reading. For confidentiality reasons we can not discuss the reasons for which the account was frozen, with someone else other than the account holder.

-.errorpage.expunged.title=Purged Account
+.errorpage.suspended.description.owner=Your journal has been suspended, all posts of this journal are not available for reading.

-.errorpage.expunged.description=This journal has been deleted and purged. You can rename your account with this username.
+.errorpage.suspended_post.description.alien=This entry has been suspended and not available for reading. For confidentiality reasons we can not discuss the reasons for which the entry was frozen, with someone else other than the account holder.

-.errorpage.expunged.link.faq=Learn about permanent deletion journal.
+.errorpage.suspended_post.title=Suspended Entry

-.errorpage.private.title=Access is closed!
+.errorpage.suspended.title=Suspended Journal

-.errorpage.private.description=You have ho access to this entry.
+.errorpage.suspend.link.faq=Learn about suspended journals

-.errorpage.private.link.faq=Learn about Security entries
+.errorpage.suspend_post.link.faq=Learn about suspended journals

-.errorpage.private.link.lastentries=Read resent entries
+.errorpage.unhandled.description=Unhandled error description

+.errorpage.unhandled.title=Unhandled error

Modified: trunk/htdocs/singles/index.bml
===================================================================
--- trunk/htdocs/singles/index.bml 2011-03-30 10:59:37 UTC (rev 10329)
+++ trunk/htdocs/singles/index.bml 2011-03-30 12:36:30 UTC (rev 10330)
@@ -1,34 +1,9 @@
-LiveJournal Singles
-body<=
+
-
+LJ::Request->pnotes( 'error' => 'discontinued' );
+LJ::Request->pnotes( 'remote' => LJ::get_remote() );
+BML::return_error_status(404);

-
-selectrow_array("SELECT statval FROM stats WHERE statcat='singles' AND statkey='total'")+0;
-} _code?> single people looking for love!
-standout?>
-
-
-<=items
-itemsb<=
-
-<=itemsb
-choices?>
-
-
-
-
-<=body
-page?>
+_code?>

Deleted: trunk/htdocs/singles/mod.bml
===================================================================
--- trunk/htdocs/singles/mod.bml 2011-03-30 10:59:37 UTC (rev 10329)
+++ trunk/htdocs/singles/mod.bml 2011-03-30 12:36:30 UTC (rev 10330)
@@ -1,129 +0,0 @@
-Your Availability
-body<=
-
-
-
-
-login to proceed. p?>";
- }
-
- LJ::load_user_props($u, "single_status", "single_pickw", "city", "country", "state");
-
- my %countries;
- my %states;
- LJ::load_codes({ "country" => \%countries, "state" => \%states });
-
- my $ret;
-
- # save mode:
- if (LJ::did_post())
- {
- unless ($POST{'status'}) {
- $u->clear_prop('single_status');
- return "Saved. You won't show up as available.";
- }
-
- if ($POST{'country'} eq "US" && length($POST{'state'}) > 2) {
- foreach (keys %states) {
- $POST{'state'} = $_
- if (lc($states{$_}) eq $POST{'state'});
- }
- }
-
- # clean/verify
- $POST{'age'} += 0;
- return "You need to provide an age." unless
- $POST{'age'};
- return "Sorry, you're too young to use this service." unless
- $POST{'age'} >= 18;
- return $ML{'Error'} unless ($POST{'status'} =~ /^[MF][MF]$/);
-
- $u->set_prop( { 'single_status' => join( "|", map { $POST{$_} }
- qw( status country
- state city age ) ),
- 'single_pickw' => $POST{'single_pickw'}, });
-
- $ret .= "Saved. Now, go search for somebody!";
- return $ret;
- }
-
- $ret .= "";
- return $ret;
-}
-_code?>
-
-<=body
-page?>

Deleted: trunk/htdocs/singles/search.bml
===================================================================
--- trunk/htdocs/singles/search.bml 2011-03-30 10:59:37 UTC (rev 10329)
+++ trunk/htdocs/singles/search.bml 2011-03-30 12:36:30 UTC (rev 10330)
@@ -1,215 +0,0 @@
-Search Singles
-body<=
-
-
-
-
- \%countries, "state" => \%states });
-
- # query page.
- unless ($GET{'status'})
- {
- my ($status, $country, $state, $city, $age);
- if ($remote) {
- LJ::load_user_props($remote, "single_status", "single_pickw", "city", "country", "state");
- ($status, $country, $state, $city, $age) = split(/\|/, $remote->{'single_status'});
- $country ||= $remote->{'country'};
- $state ||= $remote->{'state'};
- $city ||= $remote->{'city'};
- if (! $age && $remote->{'bdate'} =~ /^(\d\d\d\d)-(\d\d)-(\d\d)$/ && $3) {
- $age = int($dbr->selectrow_array("SELECT (unix_timestamp()-unix_timestamp('$remote->{'bdate'}'))/(60*60*24*365)"));
- $age = "" unless $age;
- }
- }
-
- $ret .= "";
- return $ret;
- }
-
- # verify/clean search data.
- if ($GET{'country'} eq "US" && length($GET{'state'}) > 2) {
- foreach (keys %states) {
- $GET{'state'} = $_
- if (lc($states{$_}) eq $GET{'state'});
- }
- }
-
- return LJ::bad_input("Must enter min and max ages")
- unless ($GET{'age1'} && $GET{'age2'});
- return LJ::bad_input("LiveJournal Singles is for users 18 years of age and older.")
- unless ($GET{'age1'} >= 18 && $GET{'age2'} >= 18);
-
- my $revstatus = {
- 'MF' => 'FM',
- 'FM' => 'MF',
- 'MM' => 'MM',
- 'FF' => 'FF',
- }->{$GET{'status'}};
-
- my $prefix = join("|", $revstatus, map { $GET{$_} } qw(country state city));
- my $propid = $dbr->selectrow_array("SELECT upropid FROM userproplist WHERE name='single_status'");
- return "Missing db lookup info" unless $propid;
- my $matches = $dbr->selectcol_arrayref("SELECT userid FROM userprop WHERE upropid=$propid ".
- "AND value BETWEEN ? AND ? LIMIT 5000", undef,
- "$prefix|$GET{'age1'}", "$prefix|$GET{'age2'}");
- unless ($matches && @$matches) {
- return "";
- }
-
- my %page = BML::paging($matches, $GET{'page'}, 100);
- $ret .= "
<< New Search";
- $ret .= "Page $page{'page'} of $page{'pages'} $page{'nextlink'} standout?>";
-
- my @userids = @{$page{'items'}}; # who's on this page.
- my $userid_in = join(",", @userids);
- my %user; # info on those people
- my $sth;
-
- # pics to load
- my %userpic;
-
- # base info.
- %user = %{ LJ::load_userids(@userids) || {} };
- foreach my $userid (keys %user) {
- $userpic{$user{$userid}->{'defaultpicid'}} = undef
- if $user{$userid}->{'defaultpicid'};
- }
-
- unless (%user) {
- return "";
- }
-
- # get ages of just this page
- $sth = $dbr->prepare("SELECT userid, value FROM userprop WHERE upropid=$propid ".
- "AND userid IN ($userid_in)");
- $sth->execute;
- while (my ($id, $val) = $sth->fetchrow_array) {
- next unless $val =~ /\|(\d+)$/;
- next unless $user{$id};
- $user{$id}->{'age'} = $1;
- }
-
- # preferred pictures?
- $propid = $dbr->selectrow_array("SELECT upropid FROM userproplist WHERE name='single_pickw'");
- return "Missing db lookup info" unless $propid;
- $sth = $dbr->prepare(qq{
- SELECT m.userid, m.picid FROM
- userpicmap m,
- userproplite u,
- keywords k
- WHERE
- u.userid IN ($userid_in) AND upropid=$propid AND
- u.value=k.keyword AND u.userid=m.userid AND m.kwid=k.kwid
- });
- $sth->execute;
- my @userpic_load;
- while (my ($userid, $picid) = $sth->fetchrow_array) {
- next unless $user{$userid};
- delete $userpic{$user{$userid}->{'defaultpicid'}};
- $user{$userid}->{'defaultpicid'} = $picid;
- $userpic{$picid} = undef;
- push @userpic_load, [ $user{$userid}, $picid ];
- }
-
- # load pictures
- LJ::load_userpics(\%userpic, \@userpic_load);
-
- my $with_pics = $GET{'mode'} eq "pics" && LJ::get_cap($remote, "paid");
- if ($with_pics) {
- $ret .= "\n";
- } else {
- $ret .= "
    ";
    - }
    -
    - foreach my $userid (@userids) {
    - my $u = $user{$userid};
    - next unless $u;
    - if ($with_pics) {
    - $ret .= "";
    - if ($u->{'defaultpicid'}) {
    - my $id = $u->{'defaultpicid'};
    - $ret .= "
    ";
    - }
    - $ret .= "" . LJ::ljuser($u) . ", $u->{'age'} - " . LJ::ehtml($u->{'name'}) . "";
    - } else {
    - $ret .= "
  • " . LJ::ljuser($u) . ", $u->{'age'} - " . LJ::ehtml($u->{'name'}) . "";
    - }
    - }
    -
    - if ($with_pics) {
    - $ret .= "\n";
    - } else {
    - $ret .= "
";
- }
-
- return $ret;
-
-}
-_code?>
-
-<=body
-page?>

dat, text, bml, ljcom, andy, pl

Previous post Next post
Up