Skip to content
This repository has been archived by the owner on Sep 25, 2019. It is now read-only.

Commit

Permalink
Fix issue eschnou#74 - Name can contain spaces when commenting
Browse files Browse the repository at this point in the history
  • Loading branch information
eschnou committed Aug 12, 2010
1 parent 3bcb22c commit 2e4ce84
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -131,7 +131,7 @@ public function addAction() {

// Validate the website URL
$matches = array();
if (!preg_match_all("/^http/", $website, $matches)) {
if ($website && !preg_match_all("/^http/", $website, $matches)) {
$website = "http://$website";
}

Expand Down Expand Up @@ -212,7 +212,7 @@ private function getForm($source_id=0, $item_id=0) {
// Create and configure username element:
$name = $form->createElement('text', 'name', array('label' => 'Name:', 'decorators' => $form->elementDecorators));
$name->addFilter('StringToLower');
$name->addValidator('alnum');
$name->addFilter('StripTags');
$name->addValidator('stringLength', false, array(4, 20));
$name->setRequired(true);

Expand Down

0 comments on commit 2e4ce84

Please sign in to comment.