100+ results for 'php basename'
Not the results you expected?
smarty_internal_config.php (https://github.com/raphaelbastide/berta.git) PHP · 270 lines
class-yoast-plugin-conflict.php (https://gitlab.com/najomie/fit-hippie) PHP · 333 lines
1 <?php
2 /**
3 * @package WPSEO\Admin
116 public function get_conflicting_plugins_as_string( $plugin_section ) {
117 if ( ! function_exists( 'get_plugin_data' ) ) {
118 require_once( ABSPATH . '/wp-admin/includes/plugin.php' );
119 }
201 /* translators: %s: 'Facebook' plugin name of possibly conflicting plugin */
202 $error_message .= '<a class="button button-primary" href="' . wp_nonce_url( 'plugins.php?action=deactivate&plugin=' . $plugin_file . '&plugin_status=all', 'deactivate-plugin_' . $plugin_file ) . '">' . sprintf( __( 'Deactivate %s', 'wordpress-seo' ), WPSEO_Utils::get_plugin_name( $plugin_file ) ) . '</a> ';
204 $identifier = $this->get_notification_identifier( $plugin_file );
262 * Check if given plugin exists in array with all_active_plugins
263 *
264 * @param string $plugin Plugin basename string.
265 *
266 * @return bool
Filesystem.php (https://gitlab.com/techniconline/kmc) PHP · 426 lines
1 <?php namespace Illuminate\Filesystem;
3 use ErrorException;
358 // a directory or a file. When it is actually a directory we will need to call
359 // back into this function recursively to keep copying these nested folders.
360 $target = $destination . '/' . $item->getBasename();
362 if ($item->isDir()) {
mail.php (https://bitbucket.org/allanxyh/uniquemall.git) PHP · 406 lines
1 <?php
2 class Mail {
3 protected $to;
94 $header .= 'Reply-To: ' . '=?UTF-8?B?' . base64_encode($this->sender) . '?=' . '<' . $this->from . '>' . $this->newline;
95 $header .= 'Return-Path: ' . $this->from . $this->newline;
96 $header .= 'X-Mailer: PHP/' . phpversion() . $this->newline;
97 //$header .= 'Content-Type: multipart/related; boundary="' . $boundary . '"' . $this->newline . $this->newline;
98 $header .= 'Content-Type: multipart/related; boundary="' . $boundary . '"' . $this->newline . $this->newline;
132 $message .= '--' . $boundary . $this->newline;
133 $message .= 'Content-Type: application/octet-stream; name="' . basename($attachment) . '"' . $this->newline;
134 $message .= 'Content-Transfer-Encoding: base64' . $this->newline;
135 $message .= 'Content-Disposition: attachment; filename="' . basename($attachment) . '"' . $this->newline;
136 $message .= 'Content-ID: <' . basename(urlencode($attachment)) . '>' . $this->newline;
137 $message .= 'X-Attachment-Id: ' . basename(urlencode($attachment)) . $this->newline . $this->newline;
subscription.php (https://github.com/kainbacher/Notethrower.git) PHP · 273 lines
3 include_once('../Includes/Init.php'); // must be included first
5 include_once('../Includes/Config.php');
6 include_once('../Includes/Snippets.php');
7 include_once('../Includes/TemplateUtil.php');
8 include_once('../Includes/DB/Subscription.php');
9 include_once('../Includes/Mailer/MailUtil.php');
11 if(get_param('referrer') == 'batcholdartists'){
225 '${Optional/referrerId}' => get_param('referrerid'),
226 '${Optional/error}' => $error,
227 '${phpSelf}' => basename($_SERVER['PHP_SELF'], '.php'),
228 '${userName}' => get_param('username'),
229 '${Common/pageFooter}' => buildPageFooter()
Files.php (https://github.com/jaws-project/jaws.git) PHP · 282 lines
source_code.php (https://github.com/F5/zetacomponents.git) PHP · 317 lines
1 <?php
2 /**
3 * File containing the ezcTemplateSourceCode class
72 *
73 * @property string $stream
74 * The PHP stream path for the template source file.
75 * @property string $resource
76 * The resource string which requested this template.
161 * Initialises the source object with the code and output context.
162 *
163 * @param string $stream The actual PHP stream path for the template source
164 * file.
165 * @param string $resource The requested resource string, if false $stream
181 /**
182 * Loads the data from the PHP stream into the $code member variable.
183 *
184 * @throws ezcTemplateFileNotFoundException if the file does not exist on disk.
gists.php (https://bitbucket.org/pastor399/newcastleunifc.git) PHP · 593 lines
smarty_internal_config.php (https://github.com/LamCiuLoeng/BookShare.git) PHP · 302 lines
Packager.php (https://bitbucket.org/squints/greekgeek.git) PHP · 404 lines
1 <<<<<<< HEAD
2 <?php
3 /**
4 * PEAR_Packager for generating releases
5 *
6 * PHP versions 4 and 5
7 *
8 * @category pear
9 * @package PEAR
10 * @author Stig Bakken <ssb@php.net>
11 * @author Tomas V. V. Cox <cox@idecnet.com>
12 * @author Greg Beaver <cellog@php.net>
13 * @copyright 1997-2009 The Authors
14 * @license http://opensource.org/licenses/bsd-license.php New BSD License
15 * @version CVS: $Id: Packager.php 286809 2009-08-04 15:10:26Z dufuz $
FsExplorer.class.php (https://github.com/midnightskinhead/tubepress.git) PHP · 297 lines
1 <?php
2 /**
3 * Copyright 2006 - 2011 Eric D. Hough (http://ehough.com)
20 */
22 class_exists('org_tubepress_impl_classloader_ClassLoader') || require dirname(__FILE__) . '/../classloader/ClassLoader.class.php';
23 org_tubepress_impl_classloader_ClassLoader::loadClasses(array(
24 'org_tubepress_api_filesystem_Explorer',
49 * @return string The base name of the TubePress installation directory.
50 */
51 function getTubePressInstallationDirectoryBaseName()
52 {
53 return basename($this->getTubePressBaseInstallationPath());
220 org_tubepress_impl_log_Log::log(self::LOG_PREFIX, '%sWill try to copy %d directories from %s to %s', self::_spaces($level), count($dirs), $source, $dest);
222 $finalDest = $dest . DIRECTORY_SEPARATOR . basename($source);
224 if ($this->ensureDirectoryExists($finalDest, $level) === false) {
FindOneAndReplace.php (https://github.com/markn86/moodle.git) PHP · 168 lines
1 <?php
2 /*
3 * Copyright 2015-2017 MongoDB, Inc.
94 * exception at execution time if used.
95 *
96 * @param string $databaseName Database name
97 * @param string $collectionName Collection name
98 * @param array|object $filter Query by which to filter documents
101 * @throws InvalidArgumentException for parameter/option parsing errors
102 */
103 public function __construct($databaseName, $collectionName, $filter, $replacement, array $options = [])
104 {
105 if (! is_array($filter) && ! is_object($filter)) {
143 $this->findAndModify = new FindAndModify(
144 $databaseName,
145 $collectionName,
146 ['query' => $filter, 'update' => $replacement] + $options
update.php (https://github.com/geenkaas/Wordpress.git) PHP · 254 lines
1 <?php
2 /**
3 * Update/Install Plugin/Theme administration panel.
12 /** WordPress Administration Bootstrap */
13 require_once('./admin.php');
15 include_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php';
35 $plugins = array_map('urldecode', $plugins);
37 $url = 'update.php?action=update-selected&plugins=' . urlencode(implode(',', $plugins));
38 $nonce = 'bulk-update-plugins';
54 $title = __('Update Plugin');
55 $parent_file = 'plugins.php';
56 $submenu_file = 'plugins.php';
Validate.php (https://bitbucket.org/sauron07/friend_social.git) PHP · 290 lines
1 <?php
2 /**
3 * Zend Framework
23 * @see Zend_Validate_Interface
24 */
25 //require_once 'Zend/Validate/Interface.php';
27 /**
187 /**
188 * @param mixed $value
189 * @param string $classBaseName
190 * @param array $args OPTIONAL
191 * @param mixed $namespaces OPTIONAL
243 //require_once 'Zend/Validate/Exception.php';
244 throw new Zend_Validate_Exception("Validate class not found from basename '$classBaseName'");
245 }
mf_install.php (https://github.com/leocaseiro/Magic-Fields-2.git) PHP · 212 lines
1 <?php
2 /**
3 * This file content the routines for install/activate uninstall/deactivate Magic Fields
8 global $wpdb;
10 require_once(ABSPATH.'wp-admin/includes/upgrade.php');
12 // Get collation info
203 $current = get_option('active_plugins');
204 $plugin = plugin_basename(MF_PATH.'/main.php');
205 array_splice($current, array_search( $plugin, $current), 1 );
206 do_action('deactivate_' . trim( $plugin ));
207 update_option('active_plugins', $current);
209 wp_redirect('options-general.php');
210 }
Rename.php (https://bitbucket.org/juan_sanchez/aiyellow.git) PHP · 326 lines
__init__.py (https://github.com/smorstabilini/ilmioquartiere.git) Python · 208 lines
11 import fnmatch
12 import types
13 from os.path import basename
15 try:
88 Get a lexer for a filename.
89 """
90 fn = basename(_fn)
91 for modname, name, _, filenames, _ in LEXERS.itervalues():
92 for filename in filenames:
143 <pygments.lexers.templates.HtmlDjangoLexer object at 0xb7d2f2ac>
144 >>> guess_lexer_for_filename('style.css', 'a { color: <?= $link ?> }')
145 <pygments.lexers.templates.CssPhpLexer object at 0xb7ba518c>
146 """
147 fn = basename(_fn)
WriteProtocolCommandEventSpecification.groovy (https://github.com/jyemin/mongo-java-driver.git) Groovy · 229 lines
76 def expectedEvents = [
77 new CommandStartedEvent(1, connection.getDescription(), getDatabaseName(), 'insert',
78 new BsonDocument('insert', new BsonString(getCollectionName()))
79 .append('ordered', BsonBoolean.TRUE)
93 cleanup:
94 // force acknowledgement
95 new CommandProtocolImpl(getDatabaseName(), new BsonDocument('drop', new BsonString(getCollectionName())),
96 NO_OP_FIELD_NAME_VALIDATOR, ReadPreference.primary(), new BsonDocumentCodec(), true, null, null,
97 ClusterConnectionMode.MULTIPLE, getServerApi(), IgnorableRequestContext.INSTANCE)
117 then:
118 commandListener.eventsWereDelivered([new CommandStartedEvent(1, connection.getDescription(), getDatabaseName(), 'update',
119 new BsonDocument('update', new BsonString(getCollectionName()))
120 .append('ordered', BsonBoolean.TRUE)
SplFileInfo.php (https://github.com/tstarling/hiphop-php.git) PHP · 432 lines
72 // This doc comment block generated by idl/sysdoc.php
73 /**
74 * ( excerpt from http://php.net/manual/en/splfileinfo.getbasename.php )
75 *
76 * This method returns the base name of the file, directory, or link
203 // This doc comment block generated by idl/sysdoc.php
204 /**
205 * ( excerpt from http://php.net/manual/en/splfileinfo.getctime.php )
206 *
207 * Returns the inode change time for the file. The time returned is a Unix
292 // This doc comment block generated by idl/sysdoc.php
293 /**
294 * ( excerpt from http://php.net/manual/en/splfileinfo.isdir.php )
295 *
296 * This method can be used to determine if the file is a directory.
File.php (https://bitbucket.org/tschrock52/ethodeshare.git) PHP · 274 lines
1 <?php
2 /**
3 * Magento
8 * that is bundled with this package in the file LICENSE.txt.
9 * It is also available through the world-wide-web at this URL:
10 * http://opensource.org/licenses/osl-3.0.php
11 * If you did not receive a copy of the license and are unable to
12 * obtain it through the world-wide-web, please send an email
22 * @package Mage_Archive
23 * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24 * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25 */
80 $this->_filePath = $filePath;
81 $this->_fileLocation = isset($pathInfo['dirname']) ? $pathInfo['dirname'] : '';
82 $this->_fileName = isset($pathInfo['basename']) ? $pathInfo['basename'] : '';
83 }
Validate.php (https://github.com/timglabisch/pimcore.git) PHP · 290 lines
1 <?php
2 /**
3 * Zend Framework
23 * @see Zend_Validate_Interface
24 */
25 // require_once 'Zend/Validate/Interface.php';
27 /**
187 /**
188 * @param mixed $value
189 * @param string $classBaseName
190 * @param array $args OPTIONAL
191 * @param mixed $namespaces OPTIONAL
243 // require_once 'Zend/Validate/Exception.php';
244 throw new Zend_Validate_Exception("Validate class not found from basename '$classBaseName'");
245 }
class.QueryBuilderPlatformMssql.php (https://github.com/palmic/2yaml.git) PHP · 335 lines
main_scheck_heavy.ml (https://github.com/repos-ocaml/pfff.git) OCaml · 211 lines
61 let main_action xs =
63 let files = Lib_parsing_php.find_php_files_of_dir_or_files xs in
64 let errors = ref [] in
73 try
74 pr2_dbg (spf "processing: %s (%d/%d)" file i total);
75 Check_all_php.check_file ~find_entity file;
76 with
77 | (Timeout | UnixExit _) as exn -> raise exn
100 let root = Common.common_prefix_of_files_or_dirs xs in
102 Layer_checker_php.gen_layer ~root ~output:file !Error_php._errors
104 );
user_permission.php (https://github.com/elleeott/WPOC-boilerplate.git) PHP · 426 lines
1 <?php
2 class ControllerUserUserPermission extends Controller {
3 private $error = array();
349 $this->data['permissions'] = array();
351 $files = glob(DIR_APPLICATION . 'controller/*/*.php');
353 foreach ($files as $file) {
354 $data = explode('/', dirname($file));
356 $permission = end($data) . '/' . basename($file, '.php');
358 if (!in_array($permission, $ignore)) {
kml_infos.php (https://bitbucket.org/pombredanne/spip-zone-treemap.git) PHP · 187 lines
1 <?php
2 /**
3 * Plugin GIS
29 $list = $zip->listContent();
30 foreach($list as $fichier => $info_fichier){
31 if(substr(basename($info_fichier['filename']),-3) == 'kml'){
32 $zip->extractByIndex($info_fichier['index'],_DIR_TMP);
33 $chemin = _DIR_TMP.$info_fichier['filename'];
100 * -* on regarde s'il n'y a qu'un seul Placemark et on récupère son nom;
101 */
102 if(!$infos['titre'] OR ($infos['titre'] == basename($chemin)) OR (preg_match(',\.km.,',$infos['titre']) > 0)){
103 spip_xml_match_nodes(",^Folder,",$arbre, $folders);
104 if(count($folders['Folder']) == 1){
FileTest1.cpp (https://github.com/MaDDoGo/xbmc.git) C++ · 340 lines
178 // paths
179 NPT_String test;
180 test = NPT_FilePath::BaseName("");
181 NPT_ASSERT(test == "");
182 test = NPT_FilePath::BaseName("a");
183 NPT_ASSERT(test == "a");
184 test = NPT_FilePath::BaseName("a"+NPT_FilePath::Separator+"b");
185 NPT_ASSERT(test == "b");
186 test = NPT_FilePath::BaseName("a"+NPT_FilePath::Separator+"b"+NPT_FilePath::Separator);
187 NPT_ASSERT(test == "");
188 test = NPT_FilePath::BaseName(NPT_FilePath::Separator+"a");
189 NPT_ASSERT(test == "a");
190 test = NPT_FilePath::BaseName(NPT_FilePath::Separator);
setting_dashboard.php (https://bitbucket.org/gfelizola/pacaembu-institucional.git) PHP · 175 lines
43 <?php if( !empty( $Data[$field] ) ) : $Checked = 'checked="checked"'; endif; ?>
44 <label><input type="checkbox" name="data[<?php echo $field; ?>]" value="1" <?php echo $Checked; ?> /> <?php _e ( 'Hide' ); ?></label>
45 </td>
46 </tr>
54 <?php if( !empty( $Data[$field] ) ) : $Checked = 'checked="checked"'; endif; ?>
55 <label><input type="checkbox" name="data[<?php echo $field; ?>]" value="1" <?php echo $Checked; ?> /> <?php _e ( 'Hide' ); ?></label>
56 </td>
57 </tr>
65 <?php if( !empty( $Data[$field] ) ) : $Checked = 'checked="checked"'; endif; ?>
66 <label><input type="checkbox" name="data[<?php echo $field; ?>]" value="1" <?php echo $Checked; ?> /> <?php _e ( 'Hide' ); ?></label>
67 </td>
68 </tr>
76 <?php if( !empty( $Data[$field] ) ) : $Checked = 'checked="checked"'; endif; ?>
77 <label><input type="checkbox" name="data[<?php echo $field; ?>]" value="1" <?php echo $Checked; ?> /> <?php _e ( 'Hide' ); ?></label>
78 </td>
79 </tr>
UpdateCommand.php (https://github.com/genemu/GenemuDoctrineExtraBundle.git) PHP · 290 lines
1 <?php
3 /*
65 if ($dir = realpath($class->getPath().'/Controller')) {
66 $files = new Finder();
67 $files->files()->name('*Controller.php')->in($dir);
69 foreach ($files as $file) {
70 if ('Controller.php' !== $controllerName = $file->getBasename('Controller.php')) {
71 $ns = $class->getNamespace().'\\Controller';
75 }
77 $reflection = new \ReflectionClass($ns.'\\'.$file->getBasename('.php'));
79 $methods = array();
AvisotaNewsletter.php (https://github.com/avisota/contao-core.git) PHP · 500 lines
abstract.php (https://github.com/luthercollege/reason_package.git) PHP · 321 lines
Compiled.php (https://gitlab.com/flyhope/Hiblog) PHP · 288 lines
124 // set basename if not specified
125 $_basename = $_template->source->handler->getBasename($_template->source);
126 if ($_basename === null) {
127 $_basename = basename(preg_replace('![^\w\/]+!', '_', $_template->source->name));
128 }
129 // separate (optional) basename by dot
130 if ($_basename) {
131 $_basename = '.' . $_basename;
132 }
134 $this->filepath = $_compile_dir . $_filepath . '.' . $_template->source->type . $_basename . $_cache . '.php';
135 $this->timestamp = $this->exists = is_file($this->filepath);
136 if ($this->exists) {
ImageDimensionsTest.php (https://gitlab.com/reasonat/test8) PHP · 290 lines
1 <?php
3 namespace Drupal\image\Tests;
36 $style = ImageStyle::create(array('name' => 'test', 'label' => 'Test'));
37 $style->save();
38 $generated_uri = 'public://styles/test/public/' . \Drupal::service('file_system')->basename($original_uri);
39 $url = file_url_transform_relative($style->buildUrl($original_uri));
249 ];
250 // PNG original image. Should be resized to 100x100.
251 $generated_uri = 'public://styles/test_uri/public/' . \Drupal::service('file_system')->basename($original_uri);
252 $url = file_url_transform_relative($style->buildUrl($original_uri));
253 $this->assertEqual($this->getImageTag($variables), '<img src="' . $url . '" width="100" height="100" alt="" class="image-style-test-uri" />');
262 $file = $files[1];
263 $original_uri = file_unmanaged_copy($file->uri, 'public://', FILE_EXISTS_RENAME);
264 $generated_uri = 'public://styles/test_uri/public/' . \Drupal::service('file_system')->basename($original_uri);
265 $url = file_url_transform_relative($style->buildUrl($original_uri));
266 $variables['#uri'] = $original_uri;
File.php (https://github.com/speedupmate/Magento-CE-Mirror.git) PHP · 274 lines
1 <?php
2 /**
3 * Magento
8 * that is bundled with this package in the file LICENSE.txt.
9 * It is also available through the world-wide-web at this URL:
10 * http://opensource.org/licenses/osl-3.0.php
11 * If you did not receive a copy of the license and are unable to
12 * obtain it through the world-wide-web, please send an email
22 * @package Mage_Archive
23 * @copyright Copyright (c) 2006-2020 Magento, Inc. (http://www.magento.com)
24 * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25 */
80 $this->_filePath = $filePath;
81 $this->_fileLocation = isset($pathInfo['dirname']) ? $pathInfo['dirname'] : '';
82 $this->_fileName = isset($pathInfo['basename']) ? $pathInfo['basename'] : '';
83 }
index.php (https://bitbucket.org/jose_everson2013/wally-consultoria.git) PHP · 207 lines
1 <?php
2 ini_set("allow_url_fopen", true);
3 ini_set("allow_url_include", true);
82 * --------------------------------------------------------------------
83 *
84 * Normally you will set your default controller in the routes.php file.
85 * You can, however, force a custom routing by hard-coding a
86 * specific controller class/function here. For most applications, you
115 * The $assign_to_config array below will be passed dynamically to the
116 * config class when initialized. This allows you to set custom config
117 * items or override any default config values found in the config.php file.
118 * This can be handy as it permits you to share one application between
119 * multiple front controller files, with each file containing different
154 if ( ! is_dir($system_path))
155 {
156 exit("Your system folder path does not appear to be set correctly. Please open the following file and correct this: ".pathinfo(__FILE__, PATHINFO_BASENAME));
157 }
Crc32Test.php (https://github.com/cgmartin/zf2.git) PHP · 188 lines
1 <?php
2 /**
3 * Zend Framework (http://framework.zend.com/)
15 * @group Zend_Validator
16 */
17 class Crc32Test extends \PHPUnit_Framework_TestCase
18 {
19 /**
48 foreach ($testData as $data) {
49 $fileUpload = array(
50 'tmp_name' => $data[1], 'name' => basename($data[1]),
51 'size' => 200, 'error' => 0, 'type' => 'text'
52 );
test_document.rb (https://gitlab.com/gregtyka/jekyll) Ruby · 441 lines
28 end
30 should "know its basename" do
31 assert_equal "configuration.md", @document.basename
32 end
34 should "know its basename without extname" do
35 assert_equal "configuration", @document.basename_without_ext
269 @site.process
270 @document = @site.collections["slides"].docs[6]
271 @dest_file = dest_dir("slides/example-slide-7.php")
272 end
278 should "produce the permalink as the url" do
279 assert_equal "/slides/example-slide-7.php", @document.url
280 end
SmugglerConflicts.cs (https://github.com/fitzchak/ravendb.git) C# · 352 lines
26 _store1 = GetDocumentStore(new Options
27 {
28 ModifyDatabaseName = s => $"{s}_store1",
29 ModifyDatabaseRecord = record =>
30 {
38 _store2 = GetDocumentStore(new Options
39 {
40 ModifyDatabaseName = s => $"{s}_store2",
41 ModifyDatabaseRecord = record =>
42 {
76 using (var store3 = GetDocumentStore(new Options
77 {
78 ModifyDatabaseName = s => $"{s}_store3"
79 }))
80 {
PageAssets.php (https://gitlab.com/x33n/ImpressPages) PHP · 241 lines
1 <?php
2 /**
3 * @package ImpressPages
129 if ($pathinfo['extension'] == 'css'
130 && $themeAssetsUrl . $pathinfo['basename'] == $file['value']
131 ) {
132 $themeFile = \Ip\Application::ASSETS_DIR . '/' . $pathinfo['filename'] . '.less';
162 );
164 $head = ipView('Ip/Internal/Config/view/head.php', $data)->render();
165 $head = ipFilter('ipHead', $head);
166 return $head;
210 'javascript' => $javascriptFilesSorted,
211 );
212 $javascript = ipView('Ip/Internal/Config/view/javascript.php', $data)->render();
213 $javascript = ipFilter('ipJavaScript', $javascript);
214 return $javascript;
Rename.php (https://github.com/bruisedlee/zf2.git) PHP · 304 lines
engine.php (https://github.com/agallou/atoum.git) PHP · 257 lines
86 ->string($this->testedInstance->getSrcDirectory())->isEqualTo($otherDirectory)
87 ->string($this->testedInstance->getDestinationDirectory())->isEqualTo($directory)
88 ->object($this->testedInstance->setSrcDirectory($otherDirectory = rand(- PHP_INT_MAX, PHP_INT_MAX)))->isTestedInstance
89 ->string($this->testedInstance->getSrcDirectory())->isEqualTo((string) $otherDirectory)
90 ->string($this->testedInstance->getDestinationDirectory())->isEqualTo($directory)
101 ->object($this->testedInstance->setDestinationDirectory(($directory = uniqid()) . \DIRECTORY_SEPARATOR))->isTestedInstance
102 ->string($this->testedInstance->getDestinationDirectory())->isEqualTo($directory)
103 ->object($this->testedInstance->setDestinationDirectory($directory = rand(- PHP_INT_MAX, PHP_INT_MAX)))->isTestedInstance
104 ->string($this->testedInstance->getDestinationDirectory())->isEqualTo((string) $directory)
105 ;
184 $file2 = $srcDirectory . \DIRECTORY_SEPARATOR . ($basename2 = uniqid()),
185 $file3 = $srcDirectory . \DIRECTORY_SEPARATOR . ($basename3 = uniqid()),
186 )
187 ),
188 $this->testedInstance->setSrcIteratorInjector(function($directory) use ($srcIterator) { return $srcIterator; }),
189 $adapter->file_get_contents[1] = ($file1Part1 = uniqid()) . '\'$Rev: ' . rand(1, PHP_INT_MAX) . ' $\'' . ($file1Part2 = uniqid()),
190 $adapter->file_get_contents[2] = $contentOfFile2 = uniqid(),
191 $adapter->file_get_contents[3] = ($file3Part1 = uniqid()) . '"$Rev: ' . rand(1, PHP_INT_MAX) . ' $"' . ($file3Part2 = uniqid()),
Filesystem.php (https://gitlab.com/kimting254/wbms) PHP · 441 lines
1 <?php namespace Illuminate\Filesystem;
3 use ErrorException;
368 // a directory or a file. When it is actually a directory we will need to call
369 // back into this function recursively to keep copying these nested folders.
370 $target = $destination.'/'.$item->getBasename();
372 if ($item->isDir())
ZipArchive.php (https://gitlab.com/vanthanhhoh/devlovebook) PHP · 175 lines
22 * @package PHPExcel_Shared_ZipArchive
23 * @copyright Copyright (c) 2006 - 2014 PHPExcel (http://www.codeplex.com/PHPExcel)
24 * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
25 * @version ##VERSION##, ##DATE##
29 define('PCLZIP_TEMPORARY_DIR', PHPExcel_Shared_File::sys_get_temp_dir() . DIRECTORY_SEPARATOR);
30 }
31 require_once PHPEXCEL_ROOT . 'PHPExcel/Shared/PCLZip/pclzip.lib.php';
34 /**
35 * PHPExcel_Shared_ZipArchive
36 *
37 * @category PHPExcel
38 * @package PHPExcel_Shared_ZipArchive
39 * @copyright Copyright (c) 2006 - 2014 PHPExcel (http://www.codeplex.com/PHPExcel)
40 */
41 class PHPExcel_Shared_ZipArchive
SplFileInfo.php (https://gitlab.com/Blueprint-Marketing/hhvm) PHP · 444 lines
1 <?php
3 // This doc comment block generated by idl/sysdoc.php
4 /**
5 * ( excerpt from http://docs.hhvm.com/manual/en/class.splfileinfo.php )
6 *
7 * The SplFileInfo class offers a high-level object oriented interface to
15 private $infoClass = "SplFileInfo";
17 // This doc comment block generated by idl/sysdoc.php
18 /**
19 * ( excerpt from http://docs.hhvm.com/manual/en/splfileinfo.construct.php )
72 // This doc comment block generated by idl/sysdoc.php
73 /**
74 * ( excerpt from http://docs.hhvm.com/manual/en/splfileinfo.getbasename.php )
75 *
76 * This method returns the base name of the file, directory, or link
EditorUploadImageScaleTest.php (https://gitlab.com/guillaumev/alkarama) PHP · 223 lines
1 <?php
3 namespace Drupal\editor\Tests;
193 $this->drupalGet('editor/dialog/image/basic_html');
194 $this->drupalPostForm('editor/dialog/image/basic_html', $edit, t('Upload'));
195 $uploaded_image_file = $this->container->get('image.factory')->get('public://inline-images/' . basename($uri));
196 return [
197 (int) $uploaded_image_file->getWidth(),
index.php (https://github.com/DiliCMS/DiliCMS.git) PHP · 206 lines
1 <?php
3 /*
80 * --------------------------------------------------------------------
81 *
82 * Normally you will set your default controller in the routes.php file.
83 * You can, however, force a custom routing by hard-coding a
84 * specific controller class/function here. For most applications, you
113 * The $assign_to_config array below will be passed dynamically to the
114 * config class when initialized. This allows you to set custom config
115 * items or override any default config values found in the config.php file.
116 * This can be handy as it permits you to share one application between
117 * multiple front controller files, with each file containing different
152 if ( ! is_dir($system_path))
153 {
154 exit("Your system folder path does not appear to be set correctly. Please open the following file and correct this: ".pathinfo(__FILE__, PATHINFO_BASENAME));
155 }
PostImageHandler.php (https://gitlab.com/wubbajack/insided-test) PHP · 288 lines
module.php (https://github.com/harriswong/ATutor.git) PHP · 173 lines
98 $this->_pages[AT_SOCIAL_BASENAME.'profile_picture.php']['title_var'] = 'picture';
99 $this->_pages[AT_SOCIAL_BASENAME.'profile_picture.php']['parent'] = AT_SOCIAL_BASENAME.'edit_profile.php';
101 $this->_pages[AT_SOCIAL_BASENAME.'basic_profile.php']['title_var'] = 'profile';
102 $this->_pages[AT_SOCIAL_BASENAME.'basic_profile.php']['parent'] = AT_SOCIAL_BASENAME.'edit_profile.php';
104 $this->_pages[AT_SOCIAL_BASENAME.'applications.php']['title_var'] = 'applications';
125 $this->_pages[AT_SOCIAL_BASENAME.'groups/create.php']['title_var'] = 'create_groups';
126 $this->_pages[AT_SOCIAL_BASENAME.'groups/create.php']['parent'] = AT_SOCIAL_BASENAME.'groups/index.php';
128 $this->_pages[AT_SOCIAL_BASENAME.'groups/view.php']['title_var'] = 'view_groups';
163 AT_SOCIAL_BASENAME.'settings.php'),
164 isset($_pages[AT_SOCIAL_BASENAME.'index_mystart.php']['children']) ? $_pages[AT_SOCIAL_BASENAME.'index_mystart.php']['children'] : array());
166 $this->_pages[AT_SOCIAL_BASENAME.'index.php']['title_var'] = 'social';
index.php (https://gitlab.com/zanderwong/admin) PHP · 195 lines
1 <?php
3 /*
78 * --------------------------------------------------------------------
79 *
80 * Normally you will set your default controller in the routes.php file.
81 * You can, however, force a custom routing by hard-coding a
82 * specific controller class/function here. For most applications, you
111 * The $assign_to_config array below will be passed dynamically to the
112 * config class when initialized. This allows you to set custom config
113 * items or override any default config values found in the config.php file.
114 * This can be handy as it permits you to share one application between
115 * multiple front controller files, with each file containing different
146 // Is the system path correct?
147 if (!is_dir($system_path)) {
148 exit("Your system folder path does not appear to be set correctly. Please open the following file and correct this: " . pathinfo(__FILE__, PATHINFO_BASENAME));
149 }
Makefile.in
(http://angel-engine.googlecode.com/svn/trunk/)
Autoconf · 1263 lines
✨ Summary
This Autoconf code generates configuration files and scripts for a C library, libpng. It creates symbolic links to new header files in various directories, installs configuration files, and sets up versioned symbols and restricted exports. The code also defines some variables and functions that will be used during the build process.
This Autoconf code generates configuration files and scripts for a C library, libpng. It creates symbolic links to new header files in various directories, installs configuration files, and sets up versioned symbols and restricted exports. The code also defines some variables and functions that will be used during the build process.
155 #distribute headers in /usr/include/libpng/*
156 pkgincludedir = $(includedir)/$(PNGLIB_BASENAME)
157 ACLOCAL = @ACLOCAL@
158 AMTAR = @AMTAR@
283 top_builddir = @top_builddir@
284 top_srcdir = @top_srcdir@
285 PNGLIB_BASENAME = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@
287 # libpng does not follow GNU file name conventions
kSphinxSearchManager.php (https://github.com/richhl/kalturaCE.git) PHP · 203 lines
DirectFilesystem.php (https://github.com/ChuguluGames/mediawiki-svn.git) PHP · 500 lines
1 <?php
3 /**
4 * File holding the DirectFilesystem class.
5 *
6 * @file DirectFilesystem.php
7 * @ingroup Deployment
8 * @ingroup Filesystem
17 /**
18 * Filesystem class for direct PHP file and folder manipulation.
19 *
20 * @author Jeroen De Dauw
360 public function listDir( $path, $includeHidden = true, $recursive = false ) {
361 if ( $this->isFile( $path ) ) {
362 $limit_file = basename( $path );
363 $path = dirname( $path );
364 } else {
smarty_internal_cacheresource_file.php (https://github.com/taptouchclick/The-Event-Day.git) PHP · 207 lines
1 <?php
3 /**
54 $_cache_dir .= DS;
55 }
56 return $_cache_dir . $_cache_id . $_compile_id . $_filepath . '.' . basename($_source_file_path) . '.php';
57 }
148 $this->smarty->caching = $_save_stat;
149 if ($tpl->isExisting()) {
150 $_resourcename_parts = basename(str_replace('^', '/', $tpl->getCachedFilepath()));
151 // remove from template cache
152 unset($this->smarty->template_objects[sha1($tpl->template_resource . $tpl->cache_id . $tpl->compile_id)]);
162 $_cache = new RecursiveIteratorIterator($_cacheDirs, RecursiveIteratorIterator::CHILD_FIRST);
163 foreach ($_cache as $_file) {
164 if (substr($_file->getBasename(),0,1) == '.') continue;
165 // directory ?
166 if ($_file->isDir()) {
DirectoryList.php (https://github.com/quimateur/SIFO.git) PHP · 205 lines
1 <?php
3 /**
34 * $iterator = $dir->getRecursiveList( $path );
35 *
36 * // Recursive list of PHP and HTML files (hidding dirs)
37 * $iterator = $dir->getRecursiveList( $path, false, array( 'php', 'html' ) );
44 * where $DirectoryIterator has many interesting methods such as:
45 * ->getATime()
46 * ->getBasename ( $ending_part_to_remove )
47 * ->getCTime()
48 * ->getExtension()
66 * ->valid()
67 *
68 * @see http://www.php.net/manual/en/spl.iterators.php
69 */
70 class DirectoryList
ZipArchive.php (https://github.com/vadimonus/moodle.git) PHP · 163 lines
4 define('PCLZIP_TEMPORARY_DIR', PHPExcel_Shared_File::sys_get_temp_dir() . DIRECTORY_SEPARATOR);
5 }
6 require_once PHPEXCEL_ROOT . 'PHPExcel/Shared/PCLZip/pclzip.lib.php';
8 /**
9 * PHPExcel_Shared_ZipArchive
10 *
11 * Copyright (c) 2006 - 2015 PHPExcel
25 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
26 *
27 * @category PHPExcel
28 * @package PHPExcel_Shared_ZipArchive
29 * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel)
30 * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
31 * @version ##VERSION##, ##DATE##
TestCase.php (https://github.com/ewandor/horde.git) PHP · 172 lines
1 <?php
2 /**
3 * Test base.
4 *
5 * PHP version 5
6 *
7 * @category Horde
10 * @author Gunnar Wrobel <wrobel@pardus.de>
11 * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1
12 * @link http://pear.horde.org/index.php?package=Components
13 */
26 * @author Gunnar Wrobel <wrobel@pardus.de>
27 * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1
28 * @link http://pear.horde.org/index.php?package=Components
29 */
30 class Components_TestCase
FormTypeFieldExtension.php (https://github.com/dcsg/SonataAdminBundle.git) PHP · 198 lines
1 <?php
3 /*
116 // add a new block types, so the Admin Form element can be tweaked based on the admin code
117 $block_prefixes = $view->vars['block_prefixes'];
118 $baseName = str_replace('.', '_', $sonataAdmin['admin']->getCode());
119 $baseType = $block_prefixes[count($block_prefixes) - 2];
120 $blockSuffix = preg_replace("#^_([a-z0-9]{14})_(.++)$#", "\$2", array_pop($block_prefixes));
122 $block_prefixes[] = sprintf('%s_%s', $baseName, $baseType);
123 $block_prefixes[] = sprintf('%s_%s_%s', $baseName, $sonataAdmin['name'], $baseType);
124 $block_prefixes[] = sprintf('%s_%s_%s_%s', $baseName, $sonataAdmin['name'], $baseType, $blockSuffix);
126 if (isset($sonataAdmin['block_name']) && $sonataAdmin['block_name'] !== false) {
Mail.php (https://github.com/shooray/oscommerce.git) PHP · 375 lines
1 <?php
2 /**
3 * osCommerce Online Merchant
106 } elseif ( file_exists($file) && is_readable($file) ) {
107 $data = file_get_contents($file);
108 $filename = basename($file);
109 $mimetype = $this->_get_mime_type($filename);
110 } else {
121 } elseif ( file_exists($file) && is_readable($file) ) {
122 $data = file_get_contents($file);
123 $filename = basename($file);
124 $mimetype = $this->_get_mime_type($filename);
125 } else {
shipping.rate_form.php (https://github.com/shafiqissani/Jewelery-Ecommerce-.git) PHP · 122 lines
52 </tr>
53 <tr>
54 <td width="21%" valign="top" ><strong><?php echo $VM_LANG->_('PHPSHOP_RATE_FORM_COUNTRY') .": </strong><br/><br/>".$VM_LANG->_('PHPSHOP_MULTISELECT') ?></td>
55 <td width="79%" ><?php $ps_shipping->country_multiple_list("shipping_rate_country[]", $db->f("shipping_rate_country")); ?></td>
62 </tr>
63 <tr>
64 <td width="21%" ><div align="right"><strong><?php echo $VM_LANG->_('PHPSHOP_RATE_FORM_ZIP_END') ?>:</strong></div></td>
65 <td width="79%" >
66 <input type="text" class="inputbox" name="shipping_rate_zip_end" size="32" maxlength="255" value="<?php $db->sp("shipping_rate_zip_end") ?>">
68 </tr>
69 <tr>
70 <td width="21%" ><div align="right"><strong><?php echo $VM_LANG->_('PHPSHOP_RATE_FORM_WEIGHT_START') ?>:</strong></div></td>
71 <td width="79%" >
72 <input type="text" class="inputbox" name="shipping_rate_weight_start" size="32" maxlength="255" value="<?php $db->sp("shipping_rate_weight_start") ?>">
100 if (TAX_MODE == '1') { ?>
101 <tr>
102 <td width="21%" ><div align="right"><strong><?php echo $VM_LANG->_('PHPSHOP_RATE_FORM_VAT_ID') ?>:</strong></div></td>
103 <td width="79%" >
104 <?php
execute.php (https://gitlab.com/elasa/shop2.elasa.ir) PHP · 205 lines
1 <?php
2 include('config/config.php');
3 if ($_SESSION['verify'] != 'RESPONSIVEfilemanager') die('forbiden');
4 include('include/utils.php');
6 $_POST['path_thumb'] = $thumbs_base_path.$_POST['path_thumb'];
15 die('wrong path');
17 $language_file = 'lang/en.php';
18 if (isset($_GET['lang']) && $_GET['lang'] != 'undefined' && $_GET['lang'] != '')
19 {
20 $path_parts = pathinfo($_GET['lang']);
21 if (is_readable('lang/'.$path_parts['basename'].'.php'))
22 $language_file = 'lang/'.$path_parts['basename'].'.php';
Docx.php (https://github.com/kiranatama/sagalaya.git) PHP · 156 lines
mail.php (https://gitlab.com/2202Programming/navxmxp) PHP · 406 lines
1 <?php
2 class Mail {
3 protected $to;
94 $header .= 'Reply-To: ' . '=?UTF-8?B?' . base64_encode($this->sender) . '?=' . '<' . $this->from . '>' . $this->newline;
95 $header .= 'Return-Path: ' . $this->from . $this->newline;
96 $header .= 'X-Mailer: PHP/' . phpversion() . $this->newline;
97 $header .= 'Content-Type: multipart/related; boundary="' . $boundary . '"' . $this->newline . $this->newline;
132 $message .= '--' . $boundary . $this->newline;
133 $message .= 'Content-Type: application/octet-stream; name="' . basename($attachment) . '"' . $this->newline;
134 $message .= 'Content-Transfer-Encoding: base64' . $this->newline;
135 $message .= 'Content-Disposition: attachment; filename="' . basename($attachment) . '"' . $this->newline;
136 $message .= 'Content-ID: <' . basename(urlencode($attachment)) . '>' . $this->newline;
137 $message .= 'X-Attachment-Id: ' . basename(urlencode($attachment)) . $this->newline . $this->newline;
postscript.py (https://github.com/greenarrow/skeinforge.git) Python · 97 lines
8 If furthermore the 'File Extension' is set to a file extension, the postscript file will be sent to the program, along with the file extension for the converted output. The default is blank because some systems do not have an image conversion program; if you have or will install an image conversion program, a common 'File Extension' is png. A good open source conversion program is Image Magick, which is available at:
9 http://www.imagemagick.org/script/index.php
11 An export canvas plugin is a script in the export_canvas_plugins folder which has the function getNewRepository, and which has a repository class with the functions setCanvasFileNameSuffix to set variables and execute to save the file. It is meant to be run from an analyze viewer tool, like skeinlayer or skeiniso. To ensure that the plugin works on platforms which do not handle file capitalization properly, give the plugin a lower case name.
48 def execute(self):
49 "Convert to postscript button has been clicked. Export the canvas as a postscript file."
50 postscriptFileName = archive.getFilePathWithUnderscoredBasename( self.fileName, self.suffix )
51 boundingBox = self.canvas.bbox( settings.Tkinter.ALL ) # tuple (w, n, e, s)
52 boxW = boundingBox[0]
73 print('http://www.gimp.org/')
74 return
75 shellCommand += ' ' + archive.getFilePathWithUnderscoredBasename( postscriptFilePath, '.' + fileExtension + '"')
76 print('Sending the shell command:')
77 print(shellCommand)
zwinit.php (https://github.com/zhanghedong/zw.git) PHP · 188 lines
1 <?php
2 /*
69 $meta_box_value = $meta_box['std'];
71 echo'<input type="hidden" name="'.$meta_box['name'].'_noncename" id="'.$meta_box['name'].'_noncename" value="'.wp_create_nonce( plugin_basename(__FILE__) ).'" />';
73 // 自定义字段标题
101 foreach($new_meta_boxes as $meta_box) {
102 if ( !wp_verify_nonce( $_POST[$meta_box['name'].'_noncename'], plugin_basename(__FILE__) )) {
103 return $post_id;
104 }
167 $content .=" \n\n";
168 wp_mail($email_to,$subject,$content);
169 //global $phpmailer;
170 //if ( $phpmailer->ErrorInfo != "" ) {
epgdata2vdr.sh (https://github.com/yavdr/vdr-addon-epgdata2vdr.git) Shell · 140 lines
37 exit 1
38 else
39 nice -n 19 $CURLBIN "http://www.epgdata.com/index.php?action=sendInclude&iOEM=&pin=$PIN&dataType=xml" \
40 -o $INCLUDEDIR/include.zip
41 $UNZIPBIN -o $INCLUDEDIR/include.zip -d $INCLUDEDIR
57 echo "<--- Processing data with offset $i --->"
58 TMP=`mktemp`
59 nice -n 19 $CURLBIN -I -D $TMP "http://www.epgdata.com/index.php?action=sendPackage&iOEM=VDR&pin=$PIN&dayOffset=$i&dataType=xml" &> /dev/null
60 FILE=`grep -e "^Content-disposition.*$" $TMP | sed -e ' s/\r//g' | cut -d"=" -f2`
61 FILE="`basename $FILE .zip`"
67 if [ ! -z $SIZE ]; then
68 if [ ! -e $WORKDIR/files/$FILE.zip ]; then
69 nice -n 19 $CURLBIN "http://www.epgdata.com/index.php?action=sendPackage&iOEM=VDR&pin=$PIN&dayOffset=$i&dataType=xml" -o $WORKDIR/files/$FILE.zip
70 rm $WORKDIR/$FILE.epg > /dev/null 2>&1
71 else
category.php (https://github.com/mhoofman/wordpress-heroku.git) PHP · 339 lines
1 <?php
2 /**
3 * WordPress Category API
106 $category_path = str_replace( '%20', ' ', $category_path );
107 $category_paths = '/' . trim( $category_path, '/' );
108 $leaf_path = sanitize_title( basename( $category_paths ) );
109 $category_paths = explode( '/', $category_paths );
110 $full_path = '';
311 * The parameter should only be passed a variable and not create the array or
312 * object inline to the parameter. The reason for this is that parameter is
313 * passed by reference and PHP will fail unless it has the variable.
314 *
315 * There is no return value, because everything is updated on the variable you
316 * pass to it. This is one of the features with using pass by reference in PHP.
317 *
318 * @since 2.3.0
Image.php (https://bitbucket.org/acidel/buykoala.git) PHP · 294 lines
Database.php (https://bitbucket.org/acidel/buykoala.git) PHP · 321 lines
1 <?php
2 /**
3 * Magento
8 * that is bundled with this package in the file LICENSE.txt.
9 * It is also available through the world-wide-web at this URL:
10 * http://opensource.org/licenses/osl-3.0.php
11 * If you did not receive a copy of the license and are unable to
12 * obtain it through the world-wide-web, please send an email
22 * @package Mage_Core
23 * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24 * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25 */
115 public function loadByFilename($filePath)
116 {
117 $filename = basename($filePath);
118 $path = dirname($filePath);
119 $this->_getResource()->loadByFilename($this, $filename, $path);
Object.php (https://bitbucket.org/acidel/buykoala.git) PHP · 294 lines
1 <?php
2 /**
3 * Magento
8 * that is bundled with this package in the file LICENSE.txt.
9 * It is also available through the world-wide-web at this URL:
10 * http://opensource.org/licenses/osl-3.0.php
11 * If you did not receive a copy of the license and are unable to
12 * obtain it through the world-wide-web, please send an email
22 * @package Varien_File
23 * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24 * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25 */
33 */
35 require_once("Varien/Object.php");
36 require_once('Varien/Directory/IFactory.php');
dtc.h
(http://omnia2droid.googlecode.com/svn/trunk/)
C++ Header · 247 lines
✨ Summary
This is a C header file that provides functionality for working with device trees, which are data structures used to describe hardware components and their relationships. It includes functions for creating and manipulating device trees, as well as converting between different formats such as binary blobs and source code. It also handles memory management and error checking.
This is a C header file that provides functionality for working with device trees, which are data structures used to describe hardware components and their relationships. It includes functions for creating and manipulating device trees, as well as converting between different formats such as binary blobs and source code. It also handles memory management and error checking.
menu.php (https://gitlab.com/juanito.abelo/nlmobile) PHP · 345 lines
class.pope_cache.php (https://github.com/livinglab/openlab.git) PHP · 334 lines
smarty_template_compiled.php (https://gitlab.com/team_fsn/fsn-php) PHP · 297 lines
92 // set basename if not specified
93 $_basename = $_template->source->handler->getBasename($_template->source);
94 if ($_basename === null) {
95 $_basename = basename(preg_replace('![^\w]+!', '_', $_template->source->name));
96 }
97 // separate (optional) basename by dot
98 if ($_basename) {
99 $_basename = '.' . $_basename;
100 }
102 $this->filepath = $_compile_dir . $_filepath . '.' . $_template->source->type . $_basename . $_cache . '.php';
103 $this->exists = is_file($this->filepath);
104 if (!$this->exists) {
data_cover.php (https://github.com/oohnoitz/wp-manga-project-manager.git) PHP · 136 lines
20 if ( isset( $_POST['wpmanga_nonce'] ) ) {
21 if ( !wp_verify_nonce( $_POST['wpmanga_nonce'], plugin_basename( plugin_sDIR() . '/wpmanga.php' ) ) ) {
22 echo '<div class="error"><p>Error: Security Verification Failed.</p></div>';
23 } else {
109 <tr class="form-field">
110 <th scope="row"><label for="volume">Volume</label></th>
111 <td><input name="volume" id="volume" type="number" value="<?php if (isset($cover)) echo $cover->volume; else echo '0'; ?>"<?php if ($action == 'delete') echo ' readonly="readonly"'; ?> autofocus></td>
112 </tr>
114 <tr class="form">
115 <th scope="row"><label for="image">Image <span class="description">(required)</span></label></th>
116 <td><input id="image" type="url" name="image" size="66" placeholder="Enter an URL or upload an image cover for this volume." value="<?php if (isset($cover)) echo $cover->image; ?>"<?php if ($action == 'delete') echo ' readonly="readonly"'; ?> required><input id="<?php if ($action != 'delete') echo 'upload_image_button'; ?>" type="button" value="Upload Image"<?php if ($action == 'delete') echo ' readonly="readonly"'; ?>></td>
117 </tr>
118 </table>
121 <input type="submit" class="button-primary" name="save" value="<?php echo ucfirst($action); ?> Volume Cover" />
122 <input type="hidden" name="wpmanga_nonce" value="<?php echo wp_create_nonce( plugin_basename( plugin_sDIR() . '/wpmanga.php' ) ); ?>" />
123 </p>
124 </form>
Test.php (https://github.com/outbounder/php5boilerplate.git) PHP · 295 lines
1 <?php
3 /*
33 require_once($arg);
34 $parts = explode("/", $arg);
35 $className = str_replace(".php", "", array_pop($parts));
36 $instance = new $className();
37 $isntance->run();
279 $trace = $this->getTraceInformation($e->getTrace());
280 if(isset($trace)) {
281 $file = basename($trace["file"]);
282 $resultMessage = '';
283 $resultMessage .= '<strong>'.$file.'</strong>';
global.inc.php (https://github.com/drietsch/newcms.git) PHP · 373 lines
openplans_update_wp.py (https://github.com/socialplanning/opencore-wordpress-mu-scripts.git) Python · 208 lines
15 def create_blog(blog_base, domain, path, title, topp_secret_filename):
16 url = blog_base + '/openplans-create-blog.php'
17 data = {
18 'domain': domain,
34 def add_user(blog_base, username, email, topp_secret_filename):
35 url = blog_base + '/openplans-create-user.php'
36 data = {
37 'username': username,
52 def remove_user(blog_base, username, topp_secret_filename):
53 url = blog_base + '/openplans-remove-user.php'
54 data = {
55 'username': username,
smarty_internal_cacheresource_file.php (https://gitlab.com/adamlwalker/generatedata) PHP · 264 lines
1 <?php
2 /**
3 * Smarty Internal Plugin CacheResource File
61 $cached->lock_id = $_lock_dir.sha1($_cache_id.$_compile_id.$_template->source->uid).'.lock';
62 }
63 $cached->filepath = $_cache_dir . $_cache_id . $_compile_id . $_filepath . '.' . basename($_source_file_path) . '.php';
64 $cached->timestamp = @filemtime($cached->filepath);
65 $cached->exists = !!$cached->timestamp;
167 if ($tpl->source->exists) {
168 $_resourcename_parts = basename(str_replace('^', '/', $tpl->cached->filepath));
169 } else {
170 return 0;
177 $_cache = new RecursiveIteratorIterator($_cacheDirs, RecursiveIteratorIterator::CHILD_FIRST);
178 foreach ($_cache as $_file) {
179 if (substr($_file->getBasename(),0,1) == '.' || strpos($_file, '.svn') !== false) continue;
180 // directory ?
181 if ($_file->isDir()) {
icwp-wpfunctions.php (https://gitlab.com/hunt9310/ras) PHP · 332 lines
1 <?php
2 require_once( dirname(__FILE__).'/icwp-data-processor.php' );
53 */
54 public function getPluginUpgradeLink( $sPluginFile ) {
55 $sUrl = self_admin_url( 'update.php' ) ;
56 $aQueryArgs = array(
57 'action' => 'upgrade-plugin',
80 if ( !$this->getIsPluginUpdateAvailable( $sPluginFile )
81 || ( isset( $GLOBALS['pagenow'] ) && $GLOBALS['pagenow'] == 'update.php' ) ) {
82 return true;
83 }
273 $sScript = $oDp->FetchServer( 'PHP_SELF' );
274 }
275 if ( is_admin() && !empty( $sScript ) && basename( $sScript ) == 'admin.php' ) {
276 $sCurrentPage = $oDp->FetchGet( 'page' );
277 }
expandlibs.py (https://github.com/rillian/firefox.git) Python · 143 lines
74 # On mac, the xul library is named XUL, instead of libxul.dylib. Assume any
75 # file by that name is a dynamic library.
76 return os.path.splitext(path)[1] == conf.DLL_SUFFIX or os.path.basename(path) == 'XUL'
78 class LibDescriptor(dict):
112 '''Internal function doing the actual work'''
113 (root, ext) = os.path.splitext(arg)
114 if ext != conf.LIB_SUFFIX or not os.path.basename(root).startswith(conf.LIB_PREFIX):
115 return [relativize(arg)]
116 if conf.LIB_PREFIX:
Migrator.php (https://gitlab.com/supriyanto-edodoe22/manpro) PHP · 380 lines
1 <?php namespace Illuminate\Database\Migrations;
3 use Illuminate\Filesystem\Filesystem;
213 public function getMigrationFiles($path)
214 {
215 $files = $this->files->glob($path.'/*_*.php');
217 // Once we have the array of files in the directory we will just remove the
218 // extension and take the basename of the file which is all we need when
219 // finding the migrations that haven't been run against the databases.
220 if ($files === false) return array();
222 $files = array_map(function($file)
223 {
224 return str_replace('.php', '', basename($file));
226 }, $files);
create_xml_file.class.php (https://github.com/jarednipper/HSU-common-code.git) PHP · 108 lines
1 <?php // $Id: create_xml_file.class.php,v 1.5 2007/10/10 05:25:28 nicolasconnault Exp $
3 ///////////////////////////////////////////////////////////////////////////
75 $xmlcomment = 'XMLDB file for Moodle ' . dirname($xmlpath);
77 $xmltable = strtolower(basename(dirname($xmlpath)));
79 /// Initial contents
Database.php (https://bitbucket.org/acidel/buykoala.git) PHP · 255 lines
1 <?php
2 /**
3 * Magento
8 * that is bundled with this package in the file LICENSE.txt.
9 * It is also available through the world-wide-web at this URL:
10 * http://opensource.org/licenses/osl-3.0.php
11 * If you did not receive a copy of the license and are unable to
12 * obtain it through the world-wide-web, please send an email
22 * @package Mage_Core
23 * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24 * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25 */
128 if (!$directory->getId()) {
129 $dirName = basename($path);
130 $dirPath = dirname($path);
SourceThemeDeployCommand.php (https://gitlab.com/crazybutterfly815/magento2) PHP · 190 lines
tag.php
(http://swx-format.googlecode.com/svn/trunk/)
PHP · 1392 lines
✨ Summary
This PHP code defines a set of classes that represent HTML tags and elements, providing methods for accessing and manipulating their attributes and content. It appears to be part of a testing framework or tool, allowing developers to parse and interact with HTML forms and frames in a structured way. The classes provide a simple and consistent interface for working with HTML elements.
This PHP code defines a set of classes that represent HTML tags and elements, providing methods for accessing and manipulating their attributes and content. It appears to be part of a testing framework or tool, allowing developers to parse and interact with HTML forms and frames in a structured way. The classes provide a simple and consistent interface for working with HTML elements.
1 <?php
2 /**
3 * Base include file for SimpleTest.
4 * @package SimpleTest
5 * @subpackage WebTester
6 * @version $Id: tag.php,v 1.95 2006/02/05 00:34:29 lastcraft Exp $
7 */
10 * include SimpleTest files
11 */
12 require_once(dirname(__FILE__) . '/parser.php');
13 require_once(dirname(__FILE__) . '/encoding.php');
662 $this->getName(),
663 implode('', file($this->getValue())),
664 basename($this->getValue()));
665 }
666 }
requireddestination.cs
(http://google-gdata.googlecode.com/svn/trunk/)
C# · 53 lines
✨ Summary
This C# code defines a class RequiredDestination
that represents an element in Google’s Content for Shopping API. It has a default constructor and a parameterized constructor to create instances with a destination value. The class provides a public property Destination
to access and modify the element’s attribute.
This C# code defines a class RequiredDestination
that represents an element in Google’s Content for Shopping API. It has a default constructor and a parameterized constructor to create instances with a destination value. The class provides a public property Destination
to access and modify the element’s attribute.
24 : base(ContentForShoppingNameTable.RequiredDestination,
25 ContentForShoppingNameTable.scDataPrefix,
26 ContentForShoppingNameTable.BaseNamespace) {
27 }
34 : base(ContentForShoppingNameTable.RequiredDestination,
35 ContentForShoppingNameTable.scDataPrefix,
36 ContentForShoppingNameTable.BaseNamespace) {
37 this.Destination = destination;
38 }
AntDomBasenameTask.java (https://bitbucket.org/nbargnesi/idea.git) Java · 44 lines
template_manager.adb
(git://github.com/landgraf/matreshka.git)
Ada · 750 lines
✨ Summary
This Ada code is part of a template manager, responsible for generating files for an Aflex compiler. It creates specification and body files for packages, including DFA (Deterministic Finite Automaton) and IO (Input/Output) packages. The templates are used to generate boilerplate code for the compiler. The code uses a template-based approach to create reusable and maintainable code.
This Ada code is part of a template manager, responsible for generating files for an Aflex compiler. It creates specification and body files for packages, including DFA (Deterministic Finite Automaton) and IO (Input/Output) packages. The templates are used to generate boilerplate code for the compiler. The code uses a template-based approach to create reusable and maintainable code.
691 External_File_Manager.Get_DFA_Spec_File (DFA_Out_Spec_File);
692 External_File_Manager.Get_DFA_Body_File (DFA_Out_Body_File);
693 Put_Line (DFA_Out_Spec_File, "package " & Misc.Basename & ".DFA is");
695 if DDebug then
704 Template_Out (DFA_Out_Spec_File, DFA_Template, DFA_Current_Line);
705 Put_Line (DFA_Out_Spec_File, "end " & Misc.Basename & ".DFA;");
707 Put_Line (DFA_Out_Body_File, "package body " & Misc.Basename & ".DFA is");
708 Template_Out (DFA_Out_Body_File, DFA_Template, DFA_Current_Line);
709 Put_Line (DFA_Out_Body_File, "end " & Misc.Basename & ".DFA;");
710 end Generate_DFA_File;
darcs.py (https://bitbucket.org/nbargnesi/idea.git) Python · 167 lines
install-sh
(https://freespeech.svn.sourceforge.net/svnroot/freespeech)
Shell · 252 lines
✨ Summary
This shell script, install
, is a utility for installing files and directories on a system. It takes input from the user, including source file/directory, destination directory, and options (e.g., ownership, permissions). The script creates the destination directory if necessary, moves or copies the file to it, and applies any specified transformations or modifications before renaming the final executable.
This shell script, install
, is a utility for installing files and directories on a system. It takes input from the user, including source file/directory, destination directory, and options (e.g., ownership, permissions). The script creates the destination directory if necessary, moves or copies the file to it, and applies any specified transformations or modifications before renaming the final executable.
42 mkdirprog="${MKDIRPROG-mkdir}"
44 transformbasename=""
45 transform_arg=""
46 instcmd="$mvprog"
88 continue;;
90 -b=*) transformbasename=`echo $1 | sed 's/-b=//'`
91 shift
92 continue;;
150 if [ -d $dst ]
151 then
152 dst="$dst"/`basename $src`
153 else
154 true
207 dstfile=`basename $dst`
208 else
209 dstfile=`basename $dst $transformbasename |
210 sed $transformarg`$transformbasename
php.xml (https://jedit.svn.sourceforge.net/svnroot/jedit) XML · 2590 lines
11 </PROPS>
12 <RULES IGNORE_CASE="TRUE">
13 <SPAN TYPE="MARKUP" DELEGATE="PHP">
14 <BEGIN><?php</BEGIN>
16 </SPAN>
18 <SPAN TYPE="MARKUP" DELEGATE="PHP">
19 <BEGIN><?</BEGIN>
20 <END>?></END>
21 </SPAN>
23 <SPAN TYPE="MARKUP" DELEGATE="PHP">
24 <BEGIN><%=</BEGIN>
25 <END>%></END>
65 <RULES SET="TAGS" DEFAULT="MARKUP">
66 <SPAN TYPE="MARKUP" DELEGATE="PHP">
67 <BEGIN><?php</BEGIN>
genbuild.py
(https://swig.svn.sourceforge.net/svnroot/swig)
Python · 156 lines
✨ Summary
This Python script generates a batch file for building SWIG projects. It creates a new file for each source file, adding commands to compile and link the project. The script then walks through a directory tree, generating files for all source files found. Finally, it writes a main batch file that calls these generated files in sequence.
This Python script generates a batch file for building SWIG projects. It creates a new file for each source file, adding commands to compile and link the project. The script then walks through a directory tree, generating files for all source files found. Finally, it writes a main batch file that calls these generated files in sequence.
ReplaceForEachLoopWithIndexedForLoopIntention.java (https://bitbucket.org/nbargnesi/idea.git) Java · 272 lines
239 public static String createVariableName(
240 @Nullable String baseName,
241 @NotNull PsiExpression assignedExpression) {
242 final Project project = assignedExpression.getProject();
245 final SuggestedNameInfo names =
246 codeStyleManager.suggestVariableName(VariableKind.LOCAL_VARIABLE,
247 baseName, assignedExpression, null);
248 if (names.names.length == 0) {
249 return codeStyleManager.suggestUniqueVariableName(baseName,
254 }
256 public static String createVariableName(@Nullable String baseName,
257 @NotNull PsiType type,
258 @NotNull PsiElement context) {
mrecover.c (https://bitbucket.org/clivecrous/ruhack.git) C · 1432 lines
27 * To do (maybe, just maybe):
28 * - Merge with the code in util/recover.c.
29 * - Document launch (e.g. GUI equivalent of 'recover basename').
30 * - Drag and drop.
31 * - Internal memory tweaks (stack and heap usage).
230 long dirID; /* directory i.d. */
231 NMUPP nmCompletionUPP; /* UPP for nmCompletion */
232 FileFilterUPP basenameFileFilterUPP; /* UPP for basenameFileFilter */
233 UserItemUPP drawThermoUPP; /* UPP for progress callback */
302 InitCursor();
303 nmCompletionUPP = NewNMProc(nmCompletion);
304 basenameFileFilterUPP = NewFileFilterProc(basenameFileFilter);
305 drawThermoUPP = NewUserItemProc(drawThermo);
makefile.xml (https://jedit.svn.sourceforge.net/svnroot/jedit) XML · 96 lines
common_rules.mak (https://bitbucket.org/__wp__/mb-linux-msli.git) Makefile · 162 lines
session.php
(http://forceworkbench.googlecode.com/svn/trunk/workbench/)
PHP · 106 lines
✨ Summary
This PHP code initializes and configures a Workbench application, setting up session management, error handling, and security measures to ensure a secure connection with Salesforce. It also checks for user authentication, validates CSRF tokens, and monitors user activity to prevent idle sessions from expiring prematurely.
This PHP code initializes and configures a Workbench application, setting up session management, error handling, and security measures to ensure a secure connection with Salesforce. It also checks for user authentication, validates CSRF tokens, and monitors user activity to prevent idle sessions from expiring prematurely.
50 //clear ResultsWithData and retrievedZips from session unless downloading them
51 if (isset($_SESSION['resultsWithData']) && basename($_SERVER['PHP_SELF']) != 'downloadResultsWithData.php') {
52 unset($_SESSION['resultsWithData']);
53 }
55 if (isset($_SESSION['retrievedZips']) && basename($_SERVER['PHP_SELF']) != 'metadataStatus.php') {
56 unset($_SESSION['retrievedZips']);
57 }
94 if (isLoggedIn()) {
95 // todo: should this be in the ctx?
96 if (!in_array(basename($_SERVER['PHP_SELF'], ".php"), array("login", "logout")) && isset($_SESSION['lastRequestTime'])) {
97 $idleTime = microtime(true) - $_SESSION['lastRequestTime'];
98 if ($idleTime > (getConfig("sessionIdleMinutes") * 60)) {
hcat_server_start.sh (https://svn.apache.org/repos/asf/incubator/hcatalog/) text · 0 lines
bulkstamp.py
(git://github.com/IronLanguages/main.git)
Python · 136 lines
✨ Summary
This is a Python script that stamps version information on files in a given directory tree. It takes three arguments: the version number, the root directory to search, and a description file containing product name, major, minor, and other version information. The script uses the verstamp module to stamp the version information on files with extensions .dll, .pyd, .exe, and .ocx.
This is a Python script that stamps version information on files in a given directory tree. It takes three arguments: the version number, the root directory to search, and a description file containing product name, major, minor, and other version information. The script uses the verstamp module to stamp the version information on files with extensions .dll, .pyd, .exe, and .ocx.
file.c
(https://bitbucket.org/cabalistic/ogredeps/)
C · 1181 lines
✨ Summary
This C code provides functions for interacting with ZIP archives, specifically for reading and writing data from a ZIP file. It includes functions for reading and writing data in various modes (e.g., unstore, inflate), seeking to specific positions within the archive, and telling the current position of the read/write cursor. The code also handles large file mode limitations by providing alternative 32-bit versions of these functions.
This C code provides functions for interacting with ZIP archives, specifically for reading and writing data from a ZIP file. It includes functions for reading and writing data in various modes (e.g., unstore, inflate), seeking to specific positions within the archive, and telling the current position of the read/write cursor. The code also handles large file mode limitations by providing alternative 32-bit versions of these functions.
187 struct zzip_dir_hdr *hdr = dir->hdr0;
188 int (*filename_strcmp) (zzip_char_t *, zzip_char_t *);
189 zzip_char_t* (*filename_basename)(zzip_char_t*);
191 filename_strcmp = (o_mode & ZZIP_CASELESS) ? dirsep_strcasecmp : strcmp;
192 filename_basename = (o_mode & ZZIP_CASELESS) ? dirsep_basename : strrchr_basename;
194 if (! dir)
804 /* see if we can open a file that is a zip file */
805 {
806 char basename[PATH_MAX];
807 char *p;
808 int filename_len = strlen(filename);
install-sh
(git://github.com/gmarceau/PLT.git)
Shell · 252 lines
✨ Summary
This shell script, install
, is a utility for installing files and directories on a system. It takes input from the user, including source file/directory and destination path, and performs necessary operations such as creating directories, changing permissions, ownership, and stripping file names. The script also handles errors and edge cases, ensuring that the installation process is robust and reliable.
This shell script, install
, is a utility for installing files and directories on a system. It takes input from the user, including source file/directory and destination path, and performs necessary operations such as creating directories, changing permissions, ownership, and stripping file names. The script also handles errors and edge cases, ensuring that the installation process is robust and reliable.
42 mkdirprog="${MKDIRPROG-mkdir}"
44 transformbasename=""
45 transform_arg=""
46 instcmd="$mvprog"
88 continue;;
90 -b=*) transformbasename=`echo $1 | sed 's/-b=//'`
91 shift
92 continue;;
150 if [ -d $dst ]
151 then
152 dst="$dst"/`basename $src`
153 else
154 :
207 dstfile=`basename $dst`
208 else
209 dstfile=`basename $dst $transformbasename |
210 sed $transformarg`$transformbasename
compressor.rb
(git://github.com/documentcloud/jammit.git)
Ruby · 266 lines
✨ Summary
This Ruby code is a helper class for generating asset tags in a Rails application. It provides methods for constructing asset URLs, checking embeddability, and encoding asset contents. The class appears to be designed to work with CSS assets, handling issues like relative paths, cache-busting, and base64 encoding.
This Ruby code is a helper class for generating asset tags in a Rails application. It provides methods for constructing asset URLs, checking embeddability, and encoding asset contents. The class appears to be designed to work with CSS assets, handling issues like relative paths, cache-busting, and base64 encoding.
107 # JST-compilation function to the top of the package, unless you've
108 # specified your own preferred function, or turned it off.
109 # JST templates are named with the basename of their file.
110 def compile_jst(paths)
111 namespace = Jammit.template_namespace
143 # the namespaced prefix. Otherwise, simply use the filename.
144 def template_name(path, base_path)
145 return File.basename(path, ".#{Jammit.template_extension}") unless base_path
146 path.gsub(/\A#{Regexp.escape(base_path)}\/(.*)\.#{Jammit.template_extension}\Z/, '\1')
147 end
177 paths, index = {}, 0
178 css = css.gsub(EMBED_REPLACER) do |url|
179 i = paths[$1] ||= "#{index += 1}-#{File.basename($1)}"
180 "url(mhtml:#{asset_url}!#{i})"
181 end