Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
<?php final class PhabricatorRepositoryURIIndex extends PhabricatorRepositoryDAO { p..
Decoded Output download
<?php
final class PhabricatorRepositoryURIIndex
extends PhabricatorRepositoryDAO {
protected $repositoryPHID;
protected $repositoryURI;
protected function getConfiguration() {
return array(
self::CONFIG_TIMESTAMPS => false,
self::CONFIG_COLUMN_SCHEMA => array(
'repositoryURI' => 'text',
),
self::CONFIG_KEY_SCHEMA => array(
'key_repository' => array(
'columns' => array('repositoryPHID'),
),
'key_uri' => array(
'columns' => array('repositoryURI(128)'),
),
),
) + parent::getConfiguration();
}
public static function updateRepositoryURIs(
$repository_phid,
array $uris) {
$table = new self();
$conn_w = $table->establishConnection('w');
$sql = array();
foreach ($uris as $key => $uri) {
if (!strlen($uri)) {
unset($uris[$key]);
continue;
}
$sql[] = qsprintf(
$conn_w,
'(%s, %s)',
$repository_phid,
$uri);
}
$table->openTransaction();
queryfx(
$conn_w,
'DELETE FROM %R WHERE repositoryPHID = %s',
$table,
$repository_phid);
if ($sql) {
queryfx(
$conn_w,
'INSERT INTO %R (repositoryPHID, repositoryURI) VALUES %LQ',
$table,
$sql);
}
$table->saveTransaction();
}
}
?>
Did this file decode correctly?
Original Code
<?php
final class PhabricatorRepositoryURIIndex
extends PhabricatorRepositoryDAO {
protected $repositoryPHID;
protected $repositoryURI;
protected function getConfiguration() {
return array(
self::CONFIG_TIMESTAMPS => false,
self::CONFIG_COLUMN_SCHEMA => array(
'repositoryURI' => 'text',
),
self::CONFIG_KEY_SCHEMA => array(
'key_repository' => array(
'columns' => array('repositoryPHID'),
),
'key_uri' => array(
'columns' => array('repositoryURI(128)'),
),
),
) + parent::getConfiguration();
}
public static function updateRepositoryURIs(
$repository_phid,
array $uris) {
$table = new self();
$conn_w = $table->establishConnection('w');
$sql = array();
foreach ($uris as $key => $uri) {
if (!strlen($uri)) {
unset($uris[$key]);
continue;
}
$sql[] = qsprintf(
$conn_w,
'(%s, %s)',
$repository_phid,
$uri);
}
$table->openTransaction();
queryfx(
$conn_w,
'DELETE FROM %R WHERE repositoryPHID = %s',
$table,
$repository_phid);
if ($sql) {
queryfx(
$conn_w,
'INSERT INTO %R (repositoryPHID, repositoryURI) VALUES %LQ',
$table,
$sql);
}
$table->saveTransaction();
}
}
Function Calls
None |
Stats
MD5 | 8d5dbedf0c0a7a91f0a830603ccee6fa |
Eval Count | 0 |
Decode Time | 82 ms |