code stringlengths 12 2.05k | label_name stringclasses 5
values | label int64 0 4 |
|---|---|---|
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 |
static public function deleteCategory($_id = 0) {
if ($_id != 0) {
$result_stmt = Database::prepare("
SELECT COUNT(`id`) as `numtickets` FROM `" . TABLE_PANEL_TICKETS . "`
WHERE `category` = :cat"
);
$result = Database::pexecute_first($result_stmt, array('cat' => $_id));
if ($result['numticket... | Class | 2 |
public function AdminObserver()
{
if($this->getPosted('go_back'))
{
$this->redirect('list', 'main', true);
}
$userid = $this->getId();
$sql = e107::getDb();
$user = e107::getUser();
$sysuser = e107::getSystemUser($userid, false);
$admin_log = e107::getAdminLog();
$mes = e107::getMe... | Compound | 4 |
public function get_view_config() {
global $template;
// set paths we will search in for the view
$paths = array(
BASE.'themes/'.DISPLAY_THEME.'/modules/common/views/file/configure',
BASE.'framework/modules/common/views/file/configure',
);
fo... | Base | 1 |
$files[$key]->save();
}
// eDebug($files,true);
} | Base | 1 |
protected function assetExtensions()
{
return [
'jpg',
'jpeg',
'bmp',
'png',
'webp',
'gif',
'ico',
'css',
'js',
'woff',
'woff2',
'svg',
'ttf',
... | Base | 1 |
function yourls_verify_nonce( $action, $nonce = false, $user = false, $return = '' ) {
// get user
if( false == $user )
$user = defined( 'YOURLS_USER' ) ? YOURLS_USER : '-1';
// get current nonce value
if( false == $nonce && isset( $_REQUEST['nonce'] ) )
$nonce = $_REQUEST['nonce'];
// Allow plugins to short... | Compound | 4 |
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... | Base | 1 |
public function getBackendRequest()
{
return $this->backendRequest;
} | Class | 2 |
public function allowedViewProfileField(self $user, $fieldNameIntern)
{
return $user->mProfileFieldsData->isVisible($fieldNameIntern, $this->hasRightEditProfile($user));
} | Base | 1 |
public function showall_tags() {
$images = $this->image->find('all');
$used_tags = array();
foreach ($images as $image) {
foreach($image->expTag as $tag) {
if (isset($used_tags[$tag->id])) {
$used_tags[$tag->id]->count++;
} else... | Base | 1 |
function db_case($array)
{
global $DatabaseType;
$counter = 0;
if ($DatabaseType == 'mysqli') {
$array_count = count($array);
$string = " CASE WHEN $array[0] =";
$counter++;
$arr_count = count($array);
for ($i = 1; $i < $arr_count; $i++) {
$value = $array... | Base | 1 |
public function testCompletePurchaseCustomOptions()
{
$this->setMockHttpResponse('ExpressPurchaseSuccess.txt');
// Those values should not be used if custom token or payerid are passed
$this->getHttpRequest()->query->replace(array(
'token' => 'GET_TOKEN',
'Payer... | Base | 1 |
function test_empty_comment() {
$result = $this->myxmlrpcserver->wp_newComment(
array(
1,
'administrator',
'administrator',
self::$post->ID,
array(
'content' => '',
),
)
);
$this->assertIXRError( $result );
$this->assertSame( 403, $result->code );
} | Class | 2 |
public static function exist($mod) {
$file = GX_MOD."/".$mod."/options.php";
if(file_exists($file)){
return true;
}else{
return false;
}
}
| Base | 1 |
$newret = recyclebin::restoreFromRecycleBin($iLoc, $page_id);
if (!empty($newret)) $ret .= $newret . '<br>';
if ($iLoc->mod == 'container') {
$ret .= scan_container($container->internal, $page_id);
}
}
retu... | Class | 2 |
function update_vendor() {
$vendor = new vendor();
$vendor->update($this->params['vendor']);
expHistory::back();
} | Base | 1 |
public function GetJsForUpdateFields()
{
$sWizardHelperJsVar = (!is_null($this->m_aData['m_sWizHelperJsVarName'])) ? utils::Sanitize($this->m_aData['m_sWizHelperJsVarName'], utils::ENUM_SANITIZATION_FILTER_PARAMETER) : 'oWizardHelper'.$this->GetFormPrefix();
//str_replace(['(', ')', ';'], '', $this->m_aData['m_sW... | Base | 1 |
public function setLoggerChannel($channel = 'Organizr', $username = null)
{
if ($this->hasDB()) {
$setLogger = false;
if ($username) {
$username = htmlspecialchars($username);
}
if ($this->logger) {
if ($channel) {
if (strtolower($this->logger->getChannel()) !== strtolower($channel)) {
... | Base | 1 |
public function testBodyConsistent()
{
$r = new Response(200, [], '0');
$this->assertEquals('0', (string)$r->getBody());
} | Base | 1 |
private function getSwimlane()
{
$swimlane = $this->swimlaneModel->getById($this->request->getIntegerParam('swimlane_id'));
if (empty($swimlane)) {
throw new PageNotFoundException();
}
return $swimlane;
} | Base | 1 |
private function getTaskLink()
{
$link = $this->taskLinkModel->getById($this->request->getIntegerParam('link_id'));
if (empty($link)) {
throw new PageNotFoundException();
}
return $link;
} | Class | 2 |
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... | Class | 2 |
protected function setUp()
{
$this->originalTrustedHeaderName = Request::getTrustedHeaderName(Request::HEADER_CLIENT_IP);
} | Class | 2 |
public function enable()
{
$this->checkCSRFParam();
$project = $this->getProject();
$swimlane_id = $this->request->getIntegerParam('swimlane_id');
if ($this->swimlaneModel->enable($project['id'], $swimlane_id)) {
$this->flash->success(t('Swimlane updated successfully... | 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... | Class | 2 |
public function remove()
{
$this->checkCSRFParam();
$project = $this->getProject();
$action = $this->actionModel->getById($this->request->getIntegerParam('action_id'));
if (! empty($action) && $this->actionModel->remove($action['id'])) {
$this->flash->success(t('Acti... | Base | 1 |
public function remove()
{
$this->checkCSRFParam();
$project = $this->getProject();
$swimlane_id = $this->request->getIntegerParam('swimlane_id');
if ($this->swimlaneModel->remove($project['id'], $swimlane_id)) {
$this->flash->success(t('Swimlane removed successfully... | Base | 1 |
public function replace_save_pre_shortcode( $shortcode_match ) {
$content = $shortcode_match[0];
$tag_index = array_search( 'geo_mashup_save_location', $shortcode_match );
if ( $tag_index !== false ) {
// There is an inline location - save the attributes
$this->inline_location = shortcode_parse_atts... | Class | 2 |
public function getQueryGroupby()
{
$R1 = 'R1_' . $this->field->id;
$R2 = 'R2_' . $this->field->id;
return "$R2.user_id";
} | Base | 1 |
function manage() {
expHistory::set('viewable', $this->params);
// $category = new storeCategory();
// $categories = $category->getFullTree();
//
// // foreach($categories as $i=>$val){
// // if (!empty($this->values) && in_ar... | Class | 2 |
foreach($image->expTag as $tag) {
if (isset($used_tags[$tag->id])) {
$used_tags[$tag->id]->count++;
} else {
$exptag = new expTag($tag->id);
$used_tags[$tag->id] = $exptag;
$used_tags[$tag->id]->c... | Base | 1 |
public function setRssValues($rss)
{
$this->set('rsstitle', \App\Purifier::purifyByType((string) $rss->title, 'Text'));
$this->set('url', $rss->link);
} | Base | 1 |
$masteroption->delete();
}
// delete the mastergroup
$db->delete('optiongroup', 'optiongroup_master_id='.$mastergroup->id);
$mastergroup->delete();
expHistory::back();
} | Base | 1 |
function selectObjectBySql($sql) {
//$logFile = "C:\\xampp\\htdocs\\supserg\\tmp\\queryLog.txt";
//$lfh = fopen($logFile, 'a');
//fwrite($lfh, $sql . "\n");
//fclose($lfh);
$res = @mysqli_query($this->connection, $this->injectProof($sql));
if ($re... | Base | 1 |
function selectBillingOptions() {
} | Base | 1 |
public function actionGetItems(){
$sql = 'SELECT id, name as value, subject FROM x2_bug_reports WHERE name LIKE :qterm ORDER BY name ASC';
$command = Yii::app()->db->createCommand($sql);
$qterm = $_GET['term'].'%';
$command->bindParam(":qterm", $qterm, PDO::PARAM_STR);
$resul... | Base | 1 |
function process_tasks($task)
{
global $send;
/**
* First see if the doc_ID exists
* if not we need to create this
*/
$task = make_document($task);
update_taskman($task, 'created', '1');
if ($task['DOC_TYPE'] == 'Fax') {
deliver_document($task);
}
update_taskman($ta... | Base | 1 |
public static function parseAndTrim($str, $isHTML = false) { //�Death from above�? �
//echo "1<br>"; eDebug($str);
// global $db;
$str = str_replace("�", "’", $str);
$str = str_replace("�", "‘", $str);
$str = str_replace("�", "®", $str);
$str = str_re... | Base | 1 |
$loc = expCore::makeLocation('navigation', '', $standalone->id);
if (expPermissions::check('manage', $loc)) return true;
}
return false;
}
| Class | 2 |
public function remove()
{
$this->checkCSRFParam();
$project = $this->getProject();
$action = $this->actionModel->getById($this->request->getIntegerParam('action_id'));
if (! empty($action) && $this->actionModel->remove($action['id'])) {
$this->flash->success(t('Acti... | Base | 1 |
public function testPhpSession53()
{
if (PHP_VERSION_ID >= 50400) {
$this->markTestSkipped('Test skipped, for PHP 5.3 only.');
}
$storage = $this->getStorage();
$this->assertFalse(isset($_SESSION));
$this->assertFalse($storage->getSaveHandler()->isActive());... | Base | 1 |
public function confirm() {
global $db;
// make sure we have what we need.
if (empty($this->params['key'])) expQueue::flashAndFlow('error', gt('The security key for account was not supplied.'));
if (empty($this->params['id'])) expQueue::flashAndFlow('error', gt('The subscrib... | Base | 1 |
public function getDeleteItemLink($icmsObj, $onlyUrl=false, $withimage=true, $userSide=false) {
if ($this->handler->_moduleName != 'system') {
$admin_side = $userSide ? '' : 'admin/';
$ret = $this->handler->_moduleUrl . $admin_side . $this->handler->_page
. "?op=del&" . $this->handler->keyName . "=... | 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 |
foreach($item as $subtype => $litem)
{
if(strpos($subtype, 'section-')===0)
{
if($litem=='<p><br _mce_bogus="1"></p>') continue; // tinymce empty contents, no need to save it
// has the text been changed since last save?
$last_litem = $DB->query_single(
'`text`',
... | Base | 1 |
function cron_dbmanager_backup() {
global $wpdb;
$backup_options = get_option('dbmanager_options');
$backup_email = stripslashes($backup_options['backup_email']);
if(intval($backup_options['backup_period']) > 0) {
$backup = array();
$backup['date'] = current_time('timestamp');
$backup['mysqldumppath'] = $back... | Class | 2 |
static function isSearchable() {
return true;
}
| Class | 2 |
array_push($newgroupprivs, $type);
}
if(empty($newgroupprivs) || (count($newgroupprivs) == 1 &&
in_array("cascade", $newgroupprivs))) {
return array('status' => 'error',
'errorcode' => 53,
'errormsg' => 'Invalid or missing permissions list supplied');
}
up... | Class | 2 |
public function editspeed() {
global $db;
if (empty($this->params['id'])) return false;
$calcname = $db->selectValue('shippingcalculator', 'calculator_name', 'id='.$this->params['id']);
$calc = new $calcname($this->params['id']);
assign_to_template(array(
'calculato... | Base | 1 |
public function saveNewFromLink($name, $link, $page_id)
{
$largestExistingOrder = Attachment::where('uploaded_to', '=', $page_id)->max('order');
return Attachment::forceCreate([
'name' => $name,
'path' => $link,
'external' => true,
'extension' => '... | Base | 1 |
public function save_change_password() {
global $user;
$isuser = ($this->params['uid'] == $user->id) ? 1 : 0;
if (!$user->isAdmin() && !$isuser) {
flash('error', gt('You do not have permissions to change this users password.'));
expHistory::back();
}
... | Base | 1 |
public function isAllowedFilename($filename){
$allow_array = array(
'.jpg','.jpeg','.png','.bmp','.gif','.ico','.webp',
'.mp3','.wav','.mp4',
'.mov','.webmv','.flac','.mkv',
'.zip','.tar','.gz','.tgz','.ipa','.apk','.rar','.iso',
'.pdf','.ofd','.swf','.epub','.xps',
'.doc','.docx','.wps',
'.ppt'... | Base | 1 |
public function attachLink(Request $request)
{
$pageId = $request->get('attachment_link_uploaded_to');
try {
$this->validate($request, [
'attachment_link_uploaded_to' => 'required|integer|exists:pages,id',
'attachment_link_name' => 'required|string|mi... | Base | 1 |
$section = new section(intval($page));
if ($section) {
// self::deleteLevel($section->id);
$section->delete();
}
}
}
| Base | 1 |
public static function existParam($param, $post_id) {
$sql = "SELECT * FROM `posts_param` WHERE `post_id` = '{$post_id}' AND `param` = '{$param}' LIMIT 1";
$q = Db::result($sql);
if (Db::$num_rows > 0) {
return true;
}else{
return false;
}
... | Base | 1 |
function move_standalone() {
expSession::clearAllUsersSessionCache('navigation');
assign_to_template(array(
'parent' => $this->params['parent'],
));
}
| Base | 1 |
static function description() {
return gt("This module is for managing categories in your store.");
} | Class | 2 |
function searchCategory() {
return gt('Event');
}
| Class | 2 |
protected function _stat($path) {
static $statOwner;
if (is_null($statOwner)) {
$statOwner = (!empty($this->options['statOwner']));
}
$stat = array();
if (!file_exists($path) && !is_link($path)) {
return $stat;
}
//Verifies the given path is the root or is inside the root. Prevents director... | Base | 1 |
public function actionGetLists() {
if (!Yii::app()->user->checkAccess('ContactsAdminAccess')) {
$condition = ' AND (visibility="1" OR assignedTo="Anyone" OR assignedTo="' . Yii::app()->user->getName() . '"';
/* x2temp */
$groupLinks = Yii::app()->db->createCommand()->sel... | Base | 1 |
$f = function (\Symfony\Component\DependencyInjection\Tests\Fixtures\TestServiceSubscriber $v) { return $v; }; return $f(${($_ = isset($this->services['Symfony\Component\DependencyInjection\Tests\Fixtures\TestServiceSubscriber']) ? $this->services['Symfony\Component\DependencyInjection\Tests\Fixtures\TestSe... | Base | 1 |
public function confirm()
{
$project = $this->getProject();
$category = $this->getCategory();
$this->response->html($this->helper->layout->project('category/remove', array(
'project' => $project,
'category' => $category,
)));
} | Class | 2 |
foreach ($nodes as $node) {
if ((($perm == 'view' && $node->public == 1) || expPermissions::check($perm, expCore::makeLocation('navigation', '', $node->id))) && !in_array($node->id, $ignore_ids)) {
if ($node->active == 1) {
$text = str_pad('', ($depth + ($full ... | Class | 2 |
protected function getRootStatExtra() {
$stat = array();
if ($this->rootName) {
$stat['name'] = $this->rootName;
}
if (! empty($this->options['icon'])) {
$stat['icon'] = $this->options['icon'];
}
if (! empty($this->options['rootCssClass'])) {
$stat['csscls'] = $this->options['rootCssClass'];
}
... | Base | 1 |
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... | Class | 2 |
$masteroption->delete();
}
// delete the mastergroup
$db->delete('optiongroup', 'optiongroup_master_id='.$mastergroup->id);
$mastergroup->delete();
expHistory::back();
} | Base | 1 |
echo '<LANGUAGE>' . htmlentities($value_arr['LANGUAGE']) . '</LANGUAGE>';
foreach ($value_arr['ENROLLMENT_INFO'] as $eid => $ed) {
echo '<ENROLLMENT_INFO_' . htmlentities($eid) . '>';
echo '<SCHOOL_ID>' . htmlentitie... | Base | 1 |
public function executeQuery()
{
if ($this->query !== null) {
$this->query
->offset($this->offset)
->limit($this->limit)
->orderBy($this->order, $this->direction);
if ($this->formatter !== null) {
return $this->form... | Base | 1 |
public function execute(&$params) {
$options = $this->config['options'];
$action = new Actions;
$action->subject = $this->parseOption('subject',$params);
$action->dueDate = $this->parseOption('dueDate',$params);
$action->actionDescription = $this->parseOption('description',$params);
$action->priori... | Class | 2 |
function edit() {
global $template;
parent::edit();
$allforms = array();
$allforms[""] = gt('Disallow Feedback');
// calculate which event date is the one being edited
$event_key = 0;
foreach ($template->tpl->tpl_vars['record']->value->eventdate as $k... | Base | 1 |
function lockTable($table,$lockType="WRITE") {
$sql = "LOCK TABLES `" . $this->prefix . "$table` $lockType";
$res = mysqli_query($this->connection, $sql);
return $res;
} | Base | 1 |
public function confirm()
{
$project = $this->getProject();
$swimlane = $this->getSwimlane();
$this->response->html($this->helper->layout->project('swimlane/remove', array(
'project' => $project,
'swimlane' => $swimlane,
)));
} | Base | 1 |
private function getOutput() {
//@TODO: 2015-08-28 Consider calling $this->replaceVariables() here. Might cause issues with text returned in the results.
return $this->output;
} | Class | 2 |
public function update()
{
$project = $this->getProject();
$values = $this->request->getValues();
list($valid, $errors) = $this->swimlaneValidator->validateModification($values);
if ($valid) {
if ($this->swimlaneModel->update($values['id'], $values)) {
... | Base | 1 |
private function load($id)
{
try {
$select = $this->zdb->select(self::TABLE);
$select->limit(1)->where(self::PK . ' = ' . $id);
if ($this->login->isSuperAdmin()) {
$select->where(Adherent::PK . ' IS NULL');
} else {
$select-... | Base | 1 |
public static function find($type, $property, $value)
{
global $DB;
global $website;
$DB->query('
SELECT * FROM nv_properties_items
WHERE website = '.protect($website->id).'
AND property_id = '.protect($property).'
AND value =... | Base | 1 |
public function update()
{
$project = $this->getProject();
$values = $this->request->getValues();
list($valid, $errors) = $this->swimlaneValidator->validateModification($values);
if ($valid) {
if ($this->swimlaneModel->update($values['id'], $values)) {
... | Base | 1 |
$count += $db->dropTable($basename);
}
flash('message', gt('Deleted').' '.$count.' '.gt('unused tables').'.');
expHistory::back();
} | Base | 1 |
public static function cat($vars) {
switch (SMART_URL) {
case true:
# code...
$url = Options::get('siteurl')."/".$vars."/".Typo::slugify(Categories::name($vars));
break;
default:
# code...
$u... | Base | 1 |
public function withAddedHeader($header, $value)
{
if (!$this->hasHeader($header)) {
return $this->withHeader($header, $value);
}
$new = clone $this;
$new->headers[strtolower($header)][] = $value;
$new->headerLines[$header][] = $value;
return $new;
... | Base | 1 |
$emails[$u->email] = trim(user::getUserAttribution($u->id));
}
| Base | 1 |
public function show()
{
$task = $this->getTask();
$subtask = $this->getSubtask();
$this->response->html($this->template->render('subtask_converter/show', array(
'subtask' => $subtask,
'task' => $task,
)));
} | Base | 1 |
public static function parseAndTrim($str, $isHTML = false) { //�Death from above�? �
//echo "1<br>"; eDebug($str);
// global $db;
$str = str_replace("�", "’", $str);
$str = str_replace("�", "‘", $str);
$str = str_replace("�", "®", $str);
$str = str_re... | Class | 2 |
public function confirm()
{
$task = $this->getTask();
$subtask = $this->getSubtask();
$this->response->html($this->template->render('subtask/remove', array(
'subtask' => $subtask,
'task' => $task,
)));
} | Base | 1 |
function db_properties($table)
{
global $DatabaseType, $DatabaseUsername;
switch ($DatabaseType) {
case 'mysqli':
$result = DBQuery("SHOW COLUMNS FROM $table");
while ($row = db_fetch_row($result)) {
$properties[strtoupper($row['FIELD'])]['TYPE'] = strtoupper($ro... | Base | 1 |
$src = substr($ref->source, strlen($prefix)) . $section->id;
if (call_user_func(array($ref->module, 'hasContent'))) {
$oloc = expCore::makeLocation($ref->module, $ref->source);
$nloc = expCore::makeLocation($ref->module, $src);
if ($ref->module... | Class | 2 |
function db_properties($table)
{
global $DatabaseType, $DatabaseUsername;
switch ($DatabaseType) {
case 'mysqli':
$result = DBQuery("SHOW COLUMNS FROM $table");
while ($row = db_fetch_row($result)) {
$properties[strtoupper($row['FIELD'])]['TYPE'] = strtoupper($ro... | Base | 1 |
function _makeChooseCheckbox($value, $title) {
// return '<INPUT type=checkbox name=st_arr[] value=' . $value . ' checked>';
global $THIS_RET;
return "<input name=unused[$THIS_RET[STUDENT_ID]] value=" . $THIS_RET[STUDENT_ID] . " type='checkbox' id=$THIS_RET[STUDENT_ID] onClick='setHiddenCheckboxStudents... | Base | 1 |
public static function recent_items($limit=5)
{
global $DB;
global $user;
global $website;
// last month only!
$DB->query('
SELECT DISTINCT nvul.website, nvul.function, nvul.item, nvul.item_title,
nvf.lid as function_title, nvf.icon as function_icon, nvul.date
FROM nv_users_log nvul,... | Base | 1 |
public static function get_param($key = NULL) {
$info = [
'stype' => htmlentities(self::$search_type),
'stext' => htmlentities(self::$search_text),
'method' => htmlentities(self::$search_method),
'datelimit' => self::$search_date_limit,
... | Base | 1 |
recyclebin::sendToRecycleBin($loc, $parent);
//FIXME if we delete the module & sectionref the module completely disappears
// if (class_exists($secref->module)) {
// $modclass = $secref->module;
// //FIXME: more module/controller glue code
// ... | Class | 2 |
public function update_discount() {
$id = empty($this->params['id']) ? null : $this->params['id'];
$discount = new discounts($id);
// find required shipping method if needed
if ($this->params['required_shipping_calculator_id'] > 0) {
$this->params['required_shipping_metho... | Base | 1 |
public function getDisplayName ($plural=true) {
$moduleName = X2Model::getModuleName (get_class ($this));
return Modules::displayName ($plural, $moduleName);
} | Class | 2 |
protected function doDBUpdates() {
$title = Title::newFromText( 'Template:Extension DPL' );
// Make sure template does not already exist
if ( !$title->exists() ) {
$wikipage = WikiPage::factory( $title );
$updater = $wikipage->newPageUpdater( User::newSystemUser( 'DynamicPageList3 extension' ) );
$cont... | Class | 2 |
foreach ($allusers as $uid) {
$u = user::getUserById($uid);
expPermissions::grant($u, 'manage', $sloc);
}
| Base | 1 |
function showByModel() {
global $order, $template, $db;
expHistory::set('viewable', $this->params);
$product = new product();
$model = $product->find("first", 'model="' . $this->params['model'] . '"');
//eDebug($model);
$product_type = new $model->product_type($model... | Class | 2 |
function getResourceGroups($type="") {
$return = array();
$query = "SELECT g.id AS id, "
. "g.name AS name, "
. "t.name AS type, "
. "g.ownerusergroupid AS ownerid, "
. "CONCAT(u.name, '@', a.name) AS owner "
. "FROM resourcegroup g, "
. ... | Class | 2 |
public function validateRequest(App\Request $request)
{
$request->validateReadAccess();
} | Compound | 4 |
foreach ($allusers as $uid) {
$u = user::getUserById($uid);
expPermissions::grant($u, 'manage', $sloc);
}
| Base | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.