query
stringlengths
11
3.13k
ru_query
stringlengths
9
3.91k
document
stringlengths
18
71k
metadata
dict
negatives
listlengths
0
100
negative_scores
listlengths
0
100
document_score
stringlengths
5
10
document_rank
stringclasses
2 values
Get temporary order from cache
Получить временный заказ из кэша
protected static function getTemporaryOrderFromCache($orderId) { $result = null; if (!isset(static::$tmpOrders)) { // Initialize $tmpOrders static::$tmpOrders = array(); } if (isset(static::$tmpOrders[$orderId])) { // Get order from cache ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getFromCache() {}", "public static function getTemporaryOrderData($orderId = null)\n {\n $result = null;\n\n if (!isset(static::$tmpOrders)) {\n // Initialize $tmpOrders\n static::$tmpOrders = array();\n }\n\n if ($orderId && isset(static::$tmp...
[ "0.65208596", "0.64072406", "0.6277436", "0.59369165", "0.58398384", "0.58391076", "0.5753197", "0.5753197", "0.5753197", "0.5753197", "0.5753197", "0.5753197", "0.5719353", "0.5697971", "0.56950873", "0.5681492", "0.5678367", "0.5593726", "0.5580606", "0.55719584", "0.556861...
0.70234615
0
Get human readable field names
Получить читаемые человеком названия полей
protected static function getFieldHumanReadableNames() { return array( 'billingAddress' => 'Billing address', 'shippingAddress' => 'Shipping address', 'shippingId' => 'Shipping method', 'paymentMethod' => 'Payment method', 'adminNote' ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_fields_name()\n\t{\n\t\treturn $this->db->list_fields( $this->table );\n\t}", "public function get_field_name();", "public function field_names()\n\t{\n\t\t// All the fields that are being validated\n\t\t$fields = array_keys(array_merge\n\t\t(\n\t\t\t$this->pre_filters,\n\t\t\t$this->rules,\n\t\t\...
[ "0.7733014", "0.7729311", "0.7505376", "0.749531", "0.74863255", "0.74810976", "0.74624634", "0.7460911", "0.741345", "0.7405654", "0.7405654", "0.7405654", "0.7376888", "0.73454535", "0.7152905", "0.7082035", "0.70511246", "0.7039239", "0.7037519", "0.6916952", "0.68929803",...
0.7870241
0
}}} Check ACL permissions
Проверка прав доступа к ACL
public function checkACL() { return parent::checkACL() || \XLite\Core\Auth::getInstance()->isPermissionAllowed('manage orders'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function checkPermissions();", "public function isAclEnabled(): bool;", "public function checkAccess() {}", "public function checkAccess() {}", "public function checkAccess() {}", "public function checkAccess() {}", "public function checkAccess() {}", "public function checkAccess() {}", "pub...
[ "0.79804915", "0.7617611", "0.759867", "0.759867", "0.75986546", "0.75986546", "0.75986546", "0.759735", "0.759735", "0.759735", "0.749672", "0.7418123", "0.72340137", "0.7157207", "0.7117054", "0.7117054", "0.7117054", "0.7117054", "0.7117054", "0.71011376", "0.70344", "0....
0.772622
1
Return true if order can be edited
Вернуть true, если заказ можно отредактировать
public function isOrderEditable() { return !\XLite::isFreeLicense(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function canEdit()\n {\n return $this->is_locked == 0;\n }", "public function can_edit() {\n return true;\n }", "public function canEdit()\n {\n return true;\n }", "function can_editorder($sessionID, $ordn, $debug) {\n\t\t$sql = Processwire\\wire('database')->prepar...
[ "0.74815583", "0.72471565", "0.71752214", "0.71580994", "0.7140332", "0.706235", "0.7052849", "0.70442003", "0.7042249", "0.7031722", "0.7014027", "0.6993747", "0.69290686", "0.6898653", "0.6837206", "0.6812711", "0.6798781", "0.6795296", "0.6743024", "0.67295295", "0.6728632...
0.79627556
0
Update order items list
Обновить список элементов заказа
protected function updateOrderItems($order) { $list = new \XLite\View\ItemsList\Model\OrderItem( array( 'order' => $order, ) ); $list->processQuick(); $order->calculateInitialValues(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateItems()\n {\n if (count($this->items)) {\n foreach ($this->items as $item) {\n $item->setQuote($this);\n }\n }\n }", "public function entry_order_update()\n {\n $ids = explode(',', $this->input->post('order'));\n\n //...
[ "0.7627306", "0.72032374", "0.7074875", "0.6977802", "0.6823428", "0.6756578", "0.6735706", "0.6704058", "0.6536095", "0.6531182", "0.6529352", "0.6511041", "0.63936687", "0.634916", "0.6324935", "0.630947", "0.6256919", "0.62137276", "0.6193889", "0.6186034", "0.6157657", ...
0.76473844
0
Return true if order changes can not be saved
Вернуть true, если изменения заказа не могут быть сохранены
protected function isForbiddenOrderChanges(\XLite\Model\Order $order) { $result = false; if (0 > $order->getTotal()) { $result = true; \XLite\Core\TopMessage::addError('Order changes cannot be saved due to negative total value'); } return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function canStoreOrder();", "protected function isValidOrder()\n {\n return true;\n }", "public function isDirty();", "public function checkIsSaved()\n {\n if (isset($this->owner->primaryKey) == false) {\n throw new ModelIsUnsaved();\n }\n }", "public func...
[ "0.698637", "0.67312485", "0.66255057", "0.6571852", "0.6566529", "0.65186507", "0.65000397", "0.64947104", "0.6460624", "0.6460462", "0.64440274", "0.63586", "0.6350329", "0.62997407", "0.6269696", "0.6269112", "0.62424123", "0.6240188", "0.622356", "0.62089396", "0.61735034...
0.71938646
0
Send order changed notification
Уведомление о изменении заказа
protected function sendOrderChangeNotification() { if ($this->getSendNotificationFlag()) { \XLite\Core\Mailer::getInstance()->sendOrderAdvancedChangedCustomer($this->getOrder()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "final public function notifyOrderUpdated(): void\n {\n $this->dirtyIndex = true;\n }", "public function sendStatusUpdateNotifications(OrderEvent $event)\n {\n $order = $event->getOrder();\n switch ($order->getStatus()) {\n\n case Order::STATUS_AWAITING_SEPA:\n ...
[ "0.71911144", "0.7125652", "0.70401776", "0.67497915", "0.6749666", "0.67492604", "0.6747845", "0.6726744", "0.66682905", "0.66682905", "0.6634167", "0.66267884", "0.6330931", "0.63096744", "0.6281023", "0.62567556", "0.6236327", "0.6232668", "0.6211969", "0.62016195", "0.619...
0.82093114
0
Get 'sendNotification' flag from request
Получить флаг 'sendNotification' из запроса
protected function getSendNotificationFlag() { return (bool) \XLite\Core\Request::getInstance()->sendNotification; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getNotification(){\n\n\n}", "public function getNotification()\n {\n return $this->notification;\n }", "public function getNotification()\n\t{\n\t\treturn $this->notification;\n\t}", "public function UpdateCustomerNotificationStatus()\n {\n if (isset($this->request->type) && (...
[ "0.6643674", "0.6101347", "0.60970205", "0.5939515", "0.58575726", "0.58271044", "0.58033174", "0.5793336", "0.5793336", "0.57884216", "0.57669735", "0.56056947", "0.55920595", "0.55623966", "0.5541666", "0.5529624", "0.5497646", "0.5479427", "0.54531026", "0.54439074", "0.54...
0.7802735
0
Send tracking information action
Действие отправки информации о трекинге
protected function doActionSendTracking() { \XLite\Core\Mailer::sendOrderTrackingInformationCustomer($this->getOrder()); \XLite\Core\TopMessage::addInfo('Tracking information has been sent'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function send() {\n\n\t\t$current_time = time();\n\t\tif ( ! $this->should_send_tracking( $current_time ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$collector = $this->get_collector();\n\n\t\t$request = new WPSEO_Remote_Request( $this->endpoint );\n\t\t$request->set_body( $collector->get_as_json() );\n\t\t$request->...
[ "0.7096486", "0.69358945", "0.682453", "0.66931885", "0.6634788", "0.6488563", "0.6303943", "0.6158637", "0.61554414", "0.60706013", "0.6038399", "0.6023353", "0.59689826", "0.5925139", "0.58939123", "0.588489", "0.582733", "0.58154535", "0.58126307", "0.58042836", "0.5778630...
0.8014362
0
Get prepared order item by item ID
Подготовьте заказ по ID элемента заказа
protected function getPreparedItemByItemId() { $order = $this->getOrder(); $request = \XLite\Core\Request::getInstance(); $attributeValues = array(); $item = $order->getItemByItemId($request->item_id); if ( $item && !empty($request->order_items[$reque...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function orderItem(): OrderItem\n {\n return $this->order_item;\n }", "abstract protected function get_item_from_db($item_id);", "function get ($id) {\n // PARAM $id : order ID\n\n $order = $this->fetch(\n \"SELECT * FROM `orders` WHERE `order_id`=?\", [$id]\n );\n $order['it...
[ "0.6799751", "0.6791881", "0.67702055", "0.67607194", "0.64836586", "0.6447149", "0.6423919", "0.63694566", "0.6281316", "0.6258854", "0.62148386", "0.6195342", "0.6160584", "0.61438626", "0.6110145", "0.60998774", "0.6099098", "0.6088165", "0.60572946", "0.6036679", "0.60159...
0.70900923
0
Get prepared order item by product ID
Подготовьте заказ по ID продукта
protected function getPreparedItemByProductId() { $order = $this->getOrder(); $request = \XLite\Core\Request::getInstance(); $item = new \XLite\Model\OrderItem; $item->setOrder($order); $item->setProduct(\XLite\Core\Database::getRepo('XLite\Model\Product')->find($request->pro...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get ($id) {\n // PARAM $id : order ID\n\n $order = $this->fetch(\n \"SELECT * FROM `orders` WHERE `order_id`=?\", [$id]\n );\n $order['items'] = $this->fetch(\n \"SELECT * FROM `orders_items` LEFT JOIN `products` USING (`product_id`) WHERE `orders_items`.order_id=?\", \n [$id], \"...
[ "0.6987807", "0.6941106", "0.6567726", "0.65455526", "0.6513611", "0.64331913", "0.6419966", "0.63701236", "0.6341698", "0.6336752", "0.63304436", "0.63212365", "0.63177216", "0.6311726", "0.6239149", "0.621374", "0.62045896", "0.6192897", "0.61899745", "0.618471", "0.6162", ...
0.748813
0
Display recalculate item price
Показать пересчёт цены товара
protected function displayRecalculateItemPrice(\XLite\Model\OrderItem $item) { \XLite\Core\Event::recalculateItem($this->assembleRecalculateItemEvent($item)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function calculatePrices()\n {\n }", "public function viewPrice()\n {\n return number_format($this->price/100, 2);\n }", "public function profit() : void {\n\t\techo ($this->price - $this->cost);\n\t}", "protected function calculatePrice()\n {\n $amount = 5 * $this->rat...
[ "0.7004675", "0.68093044", "0.67928725", "0.6758861", "0.6666877", "0.6584289", "0.6584166", "0.65273637", "0.6521449", "0.65157646", "0.65157646", "0.6499512", "0.6447349", "0.6447214", "0.6436683", "0.6380756", "0.6380756", "0.63705325", "0.6361042", "0.63405836", "0.633540...
0.73609847
0
Assemble shipping dump surcharge
Сборка дополнительной платы за доставку
protected function assembleShippingDumpSurcharge() { return $this->assembleDefaultDumpSurcharge( \XLite\Model\Base\Surcharge::TYPE_SHIPPING, \XLite\Logic\Order\Modifier\Shipping::MODIFIER_CODE, '\XLite\Logic\Order\Modifier\Shipping', static::t('Shipping cost')...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function saveShippingAction() {\n\t\tif ($this->getRequest ()->isPost ()) {\n\t\t\t$preAddr = Mage::getSingleton ( 'customer/session' )->getPreaddress ();\n\t\t\t\n\t\t\tif ($preAddr) {\n\t\t\t\t$data = array ();\n\t\t\t\tif (! empty ( $preAddr ['ShippingAddress'] [0] )) {\n\t\t\t\t\t$preData = $preAddr ['S...
[ "0.60295635", "0.58761275", "0.5868066", "0.5841104", "0.58006096", "0.5737936", "0.5722899", "0.57149225", "0.5676178", "0.56671757", "0.56558", "0.5641882", "0.56399703", "0.5519016", "0.55131835", "0.54946744", "0.54752105", "0.54737425", "0.5462623", "0.5445418", "0.54131...
0.8042508
0
Find a key the value of a property : a[key][propName] === value $array = array( 'a'=>array('prop'=>'test'), 'b'=>array('prop'=>'test2') ); assert(UArray::findKeyBy($array,'prop','test') === 'a');
Найдите ключ, значение свойства: a[key][propName] === value $array = array( 'a'=>array('prop'=>'test'), 'b'=>array('prop'=>'test2') ); assert(UArray::findKeyBy($array,'prop','test') === 'a');
public static function findKeyBy($a,$propName,$val){ foreach($a as $k=>$v){ if($v[$propName] == $val) return $k; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getKeyByValue($arr,$value) {\n\t $n=-1;\n\t foreach ($arr as $aKey=>$aItem) {\n\t\t $n++;\n\t\t //if (!isset($akey)) $aKey=$n;\n\t\t if (!is_array($aItem)) {\n\t\t\t if ($Item==$value) return $aKey;\n\t\t } else {\n\t\t\t if ($aItem[$value['key']]==$value['value']) {\n\t\t\t\t r...
[ "0.66127586", "0.62396", "0.6164314", "0.6109069", "0.6093656", "0.60645014", "0.6030728", "0.60175455", "0.6011658", "0.59614265", "0.5938352", "0.5916363", "0.58514863", "0.584443", "0.5830338", "0.5829741", "0.5827913", "0.58062315", "0.57938236", "0.57807684", "0.5771194"...
0.7644024
0
return the first value of an array or false if the array is empty
вернуть первый элемент массива или false, если массив пустой
public static function firstValue($array){ foreach($array as $elt) return $elt; return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function first(array $array): mixed\n{\n return $array ? reset($array) : null; // No falses.\n}", "public static function first($array)\n {\n $newArr = array_slice($array, 0, 1);\n\n return !empty($newArr[0]) ? $newArr[0] : false;\n }", "function first($target)\n {\n // target ...
[ "0.7752601", "0.77378595", "0.7166476", "0.69457716", "0.6910956", "0.69018996", "0.67264545", "0.6688218", "0.66717577", "0.6659745", "0.6597155", "0.6571985", "0.6570781", "0.6542186", "0.6526536", "0.6518935", "0.6496269", "0.641664", "0.63952726", "0.6390363", "0.63297534...
0.8042722
0
The "booted" method of the model.
Метод "booted" модели.
protected static function booted() { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function booted()\n {\n }", "public static function booted()\n {\n }", "public static function booted()\n {\n }", "protected static function booting()\n {\n //\n }", "public function boot()\n\t{\t\n\t}", "public function boot()\r\n {\r\n parent::boot();\r\n\r\n ...
[ "0.74500155", "0.74482244", "0.74482244", "0.731309", "0.7271187", "0.72643036", "0.72643036", "0.71871316", "0.71871316", "0.71850294", "0.71850294", "0.71707904", "0.71706986", "0.71706986", "0.71706986", "0.71706986", "0.71706986", "0.71706986", "0.71706986", "0.71706986", ...
0.76181376
1
Get an array of files attached to an inquiry.
Получить массив файлов, прикрепленных к запросу.
function getInquiryFiles($inquiryId) { $sql = " SELECT F.Id AS Id, F.Name AS Name FROM ServiceRequestFiles SRF, Files F WHERE SRF.ServiceRequest_Id = ".$inquiryId." AND SRF.File_Id = F.Id"; $result = mysql_query($sql); if (!$result) { return; } $files = array(); while ($row = my...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getFiles()\n {\n $files = [];\n if($attachmentData = $this->setAttachmentData()){\n $files['attachment'] = $this->setAttachmentData();\n }\n return $files;\n }", "public function getFiles() {\r\n\r\n $files = array();\r\n\r\n $userId= $th...
[ "0.7066114", "0.70325184", "0.67984945", "0.66662216", "0.65669227", "0.65216726", "0.650381", "0.6479447", "0.6453248", "0.6441419", "0.6441419", "0.6441419", "0.64338845", "0.6391936", "0.638207", "0.63806206", "0.6374391", "0.6305988", "0.6293139", "0.6285561", "0.6285561"...
0.7831341
0
Verifies that $result isn't false. This is a utility function to keep the code a bit cleaner/shorter. If $result is false this function will do the following: 1. Perform a mysql_query("ROLLBACK"). 2. Send a header with supplied error message. 3. exit(0). If $result isn't false this function does nothing.
Проверяет, что $result не является ложным. Это вспомогательная функция, которая позволяет сделать код немного чище и короче. Если $result является ложным, эта функция выполнит следующие действия: 1. Выполнит mysql_query("ROLLBACK"). 2. Отправит заголовок с указанным сообщением об ошибке. 3. Выполнит exit(0). Если $resu...
function verifyOrRollback($result, $message) { if (!$result) { mysql_query("ROLLBACK"); header("Status: 400 " . $message ); exit(0); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static function is_void($result) {\r\n if ($result != false) {\r\n if ($result->rowCount() > 0)\r\n return false;\r\n else\r\n return true;\r\n }\r\n else\r\n return true;\r\n //Functions::RegisterError($libError, $detail);\...
[ "0.71678555", "0.67734647", "0.6767018", "0.6710429", "0.669215", "0.66411895", "0.66334313", "0.66061234", "0.65976506", "0.65634394", "0.6486703", "0.6430389", "0.642947", "0.642947", "0.64215004", "0.6418571", "0.6409997", "0.6357039", "0.6351108", "0.6333726", "0.6333726"...
0.7652367
0
START: Population of organization combobox items $sql : source query of the combobox list $id_column : the column name where that will be used as ID of every list item $name_column : the column name where the text of each list item will be based from.
Начало: Заполнение элементов выпадающего списка организации $sql : источник запроса списка выпадающего списка $id_column : имя столбца, который будет использоваться в качестве идентификатора каждого элемента списка $name_column : имя столбца, из которого будет браться текст каждого элемента списка.
function GetComboboxItems($div_name, $span_name, $sql, $id_column, $name_column){ //$sql = "select id, category from priside.BusinessServiceCategory where parent_id = 0 order by category"; $result = mysql_query($sql); $list_html = ""; while($row = mysql_fetch_assoc($result)){ $list_html .= "<li id=\"org_".$r...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function\tdropdown_list($dbconn) {\n\t$sqlcom=\"select distinct spec_id,name from info;\";\n\t$dbres = pg_exec($dbconn, $sqlcom );\n\tif ( ! $dbres ) {echo \"Error : \" + pg_errormessage( $dbconn ); exit();} \n\t$row=0;\n\t$rowmax=pg_NumRows($dbres);\n\tprint \"<form method=\\\"post\\\" action=\\\"libSpec.php\\\">...
[ "0.64213943", "0.6167869", "0.6125558", "0.60950184", "0.60944116", "0.59681785", "0.59601563", "0.5942208", "0.5929476", "0.5928548", "0.5922223", "0.59216356", "0.59192896", "0.591603", "0.59115344", "0.58675784", "0.584209", "0.580934", "0.5800739", "0.5797972", "0.5797271...
0.7383489
0
ResourceIdentifier to the BusinessUnit.
ResourceIdentifier в BusinessUnit.
public function getBusinessUnit() { return $this->businessUnit instanceof BusinessUnitResourceIdentifierBuilder ? $this->businessUnit->build() : $this->businessUnit; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getBusinessUnit()\n {\n if (is_null($this->businessUnit)) {\n /** @psalm-var stdClass|array<string, mixed>|null $data */\n $data = $this->raw(self::FIELD_BUSINESS_UNIT);\n if (is_null($data)) {\n return null;\n }\n\n $t...
[ "0.6930536", "0.6637339", "0.63044316", "0.6227665", "0.59934264", "0.58898234", "0.5874441", "0.5657425", "0.54857695", "0.54387206", "0.54315835", "0.5357699", "0.5284133", "0.515719", "0.5157045", "0.5144215", "0.51244456", "0.5070365", "0.50633174", "0.5029309", "0.502771...
0.7044439
0
/ $Id: cleanName.inc.php 2 20110606 12:08:34Z siekiera $ XTCommerce community made shopping Copyright (c) 2003 XTCommerce Released under the GNU General Public License
/ $Id: cleanName.inc.php 2 20110606 12:08:34Z siekiera $ XTCommerce community made shopping Copyright (c) 2003 XTCommerce Released under the GNU General Public License
function cleanName($name) { $search_array=array('Рґ','Р”','С†','Р¦','СЊ','Р¬','&auml;','&Auml;','&ouml;','&Ouml;','&uuml;','&Uuml;'); $replace_array=array('ae','Ae','oe','Oe','ue','Ue','ae','Ae','oe','Oe','ue','Ue'); $name=str_replace($search_array,$replace_array,$name); $replace_param='...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sanitize_name( $name ) {\r\n\t\t$name = sanitize_title( $name ); // taken from WP's wp-includes/functions-formatting.php\r\n\t\t$name = str_replace( '-', '_', $name );\r\n\r\n\t\treturn $name;\r\n\t}", "function sanitize($name)\n {\n return preg_replace('/[^A-Za-z0-9\\-]/', '', $name);\n }"...
[ "0.73428327", "0.7171061", "0.7162467", "0.7135334", "0.7082427", "0.704659", "0.7044634", "0.699476", "0.69802916", "0.6972818", "0.69598013", "0.6958894", "0.6942777", "0.6896016", "0.6827018", "0.6795058", "0.6778622", "0.6758495", "0.6713417", "0.6568364", "0.65443236", ...
0.7192409
1
Returns the user's tag, e.g. "JamesBond0007"
Возвращает тег пользователя, например, "JamesBond0007"
function getTag(): string { return $this->username."#".$this->discriminator; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getUserTag()\n {\n return $this->UserTag;\n }", "public function getTag(): string\n {\n return $this->tag;\n }", "function get_tag_name( $tag ) {\n $tag_name = get_tag_data( $tag , 'tag_name' );\n return $tag_name;\n}", "public function getTag()\n\t{\n\t\treturn $t...
[ "0.7834184", "0.64298534", "0.64107645", "0.63278574", "0.6307316", "0.6268844", "0.6222148", "0.62217176", "0.6199497", "0.6147912", "0.6125331", "0.61216825", "0.6113474", "0.60477436", "0.59766585", "0.59766585", "0.59397507", "0.5933661", "0.5917864", "0.5917864", "0.5917...
0.7134426
1
Set item link The URL of the item.
Установить ссылку на элемент URL элемента.
public function setLink($link);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setLink($url)\n\t{\n\t\t$this->link = $url;\n\t}", "function setLink($link) {\r\n $this->_link = $link;\r\n }", "function setLink($link) {\r\n $this->_link = $link;\r\n }", "function setUrlLink(){\n if( $this->id == 0 ) return;\n $url = $this->aFields[\"url\"]->toString();\...
[ "0.7421717", "0.7329324", "0.7329324", "0.72769094", "0.71106654", "0.70349795", "0.69137734", "0.6890567", "0.681104", "0.6669389", "0.6666909", "0.66661954", "0.66640425", "0.66640425", "0.6663832", "0.664389", "0.66187286", "0.6503394", "0.64773023", "0.6470863", "0.644335...
0.7338796
1
Append item to the channel
Добавить элемент в канал
public function appendTo(ChannelInterface $channel);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function push($item)\n {\n $this->items[] = $item;\n }", "public function append($item)\n {\n array_push($this->activeValue, $item);\n }", "public function push($item)\n {\n $this->list[] = $item;\n }", "public function add($item)\n {\n $this->queueItem...
[ "0.653608", "0.64741987", "0.63849366", "0.6377925", "0.62957996", "0.6214277", "0.61332846", "0.61221683", "0.6116131", "0.6114877", "0.60834205", "0.6040669", "0.60146755", "0.59891856", "0.5976898", "0.5888219", "0.5884099", "0.58450043", "0.5839053", "0.58290565", "0.5719...
0.7123747
1
Get MatchCode value An additional test has been added (isset) before returning the property value as this property may have been unset before, due to the fact that this property is removable from the request (nillable=true+minOccurs=0)
Получить значение MatchCode. Дополнительный тест (isset) был добавлен перед возвращением значения свойства, так как это свойство может быть unset'ed ранее, поскольку это свойство может быть удалено из запроса (nillable=true+minOccurs=0)
public function getMatchCode() { return isset($this->MatchCode) ? $this->MatchCode : null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setMatchCode($matchCode = null)\n {\n // validation for constraint: string\n if (!is_null($matchCode) && !is_string($matchCode)) {\n throw new \\InvalidArgumentException(sprintf('Invalid value, please provide a string, \"%s\" given', gettype($matchCode)), __LINE__);\n ...
[ "0.64541185", "0.58730763", "0.58730763", "0.586467", "0.57677764", "0.5752052", "0.5684378", "0.5682252", "0.56803536", "0.5634089", "0.5605693", "0.5605693", "0.5591706", "0.5565673", "0.5553285", "0.55390334", "0.55312115", "0.5504667", "0.5493855", "0.5479927", "0.545722"...
0.75273037
0
Set MatchCode value This property is removable from request (nillable=true+minOccurs=0), therefore if the value assigned to this property is null, it is removed from this object
Установить значение MatchCode. Эта свойство может быть удалено из запроса (nillable=true+minOccurs=0), поэтому если значение, назначенное этой свойству, равно null, оно удаляется из этого объекта.
public function setMatchCode($matchCode = null) { // validation for constraint: string if (!is_null($matchCode) && !is_string($matchCode)) { throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($matchCode)), __LINE__); } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setCode($code);", "public function setCode($code);", "public function setMatcher(callable $code) : self\n {\n $this->matcher = $code;\n\n return $this;\n }", "public function getMatchCode()\n {\n return isset($this->MatchCode) ? $this->MatchCode : null;\n }", ...
[ "0.6168038", "0.6168038", "0.5989979", "0.5989541", "0.5847256", "0.58312285", "0.5804223", "0.57486296", "0.5688502", "0.5547329", "0.54815644", "0.5426024", "0.5417964", "0.5412028", "0.5403882", "0.53975195", "0.53975195", "0.53975195", "0.5376611", "0.5362782", "0.5357583...
0.76919746
0
Mit dieser Funktion kann ich alle User auslesen.
С помощью этой функции я могу прочитать всех пользователей.
public function getAllUsers(){ return $this->user; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function all_user()\n {\n $this->res->SetObject(RCD::SC, RCD::SC, FALSE, $this->db->get('user')->result());\n }", "public function getUsers() {\n\n $users = $this->users_model->getallusers();\n exit;\n }", "public function listarUser() {\n if(IDUSER) {\n $eval = \"SEL...
[ "0.7165581", "0.68616813", "0.68533546", "0.68479013", "0.683198", "0.6820137", "0.6802775", "0.67831945", "0.6772477", "0.6759042", "0.6733296", "0.6715137", "0.66944456", "0.66944456", "0.6669951", "0.6668016", "0.6647128", "0.6645296", "0.66284746", "0.65976834", "0.658606...
0.7200492
0
Many to Many relation, one extra has many categories, one category has many extras
Многие ко многим отношение, один дополнительный имеет много категорий, одна категория имеет много дополнительных
public function extras() { return $this->belongsToMany('App\Models\Extra', 'extra_category_extras'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function extras()\n {\n return $this->hasMany('App\\DescriptionExtra','category_id');\n }", "public function items()\n {\n return $this->belongsToMany('App\\Models\\Item', 'item_extra_categories');\n }", "public function extras()\n {\n return $this->belongsToMany('App...
[ "0.72295916", "0.6399643", "0.6204753", "0.61605823", "0.60628945", "0.60575086", "0.60459214", "0.60459214", "0.60459214", "0.59998286", "0.5970048", "0.5917506", "0.58812535", "0.5875313", "0.5865006", "0.5863388", "0.5863388", "0.5863388", "0.5859131", "0.58308107", "0.581...
0.7666871
0
Show the form for creating a new DataBeritaJur.
Показать форму для создания нового DataBeritaJur.
public function create() { return view('data_berita_jurs.create'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n // added by dandisy\n \n\n // edited by dandisy\n // return view('surat_keluar_barangs.create');\n return view('surat_keluar_barangs.create');\n }", "public function create()\n {\n return view ('kodebuku.create');\n }", "publi...
[ "0.7376853", "0.7337308", "0.7329919", "0.730424", "0.7285409", "0.7283738", "0.72829497", "0.7282011", "0.727934", "0.7275106", "0.72720456", "0.7234194", "0.716618", "0.71597815", "0.71524763", "0.7147039", "0.714214", "0.7139253", "0.71349263", "0.7124646", "0.7116811", ...
0.77275836
0
Find an specific city to display in updateprofile
Найдите конкретный город для отображения в updateprofile
public function find($id_city){ //-- return all query and use the object result in update-profile return $search = mysql_query("SELECT id_city, states.id_state, states.state, city FROM cities INNER JOIN states ON(cities.id_state = states.id_state ) WHERE id_city='".$id_city."' LIMIT 1"); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCity();", "public function getCity() {}", "public function search($city);", "function lookupRegionByCity($city){\n\t$data = M('georegion');\n\tif(strlen($city)>0){\n\t\t$condition = Array('citylist' => Array('like', '%'.$city.'%'));\n\t\tif($region = $data->where($condition)->find()){\n\t\...
[ "0.6632076", "0.65859216", "0.65700775", "0.6545348", "0.64880407", "0.63928", "0.6386226", "0.6284616", "0.62798667", "0.62798667", "0.62798667", "0.62798667", "0.62798667", "0.62798667", "0.62798667", "0.62376994", "0.6214949", "0.6187589", "0.61791545", "0.6142894", "0.611...
0.72958505
0
/ Escapes user input for displaying on page
Экранирует ввод пользователя для отображения на странице
public static function escapeForDisplay($input) { if (get_magic_quotes_gpc()) { $input = stripslashes($input); } $result = htmlspecialchars($input, ENT_QUOTES); return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function echoEscaped($input) {\r\n\t\t//htmlentities escapes all characters which have HTML character entity \r\n\t\techo htmlentities($input, ENT_QUOTES | ENT_HTML5 | ENT_IGNORE, 'ISO-8859-1', false);\r\n\t}", "function sterilize($input){\r\n return htmlspecialchars($input);\r\n }", "public ...
[ "0.68248457", "0.67773736", "0.6713038", "0.66363823", "0.65998024", "0.65998024", "0.6570563", "0.64748883", "0.64424306", "0.64416534", "0.6437058", "0.6437058", "0.6419768", "0.6416634", "0.64032143", "0.6398023", "0.63528633", "0.6347332", "0.63392526", "0.6291257", "0.62...
0.73259413
0
Valid document data provider
Допустимый поставщик данных документа
public function validDocumentDataProvider() { return [ [ 'customer_document', 'some/path/to/bucket/document1.pdf', [ 'customerId' => 123, 'documentReference' => 'F 1010101', '...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function validateData();", "function isDataValid() \n {\n return true;\n }", "private function checkData(){\n $this->datavalidator->addValidation('article_title','req',$this->text('e10'));\n $this->datavalidator->addValidation('article_title','maxlen=250',$this->text(...
[ "0.6715218", "0.66020477", "0.63300085", "0.6260909", "0.62184507", "0.62161624", "0.62118566", "0.6186857", "0.61800593", "0.6154415", "0.6154415", "0.6154415", "0.6154415", "0.6154415", "0.6154415", "0.6154415", "0.6154415", "0.61471707", "0.61259615", "0.6114034", "0.60706...
0.70822054
0
Test updating of the document's value
Тест обновления значения документа
public function testUpdateDocumentValue() { $eavDocument = $this->getEavDocumentRepo()->findOneBy(['path' => 'some/path/to/bucket/document1.pdf']); $this->assertInstanceOf(EavDocument::class, $eavDocument); $documentId = $eavDocument->getId(); $this->assertTrue($eavDocument->hasVa...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testUpdateDocument()\n {\n echo \"\\nTesting dcoument update...\";\n\n $id = \"0\";\n //echo \"\\n-----Is string:\".gettype ($id);\n $input = file_get_contents('doc_update.json');\n //echo $input;\n //$url = TestServiceAsReadOnly::$elasticsearchHost . \"...
[ "0.7118057", "0.7043425", "0.7007075", "0.6997476", "0.67915326", "0.66779196", "0.65438545", "0.65438545", "0.64412284", "0.63555014", "0.63379925", "0.6324167", "0.6301997", "0.6265667", "0.6263981", "0.6262778", "0.62392974", "0.619382", "0.61836636", "0.61777496", "0.6161...
0.7370754
0
Tests validation errors in case direct (without EavDocument preloading) EavValue delete operation
Тестирование ошибок валидации в случае прямого (без предварительной загрузки EavDocument) удаления EavValue
public function testDocumentIntegrityAfterManualValueDeletion() { $eavValue = $this->getEavValueRepo()->findOneBy(['value' => '123']); $this->em->remove($eavValue); $eavValue = $this->getEavValueRepo()->findOneBy(['value' => 'customer_invoice']); $this->em->remove($eavValue); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testValidateAndDelete() {\r\n\t\ttry {\r\n\t\t\t$postData = array();\r\n\t\t\t$this->ShopProductAttribute->validateAndDelete('invalidShopProductAttributeId', $postData);\r\n\t\t} catch (OutOfBoundsException $e) {\r\n\t\t\t$this->assertEqual($e->getMessage(), 'Invalid Shop Product Attribute');\r\n\t...
[ "0.6575598", "0.6536684", "0.62905765", "0.62607133", "0.6235072", "0.6176914", "0.6174171", "0.6168373", "0.6158642", "0.61577034", "0.6135092", "0.6107904", "0.60938704", "0.6034502", "0.60340774", "0.6000965", "0.59548044", "0.5922086", "0.59037936", "0.59010446", "0.58868...
0.735781
0
Tests validation errors in case direct (without EavDocument preloading) EavValue update operation
Тестирование ошибок проверки в случае прямого (без предварительной загрузки EavDocument) обновления операции EavValue
public function testValueValidationForUpdate() { $eavValue = $this->getEavValueRepo()->findOneBy(['value' => 'customer_invoice']); $this->assertNotNull($eavValue); $eavValue->setValue('not_existing_type'); $this->em->persist($eavValue); try { $this->em->flush(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testUpdateDocumentValueFailed()\n {\n $eavDocument = $this->getEavDocumentRepo()->findOneBy(['path' => 'some/path/to/bucket/document1.pdf']);\n\n $this->assertInstanceOf(EavDocument::class, $eavDocument);\n $this->assertTrue($eavDocument->hasValue('customerId'));\n\n ...
[ "0.73958814", "0.6490489", "0.6309547", "0.62958384", "0.620007", "0.61726093", "0.61696255", "0.61566377", "0.6146251", "0.6106605", "0.60515463", "0.59927195", "0.59907347", "0.59758717", "0.5971213", "0.5963221", "0.59443307", "0.590058", "0.58937794", "0.5877421", "0.5839...
0.7535972
0
Test deletion of the document with related values
Тест удаления документа с связанными значениями
public function testDeleteDocumentWithValues() { $eavDocument = $this->getEavDocumentRepo()->findOneBy(['path' => 'some/path/to/bucket/document1.pdf']); $this->assertInstanceOf(EavDocument::class, $eavDocument); $documentId = $eavDocument->getId(); $values = $eavDocument->getValues...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testDocumentIntegrityAfterManualValueDeletion()\n {\n $eavValue = $this->getEavValueRepo()->findOneBy(['value' => '123']);\n $this->em->remove($eavValue);\n\n $eavValue = $this->getEavValueRepo()->findOneBy(['value' => 'customer_invoice']);\n $this->em->remove($eavVal...
[ "0.6988896", "0.6979224", "0.6957141", "0.6836654", "0.6639289", "0.6561544", "0.6442095", "0.6435984", "0.6400958", "0.6383823", "0.6330451", "0.63080156", "0.62951434", "0.6287781", "0.6285269", "0.627901", "0.6265377", "0.6254168", "0.6242549", "0.6241753", "0.6215747", ...
0.707446
0
Provides an ArrayCollection of Fixtures that should be loaded for the test
Предоставляет ArrayCollection фикстур, которые должны быть загружены для теста
protected static function getFixtures() { return new ArrayCollection([ new EavTypeFixture(), new EavAttributeFixture(), ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected function getFixtures();", "public function _fixtures()\n {\n return [\n 'user' => [\n 'class' => AdminUserFixture::class,\n 'dataFile' => codecept_data_dir() . 'admin_user.php',\n ],\n 'auth' ...
[ "0.7476397", "0.74419063", "0.73265547", "0.7321824", "0.72778094", "0.7208631", "0.7136346", "0.71081346", "0.71011835", "0.7079089", "0.69585353", "0.695261", "0.6941145", "0.68353784", "0.6775201", "0.6768056", "0.67570114", "0.6740962", "0.6696951", "0.6581422", "0.655687...
0.78056586
0
Add a "Comments" heading above comments except on forum pages.
Добавьте заголовок "Комментарии" над комментариями, кроме страниц форума.
function maennaco_preprocess_comment_wrapper(&$vars) { if ($vars['content'] && $vars['node']->type != 'forum') { $vars['content'] = '<h2 class="comments">' . t('Comments') . '</h2>' . $vars['content']; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function pmi_preprocess_comment_wrapper(&$vars) {\n if ($vars['content'] && $vars['node']->type != 'forum') {\n $vars['content'] = '<h2 class=\"comments\">'. t('Comments') .'</h2>'. $vars['content'];\n }\n}", "function garland_preprocess_comment_wrapper(&$vars) {\n if ($vars['content'] && $vars['node']->t...
[ "0.7024877", "0.7012147", "0.68652964", "0.6535666", "0.6456594", "0.6193357", "0.6185523", "0.6176979", "0.6143402", "0.6097398", "0.60915667", "0.60855365", "0.6055256", "0.6025616", "0.5995442", "0.59760547", "0.59479755", "0.5937607", "0.5905697", "0.5888124", "0.5864695"...
0.7028442
0
Returns list of content containers
Возвращает список контейнеров содержимого
public function getContentContainers($filter = null) { return $this->contentManager->listContentContainers($filter); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getContainers()\n {\n }", "protected function findAll()\n {\n return ContainerPage::find()->contentContainer($this->contentContainer)->all();\n }", "public function getContentList() {\r\n\t\tif (!$this->read) {\r\n\t\t\t$this->open();\r\n\t\t\t$this->readContent();\r\n\t\t}\r...
[ "0.7253063", "0.71347934", "0.7110143", "0.70974594", "0.70974594", "0.70158976", "0.69452536", "0.69386435", "0.6728088", "0.67231", "0.65609163", "0.65056217", "0.6492496", "0.6490012", "0.64717144", "0.6427491", "0.64017844", "0.6377951", "0.6326532", "0.6309454", "0.63094...
0.7478008
0
Test the service throws an Exception for an invalid geographic location.
Проверьте, что служба выбрасывает исключение для недопустимого географического положения.
public function testItThrowsException() { $location = "00000,us"; $response = $this->api->send_request($location); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testGetInvalidLocationByLocationStreetOne() {\n\t\t// grab a location by searching for street one that does not exist\n\t\t$location = Location::getLocationByLocationStreetOne($this->getPDO(), \"That's a ghost street\");\n\t\t$this->assertCount(0, $location);\n\t}", "public function testInvalidDa...
[ "0.7338228", "0.7184018", "0.71201944", "0.711983", "0.6837268", "0.68037355", "0.6784723", "0.66832143", "0.66812533", "0.6641753", "0.6628628", "0.6590509", "0.6578969", "0.64600754", "0.64552325", "0.6444178", "0.6433546", "0.6409083", "0.63899344", "0.6386205", "0.6377219...
0.73615885
0
Test the service returns a full weather report.
Тестирование службы возвращает полный отчет о погоде.
public function testItReturnsFullWeatherReport() { $weather = json_decode($this->api->full_weather_report($this->location)); $this->assertObjectHasAttribute('weather', $weather); $this->assertObjectHasAttribute('main', $weather); $this->assertObjectHasAttribute('wind', $weather); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getWeatherData() {\n\t\t$this->cleanCache();\n\t\tif (!$this->useCache || !file_exists($this->cache_path) || @filemtime(($this->cache_path) + $this ->cachtime < time()) || file_get_contents($this->cache_path) == \"\") {\n\t\t\t$weather_api_url = \"http://query.yahooapis.com/v1/public/yql?q=select+...
[ "0.636361", "0.626142", "0.62533706", "0.6181102", "0.6147571", "0.61386526", "0.6057191", "0.6029779", "0.59923106", "0.59772474", "0.59524965", "0.58934015", "0.5854906", "0.58404315", "0.5816359", "0.57868946", "0.5771266", "0.5761259", "0.57552344", "0.5724956", "0.572145...
0.82968783
0
Find the WellKnown record for GS1 Resolver
Найдите запись WellKnown для GS1 Resolver
public function readWellKnownRecord() { //Set up the correct collection: $collection = $this->mongoDbClient->gs1resolver->wellknown; //Search and retrieve the document try { $result = $collection->findOne(['_id' => 'gs1resolver.json']); } catch (M...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_source_srid() {\n\t\t# According to Konformitaetsbedingung 2.1.3.1 there needs to be a standard gml:Envelope in each valid xplan-file.\n\t\t# A fallback value will be provided as conformity currently cannot be validated at the moment of loading (schema could be validated with xsd-validator)\n\t\t\n\t\...
[ "0.5496611", "0.54453313", "0.54127806", "0.5111411", "0.5106458", "0.50561434", "0.49476188", "0.49292335", "0.49238744", "0.49231845", "0.49231845", "0.49077573", "0.4892329", "0.48891354", "0.48559245", "0.4781165", "0.475656", "0.47383854", "0.47245014", "0.46917495", "0....
0.732825
0
Get the AWS S3 Adapter
Получить адаптер AWS S3
public function getAdapter() { $client = new S3Client([ 'credentials' => [ 'key' => $this->accessKey, 'secret' => $this->secret, ], 'region' => $this->region, 'version' => $this->version, // or "latest" //'profile...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getS3Adapter(array $config): AwsS3Adapter\n {\n return app('filesystem')->disk(Arr::get($config, 'disk', 's3'))->getAdapter();\n }", "public function getS3() {\r\n if (empty($this->s3)) {\r\n try {\r\n $this->s3 = new AmazonS3();\r\n } c...
[ "0.7414219", "0.72534543", "0.7060382", "0.6906351", "0.68873507", "0.68562055", "0.68512285", "0.6689838", "0.66870874", "0.6641488", "0.6277621", "0.6270663", "0.6235944", "0.61862206", "0.6165559", "0.6117353", "0.60716796", "0.6069459", "0.6048446", "0.5984131", "0.593636...
0.859698
0
Build the bucket URL
Создайте URL-адрес бакета
protected function getBucketUrl() { return 'https://'.$this->bucketName.'.s3.'.($this->region ? $this->region : '').'.amazonaws.com'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getS3BaseUri() {\n $aws_base_path = $this->container->getParameter('aws_base_path');\n $aws_bucket = $this->container->getParameter('aws_bucket');\n $full_path = $aws_base_path . '/' . $aws_bucket;\n return $full_path;\n }", "public function getS3BaseUri() {\n ...
[ "0.7014491", "0.7014491", "0.6910457", "0.6414142", "0.63381904", "0.61120105", "0.6106656", "0.60915726", "0.6053032", "0.60356194", "0.6005098", "0.59959793", "0.59567404", "0.5925837", "0.5912414", "0.59008706", "0.5858007", "0.58434397", "0.5789723", "0.5765183", "0.57240...
0.7638641
0
Add settings to Genesis sanitization Maybe this should be moved to the module class so each module can extend the method with their own options
Добавить настройки для санитизации Genesis. Возможно, это должно быть перенесено в класс модуля, чтобы каждый модуль мог расширить метод с собственными опциями.
function sanitization() { genesis_add_option_filter( 'one_zero', GENESIS_SIMPLE_SETTINGS_FIELD, array( ) ); genesis_add_option_filter( 'no_html', GENESIS_SIMPLE_SETTINGS_FIELD, array( ) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function register_settings() {\n register_setting( 'athen_tweaks', 'athen_tweaks', array( $this, 'admin_sanitize' ) ); \n }", "public function setSettings() {\n $args = array(\n array(\n 'option_group' => 'pm_plugin_settings',\n 'option_name' => 'pm_plugin',\n 'call...
[ "0.64061075", "0.6387362", "0.6376053", "0.63671553", "0.6284281", "0.62071973", "0.6204718", "0.6171301", "0.61510396", "0.60380197", "0.60270417", "0.5991747", "0.59739363", "0.59674966", "0.59461987", "0.59141874", "0.5902068", "0.59012085", "0.59008646", "0.5872515", "0.5...
0.7113084
0
/ GetCustomCountQuery returns a fully formed SQL statement that will count the results. This query must return the correct number of results that GetCustomQuery would, given the same criteria
/ GetCustomCountQuery возвращает полностью сформированное SQL-запрос, который будет считать результаты. Этот запрос должен возвращать правильное количество результатов, которое вернул бы GetCustomQuery при тех же критериях
static function GetCustomCountQuery($criteria) { $sql = "select count(1) as counter from `users`"; // the criteria can be used or you can write your own custom logic. // be sure to escape any user input with $criteria->Escape() $sql .= $criteria->GetWhere(); return $sql; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getCountQuery() {\n if ($this->customCountQuery) {\n return $this->customCountQuery;\n }\n else {\n return $this->query->countQuery();\n }\n }", "static function GetCustomCountQuery($criteria)\r\n\t{\r\n\t\t$sql = \"select count(1) as counter from `agenda_sgp`\";\r\n\r\n...
[ "0.8236581", "0.75073904", "0.74491024", "0.6974801", "0.6960284", "0.6953397", "0.6841704", "0.68253005", "0.6774736", "0.67391455", "0.671871", "0.66467863", "0.66311604", "0.6607868", "0.6573275", "0.6573275", "0.65619874", "0.6540272", "0.65218014", "0.6519896", "0.649568...
0.7570678
1
Register a new filter at the filterchain
Зарегистрируйте новый фильтр в цепочке фильтров
public function registerFilter(Chainr_Filter $filter) { $this->filterChain->register($filter); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function registerFilterChain()\n\t{\n\t\t//filters\n\t\t$this->filters['deserial'] = 'deserializationFilter';\n\t\t$this->filters['batch'] = 'batchProcessFilter';\n\t\t$this->filters['serialize'] = 'serializationFilter';\n\t}", "public function addFilter(callable $filter);", "public function register...
[ "0.81039613", "0.7609429", "0.7591744", "0.7407812", "0.73641235", "0.71312636", "0.71222615", "0.70693445", "0.70623314", "0.7014586", "0.6945525", "0.6840712", "0.6708937", "0.665934", "0.66282296", "0.6624293", "0.6606865", "0.65636563", "0.65282106", "0.65198267", "0.6497...
0.80372554
1
List all table fields
Перечислить все поля таблицы
public function list_fields() { return $this->db->list_fields($this->_table()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAllFields();", "function getTableFields($table) {\n return $this->select(\"show fields from $table\");\n }", "public function getListFields();", "public function listFields($table)\r\n {\r\n return $this->fetchItems($this->query(\"SHOW FIELDS...
[ "0.82170165", "0.79293627", "0.78464794", "0.7735504", "0.76905555", "0.7637615", "0.7621922", "0.7621922", "0.7621922", "0.7621922", "0.7621922", "0.7597616", "0.7456968", "0.74427027", "0.73818773", "0.7363267", "0.7363267", "0.7363267", "0.7363267", "0.7363267", "0.7363267...
0.81246734
1
Retrieve and generate a dropdownfriendly array of the data in the table based on a key and a value.
Получить и сгенерировать массив, удобный для использования в выпадающем списке, на основе данных из таблицы, используя ключ и значение.
public function dropdown() { $args = func_get_args(); if (count($args) == 2) { list($key, $value) = $args; } else { $key = $this->primary_key; $value = $args[0]; } $this->_callbacks('before_get', array($key, $value)); if ($this->resu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function drop_down()\n\t{\n\t\t$args = func_get_args();\n\n\t\tif(count($args) == 2)\n\t\t{\n\t\t\tlist($key, $value) = $args;\n\t\t}\n\t\telse {\n\t\t\t$key = $this->primary_key;\n\t\t\t$value = $args[0];\n\t\t}\n\n\t\t$this->trigger('before_dropdown', array($key, $value));\n\n\t\t$result = $this->db->select(arra...
[ "0.7465868", "0.7340904", "0.7305427", "0.70666003", "0.69728434", "0.65550053", "0.6554254", "0.6271945", "0.6227102", "0.61971086", "0.616585", "0.616585", "0.6155632", "0.61116415", "0.6094811", "0.6063492", "0.6043429", "0.6014441", "0.5925427", "0.59198546", "0.5912233",...
0.77348036
0
Sets WHERE depending on the number of parameters, has 4 modes: 1. ($id) primary key value mode 2. (array("name"=>$name)) associative array mode 3. ("name", $name) custom key/value mode 4. ("id", array(1, 2, 3)) where in mode
Sets WHERE в зависимости от количества параметров имеет 4 режима: 1. ($id) режим значения первичного ключа 2. (array("name"=>$name)) режим ассоциативного массива 3. ("name", $name) режим пользовательского ключа/значения 4. ("id", array(1, 2, 3)) режим where in
private function _set_where($params) { if (count($params) == 1) { if (!is_array($params[0]) && !strstr($params[0], "'")) { $this->db->where($this->primary_key, $params[0]); // 1. } else { $this->db->where($params[0]); // 2. } } elseif (...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function where()\n {\n $args = func_get_args();\n $count = count($args);\n \n if ($count == 1) {\n if (is_array($args[0])) {\n # This is expected to be a column => value associated array.\n # In this case, the array is stored as is.\n ...
[ "0.69818056", "0.6781005", "0.67592454", "0.6590336", "0.6474417", "0.63325703", "0.6263484", "0.6235511", "0.6220795", "0.6202309", "0.6201893", "0.619922", "0.6173831", "0.6173228", "0.6173058", "0.6166605", "0.61619955", "0.61513615", "0.61460054", "0.613577", "0.61254406"...
0.73595166
0
Return a US style date format
Вернуть дату в формате, используемом в США
function sc_us_date_format($date){ return date('m/d/Y', $date); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sc_date_format($date){\n\t$CI =& get_instance();\n\tif($CI->session->userdata('locale') =='uk'){\n\t\treturn date('d/m/Y', $date);\n\t}else{\n\t\treturn date('m/d/Y', $date);\n\t}\n}", "private function format()\n {\n return config('app.locale') != 'en' ? 'd/m/Y' : 'm/d/Y';\n }", "public ...
[ "0.7224971", "0.7192705", "0.7110512", "0.7093999", "0.7078693", "0.70440274", "0.70440274", "0.7036326", "0.7001148", "0.6993213", "0.6960304", "0.6934747", "0.69202304", "0.6912458", "0.6906909", "0.69035256", "0.68759483", "0.68486285", "0.6845312", "0.6824403", "0.6811912...
0.77569133
0
Function to calculate for level timed races Parameters: $elapsed Type: integer, number of seconds of elapsed time $handicap Type: This is ignored anyway. Returns:integer, number of seconds of corrected time
Функция для расчета для уровневых тайм-рейсов Параметры: $elapsed Тип: целое число, количество секунд прошедшего времени $handicap Тип: Это игнорируется в любом случае. Возвращает: целое число, количество секунд исправленного времени
function Level_calc($elapsed, $handicap = null, $reverse = null){ return $elapsed; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function PY_calc($elapsed, $handicap){\n\t// Parameters: \t$elapsed\n\t//\t\t\t\tType: integer, number of seconds of elapsed time\n\t// \t\t\t\t$handicap\n\t//\t\t\t\tType: float, the RYA PY handicap value\n\t// Returns:\t\tinteger, number of seconds of corrected time\n\n\t\t// Different countries use different PY...
[ "0.6801696", "0.6601908", "0.62738234", "0.5625131", "0.5615995", "0.5331435", "0.51755434", "0.5056403", "0.5001489", "0.4967659", "0.496021", "0.4958862", "0.4942641", "0.49293235", "0.49268526", "0.49163473", "0.49162495", "0.4907132", "0.4892565", "0.48409867", "0.4813486...
0.7367898
0
/ Set up some standards to save CPU later / Initial ipsclass, set up some variables for later Populates: $this>time_options, $this>num_format, $this>get_magic_quotes, $this>ip_address $this>user_agent, $this>browser, $this>operating_system
// Установить некоторые стандарты для экономии процессора позже // Начальные ipsclass, установить некоторые переменные для дальнейшего использования Заполняет: $this>time_options, $this>num_format, $this>get_magic_quotes, $this>ip_address $this>user_agent, $this>browser, $this>operating_system
function initiate_ipsclass() { //----------------------------------------- // Version numbers //----------------------------------------- //$this->acpversion = '210015.060501.u'; if ( strstr( $this->acpversion , '.' ) ) { list( $n, $b, $r ) = explode( ".", $this->acpversion ); } else { $n...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function init()\n {\n global $g_comp_database;\n\n // We need the catg_ip DAO for a few awesome IPv6 methods.\n $this->m_ip_dao = new isys_cmdb_dao_category_g_ip($g_comp_database);\n\n // We set the header information because we don't accept anything than JSON.\n header...
[ "0.6663937", "0.6489266", "0.6335373", "0.6227281", "0.6211156", "0.60748255", "0.60321283", "0.6029289", "0.59888315", "0.5954565", "0.5902744", "0.58918655", "0.5868165", "0.5846813", "0.5781906", "0.576869", "0.5759446", "0.5755019", "0.57388586", "0.5702686", "0.5692096",...
0.80831605
0
/ Get browser Return: unknown, windows, mac / Fetches the user's operating system
/ Получить браузер Возвращается: неизвестно, windows, mac / Получает операционную систему пользователя
function fetch_os() { $useragent = strtolower($this->my_getenv('HTTP_USER_AGENT')); if ( strstr( $useragent, 'mac' ) ) { return 'mac'; } if ( preg_match( '#wi(n|n32|ndows)#', $useragent ) ) { return 'windows'; } return 'unknown'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getBrowser() \n { \n $u_agent = $_SERVER['HTTP_USER_AGENT']; \n $bname = 'Unknown';\n $platform = 'Unknown';\n $version= \"\";\n $ub=\"\";\n //print($u_agent);\n //First get the platform?\n if (preg_match('/Android/i', $u_agent)) {\n ...
[ "0.82580155", "0.794152", "0.7875487", "0.78738177", "0.77613384", "0.77553695", "0.7721025", "0.7686045", "0.76706034", "0.761449", "0.76116824", "0.76023364", "0.7521524", "0.7472141", "0.7464896", "0.74561274", "0.74446124", "0.7436188", "0.74257624", "0.74202406", "0.7417...
0.82032233
1
/ UPDATE FORUM CACHE / Updates forum cache (loads all, recaches all)
/ ОБНОВЛЕНИЕ КАССЫ ФОРУМА / Обновление кэша форума (загрузка всех, перезапись всех)
function update_forum_cache() { $ignore_me = array( 'redirect_url', 'redirect_loc', 'rules_text', 'permission_custom_error', 'notify_modq_emails' ); if ( isset($this->vars['forum_cache_minimum']) AND $this->vars['forum_cache_minimum'] ) { $ignore_me[] = 'description'; $ignore_me[] = 'rules_title'; } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateCache();", "function update_cache( $v=array() )\n\t{\n\t\t//-----------------------------------------\n\t\t// Don't cache forums?\n\t\t//-----------------------------------------\n\t\t\n\t\tif ( $v['name'] == 'forum_cache' AND isset($this->vars['no_cache_forums']) AND $this->vars['no_cache_...
[ "0.7577632", "0.70351887", "0.685945", "0.6851236", "0.6640841", "0.64499795", "0.6273942", "0.62531495", "0.6175319", "0.61461526", "0.61046493", "0.60698485", "0.60532033", "0.6043134", "0.6030009", "0.60277957", "0.6022973", "0.60223186", "0.6004978", "0.5998739", "0.59800...
0.7846294
0
/ Process Mail Queue / Process mail queue
/ Обработка очереди почты / Обработка очереди почты
function process_mail_queue() { //----------------------------------------- // SET UP //----------------------------------------- $this->vars['mail_queue_per_blob'] = isset($this->vars['mail_queue_per_blob']) ? $this->vars['mail_queue_per_blob'] : 5; $this->cache['systemvars']['mail_queue'] = iss...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function exec_queue()\n\t{\n\t\t$vbulletin =& $this->registry;\n\n\t\tif ($vbulletin->options['usemailqueue'] == 2)\n\t\t{\n\t\t\t// Lock mailqueue table so that only one process can\n\t\t\t// send a batch of emails and then delete them\n\t\t\t$vbulletin->db->lock_tables(array('mailqueue' => 'WRITE'));\n\t\t}\n\n\...
[ "0.7930832", "0.76679206", "0.6639054", "0.65608805", "0.6526934", "0.6508077", "0.650692", "0.649666", "0.6442103", "0.6407312", "0.6387903", "0.6366192", "0.63124305", "0.62754923", "0.62521124", "0.6211839", "0.6200173", "0.6181114", "0.6107626", "0.6097427", "0.60280704",...
0.8435674
0
/ Load a ACP template file / Load an ACP skin template file for use
/ Загрузить файл шаблона ACP / Загрузить файл шаблона кожи ACP для использования
function acp_load_template( $template ) { if ( ! $this->skin_acp ) { $this->skin_acp = 'IPB2_Standard'; } require_once( ROOT_PATH."skin_acp/".$this->skin_acp."/acp_skin_html/".$template.".php" ); $tmp = new $template(); $tmp->ipsclass =& $this; return $tmp; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function loadTemplate() {\n\t\t\tinclude('template.inc.php');\n\t\t\t$this->mainTemplate = new Template();\n\t\t\t$this->mainTemplate->readTpl('main');\n\t\t}", "public function loadTemplate()\n\t\t{\n\t\t}", "public function LoadTemplate($sFilename) {\t\t\n\t}", "function load_template($_template_fi...
[ "0.6931667", "0.6611182", "0.63770056", "0.63752", "0.62889695", "0.6271695", "0.6263604", "0.6198815", "0.6166395", "0.61058134", "0.6065634", "0.6040346", "0.6006256", "0.5993739", "0.59384865", "0.59332705", "0.59026015", "0.58658713", "0.5850083", "0.5843157", "0.58322644...
0.74750453
0
/ Require, parse and return an array containing the language stuff / Load an ACP language file. Populates $this>lang
/ Требуется, парсится и возвращается массив, содержащий информацию о языке / Загрузка файла языка ACP. Заполняет $this>lang
function acp_load_language( $file="" ) { if ( ! $this->lang_id ) { $this->lang_id = $this->member['language'] ? $this->member['language'] : $this->vars['default_language']; if ( ($this->lang_id != $this->vars['default_language']) and ( ! is_dir( ROOT_PATH."cache/lang_cache/".$this->lang_id ) ) )...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function read() \n {\n if ($this->lang == '') $this->lang = App::getLocale();\n $this->path = base_path().'/resources/lang/'.$this->lang.'/'.$this->file.'.php';\n $this->arrayLang = Lang::get($this->file);\n if (gettype($this->arrayLang) == 'string') $this->arrayLang = array(...
[ "0.73287755", "0.7170706", "0.70908755", "0.7008337", "0.6873602", "0.68580997", "0.685445", "0.6806519", "0.6797466", "0.6792506", "0.6765948", "0.6724352", "0.67217886", "0.6671896", "0.6666042", "0.66603005", "0.66513383", "0.66487026", "0.66208386", "0.6618741", "0.660208...
0.719925
1
/ Content search hightlight / Replaces text with highlighted blocks
/ Поиск содержимого выделение / Заменяет текст на выделенные блоки
function content_search_highlight( $text, $highlight ) { //----------------------------------------- // INIT //----------------------------------------- $highlight = $this->parse_clean_value( urldecode( $highlight ) ); $loosematch = strstr( $highlight, '*' ) ? 1 : 0; $keywords = str_replace( '*', '',...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function decode_highlight_search_results( $text ) {\n if ( is_search() ) {\n \t$sr = get_search_query();\n\t\t$keys = implode( '|', explode( ' ', get_search_query() ) );\n\t\tif ($keys != '') { // Check for empty search, and don't modify text if empty\n\t\t\t$text = preg_replace( '/(' . $keys .')/iu', '<mark...
[ "0.7288386", "0.71174186", "0.7074223", "0.70068306", "0.67620116", "0.6710118", "0.67015654", "0.6671012", "0.6658104", "0.65977186", "0.6562116", "0.63687605", "0.6361518", "0.634943", "0.6315007", "0.62904185", "0.6215897", "0.6215399", "0.6213451", "0.6178886", "0.6067447...
0.7621918
0
/ XSS Clean: Nasty HTML / Remove script tags from HTML (well, best shot anyway)
/ XSS Clean: Неприятный HTML / Удаление тегов скриптов из HTML (в общем, насколько это возможно)
function xss_html_clean( $html ) { //----------------------------------------- // Opening script tags... // Check for spaces and new lines... //----------------------------------------- $html = preg_replace( "#<(\s+?)?s(\s+?)?c(\s+?)?r(\s+?)?i(\s+?)?p(\s+?)?t#is" , "&lt;script" , $html ); $html =...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function clean_html($html)\r\n{\r\n\t$html = preg_replace('/<script\\b[^>]*>(.*?)<\\/script>/is', \"\", $html);\r\n\t$html = preg_replace('/<style\\b[^>]*>(.*?)<\\/style>/is', \"\", $html);\r\n\t$html = preg_replace('/<link \\b[^>]*>(.*?)/is', \"\", $html);\r\n\r\n\treturn $html;\r\n}", "function clean_evil_tags...
[ "0.76953495", "0.76366156", "0.75242275", "0.75191516", "0.7439052", "0.7343403", "0.7316779", "0.7270205", "0.7215129", "0.7183738", "0.7139952", "0.7125731", "0.71240526", "0.706455", "0.7056384", "0.70540756", "0.70534205", "0.7041985", "0.6983359", "0.69827336", "0.697327...
0.8055647
0
/ HAX Check executable code / Checks for executable code
/ Проверка исполняемого кода / Проверка на наличие исполняемого кода
function hax_check_for_executable_code( $text='' ) { //----------------------------------------- // Test //----------------------------------------- if ( preg_match( "#include|require|include_once|require_once|exec|system|passthru|`#si", $text ) ) { return TRUE; } return FALSE; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isExecutable(): bool;", "public function getExecutableCode(): string;", "public function testExecutableLines() {\n\t\tdo {\n\t\t\t// These lines should be ignored\n\t\t\t//\n\n\t\t\t/* And these as well are ignored */\n\n\t\t\t/**\n\t\t\t * Testing never proves the absence of faults,\n\t\t\t * ...
[ "0.6404987", "0.63047", "0.6201137", "0.6117604", "0.60923034", "0.59537566", "0.5916962", "0.581912", "0.57358354", "0.5649017", "0.56457555", "0.5609315", "0.5579336", "0.5559956", "0.55553925", "0.5484412", "0.5426609", "0.5425053", "0.54232424", "0.54074585", "0.5399883",...
0.79373485
0
/ txt_filename_clean Clean filenames... / Clean a string to prevent file traversal issues
/ txt_filename_clean Очистка имен файлов... / Очистка строки для предотвращения проблем с переходом между директориями
function txt_filename_clean( $t ) { $t = $this->txt_alphanumerical_clean( $t, '.' ); $t = preg_replace( '#\.{1,}#s', '.', $t ); return $t; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function clean($filename) \n {\n return preg_replace('/[^0-9a-z\\.\\_\\-]/i','', strtolower($filename));\n }", "function cleanFileName($fileName)\n {\n // remove all special chars and keep only alphanumeric chars\n $fileName = preg_replace(\"/[^a-zA-Z0-9- .]/\", \"\", trim($fileName...
[ "0.7226636", "0.71996677", "0.7081977", "0.7068488", "0.69993496", "0.698021", "0.6770819", "0.6734389", "0.6714323", "0.6712471", "0.6689857", "0.6682539", "0.6676493", "0.6667293", "0.6664809", "0.6642522", "0.6631256", "0.65814674", "0.65516025", "0.65275717", "0.6522782",...
0.7420139
0
/ txt_md5_clean Clean up MD5 hashes / Returns a cleaned MD5 hash
/ txt_md5_clean Очистка хэшей MD5 / Возвращает очищенный хэш MD5
function txt_md5_clean( $t ) { return preg_replace( "/[^a-zA-Z0-9]/", "" , substr( $t, 0, 32 ) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function generateMD5Pass() {\n $plaintext = $this->generator->generateString(8, '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!@#$%^+');\n $hash = md5($plaintext);\n return $hash;\n }", "public function getMd5(): string;", "function is_md5($str)\n{\n\t//return false;\n\tretur...
[ "0.61390287", "0.61289364", "0.6110845", "0.5843", "0.5765471", "0.57389927", "0.5735733", "0.5716435", "0.5683292", "0.55890065", "0.5574767", "0.5525581", "0.5518164", "0.5473088", "0.5462147", "0.5459561", "0.5458615", "0.54270583", "0.5403831", "0.5388328", "0.5361892", ...
0.7748718
0
/ txt_stripslashes Make Big5 safe only strip if not already... / Remove slashes if magic_quotes enabled
/ txt_stripslashes Делает безопасным только при использовании Big5, удаляет слеши только если не уже... / Удалить слеши, если включено magic_quotes
function txt_stripslashes($t) { if ( $this->get_magic_quotes ) { $t = stripslashes($t); $t = preg_replace( "/\\\(?!&amp;#|\?#)/", "&#092;", $t ); } return $t; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cleanText($str) {\r\n $str = @trim($str);\r\n if (get_magic_quotes_gpc()) {\r\n $str = stripslashes($str);\r\n }\r\n return $str;\r\n}", "function txt_safeslashes($t=\"\")\n\t{\n\t\treturn str_replace( '\\\\', \"\\\\\\\\\", $this->txt_stripslashes($t));\n\t}", "function bwm_clean($s...
[ "0.7493485", "0.73703194", "0.7269341", "0.72181493", "0.72104377", "0.72050405", "0.7162849", "0.71528524", "0.7143947", "0.7110766", "0.70800537", "0.7077103", "0.70490474", "0.70359766", "0.69798195", "0.6970172", "0.68985367", "0.6898264", "0.6890047", "0.68774706", "0.68...
0.755711
0
/ txt_raw2form makes _POST text safe for text areas / Convert text for use in a textarea
/ txt_raw2form делает _POST текст безопасным для текстовых полей / Преобразование текста для использования в текстовом поле
function txt_raw2form($t="") { $t = str_replace( '$', "&#036;", $t); if ( $this->get_magic_quotes ) { $t = stripslashes($t); } $t = preg_replace( "/\\\(?!&amp;#|\?#)/", "&#092;", $t ); //--------------------------------------- // Make sure macros aren't converted //------------------------...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function handleFormInput($a_text, $a_stripslashes = true)\n\t{\n\t\t$a_text = str_replace(\"<\", \"&lt;\", $a_text);\n\t\t$a_text = str_replace(\">\", \"&gt;\", $a_text);\n\t\tif($a_stripslashes)\n\t\t\t$a_text = ilUtil::stripSlashes($a_text);\n\t\t\n\t\treturn $a_text;\n\t}", "function txt_form2raw($t=\"\")\n\t...
[ "0.69879556", "0.6888469", "0.6513916", "0.64248264", "0.63510996", "0.629223", "0.618613", "0.6139128", "0.60987395", "0.60081214", "0.6005362", "0.5989194", "0.59831065", "0.59759784", "0.59340274", "0.592039", "0.5915888", "0.58737713", "0.5866813", "0.58386433", "0.583798...
0.723241
0
/ txt_htmlspecialchars Custom version of htmlspecialchars to take into account mb chars / htmlspecialchars including multibyte characters
/ txt_htmlspecialchars Непереводимая версия htmlspecialchars с учетом mb-символов / htmlspecialchars с поддержкой многобайтных символов
function txt_htmlspecialchars($t="") { // Use forward look up to only convert & not &#123; $t = preg_replace("/&(?!#[0-9]+;)/s", '&amp;', $t ); $t = str_replace( "<", "&lt;" , $t ); $t = str_replace( ">", "&gt;" , $t ); $t = str_replace( '"', "&quot;", $t ); $t = str_replace( "'", '&#039;', $t ); re...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function txt_UNhtmlspecialchars($t=\"\")\n\t{\n\t\t$t = str_replace( \"&amp;\" , \"&\", $t );\n\t\t$t = str_replace( \"&lt;\" , \"<\", $t );\n\t\t$t = str_replace( \"&gt;\" , \">\", $t );\n\t\t$t = str_replace( \"&quot;\", '\"', $t );\n\t\t$t = str_replace( \"&#039;\", \"'\", $t );\n\t\t\n\t\treturn $t;\n\t}", ...
[ "0.7489141", "0.7442882", "0.7271681", "0.72636956", "0.7252097", "0.7232725", "0.71916354", "0.7189217", "0.7167649", "0.71362257", "0.71019214", "0.70363253", "0.70237255", "0.7002638", "0.69754595", "0.697222", "0.6901829", "0.6897342", "0.6884332", "0.68591654", "0.68453"...
0.76628613
0
/ txt_UNhtmlspecialchars Undoes what the above function does. Yes. / unhtmlspecialchars including multibyte characters
/ txt_UNhtmlspecialchars Обратное действие функции выше. Да. / unhtmlspecialchars включая многобайтные символы
function txt_UNhtmlspecialchars($t="") { $t = str_replace( "&amp;" , "&", $t ); $t = str_replace( "&lt;" , "<", $t ); $t = str_replace( "&gt;" , ">", $t ); $t = str_replace( "&quot;", '"', $t ); $t = str_replace( "&#039;", "'", $t ); return $t; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _un_htmlspecialchars($str)\n{\n\tstatic $rev_html_translation_table;\n\n\tif ( empty($rev_html_translation_table) )\n\t{\n\t\t$rev_html_translation_table = function_exists('get_html_translation_table') ? array_flip(get_html_translation_table(HTML_ENTITIES)) : array('&amp;' => '&', '&#039;' => '\\'', '&quo...
[ "0.7914348", "0.7556317", "0.7418623", "0.7351419", "0.7066704", "0.70248836", "0.68657094", "0.6857299", "0.6836749", "0.68365335", "0.6782014", "0.67743665", "0.67698944", "0.6754196", "0.67261845", "0.6693081", "0.66922355", "0.6678459", "0.6660683", "0.6639238", "0.660811...
0.8423929
0
/ return_md5_check md5 hash for server side validation of form / link stuff / Return MD5 hash for use in forms
/ возврат MD5-хеша для проверки с серверной стороны формы / ссылки / Возврат MD5-хеша для использования в формах
function return_md5_check() { if ( $this->member['id'] ) { return md5( $this->member['email'].'&'.$this->member['member_login_key'].'&'.$this->member['joined'] ); } else { return md5("this is only here to prevent it breaking on guests"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function generateMD5Pass() {\n $plaintext = $this->generator->generateString(8, '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!@#$%^+');\n $hash = md5($plaintext);\n return $hash;\n }", "public function hashValidation(){\n\t\t$this->hash_validation = md5(uniqid(rand(), true).$t...
[ "0.66176385", "0.66054595", "0.65387625", "0.63927376", "0.63895005", "0.62220514", "0.6186992", "0.61676675", "0.6078118", "0.6078118", "0.6005056", "0.598813", "0.59228694", "0.5911826", "0.5911826", "0.58990574", "0.58788526", "0.58453315", "0.5840223", "0.5833934", "0.582...
0.7328288
0
Remove trailing comma from comma delim string
Удалить последнюю запятую из строки, разделенной запятыми
function trim_trailing_comma($t) { return preg_replace( "/,$/", "", $t ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _removeCommaForCSV($string){\r\n //also remove newlines\r\n $string = preg_replace('/\\s+/', ' ', trim($string));\r\n return str_replace(',', '', $string);\r\n }", "function stripcomma($str) {\n\treturn str_replace(\",\", \"\", $str);\n}", "function stripcomma($...
[ "0.73379046", "0.6939367", "0.6933451", "0.6933451", "0.6655816", "0.6569281", "0.65320086", "0.63713026", "0.6204611", "0.6056173", "0.60175717", "0.5872748", "0.58319247", "0.5724462", "0.5722973", "0.57110345", "0.566132", "0.5653916", "0.5648075", "0.5589658", "0.5560614"...
0.7083119
1
Remove dupe commas from comma delim string
Удалить дублирующиеся запятые из строки, разделенной запятыми
function clean_comma($t) { return preg_replace( "/,{2,}/", ",", $t ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _removeCommaForCSV($string){\r\n //also remove newlines\r\n $string = preg_replace('/\\s+/', ' ', trim($string));\r\n return str_replace(',', '', $string);\r\n }", "function stripcomma($str) {\n\treturn str_replace(\",\", \"\", $str);\n}", "function stripcomma($...
[ "0.7238915", "0.67976505", "0.6757153", "0.6757153", "0.671613", "0.66964716", "0.66797924", "0.6500081", "0.64840645", "0.64808273", "0.62295586", "0.6069482", "0.6007206", "0.598356", "0.5906284", "0.5882806", "0.5796709", "0.5768036", "0.5709227", "0.57066005", "0.56870455...
0.7050195
1
Clean perm string (wrapper for comma cleaners)
Чистая строка разрешений (обертка для очистки запятых)
function clean_perm_string($t) { $t = $this->clean_comma($t); $t = $this->trim_leading_comma($t); $t = $this->trim_trailing_comma($t); return $t; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function clean_perms($str)\n\t{\n\t\t$str = preg_replace( \"/,$/\", \"\", $str );\n\t\t$str = str_replace( \",,\", \",\", $str );\n\n\t\treturn $str;\n\t}", "function author_permut($string) {\n $string = trim(str_replace(' ', ' ', $string));\n $string = str_replace(' ', ' ', $string);\n $string = str...
[ "0.80324286", "0.5649599", "0.5554309", "0.5442497", "0.5440831", "0.53709614", "0.53709614", "0.5361429", "0.5341913", "0.5298562", "0.52592355", "0.52199924", "0.51745963", "0.5125587", "0.5114021", "0.508036", "0.506441", "0.5055875", "0.50336313", "0.50185037", "0.4991306...
0.8108568
0
/ Calculate max post size /
/ Вычисление максимального размера поста /
function math_get_post_max_size() { $max_file_size = 16777216; $tmp = 0; $_post = @ini_get('post_max_size'); $_upload = @ini_get('upload_max_filesize'); if ( $_upload > $_post ) { $tmp = $_post; } else { $tmp = $_upload; } if ( $tmp ) { $max_file_size = $tmp; un...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function getPostMaxSize(): int\n {\n $result = static::getIniValue('post_max_size');\n $result = Convert::valueToBytes($result);\n\n return $result;\n }", "protected function get_post_max_size()\n {\n return size_inbytes(ini_get(\"post_max_size\")); \n//ech...
[ "0.78163105", "0.7758226", "0.7658557", "0.76306707", "0.75660706", "0.74938804", "0.73693174", "0.7300634", "0.7243103", "0.70668113", "0.705732", "0.7034277", "0.69912714", "0.69554424", "0.69465715", "0.6890318", "0.6883936", "0.6863671", "0.6852488", "0.68366385", "0.6828...
0.7920259
0
/ math_strlen_to_bytes / Convert strlen to bytes
/ math_strlen_to_bytes / Преобразование strlen в байты
function math_strlen_to_bytes( $strlen=0 ) { $dh = pow(10, 0); return round( $strlen / ( pow(1024, 0) / $dh ) ) / $dh; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _strlen($binary_string) {\r\n if (function_exists('mb_strlen')) {\r\n return mb_strlen($binary_string, '8bit');\r\n }\r\n return strlen($binary_string);\r\n }", "public static function bytes($_str) {\n\t\t$_greek='KMGT';\n\t\t$_exp=strpbrk($_str,$_g...
[ "0.6343702", "0.6030263", "0.58650285", "0.5813406", "0.57850003", "0.5774222", "0.57621455", "0.57619655", "0.57526517", "0.57500315", "0.57421356", "0.5740826", "0.57345885", "0.5732057", "0.572741", "0.5711843", "0.56680834", "0.5642236", "0.5600801", "0.55793136", "0.5578...
0.86754537
0
/ print_forum_rules Checks and prints forum rules (if required) / Universal routine for printing forum rules
/ print_forum_rules Проверяет и выводит правила форума (если требуется) / Общая процедура для вывода правил форума
function print_forum_rules($forum) { $ruleshtml = ""; $rules['fid'] = $forum['id']; if ( isset($forum['show_rules']) AND $forum['show_rules'] ) { if ( $forum['show_rules'] == 2 ) { if ( isset($this->vars['forum_cache_minimum']) AND $this->vars['forum_cache_minimum'] ) { $tmp = $this-...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function display_forum_rules() {\n ?>\n <ol>\n <?= Lang::get('rules', 'chat_forums_rules') ?>\n </ol>\n <?\n }", "public function printRules() {}", "function local_forumnotices_printforum($frmids) {\n global $DB, $CFG, $USER;\n $config = get_config('local_forumnotices');\n ...
[ "0.7692964", "0.67140275", "0.6067672", "0.59104633", "0.5745487", "0.5745173", "0.5573034", "0.5502718", "0.5443599", "0.53879005", "0.53557545", "0.53541476", "0.53082126", "0.5292551", "0.5232031", "0.5207413", "0.51806974", "0.51325005", "0.51291597", "0.5127964", "0.5105...
0.8324201
0
/ do_number_format() : Nice little sub to handle common stuff / Wrapper for number_format
/ do_number_format() : Небольшая подпрограмма для обработки распространенных задач / Обертка для number_format
function do_number_format($number) { if ( $this->vars['number_format'] != 'none' ) { return number_format($number , 0, '', $this->num_format); } else { return $number; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function formatNumber($number);", "function numberformat( $num ) {\n\tglobal $lang;\n\tif ( $lang == 'www' || $lang == 'meta' || $lang == 'commons' || $lang == 'en' || $lang == 'incubator' ) {\n\t\treturn number_format($num);\n\t}\n\telseif ( $lang == 'fr' ) {\n\t\treturn number_format($num, 0, ',', ' ');...
[ "0.7478701", "0.7382876", "0.70564854", "0.7047208", "0.69407696", "0.68458503", "0.6827686", "0.6807814", "0.6779187", "0.67558783", "0.6690288", "0.6668437", "0.6636343", "0.6611882", "0.6569659", "0.6516594", "0.648652", "0.6468827", "0.64682114", "0.645923", "0.644641", ...
0.7553891
0
/ hdl_forum_read_cookie() / Get / set forum read cookie
/ hdl_forum_read_cookie() / Получить / установить куку прочитанного форума
function hdl_forum_read_cookie($set="") { if ( $set == "" ) { // Get cookie and return array... if ( $fread = $this->my_getcookie('forum_read') ) { if( $fread != "-1" ) { $farray = unserialize(stripslashes($fread)); if ( is_array($farray) and count($farray) > 0 ) { f...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function readCookie() {\n\t\treturn unserialize($_COOKIE[$this->cookieName]);\n\t}", "function my_getcookie($name)\n {\n \tif ( isset($_COOKIE[$this->vars['cookie_id'].$name]) )\n \t{\n \t\tif ( ! in_array( $name, array('topicsread', 'forum_read') ) )\n \t\t{\n \t\t\treturn $this->parse_...
[ "0.70679516", "0.65579987", "0.612599", "0.6030521", "0.59607434", "0.5951908", "0.59397715", "0.59289515", "0.59198904", "0.59173423", "0.5908738", "0.58618", "0.58382803", "0.58349866", "0.582548", "0.5819383", "0.5816389", "0.57587874", "0.57579595", "0.5715935", "0.570386...
0.74936503
0
/ Applies group suffix/prefix to a name / Format name based on group suffix/prefix
Применяет суффикс/префикс группы к имени / Форматирует имя на основе суффикса/префикса группы
function make_name_formatted($name, $group_id="", $prefix="", $suffix="") { if ( isset( $this->vars['ipb_disable_group_psformat'] ) and $this->vars['ipb_disable_group_psformat'] ) { return $name; } if( !$group_id ) { $group_id = 0; } if( !$prefix ) { if( $this->cache['group_cache'][ $gr...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function groups_parse_name($format, $groupnumber) {\n if (strstr($format, '@') !== false) { // Convert $groupnumber to a character series\n $letter = 'A';\n for($i=0; $i<$groupnumber; $i++) {\n $letter++;\n }\n $str = str_replace('@', $letter, $format);\n } else {\n ...
[ "0.7272613", "0.72037756", "0.65467787", "0.6517537", "0.64772165", "0.6327596", "0.6327596", "0.6211675", "0.6166117", "0.61619455", "0.61562914", "0.6134823", "0.6040787", "0.6005512", "0.6001644", "0.5975976", "0.57749987", "0.5724283", "0.5714113", "0.5710126", "0.5709448...
0.79561496
0
/ text_tidy: Takes raw text from the DB and makes it all nice and pretty which also parses unHTML'd characters. Use this with caution! / Takes raw text from the DB and makes it all nice and pretty which also parses unHTML'd characters. Use this with caution!
/ text_tidy: Берет сырые данные из БД и делает их аккуратными и красивыми, также парсируя неHTML-символы. Используйте это с осторожностью! / Берет сырые данные из БД и делает их аккуратными и красивыми, также парсируя неHTML-символы. Используйте это с осторожностью!
function text_tidy($txt = "") { $trans = get_html_translation_table(HTML_ENTITIES); $trans = array_flip($trans); $txt = strtr( $txt, $trans ); $txt = preg_replace( "/\s{2}/" , "&nbsp; " , $txt ); $txt = preg_replace( "/\r/" , "\n" , $txt ); $txt = preg_re...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function _tidy_cleanup_callback($text = '')\n {\n if ( ! class_exists('tidy') || ! extension_loaded('tidy')) {\n return $text;\n }\n $tidy_default_config = [\n 'alt-text' => '',\n 'output-xhtml' => true,\n ];\n $tidy = new tidy();\n ...
[ "0.67308736", "0.66743225", "0.6578449", "0.6482732", "0.64156663", "0.6259048", "0.6259048", "0.61170304", "0.6088428", "0.60818374", "0.60723275", "0.60427237", "0.5961922", "0.5941549", "0.5933677", "0.59253585", "0.58589697", "0.585109", "0.5800855", "0.5782319", "0.57571...
0.7109709
0
/ Build up page span links / Build up page span links
/ Сборка ссылок на страницы / Сборка ссылок на страницы
function build_pagelinks($data) { $data['leave_out'] = isset($data['leave_out']) ? $data['leave_out'] : ''; $data['no_dropdown'] = isset($data['no_dropdown']) ? intval( $data['no_dropdown'] ) : 0; $data['USE_ST'] = isset($data['USE_ST']) ? $data['USE_ST'] : ''; $work = array( 'pages' => 0, 'page_span' ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function generateLinks()\n\t{\n\t\t// Additional pages are the total minus the current page\n\t\t$iAdditional\t= $this->iToShow - 1;\n\n\t\t// Figure out how many additional pages to show\n\t\t$iToShow\t\t= ($this->iTotal <= $iAdditional) ? ($this->iTotal - 1) : $iAdditional;\n\n\t\t// Get the pre and post...
[ "0.67063576", "0.6638719", "0.65785736", "0.64954096", "0.6469011", "0.64381135", "0.6429237", "0.64281005", "0.63935435", "0.63454455", "0.6302978", "0.62771684", "0.62650526", "0.62264335", "0.6210543", "0.616929", "0.61340696", "0.61256015", "0.6121608", "0.61183316", "0.6...
0.7007468
0
/ Build the forum jump menu / Build jump menu $html = 0 means don't return the select html stuff $html = 1 means return the jump menu with select and option stuff
/ Строительство меню перехода на форум / Строительство меню перехода $html = 0 означает, что не возвращать HTML-элементы select $html = 1 означает, что возвращать меню перехода с элементами select и option
function build_forum_jump($html=1, $override=0, $remove_redirects=0) { $the_html = ""; if ($html == 1) { $the_html = "<form onsubmit=\"if(document.jumpmenu.f.value == -1){return false;}\" action='{$this->base_url}act=SF' method='get' name='jumpmenu'> <input type='hidden' name='act' value='...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _board_fast_nav_box() {\n\t\t// Create site jump array\n\t\t$site_jump_array = array(\n\t\t\t'sj_home'\t=> 'Forum Home',\n\t\t\t'sj_search'\t=> 'Search',\n\t\t\t'sj_help'\t=> 'Help',\n\t\t);\n\t\t// Prepare array for processing (to avoid slow manipulations)\n\t\tforeach ((array)module('forum')->_forums_ar...
[ "0.6058666", "0.60178965", "0.5940343", "0.5935906", "0.5905077", "0.58860296", "0.5878154", "0.58754545", "0.5836456", "0.5830238", "0.5822447", "0.57571167", "0.575532", "0.5742538", "0.5730543", "0.5719432", "0.57138675", "0.5708429", "0.5697653", "0.5676176", "0.56688136"...
0.8024555
0
/ Clean email / Clean email address
/ Чистый email / Чистый адрес электронной почты
function clean_email($email = "") { $email = trim($email); $email = str_replace( " ", "", $email ); //----------------------------------------- // Check for more than 1 @ symbol //----------------------------------------- if ( substr_count( $email, '@' ) > 1 ) { return FALSE; } $ema...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sanitize_email($email)\n {\n }", "function sanitizeEmail() {\n $pattern = \"/^[A-Z0-9._%+\\-]+@[A-Z0-9.\\-]+\\.[A-Z]{2,}$/i\";\n if (preg_match($pattern, $this->email)) {\n $this->email = filter_var($this->email, FILTER_SANITIZE_EMAIL);\n } else {\n die(\...
[ "0.769066", "0.7650318", "0.7590176", "0.75405896", "0.75123405", "0.74787223", "0.7404086", "0.72803605", "0.7268289", "0.7249504", "0.7205801", "0.71603775", "0.7108046", "0.69973475", "0.6991326", "0.6958369", "0.69326776", "0.6932009", "0.69287056", "0.6891735", "0.686692...
0.7857631
0
/ Returns the offset needed and stuff quite groovy. / Calculates the user's time offset
/ Возвращает необходимый сдвиг и другие приятные вещи. / Вычисляет сдвиг времени пользователя
function get_time_offset() { $r = 0; $r = ( (isset($this->member['time_offset']) AND $this->member['time_offset'] != "") ? $this->member['time_offset'] : $this->vars['time_offset'] ) * 3600; if ( $this->vars['time_adjust'] ) { $r += ($this->vars['time_adjust'] * 60); } if ( isset($...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_system_gmt_offset() {\n static $offset = null;\n\n if($offset === null) {\n $timezone_offset = ConfigOptions::getValue('time_timezone');\n $dst = ConfigOptions::getValue('time_dst');\n\n $offset = $dst ? $timezone_offset + 3600 : $timezone_offset;\n } // if\n\n return $offse...
[ "0.7599222", "0.73604554", "0.73411685", "0.72180235", "0.71558046", "0.7072217", "0.69586015", "0.69037575", "0.6803715", "0.6792604", "0.67925674", "0.6673445", "0.66606", "0.66570705", "0.6635666", "0.658613", "0.65816456", "0.65641135", "0.653456", "0.64793414", "0.644841...
0.8399742
0
/ My gmmktime() PHP func seems buggy / My gmmktime() PHP func seems buggy
/ Моя функция gmmktime() PHP, кажется, имеет баг / Моя функция gmmktime() PHP, кажется, имеет баг
function date_gmmktime( $hour=0, $min=0, $sec=0, $month=0, $day=0, $year=0 ) { // Calculate UTC time offset $offset = date( 'Z' ); // Generate server based timestamp $time = mktime( $hour, $min, $sec, $month, $day, $year ); // Calculate DST on / off $dst = intval( date( 'I', $time ) - date( 'I' ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function MyDateTimestamp($date)\r\n{\r\n\treturn gmmktime(\r\n\t\tsubstr($date, 11, 2), //h\r\n\t\tsubstr($date, 14, 2), //i\r\n\t\tsubstr($date, 17, 2), //s\r\n\t\tsubstr($date, 5, 2), //m\r\n\t\tsubstr($date, 8, 2), //d\r\n\t\tsubstr($date, 0, 4) //y\r\n\t);\r\n}", "function gmt_time() {\r\n\t\t$now = time ();...
[ "0.6772348", "0.6141193", "0.609432", "0.6057421", "0.6042489", "0.6040829", "0.60127544", "0.6006567", "0.59505653", "0.58714557", "0.58088505", "0.5751597", "0.5751479", "0.57382655", "0.57295775", "0.5725695", "0.57236636", "0.56813794", "0.5648627", "0.5630009", "0.562914...
0.73694915
0
/ Clean evil tags / Clean possible javascipt codes
/ Очистка вредоносных тегов / Очистка возможных кодов javascipt
function clean_evil_tags( $t ) { $t = preg_replace( "/javascript/i" , "j&#097;v&#097;script", $t ); $t = preg_replace( "/alert/i" , "&#097;lert" , $t ); $t = preg_replace( "/about:/i" , "&#097;bout:" , $t ); $t = preg_replace( "/onmouseover/i", "&#111;nmouseover" , $t ); $t...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cleanEvilTags($t){\r\n\t\t$t = preg_replace(\"/javascript/i\" , \"j&#097;v&#097;script\", $t);\r\n\t\t$t = preg_replace(\"/alert/i\" , \"&#097;lert\" , $t);\r\n\t\t$t = preg_replace(\"/about:/i\" , \"&#097;bout:\" , $t);\r\n\t\t$t = preg_replace(\"/onmouseover/i\", \"&#111;nmouse...
[ "0.73697287", "0.66786855", "0.6586153", "0.6528951", "0.64891165", "0.6432465", "0.64196044", "0.6373935", "0.63127214", "0.6304424", "0.6282587", "0.6265657", "0.62566864", "0.6248505", "0.6242657", "0.62215096", "0.61893976", "0.6185675", "0.61794484", "0.61550945", "0.615...
0.7643503
0
/ Show Board Offline / Show board offline message
/ Показать доску офлайн / Сообщение о том, что доска недоступна
function board_offline() { $this->quick_init(); //----------------------------------------- // Get offline message (not cached) //----------------------------------------- $row = $this->DB->simple_exec_query( array( 'select' => '*', 'from' => 'conf_settings', 'where' => "conf_ke...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function action_offline_messages() {\n\t\t$sender = $this->request->param('id');\n\t\t$offline_messages = ORM::factory('Message')->get_offline_messages($this->_current_user->id, $sender);\n\t\t$this->_set_msg('Offline Messages Retrieved', 'success', $offline_messages);\n\t}", "function LUTB_BoardIndex()\n...
[ "0.6826253", "0.64398205", "0.64027977", "0.6251923", "0.6168884", "0.6125532", "0.6123772", "0.6099643", "0.6003086", "0.59283787", "0.5870367", "0.5771556", "0.5735616", "0.5711155", "0.56820774", "0.55978817", "0.55594736", "0.5534723", "0.5512475", "0.55120397", "0.548799...
0.857349
0
/ Array filter: Clean read topics / Array sort Used to remove out of date topic marking entries
/ Фильтрация массива: Чистое чтение тем / Сортировка массива используется для удаления записей с отметкой о просроченных темах
function array_filter_clean_read_topics ( $var ) { global $ipsclass; return $var > $ipsclass->vars['db_topic_read_cutoff']; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sf_clean_topic_subs()\n{\n\tglobal $wpdb;\n\n\t# build list of topics with subscriptions\n\t$topics = $wpdb->get_results(\"SELECT topic_id, topic_subs FROM \".SFTOPICS.\" WHERE topic_subs IS NOT NULL;\");\n\tif(!$topics) return;\n\n\tforeach($topics as $topic)\n\t{\n\t\t$nvalues = array();\n\t\t$cvalues =...
[ "0.593098", "0.57363254", "0.56610435", "0.54275805", "0.53746545", "0.5298118", "0.529116", "0.52805614", "0.5219392", "0.5215844", "0.5167548", "0.51316875", "0.5129999", "0.5082503", "0.5039974", "0.50357306", "0.5028455", "0.5026263", "0.5009636", "0.49974746", "0.4960690...
0.7080641
0
/ Memory debug, make flag /
/ Отладка памяти, создать флаг /
function memory_debug_make_flag() { if ( IPS_MEMORY_DEBUG_MODE AND function_exists( 'memory_get_usage' ) ) { return memory_get_usage(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_debug_flag()\n {\n }", "public function enableDebug();", "public function enableDebug() {}", "public function enableDebugMode() {}", "function debug_log($input,$debugflag=\"log\",$die=false){\n\tif(true){\n\t\t@$fp=fopen($_SERVER['DOCUMENT_ROOT'].\"/debug.txt\",'a');\n\t\t...
[ "0.66465527", "0.6631657", "0.6547354", "0.6503889", "0.646646", "0.64273906", "0.64273906", "0.638843", "0.638843", "0.6372217", "0.6238503", "0.61784923", "0.6171984", "0.6164617", "0.6130939", "0.61150026", "0.6009149", "0.5996731", "0.59750265", "0.5970247", "0.59397024",...
0.7166614
0
/ LEGACY MODE STUFF / / Require, parse and return an array containing the language stuff / LEGACY MODE: load_words
/ РЕЖИМ СТАРЫХ ВЕРСИЙ / / Требовать, парсить и возвращать массив, содержащий информацию о языке / РЕЖИМ СТАРЫХ ВЕРСИЙ: load_words
function load_words($current_lang_array, $area, $lang_type) { require ROOT_PATH."cache/lang_cache/".$lang_type."/".$area.".php"; foreach ($lang as $k => $v) { $current_lang_array[$k] = stripslashes($v); } unset($lang); return $current_lang_array; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAllWords(){\n $handle = fopen(\"assets/en-US.dic\", \"r\");\n $words = [];\n $i=0;\n if ($handle) {\n while (($line = fgets($handle)) !== false) {\n $line = trim(preg_replace('/\\s\\s+/', ' ', $line));\n $line = strtolower($line);\n $yy = strpos($lin...
[ "0.74533975", "0.70110345", "0.6868285", "0.6794794", "0.66867", "0.6633132", "0.6555122", "0.6388225", "0.6385643", "0.6364116", "0.6306736", "0.6220428", "0.61480373", "0.6105883", "0.61049896", "0.6093", "0.60501057", "0.60137355", "0.59984267", "0.59851307", "0.5953104", ...
0.70823926
1
/ Redirect: parse_clean_value / LEGACY MODE: clean_value (alias of parse_clean_value)
/ Перенаправление: parse_clean_value / Режим LEGACY: clean_value (альяс parse_clean_value)
function clean_value( $t ) { return $this->parse_clean_value( $t ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function parseCleanValue($val) {\r\n\t\tif ($val == '') {\r\n\t\t\treturn '';\r\n\t\t}\r\n\r\n\t\tif (get_magic_quotes_gpc()) {\r\n\t\t\t$val = stripslashes($val);\r\n\t\t\t$val = preg_replace(\"/\\\\\\(?!&amp;#|\\?#)/\", \"&#092;\", $val);\r\n\t\t}\r\n\t\t$val = str_replace(\"&#032;\", \" \", ...
[ "0.7048118", "0.69167346", "0.6893351", "0.6892381", "0.68438137", "0.6841219", "0.67210394", "0.66282237", "0.6612994", "0.660389", "0.6512946", "0.65092206", "0.6399245", "0.6399245", "0.63564014", "0.6351395", "0.6295476", "0.62567157", "0.62445295", "0.62093127", "0.61991...
0.7183627
0
Get form page actions block.
Получить блок действий страницы формы.
protected function getFormPageActionsBlock() { return $this->blockFactory->create( \Magento\Backend\Test\Block\FormPageActions::class, ['element' => $this->_rootElement->find($this->newAttributeBlock, Locator::SELECTOR_XPATH)] ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getFormAction() { return $this->_formAction; }", "public function getFormActions()\n {\n return $this->form->getActions();\n }", "public function action()\n {\n return $this->_actions;\n }", "public function getFrontEndActions();", "public function Admin_Action_Sho...
[ "0.6527125", "0.6358015", "0.63297474", "0.6216374", "0.6193797", "0.611197", "0.599742", "0.5904043", "0.5853768", "0.5814876", "0.5798893", "0.5770226", "0.5760509", "0.5755289", "0.56951076", "0.56939214", "0.5667278", "0.5667278", "0.56645757", "0.565387", "0.5625051", ...
0.81792843
0
Helper function to generate radio buttons for news blogs categories. Creates radio buttons for all available news blogs categories found in database. Has function to generate radio buttons, where the radio button is already set, for all categories connected to the news blog.
Помощьная функция для генерации радиокнопок для категорий новостных блогов. Создает радиокнопки для всех доступных категорий новостных блогов, найденных в базе данных. Имеет функцию для генерации радиокнопок, где радиокнопка уже установлена, для всех категорий, связанных с новостным блогом.
private function generateCategoryRadioButtons($newsBlogCategory=null) { $radioButtons = null; $categories = $this->fetchAllCategories(); if (!isset($newsBlogCategory)) { $newsBlogCategory = end($categories); } foreach ($categories as $key => $category) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createRadios($hiddenName, $outerIndex)\n{\n\t// Loop through and generate all radio buttons, giving unique names \n\tfor($i = 1; $i <= 4; $i++)\n\t{\n\t\t$id = \"radio\" . $outerIndex . $i;\n\t\t$name = \"radio\" . $outerIndex;\n\t\t\n\t\tif(isset($_REQUEST[$name]))\n\t\t\t$currentSelected = $_REQUEST[$na...
[ "0.52064836", "0.49694917", "0.48947316", "0.48776603", "0.48648077", "0.48622644", "0.48484185", "0.4789536", "0.4768624", "0.47145632", "0.47071362", "0.46905714", "0.4683797", "0.4676859", "0.46667105", "0.4637696", "0.46282452", "0.4607321", "0.45954877", "0.45910627", "0...
0.78439355
0
Helper function to generate check boxes for filter types. Creates check boxes for all available filter types found in database. Has function to generate check boxes, where the check box is already checked, for all filter types connected to the news blog.
Помощьная функция для генерации чекбоксов для типов фильтров. Создает чекбоксы для всех доступных типов фильтров, найденных в базе данных. Имеет функцию для генерации чекбоксов, где чекбокс уже отмечен, для всех типов фильтров, связанных с новостным блогом.
private function generateFilterTypeCheckBoxes($newsBlogFilterType=null) { $checkBox = null; $filterTypes = $this->fetchFilterTypes(); foreach ($filterTypes as $key => $filterType) { if ($this->shouldSetBoxBeSet($newsBlogFilterType, $filterType)) { $checkBox .= "<l...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function buildFilterSelectTable($filterType, $dbTable, $fields, $selectType = \"checkbox\", $formID = \"reportData\") {\n\t\t//reports.php \t\t- USED TO GENERATE FILTER SELECTION TABLES IN FILTER SELECT TABS\n\t\t//dataCleaner.php \t- USED TO GENERATE SELECTABLE LOOKUP TABLE\n\t\tglobal $db_conn;\n\n\t\t//Opening ...
[ "0.628021", "0.60545933", "0.60387933", "0.5972055", "0.5946254", "0.5880567", "0.58206594", "0.5687234", "0.5675121", "0.56599057", "0.56281555", "0.55951697", "0.5565834", "0.55546737", "0.5554669", "0.5551773", "0.5549098", "0.55293417", "0.5513308", "0.55008197", "0.54968...
0.761955
0
Returns the node(s) that contain the data for the individual layers of the geo dataset.
Возвращает узел(ы), содержащий данные для отдельных слоев геодатасета.
protected function findLayerNodes() { return $this->selectMany(array('sos:Contents', 'sos:ObservationOfferingList', 'sos:ObservationOffering'), null, false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getDatasetNodes()\n {\n $nodes = array();\n $classIdentifier = $this->openDataIni->variable( 'GeneralSettings', 'DatasetClassIdentifier' );\n $class = eZContentClass::fetchByIdentifier( $classIdentifier );\n if ( $class instanceof eZContentClass )\n {\n ...
[ "0.69531584", "0.6744865", "0.65617007", "0.611288", "0.6093506", "0.6091973", "0.6084357", "0.6084357", "0.6084357", "0.6084357", "0.6084357", "0.6084357", "0.605004", "0.6039816", "0.60021156", "0.59513474", "0.5928887", "0.5840039", "0.5840039", "0.5807506", "0.5807506", ...
0.70368403
0
Maybe set real IP checks for certain plugins and conditions
Возможно, установить проверки реального IP для определенных плагинов и условий
public function maybe_set_real_ip() { $run =true; if (!function_exists('is_plugin_active')) { include_once( ABSPATH . 'wp-admin/includes/plugin.php' ); } foreach ($this->plugins as $plugin) { if (\is_plugin_active($plugin) ) { $run = false; } } if ($this->wp_rocket_cloudflare_enabled()) { $...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function allow_ip_address()\r\n\t{\r\n\t\t$bad = apply_filters('three_strikes_count', 0, $_SERVER['REMOTE_ADDR']);\r\n\t\treturn ($bad < THREE_STRIKES_LIMIT);\r\n\t}", "public function set_real_ip() {\r\n\t\t// only run this logic if the REMOTE_ADDR is populated, to avoid causing notices in CLI mode.\r\n\t\tif (...
[ "0.72217685", "0.6945912", "0.6870403", "0.6813865", "0.67881083", "0.67538977", "0.66403425", "0.66365445", "0.65711176", "0.6541811", "0.65266067", "0.6515038", "0.6493296", "0.64884686", "0.6484355", "0.64806485", "0.64182395", "0.6364514", "0.6342819", "0.631274", "0.6292...
0.78727466
0
Check if WP Rocket has the Cloudflare Module running
Проверьте, запущен ли модуль Cloudflare в WP Rocket
private function wp_rocket_cloudflare_enabled() { if (function_exists('rocket_set_real_ip_cloudflare')) { return true; } return; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function isApiAvailable() {\n\t\treturn get_option(\"wp_broadbean_ipavailibility\") == 1;\n\t}", "public function checkAcquiaHosted() {\n return isset($_SERVER['AH_SITE_ENVIRONMENT'], $_SERVER['AH_SITE_NAME']);\n }", "public static function isRunningOnCgiServerApi() {}", "private function canRun(...
[ "0.6667953", "0.6509513", "0.6417302", "0.63991857", "0.62835425", "0.625391", "0.6247767", "0.6228695", "0.61861056", "0.61758685", "0.6169184", "0.61573917", "0.6143217", "0.61088145", "0.60962695", "0.6095984", "0.6061232", "0.6059582", "0.60189015", "0.60155636", "0.60153...
0.7518741
0
Set Real IP from CloudFlare
Установить настоящий IP от CloudFlare
private function set_real_ip() { $is_cf = ( isset( $_SERVER['HTTP_CF_CONNECTING_IP'] ) ) ? true : false; if ( ! $is_cf ) { return; } // only run this logic if the REMOTE_ADDR is populated, to avoid causing notices in CLI mode. if ( isset( $_SERVER['REMOTE_ADDR'] ) ) { // Grab the Current Cloudflare A...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function set_real_ip() {\r\n\t\t// only run this logic if the REMOTE_ADDR is populated, to avoid causing notices in CLI mode.\r\n\t\tif ( ! isset( $_SERVER['HTTP_CF_CONNECTING_IP'], $_SERVER['REMOTE_ADDR'] ) ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t$cf_ips_values = $this->cloudflare->get_cloudflare_ips();\r...
[ "0.77245855", "0.70626086", "0.6871126", "0.66991776", "0.64520085", "0.6154902", "0.6117788", "0.61056876", "0.61023843", "0.6068344", "0.6062182", "0.6057139", "0.6056744", "0.60567325", "0.6050824", "0.60199815", "0.6014682", "0.6007874", "0.59850883", "0.5985085", "0.5983...
0.76323956
1
Get Cloudflare IPs. saves them in the cache for 48 hours if it finds them successfully
Получить IP-адреса Cloudflare. Сохраняет их в кэше на 48 часов, если успешно найдет их
private function get_ips() { $cache_name = 'proxyflare_cloudflare_ips'; // Check Cache before making the request $ips = get_transient( $cache_name ); if ( false === $ips ) { // Set the API URL $url = 'https://api.cloudflare.com/client/v4/ips'; // Set API Call Details $args = array( 'headers'...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function getIp()\n\t {\n\t \n\t if (isset($_SERVER['HTTP_X_FORWARDED_FOR']) &&( $_SERVER['HTTP_X_FORWARDED_FOR'] != '' ))\n\t {\n\t $client_ip =\n\t ( !empty($_SERVER['REMOTE_ADDR']) ) ?\n\t $_SERVER['REMOTE_ADDR']\n\t :\n\t ( ( !empty($_ENV['REMOTE_ADDR...
[ "0.62851995", "0.5880484", "0.5875258", "0.5848676", "0.5815484", "0.5763367", "0.57107735", "0.56935096", "0.56357396", "0.56327885", "0.5628954", "0.5621176", "0.56004065", "0.5584677", "0.55797565", "0.55784816", "0.5576812", "0.55730903", "0.55622536", "0.55471826", "0.55...
0.7651022
0
A simple score updating method for a game
Простой метод обновления очков для игры
function updateScore(Player $player, int $points) { $score = $player->getScore(); $player->setScore($score + $points); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function score()\n {\n $this->score++;\n }", "public function UpdateScore() {\n\t\t$this->score = self::ComputeScore( $this->goods, $this->bads );\n\t\t$this->tier = self::GetTier( $this->score );\n\t\treturn $this->score;\n\t}", "public function updateScoresAndShots()\n {\n $this...
[ "0.7773296", "0.72999465", "0.7275131", "0.7251119", "0.71322197", "0.7017261", "0.68646556", "0.68080646", "0.6744071", "0.67360604", "0.6732284", "0.6647051", "0.6634282", "0.6615012", "0.6603436", "0.6589206", "0.6584348", "0.65678823", "0.65139073", "0.6463049", "0.644974...
0.77036226
1
flag to tell the app whether a user can sign up or not
флаг для указания приложению, может ли пользователь зарегистрироваться или нет
public static function allowUserSignUp() { return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function register_user()\n {\n \n return true;\n \n }", "public static function userCreationAllowed(): bool\n {\n return self::isConfigured(self::ACTION_ADD_USER);\n }", "public function authorize()\n {\n if($this->path() == 'signup'){\n retur...
[ "0.71371895", "0.69843584", "0.6964484", "0.68400747", "0.6792425", "0.66881686", "0.6523544", "0.651542", "0.6493336", "0.64290726", "0.64251363", "0.64017874", "0.6387678", "0.63862205", "0.63463545", "0.6342499", "0.6315831", "0.6311033", "0.631083", "0.62932277", "0.62837...
0.8016326
0
Initialize wordpress import block
Инициализация блока импорта WordPress
protected function _construct() { $this->_objectId = 'id'; $this->_blockGroup = 'Magefan_Blog'; $this->_controller = 'adminhtml_import'; $this->_mode = 'wordpress'; parent::_construct(); if (!$this->_isAllowedAction('Magefan_Blog::import')) { $this->butt...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function init() {\n\n\t\tif ( ! function_exists( 'llms' ) || ! version_compare( self::MIN_CORE_VERSION, llms()->version, '<=' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$this->includes();\n\n\t\tadd_action( 'add_meta_boxes', array( $this, 'remove_metaboxes' ), 999, 2 );\n\n\t\tglobal $wp_version;\n\t\t$filter = ver...
[ "0.6904067", "0.68647754", "0.68420553", "0.680391", "0.67640436", "0.6687453", "0.6679465", "0.6639066", "0.6625153", "0.661617", "0.65937734", "0.6589987", "0.65757984", "0.6574324", "0.6487622", "0.64584935", "0.6443672", "0.64273745", "0.6410032", "0.64086705", "0.6405265...
0.7010562
0