Diff for /db/prgsrc/drupal/modules/chgk_db/classes/DbField.class.php between versions 1.1 and 1.3

version 1.1, 2010/02/28 20:17:33 version 1.3, 2010/03/09 21:08:33
Line 4  require_once(dirname(__FILE__)."/DbField Line 4  require_once(dirname(__FILE__)."/DbField
   
 class DbField {  class DbField {
   private $field;    private $field;
   private $value;     protected $value; 
   private $number;    private $number;
   private $html;    private $html;
   public function __construct($field, $value, $number = false) {    public function __construct($field, $value, $number = false) {
Line 25  class DbField { Line 25  class DbField {
   }    }
       
   public function formatHtml() {    public function formatHtml() {
       $this->html = preg_replace('/\[Раздаточный материал:(.*?)\]\s*\n/sm',
           "<div class=\"razdatka\"><div class=\"razdatka_header\">Раздаточный материал</div> \\1</div>\n",
            $this->html  );
       $this->html = preg_replace('/^\s*<раздатка>(.*?)<\/раздатка>/sm',
           "<div class=\"razdatka\"><div class=\"razdatka_header\">Раздаточный материал</div> \\1</div>\n",
            $this->html  );
   
     $this->html = preg_replace('/^\s+/m', "<br>\n&nbsp;&nbsp;&nbsp;&nbsp;", $this->html);        $this->html = preg_replace('/^\s+/m', "<br>\n&nbsp;&nbsp;&nbsp;&nbsp;", $this->html);  
   
     if (!preg_match('/^\|/m')) {      if (!preg_match('/^\|/m',$this->html)) {
       $this->html = preg_replace('/\s+\&#0150/m','&nbsp;\&#0150', $this->html);        $this->html = preg_replace('/\s+\&#0150/m','&nbsp;\&#0150', $this->html);
     }      } 
       
     $this->html = preg_replace('/\(pic: ([^\)]*)\)/','<p><img src="/images/db/$1"></p>', $this->html);      $this->html = preg_replace('/\(pic: ([^\)]*)\)/','<p><img src="/images/db/$1"></p>', $this->html);
           
       
   }    }
       
   public function getName() {    public function getName() {
Line 46  class DbField { Line 51  class DbField {
   
   public function isEmpty() {    public function isEmpty() {
     return $this->value === NULL || $this->value==='';      return $this->value === NULL || $this->value==='';
   }      } 
     
     public function getValue() {
       return $this->value;
     }
 }  }

Removed from v.1.1  
changed lines
  Added in v.1.3


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>