function testSanitizeAction() { $this->assertEqual('view', Action::sanitizeAction('view')); $this->assertEqual('view', Action::sanitizeAction('')); $this->assertEqual('view', Action::sanitizeAction('blarg')); $this->assertEqual('edit', Action::sanitizeAction('EDIT')); }
function renderAsLink($action = 'view') { $action = Action::sanitizeAction($action); $link = '<a href="' . APP_ROOT_PATH . '/app_code/authoritative_plant.php?action=' . $action . '&authoritative_plant_id=' . $this->authoritative_plant_id . '">' . htmlentities($this->renderAsShortText()) . '</a>'; return $link; }
function renderAsLink($action = 'view') { $action = Action::sanitizeAction($action); $link = '<a href="' . APP_ROOT_PATH . '/app_code/notebook.php?action=' . $action . '¬ebook_id=' . $this->notebook_id . '">' . htmlentities($this->name) . '</a>'; return $link; }
function renderAsLink($action = 'view') { $action = Action::sanitizeAction($action); $this->cacheTermSetAndValues(); // $link = '<a href="'.APP_ROOT_PATH.'/app_code/metadata_structure.php?action='.$action.'&metadata_structure_id='.$this->metadata_structure_id.'">'.htmlentities($this->name).'</a>'; $link = '<a href="' . APP_ROOT_PATH . '/app_code/metadata_structure.php?action=' . $action . '&metadata_structure_id=' . $this->metadata_structure_id . '">' . $this->renderAsFullName() . ' <i class="' . ($this->flag_active ? 'icon-ok' : 'icon-ban-circle') . '"></i></a>'; if ($this->term_set) { $link = '<a href="' . APP_ROOT_PATH . '/app_code/metadata_structure.php?action=' . $action . '&metadata_structure_id=' . $this->metadata_structure_id . '">' . $this->renderAsFullName() . ' (' . htmlentities($this->term_set->name) . ') <i class="' . ($this->flag_active ? 'icon-ok' : 'icon-ban-circle') . '"></i></a>'; } return $link; }