September 13th, 2003

A small thing about the login page

I hope I am posting in the correct place, and sorry if that's not the case.

I have noticed that when you log in through, and get logged on, the message that appears says:

"To log in to, enter your username and password below. New Users: To create an account, go here."

While you are already logged on, and there is obviously no place to put your username and password below.

I have checked the code of this page from the CVS, and I believe that it is due to this part:

$body .= "<?h1 $ML{'.login.head'} h1?>";
$body .= "<?p " . BML::ml(".login.text1", {'sitename' => $LJ::SITENAME}) . "
$body .= "<?p $ML{'.login.text2'} p?>\n";

Which should be something like:

$body .= "<?h1 $ML{'.login.head'} h1?>";
if ($remote) {
$body .= "<?p " . BML::ml(".login.text3", {'sitename' => $LJ::SITENAME}) . "
} else {
$body .= "<?p " . BML::ml(".login.text1", {'sitename' => $LJ::SITENAME}) . "
$body .= "<?p $ML{'.login.text2'} p?>\n";

Where text3 would contain a welcome message to LiveJournal.

I have never dealt with bml or perl, so I hope this isn't very far from the correct form.

S1 style browser problem

S1 style browser now displays all styles, even if they aren't public. This appears to be as a result of clusterization of the "style" table.

However, I have no idea what the s1style table looks like, and don't know if it contains the is_public information that the style table does.

Can anyone confirm or deny whether this table contains the is_public stuff that style did? If it did, I'd assume the query in would have to change to look something like this:

Collapse )

In any case, the "old, global table" part of this code should be updated to reflect the older query. For more information, the problem was caused by the change in the style browser:

As you can see,
my $sth = $dbr->prepare("SELECT styleid, user, styledes, type, is_embedded, is_colorfree FROM style WHERE is_public='Y' AND user=? ORDER BY type DESC,styledes");

was changed to

$styles = LJ::S1::get_user_styles($user);, which doesn't do the neccesary public check.

Suggestions are appreciated.
  • Current Music
    Final Fantasy VII Piano Collection - Holding Thoughts In My .mp3