Jump to content

Item array does not remain for query.


Recommended Posts

Basically, I have a script filter and a case statement based on the argument

 

 

case 'addsite':
	$name = $argv[2];
	$url = $argv[3];
	$api = $argv[4];
	$addsite_r = array();
	if( !empty($name) && !empty($url) && !empty($api) )
	{
		$addsiteResult = array();
		$item = array(
			'uid' => 'done',
			'arg' => '',
			'title' => $name . ' has been added.',
			'subtitle' => '',
			'icon' => 'icon.png'
		);
		//------=-=-=-=[    echo
	}
	else
	{
		$addSiteInstructions = array();
		$item = array(
			'uid' => 'nothing',
			'arg' => '',
			'title' => 'Add a Newznab Site',
			'subtitle' => 'Example: nzb addsite "{site name}" {url} {apikey}',
			'icon' => 'icon.png'
		);
		//------=-=-=-=[    echo
	}

break;

 

Typing "nzb addsite" triggers this:

 

Screen%20Shot%202013-01-24%20at%2010.55.

 

as it should, but as soon as I start to add anymore arguments, I lose my list

 

Screen%20Shot%202013-01-24%20at%2010.56.

 

Since I am still in the same "addsite" case statement, shouldn't my "match" stay visible until all the 3 arguments are added?

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...