Skip to content
Permalink
Browse files

Update plans.class.php

Plans fixes
  • Loading branch information...
sergejey committed Mar 10, 2019
1 parent dd41a67 commit c99745c70316440e1599b7b2b69c30296378fef5
Showing with 3 additions and 3 deletions.
  1. +3 −3 modules/plans/plans.class.php
@@ -190,7 +190,7 @@ function usual(&$out)
}
*/
if (gr('id','int')) {
if (!$this->id && gr('id','int')) {
$this->id=gr('id','int');
}
if ($this->id) {
@@ -226,7 +226,7 @@ function edit_plans(&$out, $id)
function getPreview($id) {
$out = array();
$rec=SQLSelectOne("SELECT * FROM plans WHERE ID=".(int)$id);
$states = SQLSelect("SELECT * FROM plan_states WHERE PLAN_ID=".$rec['ID']);
$states = SQLSelect("SELECT * FROM plan_states WHERE PLAN_ID=".(int)$rec['ID']);
foreach($states as &$state) {
$this->processState($state);
$state['CAN_BE_CLICKED']=1;
@@ -422,7 +422,7 @@ function getCSSClasses($plan_id) {
$classes[]=array('CLASS'=>'fadeout10','TITLE'=>LANG_STYLE_FADEOUT10);
if ($plan_rec['CUSTOM_CSS']!='') {
if (preg_match_all('/\.([^\s{\n\.]+)/is',$plan_rec['CUSTOM_CSS'],$m)) {
if (preg_match_all('/\.([^\s{\n\.]+)\s+{/is',$plan_rec['CUSTOM_CSS'],$m)) {
foreach($m[1] as $class) {
$classes[]=array('CLASS'=>$class,'TITLE'=>'CSS: '.$class);
}

0 comments on commit c99745c

Please sign in to comment.
You can’t perform that action at this time.