Skip to content

Commit

Permalink
ソースコードのインデント調整
Browse files Browse the repository at this point in the history
  • Loading branch information
yama committed Jul 14, 2016
1 parent 20c146e commit 605df8a
Showing 1 changed file with 11 additions and 14 deletions.
25 changes: 11 additions & 14 deletions manager/includes/extenders/ex_modifiers.php
Expand Up @@ -417,26 +417,23 @@ function getValueFromPreset($phxkey, $value, $cmd, $opt)
$this->wrapat = intval($opt) ? intval($opt) : 70;
return preg_replace_callback("~(\b\w+\b)~",function($m){return wordwrap($m[1],$this->wrapat,' ',1);},$value);
case 'wrap_text':
$width = preg_match('/^[1-9][0-9]*$/',$opt) ? $opt : 70;
if($modx->config['manager_language']==='japanese-utf8')
{
$width = preg_match('/^[1-9][0-9]*$/',$opt) ? $opt : 70;
if($modx->config['manager_language']==='japanese-utf8') {
$chunk = array();
$c=0;
while($c<10000)
{
$c++;
if($this->strlen($value)<$width)
{
while($c<10000) {
$c++;
if($this->strlen($value)<$width) {
$chunk[] = $value;
break;
}
$chunk[] = $this->substr($value,0,$width);
$value = $this->substr($value,$width);
}
$chunk[] = $this->substr($value,0,$width);
$value = $this->substr($value,$width);
}
return join("\n",$chunk);
}
else
return wordwrap($value,$width,"\n",true);
}
else
return wordwrap($value,$width,"\n",true);
case 'substr':
if(empty($opt)) break;
if(strpos($opt,',')!==false) {
Expand Down

0 comments on commit 605df8a

Please sign in to comment.