Skip to content

Commit

Permalink
unused code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander.makarow committed Jun 16, 2010
1 parent d145d2d commit 105010d
Show file tree
Hide file tree
Showing 8 changed files with 4 additions and 18 deletions.
2 changes: 1 addition & 1 deletion framework/base/CErrorHandler.php
Expand Up @@ -213,7 +213,7 @@ protected function handleError($event)
protected function getExactTrace($exception)
{
$traces=$exception->getTrace();
$result=null;

foreach($traces as $trace)
{
// property access exception
Expand Down
9 changes: 1 addition & 8 deletions framework/cli/commands/WebAppCommand.php
Expand Up @@ -110,14 +110,7 @@ protected function getRelativePath($path1,$path2)
$segs2=explode(DIRECTORY_SEPARATOR,$path2);
$n1=count($segs1);
$n2=count($segs2);
$common='';
for($i=0;$i<$n1 && $i<$n2;++$i)
{
if($segs1[$i]===$segs2[$i])
$common.=($i?DIRECTORY_SEPARATOR:'').$segs1[$i];
else
break;
}

if($i===0)
return "'".$path1."'";
$up='';
Expand Down
1 change: 0 additions & 1 deletion framework/cli/commands/shell/ModelCommand.php
Expand Up @@ -384,7 +384,6 @@ public function run($args)
public function generateModel($source,$params)
{
list($className,$tableName)=$params;
$content=file_get_contents($source);
$rules=array();
$labels=array();
$relations=array();
Expand Down
2 changes: 1 addition & 1 deletion framework/i18n/gettext/CGettextMoFile.php
Expand Up @@ -74,7 +74,7 @@ public function load($file,$context)
throw new CException(Yii::t('yii','Unable to lock file "{file}" for reading.',
array('{file}'=>$file)));

$magic=current($array=unpack('c',$this->readByte($fr,4)));
$magic=current(unpack('c',$this->readByte($fr,4)));
if($magic==-34)
$this->useBigEndian=false;
else if($magic==-107)
Expand Down
1 change: 0 additions & 1 deletion framework/logging/CProfileLogRoute.php
Expand Up @@ -92,7 +92,6 @@ public function processLogs($logs)
protected function displayCallstack($logs)
{
$stack=array();
$level=0;
$results=array();
$n=0;
foreach($logs as $log)
Expand Down
3 changes: 0 additions & 3 deletions framework/utils/CTimestamp.php
Expand Up @@ -43,9 +43,6 @@
*/
class CTimestamp
{
private static $_monthNormal=array("",31,28,31,30,31,30,31,31,30,31,30,31);
private static $_monthLeaf=array("",31,29,31,30,31,30,31,31,30,31,30,31);

/**
* Gets day of week, 0 = Sunday,... 6=Saturday.
* Algorithm from PEAR::Date_Calc
Expand Down
2 changes: 0 additions & 2 deletions framework/web/widgets/CClipWidget.php
Expand Up @@ -30,8 +30,6 @@ class CClipWidget extends CWidget
*/
public $renderClip=false;

private $_level;

/**
* Starts recording a clip.
*/
Expand Down
2 changes: 1 addition & 1 deletion framework/web/widgets/captcha/CCaptchaAction.php
Expand Up @@ -96,7 +96,7 @@ public function run()
{
if(isset($_GET[self::REFRESH_GET_VAR])) // AJAX request for regenerating code
{
$code=$this->getVerifyCode(true);
$this->getVerifyCode(true);
// we add a random 'v' parameter so that FireFox can refresh the image
// when src attribute of image tag is changed
echo $this->getController()->createUrl($this->getId(),array('v'=>uniqid()));
Expand Down

0 comments on commit 105010d

Please sign in to comment.