Bug #18520 » bug7969_version2.diff

Administrator Admin, 2010-04-09 15:42

View differences:

class.external_parser.php 2010-04-09 15:27:01.000000000 +0200
122 122
					// PDF
123 123
				if ($indexerConfig['pdftools'])	{
124 124
					$pdfPath = rtrim($indexerConfig['pdftools'], '/').'/';
125
					if (ini_get('safe_mode') || (@is_file($pdfPath.'pdftotext'.$exe) && @is_file($pdfPath.'pdfinfo'.$exe)))	{
125
					if (ini_get('safe_mode') || ini_get('open_basedir') || (@is_file($pdfPath.'pdftotext'.$exe) && @is_file($pdfPath.'pdfinfo'.$exe)))	{
126 126
						$this->app['pdfinfo'] = $pdfPath.'pdfinfo'.$exe;
127 127
						$this->app['pdftotext'] = $pdfPath.'pdftotext'.$exe;
128 128
							// PDF mode:
......
135 135
					// Catdoc
136 136
				if ($indexerConfig['catdoc'])	{
137 137
					$catdocPath = rtrim($indexerConfig['catdoc'], '/').'/';
138
					if (ini_get('safe_mode') || @is_file($catdocPath.'catdoc'.$exe))	{
138
					if (ini_get('safe_mode') || ini_get('open_basedir') || @is_file($catdocPath.'catdoc'.$exe))	{
139 139
						$this->app['catdoc'] = $catdocPath.'catdoc'.$exe;
140 140
						$extOK = TRUE;
141 141
					} else $this->pObj->log_setTSlogMessage(sprintf($this->sL('LLL:EXT:indexed_search/locallang.xml:catdocNotFound'), $catdocPath), 3);
......
146 146
					// ppthtml
147 147
				if ($indexerConfig['ppthtml'])	{
148 148
					$ppthtmlPath = rtrim($indexerConfig['ppthtml'], '/').'/';
149
					if (ini_get('safe_mode') || @is_file($ppthtmlPath.'ppthtml'.$exe)){
149
					if (ini_get('safe_mode') || ini_get('open_basedir') || @is_file($ppthtmlPath.'ppthtml'.$exe)){
150 150
						$this->app['ppthtml'] = $ppthtmlPath.'ppthtml'.$exe;
151 151
						$extOK = TRUE;
152 152
					} else $this->pObj->log_setTSlogMessage(sprintf($this->sL('LLL:EXT:indexed_search/locallang.xml:ppthtmlNotFound'), $ppthtmlPath), 3);
......
156 156
					// Xlhtml
157 157
				if ($indexerConfig['xlhtml'])	{
158 158
					$xlhtmlPath = rtrim($indexerConfig['xlhtml'], '/').'/';
159
					if (ini_get('safe_mode') || @is_file($xlhtmlPath.'xlhtml'.$exe)){
159
					if (ini_get('safe_mode') || ini_get('open_basedir') || @is_file($xlhtmlPath.'xlhtml'.$exe)){
160 160
						$this->app['xlhtml'] = $xlhtmlPath.'xlhtml'.$exe;
161 161
						$extOK = TRUE;
162 162
					} else $this->pObj->log_setTSlogMessage(sprintf($this->sL('LLL:EXT:indexed_search/locallang.xml:xlhtmlNotFound'), $xlhtmlPath), 3);
......
170 170
			case 'odt':		// Oasis OpenDocument Text
171 171
				if ($indexerConfig['unzip'])	{
172 172
					$unzipPath = rtrim($indexerConfig['unzip'], '/').'/';
173
					if (ini_get('safe_mode') || @is_file($unzipPath.'unzip'.$exe))	{
173
					if (ini_get('safe_mode') || ini_get('open_basedir') || @is_file($unzipPath.'unzip'.$exe))	{
174 174
						$this->app['unzip'] = $unzipPath.'unzip'.$exe;
175 175
						$extOK = TRUE;
176 176
					} else $this->pObj->log_setTSlogMessage(sprintf($this->sL('LLL:EXT:indexed_search/locallang.xml:unzipNotFound'), $unzipPath), 3);
177 177
				} else $this->pObj->log_setTSlogMessage($this->sL('LLL:EXT:indexed_search/locallang.xml:unzipDisabled'), 1);
178 178
			break;
179 179
			case 'rtf':
180
					// Catdoc
180
					// unrtf
181 181
				if ($indexerConfig['unrtf'])	{
182 182
					$unrtfPath = rtrim($indexerConfig['unrtf'], '/').'/';
183
					if (ini_get('safe_mode') || @is_file($unrtfPath.'unrtf'.$exe))	{
183
					if (ini_get('safe_mode') || ini_get('open_basedir') || @is_file($unrtfPath.'unrtf'.$exe))	{
184 184
						$this->app['unrtf'] = $unrtfPath.'unrtf'.$exe;
185 185
						$extOK = TRUE;
186 186
					} else $this->pObj->log_setTSlogMessage(sprintf($this->sL('LLL:EXT:indexed_search/locallang.xml:unrtfNotFound'), $unrtfPath), 3);
(3-3/7)