Subversion Repositories xrowsearch

[/] [trunk/] [bin/] [xrowDelete_old.php] - Blame information for rev 1

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1 rrobert
<?php
2
 
3
require 'autoload.php';
4
 
5
$cli = eZCLI::instance();
6
$script = eZScript::instance( array(
7
    'description' => ( "eZ Publish Script Executor\n\n" . "Allows execution of simple PHP scripts which uses eZ Publish functionality,\n" . "when the script is called all necessary initialization is done\n" . "\n" . "ezexec.php myscript.php" ) ,
8
    'use-session' => false ,
9
    'use-modules' => true ,
10
    'use-extensions' => true
11
) );
12
 
13
$script->startup();
14
 
15
$options = $script->getOptions( "","[provider]", array() );
16
 
17
$script->initialize();
18
 
19
$provider = $options['arguments'][0];
20
 
21
$searchini = eZINI::instance( 'xrowsearch.ini' );
22
 
23
$filename = $searchini->variable( $provider, 'Namespace' );echo $filename;
24
// setup
25
 
26
$handler = new xrowSOLRHandler();
27
$manager = new ezcSearchEmbeddedManager();
28
$session = new ezcSearchSession( $handler, $manager );
29
 
30
$session->beginTransaction();
31
 
32
$handler->deleteByurl( "meta_installation_id_ms:xrowsearch-"."$filename" );
33
 
34
$session->commit();
35
 
36
echo "XML data has benn deleted !";
37
 
38
$script->shutdown();