This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ git blame -L 78,88 AdminSideMenu.class.php | |
29319ebd (minahito 2008-11-23 15:53:45 +0000 78) | |
29319ebd (minahito 2008-11-23 15:53:45 +0000 79) if ($this->mCurrentModule->get('dirname') == 'legacy') { | |
29319ebd (minahito 2008-11-23 15:53:45 +0000 80) if (xoops_getrequest('action') == "help") { | |
29319ebd (minahito 2008-11-23 15:53:45 +0000 81) $moduleHandler =& xoops_gethandler('module'); | |
29319ebd (minahito 2008-11-23 15:53:45 +0000 82) $t_module =& $moduleHandler->getByDirname(xoops_gethandler('dirname')); | |
29319ebd (minahito 2008-11-23 15:53:45 +0000 83) if (is_object($t_module)) { | |
29319ebd (minahito 2008-11-23 15:53:45 +0000 84) $this->mCurrentModule =& $t_module; | |
29319ebd (minahito 2008-11-23 15:53:45 +0000 85) } | |
29319ebd (minahito 2008-11-23 15:53:45 +0000 86) } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class CVE_2012_1823 extends XCube_ActionFilter | |
{ | |
public function preFilter() | |
{ | |
if ( $_SERVER['QUERY_STRING'] === '-s' ) | |
{ | |
header('Content-type: text/html; charset=utf-8'); | |
$sourceCode = $this->_getSourceCode(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ git diff templates/profile_inc_data_edit.html | |
diff --git a/html/modules/profile/templates/profile_inc_data_edit.html b/html/modules/profile/templates/profile_inc_data_edit.html | |
index a354763..657a917 100644 | |
--- a/html/modules/profile/templates/profile_inc_data_edit.html | |
+++ b/html/modules/profile/templates/profile_inc_data_edit.html | |
@@ -21,7 +21,7 @@ | |
<{elseif $def->get('type')=="selectbox"}> | |
<select name="<{$def->getShow('field_name')}>" id="legacy_xoopsform_<{$def->getShow('field_name')}>"> | |
<{foreach item=option from=$def->mFieldType->getOption($def)}> | |
- <option value="<{$option}>"<{if $profile->get($def->getShow('field_name'))==$option}> selected="selected"<{/if}>><{$option}></option> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function fish_prompt -d "Write out the prompt" | |
if [ $status -eq 0 ] | |
set emoticon "^_^" | |
set color green | |
else | |
set emoticon ">_<" | |
set color red | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class PDOTest extends \PHPUnit_Framework_TestCase | |
{ | |
public function test__construct() | |
{ | |
$pdo = $this | |
->getMockBuilder('\Suin\PDO') | |
->setMethods(array('_getDefaultAttributes')) | |
->disableOriginalConstructor() | |
->getMock(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
trait Foo | |
{ | |
final public static function staticMethod() | |
{ | |
echo __METHOD__, PHP_EOL; | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Foo | |
{ | |
public function getClosure() | |
{ | |
$that = $this; | |
$closure = function() use ($that) { | |
$that->bar(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
php > var_dump(PHP_INT_MAX); | |
int(9223372036854775807) | |
php > var_dump(decbin(PHP_INT_MAX)); | |
string(63) "111111111111111111111111111111111111111111111111111111111111111" | |
php > var_dump(-1 * PHP_INT_MAX); | |
int(-9223372036854775807) | |
php > var_dump(decbin(-1 * PHP_INT_MAX)); | |
string(64) "1000000000000000000000000000000000000000000000000000000000000001" | |
php > var_dump(decbin(-1)); | |
string(64) "1111111111111111111111111111111111111111111111111111111111111111" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function decToBits($dec) | |
{ | |
$bin = decbin($dec); | |
$bits = str_split($bin); | |
$bits = array_reverse($bits); | |
$bits = array_filter($bits); | |
foreach ( $bits as $pos => $bit ) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$dbname = 'test'; | |
$host = 'localhost'; | |
$user = 'root'; | |
$pass = 'root'; | |
$dsn = sprintf('mysql:dbname=%s;host=%s', $dbname, $host); | |
$options = array( | |
PDO::ATTR_ORACLE_NULLS => PDO::NULL_NATURAL, |