summaryrefslogtreecommitdiff
path: root/shell/bin
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2011-11-27 11:26:20 -0500
committerLuke Shumaker <LukeShu@sbcglobal.net>2011-11-27 11:26:20 -0500
commit76ead734626996f82caddaca57dc2f84243b0947 (patch)
tree32ea6607a7c70de059b4bf376897b64391af2321 /shell/bin
parentfb0380f48203a11584773f3db335eaadd9cc6fdf (diff)
This zip file was identified as ltshell-3.6.zip
Diffstat (limited to 'shell/bin')
-rw-r--r--shell/bin/cd.php2
-rw-r--r--shell/bin/editor.php7
-rw-r--r--shell/bin/whoami.php2
3 files changed, 6 insertions, 5 deletions
diff --git a/shell/bin/cd.php b/shell/bin/cd.php
index e8505bd..baf30f3 100644
--- a/shell/bin/cd.php
+++ b/shell/bin/cd.php
@@ -2,7 +2,7 @@
class p_cd extends prog {
public static function main($args, $env) {
@$dir = $args[1];
- return php_chdir($dir);
+ return lts_chdir($dir);
}
}
diff --git a/shell/bin/editor.php b/shell/bin/editor.php
index 39db3d8..a136cd2 100644
--- a/shell/bin/editor.php
+++ b/shell/bin/editor.php
@@ -2,7 +2,8 @@
class p_editor extends prog {
public static function main($args, $env) {
if (isset($_POST['stdin'])) {
- if (isset($args[1])) {
+ if (false) {//if (isset($args[1])) {
+ echo $args[0].': saving to `'.$args[1]."'\n";
file_put_contents($args[1],$_POST['stdin']);
} else {
echo $_POST['stdin'];
@@ -14,8 +15,8 @@ class p_editor extends prog {
$text = '';
}
echo '<div class="editor">';
- echo '<input type="hidden" name="stddest" value="'.$_POST['c'].'" />';
- echo '<textarea name="stdin">'.$text.'</textarea>'."\n";
+ echo '<input type="hidden" name="stdout_dest" value="'.$_POST['c'].'" />';
+ echo '<textarea name="stdin">'.htmlentities($text).'</textarea>'."\n";
echo '<input type="submit" value="save" />';
echo '</div>';
}
diff --git a/shell/bin/whoami.php b/shell/bin/whoami.php
index 7e560f2..fd7afa1 100644
--- a/shell/bin/whoami.php
+++ b/shell/bin/whoami.php
@@ -1,7 +1,7 @@
<?php
class p_whoami extends prog {
public static function main($args, $env) {
- echo get_current_user();
+ echo get_current_user()."\n";
}
}