本文整理汇总了PHP中error::createGroupNotFoundError方法的典型用法代码示例。如果您正苦于以下问题:PHP error::createGroupNotFoundError方法的具体用法?PHP error::createGroupNotFoundError怎么用?PHP error::createGroupNotFoundError使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类error
的用法示例。
在下文中一共展示了error::createGroupNotFoundError方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getConversationSetData
if ($len == 2) {
$groupset = getConversationSetData($parts);
$groupset->cipher = $cipher;
if (isset($unobfuscationid) && $unobfuscationid != "") {
$groupset->unobfuscationid = $unobfuscationid;
}
$response = $groupset;
} else {
if ($len > 2) {
$id = check_param($parts[2], PARAM_TEXT);
global $HUB_SQL, $DB;
$group = getGroup($id);
if ($group instanceof Error) {
global $ERROR;
$ERROR = new error();
$ERROR->createGroupNotFoundError($id);
include $HUB_FLM->getCodeDirPath("core/formaterror.php");
die;
}
$group = getConversationData($id);
$group->cipher = $cipher;
if (isset($unobfuscationid) && $unobfuscationid != "") {
$group->unobfuscationid = $unobfuscationid;
}
if ($len == 4) {
$subtype = check_param($parts[3], PARAM_ALPHA);
$group->filter = $subtype;
}
$response = $group;
} else {
global $ERROR;
示例2: load
/**
* Loads the data for the group from the database
*
* @return Group object (this)
*/
function load()
{
global $DB, $CFG, $HUB_FLM, $HUB_SQL, $LNG;
$params = array();
$params[0] = $this->groupid;
$resArray = $DB->select($HUB_SQL->DATAMODEL_GROUP_SELECT, $params);
if ($resArray !== false) {
$count = count($resArray);
if ($count == 0) {
global $ERROR;
$ERROR = new error();
return $ERROR->createGroupNotFoundError($this->groupid);
}
for ($i = 0; $i < $count; $i++) {
$array = $resArray[$i];
$this->name = stripslashes($array['Name']);
$this->description = stripslashes($array['Description']);
$this->website = stripslashes($array['Website']);
$this->isopenjoining = $array['IsOpenJoining'];
if ($array['Photo']) {
//set user photo and thumb the thumb creation is done during registration
$originalphotopath = $HUB_FLM->createUploadsDirPath($this->groupid . "/" . stripslashes($array['Photo']));
if (file_exists($originalphotopath)) {
$this->photo = $HUB_FLM->getUploadsWebPath($this->groupid . "/" . stripslashes($array['Photo']));
$this->thumb = $HUB_FLM->getUploadsWebPath($this->groupid . "/" . str_replace('.', '_thumb.', stripslashes($array['Photo'])));
if (!file_exists($this->thumb)) {
create_image_thumb($array['Photo'], $CFG->IMAGE_THUMB_WIDTH, $this->groupid);
}
} else {
//if the file does not exists how to get it from a upper level? change it to
//if file doesnot exists directly using default photo
$this->photo = $HUB_FLM->getUploadsWebPath($CFG->DEFAULT_GROUP_PHOTO);
$this->thumb = $HUB_FLM->getUploadsWebPath(str_replace('.', '_thumb.', stripslashes($CFG->DEFAULT_GROUP_PHOTO)));
}
} else {
$this->photo = $HUB_FLM->getUploadsWebPath($CFG->DEFAULT_GROUP_PHOTO);
$this->thumb = $HUB_FLM->getUploadsWebPath(str_replace('.', '_thumb.', stripslashes($CFG->DEFAULT_GROUP_PHOTO)));
}
if (isset($array['LocationText'])) {
$this->location = $array['LocationText'];
} else {
$this->location = "";
}
if (isset($array['LocationCountry'])) {
$cs = getCountryList();
$this->countrycode = $array['LocationCountry'];
if (isset($cs[$array['LocationCountry']])) {
$this->country = $cs[$array['LocationCountry']];
}
} else {
$this->countrycode = "";
$this->country = "";
}
if (isset($array['LocationLat'])) {
$this->locationlat = $array['LocationLat'];
}
if (isset($array['LocationLng'])) {
$this->locationlng = $array['LocationLng'];
}
}
} else {
return database_error();
}
$this->loadmembers();
$this->loadpendingmembers();
$this->getDebateCount();
$this->getVoteCount();
return $this;
}