function removeOldMyStellar()
{
    setMyStellar(getMyStellar()->currentTags);
}
Exemplo n.º 2
0
require_once $docRoot . "/mobi-config/mobi_web_constants.php";
require_once WEBROOT . "page_builder/page_header.php";
require_once LIBDIR . "StellarData.php";
require_once WEBROOT . "stellar/stellar_lib.php";

$class_id = $_REQUEST['id'];
$class = StellarData::get_subject_info($class_id);
$term = StellarData::get_term_text();
$term_id = StellarData::get_term();

$tabs = new Tabs(selfURL(), 'tab', array('News', 'Info', 'Staff'));

$back = $_REQUEST['back'];

/* My Stellar actions */
$mystellar = getMyStellar()->allTags;
$class_data = $class_id . " " . $term_id;

if(in_array($class_data, $mystellar)) { 
  $toggle = "ms_on";
  $mystellar_img = 'mystellar-on';
  $action = 'remove';
} elseif (!in_array($class_data, $mystellar)) {
  $toggle = "ms_off";
  $mystellar_img = 'mystellar-off';
  $action = 'add';
}

if($_REQUEST['action'] == 'add') {
  if (!in_array($class_data, $mystellar)) {
    $mystellar[] = $class_data;