Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added memory usuage check to monit config files for background jobs

Added _html fields for article table
Add migration script for changes to article table
  • Loading branch information...
commit 9a78b184d2764461122aad75c0cf5f7ed1fbf10f 1 parent 476f9f2
@sanjeevan authored
View
3  apps/frontend/modules/article/templates/_article.php
@@ -97,8 +97,7 @@
<?php endif; ?>
<?php if ($a->getFlavour() == 'question'): ?>
- <?php $question_text = truncate_text($a->getQuestion(), 250); ?>
- <div class="question-body"><?php echo myUtil::markdown($question_text); ?></div>
+ <div class="question-body"><?php echo $a->getQuestionHtml(); ?></div>
<?php endif; ?>
</div>
View
6 apps/frontend/modules/article/templates/_show_code.php
@@ -20,6 +20,12 @@
<div class="clear"></div>
</div>
+<div class="summary">
+ <?php if (strlen($article->getSummary()) > 0): ?>
+ <?php echo $article->getSummaryHtml(); ?>
+ <?php endif; ?>
+</div>
+
<pre class="brush: <?php echo $article->getBrushAlias(); ?>">
<?php echo htmlspecialchars($article->getCode()); ?>
</pre>
View
2  apps/frontend/modules/article/templates/_show_link.php
@@ -24,7 +24,7 @@
<div class="summary">
<?php if (strlen($article->getSummary()) > 0): ?>
- <?php echo myUtil::markdown($article->getSummary()); ?>
+ <?php echo $article->getSummaryHtml(); ?>
<?php endif; ?>
</div>
View
2  apps/frontend/modules/article/templates/_show_question.php
@@ -20,4 +20,4 @@
<div class="clear"></div>
</div>
-<?php echo myUtil::markdown($article->getQuestion()); ?>
+<?php echo $article->getQuestionHtml(); ?>
View
2  apps/frontend/modules/article/templates/_show_snapshot.php
@@ -22,6 +22,6 @@
<img class="snapshot" src="<?php echo $snapshot->getUrl(); ?>" />
-<p class="snapshot-summary"><?php echo $article->getSummary(); ?></p>
+<p class="snapshot-summary"><?php echo $article->getSummaryHtml(); ?></p>
<div class="clear"></div>
View
2  apps/frontend/modules/invite/templates/_promo.php
@@ -1,6 +1,6 @@
<div id="invite-only">
<span>
- <?php echo sfConfig::get('app_name'); ?> is currently invite only, if you want an account then <?php echo link_to('get on our waiting list', 'invite/request')?>
+ If you want to post new links, code, snapshots or ask a questions then <?php echo link_to('grab an invite here', 'invite/request'); ?>
</span>
<span style="float: right;"><a href="#" onclick="$.get('<?php echo url_for('invite/hidePromo'); ?>'); $('div#invite-only').hide(); return false; ">close</a></span>
View
16 batch/update-article-html.php
@@ -0,0 +1,16 @@
+<?php
+
+require_once(dirname(__FILE__).'/../config/ProjectConfiguration.class.php');
+$configuration = ProjectConfiguration::getApplicationConfiguration('frontend', 'dev', true);
+sfContext::createInstance($configuration);
+
+$articles = Doctrine::getTable('Article')->findAll();
+
+foreach ($articles as $article){
+ $article->setSummaryHtml(myUtil::markdown($article->getSummary()));
+ $article->setQuestionHtml(myUtil::markdown($article->getQuestion()));
+ $article->setFulldescriptionHtml(myUtil::markdown($article->getFulldescription()));
+ $article->save();
+}
+
+echo "Updated article html fields \n";
View
3  config/doctrine/schema.yml
@@ -24,6 +24,9 @@ Article:
has_thumbnails: { type: boolean, default: 0 }
flavour: { type: enum, values: [link, code, question, snapshot], default: link}
published: { type: boolean, default: 0 }
+ summary_html: string
+ fulldescription_html: string
+ question_html: string
relations:
User:
local: user_id
View
1  jobs/cache-update.monitrc 100644 → 100755
@@ -1,3 +1,4 @@
check process cache_update1 with pidfile /var/www/codelovely/jobs/run/cache-update-worker1.pid
start = "/var/www/codelovely/jobs/cache-update.php start worker1"
stop = "/var/www/codelovely/jobs/cache-update.php stop worker1"
+ if totalmemory > 300 MB then restart
View
1  jobs/send-email.monitrc 100644 → 100755
@@ -1,3 +1,4 @@
check process send_send1 with pidfile /var/www/codelovely/jobs/run/send-email-worker1.pid
start = "/var/www/codelovely/jobs/send-email.php start worker1"
stop = "/var/www/codelovely/jobs/send-email.php stop worker1"
+ if totalmemory > 150 MB then restart
View
1  jobs/thumbnails-scraper.monitrc 100644 → 100755
@@ -1,3 +1,4 @@
check process thumbnails_scraper1 with pidfile /var/www/codelovely/jobs/run/thumbnails-scraper-worker1.pid
start = "/var/www/codelovely/jobs/thumbnails-scraper.php start worker1"
stop = "/var/www/codelovely/jobs/thumbnails-scraper.php stop worker1"
+ if totalmemory > 200 MB then restart
View
113 lib/filter/doctrine/base/BaseArticleFormFilter.class.php
@@ -13,43 +13,49 @@
public function setup()
{
$this->setWidgets(array(
- 'user_id' => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('User'), 'add_empty' => true)),
- 'thing_id' => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('Thing'), 'add_empty' => true)),
- 'username' => new sfWidgetFormFilterInput(),
- 'title' => new sfWidgetFormFilterInput(),
- 'url' => new sfWidgetFormFilterInput(),
- 'summary' => new sfWidgetFormFilterInput(),
- 'fulldescription' => new sfWidgetFormFilterInput(),
- 'code' => new sfWidgetFormFilterInput(),
- 'code_language' => new sfWidgetFormFilterInput(),
- 'question' => new sfWidgetFormFilterInput(),
- 'total_comments' => new sfWidgetFormFilterInput(),
- 'has_thumbnails' => new sfWidgetFormChoice(array('choices' => array('' => 'yes or no', 1 => 'yes', 0 => 'no'))),
- 'flavour' => new sfWidgetFormChoice(array('choices' => array('' => '', 'link' => 'link', 'code' => 'code', 'question' => 'question', 'snapshot' => 'snapshot'))),
- 'published' => new sfWidgetFormChoice(array('choices' => array('' => 'yes or no', 1 => 'yes', 0 => 'no'))),
- 'created_at' => new sfWidgetFormFilterDate(array('from_date' => new sfWidgetFormDate(), 'to_date' => new sfWidgetFormDate(), 'with_empty' => false)),
- 'updated_at' => new sfWidgetFormFilterDate(array('from_date' => new sfWidgetFormDate(), 'to_date' => new sfWidgetFormDate(), 'with_empty' => false)),
- 'slug' => new sfWidgetFormFilterInput(),
+ 'user_id' => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('User'), 'add_empty' => true)),
+ 'thing_id' => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('Thing'), 'add_empty' => true)),
+ 'username' => new sfWidgetFormFilterInput(),
+ 'title' => new sfWidgetFormFilterInput(),
+ 'url' => new sfWidgetFormFilterInput(),
+ 'summary' => new sfWidgetFormFilterInput(),
+ 'fulldescription' => new sfWidgetFormFilterInput(),
+ 'code' => new sfWidgetFormFilterInput(),
+ 'code_language' => new sfWidgetFormFilterInput(),
+ 'question' => new sfWidgetFormFilterInput(),
+ 'total_comments' => new sfWidgetFormFilterInput(),
+ 'has_thumbnails' => new sfWidgetFormChoice(array('choices' => array('' => 'yes or no', 1 => 'yes', 0 => 'no'))),
+ 'flavour' => new sfWidgetFormChoice(array('choices' => array('' => '', 'link' => 'link', 'code' => 'code', 'question' => 'question', 'snapshot' => 'snapshot'))),
+ 'published' => new sfWidgetFormChoice(array('choices' => array('' => 'yes or no', 1 => 'yes', 0 => 'no'))),
+ 'summary_html' => new sfWidgetFormFilterInput(),
+ 'fulldescription_html' => new sfWidgetFormFilterInput(),
+ 'question_html' => new sfWidgetFormFilterInput(),
+ 'created_at' => new sfWidgetFormFilterDate(array('from_date' => new sfWidgetFormDate(), 'to_date' => new sfWidgetFormDate(), 'with_empty' => false)),
+ 'updated_at' => new sfWidgetFormFilterDate(array('from_date' => new sfWidgetFormDate(), 'to_date' => new sfWidgetFormDate(), 'with_empty' => false)),
+ 'slug' => new sfWidgetFormFilterInput(),
));
$this->setValidators(array(
- 'user_id' => new sfValidatorDoctrineChoice(array('required' => false, 'model' => $this->getRelatedModelName('User'), 'column' => 'id')),
- 'thing_id' => new sfValidatorDoctrineChoice(array('required' => false, 'model' => $this->getRelatedModelName('Thing'), 'column' => 'id')),
- 'username' => new sfValidatorPass(array('required' => false)),
- 'title' => new sfValidatorPass(array('required' => false)),
- 'url' => new sfValidatorPass(array('required' => false)),
- 'summary' => new sfValidatorPass(array('required' => false)),
- 'fulldescription' => new sfValidatorPass(array('required' => false)),
- 'code' => new sfValidatorPass(array('required' => false)),
- 'code_language' => new sfValidatorPass(array('required' => false)),
- 'question' => new sfValidatorPass(array('required' => false)),
- 'total_comments' => new sfValidatorSchemaFilter('text', new sfValidatorInteger(array('required' => false))),
- 'has_thumbnails' => new sfValidatorChoice(array('required' => false, 'choices' => array('', 1, 0))),
- 'flavour' => new sfValidatorChoice(array('required' => false, 'choices' => array('link' => 'link', 'code' => 'code', 'question' => 'question', 'snapshot' => 'snapshot'))),
- 'published' => new sfValidatorChoice(array('required' => false, 'choices' => array('', 1, 0))),
- 'created_at' => new sfValidatorDateRange(array('required' => false, 'from_date' => new sfValidatorDateTime(array('required' => false, 'datetime_output' => 'Y-m-d 00:00:00')), 'to_date' => new sfValidatorDateTime(array('required' => false, 'datetime_output' => 'Y-m-d 23:59:59')))),
- 'updated_at' => new sfValidatorDateRange(array('required' => false, 'from_date' => new sfValidatorDateTime(array('required' => false, 'datetime_output' => 'Y-m-d 00:00:00')), 'to_date' => new sfValidatorDateTime(array('required' => false, 'datetime_output' => 'Y-m-d 23:59:59')))),
- 'slug' => new sfValidatorPass(array('required' => false)),
+ 'user_id' => new sfValidatorDoctrineChoice(array('required' => false, 'model' => $this->getRelatedModelName('User'), 'column' => 'id')),
+ 'thing_id' => new sfValidatorDoctrineChoice(array('required' => false, 'model' => $this->getRelatedModelName('Thing'), 'column' => 'id')),
+ 'username' => new sfValidatorPass(array('required' => false)),
+ 'title' => new sfValidatorPass(array('required' => false)),
+ 'url' => new sfValidatorPass(array('required' => false)),
+ 'summary' => new sfValidatorPass(array('required' => false)),
+ 'fulldescription' => new sfValidatorPass(array('required' => false)),
+ 'code' => new sfValidatorPass(array('required' => false)),
+ 'code_language' => new sfValidatorPass(array('required' => false)),
+ 'question' => new sfValidatorPass(array('required' => false)),
+ 'total_comments' => new sfValidatorSchemaFilter('text', new sfValidatorInteger(array('required' => false))),
+ 'has_thumbnails' => new sfValidatorChoice(array('required' => false, 'choices' => array('', 1, 0))),
+ 'flavour' => new sfValidatorChoice(array('required' => false, 'choices' => array('link' => 'link', 'code' => 'code', 'question' => 'question', 'snapshot' => 'snapshot'))),
+ 'published' => new sfValidatorChoice(array('required' => false, 'choices' => array('', 1, 0))),
+ 'summary_html' => new sfValidatorPass(array('required' => false)),
+ 'fulldescription_html' => new sfValidatorPass(array('required' => false)),
+ 'question_html' => new sfValidatorPass(array('required' => false)),
+ 'created_at' => new sfValidatorDateRange(array('required' => false, 'from_date' => new sfValidatorDateTime(array('required' => false, 'datetime_output' => 'Y-m-d 00:00:00')), 'to_date' => new sfValidatorDateTime(array('required' => false, 'datetime_output' => 'Y-m-d 23:59:59')))),
+ 'updated_at' => new sfValidatorDateRange(array('required' => false, 'from_date' => new sfValidatorDateTime(array('required' => false, 'datetime_output' => 'Y-m-d 00:00:00')), 'to_date' => new sfValidatorDateTime(array('required' => false, 'datetime_output' => 'Y-m-d 23:59:59')))),
+ 'slug' => new sfValidatorPass(array('required' => false)),
));
$this->widgetSchema->setNameFormat('article_filters[%s]');
@@ -69,24 +75,27 @@ public function getModelName()
public function getFields()
{
return array(
- 'id' => 'Number',
- 'user_id' => 'ForeignKey',
- 'thing_id' => 'ForeignKey',
- 'username' => 'Text',
- 'title' => 'Text',
- 'url' => 'Text',
- 'summary' => 'Text',
- 'fulldescription' => 'Text',
- 'code' => 'Text',
- 'code_language' => 'Text',
- 'question' => 'Text',
- 'total_comments' => 'Number',
- 'has_thumbnails' => 'Boolean',
- 'flavour' => 'Enum',
- 'published' => 'Boolean',
- 'created_at' => 'Date',
- 'updated_at' => 'Date',
- 'slug' => 'Text',
+ 'id' => 'Number',
+ 'user_id' => 'ForeignKey',
+ 'thing_id' => 'ForeignKey',
+ 'username' => 'Text',
+ 'title' => 'Text',
+ 'url' => 'Text',
+ 'summary' => 'Text',
+ 'fulldescription' => 'Text',
+ 'code' => 'Text',
+ 'code_language' => 'Text',
+ 'question' => 'Text',
+ 'total_comments' => 'Number',
+ 'has_thumbnails' => 'Boolean',
+ 'flavour' => 'Enum',
+ 'published' => 'Boolean',
+ 'summary_html' => 'Text',
+ 'fulldescription_html' => 'Text',
+ 'question_html' => 'Text',
+ 'created_at' => 'Date',
+ 'updated_at' => 'Date',
+ 'slug' => 'Text',
);
}
}
View
1  lib/form/ArticleCodeForm.class.php
@@ -81,6 +81,7 @@ public function save(User $user = null, $article = null)
if (strlen($this->getValue('summary')) > 0){
$article->setSummary($this->getValue('summary'));
+ $article->setSummaryHtml(myUtil::markdown($this->getValue('summary')));
}
$article->setTitle($this->getValue('title'));
View
1  lib/form/ArticleLinkForm.class.php
@@ -74,6 +74,7 @@ public function save(User $user = null, $article = null)
if (strlen($this->getValue('summary')) > 0){
$article->setSummary($this->getValue('summary'));
+ $article->setSummaryHtml(myUtil::markdown($this->getValue('summary')));
}
$article->setFlavour('link');
View
1  lib/form/ArticleQuestionForm.class.php
@@ -47,6 +47,7 @@ public function save(User $user, $article = null)
$article->setUsername($user->getUsername());
$article->setTitle($this->getValue('title'));
$article->setQuestion($this->getValue('question'));
+ $article->setQuestionHtml(myUtil::markdown($this->getValue('question')));
$article->setFlavour('question');
$article->setHasThumbnails(false);
$article->save();
View
1  lib/form/ArticleSnapshotForm.class.php
@@ -101,6 +101,7 @@ public function save(User $user = null, $article = null)
if (strlen($this->getValue('summary')) > 0){
$article->setSummary($this->getValue('summary'));
+ $article->setSummaryHtml(myUtil::markdown($this->getValue('summary')));
}
$article->save();
View
78 lib/form/doctrine/base/BaseArticleForm.class.php
@@ -15,45 +15,51 @@
public function setup()
{
$this->setWidgets(array(
- 'id' => new sfWidgetFormInputHidden(),
- 'user_id' => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('User'), 'add_empty' => true)),
- 'thing_id' => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('Thing'), 'add_empty' => true)),
- 'username' => new sfWidgetFormInputText(),
- 'title' => new sfWidgetFormInputText(),
- 'url' => new sfWidgetFormInputText(),
- 'summary' => new sfWidgetFormTextarea(),
- 'fulldescription' => new sfWidgetFormTextarea(),
- 'code' => new sfWidgetFormTextarea(),
- 'code_language' => new sfWidgetFormInputText(),
- 'question' => new sfWidgetFormTextarea(),
- 'total_comments' => new sfWidgetFormInputText(),
- 'has_thumbnails' => new sfWidgetFormInputCheckbox(),
- 'flavour' => new sfWidgetFormChoice(array('choices' => array('link' => 'link', 'code' => 'code', 'question' => 'question', 'snapshot' => 'snapshot'))),
- 'published' => new sfWidgetFormInputCheckbox(),
- 'created_at' => new sfWidgetFormDateTime(),
- 'updated_at' => new sfWidgetFormDateTime(),
- 'slug' => new sfWidgetFormInputText(),
+ 'id' => new sfWidgetFormInputHidden(),
+ 'user_id' => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('User'), 'add_empty' => true)),
+ 'thing_id' => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('Thing'), 'add_empty' => true)),
+ 'username' => new sfWidgetFormInputText(),
+ 'title' => new sfWidgetFormInputText(),
+ 'url' => new sfWidgetFormInputText(),
+ 'summary' => new sfWidgetFormTextarea(),
+ 'fulldescription' => new sfWidgetFormTextarea(),
+ 'code' => new sfWidgetFormTextarea(),
+ 'code_language' => new sfWidgetFormInputText(),
+ 'question' => new sfWidgetFormTextarea(),
+ 'total_comments' => new sfWidgetFormInputText(),
+ 'has_thumbnails' => new sfWidgetFormInputCheckbox(),
+ 'flavour' => new sfWidgetFormChoice(array('choices' => array('link' => 'link', 'code' => 'code', 'question' => 'question', 'snapshot' => 'snapshot'))),
+ 'published' => new sfWidgetFormInputCheckbox(),
+ 'summary_html' => new sfWidgetFormTextarea(),
+ 'fulldescription_html' => new sfWidgetFormTextarea(),
+ 'question_html' => new sfWidgetFormTextarea(),
+ 'created_at' => new sfWidgetFormDateTime(),
+ 'updated_at' => new sfWidgetFormDateTime(),
+ 'slug' => new sfWidgetFormInputText(),
));
$this->setValidators(array(
- 'id' => new sfValidatorDoctrineChoice(array('model' => $this->getModelName(), 'column' => 'id', 'required' => false)),
- 'user_id' => new sfValidatorDoctrineChoice(array('model' => $this->getRelatedModelName('User'), 'required' => false)),
- 'thing_id' => new sfValidatorDoctrineChoice(array('model' => $this->getRelatedModelName('Thing'), 'required' => false)),
- 'username' => new sfValidatorString(array('max_length' => 255, 'required' => false)),
- 'title' => new sfValidatorString(array('max_length' => 255, 'required' => false)),
- 'url' => new sfValidatorString(array('max_length' => 255, 'required' => false)),
- 'summary' => new sfValidatorString(array('required' => false)),
- 'fulldescription' => new sfValidatorString(array('required' => false)),
- 'code' => new sfValidatorString(array('required' => false)),
- 'code_language' => new sfValidatorString(array('max_length' => 20, 'required' => false)),
- 'question' => new sfValidatorString(array('required' => false)),
- 'total_comments' => new sfValidatorInteger(array('required' => false)),
- 'has_thumbnails' => new sfValidatorBoolean(array('required' => false)),
- 'flavour' => new sfValidatorChoice(array('choices' => array(0 => 'link', 1 => 'code', 2 => 'question', 3 => 'snapshot'), 'required' => false)),
- 'published' => new sfValidatorBoolean(array('required' => false)),
- 'created_at' => new sfValidatorDateTime(),
- 'updated_at' => new sfValidatorDateTime(),
- 'slug' => new sfValidatorString(array('max_length' => 255, 'required' => false)),
+ 'id' => new sfValidatorDoctrineChoice(array('model' => $this->getModelName(), 'column' => 'id', 'required' => false)),
+ 'user_id' => new sfValidatorDoctrineChoice(array('model' => $this->getRelatedModelName('User'), 'required' => false)),
+ 'thing_id' => new sfValidatorDoctrineChoice(array('model' => $this->getRelatedModelName('Thing'), 'required' => false)),
+ 'username' => new sfValidatorString(array('max_length' => 255, 'required' => false)),
+ 'title' => new sfValidatorString(array('max_length' => 255, 'required' => false)),
+ 'url' => new sfValidatorString(array('max_length' => 255, 'required' => false)),
+ 'summary' => new sfValidatorString(array('required' => false)),
+ 'fulldescription' => new sfValidatorString(array('required' => false)),
+ 'code' => new sfValidatorString(array('required' => false)),
+ 'code_language' => new sfValidatorString(array('max_length' => 20, 'required' => false)),
+ 'question' => new sfValidatorString(array('required' => false)),
+ 'total_comments' => new sfValidatorInteger(array('required' => false)),
+ 'has_thumbnails' => new sfValidatorBoolean(array('required' => false)),
+ 'flavour' => new sfValidatorChoice(array('choices' => array(0 => 'link', 1 => 'code', 2 => 'question', 3 => 'snapshot'), 'required' => false)),
+ 'published' => new sfValidatorBoolean(array('required' => false)),
+ 'summary_html' => new sfValidatorString(array('required' => false)),
+ 'fulldescription_html' => new sfValidatorString(array('required' => false)),
+ 'question_html' => new sfValidatorString(array('required' => false)),
+ 'created_at' => new sfValidatorDateTime(),
+ 'updated_at' => new sfValidatorDateTime(),
+ 'slug' => new sfValidatorString(array('max_length' => 255, 'required' => false)),
));
$this->validatorSchema->setPostValidator(
View
22 lib/migration/doctrine/1_add_html_columns.php
@@ -0,0 +1,22 @@
+<?php
+/**
+ * Adds the _html fields to the article table
+ *
+ * This class has been auto-generated by the Doctrine ORM Framework
+ */
+class Version1 extends Doctrine_Migration_Base
+{
+ public function up()
+ {
+ $this->addColumn('article', 'summary_html', 'string', '', array());
+ $this->addColumn('article', 'fulldescription_html', 'string', '', array());
+ $this->addColumn('article', 'question_html', 'string', '', array());
+ }
+
+ public function down()
+ {
+ $this->removeColumn('article', 'summary_html');
+ $this->removeColumn('article', 'fulldescription_html');
+ $this->removeColumn('article', 'question_html');
+ }
+}
View
4 lib/model/doctrine/Article.class.php
@@ -154,8 +154,12 @@ public static function getSupportedCodeLanguages()
'Javscript' => array('brush' => 'shBrushJScript.js', 'alias' => 'js'),
'Perl' => array('brush' => 'shBrushPerl.js', 'alias' => 'perl'),
'Python' => array('brush' => 'shBrushPython.js', 'alias' => 'python'),
+ 'Text' => array('brush' => 'shBrushPlain.js', 'alias' => 'plain'),
+ 'XML' => array('brush' => 'shBrushXml.js', 'alias' => 'xml')
);
+ asort($languages);
+
return $languages;
}
View
94 lib/model/doctrine/base/BaseArticle.class.php
@@ -20,49 +20,58 @@
* @property boolean $has_thumbnails
* @property enum $flavour
* @property boolean $published
+ * @property string $summary_html
+ * @property string $fulldescription_html
+ * @property string $question_html
* @property User $User
* @property Thing $Thing
* @property Doctrine_Collection $Comments
* @property Doctrine_Collection $FileToArticle
*
- * @method integer getId() Returns the current record's "id" value
- * @method integer getUserId() Returns the current record's "user_id" value
- * @method integer getThingId() Returns the current record's "thing_id" value
- * @method string getUsername() Returns the current record's "username" value
- * @method string getTitle() Returns the current record's "title" value
- * @method string getUrl() Returns the current record's "url" value
- * @method string getSummary() Returns the current record's "summary" value
- * @method string getFulldescription() Returns the current record's "fulldescription" value
- * @method string getCode() Returns the current record's "code" value
- * @method string getCodeLanguage() Returns the current record's "code_language" value
- * @method string getQuestion() Returns the current record's "question" value
- * @method integer getTotalComments() Returns the current record's "total_comments" value
- * @method boolean getHasThumbnails() Returns the current record's "has_thumbnails" value
- * @method enum getFlavour() Returns the current record's "flavour" value
- * @method boolean getPublished() Returns the current record's "published" value
- * @method User getUser() Returns the current record's "User" value
- * @method Thing getThing() Returns the current record's "Thing" value
- * @method Doctrine_Collection getComments() Returns the current record's "Comments" collection
- * @method Doctrine_Collection getFileToArticle() Returns the current record's "FileToArticle" collection
- * @method Article setId() Sets the current record's "id" value
- * @method Article setUserId() Sets the current record's "user_id" value
- * @method Article setThingId() Sets the current record's "thing_id" value
- * @method Article setUsername() Sets the current record's "username" value
- * @method Article setTitle() Sets the current record's "title" value
- * @method Article setUrl() Sets the current record's "url" value
- * @method Article setSummary() Sets the current record's "summary" value
- * @method Article setFulldescription() Sets the current record's "fulldescription" value
- * @method Article setCode() Sets the current record's "code" value
- * @method Article setCodeLanguage() Sets the current record's "code_language" value
- * @method Article setQuestion() Sets the current record's "question" value
- * @method Article setTotalComments() Sets the current record's "total_comments" value
- * @method Article setHasThumbnails() Sets the current record's "has_thumbnails" value
- * @method Article setFlavour() Sets the current record's "flavour" value
- * @method Article setPublished() Sets the current record's "published" value
- * @method Article setUser() Sets the current record's "User" value
- * @method Article setThing() Sets the current record's "Thing" value
- * @method Article setComments() Sets the current record's "Comments" collection
- * @method Article setFileToArticle() Sets the current record's "FileToArticle" collection
+ * @method integer getId() Returns the current record's "id" value
+ * @method integer getUserId() Returns the current record's "user_id" value
+ * @method integer getThingId() Returns the current record's "thing_id" value
+ * @method string getUsername() Returns the current record's "username" value
+ * @method string getTitle() Returns the current record's "title" value
+ * @method string getUrl() Returns the current record's "url" value
+ * @method string getSummary() Returns the current record's "summary" value
+ * @method string getFulldescription() Returns the current record's "fulldescription" value
+ * @method string getCode() Returns the current record's "code" value
+ * @method string getCodeLanguage() Returns the current record's "code_language" value
+ * @method string getQuestion() Returns the current record's "question" value
+ * @method integer getTotalComments() Returns the current record's "total_comments" value
+ * @method boolean getHasThumbnails() Returns the current record's "has_thumbnails" value
+ * @method enum getFlavour() Returns the current record's "flavour" value
+ * @method boolean getPublished() Returns the current record's "published" value
+ * @method string getSummaryHtml() Returns the current record's "summary_html" value
+ * @method string getFulldescriptionHtml() Returns the current record's "fulldescription_html" value
+ * @method string getQuestionHtml() Returns the current record's "question_html" value
+ * @method User getUser() Returns the current record's "User" value
+ * @method Thing getThing() Returns the current record's "Thing" value
+ * @method Doctrine_Collection getComments() Returns the current record's "Comments" collection
+ * @method Doctrine_Collection getFileToArticle() Returns the current record's "FileToArticle" collection
+ * @method Article setId() Sets the current record's "id" value
+ * @method Article setUserId() Sets the current record's "user_id" value
+ * @method Article setThingId() Sets the current record's "thing_id" value
+ * @method Article setUsername() Sets the current record's "username" value
+ * @method Article setTitle() Sets the current record's "title" value
+ * @method Article setUrl() Sets the current record's "url" value
+ * @method Article setSummary() Sets the current record's "summary" value
+ * @method Article setFulldescription() Sets the current record's "fulldescription" value
+ * @method Article setCode() Sets the current record's "code" value
+ * @method Article setCodeLanguage() Sets the current record's "code_language" value
+ * @method Article setQuestion() Sets the current record's "question" value
+ * @method Article setTotalComments() Sets the current record's "total_comments" value
+ * @method Article setHasThumbnails() Sets the current record's "has_thumbnails" value
+ * @method Article setFlavour() Sets the current record's "flavour" value
+ * @method Article setPublished() Sets the current record's "published" value
+ * @method Article setSummaryHtml() Sets the current record's "summary_html" value
+ * @method Article setFulldescriptionHtml() Sets the current record's "fulldescription_html" value
+ * @method Article setQuestionHtml() Sets the current record's "question_html" value
+ * @method Article setUser() Sets the current record's "User" value
+ * @method Article setThing() Sets the current record's "Thing" value
+ * @method Article setComments() Sets the current record's "Comments" collection
+ * @method Article setFileToArticle() Sets the current record's "FileToArticle" collection
*
* @package socialhub
* @subpackage model
@@ -139,6 +148,15 @@ public function setTableDefinition()
'type' => 'boolean',
'default' => 0,
));
+ $this->hasColumn('summary_html', 'string', null, array(
+ 'type' => 'string',
+ ));
+ $this->hasColumn('fulldescription_html', 'string', null, array(
+ 'type' => 'string',
+ ));
+ $this->hasColumn('question_html', 'string', null, array(
+ 'type' => 'string',
+ ));
}
public function setUp()
Please sign in to comment.
Something went wrong with that request. Please try again.