code stringlengths 12 2.05k | label_name stringclasses 5
values | label int64 0 4 |
|---|---|---|
public function showall() {
global $user, $sectionObj, $sections;
expHistory::set('viewable', $this->params);
$id = $sectionObj->id;
$current = null;
// all we need to do is determine the current section
$navsections = $sections;
if ($sectionObj-... | Base | 1 |
function clean_input_value($value) {
if (is_string($value)) {
return descript($value);
}
if (is_array($value)) {
return array_map('descript', $value);
}
return '';
} | Compound | 4 |
public function authenticate_by_email($website, $email, $password)
{
global $DB;
// find the webuser username assigned to an email address
// because it may exist more than one account with the same email,
// only the first _created_ will be used
$username = $DB->q... | Base | 1 |
function VerifyFixedSchedule($columns,$columns_var,$update=false)
{
$qr_teachers= DBGet(DBQuery('select TEACHER_ID,SECONDARY_TEACHER_ID from course_periods where course_period_id=\''.$_REQUEST['course_period_id'].'\''));
$teacher=($_REQUEST['tables']['course_periods'][$_REQUEST['course_period_id']]['TEACHE... | Base | 1 |
public function __construct(BufferingLogger $bootstrappingLogger = null)
{
if ($bootstrappingLogger) {
$this->bootstrappingLogger = $bootstrappingLogger;
$this->setDefaultLogger($bootstrappingLogger);
}
$this->traceReflector = new \ReflectionProperty('Exception', ... | Base | 1 |
public static function navtojson() {
return json_encode(self::navhierarchy());
}
| Base | 1 |
function showallSubcategories() {
// global $db;
expHistory::set('viewable', $this->params);
// $parent = isset($this->params['cat']) ? $this->params['cat'] : expSession::get('catid');
$catid = expSession::get('catid');
$parent = !empty($catid) ? $catid : (!empty($this->params... | Base | 1 |
public function newModel() {
return new APIModel('testuser','5f4dcc3b5aa765d61d8327deb882cf99',rtrim(TEST_BASE_URL,'/'));
} | Base | 1 |
public function getBranches()
{
if (null === $this->branches) {
$branches = array();
$this->process->execute('git branch --no-color --no-abbrev -v', $output, $this->repoDir);
foreach ($this->process->splitLines($output) as $branch) {
if ($branch && !P... | Base | 1 |
function reparent_standalone() {
$standalone = $this->section->find($this->params['page']);
if ($standalone) {
$standalone->parent = $this->params['parent'];
$standalone->update();
expSession::clearAllUsersSessionCache('navigation');
expHistory::... | Class | 2 |
function manage() {
global $db, $router, $user;
expHistory::set('manageable', $router->params);
assign_to_template(array(
'canManageStandalones' => self::canManageStandalones(),
'sasections' => $db->selectObjects('section', 'parent=-1'),
... | Base | 1 |
public function delete(){
$id = I("id/d")? I("id/d") : 0;
$login_user = $this->checkLogin();
if ($id && $login_user['uid']) {
$ret = D("Team")->where(" id = '$id' and uid = '$login_user[uid]'")->delete();
}
if ($ret) {
D("TeamItem")->where(" team_id = ... | Compound | 4 |
public function update() {
//populate the alt tag field if the user didn't
if (empty($this->params['alt'])) $this->params['alt'] = $this->params['title'];
// call expController update to save the image
parent::update();
} | Class | 2 |
$pageView = $this->get($page->getUrl());
$pageView->assertStatus(200);
$pageView->assertElementNotContains('.page-content', '<a id="xss">');
$pageView->assertElementNotContains('.page-content', 'href=javascript:');
} | Base | 1 |
public function load_from_post()
{
$this->codename = $_REQUEST['codename'];
$this->icon = $_REQUEST['icon'];
$this->lid = $_REQUEST['lid'];
$this->notes = $_REQUEST['notes'];
$this->enabled = ($_REQUEST['enabled']=='1'? '1' : '0');
// load associated functions
$f... | Base | 1 |
function insertCommandCategorieInDB(){
global $pearDB;
if (testCommandCategorieExistence($_POST["category_name"])){
$DBRESULT = $pearDB->query("INSERT INTO `command_categories` (`category_name` , `category_alias`, `category_order`) VALUES ('".$_POST["category_name"]."', '".$_POST["category_alias"]."', '1')")... | Base | 1 |
protected function _fclose($fp, $path='') {
@fclose($fp);
if ($path) {
@unlink($this->getTempFile($path));
}
} | Base | 1 |
function form_confirm_buttons($action_url, $cancel_url) {
global $config;
?>
<tr>
<td align='right'>
<input type='button' onClick='cactiReturnTo("<?php print htmlspecialchars($config['url_path'] . $cancel_url);?>")' value='<?php print __esc('Cancel');?>'>
<input type='button' onClick='cactiReturnTo("<?php pr... | Base | 1 |
public function action_edge_mode_enable() {
w3_require_once(W3TC_INC_FUNCTIONS_DIR . '/activation.php');
$config_path = w3_get_wp_config_path();
$config_data = @file_get_contents($config_path);
if ($config_data === false)
return;
$new_config_data = $this->wp_con... | Compound | 4 |
private function _allrevisionssince( $option ) {
$this->addTable( 'revision_actor_temp', 'rev' );
$this->addSelect(
[
'rev.revactor_rev',
'rev.revactor_timestamp'
]
);
$this->addOrderBy( 'rev.revactor_rev' );
$this->setOrderDir( 'DESC' );
$this->addWhere(
[
$this->tableNames['page'] . ... | Class | 2 |
}elseif($p->group == 4){
$grp = GENERAL_MEMBER;
}
| Base | 1 |
private function getCategory()
{
$category = $this->categoryModel->getById($this->request->getIntegerParam('category_id'));
if (empty($category)) {
throw new PageNotFoundException();
}
return $category;
} | Base | 1 |
public function manage() {
expHistory::set('manageable', $this->params);
// build out a SQL query that gets all the data we need and is sortable.
$sql = 'SELECT b.*, c.title as companyname, f.expfiles_id as file_id ';
$sql .= 'FROM '.DB_TABLE_PREFIX.'_banner b, '.DB_TABLE_P... | Class | 2 |
function process_subsections($parent_section, $subtpl) {
global $db, $router;
$section = new stdClass();
$section->parent = $parent_section->id;
$section->name = $subtpl->name;
$section->sef_name = $router->encode($section->name);
$... | Base | 1 |
private function _maxrevisions( $option ) {
$this->addWhere( "((SELECT count(rev_aux3.revactor_page) FROM {$this->tableNames['revision_actor_temp']} AS rev_aux3 WHERE rev_aux3.revactor_page = {$this->tableNames['page']}.page_id) <= {$option})" );
} | Class | 2 |
function nvweb_menu_load_routes()
{
global $DB;
global $structure;
global $current;
global $website;
if(empty($structure['routes']))
{
$structure['routes'] = array();
$DB->query('SELECT object_id, path
FROM nv_paths
WHERE type = "structure"
AND lang = '.protect($curre... | Base | 1 |
function getTextColumns($table) {
$sql = "SHOW COLUMNS FROM " . $this->prefix.$table . " WHERE type = 'text' OR type like 'varchar%'";
$res = @mysqli_query($this->connection, $sql);
if ($res == null)
return array();
$records = array();
while($row = mysqli_fetch_object($res)) {
$records[] = $ro... | Class | 2 |
public function wipecache()
{
$type = $this->request->request("type");
switch ($type) {
case 'all':
case 'content':
rmdirs(CACHE_PATH, false);
Cache::clear();
if ($type == 'content')
break;
ca... | Base | 1 |
public function testPOSTForRegularUser()
{
$post_resource = json_encode([
'label' => 'Test Request 9747 regular user',
'shortname' => 'test9747-regular-user',
'description' => 'Test of Request 9747 for REST API Project Creation',
'is_public' => true,
... | Class | 2 |
function columnUpdate($table, $col, $val, $where=1) {
$res = @mysqli_query($this->connection, "UPDATE `" . $this->prefix . "$table` SET `$col`='" . $val . "' WHERE $where");
/*if ($res == null)
return array();
$objects = array();
for ($i = 0; $i < mysqli_num_rows... | Base | 1 |
public function approve_submit() {
global $history;
if (empty($this->params['id'])) {
flash('error', gt('No ID supplied for comment to approve'));
$lastUrl = expHistory::getLast('editable');
}
/* The global constants can be overriden by passi... | Base | 1 |
public function test_invite_set_password()
{
Notification::fake();
$user = $this->getViewer();
$inviteService = app(UserInviteService::class);
$inviteService->sendInvitation($user);
$token = DB::table('user_invites')->where('user_id', '=', $user->id)->first()->token;
... | Compound | 4 |
public function confirm()
{
$project = $this->getProject();
$category = $this->getCategory();
$this->response->html($this->helper->layout->project('category/remove', array(
'project' => $project,
'category' => $category,
)));
} | Base | 1 |
function categoryBreadcrumb() {
// global $db, $router;
//eDebug($this->category);
/*if(isset($router->params['action']))
{
$ancestors = $this->category->pathToNode();
}else if(isset($router->params['section']))
{
$current = $db->select... | Base | 1 |
public function setAuthorizedBackendSession()
{
$_SESSION['authorized'] = true;
$_SESSION['lastSessionId'] = time();
$_SESSION['tstamp'] = time();
$_SESSION['expires'] = time() + $this->expireTimeInMinutes * 60;
$_SESSION['isBackendSession'] = true;
// Renew the s... | Base | 1 |
function rsvpmaker_stripecharge( $atts ) {
if ( is_admin() || wp_is_json_request() ) {
return;
}
global $current_user;
$vars['description'] = ( ! empty( $atts['description'] ) ) ? $atts['description'] : __( 'charge from', 'rsvpmaker' ) . ' ' . get_bloginfo( 'name' );
$vars['paymentType'] = $paymentType = ( ... | Base | 1 |
function searchByModelForm() {
// get the search terms
$terms = $this->params['search_string'];
$sql = "model like '%" . $terms . "%'";
$limit = !empty($this->config['limit']) ? $this->config['limit'] : 10;
$page = new expPaginator(array(
'model' => 'produc... | Class | 2 |
function manage_upcharge() {
$this->loc->src = "@globalstoresettings";
$config = new expConfig($this->loc);
$this->config = $config->config;
$gc = new geoCountry();
$countries = $gc->find('all');
$gr = new geoRegion();
$regions = $gr->find('all... | Base | 1 |
public function __construct () {
global $vars;
if(DB_DRIVER == 'mysql') {
mysql_connect(DB_HOST, DB_USER, DB_PASS);
mysql_select_db(DB_NAME);
}elseif(DB_DRIVER == 'mysqli') {
try {
self::$mysqli = new mysqli(DB_HOST, DB_USER, DB_PASS... | Base | 1 |
$value = (int)$_POST[$key];
} else {
$value = strtotime($_POST[$key]);
}
$icmsObj->setVar($key, $value);
break;
case XOBJ_DTYPE_URL:
if (isset($_POST[$key])) {
$icmsObj->setVar($key, filter_var($_POST[$key], FILTER_SANITIZE_URL));
}
break;
case... | Base | 1 |
$body = str_replace(array("\n"), "<br />", $body);
} else {
// It's going elsewhere (doesn't like quoted-printable)
$body = str_replace(array("\n"), " -- ", $body);
}
$title = $items[... | Base | 1 |
public function show()
{
$task = $this->getTask();
$subtask = $this->getSubtask();
$this->response->html($this->template->render('subtask_restriction/show', array(
'status_list' => array(
SubtaskModel::STATUS_TODO => t('Todo'),
SubtaskModel::S... | Base | 1 |
public function scopeSearch(Builder $query, array $search = [])
{
if (empty($search)) {
return $query;
}
if (!array_intersect(array_keys($search), $this->searchable)) {
return $query;
}
return $query->where($search);
} | Base | 1 |
public function backup($type='json')
{
global $DB;
global $website;
$out = array();
$DB->query('SELECT * FROM nv_products WHERE website = '.protect($website->id), 'object');
if($type='json')
$out = json_encode($DB->result());
return $out;... | Base | 1 |
private function getStateId(string $state, string $machine)
{
return $this->getContainer()->get(Connection::class)
->fetchColumn('
SELECT LOWER(HEX(state_machine_state.id))
FROM state_machine_state
INNER JOIN state_machine
... | Base | 1 |
function addDiscountToCart() {
// global $user, $order;
global $order;
//lookup discount to see if it's real and valid, and not already in our cart
//this will change once we allow more than one coupon code
$discount = new discounts();
$discount = $discount->getCoupon... | Class | 2 |
public function create_file() {
if (!AuthUser::hasPermission('file_manager_mkfile')) {
Flash::set('error', __('You do not have sufficient permissions to create a file.'));
redirect(get_url('plugin/file_manager/browse/'));
}
// CSRF checks
if (isset($_... | Class | 2 |
public static function find($code)
{
global $DB;
global $website;
$DB->query('
SELECT *
FROM nv_coupons
WHERE website = '.protect($website->id).' AND
code = '.protect($code),
'object'
);
$r... | Base | 1 |
public function getViewFileParams () {
if (!isset ($this->_viewFileParams)) {
$this->_viewFileParams = array_merge (
parent::getViewFileParams (),
array (
'chartType' => $this->chartType,
'chartSettingsDataProvider' => self::getChart... | Base | 1 |
public function delete($id)
{
$ret = $this->get($id);
if (!$ret) {
/* get() already logged */
return self::ID_NOT_EXITS;
}
if ($this->isUsed($id)) {
$this->errors[] = _T("Cannot delete this label: it's still used");
return false;
... | Base | 1 |
public function confirm()
{
$project = $this->getProject();
$this->response->html($this->helper->layout->project('action/remove', array(
'action' => $this->actionModel->getById($this->request->getIntegerParam('action_id')),
'available_events' => $this->eventManager->getA... | Class | 2 |
public function update()
{
$project = $this->getProject();
$tag_id = $this->request->getIntegerParam('tag_id');
$tag = $this->tagModel->getById($tag_id);
$values = $this->request->getValues();
list($valid, $errors) = $this->tagValidator->validateModification($values);
... | Base | 1 |
public function confirm()
{
$task = $this->getTask();
$link = $this->getTaskLink();
$this->response->html($this->template->render('task_internal_link/remove', array(
'link' => $link,
'task' => $task,
)));
} | Base | 1 |
function layout_navbar() {
$t_logo_url = config_get('logo_url');
echo '<div id="navbar" class="navbar navbar-default navbar-collapse navbar-fixed-top noprint">';
echo '<div id="navbar-container" class="navbar-container">';
echo '<button id="menu-toggler" type="button" class="navbar-toggle menu-toggler pull-left h... | Base | 1 |
unset($return[$key]);
}
}
break;
}
return @array_change_key_case($return, CASE_UPPER);
} | Base | 1 |
public static function update_object_votes($webuser, $object, $object_id, $value, $replace=false)
{
global $DB;
global $website;
global $events;
$status = false;
$voted = false;
$webuser_vote_id = null;
// user has voted in the past?
if($DB->query('
SELECT *
FROM nv_webuser_... | Base | 1 |
foreach ($grpusers as $u) {
$emails[$u->email] = trim(user::getUserAttribution($u->id));
}
| Base | 1 |
return \DPL\Variables::setVarDefault( $args );
}
return \DPL\Variables::getVar( $cmd );
} | Class | 2 |
$cols .= '\'' . Util::sqlAddSlashes($col_select) . '\',';
}
$cols = trim($cols, ',');
$has_list = PMA_findExistingColNames($db, $cols);
foreach ($field_select as $column) {
if (!in_array($column, $has_list)) {
$colNotExist[] = "'" . $column . "'";
... | Base | 1 |
public function save()
{
$project = $this->getProject();
$values = $this->request->getValues();
list($valid, $errors) = $this->categoryValidator->validateCreation($values);
if ($valid) {
if ($this->categoryModel->create($values) !== false) {
$this->f... | Base | 1 |
public static function DragnDropReRank2() {
global $router, $db;
$id = $router->params['id'];
$page = new section($id);
$old_rank = $page->rank;
$old_parent = $page->parent;
$new_rank = $router->params['position'] + 1; // rank
$new_parent = intval($r... | Base | 1 |
public static function deactivate($id){
$act = Db::query(
sprintf("UPDATE `user` SET `status` = '0' WHERE `id` = '%d'",
Typo::int($id)
)
);
if($act){
return true;
}else{
return false;
}
}
| Base | 1 |
public function editTitle() {
global $user;
$file = new expFile($this->params['id']);
if ($user->id==$file->poster || $user->isAdmin()) {
$file->title = $this->params['newValue'];
$file->save();
$ar = new expAjaxReply(200, gt('Your title was updated succes... | Base | 1 |
public function testPrintAction()
{
$client = $this->getClientForAuthenticatedUser(User::ROLE_TEAMLEAD);
$fixture = new InvoiceTemplateFixtures();
$templates = $this->importFixture($fixture);
$id = $templates[0]->getId();
$begin = new \DateTime('first day of this month'... | Base | 1 |
public function handle(Request $request, Closure $next, int $keyType)
{
if (is_null($request->bearerToken()) && is_null($request->user())) {
throw new HttpException(401, null, null, ['WWW-Authenticate' => 'Bearer']);
}
// This is a request coming through using cookies, we ha... | Compound | 4 |
$files[$key]->save();
}
// eDebug($files,true);
} | Base | 1 |
function captureAuthorization() {
//eDebug($this->params,true);
$order = new order($this->params['id']);
/*eDebug($this->params);
//eDebug($order,true);*/
//eDebug($order,true);
//$billing = new billing();
//eDebug($billing, true);
//$billing->calcul... | Class | 2 |
public function testUserCredentials($email, $password, $server, $port, $security) {
require_once(realpath(Yii::app()->basePath.'/components/phpMailer/class.phpmailer.php'));
require_once(realpath(Yii::app()->basePath.'/components/phpMailer/class.smtp.php'));
$phpMail = new PHPMailer(true);
... | Base | 1 |
public static function get($vars) {
$op = Db::result("SELECT `value` FROM `options` WHERE `name` = '{$vars}' LIMIT 1");
if(Db::$num_rows > 0){
return $op[0]->value;
}else{
return false;
}
}
| Base | 1 |
public function confirm()
{
$task = $this->getTask();
$link_id = $this->request->getIntegerParam('link_id');
$link = $this->taskExternalLinkModel->getById($link_id);
if (empty($link)) {
throw new PageNotFoundException();
}
$this->response->html($this... | Base | 1 |
$q = self::$mysqli->query($vars) ;
if($q === false) {
Control::error('db',"Query failed: ".self::$mysqli->error."<br />\n");
}
}
return $q;
}
| Base | 1 |
public function manage_versions() {
expHistory::set('manageable', $this->params);
$hv = new help_version();
$current_version = $hv->find('first', 'is_current=1');
$sql = 'SELECT hv.*, COUNT(h.title) AS num_docs FROM '.DB_TABLE_PREFIX.'_help h ';
$sql .= 'RIGHT JOIN '.DB_TABLE_PREF... | Base | 1 |
static function getTypeName($nb = 0) {
return __('Maintenance');
} | Compound | 4 |
public static function getURI () {
$uri = $_SERVER['REQUEST_URI'];
// echo $uri;
// strip any $_REQUEST variable
$uri = explode('?', $uri);
if (count($uri) > 0) {
unset($uri[1]);
}
// print_r($uri[0]);
if (self::inFolder()) {... | Base | 1 |
function display($text, $inline_images=true, $balance=true) {
// Make showing offsite images optional
$text = preg_replace_callback('/<img ([^>]*)(src="http[^"]+")([^>]*)\/>/',
function($match) {
// Drop embedded classes -- they don't refer to ours
$match ... | Base | 1 |
function DateInputAY($value, $name, $counter = 1, $placeholder = _enterDate)
{
$show = "";
$date_sep = "";
$monthVal = "";
$yearVal = "";
$dayVal = "";
$display = "";
if ($value != '')
return '<table><tr><td><div id="date_div_' . $counter . '" style="display: inline" >' . ProperDat... | Base | 1 |
$result = sqlrequest($database_ged, $sql);
if(!$result){
$success = false;
}
}
// display the final message
if($success){
message(11, " : ".getLabel("message.event_edited"), "ok");
} else {
message(11, " : ".getLabel("message.event_edited_error"), "danger");
}
} | Base | 1 |
print '>' . title_trim(null_out_substitutions(htmlspecialchars($form_data[$id])), 75) . "</option>\n";
}
} | Base | 1 |
function delete_selected() {
$item = $this->event->find('first', 'id=' . $this->params['id']);
if ($item && $item->is_recurring == 1) {
$event_remaining = false;
$eventdates = $item->eventdate[0]->find('all', 'event_id=' . $item->id);
foreach ($eventdates as ... | Base | 1 |
public function jsonError(Exception $exception) {
$message = $exception->getMessage();
$code = $this->getHttpStatusCode($exception);
return new JSONResponse(
[
'message' => $message . ' (' . $code . ')',
'success' => false
],
$code
);
} | Base | 1 |
public function setError ($pn_error_number, $ps_error_description='', $ps_error_context='', $ps_error_source='') {
$this->opn_error_number = $pn_error_number;
$this->ops_error_description = $ps_error_description;
$this->ops_error_context = $ps_error_context;
$this->ops_error_source = $ps_error_source;
if ... | Base | 1 |
function init_args() {
$args = new stdClass();
$_REQUEST = strings_stripSlashes($_REQUEST);
$args->build_id = isset($_REQUEST['build_id']) ? $_REQUEST['build_id'] : 0;
$args->confirmed = isset($_REQUEST['confirmed']) && $_REQUEST['confirmed'] == 'yes' ? true : false;
$args->user_id = $_SESSION['userID'];
... | Base | 1 |
public function buildControl() {
$control = new colorcontrol();
if (!empty($this->params['value'])) $control->value = $this->params['value'];
if ($this->params['value'][0] != '#') $this->params['value'] = '#' . $this->params['value'];
$control->default = $this->params['value'];
... | Class | 2 |
public function testGetDeepWithInvalidPaths($path)
{
$bag = new ParameterBag(array('foo' => array('bar' => 'moo')));
$bag->get($path, null, true);
} | Base | 1 |
function HackingLog()
{
echo "" . _youReNotAllowedToUseThisProgram . "! " . _thisAttemptedViolationHasBeenLoggedAndYourIpAddressWasCaptured . ".";
Warehouse('footer');
if ($_SERVER['HTTP_X_FORWARDED_FOR']) {
$ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
} else {
$ip = $_SERVER['REMOTE_ADDR'];
}
if ($openSISNotify... | Base | 1 |
$eml->prepareBody();
}
list ($success, $message) = $this->checkDoNotEmailFields ($eml);
if (!$success) {
return array ($success, $message);
}
$result = $eml->send($historyFlag);
if (isset($result['code']) && $result['code'] == 200) {
if (YII_UNIT_TESTING) {
... | Class | 2 |
public function update_groupdiscounts() {
global $db;
if (empty($this->params['id'])) {
// look for existing discounts for the same group
$existing_id = $db->selectValue('groupdiscounts', 'id', 'group_id='.$this->params['group_id']);
if (!empty($existing_id)) flashAndFlow('er... | Base | 1 |
public function getQueryGroupby()
{
$R1 = 'R1_' . $this->field->id;
$R2 = 'R2_' . $this->field->id;
return "$R2.id";
} | Base | 1 |
$sort = in_array(strtolower($val), array('asc', 'desc')) ? ' ' . $val : '';
$array[] = $this->parseKey($key, true) . $sort;
}
} | Base | 1 |
public function load_from_resultset($rs)
{
global $DB;
$main = $rs[0];
$this->id = $main->id;
$this->codename = $main->codename;
$this->icon = $main->icon;
$this->lid = $main->lid;
$this->notes = $main->notes;
$this->enabled = $main->enabled;
... | Base | 1 |
public function testDeleteCommentAction()
{
$client = $this->getClientForAuthenticatedUser(User::ROLE_ADMIN);
$this->assertAccessIsGranted($client, '/admin/customer/1/details');
$form = $client->getCrawler()->filter('form[name=customer_comment_form]')->form();
$client->submit($fo... | Compound | 4 |
private function runCallback() {
foreach ($this->records as &$record) {
if (isset($record->ref_type)) {
$refType = $record->ref_type;
if (class_exists($record->ref_type)) {
$type = new $refType();
$classinfo = new Reflection... | Base | 1 |
public static function country_region_name_by_code($code, $language="")
{
global $DB;
// TODO: region names have no translation in database at this time
// $lang = core_get_language($language);
$DB->query('SELECT name
FROM nv_countries_regions
WHERE `numeric... | Base | 1 |
protected function getComment()
{
$comment = $this->commentModel->getById($this->request->getIntegerParam('comment_id'));
if (empty($comment)) {
throw new PageNotFoundException();
}
if (! $this->userSession->isAdmin() && $comment['user_id'] != $this->userSession->ge... | Base | 1 |
function preview()
{
if ($this->params['id'] == 0) { // we want the default editor
$demo = new stdClass();
$demo->id = 0;
$demo->name = "Default";
if ($this->params['editor'] == 'ckeditor') {
$demo->skin = 'kama';
} elseif ($thi... | Class | 2 |
public function detach()
{
global $zdb, $hist;
try {
$update = $zdb->update(self::TABLE);
$update->set(
array('parent_group' => new Expression('NULL'))
)->where(
self::PK . ' = ' . $this->id
);
$edit = ... | Base | 1 |
new SessionHandlerProxy(new \SessionHandler()) : new NativeProxy();
} | Base | 1 |
foreach ($page as $pageperm) {
if (!empty($pageperm['manage'])) return true;
}
| Base | 1 |
public function attributeLabels() {
return array(
'actionId' => Yii::t('actions','Action ID'),
'text' => Yii::t('actions','Action Text'),
);
} | Class | 2 |
function edit_freeform() {
$section = isset($this->params['id']) ? $this->section->find($this->params['id']) : new section($this->params);
if ($section->parent == -1) {
notfoundController::handle_not_found();
exit;
} // doesn't work for standalone pages
... | Class | 2 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.