Dotclear

Changeset 2596:62f32566c15f for inc


Ignore:
Timestamp:
12/02/13 15:27:54 (12 years ago)
Author:
franck <carnet.franck.paul@…>
Branch:
default
Message:

Check all required fields in blog creation, removes unnecessary notice, fixes #1616

File:
1 edited

Legend:

Unmodified
Added
Removed
  • inc/core/class.dc.core.php

    r2595 r2596  
    989989     private function getBlogCursor($cur) 
    990990     { 
    991           if ($cur->blog_id !== null 
    992           && !preg_match('/^[A-Za-z0-9._-]{2,}$/',$cur->blog_id)) { 
     991          if (($cur->blog_id !== null 
     992               && !preg_match('/^[A-Za-z0-9._-]{2,}$/',$cur->blog_id)) || 
     993               (!$cur->blog_id)) { 
    993994               throw new Exception(__('Blog ID must contain at least 2 characters using letters, numbers or symbols.')); 
    994995          } 
    995996 
    996           if ($cur->blog_name !== null && $cur->blog_name == '') { 
     997          if (($cur->blog_name !== null && $cur->blog_name == '') || 
     998               (!$cur->blog_name)) { 
    997999               throw new Exception(__('No blog name')); 
    9981000          } 
    9991001 
    1000           if ($cur->blog_url !== null && $cur->blog_url == '') { 
     1002          if (($cur->blog_url !== null && $cur->blog_url == '') || 
     1003               (!$cur->blog_url)) { 
    10011004               throw new Exception(__('No blog URL')); 
    10021005          } 
Note: See TracChangeset for help on using the changeset viewer.

Sites map